Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-08-20

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:05 AlexDani` joined #perl6
00:08 derp_commander joined #perl6
00:15 derp_commander I keep finding myself reading Perl 6 documentation when I am/should be doing other things
00:19 Geth ¦ ecosystem: 53084e5ce7 | japhb++ (committed using GitHub Web editor) | META.list
00:19 Geth ¦ ecosystem: Add japhb/RPG-Base
00:19 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/53084e5ce7
00:19 derp_commander why is it that, "You cannot use the statement modifier form with else or elsif"
00:20 derp_commander if you could, it would obviate the need for a special ternary operator while providing greater flexibility
00:24 Geth ¦ doc: 5df55806be | (Will "Coke" Coleda)++ | util/update-and-sync
00:24 Geth ¦ doc: use full path to file
00:24 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5df55806be
00:58 MilkmanDan joined #perl6
01:09 BenGoldberg joined #perl6
01:09 Cabanossi joined #perl6
01:50 buggable joined #perl6
01:51 ilbot3 joined #perl6
01:51 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:08 Geth ¦ infrastructure-doc: f0408ac4c3 | (Will Coleda)++ (committed using GitHub Web editor) | hosts/hack.p6c.org.pod
02:08 Geth ¦ infrastructure-doc: add note about force-update
02:08 Geth ¦ infrastructure-doc: review: https://github.com/perl6/infrastructure-doc/commit/f0408ac4c3
02:08 lucasb joined #perl6
02:10 lucasb m: say (True xor True)
02:10 camelia rakudo-moar 2545e6: OUTPUT: «Nil?»
02:11 lucasb so "If both arguments evaluate to C<True>, returns the last argument." isn't accurate
02:12 lucasb m: say (False xor Any)
02:12 camelia rakudo-moar 2545e6: OUTPUT: «(Any)?»
02:13 lucasb If both arguments evaluate to C<False>, *then* it returns the last falsey argument
02:13 shin1 joined #perl6
02:14 lucasb oops, sorry, didn't notice the comments in the PR
02:16 Geth ¦ infrastructure-doc: 9828c3c694 | (Will Coleda)++ (committed using GitHub Web editor) | hosts/hack.p6c.org.pod
02:16 Geth ¦ infrastructure-doc: note node-gyp issue post-upgrade
02:16 Geth ¦ infrastructure-doc: review: https://github.com/perl6/infrastructure-doc/commit/9828c3c694
02:16 ryu0 m: say (1 | 2)
02:16 camelia rakudo-moar 2545e6: OUTPUT: «any(1, 2)?»
02:16 wamba joined #perl6
02:16 ryu0 O_o
02:16 ryu0 m: say (1 & 2)
02:16 camelia rakudo-moar 2545e6: OUTPUT: «all(1, 2)?»
02:17 ryu0 m: say (1 ~| 2)
02:17 camelia rakudo-moar 2545e6: OUTPUT: «3?»
02:17 ryu0 Ah, there it is.
02:19 [Coke] I *think* the doc builds are fixed. please ping me if they appear to hang again.
02:25 R0b0t1_ joined #perl6
02:40 noganex joined #perl6
02:41 geekosaur joined #perl6
02:42 Juerd ryu0: You probably want +| which is the numeric bitwise OR.
02:44 Juerd ryu0: ~| is string bitwise OR, e.g. "a" ~| "1" gives "q"
02:46 [Coke] n
02:49 Juerd n?
02:49 geekosaur a bold assertion...
03:01 ryu0 I see.
03:06 MilkmanDan joined #perl6
03:07 atroxaper joined #perl6
03:08 Cabanossi joined #perl6
03:08 skids joined #perl6
03:17 Geth ¦ ecosystem: 21213f1d76 | (Shoichi Kaji)++ | META.list
03:17 Geth ¦ ecosystem: Add App-P6Ghq to ecosystem
03:17 Geth ¦ ecosystem:
03:17 Geth ¦ ecosystem: See https://github.com/skaji/App-P6Ghq
03:17 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/21213f1d76
03:33 atroxaper joined #perl6
03:38 Cabanossi joined #perl6
03:45 derp_commander m: gather {take 2**$_ for 1..9}
03:45 camelia rakudo-moar 2545e6: ( no output )
03:47 derp_commander m: put gather {take 2**$_ for 1..9};
03:47 camelia rakudo-moar 2545e6: OUTPUT: «2 4 8 16 32 64 128 256 512?»
03:48 pierre_ joined #perl6
03:48 xinming joined #perl6
04:08 Cabanossi joined #perl6
04:29 [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 [Coke] https://gist.github.com/coke/f00cdc1b59f3a4176357c990a54b06f9
04:31 [Coke] ah, I see it now; the examples treat the sub line specially.
04:37 sacomo hi #perl6
04:38 derp_commander ohai
04:38 derp_commander I upgraded ur perl
04:46 [Coke] ~
04:47 leedo joined #perl6
04:49 Todd joined #perl6
04:50 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:51 Todd http://vpaste.net/hIfLJ
04:54 [Coke] which version of Net::SMTP are you using? (zef info Net::SMTP)
04:54 [Coke] (line with Identity)
04:55 Todd How do I tell?
04:55 [Coke] ... you run the command: "zef info Net::SMTP"
04:56 [Coke] 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
04:56 [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.
04:57 [Coke] What is your perl6 version? (perl6 -v)
04:58 Todd $ rpm -qa rakudo rakudo-0.2017.07-2.el7.x86_64
04:58 Todd $ perl6 -v This is Rakudo version 2017.07 built on MoarVM version 2017.07 implementing Perl 6.c.
04:59 leedo joined #perl6
05:01 leedo_ joined #perl6
05:02 Todd If I take the :ssl out, it just hangs
05:02 [Coke] I get a different error: https://gist.github.com/coke/6f62c26d76edd17b85a38e6a9f3ad0a1
05:03 [Coke] that's with 2017.07-214-g2545e6d65 and Net::SMTP:ver('1.1.0')
05:03 Todd Huh?  Be back in three minutes
05:04 [Coke] Either way, I'd open a ticket with Net::SMTP
05:04 [Coke] I'm out; good luck.
05:07 Todd I'm back
05:08 Todd https://github.com/retupmoca/P6-Net-SMTP/issues/17
05:08 Cabanossi joined #perl6
05:24 Todd Bye bye.  Thank you for the help!
05:36 cpage_ joined #perl6
06:19 ufobat joined #perl6
06:28 geekosaur joined #perl6
06:32 ShalokShalom_ joined #perl6
06:46 nalley joined #perl6
06:46 darutoko joined #perl6
06:53 Cabanossi joined #perl6
06:56 ggoebel joined #perl6
06:57 zakame joined #perl6
07:08 zengargoyle joined #perl6
07:20 wamba joined #perl6
07:38 Cabanossi joined #perl6
07:42 rindolf joined #perl6
07:43 domidumont joined #perl6
07:48 domidumont joined #perl6
08:03 espadrine_ joined #perl6
08:13 pierre_ joined #perl6
08:25 Exodist joined #perl6
08:46 nadim joined #perl6
09:10 mr-foobar joined #perl6
09:12 andrzejku joined #perl6
09:15 leont joined #perl6
09:16 pmurias joined #perl6
09:38 Cabanossi joined #perl6
09:54 Skarsnik joined #perl6
09:55 Skarsnik Hello
10:04 hahainternet hi
10:05 ijneb joined #perl6
10:08 Cabanossi joined #perl6
10:18 konsolebox joined #perl6
10:28 nadim morning
10:30 nadim 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 nadim jnthn: ^
10:31 lizmat nadim: wouldn't --ll-exception have told you where it went wrong ?
10:32 nadim I'll try but nothing went wrong, it worked very nicely in fact :)
10:33 lizmat ah
10:33 lizmat hmmm
10:33 lizmat use trace ?
10:33 lizmat m: use trace; my $a = "hello world"
10:33 camelia rakudo-moar 1eeb94: OUTPUT: «2 (<tmp> line 1)?my $a = "hello world"?»
10:33 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
10:34 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 :)
10:34 lizmat and since Junctions are a HLL thing mostly, I don't think we have anything at a lower level either
10:35 nadim Good to know
10:35 skaji Hi,
10:35 skaji I found that Proc::Async.bind-stdin left a unix socket open.
10:35 skaji Should I call some methods on Proc::Async if I use bind-stdin?
10:35 skaji Details: https://gist.github.com/skaji/b0b210304e932445890f2a28cf7f53b0
10:35 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 #perl6
10:38 Cabanossi joined #perl6
10:40 Voldenet uh, I wonder if there's a way to dynamically invoke a method?
10:41 Voldenet m: sub method(Str:D :$text) { say $text.elems; }; my %hash = :text("hello world"); method(%hash);
10:41 camelia rakudo-moar 1eeb94: OUTPUT: «Too many positionals passed; expected 0 arguments but got 1?  in sub method at <tmp> line 1?  in block <unit> at <tmp> line 1??»
10:42 timotimo of course, you just have to |%hash
10:42 Voldenet Oh, now that's magic.
10:50 Skarsnik hm how I test if a variable do a role?
10:51 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 #perl6
10:52 Skarsnik Ohh yeah ~~ work for role too w)
10:54 pierre_ joined #perl6
10:55 smls joined #perl6
10:56 smls m: "a" ~~ / {say "in regex"} b /;
10:56 camelia rakudo-moar 1eeb94: OUTPUT: «in regex?in regex?»
10:57 smls Why does this^^ execute the code block twice?
10:57 timotimo backtracking
10:57 timotimo i expect it tries to match a b at char 0, then a b at char 1
10:58 timotimo m: "a" ~~ / { say "in regex at $/.from()" } b /
10:58 camelia rakudo-moar 1eeb94: OUTPUT: «in regex at 0?in regex at 1?»
10:58 timotimo there you go
10:59 smls Ah, I didn't consider that it tries matching at every start point.
10:59 smls m: "a" ~~ / ^ {say "in regex"} b /;
10:59 camelia rakudo-moar 1eeb94: OUTPUT: «in regex?»
10:59 smls Ok, thanks.
11:00 Skarsnik I wonder what use it could have
11:00 andrzejku_ joined #perl6
11:01 Rawriful joined #perl6
11:04 pierre_ joined #perl6
11:10 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
11:10 masak timotimo: thanks, will look
11:11 * 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
11:12 masak smls: yes, that's the thing.
11:12 masak smls: thing is too, it's very context-dependent
11:13 masak for example, TOP *does* anchor automatically at both ends
11:13 masak and something like `is parsed` should obviously only match at the current position in the program
11:19 Voldenet > Prefixing a parameter with a vertical bar | makes the parameter a Capture, using up all the remaining positional and named arguments.
11:19 Voldenet m: sub a(|b) { say |b }; a(:c<d>);
11:19 camelia rakudo-moar 10df9a: OUTPUT: «Unexpected named argument 'c' passed?  in sub a at <tmp> line 1?  in block <unit> at <tmp> line 1??»
11:20 Voldenet hm, it doesn't seem to use capture named arguments
11:22 Skarsnik is there a way to know on how many nested loop we are?
11:22 masak Skarsnik: ...count them?
11:23 masak for @a { for @b { for @c { #`[ now we're in three nested loops ] } } }
11:24 Skarsnik Could be useful for display stuff like for { say "blabla" for {say " " x $spacing, "blabla"}}
11:25 masak I usually go with a contextual parameter `$*indent = 0`, and then recurse
11:29 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 smls m: sub a(|b) { say b }; a(:c<d>);
11:29 camelia rakudo-moar 10df9a: OUTPUT: «\(:c("d"))?»
11:30 Voldenet Ah, silly me, you're right.
11:31 sakuya joined #perl6
11:32 araraloren evening
11:35 nowan joined #perl6
11:35 pmurias araraloren_fake: hi
11:36 araraloren_fake pmurias, o/
11:49 nowan joined #perl6
11:52 leont Is there a nice syntax equivalent to stacked file operators from perl5 (-r -w -x $_)
11:54 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:55 Skarsnik Don't we have like :w :r :x ?
11:55 AlexDaniel m: say (:a:b:c)
11:55 camelia rakudo-moar 10df9a: OUTPUT: «(a => True b => 1 c => 1)?»
11:56 Skarsnik I mean for leont :)
11:56 nowan joined #perl6
11:57 AlexDaniel leont: what about $smth ~~ all (:r :w :x)
11:58 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
12:00 Skarsnik m: my Set $a; $a.push(1); say $a
12:00 camelia rakudo-moar 10df9a: OUTPUT: «Type check failed in assignment to $a; expected Set but got Array ($[])?  in block <unit> at <tmp> line 1??»
12:00 araraloren_fake joined #perl6
12:00 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 timotimo but of course there's also matches that can be zero-width
12:01 leont AlexDaniel: that seems to work, though I hadn't expected that space between all and ( to be so important
12:08 Cabanossi joined #perl6
12:12 moritz leont: it's because :r in a call is a named argument, not a pair
12:17 Skarsnik having Set has hash is not fun to use IMO :(
12:18 moritz I can imagine; sets work best with value types
12:18 smls leont: See https://docs.perl6.org/language/5to6-nutshell.html#Whitespace
12:19 Skarsnik say "Dependancies are : ", @files-deps.Set.keys.join(' - '); is not a great workaround x)
12:19 evalable6 Skarsnik, rakudo-moar 10df9a95b: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/pmqpLDkKXL?Variabl…»
12:19 evalable6 Skarsnik, Full output: https://gist.github.com/23210a8038ce04438d2baad0237e07ff
12:20 timotimo Skarsnik: then use .unique
12:21 Skarsnik Well I really wanted a Set instead of just an array. But I did not figure how to use it nicely
12:22 timotimo m: say Set(<a b c d e>).fmt("%s").perl
12:22 camelia rakudo-moar 10df9a: OUTPUT: «"e\nd\nb\na\nc"?»
12:23 timotimo m: say Set(<a b c d e>).fmt("%s", " - ").perl
12:23 camelia rakudo-moar 10df9a: OUTPUT: «"e - d - b - a - c"?»
12:23 Skarsnik Yeah it's nice when it's ummutable like this
12:24 Skarsnik but I wanted something like my Set $dep-file; $dep-file.push($value); so it keep an array of unique value
12:25 timotimo you know about SetHash, right?
12:25 timotimo i mean, if you just use a regular hash and %things{$value} = 1, that'll also work i bet
12:26 Skarsnik I tried SetHash but having to push a Pair is just weird
12:28 timotimo well, you don't need to use .push, you can just use = :)
12:28 timotimo though if you want you can mix in a role that gives you a "set" method
12:29 Skarsnik (it's funny because std::set in C++ are sorted)
12:31 Skarsnik = ? but I just want to populate my Set dynamicly, not juste once
12:33 araraloren_fake Set is immutable.
12:34 Skarsnik yeah but SetHash is mutable, but it's usable like a hash, it's just so weird for me
12:35 piojo joined #perl6
12:35 araraloren_fake Skarsnik, what you mean not like a hash ?
12:40 piojo I found a short regex that almost crashed my computer :D
12:41 piojo I won't tell Camila to run it, but:
12:41 piojo S/'foo(' (<![)]>+) ');'/($0).Foo();/ given 'foo(a => 3, b => 4); # comment comment'
12:42 piojo just because I accidentally used "!" instead of "-" to say "don't match the paren"--  [^)] in other programming languages
12:43 timotimo yeah, that gives you a zero-width match
12:43 timotimo if you quantify that, it'll happily match as often as it can until you kill the process
12:43 piojo the VM ate an additional 300 MB of RAM every second
12:44 piojo timotimo: oh, that's disappointing. I guess I should, you know, not do that then :)
12:44 andreoss joined #perl6
12:45 nadim msg camelia m: True
12:46 timotimo it's not wrong per se, but it's very unlikely to be what you want
12:47 nadim utf8 doe not have a WHICH is it by design? eg: "test".encode('utf-8').WHICH.say would fail
12:48 nadim 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
12:48 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 -
12:49 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
12:50 timotimo i would say WHICH on an utf-8 should work
12:50 nadim m: "test".encode('utf-8').WHICH.say
12:50 camelia rakudo-moar 10df9a: OUTPUT: «Can not decode a utf-8 buffer as if it were latin-1?  in block <unit> at <tmp> line 1??»
12:50 timotimo which shouldn't change more than twice, i believe
12:50 lizmat nadim: any time an object survives the nursery, it will have its .WHERE changed
12:51 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
12:51 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.
12:52 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
12:52 timotimo m: say "hello" ~~ / <[a..z] - [uiaeo]> /
12:52 camelia rakudo-moar 10df9a: OUTPUT: «?h??»
12:52 timotimo the - can also come first so you don't have to write <[]-[blah]>
12:53 timotimo 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:54 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]>/;
12:54 camelia rakudo-moar 10df9a: OUTPUT: «?h??»
12:54 araraloren_fake m: say "hello" ~~ /<![a..z] - [u]>/;
12:54 camelia rakudo-moar 10df9a: OUTPUT: «?h??»
12:54 timotimo registers are bound by total system memory, but int8[] is going to be an array object rather than a bunch of registers
12:54 piojo m: say ~("hello" ~~ /<![a..z] - [u]>/);
12:55 camelia rakudo-moar 10df9a: OUTPUT: «h?»
12:55 nadim timotimo: and does .WHERE called multiple times change the nursery ->gen2 state?
12:55 timotimo i don't see why it would
12:55 piojo timotimo: Thanks. That does make sense. I don't know why my mind wants it to be "not" so badly.
12:56 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
12:56 timotimo it's one kind of not, but these assertions are multi-dimensional
12:58 nadim m: "test".encode('utf-8').WHICH.say
12:58 camelia rakudo-moar 10df9a: OUTPUT: «Can not decode a utf-8 buffer as if it were latin-1?  in block <unit> at <tmp> line 1??»
12:58 nadim is there a way to get ^ to work?
12:58 araraloren_fake say "foo(' where ')"/'foo(' (<-[)]>+) ');'/
12:58 evalable6 araraloren_fake, rakudo-moar 10df9a95b: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/iI1diszAXq?Two ter…»
12:58 evalable6 araraloren_fake, Full output: https://gist.github.com/100d9d88a9cee98ccd696493faa57e0b
12:59 araraloren_fake m: say "foo(' where ')" ~~ /'foo(' (<-[)]>+) ');'/
12:59 camelia rakudo-moar 10df9a: OUTPUT: «Nil?»
12:59 araraloren_fake m: say "foo ' where '" ~~ /'foo(' (<-[)]>+) ');'/
12:59 camelia rakudo-moar 10df9a: OUTPUT: «Nil?»
13:07 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:21 lucasb joined #perl6
13:26 nadim a SOAP module that would handle large requests? anything?
13:28 lizmat nadim: isn't that what TCP/IP is supposed to do ?
13:32 nowan joined #perl6
13:32 timotimo yeah, TCP/IP doesn't have a package-related API, so splitting is implicit and more or less invisible
13:36 pmurias lizmat: sometimes layering ordering and reliability on top of UDP works better than TCP/IP
13:37 lizmat if you can afford to be lossy, I guess
13:37 lizmat otherwise you're doomed to re-invent TCP/IP, no ?
13:38 pmurias lizmat: what I mean is that re-inventing TCP/IP can work a lot better in some circumstances then UDP
13:38 pmurias lizmat: chrome can do HTTP over UDP: https://en.wikipedia.org/wiki/QUIC
13:39 lizmat interesting..  :-)
13:40 * lizmat hopes that all hardware on the way can cope with large amounts of UDP traffic
13:41 lizmat at former $work, huge amounts of UDP traffic caused micro-blackouts wreaking havoc on establishing TCP/IP database connections
13:41 lizmat afk for a bit&
13:45 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:56 pierre_ joined #perl6
13:57 pmurias nadim: I don't understand what you want your module to do
13:59 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 nadim like netstring for example
14:11 pierre_ joined #perl6
14:12 grumble joined #perl6
14:23 MilkmanDan joined #perl6
14:26 mr-foobar joined #perl6
14:26 nowan joined #perl6
14:27 releasable6 joined #perl6
14:37 zakharyas joined #perl6
14:47 Khisanth joined #perl6
14:49 * leont is surprised but is an non-associative operator, but I guess my idea to do [but] may be a bit crazy anyway
14:51 moritz leont: what was your expectation? left-assoc?
14:52 leont Yeah
14:52 atroxaper joined #perl6
14:53 wamba joined #perl6
14:53 Cabanossi joined #perl6
14:59 mr-foobar joined #perl6
15:20 espadrine_ joined #perl6
15:22 Geth ¦ doc: f6820f32f2 | (Elizabeth Mattijsen)++ | doc/Type/atomicint.pod6
15:22 Geth ¦ doc: Follow naming changes in atomic operators
15:22 Geth ¦ doc:
15:22 Geth ¦ doc: As done in https://github.com/rakudo/rakudo/commit/ca8aafc173
15:22 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f6820f32f2
15:22 mr-fooba_ joined #perl6
15:23 pierre_ joined #perl6
15:36 smls bisectable6:  say "a".match(/a/).made;
15:36 bisectable6 smls, Bisecting by exit code (old=2015.12 new=ca8aafc). Old exit code: 0
15:37 bisectable6 smls, bisect log: https://gist.github.com/c6fe807f146fceef7e1eb12415424e37
15:37 bisectable6 smls, There are 20 candidates for the first “new” revision. See the log for more details
15:38 smls What does that mean?
15:40 smls 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
15:41 bisectable6 smls, bisect log: https://gist.github.com/1176206b14ad722b53e6c6e920e60357
15:41 bisectable6 smls, There are 20 candidates for the first “new” revision. See the log for more details
15:42 timotimo smls: look at the log, it's just a whole bunch of skipped commits :(
15:43 smls heh, the first of the listed commits sounds like it could be it:  https://github.com/rakudo/rakudo/commit/18bb9be2175248b49780378e62337ab91f910881
16:03 AlexDaniel smls: usually this is what you get when a bunch of commits are merged (where intermediate commits are unbuildable)
16:04 AlexDaniel smls: or if there was nqp bump involved
16:07 AlexDaniel smls: can you submit a ticket with this?
16:07 smls AlexDaniel: Writing it now.
16:11 moritz the other thing we could do is revert breaking changes more quickly
16:11 moritz sorry, wrong channel
16:13 smls https://docs.perl6.org/language <-- Didn't this use to redirect to /language.html ?
16:13 smls Not it returns a raw folder listing.
16:17 smls *Now
16:20 AlexDaniel smls: I think so. Maybe worth a doc bug so it doesn't slip through the cracks
16:20 smls k
16:39 ShalokShalom left #perl6
16:45 pilne joined #perl6
17:08 Cabanossi joined #perl6
17:13 zakharyas joined #perl6
17:19 atroxaper joined #perl6
17:20 atroxaper joined #perl6
17:21 atroxaper joined #perl6
17:21 atroxaper joined #perl6
17:22 atroxaper joined #perl6
17:23 atroxaper joined #perl6
17:24 atroxaper joined #perl6
17:24 andrzejku joined #perl6
17:24 cdg joined #perl6
17:25 atroxaper joined #perl6
17:25 atroxaper joined #perl6
17:26 atroxaper joined #perl6
17:27 atroxaper joined #perl6
17:28 ramortegui joined #perl6
17:28 atroxaper joined #perl6
17:29 atroxaper joined #perl6
17:30 atroxaper joined #perl6
17:30 atroxaper joined #perl6
17:31 atroxaper joined #perl6
17:32 atroxaper joined #perl6
17:33 atroxaper joined #perl6
17:33 atroxaper joined #perl6
17:34 atroxaper joined #perl6
17:35 atroxaper joined #perl6
17:36 atroxaper joined #perl6
17:37 atroxaper joined #perl6
17:37 atroxaper joined #perl6
17:38 skids joined #perl6
17:38 atroxaper joined #perl6
17:39 atroxaper joined #perl6
17:40 atroxaper joined #perl6
17:41 atroxaper joined #perl6
17:41 atroxaper joined #perl6
17:42 atroxaper joined #perl6
17:43 atroxaper joined #perl6
17:44 atroxaper joined #perl6
17:45 atroxaper joined #perl6
17:45 atroxaper joined #perl6
17:46 atroxaper joined #perl6
17:47 atroxaper joined #perl6
17:48 atroxaper joined #perl6
17:49 atroxaper joined #perl6
17:49 atroxaper joined #perl6
17:50 atroxaper joined #perl6
17:51 atroxaper joined #perl6
17:52 atroxaper joined #perl6
17:53 atroxaper joined #perl6
17:53 atroxaper joined #perl6
17:54 atroxaper joined #perl6
17:55 atroxaper joined #perl6
17:56 atroxaper joined #perl6
17:57 atroxaper joined #perl6
17:57 atroxaper joined #perl6
17:58 atroxaper joined #perl6
17:59 atroxaper joined #perl6
18:00 beame-ilya joined #perl6
18:00 atroxaper joined #perl6
18:00 aeruder left #perl6
18:01 atroxaper joined #perl6
18:01 BrainLess joined #perl6
18:01 aeruder joined #perl6
18:01 atroxaper joined #perl6
18:02 atroxaper joined #perl6
18:03 atroxaper joined #perl6
18:04 atroxaper joined #perl6
18:05 ufobat joined #perl6
18:05 atroxaper joined #perl6
18:05 atroxaper joined #perl6
18:06 atroxaper joined #perl6
18:07 atroxaper joined #perl6
18:08 atroxaper joined #perl6
18:08 Cabanossi joined #perl6
18:09 atroxaper joined #perl6
18:09 atroxaper joined #perl6
18:17 gfldex is there a way to initialise a class attribute at BEGIN time?
18:19 Skarsnik the eternal question
18:26 moritz m: class A { our $.x = 42 }; BEGIN say A.x
18:26 camelia rakudo-moar 7a22d6: OUTPUT: «(Any)?»
18:27 moritz m: class A { our $.x = 42 }; say A.x
18:27 camelia rakudo-moar 7a22d6: OUTPUT: «42?»
18:28 moritz m: class A { our $.x is rw; }; BEGIN A.x = 42; BEGIN say A.x
18:28 camelia rakudo-moar 7a22d6: OUTPUT: «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?        …»
18:28 moritz m: class A { our $.x; }; BEGIN A.x = 42; BEGIN say A.x
18:28 camelia rakudo-moar 7a22d6: OUTPUT: «42?»
18:28 moritz gfldex: ^^ :-)
18:48 pierre_ joined #perl6
18:51 gfldex lolibloggedalittle: https://gfldex.wordpress.com/2017/08/20/preparations-for-your/
18:54 BrainLess joined #perl6
19:15 dmaestro joined #perl6
19:19 TEttinger joined #perl6
19:28 cono m: my $x = (1, 2, 3); my $y = ($x.flat, 4).flat; $y.say
19:28 camelia rakudo-moar 7a22d6: OUTPUT: «(1 2 3 4)?»
19:29 cono is there any other way to crate new list w/o double .flat
19:30 cono nvm, looks like found :D
19:30 cono m: my $x = (1, 2, 3); my $y = (|$x, 4); $y.say
19:30 camelia rakudo-moar 7a22d6: OUTPUT: «(1 2 3 4)?»
19:30 moritz that's cheating; prefix | is basically just .flat
19:31 * moritz would like a proper list concatenation op
19:31 cono m: my $x = (1, 2, 3); my $y = ($x.flat, 4); $y.say
19:31 camelia rakudo-moar 7a22d6: OUTPUT: «((1 2 3) 4)?»
19:31 cono why then its different ?
19:32 cono 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
19:32 camelia rakudo-moar 7a22d6: OUTPUT: «(1 2 3 4)?»
19:33 moritz ok, not exactly the same, it's more like .split
19:33 moritz *slip
19:33 cono y
19:33 gfldex m: my $x = (1, 2, 3); my @y = |$x, 4; dd @y
19:33 camelia rakudo-moar 7a22d6: OUTPUT: «Array @y = [1, 2, 3, 4]?»
19:38 Cabanossi joined #perl6
19:38 cono moritz: btw, I got 3 books from last YAPC and only one w/o Author signature ;) Guess which one!
19:39 cono Perl6 books*
19:40 moritz cono: I'll be happy to sign it for you when we meet in person :-)
19:41 * cono (handshake) moritz
19:49 leont Does perl6 happen to have a value containing the time when it started?
19:50 gfldex m: say $started = BEGIN now; sleep 5; say $started;
19:50 camelia rakudo-moar 7a22d6: OUTPUT: «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?»
19:50 gfldex m: my $started = BEGIN now; sleep 5; say $started;
19:50 camelia rakudo-moar 7a22d6: OUTPUT: «Instant:1503258646.834456?»
19:51 leont Ah, apparently there's $*INITTIME :-)
19:51 cdg joined #perl6
19:51 leont Not documented under variables, but it is in 5to6
19:52 gfldex leont: be careful, that one might now be specced
19:52 * gfldex goes to check
19:53 gfldex it is not
19:55 pecastro joined #perl6
19:55 lizmat fwiw, there are no tests for it either
19:57 moritz leont: INIT now is more likely what you want than BEGIN now
19:57 moritz BEGIN happens at *compile* time, which for a precompiled module might have been ages ago
19:59 tadzik m: say $*BEGINTIME #hmmm
19:59 camelia rakudo-moar 7a22d6: OUTPUT: «Dynamic variable $*BEGINTIME not found?  in block <unit> at <tmp> line 1??»
20:01 Rawriful joined #perl6
20:04 leont Shouldn't that be $?BEGINTIME then?
20:04 zakharyas joined #perl6
20:06 lizmat leont: $*INITTIME gets basically set whenever line 628 in Rakudo::Internals gets executed
20:06 lizmat which is pretty early in the INIT sequence
20:06 cdg joined #perl6
20:09 gfldex leont: issues for docs and roast filed for $*INITTIME. Thanks for asking.
20:25 brrt joined #perl6
20:28 rindolf joined #perl6
20:38 Cabanossi joined #perl6
21:02 smls joined #perl6
21:07 Rawriful joined #perl6
21:24 AlexDaniel we had an interesting doc issue for it
21:24 AlexDaniel https://github.com/perl6/doc/issues/510
21:26 AlexDaniel notice that {INIT now} is much later than $*INITTIME, but earlier than {BEGIN now} :)
21:27 AlexDaniel if you want to add some extra confusion to your code, use INIT time ;P
21:27 AlexDaniel which doesn't even return an instant :)
21:53 Cabanossi joined #perl6
21:56 andreoss joined #perl6
21:58 geekosaur joined #perl6
21:59 Geth ¦ doc: cc6f61e5b0 | (Elizabeth Mattijsen)++ | doc/Type/atomicint.pod6
21:59 Geth ¦ doc: Follow renaming of Texas atomic ops
21:59 Geth ¦ doc:
21:59 Geth ¦ doc: As per https://github.com/rakudo/rakudo/commit/1aee9aa573
21:59 Geth ¦ doc: review: https://github.com/perl6/doc/commit/cc6f61e5b0
22:05 ijneb Is perl6 ever going to ship with any distros?
22:07 AlexDaniel ijneb: it already does
22:07 ijneb I mean default-ly installed
22:07 geekosaur as part of the base system? depends on what distributions choose to use it for something
22:07 geekosaur which is up to them, not anyone here
22:07 ijneb geekosaur: Yeah, that's what I meant, sorry
22:07 AlexDaniel this depends on… well, if something is going to depend on it
22:08 ijneb I wonder if or when that will happen
22:08 ijneb may bring more attention to perl6
22:08 timotimo actually, i'd expect a lot of pushback instead
22:09 ijneb why?
22:09 ijneb I feel like many perl5 users look down on perl6
22:10 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
22:10 timotimo actually, i don't have a good reason for that thought
22:10 timotimo just a feeling
22:11 ijneb I like the name rakudo
22:11 timotimo it's a nice name for sure
22:12 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
22:12 timotimo i was never a perl coder before moving to perl6 from python
22:12 ijneb I've never even touched perl5
22:12 timotimo all my ingrained perl hate got washed away over the course of a day or two
22:12 ijneb I feel rakudo WOULD set a better name for the language
22:13 ijneb but I'm in no place to have a say-so obviously lol
22:14 ijneb Are there any other perl6 compilers comparable to rakudo?
22:14 atroxaper joined #perl6
22:14 andreoss no
22:14 andreoss https://perl6.org/compilers/
22:15 AlexDaniel not anymore, and not yet :)
22:16 ijneb Perlito seems cool
22:16 timotimo perlito compiles a qiute small subset of perl6
22:16 ijneb dang
22:17 ijneb Doesn't seem too active either sadly
22:17 timotimo i believe it's considered finished
22:18 timotimo has been for ... years maybe?
22:18 ijneb What is niecza
22:19 ijneb Also, is moarvm generally faster than jvm?
22:19 ijneb or is it the other way around
22:20 andreoss jvm is supposed to be faster
22:20 ijneb What is moarvm written in
22:20 andreoss ijneb: there's perl6-benchmark which covers this stuff
22:23 ijneb Is it possible that I could contribute to moarvm's development after benchmarking?
22:23 timotimo moarvm's written in C
22:24 ijneb I've been using C for a good while
22:24 ijneb Would I have the know the ins-and-outs of moarvm to contribute?
22:24 AlexDaniel depends
22:24 timotimo not all of the ins and outs, but different pieces of the project require different subsets of knowledge
22:25 ijneb I see
22:27 timotimo there are some major sources of performance problems
22:28 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
22:28 ijneb lizmat?
22:28 ijneb Is that a person
22:29 timotimo yup
22:29 timotimo she's also been writing the p6weekly for a long time now
22:29 ijneb Will migrating to nqp ops drastically improve performance issues?
22:29 andreoss will these pieces be rewritten back in perl6 when moarvm is fixed?
22:29 timotimo https://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"
22:30 ijneb Yeah, I've been glossing over those for a while now
22:30 jnthn haha..."fixed"
22:30 timotimo actually, the performance win is only partially "just" the rewrite
22:30 timotimo many times the new code also uses a cleverer algorithm as well
22:31 ijneb jnthn seems to be really knowledgeable on this sorta stuff
22:31 timotimo there's still many performance opportunities in the regex engine
22:32 ijneb jnthn: Where did you learn this kind of stuff?
22:32 ijneb Aren't regexes still faster than grammars by a ton
22:32 andreoss i mean when some optimizers added or somthing like that
22:32 jnthn But yeah, when MoarVM learns how to do a few dozen more complicated optimizations... :)
22:34 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.
22:35 ijneb That's sweet
22:36 ijneb Prague looks really gorgeous in a lot of places
22:36 ijneb I'm jealous
22:36 jnthn ijneb: Funding - I put out a call at https://6guts.wordpress.com/2017/05/12/looking-for-perl-6-rakudo-and-moarvm-development-funding/ a while ago, and TPF also run Perl 6 grants via their normal process and also http://www.perlfoundation.org/perl_6_core_development_fund
22:37 jnthn Yeah, Prague is being a very nice place to live. :-)
22:38 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 jnthn But yeah, there's a ton of stuff to do
22:38 ijneb Interesting
22:39 timotimo my internet connection dropped :|
22:39 ijneb You should setup a bitcoin/any crypto address & a paypal jnthn
22:40 timotimo bitcoin, that's the thing you can buy alpaca wool socks with, right?
22:40 ijneb or even a patreon
22:40 timotimo i think you can get a pair of socks + shipping for around 5k bitcoin, is that about right?
22:40 ijneb lol
22:41 ijneb 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
22:42 ijneb Maybe under 'Community' in the footer, put a link to where anyone can donate for different parts of development
22:43 ijneb 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 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:46 timotimo 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:48 andreoss 10kB/s
22:48 timotimo oh, we also write every n\n individually while perl5 buffers
22:48 timotimo perl5 writes 8192 bytes at once
22:48 ijneb Is it possible to speed up something as simple as a loop
22:48 timotimo it is
22:49 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
22:49 ijneb jnthn: What in particular made it faster?
22:49 jnthn ijneb: We started being able to inline the block
22:49 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
22:50 jnthn Heh, timotimo is way ahead of me
22:50 ijneb interesting
22:50 jnthn A few people have suggested Pateron. I should look into it and check how it works with taxes and such.
22:50 jnthn *patreon
22:50 timotimo jnthn: "way" is a bit much :)
22:51 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:53 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/'`
22:53 timotimo andreoss: it'd be a whole lot faster if we were buffering ...
22:54 timotimo on my machine i get 5.18s for -pe '' and 1.36s for -ne ''
22:55 ijneb Is there a speed difference in 0..1000000 and ^999999
22:56 ijneb for looping I mean
22:56 timotimo if we're unlucky, then yes. i'd call that a bug that can be fixed
22:56 andreoss there used to be a huge difference between for and while doing the same thing
22:57 ijneb andreoss: Is that completely gone?
22:57 andreoss idk
22:57 andreoss you should really run perl6-bench
22:59 timotimo huh.
22:59 timotimo i set buffer but it's still writing every y\n individually
22:59 timotimo now it works
23:00 timotimo 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++)`
23:00 timotimo it probably uses "int"
23:01 ijneb hm
23:01 jnthn Gotta rest; back tomorrow o/
23:01 timotimo 'nite jnthn
23:01 ijneb Night jnthn
23:02 timotimo everything i thought i knew about performance was wrong
23:02 ijneb timotimo: What do you mean
23:02 timotimo i'm trying multiple versions of the -pe '' equivalent code
23:03 andreoss perl6 -ne '$*OUT.write($*IN.read) while ! $*IN.eof' is fast though
23:03 timotimo what are you piping into that?
23:03 andreoss yes
23:04 timotimo no, i mean what? :P :P
23:04 ilmari bash: what: command not found
23:04 ilmari :P
23:04 andreoss the output of `yes`
23:05 ijneb lol
23:05 timotimo of course that's fast, it doesn't do anything with lines :)
23:05 timotimo i mean line splitting
23:05 timotimo and doing $*OUT.say($*IN.get) is a lot slower than for $*IN.lines { $*OUT.say($_) }
23:05 timotimo the first one being in a while loop
23:06 timotimo grr what's wrong with appveyor
23:06 timotimo it thinks the build is still running
23:08 timotimo the dynamic variables make a big difference
23:08 timotimo if you have a "my $in = $*IN; my $out = $*OUT" in front of the .say(.get) one, it gets more than 2x faster
23:09 Guest40089 left #perl6
23:11 andreoss also `while ! $*IN.eof` doesn't work as intended
23:12 timotimo oh?
23:13 andreoss echo | perl6 -ne 'loop { last if  $*IN.eof }'
23:13 andreoss what am i doing wrong here?
23:15 timotimo you're using $*IN.eof inside a loop inside a -ne
23:16 ilmari .get will return Nil at EOF, so how about '$out.say($_) while $_ = $in.get'?
23:16 timotimo hmm
23:16 timotimo ilmari: because "" is False
23:17 andreoss -n wasn't supposed to be there
23:17 ilmari timotimo: while defined($_ = $in.get), then?
23:17 timotimo that'd be better
23:18 timotimo may not want to forget assignign Nil to $_ will reset it to hold Any
23:18 andreoss echo | perl6 -e 'while ! $*IN.eof {} '
23:19 andreoss actually even with -n it should finish
23:19 ilmari also, turning off $in.chomp and using $out.print might help too
23:20 ilmari but now, betdime
23:21 timotimo it could very well be that $*IN.eof just doesn't do its thing if you're iterating over its lines() ?
23:26 andreoss it seems $*IN.eof just doesn't work unless you did $*IO.read first
23:27 andreoss *$*IN
23:27 timotimo lines uses .get
23:28 ugexe i would assume you look for eof when doing getc, not get or lines
23:30 timotimo with get you get Nil and an undefined thing is what the iterator checks for
23:31 pierre_ joined #perl6
23:31 andreoss left #perl6
23:31 ugexe i thought we checked for .DEFINITE
23:31 timotimo it uses //
23:31 ugexe maybe that was a long time ago though
23:31 timotimo i believe that does use DEFINITE?
23:31 crazydiamond joined #perl6
23:35 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 crazydiamond worth trying ?
23:37 andreoss joined #perl6
23:38 andreoss left #perl6
23:38 eater joined #perl6
23:38 timotimo well, moarvm has been the go-to vm for running perl6 for a long while now
23:39 timotimo i don't know what you mean by "stalled feeling" though?

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo