2 Jul 2022
guifa Yeah, was hoping to avoid the .wrap 15:51
I was a bit surprised you can do an anonymous named argument but I guess that's Raku for you, strangely consistent 15:52
thowe there's a predefined character class in the docs called <xdigit>, but I'm wondering if it is a mistake in the docs? I found a rosetta code example that uses "hexdigit" and that seems to work where xdigit does not. 15:57
phogg xdigit is a traditional POSIX character class 15:59
thowe phogg: do you know how it differs from <hexdigit> ? 16:01
This rosetta code example uses <hexdigit> to do what it seems xdigit should do: rosettacode.org/wiki/Parse_an_IP_Address#Raku
but attempting to use <xdigit> in place of <hexdigit> doesn't match what it should. Also, <hexdigit> is undocumented as far as I can tell and it's got me scratching my head. 16:02
hm, well maybe <xdigit> works and <:hexdigit> works. the ":" might be the difference, not sure what it means 16:05
phogg thowe: I am no authority on this. That said <:hexdigit> looks like a unicode property matcher to me.
xdigit is 0-9A-Fa-f, so I imagine :hexdigit is at least those codepoints. 16:06
thowe OK, I'll buy that. But this code doesn't define it and it isn't in the docs as far as I can tell. 16:07
unless it is burried someplace the search function can't find it
phogg I expect you have to read unicode docs. 16:09
guifa :Foo selects a character based on a unicode property 16:14
phogg thowe: It would be nice if docs.raku.org/syntax/%3C:property%3E listed every possible property, but even in that example it uses <:Block()> and <:Script()> but doesn't otherwise describe them. 16:15
it does link to the uniprop page, which in turn links ultimately back to unicode-org.github.io/icu/userguid...rties.html
which does document Hex_Digit
guifa Unicode's hex digits are <0123456789ABCDEFabcdef0123456789ABCDEFabcdef>
(those are fullwidth forms, no spaces)
phogg no idea how you would know :hexdigit would work for that, but :Hex_DIgit seems to be the same 16:16
guifa phogg: I was actually just about to say that the underscore is what I would expect
maybe the underscore is just ignored for those
thowe "hexdigit" also seems to not be in the Unicode docs... What I'm trying to figure out is how would I ever know to use "hexdigit" if I hadn't seen it in this example? I can't seem to draw that line
phogg guifa: maybe Raku allows any s/_//g and ignores case?
guifa phogg: jinx lol
phogg seems it's something like that 16:17
e.g. ASCII_Hex_Digit works, as does asciihexdigit, and ASCII_Hex_Digit, but not ASCII_HexDigit, or even asciihexdigiT 16:18
thowe <:Hex_Digit> does seem to work in the code, but I couldn't find it when googling "Unicode General Category name" I will look at the docs you posted
phogg so the original case, strictly lower case, or either without the _ works for unicode proeprties 16:19
thowe: unicode docs are surprisingly hard to google for. Not well-linked, I expect.
the details are of interest only to a handful of implementers
guifa Looks like the underscore variants are hard coded 16:20
phogg guifa: found the code in the Raku implementation?
thowe I wonder if a link from docs.raku.org/language/regexes#Uni...properties would be helpful
phogg guifa: I would still expect that to be the result of a script.
thowe: I would say so, but there is a link on the uniprops page linked from there, so it's not too hard to find. 16:21
guifa no, just testing around
thowe phogg: that link honestly looked like an error to my eye. I should have looked closer. 16:22
when I saw "class Cool" I thought I landed in the wrong place 16:24
well, that was fun. Thanks for the help! 16:32
3 Jul 2022
jjatria I've been thinking about HTTP cookies lately: gitlab.com/jjatria/cookie-jar 16:20
Specifically, about something I could use with HTTP::Tiny to manage cookies 16:21
Still not released, but close. Any comments or thoughts about it are welcome~ 🍿 16:22
Voldenet jjatria: what about SameSite support? 18:08
jjatria Voldenet: I thought about it, but that's not in RFC6265. It is on the draft that is likely to be approved, but it was hard to decide what to support from there and what not to 19:54
So for this first release I'm targetting RFC6265 as it is, and working on the side on the support for the drafted features. Maybe with a `:draft` flag on construction? Not sure yet 19:55
Voldenet the problem is that SameSite is _in use right now_ 20:18
though it mostly makes sense for http servers, I'm not sure if http clients would find this useful anyhow 20:23
jjatria Yeah, it's in use right now, but in draft form, so it can change. In fact, it has already changed at least once. That's why I'm thinking I could add support for some of those experimental features that users can opt in to with a flag or something like it 20:43
Voldenet hm, maybe just add AT-KEY and so on 20:57
jjatria: also, bug `use Cookie::Jar; with Cookie::Jar.new() { .add("test.com", "hello=world; path=/; secure; HttpOnly; SameSite=None"); say .get("what") }` 21:00
would also be nice to handle the use case: "get the cookie for domain", something like `.get('test.com', 'session_id')` 21:20