Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-12-15

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:06 araujo joined #perl6
00:11 * raydiak surfs around perltricks.com and gets the idea to try "watch 'perl6 -c ...'" in spite of the protesting noise from the cpu fan
00:17 atroxaper joined #perl6
00:17 prime joined #perl6
00:59 pyrimidine joined #perl6
01:18 dayangkun joined #perl6
01:23 sunnavy joined #perl6
01:25 mtj_ joined #perl6
01:25 raiph joined #perl6
01:38 pyrimidine joined #perl6
01:42 petercommand joined #perl6
01:43 mtj_ joined #perl6
01:43 Guest43464 joined #perl6
01:49 atroxaper joined #perl6
02:09 JimmyZ left #perl6
02:11 JimmyZ joined #perl6
02:13 perltricks joined #perl6
02:15 rmgk_ joined #perl6
02:35 hagiri joined #perl6
02:57 pyrimidine joined #perl6
03:05 uncle joined #perl6
03:06 noganex joined #perl6
03:18 gtodd left #perl6
04:27 kaleem joined #perl6
04:47 aborazmeh joined #perl6
04:52 Timbus how do you declare a class that inherits from a different metaclass than MM::ClassHOW?
04:52 TimToady um, rule does *not* have backtracking
04:53 Timbus im working on data bindings again, wh- what
04:53 Timbus oh
04:53 * TimToady is reading Day 15
04:55 kurahaupo joined #perl6
04:55 TimToady and I believe this was pointed out earlier.  regex has backtracking, rule does not
04:59 Timbus i feel like perl 6 prefers to put mutable state data in hashes. maybe its more logical to extend a hash and hook the key access methods to trigger change events? or something along those lines.
05:01 TimToady usually that means you just want to has-a hash
05:03 TimToady the reason the rule thing works is LTM, not backtracking
05:03 kaare_ joined #perl6
05:04 TimToady so the explaining of rule is bascically completel bogus
05:04 TimToady modulo spelling
05:07 atroxaper joined #perl6
05:10 TimToady though the trace is troublesome, since LTM ought to have bypassed the dna and rna rules in favor of the longer match of the aa rule
05:16 TimToady LTM can backtrack on a complete rule if the rule falsifies itself after the NFA part of the match, but that's not what's happening here
05:17 TimToady the NFA should be picking the correct winner as the first try
05:17 TimToady so there's probably a bug hiding in here somewhere
05:18 TimToady so it's really the proto that is backtracking here, not the rules
05:19 TimToady and, while it's nice that the proto is backtracking and producing a correct result, the NFA is not deciding the fate as it as designed to
05:19 TimToady *was
05:19 TimToady can't type tonight...
05:41 TimToady yes, there's definitely a bug in NFA compilation—it's ignoring the character classes and giving '' as the longest token of each rule
05:42 TimToady doesn't matter if I change them to tokens
05:43 TimToady perhaps some interaction with the quantifier, though you'd think '+' would be pretty easy to handle...
05:48 KCL_ joined #perl6
05:50 xinming joined #perl6
06:01 xinming joined #perl6
06:16 kaare_ joined #perl6
06:19 mr-foobar joined #perl6
06:33 [Sno] joined #perl6
06:34 adu joined #perl6
06:44 bjz joined #perl6
06:55 atroxaper joined #perl6
06:58 TimToady more info, it successfully creates the individual NFAs for the three rules, but by the time it goes to merge them, the calculated sub-NFAs seem to be empty
06:58 Isp-sec joined #perl6
07:00 telex joined #perl6
07:01 * TimToady is happy the grammar succeeded, but Very Sad that it succeeded for the wrong reasons...
07:07 xinming joined #perl6
07:08 kaleem joined #perl6
07:08 tinyblak joined #perl6
07:13 Alina-malina joined #perl6
07:14 gfldex joined #perl6
07:19 jluis joined #perl6
07:21 TimToady the rule basically appears to fail nqp::can($meth, 'NFA')
07:21 TimToady so the NFA seems to not get attached right
07:25 FROGGS joined #perl6
07:44 cognominal joined #perl6
07:44 Alina-malina joined #perl6
07:52 vti joined #perl6
08:03 rurban_ joined #perl6
08:04 TimToady bizzare, when we set the NFA, the code object can find the NFA method, but by the time we get into mergesubrule, it can't
08:04 zakharyas joined #perl6
08:05 jnthn morning, #perl6
08:05 FROGGS morning
08:05 TimToady o/
08:05 jnthn Urgh....early
08:05 jnthn But at least I have unlimited free coffee on the train :)
08:05 * TimToady has a weird NFA bug, discovered accidentally by Day 15
08:06 jnthn TimToady: It happens normally, not when Grammar::Tracer is involved, yes?
08:06 TimToady yes
08:07 TimToady the NFA method seems to disappear
08:07 jnthn Can you $code_obj.HOW.name($code_obj) in the NQP code?
08:07 jnthn So we can see what we actually end up with?
08:07 TimToady sure
08:09 nwc10 jnthn: this is to compensate for that fact that the train will never arrive?
08:09 jnthn I forgot to set the ROWS and COLUMNS envvars lsat night when trying to debug that qq:x issue
08:09 TimToady will also do it to $meth in the merge
08:09 jnthn nwc10: So far, it's actually on time...but there's plenty of time for that to change yet :)
08:10 jnthn Alas, it still didn't segv yet
08:12 jnthn ooh, now it did
08:12 TimToady aha, in store_regex_nfa, we have a Regex, while in mergesubrule we have a Method
08:13 TimToady dunno what that means offhand, though...
08:14 TimToady that's Perl 6's store_regex_nfa, btw
08:14 TimToady not nqp's
08:14 jnthn Well, that probably means it's a different code object...
08:15 TimToady or got reblessed somehow
08:15 jnthn That never happens in that direction
08:15 jnthn Only can get more derived, andeven then the only place that actually does it is a mixin.
08:16 * TimToady doesn't understand how this works most of the time, but not in this relatively normal usage, with a proto token and 3 normalish multi tokens; we do this sort of thing all the time in our parsing, and you'd think we'd've noticed if it were pervasively wrong
08:17 rindolf joined #perl6
08:18 TimToady it is certainly not the case that we're losing all our multi NFAs in NQP, and I don't think we're losing 'em in Perl 6 either, or we couldn't pass our LTM tests
08:18 jnthn Well, it cold be Rakudo-specific, but...right, all the passing tests.
08:19 TimToady could find_method be finding the wrong method somehow?
08:20 jnthn Feels unlikely.
08:21 * TimToady may have to sleep on this
08:23 jnthn *nod*
08:23 jnthn I got the OSX SEGV caught, and am looking into what happens.
08:24 jnthn Or the latest OSX SEGV, anyways...
08:25 TimToady what's nqp for getting the address of something as a number?
08:26 TimToady or do we support .WHERE?
08:26 TimToady all I see is eqaddr
08:28 TimToady oh, nqp::where, duh
08:28 atroxaper joined #perl6
08:28 jnthn That one, yes
08:29 jnthn Though you may prefer nqp::which or so which gives a stable object identifier that won't go changing simply because the GC moved the object.
08:29 jnthn Meanwhile...it seems we might be stack-scribbling at a distance in qqx
08:30 moritz qqx/ dd if=/dev/zero of=/dev/mem bs=1G /
08:30 moritz stack-scribbling at a distance in qqx!
08:31 jnthn :P
08:33 brrt joined #perl6
08:38 pdcawley joined #perl6
08:41 TimToady there doesn't seem to be a registered which handler
08:41 TimToady the addresses do seem to be different
08:41 jnthn m: nqp::which(Mu)
08:41 camelia rakudo-moar 795a32: OUTPUT«===SORRY!===␤No registered operation handler for 'which'␤»
08:41 jnthn m: nqp::objectid(Mu)
08:41 camelia rakudo-moar 795a32: ( no output )
08:41 jnthn Ah, it's that. Sorry.
08:42 jnthn But yeah, I can't imagine it'd be the same object. So...weird.
08:42 jnthn Darn, guardmalloc + stack logs = slow :)
08:43 TimToady the addresses are about 670 k aprt
08:44 jnthn Well, that means they could be in the same semispace...
08:44 jnthn If they're nursery addresses.
08:45 TimToady the object id's are different too
08:46 jnthn OK, then it's certainly different objects.
08:46 * TimToady will give up now and sleep
08:47 * jnthn trucks on with hunting the OSX fail
08:48 blackbolt joined #perl6
08:51 jnthn Darn. It didn't SEGV once I turned on the stack logs :(
08:52 * jnthn tries again just in case he got unlucky...
08:53 darutoko joined #perl6
08:54 blackbolt hi, how can I do in the terminal "to continue press key", then something like "readkey"
08:55 jnthn say "to continue press key"; $*IN.getc;
08:56 blackbolt thanks
08:58 abraxxa joined #perl6
09:07 ptc_p6 joined #perl6
09:13 masak good antenoon, #perl6
09:14 jnthn o/ amsak
09:14 jnthn uh, masak
09:15 masak m: $_ = "amsak"; s/(.)(.)/$1$0/; .say
09:15 camelia rakudo-moar 795a32: OUTPUT«masak␤»
09:17 jnthn :P
09:17 BigBear joined #perl6
09:18 masak http://c2.com/cgi/wiki?LispMacro is on HN right now. https://news.ycombinator.com/item?id=8750455
09:20 mvuets joined #perl6
09:20 tinyblak joined #perl6
09:22 ppant joined #perl6
09:23 dakkar joined #perl6
09:24 tinyblak joined #perl6
09:29 erkan joined #perl6
09:35 anaeem1_ joined #perl6
09:48 pkpant joined #perl6
09:52 tinyblak joined #perl6
09:56 tinyblak_ joined #perl6
10:11 pecastro joined #perl6
10:13 rurban joined #perl6
10:15 dalek nqp: f4edca2 | jnthn++ | tools/build/MOAR_REVISION:
10:15 dalek nqp: Bump MOAR_REVISION to get openpipe fixes.
10:15 dalek nqp: review: https://github.com/perl6/nqp/commit/f4edca2274
10:18 dalek rakudo/nom: 4d2710e | jnthn++ | tools/build/NQP_REVISION:
10:18 dalek rakudo/nom: Bump NQP_REVISION for latest MoarVM.
10:18 dalek rakudo/nom:
10:18 dalek rakudo/nom: Includes fixes for a qqx related crash that often showed up on OSX.
10:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4d2710e3f2
10:19 * jnthn wonders if this will make it into the Coke daily...
10:20 jnthn Well, tomorrow it will, if not today :)
10:26 * moritz wonders if [Coke]++ wants to move the daylies to the new server
10:26 xinming joined #perl6
10:26 jnthn Maybe, otoh having them on OSX is apparently a good canary... :)
10:28 nwc10 it's actually useful having them on non-linux
10:29 nwc10 "both" would be even better, but more work
10:30 jnthn Yeah, something about OSX seems to make it more sensitive to certain kinds of memory error
10:30 jnthn I am surprised that ASAN didn't find us more of them, however.
10:31 jnthn "We're clean under ASAN" is absolutely something that, while good, needs taking with a big pinch of salt.
10:31 nwc10 me too, somewhat, but IIRC there have been some for Perl 5 that ASAN on Linux doesn't spot, but does break OS X
10:32 nwc10 jnthn: I think I'd be more exact: "Assuming that we're clean on ASAN means that we have no bugs" is the thing to take with a pinch of salt
10:32 jnthn Oh yay, here comes the bit of the route with loads of tunnels...
10:32 nwc10 being clean under ASAN is actually quite hard to pull off
10:32 jnthn nwc10: Yes, that's what I meant. :)
10:32 jnthn We just about are, though, iiuc? :)
10:32 nwc10 I wanted to be clear that that's what your intent was
10:33 nwc10 yes, we just about are. For the tests that we run
10:33 jnthn Right, that's the caveat.
10:33 nwc10 apart from the recently flappy thread failure
10:33 nwc10 which I will try to get a backtrace for
10:33 jnthn Cool.
10:34 * jnthn hopes somebody else on OSX will be able to get a clean run also :)
10:38 FROGGS I'm not on osx, I'm on scrillex these days
10:38 rbastic joined #perl6
10:39 FROGGS (sounds like names of drugs to me)
10:40 moritz tippex!
10:43 FROGGS *g*
10:43 jnthn Hah, "stop sniffing the tippex!" was not an entirely uncommon remark made by teachers at my highschool :P
10:43 FROGGS I just know about sniffing uhu...
10:44 fhelmberger joined #perl6
10:51 prevost joined #perl6
10:57 TuxCM joined #perl6
10:58 Ulti yay #16 on HN https://news.ycombinator.com/news
10:58 Ven joined #perl6
10:58 moritz Ulti: could you please update the title to use 'Perl 6' instead of 'Perl6'?
10:58 Ulti sure
10:59 Ven o/, #perl6
10:59 moritz (in wordpress; dunno if you can change it on HN)
10:59 Ulti cant change it on HN dont think
11:00 moritz ok
11:00 moritz Ulti++ # blog post
11:00 moritz now #14 on https://news.ycombinator.com/news :-)
11:04 Ven Should I completely remove the bit on "parcels" in the learnperl6iny?
11:05 Ven (that they're a different "type" a list, immutable and all)
11:08 jnthn Ulti++ indeed. The bit on the token/rule difference ain't quite right, as TimToady noted earlier. But that's a small matter; the main thing is that Perl 6 comes off looking useful and elegant in that post. :)
11:10 Ven "list context" is only applied by `@x =` and `.list`, correct or wrong?
11:11 jnthn Well, @$foo is sugar for $foo.list too
11:11 Ulti jnthn feel free to change it
11:11 Ven jnthn: right, thanks. Noting this one as well :)
11:11 Ulti the main reason to write the post was just to get some attention from people who are very much still perl users in the world
11:12 jnthn Ulti: Yes, and I think it does that well, which is why I'm not too worried.
11:12 Ulti GIS people all moved to Python due to it being embedded in desktop GIS software :'(
11:12 nwc10 2.6 or 2.7?
11:13 konsolebox joined #perl6
11:13 Ulti not sure it was <2.4 when I was last doing GIS
11:13 Ulti it wont be Python 3 though
11:13 Ulti at least I highly doubt it
11:15 Ven m: my @a = 1, (2, (3)); say @a.perl
11:15 camelia rakudo-moar 795a32: OUTPUT«Array.new(1, 2, 3)␤»
11:15 Ven mh, why is this getting an Array.new?
11:15 Ulti did parcel finally vanish?
11:16 anaeem1 joined #perl6
11:16 Ven Ulti: I think it's the plan it vanishes
11:16 nwc10 not that I know anything about GIS software, but I find this
11:16 jnthn Ven: Because that's the easiest thing that will EVAL back to the same, afaik.
11:18 nwc10 https://geonet.esri.com/thread/3696#jive-361213687745376938439 -- ... In other words ArcGIS 10 will never work with Python 2.7 or Python 3.1 or any other major release of python. Only Python 2.6 is supported.
11:18 Rounin joined #perl6
11:19 nwc10 I stressed the 10, because I assume that ArcGIS 11 will happen some day, and might be on newer
11:20 Ulti yeah Python has all the same problems as Perl these days
11:21 nwc10 I wouldn't say exactly that.
11:21 nwc10 the "all" part
11:22 pecastro joined #perl6
11:22 Ulti the biggest problem Perl has is all the people using Perl saying it has problems :D
11:24 * nwc10 is still wondering which of Fedora, Ubuntu (or Suse) is going to be first to migrate away from Python 2 on the distribution media
11:24 atroxaper joined #perl6
11:27 Ven m: my @a = 1, (2, (3)); say @a eqv (1, 2, 3)
11:27 camelia rakudo-moar 795a32: OUTPUT«False␤»
11:33 * Ulti regrets not writing a click bait title for his post
11:36 Ven no, let's not do that. It's much better that way :). Ulti++
11:44 denis_boyun joined #perl6
11:48 rbastic hi guys, where can i report issues for perl6?
11:48 rbastic i have a piece of code which consistently crashes on MoarVM but not the JVM
11:48 FROGGS rbastic: rakudobug@perl.org
11:48 rbastic k, just email there ?
11:48 FROGGS right
11:48 FROGGS and it will show up at http://rt.perl.org/
11:48 rbastic thanks
11:49 FROGGS you're welcome
11:50 rbastic k. sent. if anyone is interested, it's a mutexed singleton counter object, github.com/rbastic/CounterMutexSingleton
11:50 rbastic there appears to be issues with say() not being thread-safe also
11:50 rbastic i'll focus on mentioning it in the ticket, cheers </too_much_coffee>
11:52 FROGGS it is RT #123434
11:52 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123434
11:54 pecastro joined #perl6
11:55 FROGGS rbastic: how long does that CounterMutexSingleton.pl6 script run usually?
11:55 rbastic you can run it with --num_threads=500 and see it crash, don't have to use the 100,000 thread version
11:56 rbastic but yes, it does take a bit of time to run (i'm on a retina pro, so it's not so bad here ;) )
11:56 FROGGS rbastic: should it complete when I run it as `perl6-m CounterMutexSingleton.pl6` ?
11:57 rbastic try perl6-m CounterMutexSingleton.pl6 --num_threads=500 first
11:57 rbastic before letting it run for an eon and chew up all your CPU/make your fan spin
11:57 rbastic the 100,000 mode was mostly for completeness/stress-testing
11:57 FROGGS dev/CounterMutexSingleton$ perl6-m CounterMutexSingleton.pl6 --num_threads=500
11:57 FROGGS 501
11:57 rbastic yup
11:57 rbastic is that with MoarVM?
11:57 FROGGS yes
11:57 rbastic what platform?
11:57 Ven should the learnxiny mention `loop`?
11:57 FROGGS linux
11:58 Ven Now that I think about it, it seems pretty unnecessary
11:58 rbastic FROGGS: nods
11:58 rbastic FROGGS: try uncommenting the 'say' lines in the class
11:58 rbastic and rerunning
11:58 rbastic that should make it crash
11:59 FROGGS [...]
11:59 FROGGS Instant:1418644768.885212 elapsed time for read_with_lock: 0.0080462
11:59 FROGGS Instant:1418644768.885323 elapsed time for lock increment: 0.00884774
11:59 FROGGS Instant:1418644768.947218 elapsed time for read_with_lock: 0.0544766
11:59 FROGGS 501
11:59 FROGGS dev/CounterMutexSingleton$ perl6-m --version
11:59 FROGGS This is perl6 version 2014.11-82-g3fa1bdf built on MoarVM version 2014.11-70-gbabd3dc
11:59 colomon Ven: I dunno, I've used loop fairly often in p6...
12:00 rbastic hrm, strange FROGGS
12:00 rbastic This is perl6 version 2014.10-121-g7dd7292 built on MoarVM version 2014.10-17-g05b25a6
12:00 rbastic thought i updated moarvm to a more recent version than this
12:01 rbastic ab5stract and i have seen this crash repeatedly on Mac OS X though (we're aware of the known memory issues on MacOSX)
12:01 rbastic and i'm sure he's using a more recent MoarVM
12:02 moritz rbastic: jnthn fixed some things in moarvm today
12:03 rbastic k, let me update rakudobrew
12:04 rbastic newbie mode kicking in. how do i update moarvm on rakudobrew again :p
12:04 FROGGS tadzik: ?
12:04 Ven colomon: Alright. Loop labels?
12:04 colomon rakudobrew build moar
12:05 Ven that too.
12:05 Ven :P
12:05 colomon though I guess that won't work if rakudo / nqp haven't been updated as well
12:05 rbastic weird errors: http://pastebin.com/w3e6BTg3
12:05 rbastic is this what you mean, colomon?
12:06 colomon rbastic: no, that's unexpected
12:06 colomon I just mean "build moar" means build rakudo on moar; it will only ask for the most recent nqp / moar that Rakudo wants.
12:07 rbastic trying  perl Configure.pl --gen-moar
12:07 colomon though that should work, actually, because jnthn++ bumped NQP_REVISION to get it 2 hours ago
12:07 JimmyZ .tell Ulti http://irclog.perlgeek.de/perl6/2014-12-15#i_9806628  # in case you missed it
12:07 yoleaux JimmyZ: I'll pass your message to Ulti.
12:07 colomon rbastic: your best bet might be to just remove .rakudobrew/moar-HEAD and then issue the build moar command again.
12:08 sqirrel joined #perl6
12:08 Ven Where was the blog post on "new flattening semantics" already? Can't remember who wrote it. pmichaud++ maybe?
12:08 colomon Ven: I've never used loop labels even once.  :)
12:08 JimmyZ oh, you known it
12:08 Ven colomon: I've removed it from the learnx
12:09 rbastic colomon: thanks, if i can't get this to update then i'll try that.
12:11 rurban joined #perl6
12:12 rbastic colomon: FROGGS: k, i managed to update it successfully using perl Configure.pl --gen-moar in .rakudobrew ... however, this code still crashes
12:13 moritz Ven: http://pmthium.com/2014/10/apw2014/
12:13 vendethiel thanks moritz
12:17 JimmyZ joined #perl6
12:18 Ven is it alright if I copy-paste the examples from that pmichaud post?
12:28 moritz I'd think so
12:33 tinyblak joined #perl6
12:34 tinyblak_ joined #perl6
12:54 rurban joined #perl6
13:00 atroxaper joined #perl6
13:02 dalek snake: 3d5cb58 | arnsholt++ | / (2 files):
13:02 dalek snake: Fix stupid bug with methods.
13:02 dalek snake:
13:02 dalek snake: When we retrieve a method attribute from a class, the curried first argument
13:02 dalek snake: should be the self object, NOT the method object. *grumblegrumblegruble*
13:02 dalek snake:
13:02 dalek snake: Also tweaks tests to trigger this.
13:02 dalek snake: review: https://github.com/arnsholt/snake/commit/3d5cb58fff
13:02 arnsholt There we go!
13:03 doublelel joined #perl6
13:03 vendethiel amazing :)
13:03 arnsholt I just had to realize 80880 is an invalid TCP port number =D
13:04 moritz arnsholt: sorry, it's 8088 :-)
13:05 arnsholt Well, if I'd been a sensible person and remembered where to find the information it'd be fine =)
13:06 moritz arnsholt: it'd be sensible to ask in here :-)
13:06 arnsholt That too
13:06 arnsholt But I figured this was going to be in the logs, so I might as well do the work myself =)
13:11 guru joined #perl6
13:14 Guest47124 joined #perl6
13:16 araujo joined #perl6
13:16 araujo joined #perl6
13:27 brrt joined #perl6
13:30 pmurias joined #perl6
13:30 Ulti TimToady out of interest why are rules working out the longest match and token is not in this situation?
13:30 yoleaux 12:07Z <JimmyZ> Ulti: http://irclog.perlgeek.de/perl6/2014-12-15#i_9806628  # in case you missed it
13:33 tinyblak joined #perl6
13:33 * moritz has trouble parsing Ulti's question, and applying the necessary context to it
13:34 Ulti sorry
13:34 Ulti in my recent blog post I had to change a set of tokens to rules because the longest match wasn't matched as token
13:34 Ulti I assumed its because rule could backtrack to find the longer match
13:34 moritz neither token nor rule backtrack
13:35 Ulti and the tokens instead just matched the first one and carried on
13:35 moritz the difference is that rule inserts <.ws> automatically
13:35 tinyblak_ joined #perl6
13:35 Ulti really
13:35 Ulti then there is a bug with tokens
13:35 moritz and the default <.ws> terminates longest-token matching
13:35 tinybla__ joined #perl6
13:35 Ulti at least the way I wrote them with proto
13:35 Ulti or a bug in my code and I dont get what is happening
13:36 Ulti but it wasnt on white space
13:36 Ulti it just made short matches to the first token matching
13:36 tinybla__ joined #perl6
13:36 Ulti I'll get the two traces so that its a bit more obvious
13:39 atroxaper joined #perl6
13:53 tinyblak joined #perl6
13:59 Ulti a guy in the office had a nice idea after reading my article... he asked why in a Grammar you can't just pass in the class you want to be populated and have it work out how to match the token names to attributes to find the right place to construct everything
13:59 Ulti do grammars have enough introspection to do that sort of thing?
14:01 brrt ehm... /me thinks that putting such functionality into a grammar may be overkill, although it seems like it'd be possible to make a 'generic action class' that could do this
14:01 brrt i mean the MOP should give you enough flexibility for this
14:03 [Coke] jnthn++ memory fix, testing now
14:06 jnthn Ulti: Should be able to make it work
14:06 Ulti brrt oh yeah I dont mean put into Grammar but more make something that can take a Grammar and a Class and work it all out for someone
14:06 jnthn token foo is populating(SomeClass) { ... }
14:07 arnsholt Just set the instance to be populated as a dynvar, and populate it through the actions?
14:07 Ulti yeah that would be really nice have it as a trait in the grammar
14:08 jnthn And then an action class that just handles each method call made to it, gets hold of foo somehow (more than one way I guess), grabs the named matches and passes them off to the constructor of the class
14:09 jnthn $the_class.new(|%($/{}.map({ .key => (.value.ast // .value.Str) }))) or so
14:09 jnthn Then it will work tree-wards too
14:09 jnthn Of course you go fancier still and introspect the clases in question for the attribute types and do coercions... :)
14:09 Ulti ^^
14:10 jnthn [Coke]: Hope it works!
14:10 * jnthn was meant to be teaching now, but $place-i-was-meant-to-be-teaching screwed up the dates :/
14:10 jnthn Downside: an extra night in Stockholm. Upside: I get some more Perl 6 time today :P
14:12 pmurias_ joined #perl6
14:21 brrt jnthn: i only have S17-procasync/basic.t failing now
14:21 brrt so i guess that is jnthn++ :-)
14:22 jnthn brrt: Sounds like an improvement, yes :)
14:22 brrt (i'm still happy this wasn't some kind of sneaky JIT bug :-D)
14:23 jnthn That was rather far down my list of guesses :)
14:26 rbastic jnthn: see my crash report today? :) *hides*
14:26 moritz All tests successful.
14:26 moritz (a few times in a row)
14:26 moritz on linux
14:30 rindolf joined #perl6
14:32 jnthn rbastic: I don't have the patience/concentration to hunt concurrency bugs today, I'm afraid.
14:32 brrt not so far for mine, but that's availability bias for you
14:33 jnthn But yeah, I need to dig into those when I've got a good chunk of time when I am not exhausted and can concentrate.
14:34 kaleem joined #perl6
14:35 rbastic jnthn: no worries, it was an example that ab5tract and i hacked up
14:35 rbastic was showing him some multithreadedness and how things could maybe be done in perl6, stumbled across some bugs
14:35 rbastic it all worked fine until a new build recently, mac os x specific crash bugs
14:35 rbastic but unknown what the orig build is
14:35 rbastic (i.e. the orig build it worked on)
14:35 rbastic 'say' does have some races though
14:36 jnthn Well, say as it's currently implemented fails to use the VM-level say primitive that is safe.
14:37 jnthn That would also be faster.
14:37 jnthn At least, that's how it was last I looked.
14:37 jnthn Probably an easy fix.
14:37 ab5tract joined #perl6
14:38 jnthn The other bugs are likely harder, however.
14:38 ab5tract just to clarify, that code runs cleanly for me on both moar/jvm
14:39 ab5tract *without* say. if it isn't crashing for you with say, try adding another 0 to the num_threads ;)
14:40 jnthn Hm, I was imaging the problem with say was it was not getting the newlines together with the output, rather than getting crashes...
14:40 jnthn If it crashes something is very odd, given both moar/jvm already are taking care to take locks on file handles when working with them.
14:40 ab5tract and the say calls will crash both moar and jvm given a sufficient number of threads
14:41 jnthn Weird.
14:41 ab5tract indeed :/
14:41 ab5tract thanks for looking into the qq:x bug, btw!
14:41 ab5tract jnthn: in the meantime i will continue to pump out crash after crash for you ;)
14:46 ab5tract rbastic: we saw the crashes on linux as os x, if i'm not mistaken
14:46 ab5tract *as well as
14:47 jluis joined #perl6
14:48 jnthn ab5tract: Does the qq:x thing work well for you now?
14:48 JimmyZ well, if you do `loop { say "hello world" }`, and you will find it cost much more cpu than perl5
14:49 jnthn ab5tract: I actually took your example directly under the debugger.
14:49 jnthn ab5tract: Was a little more effort to find because turning on allocation stack logging somehow made the problem vanish :)
14:50 jnthn But hopefully the bug I nailed really was the one. :)
14:50 [Coke] jnthn: woot!
14:50 [Coke] no failures, jit or nojit
14:50 jnthn [Coke]: Much wow!
14:51 jnthn I deserve a nice beer this evening, then. :)
14:51 jnthn Thankfully, I know a good pub to take myself for it :)
14:51 * jnthn works on the method ^foo() { } thingy
14:52 JimmyZ yeah, it cost 77% cpu on hack.p6c.org
14:52 Alina-malina joined #perl6
14:52 ab5tract jnthn: i've got weird issues with github cloning while at work, i will build tonight and let you know
14:53 jnthn ab5tract: Ah, ok.
14:53 moritz JimmyZ: and somehow your tmux also uses 90% CPU :-)
14:53 moritz that's not normal, is it?
14:54 jnthn Sounds pretty terminal for the server... :P
14:54 moritz oh, probably processing all the print() output
14:54 jnthn hah :)
14:54 moritz JimmyZ: you should redirecto to /dev/null when you test something like that
14:54 moritz JimmyZ: otherwise you're benchmarking the speed of your terminal (emulator) more than anything else
14:55 JimmyZ moritz: yeah, on my local it costs 20%, perl5 cost about ~5%
14:55 anaeem1_ joined #perl6
14:55 [Coke] I need to convert perl6-roast data into something more than one person can commit results to and include their sysinfo.
14:55 [Coke] (then we can have OSX/linux, whatever nwc10 has...)
14:55 jnthn ++[Coke]
14:56 moritz [Coke]: define a standard filename format, based on architecture + username + machine name, or so
14:56 moritz s/machine/host/
14:56 [Coke] moritz: or I could a DB instead of git to store the data. :)
14:57 [Coke] but yah, that'd work. or add a column with that info. But then we'd lose the %age column (not that it means much at this point anyway)
14:58 JimmyZ with /dev/null, it cost  100% ,haha
15:01 jnthn On my (Windows) laptop, a loop of 'say "hello"' costs 100% whether I do it in Perl 5 or Perl 6.
15:01 jnthn Well, 100% of one core, that is.
15:02 jnthn So I'm not entirely sure you're proving very much :P
15:04 tinyblak joined #perl6
15:04 jnthn (Note, I did > NUL, which is the windows equiv of /dev/null)
15:05 JimmyZ well ,on my windows with cmd, I just run perl6-m -e "loop { print \"hello world\"}", it costs ~12%, and  perl -e "for(;;) { print \"Hello world\" }" costs 1%
15:05 JimmyZ I mean without > NUL
15:06 tinyblak_ joined #perl6
15:12 ajr joined #perl6
15:21 molaf joined #perl6
15:24 JimmyZ joined #perl6
15:25 spider-mario joined #perl6
15:26 [Coke] .u -
15:26 yoleaux U+002D HYPHEN-MINUS [Pd] (-)
15:28 hoelzro o/ #perl6
15:31 mvuets привет, hoelzro
15:33 zoosha joined #perl6
15:34 hoelzro o/ mvuets
15:36 anaeem1 joined #perl6
15:42 telex joined #perl6
15:43 Ven joined #perl6
15:46 vendethiel m: role Foo[::T] { constant A = 1; }; say Foo[Str]::A
15:46 camelia rakudo-moar 4d2710: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/jLzop9SOHmâ�¤Missing semicolon.â�¤at /tmp/jLzop9SOHm:1â�¤------> [32m[::T] { constant A = 1; }; say Foo[Str]:[33mâ��[31m:A[0mâ�¤    expecting any of:â�¤        colon pairâ�¤Â»
15:46 vendethiel :(
15:46 vendethiel say I wanted to fix that, where should I be looked into first?
15:47 moritz std: role Foo[::T] { constant A = 1; }; say Foo[Str]::A
15:47 camelia std 76ccee1: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Confused at /tmp/pSjqEhkPJj line 1:â�¤------> [32m[::T] { constant A = 1; }; say Foo[Str]:[33mâ��[31m:A[0mâ�¤    expecting any of:â�¤    coloncircumfixâ�¤ signatureâ�¤Parse failedâ�¤FAILED 00:01 144mâ�¤Â»
15:47 moritz vendethiel: "the parser"
15:48 Ven moritz: this part I guessed (easily)
15:48 vendethiel m: role Foo{constant A = 1; } say Foo::A; #and since this works...
15:48 camelia rakudo-moar 4d2710: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Bxt0P5D52tâ�¤Two terms in a rowâ�¤at /tmp/Bxt0P5D52t:1â�¤------> [32mrole Foo{constant A = 1; } [33mâ��[31msay Foo::A; #and since this works...[0mâ�¤    expecting any of:â�¤        postfixâ�¤   …»
15:48 vendethiel m: role Foo{constant A = 1; }; say Foo::A; #and since this works...
15:48 camelia rakudo-moar 4d2710: OUTPUT«Could not find symbol '&A'␤  in method <anon> at src/gen/m-CORE.setting:13847␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2725␤  in any find_method at src/gen/m-Metamodel.nqp:988␤  in block <unit> at /tmp/FW_AqZEY7s:1␤␤»
15:50 moritz Ven: your dual nature with vendethiel confuses me :-)
15:50 vendethiel moritz: sorry!
15:50 Ven moritz: sorry!
16:00 cognominal joined #perl6
16:04 moritz Ven: I think there's a method in Perl6::World for parsing longnames; look where it's called, then you know which code to adopt
16:10 vendethiel moritz: (ven is me on my laptop, but I usually don't login to IRC because I already have my deskcomp logged in :).)
16:11 moritz vendethiel: ah :-)
16:12 moritz vendethiel: I just have an irssi session in screen or tmux on a server, and log into there from wherever I want to IRC
16:12 moritz (which is what many people used feather for, and probably will use hack.p6c.org for now)
16:12 Colby` joined #perl6
16:15 tinyblak joined #perl6
16:20 sqirrel joined #perl6
16:26 adu joined #perl6
16:35 masak I can't use ~~ in an action method, because $/ is a readonly parameter :/
16:36 * masak works around by putting the ~~ in a nested sub, and calling the sub
16:37 treehug88 joined #perl6
16:41 jnthn masak: You don't have to call the parameter you put the match object in $/ :)
16:41 atroxaper joined #perl6
16:41 jnthn masak: Also, the need to do a regex match in a grammar is often a design smell, and means the grammar is deficcient in some way.
16:41 jnthn uh, in *actions* sorry
16:45 masak jnthn: you might be right.
16:46 Ulti so that blogpost did a lot better than I expected thanks #perl6 for the social media feels
16:46 Ulti probably should fix anything technical I screwed up though
16:46 masak in this case, I can see how I could've done it right in the grammar instead.
16:46 masak Ulti: TimToady++ seems to have found a rakudobug due to it! :)
16:46 Ulti cool
16:47 masak today's autopun is more twisty than funny: https://twitter.com/sarcasticapple/status/544483460916985856
16:47 Ulti well not cool, but you know what I mean
16:47 masak :)
16:48 jnthn masak: Well, there you go. ;)
16:48 TimToady now to find the cure to the rakudobug...
16:48 jnthn masak: It's like the language whispers in your ear, "dude, wtf?" :)
16:48 TimToady but basically, LTM wasn't working at all on that set of rules
16:48 jnthn TimToady: Do you have the example (or a cut down one) to hand?>
16:49 TimToady sec
16:49 oetiker joined #perl6
16:50 TimToady I was using https://gist.github.com/anonymous/743d6b3915783a1a5853
16:50 TimToady symptom here is that it returns some of the sequence as dna, and the rest of it as aa
16:51 TimToady but if you turn on the NFA debuggers, you see the NMA is just 3 fates in order, with no matching at all
16:51 TimToady I traced it down to mergesubrule getting a different object than is in store_regex_nfa
16:52 TimToady so nqp::can($meth,'NFA') fails
16:52 jnthn If I run that here I get:
16:52 jnthn C:\consulting\rakudo>perl6-m bug.p6
16:52 jnthn 「TATAKEKEKELKL」 sequence => 「TATAK」 sequence => 「EKEKELKL」
16:52 TimToady yes, that's running the dfa rule first, then stopping, then running the rest with teh aa rule
16:53 TimToady nfa should just send it all to the aa rule
16:53 jnthn It should do the aa rule for the lot, rigt?
16:53 TimToady but nfa is doing '' on all three
16:53 jnthn Yeah, OK, then we agree on what we expect at least :)
16:53 jnthn oh you're kidding
16:53 jnthn Remove the word "multi" in front of each of them.
16:53 TimToady I don't think so
16:54 TimToady the original didn't have them, and failed
16:54 jnthn It changes the semantics.
16:54 jnthn 「TATAKEKEKELKL」 sequence => 「TATAKEKEKELKL」
16:54 jnthn Is what I get with it removed
16:54 TimToady gah
16:55 TimToady it shouldn't change the semantics
16:55 TimToady so maybe the original was failing for a different reason
16:55 jnthn Well, here's why it changes them
16:55 jnthn $meta_meth := $*MULTINESS eq 'multi' ?? 'add_multi_method' !! 'add_method';
16:56 jnthn It calls add_multi_method, meaning they don't end up in the normal methods table
16:56 jnthn Instead, a proto is generated with the name sequence:sym<dna>, for example.
16:56 jnthn And that is installed in there, and then dispatches to the individual regex.
16:56 jnthn And that's why the NFA gets lost.
16:56 jnthn I..hmm. :)
16:57 TimToady okay, I'll have to backtrack :)
16:57 jnthn multi on a token/regex/rule really does not mean the same as multi on a normal method.
16:57 TimToady but the original trace had some FAIL for some reason
16:57 jnthn OK.
16:57 jnthn I wonder how best to fix this particular one... :)
16:58 TimToady well, coffee before I backtrack
16:58 jnthn It's one of those places where the user-level unification isn't the implementation level one, and likely can't be :)
16:58 jnthn Sure, np. I'll ponder it a bit too
16:59 jnthn I mean, I can easily do a fix, just wondering if the easy thing (just look at what kind of thing we're declaring when choosing the meta-method name) will have unintended consequences.
17:02 cognominal masak, my own conspiracy theory is that the perl world is deliberatly becoming unpopular so its actions to take over the world will be unnoticed. :)
17:02 cognominal you can't trust this Perl guys.
17:03 mr-foobar joined #perl6
17:03 TimToady okay, here's earlier failure does successfully find the NFA, but merges only epsilons and fates, so obviously the problem is in mergesubstates
17:04 pyrimidi_ heh, funny that a python programmer would rip on the ease of writing terrible code in Perl, then turn around and admit to writing terrible code in python: https://news.ycombinator.com/item?id=8752770
17:04 TimToady but...coffee...which I'm not awake enough to remember to go get for 7 seconds in a row...
17:05 jnthn TimToady: GO FOR COFFEE
17:06 jnthn Got a fix for the multi token thingy here.
17:07 masak cognominal: Perl's decreasing popularity is mostly due to it being early to its niche, and then the niche opening up to competition.
17:07 * TimToady hopes we're early to the next niche, whatever it is...
17:09 TimToady and the problem goes away if I leave only the alphabetic bits of the three character classes
17:12 cognominal It will probably involve grammars, but if we want to match nucleotids, grammars has to be able to handle efficiently 2 bits wide symbols.
17:13 vendethiel joined #perl6
17:15 guru joined #perl6
17:19 mr-foobar The next wave is reactive programming apparently.
17:20 jnthn TimToady: Oh, it's not so easy. We actually have tests that rely on the current semantics. o.O
17:20 jnthn # handle precedence via multi-dispatch and recursion
17:20 jnthn multi rule expr(0)   { <term> }
17:20 jnthn multi rule expr($p)  { <expr($p-1)> *%[ <?before <pred($p)>> <op> ] }
17:20 jnthn o.O
17:21 jnthn I...uh...don't know quite how this fits with LTM. :)
17:22 jnthn So yeah, it is harder than I thought. Darn. :)
17:22 jnthn But I probably shouldn't be distracting you from finding a tricky bug by presenting a tricky design problem. :)
17:25 abraxxa is there a guide how to write a new data type?
17:26 adu joined #perl6
17:26 abraxxa i'd like to add one for NativeCall for call-by-reference
17:29 abraxxa i have to leave, please write me a PM if there is a solution, thanks!
17:30 guru joined #perl6
17:32 TimToady jnthn: iirc, in STD I considered the multi dispatch to be a 2nd-tier ordering rule after the 1st-tier :sym<foo> had its say in the candidate ordering; this was back when we had ';' separating tiers of importance inside multi signatures for ordinary multis too
17:33 TimToady so in the old system, the sig would work like ($longname; $foo, $bar) or so
17:35 TimToady but with the longname ordering on LTM
17:36 TimToady to put it another way, the ordinary multi ordering only cuts in for multis with the same longname
17:36 atroxaper joined #perl6
17:37 pyrimidine Ulti: re: the 'generic action class', I like the idea of keeping them separate.  Mainly so you could perform different actions using the same grammar if needed (e.g. populate an instance, load data into a database, validate the data being parsed, etc)
17:37 pyrimidine but that's me
17:38 TimToady so in STD we could allow both kinds of candidate ordering with a single proto, whereas in rakudo you can currently have only one or the other
17:38 TimToady which is not what I call a unification :)
17:42 TimToady could probably hack it to work with a 'multiproto' that we generate if we see multiple :sym<foo>, so we generate a proto token name:sym<foo>(|) {*} that does 2nd tier redispatch with normal multi semantics
17:43 TimToady though of course we might have to think carefully about failure and backtracking
17:44 TimToady anyway, back figgering out the non-merging CHARLIST bug...
17:49 gfldex joined #perl6
18:00 [Sno] joined #perl6
18:07 treehug88 joined #perl6
18:09 grettis joined #perl6
18:13 hacktor joined #perl6
18:13 kaare_ joined #perl6
18:18 Isp-sec joined #perl6
18:24 atroxaper joined #perl6
18:24 TimToady it's the charlists that are trying to be smart about ranges or character classes, so either the A..Z of the \n in the character class triggers the bug
18:24 sqirrel joined #perl6
18:36 rurban joined #perl6
18:59 jnthn TimToady: Sorry, was in a skype call for a while and now it's dinner time...will backlog on my phone at the restaurant, and ponder it some :)
19:00 jnthn bbiab
19:00 beastd joined #perl6
19:00 Mso150_a joined #perl6
19:08 mvuets joined #perl6
19:08 FROGGS joined #perl6
19:10 FROGGS_ joined #perl6
19:14 sqirrel joined #perl6
19:16 tinyblak joined #perl6
19:28 anaeem1 joined #perl6
19:28 denis_boyun joined #perl6
19:33 masak "The last thing we want to have happen to the Node ecosystem is to create a Python 2, Python 3 situation" -- http://wesleyio.tumblr.com/post/104637877991/node-js-is-forked-not-f-ed
19:36 PerlJam masak: was that "at least perl5/perl6 situation wasn't last"?   ;)
19:36 TimToady no, all the organisms we evolved from Must Die!
19:36 ab5tract joined #perl6
19:39 TimToady though, actually, as I understand it, the Neanderthals actually were f-ed by us...
19:39 [Coke] there is a daily run today, should show up via dalek again tomorrow.
19:39 nwc10 and we survived because "worse is better"?
19:39 [Coke] 100% pass on moar-jit, moar-nojit, parrot.
19:40 nwc10 happy [Coke] is happy? At least, for 24 hours?
19:40 masak PerlJam: I was thinking of Guido insisting (in some video around 2005, I think) that he was anxious not to repeat the mistakes of Perl 6 (mainly, having the project drag on forever).
19:40 nwc10 and Guido did learn from those misakes
19:40 masak yes.
19:40 bartolin jnthn++  # fixing segfault on osx
19:41 masak nwc10: but it doesn't prevent others from taking the py3 effort and wanting to distance themselves from it.
19:44 TimToady ah, I think I'm beginning to understand the problem; when you say <[abc\n]> it glues the abc and \n bits together with altseq (||) semantics, and that ruins the LTM
19:44 bartolin speaking of segfaults: I'm aware of at least 3 rt tickets about reproducible segfaults with moar. would it be useful to create moarvm issues for those?
19:45 hoelzro the result for a for loop (and other loops) when not called in sink context is supposed to be a list of values constructed from the last statement in each run of the block, right?
19:46 TimToady it's not just about sink, it's also about being at the statementlist level
19:46 TimToady a loop at statementlist level puts itself into sink context even if it is the last statement in its block
19:47 nwc10 jnthn: ^^ what bartolin just asked
19:47 hoelzro TimToady: sorry, I'm not familiar with statementlist level; could you give an example?
19:47 * nwc10 hopes that jnthn's noms were tasty
19:51 ab5tract .tell jnthn qq:x is running clean for me on moar now :D
19:51 yoleaux ab5tract: I'll pass your message to jnthn.
19:59 TimToady hoelzro: if you're at a spot that can have multiple statements with ; then you're at statementlist level
19:59 TimToady if only one statement is parsed, then you're not
20:00 TimToady so a do {foo;bar;baz;} has baz at statementlist level, but a do baz does now
20:00 TimToady *not
20:00 hoelzro TimToady: ah ha; so for a loop to be evaluated in non-sink context, not only must it be the final statement in a block, but even the only statement?
20:00 TimToady not exactly
20:01 TimToady even if there is the possibility of multiple statements, it's in sink context
20:01 TimToady so do {baz} has baz at statementlist level
20:02 TimToady as a single statement after a statement prefix, you get loop values
20:02 TimToady inside parens, you get loop values
20:02 TimToady (because ; makes LoL instead of a statementlist there)
20:03 hoelzro ah, I think I understand now
20:03 TimToady m: say ($_ for 1..10; $_ for 'a'..'z');
20:03 camelia rakudo-moar 4d2710: OUTPUT«1 2 3 4 5 6 7 8 9 10 a b c d e f g h i j k l m n o p q r s t u v w x y z␤»
20:03 hoelzro so a "regular" for will always be in sink context; you need to dress it up with a gather/do/parens if you want more
20:03 TimToady m: say ($_ for 1..10; $_ for 'a'..'z').perl
20:03 camelia rakudo-moar 4d2710: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10; "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z")␤»
20:03 TimToady m: say ($_ for 1..10; $_ for 'a'..'z')[1]
20:03 camelia rakudo-moar 4d2710: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y z␤»
20:09 ab5tract m: my ($z,$y,$x) = ( $_ for 0..10; $_ for 'a'..'z'; $_ for 'A'..'Z'; )[0,1,2]; say $z, $y, $x
20:09 camelia rakudo-moar 4d2710: OUTPUT«0 1 2 3 4 5 6 7 8 9 10a b c d e f g h i j k l m n o p q r s t u v w x y zA B C D E F G H I J K L M N O P Q R S T U V W X Y Z␤»
20:10 ab5tract o O ( EEXPLODED )
20:10 spider-mario joined #perl6
20:11 ab5tract though on close inspection it is clear that such a thing has to work in perl 6
20:11 FROGGS_ joined #perl6
20:13 ab5tract m: my ($z,$y,$x) = ( $_ for 0..10; $_ for 'a'..'z'; $_ for 'A'..'Z'; )[*]; say $z, $y, $x   # whatever!
20:13 camelia rakudo-moar 4d2710: OUTPUT«0 1 2 3 4 5 6 7 8 9 10a b c d e f g h i j k l m n o p q r s t u v w x y zA B C D E F G H I J K L M N O P Q R S T U V W X Y Z␤»
20:13 lizmat joined #perl6
20:15 ab5tract that looks like handy golf syntax
20:17 TimToady yes, changing the altseq nodes to alt nodes fixes the NFA, though it may be slowing down the parser a bit
20:17 spider-mario joined #perl6
20:18 * TimToady thinks relying on alt/altseq is the wrong approach to dealing with character classes in any case
20:20 ab5tract TimToady: i had an interesting discussion about perl 5 contexts today. it sounds like perl 6 has refined on the concept by adding more (and, a novice hopes, better/clearer) contexts.
20:21 TimToady we'd like to think so, but time will tell
20:21 ab5tract are they collectively described somewhere?
20:21 TimToady most contexts are now lazily determined by eventual binding, and this seems much more intuitive
20:22 TimToady sink is largely a compile-time context, however
20:22 TimToady sink is basically our side-effect monad, as it were
20:23 ab5tract that makes intuitive sense to me
20:23 * lizmat is back home and starts working on her advent post
20:23 TimToady the info about it is a bit scattered, however
20:24 TimToady m: my ($a, $b, *@c) := 1,2,3,4,5; say @c
20:24 camelia rakudo-moar 4d2710: OUTPUT«3 4 5␤»
20:24 TimToady the 1 and the 2 are in item context, while the 3,4,5 is in list context
20:25 TimToady but that's determined at binding time in P6, not at compile time as it is in P5
20:25 bjz joined #perl6
20:25 TimToady that's what lets us have method signatures, for instance
20:25 ab5tract TimToady: that's how it feels in the synopses, to be honest. it is used in sentences in a way that implies an implicit understanding in the reader. but haven't had luck isolating where to gain such an understanding.
20:25 * jnthn back from le nomz
20:25 yoleaux 19:51Z <ab5tract> jnthn: qq:x is running clean for me on moar now :D
20:25 jnthn ab5tract: \o/
20:26 ab5tract excluding #perl6 ;)
20:26 jnthn Welcome back, lizmat
20:26 ab5tract yeah jnthn, great work on that patch. i guess it kept you up late in the end?
20:26 bjz_ joined #perl6
20:26 lizmat jnthn: building now
20:27 jnthn ab5tract: No, I actually nailed it on the 4 hour train ride up to Stockholm this morning. :)
20:27 jnthn Amusingly, on an OSX box connected to through a Linux box running screen that I could SSH into, so I didn't lose my debug session when the train went through a tunnel. :P
20:29 bjz joined #perl6
20:29 ab5tract jnthn: productive commute :)
20:29 TimToady jnthn: found Ulti's NFA bug, see backlog
20:30 woolfy joined #perl6
20:30 TimToady tl;dr cclasses should not be constructed with altseq if you want an NFA
20:30 jnthn TimToady: Yes, I read that and was going to tell you the history :)
20:31 sergot joined #perl6
20:31 haroldwu joined #perl6
20:31 tadzik joined #perl6
20:31 xiaomiao joined #perl6
20:31 ponbiki joined #perl6
20:31 moritz joined #perl6
20:31 epochbell joined #perl6
20:31 xopatch joined #perl6
20:31 Maddingue joined #perl6
20:31 lestrrat joined #perl6
20:31 coffeeyy_ joined #perl6
20:31 smash joined #perl6
20:31 jnthn TimToady: It was initially alt, but at the point I came to do altnfa (the work that made alternations LTM) something broke horribly, so it ended up as altseq. If it works with alt now, it means whatever bug I hit is now gone.
20:31 jnthn Which is quite feasible.
20:31 jnthn But yeah, it'll cause issues with LTM.
20:31 jnthn I think in the longrun we probably want something better.
20:32 TimToady .oO(Those who do not learn from history are doomed to have it repeated to them...)
20:32 jnthn Well, I learned that some hacks can kick a problem 2 years down the road, when somebody smarter might pick them up. :P
20:34 TimToady passes all the tests except for t/spec/S17-lowlevel/thread.t, which I think is not my problem
20:34 colomon joined #perl6
20:34 jnthn Indeed
20:34 jnthn Is it a slowdown?
20:35 jnthn Or "not enough it made CORE.setting take noticably longer"?
20:36 dalek nqp: 20c3e18 | TimToady++ | src/QRegex/ (3 files):
20:36 dalek nqp: s/altseq/alt/ in cclasses so correct NFA is built
20:36 dalek nqp:
20:36 dalek nqp: This may cause a slight temporary slowdown of the parser, until we scrap
20:36 dalek nqp: alternation in favor of well-encoded sets of characters.
20:36 dalek nqp: review: https://github.com/perl6/nqp/commit/20c3e18aab
20:37 jnthn Hah, cool, there's even a succession plan already \o/
20:37 jnthn TimToady++
20:37 TimToady core setting might've taken a second or two longer, but didn't time it rigorously
20:37 jnthn That's tolerable.
20:37 * lizmat sees a spectest without flappers in a *long* time
20:37 lizmat *for the first time
20:38 jnthn Was gonna say, did you sit happily staring at it for a bit... :)
20:38 TimToady thing is, it has to do the sub NFAs again because rakudo doesn't pass along subsequent fates that it already knows like STD does
20:38 lizmat I'm seeing 5 errors in t/spec/S32-str/numeric.t
20:38 jnthn Hm, I didn't have those this morning.
20:38 lizmat which I think are TimToady++ 's work ?
20:38 bjz joined #perl6
20:38 lizmat oops, that's me
20:39 lizmat changing {} to return self.hash instead of self
20:43 bartolin I've got a question about zip: S03 says "By default the zip function reads to the end of the shortest list, but a short list may always be extended arbitrarily by putting * after the final value, which replicates the final value as many times as necessary."
20:43 dalek rakudo/nom: d6d08d5 | TimToady++ | tools/build/NQP_REVISION:
20:43 dalek rakudo/nom: things that go bump in the nqp
20:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d6d08d5809
20:43 bartolin what is the expected result of '(1, 2, *) Z (1, 2, 3, *)'? is it '(1, 1), (2, 2), (2, 3)' or rather an infinite list '(1, 1), (2, 2), (2, 3), (2, 3), ...'?
20:43 TimToady figured I'd bump nqp now to get a little more road-testing on the fix before next release
20:44 bartolin some tests in S03-metaops/zip.t seem to suggest the latter.
20:44 lizmat TimToady: will take her for a spin in a minute
20:44 TimToady bartolin: final * is not implemented
20:44 bartolin TimToady: yes, but I'm trying to implement it ;-)
20:45 lizmat All tests successful.
20:45 lizmat Files=931, Tests=34116, 205 wallclock secs ( 8.96 usr  2.73 sys + 1212.22 cusr 150.25 csys = 1374.16 CPU)
20:45 TimToady well, 1,2,* should be 1, 2 xx *
20:45 lizmat taking the nfa fixes now for a spin
20:45 TimToady but the tricky bit is implementing @list, *
20:46 TimToady you can't just assume you have the value to xx at compile time
20:46 bartolin I see. it's probably above my skills, but I was curios anyway ;-)
20:47 TimToady it's probably not worth thinking about until after the GLR
20:47 TimToady and it might be the wrong notation anyway
20:48 TimToady plus, you can always say @array, {$_} ... * currently
20:48 TimToady m: say 1,2,3, {$_} ... *
20:48 camelia rakudo-moar 4d2710: OUTPUT«1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ...␤»
20:49 TimToady maybe it should just be a method: (1,2,3).extend
20:49 TimToady or some such
20:49 bartolin ok, thanks for explaining! I think I'll leave it as it is ;-)
20:49 * lizmat doesn't see any delay in building the settings
20:50 TimToady All systems are go for lunch.
20:55 lizmat All tests successful.
20:55 lizmat Files=931, Tests=34116, 198 wallclock secs ( 8.92 usr  3.20 sys + 1211.93 cusr 150.42 csys = 1374.47 CPU)
20:55 lizmat this is with NFA fixes
20:55 jnthn cPU is about the same, I see
20:56 lizmat yeah, and wallclock diff could be anything
20:57 atroxaper joined #perl6
20:59 noganex_ joined #perl6
21:00 baest_ joined #perl6
21:02 masak joined #perl6
21:02 Mso150 joined #perl6
21:03 vendethiel m: my @a = 1, 2, 3, { @a[$_ % 3] } ... *; say @a[^15]; #:D
21:03 camelia rakudo-moar 4d2710: OUTPUT«1 2 3 1 2 3 1 2 3 1 2 3 1 2 3␤»
21:03 vendethiel niice
21:03 BooK joined #perl6
21:06 jnthn m: my @a = (1, 2, 3) xx *; say @a[^15] # gulf ya
21:06 camelia rakudo-moar 4d2710: OUTPUT«1 2 3 1 2 3 1 2 3 1 2 3 1 2 3␤»
21:06 vendethiel jnthn: ENOTASFUNNY
21:08 mtj_ joined #perl6
21:13 jnthn TimToady: Yeah, I don't notice any particular slowdown here either.
21:15 molaf joined #perl6
21:20 mathw I haven't been able to find a reference for this: what does it mean when someone writes a signature like multi method Str(MyClass:D: --> Str) - well, what's the :D: part for?
21:21 colomon defined
21:21 PerlJam mathw: :D means "defined" and the other colon separates the invocant argument from the rest of the args.
21:21 colomon PerlJam++
21:21 ab5tract what's the p6 equivalent of ruby's method_missing?
21:21 mathw ah so it will not match as a candidate if the invocant is undefined?
21:21 colomon mathw: right
21:21 PerlJam aye
21:22 mathw neat
21:22 moritz ab5tract: is that a fallback?
21:22 mathw I must remember that
21:22 ab5tract yeah
21:22 mathw thanks
21:22 * mathw goes to make pie
21:22 PerlJam ab5tract: there's a CANDO or CAN or something, but I don't think they're invented yet.
21:23 moritz ab5tract: there's an undocumented hack through the metamodel you can use
21:24 anaeem___ joined #perl6
21:24 ab5tract hm.. maybe that's not what i mean.. basically, you can define a dispatch method (say to a print a value from a hash) such that any method invoked on an object that is missing can be handled. the signature would be something like method_missing( Str $method-name, Any *@args )
21:25 ab5tract in my case, i don't even want @args, as i just want to `print %lookup<$method-name>`
21:26 ab5tract are we talking about the same thing?
21:26 PerlJam ab5tract: S10:150
21:26 synopsebot Link: http://perlcabal.org/syn/S10.html#line_150
21:26 ab5tract and that would be print `%lookup<<$method-name>>`
21:27 ab5tract thank you PerlJam
21:27 btyler ab5tract: something like .^add_fallback? masak had an advent post last year that used that: http://perl6advent.wordpress.com/2013/12/09/day-09-hashes-and-pairs/
21:28 PerlJam ab5tract: You might be able to use "handles" for your purposes with a little creativity.
21:28 ab5tract btyler: :)
21:29 ab5tract perhaps this is the undocumented hack moritz was pointing at
21:30 ab5tract the lookup is not so big, so i don't mind explicitly creating the subroutines
21:30 ab5tract but i'm hoping to make a proper library out of this, so i'm striving for best practice
21:34 telex joined #perl6
21:34 brrt joined #perl6
21:46 erkan joined #perl6
21:46 erkan joined #perl6
21:51 TimToady Ulti: if you rerun your trace with the newest rakudo, it should not say FAIL now
21:53 jnthn ab5tract: I'm testing a local patch that implements FALLBACK, which is the spec'd S12 way :)
21:55 jnthn ab5tract: Works like this: https://gist.github.com/jnthn/b3524444f4caeda0055b
22:02 timotimo neat!
22:04 ab5tract jnthn: awesome!!!
22:05 ab5tract method clear { print %T::commands<clear> }; method save { print %T::commands<save> }; ... etc. just has a very un-perly feel to it. especially perl 6
22:06 timotimo yeah
22:06 timotimo you can already .^add_fallback, but it isn't to spec
22:06 jnthn Yes, I'd prefer folks don't depned on the .^add_fallback API.
22:06 timotimo very understand
22:06 jnthn I'm not convinced it's exactly the right design yet. :)
22:07 ab5tract for the current case, it's a small lookup so i don't mind waiting to clean it up
22:07 ab5tract jnthn: FALLBACK looks pretty good. would we be able to do multis with singature matching?
22:10 ab5tract ( .. give 'em an inch, they want a hectare .. )
22:11 timotimo should just fall out of the code naturally
22:11 dalek roast: c704d33 | jnthn++ | S12-methods/fallback.t:
22:11 dalek roast: Add tests for FALLBACK.
22:11 dalek roast: review: https://github.com/perl6/roast/commit/c704d33831
22:12 jnthn ab5tract: I didn't try it but spec says yes, and should just work
22:12 ab5tract that's too cool
22:12 TimToady just falls out of the double dispatch model
22:12 TimToady to the outside world, a multi looks like an only
22:12 jnthn phew, my editor was smart enough to NOT open all 1700 files of t/spec
22:13 timotimo :D
22:13 dalek rakudo/nom: 251989b | jnthn++ | src/Perl6/Metamodel/ClassHOW.nqp:
22:13 dalek rakudo/nom: Implement FALLBACK.
22:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/251989b0ac
22:13 dalek rakudo/nom: d661a82 | jnthn++ | t/spectest.data:
22:13 dalek rakudo/nom: Run S12-methods/fallback.t.
22:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d661a82817
22:14 jnthn Feel free to contribute a test for the multi FALLBACK case.
22:15 itz_ I hope that editor is smart enough to be vim or emacs and not notepad++ ;)
22:15 timotimo np++ is all right
22:16 jnthn I never could get into emacs. These days I tend to be using one of notepad++, vim, or if it's C# I'll likely be using VS.
22:16 jnthn .oO( The reason I use vim is 'cus I started it once and could never get out of it... )
22:16 timotimo i wonder if jnthn would like resharper
22:17 jnthn jnthn finds resharper too noisy
22:17 jnthn I know a lot of people who find it helpful.
22:17 jnthn It's a really well made and polished tool.
22:17 timotimo k
22:18 jnthn I used IntelliJ quite a bit, PyCharm a little.
22:18 jnthn They are decent products.
22:18 jnthn One of my colleagues seems to like CLion, I'm pondering giving it a try.
22:19 ab5tract Cannot call 'FALLBACK'; none of these signatures match:
22:19 ab5tract :(Boxbrain: Str $command-name, *%_)
22:19 itz_ actually although I've used emacs and vim mostly I'm waiting for Linus' promised new editor (if its not a joke)
22:20 timotimo ab5tract: you need to do a subsignature match
22:20 jnthn No, it should pass all the args
22:20 timotimo oh
22:20 timotimo ofc
22:20 jnthn ab5tract: Can I see an example of what you're trying?
22:21 ab5tract sure, let me push the latest. it looks like FALLBACK could be a bit too eager
22:22 jnthn Sticking a "multi" on the example I gisted seems to work out nicely.
22:22 ab5tract https://github.com/ab5tract/Boxbrain/blob/master/lib/Boxbrain.pm
22:22 ab5tract the test code is in the same file as the library atm
22:23 ab5tract it dies at line 203, which does: $b(6,30).char = '$';
22:24 timotimo ab5tract: may i suggest {$command-name} instead of <<$command-name}?
22:24 timotimo er ... you know what i mean
22:25 ab5tract timotimo: sure, but may i ask you to explain more in turn? :)
22:25 timotimo well, << is for string interpolation >>
22:26 timotimo while { } is hash access with a "direct" value
22:26 timotimo code-gen-wise it's probably just putting a .Str at the end of $command-name in the << >> case
22:26 timotimo which usually the hash itself will do directly afterwards anyway unless you have an object hash
22:27 dalek roast: 89019c9 | moritz_++ | S12-methods/fallback.t:
22:27 dalek roast: basic FALLBACK multi method tests
22:27 dalek roast: review: https://github.com/perl6/roast/commit/89019c9eaa
22:27 jnthn ab5tract: Well, the method FALLBACK is getting is "invoke"
22:28 jnthn Oh...
22:28 jnthn Hmm
22:28 jnthn Yeah, invocation looks for invoke, then postcircumfix:<( )>
22:29 jnthn Except FALLBACK is like "oh yeah I can provide anything!"
22:29 timotimo heh, whoops
22:29 jnthn Yeah, interesting feature interaction. :0
22:29 jnthn I wonder if we have any more like this...
22:30 jnthn Certain things know to ask the MOP to exclude fallbacks
22:30 ab5tract i seemt to be on a bit of a streak, maybe i'll uncover some more ;)
22:30 timotimo add a FALLBACK to Any and find out! :)
22:30 * moritz wonders if DESTROY clls FALLBACK
22:30 moritz *calls
22:30 jnthn Well, one easy fix for this case is just to make the fallback predicate say no to inovke and postcircumfix:<( )>
22:30 lizmat S02:3847 mentions ":sigspace" as an adverb on quoting constructs
22:30 jnthn moritz: *lol*
22:30 synopsebot Link: http://perlcabal.org/syn/S02.html#line_3847
22:30 moritz jnthn: I know AUTOLOAD in p5 does :-)
22:31 lizmat this feels like a fossil
22:31 jnthn my $destroy := $class.HOW.find_method($class, 'DESTROY', :no_fallback(1));
22:31 moritz $ ./perl6-m -e 'class A { method FALLBACK($name, |c) { say $name } }; do { A.new }; say "done"'
22:31 jnthn So no, DESTROY does no_fallback and so will not
22:31 moritz sink
22:31 moritz done
22:32 jnthn Hmm :)
22:32 moritz :-)
22:32 moritz anyway, time for sleep here :-)
22:32 jnthn Yeah. I fear we're heading for list-of-exceptions land here :)
22:32 timotimo yeah, sink
22:32 timotimo we call that all the time
22:32 jnthn 'night, moritz
22:32 timotimo (i'm still looking forward to seeing how the new sink handling that's been proposed will turn out)
22:33 dalek specs: d0ebd21 | lizmat++ | S02-bits.pod:
22:33 dalek specs: Fix :sigspace fossil on quoting constructs
22:33 dalek specs: review: https://github.com/perl6/specs/commit/d0ebd2110e
22:35 timotimo we could have a "treat whitespace like html does" adverb for quoting %)
22:36 PerlJam lizmat: I think that :sigspace adverb was meant to illustrate the previous sentences.   "Adverbs such as :regex change the language to be parsed by switching to a different parser. This can completely change the interpretation of any subsequent adverbs as well as the quoted material itself."
22:37 R0Z joined #perl6
22:38 lizmat ah....   hmmm.... *that* was completely lost on me...
22:38 masak 'night, moritz
22:39 * lizmat is also tired, but needs to finish an advent post first
22:39 timotimo m: qr/ hi /
22:39 camelia rakudo-moar d6d08d: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/2KrfoQFa6a�Unsupported use of qr for regex quoting; in Perl 6 please use rx//�at /tmp/2KrfoQFa6a:1�------> [32mqr[33m�[31m/ hi /[0m�»
22:39 R0Z What's going on ? :D
22:40 timotimo we should make "qr" available to include QR codes in source code
22:40 timotimo also, we could just qqr/ $image_data / and decode QR like that
22:41 jnthn timotimo: "there will be modules" :)
22:41 timotimo :3
22:41 timotimo what will the extension mechanism look like for quoting?
22:41 timotimo would it have to be a full slang?
22:42 masak probably.
22:42 timotimo ah well
22:42 timotimo that's fine i suppose :)
22:42 masak unless someone does something unmentionable with a DSL.
22:42 timotimo we totally need a DSL to build slangs with
22:42 dalek rakudo/nom: 19f661f | jnthn++ | src/Perl6/Metamodel/ClassHOW.nqp:
22:42 dalek rakudo/nom: Tentatively exclude somes names from FALLBACK.
22:42 dalek rakudo/nom:
22:42 dalek rakudo/nom: This feels worryingly like a "list to remember". On the other hand, it
22:42 dalek rakudo/nom: could become a list copy-pasted into everyone's code in order to make
22:42 dalek rakudo/nom: FALLBACK to what people will probably want. Go this way for now; open
22:42 dalek rakudo/nom: to something better in the future.
22:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/19f661f3b4
22:42 timotimo hi R0Z :)
22:43 hoelzro timotimo: you should write a module that makes writing new quoting constructs easier!
22:43 timotimo i'll quote you on that.
22:43 * masak ponders a macro for creating DSLs to build slangs with
22:43 R0Z Hi timotimo. :D
22:43 masak hi, R0Z!
22:43 timotimo i'm not sure we've met before, are you new? :)
22:44 R0Z Hi, masak.
22:44 R0Z Yeah, i'm learning Perl.
22:44 R0Z I'm C/C++, Python and Ruby programmer. :D
22:44 masak good for you! how's it going?
22:44 masak learning Perl, I mean.
22:44 masak any first impressions?
22:45 timotimo "isn't perl going obsolete? I know it's a base language, but there are a lot of other more efficient languages that can do the same thing. For example, your mid term can be done easily in php." ← that's humorous to me
22:45 R0Z So nice bro.
22:45 R0Z It's a strong language, and the regex support is amazing.
22:46 masak it's OK, I guess...
22:46 jnthn masak: Always the optimist :P
22:47 adu R0Z: if you like Python/Ruby, then Perl6 is an excellent choice
22:47 jnthn ab5tract: Hopefully 19f661f helps you
22:47 R0Z Then, i will study.
22:47 R0Z Ta-ta, bros.
22:47 R0Z Cya.
22:48 jnthn ab5tract: I guess I could do a build on my Linux VM where tput does something useful, so I could really test it...but I figure you'll yell if it's still bust :)
22:48 adu R0Z: are you talking about Perl5 or Perl6?
22:48 atroxaper joined #perl6
22:49 timotimo cya R0Z
22:52 masak 'night, #perl6
22:52 lizmat gnight masak
22:52 Ulti TimToady++ great thanks I'll test it on my OSX work computer tomorrow
22:54 jnthn o/ masak
22:57 ab5tract jnthn: building now
22:57 lizmat m: qq:regex/a/
22:57 camelia rakudo-moar d6d08d: OUTPUT«===SORRY!===␤Cannot iterate object with Null representation␤»
22:57 lizmat p: qq:regex/a/
22:57 camelia rakudo-parrot d6d08d: OUTPUT«===SORRY!===␤Null PMC access in get_iter()␤»
22:57 lizmat j: qq:regex/a/
22:57 camelia rakudo-jvm d6d08d: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
22:58 Ulti pyrimidine you could just have it as the default behaviour of .parse though rather than it being the tokenised match tree, so the grammar just defines what it's default parse actions are if you never specify a class
22:58 ab5tract std: qq:regex/a/
22:58 camelia std 76ccee1: OUTPUT«Can't use string ("STD::Regex") as a HASH ref while "strict refs" in use at CursorBase.pm line 551.␤FAILED 00:00 135m␤»
22:58 lizmat I know it's probably nonsense, but the error is definitely LTM (and runtime, which it shouldn't be if it's nonsense)
22:58 lizmat j: q:regex/a/   #q// also
22:58 camelia rakudo-jvm d6d08d: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
22:59 lizmat m: q:regex/a/   #q// also
22:59 camelia rakudo-moar d6d08d: OUTPUT«===SORRY!===␤Cannot iterate object with Null representation␤»
22:59 ab5tract jnthn: it works!
23:00 jnthn lizmat: LTA, but looks compile time to me (see the SORRY!)
23:00 lizmat ah, yes :-)
23:00 jnthn But yeah, fail all around handling that one. Even STDs in on the fail game.
23:00 lizmat I guess I was tricked by the "iterate", which sort of implies runtime to me.   :-)
23:04 ab5tract \o/ .. if anyone wants a hug, there's one waiting for you at the end of https://github.com/ab5tract/Boxbrain/blob/master/lib/Boxbrain.pm
23:05 [particle]1 joined #perl6
23:05 ab5tract now with a more interesting draw pattern
23:08 * jnthn gets some rest
23:08 jnthn 'night, #perl6
23:10 colomon \o
23:10 timotimo gnite people
23:11 lizmat gnight jnthn timotimo
23:14 ab5tract goodnight jnthn and timotimo :D
23:24 cognominal joined #perl6

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

Perl 6 | Reference Documentation | Rakudo