Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-02-01

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
23:00 Ulti [Coke] yeah the only part of bioperl that I use is the parsers, the more analytical things I don't trust at all
23:01 lue I really have no clue why panda suddenly breaks on postcircumfix:<{ }>  :(
23:01 Ulti which is why Perl6 is neat because a module filled with well tested grammars for different file formats would be really great
23:14 btyler joined #perl6
23:15 dalek roast: 1ccbe07 | coke++ | integration/advent2013- (6 files):
23:15 dalek roast: follow naming convention of other advents.
23:15 dalek roast: review: https://github.com/perl6/roast/commit/1ccbe072c0
23:15 vendethiel is ==>> not implemented yet ?
23:15 dalek rakudo/nom: dc42ad8 | coke++ | t/spectest.data:
23:15 dalek rakudo/nom: track file rename
23:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dc42ad849c
23:16 [Coke] easy enough to check with the evalbot.
23:16 vendethiel (did not mean "yet", sry)
23:16 * [Coke] looks up the syntax
23:16 vendethiel r: my @a; 1..2 ==> @a; 3..4 ==>> @a;
23:16 camelia rakudo-parrot 257e61, rakudo-jvm 257e61, rakudo-moar 257e61: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤==>> feed operator not yet implemented. Sorry. â�¤at /tmp/tmpfile:1â�¤------> [32mmy @a; 1..2 ==> @a; 3..4 ==>> @a[33mâ��[31m;[0mâ�¤    expecti…»
23:16 vendethiel oh okay :)
23:16 diakopter n: my @a; 1..2 ==> @a; 3..4 ==>> @a;
23:16 camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Feed ops NYI␤  at /home/p6eval/niecza/lib/CORE.setting line 1536 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3571 (infix:<==>> @ 4) ␤  at /tmp/_dW_Xtvh9G line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CO…»
23:17 [Coke] there ya go.
23:17 [Coke] vendethiel++
23:17 vendethiel [Coke]++
23:17 vendethiel (now I know where au got this habit of ++'ing people :p
23:18 [Coke] ;)
23:18 jeffreykegler joined #perl6
23:18 TimToady r: 1..2 ==> my @a; 3..4 ==> @a.push; say @a
23:18 camelia rakudo-parrot 257e61, rakudo-jvm 257e61, rakudo-moar 257e61: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Sorry, do not know how to handle this case of a feed operator yet.�at /tmp/tmpfile:1�------> [32m1..2 ==> my @a; 3..4 ==> @a.push[33m�[31m…»
23:18 TimToady r: 1..2 ==> my @a; 3..4 ==> push @a; say @a
23:18 camelia rakudo-parrot 257e61, rakudo-jvm 257e61, rakudo-moar 257e61: OUTPUT«1 2 3 4␤»
23:18 TimToady there ya go
23:19 smls http://www.dlugosz.com/Perl6/web/info-model-TOC.html
23:19 smls ^^ How up-to-date is this?
23:19 vendethiel I don't even understand what ==>> does compared to ==> :P
23:19 vendethiel r: 1..2 ==> my @a; 3..4 ==> @a; say @a
23:19 TimToady it may be a syntax in search of a feature
23:19 [Coke] smls: it says right there :)
23:19 camelia rakudo-parrot 257e61, rakudo-jvm 257e61, rakudo-moar 257e61: OUTPUT«1 2 3 4␤»
23:19 vendethiel r: 1..2 ==> my @a; 3..4 ==> @a; say @a.perl
23:20 camelia rakudo-parrot 257e61, rakudo-jvm 257e61, rakudo-moar 257e61: OUTPUT«Array.new(1, 2, 3, 4)␤»
23:20 smls [Coke]: I mean, does it still apply to today's Rakudo more or less
23:20 vendethiel nah, this is not a LoL. So I'm not sure why it's there
23:20 TimToady vendethiel: we might decide that implicit "push" semantics are  abug
23:20 [Coke] smls: yah, I know, I'm just being snarky.
23:20 vendethiel TimToady: and make my last case [1, 2, [3, 4]] ?
23:20 [Coke] (and I don't know the answer)
23:21 vendethiel (==> actually is like F#'s |>, I like it)
23:21 TimToady vendethiel: depends on how we implement it; mind end up just 3,4
23:22 TimToady *might
23:22 vendethiel oh yeah, just overwrite, makes sense !
23:22 TimToady but I shouldn't do design while I'm sick :)
23:22 vendethiel while it could just be `1..2 ==> my @a; 3..4 ==> (@a = [])`, couldn't it ?
23:23 vendethiel to "just end up 3,4". (I don't say that's practical, I'm just asking if how I see evaluation order is correct)
23:23 TimToady we haven't really nailed down the most desired semantics of ==> yet, specwise
23:23 TimToady especially since ==> may end up representing channels
23:23 TimToady and behave even more like Unix pipes that way
23:23 vendethiel TimToady: I see. Does it append to the arglist of the following call, kind of like a macro, or does the right operand's function needs to be curried ?
23:24 vendethiel like 1..2 ==> map({$_ * 2})
23:24 TimToady right, that's the debate :)
23:24 arnsholt joined #perl6
23:24 TimToady and to what extent do we recognize different targets at compile time vs run time
23:24 vendethiel not sure I'm getting that last bit
23:25 vendethiel you mean, semantics to decide if it should just call the function or append to arglist ?
23:25 TimToady to what extent to we limit visibility of data structures outside that might need locking or lock-free consideration?
23:25 vendethiel oh, okay.
23:25 Pleiades` joined #perl6
23:25 TimToady the original idea was just appending to an arglist
23:26 TimToady the ==>> spec-ese came from groping our way toward inter-thread communication, which jnthn++'s more recent stuff serves as a good basis for
23:27 TimToady so we'll need to revisit whether ==> represents channels, and how we target multiple feeds to the same target
23:27 TimToady and whether push semantics even make sense in that context
23:27 TimToady or whether push semantics are in some sense mandatory
23:28 TimToady also whether we specifically recognize declarations like my @a, or need something around that
23:29 TimToady exactly at what point do we figure out the nature of the function or object that we're passing values to...
23:30 TimToady and what are the optimization tradeoffs for each approach?
23:30 arnsholt_ joined #perl6
23:30 TimToady I can come up with lots of questions while I'm running a fever, but I'd better not come up with any answers... :)
23:31 vendethiel TimToady: you're still interesting to read tho :)
23:31 TimToady thanks, and welcome to the research project
23:40 dalek roast: 2162736 | (Pepe Schwarz)++ | S12-methods/delegation.t:
23:40 dalek roast: Added tests for RT #95514.
23:40 dalek roast: review: https://github.com/perl6/roast/commit/2162736cfe
23:40 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=95514
23:42 xinming joined #perl6
23:42 ponbiki joined #perl6
23:54 arnsholt joined #perl6
23:58 dalek roast: 84c4742 | (Pepe Schwarz)++ | S14-roles/parameterized-type.t:
23:58 dalek roast: Added test for RT #84492.
23:58 dalek roast: review: https://github.com/perl6/roast/commit/84c4742e9c
23:58 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=84492
23:59 * psch has run out of things he understands how to write tests for
00:00 timotimo do you want to dive into the CORE.setting? :)
00:01 psch uhm, sure?
00:01 psch i mean, how much worse than the optimizer can it be?
00:01 timotimo well, it's mostly pure-perl6
00:01 timotimo but with the occasional nqp op
00:01 timotimo maybe you can come up with an interesting module
00:04 raiph joined #perl6
00:04 psch i did have a look at the perl6-most-wanted, but there wasn't really anything i'd consider myself well capable of
00:05 timotimo well, then optimize for fun :)
00:07 timotimo i made the ADT module for fun, for example
00:07 timotimo i don't think anybody uses it, though
00:08 arnsholt_ joined #perl6
00:10 vendethiel timotimo: just linked it to some of my friends. That + subsets are changing what they think of perl6 :p
00:10 timotimo oh god what have i done =o
00:11 psch oh no! timotimo++ is indirectly promoting use of perl6!
00:11 psch what's gonna happen to the validity of uneducated_{f,p}oo's criticism?
00:12 psch that aside, i had been looking at RT #92826 recently, and i remember having partly solved it but not getting it quite to spec
00:12 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=92826
00:12 psch which is probably because i don't really grok the grammar at all
00:12 timotimo unspace are cool to have
00:12 timotimo but apparently not so easy to have in the grammar :P
00:13 psch m: "5"\ .\ say
00:13 camelia rakudo-moar 257e61: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/KStfdHmjNCâ�¤Confusedâ�¤at /tmp/KStfdHmjNC:1â�¤------> [32m"5"\ .\ [33mâ��[31msay[0mâ�¤    expecting any of:â�¤        unspaceâ�¤        horizontal whitespaceâ�¤Â»
00:13 psch iirc i had that case working
00:14 timotimo hah, "expecting any of: unspace"
00:14 psch but there was another case that didn't work; i forgot the details and i probably trashed what i had
00:14 psch yeah that's another RT ticket
00:14 timotimo i wonder why it does that
00:14 psch it expects an unspace after the unspace, curiously
00:14 timotimo but i'm not sure i want to dive in
00:14 timotimo do you have a line number for me?
00:14 psch note the $eject it's before the say
00:14 woolfy joined #perl6
00:14 timotimo ah, indeed
00:14 timotimo that's pretty bad :)
00:15 woolfy left #perl6
00:16 timotimo is that inside token methodop?
00:16 psch i *think* adding a non-capturing optional unsp before the non-capturing group in token methodop (line 4289) solved that case
00:16 virtualsue joined #perl6
00:16 timotimo do you know how to trace the grammar yet?
00:17 psch no
00:17 psch i hardly know anything haha :)
00:17 psch i'm mostly blindly stumbling through and trying things
00:17 psch i do know about --ll-exception
00:17 timotimo usually it should be enough to --rxtrace
00:17 timotimo but that only traces into compunit and then a different grammar class takes over
00:18 timotimo so you'll need to put a Perl6::Grammar.trace-on(Perl6::Grammar) somewhere before the parse happens
00:19 psch oh, ok
00:20 psch what does that actually mean?
00:20 timotimo er, i forgot to put the .HOW in between
00:21 timotimo https://github.com/perl6/nqp/blob/master/src/how/NQPClassHOW.nqp#L805 that's where it leads
00:25 TimToady std: "5"\ .\ say
00:25 camelia std 09dda5b: OUTPUT«ok 00:01 121m␤»
00:25 jnap joined #perl6
00:25 timotimo in nqp, can a knowhow not get native attributes?
00:27 timotimo nqp: knowhow foobar { has int $!bar }
00:27 camelia nqp-moarvm, nqp-jvm, nqp-parrot: ( no output )
00:27 timotimo nqp: class foobar { has int $!bar }
00:27 camelia nqp-moarvm, nqp-jvm, nqp-parrot: ( no output )
00:27 timotimo that's weird o_O
00:28 timotimo turning some of the attributes of NQPClassHow into native attributes gives a parsefail
00:29 timotimo oh well. can't fix all the things :\
00:35 psch timotimo: i don't understand how to use your information wrt trace-on
00:35 timotimo you could slap it into Perl6/Compiler.nqp
00:36 psch okay. the .HOW goes before trace-on? i.e. Perl6::Grammar.HOW.trace-on(Perl6::Grammar)
00:37 timotimo i think so
00:37 psch add i just add that somewhere in command_eval?
00:37 timotimo command_eval may be too late
00:37 timotimo i think you can put it in the outermost scope
00:37 timotimo where it adds the stages and such
00:38 timotimo i'm leaving now. good luck!
00:39 psch thanks and bye
00:40 colomon joined #perl6
00:41 psch i don't think i'll get anywhere with this information today though... timotimo++ # things to revise tomorrow
00:42 * psch &
01:06 colomon "When pre-compiling a module, its dependencies must be pre-compiled first."
01:26 jnap joined #perl6
01:32 thou joined #perl6
01:47 yoleaux joined #perl6
01:49 TimToady http://rosettacode.org/wiki/Casting_out_nines#Perl_6
01:51 colomon pandabrew not working for me today?
01:51 colomon Cannot call 'postcircumfix:<{ }>'; none of these signatures match:
01:51 colomon Cannot call 'postcircumfix:<{ }>'; none of these signatures match:
01:51 colomon in any  at gen/parrot/BOOTSTRAP.nqp:1219
02:11 BenGoldberg joined #perl6
02:11 colomon hmmm, $p.name is Miu
02:11 colomon Mu
02:15 FROGGS_ joined #perl6
02:18 smls TimToady: Why do you use those ghastly naked backslash-variables so much...
02:24 smls :)
02:26 TimToady to indicate that they're "constant" over the life of the block
02:26 jnap joined #perl6
02:27 TimToady and so that the compiler can do SSA optimization more easily
02:27 yoleaux joined #perl6
02:29 raydiak am I the only one who gets warm fuzzy feelings from memories of childhood BASIC adventures when looking at those?
02:30 smls raydiak: nope :)
02:31 yoleaux joined #perl6
02:32 TimToady (which is, by the way, the main reason the = is required)
02:32 TimToady (or an argument/default in the case of a parameter)
02:41 raiph joined #perl6
03:09 lue colomon: I get the same thing with just panda.
03:09 lue colomon: look anything like this?    https://gist.github.com/lue/1029c4d379bb8143b8f3
03:09 colomon yeah, I got basically all that.
03:09 btyler joined #perl6
03:10 lue Glad to see I'm not the only one after all :)
03:11 kc6000 joined #perl6
03:11 colomon lue: absolutely is panda for me too, pandabrew is calling it.
03:11 lue I figured that's what it was.
03:17 lue r: my $a = Hash[Mu,Int].new(1,2); say $a{1};
03:17 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«2␤»
03:17 raiph joined #perl6
03:17 lue r: my $a = Hash[Mu,Int].new(1,2); say $a{Mu};
03:17 camelia rakudo-moar dc42ad: OUTPUT«Cannot call 'postcircumfix:<{ }>'; none of these signatures match:␤:(Any \SELF, Any $key)␤:(Any \SELF, Any $key, :BIND($BIND)!)␤:(Any \SELF, Any $key, Any :SINK($SINK)!, *%other)␤:(Any \SELF, Any $key, Any :delete($delete)!, *%other)␤:(Any \SELF,…»
03:17 camelia ..rakudo-parrot dc42ad: OUTPUT«Cannot call 'postcircumfix:<{ }>'; none of these signatures match:␤:(Any \SELF, Any $key)␤:(Any \SELF, Any $key, :BIND($BIND)!)␤:(Any \SELF, Any $key, Any :SINK($SINK)!, *%other)␤:(Any \SELF, Any $key, Any :delete($delete)!, *%other)␤:(Any \SEL…»
03:17 camelia ..rakudo-jvm dc42ad: OUTPUT«Cannot call 'postcircumfix:<{ }>'; none of these signatures match:␤:(Any \SELF, Any $key)␤:(Any \SELF, Any $key, :BIND($BIND)!)␤:(Any \SELF, Any $key, Any :SINK($SINK)!, *%other)␤:(Any \SELF, Any $key, Any :delete($delete)!, *%other)␤:(Any \SELF, …»
03:36 atroxaper joined #perl6
03:53 daniel-s joined #perl6
04:07 btyler joined #perl6
04:08 jnap joined #perl6
04:15 atroxaper joined #perl6
04:22 kaleem joined #perl6
04:29 jeffreykegler joined #perl6
04:34 mcglk joined #perl6
04:38 skids joined #perl6
04:38 jnap joined #perl6
05:10 daniel-s joined #perl6
05:21 atroxaper joined #perl6
05:24 SamuraiJack joined #perl6
05:30 [Coke] I just saw http://6gvts.wordpress.com/2014/01/24/january-rakudo-compiler-release-moarvm-support-and-much-more/ ... mmmhehehehe
05:32 atroxaper What is that?!
05:33 [Coke] I have no idea, but it's hilarious. :)
05:34 atroxaper If you has haters - you are best! :)
05:36 [Coke] "submitted by educated_poo". that sounds familiar.
05:39 jnap joined #perl6
05:39 [Coke] ~~ zzz
05:41 kc6000 left #perl6
05:42 atroxaper joined #perl6
05:51 atroxaper joined #perl6
06:28 erkan joined #perl6
06:28 erkan joined #perl6
06:32 rurban1 joined #perl6
06:40 jnap joined #perl6
06:41 eternaleye joined #perl6
07:31 Alula joined #perl6
07:41 jnap joined #perl6
07:43 atroxaper joined #perl6
07:45 krunen joined #perl6
07:48 SamuraiJack joined #perl6
07:56 nwc10 moritz: yes, "tomorrow" is starting at 23:00
07:56 nwc10 replace MySQL with a real database?
07:59 arnsholt joined #perl6
07:59 FROGGS_ MySQL is not that bad... I am working about 10 years with MySQL and there was never an issue that could not be solved
07:59 FROGGS_ and this issue sounds rather solvable
08:07 diakopter I'm pretty sure it's using pg
08:08 regreg joined #perl6
08:19 rurban1 joined #perl6
08:23 xfix joined #perl6
08:26 arnsholt joined #perl6
08:32 dmol joined #perl6
08:41 jnap joined #perl6
08:48 daxim joined #perl6
08:50 moritz nwc10: oh noez
08:50 FROGGS[mobile]2 joined #perl6
08:50 moritz ilbot support pg now, but I don't have a migration script that can clean up the character encoding mess that's in mysql right now
08:51 moritz *supports
08:51 darutoko joined #perl6
08:53 diakopter sounds like a smopp
08:54 moritz depends on the quality of the result that I try to achieve
08:54 baest_ joined #perl6
08:59 moritz doesn't help that there are 8.6mio rows to migrate
09:02 berekuk joined #perl6
09:04 timotimo o/ from over here
09:05 moritz \o from there
09:14 tgt joined #perl6
09:27 telex joined #perl6
09:33 stevan_ joined #perl6
09:33 slavik joined #perl6
09:33 renormalist joined #perl6
09:33 ruoso joined #perl6
09:38 telex joined #perl6
09:42 jnap joined #perl6
09:47 rurban1 joined #perl6
09:50 tgt joined #perl6
09:54 raydiak within a redefinition of postcircumfix:<[ ]>, how do I call the un-overloaded version of [] instead of recursively calling the routine I'm inside of?
09:54 raydiak (or otherwise index into the object without [] )
09:54 moritz raydiak: are you sure you actually need to overload postcircumfix:<[ ]> ?
09:55 moritz raydiak: the usual method to overload indexing is by providing a method at_pos, which is called by .[]
09:55 moritz *is to
09:55 raydiak moritz: absolutely not sure, but that's as a good a reason to try it out as to not, if you ask me :)
09:55 moritz m: class A { method at_pos($idx) { 5 * $idx } }; say A.new[12]
09:55 camelia rakudo-moar dc42ad: OUTPUT«60␤»
09:56 moritz m: class A { method at_pos($idx) { 5 * $idx } }; say A.new[12..14]
09:56 camelia rakudo-moar dc42ad: OUTPUT«60 65 70␤»
09:56 moritz raydiak: that might be a much nicer interface for you; the .[] already resolves slices and all, and at_pos only needs to providing indexing for a single integer
09:57 raydiak that'd be great for most cases of my question...but I specifically wanted to return a slice from a single index in this case
09:58 molaf joined #perl6
09:58 timotimo you can still return a slice from at_pos :P
09:58 timotimo kind of like an array of arrays
09:58 raydiak oh, okay, great then
09:58 moritz m: class A { method at_pos($idx) { $idx..($idx + 3) } }; say A.new[12]
09:58 camelia rakudo-moar dc42ad: OUTPUT«12..15␤»
09:58 moritz m: class A { method at_pos($idx) { ($idx..($idx + 3)).list } }; say A.new[12]
09:58 camelia rakudo-moar dc42ad: OUTPUT«12 13 14 15␤»
09:59 raydiak great, thanks as always moritz++
09:59 moritz if you do want to overload .[] (which I don't recommend, if you can avoid it) you can use $array.at_pos to get low-level access to the array
09:59 moritz raydiak: you're welcome
10:00 timotimo we do have some syntax specced to get at individual candidates, don't we?
10:00 timotimo the difficult thing is that values rather than just types can determine what candidates gets the job
10:00 berekuk joined #perl6
10:01 raydiak I'm just messing around, but got it in my head to try a 2D matrix class as a single array
10:02 timotimo that's sensible
10:02 timotimo personally, i'd back that with a nqp::list_n bound to a private var for a bit less overhead
10:02 timotimo but i'm an internals hacker :P
10:03 raydiak nqp is rakudo-only and entirely outside of the spec, correct?
10:03 moritz yes
10:03 timotimo yes
10:04 timotimo there still needs to be a nice mechanism for plopping in backend-specific and backend-agnostic implementations
10:05 raydiak it's certainly a thought when it's closer to working and ready to worry about working faster
10:05 timotimo yeah, fair enough
10:12 raydiak \o/ it works...so the generator I wrote for vector operations might be easily reusable to write the matrix operations
10:13 raydiak if this things gets much more flexible, it's going to be another new module, too
10:16 FROGGS masak: when do we want to do our RT hackathon? next weekend?
10:16 timotimo something a little similar to NumPy for perl6 will be very important in the long run
10:16 timotimo but we really, really need native arrays
10:18 raydiak yes, I spent days trying to figure out how to fit like 0.5 megapixels in under 2 gigs :)
10:18 timotimo yeah :(
10:19 timotimo with low-level operations on nqp::list_* you can get pretty close to a sensible memory usage
10:19 timotimo but that's no replacement for a correct implementation of native arrays
10:22 raydiak jnthn++ mentioned it was high up on his list when he takes a break from moar
10:22 atroxaper joined #perl6
10:22 timotimo yes
10:22 timotimo i'm glad that the same thing will also cause native variables work better as lvalues
10:22 timotimo as in my int $foo; $foo++
10:23 timotimo r: my int $foo = 10; $foo++; say $foo;
10:23 camelia rakudo-jvm dc42ad: OUTPUT«Cannot modify an immutable value␤  in sub postfix:<++> at gen/jvm/CORE.setting:4349␤  in sub postfix:<++> at gen/jvm/CORE.setting:1763␤  in block  at /tmp/tmpfile:1␤␤»
10:23 camelia ..rakudo-parrot dc42ad: OUTPUT«Cannot modify an immutable value␤  in sub postfix:<++> at gen/parrot/CORE.setting:4353␤  in sub postfix:<++> at gen/parrot/CORE.setting:1767␤  in block  at /tmp/tmpfile:1␤␤»
10:23 camelia ..rakudo-moar dc42ad: OUTPUT«No such method 'STORE' for invocant of type 'Int'␤  in sub postfix:<++> at src/gen/m-CORE.setting:4349␤  in sub postfix:<++> at src/gen/m-CORE.setting:1763␤  in block  at /tmp/tmpfile:1␤␤»
10:23 moritz regarding ilbot mysql -> pg conversion, there are 120 lines of non-UTF8 in the mysql database that need to be manually fixed up
10:23 diakopter wat
10:23 timotimo manually? o_O
10:23 diakopter wat to moar above
10:24 timotimo er
10:24 timotimo how does it have an Int in there?
10:24 diakopter wat
10:25 diakopter m: my int \foo = 4; foo++
10:25 camelia rakudo-moar dc42ad: OUTPUT«Type check failed in binding; expected 'Int' but got 'int'␤  in any bind_error at src/vm/moar/Perl6/Ops.nqp:216␤  in block  at /tmp/QSnoXuRm9M:1␤␤»
10:25 timotimo is that about Want not working?
10:25 diakopter *shrug
10:25 timotimo if our QAST::Want won't create natives, there's quite a bit of performance to be had
10:26 moritz it seems like does create natives
10:26 moritz it just doesn't box correctly
10:26 FROGGS - QAST::Want 4  - QAST::WVal(Int)  - Ii  - QAST::IVal(4)
10:26 FROGGS - QAST::WVal(int)
10:26 timotimo hm, okay
10:27 timotimo ... WVal(int) is a thing?
10:29 diakopter m: my int \::foo = 4; foo++
10:29 camelia rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m�Type 'int' is not declared. Did you mean 'Int'?�at /tmp/Dm4g0Udr90:1�------> [32mmy int [33m�[31m\::foo = 4; foo++[0m�Malformed my�at /tmp/Dm4g0Udr90:1�------> [32mmy int [33m�[31m\::foo = 4; foo++[0m…»
10:29 diakopter o_O
10:30 FROGGS std: my int \::foo = 4; foo++
10:30 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0m�Multiple prefix constraints not yet supported at /tmp/Z3Uaf2EI3a line 1:�------> [32mmy int [33m�[31m\::foo = 4; foo++[0m�Malformed my at /tmp/Z3Uaf2EI3a line 1:�------> [32mmy int [33m�[31m\::foo = 4; foo++[0m…»
10:34 rindolf joined #perl6
10:37 raydiak \o night all
10:37 timotimo gnite raydiak!
10:39 moritz http://moritz.faui2k3.org/tmp/broken-utf8.log those are the lines with non-UTF-8 encoding
10:40 timotimo hah
10:40 timotimo one of the early lines is about encoding breakage actually
10:40 timotimo that amuses me
10:40 masak antenoon, #perl6
10:40 moritz I wonder if I should just decode them all as ISO-8859-15
10:40 * moritz -> afk
10:41 masak tadzik++ # star
10:43 jnap joined #perl6
10:44 nwc10 moritz: well, the first line appears to be Swedish in MacRoman :-)
10:45 nwc10 I can't work out what the Ât an ÂL are, but the latter I think is trying to be a pound sign
10:51 sergot o/
10:51 denis_boyun joined #perl6
11:02 tadzik o/
11:08 FROGGS o/
11:19 SamuraiJack joined #perl6
11:24 rurban1 joined #perl6
11:25 eternaleye joined #perl6
11:27 FROGGS question: to open a pipe we do open( ..., :p ), right?
11:27 FROGGS why don't I find a single test about that?
11:38 daniel-s_ joined #perl6
11:40 arnsholt joined #perl6
11:44 jnap joined #perl6
11:45 berekuk joined #perl6
11:57 krunen joined #perl6
12:10 SamuraiJack joined #perl6
12:12 [Coke] joined #perl6
12:12 masak joined #perl6
12:13 dalek joined #perl6
12:13 Juerd joined #perl6
12:13 pmichaud joined #perl6
12:13 sergot joined #perl6
12:14 Util joined #perl6
12:18 d4l3k_ joined #perl6
12:19 PerlJam joined #perl6
12:19 hugme joined #perl6
12:19 [Coke] joined #perl6
12:19 Juerd joined #perl6
12:19 synopsebot joined #perl6
12:20 Util joined #perl6
12:20 masak joined #perl6
12:20 tadzik joined #perl6
12:20 rindolf joined #perl6
12:25 vendethiel joined #perl6
12:28 PZt joined #perl6
12:31 colomon module smoke test blew up last night because panda is broken.  :(
12:32 vendethiel joined #perl6
12:39 atta joined #perl6
12:41 tgt joined #perl6
12:44 jnap joined #perl6
12:44 vendethiel are there splats in perl6? sub second-to-last(*@ [*@, $value, $]) { $value }
12:45 vendethiel (I know [*@, $a] works but I'm looking for more "advanced" features)
12:47 eternaleye joined #perl6
12:47 vendethiel I can understand why multiple variadics aren't allowed, but `sub some-vals(*@ [$fst, *@, $lst]) { $fst ~ $lst }` seems like a nice feature to have
12:48 rindolf joined #perl6
12:52 psch joined #perl6
12:52 psch hi #perl6
12:52 timotimo hi psch
12:52 timotimo vendethiel: where does "splat" come from?
12:53 psch "splat" is an old berkley name for * isn't it
12:53 psch should be in esr's jargon file somewhere i think
12:53 vendethiel timotimo: ES6 / ruby
12:54 timotimo ah
13:01 psch timotimo: i added the .trace-on in main.nqp, which is where the stages are added and the compiler gets build
13:01 psch unfortunate side-effect: stage parse went up to ~1800 seconds
13:01 psch ...but it's for debugging so that's ok-ish, except it takes long :)
13:02 psch it did kill one of my terminals though...
13:03 timotimo wow
13:04 psch about 18 times slower for me, i'm usually at around 100 seconds for jvm and moar each
13:06 colomon vendethiel: I believe the pattern matching you're looking for is available, but you've got the format wrong.  but then, I can never remember exactly how to do it.
13:07 timotimo psch: it turns off the method cache, so that could explain it :P
13:07 timotimo no, wait
13:08 timotimo i think it replaces all methods returned with a wrapped method that also prints a little bit
13:08 psch timotimo: the later sounds likely
13:08 psch there was much output
13:10 spider-mario joined #perl6
13:19 colomon m: sub first-and-last([$first, *@, $last]) { $fst ~ $lst }; say first-and-last(1 … 10);
13:19 camelia rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Hh8K3jtNYg�Cannot put required parameter $last after variadic parameters�at /tmp/Hh8K3jtNYg:1�------> [32msub first-and-last([$first, *@, $last[33m�[31m]) { $fst ~ $lst }; say first-and-l…»
13:19 colomon p: sub first-and-last([$first, *@, $last]) { $fst ~ $lst }; say first-and-last(1 … 10);
13:20 camelia rakudo-parrot dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/4zEgsLKjMi�Cannot put required parameter $last after variadic parameters�at /tmp/4zEgsLKjMi:1�------> [32msub first-and-last([$first, *@, $last[33m�[31m]) { $fst ~ $lst }; say first-and…»
13:22 rindolf joined #perl6
13:23 colomon m: sub first-and-last([$first, *@]) { $first  }; say first-and-last(1 … 10);
13:23 camelia rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/RgjmGYmFMIâ�¤Unable to parse expression in argument list; couldn't find final ')' â�¤at /tmp/RgjmGYmFMI:1â�¤------> [32m *@]) { $first  }; say first-and-last(1 [33mâ��[31m… 10);[0mâ�¤    expec…»
13:24 colomon m: sub first-and-last([$first, *@rest]) { $first  }; say first-and-last(1 … 10);
13:24 camelia rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/nxCS32olChâ�¤Unable to parse expression in argument list; couldn't find final ')' â�¤at /tmp/nxCS32olCh:1â�¤------> [32mest]) { $first  }; say first-and-last(1 [33mâ��[31m… 10);[0mâ�¤    expec…»
13:25 colomon m: sub first-and-last([$first, *@rest]) { $first }; say first-and-last(1…10);
13:25 camelia rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/rKh2Z2jMxyâ�¤Unable to parse expression in argument list; couldn't find final ')' â�¤at /tmp/rKh2Z2jMxy:1â�¤------> [32m@rest]) { $first }; say first-and-last(1[33mâ��[31m…10);[0mâ�¤    expect…»
13:25 colomon p: sub first-and-last([$first, *@rest]) { $first }; say first-and-last(1…10);
13:25 camelia rakudo-parrot dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/WapcSw9t2Vâ�¤Unable to parse expression in argument list; couldn't find final ')' â�¤at /tmp/WapcSw9t2V:1â�¤------> [32m@rest]) { $first }; say first-and-last(1[33mâ��[31m…10);[0mâ�¤    expe…»
13:25 psch EELLIPSIS
13:25 colomon oh, idiot IRC client
13:26 colomon p: sub first-and-last([$first, *@rest]) { $first }; say first-and-last(<a b c>);
13:26 camelia rakudo-parrot dc42ad: OUTPUT«a␤»
13:27 psch hrm, my ~40 minute build blew up, turns out moar can't handle .trace-on
13:28 psch at least that's what i take from this
13:28 psch https://gist.github.com/peschwa/8752353
13:28 psch (that's not the build of course, but it's the same error)
13:29 psch updated the gist with the actual build error
13:30 psch oh i found something else i gisted a few days back
13:31 psch r: True.foo
13:31 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«No such method 'foo' for invocant of type 'Bool'␤  in block  at /tmp/tmpfile:1␤␤»
13:31 psch that did blow up in the REPL for moar as well
13:31 psch https://gist.github.com/peschwa/8697850 # as per here
13:38 virtualsue joined #perl6
13:45 jnap joined #perl6
13:48 rindolf joined #perl6
13:50 spider-mario joined #perl6
14:05 colomon https://gist.github.com/colomon/8752778 # the panda error
14:05 colomon tadzik: ^^
14:05 colomon tadzik: sorry I don't have time to debug it here at the moment.
14:05 tadzik colomon: yeah, looking into it
14:05 colomon tadzik++
14:10 aindilis joined #perl6
14:12 vendethiel p: sub fst([$fst, *@]) { $fst }; say fst <a b c>;
14:12 camelia rakudo-parrot dc42ad: OUTPUT«a␤»
14:13 vendethiel p: sub fst([$fst, $snd, *@]) { $snd }; say fst <a b c>;
14:13 camelia rakudo-parrot dc42ad: OUTPUT«b␤»
14:13 vendethiel p: sub fst([$, $snd, *@]) { $snd }; say fst <a b c>;
14:13 camelia rakudo-parrot dc42ad: OUTPUT«b␤»
14:13 vendethiel p: sub fst([$, $snd, *@, $lst]) { $snd ~ $lst }; say fst <a b c d e>;
14:13 camelia rakudo-parrot dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/lEZnK856ve�Cannot put required parameter $lst after variadic parameters�at /tmp/lEZnK856ve:1�------> [32msub fst([$, $snd, *@, $lst[33m�[31m]) { $snd ~ $lst }; say fst <a b c d e>;[0m…»
14:13 vendethiel ^ colomon: that's why I'd like to do
14:14 beastd joined #perl6
14:15 psch m: sub fst([$fst, *@tail]) { $fst ~ @tail[*-1] }; say fst <a b c>; # have to deal with @tail directly
14:15 camelia rakudo-moar dc42ad: OUTPUT«ac␤»
14:21 tadzik ok, json in somewhat broken on moarvm
14:24 tadzik https://gist.github.com/tadzik/8753025
14:24 tadzik gives different results for the panda bootstrap file on parrot and on moar
14:25 vendethiel psch: yeah, I guess, not that big of a deal. Is there a reason for that, though ? Some languages implement it
14:25 tadzik moritz: ^^
14:26 psch vendethiel: as for reasons, i'm afraid i'm definitely the wrong person to ask; i'd imagine it comes down to optimization concerns
14:29 FROGGS tadzik: is it possible that the version differs for perl6-p and perl6-m?
14:29 FROGGS because the latest .ast/make changes could explain the difference
14:30 FROGGS I'd guess you have to itemize hashes (json objects) or so
14:33 tadzik FROGGS: oh!
14:33 tadzik FROGGS: yeah, I don't update rakudo-parrot that often
14:46 jnap joined #perl6
14:56 rindolf joined #perl6
14:57 kivutar joined #perl6
15:07 tadzik FROGGS: hm, but, how do I itemize them, if list repots 18 elements?
15:08 FROGGS I think a "make $( ... )" would do
15:08 tadzik ohh, in JSON code>
15:08 tadzik I mean, JSON-Tiny's code
15:08 FROGGS in the json actions
15:08 tadzik so it _is_ brokeN :)
15:08 FROGGS hey, I am just guessing :o)
15:08 tadzik :P
15:12 moritz tadzik: are rakudo-m and rakudo-p on the same revision? to me it looks like before vs. after 8128f6a5 (rakudo commmit)
15:12 moritz tadzik: also updating to newest json in panda should help
15:15 tadzik moritz: oh, indeed, that helped
15:15 tadzik (stupid submodules grumble grumble)
15:15 tadzik I have to commit the
15:15 tadzik * them between pulling and bootstrap.pl, cos bootstrap.pl will reset them to the commited state
15:16 tadzik (stupid bootstrap.pl grumble)
15:16 moritz :-)
15:18 dalek panda: f80ec50 | tadzik++ | ext/JSON__Tiny:
15:18 dalek panda: Update JSON::Tiny
15:18 dalek panda: review: https://github.com/tadzik/panda/commit/f80ec503cf
15:24 jnap joined #perl6
15:31 dalek panda: ae6eab5 | (Tobias Leich)++ | lib/Panda/Fetcher.pm:
15:31 dalek panda: cleanup path to pass use it in substr
15:31 dalek panda:
15:31 dalek panda: See http://irclog.perlgeek.de/perl6/2013-11-25#i_7914075
15:31 dalek panda: review: https://github.com/tadzik/panda/commit/ae6eab59ec
15:31 dalek panda: c00f5cf | tadzik++ | lib/Panda/Fetcher.pm:
15:31 dalek panda: Merge pull request #62 from FROGGS/patch-1
15:31 dalek panda:
15:31 dalek panda: cleanup path to pass use it in substr
15:31 dalek panda: review: https://github.com/tadzik/panda/commit/c00f5cf976
15:35 rindolf joined #perl6
15:36 tadzik yay, I went through all the pull requests
15:39 krunen joined #perl6
15:43 moritz tadzik++
15:47 SamuraiJack joined #perl6
15:55 zakharyas joined #perl6
15:56 timotimo hm. fosdem is going on right now, isn't it?
15:57 * moritz does a trial mysql -> pg transition for ilbot on his laptop
15:57 mberends joined #perl6
15:58 tadzik timotimo: aye
15:59 Psyche^_ joined #perl6
16:00 * timotimo pages through the perl track
16:00 timotimo do i see correctly that there are no live streams?
16:02 denis_boyun joined #perl6
16:04 dalek panda: adb7195 | tadzik++ | lib/Panda/App.pm:
16:04 dalek panda: Make "panda info" output nicer and more useful. Closes #49
16:04 dalek panda: review: https://github.com/tadzik/panda/commit/adb71951be
16:06 psch timotimo: http://streaming.fosdem.org has a stream for "Stop Building Bridges to Nowhere: Build Bridges to MoarVM instead", but the sound seems broken
16:07 rurban1 joined #perl6
16:09 tadzik I only see a flower
16:11 psch i had video with audio static a moment ago, but it's gone now it seems
16:12 psch well, the talk is scheduled to be over now
16:20 spider-mario moritz : https://github.com/rakudo/star/commit/0a16efddb2aabe024f66f3efe489d90b9e479ea0#diff-15c5b4c6f757ed54da181d4639921d11R167 ← shouldn’t there be brackets?
16:20 spider-mario (L. 167)
16:21 spider-mario this line results in the following warning:
16:21 spider-mario Useless use of private hash in void context at Configure.pl line 167.
16:21 rindolf joined #perl6
16:22 moritz spider-mario++ # good catch
16:23 molaf_ joined #perl6
16:23 raiph joined #perl6
16:23 moritz this whole thing will come crashing down eventually, I fear
16:23 dalek star: a49cc41 | moritz++ | Configure.pl:
16:23 dalek star: [Configure.pl] properly parentize.
16:23 dalek star:
16:23 dalek star: This is not Perl 6 code. spider-mario++
16:23 dalek star: review: https://github.com/rakudo/star/commit/a49cc417e1
16:23 moritz because parrot and moar have conflicit ideas of what CC, LDFLAGS etc. should be
16:24 moritz so merging it all into a single hash is headed for DOOM anyway
16:24 arnsholt joined #perl6
16:24 jeffreykegler joined #perl6
16:32 benabik joined #perl6
16:36 benabik "Stage parse: 66865.559", I think that's a new record.
16:36 benabik (Personal record at least.)
16:37 ajr joined #perl6
16:37 rindolf joined #perl6
16:38 moritz benabik: you ahven't seen http://paste.scsys.co.uk/297069 :-)
16:38 moritz m: say 1144911.468 / 66865.559
16:38 camelia rakudo-moar dc42ad: OUTPUT«17.122588746␤»
16:39 moritz benabik: that's from nwc10++ who patched MoarVM locally to do a full GC run after each allocation, or something like that :-)
16:39 benabik moritz: What was that?  Mine was just having my computer go to sleep mid-parse.
16:39 benabik Ah, GC torture testing...  That's slow.
16:48 virtualsue joined #perl6
17:03 rindolf joined #perl6
17:14 cooper joined #perl6
17:15 cooper joined #perl6
17:18 vendethiel what's the bottom type in perl6 ?
17:20 psch r: "foo".^mro.say; 5.^mro.say
17:20 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«(Str) (Cool) (Any) (Mu)␤(Int) (Cool) (Any) (Mu)␤»
17:20 psch r: (1|2).^mro.say
17:20 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«(Junction) (Mu)␤»
17:21 psch ok, bottom type is not the same as object root
17:21 * psch needs to learn more CS terminology
17:21 benabik Mu is something of the top type.  Anything can be assigned to Mu.  I don't know that there is a bottom that can be assigned to anything.  (Unless you mean bottom in a different way than type lattices.)
17:21 diakopter psch: jnthn is streaming now
17:21 psch diakopter: thanks, i'll have a look
17:22 psch vendethiel: from the wikipedia page to bottom type i think Nil might be what you want
17:22 vendethiel psch: thanks
17:22 benabik Oooh, Nil.  Lack of value, yes.
17:23 vendethiel psch: because it's gradually typed, variant type is at the bottom.
17:23 vendethiel which means casting Nil to something else is an upcast
17:23 benabik There is also Failure, but I'm not sure how it interacts with typechecking.
17:23 psch m: my Mu $f = Failure.new; my Any $g = Failure.new; my Cool $h = Failure.new
17:23 camelia rakudo-moar dc42ad: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method new at src/gen/m-CORE.setting:12181␤  in block  at /tmp/wT8HayeF5o:1␤␤»
17:27 benabik m: my Mu $f = Failure.new('Mu'); my Any $g = Failure.new('Any'); my Cool $h = Failure.new('Cool')
17:27 camelia rakudo-moar dc42ad: OUTPUT«No such method 'throw' for invocant of type 'Str'␤  in method sink at src/gen/m-CORE.setting:12212␤  in method BUILDALL at src/gen/m-CORE.setting:923␤  in method bless at src/gen/m-CORE.setting:842␤  in method new at src/gen/m-CORE.setting:827␤  …»
17:27 colomon jnthn++ streaming?  link?
17:28 benabik m: my Mu $f = fail('Mu'); my Any $g = fail('Any'); my Cool $h = fail('Cool')
17:28 camelia rakudo-moar dc42ad: OUTPUT«Unhandled exception: Mu␤   at src/gen/m-CORE.setting:10811  (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:129)␤ from src/gen/m-CORE.setting:12212  (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:s…»
17:28 virtualsue there's a live stream of the perl devroom at fosdem: http://europe1.fosdem.sesse.net/ (room k3.201) if anyone is interested
17:29 benabik psch: I suppose it's less type checking failure and more the eagerness with which failure throws.  :-/
17:29 colomon I can hear jnthn!  \o/
17:31 benabik ...  Missed beginning.  What's topic of talk?
17:32 colomon benabik: I have a vague memory it's a generic p6 talk?
17:32 virtualsue what you can do now with perl6
17:32 psch "What you can do today" i think
17:32 psch yeah, that
17:32 virtualsue snap
17:33 virtualsue https://fosdem.org/2014/schedule/track/perl/
17:33 benabik Yeah, the stream list said the room was empty so I was a bit confused.
17:34 benabik virtualsue++ # Useful links
17:34 virtualsue no problem
17:34 virtualsue i'm enjoying the talk in person :)
17:35 benabik Woo, perl6-m
17:36 psch m: try { my $x = X::AdHoc.new(:payload("foo")); my Mu $f = Failure.new($x); my Any $g = Failure.new.($x); my Cool $h = Failure.new($x); CATCH { when Any { say "Any"; .rethrow }; when Cool { say "Cool"; .rethrow }; when Mu { say "Mu"; } } }
17:36 camelia rakudo-moar dc42ad: OUTPUT«Any␤Not enough positional parameters passed; got 1 but expected 2␤  in method new at src/gen/m-CORE.setting:12181␤  in block  at /tmp/wWjG9eXWrg:1␤␤»
17:36 psch right, the .rethrow didnt even work
17:36 psch m: try { my $x = X::AdHoc.new(:payload("foo")); my Mu $f = Failure.new($x); my Any $g = Failure.new.($x); my Cool $h = Failure.new($x); CATCH { when Any { say "Any"; }; when Cool { say "Cool";  }; when Mu { say "Mu"; } } }
17:36 camelia rakudo-moar dc42ad: OUTPUT«Any␤»
17:36 colomon ugh, static
17:36 raydiak ow fix teh mic :P
17:36 psch ...but that just shows that any Exception matches Any
17:37 benabik r: say Mu ~~ Failure, Any ~~ Failure, Cool ~~ Failure
17:37 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«FalseFalseFalse␤»
17:38 psch benabik: well they're all above Failure, ~~ against undefined lhs checks nqp::istype(rhs, lhs)
17:38 benabik Erm, did I do that backwards?
17:38 psch m: say Failure ~~ Mu
17:38 camelia rakudo-moar dc42ad: OUTPUT«True␤»
17:38 benabik r: say Failure ~~ Mu, Failure ~~ Any, Failure ~~ Cool
17:38 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«TrueTrueFalse␤»
17:39 psch r: Failure ~~ Exception # this surprised me just now
17:39 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: ( no output )
17:39 psch r: say Failure ~~ Exception, Exception ~~ Failure
17:39 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«FalseFalse␤»
17:40 benabik Failure has-a Exception, not is-a
17:41 rindolf joined #perl6
17:41 dalek ecosystem: 1220bd8 | sergot++ | META.list:
17:41 dalek ecosystem: HTTP::Request added, Response and UA soon
17:41 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/1220bd8bfe
17:46 * raydiak turns off fosdem static
17:46 raydiak \o morning #perl6
17:46 * benabik is going to wait for the slides rather than periodically getting deafened by static.
17:46 psch hi raydiak++ # turning off the static
17:47 TimToady obviously they're mixing together a wired and wireless mic feed, and he's using the wired, so the wireless mic is off, and we're picking up static instead
17:47 TimToady probably someone demoing their software radio :)
17:48 benabik Wouldn't be nearly as bad if the static was the same volume as jnthn, instead of significantly louder.
17:48 rindolf Hi all.
17:48 TimToady it comes and goes, I just run it down to make the static bearable, then I know when it's gone away again
17:48 TimToady then I run the volume back up
17:48 * rindolf has CPANTS overload, but has already done most of the work.
17:50 araujo joined #perl6
17:50 krunen joined #perl6
17:58 erkan joined #perl6
18:02 colomon jnthn++
18:12 atroxaper joined #perl6
18:12 ilbot3 joined #perl6
18:12 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
18:21 Ulti http://ghv.artzub.com/#repo=rakudo&amp;climit=100&amp;user=rakudo this is neat
18:24 colomon joined #perl6
18:24 jnap joined #perl6
18:26 TimToady why is the primary language of star 'Perl'
18:26 TimToady rakudo's is 'Perl 6'
18:26 TimToady well, Perl6, but yeah
18:28 raydiak I've heard that the perl 6 recognition on github still has its flaws
18:29 Ulti plus I guess historically everything was marked as Perl rather than Perl 6
18:36 rurban1 joined #perl6
18:41 vendethiel left #perl6
18:46 raydiak amusing anecdote for the day: the g/f saw a mention of "hacking" on my screen and became concerned about the nature of my work
18:50 diakopter *giggle*
18:52 xinming_ joined #perl6
18:55 vendethiel joined #perl6
19:01 FROGGS[mobile] joined #perl6
19:01 tgt joined #perl6
19:04 vendethiel :r say 0..1.perl; say 0...3.perl
19:05 rindolf joined #perl6
19:05 vendethiel not sure what's the difference between .. and ... :o)
19:07 moritz r: say (0..1).^name
19:07 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«Range␤»
19:07 moritz r: say (0...1).^name
19:07 vendethiel oh, with three dots it's a list.
19:07 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«List␤»
19:07 moritz vendethiel: basically .. creates a Range object, and only supports "increment by one"
19:07 moritz but it also supports range checking etc.
19:07 vendethiel moritz: what's the purpose of .. if it's more limited ? Lists are lazy too, ain't they ?
19:07 moritz but ... also supports smart increemnts
19:08 moritz vendethiel: but you can do smart-match against a Range in O(1)
19:08 vendethiel moritz: smart-matching lists force them to be evaluated ?
19:09 vendethiel oh okay, three dots is eager
19:09 moritz vendethiel: three dots aren't eager
19:10 vendethiel r: 0...Inf
19:10 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: ( no output )
19:10 vendethiel uh, that coredumped for me
19:10 moritz vendethiel: but since lists aren't always monotonic, smart-matching has to iterate the whole list until it finds something
19:10 vendethiel maybe it was "fixed" recently
19:10 jnap joined #perl6
19:10 moritz vendethiel: well, if you run it in the REPL, it tries to print the value of the last expression
19:10 moritz vendethiel: and to print it, it has to iterate it
19:11 vendethiel ah yes, thanks
19:11 moritz vendethiel: to prevent that, add a  ; 1; at the end
19:11 vendethiel yeah that's what I did :). I know scala and some others languages just show `Stream(1, Stream(?))` or something
19:12 moritz that's something we could consider too
19:12 moritz at least for .gist, not .Str
19:15 rindolf joined #perl6
19:19 timotimo d'oh, i missed the streams
19:19 timotimo are there stream dumps anywhere?
19:20 kanishka joined #perl6
19:20 rindolf joined #perl6
19:20 raydiak r: say 1.5 ~~ (1..2); say 1.5 ~~ (1...2);
19:20 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«True␤False␤»
19:20 raydiak vendethiel: ^
19:20 vendethiel raydiak: yep thanks :)
19:20 kaare_ joined #perl6
19:21 vendethiel whereas a smartmatch on a list would only check its elements then
19:21 raydiak right, just like the 1...2 is doing
19:21 vendethiel yeah that's what I meant.
19:22 raydiak sounds like you got it figured out, then :)
19:23 vendethiel Yeah, 3 days of Perl6 and I can read many examples and just understand them/figure out what they do
19:23 psch unspace.t down to 12 skips from 18 \o/
19:23 psch there's at least one test that utterly confuses me though
19:23 vendethiel at first I was scared all these operators would take a long time to learn but really, it's just combinations
19:24 raydiak yep...most languages seem scary until you know them
19:25 raydiak I was scared of all the symbols that weren't on my keyboard
19:25 vendethiel oh, some languages are still scary after using them for almost 2 years :p.
19:25 psch unspace.t:83 doesn't make sense to me. what i see is that it calls postcircumfix:<( )> on a Str and the test is skipped (for niecza) with exactly that as a message and "parse failure" for rakudo...
19:26 psch but .("x") on a function that returns 'a' *should* complain about not finding postcircumfix:<( )>, right? :/
19:27 timotimo er ...
19:27 tgt joined #perl6
19:27 timotimo you mean like sub foobar($arg) { return 'a' }; foobar.("x")?
19:27 araujo joined #perl6
19:28 * timotimo looks up the actual test itself
19:29 psch timotimo: exactly like that, but unspaced of course
19:30 timotimo it'd seem like that's supposed to pass "x" to the version of foo that takes an argument and returns it
19:30 timotimo so sub foo($x) { $x }
19:30 psch but the method dot goes on the return value, not the function
19:30 psch which is consistent with say and whatelsehaveyou
19:30 vendethiel r: class A { sub one { 'a'; } submethod two { 'b' } method thr { 'c'} }; my A @a .= new; say @a.one~@a.two~@a.thr;
19:30 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32mclass A { sub one { 'a'; } [33mâ��[31msubmethod two { 'b' } method thr { 'c'} [0mâ�¤    ex…»
19:30 timotimo hmm.
19:31 vendethiel r: class A { sub one { 'a'; }; submethod two { 'b' }; method thr { 'c'} }; my A @a .= new; say @a.one~@a.two~@a.thr;
19:31 psch timotimo: i think the intention was somewhat like foo\ ("x")\ .\ lc or somesuch
19:31 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«No such method 'two' for invocant of type 'Array[A]'␤  in block  at /tmp/tmpfile:1␤␤»
19:31 vendethiel r: class A { sub one { 'a'; }; submethod two { 'b' }; method thr { 'c'} }; my A @a .= new; say @a.one~@a.thr;
19:31 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«No such method 'thr' for invocant of type 'Array[A]'␤  in block  at /tmp/tmpfile:1␤␤»
19:31 vendethiel whoops.
19:31 timotimo psch: no, i do think that ought to execute the sub foo with the argument "x"
19:31 vendethiel r: class A { sub one { 'a'; }; submethod two { 'b' }; method thr { 'c'} }; my A $a .= new; say $a.one~$a.two~$a.thr;
19:31 timotimo rather than call postcircumfix on the result
19:31 psch r: say.("foo")
19:31 camelia rakudo-jvm dc42ad: OUTPUT«one(A<1820025559>bc)␤»
19:31 camelia ..rakudo-parrot dc42ad: OUTPUT«one(A<-9014862644126962107>bc)␤»
19:31 camelia ..rakudo-moar dc42ad: OUTPUT«one(A<140363782481680>bc)␤»
19:31 camelia rakudo-parrot dc42ad: OUTPUT«␤No such method 'postcircumfix:<( )>' for invocant of type 'Bool'␤  in any  at gen/parrot/BOOTSTRAP.nqp:1692␤  in any  at gen/parrot/BOOTSTRAP.nqp:1674␤  in block  at /tmp/tmpfile:1␤␤»
19:31 camelia ..rakudo-jvm dc42ad: OUTPUT«␤No such method 'postcircumfix:<( )>' for invocant of type 'Bool'␤  in any  at gen/jvm/BOOTSTRAP.nqp:1680␤  in any  at gen/jvm/BOOTSTRAP.nqp:1663␤  in block  at /tmp/tmpfile:1␤␤»
19:32 camelia ..rakudo-moar dc42ad: OUTPUT«␤Cannot find method 'postcircumfix:<( )>'␤  in block  at /tmp/tmpfile:1␤␤»
19:32 timotimo oh, huh.
19:32 psch r: &say.("foo")
19:32 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«foo␤»
19:32 psch that might be it?
19:32 vendethiel what did I do ôÔ
19:32 timotimo &x may be bound to any object that does the Callable role, such as any Block or Routine. The Callable role implies the ability to support postcircumfix:<( )>.
19:34 vendethiel r: class A { sub one { return 'a'; }; submethod two { return 'b' }; method thr { return 'c'} }; my A $a .= new; say $a.one; say $a.two; say $a.thr;
19:34 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«one(A.new())␤b␤c␤»
19:34 timotimo vendethiel: the sub "one" ought to be called via A::one, i believe
19:34 timotimo ah, duh :)
19:34 vendethiel the "NL" seems messed ?
19:34 timotimo it's the one method on Any that's leaking through
19:34 timotimo it's like the "one" sub; it creates a junction
19:34 vendethiel r: class A { sub foobv { return 'a'; }; submethod two { return 'b' }; method thr { return 'c'} }; my A $a .= new; say $a.foobv; say $a.two; say $a.thr;
19:34 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«No such method 'foobv' for invocant of type 'A'␤  in block  at /tmp/tmpfile:1␤␤»
19:35 vendethiel r: A::foobv().say
19:35 camelia rakudo-moar dc42ad: OUTPUT«===SORRY!===␤Could not find symbol '&foobv'␤»
19:35 camelia ..rakudo-jvm dc42ad: OUTPUT«Could not find symbol '&foobv'␤  in method <anon> at gen/jvm/CORE.setting:12211␤  in any  at gen/jvm/Metamodel.nqp:2610␤  in any find_method_fallback at gen/jvm/Metamodel.nqp:2609␤  in any find_method at gen/jvm/Metamodel.nqp:947␤  in any  at gen/…»
19:35 camelia ..rakudo-parrot dc42ad: OUTPUT«Could not find symbol '&foobv'␤  in method <anon> at gen/parrot/CORE.setting:12232␤  in any  at gen/parrot/Metamodel.nqp:2693␤  in any find_method_fallback at gen/parrot/Metamodel.nqp:2681␤  in any find_method at gen/parrot/Metamodel.nqp:948␤  …»
19:35 psch class A { sub one { return 'a'; }; submethod two { return 'b' }; method thr { return 'c'} }; my A $a .= new; say $a.one;  say $a.two; say $a.thr;
19:35 timotimo i think the sub also has to be declared "has"
19:35 psch ahgrh
19:35 psch copied the \n...
19:35 vendethiel r: class A { sub foobv { return 'a'; }; } say A::foobv
19:35 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32mclass A { sub foobv { return 'a'; }; } [33mâ��[31msay A::foobv[0mâ�¤    expecting any of:…»
19:35 vendethiel r: class A { sub foobv { return 'a'; }; }; say A::foobv();
19:35 camelia rakudo-moar dc42ad: OUTPUT«===SORRY!===␤Could not find symbol '&foobv'␤»
19:35 camelia ..rakudo-jvm dc42ad: OUTPUT«Could not find symbol '&foobv'␤  in method <anon> at gen/jvm/CORE.setting:12211␤  in any  at gen/jvm/Metamodel.nqp:2610␤  in any find_method_fallback at gen/jvm/Metamodel.nqp:2609␤  in any find_method at gen/jvm/Metamodel.nqp:947␤  in any  at gen/…»
19:35 camelia ..rakudo-parrot dc42ad: OUTPUT«Could not find symbol '&foobv'␤  in method <anon> at gen/parrot/CORE.setting:12232␤  in any  at gen/parrot/Metamodel.nqp:2693␤  in any find_method_fallback at gen/parrot/Metamodel.nqp:2681␤  in any find_method at gen/parrot/Metamodel.nqp:948␤  …»
19:36 vendethiel It's lexically scoped :P.
19:36 vendethiel I guess that at first. But then, there's no "visibility" of sorts ?
19:36 psch timotimo: so i add the & to realize the intention of the test? or is there something else i'm missing?
19:37 timotimo i'm not certain :(
19:38 moritz vendethiel: you can say 'our sub foobv', but the idiomatic thing is to export it instead
19:38 vendethiel r: class A { our sub foobv { return 'a'; }; }; say A::foobv();
19:38 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«a␤»
19:39 vendethiel class A { my method tryprivate { return 'a'; } }; say A.new.tryprivate()
19:39 vendethiel r: class A { my method tryprivate { return 'a'; } }; say A.new.tryprivate()
19:39 vendethiel whoops :)
19:39 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«No such method 'tryprivate' for invocant of type 'A'␤  in block  at /tmp/tmpfile:1␤␤»
19:40 vendethiel yay, so that's how you <visibility>
19:40 timotimo not really
19:40 timotimo using method !private is more common
19:40 vendethiel r: class A { method tryprivate !private { return 'a'; } }; say A.new.tryprivate()
19:40 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Missing blockâ�¤at /tmp/tmpfile:1â�¤------> [32mclass A { method tryprivate [33mâ��[31m!private { return 'a'; } }; say A.new.tr[0mâ�¤    expect…»
19:40 vendethiel or should that be unspaced?
19:41 moritz r: class A { method !tp { return 'a' } }; say A.new!tp
19:41 timotimo r: class A { method !tryprivate { return 'a'; } }; say A.new.tryprivate()
19:41 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Private method call to tp must be fully qualified with the package containing the method�at /tmp/tmpfile:1�------> [32method !tp { return 'a' …»
19:41 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«No such method 'tryprivate' for invocant of type 'A'␤  in block  at /tmp/tmpfile:1␤␤»
19:43 rindolf joined #perl6
19:43 vendethiel r: class A { method !tp { return 'a' } }; say A::tp(A.new)
19:43 camelia rakudo-jvm dc42ad: OUTPUT«Could not find symbol '&tp'␤  in method <anon> at gen/jvm/CORE.setting:12211␤  in any  at gen/jvm/Metamodel.nqp:2610␤  in any find_method_fallback at gen/jvm/Metamodel.nqp:2609␤  in any find_method at gen/jvm/Metamodel.nqp:947␤  in any  at gen/jvm…»
19:43 camelia ..rakudo-moar dc42ad: OUTPUT«===SORRY!===␤Could not find symbol '&tp'␤»
19:43 camelia ..rakudo-parrot dc42ad: OUTPUT«Could not find symbol '&tp'␤  in method <anon> at gen/parrot/CORE.setting:12232␤  in any  at gen/parrot/Metamodel.nqp:2693␤  in any find_method_fallback at gen/parrot/Metamodel.nqp:2681␤  in any find_method at gen/parrot/Metamodel.nqp:948␤  in …»
19:45 raydiak r: class A { trusts GLOBAL method !tp { return <a> } }; say A.new!A::tp
19:45 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32mclass A { trusts GLOBAL [33mâ��[31mmethod !tp { return <a> } }; say A.new!A[0mâ�¤    expec…»
19:45 raydiak r: class A { trusts GLOBAL; method !tp { return <a> } }; say A.new!A::tp
19:45 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«a␤»
19:45 vendethiel that seems dangerous.
19:45 vendethiel trusts is like C++'s friend ?
19:46 kanishka is there any alternative for logstash or fluentd in perl ?
19:46 raydiak well calling a private method from outside the class requires some extra messing about...it is, after all, supposed to be private
19:46 raydiak idk C++
19:46 vendethiel yeah I like it better that way too =)
19:47 vendethiel my only question left is WRT subtyping, so let's do it :
19:48 vendethiel r: class A { my sub a { return 1 }; }; class B extends A { sub b { return $self->a() + 1 } }; say B.new.a()
19:48 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unable to parse class definition�at /tmp/tmpfile:1�------> [32ms A { my sub a { return 1 }; }; class B [33m�[31mextends A { sub b { return…»
19:48 vendethiel r: class A { my sub a { return 1 }; }; class B does A { sub b { return $self->a() + 1 } }; say B.new.a()
19:48 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�A is not composable, so B cannot compose it�at /tmp/tmpfile:1�------> �»
19:48 vendethiel r: class A { my sub a { return 1 }; }; class B is  A { sub b { return $self->a() + 1 } }; say B.new.a()
19:48 moritz vendethiel: inheritance is done with 'is'
19:48 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unsupported use of -> as postfix; in Perl 6 please use either . to call a method, or whitespace to delimit a pointy block�at /tmp/tmpfile:1�---…»
19:48 vendethiel moritz: 2fast
19:49 vendethiel r: class A { my sub a { return 1 }; }; class B is  A { sub b { return $self.a() + 1 } }; say B.new.a()
19:49 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Variable '$self' is not declaredâ�¤at /tmp/tmpfile:1â�¤------> [32mclass B is  A { sub b { return $self.a()[33mâ��[31m + 1 } }; say B.new.a()[0…»
19:49 moritz vendethiel: and if you want to call stuff as methods, you have to declare them as methods
19:49 vendethiel moritz: so sub is lexically scoped
19:49 moritz yes
19:49 vendethiel and method isnt ?
19:49 moritz and methods live in the method table
19:49 vendethiel yeah
19:49 moritz and $self is spelled self
19:50 vendethiel so $self only when you explicitly set it to be a parameter?
19:50 moritz yes
19:50 vendethiel ie sub b($self:) {}
19:50 moritz correct
19:50 vendethiel I'll try it in my text editor cause it's a bit hard to see what's going on here
19:51 vendethiel Is there a perl6 bundle for SublimeText/TextMate etc?
19:51 rurban1 joined #perl6
19:51 moritz r: class A { method a { 1 } }; class B is A { method b { $.a + 1 } }; say B.new.a; ay B.new.b
19:51 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Undeclared routine:â�¤    ay used at line 1â�¤â�¤Â»
19:51 moritz r: class A { method a { 1 } }; class B is A { method b { $.a + 1 } }; say B.new.a; say B.new.b
19:51 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«1␤2␤»
19:52 vendethiel moritz: can you inherit with a specific visibility ?
19:52 vendethiel to make all methods of your superclass "private"
19:52 moritz I'm aware of p6 syntax hilighting for vim, emacs and pygments
19:52 moritz vendethiel: no
19:53 moritz if you want that, you are better off doing delegation
19:54 vendethiel so there's still a way to do it :P.
19:54 moritz well, it's not inheritance anymore :-)
19:54 vendethiel yeah, but that allows for more complicated things, like multiple inheritance if somebody wants that etc.
19:57 psch m: class A { method a { "a" } }; class B { method a { "b" } }; class C is A is B { }; C.new.a
19:57 camelia rakudo-moar dc42ad: ( no output )
19:57 psch m: class A { method a { "a" } }; class B { method a { "b" } }; class C is A is B { }; C.new.a.say
19:57 camelia rakudo-moar dc42ad: OUTPUT«a␤»
19:57 psch m: class A { method a { "a" } }; class B { method a { "b" } }; class C is B is A { }; C.new.a.say
19:57 camelia rakudo-moar dc42ad: OUTPUT«b␤»
19:57 vendethiel oh, it does have that -- for better or worse
19:58 vendethiel moritz: googling and getting on some of yours answers from 2010 on stackoverflow
20:00 moritz vendethiel: that kinda hard to avoid if you google for p6 stuff :-)
20:00 moritz you end up on my or masak++'s blog, or slides from jnthn++, or stackoverflow or doc.perl6.org or perlmonks...
20:01 vendethiel haha yeah but those are already opened ;)
20:01 vendethiel is there something like `super`/`superclass` ? `class A { our sub a { return 'a'; }; }; class B is A { method b { return superclass::a() ~ 'b'; } ` I can see why it could be a problem WRT multiple inheritance though
20:02 moritz there is the nextsame/nextwith/callsame/callwith group of redispatchers
20:03 moritz and you can say self.A::a()
20:03 moritz (ie fully qualify a method with the class name)
20:03 vendethiel moritz: just A would be enough, no need for self.A, is there ?
20:03 vendethiel I guess it justs casts to an A
20:05 moritz there's no casting
20:05 moritz and A::a would try to call a sub, not a method
20:05 psch with "our sub" you can call without self, yeah, but i don't think you inherit it either
20:05 vendethiel no it's not inherit it anymore, it's just fully qualified sub call
20:05 moritz we really do care about the sub/method distiction in Perl 6
20:09 vendethiel I can guess. `submethod` seems a bit confusing, not sure what's the use-case
20:11 raydiak non-inheritable method; e.g. a method that isn't functional or meaningful to a subclass
20:11 sergot r: my %h = <a a>; sub add(*%hash) { for %hash.kv -> $k, $v { %h{$k} = $v }; }; my $to_add = "a"; add($to_add => "b");
20:11 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in sub add at /tmp/tmpfile:1␤  in block  at /tmp/tmpfile:1␤␤»
20:11 sergot how can i do this?
20:11 vendethiel wait, can you do `submethod !a` ? If so, it's cool
20:12 timotimo should work actually
20:12 moritz vendethiel: private methods are never inherited
20:12 moritz vendethiel: so the 'submethod !' is really redundant
20:12 vendethiel moritz: oh yeah, I was mixing two things
20:12 sergot I mean, using variable in *%hash.
20:12 sergot as a key
20:13 moritz sergot: add |($to_add => "b")
20:13 sergot moritz++ thanks! :)
20:14 rindolf joined #perl6
20:16 moritz good news: I have an experimental mysql -> pg translation for ilbot
20:16 moritz bad news: it takes about 1 hour to do the migration
20:16 moritz on my rather beefy laptop
20:16 moritz and on my rather slow vhost, it'll likely take half a day
20:16 timotimo do you have an idea what is to blame?
20:17 moritz timotimo: yes, encoding fu
20:17 timotimo aaw man :(
20:17 timotimo that's rough
20:17 timotimo do you think you can do it incrementally at all?
20:18 timotimo i think postgres full text search should be a bit helpful
20:18 moritz and it's 8.6 mio rows, so it's simply a non-trivial amount of data
20:18 timotimo that's fair
20:19 moritz though I'm a bit worried; the gzip'ed mysqldump is 425MB, the gzip'd pgdump is 215MB
20:19 moritz that's... worrying
20:19 timotimo hmm
20:20 moritz gzip should fudge out most of the formatting differences
20:20 timotimo can you diff a part of it and see if it's just systematically more compact commands?
20:20 moritz not easily
20:20 timotimo mhm :(
20:21 timotimo ISTR postgres is good at storing data, but what you have there is the text file
20:21 timotimo hm, doesn't postgres have a special minimized format for data importing?
20:21 timotimo like heredocs?
20:22 moritz yes, I think so
20:23 moritz oh, I think the answer is simply "data truncation during import"
20:23 timotimo ouch
20:23 moritz there are some pathologically blown-up lines in mysql table
20:24 moritz due to UTF-8 not quite decoded as UTF-8
20:24 moritz and I've simply truncated those
20:24 timotimo :(
20:24 moritz m: say (387575619 - 391371730) / 391371730
20:25 camelia rakudo-moar dc42ad: OUTPUT«-0.0096995023␤»
20:25 moritz but that's less than 1%
20:25 timotimo well, i guess that means the original data was b0rked anyway?
20:25 moritz so, not quite the answer
20:25 moritz yes
20:26 moritz mkaing the import incremental is the next step
20:27 arnsholt joined #perl6
20:28 moritz timotimo: http://irclog.perlgeek.de/perl6/2014-01-15#i_8123929 example of such a line
20:29 timotimo ah! those :)
20:29 timotimo i remember those :D
20:29 nwc10 p: say q0/No escaping or anything, suspiciously like Q!/
20:29 camelia rakudo-parrot dc42ad: OUTPUT«���[���3���1���m���=���=���=������[���0���m���S���O���R���R���Y���!������[���3���1���m���=���=���=�…»
20:30 moritz usually if the IRC line length limit truncates UTF-8 continuation bytes
20:30 moritz and thus the autodetector refuses to classify it as UTF-8
20:30 moritz falls back to Latin-1
20:30 moritz and produces lot and lots of mojibake
20:35 rindolf joined #perl6
20:36 denisboyun joined #perl6
20:38 dag_ joined #perl6
20:38 dalek ecosystem: 08ba60c | sergot++ | META.list:
20:38 dalek ecosystem: HTTP::Headers added
20:38 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/08ba60c447
20:39 dag_ moritz: Saw you're doing Postgres imports - you do know about COPY? It really is your friend.
20:39 arnsholt joined #perl6
20:40 dalek rakudo/nom: fb5e3dc | (Pepe Schwarz)++ | src/Perl6/Grammar.nqp:
20:40 dalek rakudo/nom: Adjusted Grammar.nqp to parse a few more unspace-related tests.
20:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fb5e3dcd6c
20:40 dalek rakudo/nom: 535d912 | (Matthew Wilson)++ | src/Perl6/Grammar.nqp:
20:40 dalek rakudo/nom: Merge pull request #250 from peschwa/slightly_improved_unspace
20:40 dalek rakudo/nom:
20:40 dalek rakudo/nom: Adjusted Grammar.nqp to parse a few more unspace-related tests.
20:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/535d912c9c
20:40 diakopter psch++
20:40 dag_ moritz: COPY FREEZE was added in 9.3 - even faster.
20:41 * dag_ has got to go again...
20:42 timotimo are there any slide pdfs of perl6-related talks yet?
20:42 diakopter from ever? :)
20:43 dalek roast: 9801c79 | (Pepe Schwarz)++ | S02-lexical-conventions/unspace.t:
20:43 dalek roast: Added test for RT #92826, RT #79340, RT #117465, un-skipped 6 tests.
20:43 dalek roast: review: https://github.com/perl6/roast/commit/9801c791bc
20:43 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=92826
20:43 tgt joined #perl6
20:44 timotimo psch: lookin' good! :)
20:45 psch timotimo: i just left the one i was unsure about but added a similar one...
20:45 psch the &foo <> foo distinction isn't clear to me
20:45 psch at least in that context, which probably means i can't divine the intention of the original test
20:45 timotimo it does make sense the way you interpreted it
20:46 timotimo if you have &foo you refer to the sub, if you have only foo you refer to the result
20:46 timotimo i don't know why i didn't understand that before
20:46 diakopter well, the address-of or reference to a name of thing can be viewed as a deferral of the invocation of that thing
20:47 diakopter (invocation... and resolution!)
20:47 timotimo diakopter: is your talk about moarvm going to talk a lot about the perl5 interop of moarvm?
20:48 diakopter I didn't do it; I was feeling too poorly
20:48 timotimo fair enough
20:48 timotimo was it going to be about that? or did i misunderstand the abstract?
20:49 dalek ecosystem: 8cb43e4 | sergot++ | META.list:
20:49 dalek ecosystem: HTTP::Message added
20:49 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/8cb43e47cf
20:49 psch timotimo: so the test should probably go '&foo\ .\ ("x")' you say?
20:49 timotimo sounds sensible
20:49 diakopter I wanted to no
20:49 diakopter I mean
20:49 diakopter no
20:49 timotimo but i'd like an actual perl6 pro to confirm that
20:49 diakopter it's still foo.()
20:50 diakopter the unspace should be viewed as non-existent
20:50 timotimo right. and foo.() calls postcircumfix:<( )> on the result of foo
20:50 psch diakopter: but foo.("x") errors with 'cant find postcircumfix:<( )> for Str'
20:50 diakopter ah ok, yes.
20:50 psch which is the given reason for skipping the test
20:51 psch i wonder if i can unskip it for niecza too
20:51 psch n: sub foo($x) { $x }; &foo\ .\ ("x")
20:51 camelia niecza v24-109-g48a8de3: ( no output )
20:51 psch n: sub foo($x) { $x }; &foo\ .\ ("x").say # ENOSAY
20:51 camelia niecza v24-109-g48a8de3: OUTPUT«x␤»
20:51 moritz the error for foo.() looks correct to me
20:52 moritz it parses as foo().()
20:52 psch so everyone agrees that the test doesn't test what it's supposed to test? :)
20:52 moritz if /me is everybody, yes! :-)
20:52 timotimo well, me, too
20:53 dalek roast: 8752897 | (Pepe Schwarz)++ | S02-lexical-conventions/unspace.t:
20:53 dalek roast: Corrected und and skipped a test for Rakudo and Niecza
20:53 dalek roast: review: https://github.com/perl6/roast/commit/8752897e77
20:53 psch errr
20:53 psch that should've read "corrected and unskipped"... :)
20:54 psch fixing that involves push --force i gather?
20:55 timotimo it would
20:55 timotimo is it that important?
20:55 psch not really, i'd just say it's confusing if it's as-is
20:55 psch but then any confusion might be cleared by viewing the actual commit
20:56 psch i'm just a bit antsy not to do anything wrong is all heh
20:56 timotimo the philosophy of #perl6 is "-Ofun" and "easier to ask for forgiveness than permission"
20:56 timotimo so i'd say it's fine
20:57 psch r: /\ X/ # RT #77522
20:57 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=77522
20:57 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unspace not allowed in regex�at /tmp/tmpfile:1�------> [32m/\ [33m�[31mX/ # RT #77522[0m�»
20:57 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=77522
20:58 moritz std: /\ X/
20:58 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0m�No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes (' ') or use a backslashed form like \x20 at /tmp/et6ck2Pacv line 1:�------> [32m/\[33m�[31m X/[0m�Parse failed�…»
20:58 moritz looks correct to me
20:58 rindolf joined #perl6
20:58 timotimo oh? i didn't know about this
20:58 psch r: try EVAL '/\ X/'; $!.perl.say
20:58 camelia rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«X::Comp::AdHoc.new(filename => "eval_0", line => 1, column => Any, modules => Array.new(), is-compile-time => Bool::True, pre => "/\\ ", post => "X/", highexpect => Array.new(), payload => "Unspace not allowed in re…»
20:59 psch can't test that :/
20:59 timotimo but it seems like a good call to force spaces to be quoted
21:00 psch there's an awful lot of bugs that need to have their X::AdHoc or X::Comp::AdHoc converted to something narrower typed
21:01 psch but i don't think doing it everywhere the same i did it in the optimizer is the right way; i'm already a bit uncomfortable with the amount of code duplication i introduced from World to the optimizer...
21:03 moritz psch: maybe there needs to be role that supplies code to both World and Optimizer
21:06 psch moritz: yes, a role for Exception-y stuff probably makes sense
21:12 psch and when it's in a role that role can also be bolted onto e.g. Metamodel/MultipleInheritance.nqp for e.g. RT #117165 i guess
21:12 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=117165
21:12 psch and all the others!
21:12 timotimo psch: inside the grammar it's much easier to make typed exceptions work
21:14 psch well, yes, finding the needed information probably is difficult if there's no cursor or anything around anymore
21:14 psch so blindly converting nqp::die calls into "build and throw a typed exception" isn't the best course, is it
21:15 timotimo since you have a cursor, you can actually use its typed exception helper method
21:15 moritz blindly doing software development is never a good course :-)
21:16 psch moritz: i'm afraid i'm pretty much missing the whole bigger picture; grokking the whole process from hitting enter to getting output is beyond me... :)
21:17 timotimo that process is surprisingly easy to grasp once you know where you have to look
21:17 timotimo are you interested in a little guided tour?
21:17 psch give me 5 minutes :)
21:17 timotimo actually, the RaNIW course material also covers this rather well, i believe
21:18 moritz psch: have you looked at the slides from the "Rakudo and NQP internals workshop"?
21:18 timotimo hm, does google docs multi-user stuff offer a good way to show someone slides and write comments all over the place?
21:18 timotimo that may be worth trying out
21:19 timotimo http://6guts.wordpress.com/2013/09/17/material-from-the-rakudo-and-nqp-internals-course/
21:20 moritz also, docs/architecture.svg in rakudo
21:21 rurban1 joined #perl6
21:21 psch moritz: yes, i have, and it has helped, but it still lead me to misunderstandings like building a QAST::Statement that builds and throws an exception, instead of doing it how i sent the PR
21:21 psch in the optimizer that is, for my first PR which was solved much different
21:21 psch s/much/very/
21:22 timotimo https://docs.google.com/document/d/1yjdulngcziiFd_Ia6KihGyrhtQO6TDMp8TMfGxW315s/edit?usp=sharing - check this out! :)
21:22 moritz psch: well, in the end only practise makes you familiar enough with the codebase to avoid that
21:22 timotimo this way we can look at the slides and see each others cursors and have in-line comments
21:22 timotimo unfortunately, the slides themselves are embedded as images rather than text
21:22 timotimo so copy/paste is not an option
21:23 timotimo er, actually, it's both slides *and* the text on the slides below it
21:23 timotimo that's acceptable
21:24 psch moritz: that's what i thought, which i why i frequently resort to asking questions
21:24 moritz psch: which is a good approach :-)
21:25 psch timotimo: alright, let's go through the slides together
21:26 timotimo can you click the "speech bubble" icon on the top right, so it'll show you as signed in?
21:26 psch oh, right
21:26 psch let me get the link out of the vm
21:33 timotimo a really big portion of the slides is ... gone
21:34 timotimo we need to do this differently i'm afraid
21:34 psch http://edumentab.github.io/rakudo-and-nqp-internals-course/ these is what i looked at a few times
21:35 timotimo that's the right one, aye
21:35 timotimo the first thing we may want to discuss is the "compile-time and runtime blur" on slide 12
21:36 timotimo since you mentioned a misunderstanding you had about creating a QAST tree to do error output
21:36 psch right
21:37 psch well, it worked-ish in the optimizer, since optimize returns an ast itself
21:37 timotimo normally, you do QAST composition to compile something to your VM's native code to be executed later
21:37 psch but obviously "replace the whole tree with a shorter one that throws an exception" isn't really how optimizing works
21:37 timotimo no :)
21:37 timotimo there is a legitimate use case for that exact thing, though
21:38 timotimo when we in-line blocks into their caller's tree, we can't just say "this block has disappeared", since the serialization context keeps a reference to it and if we just delete it, at compile time it'll complain that the block has gone
21:38 timotimo so we replace it with a block that nqp::die's with "optimized-out code being run! something went terribly wrong!"
21:38 timotimo anyway
21:38 FROGGS[mobile] joined #perl6
21:38 psch okay
21:39 timotimo in the case you were having, you wanted the compilation process to abort with an error, so that's why you throw an exception
21:39 timotimo interestingly, if you're doing an "eval", the exception is thrown from NQP code and lands in perl6-level code
21:40 timotimo well, it's not really an amazing thing, it's necessary even; you call lots of nqp-implemented stuff from perl6 code at some point and the exceptions should be able to freely pass the barrier between nqp-land and perl6-land
21:40 timotimo the big difference between nqp and perl6 at the QAST level really is just what subs and operators you call
21:41 psch right
21:41 diakopter well args are bundled and unbundled differently
21:41 timotimo do you have an overview over what slide 14 shows?
21:41 denis_boyun joined #perl6
21:41 btyler joined #perl6
21:41 timotimo diakopter: that's right, but that's just calling into a different binder :P
21:42 psch i'm really not seeing how "eval" is special in the above example, because in the end the optimizer also build an exception in nqp code, which can be caught... oh but it can only be caught if it's in an eval because otherwise compilation doesnt finish
21:42 sergot How to call inherited new() and then assign values to not inherited fields?
21:42 timotimo er ..
21:42 psch timotimo: "passing to perl6-land" means "can be interacted with in perl6 code", right?
21:43 timotimo yeah
21:43 psch timotimo: and the optimizer build a perl6 exception with nqp code, with find_symbol and whatnot
21:43 psch so what makes eval special in the example is letting us put the whole compilation process into the runtime
21:44 psch which lets much (everything?) nqp be handles on a perl6 level
21:44 psch *handled
21:44 timotimo i ... guess?
21:45 psch should this have been obvious or is it a weird way of looking at it..?
21:45 diakopter well have you used eval before in other languages?
21:46 timotimo well, really the special thing about the perl6 exception is that the code you're writing is NQP and you're instantiating a perl6 class
21:46 psch diakopter: of course, but i have never looked at any other languages internals, or actually thought about how the translation happens
21:46 diakopter oh
21:46 timotimo which is why you have to do the find_symbol thing; you're traversing the "world" of the program you've been compiling (or the context of the stuff you're compiling in, in case of a run-time eval)
21:47 timotimo it also means that you can lexically override exception classes that the compiler will create at compile-time, which is pretty crazy/scary
21:47 diakopter bo
21:47 diakopter no
21:47 timotimo it does not?
21:48 diakopter only js has lexical eval and nobody uses it because its so pessimizing
21:48 psch intuitively i'd think there's a difference between "looking through world" and "changing world"
21:48 timotimo diakopter: i think you may have misunderstood what i meant
21:48 moritz hey, hey, I changed the World today...
21:48 timotimo i mean class X::AdHoc { ... some crazy stuff ... }; eval 'some code that creates an X::AdHoc';
21:49 diakopter yeah
21:49 timotimo i shouldn't say "create". i should have said "instantiates"
21:51 diakopter r: class A { BEGIN EVAL 'say A' }
21:51 camelia rakudo-moar 535d91: OUTPUT«===SORRY!===␤Cannot invoke null object␤»
21:51 camelia ..rakudo-parrot 535d91, rakudo-jvm 535d91: OUTPUT«===SORRY!===␤No such method 'gist' for invocant of type 'A'␤»
21:51 diakopter r: class A { BEGIN EVAL 'print A' }
21:51 camelia rakudo-parrot 535d91: OUTPUT«===SORRY!===␤Nominal type check failed for parameter '$got'; expected Any but got A instead␤»
21:51 camelia ..rakudo-moar 535d91: OUTPUT«===SORRY!===␤Cannot invoke null object␤»
21:51 camelia ..rakudo-jvm 535d91: OUTPUT«===SORRY!===␤Nominal type check failed for parameter '$got'␤»
21:51 arnsholt joined #perl6
21:52 diakopter O_O
21:52 diakopter r: class A { EVAL 'print A' }
21:52 camelia rakudo-parrot 535d91: OUTPUT«use of uninitialized value of type A in string context  in block  at eval_0:1␤␤»
21:52 camelia ..rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«use of uninitialized value of type A in string context␤»
21:53 diakopter r: class A {}; EVAL 'print A'
21:53 camelia rakudo-parrot 535d91: OUTPUT«use of uninitialized value of type A in string context  in block  at eval_0:1␤␤»
21:53 camelia ..rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«use of uninitialized value of type A in string context␤»
21:54 diakopter r: class A {}; BEGIN EVAL 'print A'
21:54 camelia rakudo-parrot 535d91: OUTPUT«use of uninitialized value of type A in string context  in block  at eval_0:1␤␤»
21:54 camelia ..rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«use of uninitialized value of type A in string context␤»
21:54 diakopter *shrug*
21:55 timotimo that makes sense, though, doesn't it?
21:55 timotimo r: class A {}; BEGIN EVAL 'print A.new'
21:55 camelia rakudo-moar 535d91: OUTPUT«A<140001956467000>»
21:55 camelia ..rakudo-jvm 535d91: OUTPUT«A<851990465>»
21:55 camelia ..rakudo-parrot 535d91: OUTPUT«A<5562644992239816926>»
21:55 diakopter hahahhahahahahhahahahahahahahahaha
21:56 timotimo
21:56 diakopter I mean..
21:58 diakopter no the surprising one is the first try above
21:59 timotimo you mean the null object invocation?
21:59 diakopter yeah
22:00 timotimo ah well.
22:00 diakopter also "expected Any but got A instead"
22:00 timotimo perl6 isn't ready for production yet, obviously.
22:00 timotimo i suppose it got executed before it was composed
22:05 psch timotimo: my understanding of the items on slide 14 goes about as far as they are described there. as in, they're pretty black-boxy concepts
22:06 psch to be honest i'd rather postpone this though, i'm getting rather tired
22:07 lue Heh, I'm trying to do http://rosettacode.org/wiki/I_before_E_except_after_C, and I just discovered why some of my numbers are off: the given wordlist has meier and weierstrass :)
22:07 diakopter heh perl. http://www.windytan.com/2014/02/mystery-signal-from-helicopter.html
22:07 FROGGS joined #perl6
22:12 timotimo psch: no worries :)
22:13 psch i'm off then, g'night #perl6 o/
22:14 timotimo gnite!
22:14 raydiak good night
22:14 timotimo i just had my hand off one key on the right side and wrote fride instead m)
22:14 timotimo friede sei mit dir, mein freund!
22:27 bjz_ joined #perl6
22:31 denis_boyun joined #perl6
22:32 dalek rakudo-star-daily: a5a9a18 | coke++ | log/ (5 files):
22:32 dalek rakudo-star-daily: today (automated commit)
22:32 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/a5a9a18c87
22:32 dalek perl6-roast-data: a21f187 | coke++ | / (6 files):
22:32 dalek perl6-roast-data: today (automated commit)
22:32 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/a21f1871af
22:36 FROGGS joined #perl6
22:37 colomon joined #perl6
22:48 [Coke] all R* tests passed. \o/
22:51 lue \o/
22:52 timotimo \o/
22:55 dalek roast: 8ade4d7 | timo++ | S14-roles/parameterized-type.t:
22:55 dalek roast: bump the plan for S14-roles/parameterized-type.t
22:55 dalek roast: review: https://github.com/perl6/roast/commit/8ade4d7fcb
22:55 rurban1 joined #perl6
23:06 japhb_ joined #perl6
23:08 japhb joined #perl6
23:08 kaare_ joined #perl6
23:09 arnsholt joined #perl6
23:11 woolfy joined #perl6
23:14 araujo joined #perl6
23:15 arnsholt joined #perl6
23:29 denisboyun joined #perl6
23:36 arnsholt joined #perl6
23:40 tgt joined #perl6
23:56 xenoterracide joined #perl6

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

Perl 6 | Reference Documentation | Rakudo