»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:00 araujo left 00:06 araujo joined
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:11
00:17 atroxaper joined 00:18 prime joined 00:23 atroxaper left 00:47 rurban_ left 00:48 perltricks left 00:59 pyrimidine joined 01:14 pyrimidine left 01:18 dayangkun joined 01:20 mtj_ left, dayangkun left 01:21 Rounin left 01:23 sunnavy joined 01:25 mtj_ joined, raiph joined 01:38 pyrimidine joined 01:41 mtj_ left 01:42 petercommand joined, petercommand is now known as Guest43464 01:43 mtj_ joined, Guest43464 left, Guest43464 joined 01:44 Guest43464 is now known as petercommand 01:49 atroxaper joined 01:51 pyrimidine left 01:56 atroxaper left 02:09 JimmyZ left 02:12 JimmyZ joined 02:13 perltricks joined 02:15 rmgk_ joined, rmgk_ is now known as rmgk 02:35 hagiri joined 02:37 hagiri left 02:57 pyrimidine joined 02:58 araujo left 03:05 uncle joined 03:06 noganex joined 03:10 uncle left 03:15 perltricks left 03:21 raiph left 03:42 pyrimidine left 03:49 kurahaupo left 03:54 BenGoldberg left 04:27 kaleem joined 04:47 aborazmeh joined
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
Timbus im working on data bindings again, wh- what 04:53
oh
TimToady is reading Day 15
04:55 kurahaupo joined
TimToady and I believe this was pointed out earlier. regex has backtracking, rule does not 04:55
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. 04:59
TimToady usually that means you just want to has-a hash 05:01
the reason the rule thing works is LTM, not backtracking 05:03
05:03 kaare_ joined
TimToady so the explaining of rule is bascically completel bogus 05:04
modulo spelling
05:07 atroxaper joined
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:10
05:12 atroxaper left
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:16
the NFA should be picking the correct winner as the first try 05:17
so there's probably a bug hiding in here somewhere
so it's really the proto that is backtracking here, not the rules 05:18
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
*was
can't type tonight...
05:25 kaleem left 05:39 aborazmeh left
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:41
doesn't matter if I change them to tokens 05:42
perhaps some interaction with the quantifier, though you'd think '+' would be pretty easy to handle... 05:43
05:46 kaare_ left 05:48 KCL_ joined 05:49 xinming_ left 05:50 xinming joined 05:55 kurahaupo left 06:00 xinming left 06:01 xinming joined 06:16 kaare_ joined 06:19 mr-foobar joined, mr-foobar left 06:33 [Sno] joined 06:34 adu joined 06:41 tinyblak left 06:44 bjz joined 06:55 atroxaper joined
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
06:58 telex left, Isp-sec joined 07:00 telex joined 07:01 atroxaper left
TimToady is happy the grammar succeeded, but Very Sad that it succeeded for the wrong reasons... 07:01
07:06 xinming left 07:07 xinming joined 07:08 kaleem joined, tinyblak joined 07:12 Alina-malina left 07:13 Alina-malina joined 07:14 gfldex joined 07:19 jluis joined
TimToady the rule basically appears to fail nqp::can($meth, 'NFA') 07:21
so the NFA seems to not get attached right
07:25 FROGGS joined 07:44 Alina-malina left, cognominal joined, Alina-malina joined 07:52 gfldex left, vti joined 08:03 rurban_ joined
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
08:04 cognominal left, zakharyas joined
jnthn morning, #perl6 08:05
FROGGS morning
TimToady o/
jnthn Urgh....early
But at least I have unlimited free coffee on the train :)
TimToady has a weird NFA bug, discovered accidentally by Day 15
jnthn TimToady: It happens normally, not when Grammar::Tracer is involved, yes? 08:06
TimToady yes
the NFA method seems to disappear 08:07
jnthn Can you $code_obj.HOW.name($code_obj) in the NQP code?
So we can see what we actually end up with?
TimToady sure
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
TimToady will also do it to $meth in the merge
jnthn nwc10: So far, it's actually on time...but there's plenty of time for that to change yet :)
Alas, it still didn't segv yet 08:10
ooh, now it did 08:12
TimToady aha, in store_regex_nfa, we have a Regex, while in mergesubrule we have a Method
dunno what that means offhand, though... 08:13
that's Perl 6's store_regex_nfa, btw 08:14
not nqp's
jnthn Well, that probably means it's a different code object...
TimToady or got reblessed somehow 08:15
jnthn That never happens in that direction
Only can get more derived, andeven then the only place that actually does it is a mixin.
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:16
08:17 rindolf joined
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.
TimToady could find_method be finding the wrong method somehow? 08:19
jnthn Feels unlikely. 08:20
TimToady may have to sleep on this 08:21
jnthn *nod* 08:23
I got the OSX SEGV caught, and am looking into what happens. 08:24
Or the latest OSX SEGV, anyways...
TimToady what's nqp for getting the address of something as a number? 08:25
or do we support .WHERE? 08:26
all I see is eqaddr 08:27
oh, nqp::where, duh 08:28
08:28 atroxaper joined, adu left
jnthn That one, yes 08:28
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
Meanwhile...it seems we might be stack-scribbling at a distance in qqx
moritz qqx/ dd if=/dev/zero of=/dev/mem bs=1G / 08:30
stack-scribbling at a distance in qqx!
jnthn :P 08:31
08:33 atroxaper left, brrt joined 08:34 brrt left 08:38 pdcawley joined
TimToady there doesn't seem to be a registered which handler 08:41
the addresses do seem to be different
jnthn m: nqp::which(Mu)
camelia rakudo-moar 795a32: OUTPUT«===SORRY!===␤No registered operation handler for 'which'␤»
jnthn m: nqp::objectid(Mu)
camelia ( no output )
jnthn Ah, it's that. Sorry.
But yeah, I can't imagine it'd be the same object. So...weird. 08:42
Darn, guardmalloc + stack logs = slow :)
TimToady the addresses are about 670 k aprt 08:43
jnthn Well, that means they could be in the same semispace... 08:44
If they're nursery addresses.
TimToady the object id's are different too 08:45
jnthn OK, then it's certainly different objects. 08:46
TimToady will give up now and sleep
jnthn trucks on with hunting the OSX fail 08:47
08:48 blackbolt joined
jnthn Darn. It didn't SEGV once I turned on the stack logs :( 08:51
jnthn tries again just in case he got unlucky... 08:52
08:53 darutoko joined
blackbolt hi, how can I do in the terminal "to continue press key", then something like "readkey" 08:54
jnthn say "to continue press key"; $*IN.getc; 08:55
blackbolt thanks 08:56
08:58 abraxxa joined 09:07 ptc_p6 joined
masak good antenoon, #perl6 09:13
jnthn o/ amsak 09:14
uh, masak
09:15 KCL_ left
masak m: $_ = "amsak"; s/(.)(.)/$1$0/; .say 09:15
camelia rakudo-moar 795a32: OUTPUT«masak␤»
jnthn :P 09:17
09:17 BigBear joined
masak c2.com/cgi/wiki?LispMacro is on HN right now. news.ycombinator.com/item?id=8750455 09:19
09:20 mvuets joined, tinyblak left, tinyblak joined 09:22 ppant joined 09:23 dakkar joined, tinyblak left 09:24 tinyblak joined 09:28 tinyblak left 09:29 erkan joined 09:30 BigBear left 09:35 anaeem1_ joined 09:46 ppant left 09:48 pkpant joined 09:52 tinyblak joined 09:56 tinyblak_ joined 10:00 tinyblak left 10:11 pecastro joined 10:13 rurban joined
dalek p: f4edca2 | jnthn++ | tools/build/MOAR_REVISION:
Bump MOAR_REVISION to get openpipe fixes.
10:15
kudo/nom: 4d2710e | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for latest MoarVM.

Includes fixes for a qqx related crash that often showed up on OSX.
10:18
10:19 anaeem1_ left
jnthn wonders if this will make it into the Coke daily... 10:19
Well, tomorrow it will, if not today :) 10:20
10:25 xinming left
moritz wonders if [Coke]++ wants to move the daylies to the new server 10:26
10:26 xinming joined
jnthn Maybe, otoh having them on OSX is apparently a good canary... :) 10:26
nwc10 it's actually useful having them on non-linux 10:28
"both" would be even better, but more work 10:29
jnthn Yeah, something about OSX seems to make it more sensitive to certain kinds of memory error 10:30
I am surprised that ASAN didn't find us more of them, however.
"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
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...
nwc10 being clean under ASAN is actually quite hard to pull off
jnthn nwc10: Yes, that's what I meant. :)
We just about are, though, iiuc? :)
nwc10 I wanted to be clear that that's what your intent was 10:33
yes, we just about are. For the tests that we run
jnthn Right, that's the caveat.
nwc10 apart from the recently flappy thread failure
which I will try to get a backtrace for
jnthn Cool.
jnthn hopes somebody else on OSX will be able to get a clean run also :) 10:34
FROGGS I'm not on osx, I'm on scrillex these days 10:38
10:38 rbastic joined
FROGGS (sounds like names of drugs to me) 10:39
moritz tippex! 10:40
10:41 vti left
FROGGS *g* 10:43
jnthn Hah, "stop sniffing the tippex!" was not an entirely uncommon remark made by teachers at my highschool :P
FROGGS I just know about sniffing uhu...
10:44 fhelmberger joined 10:49 rurban left 10:51 prevost joined 10:55 blackbolt left 10:57 TuxCM joined
Ulti yay #16 on HN news.ycombinator.com/news 10:58
10:58 Ven joined
moritz Ulti: could you please update the title to use 'Perl 6' instead of 'Perl6'? 10:58
Ulti sure
Ven o/, #perl6 10:59
moritz (in wordpress; dunno if you can change it on HN)
Ulti cant change it on HN dont think
moritz ok 11:00
Ulti++ # blog post
now #14 on news.ycombinator.com/news :-)
Ven Should I completely remove the bit on "parcels" in the learnperl6iny? 11:04
(that they're a different "type" a list, immutable and all) 11:05
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:08
11:10 pecastro left
Ven "list context" is only applied by `@x =` and `.list`, correct or wrong? 11:11
jnthn Well, @$foo is sugar for $foo.list too
Ulti jnthn feel free to change it
Ven jnthn: right, thanks. Noting this one as well :)
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
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 :'(
nwc10 2.6 or 2.7?
11:13 konsolebox joined
Ulti not sure it was <2.4 when I was last doing GIS 11:13
it wont be Python 3 though
at least I highly doubt it
11:14 Isp-sec left
Ven m: my @a = 1, (2, (3)); say @a.perl 11:15
camelia rakudo-moar 795a32: OUTPUT«Array.new(1, 2, 3)␤»
Ven mh, why is this getting an Array.new?
Ulti did parcel finally vanish?
11:16 anaeem1 joined
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
jnthn Ven: Because that's the easiest thing that will EVAL back to the same, afaik.
nwc10 geonet.esri.com/thread/3696#jive-3...5376938439 -- ... 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
11:18 Rounin joined
nwc10 I stressed the 10, because I assume that ArcGIS 11 will happen some day, and might be on newer 11:19
Ulti yeah Python has all the same problems as Perl these days 11:20
nwc10 I wouldn't say exactly that. 11:21
the "all" part
11:22 pecastro joined
Ulti the biggest problem Perl has is all the people using Perl saying it has problems :D 11:22
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
11:24 atroxaper joined
Ven m: my @a = 1, (2, (3)); say @a eqv (1, 2, 3) 11:27
camelia rakudo-moar 795a32: OUTPUT«False␤»
11:32 atroxaper left
Ulti regrets not writing a click bait title for his post 11:33
Ven no, let's not do that. It's much better that way :). Ulti++ 11:36
11:38 pecastro left 11:44 denis_boyun joined 11:46 kaleem left
rbastic hi guys, where can i report issues for perl6? 11:48
i have a piece of code which consistently crashes on MoarVM but not the JVM
FROGGS rbastic: [email@hidden.address]
rbastic k, just email there ?
FROGGS right
and it will show up at rt.perl.org/
rbastic thanks 11:49
FROGGS you're welcome
rbastic k. sent. if anyone is interested, it's a mutexed singleton counter object, github.com/rbastic/CounterMutexSingleton 11:50
there appears to be issues with say() not being thread-safe also
i'll focus on mentioning it in the ticket, cheers </too_much_coffee>
FROGGS it is RT #123434 11:52
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123434
11:54 pecastro joined
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
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` ?
rbastic try perl6-m CounterMutexSingleton.pl6 --num_threads=500 first 11:57
before letting it run for an eon and chew up all your CPU/make your fan spin
the 100,000 mode was mostly for completeness/stress-testing
FROGGS dev/CounterMutexSingleton$ perl6-m CounterMutexSingleton.pl6 --num_threads=500
501
rbastic yup
is that with MoarVM?
FROGGS yes
rbastic what platform?
Ven should the learnxiny mention `loop`?
FROGGS linux
Ven Now that I think about it, it seems pretty unnecessary 11:58
rbastic FROGGS: nods
FROGGS: try uncommenting the 'say' lines in the class
and rerunning
that should make it crash
FROGGS [...] 11:59
Instant:1418644768.885212 elapsed time for read_with_lock: 0.0080462
Instant:1418644768.885323 elapsed time for lock increment: 0.00884774
Instant:1418644768.947218 elapsed time for read_with_lock: 0.0544766
501
dev/CounterMutexSingleton$ perl6-m --version
This is perl6 version 2014.11-82-g3fa1bdf built on MoarVM version 2014.11-70-gbabd3dc
colomon Ven: I dunno, I've used loop fairly often in p6...
rbastic hrm, strange FROGGS 12:00
This is perl6 version 2014.10-121-g7dd7292 built on MoarVM version 2014.10-17-g05b25a6
thought i updated moarvm to a more recent version than this
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
and i'm sure he's using a more recent MoarVM
moritz rbastic: jnthn fixed some things in moarvm today 12:02
rbastic k, let me update rakudobrew 12:03
newbie mode kicking in. how do i update moarvm on rakudobrew again :p 12:04
FROGGS tadzik: ?
Ven colomon: Alright. Loop labels?
colomon rakudobrew build moar
Ven that too. 12:05
:P
colomon though I guess that won't work if rakudo / nqp haven't been updated as well
rbastic weird errors: pastebin.com/w3e6BTg3
is this what you mean, colomon?
colomon rbastic: no, that's unexpected 12:06
I just mean "build moar" means build rakudo on moar; it will only ask for the most recent nqp / moar that Rakudo wants.
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
JimmyZ .tell Ulti irclog.perlgeek.de/perl6/2014-12-15#i_9806628 # in case you missed it
yoleaux JimmyZ: I'll pass your message to Ulti.
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
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. :)
JimmyZ oh, you known it
Ven colomon: I've removed it from the learnx
rbastic colomon: thanks, if i can't get this to update then i'll try that. 12:09
12:11 rurban joined
rbastic colomon: FROGGS: k, i managed to update it successfully using perl Configure.pl --gen-moar in .rakudobrew ... however, this code still crashes 12:12
moritz Ven: pmthium.com/2014/10/apw2014/ 12:13
vendethiel thanks moritz
12:16 JimmyZ left 12:17 JimmyZ joined
Ven is it alright if I copy-paste the examples from that pmichaud post? 12:18
12:23 rurban left 12:26 Ven left
moritz I'd think so 12:28
12:33 tinyblak_ left, tinyblak joined 12:34 tinyblak_ joined 12:35 tinyblak left 12:54 rurban joined 12:56 rurban left 13:00 atroxaper joined
dalek ake: 3d5cb58 | arnsholt++ | / (2 files):
Fix stupid bug with methods.

When we retrieve a method attribute from a class, the curried first argument should be the self object, NOT the method object. *grumblegrumblegruble*
Also tweaks tests to trigger this.
13:02
arnsholt There we go!
13:03 doublelel joined
vendethiel amazing :) 13:03
arnsholt I just had to realize 80880 is an invalid TCP port number =D
13:04 atroxaper left
moritz arnsholt: sorry, it's 8088 :-) 13:04
arnsholt Well, if I'd been a sensible person and remembered where to find the information it'd be fine =) 13:05
moritz arnsholt: it'd be sensible to ask in here :-) 13:06
arnsholt That too
But I figured this was going to be in the logs, so I might as well do the work myself =)
13:08 rindolf left 13:11 guru joined 13:14 Guest47124 joined 13:16 araujo joined 13:27 brrt joined 13:30 pmurias joined
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: irclog.perlgeek.de/perl6/2014-12-15#i_9806628 # in case you missed it
13:33 tinyblak_ left, tinyblak joined
moritz has trouble parsing Ulti's question, and applying the necessary context to it 13:33
Ulti sorry 13:34
in my recent blog post I had to change a set of tokens to rules because the longest match wasn't matched as token
I assumed its because rule could backtrack to find the longer match
moritz neither token nor rule backtrack 13:35
Ulti and the tokens instead just matched the first one and carried on
moritz the difference is that rule inserts <.ws> automatically
13:35 tinyblak_ joined
Ulti really 13:35
then there is a bug with tokens
moritz and the default <.ws> terminates longest-token matching
13:35 tinybla__ joined
Ulti at least the way I wrote them with proto 13:35
or a bug in my code and I dont get what is happening
13:36 tinybla__ left
Ulti but it wasnt on white space 13:36
it just made short matches to the first token matching
13:36 tinyblak_ left, tinybla__ joined, prevost left
Ulti I'll get the two traces so that its a bit more obvious 13:36
13:38 tinyblak left 13:39 atroxaper joined 13:40 tinybla__ left 13:43 Guest47124 left 13:45 pecastro left 13:53 tinyblak joined
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
do grammars have enough introspection to do that sort of thing?
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
i mean the MOP should give you enough flexibility for this
[Coke] jnthn++ memory fix, testing now 14:03
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
jnthn token foo is populating(SomeClass) { ... }
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
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:08
$the_class.new(|%($/{}.map({ .key => (.value.ast // .value.Str) }))) or so 14:09
Then it will work tree-wards too
Of course you go fancier still and introspect the clases in question for the attribute types and do coercions... :)
Ulti ^^
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 :/
Downside: an extra night in Stockholm. Upside: I get some more Perl 6 time today :P
14:11 pkpant left, dwarring left 14:12 pmurias_ joined 14:18 kaare_ left
brrt jnthn: i only have S17-procasync/basic.t failing now 14:21
so i guess that is jnthn++ :-)
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
14:23 pmurias_ left
jnthn That was rather far down my list of guesses :) 14:23
rbastic jnthn: see my crash report today? :) *hides* 14:26
moritz All tests successful.
(a few times in a row)
on linux
14:30 rindolf joined
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
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:33
14:34 kaleem joined
rbastic jnthn: no worries, it was an example that ab5tract and i hacked up 14:35
was showing him some multithreadedness and how things could maybe be done in perl6, stumbled across some bugs
it all worked fine until a new build recently, mac os x specific crash bugs
but unknown what the orig build is
(i.e. the orig build it worked on)
'say' does have some races though
jnthn Well, say as it's currently implemented fails to use the VM-level say primitive that is safe. 14:36
That would also be faster. 14:37
At least, that's how it was last I looked.
Probably an easy fix.
14:37 ab5tract joined
jnthn The other bugs are likely harder, however. 14:38
ab5tract just to clarify, that code runs cleanly for me on both moar/jvm
*without* say. if it isn't crashing for you with say, try adding another 0 to the num_threads ;) 14:39
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
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.
ab5tract and the say calls will crash both moar and jvm given a sufficient number of threads
jnthn Weird. 14:41
ab5tract indeed :/
thanks for looking into the qq:x bug, btw!
14:41 sqirrel left
ab5tract jnthn: in the meantime i will continue to pump out crash after crash for you ;) 14:41
14:42 jluis left
ab5tract rbastic: we saw the crashes on linux as os x, if i'm not mistaken 14:46
*as well as
14:47 jluis joined
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
jnthn ab5tract: I actually took your example directly under the debugger. 14:49
ab5tract: Was a little more effort to find because turning on allocation stack logging somehow made the problem vanish :)
But hopefully the bug I nailed really was the one. :) 14:50
[Coke] jnthn: woot!
no failures, jit or nojit
jnthn [Coke]: Much wow!
I deserve a nice beer this evening, then. :) 14:51
Thankfully, I know a good pub to take myself for it :)
14:51 Alina-malina left
jnthn works on the method ^foo() { } thingy 14:51
14:51 anaeem1 left
JimmyZ yeah, it cost 77% cpu on hack.p6c.org 14:52
14:52 Alina-malina joined
ab5tract jnthn: i've got weird issues with github cloning while at work, i will build tonight and let you know 14:52
jnthn ab5tract: Ah, ok. 14:53
moritz JimmyZ: and somehow your tmux also uses 90% CPU :-)
that's not normal, is it?
jnthn Sounds pretty terminal for the server... :P 14:54
moritz oh, probably processing all the print() output
jnthn hah :)
moritz JimmyZ: you should redirecto to /dev/null when you test something like that
JimmyZ: otherwise you're benchmarking the speed of your terminal (emulator) more than anything else
JimmyZ moritz: yeah, on my local it costs 20%, perl5 cost about ~5% 14:55
14:55 anaeem1_ joined
[Coke] I need to convert perl6-roast data into something more than one person can commit results to and include their sysinfo. 14:55
(then we can have OSX/linux, whatever nwc10 has...)
jnthn ++[Coke]
moritz [Coke]: define a standard filename format, based on architecture + username + machine name, or so 14:56
s/machine/host/
[Coke] moritz: or I could a DB instead of git to store the data. :)
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:57
JimmyZ with /dev/null, it cost 100% ,haha 14:58
jnthn On my (Windows) laptop, a loop of 'say "hello"' costs 100% whether I do it in Perl 5 or Perl 6. 15:01
Well, 100% of one core, that is.
So I'm not entirely sure you're proving very much :P 15:02
15:03 tinyblak left 15:04 tinyblak joined
jnthn (Note, I did > NUL, which is the windows equiv of /dev/null) 15:04
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
I mean without > NUL
15:06 tinyblak_ joined 15:09 tinyblak left 15:12 ajr joined, guru left, ajr is now known as Guest13605, Guest13605 is now known as ajr_ 15:21 molaf joined 15:23 JimmyZ left 15:24 JimmyZ joined 15:25 spider-mario joined
[Coke] .u - 15:26
yoleaux U+002D HYPHEN-MINUS [Pd] (-)
hoelzro o/ #perl6 15:28
mvuets привет, hoelzro 15:31
15:33 zoosha joined
hoelzro o/ mvuets 15:34
15:34 ab5tract left 15:36 anaeem1_ left, anaeem1 joined 15:38 kaleem left 15:40 telex left 15:42 telex joined 15:43 Ven joined
vendethiel m: role Foo[::T] { constant A = 1; }; say Foo[Str]::A 15:46
camelia rakudo-moar 4d2710: OUTPUT«===SORRY!=== Error while compiling /tmp/jLzop9SOHm␤Missing semicolon.␤at /tmp/jLzop9SOHm:1␤------> [::T] { constant A = 1; }; say Foo[Str]:⏏:A␤ expecting any of:␤ colon pair␤»
vendethiel :(
say I wanted to fix that, where should I be looked into first?
moritz std: role Foo[::T] { constant A = 1; }; say Foo[Str]::A 15:47
camelia std 76ccee1: OUTPUT«===SORRY!===␤Confused at /tmp/pSjqEhkPJj line 1:␤------> [::T] { constant A = 1; }; say Foo[Str]:⏏:A␤ expecting any of:␤ coloncircumfix␤ signature␤Parse failed␤FAILED 00:01 144m␤»
moritz vendethiel: "the parser"
Ven moritz: this part I guessed (easily) 15:48
vendethiel m: role Foo{constant A = 1; } say Foo::A; #and since this works...
camelia rakudo-moar 4d2710: OUTPUT«===SORRY!=== Error while compiling /tmp/Bxt0P5D52t␤Two terms in a row␤at /tmp/Bxt0P5D52t:1␤------> role Foo{constant A = 1; } ⏏say Foo::A; #and since this works...␤ expecting any of:␤ postfix␤ …»
vendethiel m: role Foo{constant A = 1; }; say Foo::A; #and since this works...
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␤␤»
moritz Ven: your dual nature with vendethiel confuses me :-) 15:50
vendethiel moritz: sorry!
Ven moritz: sorry!
16:00 cognominal joined 16:02 rbastic left
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:04
16:05 doublelel left
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:10
moritz vendethiel: ah :-) 16:11
16:12 Ven left
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
(which is what many people used feather for, and probably will use hack.p6c.org for now)
16:12 Colby` joined 16:13 Colby` is now known as Pleiades` 16:15 tinyblak_ left, tinyblak joined 16:20 tinyblak left, sqirrel joined 16:26 adu joined 16:27 denis_boyun left 16:31 brrt left, [Sno] left
masak I can't use ~~ in an action method, because $/ is a readonly parameter :/ 16:35
masak works around by putting the ~~ in a nested sub, and calling the sub 16:36
16:37 treehug88 joined 16:38 zakharyas left
jnthn masak: You don't have to call the parameter you put the match object in $/ :) 16:41
16:41 atroxaper left, atroxaper joined
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
uh, in *actions* sorry
16:42 atroxaper left 16:43 adu left
masak jnthn: you might be right. 16:45
Ulti so that blogpost did a lot better than I expected thanks #perl6 for the social media feels 16:46
probably should fix anything technical I screwed up though
masak in this case, I can see how I could've done it right in the grammar instead.
Ulti: TimToady++ seems to have found a rakudobug due to it! :)
Ulti cool 16:47
masak today's autopun is more twisty than funny: twitter.com/sarcasticapple/status/...0916985856
Ulti well not cool, but you know what I mean
masak :)
jnthn masak: Well, there you go. ;) 16:48
TimToady now to find the cure to the rakudobug...
jnthn masak: It's like the language whispers in your ear, "dude, wtf?" :)
TimToady but basically, LTM wasn't working at all on that set of rules
jnthn TimToady: Do you have the example (or a cut down one) to hand?>
TimToady sec 16:49
16:49 oetiker joined
TimToady I was using gist.github.com/anonymous/743d6b3915783a1a5853 16:50
symptom here is that it returns some of the sequence as dna, and the rest of it as aa
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
I traced it down to mergesubrule getting a different object than is in store_regex_nfa
so nqp::can($meth,'NFA') fails 16:52
jnthn If I run that here I get:
C:\consulting\rakudo>perl6-m bug.p6
「TATAKEKEKELKL」 sequence => 「TATAK」 sequence => 「EKEKELKL」
TimToady yes, that's running the dfa rule first, then stopping, then running the rest with teh aa rule
nfa should just send it all to the aa rule 16:53
jnthn It should do the aa rule for the lot, rigt?
TimToady but nfa is doing '' on all three
jnthn Yeah, OK, then we agree on what we expect at least :)
oh you're kidding
Remove the word "multi" in front of each of them.
TimToady I don't think so
the original didn't have them, and failed 16:54
jnthn It changes the semantics.
「TATAKEKEKELKL」 sequence => 「TATAKEKEKELKL」
Is what I get with it removed
TimToady gah
it shouldn't change the semantics 16:55
so maybe the original was failing for a different reason
jnthn Well, here's why it changes them
$meta_meth := $*MULTINESS eq 'multi' ?? 'add_multi_method' !! 'add_method';
It calls add_multi_method, meaning they don't end up in the normal methods table 16:56
Instead, a proto is generated with the name sequence:sym<dna>, for example.
And that is installed in there, and then dispatches to the individual regex.
And that's why the NFA gets lost.
I..hmm. :)
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.
TimToady but the original trace had some FAIL for some reason
jnthn OK.
I wonder how best to fix this particular one... :)
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 :)
Sure, np. I'll ponder it a bit too
16:58 Rounin left
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. 16:59
17:01 mvuets left
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
you can't trust this Perl guys.
17:03 mr-foobar joined
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:03
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: 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...
jnthn TimToady: GO FOR COFFEE 17:05
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.
TimToady hopes we're early to the next niche, whatever it is...
and the problem goes away if I leave only the alphabetic bits of the three character classes 17:09
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:12
17:13 ajr_ left, vendethiel joined 17:14 FROGGS left 17:15 guru joined 17:16 guru is now known as ajr_
mr-foobar The next wave is reactive programming apparently. 17:19
jnthn TimToady: Oh, it's not so easy. We actually have tests that rely on the current semantics. o.O 17:20
# handle precedence via multi-dispatch and recursion
multi rule expr(0) { <term> }
multi rule expr($p) { <expr($p-1)> *%[ <?before <pred($p)>> <op> ] }
o.O
I...uh...don't know quite how this fits with LTM. :) 17:21
So yeah, it is harder than I thought. Darn. :) 17:22
But I probably shouldn't be distracting you from finding a tricky bug by presenting a tricky design problem. :)
abraxxa is there a guide how to write a new data type? 17:25
17:26 adu joined
abraxxa i'd like to add one for NativeCall for call-by-reference 17:26
i have to leave, please write me a PM if there is a solution, thanks! 17:29
17:30 ajr_ left, guru joined
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:32
so in the old system, the sig would work like ($longname; $foo, $bar) or so 17:34
but with the longname ordering on LTM 17:35
to put it another way, the ordinary multi ordering only cuts in for multis with the same longname 17:36
17:36 fhelmberger left 17:37 atroxaper joined
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
but that's me
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
which is not what I call a unification :)
17:41 atroxaper left
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:42
though of course we might have to think carefully about failure and backtracking 17:43
anyway, back figgering out the non-merging CHARLIST bug... 17:44
17:49 gfldex joined 17:54 dakkar left, pmurias left 18:00 [Sno] joined 18:05 treehug88 left 18:07 treehug88 joined 18:09 grettis joined 18:13 hacktor joined, sqirrel left, kaare_ joined 18:18 Isp-sec joined 18:22 guru left 18:24 atroxaper joined
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
18:24 sqirrel joined 18:30 atroxaper left 18:36 rurban joined 18:41 hacktor left 18:59 rurban left
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 :) 18:59
bbiab 19:00
19:00 beastd joined, Mso150_a joined 19:01 sqirrel left, Mso150_a left 19:08 mvuets joined, FROGGS joined 19:10 FROGGS_ joined 19:14 FROGGS left, sqirrel joined 19:15 mvuets left 19:16 tinyblak joined 19:20 tinyblak left 19:27 anaeem1 left 19:28 anaeem1 joined, denis_boyun joined
masak "The last thing we want to have happen to the Node ecosystem is to create a Python 2, Python 3 situation" -- wesleyio.tumblr.com/post/1046378779...d-not-f-ed 19:33
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
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.
nwc10 and we survived because "worse is better"?
[Coke] 100% pass on moar-jit, moar-nojit, parrot.
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).
nwc10 and Guido did learn from those misakes
masak yes.
bartolin jnthn++ # fixing segfault on osx
masak nwc10: but it doesn't prevent others from taking the py3 effort and wanting to distance themselves from it. 19:41
19:42 rurban_ left
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?
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:45
TimToady it's not just about sink, it's also about being at the statementlist level 19:46
a loop at statementlist level puts itself into sink context even if it is the last statement in its block
nwc10 jnthn: ^^ what bartolin just asked 19:47
hoelzro TimToady: sorry, I'm not familiar with statementlist level; could you give an example?
nwc10 hopes that jnthn's noms were tasty
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.
TimToady hoelzro: if you're at a spot that can have multiple statements with ; then you're at statementlist level 19:59
if only one statement is parsed, then you're not
so a do {foo;bar;baz;} has baz at statementlist level, but a do baz does now 20:00
*not
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?
TimToady not exactly
even if there is the possibility of multiple statements, it's in sink context 20:01
so do {baz} has baz at statementlist level
as a single statement after a statement prefix, you get loop values 20:02
inside parens, you get loop values
(because ; makes LoL instead of a statementlist there)
hoelzro ah, I think I understand now 20:03
TimToady m: say ($_ for 1..10; $_ for 'a'..'z');
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␤»
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
TimToady m: say ($_ for 1..10; $_ for 'a'..'z').perl
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")␤»
TimToady m: say ($_ for 1..10; $_ for 'a'..'z')[1]
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:03 denis_boyun left 20:04 darutoko left 20:07 rindolf left 20:08 spider-mario left
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␤»
ab5tract o O ( EEXPLODED ) 20:10
20:10 spider-mario joined, FROGGS_ left
ab5tract though on close inspection it is clear that such a thing has to work in perl 6 20:11
20:11 FROGGS_ joined
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
ab5tract that looks like handy golf syntax 20:15
20:16 spider-mario left
TimToady yes, changing the altseq nodes to alt nodes fixes the NFA, though it may be slowing down the parser a bit 20:17
20:17 spider-mario joined
TimToady thinks relying on alt/altseq is the wrong approach to dealing with character classes in any case 20:18
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:20
TimToady we'd like to think so, but time will tell 20:21
ab5tract are they collectively described somewhere?
TimToady most contexts are now lazily determined by eventual binding, and this seems much more intuitive
sink is largely a compile-time context, however 20:22
sink is basically our side-effect monad, as it were
20:23 kaare_ left
ab5tract that makes intuitive sense to me 20:23
lizmat is back home and starts working on her advent post
TimToady the info about it is a bit scattered, however
m: my ($a, $b, *@c) := 1,2,3,4,5; say @c 20:24
camelia rakudo-moar 4d2710: OUTPUT«3 4 5␤»
TimToady the 1 and the 2 are in item context, while the 3,4,5 is in list context
20:24 bjz left
TimToady but that's determined at binding time in P6, not at compile time as it is in P5 20:25
20:25 bjz joined
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 bjz left
jnthn back from le nomz 20:25
yoleaux 19:51Z <ab5tract> jnthn: qq:x is running clean for me on moar now :D
jnthn ab5tract: \o/
ab5tract excluding #perl6 ;) 20:26
jnthn Welcome back, lizmat
ab5tract yeah jnthn, great work on that patch. i guess it kept you up late in the end?
20:26 bjz_ joined
lizmat jnthn: building now 20:26
jnthn ab5tract: No, I actually nailed it on the 4 hour train ride up to Stockholm this morning. :) 20:27
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_ left, bjz joined
ab5tract jnthn: productive commute :) 20:29
TimToady jnthn: found Ulti's NFA bug, see backlog
20:30 xiaomiao left, ponbiki left, moritz left, epochbell left, xopatch left, Maddingue left, lestrrat left, coffeeyy_ left, smash left, woolfy joined
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, haroldwu joined, tadzik joined, xiaomiao joined, ponbiki joined, moritz joined, epochbell joined, xopatch joined, Maddingue joined, lestrrat joined, coffeeyy_ joined, smash joined
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
Which is quite feasible.
But yeah, it'll cause issues with LTM.
I think in the longrun we probably want something better.
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:33 colomon left
TimToady passes all the tests except for t/spec/S17-lowlevel/thread.t, which I think is not my problem 20:34
20:34 colomon joined
jnthn Indeed 20:34
Is it a slowdown?
Or "not enough it made CORE.setting take noticably longer"? 20:35
dalek p: 20c3e18 | TimToady++ | src/QRegex/ (3 files):
s/altseq/alt/ in cclasses so correct NFA is built

This may cause a slight temporary slowdown of the parser, until we scrap alternation in favor of well-encoded sets of characters.
20:36
jnthn Hah, cool, there's even a succession plan already \o/ 20:37
TimToady++
TimToady core setting might've taken a second or two longer, but didn't time it rigorously
jnthn That's tolerable.
lizmat sees a spectest without flappers in a *long* time
*for the first time
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 pdcawley left
lizmat I'm seeing 5 errors in t/spec/S32-str/numeric.t 20:38
20:38 bjz left
jnthn Hm, I didn't have those this morning. 20:38
lizmat which I think are TimToady++ 's work ?
20:38 bjz joined
lizmat oops, that's me 20:38
changing {} to return self.hash instead of self 20:39
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 kudo/nom: d6d08d5 | TimToady++ | tools/build/NQP_REVISION:
things that go bump in the nqp
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), ...'?
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.
lizmat TimToady: will take her for a spin in a minute
TimToady bartolin: final * is not implemented
bartolin TimToady: yes, but I'm trying to implement it ;-)
lizmat All tests successful. 20:45
Files=931, Tests=34116, 205 wallclock secs ( 8.96 usr 2.73 sys + 1212.22 cusr 150.25 csys = 1374.16 CPU)
TimToady well, 1,2,* should be 1, 2 xx *
lizmat taking the nfa fixes now for a spin
TimToady but the tricky bit is implementing @list, *
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 ;-)
TimToady it's probably not worth thinking about until after the GLR 20:47
and it might be the wrong notation anyway
plus, you can always say @array, {$_} ... * currently 20:48
m: say 1,2,3, {$_} ... *
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 ...␤»
TimToady maybe it should just be a method: (1,2,3).extend 20:49
or some such
bartolin ok, thanks for explaining! I think I'll leave it as it is ;-)
lizmat doesn't see any delay in building the settings
TimToady All systems are go for lunch. 20:50
lizmat All tests successful. 20:55
Files=931, Tests=34116, 198 wallclock secs ( 8.92 usr 3.20 sys + 1211.93 cusr 150.42 csys = 1374.47 CPU)
this is with NFA fixes
jnthn cPU is about the same, I see
lizmat yeah, and wallclock diff could be anything 20:56
20:57 atroxaper joined, sqirrel left 20:59 noganex_ joined 21:00 baest_ joined, mtj_ left 21:01 atroxaper left, noganex left 21:02 masak joined, masak is now known as Guest29773, Mso150 joined, molaf left
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␤»
vendethiel niice
21:03 BooK joined
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␤»
vendethiel jnthn: ENOTASFUNNY
21:07 FROGGS_ left 21:08 mtj_ joined
jnthn TimToady: Yeah, I don't notice any particular slowdown here either. 21:13
21:15 molaf joined
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:20
colomon defined 21:21
PerlJam mathw: :D means "defined" and the other colon separates the invocant argument from the rest of the args.
colomon PerlJam++
ab5tract what's the p6 equivalent of ruby's method_missing?
mathw ah so it will not match as a candidate if the invocant is undefined?
colomon mathw: right
PerlJam aye
mathw neat 21:22
moritz ab5tract: is that a fallback?
mathw I must remember that
ab5tract yeah
mathw thanks
mathw goes to make pie
PerlJam ab5tract: there's a CANDO or CAN or something, but I don't think they're invented yet.
moritz ab5tract: there's an undocumented hack through the metamodel you can use 21:23
21:24 anaeem___ joined, Guest29773 is now known as masak
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:24
in my case, i don't even want @args, as i just want to `print %lookup<$method-name>` 21:25
are we talking about the same thing? 21:26
PerlJam ab5tract: S10:150
synopsebot Link: perlcabal.org/syn/S10.html#line_150
ab5tract and that would be print `%lookup<<$method-name>>`
thank you PerlJam 21:27
21:27 anaeem1 left
btyler ab5tract: something like .^add_fallback? masak had an advent post last year that used that: perl6advent.wordpress.com/2013/12/0...and-pairs/ 21:27
PerlJam ab5tract: You might be able to use "handles" for your purposes with a little creativity. 21:28
ab5tract btyler: :)
perhaps this is the undocumented hack moritz was pointing at 21:29
the lookup is not so big, so i don't mind explicitly creating the subroutines 21:30
but i'm hoping to make a proper library out of this, so i'm striving for best practice
21:33 telex left 21:34 telex joined, brrt joined 21:41 anaeem___ left 21:43 erkan left 21:46 erkan joined, erkan left, erkan joined
TimToady Ulti: if you rerun your trace with the newest rakudo, it should not say FAIL now 21:51
jnthn ab5tract: I'm testing a local patch that implements FALLBACK, which is the spec'd S12 way :) 21:53
ab5tract: Works like this: gist.github.com/jnthn/b3524444f4caeda0055b 21:55
21:57 ptc_p6 left
timotimo neat! 22:02
ab5tract jnthn: awesome!!! 22:04
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:05
timotimo yeah 22:06
you can already .^add_fallback, but it isn't to spec
jnthn Yes, I'd prefer folks don't depned on the .^add_fallback API.
timotimo very understand
jnthn I'm not convinced it's exactly the right design yet. :)
ab5tract for the current case, it's a small lookup so i don't mind waiting to clean it up 22:07
jnthn: FALLBACK looks pretty good. would we be able to do multis with singature matching?
( .. give 'em an inch, they want a hectare .. ) 22:10
timotimo should just fall out of the code naturally 22:11
dalek ast: c704d33 | jnthn++ | S12-methods/fallback.t:
Add tests for FALLBACK.
jnthn ab5tract: I didn't try it but spec says yes, and should just work 22:12
ab5tract that's too cool
TimToady just falls out of the double dispatch model
to the outside world, a multi looks like an only
jnthn phew, my editor was smart enough to NOT open all 1700 files of t/spec
timotimo :D 22:13
dalek kudo/nom: 251989b | jnthn++ | src/Perl6/Metamodel/ClassHOW.nqp:
Implement FALLBACK.
kudo/nom: d661a82 | jnthn++ | t/spectest.data:
Run S12-methods/fallback.t.
jnthn Feel free to contribute a test for the multi FALLBACK case. 22:14
itz_ I hope that editor is smart enough to be vim or emacs and not notepad++ ;) 22:15
timotimo np++ is all right
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
.oO( The reason I use vim is 'cus I started it once and could never get out of it... )
timotimo i wonder if jnthn would like resharper
jnthn jnthn finds resharper too noisy 22:17
I know a lot of people who find it helpful.
It's a really well made and polished tool.
timotimo k
jnthn I used IntelliJ quite a bit, PyCharm a little. 22:18
They are decent products.
One of my colleagues seems to like CLion, I'm pondering giving it a try.
ab5tract Cannot call 'FALLBACK'; none of these signatures match: 22:19
:(Boxbrain: Str $command-name, *%_)
itz_ actually although I've used emacs and vim mostly I'm waiting for Linus' promised new editor (if its not a joke)
timotimo ab5tract: you need to do a subsignature match 22:20
jnthn No, it should pass all the args
timotimo oh
ofc
jnthn ab5tract: Can I see an example of what you're trying?
ab5tract sure, let me push the latest. it looks like FALLBACK could be a bit too eager 22:21
jnthn Sticking a "multi" on the example I gisted seems to work out nicely. 22:22
ab5tract github.com/ab5tract/Boxbrain/blob/...oxbrain.pm
the test code is in the same file as the library atm
it dies at line 203, which does: $b(6,30).char = '$'; 22:23
22:24 spider-mario left
timotimo ab5tract: may i suggest {$command-name} instead of <<$command-name}? 22:24
er ... you know what i mean
ab5tract timotimo: sure, but may i ask you to explain more in turn? :) 22:25
timotimo well, << is for string interpolation >>
while { } is hash access with a "direct" value 22:26
code-gen-wise it's probably just putting a .Str at the end of $command-name in the << >> case
which usually the hash itself will do directly afterwards anyway unless you have an object hash
dalek ast: 89019c9 | moritz_++ | S12-methods/fallback.t:
basic FALLBACK multi method tests
22:27
jnthn ab5tract: Well, the method FALLBACK is getting is "invoke"
Oh... 22:28
Hmm
Yeah, invocation looks for invoke, then postcircumfix:<( )>
Except FALLBACK is like "oh yeah I can provide anything!" 22:29
timotimo heh, whoops
jnthn Yeah, interesting feature interaction. :0
I wonder if we have any more like this...
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 ;)
timotimo add a FALLBACK to Any and find out! :)
moritz wonders if DESTROY clls FALLBACK
*calls
jnthn Well, one easy fix for this case is just to make the fallback predicate say no to inovke and postcircumfix:<( )>
lizmat S02:3847 mentions ":sigspace" as an adverb on quoting constructs
jnthn moritz: *lol*
synopsebot Link: perlcabal.org/syn/S02.html#line_3847
moritz jnthn: I know AUTOLOAD in p5 does :-)
lizmat this feels like a fossil 22:31
jnthn my $destroy := $class.HOW.find_method($class, 'DESTROY', :no_fallback(1));
moritz $ ./perl6-m -e 'class A { method FALLBACK($name, |c) { say $name } }; do { A.new }; say "done"'
jnthn So no, DESTROY does no_fallback and so will not
moritz sink
22:31 cognominal left
moritz done 22:31
jnthn Hmm :) 22:32
moritz :-)
anyway, time for sleep here :-)
jnthn Yeah. I fear we're heading for list-of-exceptions land here :)
timotimo yeah, sink
we call that all the time
jnthn 'night, moritz
timotimo (i'm still looking forward to seeing how the new sink handling that's been proposed will turn out)
dalek ecs: d0ebd21 | lizmat++ | S02-bits.pod:
Fix :sigspace fossil on quoting constructs
22:33
timotimo we could have a "treat whitespace like html does" adverb for quoting %) 22:35
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:36
22:37 Mso150 left, R0Z joined
lizmat ah.... hmmm.... *that* was completely lost on me... 22:38
masak 'night, moritz
lizmat is also tired, but needs to finish an advent post first 22:39
timotimo m: qr/ hi /
camelia rakudo-moar d6d08d: OUTPUT«===SORRY!=== Error while compiling /tmp/2KrfoQFa6a␤Unsupported use of qr for regex quoting; in Perl 6 please use rx//␤at /tmp/2KrfoQFa6a:1␤------> qr⏏/ hi /␤»
R0Z What's going on ? :D
timotimo we should make "qr" available to include QR codes in source code 22:40
also, we could just qqr/ $image_data / and decode QR like that
jnthn timotimo: "there will be modules" :) 22:41
timotimo :3
what will the extension mechanism look like for quoting?
would it have to be a full slang?
masak probably. 22:42
timotimo ah well
that's fine i suppose :)
masak unless someone does something unmentionable with a DSL.
timotimo we totally need a DSL to build slangs with
dalek kudo/nom: 19f661f | jnthn++ | src/Perl6/Metamodel/ClassHOW.nqp:
Tentatively exclude somes names from FALLBACK.

This feels worryingly like a "list to remember". On the other hand, it could become a list copy-pasted into everyone's code in order to make FALLBACK to what people will probably want. Go this way for now; open to something better in the future.
timotimo hi R0Z :)
hoelzro timotimo: you should write a module that makes writing new quoting constructs easier! 22:43
timotimo i'll quote you on that.
masak ponders a macro for creating DSLs to build slangs with
R0Z Hi timotimo. :D
masak hi, R0Z!
timotimo i'm not sure we've met before, are you new? :)
R0Z Hi, masak. 22:44
Yeah, i'm learning Perl.
I'm C/C++, Python and Ruby programmer. :D
masak good for you! how's it going?
learning Perl, I mean.
any first impressions?
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.
It's a strong language, and the regex support is amazing.
masak it's OK, I guess... 22:46
jnthn masak: Always the optimist :P
adu R0Z: if you like Python/Ruby, then Perl6 is an excellent choice 22:47
jnthn ab5tract: Hopefully 19f661f helps you
R0Z Then, i will study.
Ta-ta, bros.
Cya.
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
timotimo cya R0Z 22:49
masak 'night, #perl6 22:52
lizmat gnight masak
Ulti TimToady++ great thanks I'll test it on my OSX work computer tomorrow
22:53 atroxaper left
jnthn o/ masak 22:54
ab5tract jnthn: building now 22:57
lizmat m: qq:regex/a/
camelia rakudo-moar d6d08d: OUTPUT«===SORRY!===␤Cannot iterate object with Null representation␤»
lizmat p: qq:regex/a/
camelia rakudo-parrot d6d08d: OUTPUT«===SORRY!===␤Null PMC access in get_iter()␤»
lizmat j: qq:regex/a/
camelia rakudo-jvm d6d08d: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
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/
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␤»
lizmat I know it's probably nonsense, but the error is definitely LTM (and runtime, which it shouldn't be if it's nonsense)
j: q:regex/a/ #q// also
camelia rakudo-jvm d6d08d: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
lizmat m: q:regex/a/ #q// also 22:59
camelia rakudo-moar d6d08d: OUTPUT«===SORRY!===␤Cannot iterate object with Null representation␤»
ab5tract jnthn: it works!
jnthn lizmat: LTA, but looks compile time to me (see the SORRY!) 23:00
lizmat ah, yes :-)
jnthn But yeah, fail all around handling that one. Even STDs in on the fail game.
lizmat I guess I was tricked by the "iterate", which sort of implies runtime to me. :-)
23:03 adu left, Isp-sec left
ab5tract \o/ .. if anyone wants a hug, there's one waiting for you at the end of github.com/ab5tract/Boxbrain/blob/...oxbrain.pm 23:04
23:05 [particle]1 joined
ab5tract now with a more interesting draw pattern 23:06
23:07 beastd left
jnthn gets some rest 23:08
'night, #perl6
colomon \o 23:10
timotimo gnite people 23:11
lizmat gnight jnthn timotimo
ab5tract goodnight jnthn and timotimo :D 23:14
23:22 R0Z left 23:24 cognominal joined 23:28 cognominal left 23:46 ab5tract left, treehug88 left