🦋 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.
00:00 reportable6 left 00:02 reportable6 joined 01:13 nativecallable6 left, bloatable6 left, statisfiable6 left, committable6 left, sourceable6 left, notable6 left, squashable6 left, reportable6 left, benchable6 left, shareable6 left, releasable6 left, tellable6 left, linkable6 left, evalable6 left, tellable6 joined, benchable6 joined, nativecallable6 joined 01:14 linkable6 joined, statisfiable6 joined, notable6 joined, reportable6 joined, committable6 joined 01:15 bloatable6 joined, releasable6 joined 01:16 shareable6 joined, sourceable6 joined, evalable6 joined, squashable6 joined 02:09 derpydoo joined 02:24 teatwo left, teatwo joined 02:28 tea3po joined 02:31 teatwo left, japhb left 02:41 tea3po left, tea3po joined 02:46 japhb joined 03:17 andydude joined 04:17 nativecallable6 left, quotable6 left, unicodable6 left, benchable6 left, linkable6 left, committable6 left, releasable6 left, sourceable6 left, reportable6 left, evalable6 left, tellable6 left, squashable6 left, bloatable6 left, shareable6 left, greppable6 left, bisectable6 left, coverable6 left, statisfiable6 left, notable6 left, bloatable6 joined, notable6 joined, coverable6 joined 04:18 statisfiable6 joined, squashable6 joined, tellable6 joined, sourceable6 joined, shareable6 joined, nativecallable6 joined 04:19 greppable6 joined, unicodable6 joined, quotable6 joined, bisectable6 joined, linkable6 joined, evalable6 joined 04:20 releasable6 joined, committable6 joined, benchable6 joined, reportable6 joined 04:38 derpydoo left 04:44 andydude left 04:58 jpn joined 05:02 jpn left 05:58 nebuchadnezzar joined 06:00 reportable6 left, reportable6 joined 06:59 derpydoo joined 07:13 swaggboi left, swaggboi joined 07:21 sena_kun joined 07:25 emakei joined
emakei hi! maybe there already exists some brief introduction on how i can use Raku for admin my Linux laptop and use for find files sorting by date creation and so on? 07:27
08:07 dakkar joined 08:08 abraxxa joined 08:18 Sgeo left 08:36 jpn joined 09:04 derpydoo left 09:05 xinming left 09:07 xinming joined 09:16 phogg` is now known as phogg, phogg left, phogg joined
guifa leont: I'd like to assume that someone contemplated modules doing different things to .timezone, since offset is defined to be a number, but timezone is an Anya 10:07
10:16 evalable6 left, linkable6 left 10:18 linkable6 joined, evalable6 joined 10:21 derpydoo joined 10:24 Orbstheorem joined 10:38 thundergnat joined
thundergnat m: my $int = 5; dd $int; dd << $int >>; 10:38
camelia Int $int = 5
IntStr.new(5, "5")
thundergnat ^^ Coerce to IntStr
10:38 thundergnat left 10:42 thundergnat joined
thundergnat m: my ($w,$x,$y,$z) = 5,5.1,5e1,5i; dd << $w, $x $y $z >>; # Allomorphs in general 10:43
camelia (IntStr.new(5, "5"), ",", RatStr.new(5.1, "5.1"), IntStr.new(50, "50"), ComplexStr.new(<0+5i>, "0+5i"))
10:43 euandreh joined
thundergnat Hmm. 10:44
m: my ($w,$x,$y,$z) = 5,5.1,5e15,5i; dd << $w, $x $y $z >>; # Allomorphs in general
camelia (IntStr.new(5, "5"), ",", RatStr.new(5.1, "5.1"), NumStr.new(5e+15, "5e+15"), ComplexStr.new(<0+5i>, "0+5i"))
thundergnat Ah. that's more like it. 10:45
10:45 thundergnat left 11:14 derpydoo left
tbrowder__ lizmat: ref pod and RakuAST, with your new, successful code push you can probably easily fix some other NYI things, to wit: (1) =defn, (2), :config exetended over multiple lines, and (3) numbered =items. i'm rooting for you, hooray! 11:35
*extended
lizmat :config extended over multiple lines should already work
# to indicate :numbered, is already put in the config 11:36
I'm not sure what you mean by NYI for =defn ?
11:37 squashable6 left
tbrowder__ last time i looked the =defn block didn't work correctly. same with numbered items. but i haven't checked lately. 11:38
11:39 squashable6 joined
lizmat numbered items indent afaik 11:39
12:00 reportable6 left, reportable6 joined 13:00 evalable6 left 13:03 evalable6 joined 13:14 andinus left 13:28 jgaz left, andydude joined, jgaz joined 14:18 tea3po left, tea3po joined
tbrowder__ not quite, i'll check it out more soon 14:36
14:51 Sgeo joined 15:12 rf joined
rf Morning folks 15:13
15:13 andydude1 joined 15:15 emakei left
lizmat rf o/ 15:17
15:17 andydude left
[Coke] Hio. 15:18
Xliff \o # rf 15:22
lizmat published a blog post again: dev.to/lizmat/rakuast-for-early-adopters-576n 15:45
15:46 tea3po left, tea3po joined
Anton Antonov @lizmat Hopefully, RakuAST for late (and lazy) adopters will come up soon. 16:14
lizmat yes, there will be... but for that we would need documentation...
Anton Antonov Great! 🙂 16:17
lizmat ah.. you're willing to write documentation? :-)
16:36 jpn left, dakkar left 16:39 andinus joined 16:40 andinus left, abraxxa left 16:41 andinus joined
tonyo . 16:47
17:05 jpn joined 17:06 ab5tract joined 17:33 rf left 17:42 ab5tract left 18:00 reportable6 left 18:01 reportable6 joined 18:05 jpn left 18:08 andydude1 left 18:11 andydude joined 18:17 drudge joined 18:31 deoac joined 18:39 rf joined 18:43 jpn joined 18:49 jpn left 18:50 andydude left 18:52 andydude joined 19:02 bigdata joined
Xliff Is it possible that RakuAST emitted bytecode could be stored somewhere to be run later? Like a file or a database? 19:08
leont has two module that could use some RakuAST to generate a regex, should play with it at some point 19:09
lizmat Xliff: for now, you would put that in a module and have the RakuAST run at BEGIN time and have it stored in a variable that gets serialized 19:11
Xliff lizmat: Yes, but I'm more thinking about trees that get built at runtime by one program, to be used at runtime by another. 19:15
19:15 rf left
Xliff Assume each mention of "runtime" is a separate instance. ;) 19:15
lizmat would they be running at the same time ?
Xliff Maybe.
For now though... "assume not" 19:16
lizmat well, there's no way to save the bytecode of an AST, because the AST by itself doesn't do anything 19:17
it needs to be EVALled to have something happen 19:18
Xliff Figured that. Just wanted to put the bug in someone's head.
19:18 jpn joined
Xliff I'm thinking in the (hopefully) not so distant future I can compile a Template6 or Cro::WebApp::Template, store it to database. Then later, load that bytecode from the database and execute it. 19:19
lizmat what I'm saying is that the EVAL provides a context and a resolver
Xliff O I C
And therein lies the glitch.
lizmat and if that bytecode refers to anything outside of itself, it needs to have a compiler ID match 19:20
Xliff So when RakuAST is ready, maybe AST's can resolve to bytecode and $bytecode.EVAL can attach the context and resolver and then execute?
lizmat remember: precompiled modules in Rakudo are a dynamically updated static library
Xliff Well, if there is a compiler ID mismatch, the tree will be stored "beside" it ready to be re-EVAL'd if necessary. 19:21
lizmat but the only way to save the tree, is to save it as source, at least atm
it's not that I don't understand what you're getting at: but it's slightly more complicated than you'd think 19:22
19:24 thowe left
Xliff lizmat: I get it. I just hope something like this is possible... soon™ 19:26
lizmat actually, I think most, if not all of the hooks are there already: it just needs someone investing time in it (and maybe develop some missing parts) 19:27
Xliff m: $*RAKU.compiler.id.say 19:28
camelia 7EB97B56661B0658943719014AEAE87BA0536E52
Xliff So that's there. And can be a part of the schema....
lizmat perhaps, but really ugexe and/or nine should chime in on this 19:29
Xliff lizmat: They are busy enough. I guess this can be tabled until RakuAST is near completion.
But I have plans.....
Muahahahaha!
lizmat yeah, I think so: first get the setting to build with RakuAST
Xliff Oh.. you weren't supposed to hear that last bit.
lizmat had some Tina Turner on loud, so didn't hear that 19:30
Xliff Oh good.
lizmat
.oO( who sadly left us today :-( )
Xliff WHAT?
lizmat yeah :-( 19:31
Xliff Oh my.
lizmat www.bbc.com/news/65669653
19:34 jpn left
[Coke] (turner) ah, crap. 19:37
Xliff [Coke] - Yeah.
She will be missed.
gfldex Her music made her immortal, tho. 19:40
ugexe I don't know why it wouldn't be possible now 19:43
see: github.com/ugexe/Raku-CompUnit--Re...ry--Github
lizmat ugexe++ 19:44
ugexe although I don't think I ever got precompilation working in any of my external CU modules
lizmat well, that's what I meant with ' I think most, if not all of the hooks are there already: it just needs someone investing time in it (and maybe develop some missing parts)'
vrurg ugexe: wish you had time to properly implement what I failed with: versions from META6 and META6 as a dependency for recompilation check. 19:58
It's impossible to tell how many hours of my time was spent on figuring out why code fails when it depends on content of the 'resources' key. 19:59
drudge I'm having difficulty understanding a block from 'Learning Perl 6'. Specifically, I'm trying to understand how the following `seq` works: 20:31
```
my $triangle := 0, { ++$ + $^a } ... *;
```
I understand that the previous figure is an anonymous scalar, and the latter is a placeholder variable
what I don't understand is how an argument is assigned to the block, or how the anonymous scalar continues to iterate without a `state` object 20:32
20:33 andydude left
librasteve $ is the anonymous state variable - each iteration of the block will increment it 20:33
drudge oh, ok. So $ *is* a state 20:34
librasteve $^a is a shorthand for -> $a { ... $a ... } so it takes on the value passed in
^^ yep
drudge In the triangle example, what's considered passed in to the block? 20:35
I understand how a placeholder functions in a subroutine
but I haven't been able to complete a seq exercise without looking at the answers
20:35 bigdata left
librasteve probably starts from the 0 and then is the previous result 20:36
yeah - this is a hard example (raku can be very compact) 20:37
drudge ooooh, I think I see what's going on. When you actually call the `seq` you pass an argument
e.g. `$triangle[5]` or whatever
and then THAT is what's passed in
to $^a
librasteve no, the [5] is a positional index so it is just taking the 5th item you make 20:39
m: my $triangle := 0, { ++$ + $^a } ... *; say $triangle[0..5]; 20:40
Raku eval (0 1 3 6 10 15)
librasteve [0..5] is a slice index so it gives you the first items up to 5
so you are going 0, (1+0), (2+1), (3+3) and so on 20:42
drudge m: my $triangle := 0, {$^a}...*; say $triangle[0..3];
camelia (0 0 0 0)
drudge so it's pulling the placeholder from the first 'argument' of the sequence
librasteve the placeholder is the result of the previous iteration (staring with 0) 20:43
drudge ok, this is explicitly the result OF THE BLOCK
librasteve then the $++ state just counts up from 0 each iteration
drudge and has nothing to do with the 0 passed in beforehand
m: my $test := 1, {$^a}...100; say $test[0..5]; 20:44
camelia (1 1 1 1 1 1)
librasteve 0, (1+0), (2+1), (3+3) == (start), (state + prev), (state + prev) ...
so without the incrementing state you just have (start) (prev) (prev) == 1 1 1 1 ... 20:45
yeah - the previous result of the BLOCK 20:46
drudge Okay, I think I get what's going on now. I'll test some more locally to verify. Thanks for your time Steve! I'm working through this book very slowly, have no formal compsci degree or math beyond high school algebra 2 so visualizing this stuff sometimes is very challenging fo rme 20:48
20:48 drudge left
librasteve a pleasure - imo raku is a great way to learn because it is very natural - but it is quite big and dense so can be daunting in comparison to eg Python 20:50
personally I relearned coding after a long break and started with Think Perl6 (now Think Raku) greenteapress.com/wp/think-perl-6/ 20:51
which was a rewrite of Think Python for Raku
and both books follow the same syllabus from the point of view of someone who is entirely new to coding ... so a great intro to OO, functional, regex and so on 20:52
20:55 derpydoo joined
Xliff Hmmm... can someone run the script in the comment that starts with "Latest version", and run it in the rakudo/src/Raku directory and tell me why its hanging in "signature.rakumod", please? 20:55
Post is here: gist.github.com/Xliff/b4741a42ab83...f3e9b79528
Hrm... looks like it's my nested-braces regex. This was working though. 21:00
21:03 jpn joined
Xliff So class Rakuast::Signature is the culprit 21:09
21:10 jpn left
Xliff Something in RakuAST::Parameter 21:16
RakuAST::Parameter.IMPL-TO-QAST 21:17
Something in that method is causing an endless loop
21:18 jpn joined 21:24 andydude joined 21:29 sena_kun left
lizmat yeah, there's still some issues with RakuAST::Parameter, such as default value aka ($a = 42) 22:16
22:22 tejr left, tejr joined 23:14 andydude left
ugexe vrurg: after seeing what it took for you to get it working *at all* I'm not sure I have the patience to also get it working, let alone in a way that satisfies the perfectionist in me 23:40
I wonder if the stale resources issue you saw would be fixed by using the handle from $*DISTRIBUTION.content($*DISTRIBUTION.meta<resources/foo).open 23:43
instead of using %?RESOURCES
23:44 Guest88 joined
Guest88 quick question - what's with the trademark sign attached to the Raku name? 23:45
[Coke] recommendation from legal team to help enforce the trademark. 23:47
Guest88 why does the trademark need to be enforced if it's FOSS? 23:48
it just kinda stands out to me as opposed to every other language i've come across 23:50
avuserow python.org has a TM on their home page, fwiw
Guest88 right you are 23:51
[Coke] I use FOSS all the time for $dayjob, and work with the legal team all the time to respect copyright and trademark (if any).
avuserow I'm not a lawyer but trademark is kind of orthogonal to open source. enforcing trademark gives the legal team the power to prevent impersonation (e.g. maybe useful to prevent a non-open source impersonator) 23:52
[Coke] rakudo HEAD build failing for me on mac m2 23:53
ah, removing previous install did it 23:55
23:59 jpn left