Re: [core] [T2TRG] Review of CoRAL

Christian M. Amsüss <> Sat, 10 November 2018 09:54 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 47EAF130E13 for <>; Sat, 10 Nov 2018 01:54:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -0.921
X-Spam-Status: No, score=-0.921 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FROM_EXCESS_BASE64=0.979] autolearn=no autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id HjkNZLTmWklU for <>; Sat, 10 Nov 2018 01:54:40 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 21AB7130DE4 for <>; Sat, 10 Nov 2018 01:54:39 -0800 (PST)
Received: from (unknown [IPv6:2a02:b18:c13b:8010:a800:ff:fede:b1bd]) by (Postfix) with ESMTPS id 19CF341F8C; Sat, 10 Nov 2018 10:54:38 +0100 (CET)
Received: from (unknown [IPv6:2a02:b18:c13b:8010:a800:ff:fede:b1bf]) by (Postfix) with ESMTP id 0266039; Sat, 10 Nov 2018 10:54:37 +0100 (CET)
Received: from ( [IPv6:2a02:b18:c13b:8010::71b]) by (Postfix) with ESMTPSA id 8115D2E; Sat, 10 Nov 2018 10:54:36 +0100 (CET)
Received: (nullmailer pid 19399 invoked by uid 1000); Sat, 10 Nov 2018 09:54:35 -0000
Date: Sat, 10 Nov 2018 10:54:35 +0100
From: Christian =?iso-8859-1?B?TS4gQW1z/HNz?= <>
To: Klaus Hartke <>
Cc: " WG" <>
Message-ID: <>
References: <> <> <> <>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="V0207lvV8h4k8FAm"
Content-Disposition: inline
In-Reply-To: <>
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <>
Subject: Re: [core] [T2TRG] Review of CoRAL
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sat, 10 Nov 2018 09:54:43 -0000

On Sat, Nov 10, 2018 at 10:08:55AM +0100, Klaus Hartke wrote:
> Christian Amsüss wrote:
> > > The draft currently specifies that a base IRI is resolved against the
> > > current context IRI, not the previous base IRI.
> >
> > Thanks; likewise, I missed updating the current relation number. Both
> > being fixed.

Oh: I did not fix all of it. What my original code did was change the
context IRI as well (which I had fixed), but I kept working off the same
base IRI.

> I just checked how Turtle does it, and it seems that in Turtle a base
> IRI is resolved against the previous base IRI.

I checked HTML, but they only allow a single base href. XML's (and thus
Atom's) xml:base URIs can't be relative references anyway. In JSON-LD,
the @base must be in the @context if I understand the text right, so
there can only be one like in HTML.

>     #base <foo/>
>     #base <bar/>
> Advantage: Since link targets are more likely to be relative to the
> context than to the previous link targets, this should generate
> slightly more compact CBOR representations.

I'd think that situations of deep links will be rather unlikely anyway
(if / says something about /foo/bar/, it probably says something about
/foo/ too, and /foo/bar/ will be linked to from /foo/ and not / in the
likely cases.)

> Document with base IRIs relative to previous base IRI:
>     #base <foo/>
>     #base <../bar/>
> Advantages: Since the context IRI is not used after the first base IRI
> directive, a processor can reuse the memory for the context IRI to
> store the base IRI instead of having to allocate memory for both. It
> would match the intuition of people who are familiar with Turtle.

I'd rather think of it as "updated in-place" than "freed and reused",
but yes, it might be more RAM efficient (esp. interesting with non-zero
nesting limits). Transfering intuition from related formats is a bonus
too, so...

> Would it make sense to switch?



To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom