Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-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
00:01 masak is November early enough to be before the Parrot IO debac^Wrefactor?
00:02 jnthn masak: I remember having to work around the stdin bug for my London Perl Workshop talk.
00:03 masak ...which was in November...
00:03 masak meaning I should probably look towards October.
00:04 jnthn sleep, 'night &
00:05 flussence b: .get; my $s = .slurp; $s ~~ /\x00/
00:05 p6eval b 922500: OUTPUT«Method 'get' not found for invocant of class ''␤  in main program body at line 22:/tmp/FgoRUgx0YO␤»
00:05 flussence b: given $*IN { .get; my $s = .slurp; say $s ~~ /\x00/ }
00:05 p6eval b 922500: OUTPUT«␤»
00:05 flussence there, a working version :P
00:06 masak good ol' b.
00:08 lue joined #perl6
00:10 masak November release of Rakudo seems to be working better, knock on wood.
00:10 * flussence ponders writing a Date class for niecza that uses terrifying amounts of qx[] internally
00:12 flussence .oO( class Date { method today { qx[rakudo -e 'say Date.today'] }; ... } )
00:13 masak lue: http://strangelyconsistent.org/blog/feed.atom should now be readable again. sorry for the inconvenience.
00:13 lue masak: it's fine, just thought I'd let you know (and apparently a really good reason I did)
00:15 masak lue: yeah, keep up the good reporting.
00:16 masak lue: anyway, I hope it worksforyou again.
00:16 Khisanth joined #perl6
00:16 lue yep, wfm again :)
00:17 masak \o/
00:17 masak lue++
00:17 masak Parrot--
00:20 diakopter rurban: how does p2 "support dynamic typing" more than jvm? are you simply saying that "variables" (registers? stack?) can store different types?
00:20 diakopter rurban: in both places, you have to build a type system
00:20 diakopter so I don't see the big distinction
00:23 masak if anyone asks, I'll be over here on Rakudo #58 Walnut, where IO works.
00:23 masak 'night, #perl6
00:23 diakopter 'nite
00:26 [Coke] joined #perl6
00:30 Khisanth joined #perl6
00:41 palakas_ joined #perl6
00:41 lue joined #perl6
00:53 benabik joined #perl6
00:58 Khisanth joined #perl6
01:07 * benabik appears to have fixed the NULL bug.
01:07 Khisanth joined #perl6
01:07 anuby joined #perl6
01:08 imarcusthis joined #perl6
01:13 benabik If anyone wants to try with parrot master, I'd be appreciative.  :-)
01:19 Util joined #perl6
01:19 hypolin joined #perl6
01:24 raiph joined #perl6
01:41 balders_dod joined #perl6
01:50 nnunley joined #perl6
01:55 kst` joined #perl6
01:57 Targen joined #perl6
02:22 baest_ joined #perl6
02:26 [Coke] Sure. give me a few moments.
02:39 Khisanth joined #perl6
02:42 [Coke] build fails: https://gist.github.com/4688763
02:51 FROGGS joined #perl6
02:58 colomon benabik++
03:11 colomon joined #perl6
03:17 Khisanth joined #perl6
03:44 [pp]sromanov joined #perl6
03:44 * benabik got pulled away by kiddo, back.
03:46 benabik [Coke]: That one's surprising to me, but looks unrelated to I/O issues...
03:49 benabik Hm.  compilation is much faster without that runaway process from my research.  :-D
03:51 DarthGandalf joined #perl6
03:52 dayangkun joined #perl6
03:59 alec__ joined #perl6
04:03 Khisanth joined #perl6
04:04 alec__1 joined #perl6
04:10 s1n joined #perl6
04:11 preflex joined #perl6
04:22 hulu joined #perl6
04:24 hulu map({say $^a},(1..6))
04:24 hulu helo
04:24 hulu why this no responce
04:27 hulu is anyone here?
04:29 japhb hulu, There are some people about,
04:29 japhb but not all of us are watching the channel at the moment.
04:29 japhb Were you looking for p6eval?
04:30 japhb r: map({say $^a},(1..6))
04:30 p6eval rakudo 9ec0a5: OUTPUT«1␤2␤3␤4␤5␤6␤»
04:31 hulu thx
04:32 hulu map(->$a,$b {say $a},(1..6))
04:32 hulu what means of ->$a,$b
04:33 japhb That means $a and $b are the names of the parameters of the following block
04:34 japhb The arrow is meant to indicate "inputs are going here"
04:34 japhb or even "input arguments are bound to these variables"
04:34 Khisanth joined #perl6
04:35 japhb hulu, BTW, it is idiomatic (and sometimes required) to put whitespace in more places than you have.
04:35 japhb You may find that trying to avoid spaces will cause parsing errors.  :-)
04:45 hulu japhb: thx
04:48 hulu map({say $^a; say @^others;},(a..e))
04:48 hulu why this can't run
04:49 timotimo r: 34 \ 5
04:49 p6eval rakudo 9ec0a5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/4DxqPTB8wv:1â�¤------> [32m34 [33mâ��[31m\ 5[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        statement endâ�¤        statement modifierâ�¤        statement modi…
04:50 timotimo r: 34 ± 5
04:50 p6eval rakudo 9ec0a5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/gHqmmRKC5Q:1â�¤------> [32m34 [33mâ��[31m± 5[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        statement endâ�¤        statement modifierâ�¤        statement modi…
04:50 timotimo r: 34 ~~~ 5
04:50 p6eval rakudo 9ec0a5:  ( no output )
04:50 timotimo oh, that exists? probably multiple prefix:<~>
04:51 colomon r: 34~~~5
04:51 p6eval rakudo 9ec0a5:  ( no output )
04:51 colomon r: 34~~ ~5
04:51 p6eval rakudo 9ec0a5:  ( no output )
04:51 colomon r: say 34~~ ~5
04:51 p6eval rakudo 9ec0a5: OUTPUT«False␤»
04:51 colomon r: say 34~~~5
04:51 p6eval rakudo 9ec0a5: OUTPUT«False␤»
04:51 colomon r: say "5"~~~5
04:51 p6eval rakudo 9ec0a5: OUTPUT«True␤»
04:51 hulu r: map({say $^a; say @^others;},(a..e))
04:51 p6eval rakudo 9ec0a5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    a used at line 1â�¤â�¤Â»
04:51 colomon r: say "5" ~~~ 5
04:51 p6eval rakudo 9ec0a5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/Ry7NNWZT9y:1â�¤------> [32msay "5" ~[33mâ��[31m~~ 5[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤Â»â€¦
04:52 colomon r: say "5" ~~~5
04:52 p6eval rakudo 9ec0a5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/qduyrLgH79:1â�¤------> [32msay "5" ~[33mâ��[31m~~5[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤Â»â€¦
04:52 colomon r: say "5"~~~5
04:52 p6eval rakudo 9ec0a5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/0OwHFbpeFF:1â�¤------> [32msay "5"~[33mâ��[31m~~5[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤Â»â€¦
04:52 colomon r: say "5" ~~~ 5
04:52 p6eval rakudo 9ec0a5: OUTPUT«True␤»
04:52 colomon stupid extra characters my irc client throws in sometimes...
04:52 hulu japhb: hi, why map({say $^a; say @^others;},(a..e)) can't run
04:53 japhb r: map({say $^a; say *@^others;},(a..e))
04:53 p6eval rakudo 9ec0a5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/xAkRoyN1G6:1â�¤------> [32mmap({say $^a; say *[33mâ��[31m@^others;},(a..e))[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        statement endâ�¤        statement …
04:53 * timotimo was just trying to see if rakudo is going ot suggest routines if a infix/prefix/postfix doesn't exist
04:53 timotimo seems okay, the way it is now. good.
04:54 japhb r: map {say $^a; say *@^others}, a..e
04:54 p6eval rakudo 9ec0a5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/kIOBkyyQwu:1â�¤------> [32mmap {say $^a; say *[33mâ��[31m@^others}, a..e[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        statement endâ�¤        statement mod…
04:56 japhb r: map -> $a, *@others {say $a; say @others}, 'a'..'e'
04:56 p6eval rakudo 9ec0a5: OUTPUT«a␤␤b␤␤c␤␤d␤␤e␤␤»
04:57 japhb hulu: ^
04:57 hulu japhb: why
04:58 japhb hulu, two things: you forgot to quote the letters in the range, and slurpy doesn't work with implicit arguments
04:59 japhb Oh, and silly me, I forgot that slurpy is ignored when figuring out how many arguments map should supply to the block.
04:59 japhb So it's only ever filling $a, heh
04:59 japhb But:
05:00 japhb r: (-> $a, *@others {say $a; say @others})('a'..'e')
05:00 p6eval rakudo 9ec0a5: OUTPUT«"a".."e"␤␤»
05:00 japhb r: (-> $a, *@others {say $a; say @others})(('a'..'e').list)
05:00 p6eval rakudo 9ec0a5: OUTPUT«a b c d e␤␤»
05:00 alec__ joined #perl6
05:00 japhb Interesting!
05:01 japhb r: (sub ($a, *@others) {say $a; say @others})(('a'..'e').list)
05:01 p6eval rakudo 9ec0a5: OUTPUT«a b c d e␤␤»
05:01 japhb r: (-> $a, *@others {say $a; say @others})(|'a'..'e')
05:01 p6eval rakudo 9ec0a5: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<|>' called (lines 1, 1)␤»
05:01 japhb r: (sub ($a, *@others) {say $a; say @others})(|('a'..'e'))
05:01 p6eval rakudo 9ec0a5: OUTPUT«a␤b c d e␤»
05:01 japhb Wow, I'm really tired tonight, clearly
05:02 japhb r: (-> $a, *@others {say $a; say @others})(|('a'..'e'))
05:02 p6eval rakudo 9ec0a5: OUTPUT«a␤b c d e␤»
05:02 kaleem joined #perl6
05:02 japhb Yeah, there we go, that's what I was trying to say
05:06 hulu japhb: thx
05:12 hulu r:map -> $a, *@others {say $a; say @others}, 'a'..'e'
05:12 hulu r: map -> $a, *@others {say $a; say @others}, 'a'..'e'
05:12 p6eval rakudo 9ec0a5: OUTPUT«a␤␤b␤␤c␤␤d␤␤e␤␤»
05:16 hulu r: map (-> $a, *@others {say $a; say @others})('a'..'e')
05:16 p6eval rakudo 9ec0a5: OUTPUT«"a".."e"␤␤Cannot call 'map'; none of these signatures match:␤:(&code, *@values)␤␤  in block  at /tmp/N2rjr3JNJJ:1␤␤»
05:16 hulu r: (-> $a, *@others {say $a; say @others})('a'..'e')
05:16 p6eval rakudo 9ec0a5: OUTPUT«"a".."e"␤␤»
05:21 Khisanth joined #perl6
05:22 hulu japhb: why map({ [ $x, @^others ] }, ('a'..'e')) can with @^others
05:26 * geekosaur not even sure what was asked there
05:26 hulu r: $x='v';map({ [ $x, @^others ] }, ('a'..'e'))
05:26 p6eval rakudo 9ec0a5: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable '$x' is not declaredâ�¤at /tmp/NKeM1gZzVM:1â�¤------> [32m$x[33mâ��[31m='v';map({ [ $x, @^others ] }, ('a'..'e'[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
05:27 hulu r: my $x='v';map({ [ $x, @^others ] }, ('a'..'e'))
05:27 p6eval rakudo 9ec0a5:  ( no output )
05:27 geekosaur r: my $x='v';say map({ [ $x, @^others ] }, ('a'..'e'))
05:27 p6eval rakudo 9ec0a5: OUTPUT«v a v b v c v d v e␤»
05:29 hulu geekosaur: why @^others
05:29 geekosaur er, "others"is just a random name, nothing magical
05:30 hulu r: my $x='v';say map({ [ $x, @^others ] }, ('a'..'e'))
05:30 p6eval rakudo 9ec0a5: OUTPUT«v a v b v c v d v e␤»
05:31 geekosaur in the pointy block example (which the above is *not*), what made it special was not the name "others" but the specification "*@name" which in a signature is a slurpy argument (i.e. eats everything else available into the list)
05:31 hulu r: my $x='v';say map({ [ $x, @^kkk ] }, ('a'..'e'))
05:31 p6eval rakudo 9ec0a5: OUTPUT«v a v b v c v d v e␤»
05:31 geekosaur note that you do not have a signature in the stuff you;re playing with so it won't work there
05:36 hulu r:my $x='v'; say map({[$x,@^a]},('a'..'e'))
05:36 geekosaur need the space after the colon.  "r: ..."
05:36 hulu r:my $x='v'; say map({[$x,@^a]}, ('a'..'e'))
05:37 geekosaur don't want the bot to trigger because someone started talking about r::myfunc or something
05:37 geekosaur colon, not comma.  "r: ..."
05:37 hulu r: my $x='v'; say map({[$x,@^a]},('a'..'e'))
05:37 p6eval rakudo 9ec0a5: OUTPUT«v a v b v c v d v e␤»
05:38 hulu geekosaur: ths
05:38 hulu geekosaur: thx
05:44 Khisanth joined #perl6
05:47 hulu r: map(->$a,$b {say $a},(1..6))
05:47 p6eval rakudo 9ec0a5: OUTPUT«1␤3␤5␤»
05:48 hulu r: map -> $a, *@others {say @others}, 'a'..'e'
05:48 p6eval rakudo 9ec0a5: OUTPUT«␤␤␤␤␤»
05:48 TimToady huh
05:49 TimToady r: map -> $a, *@others {say @others}, ('a'...'e')
05:49 p6eval rakudo 9ec0a5: OUTPUT«␤␤␤␤␤»
05:50 TimToady I suspect this might be a rakudobug
05:50 TimToady it's probably using introspection to determine the arity, and ignoring the slurpy arg
05:50 TimToady eventually we'd like to get to more of a partial-binding model, and then it would work right
05:51 geekosaur n: map -> $a, *@others {say @others}, ('a'...'e')
05:51 p6eval niecza v24-18-gaf64300: OUTPUT«Potential difficulties:â�¤  $a is declared but not used at /tmp/SfBpTtDpus line 1:â�¤------> [32mmap -> [33mâ��[31m$a, *@others {say @others}, ('a'...'e')[0mâ�¤â�¤Â»
05:51 TimToady r: say -> $a, *@others {say @others}.arity
05:51 p6eval rakudo 9ec0a5: OUTPUT«1␤»
05:52 TimToady in cases like these there should be a backchannel from the binder that says "I matched N args, save the rest for next time"
05:53 TimToady or more likely, no N involved, just returns a list tail for the next iteration's use
05:54 moritz \o
05:54 TimToady the ability to reference a list's tail is slightly more problematic when lists aren't represented as pure cons lists as they are in Lisp
05:55 TimToady so it's one of those hard things we haven't quite got nailed down
05:57 TimToady moritz: I don't quite understand why / can't be pure even if it's creating Rats
05:58 moritz TimToady: me neither, TBH
05:58 moritz TimToady: I think it could be, but the optimizer tries its hand on the setting, and runs into something bootstrappy, I think
05:59 * TimToady still thinks we'll probably end up with another level of bootstrap for such reasons...
05:59 TimToady it's kinda like trying to construct a single-stage-to-orbit rocket otherwise
05:59 moritz maybe a bit experimenting with it that's not past my biological bed time might reveal what#s going on :-)
06:00 moritz s/'#'/\'/
06:01 TimToady it seems to be that it's probably of biological origin that you are up :)
06:02 moritz no, that's just the usual $work and $daughter's-daycare routine
06:02 TimToady your daughter is not biological? :)
06:03 moritz she is, her daycare facility is... well, a facility :-)
06:03 TimToady perhaps they should think about employing some...humanoids...there...
06:04 TimToady anyway, guten morgen
06:04 moritz :-)
06:05 Khisanth joined #perl6
06:17 hulu my $x='v';say map({ [ $x, @^others ] }, ('a'..'e'))
06:17 hulu r: my $x='v';say map({ [ $x, @^others ] }, ('a'..'e'))
06:17 p6eval rakudo 9ec0a5: OUTPUT«v a v b v c v d v e␤»
06:18 TimToady say ('a'..'e')[0] ~~ Positional
06:18 hulu geekosaur: why my $x='v';say map({ [ $x, @^others ] }, ('a'..'e')) with @^others '@'
06:18 TimToady r: say ('a'..'e')[0] ~~ Positional
06:18 p6eval rakudo 9ec0a5: OUTPUT«False␤»
06:18 TimToady I guess it's not checking the @ on binding
06:18 TimToady so, a different rakudobug
06:19 geekosaur hulu, I'm not sure, are you asking why the @?  it indicates a list
06:20 geekosaur and it should probably be failing because it's getting a scalar
06:20 geekosaur (hence, rakudobug)
06:20 geekosaur n: my $x='v';say map({ [ $x, @^others ] }, ('a'..'e'))
06:20 p6eval niecza v24-18-gaf64300: OUTPUT«Unhandled exception: Nominal type check failed in binding '@others' in 'ANON'; got Str, needed Positional␤  at /tmp/jZN5BNkA8m line 0 (ANON @ 1) ␤  at <unknown> line 0 (KERNEL map @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2425 (GatherIterator.re…
06:20 geekosaur right
06:20 Khisanth joined #perl6
06:21 hulu n: my $x='v';say map({ [ $x, @^others ] }, ('a'..'e'))
06:21 dayangkun joined #perl6
06:21 p6eval niecza v24-18-gaf64300: OUTPUT«Unhandled exception: Nominal type check failed in binding '@others' in 'ANON'; got Str, needed Positional␤  at /tmp/ww7mNz245f line 0 (ANON @ 1) ␤  at <unknown> line 0 (KERNEL map @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2425 (GatherIterator.re…
06:21 TimToady that's the sort of error rakudo should be giving, but isn't
06:22 geekosaur hulu, I think you may still be confused about what japhb was doing with the pointy block (-> $a, *@others {BLOCK}); it was declaring that the block takes a fixed scalar parameter to be referred to as "$a" and an indefinitely sized list that sucks up everything else available, to be called "@others".
06:23 geekosaur it's a kind of anonymous subroutine
06:23 geekosaur or function if you prefer
06:23 TimToady which shows a different bug
06:23 hulu geekosaur: why use @^others ,not $^others
06:24 geekosaur the names aren't special; what is special is $ is scalar, @ is list, and *@ in a signature is a slurpy list (= take everything available)
06:24 geekosaur and as niecza is teling you and rakudo isn't, you do NOT want a list there
06:24 TimToady well, but what if hulu *does* want a list there, hence "others"?
06:25 geekosaur that said, I think $^others would fail as well because map wants a single parameter
06:25 TimToady yes, you can't get the slurpy semantics of "others" without the *
06:25 hulu n: my $x='v';say map({ [ $x, $^others ] }, ('a'..'e'))
06:25 p6eval niecza v24-18-gaf64300: OUTPUT«v a v b v c v d v e␤»
06:26 hulu why $^others same as @^others
06:26 TimToady and you can only put the slurpy * in an official signature
06:26 geekosaur hulu, because rakudo has a bug
06:26 TimToady all things are scalars by default in Perl 6, including containers
06:26 TimToady you have to do something special to get them to act like containers
06:27 geekosaur niecza is doing the right thing and cpomplaining if you use @^others (which means it wants a list, but map is passing each scalar in the list separately)
06:27 geekosaur rakudo is for some reason letting it go...
06:28 TimToady I guess my question is, if you really want to bind all of the elements of the list, why are you using map, and not just a normal call to a function with a signature?
06:30 moritz three errors in the constant-folding branch
06:30 TimToady three is a constant, so you can fold that too
06:30 moritz that is, three spectest files aborting
06:33 moritz one is a construct that uses  1 div 0  to generate an exception
06:34 moritz the others seems to be something where a named argument accidentally becomes positional
06:36 moritz ah, might be easy to fix
06:37 moritz named arguments aren't constructed a Pairs, but as ordinary QAST node with .named($name) in addition
06:37 moritz so it's hopefully just a matter of adding the .named to the generated value
06:38 hulu r: my $x='v';say map({ [ $x, @^others ] }, ('a'..'e'))
06:38 p6eval rakudo 9ec0a5: OUTPUT«v a v b v c v d v e␤»
06:38 hulu r: my $x='v';say map({ [ $x, $^others ] }, ('a'..'e'))
06:38 p6eval rakudo 9ec0a5: OUTPUT«v a v b v c v d v e␤»
06:38 hulu n: my $x='v';say map({ [ $x, $^others ] }, ('a'..'e'))
06:38 p6eval niecza v24-18-gaf64300: OUTPUT«v a v b v c v d v e␤»
06:38 hulu n: my $x='v';say map({ [ $x, @^others ] }, ('a'..'e'))
06:38 p6eval niecza v24-18-gaf64300: OUTPUT«Unhandled exception: Nominal type check failed in binding '@others' in 'ANON'; got Str, needed Positional␤  at /tmp/sEqT81Wwoy line 0 (ANON @ 1) ␤  at <unknown> line 0 (KERNEL map @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2425 (GatherIterator.re…
06:39 TimToady in most compilers, something like 1 div 0 will just be replaced by code that throws that exception if it's actually executed
06:40 TimToady whether it should warn about that at compile time might depend on whether we can show that it is unreachable code
06:42 TimToady or if we delay the warning till after unreachable code is deleted, then if 0 { 1 dif 0 } just kind of disappears before the pass that looks for "will throw exception" warnings
06:43 TimToady or we could just make people write "eval '1 div 0'" if they mean that
06:43 geekosaur https://plus.google.com/u/0/102208​456519922110915/posts/DZsZ6mvA4T6
06:47 dayangkun joined #perl6
06:52 TimToady or just 1 div ($*PID - $*PID) or so
06:53 hulu geekosaur: why my $t = Net::Twitter->new() use -> why not .
06:53 geekosaur er?  perl6 doesn't use -> that way any more
06:54 TimToady hulu, you must be looking at some Perl 5 code
06:54 hulu https://github.com/perl6/perl6-exam​ples/blob/master/bin/twitter2irc.pl
06:54 hulu look at 72 row
06:54 TimToady yes, that is Perl 5 coe
06:54 TimToady *code
06:54 geekosaur why use a 2-character operator for something common?  so concatenation was moved to ~ and . was reclaimed for method calls
06:55 * geekosaur running a bit behind, still loading...
06:56 geekosaur I don';t think we have POE on perl 6 yet :)
06:56 geekosaur so that's plain old perl5 code
06:57 diakopter r: my \foo
06:57 p6eval rakudo 9ec0a5: OUTPUT«===SORRY!===␤Method 'ast' not found for invocant of class 'NQPMu'␤»
06:58 diakopter _._.
06:59 hulu TimToady geekosaur : thex
06:59 hulu TimToady geekosaur : thx
07:00 TimToady hulu: as a linguist, I am wondering what your native language is
07:00 hulu chinese
07:00 TimToady cool
07:00 hulu my english is poor
07:01 hulu thx a lot
07:01 TimToady well, happy new year in a few days
07:01 hulu yes chunjie
07:02 TimToady you should speak 中文 with masak when he is on
07:02 hulu 你好 masak
07:03 TimToady 睡着, probably
07:04 TimToady or 睡眠 maybe
07:04 hulu 睡觉
07:05 TimToady okay, thanks
07:05 TimToady 谢谢, I should say :)
07:06 hulu hehe
07:07 TimToady 哈哈
07:08 hulu bye bye
07:08 * TimToady only really knows some 日本語...
07:10 user joined #perl6
07:11 user std: say helo
07:11 p6eval std 7deb9d7: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'helo' used at line 1�Check failed�FAILED 00:00 41m�»
07:11 user std: say 'helo'
07:11 p6eval std 7deb9d7: OUTPUT«ok 00:00 42m␤»
07:11 FROGGS TimToady: short question, if -e '$( 1 )' and -e '"$( 1 )"' bot call circumfix:sym<sigil>($( 1 )), why does -e '/$( 1 )/' calls postcircumfix:sym<( )>(( 1 )) instead?
07:12 FROGGS TimToady: I would expect to see circumfix:sym<sigil> for all three, when running ./viv -e ... for example
07:13 TimToady probably a bug
07:13 FROGGS cool, okay, thanks
07:13 diakopter std: \my &my ^my ::my $my /my %my *my @my >my (my ).my =my ::My \MY :=my ::mY (my [My ]).my +my $mY -MY
07:14 p6eval std 7deb9d7: OUTPUT«ok 00:00 47m␤»
07:14 FROGGS TimToady: maybe I'll supply a fix later today
07:14 diakopter TimToady: ^^
07:15 TimToady well, it said it was okay, so what's the problem?  :)
07:17 diakopter std: \my &my ^my ::my $my /my %my *my @my >my (my ).my =my ::My \MY :=my ::mY (my [My ]).my +my $mY -MY -my-<my &my >.MY
07:17 p6eval std 7deb9d7: OUTPUT«ok 00:00 48m␤»
07:18 TimToady FROGGS: see the note that says: # Note: $() can also parse as contextualizer in an expression; should have same effect
07:18 diakopter rn: \my &my ^my ::my $my /my %my *my @my >my (my ).my =my ::My \MY :=my ::mY (my [My ]).my +my $mY -MY -my-<my &my >.MY
07:18 p6eval niecza v24-18-gaf64300: OUTPUT«[31m===[0mSORRY![31m===[0m��GLOBAL::my does not name any package at /tmp/MdkJT2jnsU line 1:�------> [32m\my &my ^my ::my[33m�[31m $my /my %my *my @my >my (my ).my =my ::[0m��A type must be provided at /tmp/MdkJT2jnsU line 1:�------> [32m\my &my ^m…
07:18 p6eval ..rakudo 9ec0a5: OUTPUT«===SORRY!===␤Cannot type check against type variable my␤»
07:18 TimToady it's possible we should do it all through <variable>, and throw out the circumfix versions
07:19 TimToady rather than having two code paths
07:25 quester joined #perl6
07:26 FROGGS TimToady: that sounds reasonable, will try to do that in STD and nom
07:29 diakopter std: \my &my ^my ::my $my /my %my *my @my >my (my ).my =my ::My \MY :=my ::mY (my [My ]).my +my $mY -MY -my-<my &my >.MY ^^My +&MY |mY <MY ??My !!mY Z?@my += My &&MY ,mY ;MY
07:29 p6eval std 7deb9d7: OUTPUT«ok 00:01 49m␤»
07:31 diakopter no clue what (my ) means
07:35 diakopter can't fit a single colon
07:42 dayangkun joined #perl6
07:46 moritz std: my: 42
07:46 p6eval std 7deb9d7: OUTPUT«ok 00:00 41m␤»
07:46 moritz diakopter: as a label :-)
07:47 moritz std: :my
07:47 p6eval std 7deb9d7: OUTPUT«ok 00:00 41m␤»
07:47 moritz or as a colonpair
07:47 diakopter oh heh
07:47 diakopter I guess I could've tried
07:47 diakopter instead of merely imagining with my solid lack of Perl 6 knowledge
07:48 diakopter :)
07:48 moritz std: /:my $ = :my;/
07:48 p6eval std 7deb9d7: OUTPUT«ok 00:00 43m␤»
08:06 brrt joined #perl6
08:08 FROGGS joined #perl6
08:22 domidumont joined #perl6
08:40 dayangkun joined #perl6
08:41 quester left #perl6
08:43 domidumont joined #perl6
08:51 Liz joined #perl6
09:03 erkan joined #perl6
09:03 erkan joined #perl6
09:06 hoelzro morning #perl6
09:10 sjn o/
09:12 dayangkun joined #perl6
09:18 dakkar joined #perl6
09:29 hulu joined #perl6
09:30 hulu helo mazak
09:31 hulu helo masak
09:33 fhelmberger joined #perl6
09:35 moritz \o
09:38 FROGGS o/
09:44 Psyche^ joined #perl6
09:59 jnthn morning o/
09:59 diakopter o/
10:00 FROGGS hi all you happy perl 6 people :o)
10:02 jnthn TimToady: Maybe you could spec or define the partial binding in some more detail. Every time I've thought about it, it seems that it leads to making an already complex bit of code on a hot path even more complex (the binder), and is likely to make performance of map worse.
10:04 * brrt is sorry to have missed part of that discussiong
10:04 jnthn TimToady: Things like, if you're doing this kind of bind, can we say you're only allowed to have a signature with positional things and no named things? Does a non-matched type check on an optional parameter cause a bind failure, or just to stop swallowing elements? etc.
10:04 cognominal joined #perl6
10:05 jnthn TimToady: And also how it looks. Maybe the answer is that it doesn't tell you how much it ate but just calls munch BUT that means we can't do the "we munched a vlaue but didn't meet they type constraint" thing as there's probably not a way to un-munch...
10:11 jnthn [Coke]: The error you got looks like a very new NQP used with a less-new Rakudo
10:13 risou joined #perl6
10:13 yeltzooo joined #perl6
10:13 masak joined #perl6
10:13 odoacre joined #perl6
10:13 TimToady joined #perl6
10:13 prammer joined #perl6
10:13 patspam joined #perl6
10:13 jtpalmer joined #perl6
10:13 masak good forenoon, #perl6
10:14 diakopter masak: hoydw
10:14 masak lleoh.
10:15 diakopter is there a tool to search a whole git history for source code snippets?
10:15 brrt hi masak
10:15 moritz diakopter: I usually just do a   git log -p  and then use less' search
10:16 masak diakopter: I would... what moritz said. :)
10:17 masak diakopter: theoretically, you should also be able to filter out all blobs, and then list their contents.
10:18 masak by the way, "humanoids at the daycare facility" would make a great name for a rock band.
10:21 diakopter yikes, 30MB
10:22 dalek rakudo/constant-folding: 92c30bc | moritz++ | src/core/terms.pm:
10:22 dalek rakudo/constant-folding: reverse order of <perl vendor site> dirs in @*INC
10:22 dalek rakudo/constant-folding:
10:22 dalek rakudo/constant-folding: we do not have to repeat all of the mistakes Perl 5 has made.
10:22 dalek rakudo/constant-folding: nwc10++
10:22 moritz that's the branch nom -> constant-folding merge
10:22 dalek joined #perl6
10:24 moritz you might be interested in https://github.com/rakudo/rakudo/commit/​14c9305e40c2737156ab657a3822001bc72f710a
10:24 moritz :-)
10:25 masak hulu: 你好 :)
10:26 diakopter moritz: I'll see your say and raise you a printf
10:26 jnthn moritz: oooh :)
10:26 jnthn moritz++
10:30 diakopter moritz: could you do?:  if try { stuff; 1 } { $*W.add_object($ret_value); etc.}
10:31 diakopter nqp: say((try { die }).HOW)
10:31 p6eval nqp: OUTPUT«get_string() not implemented in class 'NQPClassHOW'␤current instr.: '' pc 825 (src/stage2/gen/NQPCORE.setting.pir:376) (src/stage2/NQPCORE.setting:404)␤»
10:31 diakopter nqp: say((try { die }).WHAT)
10:31 p6eval nqp: OUTPUT«␤»
10:32 diakopter hmm
10:32 diakopter masak: a few fun possible bugs in teh backlog
10:33 jnthn nqp doesn't do a Str/gist distinction so .WHAT will produce the empty string.
10:33 diakopter nqp: say((try { die }) ?? "success" !! "fail")
10:33 jnthn I'm not planning to change that.
10:33 p6eval nqp: OUTPUT«fail␤»
10:34 diakopter ... did I suggest you change it?
10:35 jnthn diakopter: Well, reporting a bug would suggest you expect it to ;-)
10:35 nwc10 the docs might need to change?
10:35 diakopter what made you think I was reporting a bug?
10:35 jnthn diakopter: Well, you suggested masak submit some. I was more writing it for his consideration than yours.
10:35 diakopter "masak: a few fun possible bugs in teh backlog" was referring to the backlog. when masak wasn't here.
10:36 jnthn diakopter: oh.
10:36 jnthn diakopter: I'm...not sure I was gonna figure that given the immediate context :)
10:36 diakopter ok, sry
10:38 masak I skimmed the backlog, but didn't find any fun bugs.
10:38 masak maybe I'll look again.
10:39 diakopter r: my \foo
10:39 p6eval rakudo 9ec0a5: OUTPUT«===SORRY!===␤Method 'ast' not found for invocant of class 'NQPMu'␤»
10:39 moritz jnthn: what do you think about merging the constant folding stuff?
10:40 jnthn r: my \foo = 42
10:40 p6eval rakudo 9ec0a5:  ( no output )
10:40 jnthn std: my \foo
10:40 p6eval std 7deb9d7: OUTPUT«[31m===[0mSORRY![31m===[0m�Term definition requires an initializer at /tmp/3lhUolBHoz line 1 (EOF):�------> [32mmy \foo[33m�[31m<EOL>[0m�Check failed�FAILED 00:00 41m�»
10:40 jnthn Hm, wonder if it's a missing check
10:41 diakopter also, LTA error message on my tons-of-mys line noise art.  (kidding)
10:42 diakopter masak: I guess it was just that one
10:42 jnthn moritz: Just read over the complete additions to Optimizer and it looks sane to me.
10:43 moritz so, merging?
10:43 jnthn moritz: +1 from me
10:43 nwc10 curious - can the speedup be measured?
10:44 moritz I haven't tried it
10:44 nwc10 :-)
10:44 moritz but since it inlines all routines marked as 'is pure' with constant-known argument lists, it's easy to construct a benchmark that'll show it
10:45 nwc10 that would be cool
10:45 moritz sub heavy() is pure { # do something slow }; heavy() for 1..1000;
10:45 nwc10 'cos like many of these things, there's a benefit to some use cases, and a small cost to everyone else (at compile time)
10:45 diakopter but of course, if you want your whole pure program to run at compile time... and it's long-running....
10:46 diakopter might be pessimized a lot
10:46 * masak submits diakopter's rakudobug
10:47 diakopter oh yeah, there were some TimToady mentioned
10:47 diakopter when chatting with hulu
10:47 jnthn Well, if the program is *so* pure that the optimizer can reduce it to a single value... :)
10:47 diakopter sure, like fib
10:48 jnthn moritz: Did .. get marked as pure, ooc?
10:48 moritz jnthn: no
10:48 jnthn moritz: May be appropriate...maybe :)
10:48 jnthn moritz: Given Range is immutable.
10:49 moritz jnthn: so far I've only marked a few random ops as pure
10:49 jnthn OK
10:50 masak r: my $range = 4..5; say $range; $range.shift; say $range
10:50 p6eval rakudo 9ec0a5: OUTPUT«4..5␤No such method 'shift' for invocant of type 'Range'␤  in block  at /tmp/z8OP1yFU6q:1␤␤»
10:50 masak :)
10:50 masak b: my $range = 4..5; say $range; $range.shift; say $range
10:50 p6eval b 922500: OUTPUT«4 5␤Method 'shift' not found for invocant of class 'Range'␤  in main program body at line 22:/tmp/Gmpf_SLsfP␤»
10:50 masak alpha: my $range = 4..5; say $range; $range.shift; say $range
10:50 masak ENOALPHA
10:53 * masak enjoys TimToady trying to derive the Chinese word for "asleep" from his knowledge of Japanese in the backlog :)
10:54 moritz nwc10: http://perlpunks.de/paste/show/510b9ec1.7dbb.2c4
10:54 dalek nqp: 5233c6d | jnthn++ | src/ (2 files):
10:54 dalek nqp: Make nqp::clone use repr_clone.
10:54 dalek nqp:
10:54 dalek nqp: This means it will work with 6model objects. Also note that repr_clone
10:54 dalek nqp: has also been taught to deal with Parrot objects, but in a fully 6model
10:54 dalek nqp: implementation (like we have on JVM) such a code path is not needed.
10:54 dalek nqp: review: https://github.com/perl6/nqp/commit/5233c6d3e7
10:54 dalek nqp: aaf85c3 | jnthn++ | src/core/NQPRoutine.pm:
10:54 dalek nqp: Some pir:: => nqp:: replacements.
10:54 dalek nqp: review: https://github.com/perl6/nqp/commit/aaf85c3e94
10:54 moritz not quite the benchmark you wanted, because I was too lazy to recompile a rakudo without constant folding
10:55 jnthn moritz: Wait, it took longer with "is pure"?
10:55 nwc10 that's showing that it's slower with 'is pure'?
10:55 hulu helo
10:55 jnthn moritz: Or was "with" a typo for "without"? :)
10:55 moritz dammit, that should have been 'without "is pure"'
10:55 moritz sorry for the confusion
10:55 nwc10 ah OK
10:56 hulu what's means my(@_classData)=('aaa','bbb','ccc');
10:56 jnthn It means you're calling the function my, which is probably not what you wish to do...
10:56 SmokeMachine joined #perl6
10:56 moritz it declares a variable called @_classData and assigns a list of trhee values to it
10:56 moritz oh :-)
10:56 moritz listen to jnthn, not me
10:56 jnthn It also means you're typing a lot of parens ;-)
10:57 jnthn r: my @c = 'aaa','bbb','ccc'; say @c
10:57 p6eval rakudo 9ec0a5: OUTPUT«aaa bbb ccc␤»
10:58 masak hulu: helo, helo! 很高兴终于见到你了。
10:58 hulu masak: 你好
10:58 masak :D
10:59 hulu jnthn: what's means @_classData
10:59 masak hulu: 我不能写。我使用谷歌翻译。
10:59 masak hulu: that's just an array.
10:59 masak hulu: like @foo
10:59 hulu why use _classData
11:00 masak that's just a name.
11:00 hulu thx
11:00 masak maybe someone meant the underscore to mean 'for internal use'.
11:00 masak but that's convention, not specification.
11:00 hulu thx
11:00 hulu masak: 我去吃点饭
11:01 masak have fun :)
11:01 masak om nom nom
11:01 arnsholt o/
11:01 masak it's only lunchtime here ;)
11:05 Su-Shee_ joined #perl6
11:09 arnsholt jnthn: Since Rakudo's NativeHOW is used both for ints and floats, I guess the nativesize parameter should just be passed as both an integer and float bit size?
11:09 diakopter I take it pure also assumes deterministic, as in no usage of PRNG or other reading IO (that's not really a side-effect)
11:09 arnsholt Or would you prefer something else?
11:10 moritz diakopter: correct
11:10 jnthn arnsholt: No, "number of bits" was how I'd imagined it.
11:10 snobby joined #perl6
11:10 snobby joined #perl6
11:11 jnthn arnsholt: Oh, I see what you mean...how does it know what to put in compose...
11:11 jnthn Hm. :)
11:11 lizmat is "pure" comparable to "memoizable" ?
11:11 jnthn I guess filling both kinda works...
11:11 arnsholt The quick hack solution is to pass both <integer><bits> and <float><bits>
11:11 moritz lizmat: yes
11:12 cognominal joined #perl6
11:13 lizmat me wonders whether "is memoizable" wouldn't be a better phrase than "is pure"
11:13 masak depending on how strictly you apply "pure". do private updates (such as caching) count? memoization itself is memoizable but not (strictly) pure. :)
11:13 lizmat especially for people coming from p5  :-)
11:13 masak lizmat: "is memoizable" feels a bit long. and hard-ish to spell.
11:13 lizmat "is memo"  ?
11:13 masak lizmat: maybe "is memable" would do. but I don't know if that's too cute.
11:14 hoelzro memorable? ;)
11:14 tadzik didn't we already have that?
11:14 tadzik memoization
11:14 masak in fact, I dunno if "-able" conveys a strong enough instruction, from the viewpoint of the reader.
11:16 flussence we could just steal postgres' terminology - "is immutable"
11:16 lizmat but that is not correct, is it?
11:16 flussence probably not :)
11:16 lizmat we just want to express that on a given set of inputs, only one output is to be expected, no?
11:16 jnthn lizmat:I think you're thinking of "is cached"
11:17 hoelzro ah, that's it.
11:17 jnthn "is cached" keeps track of a hash mapping the incoming capture to the results.
11:17 jnthn Which is different from "is pure" which means "if we know the args statically it's safe to assume we can call this statically"
11:18 jnthn That is, at compile time.
11:18 masak oh!
11:18 masak yes, then they're really different.
11:18 jnthn "is cached" is free to have side-effects so long as you can cope with them only happening once per incoming capture :)
11:18 lizmat ah, so it only applies at compile time?  "is pure" only has an effect at compile time?
11:18 jnthn lizmat: It's a hint to the optimizer that it can constant fold the operation.
11:19 jnthn And that if it does, the user can't complain about it doing so :)
11:19 jnthn (And yes, the optimizer runs at compile time, just after CHECK time and before code-gen)
11:19 lizmat ok, gotcha:
11:20 lizmat so "is cached" is run time only, or also at compile time
11:20 jnthn Run time only (unless you somehow manage to call the thing at compile time, like doing so explicitly in a BEGIN)
11:21 jnthn I guess you could also mark something as "is pure" *and* "is cached" but I can't think of a use case right off.
11:21 * masak likes the nomenclature, having understood it
11:21 kresike joined #perl6
11:21 kresike hello all you happy perl6 people
11:21 brrt hi kresike
11:21 hoelzro md5sum would be pure, and could be cached as well
11:21 tadzik hello kresike
11:22 hoelzro (that's the best example I can think of at the moment)
11:22 flussence is-prime?
11:22 * tadzik grumbles
11:22 hoelzro is-prime is good
11:22 tadzik I don't like this is-prime
11:22 hoelzro fib(n)?
11:22 kresike brrt, tadzik, o/
11:22 arnsholt Are there any standard C types that are floating point analogues of int32_t and friends?
11:23 jnthn arnsholt: Are float/double not standard?
11:23 FROGGS double, ya
11:23 jnthn arnsholt: Or you mean, with the number of bits explicit int he name?
11:23 jnthn *in the
11:24 arnsholt Hmm. Maybe float and double are standard enough?
11:24 arnsholt I sort of assumed they were underspecified for width
11:25 FROGGS well, this is a bit platform and/or compiler specific
11:25 FROGGS see the output of configure.sh scripts, they query the size of these types
11:32 cognominal_ joined #perl6
11:35 not_gerd joined #perl6
11:35 not_gerd hello, #perl6
11:35 bbkr joined #perl6
11:36 not_gerd arnsholt: float and double are the standard types
11:36 bbkr "so far it does nothing, but also breaks nothing" - added to my favorite it quotes :)
11:36 not_gerd there's float_t and double_t for non-standard types of at least equal precision
11:45 dalek rakudo/nom: a1bcaa6 | moritz++ | src/core/ (2 files):
11:45 dalek rakudo/nom: mark some numeric operators as pure
11:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a1bcaa63c3
11:45 dalek rakudo/nom: 622595b | moritz++ | src/Perl6/Optimizer.pm:
11:45 dalek rakudo/nom: first shot at constant folding
11:45 dalek rakudo/nom:
11:45 dalek rakudo/nom: so far it does nothing, but also breaks nothing. It seems that the multi dispatch call optimization comes first, and interferes with this one
11:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/622595bd37
11:45 dalek rakudo/nom: cd64560 | moritz++ | src/ (2 files):
11:45 dalek rakudo/nom: move constant folding code to the correct location; some small fixes
11:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cd645601e4
11:45 dalek rakudo/nom: 03cce4d | moritz++ | / (5 files):
11:45 dalek rakudo/nom: Merge remote branch 'origin/nom' into constant-folding
11:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/03cce4d536
11:45 dalek rakudo/nom: 14c9305 | moritz++ | src/Perl6/Optimizer.pm:
11:45 dalek rakudo/nom: constant folding cleanup
11:45 dalek rakudo/nom:
11:45 dalek rakudo/nom: * catch it when the routine to be folded errors out
11:45 dalek rakudo/nom: * make sure to preseve namedness of named arguments
11:45 dalek rakudo/nom: * remove debug output
11:45 dalek rakudo/nom: => all spectests pass!
11:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/14c9305e40
11:45 dalek rakudo/nom: 33d8dd0 | moritz++ | docs/ChangeLog:
11:45 dalek rakudo/nom: update ChangeLog
11:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/33d8dd0c49
11:46 moritz that was fun.
11:46 tadzik moritz++
11:48 masak \o/
11:54 felher moritz: pure? as in 'without side effects'?
11:55 nwc10 at lower optimisation levels, it might be helpful to delay constant folding until the code is run for the first time
11:56 moritz felher: yes
11:56 nwc10 jnthn: code is first class? but, I presume, the section in the middle of a routine that does something constant is not easily chop-out-able?
11:56 nwc10 so this might be a stupid suggestion, unless one is running with a JIT
11:57 moritz nwc10: so, memoization instead of constant folding, really?
11:57 jnthn nwc10: yeah, that sounds in the realm of what a JIT might do
11:57 nwc10 yes, but if you're memoizing the result of calling with a known constant, you can throw away the call site
11:57 arnsholt not_gerd: The sticking point is the sizes of the types. It's for writing NativeCall tests
11:58 arnsholt But they're 4 and 8 bytes on 64-bit Intel, so it's standard enough for the time being I think
11:58 nwc10 in Perl 5 terms, you'd need to change the optree. But it's a tree, so splicing it is in theory possible. (ithreads becomes your practial problem)
12:02 not_gerd arnsholt: most implementations follow IEEE semantics to some extent (and thus 32bit float and 64bit double), but do you actually need to hardcode the values?
12:03 FROGGS not_gerd: if you want to (de)serialize structs from/to perl, then it matters
12:04 FROGGS not_gerd: from your perl code you want to say: class A { has float $.a; has double $.b ), and later you will use this definition to map a memory area to this class, to access its attributes
12:05 FROGGS if the float is guessed as 4 bytes, but is infact 8 bytes long, you have a problem
12:05 brrt joined #perl6
12:06 not_gerd FROGGS: sure - however, a float is always sizeof (float) bytes long as long as you serialize and de-serialize on the same architecture
12:06 not_gerd if not, you need to specify an exchange format
12:06 FROGGS right, so you might have to query the compiler
12:06 not_gerd and sizeof (float) is every bit a compile-time value as 4
12:06 FROGGS to be cross-plattform-arch safe
12:06 not_gerd (except for preprocessing)
12:07 masak plane &
12:07 moritz masak: good travel
12:12 dalek nqp: 6005a68 | jnthn++ | src/ (4 files):
12:12 dalek nqp: Add invocation spec.
12:12 dalek nqp:
12:12 dalek nqp: This is a (porting friendly) way to specify how an object handles being
12:12 dalek nqp: invoked if it's not directly a code-ref.
12:12 dalek nqp: review: https://github.com/perl6/nqp/commit/6005a682c2
12:12 dalek nqp: 86d5182 | jnthn++ | src/stage0/ (9 files):
12:12 dalek nqp: Update bootstrap.
12:12 dalek nqp: review: https://github.com/perl6/nqp/commit/86d5182eee
12:12 dalek nqp: f544686 | jnthn++ | src/core/NQPRoutine.pm:
12:12 dalek nqp: Replace some v-table use with the invocation spec.
12:12 dalek nqp: review: https://github.com/perl6/nqp/commit/f5446864e0
12:12 dalek nqp: f7f8eb6 | jnthn++ | src/core/NQPRoutine.pm:
12:12 dalek nqp: More pir:: -> nqp:: and add 'name' methods.
12:12 dalek nqp: review: https://github.com/perl6/nqp/commit/f7f8eb604b
12:17 lizmat van &
12:17 * sjn is off to Brussels to o/
12:18 moritz lizmat, sjn: good travels!
12:18 sjn "bon voyage", as they say :)
12:18 lizmat left #perl6
12:25 domidumont1 joined #perl6
12:29 [particle]1 joined #perl6
12:30 diakopter WHEE
12:30 diakopter er, ww
12:30 hulu masak: helo
12:31 Liz joined #perl6
12:33 not_gerd r: https://gist.github.com/4691050
12:33 p6eval rakudo 33d8dd: OUTPUT«Attempt to return outside of any Routine␤  in block  at src/gen/CORE.setting:488␤  in block  at /tmp/StqydeDoHN:7␤  in method reify at src/gen/CORE.setting:5587␤  in method reify at src/gen/CORE.setting:5488␤  in method reify at src/gen/CORE.setting:5488␤  in metho…
12:33 not_gerd n: https://gist.github.com/4691050
12:33 p6eval niecza v24-18-gaf64300: OUTPUT«5␤»
12:34 not_gerd ^^^ rakudobug
12:36 FROGGS rn: https://gist.github.com/4691058
12:36 p6eval rakudo 33d8dd, niecza v24-18-gaf64300: OUTPUT«5␤»
12:36 not_gerd ooh - sink context strikes again
12:36 FROGGS looks like
12:36 not_gerd no bug, then
12:37 jnthn It's sink context, yes
12:37 jnthn Not a bug, but a NYI warning should be given.
12:39 moritz erm, for what?
12:40 jnthn moritz: I thought TimToady spec'd a warning in such situations.
12:40 jnthn "Declare a return type" or so...
12:40 jnthn I may be forgetting
12:42 dalek nqp-jvm-prep: 18e278b | jnthn++ | / (4 files):
12:42 dalek nqp-jvm-prep: Implement setting invocation spec.
12:42 dalek nqp-jvm-prep:
12:42 dalek nqp-jvm-prep: It's not actually used yet, however.
12:42 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/18e278b202
12:42 dalek nqp-jvm-prep: 78376f6 | jnthn++ | / (3 files):
12:42 dalek nqp-jvm-prep: Implement getcodeobj/setcodeobj.
12:42 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/78376f6d8e
12:42 dalek nqp-jvm-prep: cf03bd9 | jnthn++ | src/org/perl6/nqp/runtime/Ops.java:
12:42 dalek nqp-jvm-prep: Make invoke handling the invocation protocol.
12:42 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/cf03bd92a6
12:42 dalek nqp-jvm-prep: fa58117 | jnthn++ | nqp-src/NQPCORE.setting:
12:42 dalek nqp-jvm-prep: Stub in NQPRoutine code object.
12:42 dalek nqp-jvm-prep:
12:42 dalek nqp-jvm-prep: This is enough for it to work, but still need to fix clone (or more) to
12:42 dalek nqp-jvm-prep: be able to uncomment the rest.
12:42 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/fa58117042
12:44 not_gerd adding a return type does not seem to help, wheras prefixing `sink` does
12:44 jnthn not_gerd: Yes, that bit of spec landed recently enough to be unimplemented so far.
12:45 not_gerd Rakudo apparently has gotten slower since Dec 4th, btw
12:46 not_gerd psrsing speed is not as bad as it used to be, though
12:46 not_gerd ^parsing
12:48 not_gerd problem 29 from my advent posting also runs faster than it used to
12:54 jnthn not_gerd: What got slower, out of curiosity?
12:54 jnthn not_gerd: sink context was a bit of a trade-off; the sinking makes some things cheaper, but has its own overhead.
12:55 jnthn not_gerd: We lost a little on parsing due to the high watermark stuff, but the far better parse errors are worth it...
12:59 not_gerd jnthn: I don't really see a pattern as to what causes the slowdown
12:59 jnthn not_gerd: OK. How much are we talking?
13:02 nyuszika7h joined #perl6
13:03 kaleem_ joined #perl6
13:04 not_gerd jnthn: some random samples: 2.6s -> 3.1s for problem 3, 5.2s -> 6.3s for problem 53, 11s -> 9.6s for problem 29a, 1.5s -> 0.8s for problem 29c
13:09 kivutar joined #perl6
13:23 dalek nqp-jvm-prep: 0c369f7 | jnthn++ | / (3 files):
13:23 dalek nqp-jvm-prep: Basic nqp::clone implementation.
13:23 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/0c369f7154
13:23 dalek nqp-jvm-prep: ce11ca6 | jnthn++ | nqp-src/NQPCORE.setting:
13:23 dalek nqp-jvm-prep: Uncomment a bunch more of NQPRoutine code.
13:23 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/ce11ca6cfa
13:23 dalek nqp-jvm-prep: 2cd759d | jnthn++ | lib/QAST/JASTCompiler.nqp:
13:23 dalek nqp-jvm-prep: Implement nqp::curlexpad.
13:23 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/2cd759d796
13:30 dalek rakudo/nom: 5e5a76f | jnthn++ | / (2 files):
13:30 dalek rakudo/nom: Updates to work with latest NQP additions.
13:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5e5a76f9e4
13:37 dalek zavolaj: ee261c5 | (Arne Skjærholt)++ | t/06-struct. (2 files):
13:37 dalek zavolaj: Add tests for sized floats, and use is_approx instead of is for comparisons.
13:37 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/ee261c5d1f
13:38 dalek Heuristic branch merge: pushed 44 commits to rakudo/dyncall-sized-num by arnsholt
13:39 dalek nqp/dyncall-sized-num: e50b1c2 | (Arne Skjærholt)++ | src/6model/reprs/P6num. (2 files):
13:39 dalek nqp/dyncall-sized-num: Teach P6num about different sizes.
13:39 dalek nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/e50b1c25fd
13:41 stopbit joined #perl6
13:43 pat_js joined #perl6
13:43 arnsholt jnthn: Rakudo has int{1,2,4}, which isn't going to work well with CStruct and P6opaque in the current state of affairs. I was going to just round sizes that aren't whole bytes up to the nearest byte, but if you've got other ideas I'm all ears
13:44 arnsholt And for setting/reading them in P6int I'd treat them as bytes, but mask values we read/write with 0x1, 0x3, 0xf
13:46 moritz (it would be great if, at some point, an Array of 256 int1 objects would require just 8 byte storage; no idea if that's feasible with any of the current approaches)
13:46 arnsholt I'm not sure yet. But the thought of implementing it has crossed my mind ;)
13:48 arnsholt After I do some cleanup after this get_attribute refactor, positionals are next on my list
13:49 jnthn arnsholt: For now, just round up. Yes, we can optimize later :)
13:51 jnthn arnsholt: Maybe Zavolaj should spot those cases and point out that they don't map to native land in a sane way.
13:52 jnthn r: use NativeCall; sub foo(int1 $x) is native { * }
13:52 p6eval rakudo 33d8dd: OUTPUT«===SORRY!===␤Could not find NativeCall in any of: /home/p6eval/nom-inst/lib/parrot/4.1​0.0-devel/languages/perl6/site/lib, /home/p6eval/nom-inst/lib/parrot/4.10​.0-devel/languages/perl6/vendor/lib, /home/p6eval/nom-inst/lib/parrot/​4.10.0-devel/languages/perl6/lib, /h…
13:52 jnthn star: use NativeCall; sub foo(int1 $x) is native { * }
13:52 p6eval star 2012.12:  ( no output )
13:58 arnsholt Yeah, complaining about weird sizes sounds like a good idea
14:14 PacoAir joined #perl6
14:21 PacoAir joined #perl6
14:21 pat_js hey is this "nesting of operators" section already implemented somewhere? (have some older versions of perl6es lying around here and updating takes probably about more than an hour)
14:22 pat_js nesting of metaops → http://perlcabal.org/syn/S03.​html#Nesting_of_metaoperators
14:23 moritz r: my @a = 1, 2; my @b = 5; @a X[+=] @b; say @a.perl
14:23 p6eval rakudo 5e5a76: OUTPUT«Array.new(1, 2)␤»
14:23 moritz seems it's parsed, but rakudo doesn't like the variants that modify a variable
14:24 pat_js ah okay
14:24 benabik joined #perl6
14:24 pat_js so it probably work on my computer, too.
14:24 pat_js i tried [R~]=
14:25 moritz r: my $a = 'a'; $b [R~]= 'b'; say $a
14:25 p6eval rakudo 5e5a76: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable '$b' is not declaredâ�¤at /tmp/0Psk9dDoyG:1â�¤------> [32mmy $a = 'a'; $b[33mâ��[31m [R~]= 'b'; say $a[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
14:25 moritz r: my $a = 'a'; $a [R~]= 'b'; say $a
14:25 p6eval rakudo 5e5a76: OUTPUT«[31m===[0mSORRY![31m===[0m�Preceding context expects a term, but found infix = instead�at /tmp/PbvyKg9puK:1�------> [32mmy $a = 'a'; $a [R~]=[33m�[31m 'b'; say $a[0m�»
14:26 pat_js r: "foo" R= my $what; say $what;
14:27 p6eval rakudo 5e5a76: OUTPUT«foo␤»
14:30 pat_js p6: my $a = 'a'; $b [R~]= 'b'; say $a
14:30 p6eval niecza v24-18-gaf64300: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable $b is not predeclared at /tmp/0YdTeWAViJ line 1:â�¤------> [32mmy $a = 'a'; [33mâ��[31m$b [R~]= 'b'; say $a[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) â�¤â€¦
14:30 p6eval ..rakudo 5e5a76: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable '$b' is not declaredâ�¤at /tmp/C8k09zSn0f:1â�¤------> [32mmy $a = 'a'; $b[33mâ��[31m [R~]= 'b'; say $a[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
14:32 moritz n: my $a = 'a'; $a [R~]= 'b'; say $a
14:32 p6eval niecza v24-18-gaf64300: OUTPUT«ba␤»
14:32 FROGGS reverse concat?
14:32 pat_js jup
14:33 FROGGS interesting
14:33 pat_js good for building strings
14:35 pat_js n: my $a="world"; $a [R~]= " hello"; say $a;
14:35 p6eval niecza v24-18-gaf64300: OUTPUT« helloworld␤»
14:37 pat_js n: my $a="world"; $a [R~]= "hello "; say $a;
14:37 p6eval niecza v24-18-gaf64300: OUTPUT«hello world␤»
14:38 dalek nqp-jvm-prep: 22b32c8 | jnthn++ | src/org/perl6/nqp/runtime/ (3 files):
14:38 dalek nqp-jvm-prep: Oops, a coderef's object is not static.
14:38 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/22b32c81a4
14:38 dalek nqp-jvm-prep: a4857d5 | jnthn++ | src/org/perl6/nqp/sixmodel​/SerializationReader.java:
14:38 dalek nqp-jvm-prep: Closure and context deserialization/fixup.
14:38 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/a4857d59d3
14:38 dalek nqp-jvm-prep: ea04fec | jnthn++ | t/nqp/56-role.t:
14:38 dalek nqp-jvm-prep: We now pass 56-role.t.
14:38 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/ea04fec3b5
14:38 jnthn arnsholt: How far do you think you are from merging the NQP branch?
14:41 nwc10 jnthn: 56-role.t wasn't an easy win? as in, most of a day's thinking/hacking, just to get to one more? And they only get harder from here on in?
14:43 jnthn nwc10: Well, it blocked on a fairly large number of pieces.
14:43 jnthn nwc10: Some of which other things blocked on too.
14:44 jnthn The clsoure/context deserialization being one of them, and teasing out the way we handle invocation from Parrot's grasp into something that was portable being another.
14:45 jnthn Also, getting clone in place...which no doubt plenty of other things will want.
14:46 jnthn Roles are non-trivial 'cus they are instantiated per use, meaning that to do them right needs (de)serializing closures.
14:46 jnthn Since lexpad = type environment
14:47 arnsholt jnthn: Not terribly far I think
14:47 arnsholt I'd like to refactor the at_pos stuff as well, but that should be relatively quick
14:48 arnsholt Most of the thinking was done for the attribute stuff and reworking P6{int,num}. The positionals should be mostly a matter of copying that stuff over
14:49 jnthn arnsholt: OK. It's just that one of my upcoming tasks will need me to make a change to P6opaque's REPR data.
14:50 arnsholt Oh, right. What kind of time perspective do you have on that task?
14:50 jnthn arnsholt: And thus bump serialization version. Though I guess I can base my branch off yours if I block on that... :)
14:50 jnthn Well, it's one of the things I could work on Very Soon, but there's other things I can do too... :)
14:54 arnsholt Right. Hold off on it until over the weekend, and I'll try to get the branch mergable pretty soon, that work?
14:55 jnthn Works for me.
14:55 arnsholt Excellent
14:58 [Coke] jnthn: there's some drift between t/nqp in the 2 repos, aye?
14:58 lizmat joined #perl6
14:58 [Coke] New tests in either repo should get copied back to the other?
14:59 jnthn [Coke]: I'm trying to keep them in sync...
14:59 jnthn [Coke]: In t/nqp in nqp-jvm repo I'm only adding ones we pass so far.
14:59 jnthn [Coke]: But those files in both should be the same. If I've missed making that happen, it's a fail on my part.
15:01 kaare_ joined #perl6
15:01 [Coke] ok, I'll keep an eye out.
15:02 * jnthn starts taking a look at mixins
15:03 jnthn Mixins. Multi dispatch. Exception handlers. After that I really have go nowhere to run besides the regex engine. :D
15:03 jnthn *got
15:03 arnsholt You can run, but you can't hide =D
15:04 * lizmat is looking on in awe
15:04 tadzik weekend! \o/
15:04 arnsholt lizmat: I went to a hackathon and suddenly I started hacking on the NQP guts. Not at all what I expected =D
15:05 * lizmat has arrived in Brussels at the hotel
15:05 * nwc10 wonders how this parallelises up from Jnthn
15:05 lizmat arnsholt: tried that as well, but had to bail after a while  :-(
15:06 nwc10 take the repository, and try to build it in more and more places
15:06 nwc10 to refine the build system
15:06 nwc10 ?
15:06 arnsholt lizmat: It was my second hackathon, actually. So all is not lost =)
15:09 * jnthn tries to track down a fun bit of infinite recursion...please let it not be in the role composer.
15:11 nwc10 you say that like there is also non-fun infinite recursion
15:14 nnunley joined #perl6
15:15 jnthn Hm, happens in c3 MRO compuation.
15:17 benabik joined #perl6
15:24 arnsholt jnthn: Ordinary Perl 6 arrays don't use the at_pos_* REPR stuff?
15:25 jnthn arnsholt: No
15:25 arnsholt Thanks. Just making sure there wasn't a code I was missing =)
15:25 jnthn arnsholt: Nothing does besides the nativecall stuff *at the moment*. I'm expecting to change that in the not too distant future.
15:25 Liz joined #perl6
15:25 arnsholt Right'o
15:25 [Coke] http://www.smbc-comics.com/in​dex.php?db=comics&amp;id=2874 - Fourier transforms.
15:26 [Coke] r: say :8(1160)
15:26 p6eval rakudo 5e5a76: OUTPUT«Nominal type check failed for parameter '$str'; expected Str but got Int instead␤  in sub unbase at src/gen/CORE.setting:4923␤  in block  at /tmp/q3tciZTfBK:1␤␤»
15:26 [Coke] r: say :8<1160>
15:26 p6eval rakudo 5e5a76: OUTPUT«624␤»
15:26 [Coke] r: say :8<1160>, :12<440>, :5<4444>
15:26 p6eval rakudo 5e5a76: OUTPUT«624624624␤»
15:29 stevan_ joined #perl6
15:30 decasm joined #perl6
15:31 nwc10 jnthn: you're not going to FOSDEM, are you?
15:31 claes_ joined #perl6
15:31 PZt joined #perl6
15:31 lizmat alas, I don't think jnthn will be there.  masak *will*
15:32 claes_ jnthn: how come you settled on BCEL for JVM bc generation?
15:33 SmokeMac_ joined #perl6
15:33 jnthn nwc10: No, gotta travel around middle of Sunday off to somewhere for $dayjob
15:34 jnthn claes_: I found the documentation decent and got something up and running pretty quickly. It also has no dependencies besides a JVM.
15:34 jnthn claes_: Is there an Obviously Better Alternative?
15:34 xinming joined #perl6
15:35 claes_ jnthn: dunno. I'm looking at cglib, objectweb asm and javassist
15:35 jnthn Ah, k.
15:35 claes_ jnthn: cglib uses bcel but I think provides some more stuff. But the docs are quite limited from what I've seen
15:35 jnthn It's worked reliably so far.
15:36 claes_ jnthn: I haven't used BCEL so I wanted a opinion on it from someone I trust
15:36 jnthn I wish its handling of branches was a bit less awkward to work with.
15:36 jnthn otoh, maybe I missed something important...
15:37 claes_ heh =)
15:39 claes_ I'll have a look at how you use it in the nqp jvm backend for guidance =)
15:39 jnthn Anyway, I didn't couple too tightly to it for the code-gen. I currently dump the JAST (JVM AST) into a text file and then read that in and build JAST from it.
15:39 BooK_ jnthn, masak: starting a project at work where I might be able to do some DDD and CQRS (maybe)
15:39 jnthn Where JAST is a thingy I build to let me work slightly above the level BCEL does, and from NQP :)
15:40 jnthn *built
15:40 claes_ jnthn: neat
15:40 jnthn Once things are bootstrapped the intermediate text thing can go away.
15:40 jnthn And I'll just do straight from the AST down to bytecode.
15:41 jnthn The thing that turns the text file into Java bytecode is only 800 or so lines anyway...
15:41 jnthn BooK_: Nice :)
15:42 jnthn bah, seems my fail is that I messed up unshift somehow...
15:43 claes_ jnthn: how about parsing nqp? what do you use there?
15:44 nwc10 claes_: nqp is self hosting. It's using (I believe) Perl 6 regular expressions
15:44 nwc10 now called "Rules", because, well, they aren't regular :-)
15:45 moritz yes, nqp can parse itself
15:45 moritz and compile itself
15:45 claes_ oh I see, and that just outputs JAST then?
15:46 nwc10 for a small value of "just"
15:46 claes_ details =P
15:46 jnthn nwc10: I set it up as a cross-compiler
15:46 jnthn oops, claes_  :)
15:46 jnthn So, it uses the same parser/actions to produce an AST from the NQP source.
15:47 jnthn then instead of feeding into into the backend for producing Parrot bytecode, it gets given to a stage to make JAST, then JVM bytecode.
15:47 claes_ I see
15:47 jnthn And yes, NQP parses itself.
15:48 jnthn The nice thing being that we should be able to get NQP to cross-compile itself to the JVM eventually :)
15:48 * nwc10 is still wondering if NQP on the JVM will be able to cross-compile to Parrot
15:49 johnjohn101 joined #perl6
15:50 claes_ jnthn: thanks. I'm mostly interested in the BCEL parts since I'm playing around with ANTRL4 for parsing
16:00 lizmat left #perl6
16:04 skids joined #perl6
16:15 GlitchMr joined #perl6
16:17 moritz I cannot compile nqp/master
16:17 moritz ./nqp --target=pir --output=src/stage2/gen/NQPP5QRegex.pir \ src/stage2/gen/NQPP5QRegex.pm
16:17 moritz too few positional arguments: 0 passed, 1 (or more) expected
16:18 jnthn hm, it builds here and I've no local diffs
16:18 jnthn Or unpushed commits
16:19 * jnthn does make clean and tries again
16:19 moritz die "Repossession conflicts occurred during deserialization"
16:19 moritz that's the line it complains about
16:19 moritz wtf?
16:20 moritz that's not even a call, it's an op
16:20 moritz maybe the line numbers are off
16:20 jnthn Right
16:20 PerlJam Is that two spirits trying to occupy the same body?
16:20 * moritz tries a git clean -xdf
16:20 jnthn PerlJam: Something like...
16:21 [Coke] I mention the work on the jvm to a geek crowd I know. I hesitate to do so, as they've been giving me crap about parrot for 10 years. The first (and so far only) responses. "the JVM? the one that's being disabled on everyone's desktop due to security issues?"
16:21 jnthn yeah, jsut did make clean; make test and it's running the test.
16:21 [Coke] moritz: note that parrot/ will persist after that.
16:22 * [Coke] finds git clean -Xdf, which is nice if you have a local TODO file lying about.
16:23 moritz [Coke]: my parrot/ dir is below the rakudo/ dir, not below the nqp/ dir (where I clean now)
16:23 moritz but yes, the installation remains in place
16:23 dalek nqp-jvm-prep: 9b42430 | jnthn++ | src/org/perl6/nqp/sixmodel/rep​rs/P6OpaqueBaseInstance.java:
16:23 dalek nqp-jvm-prep: Make P6opaque clone actually work.
16:23 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/9b4243051c
16:23 dalek nqp-jvm-prep: b56b607 | jnthn++ | src/org/perl6/nqp/sixmodel/​reprs/VMArrayInstance.java:
16:23 dalek nqp-jvm-prep: Fix translate-o in unshift.
16:23 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/b56b607433
16:23 dalek nqp-jvm-prep: 8f5a622 | jnthn++ | src/org/perl6/nqp/sixmodel/reprs/P6Opaque.java:
16:23 dalek nqp-jvm-prep: Cope with null attribute type in P6opaque.
16:23 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/8f5a6220f5
16:23 moritz still the same error :(
16:24 moritz ok, time to nuke parrot and the install dir too
16:24 jnthn moritz: That's really odd. I did change sixmodelobject.h but...stuff rebuilt OK here.
16:25 SunilJoshi joined #perl6
16:26 moritz jnthn: I might have had a newer-than-recommended parrot
16:27 jnthn [Coke]: heh...'cus building Java applets for the browser is so the main use case for the JVM these days!
16:28 * nwc10 thought that the main use case was pwnage :-)
16:28 jnthn :P
16:28 nwc10 flash is so last year
16:31 brrt left #perl6
16:32 moritz ok, worked now
16:33 tadzik yep, I can't compile nqp either
16:33 tadzik the solution is to degrade parrot?
16:34 moritz seems like
16:35 kresike bye folks
16:36 sftp joined #perl6
16:37 jnthn tadzik: I...think downgrade is the word you wanted :P
16:37 tadzik yeah, right ;)
16:37 moritz small linguistic details :-)
16:38 [Coke] tadzik--
16:39 tadzik uh, I'm downgraded now
16:42 johnjohn101 joined #perl6
16:50 sftp joined #perl6
16:53 moritz jnthn: how can I catch Perl 6 warnings from NQP land?
16:53 moritz basically I want to avoid inlining stuff that warns, but for that I need to catch warning in Optimizer.pm
16:54 moritz but if I execlude anything that could potentially warn from inlining, there's not much left
16:56 moritz and try { } doesn't catch 'em
16:57 jnthn moritz: Does a CONTROL block work?
16:57 jnthn nqp: try { CONTROL { } }
16:57 p6eval nqp:  ( no output )
16:57 jnthn Parses at least.
16:57 moritz jnthn: I'll try
16:59 moritz jnthn: does it auto-resume the warning at the end?
16:59 jnthn moritz: Don't think so
17:00 moritz good
17:00 dalek nqp-jvm-prep: 3ef0749 | jnthn++ | nqp-src/nqp-mo.pm:
17:00 dalek nqp-jvm-prep: Missing nqp::elems(...).
17:00 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/3ef0749ce4
17:00 dalek nqp-jvm-prep: 9202f07 | jnthn++ | / (2 files):
17:00 dalek nqp-jvm-prep: Add nqp::rebless, though P6opaque not updated yet.
17:00 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/9202f07a98
17:00 dalek nqp-jvm-prep: 9c45812 | jnthn++ | nqp-src/nqp-mo.pm:
17:00 dalek nqp-jvm-prep: Uncomment code in .mixin, now it compiles.
17:00 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/9c45812f67
17:00 dalek nqp-jvm-prep: bc07c18 | jnthn++ | src/org/perl6/nqp/sixmodel/reprs/P6Opaque.java:
17:00 dalek nqp-jvm-prep: Basic mixins that just add methods.
17:00 dalek nqp-jvm-prep:
17:00 dalek nqp-jvm-prep: Case of adding extra attributes is still to do.
17:00 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/bc07c185fc
17:01 dalek nqp: 670bb6f | jnthn++ | src/how/NQPClassHOW.pm:
17:01 dalek nqp: Keep MOP in sync with JVM port.
17:01 dalek nqp: review: https://github.com/perl6/nqp/commit/670bb6f84e
17:04 DarthGandalf joined #perl6
17:05 colomon jnthn++
17:06 tadzik jnthn: I think you can save an if in https://github.com/perl6/nqp/blob/6​70bb6f8/src/how/NQPClassHOW.pm#L349
17:06 tadzik if nqp::elems(@immediate_parents) == 1 { } elsif nqp::elems(@immediate_parents) {} or so
17:06 tadzik or maybe not
17:07 tadzik yeah, that'd only save an indentation level :) nvm
17:07 jnthn hm, could rearrange it to save an indentation level but not much more...
17:07 tadzik right
17:07 benabik joined #perl6
17:07 tadzik for some reason I thought there are 3 ifs there now
17:12 MayDaniel joined #perl6
17:17 DarthGandalf joined #perl6
17:17 PacoAir joined #perl6
17:23 dalek rakudo/nom: 8f39611 | moritz++ | src/Perl6/Optimizer.pm:
17:23 dalek rakudo/nom: Do not inline stuff that warns
17:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8f396110c8
17:23 dalek rakudo/nom: 6d5dc67 | moritz++ | src/core/ (7 files):
17:23 dalek rakudo/nom: mark more subs and ops as pure
17:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6d5dc6735b
17:25 timotimo moritz: have you done any benchmarking yet?
17:25 moritz timotimo: no, just one very artifical one
17:28 moritz timotimo: now it inlines infix:<,> too :-)
17:28 timotimo cool :)
17:29 * timotimo boots up his VM
17:29 moritz and there are 54 calls in the setting inlined
17:30 moritz mostly infix:<,> and prefix:<->
17:31 cognominal joined #perl6
17:34 domidumont joined #perl6
17:36 Chillance joined #perl6
17:37 spider-mario joined #perl6
17:40 tadzik awesome
17:46 timotimo that sounds good :)
17:46 timotimo those are used all over the place, i bet!
17:46 FROGGS joined #perl6
17:46 FROGGS good evening
17:54 masak hiya peeps and bots.
17:55 masak I made it safely to Bruxelles.
17:55 masak now to find the pre-conf meetup :) &
17:55 moritz \o masak
17:56 sevin joined #perl6
17:56 moritz jnthn: how would I check in NQP if something is invokable?
17:57 timotimo moritz: do you think there should be something like stagestats for the optimizer? a flag that makes the optimizer output some stats?
17:57 moritz timotimo: if it doesn't make it slower to any discernible degree, yes
17:58 jnthn moritz: In theory, nqp::isinvokable
17:58 jnthn moritz: In practice, that may not be reliable.
17:58 jnthn moritz: However, the invocation protocol changes I'm half way through will let me fix that...
17:58 moritz jnthn: I want to be able to pass callbacks to QAST::Want
17:59 moritz so my code would be something like   if $best !~~ QAST::Node && nqp::isinvokable($best) { $best := $best($node) }
17:59 jnthn moritz: Hm, what a curious idea... :)
17:59 jnthn moritz: That's the instruction that *should* cut it. Experiment a bit and let me know if it doesn't and I can try fixing it.
17:59 moritz jnthn: that way I can easily (I hope) implement warnings for stuff in sink context
18:00 jnthn moritz: But hopefully it Just Works.
18:00 moritz the "Useless use of variable in sink context" kind of warning
18:00 jnthn Man, that was a serious amount of typing...
18:00 moritz but first, I'm off to play table tennis
18:00 moritz &
18:01 PacoAir joined #perl6
18:01 jnthn enjoy o/
18:02 dalek nqp-jvm-prep: 2d29fc4 | jnthn++ | src/org/perl6/nqp/sixmodel/reprs/P6Opaque.java:
18:02 dalek nqp-jvm-prep: Extend mixin support to cover attributes.
18:02 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/2d29fc4f16
18:02 dalek nqp-jvm-prep: 3fdbbd0 | jnthn++ | t/nqp/61-mixin.t:
18:02 dalek nqp-jvm-prep: We now pass 61-mixin.t.
18:02 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/3fdbbd0809
18:04 cognominal joined #perl6
18:04 cognominal__ joined #perl6
18:05 timotimo moritz: oh, yeah, prefix:<-> is a strange thing to have calls for :)
18:11 TimToady masak: actually, I was grepping my Mandarin dictionary for those
18:11 TimToady these days I know a lot more Chinese characters than Japanese, since there *are* a lot more of 'em
18:11 TimToady I just Japanese is what I know how to speak, and sometimes understand
18:12 TimToady s/I/it's/
18:14 xinming_ joined #perl6
18:15 vividsnow joined #perl6
18:21 cognominal__ joined #perl6
18:27 SmokeMachine joined #perl6
18:29 cognominal__ joined #perl6
18:31 stevan_ joined #perl6
18:34 cognominal__ la presse française se réjouit d'un accord avec Google. Il se rendent pas compte que Google s'apprête à être un broker de contenu (you tube payant) et que demain il seront peut-être obligé de se vendre via Google
18:35 cognominal__ article content-free :  Rémunération des médias : Google et la France signent un accord
18:35 jnthn cognominal__: oui, je deteste la presse :P
18:35 cognominal__ oops
18:35 jnthn :)
18:37 dalek nqp: fd4f51a | jnthn++ | src/core/Hash.pm:
18:37 dalek nqp: A slurpy is around a fresh hash, so this is silly.
18:37 dalek nqp: review: https://github.com/perl6/nqp/commit/fd4f51acef
18:37 cognominal__ jnthn: kudo btw for the recent work, I am waiting to read your next blog entry
18:38 jnthn cognominal__: :)
18:38 jnthn Yes, plan to post one this evening.
18:38 dalek nqp-jvm-prep: 5621514 | jnthn++ | nqp-src/NQPCORE.setting:
18:38 dalek nqp-jvm-prep: Pull in a few more bits of the NQP setting.
18:38 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp​-jvm-prep/commit/5621514bcf
18:42 SmokeMac_ joined #perl6
18:47 cognominal__ joined #perl6
18:51 johnjohn101 joined #perl6
18:55 FROGGS TimToady: might this be the right approach? https://gist.github.com/c41d6fa169557a17e798
18:55 FROGGS will try to do that in nqp and rakudo too
18:57 SmokeMachine joined #perl6
19:00 johnjohn101 joined #perl6
19:02 cognominal__ joined #perl6
19:06 johnjohn101 joined #perl6
19:17 quester joined #perl6
19:18 cognominal__ joined #perl6
19:20 SmokeMachine joined #perl6
19:22 SmokeMac_ joined #perl6
19:24 japhb_ joined #perl6
19:25 benabik_ joined #perl6
19:27 johnjohn101 joined #perl6
19:29 johnjohn101 what is the perl 6 for that is implemented in .net?  are there any examples of creating simple guis on windows?
19:29 timotimo niecza
19:29 timotimo there's the mandelbrot example in the advent calendar which uses GTK# from perl6
19:30 johnjohn101 i'll have to look. gtk# is from mono, right?
19:30 cognominal joined #perl6
19:31 timotimo er, i see no reason why you wouldn't be able to use it on mircosoft .net
19:31 johnjohn101 i see the project page. just really need a bunch more hand holding to get started.
19:32 [Coke] colomon & sorear are the main niecza folks, but we might be able to help out.
19:32 colomon someone called?
19:33 colomon I think I've got niecza running on .NET on one of my Windows boxes.  I do usually use Mono for it.
19:33 johnjohn101 wanted to know if niecza was useful for simple guis  on a windows  7 / server 2008 box
19:34 colomon johnjohn101: it's worked for me on a windows Vista box.  don't know why it wouldn't also work on windows 7
19:34 johnjohn101 have have a server that can give me some json info and need to display
19:35 johnjohn101 how far along is it?  meaning how close is it ready for production code?
19:35 PerlJam johnjohn101: What's "production code"?  :)
19:35 SmokeMachine joined #perl6
19:37 johnjohn101 joined #perl6
19:38 johnjohn101 perljam:  meaning someone else has to use what I write!
19:38 colomon johnjohn101: sorry for disappearing there, got distracted by real life.
19:38 colomon johnjohn101: it's worked well enough for me as a simple GUI, though I've certainly not stress-tested it.
19:40 johnjohn101 just curious. my interest is that i was doing some ironpython ( and some ironruby) and wanted to see if the same functionality was for perl as I have more perl stuff
19:40 timotimo coming from python and ruby, you ought to love the gradual typing. i came from python and it makes me so happy!
19:41 timotimo i'm not really "all the way here" yet, though
19:41 colomon johnjohn101: https://github.com/colomon/TuneReminder is my most complicated script using Gtk#
19:41 johnjohn101 i've been doing perl for a while but it's tough to create win32 guis with it exclusively
19:43 colomon johnjohn101: https://github.com/colomon/TuneRem​inder/blob/master/bin/practice.pl is where most (all?) of the GUI action takes place.It's mostly pretty straightforward Gtk# calls, I think.
19:43 UberFoX joined #perl6
19:44 UberFoX hello there
19:44 [Coke] Hola, UberFoX.
19:44 colomon johnjohn101: it's been a year or more since I wrote it, so I'm a bit fuzzy on the details.
19:44 johnjohn101 colomon: i was just reviewing. looks pretty straightforward.
19:45 johnjohn101 is niecza being actively worked on
19:45 colomon johnjohn101: only very slightly
19:45 timotimo colomon: this is for piano?
19:45 [Coke] colomon: ReportPraticed
19:45 colomon johnjohn101: three or four commits a month.
19:45 UberFoX So hows perl6 coming along?
19:45 [Coke] Well. You should totally grab the latest Rakudo Star distro and play with it.
19:46 PerlJam UberFoX: Quite well I think.  I'm mostly happy with it anyway.
19:46 colomon timotimo: mostly I'm tracking my whistle practice there, though the general point is remembering how the tunes go, so I'd count flute and accordion in there as well.
19:46 UberFoX I had a slight look at it i never used 6 before though just 5
19:46 UberFoX Almost anything that *works* in 5 doesnt seem to work in 6 lol
19:47 PerlJam UberFoX: like what?
19:47 [Coke] six is a new language, so you can't run the same code.
19:48 [Coke] "unchanged", I should add.
19:48 b1rkh0ff joined #perl6
19:48 UberFoX It takes a lot of getting used to for sure
19:48 johnjohn101 rakudo perl is the most active perl 6 for now?
19:49 PerlJam johnjohn101: yes
19:49 UberFoX Last time i tried Rakudo it was not fun to get working but i tried it today and it had a nice msi file
19:50 UberFoX I have been making my own macro/scripting language for fun i tried to model it similar to a mix of perl/php/autoit
19:50 UberFoX result are not bad lol
19:50 johnjohn101 where is the .msi file?  does it run will on win32?
19:51 UberFoX Yea it installs and works nicely
19:51 UberFoX gives you perl6 ready to go
19:51 UberFoX https://github.com/downloads/rak​udo/star/rakudo-star-2012.10.msi
19:52 PerlJam That's an older one.
19:52 PerlJam See http://rakudo.org/downloads/​star/rakudo-star-2012.12.msi
19:53 UberFoX Well its on top of the page ;/
19:53 PerlJam Ah ... we need to update the "how to get rakudo" page to no longer point to github.
19:54 johnjohn101 or update github!
19:55 SmokeMachine joined #perl6
19:56 UberFoX Whats perls6 standing in comparison to other modern languages of today? (considering perl6 has been indev for so long its hard to believe it will ever be finished)
19:57 flussence define "finished"
19:57 UberFoX well stable final
19:58 SmokeMac_ joined #perl6
19:58 UberFoX wether thats 1.0 or 2.0 doesnt really matter
19:58 flussence I guess ruby, python and perl5 aren't finished then, since they have no final release.
19:58 PerlJam UberFoX: the concept you're trying to express isn't very clear-cut.
19:58 [Coke] johnjohn101: github is no longer providing hosting of builds.
19:59 PerlJam UberFoX: Perl 6 is usable today.  but it's not usable for some things that you would want.
19:59 johnjohn101 i would like to see odbc added but that's me
19:59 UberFoX So its just lacking a large library and more optimized./complete core?
20:00 johnjohn101 perl dbi is what I live on
20:00 eiro joined #perl6
20:00 not_gerd joined #perl6
20:01 flussence once nqp-jvm is ready, you can use Java's ODBC equivalent.
20:01 timotimo some parts of the specification are still not 100% fleshed out. i belieie there's not terribly much on threading yet?
20:01 flussence oh yeah, threading sucks
20:01 timotimo wow, what cool new word did i just make up? belieie? that's kind of cute
20:01 not_gerd jnthn: https://github.com/perl6/nqp/issues/74
20:01 johnjohn101 joined #perl6
20:02 not_gerd re Perl6 taking a long time: Rakudo got started in 2005, Rust in 2006
20:02 flussence (I'm optimistic that jnthn++'s current side project is going to be some sort of magic bullet for these in the long run)
20:02 not_gerd some things just take time to get right
20:03 timotimo flussence: the performance increase we probably will get almost for free will be worth a lot by itself, i think
20:03 Psyche^ joined #perl6
20:03 not_gerd the difference between Rust and Perl6 is just perception: Perl6 got announced in 2000 (before design had even started), wheread Rust got announced after years of work in 2010
20:03 UberFoX is it possible to use the new perl6 self modification stuff to allow arrays and hashes to be combined into the $ like php?
20:04 UberFoX (or will it be)
20:04 timotimo "into the $"?
20:04 flussence ?
20:04 flussence rn: my $array = 1..3; say $array.perl; $array = { a => 1 }; say $array.WHAT
20:04 UberFoX for example in PHP the $variable is the array and the string , int etc
20:04 p6eval rakudo 6d5dc6, niecza v24-18-gaf64300: OUTPUT«1..3␤Hash()␤»
20:04 PerlJam UberFoX: Perl 6 has Parcels which may have an array component and may have a hash component.
20:04 UberFoX oh thats nice
20:05 SmokeMachine joined #perl6
20:07 PerlJam UberFoX: you can also store your arrays and hashes inside of scalars so that you rarely (never?) have to see a @ or % if you don't want to.
20:07 cognominal joined #perl6
20:07 flussence r: sub htmlspecialchars(Str $s) { $s.trans(qw[< > & "] => qw[&lt; &gt; &amp; &quot;]) }; sub prefix:<=>(Str $s) { htmlspecialchars($s) }; say ='<a href="#">';
20:07 p6eval rakudo 6d5dc6: OUTPUT«&lt;a href=&quot;#&quot;&gt;␤»
20:09 PerlJam UberFoX: you should check out the Perl 6 code on rosettacode.  http://rosettacode.org/wiki/Category:Perl_6
20:09 jnthn not_gerd: Only on latest Parrot?
20:09 jnthn not_gerd: Works on the recommended one?
20:10 flussence r: sub prefix:<=>(Str $s) { $s.trans(qw[< > & "] => qw[&lt; &gt; &amp; &quot;]) }; my $shady-uri = '"\'&1=1--'; say qq[<a href="{=$shady_uri}">];
20:10 p6eval rakudo 6d5dc6: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable '$shady_uri' is not declared. Did you mean '$shady-uri'?â�¤at /tmp/9pSnC2Ep9L:1â�¤------> [32m"\'&1=1--'; say qq[<a href="{=$shady_uri[33mâ��[31m}">];[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
20:10 flussence r: sub prefix:<=>(Str $s) { $s.trans(qw[< > & "] => qw[&lt; &gt; &amp; &quot;]) }; my $shady-uri = '"\'&1=1--'; say qq[<a href="{=$shady-uri}">]; # why yes, yes I did mean that...
20:10 p6eval rakudo 6d5dc6: OUTPUT«<a href="&quot;'&amp;1=1--">␤»
20:10 not_gerd jnthn: it's the same error moritz reported, so apparently yes
20:11 jnthn Hm. Oddness. OK.
20:11 jnthn Maybe I can reproduce it.
20:11 SmokeMachine joined #perl6
20:13 eiro joined #perl6
20:14 fgomez joined #perl6
20:14 UberFoX I have been making a simple programming language while waiting for perl6 to be ready http://uberfox.no-ip.org/Sputnik/wiki/index.php    its pretty much just for simple win32 scripting but i tried to add a lot of stuff from perl to make it feel homely lol its windows only however what i want to do make all this stuff in perl6 (i dont see point doing it in 5...... havent done anything in 5 for a long long time)
20:22 dalek nqp: ed7e829 | jnthn++ | src/pmc/stable.pmc:
20:22 dalek nqp: A couple of missing bits of marking.
20:22 dalek nqp: review: https://github.com/perl6/nqp/commit/ed7e829c7e
20:23 jnthn not_gerd: maybe that helps
20:30 not_gerd jnthn: testing
20:30 [Coke] UberFoX: when you say you want to "make all this stuff in perl6" do you mean that "things you build on sputnik, you'd like to build on perl6 instead" or "it would be nice if these features from sputnik were available in perl6" or something else?
20:31 UberFoX I want to be able to do all that in perl6 yes
20:31 UberFoX right now it seems a bit too limiting?
20:31 [Coke] I think all the p6's currently provide the features you document in the language reference, though they might be spelled differently.
20:32 [Coke] I don't see anything you're doing there that isn't already doable for some time in perl6, no.
20:32 UberFoX really?
20:32 UberFoX :O
20:32 spider-mario joined #perl6
20:32 [Coke] sure. I'm looking at http://uberfox.no-ip.org/Sputnik/​wiki/index.php/Language_Reference, btw.
20:32 UberFoX erm thats just ref
20:32 UberFoX thats not important
20:33 UberFoX uberfox.no-ip.org/Sputnik/wiki​/index.php/Function_Reference
20:33 UberFoX thats the important one
20:33 [Coke] ok. I can only work with what you give me.
20:33 not_gerd jnthn: didn't help
20:33 not_gerd (tries again with a clean checkout just to be sure)
20:33 UberFoX language reference is just like Operators etc
20:33 UberFoX perl has all that stuff :)
20:34 UberFoX perl6 even lets you make ur own operators
20:34 UberFoX which is pretty awesome
20:34 PerlJam UberFoX: youre type checking is weird.
20:34 UberFoX wel theres 2 ways to typecheck
20:35 not_gerd jnthn: could you reproduce the problem?
20:35 UberFoX $a is Int       IsVarInt( $a )      or  well    $a  ~~ int
20:35 not_gerd jnthn: I'm building with cygwin, ie a 32bit architecture
20:36 PerlJam UberFoX: that middle one seems problematic.  Makes me think of the myriad ways PHP has to do things.
20:36 UberFoX well that one doesnt really check the variables type
20:36 PerlJam UberFoX: better to have a few good primitives that you can combine and use in various ways.
20:36 UberFoX it just checks what the variable equates to
20:36 UberFoX $a = "100"; will work TRUE on isvarint
20:36 UberFoX because it can be...
20:36 PerlJam UberFoX: in any case ... Perl 6 can do most of this stuff too looks like.
20:37 not_gerd jnthn: the problem didn't go away after a git clean
20:37 [Coke] pretty sure there are analogues for nearly everything except: GUI items (those aren't core, but you can get at the windows stuff from either rakudo or niecza, I believe.), and the types. (rakudo's support of the spec'd native types is not complete)
20:38 [Coke] (oh, and the db connectivity)
20:38 UberFoX I make a lot of macros/scripts/trainers i used to do that in perl5 but ended up making my own to do it but  would like to have all this stuff in perl6 since overall it is a more solid professional language
20:38 UberFoX my stuff is just dabbling ;p
20:38 [Coke] though that's probably doable via nativecall today.
20:38 UberFoX im not an expert ;/
20:38 PerlJam UberFoX: btw, good job making your own language.   I think every CS-oriented person should create their own language and compiler at least once :)
20:38 UberFoX Yea
20:38 UberFoX i gave it my best shot lol
20:40 UberFoX is it possible to call win APIS in current perl6?
20:40 UberFoX i cant seem to locate such a function ;/
20:41 PerlJam you can use NAtiveCall
20:41 UberFoX that a module?
20:41 arnsholt Windows APIs aren't part of the core language (since it's supposed to be platform agnostic), but you might be able to call the C APIs using Zavolaj
20:42 UberFoX calling APIs is pretty important for kind of scripting i do
20:42 UberFoX (dlls)
20:42 arnsholt NativeCall/Zavolaj lets you do that
20:43 UberFoX https://github.com/jnthn/zavolaj/?
20:43 UberFoX is there a binary download?
20:43 arnsholt It's a bit limited in some aspects ATM, but some serious improvements should land in the next week I think
20:43 arnsholt Yeah, that's the one
20:43 timotimo next week? oh yeah! :)
20:43 arnsholt No binary, but it comes with Rakudo star I think
20:44 UberFoX i use windows for the moment (unless windows 9 is same as windows 8 then im gonna need to find something else)
20:44 timotimo something is stopping me from going on with the iperl6kernel work. i don't know what yet :|
20:46 arnsholt timotimo: That's no fun. What's the problem?
20:47 UberFoX Know of any great from Perl5 to Perl6 guides? i got this one http://perlgeek.de/en/article/5-to-6     but its only so-so
20:47 timotimo arnsholt: i don't know how the pieces are supposed to go together - the connection between the perl6 kernel part, the nqp REPL replacement and the python zmq wrapper
20:47 jnthn not_gerd: No, didn't manage to... Will look a bit deeper.
20:48 UberFoX many things that guide shows actually dont even work in perl6
20:48 UberFoX so its a bit....erm ;p
20:48 arnsholt timotimo: Right, right. Architecture is always hard
20:48 timotimo the current code reads length + json-as-string from one IO object and writes length + json-as-string to another IO object and those IO objects are currently cargo-culted from the nqp part
20:49 PerlJam UberFoX: which ones don't work?
20:49 UberFoX like the garmmar one
20:49 UberFoX if you copy and paste it it will spit off xxx errors but not run
20:50 UberFoX i was trying to make a parser in perl6 that operators similar to: uberfox.no-ip.org/Sputnik/wiki/ind​ex.php/Core_Function_Parser_Engine
20:50 UberFoX but the ones in guide arent working well ;/
20:50 UberFoX "Regexes (also called "rules")"
20:50 UberFoX thats the one
20:50 PerlJam UberFoX: "A grammar for (pseudo) XML"  ?
20:50 PerlJam oh
20:50 UberFoX yea
20:50 UberFoX no
20:50 UberFoX not the xml one
20:51 UberFoX the xml one works fine
20:51 UberFoX Regexes (also called "rules")
20:51 PerlJam yeah, I got it.  :)
20:51 arnsholt timotimo: If you want to, you could start a Gist or repo or something, and I could see if I have any suggestions
20:52 timotimo there is a repo. i'm not sure if the latest code is on there yet, though
20:52 [Coke] UberFoX: remove the {} wrapping the 1..3
20:52 [Coke] no doubt a spec change that occurred sometime in the last 4 years.
20:52 timotimo yeah, it is. see this repo: https://github.com/timo/iperl6kernel
20:52 UberFoX lol
20:52 [Coke] perlgeek is ... moritz? masak?
20:52 arnsholt moritz
20:52 FROGGS right
20:53 PerlJam [Coke]: though I still have it in my head that a block returning a range should work there.
20:53 [Coke] phenny: tell moritz to change **{1..3} to **1..3 in this code: http://perlgeek.de/en/article/5-to-6#post_07
20:53 phenny [Coke]: I'll pass that on when moritz is around.
20:53 UberFoX can this parse a document and create classes so i can easily go through them?
20:53 UberFoX or is it just a regex tokenizer?
20:54 PerlJam [Coke]: S05:1019  looks like it should work, but doesn't yet (possibly a regression)
20:55 [Coke] UberFoX: .parse() takes an optional "actions" parameter that lets you act on those various rules when they hit, yes.
20:55 arnsholt UberFoX: You can connect actions to the rules, and use those to build up an AST
20:55 UberFoX I see so how would i go about doing something like this: http://pastebin.com/Jf8m4aTC
20:56 UberFoX in perl6
20:56 PerlJam UberFoX: http://use.perl.org/use.perl.or​g/_pmichaud/journal/38580.html
20:56 PerlJam :-)
20:57 UberFoX cool :)
20:58 PerlJam It sometimes boggles my mind how much functionality we had back in 2009
20:58 UberFoX i havent really heard anything about perl6 until a few days i thought it was dead years ago O_o
20:59 timotimo pmichaud: not sure if it has been around back then, but you could totally rewrite '-'    => { my $s = .pop; .push(.pop - $s) }, in that RPN using R- :))
20:59 timotimo same for the / operator
20:59 UberFoX because activeperl etc is all 5.xx
20:59 PerlJam timotimo: see the bottom of that post
20:59 timotimo oh, yes, it already says so in there
21:00 timotimo i feel dumb now.
21:00 rindolf joined #perl6
21:00 UberFoX the RPN sample is interesting
21:01 UberFoX shows perl doesnt need vast amounts of code to do this stuff
21:02 [Coke] r: https://gist.github.com/4694121
21:02 p6eval rakudo 6d5dc6: OUTPUT«GOT NUMBER: 123␤GOT NUMBER: 456␤GOT NUMBER: 789␤»
21:02 PerlJam UberFoX: the key thing to remember is that Perl 5 and Perl 6 are different languages.  They share some heritage, but they are radically different.
21:02 [Coke] there's a basic example of how to plugin an action.
21:02 timotimo when did perl ever need vast amounts of code to do anything? i thought that was the essence of even the *bad* reputation perl has :)
21:03 UberFoX hehe
21:03 UberFoX back in the day i made a lot of huge projects in perl5
21:04 UberFoX its a shame php took the web though
21:04 UberFoX php is a mess
21:04 [Coke] UberFoX: check out that gist for an example of actions.
21:05 UberFoX Yes im collecting samples to study
21:05 PerlJam UberFoX: http://modules.perl6.org/ might also be some good code to read.
21:06 UberFoX i will be happy once i get apis, parser etc etc working fine
21:06 UberFoX hehe some acme modules
21:07 PerlJam UberFoX: https://github.com/moritz/json/ is another relatively small, yet complete example of using grammars + actions
21:07 timotimo moritz: i want to suggest you replace say "One lonely sheep"; with say "One lonely shoop";
21:08 timotimo r: loop (my $x = 1; $x < 100; $x = $x**2) { say $x; }
21:08 p6eval rakudo 6d5dc6: OUTPUT«(timeout)1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1​␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤​1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1​␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤​1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤
21:08 timotimo this doesn't work as shown in that 5to6 document
21:09 timotimo ... what are those "���" in the middle?
21:09 jnthn I'm pretty sure 1 to the power 2 is always 1 :)
21:09 UberFoX when you use   int $a = 100 does it actually become a proper int and run faster in loops?
21:09 UberFoX or does it make no difference in speed?
21:09 timotimo er, yeah
21:09 UberFoX one issue with php is it uses strings for everything
21:09 UberFoX damn slow
21:10 timotimo classes are just strings!
21:10 UberFoX O_O
21:10 timotimo yeah, the string begins with class $name { and ends with }
21:10 spider-mario Tcl likes strings too
21:10 jnthn UberFoX: It tends to generate better code thanks to that, BUT there are some holes in the implementation of the natives.
21:10 spider-mario they’re even nested
21:10 timotimo instantiating the class should really just be evaling that string!
21:11 fgomez joined #perl6
21:11 jnthn UberFoX: We use them in various of the built-ins and in the compiler to optimize some things.
21:11 spider-mario I have used Tcl, a little
21:12 PerlJam UberFoX: Rakudo is still fairly slow compared with other language implementations, but it is getting optimized over time.
21:12 spider-mario the use of strings everywhere means that syntax errors other than non-balanced {} are not detected until runtime
21:12 spider-mario à la bash
21:12 spider-mario and it is so slow…
21:13 UberFoX I saw a video on youtube where one of the Rakudo devs said it took like 37 seconds to do this loop but they fixed it to 0.2 second :)
21:15 timotimo yeah, that was pmichaud and that talk was great :)
21:15 UberFoX From everything ive seen they say Rakudo is the perl6 and the other ones are just nowhere near as good
21:15 timotimo niecza is faster and still closer to STD, but rakudo has more features
21:15 UberFoX which one does larry support as perl6?
21:15 PerlJam UberFoX: all of them!
21:16 timotimo both
21:16 UberFoX :O
21:16 timotimo well, all three, no?
21:16 jnthn UberFoX: Perl 6 is a language spec + suite of tests. That it's open to more than one implementation is intentional.
21:16 UberFoX it seems a bit odd to have many perls but yet look at C++ and how many there are
21:17 PerlJam UberFoX: aye, Perl 5 is the unique one in that it has essentially one implementation.
21:17 PerlJam Most other languages have a spec (even if informal) and possibly multiple implementations.
21:17 UberFoX ive seen perl5 source its crazy lol
21:18 jnthn UberFoX: I don't promise Rakudo source isn't crazy, but it is at least largely written in Perl 6 or a subset of it :)
21:18 UberFoX as long as its not endless spaghetti code like perl5 ;/
21:19 arnsholt timotimo: I think your general plan is a good one. Figure out how to hijack the REPL from jnthn++'s debugger, and get that to talk to a python shim that talks to the ipython/rakudo kernel
21:22 timotimo arnsholt: thanks. i'm pretty satisfied with that part as well
21:22 timotimo one thing that trips me up *so* much is input/output redirection
21:22 timotimo when something asks to read from stdin, say prompt() or $*IN.get or anything, the shim has to broadcast a request and some kernel has to answer with an input. how do i do that properly?
21:23 timotimo and when something outputs to stdout some different way from $*OUT.write, like maybe q:x{echo "hello perl!"}, i have to pick that up as well, but then the executed code has a way to just mumble right into the middle of my protocol
21:23 [Coke] partcl: puts {Tcl still work here?}
21:24 arnsholt Yeah, it's a bit complex
21:24 arnsholt But we can probably hack around most of it
21:24 arnsholt Like replacing $*IN with a magical filehandle that captures input
21:25 jnthn Yes, if you can replace $*IN and $*OUT with such you should be able to make it work
21:26 * masak is back from pre-conf meetup
21:27 masak turns out FOSDEM is so huge that the number of people at the pre-conf meetup along means that you cannot hear yourself think :)
21:27 masak (but it was really nice to meet liz/wendy, eiro, and sjn already tonight)
21:29 domidumont joined #perl6
21:29 masak UberFoX: hi. welcome.
21:29 timotimo jnthn: but how does it cooperate with things like executing shell commands that would inherit stdout or stdin?
21:30 jnthn timotimo: Probably not entirely well..hmm.
21:31 masak UberFoX: Perl 6 and its implementations are less limiting than you seem to think -- at least that's my many-year impression of them. but what's lacking is *polish*, so you're bound to sometimes run into errors or cases where there's no easy solution.
21:31 masak UberFoX: people here are very good at helping and improving things, though.
21:31 colomon well said, masak
21:32 timotimo jnthn: actually, there could be a way to do that.
21:33 timotimo jnthn: after an eval command, the shim would listen to stdout and just gobble up everything and when some special marker comes, it'd ask the perl6 code "did that just come from you?"
21:33 timotimo "if so, repeat "foo bar baz" to me, please"
21:34 timotimo oh, but what if i q:x{cat}
21:34 timotimo dangit :|
21:34 timotimo i think i'll need to mkfifo and do communication that way
21:34 masak colomon: short history of Perl 6: 2008 -- this is very unstable, but at least it runs. 2010 -- this is quite buggy, but at least it doesn't crash. 2012 -- this is still fairly slow, but at least it's stable and featureful. to be continued.
21:35 masak (that's mostly Rakudo, by the way)
21:37 timotimo mid 2013 -- why didn't we think of going to the jvm before?!
21:38 swarley I've decided to force myself to learn perl 6 regular expressions better.
21:39 PerlJam swarley: good deal!  Maybe you could blog about your experiences?
21:39 swarley By writing a parser for them in ruby, using syn/S05
21:39 masak swarley: I once did this. it's a great learning experience.
21:39 masak swarley: maybe you should look into borrowing an existing test suite?
21:39 masak swarley: like, nqp's?
21:39 swarley I am actually
21:39 masak \o/
21:40 swarley I'm looking at QRegex/P6Regex/Grammar.pm right now
21:40 PerlJam next thing you know, we'll accidentally obtain a ruby backend for NQP  ;)
21:40 not_gerd timotimo: http://www.ebb.org/bkuhn/articles/thesis/
21:40 swarley This line looks scary to implement
21:40 not_gerd " It is hoped that the Perl6 effort (which seeks to reimplement perl from the ground up) can make use of the lesson learned here, so that future versions of perl will ease the burden of porting to architectures like the JVM. "
21:41 swarley or duplicate
21:41 swarley :my $OLDRX := nqp::getlexdyn('%*RX');
21:41 masak swarley: well, sometimes you have to take a step back and look at the intent.
21:41 timotimo not_gerd: wow, this was 2001?
21:42 masak swarley: at bottom, everything is Turing machines.
21:42 masak swarley: or, alternatively, lambda expressions.
21:42 swarley Also
21:42 swarley I'm assuming <quote_EXPR: ':q'> and <quote_EXPR: ':qq'> are just mappings to '' and "" strings?
21:43 swarley | <?[']> <quote_EXPR: ':q'>
21:43 swarley | <?["]> <quote_EXPR: ':qq'>
21:43 swarley Because I keep coming across things like that
21:43 swarley In many different examples
21:43 jnthn Yes.
21:44 sorear ...everything is interacting quantized fields?
21:45 masak sorear: huh? come again?
21:45 lue Is it rakudo or panda that creates the ~/.perl6/<version> directory?
21:45 skids Everything's a tree.  Until you get sick of going up/down 8 branches of traversal just to get to that acorn right next to you.
21:46 swarley ^ Now that I agree with
21:46 PerlJam lue: panda
21:46 masak sorear: oh, it was a physics comment.
21:47 masak sorear: I was still thinking about grammars ;)
21:47 timotimo skids: is that the reason why they came up with the World comcept in perl6?
21:47 masak timotimo: no.
21:47 * masak <-- proud inventor of the name "World" :)
21:48 masak timotimo: basically, grammars are for syntax; actions are for code that *executes* stuff; World is for code that *declares* stuff.
21:48 masak timotimo: the distinction between the latter two became apparent the more Rakudo evolved.
21:49 timotimo mhm, right. that does make sense
21:49 timotimo where do acorns fit in, though?
21:50 masak I guess they were a poetic metaphor for .ast values.
21:50 timotimo ok :)
21:50 skids Because squirrels are smarter than programmers when it comes to getting around trees. :-)
21:51 swarley Editors should have method hyperlinks built in :(
21:52 masak they do, nowadays.
21:52 swarley would make understanding source code a hell of a lot easier
21:52 swarley I've yet to use one that does
21:52 swarley Well
21:52 swarley I just dont have the right vim plugin i suppose
21:53 swarley but then again it is harder for scripted languages..
21:54 masak well, Perl 6 has enough proper OO in it for it to be at least possible much of the time.
21:58 timotimo right, i was musing about writing something that outputs the ctags format, because there's ctags readers for almost all editors out there
21:58 timotimo i wonder if ctags would have trouble with perl6 identifiers that have - in them
21:58 timotimo vim omni completion totally does, it stops after every -
21:58 timotimo but i like using - in names so much :(
21:59 masak betcha there's an override somewhere.
21:59 timotimo even if it's a bit in the binary that i'd have to flip with a hex editor :D
22:03 timotimo with a somewhat more intelligent format and typed variables, one could even disambiguate methods from different classes, but that's 10x more advanced than i care to consider on a boring sunday afternoon :)
22:03 timotimo this kind of thing might be what one would want to put into padre, though
22:06 timotimo is there a big difference between method foo { ... } and proto method foo { * }?
22:07 masak yes. next question!
22:07 masak :P
22:08 timotimo oh you ;)
22:09 timotimo so, what is that big difference? also, is the $object.method: $foo, $bar syntax meant to mirror the way you define your own name for the invocant, or if not, what's it for?
22:09 timotimo er, not "what's it for"; "why does it look like that?"
22:10 timotimo and maybe the answer to that question will also explain why i can't just sub: 1, 2, 3.
22:10 masak timotimo: to the latter unquestion, because it only works for method syntax.
22:11 timotimo moritz: q{The my SomeClass $x .= new is actually a shorthand for my SomeClass $x .= SomeClass.new}  -  that seems like the second .= should be = instead
22:11 masak what's it for: it's so that you don't have to surround a big set of method parameters with parentheses.
22:11 masak or sometimes to make method calls look a little "lighter".
22:11 timotimo okay. why only method calls, though?
22:12 masak because subs already have the listop syntax.
22:12 masak don't need a colon.
22:12 timotimo oh, that was kind of obvious. thanks!
22:12 masak r: class Greeter { method greet($person) { say "Why hello, $person!" } }; given Greeter.new { .greet: "timotimo" }
22:12 p6eval rakudo 6d5dc6: OUTPUT«Why hello, timotimo!␤»
22:13 timotimo the next question then is, what's the reason to not let method calls have listop syntax without a :, too? :)
22:16 masak good question.
22:16 masak because you can't have two terms in a row. that's fundamental to Perl 6 parsing.
22:17 masak though when I say it like that, it doesn't feel like a sufficient explanation.
22:17 masak why *do* we have listop subs but not listop methods?
22:17 timotimo yeah, it sounded a little bit circular in a way
22:17 masak yeah.
22:18 masak I think it's because we like $obj.foo to mean $obj.foo()
22:18 sorear $obj.attr += 1
22:18 masak but with 'foo 1, 2, 3' we like it to mean 'foo(1, 2, 3)'.
22:18 sorear $o1.attr + $o2.attr
22:18 masak sorear: yeah, good one.
22:18 masak good two :)
22:18 masak they are terms on their own, moreso than subs are.
22:19 masak but even with subs, people fall into gobbling-related traps sometimes :)
22:19 masak the 'for lines {' one is a classic.
22:19 masak std: for lines { .say }
22:19 p6eval std 7deb9d7: OUTPUT«[31m===[0mSORRY![31m===[0m�Function 'lines' needs parens to avoid gobbling block at /tmp/BLa5p86n6r line 1:�------> [32mfor lines[33m�[31m { .say }[0m�Missing block (apparently gobbled by 'lines') at /tmp/BLa5p86n6r line 1:�------> [32mfor lines { .say }[33…
22:19 sorear at least $o.attr = 2 isn't ambiguous anymore :D
22:20 bbkr_ joined #perl6
22:20 masak yeah, good riddance with the prefix:<=> :P
22:20 timotimo oh, mhm
22:21 bbkr_ how can I force { 'a' => $_} to be interpreted as hash after 2012.12 changes? old P5 trick +{ … } does not work
22:21 timotimo (...).hash?
22:21 jnthn Maybe consider using hash('a' => $_) instead
22:24 masak bbkr_: prefix:<+> means 'numify' in Perl 6. it doesn't mean 'no-op' as in Perl 5.
22:25 bbkr_ my previous syntax was @documents.push( { 'foo' => $_ } ) , when I change it to @documents.push( hash( 'foo' => $_ ) ) all pairs are flatten so I get array of pairs but I need array of hashes
22:25 bbkr_ flattened*
22:27 bbkr_ r: my @t; @t.push( hash("a"=>$_) ) for ^4; @t.perl.say
22:27 p6eval rakudo 6d5dc6: OUTPUT«Array.new("a" => 0, "a" => 1, "a" => 2, "a" => 3)␤»
22:28 bbkr_ r: my @t; @t.push( {hash("a"=>$_)} ) for ^4; @t.perl.say
22:28 p6eval rakudo 6d5dc6: OUTPUT«Array.new(Block.new(), Block.new(), Block.new(), Block.new())␤»
22:29 bbkr_ r: my @t; @t.push( %("a"=>$_) ) for ^4; @t.perl.say
22:29 p6eval rakudo 6d5dc6: OUTPUT«Array.new("a" => 0, "a" => 1, "a" => 2, "a" => 3)␤»
22:29 jnthn r: my @t; @t.push( $(hash("a"=>$_)) ) for ^4; @t.perl.say
22:29 p6eval rakudo 6d5dc6: OUTPUT«Array.new({"a" => 0}, {"a" => 1}, {"a" => 2}, {"a" => 3})␤»
22:30 jnthn That's not attractive but works...
22:30 bbkr_ \o/ thanks!
22:30 * bbkr_ is back to fixing MongoDB driver
22:30 jnthn Feels there should be a slightly better way but I don't immediately see it.
22:31 jnthn The change was to fix the longstanding map { $_ => 0 }, @x style thing
22:32 masak I also got the feeling that there should be a slightly better way :)
22:33 masak r: my @t; @t.push( {{"a"=>$_}} ) for ^4; @t.perl.say
22:33 p6eval rakudo 6d5dc6: OUTPUT«Array.new(Block.new(), Block.new(), Block.new(), Block.new())␤»
22:33 masak yes. 'course.
22:34 masak 'night, #perl6
22:34 jnthn 'night, masak
22:34 diakopter o/
22:35 Liz joined #perl6
22:41 not_gerd r: my @t; @t.push( (a => $_).hash.item ) for ^4; @t.perl.say
22:41 p6eval rakudo 6d5dc6: OUTPUT«Array.new({"a" => 0}, {"a" => 1}, {"a" => 2}, {"a" => 3})␤»
22:42 * lizmat wonders whether masak made it back to the hotel ok
22:45 not_gerd bye, #perl6
22:45 not_gerd left #perl6
22:46 jnthn lizmat: Yes, he was here just before you arrived.
22:46 lizmat okidoki, good to hear.  Beer Night at FOSDEM has taken its toll with me, so sleep & for me
22:50 lizmat left #perl6
23:11 lue joined #perl6
23:30 skids joined #perl6
23:40 gfldex joined #perl6
23:49 proller joined #perl6
23:49 proller_ joined #perl6
23:49 benabik joined #perl6
23:50 * jnthn blaught: http://6guts.wordpress.com/2013/02/0​2/a-look-at-the-preparations-behind-​the-jvm-port-and-a-progress-update/
23:50 jnthn er, ^has :)

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

Perl 6 | Reference Documentation | Rakudo