🦋 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:06 codesections left 00:19 mowcat left 00:20 xinming left 00:21 xinming joined 00:22 pecastro left 00:46 xinming left 00:47 xinming joined 00:51 ggoebel joined 00:53 jmchael left 01:06 BenGoldberg joined 01:18 mitoxys joined 01:19 mitoxys left 01:20 MasterDuke left 01:42 kent\n left 01:43 kent\n joined
xinming MoarVM panic: Trying to unwind over wrong handler :-) 02:01
Anyway how I can troubleshoot this bug down?
[Coke] just checking: you running a recent rakudo? 02:04
xinming 2020.11
Built on MoarVM version 2020.11. 02:05
[Coke] don't suppose using --ll-exception gives anything extra? 02:06
xinming will try 02:08
pastebin.com/TBvGHvYY 02:10
[Coke]: pastebin.com/TBvGHvYY
github.com/FCO/Red/blob/0e93d35ab9...s.pm6#L135 02:11
this code caused the panic, But how can I dive deeper? 02:14
Let me try to narrow it down. 02:17
Finally, got ya. ;-) 02:30
moritz: github.com/rakudo/rakudo/issues/4085 02:36
I think people should assign the issue as high critical. :-)
02:41 frost-lab joined 02:53 xinming left 02:54 xinming joined 02:56 skids left 03:02 leont left
[Coke] xinming: I cannot duplicate your error. 03:09
added a note to the ticket.
03:25 xinming left 03:27 xinming joined
xinming [Coke]: Please check the comment again, markdown easts some of the code. 03:35
eats*
04:05 _jrjsmrtn joined 04:06 __jrjsmrtn__ left 04:09 ensamvarg3 left 04:12 squashable6 left 04:14 squashable6 joined 04:40 dyaso joined
dyaso i have a question which isn't in the FAQ: how practical would Raku be as a scripting language embedded in a larger application? Lua/Python/Scheme sort of use case 04:45
04:51 maggotbrain joined 04:54 Kaiepi left, Kaiepi joined
moon-child dyaso: not great, but if you're dedicated you can probably get something going 05:00
dyaso: github.com/moon-chilled/libport take a look at this
dyaso huh, it seems ideal as an extension language for a text editor or something. what are the problems? 05:01
moon-child the main problem is that the global namespace is immutable, so hotswapping code is somewhat impractical
also moarvm embedding isn't super mature (e.g. it's not currently possible to start multiple interpreter instances in the same process) 05:02
metacpan.org/pod/Inline::Perl6 is also worth a look (that's for embedding raku in perl5)
dyaso i'd noticed that about moarvm, had thought instead the main app might include a shared library the extensions would interact with, which would somehow communicate back to the main app 05:03
moon-child that's an option 05:04
another option is to just write the whole app in raku
dyaso true!
05:06 nige joined
moon-child out of curiosity, what kind of app would this be for? 05:07
05:08 nige left, nige joined
dyaso probably a Rust binary / text file editor, and i've also been daydreaming about a mini interactive computer algebra system (less about automatic simplification than performing manipulations as the user suggests them) for Clifford algebras 05:11
05:12 zacts joined 05:13 nige left 05:14 nige joined
moon-child ah, neat 05:18
05:18 nige left
moon-child I have an APL CAS sitting on the back burner 05:18
05:18 nige joined 05:20 BenGoldberg left
moon-child have also thought about building a texteditor, but the existing offerings are all *super* mature (incl. the hex/bin editors) so it seems like somewhat of a lost cause to try to produce something usable 05:20
dyaso my idea with that was half small UI innovations: non-fixed width text, elastic tabstops, www.andrewbragdon.com/codebubbles_site.asp 05:22
.. and half that i've seen a few binary file editors which make attempts to parse the binary file formats, and in the case of executables the user annotates structures which are then used to interpret the rest of the file, and thought experimenting with editing source code like that too seemed intereseting 05:23
also it's a well established kind of program and fairly simple, so good for a practice rust app 05:24
05:28 nige left 05:29 nige joined 05:33 nige left 05:35 parabolize left
notandinus i compiled rakudo star from source yesterday, raku says that 'Readline' is not installed but i see it in ~/star/src/rakudo-star-modules 05:41
i cloned the repository in ~/star and installed it in the same place 05:42
do i need to add RAKULIB or some env var to point to the modules directory?
05:49 nige joined 05:53 nige left, nige joined 06:08 nige left 06:09 nige joined, jmerelo joined 06:12 frost-lab left 06:13 nige left, nige joined
moritz notandinus: did you "make install" in rakudo star? 06:13
notandinus moritz: ,no i just ran `rstar instal' and nothing after that 06:18
Geth ecosystem/alabamenhu-patch-1: f63bcbaa67 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Change to real name
06:20
notandinus moritz: it did say that it was installting modules iirc 06:21
guifa jmerelo: It’s definitely supposed to be “transput” 06:24
jmerelo It's not there, then...
tellable6 2020-12-02T23:39:32Z #raku <tbrowder> jmerelo my advent article is on the advent site
guifa I don’t know why Travis failed, local zef install works for me =\
oh 06:25
jmerelo Not only Travis. I couldn't fetch the file either
guifa sighs
It’s because github stopped using “master” as the default branch name
now it’s "main"
jmerelo Just noticed 06:26
Can do it for you if you want
Geth ecosystem/alabamenhu-patch-1: 789c66f59e | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Use real name
guifa jmerelo: that’d be awesome. Couldn’t see where to edit the commit on the web interface quickly
06:28 nige left 06:29 nige joined
jmerelo guifa: used to do it to debug github actions. 06:29
# github source github.com/alabamenhu/DebugTransput needs to end in .git 06:30
guifa: you can fix that and ping me, and I'll re-laucn tests
guifa jmerelo: all done 06:32
06:33 nige left, nige joined
Geth ecosystem/master: 4 commits pushed by L'Alabameñu++, (Juan Julián Merelo Guervós)++ 06:34
jmerelo guifa++ 06:36
Looks like a cool thing, too...
guifa It’s all codesection’s fault 06:38
I’ve still been burning the mdnight oil trying to get CLDR to a newly releasable state 06:47
It’s soooooo much faster
06:48 nige left 06:49 nige joined 06:53 nige left, nige joined 07:03 nige left 07:04 nige joined 07:08 nige left, nige joined, sjm_uk joined 07:20 harrison joined 07:23 nige left 07:24 nige joined 07:28 nige left, nige joined 07:43 nige left 07:44 nige joined 07:48 nige left, nige joined 07:53 nige left 07:54 nige joined 07:57 sjm left 07:58 nige left, nige joined 08:00 sjm joined, stoned75 joined 08:04 Zero_Dogg left 08:07 harrison left 08:11 BenGoldberg joined 08:12 domidumont joined 08:13 Sgeo left, nige left 08:14 nige joined 08:18 nige left, nige joined 08:35 harrison joined, sena_kun joined 08:37 pecastro joined 08:41 dakkar joined 08:45 BenGoldberg left, kst left 08:46 kst joined 08:49 MasterDuke joined 08:57 sjm left 08:58 sjm joined 09:03 zacts left
notandinus what would be the slow part in this code: paste.debian.net/1175382/ 09:06
09:07 Altai-man joined 09:10 sena_kun left
MasterDuke notandinus: have you tried profiling it? add the '--profile' flag to your raku command line to generate a stand-alone html file profiling report 09:10
if i set `@part_02 = ^10_000_000` before running that, 78% of the time is spent in garbage collection 09:16
notandinus i'll try profiling it,
oh @part_02 is a list of just 200 numbers 09:17
MasterDuke: i see, so could that be improved?
this thing takes ~3 minutes to run on my system, just ran it with --profile
MasterDuke 3min with just 200 numbers? that takes 0.13s on my machine 09:19
notandinus seems accurate, i ran some code to computer 'e' and it took 10x time on my system to do the same thing 09:20
here just "raku -e 'say 1'" takes around 1s
MasterDuke what hardware are you running on? 09:21
notandinus its intel pentium, 1.5GHz x 4
i'm running raku 2020.11 09:22
hang on i;ll test equivalent perl code 09:23
AOC day 1 part 1 takes 1.7 s on raku and just 200ms on perl
09:23 wamba joined
MasterDuke well, do you need to work from the front of @part_02? popping is faster than shifting 09:23
m: my @a = 1..1_000_000; my $b; my $s = now; while shift @a -> $c { $b = $c }; say now - $s; say $b 09:24
camelia 0.2155762
1000000
MasterDuke m: my @a = 1..1_000_000; my $b; my $s = now; while pop @a -> $c { $b = $c }; say now - $s; say $b
camelia 0.1029508
1
notandinus heh the equivalent perl code took 400ms to run part 2 09:25
MasterDuke: i'll try that
09:26 dakkar left, dakkar joined 09:27 harrison left, harrison joined 09:28 dyaso left 09:29 ensamvarg3 joined
notandinus MasterDuke: looks like that combinations thing was causing it 09:31
here: paste.debian.net/1175385/
^ has raku, perl code & their times
0m21.26s real 0m21.11s user 0m00.75s system 09:32
0m00.42s real 0m00.35s user 0m00.07s system
^ first one is raku, second one is perl
am i doing something wrong?
MasterDuke yeah, the first profile i ran of your code was wrong, so ignore what i said about garbage collection 09:33
.combinations is slower than the nested loop? 09:34
notandinus a lot slower 09:35
it should be the same thing right?
MasterDuke hm. that used to be the case (i even wrote a module to automatically generate the source code for the right number of nested loops and EVAL that), but then .combinations was made much much faster 09:36
notandinus so it should be faster than nested for? 09:37
MasterDuke pretty sure it has been at least very close 09:38
09:38 nige left, cpan-raku left 09:39 nige joined
MasterDuke fwiw, your nested loops aren't producing the same output as .combinations(2) 09:39
notandinus yeah the combinations one wasn't producing any output, i'm checking that
the nested loop is the righ tone
09:40 vszl joined
notandinus hmm i'll just test empty loop 09:41
0m05.56s real 0m05.83s user 0m00.57s system
^ this is nested for 09:42
0m08.97s real 0m09.02s user 0m00.63s system
^ this is combinations ^
so maybe my operations are messing it up
vszl Hi, I'm new to raku and I'm trying to learn it by doing the Advent of Code. I'm trying to do the equivalent of this form perl5: `echo 'hiii hii' | perl -pe 'my $x="i"; s/[^$x]//g' `. That is substiute every non $x with "i". I'm trying `s:g/<-[$x]>//` in perl6 and variants but can't seem to figure it out.
09:43 maggotbrain left
vszl I mean I mean substitute every non $x with the empty string. 09:43
MasterDuke but combinations should give you the right answer. it's giving you the unique pairs, and a + b == b + a
09:43 nige left, nige joined
notandinus paste.debian.net/hidden/56d26d51/ # MasterDuke: i'm using this code, both are the same thing right? 09:43
MasterDuke oh, well you won't get the duplicated entries with combinations. e.g., (2 2) 09:44
notandinus say the list is <1 1> and i perform combinations on it then i'll get : <1 1> <1 1> right? 09:46
whereas nested for will be <1 1> 4 times
MasterDuke m: .say for (1,1).combinations(2)
camelia (1 1)
notandinus oh & I just checked, the numbres in answers doesnt include duplicate entries: its = 983 : 69 : 968 09:47
MasterDuke: oh i see, hmm is it intended behaviour? if you go by mathematical definition then it should be <1 1> <1 1> right? 09:48
m: .say for (1, 2, 2).combinations(2)
camelia (1 2)
(1 2)
(2 2)
notandinus hmm maybe combinations is slower because it's doing this complex de duplication thing 09:51
and that code took 3m 25s without printing the answer, i think i'll stick with nested for loop 09:53
09:56 cpan-raku joined, cpan-raku left, cpan-raku joined 09:59 squashable6 left 10:02 squashable6 joined
notandinus for some reason everything on my system is around 10x slower, could it be the 2020.11 build? 10:04
i ran the same code on my laptop, took 2s, takes 20s on my system
10:05 ensamvarg left
notandinus ofc laptop is faster but i dont see this difference when running the perl implmentation 10:05
10:05 ensamvarg joined
notandinus mine is also hyperthreading disabled, openbsd disables it by default, 10:07
i'll stop posting now, sorry for the wall
10:07 ensamvarg left
MasterDuke there were some regressions introduced in the 2020.11 release, but i don't *think* they should impact this code 10:09
10:11 ensamvarg joined, ufobat joined 10:12 ensamvarg left
MasterDuke btw, you weren't including some values in your original code because the shifting was happening first 10:12
notandinus MasterDuke: yeah that was intended
i only want to go over it once in outermost loop
10:13 ensamvarg joined
MasterDuke m: my @a = 1..3; while shift @a { .say for @a.combinations(2) } 10:13
camelia (2 3)
()
MasterDuke m: my @a = 1..3; while @a { .say for @a.combinations(2); @a.shift }
camelia (1 2)
(1 3)
(2 3)
(2 3)
notandinus if i remove that outermost loop and change it to combinations: 3, it takes 4 minutes and prints the right result
wait...
hmm that was not intended 10:14
m: my @a = 1..3; while pop @a -> $n { say $n }
camelia 3
2
1
notandinus oh no
so that's why the combinations: 2 wasn't outputting the right answer 10:15
thanks MasterDuke, it was logical error
MasterDuke ha, np
10:17 frost-lab joined 10:20 ensamvarg left 10:21 ensamvarg joined 10:23 ensamvarg195 left 10:24 ensamvarg195 joined
notandinus ok i have another interesting thing 10:36
paste.debian.net/hidden/2da3584e/ - this takes ~5 s to run 10:37
paste.debian.net/hidden/6c4871ef/ - this takes ~56 s 10:38
the change is in `if' block, $num_1 is changed to $num_2 in second code
10:38 nige left
notandinus why would the difference be so huge? i 10:39
10:39 nige joined
notandinus i'm profiling it now 10:39
timotimo what numbes give the result? 10:41
maybe it's actually running more tries for the second one?
10:41 MasterDuke left
notandinus second one gives no result 10:42
timotimo ah, well
notandinus and it's running same tries for both, the input doesn't change
timotimo that means it'll run the entire num2 and num3 loop completely, num1 times, without exiting
notandinus ah, sorry nevermind 10:43
timotimo ah i can't just run the code because i don't have @inputs
notandinus my brain is not working
10:43 nige left
notandinus timotimo: that must be it 10:43
10:43 nige joined 10:53 nige left 10:54 nige joined 10:58 MasterDuke joined, nige left, nige joined 11:21 MasterDuke left 11:36 BenGoldberg joined 11:39 MasterDuke joined 11:52 ufobat_ joined 11:55 Black_Ribbon left, MasterDuke left, ufobat left 11:58 nige left 11:59 nige joined 12:03 nige left, nige joined 12:06 ggoebel left 12:08 wamba left 12:09 BenGoldberg left
notandinus hi o/ 12:10
so i'm running `rstar install` again, it should install all the modules right? 12:11
[2020-12-03T17:36:08] [INFO] Installing Log-Colored
^ currently it's printing this for each module listed in `/etc/modules.txt`
12:21 grep0r joined, grep0r left 12:27 harrison left, ggoebel joined 12:28 nige left, leont joined 12:29 nige joined 12:33 nige left, nige joined 12:34 vszl left 12:38 nige left 12:39 nige joined 12:43 nige left, nige joined 12:48 nige left 12:49 nige joined 12:51 lucasb joined 12:53 nige left, nige joined 12:55 MasterDuke joined, sjm left 13:00 sjm joined 13:02 oodani joined 13:05 oodani left 13:07 sena_kun joined 13:09 Altai-man left 13:15 natrys joined 13:21 MasterDuke left 13:23 frost-lab left, nige left 13:24 nige joined 13:33 nige left 13:39 nige joined 13:41 dyaso joined
tyil that seems like a bug 13:43
CI doesn't seem to reproduce this (gitlab.com/tyil/rakudo-star/-/jobs/864033902) 13:45
notandinus: can you give me the output of `rstar sysinfo`, and exact steps to reproduce this on your machine? (wget $url, tar ..., cd ..., ./bin/rstar install ...) 13:47
13:48 nige left, nige joined 13:53 nige left 13:54 nige joined, aluaces joined 13:58 nige left, nige joined 14:03 nige left 14:04 nige joined 14:08 nige left, nige joined, jmerelo left 14:11 natrys left
cpan-raku New module released to CPAN! RogueCurses (0.1.10) by 03KOBOLDWIZ 14:11
14:11 natrys joined 14:13 nige left 14:14 nige joined
notandinus tyil: I'm running OpenBSD 6.8 amd64 14:19
rstar sysinfo includes this info ^
tyil: exact steps: // git clone <rstar repo>; rstar fetch; rstar install -p ~/star // 14:20
hmm `tar'? oh should i be getting a release version and not running off master? 14:21
14:22 Maylay joined, leont left, abraxxa left
notandinus tyil: also, whad you mean by CI doesn't reproduce it? i see "gitlab.com/tyil/rakudo-star/-/jobs...3902#L871" line 14:22
14:23 abraxxa joined
notandinus or are you talking about something else? 14:24
14:27 abraxxa left 14:28 abraxxa joined, nige left, nige joined 14:31 natrys left 14:32 wamba joined
tyil notandinus: oh, I thought you ment it's saying "Log-Colored" for every module 14:32
notandinus oh sorry for misunderstanding 14:33
tyil no worries at all
I'm glad it's working fine :p 14:34
notandinus what might be the reason for this: paste.debian.net/hidden/66b66a6b/ 14:36
i get that when i run `raku`
14:38 nige left 14:39 nige joined
tyil that means you don't have a libereadline.so, and I would expect a libreadline.so (1 less e after lib) to begin with 14:40
it's an error from the Readline module, so you won't have readline support in the raku repl, but the repl itself still works 14:41
notandinus i can confirm it says libereadline
oh so it'sthe module issue?
tyil it's not something in core Raku, at least, but I'm not sure what specifically went wrong with the module
notandinus i ran `zef uninstall Readline`, it was sucessful 14:42
running `zef uninstall Readline` again returns `Found no matching candidates to uninstall`
but running `raku` still gives that error: paste.debian.net/hidden/66b66a6b/
tyil I have a similar issue on my local machine, where it's looking for libreadline.so.7 and can't find that either :(
notandinus and running `zef list --installed` still lists readline
ok but `zef list --installed` shouldn't list Readline right? 14:43
tyil try `zef uninstall --uninstall-from=vendor Readline` 14:44
(there's 3 default installation locations for modules, the one bundled with Rakudo Star install in "vendor", without an explicit location, zef uses site iirc) 14:45
notandinus tyil: yay thanks, now `raku` doesn't print the readline error
tyil \o/
notandinus raku module thing is so confusing, are we expected to only manage it through zef? 14:46
tyil for now, zef is the only recommended module manager, yes
notandinus i see that the files are random long names instead of module directory
tyil they're hashes of a few variables in the module (name, author, version iirc) 14:47
notandinus ah i see, so to prevent collisions?
tyil Raku allows modules with the same name to be installed (from different authors or different versions), so this is needed to avoid collisions
notandinus but doesnt it make things complicated?
14:47 parabolize joined
notandinus oh wait, different versions too? 14:47
tyil it does make things a lot more complicated in my opinion, but there's certain upsides 14:48
like being able to use the specific version of any module you need
14:48 nige left, nige joined
notandinus that's cool, yeah i would still prefer plain names 14:48
i just ran zef install Readline and it fails a test 14:49
hmm nvm ^, i'll test it later
is this channel always so quiet?
tyil it depends on the time of day, really 14:50
notandinus half of messages today would be from me lol
ah so lets say i write a raku script for parsing irc logs to find out the most active hour
the format is "09:50 <nick> message" 14:51
what would be the best way to do it?
tyil do you know of grammars?
notandinus what comes to my mind is to just read the log line by line and substr first 2 chars to get year and increment it's hash
tyil: no, i don't 14:52
tyil docs.raku.org/language/grammars
it's the next best thing after sliced bread
tadzik although for that specific purpose, reading the first two chars should be good enough :) 14:53
tyil it allows you to relatively easily parse a file, and turn it into objects (using Actions)
tadzik: well, yeah, but grammars are cool!
tadzik indeed! :)
notandinus huh so i teach raku the format of log and i can get everything?
14:53 nige left
tadzik any excuse to learn them is a good one 14:54
14:54 nige joined
tadzik notandinus: yeah, pretty much 14:54
notandinus does perl have such thing?
tadzik you can do it line-by-line, which will probably be a lot lot faster
14:54 rindolf joined
tadzik perl has just the regular regexes, which are not as powerful (though they would work just as well in this case, for the most part) 14:54
notandinus tadzik: i can do it line by line with grammars too right?
tadzik notandinus: yes
just define it in your grammar that your log is a set of entries separated by newlines 14:55
notandinus this is nice, i'll try learning this
tyil notandinus: I used a grammar for the Advent of Code day 2 problem git.tyil.nl/advent-of-code/tree/20.../bin/first
tadzik they're great
ah nice, I just did this with regexes (in Rust). Also learning that compiling a regex on each line in debug build mode is sloooow 14:56
ends up much less elegant than the raku version: git.tadzik.net/tadzik/aoc2020/src/...in/day2.rs
tyil but likely much faster as well, I presume? 14:57
tadzik let's see...
actuall takes almost a full second 14:58
14:58 nige left, nige joined
tyil thats less impressive than I would've thought 14:58
tadzik that's disturbingly slow, I guess regex compilation is killing it
14:59 natrys joined
tadzik yep, down to 0.01s if you only compile it once :P 15:00
tyil that's more within the expected range
tadzik it was even worse in debug build, to the point when I waited like 10 seconds and started wondering where the infinite loop is
15:01 BenGoldberg joined 15:04 aluaces left 15:06 aluaces joined 15:08 nige left, Sgeo joined 15:09 nige joined 15:13 ensamvarg3 left, nige left, nige joined 15:20 natrys left 15:24 natrys joined 15:26 wamba left 15:28 wamba joined, nige left 15:29 nige joined 15:35 BenGoldberg left 15:38 nige left, nige joined 15:39 abraxxa left 15:40 abraxxa joined, lucasb left 15:43 abraxxa left 15:45 abraxxa joined 15:48 natrys left, natrys joined, nige left 15:49 nige joined, abraxxa left 15:51 Tirifto joined 15:53 nige left, nige joined 16:05 telex left 16:06 telex joined 16:13 nige left 16:14 nige joined
guifa Is there a way to create an Enum that doesn’t autoimport its symbols into the current scope? 16:17
I’m using package Foo { enum Foo … } to require referenceing as Foo::a, Foo::b etc, but it feels a bit clunky 16:18
16:18 nige left, nige joined 16:19 xinming left 16:21 xinming joined 16:23 hal99999 joined 16:34 jmchael joined 16:36 skids joined 16:42 jmerelo joined 16:47 hungrydonkey joined 16:51 Doc_Holliwould left
tbrowder jmerelo: do i need to add additional links? 16:53
i already have two links to language refs, but i guess there are the type refs (but the docs aren't available at the moment). 16:55
16:56 rindolf left
tbrowder hm, it seems the docs site has no tls cert at the moment 16:56
lizmat guifa: I'm afraid that's the way to do it
jmerelo tbrowder: now, everything is OK. Thanks! 16:58
tbrowder: let me check that
tbrowder: it seems to be back to normal...
17:01 stoned75 left
tony-o notandinus: perl regex can probably do your log file, it can parse JSON too. www.perlmonks.org/?node_id=995856 17:02
tellable6 2020-11-08T10:58:07Z #raku <patrickb> tony-o May I encourage you to give your ecosystem rework proposal a second chance? The call for proposals is up! 17:03
jmerelo Do you know you can earn fame and fortune by contributing to the Raku advent calendar? github.com/Raku/advent/blob/master...authors.md 17:06
17:07 Altai-man joined
tony-o there is fortune to be had? 17:09
17:09 sena_kun left
jmerelo tony-o: it's good karma. Or something. Your next (insert favorite meal here) will taste better. 17:09
17:12 hungryd49 joined, hungrydonkey left, xinming left 17:14 xinming joined 17:18 nige left 17:19 nige joined
lucs Any reason why raku-advent.blog doesn't have an index to all the entries? (today for example, I can link to day 3 and day 2, but not day 1, which I haven't read :-) 17:19
jmerelo lucs: someone has to do that 17:20
Also, you can navigate by simply clicking on the "2020" category
raku-advent.blog/category/2020/ Hum, two articles are missing there.
lucs Not seeing the "category" link :( 17:21
(or 2020)
jmerelo OK; now all articles are there. 17:22
raku-advent.blog/category/2020/
raku-advent.blog/2020/12/03/day-3-...with-raku/ Right below the title, by the little folder icon 17:23
17:23 nige left, nige joined
lucs jmerelo: Hmm... Okay, but not quite obvious, eh :) 17:24
Also, I guess it would be nice to have that link on the home page. 17:25
jmerelo lucs: there's no home page. There's a page with the latest entries. There's an entry on top, but then someone would have to edit it every day to add the new link. 17:26
lucs By home page, I meant "raku-advent.blog".
Ah, I see. 17:27
jmerelo We can do it when it's finished, but I don't see a point in doing it. Just linking the category will do the same, pretty nicely. That's what the category is for, anyway. 17:28
lucs jmerelo: How about a link to raku-advent.blog/category/2020 on the raku-advent.blog page? 17:29
Geth ¦ doc: MorayJ self-assigned OO code example in rb-nutshell doesn't work github.com/Raku/doc/issues/3706
jmerelo I can edit the pinned article and add that.
17:30 hal99999 left, rindolf joined 17:32 hungryd49 left, seanrobert joined, moray joined, seanrobert left, moray is now known as morayj 17:37 dakkar left, hal99999 joined 17:38 hal99999 left 17:47 seanrobert joined
guifa lizmat: noted, I’ll stick with it then. 17:47
17:49 dyaso left, hal99999 joined 17:50 hal99999 left, hal99999 joined, seanrobert left
jmerelo We're preparing the CFP for the Raku&Perl devroom. Everyone is welcome to help 17:51
guifa: I seem to remember you send me a draft for your article, but I totally forgot where it is. 17:52
guifa jmerelo: github.com/alabamenhu/DateTimeTime...cs/blog.md
jmerelo I don't think I've seen that before. Can I check it out before you (or me) upload it to the WP blog? 17:53
17:54 Doc_Holliwould joined 17:55 aindilis left, aindilis joined
guifa jmerelo: sure. 17:57
ah you’ve already started, great ^_^
jmerelo lucs: link added 18:02
guifa omg so much spam from github thanks to jmerelo. I might have enough to make sandwiches for a week ;-) 18:05
jmerelo make that a couple of days :-) 18:06
guifa: done 18:07
guifa jmerelo: noted. I’ll start to work on it in a second 18:09
18:09 pounce joined
guifa Also, if needed, I can do another article fairly quickly on serialization, so if it’s looking like we need it, just gimme a heads up, otherwise I’ll leave it for next year 18:10
18:13 xinming left 18:14 xinming joined 18:18 domidumont left 18:26 BenGoldberg joined 18:38 xinming left, xinming joined 18:43 sjm left 18:45 pecastro left 18:46 ggoebel left 18:48 sjm joined, natrys left 18:52 ggoebel joined 18:57 sjm left, sjm joined, pecastro joined 18:58 ab5tract joined, nige left 18:59 nige joined 19:00 BenGoldberg left 19:02 sjm left, sjm joined
cpan-raku New module released to CPAN! Game::Stats (0.2.10) by 03KOBOLDWIZ 19:02
19:03 nige left, nige joined 19:06 sjm_uk left 19:08 sjm left, sjm joined, nige left 19:09 nige joined 19:13 nige left, nige joined
ab5tract anyone doing Advent of Code here? curious if someone found a version of Day 1 part 2 that performs reasonably well 19:15
19:31 ufobat_ left 19:35 kensanata joined 19:38 morayj left 19:48 nige left 19:49 nige joined 19:53 nige left, nige joined, jmerelo left 19:54 codesections joined 20:02 ufobat_ joined
ggoebel codesections created a github repo to host Advent of Code (AoC) solutions. several folks have added theirs. You may find some good ideas reading other solutions. github.com/codesections/advent-of-raku-2020 20:09
cpan-raku New module released to CPAN! Game::Bayes (0.2.6) by 03KOBOLDWIZ 20:10
ab5tract ggoebel, ah, great! nice to have them all in one place 20:13
thanks for sharing!
codesections And, more specifically, I believe a few solutions saw some easy perf gains from `race` (e.g., github.com/mienaikage/advent-of-ra...e/01.raku) 20:14
Though I haven't followed it closely - I'm not focusing on speed for AoC 20:15
ab5tract .combinations(3) is at least 15x faster than [X] @data xx 3
I *knew* there was a method for it, but I got stuck looking for something like .cross :X
20:23 stoned75 joined
tbrowder funny, i can get to docs via link from raku.org, but not as a direct adress in the same browser. oh, well, that works. 20:30
20:32 kensanata left
tbrowder jmerelo: when you get a chance, please see if the links i have on build and tweak are satisfactory (the copy on wordpress) 20:32
tellable6 tbrowder, I'll pass your message to jmerelo
codesections tbrowder: hmm, someone else said something similar about the docs.raku site the other day: colabti.org/irclogger/irclogger_lo...12-01#l546 20:34
20:34 morayj joined
tbrowder seems weird to me, but at least it's accessible. 20:36
codesections They figuered it was just a config issue on there end, but if you're hitting the same issue, I wonder if the site could be having dns issues or something
tbrowder yeah, i can't get to lots of pages, bummer, really need them 20:41
cpan-raku New module released to CPAN! Random::Hawking::Boltzmann (0.1.3) by 03KOBOLDWIZ
codesections tbrowder: are you getting the same ERR_SSL_PROTOCOL_ERROR Raycat mentioned? 20:48
20:54 xinming left, hal99999 left
brass Is there a convenient way to create an array that wraps around, so that if you go to the next element after the last one it returns the first, and so on? 20:55
Xliff_ Hi! What would be the best way to determine if a hash contains equivalent entries?
eqv?
20:55 xinming joined
Xliff_ m: my %a = ( a=> 1, b => 2, c => 3); my %b = %a; %b{3} = 42; my %c = %a; say %a eqv %b; say %a eqv %c; 20:56
camelia False
True
Xliff_ Ah. Nevermind. :)
cpan-raku New module released to CPAN! Random::Hawking::Boltzmann (0.1.4) by 03KOBOLDWIZ 20:57
perryprog brass, you can just modulo the index by the length, no? 20:58
codesections brass: two options. one is @array xx ∞
brass I totally can haha, I was just curious
codesections or use `rotate`
perryprog Oo looks like I'm about to learn something too
brass OOOo
That's neat 20:59
codesections or modulo works too :D
perryprog codesections, what would using rotate look like?
codesections basically the same as modulo, really. You'd just rotate the array by the amount you want to acces and then check the head of the array. Probably not a great option, hearing myself say it 21:02
21:04 kensanata joined 21:07 sena_kun joined
codesections Unrelatedly: both of these expressions make me happy, but for opposite reasons: 21:09
m: say (21, 2).reduce(* * *)
camelia 42
codesections m: say (21, 2).reduce(* × *)
camelia 42
21:10 Altai-man left
brass Second is a lot easier to visually parse imo 21:10
m: my @a = |(1, 2, 3, 4) xx Inf; say @a[15] 21:11
camelia 4
brass :)
I wasn't able to get it to work without the pipe
perryprog Side note: knowing \LaTeX symbol completions (if your editor supports it) and knowing the shortcuts for typing those symbols (like π, ∑, ∞, etc.) is really nice.
macOS specifically has very, very nice support for entering notations—the option key in input fields basically switches to a symbol keyboard. 21:12
Much easier than alt codes, anyway.
Although compose keys are also always great. 21:13
brass codesections: would that be the proper way to create an infinite list, or does the pipe do weird things?
codesections brass: Oops that's my bad; either `|` or `flat` is needed but I forgot and left it out 21:14
perryprog: yeah, I've always used the compose key. You like LaTeX symbols better? 21:15
Xliff_ m: my %a = ( a=> 1, b => 2, c => 3); my %b = %a; %b{3} = 42; my %c = %a; say %a eqv %b; say %a !eqv %c; 21:16
camelia False
False
perryprog Well, most of my usages are covered by the US layout: i.imghurr.com/e/B5INoiQBkY.png i.imghurr.com/e/VHc7VcqBGg.png 21:18
Then occasionally I use the ABC layout which lets me type macrons in a postfix notation (I can do "a Option+Shift+a" to get ā), but otherwise that's mainly it. 21:19
Emacs also has quail which let's you define rules where you can type something like "a=" and get "ā", which is equally helpful. 21:20
brass Is there a way to do something like $a, $b += 4, 5 21:22
So that it results in something like $a += 4; $b += 5
codesections brass: «+»
brass I'm never sure how to point the arrows when using that operator 21:23
codesections er, += not +.
if you have the same length lists on both sides, it doesn't matter 21:24
brass Otherwise you point them towards the shorter list? 21:25
codesections perryprog: interesting. I hadn't heard of quail. Is the main advantage over abbrev mode that it doesn't expect a space at the end? 21:26
brass Always seems a little confusing when I read the docs, like what does the direction represent
samcv .tell patrickb no I don't use Raku at work, sadly 21:30
tellable6 samcv, I'll pass your message to patrickb
perryprog codesections, interestingly it's really designed for multilingual text input (and is really good at that), but its extensibility is very good so compose-key like snippets are very easy to do. 21:34
And you can have that be per mode or per file and all that jazz
21:35 kensanata left
codesections brass: the list on the big side of the arrows is whichever list has the same number of elements that you want in your result 21:38
m: (1, 3, 5) »+» (10, 0)
camelia Potential difficulties:
Useless use of »+» in sink context
at <tmp>:1
------> 3(1, 3, 5) 7⏏5»+» (10, 0)
codesections m: say (1, 3, 5) »+» (10, 0)
camelia (11 3 15)
brass Ooooooh okay 21:39
codesections three elements in the output
m: say (1, 3, 5) «+« (10, 0)
camelia (11 3)
21:51 BenGoldberg joined
Geth doc/ISSUE-3706: 61617635ef | (Moray Jones)++ | doc/Language/rb-nutshell.pod6
Changes BUILD to TWEAK in code example

Code example now works using TWEAK instead of BUILD.
Changes description to mentions TWEAK instead of BUILD too.
21:54
doc/ISSUE-3706: a88a2256b4 | (Moray Jones)++ | doc/Language/rb-nutshell.pod6
Changes twigil to public

There is no reason in this example to show a private attribute.
This clarifies that TWEAK can use $! to access attributes and that it's not a typo, without going into an explanation at this stage.
21:58 Tirifto left 21:59 finsternis left 22:00 ufobat_ left, ensamvarg3 joined, ensamvarg3 left
brass I just realized I read the AoC question wrong, which would be why my answer didn't work at all B^) 22:01
22:01 ensamvarg3 joined
brass Pain 22:01
codesections haha, me too. I was summing the trees in part 2 instead of multiplying. Same for you? 22:03
22:03 xinming left
Geth doc: MorayJ++ created pull request #3722:
Issue 3706
22:03
22:04 xinming joined
brass I thought it the toboggan had to move 1x1, 4x1, 5x1, etc. in a repeating pattern down the hill in one run 22:04
codesections ahh
brass I even had a really cool solution :p 22:05
tony-o .tell patrickb i'm interested in it, for sure. ot
tellable6 tony-o, I'll pass your message to patrickb
tony-o .tell patrickb it's been kind of a pain in my side, though. i have a working prototype and the code to run it. i need to figure out how to make it work in zef. 22:06
tellable6 tony-o, I'll pass your message to patrickb
tony-o .tell patrickb in response to your ecosystem inquiry.
tellable6 tony-o, I'll pass your message to patrickb
Geth doc: wambash++ created pull request #3723:
Update haskell-to-p6.pod6 — section Fold
22:08
22:21 stoned75 left 22:22 nige left 22:25 BenGoldberg left 22:44 morayj left 22:48 gordonfish left, gordonfish joined 22:55 sena_kun left 23:00 oneeggeach joined, oneeggeach left 23:05 ab5tract left 23:06 tejr left 23:07 tejr joined 23:15 Black_Ribbon joined 23:18 mowcat joined 23:21 mowcat left 23:31 rindolf left 23:38 ggoebel_ joined 23:40 ggoebel left