Xliff m: my $a = 0x5a; $a.base(16).say 00:00
camelia 5A
tbrowder yes, that works too 00:01
i’m trying to get the glyph (unicode char) for decimal 90 00:03
m: my $c = 90; say $c.chr 00:04
camelia Z
botato I just needed to add filter to get ltrace to show calls from libraries loaded dynamically later: ltrace -x '*@libxml2.so.2' raku raku-libxml.raku 00:05
timo botato: you should be able to trace calls made by NativeCall with the MVM_nativecall_invoke function where all invocations should go through
oh, cool
tbrowder ok, that works. i’m having trouble with doing that in a program 00:06
botato actually yea MVM_nativecall_invoke seems like a better idea, ltrace shows tons of output, all internal calls within the libxml2 library, whereas that should just show the calls raku is making to libxml2 which would be more helpful 00:28
00:49 yewscion joined
Xliff So what's the best way to use MVM_nativecall_invoke? Set a breakpoint? 00:53
00:54 yewscion left
timo in gdb, you can set a breakpoint, probably in a different line than the entry, honestly, then add "commands" with a bunch of prints for interesting things, maybe an MVM_dump_backtrace(tc) if you want to see the raku language backtrace as well, and make the last command be "continue" so after gdb hits the breakpoint and outputs all the stuff it immediately continues 01:02
that can of course give a boatload of output, so YMMV what exactly you need
but of course you can also set a condition for the breakpoint
01:05 yewscion joined 01:29 yewscion left 01:30 yewscion joined
Xliff timo: Can you set these in a config file or something? 01:41
I'd like to build up a library of this stuff. 01:42
tbrowder hi, considering a range of integers from 1 to N for Unicode decimal code points, is there a way to detect a non-printable glyph ( 01:43
timo there's a ~/.gdbinit that you can put stuff like that into, and you can define functions in it i think? i haven't worked with that yet
tbrowder before you use it?
timo there's the unicode categories, would that help? 01:44
like letter and its subcategories, symbol and its subcategories, etc
01:45 japhb joined 01:49 Manifest0 left
tbrowder yes, that should help, but i haven't found it in the docs in a search--still browsing... 01:49
ah it's in regexes... 01:53
and i found the list of props. use ".uniprop" to avoid regex, that's what i'm looking for 02:00
02:20 librasteve_ left
tbrowder looks i want to skip code points with .uniprop('propcode') values of M, Z, and C 02:21
hm, still getting the ? in a box for some chars... 02:22
timo it depends on your font, of course :/ 02:25
and not just the font that's currently chosen by your terminal emulator or browser, but also the list of fallback fonts that it will choose from
there might actually be an ansi escape sequence that lets you ask your terminal for whether it has something for a given sequence of codepoints? that's of course something that's probably only in some and not in other terminal emulators 02:27
tbrowder of course, how stupid of me. i was just using whatever my system has for a terminal!
timo printable is a very "local" property
you can have a font that has glyphs in the private use area of unicode 02:28
tbrowder you are right, thnx
timo then the question of "printable" becomes extra thorny
tbrowder yes, i will be using good opentype fonts with 2000+ printable glyphs so there shouldn't be many "bad" glyphs 02:31
02:41 kylese left, kylese joined 03:15 kylese left, kylese joined
guifa or also how do you consider a combiner? they're printable but technically only in combination with others 03:22
or the local codes they use for emoji flags , originally designed to be nonprintable but in combination they make a printable flag 03:23
03:51 zetaaaa left
guifa Antonon: have you had any luck running Stable Diffusion locally perchance? I know you're on a Mac too 04:53
05:44 teatime left 06:06 Aedil joined 06:27 swaggboi left 06:30 Sgeo left
antononcube @guifa Yes, via DiffusionBee. 06:36
diffusionbee.com
07:14 yewscion left
Xliff Can you extract the regular expression from a grammar rule/method? 08:03
08:07 yewscion joined
SmokeMachine Xliff: do you mean something like this? 08:10
m: grammar G { token bla { "bla" } }; my &bla = G.^find_method: "bla"; say "blablabla" ~~ /&bla/
camelia 「bla」
Xliff Yup!
08:12 yewscion left
Xliff However my extracted match fails. 08:13
m: token intl-date { <year=.D4-year> '/' <month=.D2> '/' <day=.D2> }; say "ssss2024/11/22bbb" ~~ /<intl-date>/ 08:14
camelia Potential difficulties:
Useless declaration of a has-scoped method in mainline (did you mean 'my token intl-date'?)
at <tmp>:1
------> token ⏏intl-date { <year=.D4-year> '/' <month=.
No such method 'intl-date' for invocant…
Xliff m: my token intl-date { <year=.D4-year> '/' <month=.D2> '/' <day=.D2> }; say "ssss2024/11/22bbb" ~~ /<intl-date>/
camelia No such method 'D4-year' for invocant of type 'Match'
in regex intl-date at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: my token intl-date { <year=\d\d\d\d> '/' <month=\d\d> '/' <day=\d\d> }; say "ssss2024/11/22bbb" ~~ /<intl-date>/
camelia ===SORRY!=== Error while compiling <tmp>
Unable to parse expression in metachar:sym<assert>; couldn't find final '>' (corresponding starter was at line 1)
at <tmp>:1
------> my token intl-date { <year=⏏\d\d\d\d> '/' <month=\d\d> '/…
Xliff m: my token intl-date { <year=\d+> '/' <month=\d+> '/' <day=\d+> }; say "ssss2024/11/22bbb" ~~ /<intl-date>/ 08:15
camelia ===SORRY!=== Error while compiling <tmp>
Unable to parse expression in metachar:sym<assert>; couldn't find final '>' (corresponding starter was at line 1)
at <tmp>:1
------> my token intl-date { <year=⏏\d+> '/' <month=\d+> '/' <day…
Xliff m: my token intl-date { <year>=\d+ '/' <month>=\d+ '/' <day>=\d+ }; say "ssss2024/11/22bbb" ~~ /<intl-date>/
camelia ===SORRY!===
Unrecognized regex metacharacter = (must be quoted to match literally)
at <tmp>:1
------> my token intl-date { <year>⏏=\d+ '/' <month>=\d+ '/' <day>=\d+ }; sa
Malformed regex
at <tmp>:1
------> my token intl-d…
Xliff m: my token intl-date { $<year>=\d+ '/' $<month>=\d+ '/' $<day>=\d+ }; say "ssss2024/11/22bbb" ~~ /<intl-date>/ 08:16
camelia 「2024/11/22」
intl-date => 「2024/11/22」
year => 「2024」
month => 「11」
day => 「22」
Xliff SmokeMachine: Here's what I am trying to do... I'm trying to get a rule to match a substring where the rule will match in the middle. .subparse wants it to match at the beginning. Any ideas? 08:18
Unfortunately this brings up anonymous subs and the fact that they are methods on the Grammar, and the Grammar isn't around at MY:: level so they all fail an anonymous type check. 08:22
Wish there was a way for a Grammar to match a fucking substring!
timo isn't .subparse for that? 08:26
i mean, apparently not but isn't it supposed to?
Xliff Subparse matches from start but does not have to match until end.
I would like to be proven otherwise.
timo and you probably can't just .substr first? 08:27
Xliff No, because hoiw can I .substr if I don't know where the date starts in the str!
timo but you could / .* &MyGrammar::TheRule / or however you have to spell that for it to work
Xliff I could make wild guesses, but that wouldn't be robust.
timo: Um. Worth a try... but how DO you spell that! :) 08:28
And what happens if your rules include other rules? Those other rules fail an anonymous type check!
timo they are not supposed to :|
Xliff OK. Take a look at github.com/Xliff/datetime-parse.git 08:29
timo m: grammar Test { regex TeTest { "foo" } }; say "hello my foo" ~~ / .* &Test::TeTest /
camelia Nil
Xliff Then see if you can figure out why this one goes wrong: raku -Ilib -e 'use DateTime::Parse; my &m = DateTime::Parse::Grammar.^find_method("intl-date"); &m.gist.say; say "2022/11/23" ~~ &m' 08:30
timo m: grammar Test { regex otherTeTest { "foo" }; regex TeTest { <otherTeTest> } }; say "hello my foo" ~~ / .* <&Test::TeTest> /
camelia Cannot resolve caller INTERPOLATE_ASSERTION(Match:D: Any:U, BOOTInt, BOOTInt, BOOTInt, BOOTInt, PseudoStash:D); none of these signatures matches:
(Match $:: Associative:D, $, $, $, $, $, *%_)
(Match $:: Iterable:D \var, int \im, int \monke…
timo is that the one you mean?
Xliff Nope.
Type check failed in binding to parameter '<anon>'; expected DateTime::Parse::Grammar but got Match
(Match.new(:orig("202...)
in regex intl-date at /home/cbwood/Projects/datetime-parse/lib/DateTime/Parse.rakumod (DateTime::Parse) line 134
But yours was way more spectacular! 08:31
8)
timo sorry i only looked at the last few lines and now i have to AFK again so i won't be able to chase this all the way right now 08:35
> [...] int \monke… [...]
Xliff No worries. It will be in your scrollback. Ping me if you find anything?
timo mhhh ... monke ...
oh hey 08:36
m: grammar Test { regex otherTeTest { "foo" }; regex TeTest { <otherTeTest> } }; say "hello my foo" ~~ / .* <Test::TeTest> /
camelia 「hello my foo」
Test::TeTest => 「foo」
otherTeTest => 「foo」
timo there you go Xliff i hopethat's good enough? 08:37
Xliff timo: Thanks! Let me check. I'll ping you with the results. Testing now. 08:41
YATA!!! \o/ 08:42
timo: Thanks!!!!
timo cool 08:43
08:46 sena_kun joined
SmokeMachine m: use DateTime::Parse; say "ssss2022-11-23" ~~ /<DateTime::Parse::Grammar::date5>/ 08:46
camelia ===SORRY!=== Error while compiling <tmp>
Could not find DateTime::Parse in:
/home/camelia/.raku
/home/camelia/rakudo-m-inst-2/share/perl6/site
/home/camelia/rakudo-m-inst-2/share/perl6/vendor
/home/camelia/rakudo-m-inst…
SmokeMachine :(
timo camelia doesn't have modules installed, but perhaps evalable does? 08:47
SmokeMachine m: grammar DateTime::Parse::Grammar {token date5 {$<year>=[\d**4] "-" $<month>=[\d**2] "-" $<day>=[\d**2]}}; say "ssss2022-11-23" ~~ /<DateTime::Parse::Grammar::date5>/ 08:50
camelia 「2022-11-23」
DateTime::Parse::Grammar::date5 => 「2022-11-23」
year => 「2022」
month => 「11」
day => 「23」
SmokeMachine timo: do you need the .* there? 08:52
m: grammar Test { regex otherTeTest { "foo" }; regex TeTest { <otherTeTest> } }; say "hello my foo" ~~ / <Test::TeTest> /
camelia 「foo」
Test::TeTest => 「foo」
otherTeTest => 「foo」
timo i guess not
SmokeMachine timo: and thank you for the `<Complete::NS::method>`... muth better than the `.^find_method`... 08:54
timo :)
SmokeMachine Xliff: about using the DataTime::Parse::Grammar, that worked here: usercontent.irccloud-cdn.com/file/.../image.png 08:56
Xliff SmokeMachine: So no need for the .*? Thanks! 08:57
08:57 Manifest0 joined
antononcube “DateTime::Grammar” is better!! 08:57
08:59 dakkar joined
SmokeMachine this worked here too: `use DateTime::Grammar; say "ssss2022-11-23" ~~ /<DateTime::Grammar::date-spec>/` 09:01
09:06 sena_kun left
antononcube @Xliff “Wish there was a way for a Grammar to match a fucking substring!” — multiple ways to do that. 09:06
09:20 sena_kun joined 10:21 sena_kun left 10:49 librasteve_ joined
Xliff antoncube: You were reading my mind! I swore I left the f-word out of the chat! 11:23
OK, so is there any way I can override multi sub infix:<+> (Duration, Duration)? 11:24
lizmat what's wrong with multi sub infix:<+> (Duration, Duration) ? 11:31
Xliff It will get confused about two confusing candidates. 11:47
lizmat m: say (now - now) + (now - now) 11:58
camelia -0.000288204
lizmat I don't see a confusion? 11:59
Xliff m: multi sub infix:<+> (Duration $a, Duration $b) is export { $a - $b }; say Duration.new(3) - Duration.new(4)
camelia -1
Xliff Huh.
I must be missing something then... 12:00
lizmat m: multi sub infix:<+> (Duration $a, Duration $b) is export { $a - $b }; say Duration.new(3) + Duration.new(4) 12:01
camelia Ambiguous call to 'infix:<+>(Duration, Duration)'; these signatures all match:
(Duration:D $a, Duration:D $b) from SETTING::src/core.c/Duration.rakumod line 48
(Duration $a, Duration $b) from <tmp> line 1
in block <unit> at <tmp> line 1
lizmat m: multi sub infix:<+> (Duration $a, Duration $b) is export is default { dd; $a - $b }; say Duration.new(3) + Duration.new(4)
camelia sub+{<anon|1>} infix:<+>(Duration $a, Duration $b)
-1
13:26 swaggboi joined
guifa Xliff: both me and codesections had a pretty extensive discussion embedding grammars which may be useful .... but I can't remember exactly where it was 13:32
but basically I'd make a grammar, get it to do exactly what you want. Then export a token that calls that Grammar::TOP 13:33
then use that token wherever you want with its far more convenient name
13:43 merp joined
antononcube @Xliff Ditto what @guifa said -- see the section "FEN sub-parser" in this notebook: github.com/antononcube/RakuForPred...sona.ipynb 14:01
It section shows three different ways to extract text fragments from text blobs using grammars. 14:02
This code fragment corresponds to what @guifa and @SmokeMachine advised: with $txt.match( /<FEN::Grammar::TOP>/, :g) { $/».Str }; 14:03
librasteve this topic would be great for an advent post - maybe worth a couple of episodes - it would help me to have somewhere to look up that's memorable since I need this about once or twice a year ;-) 14:05
timo weekly: asciinema.org/a/kN82JXZd4hJWBIAzvQ6CcxJmb 14:15
notable6 timo, Noted! (weekly)
14:16 orangebot left, orangebot joined 14:17 renormalist left, renormalist joined
Geth Papers/main: 1902ac052d | (Elizabeth Mattijsen)++ | minutes/20241116.md
Add RSC meeting minutes for 2024-11-16
14:22
antononcube @librasteve I plan to discuss that in grammar-based extraction from text-blobs. (Obtained by interacting with LLMs.) But that would be just one of the ingredients of the process described. 14:24
@lizmat I would like to mention that "Graphviz::DOT::Grammar" is a new package. (From last week.) 14:25
BTW, @librasteve , I made "Graphviz::DOT::Grammar" in order to have easier integration of Graphviz with Jupyter notebooks. But of Raku HTML notebook are "figured out" that seems to come for free. 14:26
librasteve don't expect that that will be figured out by the OP - but maybe they can give is a message layer to eg cro.raku.org/docs/reference/cro-we...et-message 14:28
antononcube Well, no, I didn't and do not expect the OP to figure it out. 🙂 How interested are you to figured it out though? I think I will first support HTML notebooks for literate programming, with " Text::CodeProcessing", and then try to figure out the "interactivity." 14:32
librasteve it's definitely of interest --- I would say on my radar for next year --- I think that the rest of this years raku tuits are focused on getting a handle on reproducible / extensible websites with raku ... 14:35
... quite soon I would like to get Rainbow (or similar raku code highlighting) and Cro working so that would be maybe aligned to a "Sakurn" project 14:37
[Sakurn == Jupyter, but with raku inside ... geddit?]
timo phew! that's a thick pun 14:38
antononcube 🙂 👍
timo googles whether saturn's atmosphere is thicker or thinner than jupiter's 14:39
librasteve prbably thinner
antononcube How about "RakuIo", or any other Jupyter moon derivative?
librasteve (less mass since Jupiter is largest planet) 14:40
timo ... rakullisto ...
antononcube Right!
librasteve surely there should be a 'y' in it 14:41
antononcube Presumably, "Jupyter" is an acronym of "Julia, Python, and R". So, a name that is just with Raku is fine.
timo huh i never thought of that 14:42
librasteve oh - that's right (according to perplexity) 14:44
timo wikipedia says so, so it must be true
antononcube Yeah, the Jupyter creator got inspired from Mathematica, and decided to use JSON instead of M-expressions. In the article/interview with him I remember reading about the name itself...
I am surprised you two did not just take my word for it and went on to verify my statement !!! 14:46
librasteve trust, but verify
timo truify 14:47
antononcube Yeah, using certain very trustworthy sources...
librasteve I am surprised you don't like my Sakurn idea
antononcube I have to find that article/interview -- I have referred to it more a few times by now...
librasteve well perplexity references wikipedia as it's source 14:48
timo speakerdeck.com/fperez/project-jupyter?slide=3 slide deck from 2014 from fernando perez
sakurn is a fun name
antononcube It is not that I do not like "Sakurn." It is more about possible misreadings and "bastartizations."
timo don't call it IRaku unless you want people to think of the IRA 14:49
antononcube What I am saying is that the planet reference -- Jupiter -- comes from the notebook's scope for languages. I.e. you can call that Raku notebook solution "Harmony", and that is a more faithful following of the naming process. (For Jupyter.) 14:52
timo if we want to go with something based on planets, why stay in our solar system? :D 14:54
antononcube Absolutely! For example, "Nebula" is a more appropriate name. (For anything Raku related.)
timo raku is supposed to be a hundred year language. what celestial objects are in reach if we are willing to take a hundred year trip? depends on the amount of thrust our theoretical vehicle could sustain 14:55
orangebot Andromeda? 14:56
antononcube Rakumeda, too. 14:57
@orangebot You should like my choice of default colors for highlights in graphs. 14:58
orangebot oh excellent 14:59
15:02 zetaaaa joined
antononcube @orangebot Which one is excellent? "Rakumeda", or the orange highlights in "Graph" and "JavaScripdt::D3" ? 15:04
orangebot The orange highlights especially. Kind of on the edge for Rakumeda. 15:06
antononcube Some people say that steel blue and orange are usind in the web too much, but that is precisely the reason I use them. 15:09
15:27 yewscion joined 15:30 yewscion left 15:31 yewscion joined 16:12 zetaaaa left
renormalist Dropping in more space names: Vega. There is even a movie reference for it: Contact (1997). And a wikipedia page which sounds nice: en.wikipedia.org/wiki/Vega - Though not sure about cool Portmanteaus to build with Raku. 16:20
16:22 teatime joined
Geth App-Rakubrew/main: d6bf01f391 | (Patrick Böker)++ | 2 files
Implement `exec --with`
16:23
App-Rakubrew/main: e702f2e0e9 | (Patrick Böker)++ | lib/App/Rakubrew.pm
Add some docs about installing via CPAN

Thanks jeffgazso for the hint and snippet!
antononcube What are the associations with "Vega"? 16:26
Since the Vega star corresponds to the goddess for weaving, that names is epecially good for Literate Programming projects: - en.wikipedia.org/wiki/Zhinü - en.wikipedia.org/wiki/Literate_pro...g#Workflow 16:30
Geth advent/main: 2b654f5d85 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | raku-advent-2024/authors.md
Claim slots 10 and 25
16:52
16:54 abraxxa-home joined
antononcube @lizmat and @tbrowder I have figured out the code for my first post for Raku Advent 2024 (titled "LLM chess playing" or similar.) I "just" have to write the corresponding explanations. 16:55
lizmat ++antononcube
antononcube Here is the notebook: github.com/antononcube/RakuForPred...sona.ipynb 16:56
Again, not finished -- code only at this point.
Geth App-Rakubrew/main: 680022f033 | (Patrick Böker)++ | lib/App/Rakubrew.pm
Fixup `exec --with`
App-Rakubrew/main: a3e16152b0 | (Patrick Böker)++ | lib/App/Rakubrew/Shell.pm
Auto-complete `exec --with`
App-Rakubrew/main: b9791d388a | (Patrick Böker)++ | script/rakubrew
Document `exec --with`
App-Rakubrew/main: 07903669c8 | (Patrick Böker)++ | 3 files
Version 40
16:58
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2024/11/18/2024-...butterfly/ 17:07
librasteve yay
arrakis, merak, karaka from en.m.wikipedia.org/wiki/List_of_pr...s_of_stars 17:12
Geth rakubrew.org: 116705da5b | (Patrick Böker)++ | resources/homepage.md.tmpl
Add `exec --with` documentation
17:31
17:33 hellwolf left 17:34 hellwolf joined 17:36 dakkar left 18:00 orangebot left 18:05 dpk left
ab5tract So comma `beta 29` should resolve the issue with installing on 2024.3 19:34
however, building the plugin based off of 2024.3 (which is what was required) causes at least two regressions in functionality 19:35
if that's the pace of unexpected breakage in was-just-working code that is waiting for us in the future... 19:36
antononcube Getting it now.
Oh, see beta-29 is not posted yet. 19:37
ab5tract it must still be generating 19:38
github.com/ab5tract/comma-plugin/r....0-beta.29
antononcube Downloaded it, installed it, and opened a Raku project -- no problems. 19:41
ab5tract Glad to hear it. Wish it were the same for me :) 19:42
If you do notice any, please give a shout here or on github 19:43
antononcube Sure! 19:48
19:48 kaskal left 19:51 sena_kun joined 19:52 kaskal joined 20:01 abraxxa-home left
ab5tract ah, phew! it looks like the regressions I saw were related to something else 20:02
20:05 bdju left 20:07 bdju joined 20:13 kaskal- joined 20:15 kaskal left 20:22 kaskal- left, kaskal joined 20:31 librasteve_ left
sjn 21:57
22:00 sena_kun left 22:28 Aedil left 23:29 yewscion left 23:52 Chanakan left 23:54 zetaaaa joined 23:56 Chanakan joined