From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27932 invoked from network); 16 Dec 2020 22:57:45 -0000 Received: from ewsd.inri.net (107.191.116.128) by inbox.vuxu.org with ESMTPUTF8; 16 Dec 2020 22:57:45 -0000 Received: from oat.nine.sirjofri.de ([5.45.105.127]) by ewsd; Wed Dec 16 17:56:04 -0500 2020 Received: from sirjofri.de ([109.41.131.167]) by oat; Wed Dec 16 23:55:52 +0100 2020 Date: Wed, 16 Dec 2020 22:55:50 +0000 (UTC) From: sirjofri To: 9front@9front.org Message-ID: <2b7ef049-b2ea-46ab-9630-d6bdba2000a3@sirjofri.de> In-Reply-To: <0F525CBFB1204B0572F197D1BC37058A@eigenstate.org> References: <0F525CBFB1204B0572F197D1BC37058A@eigenstate.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Correlation-ID: <2b7ef049-b2ea-46ab-9630-d6bdba2000a3@sirjofri.de> List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: shared structured DOM-aware TOR over ActivityPub rich-client-oriented STM locator Subject: Re: [9front] [PATCH] Update hpost to use -r header like hget Reply-To: 9front@9front.org Precedence: bulk There were several misunderstandings: 16.12.2020 22:52:11 ori@eigenstate.org: > Quoth sirjofri : >> >> The whole thing is indeed an interesting challenge, especially because= =20 rc >> is handling items and lists so special. Spaces don't necessarily=20 separate >> strings, items with spaces are not always quoted, etc. For example,=20 the >> visual string "this is a string" is not always a list with 3 strings.=20 It >> could also be a list with two or only one string. > > there's no sometimes about it, and there aren't any funny rules. > > rc never requotes something behind your back; it parses it once, > and keeps it parsed. evaluating the output of `{} is the place > where it parses it. > > All other times, it stays split. > >> "this is a string" is not always a list with 3 strings. I used "" to quote it in the english text, not for rc. I maybe should=20 have pointed that out. > no, that's always a string with 4 strings: > > =C2=A0 '"this' > =C2=A0 'is' > =C2=A0 'a' > =C2=A0 'string"' Sure. Four. I should learn counting again... > Note that " is not a special character, so it doesn't > affect string splitting. I suspect you meant > > =C2=A0 'this is a string' > > which is *always* a single string to rc. Note that I was talking about the 'visual' appearance, like, what you get= =20 when echoing the list/variable or 'what you see on the screen'. When you=20 see the string "this is a string" (without the '"') on the screen inside=20 your window as an output there's no way to know how long the list is. I guess even when capturing the output with `{...} it is still impossible= =20 to know that, because then rc is reevaluating the string into a list.