»ö« 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:05 AlexDani` joined 00:07 AlexDaniel left 00:08 derp_commander joined
derp_commander I keep finding myself reading Perl 6 documentation when I am/should be doing other things 00:15
00:18 pmurias left
Geth ecosystem: 53084e5ce7 | japhb++ (committed using GitHub Web editor) | META.list
Add japhb/RPG-Base
00:19
derp_commander why is it that, "You cannot use the statement modifier form with else or elsif"
00:20 gregf_ left
derp_commander if you could, it would obviate the need for a special ternary operator while providing greater flexibility 00:20
Geth doc: 5df55806be | (Will "Coke" Coleda)++ | util/update-and-sync
use full path to file
00:24
00:39 pierre_ left 00:42 nattefrost left 00:57 MilkmanDan left 00:58 MilkmanDan joined 01:07 Cabanossi left 01:09 BenGoldberg joined, Cabanossi joined 01:35 Rawriful left 01:43 pharv left 01:44 buggable left, buggable joined, ChanServ sets mode: +v buggable 01:47 ilbot3 left 01:51 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:53 andreoss left
Geth infrastructure-doc: f0408ac4c3 | (Will Coleda)++ (committed using GitHub Web editor) | hosts/hack.p6c.org.pod
add note about force-update
02:08
02:08 lucasb joined
lucasb m: say (True xor True) 02:10
camelia Nil
lucasb so "If both arguments evaluate to C<True>, returns the last argument." isn't accurate 02:11
m: say (False xor Any) 02:12
camelia (Any)
lucasb If both arguments evaluate to C<False>, *then* it returns the last falsey argument 02:13
02:13 shin1 joined
lucasb oops, sorry, didn't notice the comments in the PR 02:14
Geth infrastructure-doc: 9828c3c694 | (Will Coleda)++ (committed using GitHub Web editor) | hosts/hack.p6c.org.pod
note node-gyp issue post-upgrade
02:16
ryu0 m: say (1 | 2)
camelia any(1, 2)
02:16 wamba joined
ryu0 O_o 02:16
m: say (1 & 2)
camelia all(1, 2)
ryu0 m: say (1 ~| 2) 02:17
camelia 3
ryu0 Ah, there it is.
02:17 shin1 left
[Coke] I *think* the doc builds are fixed. please ping me if they appear to hang again. 02:19
02:25 R0b0t1_ joined 02:27 lucasb left 02:31 geekosaur left 02:39 xinming left 02:40 noganex joined 02:41 geekosaur joined
Juerd ryu0: You probably want +| which is the numeric bitwise OR. 02:42
02:43 noganex_ left
Juerd ryu0: ~| is string bitwise OR, e.g. "a" ~| "1" gives "q" 02:44
[Coke] n 02:46
Juerd n? 02:49
geekosaur a bold assertion...
ryu0 I see. 03:01
03:06 MilkmanDan left, MilkmanDan joined, Cabanossi left 03:07 atroxaper joined 03:08 espadrine_ left, Cabanossi joined, skids joined 03:11 atroxaper left
Geth ecosystem: 21213f1d76 | (Shoichi Kaji)++ | META.list
Add App-P6Ghq to ecosystem

See github.com/skaji/App-P6Ghq
03:17
03:33 atroxaper joined 03:37 Cabanossi left 03:38 Cabanossi joined
derp_commander m: gather {take 2**$_ for 1..9} 03:45
camelia ( no output )
derp_commander m: put gather {take 2**$_ for 1..9}; 03:47
camelia 2 4 8 16 32 64 128 256 512
03:48 pierre_ joined, xinming joined 04:08 Cabanossi left, Cabanossi joined 04:25 pilne left
[Coke] trying to test more examples in the docs; came across this: the actual sample works; the generated wrapper code causes it to fail. Any pointers? 04:29
gist.github.com/coke/f00cdc1b59f3a...90a54b06f9
ah, I see it now; the examples treat the sub line specially. 04:31
sacomo hi #perl6 04:37
derp_commander ohai 04:38
I upgraded ur perl
[Coke] ~ 04:46
04:47 leedo left, leedo joined 04:49 Todd joined 04:50 khw left
Todd I have a crash using Net::Smtp. Would one of our interpid heros plase take a look at it to see what I am doing wrong. I am truing to SSL/TLS to port 465 04:50
vpaste.net/hIfLJ 04:51
[Coke] which version of Net::SMTP are you using? (zef info Net::SMTP) 04:54
(line with Identity)
Todd How do I tell? 04:55
[Coke] ... you run the command: "zef info Net::SMTP"
and paste the line that starts with Identity here. 04:56
Todd ]$ zef info Net::SMTP - Info for: Net::SMTP - Identity: Net::SMTP:ver('1.1.0'):auth('github:retupmoca') - Recommended By: /home/tony/.perl6 Provides: 3 modules Depends: 0 items
[Coke] I can't even install Net::SMTP at the moment because there's a test failure in a prereq because my rakudo is a day old.
What is your perl6 version? (perl6 -v) 04:57
Todd $ rpm -qa rakudo rakudo-0.2017.07-2.el7.x86_64 04:58
$ perl6 -v This is Rakudo version 2017.07 built on MoarVM version 2017.07 implementing Perl 6.c.
04:59 leedo left, leedo joined 05:01 leedo_ joined
Todd If I take the :ssl out, it just hangs 05:02
[Coke] I get a different error: gist.github.com/coke/6f62c26d76edd...6a9f3ad0a1
that's with 2017.07-214-g2545e6d65 and Net::SMTP:ver('1.1.0') 05:03
Todd Huh? Be back in three minutes
[Coke] Either way, I'd open a ticket with Net::SMTP 05:04
I'm out; good luck.
05:06 Cabanossi left
Todd I'm back 05:07
github.com/retupmoca/P6-Net-SMTP/issues/17 05:08
05:08 Cabanossi joined 05:18 wamba left
Todd Bye bye. Thank you for the help! 05:24
05:24 Todd left 05:36 cpage_ joined 05:48 BenGoldberg left 05:57 derp_commander left, raschipi left 06:19 ufobat joined, geekosaur left 06:28 geekosaur joined 06:32 ShalokShalom_ joined 06:35 ShalokShalom left 06:37 ShalokShalom_ is now known as ShalokShalom 06:42 ggoebel left 06:46 nalley joined, darutoko joined 06:52 nalley left, Cabanossi left 06:53 Cabanossi joined 06:56 ggoebel joined 06:57 zakame joined 07:01 zengargoyle left 07:03 pierre_ left, ijneb left 07:06 skids left 07:08 zengargoyle joined 07:20 wamba joined 07:37 Cabanossi left 07:38 Cabanossi joined 07:42 rindolf joined 07:43 domidumont joined 07:47 domidumont left 07:48 domidumont joined 08:03 espadrine_ joined 08:04 zakame left 08:13 pierre_ joined 08:25 Exodist left, Exodist joined 08:31 TEttinger left 08:46 nadim joined 08:58 setty1 left 09:05 AlexDani` is now known as AlexDaniel 09:10 mr-foobar joined 09:12 andrzejku joined 09:15 leont joined 09:16 pmurias joined 09:36 Cabanossi left 09:38 Cabanossi joined 09:53 Aaronepower left 09:54 Skarsnik joined
Skarsnik Hello 09:55
hahainternet hi 10:04
10:05 ijneb joined 10:06 Cabanossi left 10:08 Cabanossi joined 10:13 konsolebox left 10:18 konsolebox joined
nadim morning 10:28
I just spend 10 mn trying to find out where I called a sub. code should have been my_sub($s, |%something) but was my_sub($s |%something) ... a junction! Is there a log of what processes are started ended somewhere? 10:30
jnthn: ^
lizmat nadim: wouldn't --ll-exception have told you where it went wrong ? 10:31
nadim I'll try but nothing went wrong, it worked very nicely in fact :) 10:32
10:32 mr-foobar left
lizmat ah 10:33
hmmm
use trace ?
m: use trace; my $a = "hello world"
camelia 2 (<tmp> line 1)
my $a = "hello world"
nadim could have helped but my question was more a generic one, do we keep a log of was auto threads somewhere? sounds like a better idea than firing trace
lizmat there is no log at the HLL level that I know of 10:34
nadim ah! trace not strace, I did not get that :)
lizmat and since Junctions are a HLL thing mostly, I don't think we have anything at a lower level either
nadim Good to know 10:35
skaji Hi,
I found that Proc::Async.bind-stdin left a unix socket open.
Should I call some methods on Proc::Async if I use bind-stdin?
Details: gist.github.com/skaji/b0b210304e93...28cf7f53b0
nadim the sub I called started a curses display of a folding data dump, i was so surprised to be taken back in another curses display when I closed the first one
10:35 mr-foobar joined 10:38 Cabanossi left, Cabanossi joined
Voldenet uh, I wonder if there's a way to dynamically invoke a method? 10:40
m: sub method(Str:D :$text) { say $text.elems; }; my %hash = :text("hello world"); method(%hash); 10:41
camelia Too many positionals passed; expected 0 arguments but got 1
in sub method at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo of course, you just have to |%hash 10:42
Voldenet Oh, now that's magic.
Skarsnik hm how I test if a variable do a role? 10:50
10:51 andrzejku left
timotimo you can either ~~ TheRole or .does(TheRole) 10:51
Voldenet I think you could just use a Role as a type name
10:52 andrzejku joined
Skarsnik Ohh yeah ~~ work for role too w) 10:52
10:53 pierre_ left 10:54 pierre_ joined 10:55 smls joined
smls m: "a" ~~ / {say "in regex"} b /; 10:56
camelia in regex
in regex
smls Why does this^^ execute the code block twice? 10:57
timotimo backtracking
i expect it tries to match a b at char 0, then a b at char 1
m: "a" ~~ / { say "in regex at $/.from()" } b / 10:58
camelia in regex at 0
in regex at 1
timotimo there you go
smls Ah, I didn't consider that it tries matching at every start point. 10:59
m: "a" ~~ / ^ {say "in regex"} b /;
camelia in regex
smls Ok, thanks.
Skarsnik I wonder what use it could have 11:00
11:00 andrzejku left, andrzejku_ joined 11:01 Rawriful joined 11:03 pierre_ left 11:04 pierre_ joined 11:09 ufobat left
masak smls: I should make a list of things people wrongly assume about their regex -- "it will automatically match only the whole string" is one of those 11:10
yoleaux 18 Aug 2017 18:16Z <timotimo> masak: there's still my pullrequest for Adventure::Engine to make it work again, same for crypt
masak timotimo: thanks, will look
masak feels very reactive (in not-a-good-way) with accepting PRs to old projects 11:11
smls masak: Well, I knew that of course, I just sometimes forget it... :P
masak smls: yes, that's the thing. 11:12
smls: thing is too, it's very context-dependent
for example, TOP *does* anchor automatically at both ends 11:13
and something like `is parsed` should obviously only match at the current position in the program
Voldenet > Prefixing a parameter with a vertical bar | makes the parameter a Capture, using up all the remaining positional and named arguments. 11:19
m: sub a(|b) { say |b }; a(:c<d>);
camelia Unexpected named argument 'c' passed
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
Voldenet hm, it doesn't seem to use capture named arguments 11:20
Skarsnik is there a way to know on how many nested loop we are? 11:22
masak Skarsnik: ...count them?
for @a { for @b { for @c { #`[ now we're in three nested loops ] } } } 11:23
Skarsnik Could be useful for display stuff like for { say "blabla" for {say " " x $spacing, "blabla"}} 11:24
masak I usually go with a contextual parameter `$*indent = 0`, and then recurse 11:25
smls Voldenet: It does capture named argument. The error message comes from the `say |b`, where you interpolate the capture into the argument list of `say`. 11:29
m: sub a(|b) { say b }; a(:c<d>);
camelia \(:c("d"))
Voldenet Ah, silly me, you're right. 11:30
11:31 sakuya joined 11:32 sakuya is now known as araraloren
araraloren evening 11:32
11:32 araraloren is now known as araraloren_fake 11:33 nowan left 11:35 nowan joined
pmurias araraloren_fake: hi 11:35
araraloren_fake pmurias, o/ 11:36
11:46 araraloren_fake left, nowan left 11:49 nowan joined
leont Is there a nice syntax equivalent to stacked file operators from perl5 (-r -w -x $_) 11:52
11:53 nowan left
Skarsnik hm, Can I use a Set like an array? like doing $foo.push(newvalue)? or I am supposed to use SetHash? (I found it really weird to use) 11:54
Don't we have like :w :r :x ? 11:55
AlexDaniel m: say (:a:b:c)
camelia (a => True b => 1 c => 1)
Skarsnik I mean for leont :) 11:56
11:56 nowan joined
AlexDaniel leont: what about $smth ~~ all (:r :w :x) 11:57
timotimo smls: knowing the minimum and maximum length of a match as well as minimum and maximum distances from start and end is an optimization opportunity that hasn't yet been seized 11:58
Skarsnik m: my Set $a; $a.push(1); say $a 12:00
camelia Type check failed in assignment to $a; expected Set but got Array ($[])
in block <unit> at <tmp> line 1
12:00 araraloren_fake joined
timotimo smls: like for a regex match of "a" we know that it will only ever match a single character, so it doesn't make sense to try at length-of-string 12:00
but of course there's also matches that can be zero-width
leont AlexDaniel: that seems to work, though I hadn't expected that space between all and ( to be so important 12:01
12:07 Cabanossi left 12:08 Cabanossi joined
moritz leont: it's because :r in a call is a named argument, not a pair 12:12
Skarsnik having Set has hash is not fun to use IMO :( 12:17
moritz I can imagine; sets work best with value types 12:18
smls leont: See docs.perl6.org/language/5to6-nutsh...Whitespace
Skarsnik say "Dependancies are : ", @files-deps.Set.keys.join(' - '); is not a great workaround x) 12:19
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/pmqpLDkKXL
Variabl…
Skarsnik, Full output: gist.github.com/23210a8038ce04438d...d0237e07ff
timotimo Skarsnik: then use .unique 12:20
Skarsnik Well I really wanted a Set instead of just an array. But I did not figure how to use it nicely 12:21
timotimo m: say Set(<a b c d e>).fmt("%s").perl 12:22
camelia "e\nd\nb\na\nc"
timotimo m: say Set(<a b c d e>).fmt("%s", " - ").perl 12:23
camelia "e - d - b - a - c"
Skarsnik Yeah it's nice when it's ummutable like this
but I wanted something like my Set $dep-file; $dep-file.push($value); so it keep an array of unique value 12:24
timotimo you know about SetHash, right? 12:25
i mean, if you just use a regular hash and %things{$value} = 1, that'll also work i bet
Skarsnik I tried SetHash but having to push a Pair is just weird 12:26
timotimo well, you don't need to use .push, you can just use = :) 12:28
though if you want you can mix in a role that gives you a "set" method
Skarsnik (it's funny because std::set in C++ are sorted) 12:29
= ? but I just want to populate my Set dynamicly, not juste once 12:31
araraloren_fake Set is immutable. 12:33
Skarsnik yeah but SetHash is mutable, but it's usable like a hash, it's just so weird for me 12:34
12:35 piojo joined
araraloren_fake Skarsnik, what you mean not like a hash ? 12:35
piojo I found a short regex that almost crashed my computer :D 12:40
I won't tell Camila to run it, but: 12:41
S/'foo(' (<![)]>+) ');'/($0).Foo();/ given 'foo(a => 3, b => 4); # comment comment'
just because I accidentally used "!" instead of "-" to say "don't match the paren"-- [^)] in other programming languages 12:42
timotimo yeah, that gives you a zero-width match 12:43
if you quantify that, it'll happily match as often as it can until you kill the process
piojo the VM ate an additional 300 MB of RAM every second
timotimo: oh, that's disappointing. I guess I should, you know, not do that then :) 12:44
12:44 andreoss joined
nadim msg camelia m: True 12:45
timotimo it's not wrong per se, but it's very unlikely to be what you want 12:46
nadim utf8 doe not have a WHICH is it by design? eg: "test".encode('utf-8').WHICH.say would fail 12:47
And WHERE, which utf8 has, is prety unusable, WHERE changes at the light of speed in rakudo 12:48
timotimo where is very unlikely to be what you want, ever
piojo timotimo: I know. I'm just surprised the syntax for character classes is so close to the syntax for zero-width assertions. I knew when I was writing it that it was either ! or -
timotimo the reason is that <?foo> is zero-width positive assertion and therefor <!foo> is zero-with negative assertion 12:49
nadim I understand why WHERE is not "stable" but wven with a machine with GB of free memory objects get shuffled around quite often it seems
timotimo i would say WHICH on an utf-8 should work 12:50
nadim m: "test".encode('utf-8').WHICH.say
camelia Can not decode a utf-8 buffer as if it were latin-1
in block <unit> at <tmp> line 1
timotimo which shouldn't change more than twice, i believe
lizmat nadim: any time an object survives the nursery, it will have its .WHERE changed
timotimo objects only ever survive the nursery twice, then they're in the gen2 and stay where they were 12:51
nadim good to know
piojo timotimo: the lookaround syntax is rather lovely, though I'm not used to it yet. It's the character class syntax that got me.
timotimo the - is part of a more general syntax 12:52
nadim I'd rather just use WHiCH but I discovered that int8 do not like to be WHICH-poked
timotimo m: say "hello" ~~ / <[a..z] - [uiaeo]> /
camelia 「h」
timotimo the - can also come first so you don't have to write <[]-[blah]>
nadim: yeah, int8 only exist as registers, where a WHICH doesn't make very much sense at all; it'll immediately box an Int for you so it can do that 12:53
nadim timotimo: do rakudo have an infinite amount of registers? sometimes the int8 are int8[] 12:54
araraloren_fake m: say "hello" ~~ /<[a..z] - [u]>/;
camelia 「h」
araraloren_fake m: say "hello" ~~ /<![a..z] - [u]>/;
camelia 「h」
timotimo registers are bound by total system memory, but int8[] is going to be an array object rather than a bunch of registers
piojo m: say ~("hello" ~~ /<![a..z] - [u]>/);
camelia h 12:55
nadim timotimo: and does .WHERE called multiple times change the nursery ->gen2 state?
timotimo i don't see why it would
piojo timotimo: Thanks. That does make sense. I don't know why my mind wants it to be "not" so badly.
timotimo :) 12:56
nadim Just curious about if I can "stabilize" them. the problem I have is showing references to the same int8 since they change place, and don't have a WHICH, it gets impossible
timotimo it's one kind of not, but these assertions are multi-dimensional
12:58 pierre_ left
nadim m: "test".encode('utf-8').WHICH.say 12:58
camelia Can not decode a utf-8 buffer as if it were latin-1
in block <unit> at <tmp> line 1
nadim is there a way to get ^ to work?
araraloren_fake say "foo(' where ')"/'foo(' (<-[)]>+) ');'/
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/iI1diszAXq
Two ter…
araraloren_fake, Full output: gist.github.com/100d9d88a9cee98ccd...93faa57e0b
araraloren_fake m: say "foo(' where ')" ~~ /'foo(' (<-[)]>+) ');'/ 12:59
camelia Nil
araraloren_fake m: say "foo ' where '" ~~ /'foo(' (<-[)]>+) ');'/
camelia Nil
13:01 andreoss left
nadim Do we have a module to do networking that can see that the packages send are over the packets limit, split them on one end and put them back together on the other end? 13:07
13:21 lucasb joined
nadim a SOAP module that would handle large requests? anything? 13:26
lizmat nadim: isn't that what TCP/IP is supposed to do ? 13:28
13:29 nowan left 13:32 nowan joined
timotimo yeah, TCP/IP doesn't have a package-related API, so splitting is implicit and more or less invisible 13:32
13:34 atroxaper left
pmurias lizmat: sometimes layering ordering and reliability on top of UDP works better than TCP/IP 13:36
lizmat if you can afford to be lossy, I guess 13:37
otherwise you're doomed to re-invent TCP/IP, no ?
pmurias lizmat: what I mean is that re-inventing TCP/IP can work a lot better in some circumstances then UDP 13:38
lizmat: chrome can do HTTP over UDP: en.wikipedia.org/wiki/QUIC
lizmat interesting.. :-) 13:39
lizmat hopes that all hardware on the way can cope with large amounts of UDP traffic 13:40
at former $work, huge amounts of UDP traffic caused micro-blackouts wreaking havoc on establishing TCP/IP database connections 13:41
afk for a bit&
nadim say limit is 64 Kb, sending 70 Kb and 70 Kb, that's three packets, the first 70 Kb represent an object, so one has to find the end of it, sending size plus data works of course, but that's a protocole over TCP, I donẗ want to reinvent a protocole. 13:45
13:56 pierre_ joined
pmurias nadim: I don't understand what you want your module to do 13:57
nadim push data block in one end and get the same data block on the other end. if a block is too big to sed in one packet it is split. on the other side, the module sees that multiple packets constitute the same block and puts them back together. 13:59
like netstring for example
14:02 pierre_ left 14:09 wamba left 14:10 piojo left 14:11 pierre_ joined 14:12 grumble left, grumble joined 14:15 MilkmanDan left 14:18 lucasb left 14:19 araraloren_fake left 14:23 pierre_ left, MilkmanDan joined, nowan left 14:24 mr-foobar left 14:26 mr-foobar joined, nowan joined 14:27 releasable6 left, releasable6 joined, ChanServ sets mode: +v releasable6 14:34 Khisanth left 14:37 zakharyas joined 14:47 Khisanth joined
leont is surprised but is an non-associative operator, but I guess my idea to do [but] may be a bit crazy anyway 14:49
14:50 Cabanossi left
moritz leont: what was your expectation? left-assoc? 14:51
leont Yeah 14:52
14:52 atroxaper joined 14:53 wamba joined, Cabanossi joined 14:54 mr-foobar left 14:57 espadrine_ left 14:59 mr-foobar joined 15:04 emeric_ left 15:20 espadrine_ joined
Geth doc: f6820f32f2 | (Elizabeth Mattijsen)++ | doc/Type/atomicint.pod6
Follow naming changes in atomic operators

As done in github.com/rakudo/rakudo/commit/ca8aafc173
15:22
15:22 mr-fooba_ joined 15:23 pierre_ joined, mr-foobar left 15:26 pierre_ left
smls bisectable6: say "a".match(/a/).made; 15:36
bisectable6 smls, Bisecting by exit code (old=2015.12 new=ca8aafc). Old exit code: 0
smls, bisect log: gist.github.com/c6fe807f146fceef7e...2415424e37 15:37
smls, There are 20 candidates for the first “new” revision. See the log for more details
smls What does that mean? 15:38
bisectable6: say "a".match(/a/).made.^name; 15:40
bisectable6 smls, Bisecting by output (old=2015.12 new=ca8aafc) because on both starting points the exit code is 0
smls, bisect log: gist.github.com/1176206b14ad722b53...e920e60357 15:41
smls, There are 20 candidates for the first “new” revision. See the log for more details
timotimo smls: look at the log, it's just a whole bunch of skipped commits :( 15:42
smls heh, the first of the listed commits sounds like it could be it: github.com/rakudo/rakudo/commit/18...b91f910881 15:43
AlexDaniel smls: usually this is what you get when a bunch of commits are merged (where intermediate commits are unbuildable) 16:03
smls: or if there was nqp bump involved 16:04
smls: can you submit a ticket with this? 16:07
smls AlexDaniel: Writing it now.
moritz the other thing we could do is revert breaking changes more quickly 16:11
sorry, wrong channel
smls docs.perl6.org/language <-- Didn't this use to redirect to /language.html ? 16:13
Not it returns a raw folder listing.
*Now 16:17
AlexDaniel smls: I think so. Maybe worth a doc bug so it doesn't slip through the cracks 16:20
smls k
16:26 espadrine_ is now known as espadrine 16:39 ShalokShalom left 16:45 pilne joined 17:03 zakharyas left 17:06 Cabanossi left 17:08 Cabanossi joined 17:13 zakharyas joined 17:19 atroxaper left, atroxaper joined 17:20 atroxaper left, atroxaper joined, atroxaper left 17:21 atroxaper joined, atroxaper left, atroxaper joined 17:22 atroxaper left, atroxaper joined 17:23 atroxaper left, atroxaper joined 17:24 atroxaper left, atroxaper joined, andrzejku joined, cdg joined, atroxaper left 17:25 atroxaper joined, andrzejku_ left, atroxaper left, atroxaper joined 17:26 atroxaper left, atroxaper joined 17:27 atroxaper left, atroxaper joined 17:28 ramortegui joined, atroxaper left, atroxaper joined, atroxaper left 17:29 atroxaper joined, atroxaper left 17:30 atroxaper joined, atroxaper left, atroxaper joined 17:31 atroxaper left, atroxaper joined 17:32 atroxaper left, atroxaper joined, atroxaper left 17:33 atroxaper joined, atroxaper left, atroxaper joined 17:34 atroxaper left, atroxaper joined 17:35 atroxaper left, atroxaper joined 17:36 atroxaper left, atroxaper joined, atroxaper left 17:37 atroxaper joined, atroxaper left, atroxaper joined 17:38 skids joined, atroxaper left, atroxaper joined 17:39 atroxaper left, atroxaper joined 17:40 atroxaper left, atroxaper joined, atroxaper left 17:41 atroxaper joined, atroxaper left, atroxaper joined 17:42 atroxaper left, atroxaper joined 17:43 atroxaper left, atroxaper joined 17:44 atroxaper left, atroxaper joined, atroxaper left 17:45 atroxaper joined, atroxaper left, atroxaper joined 17:46 atroxaper left, atroxaper joined 17:47 atroxaper left, atroxaper joined 17:48 atroxaper left, atroxaper joined, atroxaper left 17:49 atroxaper joined, atroxaper left, atroxaper joined 17:50 atroxaper left, atroxaper joined 17:51 atroxaper left, atroxaper joined 17:52 atroxaper left, atroxaper joined, atroxaper left 17:53 atroxaper joined, atroxaper left, atroxaper joined 17:54 atroxaper left, atroxaper joined 17:55 atroxaper left, atroxaper joined 17:56 atroxaper left, atroxaper joined, atroxaper left 17:57 atroxaper joined, atroxaper left, atroxaper joined 17:58 atroxaper left, atroxaper joined 17:59 atroxaper left, atroxaper joined 18:00 atroxaper left, beame-ilya joined, atroxaper joined, beame-ilya left, aeruder left, atroxaper left 18:01 atroxaper joined, BrainLess joined, aeruder joined, atroxaper left, atroxaper joined 18:02 atroxaper left, atroxaper joined 18:03 atroxaper left, atroxaper joined 18:04 atroxaper left, atroxaper joined, atroxaper left 18:05 ufobat joined, atroxaper joined, atroxaper left, atroxaper joined 18:06 atroxaper left, Cabanossi left, atroxaper joined 18:07 atroxaper left, atroxaper joined 18:08 atroxaper left, atroxaper joined, Cabanossi joined, atroxaper left 18:09 atroxaper joined, atroxaper left, atroxaper joined 18:10 atroxaper left
gfldex is there a way to initialise a class attribute at BEGIN time? 18:17
Skarsnik the eternal question 18:19
18:24 BrainLess left, darutoko left
moritz m: class A { our $.x = 42 }; BEGIN say A.x 18:26
camelia (Any)
moritz m: class A { our $.x = 42 }; say A.x 18:27
camelia 42
moritz m: class A { our $.x is rw; }; BEGIN A.x = 42; BEGIN say A.x 18:28
camelia 5===SORRY!5=== Error while compiling <tmp>
Can't use unknown trait 'is rw' in a variable declaration.
at <tmp>:1
------> 3class A { our $.x is rw7⏏5; }; BEGIN A.x = 42; BEGIN say A.x
expecting any of:
TypeObject
moritz m: class A { our $.x; }; BEGIN A.x = 42; BEGIN say A.x
camelia 42
moritz gfldex: ^^ :-)
18:47 dmaestro left 18:48 pierre_ joined
gfldex lolibloggedalittle: gfldex.wordpress.com/2017/08/20/pr...-for-your/ 18:51
18:53 pierre_ left 18:54 BrainLess joined 19:00 zakharyas left 19:15 dmaestro joined 19:19 domidumont left, TEttinger joined
cono m: my $x = (1, 2, 3); my $y = ($x.flat, 4).flat; $y.say 19:28
camelia (1 2 3 4)
cono is there any other way to crate new list w/o double .flat 19:29
nvm, looks like found :D 19:30
m: my $x = (1, 2, 3); my $y = (|$x, 4); $y.say
camelia (1 2 3 4)
moritz that's cheating; prefix | is basically just .flat
moritz would like a proper list concatenation op 19:31
cono m: my $x = (1, 2, 3); my $y = ($x.flat, 4); $y.say
camelia ((1 2 3) 4)
cono why then its different ?
and yes, it would be great if appends & push produce new list as a result and give errors in void context 19:32
ugexe m: my $x = (1, 2, 3); my $y = ($x.Slip, 4); $y.say
camelia (1 2 3 4)
moritz ok, not exactly the same, it's more like .split 19:33
*slip
cono y
gfldex m: my $x = (1, 2, 3); my @y = |$x, 4; dd @y
camelia Array @y = [1, 2, 3, 4]
19:35 Cabanossi left 19:37 Skarsnik left 19:38 Cabanossi joined
cono moritz: btw, I got 3 books from last YAPC and only one w/o Author signature ;) Guess which one! 19:38
Perl6 books* 19:39
moritz cono: I'll be happy to sign it for you when we meet in person :-) 19:40
19:40 Rawriful left
cono (handshake) moritz 19:41
19:46 BrainLess is now known as OtherNick
leont Does perl6 happen to have a value containing the time when it started? 19:49
gfldex m: say $started = BEGIN now; sleep 5; say $started; 19:50
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$started' is not declared
at <tmp>:1
------> 3say 7⏏5$started = BEGIN now; sleep 5; say $star
gfldex m: my $started = BEGIN now; sleep 5; say $started;
camelia Instant:1503258646.834456
19:50 cdg left
leont Ah, apparently there's $*INITTIME :-) 19:51
19:51 cdg joined
leont Not documented under variables, but it is in 5to6 19:51
gfldex leont: be careful, that one might now be specced 19:52
gfldex goes to check
it is not 19:53
19:55 pecastro joined
lizmat fwiw, there are no tests for it either 19:55
19:56 cdg left
moritz leont: INIT now is more likely what you want than BEGIN now 19:57
BEGIN happens at *compile* time, which for a precompiled module might have been ages ago
tadzik m: say $*BEGINTIME #hmmm 19:59
camelia Dynamic variable $*BEGINTIME not found
in block <unit> at <tmp> line 1
20:01 Rawriful joined
leont Shouldn't that be $?BEGINTIME then? 20:04
20:04 zakharyas joined
lizmat leont: $*INITTIME gets basically set whenever line 628 in Rakudo::Internals gets executed 20:06
which is pretty early in the INIT sequence
20:06 cdg joined 20:07 Rawriful left
gfldex leont: issues for docs and roast filed for $*INITTIME. Thanks for asking. 20:09
20:13 rindolf left 20:19 ufobat left 20:25 brrt joined 20:28 rindolf joined 20:34 TEttinger left 20:36 andrzejku left, Cabanossi left 20:38 Cabanossi joined 20:41 brrt left 20:59 zakharyas left 21:02 smls left, smls joined 21:03 smls left 21:07 Rawriful joined 21:09 OtherNick left
AlexDaniel we had an interesting doc issue for it 21:24
github.com/perl6/doc/issues/510
notice that {INIT now} is much later than $*INITTIME, but earlier than {BEGIN now} :) 21:26
if you want to add some extra confusion to your code, use INIT time ;P 21:27
which doesn't even return an instant :)
21:30 S007 left 21:51 Cabanossi left 21:53 Cabanossi joined 21:54 rindolf left 21:55 geekosaur left 21:56 andreoss joined 21:58 geekosaur joined
Geth doc: cc6f61e5b0 | (Elizabeth Mattijsen)++ | doc/Type/atomicint.pod6
Follow renaming of Texas atomic ops

As per github.com/rakudo/rakudo/commit/1aee9aa573
21:59
ijneb Is perl6 ever going to ship with any distros? 22:05
AlexDaniel ijneb: it already does 22:07
ijneb I mean default-ly installed
geekosaur as part of the base system? depends on what distributions choose to use it for something
which is up to them, not anyone here
ijneb geekosaur: Yeah, that's what I meant, sorry
AlexDaniel this depends on… well, if something is going to depend on it
ijneb I wonder if or when that will happen 22:08
may bring more attention to perl6
timotimo actually, i'd expect a lot of pushback instead
ijneb why? 22:09
I feel like many perl5 users look down on perl6
timotimo sure, there's those who think perl6 killed or doomed perl5 22:10
ijneb The name 'perl6' misleads them to believe it deprecates perl5
timotimo actually, i don't have a good reason for that thought
just a feeling
22:10 nadim left
ijneb I like the name rakudo 22:11
timotimo it's a nice name for sure
AlexDaniel
.oO( too bad it's already taken )
22:12
timotimo i don't have an opinion on the "emphasize the rakudo in rakudo perl6" idea
i was never a perl coder before moving to perl6 from python
ijneb I've never even touched perl5
timotimo all my ingrained perl hate got washed away over the course of a day or two
ijneb I feel rakudo WOULD set a better name for the language
but I'm in no place to have a say-so obviously lol 22:13
Are there any other perl6 compilers comparable to rakudo? 22:14
22:14 atroxaper joined
andreoss no 22:14
perl6.org/compilers/
AlexDaniel not anymore, and not yet :) 22:15
ijneb Perlito seems cool 22:16
timotimo perlito compiles a qiute small subset of perl6
ijneb dang
Doesn't seem too active either sadly 22:17
timotimo i believe it's considered finished
has been for ... years maybe? 22:18
ijneb What is niecza
Also, is moarvm generally faster than jvm? 22:19
or is it the other way around
22:19 atroxaper left
andreoss jvm is supposed to be faster 22:20
ijneb What is moarvm written in
andreoss ijneb: there's perl6-benchmark which covers this stuff
ijneb Is it possible that I could contribute to moarvm's development after benchmarking? 22:23
timotimo moarvm's written in C
ijneb I've been using C for a good while 22:24
Would I have the know the ins-and-outs of moarvm to contribute?
AlexDaniel depends
timotimo not all of the ins and outs, but different pieces of the project require different subsets of knowledge
ijneb I see 22:25
timotimo there are some major sources of performance problems 22:27
ijneb such as ? 22:28
timotimo there's our builtins that are written in perl6, which are gradually being rewritten using only/mostly nqp ops directly by lizmat
ijneb lizmat?
Is that a person
timotimo yup 22:29
she's also been writing the p6weekly for a long time now
ijneb Will migrating to nqp ops drastically improve performance issues?
andreoss will these pieces be rewritten back in perl6 when moarvm is fixed?
timotimo p6weekly.wordpress.com/ - scroll through the posts and you'll see many places saying "[some feature] has been made [usually a big number] times faster by lizmat"
ijneb Yeah, I've been glossing over those for a while now 22:30
jnthn haha..."fixed"
timotimo actually, the performance win is only partially "just" the rewrite
many times the new code also uses a cleverer algorithm as well
ijneb jnthn seems to be really knowledgeable on this sorta stuff 22:31
timotimo there's still many performance opportunities in the regex engine
ijneb jnthn: Where did you learn this kind of stuff? 22:32
Aren't regexes still faster than grammars by a ton
andreoss i mean when some optimizers added or somthing like that
jnthn But yeah, when MoarVM learns how to do a few dozen more complicated optimizations... :)
ijneb Is there a page for development funding 22:34
jnthn ijneb: First got interested in compilers and programming language design/semantics/type systems when I was at university, and took the courses I could on it there. Beyond that, reading papers, learning about other VMs/compilers, but largely a lot of the experience is hard won from implementing the stuff.
ijneb That's sweet 22:35
Prague looks really gorgeous in a lot of places 22:36
I'm jealous
jnthn ijneb: Funding - I put out a call at 6guts.wordpress.com/2017/05/12/loo...t-funding/ a while ago, and TPF also run Perl 6 grants via their normal process and also www.perlfoundation.org/perl_6_core_...pment_fund
Yeah, Prague is being a very nice place to live. :-) 22:37
22:38 wamba left
jnthn On regexes vs grammars - actually the engine is the same, but I'd say it's been tuned more for grammars becuase we use it to parse Perl 6 source 22:38
22:38 cdg left
jnthn But yeah, there's a ton of stuff to do 22:38
ijneb Interesting
timotimo my internet connection dropped :| 22:39
ijneb You should setup a bitcoin/any crypto address & a paypal jnthn
timotimo bitcoin, that's the thing you can buy alpaca wool socks with, right? 22:40
ijneb or even a patreon
timotimo i think you can get a pair of socks + shipping for around 5k bitcoin, is that about right?
ijneb lol
It would be cool to have an official development funding page on perl6.org 22:41
timotimo i don't actually know what price the socks were going for at the start
ijneb Maybe under 'Community' in the footer, put a link to where anyone can donate for different parts of development 22:42
I've seen other projects have a lot of success with forum funding systems 22:43
timotimo anyway, what i was typing before my connection dropped:
22:44 Rawriful left
timotimo startup of the regex engine and especially setting up the match object afterwards is costly, but for many regexes we could skip the regex engine completely, for example if you just match /foo/ we can just .index and create a match object immediately 22:44
just recently we had a performance comparison between perl5 and perl6 for reading lines from "yes" and switching y to n with s/y/n/ and it was horribly slow, but could be made much faster by using different primitives 22:46
andreoss 10kB/s 22:48
timotimo oh, we also write every n\n individually while perl5 buffers
perl5 writes 8192 bytes at once
ijneb Is it possible to speed up something as simple as a loop
timotimo it is
jnthn Yes. In fact, for ^1000000 { } got faster this month, I'd expect :) 22:49
timotimo the most important bit "nowadays" is that we should be able to inline the loop body
ijneb jnthn: What in particular made it faster?
jnthn ijneb: We started being able to inline the block
timotimo that means we don't have to build and destroy stack frames over and over again, and not do the whole invocation song-and-dance
jnthn Heh, timotimo is way ahead of me 22:50
ijneb interesting
jnthn A few people have suggested Pateron. I should look into it and check how it works with taxes and such.
*patreon
timotimo jnthn: "way" is a bit much :)
ijneb jnthn: It would be nice to have a simple way to immediately start donating to you without any interaction is all 22:51
timotimo there's also a few extra optimizations we have for "for ^1000", i.e. a literal range. we turn those into a simple c-style loop with initialization, check, and increment
22:51 espadrine left
timotimo and for other simple for loops we turn it into something like grabbing an iterator and pull-one-ing one item at a time 22:53
andreoss `perl6 -pe ''` is almost the same speed as `-pe 's/y/n/'`
timotimo andreoss: it'd be a whole lot faster if we were buffering ...
on my machine i get 5.18s for -pe '' and 1.36s for -ne '' 22:54
ijneb Is there a speed difference in 0..1000000 and ^999999 22:55
for looping I mean 22:56
timotimo if we're unlucky, then yes. i'd call that a bug that can be fixed
andreoss there used to be a huge difference between for and while doing the same thing
ijneb andreoss: Is that completely gone? 22:57
andreoss idk
you should really run perl6-bench
timotimo huh. 22:59
i set buffer but it's still writing every y\n individually
now it works
huh, looks like i was off the mark actually 23:00
ijneb It seems that `for 0..1000000 { }` almost always out performs `loop (my $i = 0; $i < 1000000; $i++)`
timotimo it probably uses "int"
ijneb hm 23:01
jnthn Gotta rest; back tomorrow o/
timotimo 'nite jnthn
ijneb Night jnthn
timotimo everything i thought i knew about performance was wrong 23:02
ijneb timotimo: What do you mean
timotimo i'm trying multiple versions of the -pe '' equivalent code
andreoss perl6 -ne '$*OUT.write($*IN.read) while ! $*IN.eof' is fast though 23:03
timotimo what are you piping into that?
andreoss yes
timotimo no, i mean what? :P :P 23:04
ilmari bash: what: command not found
:P
andreoss the output of `yes`
ijneb lol 23:05
timotimo of course that's fast, it doesn't do anything with lines :)
i mean line splitting
and doing $*OUT.say($*IN.get) is a lot slower than for $*IN.lines { $*OUT.say($_) }
the first one being in a while loop
grr what's wrong with appveyor 23:06
it thinks the build is still running
23:07 pmurias left
timotimo the dynamic variables make a big difference 23:08
if you have a "my $in = $*IN; my $out = $*OUT" in front of the .say(.get) one, it gets more than 2x faster
andreoss also `while ! $*IN.eof` doesn't work as intended 23:11
timotimo oh? 23:12
andreoss echo | perl6 -ne 'loop { last if $*IN.eof }' 23:13
what am i doing wrong here?
timotimo you're using $*IN.eof inside a loop inside a -ne 23:15
ilmari .get will return Nil at EOF, so how about '$out.say($_) while $_ = $in.get'? 23:16
timotimo hmm
ilmari: because "" is False
andreoss -n wasn't supposed to be there 23:17
ilmari timotimo: while defined($_ = $in.get), then?
timotimo that'd be better
may not want to forget assignign Nil to $_ will reset it to hold Any 23:18
andreoss echo | perl6 -e 'while ! $*IN.eof {} '
actually even with -n it should finish 23:19
ilmari also, turning off $in.chomp and using $out.print might help too
but now, betdime 23:20
timotimo it could very well be that $*IN.eof just doesn't do its thing if you're iterating over its lines() ? 23:21
andreoss it seems $*IN.eof just doesn't work unless you did $*IO.read first 23:26
*$*IN 23:27
timotimo lines uses .get
ugexe i would assume you look for eof when doing getc, not get or lines 23:28
timotimo with get you get Nil and an undefined thing is what the iterator checks for 23:30
23:31 pierre_ joined, andreoss left
ugexe i thought we checked for .DEFINITE 23:31
timotimo it uses //
ugexe maybe that was a long time ago though
timotimo i believe that does use DEFINITE?
23:31 crazydiamond joined
crazydiamond qq: what's the story with the VMs? After a while os like a 'stalled' feeling I checked-up the news and stumbled upon moarVM... 23:35
worth trying ?
23:36 eater left 23:37 andreoss joined 23:38 andreoss left, eater joined
timotimo well, moarvm has been the go-to vm for running perl6 for a long while now 23:38
i don't know what you mean by "stalled feeling" though? 23:39
23:39 pierre_ left 23:57 leont left