»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:03 mcmillhj left 00:05 comborico1611 left 00:08 skids joined 00:14 mcmillhj joined 00:19 mcmillhj left 00:27 mcmillhj joined 00:32 mcmillhj left, xenotrope left 00:34 xenotrope joined 00:35 |oLa| left 00:40 cdg joined, isBEKaml left 00:44 cdg_ left, cdg_ joined 00:45 cdg left 00:46 mcmillhj joined, markong left 00:49 cdg_ left 00:52 mcmillhj left 01:05 mcmillhj joined 01:07 cdg joined 01:10 mcmillhj left 01:12 cdg left 01:14 avalenn joined 01:23 mcmillhj joined 01:26 squashable6 left 01:27 squashable6 joined 01:28 reportable6 left, coverable6 left, greppable6 left, reportable6 joined, statisfiable6 left, coverable6 joined, bisectable6 left, bloatable6 left, greppable6 joined, bisectable6 joined, statisfiable6 joined, bloatable6 joined, mcmillhj left
lookatme Hi 01:30
The new version rakudo 2018-01 break my perl6 script :) 01:31
01:33 Zoffix joined
Zoffix lookatme: what's the breakage? 01:33
lookatme a little wait 01:34
a script search some file 01:35
pastebin.com/hA7ZLfYi
It works fine in 2017-*
Is something change in Supply ? I am not seen the output currently, or maybe about race 01:36
01:36 mcmillhj joined
lookatme Please use like this `script.p6 .`, '.' is argument 01:38
If add -d it was print debug output correctly
without -d it seems like not execute the code which search file
Zoffix lookatme: what's the output supposed to be line? 01:40
s/line/like/;
lookatme the file found line by line 01:41
skids Does the whole thing work with the debug flag, or is the Supply still not getting values?
lookatme it will search c/c++ source file .c .cpp .etc
no
01:41 mcmillhj left
skids no which one? 01:41
lookatme In debug mode, it just print debug message ,I am not found result 01:42
the
01:43 Bonomani left
lookatme SEND FILE means it send the file to output handle above :) 01:43
Zoffix c: 2017.01 my $p; react { $p = start whenever Supply.from-list: <a b c> { .say } }; await $p 01:45
committable6 Zoffix, ¦2017.01: «a␤b␤c␤Access denied to keep/break this Promise; already vowed␤ in block <unit> at /tmp/S7GG1MzzFE line 1␤␤ «exit code = 1»»
Zoffix c: 2018.01 my $p; react { $p = start whenever Supply.from-list: <a b c> { .say } }; await $p
committable6 Zoffix, ¦2018.01: «An operation first awaited:␤ in block <unit> at /tmp/drey4_qT1g line 1␤␤Died with the exception:␤ Cannot have a 'whenever' block outside the scope of a 'supply' or 'react' block␤ in code at /tmp/drey4_qT1g line 1␤␤ «exit code = 1»»
Geth whateverable: e91df0dbfa | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
Make sure to show segfaults

Motivated by this situation:
  irclog.perlgeek.de/perl6/2018-02-05#i_15780531
Related issues: #53, #130.
Zoffix I think I was supposed to disable that for 6.c
crap
lookatme crap :? 01:46
Zoffix c: 2018.01 react { foo }; sub foo { whenever Supply.from-list: <a b c> { .say } }
committable6 Zoffix, ¦2018.01: «a␤b␤c␤»
Zoffix c: 2018.01 use v6.d.PREVIEW; react { foo }; sub foo { whenever Supply.from-list: <a b c> { .say } }
committable6 Zoffix, gist.github.com/7e5745a5f9e52dc542...8b25c34893
AlexDaniel ye it did work at least a little bit 01:47
lookatme What's wrong with the code ?
Zoffix Your whenever is not within lexical scope of the react 01:48
AlexDaniel and it did fix the module that was failing, IIRC, so not as crap as it may look
01:49 mcmillhj joined
lookatme :( sorry I am not get it 01:51
AlexDaniel lookatme: if you're interested, here's some background info: github.com/rakudo/rakudo/issues/1428
lookatme: TL;DR according to that ticket “Cannot have a 'whenever' block outside the scope” should not ever appear if you're using v6.c (currently by default)
but it just did in that particular case 01:52
m: my $p; react { $p = start whenever Supply.from-list: <a b c> { .say } }; await $p
camelia An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
Cannot have a 'whenever' block outside the scope of a 'supply' or 'react' block
in code at <tmp> line 1
Zoffix lookatme: I don't get any "send file" debug notifications
skids why "start whenever" instead of "start react"? 01:53
lookatme Hmm, IDK that usage :)
AlexDaniel yea I'm also confused, what is this supposed to do? 01:54
tbh I'm even surprised that it works at all
01:55 mcmillhj left
lookatme Oh I got it 01:55
so it is not allowed `react { }` ?
skids Though it does appear you can .emit syntactically after the start { } before the react gets installed, so you have to delay a bit. 01:56
lookatme I got it work again :)
01:56 Zoffix left
AlexDaniel lookatme: how? :) 01:57
skids probably by moving the start in front of the react block where it belongs :-)
lookatme skids, is it any solution can resolve it ? 01:58
I change the code to `start react whenever $supplier.Supply { put Q :qq '"$_"'; LAST done }`
Any suggestion ?
AlexDaniel that makes sense now 01:59
but why “LAST done”?
01:59 evalable6 left, evalable6 joined
skids Well, sleep for a few microseconds after start { } before calling .emit... but there should be a better way... The start returns a Promise... I forget whether you can check it to see if it is running yet. 01:59
lookatme exit the block safely ? 02:00
hmm, I know, thanks
xi- skids docs.perl6.org/type/Promise#method_status 02:01
AlexDaniel lookatme: pretty sure you can just remove “LAST done”
lookatme ok
skids xi-: yeah that just says whether the "thread" has finished... not when it has started. 02:03
lookatme Is it some convenient way wait the Promise status change ? :)
xi- pretty sure wait covers that 02:04
02:04 mcmillhj joined
xi- it's for supplies but I thought you could wait for a promise to be kept 02:05
lookatme But the wait, as I know, only wait the Promise kept ?
xi- or broken
lookatme it is right :?
xi- you can also wait on a supply
skids Yes but Supply does not queue, so if you send before you start to wait... you lose values. 02:06
m: await start { sleep 4 }; say now - BEGIN {now};
camelia 4.0110963
lookatme sleep 0.001 while $p.status != Planned; 02:07
xi- or you can just do something hacky like making a channel that your promise sends a message on when it did what you wanted for your calling thread to continue
lookatme I use this currently :)
skids m: start { sleep 4 }; $p.status.say; sleep 2; $p.status.say; 02:08
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$p' is not declared
at <tmp>:1
------> 3start { sleep 4 }; 7⏏5$p.status.say; sleep 2; $p.status.say;
skids m: my $p = start { sleep 4 }; $p.status.say; sleep 2; $p.status.say;
camelia Planned
Planned
skids TBH I don't work with Supplies as much as Channels, so I may be missing a known idiom. 02:09
02:09 mcmillhj left
skids wonders if you keep a Promise in the react block, after the whenever, if you are guaranteed the whenever is ready after waiting on it. 02:11
lookatme ok 02:15
I update the code 02:16
02:16 saramaebee joined
lookatme It was faster than before :) 02:16
pastebin.com/xv15LdL1
skids m: my $S = Supplier.new; my $s = $S.Supply; my $p = Promise.new; start react { whenever $s { "foo".say }; $p.keep; }; await $p; $S.emit("foo") for ^4; sleep 0.2 # Seems to work... but I'm unsure if there are tests/docs that promise it always will. 02:17
camelia foo
foo
foo
foo
saramaebee Anyone ready for more of my dumb newbie questions?
skids Sure. Shoot. 02:18
saramaebee i've got a code that functions (for once), but now im wondering how to make it iterate down. i've got for 0..100 right now (yes I know i could do ^100), but i'm hoping to make it loop down from 99, to 3. Unfortunately, 99..3 doesn't seem to work, and my (granted, it was probably bad way of asking) googling hasn't returned anything useful 02:19
02:21 mcmillhj joined
skids m: .say for 4...0' 02:21
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3.say for 4...07⏏5'
expecting any of:
infix
infix stopper
02:21 Zoffix joined
skids m: .say for 4...0 02:21
camelia 4
3
2
1
0
saramaebee oh, triple dots
skids The .. is a range which must ascend. The ... is a sequence which is... well a bt DWIMMY. 02:22
m: .say for 10,8...0
camelia 10
8
6
4
2
0
saramaebee well that was rather simple, and doesn't add too many more bytes. now, on to figuring out ternary operators. my goal is to beat the current record for this challenge
skids (You can end up infinitely looping if you don't understand how the sequence decdes to terminate) 02:23
Zoffix lookatme: `sleep 0.001 while $p.status != Planned;` in that code is kinda pointless. Promise are built as planned: github.com/rakudo/rakudo/blob/mast...ise.pm#L47
lookatme :( oh 02:24
I will try skids advice
Zoffix m: for 2e16..2e17 { .say } # can infiniloop with Ranges too 02:25
lookatme: you could just .tap the supply
camelia (timeout)2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e+16
2e…
Zoffix $supplier.Supply.tap: { put "$_" }
lookatme oh 02:26
02:26 MasterDuke joined, mcmillhj left
lookatme Zoffix, cool! 02:27
Zoffix .ask jnthn should this die with `whenever` not in scope in 6.d? `my $p; react { $p = start whenever Supply.from-list: <a b c> { .say } }; await $p` It dies right now in 6.c, so looks like I missed some case when moving that error into 6.d, but I wanted to double-check if it should be dying at all 02:28
yoleaux Zoffix: I'll pass your message to jnthn.
skids wonders if yoleaux's name has something to do with yodeling 02:31
Zoffix No, it's YOLO 02:32
(if you read it in french :))
02:33 mcmillhj joined 02:38 mcmillhj left
saramaebee hmm is there a shorter way of declaring a variable than "my"? 02:39
i'm trying to shave characters for golf
Zoffix saramaebee: depends where. 02:40
and how many of them in total
AlexDaniel m: my$x = 42; # I guess you already know about this?
camelia ( no output )
Zoffix m: no strict; \a = 42; \b = 70; say a + b
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix = instead.
Did you make a mistake in Pod syntax?
at <tmp>:1
------> 3no strict; \a =7⏏5 42; \b = 70; say a + b
Zoffix bah
skids You can use a placeholder inside a sub. Or use predecared $_.
Zoffix m: no strict; $a = 42; $b = 70; say $a + $b
camelia 112
Zoffix guess `no strict` isn't working with sigiless vars 02:41
saramaebee heres my code: for 99...1 {my $s=$_-1 <1??"e"!!"es";my $k=$_ <2??"no more"!!$_-1;put("$_ bottl$s of beer on the wall, $_ bottl$s of beer.\n Take one down and pass it around, "~$_-1~" bottl$s of beer on the wall.\n")}
Zoffix m: for 99...1 {my $s=$_-1 <1??"e"!!"es";my $k=$_ <2??"no more"!!$_-1;put("$_ bottl$s of beer on the wall, $_ bottl$s of beer.\n Take one down and pass it around, "~$_-1~" bottl$s of beer on the wall.\n")} 02:42
camelia 99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 98 bottles of beer on the wall.

98 bottles of beer on the wall, 98 bottles of beer.
Take one down and pass it around, 97 bottles of beer on the wall.
02:42 cdg joined
Zoffix m: for 99…1 {$!=$_-1 <1??"e"!!"es";my $k=$_ <2??"no more"!!$_-1;put("$_ bottl$s of beer on the wall, $_ bottl$! of beer.\n Take one down and pass it around, "~$_-1~" bottl$! of beer on the wall.\n")} 02:42
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$s' is not declared
at <tmp>:1
------> 3 $k=$_ <2??"no more"!!$_-1;put("$_ bottl7⏏5$s of beer on the wall, $_ bottl$! of be
Zoffix m: for 99…1 {$!=$_-1 <1??"e"!!"es";my $k=$_ <2??"no more"!!$_-1;put("$_ bottl$! of beer on the wall, $_ bottl$! of beer.\n Take one down and pass it around, "~$_-1~" bottl$! of beer on the wall.\n")}
camelia 99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 98 bottles of beer on the wall.

98 bottles of beer on the wall, 98 bottles of beer.
Take one down and pass it around, 97 bottles of beer on the wall.
02:43
saramaebee i changed the $s from my $s=$_-1 <1 to my $s=$_ <2
AlexDaniel saramaebee: for on the other side is better because then you don't need space: {… … …}for 99…1
saramaebee ok
Thanks :)
AlexDaniel Zoffix: what the hell is that :D 02:44
:D
saramaebee hmmm now I get an error
m: my $s=$_ <2??"e"!!"es";my $k=$_ <2??"no more"!!$_-1;put("$_ bottl$s of beer on the wall, $_ bottl$s of beer.\n Take one down and pass it around, "~$_-1~" bottl$s of beer on the wall.\n")for 99...1
camelia Use of uninitialized value of type Any in numeric context
99 bottle of beer on the wall, 99 bottle of beer.
Take one down and pass it around, 98 bottle of beer on the wall.

98 bottle of beer on the wall, 98 bottle of beer.
Take one down a…
Zoffix saramaebee: you have a bug, you never use the $k
AlexDaniel Zoffix: this is so grea :D
t
Zoffix saramaebee: but instead of `my $k` you can use `$¢` variable
AlexDaniel $! I mean
:D
saramaebee im planning on using it
just haven't finished yet 02:45
let me google $¢
Zoffix saramaebee: you won't find anything
saramaebee: there's also $/ you can use.
saramaebee whats it do then?
AlexDaniel saramaebee: oh, another potentially useful thing is sigilless vars
m: my \x = 42; say x
camelia 42
saramaebee oh that is useful 02:46
AlexDaniel can't omit the space there but then only 1 char per use, depending on context
saramaebee wait
wouldn't that render all "s" as the var then?
02:46 ilbot3 left
saramaebee doesn't work since there's "pass" 02:46
AlexDaniel no
saramaebee i could rename it to x
i guess
Zoffix saramaebee: not really sure. It contains the Cursor object or something 02:47
m: grammar { token TOP { .+ { say $¢ } } }.parse: "foo"
camelia 「foo」
02:47 cdg left
saramaebee thats a bit above my understanding rn zoffix. I don't like using things that I don't relaly understand. I just started on perl today, and i'm still fairly new to programming in general 02:47
Zoffix saramaebee: but it's one of the variables attached to each block, hence why you can use it. I just ran `perl6 --target=ast -e '{;}'` to see what they are 02:48
02:48 ChoHag left, mcmillhj joined, cdg joined
Zoffix saramaebee: and the $/ contains current Match object. and $! contains current Exception. And these three are basically variables you don't have to declare to use (like `$_` is), so it saves you some chars 02:48
AlexDaniel saramaebee: $_ <2 can be written as $_≤1 maybe 02:49
Zoffix s/each block/each comp unit/;
evalable6 Potential difficulties:
Space is not significant here; please use quotes or :s (:sigsp…
Zoffix, Full output: gist.github.com/65563607996f113e0e...9e8863857b
Zoffix evalable6: you suck
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/SD0G0eOIHh
Undeclared routines:
suck used at line 1
you used at line 1
saramaebee so i could just say $¢ = $_ <1??"thing"!!"otherthing";
and wouldnt have to declare?
AlexDaniel well, you're abusing the $¢ var, but yes 02:50
Zoffix yeah
saramaebee its golf, its meant to be abused ;)
AlexDaniel
.oO( var abuse, call the police! )
Zoffix \o 02:51
02:51 Zoffix left, evalable6 left, evalable6 joined
AlexDaniel s/each block/each comp unit/; 02:51
saramaebee: instead of \n just write the actual newline 02:52
02:53 mcmillhj left
saramaebee i've not a goddamn clue of how someone did this in 201 characters. im at 195, and i havent even implemented the "go to the store, buy some more" part 02:53
AlexDaniel well, I also don't know how they did 201 02:54
saramaebee is there a 1 character version of ==? id prefer to use it over "<2", so I can use 0 more easily
AlexDaniel 04:49:21 <AlexDaniel> saramaebee: $_ <2 can be written as $_≤1 maybe
saramaebee that'll still give me the issue of saying "0 bottle of beer on the wall" 02:55
AlexDaniel ? isn't it identical for integers?
saramaebee what do you mean?
skids m: (("","on the wall, ") X~ "99 bottles of beer").print
camelia 99 bottles of beer on the wall, 99 bottles of beer
AlexDaniel $_ <2 and $_≤1 will act exactly the same 02:56
saramaebee yes
AlexDaniel (but the latter has no space)
saramaebee and even with $_ <2, i have the issue of it saying 0 bottle of beer on the wall
if there were a 1 character way of typing ==, it'd be preferrable
AlexDaniel what about writing != as ≠ ? 02:57
saramaebee ahh so i could reverse the ternary
lemme try
02:57 ilbot3 joined, ChanServ sets mode: +v ilbot3
saramaebee well this is interesting 02:58
m: {$¢=$_≠1??"es"!!"e";put("$_ bottl$¢ of beer on the wall, $_ bottl$¢ of beer.\n Take one down and pass it around, "~$_-1~" bottl$¢ of beer on the wall.\n")}for 2...1 02:59
camelia 2 bottles of beer on the wall, 2 bottles of beer.
Take one down and pass it around, 1 bottles of beer on the wall.

1 bottle of beer on the wall, 1 bottle of beer.
Take one down and pass it around, 0 bottle of beer on the wall.
AlexDaniel skids: that's pretty cool, but it'll fail on “No more” because of the capitalization :)
skids m: ("bottles" xx 99, "bottle", "No more")[1].say
camelia bottle
saramaebee well, i've still got the issue off "1 bottles" and "0 bottle" 03:00
for some reason
it shouldn't
also code-golf doesn't accept NL character :/
it just prints it 03:01
AlexDaniel saramaebee: ye but just put an actual newline into it
saramaebee OH
thats smart
AlexDaniel Don't know why but it took me a while to figure that one XD 03:02
Juerd "es" and "e" both contain an e. Why not move that to bottl?
saramaebee ohh, i think i know why i'm having the issue
ahh, i didn't even think of just having !! be blank "" 03:03
AlexDaniel Juerd: in that code “bottle” is written three times, so that's a win
saramaebee hey wait
i think i just thought of how to shave characters
AlexDaniel Juerd: but then, why not just write ‘bottle’ in full there :) 03:04
03:05 mcmillhj joined
saramaebee i'm already using $centsign, what's another variable I can abuse? I tried $/ but it said "unsupported use" 03:05
Juerd What is $¢ anyway? :)
saramaebee a variable that I don't need "my" for 03:06
thats all i know about it
Juerd Haha
saramaebee even with "my" and a space, shaved it down to 165 03:07
just need to figure out an abusable variable to get it lower
Juerd {$_-1} is shorter than "~$_-1~"
saramaebee can I do that?
ooo
AlexDaniel saramaebee: fwiw if you're looking for more hints: perl6advent.wordpress.com/2017/12/...erl6-golf/
03:08 MasterDuke left
saramaebee thanks :D 03:08
03:10 mcmillhj left 03:16 mcmillhj joined 03:17 MasterDuke joined
saramaebee i need help abusing variables :p i get an error if i use $/, but im already using $centsign and $!, which means im out of variables 03:18
03:21 mcmillhj left
AlexDaniel these are the only ones doc-ed: docs.perl6.org/language/variables#..._variables 03:21
Juerd m: $¢=->$a {"$a bottle{$a≠1??"s"!!""} of beer"};put "$¢($_) on the wall, $¢($_).\nTake one down and pass it around, $¢($_-1) on the wall.\n"for 4...1 03:22
camelia 4 bottles of beer on the wall, 4 bottles of beer.
Take one down and pass it around, 3 bottles of beer on the wall.

3 bottles of beer on the wall, 3 bottles of beer.
Take one down and pass it around, 2 bottles of beer on the wall.

2 bottl…
03:22 colomon_ joined
Juerd m: $¢=->$a {"$a bottle{$a≠1??"s"!!""} of beer"};put "$¢($_) on the wall, $¢($_).\nTake one down and pass it around, $¢($_-1) on the wall.\n"for 2...1 03:22
camelia 2 bottles of beer on the wall, 2 bottles of beer.
Take one down and pass it around, 1 bottle of beer on the wall.

1 bottle of beer on the wall, 1 bottle of beer.
Take one down and pass it around, 0 bottles of beer on the wall.
saramaebee ooh wait howd you do it to work for 0? i've been stuck on that 03:24
03:24 colomon left, colomon_ is now known as colomon
Juerd 0 is not 1. It comes naturally. 03:26
saramaebee yea, just the way i was doing it was calculating based on the iteration, so it was doing it as bottle for all the "1 bottle of beer on the wall" line 03:29
Juerd I'm assigning a function to $¢ that takes either $_ or $_-1
saramaebee ahh, i got it 03:31
you're using $a
and calculating based on that
Juerd Cool, "{$a≠1??"s"!!""}" can be shortened to "{"s"if $a≠1}", which is also more readable
03:34 mcmillhj joined
AlexDaniel what about $a x($a≠1) 03:34
oops
‘s’x($a≠1)
not sure if that works by try it maybe 03:35
Juerd Works
But isn't shorter
saramaebee hmm, how could one make it replace 0 with "no more" 03:37
AlexDaniel ||‘no more’
say 0||‘no more’
evalable6 no more
AlexDaniel say 1||‘no more’
evalable6 1
skids m: my @a = ((4...1,"No more") X~ " bottle") X~ "s of beer"; @a[*-2] ~~ s/s //; say @a.join("\nTake one down, pass it around\n"); say "Go to the store, buy some more!" 03:38
camelia 4 bottles of beer
Take one down, pass it around
3 bottles of beer
Take one down, pass it around
2 bottles of beer
Take one down, pass it around
1 bottle of beer
Take one down, pass it around
No more bottles of beer
Go to the store, b…
skids dynamic programming ftw
saramaebee borrowing a bit of code from Juerd, modified, i've gotten this:
m: my $c="of beer";$!=" on the wall";my $x="no more" $¢=->$a {"$a bottle{"s"if $a≠1} $c"};put "$¢($_)$!, $¢($_). Take one down and pass it around, $¢($_-1)$!. "for 2...1;
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3 beer";$!=" on the wall";my $x="no more"7⏏5 $¢=->$a {"$a bottle{"s"if $a≠1} $c"};pu
expecting any of:
infix
infix stopper
saramaebee oops
m: my $c="of beer";$!=" on the wall";my $x="no more";$¢=->$a {"$a bottle{"s"if $a≠1} $c"};put "$¢($_)$!, $¢($_). Take one down and pass it around, $¢($_-1)$!. "for 99...1;
camelia 99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it around, 98 bottles of beer on the wall.
98 bottles of beer on the wall, 98 bottles of beer. Take one down and pass it around, 97 bottles of beer on the wall.
97 bottle…
saramaebee goddamnit 03:39
03:39 mcmillhj left
saramaebee my $c="of beer";$!=" on the wall";my $x="no more";$¢=->$a {"$a bottle{"s"if $a≠1} $c"};put "$¢($_)$!, $¢($_). Take one down and pass it around, $¢($_-1)$!. "for 2...1; 03:39
evalable6 2 bottles of beer on the wall, 2 bottles of beer. Take one down and pass it around, 1 bott…
Juerd saramaebee: No need for that.
evalable6 saramaebee, Full output: gist.github.com/2c9ab4632c7976f2a8...1fbafbf102
saramaebee no need for what? 03:40
Juerd skids: Very nice!
skids Still need to work in the "on the wall"
Juerd That's a matter of a simple .map, right? 03:41
saramaebee the way i did it was: my $i = "of beer"; my $j = "$i on the wall";
then use whichever applies for that situation 03:42
buggable New CPAN upload: PowerNap-0.0.1.tar.gz by SAMGWISE cpan.metacpan.org/authors/id/S/SA/...0.1.tar.gz
saramaebee but i'm not sure if thatd work for yours, mostly cause im having trouble understanding it haha
03:44 mcmillhj joined
Juerd afk # z 03:45
skids m: my @a = (2...1,"No more") X~ " bottles of beer"; @a[*-2] ~~ s/s //; say (@a Z "on the wall," xx * Z @a).join("\nTake one down, pass it around\n"); say "Go to the store, buy some more!" # 187 chars with 99
camelia 2 bottles of beer on the wall, 2 bottles of beer
Take one down, pass it around
1 bottle of beer on the wall, 1 bottle of beer
Take one down, pass it around
No more bottles of beer on the wall, No more bottles of beer
Go to the store, buy som…
saramaebee nice! 03:46
skids I'm sure some more can be shaven. 03:47
oh the second No more has to be lc. That's what AlexDaniel meant. 03:48
03:49 konsolebox left, mcmillhj left
skids m: my @a = (2...1,"No more") X~ " bottles of beer"; @a[*-2] ~~ s/s //; say (@a Z "on the wall," xx * Z @a».lc).join("\nTake one down, pass it around\n"); say "Go to the store, buy some more!" # that cost 4 more chars, or 5 depending on » vs >> 03:50
camelia 2 bottles of beer on the wall, 2 bottles of beer
Take one down, pass it around
1 bottle of beer on the wall, 1 bottle of beer
Take one down, pass it around
No more bottles of beer on the wall, no more bottles of beer
Go to the store, buy som…
03:52 konsolebox joined
saramaebee if you were to submit it, it wouldn't pass. you're missing a phrase haha (should be x bottles of beer on the wall, x bottles of beer. take one down and pass it around, x bottles of beer on the wall" repeated 03:59
03:59 mcmillhj joined
AlexDaniel huggable: clog 04:00
huggable AlexDaniel, nothing found
AlexDaniel huggable: ircclog
huggable AlexDaniel, nothing found
AlexDaniel huggable: irclog
huggable AlexDaniel, nothing found
AlexDaniel huggable: log
huggable AlexDaniel, Comes out 2.41x faster than core .log10 and can handle Ints larger than 1.8e308: gist.github.com/zoffixznet/2539e8b...43e173fe8f
AlexDaniel huggable: irc
huggable AlexDaniel, nothing found
AlexDaniel grrrrrrrr 04:01
saramaebee my solution definitely won't make top 10 haha
Geth whateverable: 3f0ba37797 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
Fixes for ‘ m:’ with leading space

See this comment:
  github.com/perl6/whateverable/issu...-362818980
04:02
whateverable: 440a6c4834 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
Ignore s/…/…/ and possibly some other things

To prevent misdetection like here:
  colabti.org/irclogger/irclogger_log...02-06#l249
04:05 mcmillhj left 04:19 mcmillhj joined 04:24 AlexDaniel left 04:25 mcmillhj left 04:28 japhb left, saramaebee left 04:29 cdg left, japhb joined, cdg joined 04:34 cdg left 04:37 Cabanossi left 04:39 mcmillhj joined 04:40 Cabanossi joined 04:44 mcmillhj left 04:45 vike left 04:48 vike joined 04:50 skids left 04:51 shinobi-cl joined 04:53 mcmillhj joined 04:59 mcmillhj left 05:03 xtreak joined 05:09 eliasr left 05:14 bwisti left, mcmillhj joined 05:19 mcmillhj left 05:22 khw left 05:26 mcmillhj joined 05:32 mcmillhj left 05:36 troys left 05:38 mcmillhj joined 05:43 mcmillhj left 05:51 mcmillhj joined 05:56 mcmillhj left 06:02 curan joined 06:06 mcmillhj joined, R0b0t1 left 06:07 R0b0t1 joined, konsolebox left 06:08 konsolebox joined 06:10 obra left 06:11 obra joined, mcmillhj left
shinobi-cl gfldex: i did some of the changes you suggested . thanks for the advice. 06:17
06:23 mcmillhj joined 06:28 mcmillhj left 06:38 a3r0 joined 06:39 mcmillhj joined 06:43 wamba joined, konsolebox left 06:45 mcmillhj left, konsolebox joined 06:50 |oLa| joined 06:54 mcmillhj joined 07:00 mcmillhj left 07:10 someuser joined 07:13 domidumont joined, mcmillhj joined 07:17 domidumont left 07:18 mcmillhj left, domidumont joined 07:24 shinobi-cl left 07:28 mcmillhj joined 07:33 mcmillhj left 07:34 darutoko joined 07:39 espadrine_ left 07:45 mcmillhj joined 07:47 wamba left 07:48 wamba joined 07:50 amalia___ joined 07:51 mcmillhj left 07:58 mcmillhj joined 08:04 mcmillhj left 08:05 |oLa| left 08:09 xtreak left 08:11 mcmillhj joined, committable6 left, committable6 joined, ChanServ sets mode: +v committable6 08:17 mcmillhj left, ufobat joined 08:24 mcmillhj joined 08:29 mcmillhj left 08:35 rindolf joined 08:36 mcmillhj joined 08:39 wamba left 08:41 mcmillhj left, dakkar joined 08:51 xtreak joined 08:54 mcmillhj joined 09:00 mcmillhj left 09:03 someuser left 09:07 zakharyas joined 09:08 mcmillhj joined 09:11 leont joined 09:12 scimon joined 09:13 mcmillhj left 09:15 wamba joined 09:24 mcmillhj joined 09:29 mcmillhj left 09:32 as_ joined 09:34 TEttinger left 09:36 someuser joined 09:42 as_ left 09:44 mcmillhj joined 09:49 mcmillhj left 09:55 mcmillhj joined 09:56 leont_ joined 09:57 leont left 10:00 mcmillhj left 10:07 leont_ left 10:08 mcmillhj joined 10:13 lowbro joined, mcmillhj left, lowbro left, lowbro joined 10:14 rindolf left 10:15 aindilis left, pegna_nieto joined, vike left, aindilis joined 10:20 vike joined 10:21 rindolf joined 10:26 mcmillhj joined 10:28 zakharyas left, zakharyas1 joined, japhb left 10:30 japhb joined 10:32 mcmillhj left 10:38 markong joined 10:46 mcmillhj joined, someuser left 10:51 mcmillhj left 10:58 Actualeyes left 11:04 mcmillhj joined 11:09 mcmillhj left 11:11 zakharyas joined 11:12 zakharyas1 left 11:16 mcmillhj joined 11:17 someuser joined 11:22 mcmillhj left 11:27 AlexDaniel joined 11:30 cdg joined 11:33 amalia___ left 11:34 mcmillhj joined 11:35 cdg left 11:40 mcmillhj left, xtreak left 11:44 xtreak joined 11:49 mcmillhj joined
pegna_nieto Hello, I need some help. I use Proc::Async to monitor something on CLI using dynamically created supplies to react to its output. however I create a new Proc::Async object whenever I create a supply which generates the same output multiple times pastebin.com/FeVPc8G5 11:50
11:53 konsolebox left, konsolebox joined 11:54 mcmillhj left 11:55 someuser left 11:57 eliasr joined
jnthn pegna_nieto: Should the lifetime of the CLI app just be the lifetime of the application? If so, just start at startup and call .publish on the stdout/stderr supplies. Supply gets you a supply where everyone tapping it shares the same source data. 11:59
yoleaux 5 Feb 2018 20:32Z <AlexDaniel> jnthn: fwiw you may be interested in this: github.com/rakudo/rakudo/issues/1483
02:28Z <Zoffix> jnthn: should this die with `whenever` not in scope in 6.d? `my $p; react { $p = start whenever Supply.from-list: <a b c> { .say } }; await $p` It dies right now in 6.c, so looks like I missed some case when moving that error into 6.d, but I wanted to double-check if it should be dying at all
jnthn m: my $p; react { $p = start whenever Supply.from-list: <a b c> { .say } }; await $p 12:01
camelia An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
Cannot have a 'whenever' block outside the scope of a 'supply' or 'react' block
in code at <tmp> line 1
jnthn .tell Zoffix Note that this is the runtime form of the error, not the compile time one that was added more recently. 12:02
yoleaux jnthn: I'll pass your message to Zoffix.
jnthn lunch & 12:03
12:06 mcmillhj joined 12:09 sena_kun joined, lowbro left 12:12 mcmillhj left 12:13 xtreak left, bob777 joined, bob777 left 12:15 parisba left, parisba joined, lumimies left 12:16 lumimies joined, Wenjie joined 12:22 mcmillhj joined
pegna_nieto jnthn: call .publish? I didn't find this method in docs.perl6.org 12:26
12:26 mrsolo left, mrsolo joined, mrsolo left 12:27 mrsolo joined, mcmillhj left 12:32 wamba left 12:35 konsolebox left 12:36 konsolebox joined 12:38 Zoffix joined
jkramer Can I use the hyper-sub-syntax thing (>>.&some-sub) with methods as well somehow? Like >>.&Class.new or something like that? 12:39
Zoffix jkramer: You can use Class>>.new
not sure what >>.&Class.new would mean 12:40
jnthn: so should it remain as is in 6.c? Note that it used to work in 2017.01
12:40 mcmillhj joined
Zoffix c: 2017.12 my $p; react { $p = start whenever Supply.from-list: <a b c> { .say } }; await $p 12:40
committable6 Zoffix, ¦2017.12: «a␤b␤c␤»
jkramer Zoffix: I mean as shortcut/sugar for .map({ Class.new($_) }) 12:41
Zoffix I mean 2017.12
jkramer Or >>.&{Class.new($_)}
Well I guess I just answered my question :D
Zoffix That should work 12:42
jkramer: but it's not a desugar. >> cares about nodality and is also a hint to the compiler that it can autothread that construct
(nodality doesn't matter in this case though, since the callable isn't nodal)
And at least currently, that might be slower than just .map 12:43
m: eager (^100000).map(* + rand); say now - INIT now 12:44
camelia 0.0836187
Zoffix m: eager (^1000000).map(* + rand); say now - INIT now
camelia 0.72326964
Zoffix m: eager (^1000000)>>.&(* + rand); say now - INIT now
camelia 4.698146
Zoffix m: say 4.698/.723 12:45
camelia 6.497925
12:45 mcmillhj left
Zoffix 6.5x slower; though there are some work-in-progress patches to improve that 12:46
c: 2018.01 eager (^1000000)>>.&(* + rand); say now - INIT now 12:48
committable6 Zoffix, ¦2018.01: «4.8202571␤»
Zoffix c: 2018.01 eager (^1000000).map(* + rand); say now - INIT now
committable6 Zoffix, ¦2018.01: «0.6866284␤»
Zoffix Even slower on 2018.01, 'cause it ain't got the .& call optimization
12:50 dakkar left 12:51 dakkar joined 12:56 mcmillhj joined 12:57 Zoffix left 12:58 shinobi-cl joined 13:01 mcmillhj left
jnthn .tell Zoffix It's never been spec'd either way so far. I'm curious when the behavior changed, though. Can probably use the bissect bot, but I'm a bit busy with other stuff at the moment. 13:05
yoleaux jnthn: I'll pass your message to Zoffix.
jnthn pegna_nieto: d'oh, it's called share, not publish :) 13:06
It just does this: github.com/rakudo/rakudo/blob/mast...y.pm#L1503
And doc'd at docs.perl6.org/routine/share 13:07
13:09 someuser joined 13:12 shinobi-cl left, zakharyas left
pegna_nieto That's what we were missing, thanks! 13:13
jkramer m: dd 'foo bar baz'.split(' ', :limit(2)) 13:15
camelia ("foo", "bar", "baz").Seq
jkramer m: dd 'foo bar baz'.split(' ', :limit(1))
camelia ("foo", "bar", "baz").Seq
13:16 mcmillhj joined
timotimo committable6: releases dd 'foo bar baz'.split(' ', :limit(1)) 13:16
committable6 timotimo, gist.github.com/4875e79e0d7d5f7329...ae2841eea5
jkramer I assume :limit is supposed to do the same as limit in p5 split? If so it doesn't seem to work. Also the parameter is completely undocumented in the split docs, besides being mentioned in the method prototype
timotimo looks like it never worked. does it even actually have the parameter? 13:17
there's a candidate that doesn't take limit, maybe that's the one that gets chosen for Some Reason™ 13:18
jkramer It's mentioned in the prototype and I had a look at the rakudo source, something's being done with the parameter...
timotimo s: "foo bar baz", "split", \(" ", :limit(1))
SourceBaby timotimo, Sauce is at github.com/rakudo/rakudo/blob/0bf7...r.pm#L1490
jkramer I mean signature, not prototype
jnthn m: dd 'foo bar baz'.split(' ', 2)
camelia ("foo", "bar baz").Seq
jnthn It's an optional positional param, not a named one
timotimo oh, haha
tired me didn't see the lack of : there
jkramer Ohhh
timotimo okay, i'll be AFK for most of the day now 13:19
jkramer Thanks :)
13:20 mcmillhj left 13:29 mcmillhj joined 13:33 wamba joined, dakkar left, dakkar joined, dakkar left 13:34 dakkar joined, mcmillhj left 13:38 konsolebox left 13:39 konsolebox joined 13:42 mcmillhj joined 13:48 mcmillhj left 13:50 mcmillhj joined 13:52 wamba left 13:53 cdg joined
jkramer Some time ago someone here came up with a nice way to classify directly into two arrays, but I don't remember the exact syntax. Can someone help? 13:53
m: (:True(my @ok), :False(my @nö)) = <foo bar baz>.classify(*.contains('bar'))
camelia Cannot modify an immutable Pair (True => [])
in block <unit> at <tmp> line 1
13:53 cdg left, cdg joined 13:55 nige left 13:57 xi- left 13:58 xi- joined 14:00 nige joined 14:07 pegna_nieto is now known as jc_denton_, jc_denton_ left
jkramer Nevermind, found it :) 14:07
jast for the logfile: 14:15
hmm, actually I'm only getting it half right, so I'd better not put my code here 14:18
14:30 japhb left 14:31 nige left, smash_ is now known as smash 14:32 japhb joined 14:35 dakkar left 14:36 curan left, dakkar joined 14:40 skids joined 14:41 japhb left 14:42 japhb joined 14:44 zakharyas joined
tyil tfw I still get "Missing serialize REPR function for REPR VMException (BOOTException)" when trying to install IRC::Client::Plugin::UrlTitle with zef 14:45
14:45 zakharyas left
tyil I've reinstalled perl 6 as per the guide given by zoffix (so without rakudobrew) 14:45
14:46 zakharyas joined
tyil and idk how to properly start troubleshooting this particular error, as the module itself seems to work Just Fine™ when I load it with -I 14:46
14:52 Zoffix joined
Zoffix tyil: run perl6 with --ll-exception 14:53
tyil: if it crashes *during install*, the `cd $(mktemp -d) && git clone github.com/ugexe/zef . && perl6 --ll-exception -Ilib bin/zef install ../path-to-module/dir` 14:54
tyil: that should give you bigger stacktrace
tyil Zoffix: alright, I'll test that out on the train, I'm gonna move myself to amsterdam in a couple minutes to attend the perl monger meetup 14:55
I should have ~ 2 hours to try it while traveling
Zoffix jkramer: well, so what was it?
tyil if I can't figure it out still, I'll come back here again
(while dropping rakudobrew I optimized the scriptkitties/perl6 image as well, which is now less than half the size it was before) 14:56
Zoffix m: my (:True(@ok), :False(@nö)) := <foo bar baz>.classify(*.contains: "bar"); dd [ @ok, @nö ] 14:57
camelia [["bar"], ["foo", "baz"]]
jast ohh, right, binding. I used destructuring but without binding, so that didn't do anything useful 15:00
15:00 Wenjie left
Zoffix m: my (@no, @yes) := <foo bar baz>.classify(+*.contains: "bar"){0,1}; dd [ @no, @yes ] 15:00
camelia [["foo", "baz"], ["bar"]]
15:01 jnap_ joined, abraxxa1 joined 15:03 abraxxa left 15:04 Zoffix left 15:09 zakharyas left
SmokeMachine m: grammar G {}; class C {}; G.parse: "", :action(C) # the correct is actions, shouldn't it die? 15:10
camelia No such method 'TOP' for invocant of type 'G'
in block <unit> at <tmp> line 1
SmokeMachine m: grammar G {token TOP {}}; class C {method TOP {}}; G.parse: "", :action(C) # the correct is actions, shouldn't it die?
camelia 5===SORRY!5=== Error while compiling <tmp>
Null regex not allowed
at <tmp>:1
------> 3grammar G {token TOP {7⏏5}}; class C {method TOP {}}; G.parse: ""
15:10 zakharyas joined
SmokeMachine m: grammar G {token TOP {\w*}}; class C {method TOP {}}; G.parse: "", :action(C) # the correct is actions, shouldn't it die? 15:10
camelia ( no output )
SmokeMachine m: grammar G {token TOP {\w*}}; class C {method TOP {say "here"}}; G.parse: "", :action(C) # the correct is actions, shouldn't it die?
camelia ( no output )
SmokeMachine m: grammar G {token TOP {\w*}}; class C {method TOP {say "here"}}; G.parse: "", :actions(C) 15:11
camelia Too many positionals passed; expected 1 argument but got 2
in method TOP at <tmp> line 1
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
SmokeMachine m: grammar G {token TOP {\w*}}; class C {method TOP(|) {say "here"}}; G.parse: "", :actions(C)
camelia here
15:23 wamba joined 15:25 AlexDaniel left 15:28 mingdao left, mingdao joined 15:32 itaylor57 joined 15:37 PotatoGim joined
jkramer Zoffix: Yeah, like that :) 15:45
15:47 tbrowder joined 15:50 nige joined 15:51 rightfold joined 15:53 Zoffix joined
Zoffix AlexDaniel`: it just occured to me... R#1481 shouldn't be stopping you from anything. Just use a block instead of a thunk for `where`: `sub foo($x where {?/{dd $x}./}) 15:54
synopsebot R#1481 [open]: github.com/rakudo/rakudo/issues/1481 `where` with regex miscopes QAST::Blocks inside the regex
tyil okay, output of the zef installation with --ll-exception for more debug output: p.tyil.nl/f7cu 15:55
15:57 nige left
Zoffix tyil: where's the source of the module again? 15:57
tyil github.com/scriptkitties/perl6-IRC...n-UrlTitle 15:58
Zoffix tyil: and what command did you use to produce that stacktrace?
tyil perl6 --ll-exception -Ilib bin/zef install IRC::Client::Plugin::UrlTitle
(after cloning zef from github)
buggable New CPAN upload: cro-core-0.7.3.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.3.tar.gz 16:02
New CPAN upload: cro-0.7.3.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.3.tar.gz
New CPAN upload: cro-http-0.7.3.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.3.tar.gz
New CPAN upload: cro-tls-0.7.3.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.3.tar.gz
New CPAN upload: cro-websocket-0.7.3.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.3.tar.gz
New CPAN upload: cro-zeromq-0.7.3.tar.gz by JNTHN cpan.metacpan.org/authors/id/J/JN/...7.3.tar.gz
tyil cro got updated I think 16:03
Zoffix tyil: well, I'm now on a different box. This one got 2018.01. Can't reproduce the problem
My rakudo's in ~/rakudo tho. Not in /usr/local/share/perl6 16:05
tyil tfw I have it on my laptop, desktop and docker image, and samcv said she also encountered the same
Zoffix tyil: and you said it works fine if you do `zef install .` ? 16:07
from local files
tyil no, that fails too, it works fine if I use the module through -I 16:08
Zoffix tyil: start ripping out code until it stops failing then. Removing that empty `resources` key in META file could be the start
tyil so perl6 -I urltitle/lib app.pl6
Zoffix "authors" keys is supposed to be an array too
tyil alright, I'll start working through that 16:09
alright, it works if I remove the entire class :p 16:13
16:14 wamba left
Zoffix try installing it to a custom dir... . `mkdir foo; perl6 --ll-exception -Ilib bin/zef --install-to=inst#$(pwd)/foo install IRC::Client::Plugin::UrlTitle` 16:15
tyil if I stick to just the class definition, with an empty body, it fails p.tyil.nl/jmf3
16:15 domidumont left
Zoffix tyil: does it still fail if you golf it further? Like remove IRC::Client and the does Plugin thing 16:15
tyil that seems to work 16:16
so just a class IRC::Client::Plugin::UrlTitle { }
16:17 troys joined
Zoffix Does `use IRC::Client; class IRC::Client::Plugin::UrlTitle { }` work? Also, does this work: `use IRC::Client; class IRC::Client::Plugin::UrlTitle { also does IRC::Client::Plugin; }` 16:18
tyil first one works
Zoffix eco: IRC::Client::Plugin 16:19
buggable Zoffix, Found 5 results: IRC::Client::Plugin::UserPoints, IRC::Client::Plugin::Factoid, IRC::Client::Plugin::Github, IRC::Client::Plugin::NickServ, IRC::Client::Plugin::UrlTitle. See modules.perl6.org/s/IRC%3A%3AClient%3A%3APlugin
tyil 2nd one fails
Zoffix tyil: does `zef install IRC::Client::Plugin::Factoid` succeed or does it fail similarly?
(note: that'll install DBIish 16:20
)
tyil: or try IRC::Client::Plugin::Github
That one too has `does IRC::Client::Plugin`
tyil deps are being searched, might take a couple minutes 16:22
Zoffix What if you do: `use IRC::Client; my class Foo does IRC::Client::Plugin {}; class IRC::Client::Plugin::UrlTitle { }` (without adding the Foo into provides) 16:23
If that works, you could work-around the bug, but returning Foo.new.NEXT over here: github.com/scriptkitties/perl6-IRC...le.pm6#L40
s/but/by/;
16:25 zakharyas left 16:26 zakharyas joined
tyil that part fails like the rest, tests for IRC::client::Plugin::Github are still being ran 16:27
Zoffix tyil: you said this stuff fails in docker too right? How do I get this docker
tyil docker run -it scriptkitties/perl6:latest bash
Zoffix -bash: docker: command not found 16:28
I'm a n00b.
tyil I can give you an account on my server which has docker available
Zoffix OK. My key is this: github.com/zoffixznet.keys 16:29
tyil ok, can you try logging in to [email@hidden.address] 16:31
also, IRC::Client::Plugin::Github installed fine
Zoffix it just sits there. Doesn't log in or error out 16:32
Zoffix starts following docs.docker.com/install/linux/dock...repository
jast just using a ready-made docker container is fairly straightforward 16:34
the fun stuff starts when you have to establish links between various containers, build your own container, etc. fortunately you won't be needing any of that now. :)
Zoffix "docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post %2Fvar%2Frun%2Fdocker.sock/v1.35/co...rs/create: dial unix /var/run/docker.sock: connect: permission denied." 16:35
tyil tbh I had some fun getting that image to work properly
Zoffix When I tried `docker run -it scriptkitties/perl6:latest bash`
oh, it needs sudo?
jast you need to add your local user account to the docker group, or run the command as root
tyil did you start docker and added yourself to the docker group?
Zoffix ah, OK. Thanks 16:36
jast also there's a docker package in debian's official repos, too :)
tyil usermod -aG docker zoffix && exec $SHELL
ecocode p6: say 0 x 5;
camelia 00000
tyil or exec su - $USER
Zoffix Thanks.
tyil: it says zef ain't found and git either. How do I get the stuff to repro the bug? 16:37
I never used docker before. Can I damage anything or is this a temporary image that will go away? 16:38
jast it's temporary
tyil source /etc/profile.d/perl6
to get zef to work
jast side note, scriptkitties/perl6 isn't an official image, 'rakudo-star' is 16:39
tyil you'll need to apt install libssl-dev for some of the deps
jast: I know, it's the one I made
Zoffix ===> Searching for: IRC::Client::Plugin::UrlTitle
Segmentation fault (core dumped)
jast right :)
Zoffix fun :)
16:40 natrys joined
tyil I'm trying to get better at docker while also getting better at perl 6, but I seem to be failing at both ;~; 16:40
it's bothering me tho, IRC::Client::Plugin::Github and IRC::Client::Plugin::NickServ just worked when I worked on those 16:42
so I have no clue why this isnt
16:43 wamba joined
ecocode p6: say '10' cmp 10; 16:43
camelia Same
ecocode p6: say 10 cmp '10';
camelia Same
Zoffix (still installing deps) 16:45
ecocode p6: say Nil cmp Nil; 16:46
camelia Same
ecocode p6: say Nil cmp +0; 16:47
camelia Use of Nil in string context
Less
in block <unit> at <tmp> line 1
ecocode p6: say +0 cmp Nil;
camelia Use of Nil in string context
More
in block <unit> at <tmp> line 1
Zoffix wonder if that case should be silent 16:49
s: &infix:<cmp>, \(0, Nil)
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/0bf7...der.pm#L15
Zoffix and Nil cmp Nil is missing decont 16:50
m: say Nil cmp $ = Nil
camelia Use of Nil in string context
in block <unit> at <tmp> line 1
Use of uninitialized value $ of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block <unit> at <tmp> li…
Geth ecosystem: 6600cbbc9d | Altai-man++ (committed using GitHub Web editor) | META.list
Add Cro::HTTP::Session::Redis
16:51
ecocode is cmp always commutative ?
Zoffix R#1488 16:52
synopsebot R#1488 [open]: github.com/rakudo/rakudo/issues/1488 [LHF] multi sub infix:<cmp>(\a, \b) is missing decont
Zoffix ecocode: I think so
tyil: success! I reproed the bug :D 16:53
tyil :D
I gotta afk for a bit, I gotta switch train 16:54
I should be back in about 20 min at the amsterdam perl mongers
ecocode How is automatic type casting handled ? If I cmp '42' with +42, will that be Integer comparison or String comparison ?
16:56 japhb left
[Coke] cmp controls that. 16:56
m: say 0 <=> "what?" 16:57
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5what?' (indicated by ⏏)
in block <unit> at <tmp> line 1
[Coke] m: say 0 <=> 4
camelia Less
Zoffix ecocode: looking at the code, I see that will be converted to Str and then checked as strings. Not sure about more precise definition of how that op behaves
16:57 khw joined
[Coke] <=> is the numeric operator. 16:57
16:58 japhb joined, abraxxa1 left
ecocode p6: say 0 cmp 4; # should act as <=> 17:00
camelia Less
ecocode p6: say '0' <=> 4; 17:01
camelia Less
ecocode hmm... I'd expect an error there
Zoffix '0' gets coerced to numeric
ecocode but that seems to be the Perl6 way of life
p6: say '00' cmp 4; 17:02
camelia Less
ecocode p6: say '00' leg 4; 17:03
camelia Less
ecocode p6: say '11' leg 4;
camelia Less
ecocode p6: say '55' leg 4;
camelia More
ecocode p6: say '11' cmp 4; 17:04
camelia Less
ecocode p6: say '11' <=> 4;
camelia More
jnthn If you know you want numeric semantics, use <=>. If you know you want string semantics, use leg. If you want snapshot-equivalence semantics, use eqv. If you have no idea, cmp will Do The Right Thing on consistent types, and fall back on stringification otherwise 17:05
ecocode jnthn: got it. thx. 17:06
what is the difference between === and =:= ? 17:09
Zoffix === checks object identity, =:= checks container identity 17:10
m: my $z = 42; my $y = 42; say $z === $y; say $z =:= $y
camelia True
False
Zoffix m: my $z = 42; my $y := $z; say $z === $y; say $z =:= $y
camelia True
True
Zoffix Article about containers: perl6advent.wordpress.com/2017/12/02/ 17:11
ecocode ok 17:13
p6:my $x=10; my $y='10';say $x===$y 17:14
Zoffix p6: my $x=10; my $y='10';say $x===$y
camelia False
ecocode so that is without coerce 17:15
Zoffix right 17:16
ecocode so === is doing leg with Strings and <=> with Numbers. Right?
This miriad of comparison functions in perl6 is confusing me :) 17:17
Zoffix No, it just checks for object identity and returns True if objects are the same or False if they are not. The leg/<=> return one of Order enumerations, indicating order
ecocode oh yes! 17:18
Zoffix ecocode: There's this slightly-outdated Periodic Table of Perl 6 operators: glyphic.s3.amazonaws.com/ozone/mark...300dpi.jpg 17:19
ecocode that is awesome ! 17:22
glyphic.s3.amazonaws.com/ozone/mark...300dpi.jpg 17:23
oops... wrong paste
17:24 mcmillhj left, mcmillhj joined 17:25 mempko joined 17:26 domidumont joined
ecocode p6: my @a=(1,2);my @b=(1,2);say @a X @b; 17:26
camelia ((1 1) (1 2) (2 1) (2 2))
ecocode p6: say 1...4 17:28
camelia (1 2 3 4)
17:29 dakkar left, mcmillhj left 17:30 scimon left 17:33 zakharyas left, dakkar joined 17:34 zakharyas joined, samcv left
Zoffix eyes samcv's mask 17:34
want! :) 17:35
17:35 mcmillhj joined
ecocode what is the best way to check if a value is present in a list ? i.e. 4 in (1,2,3,4) ? 17:37
is there an easy way to convert a list into a junction ?
Zoffix m: say 4 ∈ (1,2,3,4) 17:38
camelia True
Zoffix m: say 5 ∈ (1,2,3,4)
camelia False
sena_kun m: say (1,2,3).contains(1); # If no Unicode
camelia True
ecocode ouch
Zoffix sena_kun: that's incorrect. .contains is a Str function
sena_kun ouch
ecocode :)
sena_kun then never mind me, I was always bad at helping others. :)
Zoffix ecocode: "best" is hard to pindown here. What's more important for you? Concise code or performance? Also, is `Nil` a valid value that can appear in the list? 17:39
ecocode so is there a non-unicode variant of ∈
Zoffix ecocode: yes, there's an alternative for all unicode things: docs.perl6.org/language/unicode_ascii
geekosaur (elem)
*with* the parens
ecocode Zoffix: Well, I don't care about performance ;) 17:40
17:40 mcmillhj left
Zoffix ecocode: oh, there's also a matter of whether you consider allomorphs to be equivalent to their numeric/stringy counterparts :) 17:40
m: say <4> ∈ (1,2,3,4) # this method would fail
camelia False
sena_kun docs.perl6.org/language/traps#List...contains() - wow, there is even a paragraph about that mistake. Probably need to refresh it in mind. :) 17:41
17:41 mcmillhj joined
Zoffix m: say (1,2,3,4).first(1) // 'Not found' 17:41
camelia 1
17:41 samcv joined
Zoffix m: say (1,2,3,4).first(5) // 'Not found' 17:41
camelia Not found
Zoffix ^ that would work, but would fail if you're looking for undefined things
ecocode p6: say 4 (elem) (1,2,3,4)
camelia True
ecocode got it 17:42
Zoffix m: say (1,2,3,4,Int,Any).first(* === Int) === Nil ?? 'there' !! 'not there'
camelia not there
Zoffix huh
Geth doc: 42d00b5523 | (Will "Coke" Coleda)++ | doc/Language/regexes.pod6
fix typo
synopsebot Link: doc.perl6.org/language/regexes
Zoffix Or right. I just messed up the order
^ that would work, but not if you're also trying to see if `Nil` is there
colomon m: say 4 == any(1,2,3,4)
camelia False
False
False
True
Zoffix m: say (1,2,3,Nil,4,Int,Any).grep(* === Nil).so ?? 'there' !! 'not there' 17:43
camelia there
Zoffix And this would work for all
hmm
colomon m: say 4 == all(1,2,3,4)
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3say 4 == all(1,2,3,47⏏5)
expecting any of:
infix…
Zoffix m: say (1,2,3,Nil,4,Int,Any) ~~ (**, Nil, **)
camelia True
Zoffix m: say (1,2,3,4,Int,Any) ~~ (**, Nil, **)
camelia False
colomon m: say 4 == all(1,2,3,4)
camelia False
False
False
True
colomon m: say so 4 == all(1,2,3,4) 17:44
camelia False
Zoffix ecocode: ^ I guess the smartmatch with two HyperWhatevers like that (my last eval) would be the most... um... "Perl-6-ish" way to check for abitrary value.
colomon m: say so 4 == any(1,2,3,4)
camelia True
Zoffix And .first() is probably most performant.
colomon ecocode: ^ my example works on your junction notion. but I’d definitely prefer Set where applicable. 17:45
17:45 s0me0n3-unkn0wn joined
Zoffix ecocode: RE easy way to convert list to a junction: yeah, there's .one/.all/.any/.none methods on Lists to convert them to Junctions (these are also available as subs) 17:45
17:46 dakkar left
Zoffix m: say (1,2,3,IteraionEnd,4,Int,Any) ~~ (**, IterationEnd, **) 17:46
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
IteraionEnd used at line 1
Zoffix m: say (1,2,3,IterationEnd,4,Int,Any) ~~ (**, IterationEnd, **)
camelia False 17:47
Zoffix m: say IterationEnd =:= any(1,2,3,IterationEnd,4,Int,Any)
camelia False
17:48 s0me0ne-unkn0wn left
Zoffix m: my @a = ^100; @a[3] := IterationEnd; say @a; say @a.elems 17:48
camelia [0 1 2]
100
Zoffix hehe awesome. Secret storage :P
17:49 khw left 17:54 sjoshi joined
Zoffix m: <a b c>[**].say 18:02
camelia HyperWhatever in array index not yet implemented. Sorry.
in block <unit> at <tmp> line 1
Zoffix wonders what it's meant to do...
18:05 zakharyas left
[Coke] we had some NYIs added at one point to avoid crashing. 18:06
18:08 zakharyas joined
Zoffix m: say (** + **)(1, 2, 3, 4) 18:12
camelia 5===SORRY!5=== Error while compiling <tmp>
Multiple HyperWhatevers and Whatevers may not be used together
at <tmp>:1
------> 3say (** + **7⏏5)(1, 2, 3, 4)
Zoffix That seems trivial to implement to have it work.
to mean a hyperwhatevered version of (* + *), mapping 2 args at a time 18:14
m: say ((* + *)).arity
camelia 2
geekosaur what about other combinations?
Zoffix geekosaur: like which? Combining with normal Whatevers?
18:16 AlexDaniel joined
geekosaur length 5 list, in this case. other possible combinations. not all ways you could use it are obvious 18:16
Zoffix length 5 list you get a crash, just like here:
m: ^5 .map: * + * 18:17
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
Zoffix Basically, these would be exactly equivalent: @args.flat.map(-$whatever-curry-) <=> (-$hyperwhatever-curry-)(@args) 18:18
where in hyperwhatever curry you use two asterisk for each arg instead of 1
18:21 sjoshi left
Zoffix (gonna implement that in 5 hours, unless someone objects) 18:22
Geth doc: 4d14a8f190 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/HyperWhatever.pod6
Document HyperWhatever

Closes #433
18:27
synopsebot Link: doc.perl6.org/type/HyperWhatever
18:27 setty1 joined 18:35 stmuk_ left 18:38 stmuk joined
Zoffix dunno if too magical... but at least it'd make HyperWhatever slightly more useful 18:39
.ask TimToady What's your opinion on allowing multi-arg HyperWhatevers? `(** + **)(1, 2, 3, 4)` to mean `(1, 2, 3, 4).flat.map: * + *`. Basically the double-asterisks are used anywhere an arg is to be placed into, just like with normal Whatevers, and they're mapped N-at-a-time 18:41
yoleaux Zoffix: I'll pass your message to TimToady.
Zoffix The "Too few positionals passed; expected 2 arguments but got 1" that'd pop out would be LTA, 'cause the 2-arg are not in userland 18:42
18:57 khw joined 19:02 darutoko left 19:03 Kaiepi left 19:07 andrzejku joined
Zoffix tyil: I may or may not have found what your problem is 19:15
By which I mean, I found it. 19:16
And by which I mean it's actually in IRC::Client
tyil wah 19:23
do tell me more :>
Zoffix R#1490
synopsebot R#1490 [open]: github.com/rakudo/rakudo/issues/1490 Missing serialize REPR function for BOOTException / LTA bug hunt
Zoffix tyil: zef --force install github.com/zoffixznet/perl6-IRC-Cl...master.zip
Then try installing your module and it should work
tyil neat 19:24
very neat
thanks for spending all this time to find it!
Zoffix And locally I couldn't repro because I have Terminal::ANSIColor installed so that `try` never set any exceptions
tyil zoffix+++
19:24 domidumont left
Zoffix tyil: did it actually work? 19:24
tyil just for finding the possible issue I'm already very happy tbh 19:26
I've been way too annoyed at this
I'll try it on my way home 19:27
Zoffix heh... now I'm getting "Type check failed in binding to parameter '<anon>'; expected Zef::Service::FetchPath but got Zef::Service::FetchPath+{<anon|94824868558512>}"
19:27 cdg left 19:28 cdg joined
Zoffix With "!!!> Failed to update cpan mirror" errors before it. But the second run succeeded 19:28
That's on the docker box. So I'm guessing the fix fixes (and it makes sense that it would be the cause based on the error) 19:29
\o
19:29 Zoffix left 19:31 Rawriful joined 19:32 cdg left 19:41 zeddy_k joined 19:53 zakharyas left 19:59 koto joined 20:01 sena_kun left 20:12 mcmillhj left 20:20 mcmillhj joined 20:25 mcmillhj left 20:27 TEttinger joined 20:35 mcmillhj joined 20:40 mcmillhj left 20:42 grondilu joined
grondilu off topic: falcon heavy launch in 2min spacex.com/webcast 20:43
tbrowder hi #perl6, i need help with a grammar 20:45
i can use it ok in the same file as the rest of the p6 code, but i get errors with Grammar::Tracer when the grammar is in a module under a local lib directory. 20:47
20:51 mcmillhj joined 20:54 someuser left
tbrowder working on a gist... 20:55
20:57 mcmillhj left 21:00 Kaiepi joined
stmuk that double booster landing was amazing 21:07
tbrowder the gist for the code with failure is here: gist.github.com/tbrowder/db2a3a80d...cc42178953 21:09
21:09 |oLa| joined 21:10 dct joined 21:11 mcmillhj joined
tbrowder when i remove the use of Grammar::Tracer the code seems to run fine, but i really want to use the tracer because it's very helpful when it works. if no one sees any stupid mistakes in the gist, i'll file a bug with Grammar::Tracer. 21:12
21:15 dct left 21:16 dct joined, mcmillhj left 21:21 andrzejku left, mcmillhj joined 21:24 koto left 21:26 dct left 21:30 Ven`` joined 21:37 cdg joined, MasterDuke left 21:39 cdg_ joined
tbrowder hm, just fouund Grammar::Tracer::Compact which works! filing a bug w/Grammar::Tracer. 21:39
21:39 cdg left 21:44 leont_ joined
SmokeMachine m: gather { ^1000 .hyper.map: {.take} } # should it work? 21:44
camelia A worker in a parallel iteration (hyper or race) initiated here:
in block <unit> at <tmp> line 1

Died at:
take without gather
in block at <tmp> line 1
21:48 Ven`` left
skids 'if a C<gather> lexically contains any C<take> calls, it is marked as lexotic-only, and it will be invisible to a dynamic C<take>.' (S04) 21:57
m: sub foo($a) { take 2 }; gather { ^1000 .hyper.map: { foo($_) } }
camelia A worker in a parallel iteration (hyper or race) initiated here:
in block <unit> at <tmp> line 1

Died at:
take without gather
in sub foo at <tmp> line 1
in block at <tmp> line 1
21:57 espadrine_ joined
skids So... that one if not the first one should (don't know if a .take counts as a "take call") 21:57
22:06 mcmillhj left, leont_ is now known as leont 22:10 comborico1611 joined 22:11 skids left 22:12 bart__ joined 22:13 comborico1611 left, natrys left
jnthn SmokeMachine: An exception handler - even if resolved lexically - must be in dynamic scope. When the code is transported to a different thread, it has a fresh dynamic scope. 22:14
We may go so far as carrying along $*FOO, but...handlers are more problematic.
22:16 setty1 left 22:18 epony joined
jnthn m: dd list ^1000 .hyper.map: {|gather .take} 22:18
camelia (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, …
jnthn There's one way to go
22:20 zeddy_k left, zeddy_k joined 22:22 rindolf left 22:29 zeddy_k left 22:50 bart__ is now known as brrt 22:52 wamba left 22:55 brrt left 22:56 someuser joined 22:57 grondilu left 23:06 saramaebee joined 23:07 brrt joined 23:08 leah2 left 23:22 leont left 23:23 someuser left 23:28 perlpilot_ joined, perlpilot_ is now known as perlpilot 23:36 leah2 joined 23:40 |oLa| left 23:42 mcmillhj joined 23:44 saramaebee left 23:45 dct joined 23:57 leont joined