🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:02 guifa2 joined 00:24 dogbert17 joined 00:28 dogbert12 left 00:30 marcusr left 00:31 Garbanzo joined 00:32 marcusr joined 01:04 Garbanzo left 01:26 MasterDuke left 01:51 pecastro left 02:05 kvw_5 joined 02:08 kvw_5_ left 02:36 gnufr33dom joined 02:53 rindolf joined 03:53 quotable6 left, greppable6 left, notable6 left, bloatable6 left, committable6 left, bisectable6 left, linkable6 left, nativecallable6 left, statisfiable6 left, coverable6 left, unicodable6 left, shareable6 left, evalable6 left, benchable6 left, squashable6 left, releasable6 left, tellable6 left, sourceable6 left 03:54 evalable6 joined, committable6 joined, nativecallable6 joined, releasable6 joined, bisectable6 joined, sourceable6 joined, tellable6 joined, bloatable6 joined 03:55 linkable6 joined, coverable6 joined, greppable6 joined, shareable6 joined 03:56 benchable6 joined, squashable6 joined, notable6 joined, statisfiable6 joined, unicodable6 joined, quotable6 joined 04:56 coverable6 left, quotable6 left, sourceable6 left, unicodable6 left, greppable6 left, bloatable6 left, nativecallable6 left, committable6 left, benchable6 left, notable6 left, statisfiable6 left, tellable6 left, squashable6 left, bisectable6 left, releasable6 left, shareable6 left, linkable6 left, evalable6 left, squashable6 joined 04:57 shareable6 joined, tellable6 joined, linkable6 joined, sourceable6 joined, nativecallable6 joined, greppable6 joined, notable6 joined 04:58 benchable6 joined, committable6 joined, unicodable6 joined, statisfiable6 joined, releasable6 joined 04:59 quotable6 joined, evalable6 joined, bloatable6 joined, coverable6 joined, bisectable6 joined 05:57 xinming joined 05:59 mowcat left 06:24 sno left 06:27 wamba joined 06:28 sortiz left
summerisle getting some strange behaviour with the CLI features with a `sub MAIN( Str :@i ) { * }`. It only ever prints usage, even if any positionals are satisfied 06:28
06:31 kaiwulf left 06:36 __jrjsmrtn__ left, __jrjsmrtn__ joined 06:40 sno joined
guifa2 That signature doesn't have any positionals? 06:40
06:49 jmerelo joined 07:02 wamba left, jmerelo left
moritz summerisle: that's because the command line doesn't offer any way to provide typed arrays 07:04
$ raku -e 'sub MAIN( :@i) { say @i }' --i=foo --i=bar
[foo bar]
without the Str it works
07:05 jmerelo joined
summerisle interesting, thanks. 07:06
next question is, i suppose, is there a way to get the command line to accept parameters as `-I <value>` as opposed to `-I=<value>` without implementing that functionality myself? i'm trying to implement a drop-in replacement for another command-line tool for reasons of laziness. 07:21
moritz I'd not think you easily can; maybe take a look if there's a module for that? 07:22
07:22 stoned75 joined 07:27 domidumont joined 07:32 parabolize left 07:35 ufobat_ joined 07:36 aborazmeh joined, Sgeo left 07:43 wamba joined 07:54 aborazmeh left
El_Che I wrote a module that does that, but it does not support enums yet 08:16
github.com/nxadm/SuperMAIN 08:17
(it's a drop-in, no new syntax or semantics, just add the functionality) 08:18
(I didn't even know you could define enums for inputs :) ) 08:19
08:24 Discipulus joined 08:50 Scimon joined 08:57 dakkar joined 09:07 pecastro joined 09:09 patrickb joined 09:31 cooper left 09:32 ambs joined 09:33 stux|RC joined, cooper joined 09:39 gnufr33dom left 09:51 asymptotically left 09:52 asymptotically joined 09:53 wamba left 09:57 wamba joined 10:57 linkable6 left, evalable6 left 10:59 evalable6 joined 11:00 linkable6 joined 11:25 wamba left
El_Che weekly: nxadm.wordpress.com/2021/02/11/rakudo-pkg-v2/ 11:25
notable6 El_Che, Noted! (weekly)
11:50 Black_Ribbon left 12:04 MasterDuke joined 12:16 squashable6 left, squashable6 joined 12:26 gabiruh left, gabiruh joined 12:29 leont joined 12:33 wamba joined
Scimon Looks great! :) 12:35
12:39 Discipulus left
El_Che Scimon: thx :) 12:41
I am a bourne shell and Github Actions ninja now :P 12:42
Scimon I need to take a look at the Actions. I've spent a lot of time doing gitlab pipelines recently. 12:47
El_Che I spent a lot of time on travis trying to fit my kind-of-extreme use 12:48
and at works Jenkinspipe on Groovy
Github Action are very nice, but the info is all over the place
12:49 Discipulus joined
Scimon I have got a deeper appreciation of good documentation over the years. 12:49
El_Che yeah, certainly 12:51
andinus can i find a list of feeds pl6net fetches from? 13:00
s/a/the
El_Che ping rba ==^ 13:01
(mm, maybe a good place for the rakudo-pkg-v2 post, so people know they need to change their repo config) 13:02
(for now they won't receive new versions, and in may Bintray will kill the old repos) 13:03
13:10 aluaces left 13:14 aluaces joined
lizmat andinus: github.com/Raku/planet.raku.org/bl...perlanetrc 13:16
El_Che (no filtering on tag?) 13:17
13:22 MitarashiDango[m joined 13:32 AncientWizard joined
AncientWizard I've come here to share difficulties using Raku as a replacement for Perl5. I'm hoping to find others that have solved the problems I've found. I've used the Raku doc's but failed to find the golden nugget 13:37
Scimon What is the problem you're having? (I've found Stack Overflow can be a good place for questions too, there's some good answers to a lot of stuff and you can give longer explantions). 13:39
andinus lizmat: thanks
AncientWizard I'm attempting to replace a workplace pel5 app with one written in Raku.
Scimon Ok. But there must be specific issues you're coming across? 13:40
AncientWizard I have looked online but no matches.
El_Che (completely next to the point, but I find it more productive to write new apps for a new itch instead of replacing older ones that work) 13:42
Scimon You can't just drop a Perl5 app into Raku and expect it to work. If you're VERY VERY lucky (and it's very simple) it will but there is no direct compatibility. 13:43
AncientWizard It has to do with symbol lookups.  If appears that the only successful lookups are for symbols i locally called in using 'use Mod::B;'
13:44 jmerelo left
AncientWizard No worries it a code rewrite 13:44
lizmat AncientWizard: you might be interested in these remastered blog posts from 2018: github.com/Raku/CCR/blob/main/Rema...-Series.md
El_Che and this oldie: perl6advent.wordpress.com/2014/12/...ol-tables/
Scimon Raku's scoping and exports are more rigorous than Perls in a lot of places. `use`ing a module won't import all the symbol table. 13:45
lizmat and it will only import them in the lexical scope of the 'use- statement
Scimon You may want to look at docs.raku.org/language/modules#ind...sub_EXPORT and docs.raku.org/language/modules#is_export
That.
AncientWizard If mod a calls in mod b then b can do a use on a and then b can't lookups on a
B cant 13:46
Scimon So you want to make a circular dependency?
AncientWizard No
Scimon A uses B and B uses A?
Sorry just trying to understand. 13:47
AncientWizard But b need to test if a is there and call a sub
Scimon So you got mdule B and it's used A and you then want to call a sub in A? 13:48
AncientWizard If not there then do nothing. I wat to us a features if a is in memory
Scimon Ahhh... So you want to *try* and load A?
AncientWizard No not load 13:49
El_Che import
MasterDuke modules.raku.org/dist/if:github:github:FROGGS maybe?
AncientWizard Symbol check
This is like p5 eval for a sub
Scimon See this is the kind of deep make Perl stuff I try and avoid most of the time so have never really looked into doing it in Raku. 13:50
AncientWizard My p5 app is about 280k lines of source. Very cool 13:52
Scimon Nice :)
AncientWizard Let me add a story this 13:53
In this case mod b is a console builder but it cat be sure what features are built in to app
Can't be 13:54
So it tests for N known features and only calls those those it can find to add their bits to the console 13:55
13:57 dakkar left
Scimon So... you want to know if a given module exists to be loaded? 13:58
AncientWizard I use this same technique when doing DB writes. If a data producer does not want to wait for a DB write it can check for the mod that will bulk up and background that work. I.E. delegates it so it can move on to the next work item
App is Event driven and manages 90+ security scans in parallel 14:01
Scimon m: my $exists = ::("A");say $exists.?exception 14:03
evalable6 No such symbol 'A'
Scimon So that looks to see if A is in the lexical scope. If not it returns a failure that I then look to see if it's got an exception method. 14:04
docs.raku.org/language/packages#In...into_names Might help?
AncientWizard If so :('Some::mod') ...
Will always be false unless use Some::mod; is in the same file 14:05
Scimon Yes. Because modules are lexically scoped not globally. 14:06
AncientWizard Even if the use was already called in file a file read before this 14:07
Scimon Yes because that use would be in that packages scope.
AncientWizard But the symbol is an our class
By default 14:08
Scimon our defines a variable to be Package scoped. So it's not leaking out into Global scope.
AncientWizard Any chance I'm doing the lookup wrong 14:10
14:10 dakkar joined
Scimon m: module A { our $x = 5 }; module B { import A; our $ax = $A::x; };say $B::x;say $A::x;say $B::ax' 14:11
evalable6 (exit code 1) 04===SORRY!04=== Er…
Scimon, Full output: gist.github.com/2a657ba758458b5f19...b1d4f198e8
Scimon m: module A { our $x = 5 }; module B { import A; our $ax = $A::x; };say $B::x;say $A::x;say $B::ax
evalable6 (Any)
5
5
lizmat plugs the CCR project by showing yours truly's list of remastered blog posts: github.com/Raku/CCR/blob/main/Rema.../README.md 14:12
github.com/Raku/CCR/blob/main/README.md
Scimon lizmat++ 14:13
I think you might need to rethink how you're going about it AncientWizard. 14:14
AncientWizard In case I confused things my mods are classes no actual units or module. class a::thing ... 14:16
Scimon For me this feels like a perfect case for config files and runtime class loading with require. 14:17
AncientWizard Unfortunately its a long discussion about cutting dependencies and writing for test. It sometimes means more code but it has paid off 14:20
I make every attempt to cut hard depends so testing can toss in adapters 14:21
Scimon Hmmm. All I can think of is putting a more detailed example on Stack Overflow, there's a few of us there who may be able to help work out what to do. 14:22
AncientWizard Agreed. Sadly I can't do that from work. Doing irc from phone is painful 14:24
14:24 wamba left
Scimon stackoverflow.com/questions/661555...ailability : Was this the question? 14:25
AncientWizard I still believe I should be able to look up any global or our scoped symbol so long as use was performed at least ones before I look 14:26
Sorry not the solution. The module is on disk but its not this code responsibly to load it. Its more like is this feature in memory then run it otherwise move on 14:29
14:42 AncientWizard left 15:06 wamba joined 15:15 gnufr33dom joined 15:20 patrickb left 15:24 Sgeo joined 15:41 Sgeo left, Sgeo joined 15:45 wamba left 15:46 gnufr33dom left 15:51 parabolize joined, shadowpaste joined 15:52 codesections joined
codesections o/ 15:52
15:57 patrickb joined 15:58 jmerelo joined
tyil \o 15:59
guifa2 doth mine eyes deceive me? codesections in IRC again? ;-) 16:07
16:16 orinthe left 16:21 orinthe joined 16:27 orinthe9 joined 16:29 orinthe left 16:33 orinthe9 left
tonyo Scimon: if he wants to look at whether it's installed first he can comb $*REPO using .candidates("X") and .next-repo 16:34
16:40 vrurg joined, kaiwulf joined 16:42 orinthe joined
codesections guifa2: haha, yeah, I kept not logging on – in part because I was down a screen and don't have a good client set up. But I'm going to try to be around a bit more :D 17:03
17:04 vrurg left 17:06 vrurg joined
guifa2 so I was thinking that the pack/unpack functions have been experimental and not given much love. They're also very confusing 17:06
confusing = I have to look at the docs everytime to regrok what stuff does
maybe we should consider a totally different approach, eg
Scimon I don't think the original Perl pack or unpack are the easiest to understand. 17:07
guifa2 well, that's also true
Scimon (I'm not disagreeing with you just making the point ;) ) 17:08
guifa2 my $bin = pack { pack $foo :int8; pack $bar :int16; pack $str :str for @str-array } 17:09
or
my $bin = pack { store-int8 $foo; store-int16 $bar; store-str $str for @str-array } 17:10
17:10 dakkar left
codesections would there be a way to take inspiration from JSON::Fast? 17:11
guifa2 codesections: that just uses to-json and from-json; packing has a few more options that can't be quite so succinctly summed up I don't think 17:13
In effect, it doesn't really do anything you can't do with buf operations, it was just supposed to —in theory— make it easier
the cool power could be in the unpack. Currently unpack just returns a list, so you'd do 17:14
my ($a, $b, $c) = unpack(…);
Using a block, assignment could be enabled
unpack { $a = unpack :int; $b = unpack :int; } or something 17:15
I'd definitely need to think through it carefully to consider all the possibilities, but I think something oculd be done to make it actually useful 17:16
17:18 vrurg left
Discipulus some interesting update on * glob expansion on cmd.exe at www.perlmonks.org/?node_id=11128174 17:20
codesections maybe something like `my $bin = pack({ :foo(int8), :bar(int16), :str(Str) }, @str-array)` (where the first arg is a Hash, not a block)?
17:21 sortiz joined
Discipulus feel free to answer here or there 17:21
17:25 Scimon left
sortiz Discipulus: Yesterday I lost my internet connection. I will write down my findings later. 17:26
17:26 dakkar joined
Discipulus soritz: great! irc you had different behaviours, no? If you read newer posts they can explain this weirdness 17:27
17:30 vrurg joined 17:33 dakkar left 17:35 rindolf left 17:51 stoned75 left
sortiz Discipulus: I can confirm that, in Windows, the behavior depends of the libraries linked. A raku build with Microsoft tools don't expands, but one build with mingw tools does. 17:56
18:00 aborazmeh joined
sortiz With rakubrew is easy to reproduce as I can download some raku versions, all precompiled with MS tools, but can build others if you has strawberry perl installed. 18:01
Discipulus sortiz: great! 18:04
18:06 DiffieHellman joined
Discipulus so now it could interesting to try buildin perl with mingw tools to see if it expands! :) 18:16
sortiz No, strawberry perl is build that way and don't expands. 18:19
18:24 domidumont left
Discipulus no way to build another perl? 18:40
sortiz I commented in PerlMonks. 18:53
Discipulus oh great! 18:54
18:55 Sgeo left, Sgeo joined 18:57 squashable6 left 18:58 jmerelo left, squashable6 joined, stoned75 joined 19:05 wamba joined 19:31 defaultxr joined 19:54 ufobat__ joined 19:58 ufobat_ left 20:02 rindolf joined 20:36 patrickb left, rindolf left 20:41 sortiz left 20:49 ufobat__ left 20:55 leah2 joined 21:02 aindilis left
guifa2 vrurg: re Raku conf. I'm crazy (academic) talking here, but maybe in lieu of (or inaddition to) sponsorships we could shortly afterwards publish a quick proceeds of the conference for people who want to fork over $X to donate to TPF/TRF to support grants and run it through a print-on-demand service. Keepsake + reference material 21:48
21:51 johann1 joined
vrurg guifa2: one thing I'm certain about: what you say is beyond my English abilities. :) I hardly understand your point. 21:52
guifa2 I ramble sometimes, feel free to yell at me for it :-) 21:53
Instead of (or in addition to) trying to get sponsorships for money, perhaps we could give incentives for someone to be a paid "attendee".
vrurg Me too. Sometimes thinking runs fast and talking/writing lags behind. The outcomes are usually messy. :)
guifa2 People have an interest in Raku books, etc, so perhaps we could publish proceedings of the conference (basically, a short book[let]) so people could have a reference copy of the presentations. 21:54
A nice keepsake, basically, but functional
johann1 Where would I have to look to find a precise definition of what "\s" matches? Thinking of a list of code points. 21:56
vrurg I think the best is to have all possible options here. Having choice is always the best. Though I'm not sure a print on demand service could produce any substantial outcome.
johann1: It should be on Regex documentation page. I think I saw it there.
johann1 I looked at docs.raku.org/language/regexes#\s_and_\S but it does not give a definition just "a single whitespace character" 21:57
21:58 Discipulus left
guifa2 johann1: it's anything that's defined in Unicode as a spacing character 21:59
basically, it's equivalent to <:Z+[\r\n\t]> 22:01
(because Unicode considers tab, CR and LF as control characters rather than spacing characters)
johann1 in other words everything marked as "White_Space" in this file www.unicode.org/Public/UCD/latest/...opList.txt ? 22:02
22:03 Garbanzo joined, wamba left
guifa2 johann1: correct 22:04
22:04 johann1 left 22:05 aindilis joined
guifa2 vrurg: true. FWIW, based on some quick quotes, we could print a 100-page, hardbound book for ~$10 each. I dunno, I'm weird. I like books :-P 22:07
vrurg guifa2: We'll where it goes. Overall I like the idea. 22:12
22:16 aborazmeh left, Garbanzo left 22:27 wamba joined
codesections guifa2: the thing is though, at an academic conference, most of the presentations are of papers, and then the proceeding include those papers. But it seems like we mostly write presentations from scratch (rather than, say, adapting a blog post). So what would go in the proceedings? 22:36
guifa2 codesections: it depends on the conference
the ones i go to, proceedings are written after the fact
codesections oh, interesting. But still by each speaker? 22:38
guifa2 Yeah. My thinking was a lot of us could adapt our presentations to a written form within two or three weeks of giving it. I could then stitch it together in InDesign, and have it off to the printers shortly thereafer. 22:39
22:40 kawaii left
guifa2 (in a lot of cases, it's copy paste stuff off of our slides, and add some connecting prose, really. And if someone can't do theirs, I could probably speech-to-text them, and edit it togehter into something quick) 22:40
22:41 mithaldu_ left, mithaldu_ joined
codesections Hmm, I do like that idea, but my concern is that people might not volunteer to give a talk if they don't have time to write it up after (or just don't like writing). Even if it's technically optional, I'd worry that it could scare people off. 22:41
22:41 kawaii joined
codesections Here's a related idea I've been toying around with suggesting: what if we published a "best of Raku essays" out of lizmat's blog-post remastering project? Maybe with quick intros to each one providing context? 22:43
guifa2 ^^^I was literally just thinking another thing could be a "Best of Raku 2020", "Best of Raku 2021" and each year do that with some of the blogs, posts, presentations, etc 22:44
codesections (When I was imagining proposing it, I was thinking that I'd volunteer to be the editor and write the connective bits, but it could be any of us/multiple people)
lizmat codesections: those are definitely ideas that one could work with
22:44 wamba left
codesections Ok, well I think I'll write up a few thoughts slightly more formally and open an issue on the repo for the blog project 22:46
22:48 aluaces left
lizmat codesections++ 22:49
jdv79 is publicity a real issue? 23:20
i used raku for one project professionally and like mr lembark it eats mem. hard to advocate for a slowish lang that also eats mem:( 23:24
23:32 xelxebar left 23:33 xelxebar joined
MasterDuke jdv79: can you create an issue? real code linked in it would be great 23:44