<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 23, 2023, 18:30 Ondrej Zajicek <<a href="mailto:santiago@crfreenet.org" target="_blank" rel="noreferrer">santiago@crfreenet.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Jun 14, 2023 at 12:40:47AM +0200, Alexander Zubkov wrote:<br>
> Hi,<br>
> <br>
> Please look at these patches:<br>
> <br>
> bytestring-hex-prefix.patch - syntax with "hex:" prefix<br>
> I allowed mixed colons with no-divider there, so hex:12:345678:90 is<br>
> allowed. As there is a distinguishing prefix here, this should not be<br>
> a problem.<br>
> Empty bytestrings are allowed too: "hex:"<br>
<br>
Hi<br>
<br>
Merged:<br>
<a href="https://gitlab.nic.cz/labs/bird/-/commit/65d6a525944faa3f77041419991d77106d8f0a0d" rel="noreferrer noreferrer noreferrer" target="_blank">https://gitlab.nic.cz/labs/bird/-/commit/65d6a525944faa3f77041419991d77106d8f0a0d</a><br>
<br>
I have mixed opinion on mixed colons here :-)<br>
<br>
<br>
> bytestring-hex-function.patch - function-like hex("...") syntax (on<br>
> top of the other patch)<br>
> It wasn't too complex, but you might have wanted to do it some other<br>
> way.<br>
<br>
Yes, the original idea there was to add bytestring as a data type, make<br>
hex() a regular (filter) function instead of special function-like<br>
syntax, and add equivalent of 'expr' grammar term for other data types.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I see. I think I can look into preparing a patch for that too.</div><div dir="auto">But for such variant I would suggest using function names like "from_hex/base64" instead of "hex/base64", or something including bytestring reference: "bs_hex". Because the simple variants could be misleading when used not only in the limited set of scopes. For example they can be thought of converting to hex/base64 representation too. Or they could collide with "hex" function to convert from string to int, which someone would need to implement in the future.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
> I think this should be quite good too, the only problem with it<br>
> is inability to mix "hex" symbol with hex("...") bytestrings.<br>
<br>
This is an issue with any keyword, so not a big thing.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Yes. By the way what do you think about the patch that allows using keywords and symbols together? Is it viable?</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
> There probably was a mistake in nest/config.Y with missing "|" here:<br>
> "kw_sym: MIN MAX ;"<br>
<br>
You are right there.<br>
<br>
<br>
> I also enabled TEXT literals to be multiline. Didn't know it was not<br>
> allowed already, so I think it should not break things, but allows to<br>
> be more flexible with binary strings.<br>
<br>
That is probably right.<br>
<br>
<br>
-- <br>
Elen sila lumenn' omentielvo<br>
<br>
Ondrej 'Santiago' Zajicek (email: <a href="mailto:santiago@crfreenet.org" rel="noreferrer noreferrer" target="_blank">santiago@crfreenet.org</a>)<br>
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, <a href="http://wwwkeys.pgp.net" rel="noreferrer noreferrer noreferrer" target="_blank">wwwkeys.pgp.net</a>)<br>
"To err is human -- to blame it on a computer is even more so."<br>
</blockquote></div></div></div>