Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-26

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:07 masak what a nice person.
00:15 robinsmidsrod joined #perl6
00:18 vendethiel masak: wow, that was a length discussion :P
00:24 Peter_R joined #perl6
00:26 vendethiel oh, he's the guy that issue'd on the learnx
00:29 dalek doc: f75b7a3 | skids++ | lib/Type/Capture.pod:
00:29 dalek doc: Expand on Capture documentation
00:29 dalek doc: review: https://github.com/perl6/doc/commit/f75b7a3a72
00:41 vendethiel masak: realized your blog post can now get rid of the "our $sum" :P
00:42 vendethiel (I mean -- it can be lax)
00:49 agentzh joined #perl6
00:53 risou joined #perl6
00:53 japhb I forget -- what's the idiom for re-exporting in imported thing?  (In this case, an imported sub, but I'm also thinking of Enums and constants and such.)
00:54 araujo joined #perl6
00:54 araujo joined #perl6
01:03 fwilson joined #perl6
01:17 masak vendethiel: $ perl6 -ne '/^\d+/ or die; $sum += $/; END say $sum' input
01:17 masak vendethiel: I got this working.
01:17 vendethiel if you don't need it to die, /^\d+/ && $sum += $/ is good as well
01:17 masak (a) END doesn't need the block, (b) like you said, can skip the `our`, (c) need to explicitly separate out the number in the beginning
01:17 vendethiel ignores empty lines
01:18 masak troo
01:18 vendethiel however, lines.grep(^(\d+)/) might be faster
01:19 masak that doesn't use -n at all, though
01:19 masak which was the point of the post :)
01:19 masak 'night, #perl6
01:20 vendethiel right :P
01:51 KCL joined #perl6
01:55 adu joined #perl6
02:00 telex joined #perl6
02:07 adu joined #perl6
02:09 panchiniak joined #perl6
02:09 panchiniak left #perl6
02:09 adu joined #perl6
02:19 virtualsue_ joined #perl6
02:24 atta joined #perl6
02:27 chenryn joined #perl6
02:42 petercom1and joined #perl6
02:46 ilbot3 joined #perl6
02:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
02:47 gr33n7007h joined #perl6
02:48 chenryn joined #perl6
03:20 dalek specs: e315952 | util++ | S (10 files):
03:20 dalek specs: Fix typos.
03:20 dalek specs: review: https://github.com/perl6/specs/commit/e315952ce8
03:26 chenryn joined #perl6
03:34 renormalist joined #perl6
03:45 zhanggong joined #perl6
03:46 yeahnoob joined #perl6
03:47 dj_goku_ joined #perl6
03:49 noganex_ joined #perl6
03:59 chenryn joined #perl6
04:05 flussence m: say q:to{EOT}.perl;␤    foo␤EOT␤
04:05 camelia rakudo-moar 243c16: OUTPUT«"    foo\n"␤»
04:05 flussence didn't that have an implied .indent(*) at some point?
04:06 skids Maybe with an adverb?
04:08 flussence oh! never mind, I'm wrong.
04:08 flussence m: say q:to{EOT}.perl;␤    foo␤    EOT␤
04:08 camelia rakudo-moar 243c16: OUTPUT«"foo\n"␤»
04:08 flussence that makes sense :)
04:29 dalek rakudo/nom: 2def0ea | moritz++ | src/core/Proc/Async.pm:
04:29 dalek rakudo/nom: Revert "One more use of CLONE-LIST-DECONTAINERIZED"
04:29 dalek rakudo/nom:
04:29 dalek rakudo/nom: This reverts commit 371434faeb22ec668d3d0e7744b1cb52158a2b91.
04:29 dalek rakudo/nom:
04:29 dalek rakudo/nom: $args-without is initialized with $!path.Str, which this patch dropped,
04:29 dalek rakudo/nom: rending Proc::Async unusable.
04:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2def0ead87
04:36 agentzh joined #perl6
04:54 dalek doc: 3d7e48a | skids++ | lib/Language/functions.pod:
04:54 dalek doc: Fill in "arguments" section, and link to Capture
04:54 dalek doc: review: https://github.com/perl6/doc/commit/3d7e48a5a8
05:00 chenryn joined #perl6
06:21 dalek roast: 0821592 | moritz++ | S17-supply/categorize.t:
06:21 dalek roast: RT #123674: Test that sub-supplies from categorize get .done
06:21 dalek roast: review: https://github.com/perl6/roast/commit/0821592f86
06:21 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123674
06:33 TimToady "rending X unusable" :)
06:36 moritz argl
06:36 TimToady it seemed apt
06:36 moritz "ranting X unusable" was what I meant, obviously :-)
06:36 TimToady it's the accidental puns that are the best ones
06:42 zby_home joined #perl6
06:48 rindolf joined #perl6
07:16 [Sno] joined #perl6
07:31 Rounin joined #perl6
07:38 xfix joined #perl6
07:55 regreg joined #perl6
07:58 zakharyas joined #perl6
08:04 darutoko joined #perl6
08:04 blackbolt joined #perl6
08:07 blackbolt msg NickServ identify blackbolt opl321
08:07 blackbolt lol
08:11 * moritz hopes blackbolt has changed his password by now :-)
08:12 blackbolt you can try ;-)
08:16 prime joined #perl6
08:25 FROGGS joined #perl6
08:26 chenryn joined #perl6
08:31 dj_goku joined #perl6
08:35 Kristien joined #perl6
08:35 Kristien hola
08:39 moritz good morning Kristien
08:51 xfix joined #perl6
09:07 virtualsue joined #perl6
09:17 lizmat good *, perl6!
09:18 FROGGS hi lizmat
09:18 lizmat moritz: good catch
09:19 lizmat I guess I missed the failure because the procasync/basic test is a flapper (for me, at least)
09:21 lizmat test 28 always fails for me
09:22 dalek rakudo/nom: 88b2d14 | lizmat++ | src/core/ (2 files):
09:22 dalek rakudo/nom: Attempt #2 at using CLONE-LIST-DECONTAINERIZED
09:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/88b2d14876
09:23 lizmat it gets Nil instead Proc::Status
09:23 moritz lizmat: then please fudge the test
09:25 dakkar joined #perl6
09:26 ab5tract anyone have a thought on way we have invisible characters, and what to do about it?
09:26 FROGGS ab5tract: you mean control characters?
09:27 ab5tract FROGGS: i found them while mucking with control characters
09:27 dalek roast: 1064f23 | lizmat++ | S17-procasync/basic.t:
09:27 dalek roast: Fudge failing test
09:27 dalek roast: review: https://github.com/perl6/roast/commit/1064f23bfd
09:27 FROGGS ab5tract: what do you wanna do with them?
09:28 ab5tract m: my @a = ('55x55' ~~ /(\d\d)(x)(\d\d)/).values>>.Str; @a.join.say; @a.join.comb.elems.say
09:28 camelia rakudo-moar 243c16: OUTPUT«55x55␤5␤»
09:28 tgt joined #perl6
09:28 ab5tract hmm, that's not incorrect
09:29 ab5tract FROGGS: if you have a chance to run the code in this gist, it will show you what i am confused about: https://gist.github.com/ab5tract/4961802803d3e5fb489d
09:31 molaf_ joined #perl6
09:31 ab5tract basically the escape sequence that i get from tput and process will output the correct sequence, but it does nothing. if i manually print that sequence, it moves the cursor
09:31 ab5tract if you ask for elems on the processed sequence, it is greater than the number of characters
09:33 FROGGS ahh
09:35 dalek roast: beea0a8 | lizmat++ | S32-str/sprintf.t:
09:35 dalek roast: Fix/Unfudge tests
09:35 dalek roast: review: https://github.com/perl6/roast/commit/beea0a8fa5
09:36 FROGGS ab5tract: the problem is that the escape sequences that you get back (that are in @parts), are not interpolated
09:37 FROGGS ab5tract: so, that prints 'True': say @parts.join('') eq '\x[1b][24;36H';
09:37 FROGGS ab5tract: note the single quotes
09:38 FROGGS ab5tract: and it does that because you call .perl on $raw... but you should only call .perl in case you want to EVAL it (or you just want readable debugging output)
09:40 FROGGS ab5tract: so, this would work: say qq:x{ tput cup $y $x }
09:40 FROGGS and btw, this:  [~] @parts.map(*)   is the same as   @parts.join('')
09:41 * moritz didn't know about map(*)
09:41 moritz m: say <a b c>.map(*)
09:41 camelia rakudo-moar 243c16: OUTPUT«a b c␤»
09:44 ab5tract FROGGS:  i note that similarity in that paste
09:45 ab5tract and there is absolutely no way to regex over an escape sequence without calling .perl
09:45 FROGGS then either EVAL the resulting string, or don't use a regex
09:46 ab5tract FROGGS: the idea is not to have to call tput for every cursor movement
09:47 ab5tract but to grab the correct escape sequence, grok it, and use it later
09:49 moritz ab5tract: .perl uses regexes internally
09:49 moritz so it's possible
09:50 moritz ab5tract: I haven't followed your quest very closely, but it seems to me that regexes work, but the output from "say $/" and the likes confuses use, because it doesn't escape the control sequences
09:52 FROGGS ab5tract: I commented on your gist: https://gist.github.com/ab5tract/4961802803d3e5fb489d#comment-1380204
09:54 ab5tract thanks!
09:54 ab5tract https://gist.github.com/ab5tract/4961802803d3e5fb489d
09:54 FROGGS you're welcome :o)
09:55 ab5tract this shows more clearly what i meant about "invisible" characters. the joined version, which has no visible difference from the manual version, has 13 elems when combed. the manual has 8. but again, no visual differences, nor (it seems) any escape codes
09:55 ab5tract m: my @a = ('55x55' ~~ /(\d\d)(x)(\d\d)/).values>>.Str; @a.perl.say
09:55 camelia rakudo-moar 243c16: OUTPUT«Array.new("55", "x", "55", "")␤»
09:56 FROGGS so, the .perl'd string has of course more chars, since it converts a single byte/char (like "\1b") to '\x[1b]'
09:56 ab5tract (and here was my example of extra characters from last night)
09:56 ab5tract ah, you mean because it is escaped in order to avoid interpolation?
09:56 FROGGS hmmm no
09:57 moritz m: say "foo\x[1b]bar"
09:57 camelia rakudo-moar 243c16: OUTPUT«foobar�»
09:57 moritz m: say "foo\x[1b]bar".perl
09:57 camelia rakudo-moar 243c16: OUTPUT«"foo\x[1b]bar"␤»
09:57 FROGGS .perl escapes strings, so they only contain printable characters that round-trip properly
09:57 Kristien hmm I just realised
09:57 moritz ... and don't confuse the poor user
09:57 ab5tract gotcha, that's a bit what i meant but i like your way of saying it better :)
09:57 Kristien you can use subsets for D-like contract programming in Perl 6 :D
09:58 FROGGS *g*
09:58 ab5tract Kristien: looking forward to seeing an example ;)
10:00 TuxCM joined #perl6
10:00 FROGGS m: say ('55x55' ~~ /(\d\d)(x)(\d\d)/).values.elems # ooc, why does that tell 4 instead of 3?
10:00 camelia rakudo-moar 243c16: OUTPUT«4␤»
10:02 ab5tract FROGGS: i thought it had to do with my issue, but that seems like an actual bug (rather than me just not grokking properly)
10:02 ab5tract m: my @a = ('55x55' ~~ /(\d\d)(x)(\d\d)/).values>>.Str; @a.perl.say; @a[*-1].ord.say
10:02 camelia rakudo-moar 243c16: OUTPUT«Array.new("55", "x", "55", "")␤(Int)␤»
10:02 Kristien ab5tract: https://gist.github.com/rightfold/1767997aea04c38385dc
10:03 Kristien Class invariants are more interesting, though, as they require post-method-call hooks.
10:03 Kristien but since it's Perl that can probably be achieved as well :P
10:05 ab5tract hehe. yeah, that's really nice!
10:07 sergot hi o/
10:09 Kristien is there already a weak map functionality in the perl 6 library?
10:09 Kristien they're needed for implementing class invariants
10:09 espadrine_ joined #perl6
10:10 psch hi #perl6 \o
10:11 psch m: ([1,2,3], :{}).values.say
10:11 camelia rakudo-moar 243c16: OUTPUT«1 2 3 ␤»
10:11 psch m: ([1,2,3], :{}).values.elems.say
10:11 camelia rakudo-moar 243c16: OUTPUT«2␤»
10:12 psch m: ([1,2,3].values, :{}.values).values.elems.say
10:12 camelia rakudo-moar 243c16: OUTPUT«3␤»
10:12 psch ^^^ that was my theory for the 4 instead of 3 elems in Match.values
10:12 psch m: ([1,2,3].values, :{}.values).flat.values.elems.say
10:12 camelia rakudo-moar 243c16: OUTPUT«3␤»
10:15 psch m: my EnumMap $hashpart .= new; my $arraypart = 1,2,3; say ($arraypart.values, $hashpart.values).flat.elems
10:15 camelia rakudo-moar 243c16: OUTPUT«WARNINGS:␤Useless use of "," in expression "my $arraypart = 1,2,3" in sink context (line 1)␤1␤»
10:15 psch m: my EnumMap $hashpart .= new; my $arraypart = [1,2,3]; say ($arraypart.values, $hashpart.values).flat.elems
10:15 camelia rakudo-moar 243c16: OUTPUT«3␤»
10:16 psch m: my EnumMap $hashpart .= new("" => []); my $arraypart = [1,2,3]; say ($arraypart.values, $hashpart.values).flat.elems
10:16 camelia rakudo-moar 243c16: OUTPUT«4␤»
10:16 psch there it is
10:16 regreg joined #perl6
10:16 psch Match.list has 3 elems, Match.hash has 1 elem
10:16 psch m: say ('55x55' ~~ /(\d\d)(x)(\d\d)/).hash.values.elems
10:16 camelia rakudo-moar 243c16: OUTPUT«1␤»
10:17 pecastro joined #perl6
10:17 psch m: say ('55x55 foo' ~~ /(\d\d)(x)(\d\d)\s$<foo>=foo/).hash.perl # definitely not quite right
10:17 camelia rakudo-moar 243c16: OUTPUT«EnumMap.new("foo" => Match.new(orig => "55x55 foo", from => 6, to => 8, ast => Any, list => ().list, hash => EnumMap.new()), "" => [])␤»
10:18 FROGGS ahh
10:21 ab5tract i can sort of see it ;)
10:22 rurban_ joined #perl6
10:23 FROGGS m: say ('55x55 foo' ~~ /(\d\d)(x)(\d\d)\s{}$<foo>=foo/).hash.perl # definitely not quite right
10:23 camelia rakudo-moar 243c16: OUTPUT«EnumMap.new("" => [], "foo" => Match.new(orig => "55x55 foo", from => 6, to => 8, ast => Any, list => ().list, hash => EnumMap.new()))␤»
10:25 virtualsue joined #perl6
10:27 Kristien > No such method 'gist' for invocant of type 'NQPRoutine'
10:27 Kristien :F
10:27 Kristien is that a bug?
10:28 ab5tract FROGGS: your comment on my gist makes me wish for a comprehensive guide to p6 regexes
10:29 ab5tract i will attempt to document the experience of writing Terminal::Print once it is finished
10:29 moritz Kristien: it's mostl likely bootstrapping showing through
10:29 ab5tract but on the way, it's been a bit of a slog when it comes to finding examples and documentation (which i'm sure #perl6 is already well aware of)
10:31 psch m: ("abc" ~~ /.+/).CAPS.say
10:31 camelia rakudo-moar 243c16: OUTPUT«No such method 'CAPS' for invocant of type 'Match'␤  in block <unit> at /tmp/vEsH6BKnSz:1␤␤»
10:33 FROGGS ab5tract: yes, we know that docs is something we need to work on :/
10:34 Kristien m: sub f { say CALLER.HOW.^methods; }; class C { f; }
10:34 camelia rakudo-moar 243c16: OUTPUT«No such method 'gist' for invocant of type 'NQPRoutine'␤  in method gist at src/gen/m-CORE.setting:8098␤  in sub say at src/gen/m-CORE.setting:16907␤  in sub f at /tmp/39AIOPyUfL:1␤  in block <unit> at /tmp/39AIOPyUfL:1␤␤»
10:34 FROGGS good thing is that vendethiel++ and moritz++ did a good bit in the last weeks/months
10:34 FROGGS p: sub f { say CALLER.HOW.^methods; }; class C { f; }
10:35 camelia rakudo-parrot 243c16: OUTPUT«No such method 'gist' for invocant of type 'NQPRoutine'␤  in method gist at gen/parrot/CORE.setting:8046␤  in method gist at gen/parrot/CORE.setting:1168␤  in sub say at gen/parrot/CORE.setting:16815␤  in sub say at gen/parrot/CORE.setting:16811…»
10:35 Kristien not quite gist
10:43 Kristien Moritz in your blog post about traits with the memoization example shouldn't you use my %cache{Any}; instead of my %cache;?
10:47 moritz Kristien: I probably should, but when I wrote it, that wasn't implemented
10:47 Kristien OK
10:48 psch m: "a" ~~ /(.)/; say $/.values.elems; "ab" ~~ /(.)(.)/; say $/.values.elems # uhh
10:48 camelia rakudo-moar 243c16: OUTPUT«1␤3␤»
10:48 psch so having more than one positional capture gives you an empty, anonymous named capture for free
10:48 psch that's how i interpret that at least :)
10:50 moritz m: "ab" ~~ /(.)(.)/; say $/.values.perl
10:50 camelia rakudo-moar 243c16: OUTPUT«(Match.new(orig => "ab", from => 0, to => 1, ast => Any, list => ().list, hash => EnumMap.new()), Match.new(orig => "ab", from => 1, to => 2, ast => Any, list => ().list, hash => EnumMap.new()), []).list␤»
10:50 moritz m: "ab" ~~ /(.)(.)/; say $/.values.flat.perl
10:50 camelia rakudo-moar 243c16: OUTPUT«(Match.new(orig => "ab", from => 0, to => 1, ast => Any, list => ().list, hash => EnumMap.new()), Match.new(orig => "ab", from => 1, to => 2, ast => Any, list => ().list, hash => EnumMap.new()), []).list␤»
10:50 moritz m: "ab" ~~ /(.)(.)/; say $/.values.flat.elems
10:50 camelia rakudo-moar 243c16: OUTPUT«3␤»
10:50 moritz psch: yes, that looks wrong
10:51 psch m: "ab" ~~ /(.)(.)/; say $/.hash.perl
10:51 camelia rakudo-moar 243c16: OUTPUT«EnumMap.new("" => [])␤»
10:52 psch m: "ab" ~~ /(.)./; say $/.hash.perl
10:52 camelia rakudo-moar 243c16: OUTPUT«EnumMap.new()␤»
10:52 psch moritz: i'm looking if i can find where that might happen, but the whole Regex stuff looks rather complicated from my vantage point
10:54 psch nqp-m: my $match := "ab" ~~ /(.)./; say(nqp::elems(($match))
10:54 camelia nqp-moarvm: OUTPUT«Confused at line 2, near "say(nqp::e"␤   at gen/moar/stage2/NQPHLL.nqp:485  (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQP.nqp:921  (/home/camelia/rakudo-inst-2/languages/nqp/lib/nqp.moarvm:comp_unit:872)␤ f…»
10:54 psch nqp-m: my $match := "ab" ~~ /(.)./; say(nqp::elems($match))
10:54 camelia nqp-moarvm: OUTPUT«1␤»
10:54 psch nqp-m: my $match := "ab" ~~ /(.)(.)/; say(nqp::elems($match))
10:54 camelia nqp-moarvm: OUTPUT«2␤»
10:56 vendethiel joined #perl6
10:58 jack_rabbit joined #perl6
11:06 FROGGS ab5tract: btw, I'd like to write a Perl 6 regexes/grammar tutorial, though, time is limited these days
11:09 virtualsue joined #perl6
11:09 salv00 joined #perl6
11:10 moritz there are several incomplete ones
11:10 moritz might sense to start from them
11:12 ab5tract FROGGS: my plan is to definitely give back as much of the knowledge as i have gained from #perl6 as possible
11:13 ab5tract even just the "proper" way to get the group captures into an array felt trickier than it seemed it should be.. which implies that i wasn't doing it properly
11:14 fhelmberger joined #perl6
11:14 xfix left #perl6
11:27 dayangkun joined #perl6
11:36 jack_rabbit joined #perl6
11:43 ab5tract m: my @a = ('55x55' ~~ /(\d\d)(x)(\d\d)/).values>>.Str # is this really idiomatic?
11:43 camelia rakudo-moar 243c16: ( no output )
11:45 chenryn joined #perl6
11:51 [ptc] joined #perl6
11:52 jack_rabbit joined #perl6
12:00 rindolf joined #perl6
12:05 grep0r joined #perl6
12:10 [ptc] left #perl6
12:10 [ptc] joined #perl6
12:17 psch https://gist.github.com/peschwa/a74aba56552314223ea0 # this does fix the .values.elems bug from earlier and spectests clean, but i suspect the bug should be fixed earlier
12:17 mvuets joined #perl6
12:18 psch as in, the captures should be correct, instead of ignoring probably-incorrect captures... :)
12:18 psch but i don't see through the regex engine atm
12:22 jack_rabbit joined #perl6
12:25 rindolf joined #perl6
12:27 rindolf joined #perl6
12:30 rindolf joined #perl6
12:31 rindolf joined #perl6
12:33 rindolf joined #perl6
12:33 Guest25813 joined #perl6
12:33 rindolf joined #perl6
12:34 rindolf joined #perl6
12:37 rindolf joined #perl6
12:38 rindolf joined #perl6
12:38 rmgk_ joined #perl6
12:43 rindolf joined #perl6
12:45 RPu joined #perl6
12:45 rindolf joined #perl6
12:48 rindolf joined #perl6
12:49 pyrimidi_ joined #perl6
12:50 rindolf joined #perl6
12:50 [particle]1 joined #perl6
12:51 rindolf joined #perl6
12:52 telex joined #perl6
12:52 darutoko- joined #perl6
12:53 stux|RC-only joined #perl6
12:53 kjs_ joined #perl6
12:54 prevost joined #perl6
12:58 Peter_R joined #perl6
13:33 araujo joined #perl6
13:33 araujo joined #perl6
13:33 rindolf joined #perl6
13:34 guru joined #perl6
13:42 dalek rakudo/nom: d1b1f1b | lizmat++ | src/core/Any.pm:
13:42 dalek rakudo/nom: Make adverbed slices up to 2x as fast
13:42 dalek rakudo/nom:
13:42 dalek rakudo/nom: By using an nqp level hash for adverb checking instead of a Perl6 hash.
13:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d1b1f1bd91
13:47 salv0 joined #perl6
13:47 dalek rakudo/nom: 270303f | lizmat++ | src/core/control.pm:
13:47 dalek rakudo/nom: Streamline CLONE-HASH-DECONTAINERIZED a bit
13:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/270303f4fa
13:50 dayangkun joined #perl6
13:51 KCL_ joined #perl6
13:59 Kristien joined #perl6
14:05 darutoko joined #perl6
14:12 brrt joined #perl6
14:14 brrt the perl jam ccc presentation is quite lousy
14:14 brrt 'ha ha let's make fun of perl because we don't understand a bit of it'
14:21 brrt literally not one bit of it
14:24 b2gills I especially found it funny that he didn't know that $a[0] is to access an array named @a
14:24 brrt oh, born in 1994
14:24 brrt he is forgiven
14:24 brrt just barely
14:25 b2gills forgiven, but not forgotten
14:25 vendethiel brrt: is that supposed to be rude for us 1994 kids? :p
14:25 brrt (although the my $scalar = (1,2,3,'a',b','c'); print $scalar; did surprise me)
14:25 brrt no, not at all
14:26 brrt just that you're not yet expected to understand every detail of a language which you clearly haven't used because it was popular when you were playing with lego
14:26 b2gills I think I started messing around with DOS batch files around '94
14:26 brrt (by 'you' i mean 'the speaker and everybody laughing so hard')
14:27 brrt if i were too make a presentation about fortran 77 with funny wat's, i suppose that would be annoying to fortran programmers. but on the other hand, how would i know better
14:28 b2gills I wouldn't give a presentation about fortran 77 WATs without consulting a fortran 77 programmer
14:30 Peter_R brrt: That scalar thing... damn you Perl!
14:30 psch the presentation style was just bad imo
14:31 Peter_R Was this the presentation about context being a "bug" in Perl?
14:31 psch Peter_R: no, it was about a few vulnerabilities introduced by programmers not understanding context
14:31 moritz Peter_R: the framing was "we owned perl, and can break any web app written in it"
14:31 moritz Peter_R: at least that's how the talk teaser sounded like
14:32 moritz so, 80% trolling, 20% useful information
14:32 brrt 'if you program perl and don't understand context, you're going to have a bad time'
14:32 Peter_R psch: That's what I meant. To me it is a bit like ripping on C for code that doesn't pay any attention to bounds
14:33 brrt also, database input 'cleaning' is ... very much obsolete, no matter what you do
14:33 brrt and i'm fairly sure that taint fixes this
14:33 psch Peter_R: right, my misunderstanding then :)
14:34 vendethiel brrt: sometimes people do that on purpose. for example, gary berndhat's js wat
14:35 psch http://events.ccc.de/congress/2014/Fahrplan/system/attachments/2542/original/the-perl-jam-netanel-rubin-31c3.pdf the slides, if anyone wants to look at them
14:35 pecastro joined #perl6
14:37 psch there's a few transitional slides missing iirc
14:37 psch http://media.ccc.de/browse/congress/2014/31c3_-_6243_-_en_-_saal_1_-_201412292200_-_the_perl_jam_exploiting_a_20_year-old_vulnerability_-_netanel_rubin.html#video the actual talk has a few more transitional slides, mostly with the caption "WAT"
14:44 Kristien joined #perl6
14:47 muraiki if i looked at the slides, does the talk add anything? I posted a bit of a rebuttal to the horrible slides, only to get a response of "you need to watch the video"
14:47 muraiki but I'm not terribly interested in wasting 30 minutes of my life if the video doesn't add any useful clarification
14:48 ab5tract right.. if you pass an array, and expect an arrayref, you are not a perl programmer
14:49 muraiki yeah, that's what I tried to explain to a non perl programmer. everything in the slides was totally misinformed
14:50 muraiki they're all labeled as as unexpected, but they should be labeled as 'unexpected to a non-perl programmer'
14:50 Peter_R muraiki: Don't bother, Perl isn't Python so you're wasting your time
14:51 muraiki hey, I passed an array to a function in python and when I changed the array in the function it changed the original array! why isn't perl like haskell?!?!
14:51 muraiki so dangerous! heh
14:51 psch muraiki: i don't think the talk actually adds anything except cheap humor and a little bit of backpedaling in the end by the speaker after Q&A
14:53 muraiki yeah, I mean I want to be charitable to another programmer, but it seems like he spent more time finding weird pictures of camels than he did reading the documentation that comes with perl or any perl tutorial
14:53 btyler yeah, it was not a good talk at all. kind of a shame that it had such a big audience and reach on the internet
14:53 psch the worst part is that what he found could easily stand on its own as a good discovery
14:54 muraiki yeah, the actual problem is a bit subtle and good to know about
14:54 psch but it turned into a lolperl talk
14:54 muraiki so that gives the rest of the talk an air of legitimacy
14:55 Peter_R I wonder if Python will be so hated in another 10 years?
14:57 geekosaur likely. people are noticing the ugly parts. but if anything I think python doomed itself differently by mishandling python3
14:58 * vendethiel admits he doesn't like call flattening :-)
14:59 Peter_R I noticed people slag off the object system in Perl, but aside from first class objects the early Python system is very similar
14:59 geekosaur yes
15:00 geekosaur that's one of the warts I am seeing people notice more
15:00 Peter_R It is odd for such an OO language to by design use such a bare metal approach, IMO
15:00 geekosaur (as for objects in perl, I think the problem is that there's the weak native stuff on one end and slow Moose on the other and nothing in the middle aside from various attempts to mitigate Moose's weight)
15:01 Peter_R Yeah, I think Moo is pretty performant?
15:01 geekosaur (I see a *lot* of grouching about how to get sensible OO you need to go the Moose/Moo/Mouse/etc. route which is pretty heavyweight for smaller things)
15:01 Peter_R I am just using Moose atm since I don't care about performance
15:03 Peter_R I don't think the whole Perl 5 vs 6 naming does any favours towards people understanding the Perl situation either :P
15:05 masak heh, and the penultimate slide says 'At least know your language "features"' -- this message is approved by both Dunning and Kruger.
15:09 muraiki I used Moo for a project at work and liked it. I remember asking in #perl about moo/moose and at least in terms of startup time, which from what I understand used to be the main objection, is that they add barely any overhead anymore
15:09 gcole joined #perl6
15:12 Peter_R Moose definitely has a perceptible start up time, still only ~1 second though
15:14 b2gills In addition to Moo/Moose/Mouse there is also Mite, which to my knowledge does all the things Moo does, except at release or install time
15:15 agre joined #perl6
15:16 lizmat Perl 6 Weekly draft: https://p6weekly.wordpress.com/?p=342&amp;shareadraft=54c65a09545aa   # comments welcome!
15:17 Kristien joined #perl6
15:17 skids joined #perl6
15:18 spollei joined #perl6
15:18 rurban_ jnthn: I found the cause for the parrot crash on win64. long = 4 byte, I changed it for --intval=int. all nci calls failed.
15:21 sqirrel joined #perl6
15:23 ab5tract lizmat: not sure if my work on getting mixes to behave as expected in quanthash ops has been mentioned (or deserves to be mentioned) in a p6 weekly yet
15:24 lizmat ab5tract: I think I mentioned that a few weeks ago?
15:25 lizmat 2015.02: " ab5tract did a lot of work for properly handling Mixes: there’s still some debate whether the currently implemented behaviour is correct."
15:25 ab5tract didn't see it when it happened!
15:25 ab5tract thanks :)
15:25 ab5tract yeah, i need to finish my "set/mix/bag makeover" so that the real debate on behavior can begin
15:26 ab5tract though TimToady already co-signed the "set operators are more like arithmetic ops than equality ops"
15:26 xfix joined #perl6
15:27 brrt joined #perl6
15:28 brrt lizmat - looks good to me
15:29 timotimo lizmat: wow, 2x improvement just by using a nqp-level hash :S
15:30 timotimo i wonder how much faster .exists used to be compared to our current :exists and the :exists before this improvement
15:30 TuxCM joined #perl6
15:31 [Coke]_ m: say "hi from the airport"
15:31 camelia rakudo-moar 243c16: OUTPUT«hi from the airport␤»
15:31 FROGGS hi [Coke]_
15:32 lizmat timotimo: you can still check that, as .exists was just renamed to .exists_key (and .exists_pos)
15:33 ajr joined #perl6
15:34 timotimo oh!
15:34 timotimo i didn't know that :)
15:37 dalek perl6-roast-data: 351b87e | coke++ | / (5 files):
15:37 dalek perl6-roast-data: today (automated commit)
15:37 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/351b87e52f
15:37 espadrine joined #perl6
15:38 ab5tract lizmat: are we ready for '.exists-key' and '.exists-pos' ? :)
15:38 lizmat personally, I think so, yea
15:38 ab5tract i remember reading you mention that you would like to see a change like that before 6.0
15:39 lizmat I would like to see all public and semi-public facing API to be kebab-cased
15:39 lizmat but I don't think we have consensus on that yet
15:40 timotimo don't make me hungry pls
15:45 pmurias joined #perl6
15:45 pmurias hi
15:46 Sysaxed joined #perl6
15:46 masak \o
15:46 hoelzro o/ #perl6
15:47 [Coke]_ m: say (243-219)/2
15:47 camelia rakudo-moar 243c16: OUTPUT«12␤»
15:47 Sysaxed Hi! Is it possible to specify the return type of a sub?
15:48 FROGGS m: sub foo($a) returns Str { "bar" }; say foo
15:48 camelia rakudo-moar 243c16: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/DBu3rDUzf0â�¤Calling 'foo' requires arguments (if you meant to operate on $_, please use .foo or use an explicit invocant or argument)â�¤    Expected: :(Any $a --> Str)â�¤at /tmp/DBu3rDUzf0:1â�¤----…»
15:48 FROGGS m: sub foo($a) returns Str { "bar" }; say foo 42
15:48 camelia rakudo-moar 243c16: OUTPUT«bar␤»
15:48 FROGGS Sysaxed: ^^
15:48 Sysaxed oh that's how
15:49 psch m: sub foo($a --> Str) { "bar" }; say foo 42
15:49 camelia rakudo-moar 243c16: OUTPUT«bar␤»
15:49 FROGGS m: sub foo($a --> Str) { "bar" }; say foo 42
15:49 camelia rakudo-moar 243c16: OUTPUT«bar␤»
15:49 FROGGS right
15:49 FROGGS :o)
15:49 FROGGS TIMTOWTDI
15:49 Sysaxed oh so the --> thing is an alternative to 'returns' word?
15:49 FROGGS yes
15:49 Sysaxed okay, cool
15:50 Sysaxed thanks
15:50 FROGGS though, I guess I prefer the returns trait
15:50 Sysaxed well, 'returns' is too long to type...
15:51 FROGGS because it is self explaining, and I like code that a non-professional can read also
15:51 FROGGS (my colleagues are not the best hackers, maybe that's why)
15:51 Sysaxed an arrow explains itself as well (turn these parameters into this)
15:52 FROGGS yeah, probably
15:52 * psch is reminded of "x goes to zero"
15:52 skids I seem to rememeber a difference between "returns" and "-->" in that one or the other validated inside the brackets?
15:53 psch the C WAT that is, i.e. "while ( x --> 0 ) { }"
15:53 timotimo haha
15:53 Sysaxed psch: wtf?
15:53 FROGGS nice one :o)
15:53 timotimo that gets parsed as x-- > 0
15:53 psch Sysaxed: the arrow explains itself, x goes to 0 ;)
15:53 Sysaxed aaah yeah
15:53 Sysaxed that one
15:54 FROGGS m: sub foo($a --> Str) { 42 }; say foo 42
15:54 camelia rakudo-moar 243c16: OUTPUT«Type check failed for return value; expected 'Str' but got 'Int'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:649␤  in block <unit> at /tmp/WUm7n3SHxe:1␤␤»
15:54 * [Coke]_ wanders around to find something he can eat before the flight.
15:54 FROGGS m: sub foo($a) returns Str { 42 }; say foo 42
15:54 camelia rakudo-moar 243c16: OUTPUT«Type check failed for return value; expected 'Str' but got 'Int'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:649␤  in block <unit> at /tmp/l2gXktRq2p:1␤␤»
15:54 FROGGS skids: seems it is doing the same
15:54 vendethiel lizmat++ weekly
15:55 Sysaxed is there any reason why --> is used? Instead of, uhm -> ?
15:55 lizmat -> is tainted by Perl 5
15:56 Sysaxed lizmat: and who cares?
15:56 Sysaxed sorry, I'm just trying to understand
15:56 timotimo this tainted -> you've given / i give you all a programmer could give you
15:56 Sysaxed this stuff is interesting
15:57 timotimo take my syntax and that's not nearly all
15:57 psch m: sub foo($t, &x :(Str --> Int)) { x($t) }; say foo("abc", &postfix:<++>) # NYI :(
15:57 camelia rakudo-moar 243c16: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: P6opaque, cs = 0)␤»
15:57 psch skids: returns doesn't fit there
15:57 psch skids: aside from that i don't know of any difference
15:57 lizmat m: say 42->Int   # Sysaxed: this is why
15:57 camelia rakudo-moar 243c16: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Plo_TazU_J�Unsupported use of -> as postfix; in Perl 6 please use either . to call a method, or whitespace to delimit a pointy block�at /tmp/Plo_TazU_J:1�------> [32msay 42->[33m�[31mInt …»
15:57 psch ah nvm, whiespace
15:58 timotimo m: sub foo($t, &x (Str --> Int)) { x($t) }; say foo("abc", &postfix:<++>) # isn't this the syntax you need?
15:58 camelia rakudo-moar 243c16: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in sub-signature of parameter &x␤  in sub foo at /tmp/_ZMYWJqroL:1␤  in block <unit> at /tmp/_ZMYWJqroL:1␤␤»
15:58 psch also mistyping for &x..
15:58 psch m: sub foo($t, &x:(Str --> Str)) { x($t) }; say foo("abc", &postfix:<++>) # NYI :(
15:58 camelia rakudo-moar 243c16: OUTPUT«Constraint type check failed for parameter '&x'␤  in sub foo at /tmp/9QwK3R1tgp:1␤  in block <unit> at /tmp/9QwK3R1tgp:1␤␤»
15:58 psch huh
15:58 psch oh &postfix:<++> doesn't returns
15:58 timotimo "returns" currently just mostly uses up more memory and makes the core setting bigger
15:58 psch m: sub bar(Str $in) { $in++ }; sub foo($t, &x:(Str --> Str)) { x($t) }; say foo("abc", &bar)
15:58 camelia rakudo-moar 243c16: OUTPUT«Cannot modify an immutable Str␤  in sub postfix:<++> at src/gen/m-CORE.setting:2158␤  in sub bar at /tmp/t8HEL4znDZ:1␤  in sub foo at /tmp/t8HEL4znDZ:1␤  in block <unit> at /tmp/t8HEL4znDZ:1␤␤»
15:58 psch harumpf
15:58 timotimo fi you have something trivial like ++, i don't think it's worth much
15:59 psch timotimo: i agree, actually
15:59 skids There's an "as" and an "of" trait for subs.  I forget what forms/placement of '-->' and 'returns' did which.  But if there is no "as" it defaults to "of".
15:59 psch m: sub bar(Str $in) { $in x 2 }; sub foo($t, &x:(Str --> Str)) { x($t) }; say foo("abc", &bar) # there we go
15:59 camelia rakudo-moar 243c16: OUTPUT«abcabc␤»
15:59 timotimo ah
16:00 psch S06:Subroutine traits
16:00 synopsebot Link: http://perlcabal.org/syn/S06.html#Subroutine_traits
16:01 psch huh
16:01 psch m: sub Int foo($x) { 42 };
16:01 camelia rakudo-moar 243c16: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/vRmPV5WTUE�Missing block�at /tmp/vRmPV5WTUE:1�------> [32msub Int [33m�[31mfoo($x) { 42 };[0m�»
16:01 psch that's supposedly legal as well?
16:01 psch ah no
16:01 psch m: my sub Int foo($x) { 42 };
16:01 camelia rakudo-moar 243c16: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/pDwO5_Eqxw�Missing block�at /tmp/pDwO5_Eqxw:1�------> [32mmy sub Int [33m�[31mfoo($x) { 42 };[0m�»
16:01 psch oh, maybe it is
16:01 * psch isn't great at reading right now
16:02 psch m: my Int sub foo($x) { 42 } # this it is
16:02 camelia rakudo-moar 243c16: ( no output )
16:05 lizmat timotimo: I'm not sure about the "returns" argument.  Type checking already happens on return values, afaik
16:06 psch so trait_mod "as" for subs is the inner type constraint, trait_mod "of" is the outer
16:06 psch m: sub foo() as Str { 42 }; foo
16:06 camelia rakudo-moar 243c16: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/NXIJCblvF0�Cannot call 'trait_mod:<as>'; none of these signatures match:�:(Parameter:D $param, Any $type)�at /tmp/NXIJCblvF0:1�------> �»
16:06 psch m: sub foo() of Str { 42 }; foo
16:06 camelia rakudo-moar 243c16: OUTPUT«Type check failed for return value; expected 'Str' but got 'Int'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:649␤  in block <unit> at /tmp/JA2ycxGPkf:1␤␤»
16:07 psch "as" seems NYI.  i seem to remember some discussion about that, if unclear about what exactly was discussed
16:07 atroxaper joined #perl6
16:08 TuxCM is it deliberate that q-like operators do not accept () as delimiters anymore?
16:08 lizmat TuxCM: yes, afaik
16:08 TuxCM still, this is confusing:
16:08 TuxCM m: q(foo).say
16:08 camelia rakudo-moar 243c16: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Eh9R0gyLutâ�¤Undeclared routines:â�¤    foo used at line 1â�¤    q used at line 1â�¤â�¤Â»
16:09 psch m: my $sub:(Str, Int); $sub = sub (Int, Str) { }
16:09 camelia rakudo-moar 243c16: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: P6opaque, cs = 0)␤»
16:09 FROGGS TuxCM: why is it confusing?
16:10 lizmat TuxCM: it was parsing as a sub q(), with a call to foo()
16:10 FROGGS m: say(foo)
16:10 camelia rakudo-moar 243c16: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/mZ4XclM2Peâ�¤Undeclared routine:â�¤    foo used at line 1â�¤â�¤Â»
16:10 lizmat m: say foo
16:10 camelia rakudo-moar 243c16: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/lsUOZlCOEmâ�¤Undeclared routine:â�¤    foo used at line 1â�¤â�¤Â»
16:10 * TuxCM runs and starts crying under a stone
16:10 FROGGS TuxCM: :P
16:10 psch i suppose mentioning quote ops not taking () as delim is ok there
16:11 psch similar to bare say
16:11 * lizmat hands TuxCM a handkerchief
16:11 FROGGS TuxCM: when foo is not a string, it is an identifier... and since there is no foo type, the compiler tries to treat is as a sub
16:11 TuxCM thank you
16:11 psch (i do agree that it's not confusing, but it's something that we could hand-hold, in my opinion)
16:11 FROGGS TuxCM: do you want a bareword that turns into a string at full moon like in perl 5?
16:12 * TuxCM sees yet another reason to make the space between the function name and the opening paren obligatory :P
16:12 Sysaxed noooo
16:12 TuxCM q (foo) is function q, q(foo) is the q operator :P
16:12 FROGGS /o\
16:13 TuxCM Sysaxed, rest assured, I have slang Tuxic and am very happy already
16:13 FROGGS TuxCM: I guess we could even allow parens as quote delimiters in Tuxic :o)
16:14 TuxCM nah, too confusing for others
16:14 FROGGS probably
16:14 TuxCM allow . on the next line would be swell
16:14 FROGGS hmmm
16:15 TuxCM http://tux.nl/Files/20150126171552.png
16:16 TuxCM imagine long method chans. I've seen a few already that are weird to format/style to readable code
16:16 FROGGS well yeah, the backslash does not improve it either :o)
16:17 FROGGS given $foo {
16:17 FROGGS .=perl
16:17 FROGGS .=say
16:17 FROGGS }
16:17 FROGGS though... I don't like it already
16:18 FROGGS err, missed the semicolons
16:19 TuxCM in my example, the missing ; should already be indication enough that $foo.perl.say; is meant
16:19 TuxCM I do not see a resemblance with your example
16:19 atroxaper Hello, #perl6 !
16:20 gfldex joined #perl6
16:21 atroxaper At last I added 'git reference' option into Configure.pl fot rakudo and nqp.
16:22 FROGGS TuxCM: dunno if that would break anything: https://gist.github.com/FROGGS/f23f86df557bc1732a43
16:22 lizmat atroxaper: what does that allow you to do?
16:23 TuxCM I'll try when I fixed my just added error
16:23 FROGGS lizmat: + Use --git-reference option to identify local path where git repositories are stored
16:23 FROGGS + For example: --git-reference=/home/user/repo/for_perl6
16:23 FROGGS + Folders 'nqp', 'moar', 'parrot' with corresponding git repos should be in for_perl6 folder
16:23 atroxaper And add git reference into rakudobrew. Now while building some Rakudo backend we will not clone repos from web but use the local repos. It reduice time to install and increase disk space :)
16:23 psch https://gist.github.com/peschwa/f124c3f84b69e6d37d5e D:
16:24 psch what a neat little jvm-specific bug
16:24 psch well, maybe parrot has it too, i don't have that built
16:24 dalek rakudo/nom: 75476da | (Mikhail Khorkov)++ | / (2 files):
16:24 dalek rakudo/nom: Add git reference option into Configure.pl
16:24 dalek rakudo/nom:
16:24 dalek rakudo/nom: Now we can use --git-reference=<path> option to tell Configure.pl do not clone corresponding repo from the web but use the reference to existing local repo. It reduces time for configuring and increases disk space.
16:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/75476dae5d
16:24 dalek rakudo/nom: fc5f2d8 | lizmat++ | / (2 files):
16:24 dalek rakudo/nom: Merge pull request #357 from atroxaper/nom
16:24 dalek rakudo/nom:
16:24 dalek rakudo/nom: Add git reference option into Configure.pl
16:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fc5f2d8458
16:24 atroxaper lizmat: thank you!
16:25 psch the annoying thing is that neither jdb nor --ll-exception help :/
16:25 atroxaper lizmat: and https://github.com/perl6/nqp/pull/220 too please :)
16:25 FROGGS psch: :o(
16:25 dalek nqp: 74938f9 | (Mikhail Khorkov)++ | / (2 files):
16:25 dalek nqp: Add git reference option into Configure.pl
16:25 dalek nqp:
16:25 dalek nqp: Now we can use --git-reference=<path> option to tell Configure.pl do not clone corresponding repo from the web but use the reference to existing local repo. It reduces time for configuring and increases disk space.
16:25 dalek nqp: review: https://github.com/perl6/nqp/commit/74938f991a
16:25 dalek nqp: 2080f6b | lizmat++ | / (2 files):
16:25 dalek nqp: Merge pull request #220 from atroxaper/master
16:25 dalek nqp:
16:25 dalek nqp: Add git reference option into Configure.pl
16:25 dalek nqp: review: https://github.com/perl6/nqp/commit/2080f6b6ba
16:26 atroxaper lizmat: nice!
16:27 atroxaper Who can merge pull request for rakudobrew ?
16:28 atroxaper tadzik: hello.
16:28 FROGGS psch: you could try setting NQP_VERBOSE_EXCEPTIONS
16:29 psch FROGGS: no luck, still just the NPE line
16:29 FROGGS k
16:34 TuxCM FROGGS, my stuff still passes. you didn't break anything
16:34 TuxCM the . chain (. on new line) still fails
16:35 lizmat P6W published: https://p6weekly.wordpress.com/2015/01/26/2015-04-gotanda-lands/
16:35 raiph joined #perl6
16:36 FROGGS TuxCM: hmmm, it worked for me
16:37 FROGGS TuxCM: what exactly worked was: "42.perl\n  .say\n"
16:39 TuxCM perl6 t.pl
16:39 TuxCM ===SORRY!=== Error while compiling t.pl
16:39 TuxCM Two terms in a row
16:39 TuxCM at t.pl:10
16:39 TuxCM ------>     ⏏.say;
16:39 TuxCM .say;
16:40 [Sno] joined #perl6
16:41 TuxCM you can hit me mext time we meet: user error
16:41 TuxCM wrong test file
16:41 tadzik atroxaper: oh yes, I can
16:42 atroxaper tadzik: what do you think about the pull request?
16:43 tadzik I haven't seen it yet, hold on :)
16:43 atroxaper tadzik: it is annoying to clone nqp three times if I want build all
16:43 tadzik ooo
16:43 atroxaper tadzik: that is why I decided that...
16:43 tadzik I like it
16:44 tadzik atroxaper: awesome, thank you!
16:44 atroxaper tadzik: Now there are corresponding changes in nqp and rakudo repos already.
16:45 atroxaper tadzik: xDD
16:46 sqirrel joined #perl6
16:46 TuxCM FROGGS, http://tux.nl/Files/20150126174653.png
16:48 TuxCM did you push that change?
16:49 FROGGS TuxCM: no
16:50 TuxCM ah, you did not. manual change caused the test to pass
16:50 TuxCM any disatvantages?
16:50 FROGGS yeah, I just typed you image into a script and it works here too :o)
16:50 TuxCM s/t/ = "d"
16:50 FROGGS I'm not sure, that's why I wanted you to test
16:51 Kristien joined #perl6
16:51 TuxCM the stuff *I* wrote still passes :)
16:52 FROGGS I pushed now
16:54 FROGGS bbiab &
16:55 * TuxCM rebuilds
17:07 atroxaper lizmat: s/get-reference/git-reference/ . Just say :) Thank you for your mention, really.
17:11 flussence m: https://gist.github.com/flussence/b373ea44748c8afdc92f
17:11 camelia rakudo-moar 243c16: OUTPUT«gist not found»
17:11 lizmat atroxaper: fixed
17:11 atroxaper lizmat: thank you.
17:13 flussence bah... well I've posted the url. Is there any way to get that code to work? It doesn't like the way I'm using "END".
17:14 TuxCM m: my@x=("foo",Nil,1,"a","",3);@x.perl.say
17:14 camelia rakudo-moar 243c16: OUTPUT«Array.new("foo", 1, "a", "", 3)␤»
17:14 TuxCM Where did the Nil go?
17:14 psch flussence: i think LEAVE is what you want
17:15 flussence I'd have to put that outside the class though, which kinda defeats the purpose of encapsulating everything in one.
17:15 psch oh, i might have misunderstood then
17:16 psch flussence: you want the header during creation and the footer after out-of-scope?
17:16 psch or whatever kind of inaccessibility/GC
17:17 psch well, DESTROY exists, but can't be relied on to run at all afair
17:18 flussence I'd settle for end-of-main-program at this point, which is why I'm using END and not DESTROY, but some way to run code when the outer scope ends would be best...
17:19 flussence maybe a macro'd work
17:29 sqirrel joined #perl6
17:30 psch flussence: you could add your own phaser to a given block and fire that phaser from any enclosed block
17:32 psch m: sub foo() { }; sub bar() { &foo.fire_phasers('FOO') }; &foo.add_phaser('FOO', { say "pew pew" }); bar # somewhat like this
17:32 camelia rakudo-moar 243c16: OUTPUT«pew pew␤»
17:32 psch oh wait
17:32 psch got sidetracked a bit
17:32 psch you can add to LEAVE from the enclosed block
17:32 TuxCM related, are Nil's *always* stripped form lists?
17:33 TuxCM m: sub foo($f){$f.perl.say};foo(Nil);
17:33 camelia rakudo-moar 243c16: OUTPUT«Nil␤»
17:33 TuxCM m: sub foo(*@f){for @f -> $f {$f.perl.say}};foo(Nil);
17:33 camelia rakudo-moar 243c16: ( no output )
17:33 TuxCM WHERE IS MY Nil?
17:33 lizmat TuxCM: I'm not sure, or what it should be...
17:34 mbracht joined #perl6
17:34 lizmat S02:Nil
17:34 synopsebot Link: http://perlcabal.org/syn/S02.html#Nil
17:34 vendethiel m: my @a = (Nil); say @a.perl
17:34 camelia rakudo-moar 243c16: OUTPUT«Array.new()␤»
17:34 lizmat so it shouldn't disappear, but does so at the moment
17:34 vendethiel dhu my parens.
17:35 TuxCM indeed.
17:35 psch m: sub foo() { say "doing bar soon"; bar; say "and again!"; bar; say "done" }; sub bar() { say "yup, doing bar!"; &foo.add_phaser('LEAVE', { say "leaving" }) }; foo
17:35 camelia rakudo-moar 243c16: OUTPUT«doing bar soon␤yup, doing bar!␤and again!␤yup, doing bar!␤done␤»
17:35 TuxCM can I get them back pls?
17:35 lizmat something that also is affected by the GLR
17:35 psch hm, that doesn't add LEAVE the way i'd have expected it to
17:37 mbracht exit
17:37 lizmat psch: it needs to be known at compile time that there's going to be a phaser
17:38 lizmat m: sub foo() { say "doing bar soon"; bar; say "and again!"; bar; say "done" }; sub bar() { say "yup, doing bar!"; BEGIN &foo.add_phaser('LEAVE', { say "leaving" }) }; foo
17:38 camelia rakudo-moar 243c16: OUTPUT«doing bar soon␤yup, doing bar!␤and again!␤yup, doing bar!␤done␤»
17:38 lizmat and probably at block compose time  :-(
17:38 lizmat otherwise the "fire_phasers" code does not get run at all, because of performance reasons
17:39 flussence I guess what I'd *like* to be able to do (but can't) is say CALLER.add_phaser()...
17:40 lizmat flussence: that would be nice, but having to go check for phasers at every block enter/leave would be *very* costly
17:40 psch lizmat: thanks for clearing that up
17:43 psch might be feasible with allowing that only at BEGIN or having to add an empty phaser block
17:43 psch although that seems weirdly magic :P
17:44 psch aside from that CALLER doesn't even reach the Block currently, does it?
17:44 psch as in, the actual Block object which would need the phaser attached
17:48 Kristien joined #perl6
17:48 Kristien hi
17:56 lizmat psch: I don't offhand see a way to do that, jnthn might, but is it advisable?
17:58 psch m: sub foo { LEAVE { say "leaving" } }; &foo.add_phaser('LEAVE', { say "really now" }); foo
17:58 camelia rakudo-moar 243c16: OUTPUT«really now␤leaving␤»
17:58 psch lizmat: well, adding to a known existing phaser already works apparently.  as for Caller.Block - i think it's probably a terrible idea
17:59 jluis_ joined #perl6
18:00 psch m: { say "foo"}.^methods.say
18:00 camelia rakudo-moar 243c16: OUTPUT«<anon> add_phaser fire_phasers phasers perl <anon> <anon> <anon> <anon> <anon> <anon> arity count signature outer static_id of returns ACCEPTS Str␤»
18:07 regreg joined #perl6
18:07 Kristien ACCEPTS is for ~~ right?
18:09 lizmat S03:3745   # yes
18:09 synopsebot Link: http://perlcabal.org/syn/S03.html#line_3745
18:09 spollei left #perl6
18:11 lizmat TimToady: I wonder if Pattern should be considered a fossil?
18:22 FROGGS joined #perl6
18:25 Pleiades` joined #perl6
18:29 dalek Heuristic branch merge: pushed 21 commits to rakudo/newio by lizmat
18:33 FROGGS_ joined #perl6
18:34 dalek rakudo/newio: 04317fe | lizmat++ | src/core/io_operators.pm:
18:34 dalek rakudo/newio: Another user of CLONE-HASH-DECONTAINERIZED
18:34 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/04317fe7b0
18:36 zakharyas joined #perl6
18:37 moritz [ptc]: did you see my last commit to Pod::To::HTML??
18:37 moritz (and Mouq++'s fix to it)
18:45 moritz t/spec/S32-str/sprintf.rakudo.moar                          (Wstat: 512 Tests: 157 Failed: 2) Failed tests:  151-152
18:48 telex joined #perl6
18:49 bartolin_ moritz: oh, looks like lizmat changed the tests back to their old state with beea0a8
18:50 lizmat well, I saw fail and todo  :-)
18:50 bartolin_ . o O (and I thought it clever to fudge the tests with 'todo' :-)
18:50 bartolin_ *was
18:51 lizmat hmmm... seems the build on parrot is broken, and JVM has lots of spectest failures
18:51 lizmat will check after dinner&
18:51 spider-mario joined #perl6
18:55 bartolin_ lizmat: probably those are two different things: Parrot already failed to build last night with e34a9c0, whereas the JVM had a clean spectest on that commit. I'll take a look at Parrot -- maybe you can start with JVM?
19:01 dalek doc: da3d564 | moritz++ | lib/Type/X/Bind.pod:
19:01 dalek doc: Document X::Bind
19:01 dalek doc: review: https://github.com/perl6/doc/commit/da3d564056
19:04 davido_ joined #perl6
19:06 dalek roast: 034ad32 | usev6++ | S32-str/sprintf.t:
19:06 dalek roast: Fix tests for changed error message
19:06 dalek roast: review: https://github.com/perl6/roast/commit/034ad32f8a
19:07 bartolin_ I hope this is fine now
19:07 [ptc]_ joined #perl6
19:11 dalek doc: c8b95f8 | moritz++ | lib/Type/X/Bind/Slice.pod:
19:11 dalek doc: Document X::Bind:Slice
19:11 dalek doc: review: https://github.com/perl6/doc/commit/c8b95f8fc4
19:15 * masak .oO( X::Blind::Mice )
19:18 rurban_ joined #perl6
19:27 adu joined #perl6
19:29 atroxaper joined #perl6
19:32 ab5tract if i do a "require './File.pm6';", where File.pm6 contains module definition which exports subs, should i expect to see those exported subs in the current scope?
19:32 bartolin_ hmm, looks like parrot didn't like the last nqp bump. it builds fine with cb5bb33 but dies with "Signal 11" on commit 00c3fae
19:34 ab5tract or be able to "use Module::In::File" and get those subs?
19:35 davido__ joined #perl6
19:37 colomon joined #perl6
19:39 FROGGS_ ab5tract: look at this as a working example: https://github.com/perl6/roast/blob/master/S11-modules/require.t
19:46 Kristien joined #perl6
19:49 ab5tract that clarifies a lot, thanks
19:56 vendethiel ab5tract: you'll be able to import :p
19:58 pyrimidi_ lizmat++ # p6weekly
20:02 dalek doc: e058fc8 | moritz++ | lib/Language/regexes.pod:
20:02 dalek doc: Document :global, :pos
20:02 dalek doc: review: https://github.com/perl6/doc/commit/e058fc8d2c
20:02 ab5tract vendethiel: i'm starting to get it :)
20:04 ab5tract but still struggling with the nuances... the whole "how do i use the 'use' syntax for modules that are co-existing in a distribution that isn't installed yet" kind of thing
20:04 ab5tract perl6 -I lib works
20:05 kaare_ joined #perl6
20:07 mvuets joined #perl6
20:10 FROGGS_ ab5tract: the tests in roast are usually fairly helpful... you'll see working examples, but also code that is meant to work but is NYI or has bugs
20:11 FROGGS_ and roast is always up to date of course
20:11 ab5tract right
20:11 abraxxa joined #perl6
20:11 moritz at least those parts of roast that are in rakudo's t/spectest.data
20:12 ab5tract it's an impressive body of work :)
20:13 ab5tract but for things like 'perl -I' .. it's not obvious where to look
20:14 ab5tract i tried shifting onto @*INC, after seeing an example in the require file unshifting from it, but that didn't work out as expected (for instance)
20:14 ab5tract 'require.t' file
20:15 ab5tract anyway, attempting to document along the way :)
20:16 spider-mario joined #perl6
20:17 virtualsue joined #perl6
20:24 FROGGS_ m: #| foo␤sub foo { }; say &foo.WHY
20:24 camelia rakudo-moar 243c16: OUTPUT«foo␤»
20:25 FROGGS_ k
20:25 beastd joined #perl6
20:33 pyrimidine FROGGS_: did the line separator bug fix ever get merged in? RT #122971
20:33 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122971
20:34 pyrimidine Was definitely moarvm-specific (jvm works fine)
20:34 FROGGS_ pyrimidine: no, it is still up for discussion/review with jnthn and me, but both of us had no time yet
20:34 pyrimidine FROGGS_: np. thanks!
20:55 spider-mario joined #perl6
21:03 Alina-malina joined #perl6
21:03 Alina-malina joined #perl6
21:04 Sysaxed` joined #perl6
21:04 nine_ Would you say this is just bad or really horrible code? $event."{$reply == 0x00004000 ?? 'accept' !! 'ignore'}"();
21:05 PerlJam It's certainly not straight-forward to read.
21:07 lizmat nine_: and will probably optimize horribly
21:07 flussence $reply == 0x00004000 ?? $event.accept !! $event.ignore; is three chars shorter ;)
21:07 ab5tract i think that that pattern of interpolating method names is a sad one
21:08 ab5tract flussence: and so much clearer :)
21:08 nine_ flussence: indeed! And it has almost none of the drawbacks. Aside from misusing the tertiary operator. But I'd say that's ok for the purpose of not wasting too much space on a slide.
21:11 flussence I usually align ternary ops over multiple lines when I use them... it ends up being easier to read than short if-else blocks
21:11 vendethiel you should definitely have written $event."{<accept ignore>$reply == 0x00004000]}"() =)
21:12 vendethiel whjoops, missing a [
21:15 nine_ vendethiel: isn't this the reverse?
21:15 lizmat ({$event.ignore},{$event.accept})[$reply == 0x00004000]    # optimizes better, probably  :-)
21:15 vendethiel probably :p
21:16 vendethiel <ignore accept>.map($event."{
21:16 vendethiel <ignore accept>.map($event."{*}")[$reply == ...]
21:16 flussence .oO( neat, spectest got 20s faster for me in the last week or so... almost below the 5 minute mark! )
21:17 nine_ If someone is looking for lightning talk material. We have it right here...
21:18 lizmat moritz: I think 00c3faed74b6 (Bump NQP revision) broke rakudo on parrot
21:18 timotimo what exactly is the lightning talk material here?
21:19 nine_ timotimo: 15 more and more obscure ways to write if a { foo.bar } else { foo.baz};
21:20 timotimo heh
21:20 vendethiel hahahaha
21:20 vendethiel we *need* those!
21:21 timotimo $event."{"accept" xx $reply == 0x00004000 . "ignore" xx $reply != 0x00004000}"()
21:22 vendethiel timotimo++
21:24 * nine_ wonders why no one has brought up goto yet
21:24 vendethiel NYI?
21:24 nine_ a shame
21:25 * masak hasn't really missed goto in Rakudo yet
21:25 masak labeled next/last/redo are awesome, though
21:26 vendethiel masak: I thought it was considered awesome, tho?: )
21:26 masak heh :)
21:26 moritz lizmat: so, an NQP commit broke rakudo-p?
21:27 masak my goto in that talk was actually a serializable continuation. which is awesome.
21:27 Kristien goto is good
21:27 moritz goodto
21:28 Kristien Generating imperative code without goto is a pain.
21:28 masak no-one disputes that goto in object code is good
21:29 timotimo m: sub foo() { }; &foo.add_phaser('ACCEPT', { say "lol" }); &foo.add_phaser('IGNORE', { say "oh no!" }); &foo.fire_phasers(<accept ignore>[$reply == 0x00004000]);
21:29 camelia rakudo-moar 243c16: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/yy2Qo3FV9Nâ�¤Variable '$reply' is not declaredâ�¤at /tmp/yy2Qo3FV9N:1â�¤------> [32m&foo.fire_phasers(<accept ignore>[$reply[33mâ��[31m == 0x00004000]);[0mâ�¤    expecting any of:â�¤        post…»
21:29 Kristien masak lambda calculus fanboys do!
21:29 timotimo m: my $reply = 1; sub foo() { }; &foo.add_phaser('ACCEPT', { say "lol" }); &foo.add_phaser('IGNORE', { say "oh no!" }); &foo.fire_phasers(<accept ignore>[$reply == 0x00004000]);
21:29 camelia rakudo-moar 243c16: ( no output )
21:29 clkao joined #perl6
21:29 timotimo hmm
21:29 Kristien I often use goto. It's a great tool. I wish JavaScript had it.
21:30 vendethiel *g*
21:31 brrt joined #perl6
21:31 brrt friends of goto are friends of mine :-)
21:32 Kristien yay I have a friend!
21:36 ecocode joined #perl6
21:36 lizmat moritz: I'm afraid so, trying to b-sect which NQP commit
21:36 lizmat suspecting jnthn 6pe branch merge
21:37 Spot__ joined #perl6
21:43 [ptc] moritz: yes, I've seen the new code in Pod::To::HTML; haven't had the time to look at it properly tho
21:43 [ptc] have spent the evening debugging irssi problems :-/
21:44 [ptc] moritz: so one can now just call the callback from htmlify?
21:46 [ptc] moritz: and possibly use Proc::Async to pipe the pod node content into the call to pygmentize?
21:49 pyrimidine Here's an odd compilation bug I found with 'handles': https://gist.github.com/cjfields/f899329609b3eee7129d#file-gistfile1-txt
21:51 pyrimidine works fine, but compile to mbc and it blows up
21:52 pyrimidine strange thing: if I change the 'handles <lines words>' to "handles 'words'" or 'handles Str' it works fine
21:53 pyrimidine haven't tried jvm
21:54 lizmat please rakudobug it
21:54 pyrimidine jvm works, seems moarvm-specific.
21:54 pyrimidine lizmat: will do
21:55 Peter_R joined #perl6
21:58 ab5tract Terminal::Print is getting dangerously close to release-worthy :)
21:59 lizmat .tell jnthn the latest NQP bump broke parrot build with a segfault (On OS X)
21:59 yoleaux lizmat: I'll pass your message to jnthn.
21:59 lizmat .tell jnthn nqp 91f6f525b766 or earlier is bad
21:59 yoleaux lizmat: I'll pass your message to jnthn.
22:00 ab5tract FROGGS_: that trick you showed with: '$raw ~~ s:1st[...];' .. is it possible to so something like 's:*-1st[...];' ?
22:00 ab5tract *to do
22:02 hoelzro ab5tract: I just saw boxbrain on your GH; do you have screenshots?
22:03 FROGGS_ m: say "foobar" ~~ m:pos(*-1)/(.)/
22:03 camelia rakudo-moar 243c16: OUTPUT«cannot numify this␤  in method match at src/gen/m-CORE.setting:6822␤  in block <unit> at /tmp/GvE06LCKcM:1␤␤»
22:04 pyrimidine lizmat: take that back, it's not MoarVM-specific, also getting a java.lang.NullPointerException with the JVM version, will add to ticket
22:04 FROGGS_ m: say "foobar" ~~ m:pos(-1)/(.)/
22:04 camelia rakudo-moar 243c16: OUTPUT«===SORRY!===␤Start argument to substr out of range. Is: -1, should be in 0..Inf; use *-1 if you want to index relative to the end␤»
22:04 FROGGS_ m: say "foobar" ~~ m:pos(*-1)/(.)/ # that's LTA
22:04 camelia rakudo-moar 243c16: OUTPUT«cannot numify this␤  in method match at src/gen/m-CORE.setting:6822␤  in block <unit> at /tmp/V0Jx10OLl4:1␤␤»
22:04 FROGGS_ ab5tract: no idea how
22:05 FROGGS_ ab5tract: you could reverse your string before matching as a workaround :o)
22:05 agentzh joined #perl6
22:07 ab5tract FROGGS_: that's a pretty interesting idea.. i'll put it in as a todo :)
22:09 espadrine joined #perl6
22:09 raiph joined #perl6
22:11 masak ab5tract: :nth(*-1) should do
22:11 ecocode left #perl6
22:13 FROGGS_ m: say "foobar" ~~ m:nth(*-1)/(.)/
22:13 camelia rakudo-moar 243c16: OUTPUT«「r」␤ 0 => 「r」␤»
22:13 FROGGS_ masak++
22:14 masak m: $_ = "ABCDEFGH"; m:nth(*-1)/./; say ~$/
22:14 camelia rakudo-moar 243c16: OUTPUT«H␤»
22:14 masak m: $_ = "ABCDEFGH"; m:nth(*-2)/./; say ~$/
22:14 camelia rakudo-moar 243c16: OUTPUT«G␤»
22:14 masak heh, *-1 being the last one is right, but feels weird here since :nth is 1-based.
22:15 masak which feeling in *itself* is weird, since the 1-based case is the one that makes it all symmetric. no zero.
22:15 masak at either end.
22:17 ab5tract .hug masak
22:17 masak hug masak
22:17 masak hugme: hug me
22:17 * hugme hugs masak
22:17 masak \o/
22:17 ab5tract hugme: hug masak
22:17 * hugme hugs masak
22:17 * masak feels all warm and fuzzy
22:19 mvuets joined #perl6
22:24 masak so, what can we expect in terms of reactions to TimToady's talk on Sunday?
22:24 timotimo oh, it's already this sunday?
22:24 timotimo wow, su
22:24 timotimo time sure flies*
22:24 masak will there be an influx of people on the IRC channel? will there be more traffic on the mailing lists?
22:24 masak should we prepare somehow?
22:25 Peter_R I have influxed early, to avoid the rush
22:25 * masak .oO( "Welcome, Visitor. A Handy Guide To Being New At Perl 6" )
22:25 masak Peter_R: awesome. let us know if anything obstacles you, so we can help.
22:25 Kristien masak: if only one existed
22:26 Peter_R I stared playing with p6 a while back but nothing serious
22:27 Peter_R When I do wrap my head around the basics, I'll write up what I used
22:27 masak Kristien: it's entirely possible to put one together. it could be as simple as a gist.
22:27 masak Peter_R: oh, excellent!
22:27 masak ++Peter_R
22:28 Peter_R There are already bits and pieces around, just got to look a bit :P
22:28 espadrine aren't people into “try <???> in your browser” nowadays?
22:28 masak espadrine: we actually had that, back in 2005!
22:28 masak espadrine: it bit-rotted, though :/
22:29 masak espadrine: our best hope of having it again is (IMO) pmurias++' work on a JS backend for nqp/Rakudo.
22:29 flussence it was a kinda horrible hack to work around the fact we had worse startup times than java back then... probably for the best if it was done differently this time around.
22:30 espadrine people will have to deal with http://learnxinyminutes.com/docs/perl6/ in the meantime
22:30 Peter_R espadrine, I've been through that!
22:30 hoelzro if people want to try Rakudo without having to deal with building & installation, I made a docker image for rakudo star
22:31 Peter_R Rakudobrew was quite easy iirc
22:33 Peter_R More options are always good though
22:34 Adriaaan joined #perl6
22:37 lizmat good night, #perl6!
22:37 masak 'night, lizmat
22:38 ab5tract so, having a templated version of the escape sequence and using regexes is significantly faster than getting the sequence back from tput
22:39 vendethiel wow, it's already this sunday :o)
22:40 ab5tract i'm pleasantly surprised at that :) .. the test for printing a full screen of characters one by one has the feel of a "visual speed of the for loop" benchmark
22:42 ab5tract but it's visually faster when i'm using the regex-based subroutine :)
22:43 dalek rakudo-star-daily: 3ec668e | coke++ | log/ (9 files):
22:43 dalek rakudo-star-daily: today (automated commit)
22:43 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/3ec668e8ae
22:52 * [Coke] does a semi-automated push from the hotel in dearborn.
22:56 jakesyl joined #perl6
22:57 grep0r joined #perl6
23:03 colomon [Coke]: dearborn michigan?  We were there yesterday....
23:03 kaare_ joined #perl6
23:06 [Coke] huh.
23:06 [Coke] I'm right near umich dearborn.
23:07 * geekosaur waves from northern ohio
23:07 [Coke] ~~
23:13 atroxaper joined #perl6
23:15 masak oh, you people and your states ;)
23:18 Peter__R joined #perl6
23:23 Ovid_ I’m heading to bed, but here’s my final (*cough*) version of my talk for FOSDEM: http://www.slideshare.net/Ovid/perl-6-for-mere-mortals
23:27 masak Ovid_++ # very nice slides
23:27 masak content-wise and presentation-wise.
23:27 Peter__R joined #perl6
23:29 colomon [Coke]: we’re back two hours north now.  But we took the little guy to the Henry Ford Museum Saturday and Sunday.
23:29 * colomon has never been to umich dearborn
23:31 vendethiel Ovid_: with the title, the first slide looks like "look at them! they are mortaaaals"
23:32 masak Ovid_: one question that came up for me at slide 56 was this: you had just got 'is cached' trait onto the only sub version -- how do you get that onto the multi sub version?
23:33 BenGoldberg joined #perl6
23:34 BenGoldberg joined #perl6
23:35 Juerd LOL @ slide 36
23:38 masak thought on slide 68: we really need to make an 'is req' attribute at some point, in a module or whatever, so that we can get rid of that little having to repeat the attr name nagging redundancy.
23:40 masak thought on the Perl 6 vs lang X slides: aww yeah \o/
23:41 Juerd Or make "has" imply that it's mandatory, and introduce something new for optional attributes... "can haz" ;-)
23:41 masak intriguing.
23:42 masak my first reaction was "no, can't do that", but now I can't think of why not.
23:42 Juerd Given the state of Perl 6 it's probably a 5 line patch.
23:42 masak Ovid_++ # again
23:44 Juerd Slide 69: haha. I never do that in Perl 5. Too much work.
23:44 vendethiel Ovid_: why's slide 55 using multi method?
23:45 Adriaaan Hai, anyone knows the best way to create an array of ~1M items filled with random integers? I currently have: "@random_numbers.push((rand*1000000).Int) for ^1000000;" but I'm not sure that's the best way to create it
23:45 ab5tract Ovid_++ # nicely done
23:46 vendethiel m: class A { has $.foo; method foo(:$.foo) {} }; my $a = A.new(foo => 5); say $a.perl; $a.foo(:10foo); say $a.perl
23:46 masak Adriaaan: I'd do `my @random_numbers = rand xx 1_000_000;`
23:46 camelia rakudo-moar 243c16: OUTPUT«Memory allocation failed; could not allocate 15632 bytes␤»
23:46 vendethiel wat
23:46 masak heh, maybe it picked up my code :P
23:47 vendethiel hahahaha
23:47 vendethiel m: class A { has $.foo; method foo(:$.foo) {} }; my $a = A.new(foo => 5); say $a.perl; $a.foo(:10foo); say $a.perl
23:47 BenGoldberg joined #perl6
23:47 camelia rakudo-moar 243c16: OUTPUT«Memory allocation failed; could not allocate 15632 bytes␤»
23:48 gfldex m: my @a := rand xx *; say @a[10..20];
23:48 camelia rakudo-moar 243c16: OUTPUT«0.767674098722093 0.225756619781578 0.771518872560854 0.670292213091914 0.603386555043046 0.324638293825621 0.812818196916052 0.434580776320243 0.90554275758866 0.770584529233761 0.0275407960568279␤»
23:50 Juerd Ovid_: I just learned that the first "Thank you" was insincere when I got to slide 94. If you don't get to that point, the audience will never know. You're so evil :)
23:50 masak unreliable narrator :)
23:51 Adriaaan thanks masak, that's a bit clearer at the least :D
23:51 masak it's Fight Club all over again...
23:51 masak Adriaaan: `xx` is nice in that it re-runs the LHS for each element.
23:51 Juerd Guess which rule you just broke. :)
23:51 masak :P
23:52 masak Adriaaan: also pay attention to what gfldex did. that's useful if you don't know if you're going to use all the random elements.
23:52 masak Juerd: though I guess that rule only really applies to members of the club.
23:53 masak and really, those members were very bad at keeping to the rule. (actually, both #1 and especially #2)
23:53 Juerd I think they were just pretending not to be members.
23:53 Juerd Just like yourself :P
23:54 Juerd Nice try!
23:54 Adriaaan I am going to use all elements :) ":=" means lazy right?
23:54 masak Juerd: :P
23:54 masak Adriaaan: no, it means binding.
23:54 Juerd Where binding is roughly comparable to aliasing.
23:54 gfldex := used witha whatever (the *) forms a lazy list in the most lazy form
23:55 masak that's a good way of putting it.
23:55 Juerd Ovid uses "=" in his slides, for lazy things. Does that work too?
23:55 masak yes.
23:55 masak ...at least most of the time.
23:56 vendethiel *g*
23:56 masak I think there might be something tricky like when you're using the name of the thing you're assigning to inside of the expression you're assigning...
23:56 masak ...and it's possible that still doesn't work in Rakudo, don't remember...
23:56 Juerd I'll just use := all the time then, and get bitten by a different class of interesting behaviour :P
23:56 vendethiel (he means recursive assignments)
23:56 masak Juerd: I think constant essentially uses `:=` under the hood no matter what you write.
23:56 Juerd constant?
23:57 masak the `constant` keyword.
23:57 Juerd Ah
23:57 Juerd Would make sense
23:59 skids joined #perl6

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

Perl 6 | Reference Documentation | Rakudo