Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-11-18

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:02 raiph swarley: is there a difference between perl6 and nqp regex syntax?
00:03 lue joined #perl6
00:05 swarley Well, I mean for tokens an stuff, and I've not ever used Perl 6 regular expressions to be honest
00:05 swarley and*
00:05 raiph hi lue
00:05 lue Why, upon bootstrapping panda after updating perl6, is there a ~/.perl6/2012.10-151-g112307b/bin I now need in my PATH in as well?
00:05 raiph lue: is nqp regex syntax the same as p6?
00:07 lue AFAIK, nqp regex syntax is basically P6's, but don't be surprised if something doesn't work. (Not Quite an expert in nqp, so I can't say for sure.)
00:10 lue I can understand wanting to version-separate panda (considering it doesn't work anymore if you update), but why not turn the normal ~/.perl6 directories (~/.perl6/bin, etc.) into symlinks?
00:12 lue (come to think of it, there are a couple of other improvements I might make to panda...)
00:15 raiph lue: ihttp://irclog.perlgeek.de/search.pl?​channel=perl6&nick=&q=panda
00:16 raiph s/ihttp/http/
00:16 swarley joined #perl6
00:18 raiph hi again swarley. i'm pretty sure nqp regex are the same syntax as perl 6 regex, except in code blocks ... and, for the most part, nqp code is a subset of perl6
00:18 swarley Well, I understand PCRE
00:19 lue For the record, my initial typings on panda were me being taken aback by being asked to amend my PATH (which I don't like doing freely) to a version-specific location, the implication being I have to do this with every update.
00:19 swarley What I dont understand is this syntax http://pastebin.com/sHU4Sa0S
00:20 japhb swarley, PCRE is based on Perl 5 regex; Perl 6 grammers are different (similar basics, but more powerful, and with a cleaner and not-compatible syntax)
00:20 raiph yeah, that's perl6 regex
00:20 swarley Okay, i suppose i mean rule syntax
00:21 japhb swarley: This is the official grammar/rule/token/regex spec for Perl 6: http://perlcabal.org/syn/S05.html
00:21 swarley thank you very much
00:21 japhb np
00:22 tokuhiro_ joined #perl6
00:24 raiph swarley: that's a great document; it's one of the language specification documents; it may well be overwhelming; you have other options for gaining information
00:24 raiph nqp: say "hi"
00:24 p6eval nqp: OUTPUT«Confused at line 2, near "say \"hi\""␤current instr.: 'panic' pc 13089 (src/stage2/gen/NQPHLL.pir:4619) (src/stage2/gen/NQPHLL.pm:324)␤»
00:24 japhb raiph, nqp requires parens there
00:24 lue nqp: say("hi")
00:24 p6eval nqp: OUTPUT«hi␤»
00:28 * lue &
00:38 Pleiades` joined #perl6
00:52 zjmarlow_ joined #perl6
01:05 dalek perl6-bench: 3525cb8 | (Geoffrey Broadwell)++ | bench:
01:05 dalek perl6-bench: Allow extraction of specific release tags, instead of all of them
01:05 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/3525cb8ccc
01:05 dalek perl6-bench: 7f84c9c | (Geoffrey Broadwell)++ | components.json:
01:05 dalek perl6-bench: Do local clones of parrot and nqp when building rakudo, instead of allowing full network clones from --gen-parrot
01:05 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/7f84c9c858
01:15 indasky__ joined #perl6
02:05 xinming joined #perl6
02:11 tokuhiro_ joined #perl6
02:19 cognominal joined #perl6
02:30 tokuhiro_ joined #perl6
02:42 am0c joined #perl6
02:43 tokuhiro_ joined #perl6
02:48 grondilu joined #perl6
02:55 swarley joined #perl6
03:18 xinming joined #perl6
03:52 orafu joined #perl6
04:07 skids joined #perl6
04:08 jaldhar joined #perl6
04:23 armitage81 joined #perl6
04:41 gootle joined #perl6
04:43 tokuhiro_ joined #perl6
05:22 xenoterracide is there anything like p5's __SUB__ (reference to the current subroutine)
05:28 sorear &?ROUTINE
05:28 sorear (p6 had it first)
06:04 xenoterracide sorear++
06:04 xenoterracide sorear:  figured it had it first, I just din't know what I was looking for
06:25 tokuhiro_ joined #perl6
07:46 cognominal joined #perl6
07:48 tokuhiro_ joined #perl6
07:50 tokuhiro_ joined #perl6
07:59 sisar joined #perl6
08:16 FROGGS joined #perl6
08:16 flightrecorder joined #perl6
08:24 GlitchMr joined #perl6
08:29 wamba joined #perl6
08:29 domidumont joined #perl6
08:53 rindolf joined #perl6
08:53 xinming joined #perl6
08:56 domidumont joined #perl6
08:59 zjmarlow_ joined #perl6
09:04 xdbr joined #perl6
09:04 SamuraiJack joined #perl6
09:07 kaare_ joined #perl6
09:08 zby_home_ joined #perl6
09:13 zjmarlow_ joined #perl6
09:16 xinming joined #perl6
09:16 FROGGS morning pals
09:22 sorear morning FROGGS
09:25 tipdbmp How can I match only space characters (\s), that are not \n (newlines), cause it seems \s matched \n as well.
09:26 tipdbmp space characters = ' ', '\t', and probably more.
09:27 FROGGS <[\s]-[\n]> ?
09:27 FROGGS just a guess
09:28 FROGGS r: say so "\n" ~~ <[\s]-[\n]>
09:28 p6eval rakudo 112307: OUTPUT«False␤»
09:28 FROGGS r: say so "\t" ~~ <[\s]-[\n]>
09:28 p6eval rakudo 112307: OUTPUT«False␤»
09:28 xenoterracide tipdbmp: why? just curious
09:28 FROGGS r: say so " " ~~ <[\s]-[\n]>
09:28 p6eval rakudo 112307: OUTPUT«False␤»
09:28 FROGGS meh
09:29 xenoterracide tipdbmp: not being all that familiar with p6 I wonder if things like /xms still apply
09:29 MayDaniel joined #perl6
09:29 tipdbmp Having fun with grammars, and noticed that \s matched \n but I want to show an error if if the "input" was something like A  \nB instead of just A     B.
09:29 xenoterracide and so if you're asking about not seeing \n maybe your problem is that options like /ms aren't applied
09:29 FROGGS r: say so " " ~~ /<[\s]-[\n]>/
09:29 p6eval rakudo 112307: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling block : Unrecognized subtype 'zerowidth' in QAST::Regex cclass␤»
09:30 FROGGS r: say so " " ~~ /<[\s]>/
09:30 p6eval rakudo 112307: OUTPUT«True␤»
09:30 FROGGS okay, I dunno how
09:33 tipdbmp Why does "\n" ~~ /<[\s]-[\n]>/ give an error?
09:33 zjmarlow_ joined #perl6
09:33 FROGGS maybe its not a valid syntax of the regex
09:34 FROGGS the problem with perl6 regex is that you find pretty old stuff when googling for it
09:34 tipdbmp "b" ~~ /<[a..c]-[b]>/ # False
09:34 tipdbmp i.e it works.
09:35 FROGGS r: "b" ~~ /<[a..c]-[b]>
09:35 p6eval rakudo 112307: OUTPUT«===SORRY!===␤Regex not terminated at line 2, near ""␤»
09:35 FROGGS r: "b" ~~ /<[a..c]-[b]>/
09:35 p6eval rakudo 112307:  ( no output )
09:35 FROGGS r: say so "b" ~~ /<[a..c]-[b]>/
09:35 p6eval rakudo 112307: OUTPUT«False␤»
09:35 FROGGS r: say so "a" ~~ /<[a..c]-[b]>/
09:35 p6eval rakudo 112307: OUTPUT«True␤»
09:35 FROGGS hmmm
09:35 tipdbmp What's so? =)
09:35 tipdbmp boolean context?
09:35 FROGGS boolify the thing on the right
09:35 huf opposite of not
09:36 FROGGS r: say so " " ~~ /<[a-c]-[b]>/
09:36 p6eval rakudo 112307: OUTPUT«===SORRY!===␤Unsupported use of - as character range; in Perl 6 please use .. for range, for explicit - in character class, escape it or place as last thing at line 2, near "c]-[b]>/"␤»
09:36 FROGGS r: say so " " ~~ /<[a..c]-[b]>/
09:36 p6eval rakudo 112307: OUTPUT«False␤»
09:36 FROGGS r: say so " " ~~ /<[a..c]-[\n]>/
09:36 p6eval rakudo 112307: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling block : Unrecognized subtype 'zerowidth' in QAST::Regex cclass␤»
09:36 FROGGS bug?
09:37 FROGGS r: say so " " ~~ /\n/
09:37 p6eval rakudo 112307: OUTPUT«False␤»
09:37 FROGGS r: say so " " ~~ /<[\n]>/
09:37 p6eval rakudo 112307: OUTPUT«False␤»
09:37 FROGGS r: say so " " ~~ /<-[\n]>/
09:37 p6eval rakudo 112307: OUTPUT«True␤»
09:37 FROGGS r: say so " " ~~ /<[\n]-[a]>/
09:37 p6eval rakudo 112307: OUTPUT«False␤»
09:37 FROGGS hmmm
09:38 zjmarlow__ joined #perl6
09:41 domidumont joined #perl6
09:46 FROGGS made a bugreport
09:46 FROGGS but I hate that RT -.-
09:56 GlitchMr >>> "".join(sorted("qwertyuiop"))
09:56 GlitchMr oops
09:56 GlitchMr wrong paste
10:04 birdwindupbird joined #perl6
10:17 jnthn morning, #perl6
10:17 phenny jnthn: 17 Nov 22:46Z <[Coke]> ask jnthn you recently worked on a bug /like/ https://rt.perl.org/rt3/Ti​cket/Display.html?id=77064 (114362) - this one has slightly different expected (by the OP) behavior.
10:18 FROGGS hi jnthn
10:18 sorear good morning #jnthn
10:18 jnthn .oO( there's a channel where *I'm* the topic? oh my... :) )
10:20 FROGGS it is good as long as the ppl dont stop talking when your appear
10:20 FROGGS ;o)
10:21 jnthn :)
10:29 moritz joined #perl6
10:33 xenoterracide how can I ask the meta object what methods it has?
10:34 xinming joined #perl6
10:34 moritz r: my $meta := 1.HOW;  say $meta.HOW.method($meta)
10:34 p6eval rakudo 112307: OUTPUT«No such method 'method' for invocant of type 'NQPClassHOW'␤  in block  at /tmp/Twksu1eBCE:1␤␤»
10:34 moritz r: my $meta := 1.HOW;  say $meta.HOW.methods($meta)
10:34 p6eval rakudo 112307: OUTPUT«No such method 'gist' for invocant of type 'NQPRoutine'␤  in method gist at src/gen/CORE.setting:5031␤  in sub say at src/gen/CORE.setting:7460␤  in block  at /tmp/SXns63zmty:1␤␤»
10:35 moritz xenoterracide: did I understand correctly you want the meta object's methods, not the original object methods?
10:35 jnthn Like that, but NQP routines don't know much about Perl 6 :)
10:35 xenoterracide moritz: yeah, I was just reading your code
10:35 moritz xenoterracide: which code?
10:36 xenoterracide moritz: what you put for the p6 eval
10:36 moritz ah
10:38 xenoterracide though seems like currently doesn't work?
10:39 xenoterracide r: "".HOW.^methods
10:39 p6eval rakudo 112307:  ( no output )
10:39 xenoterracide r: say "".HOW.^methods
10:39 p6eval rakudo 112307: OUTPUT«No such method 'gist' for invocant of type 'NQPRoutine'␤  in method gist at src/gen/CORE.setting:5031␤  in sub say at src/gen/CORE.setting:7460␤  in block  at /tmp/ynvnAycnux:1␤␤»
10:39 moritz xenoterracide: oh, it works, it just doesn't work to print the list so easily
10:39 xenoterracide ah
10:40 moritz r: my @list := 1.HOW.^methods; say @list.elems
10:40 p6eval rakudo 112307: OUTPUT«163␤»
10:40 moritz r: my @list := 1.HOW.^methods; for ^@list.elems { say @list[$_].name }
10:40 p6eval rakudo 112307: OUTPUT«No such method 'name' for invocant of type 'NQPRoutine'␤  in block  at /tmp/GIFG9CdVRI:1␤␤»
10:41 moritz r: my @list := 1.HOW.^methods; for ^@list.elems { say ~@list[$_] }
10:41 p6eval rakudo 112307: OUTPUT«Cannot call 'prefix:<~>'; none of these signatures match:␤:(str $a)␤:(Str:D \a)␤:(\a)␤␤  in block  at /tmp/iomDBp53IZ:1␤␤»
10:41 * jnthn should use his copious amounts of travel time in the next couple of weeks to design a decent solution to this...
10:41 moritz r: my @list := 1.HOW.^methods; for ^@list.elems { say nqp::p6box_s(nqp::set__PS(@list[$_])) }
10:41 p6eval rakudo 112307: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling block : Error while compiling op call: Error while compiling op p6box_s: Error while compiling op set__PS: No registered operation handler …
10:42 moritz r: my @list := 1.HOW.^methods; for ^@list.elems { say nqp::p6box_s(nqp::assign__PS(@list[$_])) }
10:42 p6eval rakudo 112307: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling block : Error while compiling op call: Error while compiling op p6box_s: Error while compiling op assign__PS: No registered operation handl…
10:42 moritz r: my @list := 1.HOW.^methods; for ^@list.elems { say nqp::p6box_s(pir::set__PS(@list[$_])) }
10:42 p6eval rakudo 112307: OUTPUT«Null PMC access in set_string_native()␤  in block  at /tmp/O6TOw5lMrQ:1␤␤»
10:43 * xenoterracide thinks that someday $obj.^.^methods should work... it's the obvious?
10:44 moritz jnthn: could you explain QAST::Want to me? There are no docs for it.
10:45 moritz it seems to be some way to support coercion to a particular type/format/whatever
10:45 moritz but there's not much code for that
10:46 sisar joined #perl6
10:47 jnthn moritz: It's kind of like a switch statement based on context.
10:47 jnthn For example: QAST::Want.new( QAST::WVal.new(...), 'Ii', QAST::IVal.new(...) )
10:48 jnthn Here, we say that the default thing you get from this node is a WVal, but if the thing that will consume our result wants an integer (register or constant), then used the IVal instead.
10:49 jnthn QAST::Want.new( $past, 'v', QAST::Op.new( :op('call'), :name('&sink'), $past ) )
10:49 moritz doesn't that have to be QAST::BVal($past) for the last usage of $past?
10:50 jnthn This one says "normally emit just $past, but if we're in a void context (nothing will use the result), then instead emit the call
10:50 moritz I kind thought you're not allowed to reuse a qast tree just like that
10:50 moritz *kinda
10:51 jnthn The rules are a little more interesting than that. :)
10:51 jnthn But with Want, it promises to only ever actually follow one of the branches.
10:51 jnthn So re-use doesn't matter
10:51 moritz ok
10:51 jnthn Also $past need to have been a QAST::Block
10:51 jnthn The big problem with re-using a QAST::Block is you get the block compiled twice
10:51 moritz right
10:52 moritz so QAST::Want is a *compile time* switch statement, right?
10:52 jnthn Correct.
10:52 jnthn QAST::Compiler decides which child it wants.
10:53 jnthn For example, see the proto method in there, and also the stuff dealing with void context in compile_all_the_stmts
10:54 GlitchMr perl6: say 3 !!= 3
10:54 p6eval niecza v22-32-gee5dcf1: OUTPUT«[31m===[0mSORRY![31m===[0m��An infix may not start with !! at /tmp/xrDHn2vYHE line 1:�------> [32msay 3 !!=[33m�[31m 3[0m��Parse failed��»
10:54 p6eval ..rakudo 112307: OUTPUT«True␤»
10:54 GlitchMr Interesting
10:55 GlitchMr Niecza thinks it's second part of ternary operator. Rakudo thinks it's opposite of != (read: ==).
10:55 moritz jnthn: can i emit the equivalent of a nqp::can as QAST::Op(:op<can>) ?
10:55 GlitchMr std: say 3 !!= 3
10:55 p6eval std d38bbd0: OUTPUT«[31m===[0mSORRY![31m===[0m�An infix may not start with !! at /tmp/tx8ts3TtDN line 1:�------> [32msay 3 !!=[33m�[31m 3[0m�Parse failed�FAILED 00:00 42m�»
10:55 jnthn moritz: missing a .new :)
10:55 jnthn moritz: But yes.
10:55 moritz erm, yes
10:55 GlitchMr perl6: say 3 ![!=] 3
10:55 p6eval niecza v22-32-gee5dcf1: OUTPUT«Unhandled exception: Writing to readonly scalar␤  at /tmp/qPaAT14EIf line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4211 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4212 (module-CORE @ 578) ␤  at /home/p6eval/niecza/li…
10:55 p6eval ..rakudo 112307: OUTPUT«True␤»
10:55 moritz jnthn: because I just saw an QAST::VM.new(:pirop('can IPs'), ...)
10:56 GlitchMr std: say 3 ![!=] 3
10:56 jnthn moritz: ooh...kill it! :D
10:56 p6eval std d38bbd0: OUTPUT«ok 00:00 42m␤»
10:56 GlitchMr What is ![!=] anyway?
10:56 jnthn GlitchMr: You can always bracket parts of a meta-operator
10:57 GlitchMr And why it doesn't work in Niecza?
10:57 jnthn r: say (1,2,3) Z[*] (4,5,6)
10:57 p6eval rakudo 112307: OUTPUT«4 10 18␤»
10:57 jnthn No idea.
10:57 moritz maybe NYI
10:59 jnthn GlitchMr: If you had a ZTop operator and you wanted to use the Z meta-operator with it, but somebody had already created a ZZTop operator, you could be clear you wanted the meta-operator for doing Z[ZTop] for example.
11:16 dalek rakudo/nom: cecc9fa | moritz++ | src/Perl6/Actions.pm:
11:16 dalek rakudo/nom: replace QAST::VM with QAST::Op
11:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cecc9faa60
11:20 sunnavy joined #perl6
11:30 zjmarlow__ joined #perl6
11:34 spider-mario joined #perl6
11:39 Su-Shee joined #perl6
11:39 Su-Shee hello everyone.
11:39 FROGGS hi
11:39 moritz \o FROGGS, Su-Shee
11:51 GlitchMr Just wondering, what editors are people on this channel for Perl 6?
11:52 GlitchMr Personally, I use Kate, but I'm wondering what other people use.
11:54 GlitchMr using for Perl 6*
12:07 jnthn GlitchMr: notepad++ here
12:07 jnthn Stockholm &
12:09 * xenoterracide wonders why multi methods are explicit rather than implicit
12:13 xinming joined #perl6
12:17 Moukeddar joined #perl6
12:18 bowtie joined #perl6
12:27 Kharec joined #perl6
12:27 moritz xenoterracide: to catch accidental redeclaration of methods
12:36 Psyche^ joined #perl6
13:13 PacoAir joined #perl6
13:19 xinming joined #perl6
13:22 whiteknight joined #perl6
13:27 _ilbot joined #perl6
13:27 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
13:28 tipdbmp How does one check if a file exists?
13:28 moritz r: say 'star/version'.path.e
13:28 p6eval rakudo cecc9f: OUTPUT«True␤»
13:29 moritz r: say 'nosuchfile'.path.e
13:29 p6eval rakudo cecc9f: OUTPUT«False␤»
13:29 tipdbmp Okay, tnx (vim 7.3 here, with the awesome perl6 syntax highlighting :P [which kinda laggs?])
13:36 dalek rakudo/qast-sink-1: 5ad032d | moritz++ | src/Perl6/Actions.pm:
13:36 dalek rakudo/qast-sink-1: first cut at sink context
13:36 dalek rakudo/qast-sink-1:
13:36 dalek rakudo/qast-sink-1: compiles the setting, but fails during startup
13:36 dalek rakudo/qast-sink-1: review: https://github.com/rakudo/rakudo/commit/5ad032d5f0
13:54 SamuraiJack_ joined #perl6
13:55 nwc10 jnthn: forgot to say. I'd infer Rakudo uses more memory (again) as a couple of days ago the Raspberry Pi took just over 24h to build Rakudo
13:55 nwc10 anyway, good news
13:55 nwc10 rummaging round Andrea's mum's store of goodies looking for the power supply for an old parallel port scanner, bumped into a(nother) 5V micro USB power supply.
13:56 nwc10 So that now means I no longer have to *return* the phone charger I need to steal to power the external hard drive
13:56 nwc10 (network swap fails badly. Suspect dodgy USB drivers)
13:57 nwc10 also, curiously t-mobile used micro USB about a decade ago, but then switched *from* it to something custom
14:00 FROGGS nwc10: t-mobile is not a vendor, just a reseller
14:04 xinming joined #perl6
14:11 nwc10 aha
14:29 dayangkun joined #perl6
14:36 jaldhar joined #perl6
15:04 imarcusthis joined #perl6
15:17 Chillance joined #perl6
15:26 TimToady tipdbmp: maybe you're looking for \h, horizontal whitespace
15:27 TimToady n: say 3 ![!==] 3
15:28 p6eval niecza v22-32-gee5dcf1: OUTPUT«True␤»
15:28 TimToady the problem with ![!=] in niecza is probably that != is a shorthand for !==
15:28 TimToady but it's not sufficiently high-order to be used inside somehow
15:29 TimToady or it just doesn't do the translation at the right spot
15:30 TimToady also, it's not that it's confusing !! with the ternary operator, but that there is an explicit rule forbidding !! so that we *can* catch a missing ??
15:37 zjmarlow__ joined #perl6
15:54 tipdbmp What are the equivalents for __FILELINE/PACKAGE__?
15:59 skids joined #perl6
16:05 moritz r: say $?LINE
16:05 p6eval rakudo cecc9f: OUTPUT«1␤»
16:05 moritz r: say ::?PACKAGE
16:05 p6eval rakudo cecc9f: OUTPUT«GLOBAL()␤»
16:05 moritz r: say $?FILE
16:05 p6eval rakudo cecc9f: OUTPUT«/tmp/AmekjwEERe␤»
16:10 Su-Shee moritz: are you doing a talk in march at the german perl workshop?
16:12 moritz Su-Shee: I haven't submitted one yet
16:12 Su-Shee moritz: will you/are you planning to?
16:13 moritz Su-Shee: not sure yet what to talk about
16:13 SamuraiJack joined #perl6
16:13 moritz Su-Shee: but it's likely that I'll attend, and at least submit one
16:14 Su-Shee it's a very nice location. ;)
16:16 moritz Su-Shee: and you still owe me a nougat trouffle :-)
16:16 moritz *truffle
16:16 Su-Shee moritz: I'm planning to attend, it's basically served to me with a red carpet around the corner where I live, it can't get any more convenient :)
16:17 Su-Shee moritz: if you drop a hint in time, I can deliver ;)
16:19 SamuraiJack joined #perl6
16:23 wamba joined #perl6
16:31 ChoHag joined #perl6
16:34 bapa joined #perl6
16:35 pmurias joined #perl6
16:35 pmurias hi
16:35 pmurias jnthn: what's the difference between orig and target on a cursor?
16:43 raiph joined #perl6
17:00 snearch joined #perl6
17:01 snearch joined #perl6
17:04 snearch joined #perl6
17:04 s1n joined #perl6
17:05 hash_table joined #perl6
17:07 snearch joined #perl6
17:09 wamba joined #perl6
17:10 snearch joined #perl6
17:23 moritz Su-Shee: I will :-)
17:29 ChoHag joined #perl6
17:32 jnthn evening o/
17:33 moritz \o jnthn
17:33 moritz I've now decided that for developing sink context, I'll only enable it with a command line option
17:33 moritz so that I don't have to debug the sunk-compiled setting first
17:33 jnthn phenny: tell pmurias orig is whatever the original input string was; target is it transcoded into something fixed width so we can scan it quickly.
17:33 phenny jnthn: I'll pass that on when pmurias is around.
17:34 jnthn moritz: Sounds sane.
17:36 jnthn nwc10: There's various things that could have made a difference, but it's hard to think of anything that'd make a really huge one.
17:57 pmurias joined #perl6
18:04 pmurias jnthn: thanks
18:04 phenny pmurias: 17:33Z <jnthn> tell pmurias orig is whatever the original input string was; target is it transcoded into something fixed width so we can scan it quickly.
18:07 pmurias jnthn: I'm implementing rules in js, and I'm not sure how to implement backtracking into rules, in pir there seems to be a stack of labels but I can't implement that in js
18:08 jnthn pmurias: You can do it with an integer and switch statement.
18:09 jnthn And just keep a stack of integers.
18:10 jnthn (the labels become case statements, and then you just fall through)
18:11 pmurias that would work
18:16 dalek rakudo/qast-sink-1: 3f12074 | moritz++ | src/ (3 files):
18:16 dalek rakudo/qast-sink-1: only sink when --sink command line option is provided
18:16 dalek rakudo/qast-sink-1: review: https://github.com/rakudo/rakudo/commit/3f12074d13
18:18 pmurias viv works by having rules return lists of cursors?
18:19 jnthn Lazy lists.
18:20 jnthn In NQP, it always returns a cursor, which keeps around enough to know how to produce the next cursor if backtracking happens.
18:21 pmurias and how does niecza do it?
18:21 jnthn Not sure
18:28 jaldhar joined #perl6
18:31 jnthn time to find some dinner &
18:31 pmurias what is cstack?
18:31 moritz pmurias: capture stack
18:32 moritz pmurias: it somehow[tm] tracks where each capture begins and ends
18:32 jnthn actually, c can also stand for cursor. it's cursors that live on it :)
18:32 jnthn and the cursors know where the match started/ended. :)
18:32 jnthn really ogne & :)
18:50 spider-mario joined #perl6
18:52 zjmarlow__ joined #perl6
19:24 imarcusthis joined #perl6
19:42 imarcusthis joined #perl6
19:47 tadzik oh hai
19:48 moritz oh tadzik
19:48 tadzik oh shark
19:50 colomon_ joined #perl6
19:51 colomon_ joined #perl6
19:52 colomon_ joined #perl6
19:52 colomon_ joined #perl6
19:53 colomon_ joined #perl6
19:54 rurban_ joined #perl6
19:55 rurban_ we got a little problem with parrot threads and empty parents in Parrot_interp_new() #856
19:56 thou joined #perl6
19:57 rurban_ I've "fixed" parrot threads now for https://github.com/parrot/parrot/issues/856 on darwin. But we need to disallow subsequent empty parents for Parrot_interp_new(). Is this a problem? The workaround is to create a master interp and the childs have this as parent.
20:06 diakopter why? (curious)
20:16 GlitchMr joined #perl6
20:22 dalek roast: 60042a9 | moritz++ | S03-metaops/zip.t:
20:22 dalek roast: RT #73948: Z, flattens in list context
20:22 dalek roast: review: https://github.com/perl6/roast/commit/60042a9ca0
20:22 sorear good * #perl6
20:22 moritz good morning sorear
20:24 * jnthn back
20:24 jnthn o/ sorear
20:24 mathw \o/ wonderful people hello \o/
20:25 tadzik hello hello :)
20:25 moritz btw basic sinking works now
20:25 jnthn rurban_: I don't think we call that anywhere directly in NQP or Rakudo...unless you know otherwise. :)
20:25 jnthn moritz: yay!
20:26 jnthn moritz: Does it still bust setting compilation?
20:26 moritz note that I only sink subcalls and method calls for now
20:26 moritz jnthn: yes
20:26 jnthn Any clues why?
20:26 rurban_ jnthn: I just committed a better fix. No API changes needed. I just clarified a corner case with empty parents.
20:27 * jnthn is a bit surprised it does so, having looked at the patch.
20:27 moritz https://gist.github.com/4107222
20:28 moritz jnthn: last I looked, it died during startup while concatenating some paths
20:28 moritz seems one of them was a Failure
20:28 jnthn Oh..
20:29 sorear mathw: \o/ its been a while
20:29 mathw sorear: busy busy busy!
20:29 sorear btw, does anyone remember TimTom?
20:29 jnthn Maybe it is actually a case of something putting a Failure in sink context (e.g. the bug is a bad assumption in the setting)
20:29 moritz jnthn: yes, maybe
20:29 rurban_ darwin: libtool -static -o libdyncall_s.a dyncall_vector.o dyncall_api.o dyncall_callvm.o dyncall_callvm_base.o dyncall_struct.o dyncall_callf.o dyncall_call.o. libtool: unrecognized option `-static'
20:31 geekosaur "darwin"?  OS X?
20:32 moritz std: 42
20:32 p6eval std d38bbd0: OUTPUT«ok 00:00 41m␤»
20:32 mathw Is anybody aware of any XML parsing work in Perl 6?
20:32 rurban_ ar -r works fine
20:33 brrt1 joined #perl6
20:33 moritz jnthn: what do you think of extending the QAST::Want mechanism to closures, so that you do something like  QAST::Want.new(QAST::IVal.new(:value(42)), 'v', sub { warn "Useless use of Int 42 in sink context" })  ?
20:34 jnthn moritz: Doesn't sound too crazy.
20:35 jnthn moritz: Question is what it evaluates to...
20:35 * mathw notes: look first, THEN ask
20:35 jnthn As in, does it in this case just emit nothing?
20:35 jnthn Guess it could...
20:36 jnthn mathw: Maybe look on modules.perl6.org :P
20:36 mathw jnthn: yeah I'm not moving at top speed this evening...
20:36 moritz jnthn: well, if the closure returned a QAST::Node, it could be used, otherwise nothing is emitted
20:36 jnthn moritz: wfm
20:37 tadzik mathw: yeah, I've heard of like 2 implementations
20:37 mathw it was inevitable somebody would do it
20:37 moritz $ ./perl6 -e ''
20:37 moritz ===SORRY!===
20:37 moritz postcircumfix:<{ }> not defined for type Failure
20:37 mathw I'm just very glad that if I want to try what I want to try I don't have to write an XML parser first
20:37 mathw 'write an XML parser' is pretty far down my List Of Fun Things To Do With Perl 6
20:37 tadzik mathw: http://feather.perl6.nl/~sergot/modules/ shows test results next to names :)
20:37 tadzik may be of help
20:38 moritz my $prefix := $VM<config><libdir> ~ $VM<config><versiondir> ~ '/languages/perl6';
20:38 moritz that's the line that dies
20:38 moritz r: say $*VM<config>
20:38 p6eval rakudo cecc9f: OUTPUT«("git_describe" => "RELEASE_4_8_0", "sha1" => "7847e55203a7e06a54dc146fed5590751869ff05", "a" => ".a", "ar" => "ar", "ar_extra" => "", "ar_out" => "", "archname" => "i486-linux-gnu-thread-multi-64int", "arflags" => "cr", "as" => "as", "backtrace" => "1", "bigendian…
20:40 jnthn r: say $*VM<config><libdir>.WHAT
20:40 p6eval rakudo cecc9f: OUTPUT«Str()␤»
20:40 jnthn r: say $*VM<config><versiondir>.WHAT
20:40 p6eval rakudo cecc9f: OUTPUT«Str()␤»
20:40 jnthn moritz: Wait, why $VM not $*VM?
20:40 moritz it complains about postcircumfix:<{ }>
20:41 moritz jnthn: it's the place where $*VM is installed
20:41 jnthn ah, ok
20:41 moritz jnthn: and there it's also available as $VM
20:41 jnthn --ll-exception?
20:41 moritz that's where I got the line from :-)
20:41 jnthn r: Failure.sink
20:41 p6eval rakudo cecc9f: OUTPUT«Cannot look up attributes in a type object␤  in method <anon> at src/gen/CORE.setting:10154␤  in  at src/gen/Metamodel.pm:2401␤  in any find_method_fallback at src/gen/Metamodel.pm:2389␤  in any find_method at src/gen/Metamodel.pm:925␤  in block  at /tmp/zMp2OuZ32w…
20:42 jnthn Failure.new.sink
20:42 jnthn r: Failure.new.sink
20:42 p6eval rakudo cecc9f: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in method new at src/gen/CORE.setting:10126␤  in block  at /tmp/NV9fvtps0q:1␤␤»
20:42 jnthn r: Failure.new("oh noes").sink
20:42 p6eval rakudo cecc9f: OUTPUT«No such method 'throw' for invocant of type 'Str'␤  in method <anon> at src/gen/CORE.setting:10154␤  in  at src/gen/Metamodel.pm:2401␤  in any find_method_fallback at src/gen/Metamodel.pm:2389␤  in any find_method at src/gen/Metamodel.pm:925␤  in block  at /tmp/yqh…
20:42 jnthn bah :)
20:42 moritz r: sub f() { fail('foo') }; f().sink
20:42 p6eval rakudo cecc9f: OUTPUT«foo␤  in method <anon> at src/gen/CORE.setting:10154␤  in  at src/gen/Metamodel.pm:2401␤  in any find_method_fallback at src/gen/Metamodel.pm:2389␤  in any find_method at src/gen/Metamodel.pm:925␤  in block  at /tmp/liw_tfK1n6:1␤␤»
20:44 moritz r: say Failure.^methods(:local)
20:44 p6eval rakudo cecc9f: OUTPUT«new BUILD defined Int Num Numeric Bool Str gist <anon>␤»
20:44 moritz no sink yet; it triggers the exception through the fallback method
20:45 jnthn ah, ok
20:45 jnthn Thing is...the line we're looking at does a bind, not a call
20:46 jnthn Unless the issue is with setting $VM somehow
20:46 moritz it does lots of calls
20:46 moritz two to infix:<~>
20:46 moritz several to postcircumfix:<{ }>
20:46 jnthn Yes but the statement itself isn't a call?
20:46 moritz no, it's not
20:47 jnthn oh, we're just transforming all calls...
20:47 jnthn But yeah, that still should certainly not come out vid.
20:47 jnthn *void
20:47 moritz (I sink calls at the QAST level)
20:47 moritz well, now I'm trying to get more debug info out of it
20:48 jnthn Try doing a say $VM.WHAT before that line.
20:48 jnthn Or a $VM.perl
20:55 moritz $VM: Block.new()
20:55 armitage81 joined #perl6
20:56 jnthn hm, so something broke the hash/block distinction
21:15 moritz jnthn: does that use the $past<bare_block> mechanism?
21:16 cotto gcc 4.7.2 doesn't seem to like variables named "typeid", which breaks nqp
21:17 xenoterracide can I mix in roles at new?
21:17 moritz cotto: does it dislike type_id too?
21:17 jnthn moritz: Hm, perhaps. I'm pretty sure it looks at calls to infix:<,> and maybe infix:<=>>
21:17 jnthn moritz: If the calls are getting wrapped, perhaps it's that.
21:18 cotto moritz, checking
21:18 moritz jnthn: right
21:18 jnthn cotto: meh /
21:18 jnthn :/
21:18 cotto moritz, it seems happy with type_id
21:18 moritz then it's an easy fix
21:18 moritz seems to be just one place
21:18 jnthn sigils++ # avoid this problem
21:18 cotto It also requires either -fpermissive or some void* casts.
21:19 jnthn requires?
21:19 jnthn Or just warns without?
21:19 cotto explodes without
21:19 jnthn Where, ooc?
21:20 cotto VTABLE_set_pointer in nqp_dynop_setup
21:21 moritz jnthn: in fact it checks elements under $past<past_block>
21:21 jnthn moritz: Yeah, but that should be fine?
21:21 jnthn I think that's happening is it looks at the top level call
21:21 jnthn And now that top level call is wrapped
21:21 jnthn In a QAST::Want
21:21 cotto a couple places in repr_registry.c (177, 209)
21:21 moritz not if $past is now a QAST::Want
21:22 moritz or does QAST::Want forward that stuff?
21:22 jnthn No
21:22 moritz should it, maybe?
21:22 jnthn But...I thought we just wrapped stuff at the top of the statement list?
21:22 moritz right
21:24 jnthn my $elem := $past<past_block>[1][0][0];
21:25 jnthn This looks into the second node of the block, gets the first (and only) statement, and then tries to take it out of the QAST::Stmt node
21:25 jnthn Now there's a QAST::Want in the way as well.
21:25 moritz $elem := $elem[0] if $elem ~~ QAST::Want
21:25 jnthn Riht.
21:25 jnthn *right
21:25 FROGGS +
21:25 rurban_ joined #perl6
21:25 moritz FROGGS: right :-)
21:26 * moritz tries
21:30 Kharec joined #perl6
21:33 moritz yay, unbroken \o/
21:34 dalek rakudo/qast-sink-1: 5574863 | moritz++ | src/core/Failure.pm:
21:34 dalek rakudo/qast-sink-1: Failure.sink makes the exception blow up
21:34 dalek rakudo/qast-sink-1: review: https://github.com/rakudo/rakudo/commit/557486333a
21:34 dalek rakudo/qast-sink-1: 3ee7808 | moritz++ | src/ (2 files):
21:34 dalek rakudo/qast-sink-1: unbreak Hash/Block distinction
21:34 dalek rakudo/qast-sink-1: review: https://github.com/rakudo/rakudo/commit/3ee7808a0b
21:37 jnthn \o/
21:37 jnthn Now for the spectest ;)
21:37 moritz I'm building on my quadcore server now
21:38 moritz to spectest there
21:38 jnthn :)
21:38 moritz and I've locally reverted 3f12074d13a51b2602039ece5f95454055e8abd0 first
21:38 moritz so that it sinks by default
21:38 jnthn Wow, having sink context in this next relesae too would be awesome :)
21:39 moritz hm, four days until the compiler release
21:39 moritz not unthinkable, but not a give either
21:39 moritz *given
21:43 jnthn aye
21:43 brrt joined #perl6
21:43 moritz and I don't know how easy or hard it will be to write a proper List.sink that does more than .eager
21:45 jnthn moritz: I guess mostly it's not keeping the results of the block around.
21:45 brrt r: my %hash = (foo => 'bar', quix => 'quam); say %hash.perl
21:45 p6eval rakudo cecc9f: OUTPUT«===SORRY!===␤Unable to parse expression in quote:sym<apos>; couldn't find final "'" at line 2, near ""␤»
21:46 moritz though as a first step, forwarding .sink to .eager might not be too bada first approximation
21:46 moritz brrt: missing closing quote after 'quam
21:46 brrt my %hash = (foo => 'bar', quix => 'quam'); say %hash.perl;
21:46 brrt thanks moritz :-)
21:46 brrt r:my %hash = (foo => 'bar', quix => 'quam'); say %hash.perl;
21:47 brrt r: my %hash = (foo => 'bar', quix => 'quam'); say %hash.perl;
21:47 p6eval rakudo cecc9f: OUTPUT«("foo" => "bar", "quix" => "quam").hash␤»
21:47 brrt is a parcel or a closure the prefered way to make a hash?
21:47 moritz it seems sinking breaks autothreading right now
21:48 moritz brrt: use () for a flattening hash and {} for a hash in an item
21:49 brrt right, flattening, i forgot :-)
21:49 moritz or at least some autothreading tests
21:51 moritz anyway, sleep&
21:54 jnthn 'night
22:16 Pleiades` joined #perl6
22:18 xenoterracide http://privatepaste.com/3faa6928f5 seems that whatever arch rebuilt parrot for broke the ability to build rakudo...
22:18 xenoterracide I guess I should try a few other things
22:19 lue just out of curiosity, where did you run that build command?
22:20 zjmarlow__ joined #perl6
22:21 qu1j0t3 joined #perl6
22:23 qu1j0t3 hey, what's the impl language for perl6 these days?
22:23 qu1j0t3 is hugs still used much?
22:23 qu1j0t3 i mean the compiler
22:24 qu1j0t3 p6 compiler(s)*
22:24 masak qu1j0t3: Niecza is implemented in C# and Perl 6 on the CLR.
22:24 jnthn Rakudo is largely written in Perl 6 and NQP, plus some C low level bits.
22:24 jnthn Nie...ah, masak got their first.
22:24 jnthn (NQP being a Perl 6 subset)
22:24 xenoterracide lue: my home directory
22:24 qu1j0t3 masak: jnthn thanks.
22:25 masak qu1j0t3: given your question, I'm gussing you last paid attention to Perl 6 around 2005-2006 ;)
22:25 qu1j0t3 so Hugs is kind of out of the picture? it's /that/ long ago that I lurked here.
22:25 qu1j0t3 masak: well deduced, sir.
22:25 jnthn (and nqp is written in itself and bootstrapped these days)
22:25 lue Ah. I was thinking maybe it was some weirdness with running inside the git repo.
22:25 masak qu1j0t3: you might be thinking of Pugs, Perl 6 implemented on top of Haskell.
22:25 masak pugs: say "still alive!"
22:25 p6eval pugs: OUTPUT«still alive!␤»
22:25 lue (specifically, rakudo's)
22:25 qu1j0t3 yes, Pugs.
22:25 qu1j0t3 Pugs ran in Hugs, right?
22:26 sorear pugs these days runs on GHC
22:26 masak it has a REPL looking very much like Hugs's.
22:26 qu1j0t3 sorear: ah! thanks.
22:26 qu1j0t3 how current is pugs?
22:26 sorear pugs has been mostly unmaintained for a couple years
22:27 masak well, it's been maintained in an amortizing kind of way, keeping it up-to-date with the latest GHCs.
22:28 masak oh wait, that's the opposite of amortizing, isn't it? :)
22:28 sorear I do not think I have heard amortizing used that way before
22:28 masak au++'s been paing the GHC rent on it but not implementing new stuff, nor tracking the Perl 6 spec as it changed.
22:28 masak paying*
22:28 sorear Audrey is in any case not been much involed in pugs lately
22:29 Moukeddar joined #perl6
22:29 sorear that was almost grammatical
22:29 jnthn .oO( a-mort-izing: non-death-maintaining )
22:29 * xenoterracide attempts a nom/gen-nqp to see if it's been fixed more recnetly
22:29 sorear Moukeddar! \o/
22:29 Moukeddar o/ sorear
22:29 masak jnthn: actually, the etymology has to do with "mort"="death"
22:29 jnthn Oh!
22:29 masak Moukeddar! \o/
22:29 Moukeddar i just funished implementing a simple messaging Bus :)
22:29 Moukeddar masak, o/ , Ma man!
22:30 jnthn I thought I was punning, but no, etymology got their first.. :P
22:30 jnthn *there...wow.
22:30 * masak .oO( etymology also got they're first )
22:30 jnthn I guess I should sleep given I'm meant to teach in the morning. :)
22:30 jnthn 'night, #perl6
22:30 masak 'night, jnthn.
22:30 Moukeddar night jnthn
22:31 sorear jnthn means to teach in the morning?
22:32 sorear this may prove a useful verb
22:32 lue xenoterracide: I just tried compiling rakudo-debugger, and it worked. (With non-gen'd nqp and parrot). The only differences I notice is that 1) I seem to be using the rakudo, etc. from /usr/local/bin, and 2) I compiled straight from the repo, and I don't think you did, judging from the paste.
22:32 Moukeddar did i log into the wrong room ? Etymology ?
22:32 qu1j0t3 sorear: certainly vowel-conserving.
22:33 qu1j0t3 Moukeddar: i'd have thought that literary digressions were assured with TimToady around.
22:33 masak Moukeddar: we're all a bit interested in languages here.
22:33 masak 'night, #perl6
22:33 qu1j0t3 linguistic*
22:33 qu1j0t3 masak: ciao. thanks.
22:33 xenoterracide lue:I'm building from repo now, but I was building from the AUR pkgbuilds, arch maintains parrot, but I think they may have broken something today
22:34 Moukeddar welln #perl6 just keeps amazing me ^_^
22:34 xenoterracide or this has to do with what was being talked about earlier
22:34 * sorear keeps confusing AUR with AUD
22:35 lue Ah. Well, I use gentoo, but the rakudo toolchain is one of the couple of things I keep updated myself :) (along with lilypond and the latest LLVM)
22:35 * xenoterracide tries --gen-parrot too
22:38 xenoterracide I abandoned gentoo ages ago, but the OS isn't really here nor there, if doing --gen-parrot works then I'll probably have to figure out what changed when they rebuilt parrot
22:44 brrt left #perl6
22:50 whiteknight joined #perl6

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

Perl 6 | Reference Documentation | Rakudo