🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
lizmat guifa_ the Block is a HLL concept, the Blockoid is the actual thing that is the Block, is my understanding 00:00
Nemokosch > Both. Block is a first class language construct while Blockoid is more a unit of organization in the AST. 00:00
nine, 9th january
lizmat afk& 00:01
Nemokosch "both" was for "what would be represented by { } among RakuAST concepts" or something similar
I'm kinda afraid by the time the RakuAST architecture manifests in some usable form, it will be the same kind of mess Perl6 World was 00:04
no doubt it can be implemented but it seems to be a huge problem that at the moment it's all up to the creativity and discipline of people who probably had little say and consideration in the fundamental design 00:06
guifa_ I think the main thing RakuAST needs is some better error messages and stuff will be infinitely more usable. SOMe of the blow ups probably will have some easy catches (like calling RakuAST::IntLiteral(42) without the .new ) 00:10
As I play with it more I'm learning what certain errors tend to imply
Nemokosch you could check around in # raku-dev some time, lately there have been some activity 00:12
I also tried to fix something with the metamodel (local &variables, yeee) but it kept flopping so much that I have basically given up trying to understand whether it works actually or not... 00:13
guifa_ Yeah, I just haven't had enough time to jump far into helping add error messages and such (and they might be unwelcome this early on)
OTOH, I did finally get Intl::Format::Number to now feature match (and then some!) the old version of the module
I need to update tests and triple check some stuff, but I at least have rudimentary negative number formatting, and percent/permille formatting will be very easy I think. Still need to get exponential numbers but the foundation has been laid for it 00:14
Nemokosch it could be that I'm missing something... but it really seems like there is very little material on the whole architecture of RakuAST 00:15
and nine basically also said that symbol resolution (and the when of it) might be the biggest challenge, so yeah, I shouldn't feel that bad about that floppy &var maybe? lol
to be honest, Jonathan could have left some proper notes behind at the very least 00:16
Life would be a LOT easier with a coherent picture of how things are supposed to work 00:17
melezhik .tell [Coke] , I am trying to play with SparrowCI and some Raku/doc CI tests and get this error - wrong input t/ - ci.sparrowhub.io/report/3050 , not sure what I do wrong and why prove6 complains. ... 01:09
tellable6 melezhik, I'll pass your message to [Coke]
rf What's the best way to compare a list?
Ideally most performant 01:10
lucs Has Jonathan stopped working on this? 01:10
melezhik . 01:12
guifa_ rf simplest way is eqv or ~~ , not sure on performant, depends on the type of comparison probably
rf I'll benchmark both, thanks 01:13
[Coke] melezhik: Not familiar with why you're using docker there. 01:15
I don't use prove6 locally, not sure if that's related. 01:16
I would run make test typically, which is:
if [ "${TEST_JOBS}" != "" ]; then prove -j ${TEST_JOBS} -e raku t; else prove -e raku t; fi
[Coke] based on github.com/Leont/app-prove6, that seems reasonable, though. 01:18
leont Both prove and prove6 will pick up HARNESS_OPTIONS=j<number> by themselves, using that may be easier 01:20
tonyo i have the same question as lucs, did jonathan /quit? 01:32
tellable6 2023-02-12T19:56:34Z #raku <rf> tonyo Another weird thing I found, the test it generates appends 2 spaces to the left of everything for some reaso
2023-02-12T19:59:18Z #raku <rf> tonyo Also, test files should be .rakutest not .t anymore iircs
tonyo rf: will fix in the ante meridiem, ty for taking such an in depth look
rf My pleasure, overall its great changes so far 01:33
Which Jonathan? 01:36
lucs Worthington.
I sure hope he'll still be around. 01:38
rf He's active about a month ago, people get busy.
[Coke] leont: I (maybe?) wrote that make target like 20 years ago for parrot I think, it could stand to be updated, sure. ;) 01:41
leont rf: how dare people have a life outside of open source! /s 01:42
[Coke] m: dd uniprop(1234)
camelia "Lu"
tonyo oh, it was more the comment about "he could've at least documented"
[Coke] m: dd uniprop(1234,"Alphabetic")
camelia Bool::True
[Coke] ^^ How can I get a list of supported properties from raku? Cheat and read the unicode data in the source? 01:43
tonyo m: class A { has $.x; }; say A.^attributes;
camelia (Mu $!x)
tonyo there's a caret for it
[Coke] m: dd uniprop(1234,'cc') 01:44
camelia "Lu"
[Coke] m: dd uniprop(1234,'madeup')
camelia 0
[Coke] tonyo: for what? 01:46
not attributes, unicode properties.
tooling++ - using rakubrew to install zef in my local raku build from outside of zef, bumped into the master/main issue, did a self-upgrade and now it's fine. 01:49
*from outside of rakubrew* 01:50
... I wanted to install Terminal::LineEditor to do something... can't remember what now 01:51
rf rakubrew is a godsend 01:52
[Coke] Properties - ok, section 3.5 of the standard has a table, will use that. 01:55
guifa_ jnthn gets quite busy with $day-job sometimes and obv that takes priority to all things Raku (although sometimes there is wonderful overlap, like Spreadsheet::XLSX ) 02:08
tonyo much better than it sounded 02:50
melezhik .tell [Coke] I am using docker to run raku/doc tests because this requirement in github.com/Raku/doc/issues/4194 , I sm just trying to do the same using SparrowCI. I am not sure why GH actions for the same setup succeeds without errors ... 02:52
tellable6 melezhik, I'll pass your message to [Coke]
guifa_ github.com/alabamenhu/IntlFormatNumber <-- don't look behind the curtain, I'm still debating the best ways to format/organize RakuAST code haha 02:55
The main thing is, it works! Hopefully this week I can figure out exponential numbers and percentages 02:57
Anton Antonov @guifa Can you make that function format-number to take language-number pairs? E.g. format-number(es=>1_002_323) or format-number([es=>32322131, en=>323.23211]). 03:07
@guifa Feel free not to like that design.
lucs @Nemokosch I golfed down my exception message problem: it was indeed an array. The example I showed you guys was not my exact code (I mean, who has messages that say "My message"), but in trimming it down to show you, I neglected to observe that the message method was indeed (accidentally) returning two elements. 🥺 03:14
Anton Antonov @guifa Basically, with the packages "Lingua::NumericWordForms" and "Intl::Format::Number" I want to make pipelines like this: from-numeric-word-form('three thousand and seventy four', :p) ==> format-number . 03:19
rf Aha, I'm beating JSON::Fast now by about 0.89% on avg :^)
Anton Antonov @rf Pictures, or it never happened. 03:20
rf 0m0.043s <-- SIMD
Anton Antonov @rf Extraordinary claims require extraordinary evidence.
lucs ( @Nemokosch It happened because I originally had mistakenly written something like 「method message { say "The error is ", $.error }」, and when I realized the "say" did not belong there, I removed it, and that resulted in the same output, but with the parentheses. sigh ) 03:21
rf 0m0.056s <-- JSON::Fast
That's for 1000 iterations of an 1mb json file 03:22
MasterDuke rf: i'm kind of surprised you're not faster. have you profiled to see where you're slow? though maybe there's a large difference on bigger files 03:23
*larger difference
Anton Antonov @rf 1000 iterations -- good. Also, maybe, you should generate a few dozen/hundred random JSON files and measure those timings.
rf Well, I have to do some real ugliness because I'm not sure of a way to return Raku types via C (nested types that is) 03:24
Basically we have to build a tree and assemble it using function pointers instead of just returning the data
I'm sure if I could build a Raku hash in C it would be about 50% faster than it is now. 03:28
[Coke] with raku-uni, if I run raku -I. bin/uni -n '/"rev".*"pilcr"/' - it's VERY slow. if I instead run raku -I. bin/uni -n rev '/"rev".*"pilcr"/' it'zs immediate - the second version does a "contains" pass first and then only has to regexp on whatever is left. Is there any way to speed this up without cheating? 03:29
tellable6 hey [Coke], you have a message: gist.github.com/cef5233d1172f7d608...e86d5e65d0
[Coke] I could split up the text of that regex and do the contains on rev and pilcr first, but I'd have to be careful to not cheat badly. 03:30
MasterDuke rf: i'd suggest asking nine directly if that can be done. Xliff has also done a lot of nativecall
[Coke] would love a way to extract top level literal strings. 03:33
rf Goodnight folks 03:34
MasterDuke [Coke]: i don't believe there's any way to do that (extract literals from regexes) at the Raku level 03:49
[Coke] ok. I think I'll do a horrible cheat job then 03:57
github.com/coke/raku-uni/blob/mast...akumod#L25 04:01
Nemokosch I guess Jonathan didn't officially stop working on Rakudo stuff but the thing is, if "we" were to wait on him to make progress with RakuAST stuff, it couldn't be finished for another two years 08:36
If you "get busy" for a whole year straight while being two years deep in some work that only you know properly, chances are you really wanted to give something to others so that they can take it up in a sensible manner 08:38
guifa_ AntonAntonov: I think you could make a utility sub for that pretty easily: `sub format-number(*%vals) { use Intl::Format::Number; format-number .value, :language(.key) for %vals }` 10:52
start up will be a bit of a pain initially because of CLDR access, but then will be smooth sailing from there. I might make a Lite version later that will be slightly faster start up, but will require updates when CLDR data is updated 10:54
thundergnat .tell [Coke]: I wonder if rosettacode.org/wiki/Character_codes#Raku might have some useful stuff for you? 10:58
tellable6 thundergnat, I'll pass your message to [Coke]
Anton Antonov @guifa Ok, sounds good. 12:03
Nemokosch lizmat: github.com/lizmat/HTML-Entities-Fast/issues/1 FYI 13:13
lizmat noted 13:25
tonyo rf: are you parsing in C ?
tellable6 tonyo, I'll pass your message to rf
lizmat clickbaits rakudoweekly.blog/2023/02/13/2023-...ore-class/ 13:26
[Coke] .tell thundergnat - Yup, that's very close to what I need. 14:30
tellable6 [Coke], I'll pass your message to thundergnat
[Coke] getting alerts on jquery versions in raku/mu et al. 14:37
tellable6 2023-02-14T10:58:10Z #raku <thundergnat> [Coke]: I wonder if rosettacode.org/wiki/Character_codes#Raku might have some useful stuff for you?
tbrowder howdy. just beowsing around this morning and, for the second time, hit on the "cucumber" project (github.com/cucumber) and wonder if we might want to get on board with a raku version
*browsing 14:39
lizmat the late Robert Lemmen worked on raku.land/cpan:ROBERTLE/CucumisSextus 14:41
[Coke] tbrowder: we just adopted the .net version for integration testing at $dayjob, so I have some interest.
[Coke] If I work on it, will have to call it "rakucumber", of course. 14:42
lizmat: we should add something to the CREDITS file to indicate when we know someone is late. :| 14:43
Anton Antonov I have never heard of Cucumber Open before. I was proposing similar solution to a company based on my Raku DSLs. Using a Cucumber Open Raku package might be really useful. 14:44
Call it "Cucumis Rakunis" 14:45
[Coke] I don't have time to lead such a thing, but would be happy to work on it.
Anton Antonov Should we first (re-)evaluate "CucumisSextus" ? 14:47
[Coke] I would recommend someone eval it to avoid useless rework. 14:52
*potentially useless* 14:53
good call
lizmat the code basically dates from 2017 with some minor (meta) tweaks in 2018 and 2020 14:54
judging from the commits, there's basically about 1 person-month of work in it 14:55
Anton Antonov So, it is potentially, "Cucumis Putridum". 14:56
patrickb 1 Person month is a lot of time. 15:51
lizmat yeah, so I think it's worth while to evaluate... by someone with some Cucumber experience 15:52
Anton Antonov Any Cucumber introductions anyone would recommend? 16:42
tonyo m: '/tmp/alink'.IO.link('reowiaeruyioaweurioaewurioewuroiaw') or die; dd '/tmp/alink'.IO.resolve.absolute; 16:54
camelia Died
in block <unit> at <tmp> line 1
tonyo m: '/tmp/alink'.IO.link('reowiaeruyioaweurioaewurioewuroiaw'); dd '/tmp/alink'.IO.resolve.absolute;
camelia Failed to create link called '/home/camelia/reowiaeruyioaweurioaewurioewuroiaw' on target '/tmp/alink': Failed to link file: no such file or directory
in block <unit> at <tmp> line 1
tonyo m: '/tmp/wontexist'.IO.spurt: ''; '/tmp/alink'.IO.link('/tmp/wontexist'); '/tmp/wontexist'.IO.unlink; dd '/tmp/alink'.IO.resolve.absolute;
camelia Failed to create link called '/tmp/wontexist' on target '/tmp/alink': Failed to link file: no such file or directory
in block <unit> at <tmp> line 1
tonyo hmm 16:55
dangling symlinks seem to not `.resolve` to the dangling path and instead just to the file name 16:58
m: qx`ln -s /tmp/b /tmp/a`; dd '/tmp/a'.IO.l; dd '/tmp/a'.IO.resolve; 16:59
camelia Bool::True
IO::Path.new("/tmp/a", :SPEC(IO::Spec::Unix), :CWD("/"))
tonyo m: qx`ln -s /tmp/b /tmp/a`; dd '/tmp/a'.IO.l; dd '/tmp/a'.IO.resolve.absolute;
camelia ln: failed to create symbolic link '/tmp/a': File exists
Bool::True
"/tmp/a"
[Coke] What sort of unicode properties would folks want 'uni -v <char>' to report out on? there are some basics like script/block/added version, but they rapidly become less interesting in the general case. 17:38
coleman width? byte count? 17:47
[Coke] byte code in which representation? Each of them? 17:49
coleman I'm at the limit of my unicode knowledge. I just know they can be bigger than a byte. :D 17:54
[Coke] the sample on rosetta code was showing the actual bytes for utf8, 16le, 16be 17:58
leont I was surprised a module like DateTime::Grammar didn't exist before, but am happy it does because it makes for a great example/combination with Getopt::Long 21:58
Nemokosch 🧠 22:00
jdv [Coke]: you saw that bit about a bad test in App::Uni failing on head? 22:01
blin style
Nemokosch www.youtube.com/watch?v=cztkJRVnKS0 One for Valentine's day 🤣 22:14
Anton Antonov @leont Same here, should have existed before… I am using “DateTime:Grammar” all the time now. Well, since it was published. 23:29