»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
pilne perl6 really does have a lot of things going for it as a language for making compilers.... 00:33
irced hey all i have a class that needs to refer to a type that is a subclass of itself, however, if I declare/define the subclass before the class or after the class I get an error. is there a way to do like a forward declaration so the parser knows to create the symbol table first ? 01:13
tobs irced: "forward declarations" in indexed on docs.perl6.org 01:15
irced tobs: doh!
tobs: thanks i see it now 01:16
tobs: ok, that's what i needed, although there was still an ordering property that's no big deal! 01:18
chloekek p6: say (('a', 'a',), ('b', 'c',), ('d', 'e'), ('f', 'f')).grep(&[ne] o [o]) 07:37
camelia ((b c) (d e))
chloekek Remove pairs where the elements are the same. :') o [o] is a neat trick. 07:38
&f o [o] is like f, but it slips the argument you give it into f. 07:39
That's what the first infix:<o> does if the RHS returns a list. And [o] is the identity function. 07:40
err, if the LHS takes more than one argument* 07:41
Perhaps &[ne] o |* is less questionable. 07:42
p6: say (('a', 'a',), ('b', 'c',), ('d', 'e'), ('f', 'f')).grep(&infix:<ne> o |*) 07:46
camelia ((b c) (d e))
squashable6 Webhook for perl6/doc is now active! Half measures are as bad as nothing at all. 08:14
AlexDaniel squashable6: status
squashable6 AlexDaniel, 🍕🍕 SQUASHathon is in progress! The end of the event in 2 days and ≈3 hours. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
AlexDaniel, Log and stats: gist.github.com/b74c9a720b3b95b02e...548cb3a884
chloekek Ah repositories finally make sense to me. 08:17
SmokeMachine m: say S:g[^ (\d ** 1..3) (\d ** 3)+ $] = "$0,$1.join(",")" given 1234567890 10:49
camelia 1,234,567,890
SmokeMachine m: say S:g[^ (\d ** 1..3) (\d ** 3)+ $] = "$0,$1.join(",")" given 123456 10:50
camelia 123,456
SmokeMachine m: say S:g[^ (\d ** 1..3) (\d ** 3)+ $] = "$0,$1.join(",")" given 12345678
camelia 12,345,678
SmokeMachine m: my $a = "1234567890"; my $index = (3, 6, 9 ... * < $a.chars).all; $a.substr($a.chars - $index, 0) = ","; say $a 11:01
camelia Cannot modify an immutable Str ()
in block <unit> at <tmp> line 1
SmokeMachine 12:01 <SmokeMachine> m: my $a = "1234567890"; my $index = (3, 6, 9 ... * > $a.chars).all; $a.substr($a.chars - $index, 0) = ","; say $a 11:04
SmokeMachine m: my $a = "1234567890"; my $index = (3, 6, 9 ... * < $a.chars).all; $a.substr-rw($a.chars - $index, 0) = ","; say $a; # what am I doing wrong? 11:56
camelia Cannot modify an immutable Str ()
in block <unit> at <tmp> line 1
El_Che hi, thx everyone for the new releases! 12:10
squashable6 🍕 threadless-screw++ synchronize pull request “Rewrite of regex interpolation section”: github.com/perl6/doc/pull/2927 12:21
🍕🍕🍕 First contribution by threadless-screw++! ♥
thundergnat m: my $a = "1234567890"; my $index = (3, 7, 11 ... * > $a.chars); $index.map: { $a.substr-rw($a.chars - $_, 0) = "," }; say $a; # SmokeMachine maybe? 12:32
camelia 1,234,567,890
thundergnat Awfully fragile though.
SmokeMachine thundergnat: but why it doesn't work with junctions? 12:34
m: my $a = "1234567890"; $a.substr-rw(1&3&5, 0) = "!"; say $a 12:35
camelia Cannot modify an immutable Str ()
in block <unit> at <tmp> line 1
tobs m: my $a = "1234567890"; my $index = (3, 6, 9 ... * < $a.chars).all; $a.substr-rw($a.chars - $index, 1) = ","; say $a;
camelia Cannot modify an immutable Str (8)
in block <unit> at <tmp> line 1
thundergnat <shrug> Probably because substr-rw doesn't know how to handle them.
tobs m: all(my $a, my $b) = 1; dd $a, $b 12:37
camelia Cannot modify an immutable 'Any' type object
in block <unit> at <tmp> line 1
thundergnat m: say &substr-rw.signature; 12:39
camelia ($, $?, $?, *%)
chloekek p6: say S:g/ (\d ** 0..3) <?before [\d ** 3]+ $> /$0,/ given '123456789';
camelia 123,456,,789
SmokeMachine m: say &substr-rw.signature.params.head.^name
camelia Parameter
SmokeMachine m: say &substr-rw.signature.params.head.type.^name
camelia Any
SmokeMachine say S:g[^ (\d ** 1..3) (\d ** 3)+ $] = "$0,$1.join(",")" given 1234567890 12:40
evalable6 1,234,567,890
SmokeMachine m: say S:g[^ (\d ** 1..3) (\d ** 3)+ $] = "$0,$1.join(",")" given 1234567890 12:40
camelia 1,234,567,890
thundergnat yeah but... 12:42
m: say S:g[^ (\d ** 1..3) (\d ** 3)+ $] = "$0,$1.join(",")" given -1234567890
camelia -1234567890
thundergnat oops
chloekek m: say S:g[^ '-'? (\d ** 1..3) (\d ** 3)+ $] = "$0,$1.join(",")" given 1234567890
camelia 1,234,567,890
chloekek m: say S:g[^ '-'? (\d ** 1..3) (\d ** 3)+ $] = "$0,$1.join(",")" given -1234567890
camelia 1,234,567,890
SmokeMachine m: say S:g[^ ["-"|"+"]? (\d ** 1..3) (\d ** 3)+ $] = "$0,$1.join(",")" given -1234567890 12:43
camelia 1,234,567,890
SmokeMachine m: say S:g[^ ("-"|"+")? (\d ** 1..3) (\d ** 3)+ $] = "$0$1,$2.join(",")" given -1234567890 12:43
camelia -1,234,567,890
squashable6 🍕 rba++ opened issue “deployment of docs.perl6.org”: github.com/perl6/doc/issues/2929 12:44
Geth ¦ doc: rba assigned to JJ Issue deployment of docs.perl6.org github.com/perl6/doc/issues/2929
squashable6 🍕🍕🍕 First contribution by rba++! ♥
Geth ¦ doc: rba assigned to antoniogamiz Issue deployment of docs.perl6.org github.com/perl6/doc/issues/2929
squashable6 🍕 rba++ labeled issue “deployment of docs.perl6.org” (site): github.com/perl6/doc/issues/2929
🍕 rba++ labeled issue “deployment of docs.perl6.org” (build): github.com/perl6/doc/issues/2929
SmokeMachine m: say S:g[^ ("-"|"+")? (\d ** 1..3) (\d ** 3)+ ("." \d+)$] = "$0$1,$2.join(",")$3" given -1234567890.12345
camelia -1,234,567,890.12345
tobs SmokeMachine: It doesn't feel like something Junctions are made for. They're this opaque superposition of values that you can manipulate as a whole, but you can't get a hold of the eigenstates to assign to them. Besides, one could probably settle on semantics for assignment to one(), any(), none() junction types, but that would be too funky imho. 12:48
thundergnat Or, you could use something like Lingua::EN::Number comma() which avoids going through the regex engine. # shameless plug 12:49
SmokeMachine tobs: but I'm not setting to a junction...
tobs m: dd "abc".substr-rw(all(1,2),0) 12:50
camelia all("", "")
tobs SmokeMachine: you are, junctions carry through operations.
SmokeMachine tobs: I would not if it were a `substr-rw(Junction, $)`candidate... 12:51
pmurias timotimo: the gtk shooter repo is meant to evolve into a game? 12:53
SmokeMachine tobs: I was trying to create a function to do that... I think you are right... thanks! 12:56
timotimo pmurias: it hopefully will 13:00
SmokeMachine m: say "blablabla".substr-eq: 0 & 3 & 6, "bla" # tobs: this this should work...
camelia Cannot resolve caller substr-eq(Str:D: Int:D, Str:D); none of these signatures match:
(Str:D: Cool:D $needle, *%_ --> Bool)
(Str:D: Str:D $needle, *%_ --> Bool)
(Str:D: Cool:D $needle, Int:D $pos, *%_ --> Bool)
(Str:D: Str:D $n…
SmokeMachine wrong parameters... 13:04
m: say "blablabla".substr-eq: "bla", 0 & 3 & 6 #it works... 13:05
camelia all(True, True, True)
pmurias timotimo: I'm not sure if rakudo.js will be fast for a realtime game :/ 13:17
timotimo it tends to be a little slow, doesn't it? :( 13:18
smartest would of course be to marry rakudo and gdnative for godot
at least clutter offers a scene graph, so instead of doing some kind of dance to get textures in place, and then render it, and maybe do stuff like offscreen culling 13:19
timotimo you can literally just set the x and y coordinates, and optionally rotation and scaling and all that. and it can even do tweening of attributes for you 13:20
pmurias timotimo: I haven't really benchmarked rakudo.js much 13:21
timotimo does putting "async" on literally every function make stuff slower than not doing that? 13:22
pmurias timotimo: yes 13:23
timotimo d'oh
do we have *any* functions that don't call other functions where we know that we can drop the "async" safely?
barely, right?
pmurias timotimo: I guess the emitted code could be a lot better with a bit of static analysis 13:26
I haven't touched rakudo.js in a bit, just recently got back to thinking about it 13:28
pmurias timotimo: the current focus is to have a cool tutorial for it and as currently planned it will include drawing your spaceship on a canvas 13:30
timotimo ha 13:30
chloekek Where should I look if I want to make custom syntax that acts similar to sub? E.g. "bloop foo($x, Str $y) { ... }", custom keyword "bloop" 13:31
atweiden-air regression in rakudo installation is still present in 2019.07.01 for users who install with --libdir=/usr/lib
"Unhandled exception: While looking for '/usr/share/perl6/runtime/perl6.moarvm': no such file or directory"
fixed with ln -rs /usr/lib/perl6 /usr/share/perl6
chloekek Do I need to make a slang for that?
timotimo i think to have something like "sub" you will need a slang 13:32
stuff like "class" and "grammar" are easier to make custom stuff for
chloekek More specifically I want to turn template foo($x, $y) { <h1>hello <%= $x + $y %></h1> } into sub foo($x, $y) { lazy gather { take " <h1>hello "; take(do { $x + $y }); take "</h1> " } } I already got parsing and compilation of the stuff within the curly braces working. :) 13:34
Thanks I'll look into patching the Perl 6 grammar with slangs.
atweiden-air thinks it's because a huge chunk of libdir code was removed from rakudo/Configure.pl 13:37
chloekek Oh actually, I think sub foo($x, $y) { template { ... } } would be even nicer since you can do extra stuff around it easily. 13:38
squashable6 🍕 coke++ wrote a comment on “build broken (OS X)”: github.com/perl6/doc/issues/2926#i...-517706018 13:44
🍕🍕🍕 First contribution by coke++! ♥
sena_kun bisectable6, help 13:45
bisectable6 sena_kun, Like this: bisectable6: old=2015.12 new=HEAD exit 1 if (^∞).grep({ last })[5] // 0 == 4 # See wiki for more examples: github.com/perl6/whateverable/wiki/Bisectable
sena_kun bisectable6, enum Norse-gods <Þor Oðin Freija>;
bisectable6 sena_kun, On both starting points (old=2015.12 new=971d4bf) the exit code is 0 and the output is identical as well
sena_kun, Output on both points: «»
wahnburger hello! I am trying the Cro sesssion management shown here: 14:54
cro.services/docs/http-auth-and-se...ased_login
When i am trying to run the code Ill get an "Could not find symbol '&InMemory'" .. does anyone can help me with a hint? 14:55
wahnburger oh damn..shame on me ... i missed to add the lib with use :/ 14:56
sorry for the noise :D 14:57
atweiden-air is patzim on here? 15:27
El_Che ugexe: I see the tag for the new zef release is without a 'v' (v0.7.3 --> 0.7.4). Is this the new format you use or a one-off? 15:36
rba modules.perl6.org is running on the server from nine. let me know if there are any issues. 16:14
timotimo cool 16:15
rba timotimo: Did you ever see "iCCP: known incorrect sRGB profile", btw?
timotimo yeah, that could be optipng or pngcrush output 16:16
rba Found exaclty one file, which has tis "wanring", yet Imager::File::PNG thought it's an error. 16:18
"warning"
ugexe El_Che: i guess i just forgot the v 16:25
just added the v 16:26
El_Che ok, thx (just pinning the zef release when a pkg is built, more reporducible)
sena_kun bisectable6, old=2018.06 new=head my $i = 0; loop { $_ = $i; last if $i++ == 5; when Int { .say } } 16:58
bisectable6 sena_kun, Cannot find revision “head” (did you mean “Bend”?)
sena_kun bisectable6, old=2018.06 new=HEAD my $i = 0; loop { $_ = $i; last if $i++ == 5; when Int { .say } } 16:59
bisectable6 sena_kun, Bisecting by output (old=2018.06 new=bc45af3) because on both starting points the exit code is 0
sena_kun, bisect log: gist.github.com/b7031c93698002bebd...e149e20369
sena_kun, (2019-01-07) github.com/rakudo/rakudo/commit/54...6f7b736104
sena_kun I wonder if it should print just 0 or 0,1,2,3,4. 17:00
timotimo ah, that might depend on how succeed/proceed identify the "topicalizing block" 17:07
the loop statement there doesn't really topicalize there, right?
since you're just assigning $_ manually
sena_kun I guess 17:08
it's a golf of the code that caused Cro leak, I think
timotimo oh, interesting 17:09
sena_kun I also see... 17:10
github.com/croservices/cro-websock...f64346b418 so looks like it was a bug and current thing is correct 17:11
timotimo aha
El_Che If I want to be a relocatable rakudo, I gues I need to build moarvm with --relocatable and --static? 17:17
I remember vaguely something weird about --static
vrurg El_Che: just relocatable should be enough, AFAIR
El_Che the idea is to build it on the oldest supported linux distro available and run it everywhere, hence static sound right to me 17:18
but maybe static means something completely different
(reading the Configure.pl)
"Build MoarVM as a static library instead of a shared one. 17:20
"
mm
I assume Rakudo needs a shared moarvm lib 17:21
squashable6 🍕 JJ++ wrote a comment on “deployment of docs.perl6.org”: github.com/perl6/doc/issues/2929#i...-517781101
🍕🍕🍕 First contribution by JJ++! ♥
vrurg El_Che: Actually, you should be able to carry the .so around together with the binary. 17:22
Though there're compatibility questions.
But in either case rakudo doesn't have support for static libmoar. Nor that I can see any. 17:23
chloekek Welp, I'm going to install all modules. 19:35
ugexe even Module::Uninstallable?? 19:41
vrurg ugexe: what if installation succeeds? 19:44
ugexe then it should be renamed to Module::Installable 19:45
timotimo InstallMeIDareYou 19:46
ugexe one of these days someone will slip a `rm -rf ...` into a module without anyone noticing. thats when we know we're moving up to the big leagues 19:47
timotimo it's bound to happen and we're basically completely unprepared
ugexe theres not much one can do but audit code before running it 19:48
timotimo ugh, that's the worst
ugexe if its code i wrote then you are ok. but everyone else you should make sure
timotimo haha 19:49
chloekek New favorite line to put between reports: put 「✂ 」 ~ 「- 」 x 39; 20:02
ugexe: if installation fails then it's skipped. 20:03
timotimo hah
AlexDaniel chloekek: are you reimplementing Blin? :) 20:07
chloekek What is Blin?
AlexDaniel chloekek: github.com/perl6/Blin
chloekek Nope, I'm gathering metadata for all distributions and rendering POD for all comp units. 20:08
And also integrating it with Nix, but that's mostly working now. 20:09
But I need more sandboxing, parallelism, and a beefier machine. 20:12
AlexDaniel Blin does install modules in parallel 20:16
but maybe it's something zef should learn (if it doesn't already?) 20:17
ugexe zef used to install modules in parallel like 6 years ago
chloekek I now also install them in parallel; all I had to do was s/for/hyper for/. 20:18
ugexe installation itself is single threaded
inside of rakudo
parallelizing helps when fetching and testing 20:19
AlexDaniel chloekek: IIRC this doesn't work that great when you're installing multiple modules that have same dependencies, especially when doing that with many cores 20:21
ugexe yeah, and its unlikely reproducible 20:22
at least using a naive solution
AlexDaniel it'll somewhat work though
ugexe for something like Blin its fine
you can just rerun it
but on some production system that isn't going to be welcomed
AlexDaniel Blin installs modules in the right dependency order 20:23
ugexe does it do testing with one module while installing another?
chloekek AlexDaniel: Nix takes care of ensuring consistent output, the only issue is that the parallelism isn't optimal because of locking. 20:24
If A depends on B, and you build B and A in parallel, A will wait for B to be built. But you could've been building something else on that thread, e.g. C.
ugexe even if two modules do not depend on each other installing a module while code is running can go wrong 20:25
chloekek Each module is installed to a separate directory and the installation happens in a chroot and user and network namespace. 20:26
AlexDaniel ugexe: well… if every module is installed into a different --to, is there any issue?
ugexe AlexDaniel: it depends. what happens is installing a new module *or* adding a new repo to "INC" will change the repo id 20:27
timotimo "rr record" can record whole trees of processes fwiw :D
at least i think it can
ugexe so depending on how or when you are adding those directories to PERL6LIB it might be ok
chloekek For each executable Perl 6 script a Bash script is generated that first sets PERL6LIB and then execs Rakudo with the executable. PERL6LIB is the concatenation of all transitive dependencies in some arbitrary order. 20:28
chloekek It also contains duplicates if there's diamond dependencies, need to fix that :D 20:29
AlexDaniel chloekek: yeah, sounds like Blin :)
ugexe what if the module name contains... unicode? 20:29
still waiting on some asshole to flex that feature
chloekek You mean Acme::ಠ_ಠ? 20:30
ugexe checks to make sure he isn't the asshole
chloekek Seems to work just fine.
AlexDaniel fwiw there's also module `../Foo` :) 20:31
maybe not that critical in this case but still fun
ugexe thats not a legal identifier
AlexDaniel so? 20:32
it even has tests that pass, if I'm not mistaken: github.com/AlexDaniel/foo-dotdotsl.../t/basic.t
chloekek That'll fail to build with my tooling since Nix derivations can't contain solidi in their names. :)
AlexDaniel ===> Testing: ../Foo ===> Testing [OK] for ../Foo ===> Installing: ../Foo 20:33
zef is happy to install it :)
ugexe zef treats anything starting with a `.` as a local path
$ zef install "../Foo" 20:34
The following were recognized as file paths but don't exist as such - ../Foo
AlexDaniel yeah, I did ‘zef install .’ in the repo 20:35
ugexe too bad you cant `zef uninstall .` >:) 20:41
AlexDaniel you can uninstall it just fine 20:42
`zef uninstall ../Foo` works
squashable6 🍕 JJ++ edited a review on pull request “Rewrite of regex interpolation section”: github.com/perl6/doc/pull/2927#pul...-269432204
🍕 JJ++ submitted a review on pull request “Rewrite of regex interpolation section”: github.com/perl6/doc/pull/2927#pul...-269432204
🍕 JJ++ wrote a comment on a review for “Rewrite of regex interpolation section”: github.com/perl6/doc/pull/2927#dis...r309551271
🍕 JJ++ wrote a comment on a review for “Rewrite of regex interpolation section”: github.com/perl6/doc/pull/2927#dis...r309551360
🍕 JJ++ wrote a comment on a review for “Rewrite of regex interpolation section”: github.com/perl6/doc/pull/2927#dis...r309551946
ugexe i guess since you cant install paths its ok to treat it like a name
squashable6 🍕 JJ++ wrote a comment on a review for “Rewrite of regex interpolation section”: github.com/perl6/doc/pull/2927#dis...r310290741
🍕 JJ++ wrote a comment on a review for “Rewrite of regex interpolation section”: github.com/perl6/doc/pull/2927#dis...r310290995
🍕 JJ++ wrote a comment on a review for “Rewrite of regex interpolation section”: github.com/perl6/doc/pull/2927#dis...r309554266
🍕 JJ++ wrote a comment on a review for “Rewrite of regex interpolation section”: github.com/perl6/doc/pull/2927#dis...r309551833 20:43
🍕 JJ++ wrote a comment on a review for “Rewrite of regex interpolation section”: github.com/perl6/doc/pull/2927#dis...r309554659
AlexDaniel omg
squashable6 🍕 JJ++ wrote a comment on a review for “Rewrite of regex interpolation section”: github.com/perl6/doc/pull/2927#dis...r309555077
ugexe cant *uninstall* paths rather
squashable6 🍕 uzluisf++ wrote a comment on “Proofread documentation …”: github.com/perl6/doc/issues/2924#i...-517838557
🍕🍕🍕 First contribution by uzluisf++! ♥
AlexDaniel yay, finally some actual contributions :) 20:44
uzl In the documentation (pod files), code samples are created by using either indentation or the code directives. Is there any preference for one of them? 21:04
timotimo only with the code directives can you put configuration options
AlexDaniel uzl: I think indentation goes through to the html output which is not that nice 21:05
uzl: if you're looking at some specific example, check if there's unnecessary indentation in the rendered version 21:06
uzl So would it be find to replace indentation with the code directives? Personally I prefer code directives. 21:07
AlexDaniel: I'll be in the lookout for it.
AlexDaniel yeah, that'd be an improvement 21:08
MasterDuke just noticed that (at least) one of damian's articles about the perl weekly challenge was posted on lwn.net, lwn.net/Articles/793441/ 21:29
Geth whateverable/master: 6 commits pushed by (Aleks-Daniel Jakimenko-Aleksejev)++ 21:55
AlexDaniel .seen Zoffix 21:59
tellable6 AlexDaniel, I haven't seen Zoffix around
AlexDaniel huh
.seen zoffix 22:00
tellable6 AlexDaniel, I saw zoffix 2019-01-06T17:41:14Z in #perl6: <zoffix> moritz: the project's direction and management style doesn't match my goals and I'll be happier elsewhere.
AlexDaniel okay I haven't noticed that before… 22:01
so yoleaux lowercased all nicks…
AlexDaniel ok I'll put that down, get some sleep and fix that tomorrow :) 22:02
squashable6 🍕 rba++ wrote a comment on “deployment of docs.perl6.org”: github.com/perl6/doc/issues/2929#i...-517857391 22:05
🍕🍕🍕 First contribution by MasterDuke17++! ♥ 22:10
Geth doc: 364038af3f | MasterDuke17++ (committed using GitHub Web editor) | doc/Type/StrDistance.pod6
Remove an errant `|` from a `StrDistance` example
synopsebot Link: doc.perl6.org/type/StrDistance
doc: 19a54a121d | MasterDuke17++ (committed using GitHub Web editor) | doc/Type/StrDistance.pod6
Make `before`/`after` formatting more consistent
22:14
synopsebot Link: doc.perl6.org/type/StrDistance
squashable6 🍕 MasterDuke17++ edited issue “Proofread documentation …”: github.com/perl6/doc/issues/2924
AlexDaniel fwiw anyone can tell squashable6 to be silent if there's a lot of spam 22:15
squashable6 🍕 JJ++ wrote a comment on “deployment of docs.perl6.org”: github.com/perl6/doc/issues/2929#i...-517861742 22:28
Geth doc: d92770ba99 | MasterDuke17++ (committed using GitHub Web editor) | doc/Language/performance.pod6
Update performance.pod6
22:33
synopsebot Link: doc.perl6.org/language/performance
squashable6 🍕 MasterDuke17++ edited issue “Proofread documentation …”: github.com/perl6/doc/issues/2924