»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
masak what a nice person. 00:07
00:13 robinsmidsrod left 00:15 robinsmidsrod joined
vendethiel masak: wow, that was a length discussion :P 00:19
00:24 Peter_R joined
vendethiel oh, he's the guy that issue'd on the learnx 00:26
dalek c: f75b7a3 | skids++ | lib/Type/Capture.pod:
Expand on Capture documentation
00:29
vendethiel masak: realized your blog post can now get rid of the "our $sum" :P 00:41
(I mean -- it can be lax) 00:42
00:49 agentzh joined 00:52 risou_ left 00:53 risou joined
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:53
00:54 araujo joined, araujo left, araujo joined 00:58 gfldex left 01:03 fwilson left, fwilson joined 01:08 agentzh left
masak vendethiel: $ perl6 -ne '/^\d+/ or die; $sum += $/; END say $sum' input 01:17
vendethiel: I got this working.
vendethiel if you don't need it to die, /^\d+/ && $sum += $/ is good as well
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
vendethiel ignores empty lines 01:18
masak troo
vendethiel however, lines.grep(^(\d+)/) might be faster
masak that doesn't use -n at all, though 01:19
which was the point of the post :)
'night, #perl6
vendethiel right :P 01:20
01:31 Ben_Goldberg left 01:50 vendethiel left 01:51 KCL joined 01:53 KCL_ left 01:55 adu joined 01:58 telex left 02:00 telex joined 02:07 adu left, adu joined, adu left 02:09 panchiniak joined, panchiniak left, adu joined 02:19 virtualsue_ joined 02:20 virtualsue left, virtualsue_ is now known as virtualsue 02:24 atta left, atta joined 02:27 chenryn joined 02:42 petercom1and left, petercom1and joined, petercom1and is now known as petercommand 02:45 ilbot3 left 02:46 chenryn left, ilbot3 joined 02:47 gr33n7007h joined 02:48 chenryn joined 03:12 virtualsue left
dalek ecs: e315952 | util++ | S (10 files):
Fix typos.
03:20
03:22 chenryn left 03:26 chenryn joined 03:34 renormalist left, renormalist joined 03:45 zhanggong joined 03:46 zhanggong left, yeahnoob joined 03:47 dj_goku_ joined 03:48 dj_goku left 03:49 noganex_ joined 03:52 noganex left 03:53 chenryn left 03:59 chenryn joined
flussence m: say q:to{EOT}.perl;␤ foo␤EOT␤ 04:05
camelia rakudo-moar 243c16: OUTPUT«" foo\n"␤»
flussence didn't that have an implied .indent(*) at some point?
skids Maybe with an adverb? 04:06
04:06 Peter_R left
flussence oh! never mind, I'm wrong. 04:08
m: say q:to{EOT}.perl;␤ foo␤ EOT␤
camelia rakudo-moar 243c16: OUTPUT«"foo\n"␤»
flussence that makes sense :)
04:17 Mouq left
dalek kudo/nom: 2def0ea | moritz++ | src/core/Proc/Async.pm:
Revert "One more use of CLONE-LIST-DECONTAINERIZED"

This reverts commit 371434faeb22ec668d3d0e7744b1cb52158a2b91.
  $args-without is initialized with $!path.Str, which this patch dropped,
rending Proc::Async unusable.
04:29
04:30 chenryn left 04:36 agentzh joined
dalek c: 3d7e48a | skids++ | lib/Language/functions.pod:
Fill in "arguments" section, and link to Capture
04:54
05:01 chenryn joined 06:11 [Sno] left
dalek ast: 0821592 | moritz++ | S17-supply/categorize.t:
RT #123674: Test that sub-supplies from categorize get .done
06:21
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123674
TimToady "rending X unusable" :) 06:33
moritz argl 06:36
TimToady it seemed apt
moritz "ranting X unusable" was what I meant, obviously :-)
TimToady it's the accidental puns that are the best ones
06:42 zby_home joined 06:43 zby_home left 06:48 rindolf joined 06:58 FROGGS__ left 07:10 araujo left 07:16 [Sno] joined 07:31 Rounin joined 07:36 chenryn left 07:38 xfix joined 07:39 adu left 07:52 agentzh left 07:55 regreg joined 07:58 zakharyas joined 08:04 darutoko joined, prime left 08:05 blackbolt joined
blackbolt msg NickServ identify blackbolt opl321 08:07
lol
moritz hopes blackbolt has changed his password by now :-) 08:11
blackbolt you can try ;-) 08:12
08:14 Sqirrel left 08:16 prime joined, pecastro left 08:25 FROGGS joined 08:26 chenryn joined 08:27 Maddingu1 is now known as Maddingue 08:28 dj_goku_ left 08:31 dj_goku joined 08:35 Kristien joined
Kristien hola 08:35
moritz good morning Kristien 08:39
08:49 yeahnoob left 08:50 xfix left 08:51 xfix joined 09:07 virtualsue joined 09:12 blackbolt left
lizmat good *, perl6! 09:17
FROGGS hi lizmat 09:18
lizmat moritz: good catch
I guess I missed the failure because the procasync/basic test is a flapper (for me, at least) 09:19
test 28 always fails for me 09:22
dalek kudo/nom: 88b2d14 | lizmat++ | src/core/ (2 files):
Attempt #2 at using CLONE-LIST-DECONTAINERIZED
lizmat it gets Nil instead Proc::Status 09:23
moritz lizmat: then please fudge the test
09:25 dakkar joined, petercommand is now known as petercommand_, petercommand_ is now known as petercommand
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?
ab5tract FROGGS: i found them while mucking with control characters 09:27
dalek ast: 1064f23 | lizmat++ | S17-procasync/basic.t:
Fudge failing test
FROGGS ab5tract: what do you wanna do with them?
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
ab5tract hmm, that's not incorrect 09:28
FROGGS: if you have a chance to run the code in this gist, it will show you what i am confused about: gist.github.com/ab5tract/4961802803d3e5fb489d 09:29
09:31 molaf_ joined
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
if you ask for elems on the processed sequence, it is greater than the number of characters
FROGGS ahh 09:33
09:34 rindolf left, molaf__ left
dalek ast: beea0a8 | lizmat++ | S32-str/sprintf.t:
Fix/Unfudge tests
09:35
FROGGS ab5tract: the problem is that the escape sequences that you get back (that are in @parts), are not interpolated 09:36
ab5tract: so, that prints 'True': say @parts.join('') eq '\x[1b][24;36H'; 09:37
ab5tract: note the single quotes
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:38
ab5tract: so, this would work: say qq:x{ tput cup $y $x } 09:40
and btw, this: [~] @parts.map(*) is the same as @parts.join('')
moritz didn't know about map(*) 09:41
m: say <a b c>.map(*)
camelia rakudo-moar 243c16: OUTPUT«a b c␤»
ab5tract FROGGS: i note that similarity in that paste 09:44
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
ab5tract FROGGS: the idea is not to have to call tput for every cursor movement 09:46
09:46 virtualsue left
ab5tract but to grab the correct escape sequence, grok it, and use it later 09:47
moritz ab5tract: .perl uses regexes internally 09:49
so it's possible
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:50
FROGGS ab5tract: I commented on your gist: gist.github.com/ab5tract/496180280...nt-1380204 09:52
ab5tract thanks! 09:54
gist.github.com/ab5tract/4961802803d3e5fb489d
FROGGS you're welcome :o)
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
m: my @a = ('55x55' ~~ /(\d\d)(x)(\d\d)/).values>>.Str; @a.perl.say 09:56
camelia rakudo-moar 243c16: OUTPUT«Array.new("55", "x", "55", "")␤»
FROGGS so, the .perl'd string has of course more chars, since it converts a single byte/char (like "\1b") to '\x[1b]'
ab5tract (and here was my example of extra characters from last night)
ah, you mean because it is escaped in order to avoid interpolation?
09:56 Tux__ left
FROGGS hmmm no 09:57
moritz m: say "foo\x[1b]bar"
camelia rakudo-moar 243c16: OUTPUT«foobar␤»
moritz m: say "foo\x[1b]bar".perl
camelia rakudo-moar 243c16: OUTPUT«"foo\x[1b]bar"␤»
FROGGS .perl escapes strings, so they only contain printable characters that round-trip properly
Kristien hmm I just realised
moritz ... and don't confuse the poor user
ab5tract gotcha, that's a bit what i meant but i like your way of saying it better :)
Kristien you can use subsets for D-like contract programming in Perl 6 :D
FROGGS *g* 09:58
09:58 tgt left
ab5tract Kristien: looking forward to seeing an example ;) 09:58
10:00 TuxCM joined
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␤»
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
m: my @a = ('55x55' ~~ /(\d\d)(x)(\d\d)/).values>>.Str; @a.perl.say; @a[*-1].ord.say
camelia rakudo-moar 243c16: OUTPUT«Array.new("55", "x", "55", "")␤(Int)␤»
Kristien ab5tract: gist.github.com/rightfold/1767997aea04c38385dc 10:03
Class invariants are more interesting, though, as they require post-method-call hooks.
but since it's Perl that can probably be achieved as well :P
ab5tract hehe. yeah, that's really nice! 10:05
sergot hi o/ 10:07
Kristien is there already a weak map functionality in the perl 6 library? 10:09
they're needed for implementing class invariants
10:09 espadrine_ joined
psch hi #perl6 \o 10:10
m: ([1,2,3], :{}).values.say 10:11
camelia rakudo-moar 243c16: OUTPUT«1 2 3 ␤»
psch m: ([1,2,3], :{}).values.elems.say
camelia rakudo-moar 243c16: OUTPUT«2␤»
psch m: ([1,2,3].values, :{}.values).values.elems.say 10:12
camelia rakudo-moar 243c16: OUTPUT«3␤»
psch ^^^ that was my theory for the 4 instead of 3 elems in Match.values
m: ([1,2,3].values, :{}.values).flat.values.elems.say
camelia rakudo-moar 243c16: OUTPUT«3␤»
10:15 regreg left
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␤»
psch m: my EnumMap $hashpart .= new; my $arraypart = [1,2,3]; say ($arraypart.values, $hashpart.values).flat.elems
camelia rakudo-moar 243c16: OUTPUT«3␤»
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␤»
psch there it is
10:16 regreg joined
psch Match.list has 3 elems, Match.hash has 1 elem 10:16
m: say ('55x55' ~~ /(\d\d)(x)(\d\d)/).hash.values.elems
camelia rakudo-moar 243c16: OUTPUT«1␤»
10:17 pecastro joined
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()), "" => [])␤»
FROGGS ahh 10:18
10:19 pecastro left
ab5tract i can sort of see it ;) 10:21
10:22 rurban_ joined
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
Kristien > No such method 'gist' for invocant of type 'NQPRoutine' 10:27
:F
is that a bug?
10:28 broquain1 is now known as broquaint
ab5tract FROGGS: your comment on my gist makes me wish for a comprehensive guide to p6 regexes 10:28
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
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)
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:32 espadrine_ is now known as espadrine
FROGGS ab5tract: yes, we know that docs is something we need to work on :/ 10:33
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␤␤»
FROGGS good thing is that vendethiel++ and moritz++ did a good bit in the last weeks/months
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…»
Kristien not quite gist
Moritz in your blog post about traits with the memoization example shouldn't you use my %cache{Any}; instead of my %cache;? 10:43
moritz Kristien: I probably should, but when I wrote it, that wasn't implemented 10:47
Kristien OK
psch m: "a" ~~ /(.)/; say $/.values.elems; "ab" ~~ /(.)(.)/; say $/.values.elems # uhh 10:48
camelia rakudo-moar 243c16: OUTPUT«1␤3␤»
psch so having more than one positional capture gives you an empty, anonymous named capture for free
that's how i interpret that at least :) 10:49
10:49 jack_rabbit left, virtualsue left
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␤»
moritz m: "ab" ~~ /(.)(.)/; say $/.values.flat.perl
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␤»
moritz m: "ab" ~~ /(.)(.)/; say $/.values.flat.elems
camelia rakudo-moar 243c16: OUTPUT«3␤»
moritz psch: yes, that looks wrong
psch m: "ab" ~~ /(.)(.)/; say $/.hash.perl 10:51
camelia rakudo-moar 243c16: OUTPUT«EnumMap.new("" => [])␤»
psch m: "ab" ~~ /(.)./; say $/.hash.perl 10:52
camelia rakudo-moar 243c16: OUTPUT«EnumMap.new()␤»
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
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…»
psch nqp-m: my $match := "ab" ~~ /(.)./; say(nqp::elems($match))
camelia nqp-moarvm: OUTPUT«1␤»
psch nqp-m: my $match := "ab" ~~ /(.)(.)/; say(nqp::elems($match))
camelia nqp-moarvm: OUTPUT«2␤»
10:56 vendethiel joined 10:58 jack_rabbit joined, jack_rabbit left
FROGGS ab5tract: btw, I'd like to write a Perl 6 regexes/grammar tutorial, though, time is limited these days 11:06
11:09 virtualsue joined, salv00 joined
moritz there are several incomplete ones 11:10
might sense to start from them
ab5tract FROGGS: my plan is to definitely give back as much of the knowledge as i have gained from #perl6 as possible 11:12
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:13
11:14 fhelmberger joined, xfix left 11:19 chenryn left 11:27 dayangkun joined 11:36 jack_rabbit joined 11:41 jack_rabbit left
ab5tract m: my @a = ('55x55' ~~ /(\d\d)(x)(\d\d)/).values>>.Str # is this really idiomatic? 11:43
camelia ( no output )
11:45 chenryn joined 11:51 [ptc] joined 11:52 jack_rabbit joined 11:58 [ptc] is now known as ptc, ptc is now known as [ptc] 12:00 rindolf joined 12:05 grep0r joined 12:09 jack_rabbit left 12:10 [ptc] left, [ptc] joined 12:11 [ptc] left
psch 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
12:17 mvuets joined
psch as in, the captures should be correct, instead of ignoring probably-incorrect captures... :) 12:18
but i don't see through the regex engine atm
12:21 Kristien left 12:22 jack_rabbit joined 12:24 rindolf left 12:25 skids left, rindolf joined 12:27 rindolf left, rindolf joined 12:29 rindolf left 12:30 rindolf joined 12:31 rindolf left, rindolf joined 12:32 rindolf left 12:33 rindolf joined, rindolf left, Guest25813 joined, Guest25813 is now known as [ptc], rindolf joined 12:34 rindolf left, jack_rabbit left, rindolf joined 12:37 rindolf left, rindolf joined, rindolf left 12:38 rindolf joined, rmgk is now known as Guest86863, rmgk_ joined, Guest86863 left, rmgk_ is now known as rmgk 12:40 chenryn left 12:43 rindolf left, rindolf joined 12:44 rindolf left 12:45 RPu joined, rindolf joined 12:47 rindolf left 12:48 rindolf joined 12:49 pyrimidi_ joined 12:50 rindolf left, rindolf joined, [particle]1 joined, rindolf left 12:51 rindolf joined, [particle] left, telex left, rindolf left, stux|RC left, pyrimidine left 12:52 telex joined, darutoko- joined 12:53 stux|RC-only joined, kjs_ joined 12:54 prevost joined 12:55 darutoko left 12:58 Peter_R joined 13:00 dayangkun left 13:16 kaare_ left 13:32 mvuets left 13:33 araujo joined, araujo left, araujo joined 13:34 rindolf joined, guru joined, guru is now known as Guest47001, Guest47001 is now known as ajr_
dalek kudo/nom: d1b1f1b | lizmat++ | src/core/Any.pm:
Make adverbed slices up to 2x as fast

By using an nqp level hash for adverb checking instead of a Perl6 hash.
13:42
13:46 salv0 left 13:47 salv0 joined
dalek kudo/nom: 270303f | lizmat++ | src/core/control.pm:
Streamline CLONE-HASH-DECONTAINERIZED a bit
13:47
13:50 dayangkun joined 13:51 KCL_ joined 13:54 KCL left 13:59 Kristien joined 14:05 darutoko joined 14:07 darutoko- left 14:12 brrt joined
brrt the perl jam ccc presentation is quite lousy 14:14
'ha ha let's make fun of perl because we don't understand a bit of it'
14:19 Kristien left
brrt literally not one bit of it 14:21
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
he is forgiven
just barely
b2gills forgiven, but not forgotten 14:25
vendethiel brrt: is that supposed to be rude for us 1994 kids? :p
brrt (although the my $scalar = (1,2,3,'a',b','c'); print $scalar; did surprise me)
14:25 [Sno] left
brrt no, not at all 14:25
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
brrt (by 'you' i mean 'the speaker and everybody laughing so hard')
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:27
b2gills I wouldn't give a presentation about fortran 77 WATs without consulting a fortran 77 programmer 14:28
Peter_R brrt: That scalar thing... damn you Perl! 14:30
psch the presentation style was just bad imo
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
moritz Peter_R: the framing was "we owned perl, and can break any web app written in it"
Peter_R: at least that's how the talk teaser sounded like 14:32
so, 80% trolling, 20% useful information
brrt 'if you program perl and don't understand context, you're going to have a bad time'
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
and i'm fairly sure that taint fixes this
psch Peter_R: right, my misunderstanding then :)
vendethiel brrt: sometimes people do that on purpose. for example, gary berndhat's js wat 14:35
psch events.ccc.de/congress/2014/Fahrpla...n-31c3.pdf the slides, if anyone wants to look at them
14:35 pecastro joined 14:36 brrt left
psch there's a few transitional slides missing iirc 14:37
media.ccc.de/browse/congress/2014/3...html#video the actual talk has a few more transitional slides, mostly with the caption "WAT" 14:38
14:44 Kristien joined
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
but I'm not terribly interested in wasting 30 minutes of my life if the video doesn't add any useful clarification
ab5tract right.. if you pass an array, and expect an arrayref, you are not a perl programmer 14:48
muraiki yeah, that's what I tried to explain to a non perl programmer. everything in the slides was totally misinformed 14:49
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
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
so dangerous! heh
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
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
psch the worst part is that what he found could easily stand on its own as a good discovery
muraiki yeah, the actual problem is a bit subtle and good to know about 14:54
psch but it turned into a lolperl talk
muraiki so that gives the rest of the talk an air of legitimacy
Peter_R I wonder if Python will be so hated in another 10 years? 14:55
geekosaur likely. people are noticing the ugly parts. but if anything I think python doomed itself differently by mishandling python3 14:57
vendethiel admits he doesn't like call flattening :-) 14:58
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
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
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)
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)
Peter_R I am just using Moose atm since I don't care about performance
I don't think the whole Perl 5 vs 6 naming does any favours towards people understanding the Perl situation either :P 15:03
masak heh, and the penultimate slide says 'At least know your language "features"' -- this message is approved by both Dunning and Kruger. 15:05
15:06 KCL_ left
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
15:09 gcole joined, Kristien left
Peter_R Moose definitely has a perceptible start up time, still only ~1 second though 15:12
15:12 espadrine left
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:14
15:15 agre joined
lizmat Perl 6 Weekly draft: p6weekly.wordpress.com/?p=342&...65a09545aa # comments welcome! 15:16
15:16 dayangkun left 15:17 Kristien joined, skids joined 15:18 spollei joined
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:18
15:19 agre left 15:21 sqirrel joined
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:23
lizmat ab5tract: I think I mentioned that a few weeks ago? 15:24
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!
thanks :)
yeah, i need to finish my "set/mix/bag makeover" so that the real debate on behavior can begin 15:26
though TimToady already co-signed the "set operators are more like arithmetic ops than equality ops"
15:26 xfix joined 15:27 brrt joined
brrt lizmat - looks good to me 15:28
15:29 TuxCM left, Peter_R left
timotimo lizmat: wow, 2x improvement just by using a nqp-level hash :S 15:29
i wonder how much faster .exists used to be compared to our current :exists and the :exists before this improvement 15:30
15:30 TuxCM joined
[Coke]_ m: say "hi from the airport" 15:31
camelia rakudo-moar 243c16: OUTPUT«hi from the airport␤»
FROGGS hi [Coke]_
15:32 silug_ left, ajr_ left
lizmat timotimo: you can still check that, as .exists was just renamed to .exists_key (and .exists_pos) 15:33
15:33 ajr joined, ajr is now known as Guest82605 15:34 Guest82605 is now known as ajr_
timotimo oh! 15:34
i didn't know that :)
dalek rl6-roast-data: 351b87e | coke++ | / (5 files):
today (automated commit)
15:37
15:37 espadrine joined
ab5tract lizmat: are we ready for '.exists-key' and '.exists-pos' ? :) 15:38
lizmat personally, I think so, yea
ab5tract i remember reading you mention that you would like to see a change like that before 6.0
lizmat I would like to see all public and semi-public facing API to be kebab-cased 15:39
but I don't think we have consensus on that yet
timotimo don't make me hungry pls 15:40
15:45 pmurias joined
pmurias hi 15:45
15:46 Sysaxed joined
masak \o 15:47
hoelzro o/ #perl6
[Coke]_ m: say (243-219)/2
camelia rakudo-moar 243c16: OUTPUT«12␤»
Sysaxed Hi! Is it possible to specify the return type of a sub?
FROGGS m: sub foo($a) returns Str { "bar" }; say foo 15:48
camelia rakudo-moar 243c16: OUTPUT«===SORRY!=== 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␤----…»
FROGGS m: sub foo($a) returns Str { "bar" }; say foo 42
camelia rakudo-moar 243c16: OUTPUT«bar␤»
FROGGS Sysaxed: ^^
Sysaxed oh that's how
psch m: sub foo($a --> Str) { "bar" }; say foo 42 15:49
camelia rakudo-moar 243c16: OUTPUT«bar␤»
FROGGS m: sub foo($a --> Str) { "bar" }; say foo 42
camelia rakudo-moar 243c16: OUTPUT«bar␤»
FROGGS right
:o)
TIMTOWTDI
Sysaxed oh so the --> thing is an alternative to 'returns' word?
FROGGS yes
Sysaxed okay, cool 15:50
thanks
FROGGS though, I guess I prefer the returns trait
Sysaxed well, 'returns' is too long to type...
FROGGS because it is self explaining, and I like code that a non-professional can read also 15:51
(my colleagues are not the best hackers, maybe that's why)
Sysaxed an arrow explains itself as well (turn these parameters into this)
FROGGS yeah, probably 15:52
psch is reminded of "x goes to zero"
15:52 ajr_ left
skids I seem to rememeber a difference between "returns" and "-->" in that one or the other validated inside the brackets? 15:52
psch the C WAT that is, i.e. "while ( x --> 0 ) { }" 15:53
timotimo haha
Sysaxed psch: wtf?
FROGGS nice one :o)
timotimo that gets parsed as x-- > 0
psch Sysaxed: the arrow explains itself, x goes to 0 ;)
Sysaxed aaah yeah
that one 15:54
FROGGS m: sub foo($a --> Str) { 42 }; say foo 42
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␤␤»
[Coke]_ wanders around to find something he can eat before the flight.
FROGGS m: sub foo($a) returns Str { 42 }; say foo 42
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 [Coke]_ is now known as [Coke]
FROGGS skids: seems it is doing the same 15:54
vendethiel lizmat++ weekly
Sysaxed is there any reason why --> is used? Instead of, uhm -> ? 15:55
lizmat -> is tainted by Perl 5
Sysaxed lizmat: and who cares? 15:56
sorry, I'm just trying to understand
timotimo this tainted -> you've given / i give you all a programmer could give you
Sysaxed this stuff is interesting
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 :(
camelia rakudo-moar 243c16: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: P6opaque, cs = 0)␤»
psch skids: returns doesn't fit there
skids: aside from that i don't know of any difference
lizmat m: say 42->Int # Sysaxed: this is why
camelia rakudo-moar 243c16: OUTPUT«===SORRY!=== 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␤------> say 42->⏏Int …»
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?
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␤␤»
psch also mistyping for &x..
15:58 gcole left
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␤␤»
psch huh
oh &postfix:<++> doesn't returns
timotimo "returns" currently just mostly uses up more memory and makes the core setting bigger
psch m: sub bar(Str $in) { $in++ }; sub foo($t, &x:(Str --> Str)) { x($t) }; say foo("abc", &bar)
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␤␤»
psch harumpf
timotimo fi you have something trivial like ++, i don't think it's worth much
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".
psch m: sub bar(Str $in) { $in x 2 }; sub foo($t, &x:(Str --> Str)) { x($t) }; say foo("abc", &bar) # there we go
camelia rakudo-moar 243c16: OUTPUT«abcabc␤»
timotimo ah
psch S06:Subroutine traits 16:00
synopsebot Link: perlcabal.org/syn/S06.html#Subroutine_traits
psch huh 16:01
m: sub Int foo($x) { 42 };
camelia rakudo-moar 243c16: OUTPUT«===SORRY!=== Error while compiling /tmp/vRmPV5WTUE␤Missing block␤at /tmp/vRmPV5WTUE:1␤------> sub Int ⏏foo($x) { 42 };␤»
psch that's supposedly legal as well?
ah no
m: my sub Int foo($x) { 42 };
camelia rakudo-moar 243c16: OUTPUT«===SORRY!=== Error while compiling /tmp/pDwO5_Eqxw␤Missing block␤at /tmp/pDwO5_Eqxw:1␤------> my sub Int ⏏foo($x) { 42 };␤»
psch oh, maybe it is
psch isn't great at reading right now
m: my Int sub foo($x) { 42 } # this it is 16:02
camelia ( no output )
16:03 Rounin left
lizmat timotimo: I'm not sure about the "returns" argument. Type checking already happens on return values, afaik 16:05
psch so trait_mod "as" for subs is the inner type constraint, trait_mod "of" is the outer 16:06
m: sub foo() as Str { 42 }; foo
camelia rakudo-moar 243c16: OUTPUT«===SORRY!=== Error while compiling /tmp/NXIJCblvF0␤Cannot call 'trait_mod:<as>'; none of these signatures match:␤:(Parameter:D $param, Any $type)␤at /tmp/NXIJCblvF0:1␤------> ␤»
psch m: sub foo() of Str { 42 }; foo 16:07
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␤␤»
psch "as" seems NYI. i seem to remember some discussion about that, if unclear about what exactly was discussed
16:07 atroxaper joined
TuxCM is it deliberate that q-like operators do not accept () as delimiters anymore? 16:08
lizmat TuxCM: yes, afaik
TuxCM still, this is confusing:
m: q(foo).say
camelia rakudo-moar 243c16: OUTPUT«===SORRY!=== Error while compiling /tmp/Eh9R0gyLut␤Undeclared routines:␤ foo used at line 1␤ q used at line 1␤␤»
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)␤»
FROGGS TuxCM: why is it confusing? 16:10
lizmat TuxCM: it was parsing as a sub q(), with a call to foo()
FROGGS m: say(foo)
camelia rakudo-moar 243c16: OUTPUT«===SORRY!=== Error while compiling /tmp/mZ4XclM2Pe␤Undeclared routine:␤ foo used at line 1␤␤»
lizmat m: say foo
camelia rakudo-moar 243c16: OUTPUT«===SORRY!=== Error while compiling /tmp/lsUOZlCOEm␤Undeclared routine:␤ foo used at line 1␤␤»
TuxCM runs and starts crying under a stone
FROGGS TuxCM: :P
psch i suppose mentioning quote ops not taking () as delim is ok there
similar to bare say 16:11
lizmat hands TuxCM a handkerchief
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
TuxCM thank you
psch (i do agree that it's not confusing, but it's something that we could hand-hold, in my opinion)
FROGGS TuxCM: do you want a bareword that turns into a string at full moon like in perl 5?
TuxCM sees yet another reason to make the space between the function name and the opening paren obligatory :P 16:12
Sysaxed noooo
TuxCM q (foo) is function q, q(foo) is the q operator :P
FROGGS /o\
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)
TuxCM nah, too confusing for others 16:14
FROGGS probably
TuxCM allow . on the next line would be swell
FROGGS hmmm 16:15
TuxCM tux.nl/Files/20150126171552.png
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
given $foo {
.=perl
.=say
}
though... I don't like it already
err, missed the semicolons 16:18
16:19 Kristien left
TuxCM in my example, the missing ; should already be indication enough that $foo.perl.say; is meant 16:19
I do not see a resemblance with your example
atroxaper Hello, #perl6 ! 16:20
16:20 gfldex joined
atroxaper At last I added 'git reference' option into Configure.pl fot rakudo and nqp. 16:21
FROGGS TuxCM: dunno if that would break anything: gist.github.com/FROGGS/f23f86df557bc1732a43 16:22
lizmat atroxaper: what does that allow you to do?
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
+ For example: --git-reference=/home/user/repo/for_perl6
+ Folders 'nqp', 'moar', 'parrot' with corresponding git repos should be in for_perl6 folder
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 :)
psch gist.github.com/peschwa/f124c3f84b69e6d37d5e D: 16:24
what a neat little jvm-specific bug
well, maybe parrot has it too, i don't have that built
dalek kudo/nom: 75476da | (Mikhail Khorkov)++ | / (2 files):
Add git reference option into Configure.pl

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.
kudo/nom: fc5f2d8 | lizmat++ | / (2 files):
Merge pull request #357 from atroxaper/nom

Add git reference option into Configure.pl
atroxaper lizmat: thank you! 16:25
psch the annoying thing is that neither jdb nor --ll-exception help :/
atroxaper lizmat: and github.com/perl6/nqp/pull/220 too please :)
FROGGS psch: :o(
dalek p: 74938f9 | (Mikhail Khorkov)++ | / (2 files):
Add git reference option into Configure.pl

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:26
p: 2080f6b | lizmat++ | / (2 files):
Merge pull request #220 from atroxaper/master

Add git reference option into Configure.pl
atroxaper lizmat: nice!
Who can merge pull request for rakudobrew ? 16:27
tadzik: hello. 16:28
FROGGS psch: you could try setting NQP_VERBOSE_EXCEPTIONS
psch FROGGS: no luck, still just the NPE line 16:29
FROGGS k
TuxCM FROGGS, my stuff still passes. you didn't break anything 16:34
the . chain (. on new line) still fails
16:34 zakharyas left
lizmat P6W published: p6weekly.wordpress.com/2015/01/26/...nda-lands/ 16:35
16:35 raiph joined, brrt left
FROGGS TuxCM: hmmm, it worked for me 16:36
TuxCM: what exactly worked was: "42.perl\n .say\n" 16:37
TuxCM perl6 t.pl 16:39
===SORRY!=== Error while compiling t.pl
Two terms in a row
at t.pl:10
------> ⏏.say;
.say;
16:40 Pleiades` left 16:41 [Sno] joined
TuxCM you can hit me mext time we meet: user error 16:41
wrong test file
tadzik atroxaper: oh yes, I can 16:42
atroxaper tadzik: what do you think about the pull request?
16:42 sqirrel left
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
tadzik ooo
atroxaper tadzik: that is why I decided that...
tadzik I like it 16:44
atroxaper: awesome, thank you!
atroxaper tadzik: Now there are corresponding changes in nqp and rakudo repos already. 16:45
tadzik: xDD
16:46 sqirrel joined
TuxCM FROGGS, tux.nl/Files/20150126174653.png 16:47
did you push that change? 16:48
FROGGS TuxCM: no 16:50
TuxCM ah, you did not. manual change caused the test to pass
any disatvantages?
FROGGS yeah, I just typed you image into a script and it works here too :o)
TuxCM s/t/ = "d"
FROGGS I'm not sure, that's why I wanted you to test
16:51 Kristien joined
TuxCM the stuff *I* wrote still passes :) 16:51
FROGGS I pushed now 16:52
bbiab & 16:55
16:55 FROGGS left
TuxCM rebuilds 16:55
atroxaper lizmat: s/get-reference/git-reference/ . Just say :) Thank you for your mention, really. 17:07
flussence m: gist.github.com/flussence/b373ea44748c8afdc92f 17:11
camelia rakudo-moar 243c16: OUTPUT«gist not found»
lizmat atroxaper: fixed
atroxaper lizmat: thank you.
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:13
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)␤»
TuxCM Where did the Nil go?
psch flussence: i think LEAVE is what you want
flussence I'd have to put that outside the class though, which kinda defeats the purpose of encapsulating everything in one. 17:15
17:15 regreg left
psch oh, i might have misunderstood then 17:15
flussence: you want the header during creation and the footer after out-of-scope? 17:16
or whatever kind of inaccessibility/GC 17:17
well, DESTROY exists, but can't be relied on to run at all afair
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:18
maybe a macro'd work 17:19
17:20 Kristien left, sqirrel left 17:29 sqirrel joined
psch flussence: you could add your own phaser to a given block and fire that phaser from any enclosed block 17:31
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␤»
psch oh wait
got sidetracked a bit
you can add to LEAVE from the enclosed block
TuxCM related, are Nil's *always* stripped form lists? 17:33
m: sub foo($f){$f.perl.say};foo(Nil);
camelia rakudo-moar 243c16: OUTPUT«Nil␤»
TuxCM m: sub foo(*@f){for @f -> $f {$f.perl.say}};foo(Nil);
camelia ( no output )
TuxCM WHERE IS MY Nil?
lizmat TuxCM: I'm not sure, or what it should be...
17:34 mbracht joined
lizmat S02:Nil 17:34
synopsebot Link: perlcabal.org/syn/S02.html#Nil
vendethiel m: my @a = (Nil); say @a.perl
camelia rakudo-moar 243c16: OUTPUT«Array.new()␤»
lizmat so it shouldn't disappear, but does so at the moment
vendethiel dhu my parens. 17:35
TuxCM indeed.
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
camelia rakudo-moar 243c16: OUTPUT«doing bar soon␤yup, doing bar!␤and again!␤yup, doing bar!␤done␤»
TuxCM can I get them back pls?
lizmat something that also is affected by the GLR
psch hm, that doesn't add LEAVE the way i'd have expected it to
mbracht exit 17:37
17:37 mbracht left
lizmat psch: it needs to be known at compile time that there's going to be a phaser 17:38
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
camelia rakudo-moar 243c16: OUTPUT«doing bar soon␤yup, doing bar!␤and again!␤yup, doing bar!␤done␤»
lizmat and probably at block compose time :-(
otherwise the "fire_phasers" code does not get run at all, because of performance reasons
flussence I guess what I'd *like* to be able to do (but can't) is say CALLER.add_phaser()... 17:39
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:41 kjs_ left
psch might be feasible with allowing that only at BEGIN or having to add an empty phaser block 17:43
although that seems weirdly magic :P
aside from that CALLER doesn't even reach the Block currently, does it? 17:44
as in, the actual Block object which would need the phaser attached
17:48 Kristien joined
Kristien hi 17:48
17:51 pmurias left
lizmat psch: I don't offhand see a way to do that, jnthn might, but is it advisable? 17:56
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␤»
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
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:01 virtualsue left 18:07 regreg joined
Kristien ACCEPTS is for ~~ right? 18:07
lizmat S03:3745 # yes 18:09
synopsebot Link: perlcabal.org/syn/S03.html#line_3745
18:10 spollei left 18:11 dakkar left
lizmat TimToady: I wonder if Pattern should be considered a fossil? 18:11
18:15 fhelmberger left 18:17 sqirrel left 18:22 FROGGS joined 18:25 Pleiades` joined 18:27 molaf_ left 18:29 atroxaper left
dalek Heuristic branch merge: pushed 21 commits to rakudo/newio by lizmat 18:30
18:33 FROGGS_ joined
dalek kudo/newio: 04317fe | lizmat++ | src/core/io_operators.pm:
Another user of CLONE-HASH-DECONTAINERIZED
18:34
18:36 zakharyas joined 18:37 FROGGS left
moritz [ptc]: did you see my last commit to Pod::To::HTML?? 18:37
(and Mouq++'s fix to it) 18:38
t/spec/S32-str/sprintf.rakudo.moar (Wstat: 512 Tests: 157 Failed: 2) Failed tests: 151-152 18:45
18:47 telex left 18:48 telex joined
bartolin_ moritz: oh, looks like lizmat changed the tests back to their old state with beea0a8 18:49
lizmat well, I saw fail and todo :-) 18:50
bartolin_ . o O (and I thought it clever to fudge the tests with 'todo' :-)
*was
lizmat hmmm... seems the build on parrot is broken, and JVM has lots of spectest failures 18:51
will check after dinner&
18:51 spider-mario joined 18:54 espadrine left
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? 18:55
19:01 zakharyas left
dalek c: da3d564 | moritz++ | lib/Type/X/Bind.pod:
Document X::Bind
19:01
19:03 rindolf left, davido_ left 19:04 davido_ joined
dalek ast: 034ad32 | usev6++ | S32-str/sprintf.t:
Fix tests for changed error message
19:06
bartolin_ I hope this is fine now 19:07
19:07 [ptc]_ joined, [ptc]_ left 19:08 rurban_ left
dalek c: c8b95f8 | moritz++ | lib/Type/X/Bind/Slice.pod:
Document X::Bind:Slice
19:12
19:12 pecastro left 19:15 Kristien left
masak .oO( X::Blind::Mice ) 19:16
19:19 rurban_ joined 19:21 colomon left 19:27 adu joined 19:29 atroxaper joined
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:33
ab5tract or be able to "use Module::In::File" and get those subs? 19:35
19:35 davido__ joined 19:36 atroxaper left 19:37 colomon joined 19:38 davido_ left
FROGGS_ ab5tract: look at this as a working example: github.com/perl6/roast/blob/master.../require.t 19:39
19:46 Kristien joined
ab5tract that clarifies a lot, thanks 19:49
vendethiel ab5tract: you'll be able to import :p 19:56
pyrimidi_ lizmat++ # p6weekly 19:58
19:59 pyrimidi_ is now known as pyrimidine
dalek c: e058fc8 | moritz++ | lib/Language/regexes.pod:
Document :global, :pos
20:02
ab5tract vendethiel: i'm starting to get it :)
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
perl6 -I lib works
20:06 kaare_ joined 20:07 mvuets joined 20:09 darutoko left
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
and roast is always up to date of course
ab5tract right
20:11 abraxxa joined
moritz at least those parts of roast that are in rakudo's t/spectest.data 20:11
20:11 spider-mario left
ab5tract it's an impressive body of work :) 20:12
but for things like 'perl -I' .. it's not obvious where to look 20:13
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
'require.t' file
anyway, attempting to document along the way :) 20:15
20:16 spider-mario joined 20:17 virtualsue joined
FROGGS_ m: #| foo␤sub foo { }; say &foo.WHY 20:25
camelia rakudo-moar 243c16: OUTPUT«foo␤»
FROGGS_ k
20:25 beastd joined
pyrimidine FROGGS_: did the line separator bug fix ever get merged in? RT #122971 20:33
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122971
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
pyrimidine FROGGS_: np. thanks! 20:35
20:35 Alina-malina left, bjz_ left 20:50 abraxxa left 20:53 spider-mario left 20:55 spider-mario joined 21:03 Alina-malina joined, Alina-malina left, Alina-malina joined 21:04 Sysaxed` joined
nine_ Would you say this is just bad or really horrible code? $event."{$reply == 0x00004000 ?? 'accept' !! 'ignore'}"(); 21:04
PerlJam It's certainly not straight-forward to read. 21:05
21:05 jluis_ left
lizmat nine_: and will probably optimize horribly 21:07
21:07 Sysaxed left
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
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:10 xfix left
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]}"() =)
whjoops, missing a [ 21:12
21:12 Spot__ left, clkao left
nine_ vendethiel: isn't this the reverse? 21:15
lizmat ({$event.ignore},{$event.accept})[$reply == 0x00004000] # optimizes better, probably :-)
vendethiel probably :p 21:16
<ignore accept>.map($event."{
<ignore accept>.map($event."{*}")[$reply == ...]
flussence
.oO( neat, spectest got 20s faster for me in the last week or so... almost below the 5 minute mark! )
nine_ If someone is looking for lightning talk material. We have it right here... 21:17
lizmat moritz: I think 00c3faed74b6 (Bump NQP revision) broke rakudo on parrot 21:18
timotimo what exactly is the lightning talk material here?
nine_ timotimo: 15 more and more obscure ways to write if a { foo.bar } else { foo.baz}; 21:19
timotimo heh 21:20
vendethiel hahahaha
we *need* those!
timotimo $event."{"accept" xx $reply == 0x00004000 . "ignore" xx $reply != 0x00004000}"() 21:21
vendethiel timotimo++ 21:22
nine_ wonders why no one has brought up goto yet 21:24
vendethiel NYI?
nine_ a shame
masak hasn't really missed goto in Rakudo yet 21:25
labeled next/last/redo are awesome, though
vendethiel masak: I thought it was considered awesome, tho?: ) 21:26
masak heh :)
moritz lizmat: so, an NQP commit broke rakudo-p?
masak my goto in that talk was actually a serializable continuation. which is awesome. 21:27
Kristien goto is good
moritz goodto 21:28
Kristien Generating imperative code without goto is a pain.
masak no-one disputes that goto in object code is good
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«===SORRY!=== Error while compiling /tmp/yy2Qo3FV9N␤Variable '$reply' is not declared␤at /tmp/yy2Qo3FV9N:1␤------> &foo.fire_phasers(<accept ignore>[$reply⏏ == 0x00004000]);␤ expecting any of:␤ post…»
Kristien masak lambda calculus fanboys do!
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]);
camelia ( no output )
21:29 clkao joined
timotimo hmm 21:29
Kristien I often use goto. It's a great tool. I wish JavaScript had it.
vendethiel *g* 21:31
21:31 brrt joined
brrt friends of goto are friends of mine :-) 21:31
Kristien yay I have a friend! 21:32
21:36 ecocode joined
lizmat moritz: I'm afraid so, trying to b-sect which NQP commit 21:36
suspecting jnthn 6pe branch merge
21:37 Spot__ joined 21:42 raiph left
[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
have spent the evening debugging irssi problems :-/
moritz: so one can now just call the callback from htmlify? 21:44
moritz: and possibly use Proc::Async to pipe the pod node content into the call to pygmentize? 21:46
pyrimidine Here's an odd compilation bug I found with 'handles': gist.github.com/cjfields/f89932960...tfile1-txt 21:50
works fine, but compile to mbc and it blows up 21:51
strange thing: if I change the 'handles <lines words>' to "handles 'words'" or 'handles Str' it works fine 21:52
haven't tried jvm 21:53
lizmat please rakudobug it 21:54
pyrimidine jvm works, seems moarvm-specific.
lizmat: will do 21:55
21:55 Peter_R joined
ab5tract Terminal::Print is getting dangerously close to release-worthy :) 21:58
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.
lizmat .tell jnthn nqp 91f6f525b766 or earlier is bad
yoleaux lizmat: I'll pass your message to jnthn.
ab5tract FROGGS_: that trick you showed with: '$raw ~~ s:1st[...];' .. is it possible to so something like 's:*-1st[...];' ? 22:00
*to do
hoelzro ab5tract: I just saw boxbrain on your GH; do you have screenshots? 22:02
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␤␤»
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)/(.)/
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␤»
FROGGS_ m: say "foobar" ~~ m:pos(*-1)/(.)/ # that's LTA
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␤␤»
FROGGS_ ab5tract: no idea how 22:05
ab5tract: you could reverse your string before matching as a workaround :o)
22:05 agentzh joined, skids left
ab5tract FROGGS_: that's a pretty interesting idea.. i'll put it in as a todo :) 22:07
22:09 espadrine joined, raiph joined
masak ab5tract: :nth(*-1) should do 22:11
22:11 ecocode left 22:12 adu left 22:13 spider-mario left
FROGGS_ m: say "foobar" ~~ m:nth(*-1)/(.)/ 22:13
camelia rakudo-moar 243c16: OUTPUT«「r」␤ 0 => 「r」␤»
22:13 mvuets left
FROGGS_ masak++ 22:13
masak m: $_ = "ABCDEFGH"; m:nth(*-1)/./; say ~$/ 22:14
camelia rakudo-moar 243c16: OUTPUT«H␤»
masak m: $_ = "ABCDEFGH"; m:nth(*-2)/./; say ~$/
camelia rakudo-moar 243c16: OUTPUT«G␤»
masak heh, *-1 being the last one is right, but feels weird here since :nth is 1-based.
which feeling in *itself* is weird, since the 1-based case is the one that makes it all symmetric. no zero. 22:15
at either end.
ab5tract .hug masak 22:17
masak hug masak
hugme: hug me
hugme hugs masak
masak \o/
ab5tract hugme: hug masak
hugme hugs masak
masak feels all warm and fuzzy
22:19 beastd left, mvuets joined 22:23 mvuets left
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?
wow, su
time sure flies*
masak will there be an influx of people on the IRC channel? will there be more traffic on the mailing lists?
should we prepare somehow?
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" )
Peter_R: awesome. let us know if anything obstacles you, so we can help.
Kristien masak: if only one existed
Peter_R I stared playing with p6 a while back but nothing serious 22:26
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.
Peter_R: oh, excellent!
++Peter_R
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?
masak espadrine: we actually had that, back in 2005!
espadrine: it bit-rotted, though :/
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.
espadrine people will have to deal with learnxinyminutes.com/docs/perl6/ in the meantime 22:30
Peter_R espadrine, I've been through that!
hoelzro if people want to try Rakudo without having to deal with building & installation, I made a docker image for rakudo star
Peter_R Rakudobrew was quite easy iirc 22:32
More options are always good though 22:33
22:34 Adriaaan joined, regreg left
lizmat good night, #perl6! 22:37
masak 'night, lizmat
ab5tract so, having a templated version of the escape sequence and using regexes is significantly faster than getting the sequence back from tput 22:38
vendethiel wow, it's already this sunday :o) 22:39
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:40
but it's visually faster when i'm using the regex-based subroutine :) 22:42
dalek kudo-star-daily: 3ec668e | coke++ | log/ (9 files):
today (automated commit)
22:43
22:49 jakesyl left
[Coke] does a semi-automated push from the hotel in dearborn. 22:52
22:56 grep0r left, jakesyl joined 22:57 grep0r joined 23:02 kaare_ left
colomon [Coke]: dearborn michigan? We were there yesterday.... 23:03
23:03 kaare_ joined 23:04 brrt left
[Coke] huh. 23:06
I'm right near umich dearborn. 23:07
geekosaur waves from northern ohio
[Coke] ~~
23:09 FROGGS_ left 23:10 Kristien left 23:13 atroxaper joined
masak oh, you people and your states ;) 23:15
23:17 rurban_ left 23:18 atroxaper left, Peter__R joined 23:19 Peter__R left
Ovid_ I’m heading to bed, but here’s my final (*cough*) version of my talk for FOSDEM: www.slideshare.net/Ovid/perl-6-for-mere-mortals 23:23
masak Ovid_++ # very nice slides 23:27
content-wise and presentation-wise.
23:27 Peter__R joined
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:30 Peter_R left
vendethiel Ovid_: with the title, the first slide looks like "look at them! they are mortaaaals" 23:31
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:32
23:34 BenGoldberg joined, BenGoldberg left 23:35 BenGoldberg joined
Juerd LOL @ slide 36 23:35
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:38
thought on the Perl 6 vs lang X slides: aww yeah \o/ 23:40
Juerd Or make "has" imply that it's mandatory, and introduce something new for optional attributes... "can haz" ;-) 23:41
masak intriguing. 23:42
my first reaction was "no, can't do that", but now I can't think of why not.
Juerd Given the state of Perl 6 it's probably a 5 line patch.
masak Ovid_++ # again
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?
Adriaaan Hai, anyone knows the best way to create an array of ~1M items filled with random integers? I currently have: [email@hidden.address] for ^1000000;" but I'm not sure that's the best way to create it 23:45
ab5tract Ovid_++ # nicely done
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;`
camelia rakudo-moar 243c16: OUTPUT«Memory allocation failed; could not allocate 15632 bytes␤»
vendethiel wat
masak heh, maybe it picked up my code :P 23:47
23:47 BenGoldberg left
vendethiel hahahaha 23:47
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
camelia rakudo-moar 243c16: OUTPUT«Memory allocation failed; could not allocate 15632 bytes␤» 23:47
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:49 virtualsue left
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 :)
Adriaaan thanks masak, that's a bit clearer at the least :D 23:51
masak it's Fight Club all over again...
Adriaaan: `xx` is nice in that it re-runs the LHS for each element.
Juerd Guess which rule you just broke. :)
masak :P
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
Juerd: though I guess that rule only really applies to members of the club.
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.
Just like yourself :P 23:54
Nice try!
Adriaaan I am going to use all elements :) ":=" means lazy right?
masak Juerd: :P
Adriaaan: no, it means binding.
Juerd Where binding is roughly comparable to aliasing.
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.
Juerd Ovid uses "=" in his slides, for lazy things. Does that work too?
masak yes.
...at least most of the time.
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...
...and it's possible that still doesn't work in Rakudo, don't remember...
Juerd I'll just use := all the time then, and get bitten by a different class of interesting behaviour :P
vendethiel (he means recursive assignments)
masak Juerd: I think constant essentially uses `:=` under the hood no matter what you write.
Juerd constant? 23:57
masak the `constant` keyword.
Juerd Ah
Would make sense
23:59 skids joined