Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-16

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:00 vendethiel wendy++
00:00 vendethiel pretty amazing, if you ask me ;-)
00:00 skids joined #perl6
00:02 tadzik oh, I'm on the internet :)
00:02 tadzik woolfy++
00:02 masak_grr internet++
00:03 woolfy tadzik: I still have lots of troubles finding a flattering picture of you...
00:03 tadzik heh
00:03 tadzik well, there's always the one with red mohawk... :
00:03 tadzik :P
00:03 woolfy By the way, this is certainly a El_Che++  for putting all the info into the FOSDEM system, not an easy task...
00:03 tadzik El_Che++
00:04 woolfy I got a lovely one of you at the French Perl Workshop in 2012
00:04 adu tadzik: lol
00:04 tadzik oh, I had some nice ones from there :)
00:05 tadzik woolfy: well, if you can't find anything by tomorrow I can try to take one of myself :)
00:05 tadzik now I'm too sleepy
00:05 tadzik zzz *
00:05 woolfy Nope, got it.  On to the next fotogenic person.  Three to go.
00:05 tadzik &
00:05 masak_grr tadzik: sleep well
00:05 woolfy tadzik: sleep well
00:05 El_Che doesn't the intertubes have shameful pics of you all to put on the fosdem site?
00:05 El_Che :)
00:06 tadzik thank you, and so to you, when you decide to :)
00:06 woolfy No, but Wendy's backup does have pictures of many people, including El_Che!  :-)
00:06 El_Che omg
00:06 El_Che :)
00:06 woolfy Muhahaha!
00:06 woolfy El_Che: go to bed!!!
00:06 woolfy :-)
00:07 El_Che yeah, getting up in 5h18 minutes :(
00:07 El_Che damn, I need to win the lottery :)
00:07 woolfy Ouch...
00:07 El_Che goingto bed, good idea
00:07 El_Che bye
00:07 woolfy \o
00:08 sivoais joined #perl6
00:31 Sqirrel joined #perl6
00:42 adu I figured it out!
00:42 masak_grr let's hear it.
00:44 adu I put the long enums in C::AST::Ops, and everything else in a single file
00:44 adu so much cleaner
00:45 adu I think I made a number of mistakes
00:46 adu I was doing "use C::AST3", but the thing at the top was "module C::AST;"
01:02 adu https://github.com/andydude/p6-c-parser/blob/cast-version-3/lib/C/AST3.pm6
01:03 adu isn't it pretty?
01:12 retupmoca joined #perl6
01:22 IllvilJa joined #perl6
01:22 masak 'night, #perl6
01:22 kurahaupo joined #perl6
01:26 dj_goku joined #perl6
01:48 dj_goku joined #perl6
01:48 dj_goku joined #perl6
01:48 Sqirrel joined #perl6
01:49 BenGoldberg joined #perl6
01:50 skids m: my @in = (Num.^methods.gist x 400).split(/\s+/); now.say; my @t = @in.grep({ /ee/ }); now.say; my $in = @in.join(" "); my @v = $in ~~ m:g/\w*ee\w*/; @v = @v».Str; now.say; say so (@v) eq (@t) # drastic performance difference
01:50 camelia rakudo-moar 0463a4: OUTPUT«Instant:1421373078.155182␤Instant:1421373081.166052␤Instant:1421373081.401042␤True␤»
02:07 TimToady subtraction...hard...
02:12 TimToady why not use @v eqv @t, which will hopefully short circuit if an early element is different
02:15 TimToady m: my @in = (Num.^methods.gist x 400).split(/\s+/); now.say; my @t = @in.grep(/ee/); now.say; my $in = @in.join(" "); my @v = $in ~~ m:g/\w*ee\w*/; @v = @v».Str; now.say; say @v eqv @t
02:15 camelia rakudo-moar 0463a4: OUTPUT«Instant:1421374540.527195␤Instant:1421374543.173888␤Instant:1421374543.408081␤True␤»
02:15 TimToady you can get rid of ⅔ of the time just be losing the closure around the /ee/
02:15 TimToady *by
02:16 skids joined #perl6
02:16 TimToady hopefully you can lose most of the other ⅓ by implementing the GLR
02:16 TimToady skids: see backlog
02:20 skids Yeah actually I put the closure in at one point to see if it helped the rx stay compiled (assuming that was part of it) and forgot to take it back out before pasting.
02:22 skids The parens/lists were just superstitious
02:23 TimToady so was the so :)
02:26 chenryn joined #perl6
02:26 xiaomiao joined #perl6
02:30 cbk1090 joined #perl6
02:31 cbk1090 When installing Rakudo what does "Parrot without ICU is not supported anymore." mean and how do I fix it?
02:32 leont Parrot uses the ICU library for unicode support
02:32 77CAABY7Q joined #perl6
02:34 cbk1090 Ok so just fix unicode.  got it.  Thanks
02:36 adu You can't fix unicode
02:38 geekosaur you need to make sure the ICU development headers and libraries are installed when parrot is built (usually Configure ... --gen-parrot)
02:39 cbk1090 It looks like the ICU headers are not being installed with the Configure --gen-parrot option. At least for me
02:40 chenryn joined #perl6
02:40 geekosaur ...
02:40 geekosaur maybe I need to rephrase that
02:40 geekosaur gen-parrot does not install ICU for you; you must install it, however you need to do it on your OS, *before* the gen-parrot
02:41 geekosaur or parrot will build without it, and will not work for rakudo-parrot
02:41 cbk1090 oh ok.
02:54 vendethiel joined #perl6
03:12 vukcrni joined #perl6
03:17 vendethiel joined #perl6
03:24 noganex joined #perl6
04:15 IllvilJa joined #perl6
04:19 Rounin joined #perl6
04:38 anaeem1_ joined #perl6
05:02 frew joined #perl6
05:03 yeahnoob joined #perl6
05:04 yeahnoob joined #perl6
05:04 yeahnoob joined #perl6
05:05 yeahnoob joined #perl6
05:06 yeahnoob joined #perl6
05:12 adu hmm
05:21 vendethiel joined #perl6
05:44 raydiak hm?
05:56 raydiak m: my $a = 'foo'; $a.substr-rw(2,1) = 'x'; say $a;
05:56 camelia rakudo-moar 0463a4: OUTPUT«No such method 'substr-rw' for invocant of type 'Str'␤  in block <unit> at /tmp/FXDKKGCLEh:1␤␤»
05:56 raydiak can anyone suggest a good way to replace 1 character in a string by index?
05:57 raydiak thought we had substr-rw implemented already, but guess it's gone
05:57 kaleem joined #perl6
06:01 raydiak rn: my $a = 'foo'; $a.substr-rw(2,1) = 'x'; say $a;
06:01 camelia niecza v24-109-g48a8de3: OUTPUT«(signal ABRT)Stacktrace:␤␤  at <unknown> <0xffffffff>␤  at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_string (intptr,intptr,int) <0xffffffff>␤  at (wrapper alloc) object.AllocString (intptr,int) <0xffffffff>␤  at string…»
06:01 camelia ..rakudo-{parrot,moar} 0463a4: OUTPUT«No such method 'substr-rw' for invocant of type 'Str'␤  in block <unit> at /tmp/tmpfile:1␤␤»
06:09 adu o raydiak
06:10 raydiak omg adu where'd yer arm go!?
06:10 adu http://pastie.org/9834616
06:10 adu my arm?
06:11 TimToady I found it over here -->  /
06:11 adu I don't get it
06:11 raydiak ^^^^^^ thought " o " was a o/ missing the part that TimToady found :)
06:12 adu o that's what it means
06:12 adu I always though "\o" was just a lazy way of spelling "hello"
06:12 Rounin joined #perl6
06:12 raydiak heh I spent a good few months lurking here wondering what kind of escape sequence "\o" was
06:13 raydiak nice adu++ # tenacity
06:13 adu I apparently spent several years doing the same
06:14 raydiak so you've got CAST starting to work?
06:14 adu yes
06:14 adu I'm on my second major rewrite, CAST3
06:15 adu https://github.com/andydude/p6-c-parser/blob/cast-version-3/lib/C/AST3.pm6
06:15 adu isn't it beautiful?
06:16 TimToady 11 more rewrites and you can get it to CASTE if you stick to hex
06:16 IllvilJa joined #perl6
06:16 raydiak oh pretty
06:16 TimToady I guess that would be B momre rewrites though
06:17 adu TimToady: lol
06:17 TimToady *more
06:17 adu 0x65
06:17 JimmyZ why AST3? not AST
06:18 adu JimmyZ: because I like to copy some things instead of write from scratch, when I'm ready I'll rename s/AST3/AST/ when I merge into master branch
06:22 Alina-malina joined #perl6
06:27 chenryn_ joined #perl6
06:36 TimToady crud, the civil time idiots are adding another leap-second in June
06:36 TimToady I thought they were getting over that
06:38 xiaomiao TimToady: you could convince earth to wobble less ;)
06:39 TimToady let's also persuade all our timezones to relocate all of their positions to the exact center of each timezone, then maybe leap seconds would matter slightly
06:39 TimToady all leap seconds do is screw things up
06:40 TimToady it doesn't matter if civil time drifts a minute or two over the next century
06:43 dj_goku joined #perl6
06:43 dj_goku joined #perl6
06:45 TimToady we should've just nail civil time to atomic time in 2000, and the let the people in 3000 decide whether it's got bad enough to warrant an adjustment yet
06:45 TimToady *nailed
06:46 TimToady *then
06:46 TimToady can't type tonight
06:46 TimToady probably some leap-microseconds in there I didn't account for
06:48 telex joined #perl6
06:54 dj_goku joined #perl6
06:54 dj_goku joined #perl6
06:57 kjs_ joined #perl6
06:58 nebuchadnezzar joined #perl6
07:10 chenryn_ joined #perl6
07:11 dj_goku joined #perl6
07:11 dj_goku joined #perl6
07:29 rindolf joined #perl6
07:33 gfldex joined #perl6
07:35 [Sno] joined #perl6
07:36 vendethiel joined #perl6
07:39 darutoko joined #perl6
07:45 vukcrni joined #perl6
07:50 abraxxa joined #perl6
07:51 * moritz agrees 100% with TimToady++
07:54 jack_rabbit joined #perl6
07:56 kjs_ joined #perl6
07:58 brrt joined #perl6
08:04 FROGGS joined #perl6
08:07 TimToady http://rosettacode.org/wiki/Ulam_spiral_%28for_primes%29#Perl_6
08:08 jnthn hah, I read the var name as $yolo...
08:09 kaleem joined #perl6
08:22 chenryn_ joined #perl6
08:24 simcop2387_ joined #perl6
08:24 zakharyas joined #perl6
08:25 vukcrni joined #perl6
08:32 petercommand joined #perl6
08:56 dayangkun joined #perl6
08:57 mvuets joined #perl6
09:01 chenryn_ joined #perl6
09:06 abraxxa joined #perl6
09:07 vendethiel joined #perl6
09:07 TuxCM joined #perl6
09:21 pecastro joined #perl6
09:41 xfix joined #perl6
09:41 xfix joined #perl6
09:44 Ven joined #perl6
09:45 vendethiel joined #perl6
09:56 donaldh joined #perl6
10:00 masak $yolo, #perl6
10:00 moritz \o masak
10:00 TuxCM joined #perl6
10:01 masak I've been back to the drawing board, and I now have a new 4x4 maze generator algorithm, Correct This Time™, which I will implement.
10:01 krunen joined #perl6
10:03 moritz oh, was the previous one buggy?
10:04 masak subtly so.
10:04 masak which is good, because that'll make for an even better blog post ;)
10:05 spider-mario joined #perl6
10:10 TuxCM joined #perl6
10:11 virtualsue joined #perl6
10:13 rurban joined #perl6
10:15 ab5tract yay for blogpost :)
10:18 sqirrel_ joined #perl6
10:21 araujo joined #perl6
10:28 virtualsue joined #perl6
10:30 dalek nqp: 081cde2 | donaldh++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/IndyBootstrap.java:
10:30 dalek nqp: Fix compilation warnings on Java 1.8
10:30 dalek nqp: review: https://github.com/perl6/nqp/commit/081cde249f
10:33 dalek rakudo/nom: 6f79fcc | lizmat++ | src/core/Str.pm:
10:33 dalek rakudo/nom: Implement Str.substr-rw, raydiak++ for spotting
10:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6f79fcc296
10:33 lizmat_ .tell raydiak my $a = "foo"; $a.substr-rw(2,1) = "x"; say $a  #  -> fox
10:33 yoleaux lizmat_: I'll pass your message to raydiak.
10:34 araujo joined #perl6
10:34 lizmat .tell raydiak https://github.com/rakudo/rakudo/commit/6f79fcc296 implements it, tests welcome
10:34 yoleaux lizmat: I'll pass your message to raydiak.
10:44 Woodi_ hallo today :)
10:45 Woodi_ Perl5 have some problems with regexes and non ascii chars, yes ? $_ =~ /(\w+)'s$/  sometimes not catch 's words...
10:45 * masak finds a use for infix:<^^>
10:46 FROGGS cute
10:46 araujo joined #perl6
10:49 araujo joined #perl6
10:58 andreoss joined #perl6
11:04 lizmat .tell jnthn from an optimization point of view, would it make sense to move functionality like Str.substr(|c) to sub substr(Str, |c) ?  as a sub call optimizes better ?
11:04 yoleaux lizmat: I'll pass your message to jnthn.
11:06 virtualsue joined #perl6
11:08 TuxCM joined #perl6
11:13 moritz it would
11:14 lizmat ok, I'll see if I can get that together
11:15 moritz but please run some non-trivial benchmarks
11:15 moritz it could be that we're calling the method form everywhere
11:15 lizmat in the setting, it's about 2/3 method, 1/3 sub
11:16 moritz and thus moving the functionality to the sub introduces a redispatch, and makes things slower
11:16 moritz dunno if we care about the semantics if somebody subclasses Str and overrides substr
11:16 lizmat no, my idea would be that the sub case would *not* do a redispatch
11:16 lizmat it does a redispatch now
11:17 moritz well
11:17 moritz sorry
11:17 moritz I meant that calling the method would introduce a re-dispatch to the sub
11:17 moritz unless you want to implement it twice
11:18 lizmat the method version of .substr would call the sub version of substr
11:18 moritz thus making the method form slower
11:18 moritz that's what I meant
11:18 lizmat not necessarily, as the sub call inside the method could be inlined
11:18 rurban joined #perl6
11:19 lizmat so, the idea is that the method version would not get slower, but the sub version would
11:19 lizmat s/slower/faster
11:19 lizmat *sigh*
11:19 lizmat the sub version would get faster
11:19 moritz aye
11:20 moritz worth a trial, at the very least
11:22 dalek nqp/parrot-rpa: 7d370c8 | rurban++ | / (7 files):
11:22 dalek nqp/parrot-rpa: Replace unneeded QRPA with ResizablePMCArray
11:22 dalek nqp/parrot-rpa: review: https://github.com/perl6/nqp/commit/7d370c8a23
11:22 dalek nqp/parrot-rpa: d91e5e2 | rurban++ | tools/build/Makefile-Parrot.in:
11:22 dalek nqp/parrot-rpa: Makefile-Parrot: simplify ops2c rule, no chdir needed
11:22 dalek joined #perl6
11:26 ab5tract we would we not inline a method in the same way that we would inline a sub in a method?
11:26 ab5tract that seems weird to me
11:27 masak ab5tract: and you say this knowing about the late binding of method dispatch, I take it?
11:28 jnthn moritz, lizmat: As a design principle we've almost always had it that sub versions of things delegte to method versions, not the other way around.
11:28 yoleaux 11:04Z <lizmat> jnthn: from an optimization point of view, would it make sense to move functionality like Str.substr(|c) to sub substr(Str, |c) ?  as a sub call optimizes better ?
11:28 lizmat jnthn: that's not how the implementation looks atm  :-)
11:28 jnthn lizmat: It does in many cases.
11:28 lizmat in about 1/3
11:29 lizmat but glad I'm on to something here
11:29 chenryn_ joined #perl6
11:29 espadrine joined #perl6
11:30 jnthn On performance, the answer is that you really want to avoid |c when you can just delegate with normal parameters.
11:30 jnthn Then it doesn't matter much which way around we have it.
11:31 jnthn Whichever one is doing the delegating will be a good inlining candidate.
11:31 jnthn The static optimizer has an easier time of subs, but it's also extremely restrictive in what it will do
11:32 jnthn It exists mainly to inline native operations so they get good code-gen from the start.
11:32 ab5tract masak: i say this not comprehending how inlining the sub in a late-bound dispatch makes it any less late-bound
11:32 jnthn The majority of interesting inlining for non-natives is done dynamically by the VM
11:32 ab5tract i am admittedly out of my depth here :)
11:32 jnthn And it can see through dynamic dispatch.
11:33 jnthn And is only going to get better at doing so.
11:33 masak jnthn: I'm still taken aback by that at times.
11:34 jnthn masak: Which bit? :)
11:34 masak it being able to see through dynamic dispatch.
11:34 lizmat jnthn: so to gist what you're saying: don't bother, but kill any occurrences of |c
11:35 ab5tract and if the answer to speed up method calls is to call a sub from the method, then why not wire that together implicitly
11:35 jnthn lizmat: Well, not *any* occurences, but if you can write a couple of specific candidates rather than one general one, then yes, it's worth it.
11:35 lizmat ok
11:36 jnthn lizmat: |c is not well optimized, and it's a multi-day project to make things significantly better (with at least a day thinking hard about how on earth to make it better :))
11:36 lizmat I hear ya...  :-)
11:37 masak ab5tract: because method calls dispatch depending on the type you call them on.
11:37 jnthn masak: Type specialization done by Moar and also using indy on the JVM is done on exact types, and if you know the exact type you know its exact method table, and if you know its exact method table you know the method. :)
11:38 jnthn Most programs are "eventually static" in most places.
11:38 masak *nod*
11:39 masak does that mean that, in some sense, the dynamism put in by the programmer is "for people to read, and only occasionally for computers to execute"?
11:41 dalek rakudo/nom: 2004789 | lizmat++ | src/core/ (8 files):
11:41 dalek rakudo/nom: Make .infinite faster by using MMD
11:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2004789b06
11:41 jnthn I'm not sure you put in dynamism knowingly. Or at least, I don't. It's just that the code doesn't demand much.
11:42 masak well, not dynamism for the sake of it.
11:42 robinsmidsrod joined #perl6
11:43 masak maybe it just sneaks in because of other things that are straightforward to write.
11:43 jnthn And we tend to like that because the less demanding a piece of code is on the world/data it interacts with, the easier it is to keep it working as the world/data changes around it.
11:43 masak more "lack of explicit constraints" than "dynamism", perhaps.
11:43 jnthn Up to a point, at least.
11:43 jnthn *least
11:43 masak jnthn: right -- a program can spesh differently based on different inputs, I guess.
11:43 jnthn Oh, very much so.
11:44 jnthn Consider a method foo($a) { $a.bar }
11:44 jnthn In a module.
11:45 jnthn If one program passes the method a Gym, and another program passes it a Pub, you'll get different specializations :)
11:45 jnthn The Gym bar may be short enough to inline, but a good Pub bar probably won't. :P
11:46 masak :P
11:46 jnthn But yeah, the same code can, depending on how it gets used in a program, specialize in a different way.
11:46 jnthn That extends to the runtime and even the compiler.
11:52 robinsmidsrod joined #perl6
11:53 denis_boyun_ joined #perl6
12:04 chenryn_ joined #perl6
12:06 denis_boyun__ joined #perl6
12:08 chenryn_ joined #perl6
12:18 kjs_ joined #perl6
12:18 Mouq 'morning #perl6!
12:18 Mouq I ran the 4x4 last night:
12:18 Mouq 100352
12:18 Mouq perl6 reboot.clean.p6  9293.29s user 109.52s system 99% cpu 2:36:46.80 total
12:19 masak that number looks familiar from oies
12:20 masak it's the one that counts symmetric mazes multiple times.
12:22 Mouq I'd really like to find a way to only generate the symmetric ones, without having to build a list and subsequently filter it
12:22 masak the number of symmetric ones is 12600
12:23 masak see https://gist.github.com/masak/eb8e9a370300c666a0ec for the newest, Correct This Time™, algorithm
12:24 masak oeis*
12:25 Mouq masak++
12:25 rindolf joined #perl6
12:29 fhelmberger joined #perl6
12:32 chenryn__ joined #perl6
12:33 kjs_ joined #perl6
12:40 lizmat .tell jnthn could you tell me if there's something wrong with https://gist.github.com/lizmat/6176e1bfab8a9e5289c4
12:40 yoleaux lizmat: I'll pass your message to jnthn.
12:40 lizmat .tell jnthn it makes things siginificantly slower
12:40 yoleaux lizmat: I'll pass your message to jnthn.
12:40 lizmat .tell jnthn I guess having just a single method still beats MMD
12:40 yoleaux lizmat: I'll pass your message to jnthn.
12:42 masak Mouq: and 28 symmetric 3x3 mazes. (where before I had 24.)
12:48 timotimo o/
12:49 lizmat timotimo o\
12:49 lizmat need to be afk, unfortunately &
12:49 timotimo did i miss something good today already?
12:50 * masak .oO( afk is a cruel and barren place to be )
12:51 masak timotimo: leap seconds, inlined subs and methods, mazes.
12:51 timotimo we had multiple leap second in the mean time?
12:51 timotimo damn it
12:53 masak no. we will have one in July.
12:53 * masak .oO( Not So Great Leap Forward )
12:54 kjs_ joined #perl6
12:54 * jnthn fails to melt down all his possessions
12:54 yoleaux 12:40Z <lizmat> jnthn: could you tell me if there's something wrong with https://gist.github.com/lizmat/6176e1bfab8a9e5289c4
12:54 yoleaux 12:40Z <lizmat> jnthn: it makes things siginificantly slower
12:54 yoleaux 12:40Z <lizmat> jnthn: I guess having just a single method still beats MMD
12:55 anaeem1_ joined #perl6
12:55 masak jnthn: is this a case for "smelt", or are both OK?
12:56 masak Mouq: if I switch off the symmetry checking, I get 100352 for 4x4 too, which is promising.
12:56 jnthn masak: Well, I'm sure the process smelt too :P
12:57 jnthn lizmat: Well, did you check how often you hit the delegation-y cases?
12:58 jnthn lizmat: self.gimme(*) if nqp::isnanorinf(nqp::unbox_n(target)); for example
13:03 kjs_ joined #perl6
13:06 Guest34430 joined #perl6
13:06 Guest34430 left #perl6
13:07 kjs_ joined #perl6
13:22 breinbaas joined #perl6
13:22 kaare__ joined #perl6
13:23 kaleem joined #perl6
13:25 robinsmidsrod joined #perl6
13:26 timotimo is anyone TGIFing today?
13:28 hoelzro o/ #perl6
13:30 xfix_ joined #perl6
13:31 leont joined #perl6
13:31 dalek rakudo-star-daily: 8680f63 | coke++ | log/ (9 files):
13:31 dalek rakudo-star-daily: today (automated commit)
13:31 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/8680f63425
13:32 [Coke] what do I need to install on hack.p6c.org to make modules/DBIish tests pass?
13:32 hoelzro I would like to add some text describing how Grammar actions' methods work with look[ahead|behind]; where would that go best?
13:33 [Coke] still a bunch of failures on rakudo-star-jvm
13:35 jnthn timotimo: As in, being glad it's Friday? :)
13:35 timotimo yeah
13:35 jnthn Yes, very
13:35 timotimo and having something cool planned for the weekend
13:35 jnthn 'cus I've been teachign the last 3 days with a cold.
13:35 jnthn And at the weekend can rest enough to get rid of it :)
13:35 timotimo my condolences
13:35 jnthn Planning to hack on Perl 6 stuffs at the weekend :)
13:36 timotimo \o/
13:37 Mouq masak: \o/
13:37 jnthn Given 6pe a shove further along and start using it a bit, I hope :)
13:37 jnthn *Give
13:37 Mouq jnthn: \o/
13:37 * Mouq needs to put his hands down if he hopes to drive to school
13:37 Mouq o/ #perl6
13:38 timotimo sounds great!
13:38 timotimo we have all of the tests passing on moar and jvm now, yes?
13:39 adu joined #perl6
13:39 anaeem1_ joined #perl6
13:40 robinsmidsrod joined #perl6
13:48 [Coke] http://news.perlfoundation.org/2015/01/grant-proposal-ado---a-rapid-a.html - only one submittal this period, leave a comment if you have the feels.
13:48 masak jnthn: what's 6pe?
13:50 timotimo "sixpack of 'eer"
13:50 masak :P
13:51 donaldh joined #perl6
13:55 adu TimToady: what about the civilians who calculate the probability of asteroid collisions with Earth?
13:56 masak that sounds like a question screaming for more context.
13:57 adu masak: lol
13:58 adu "<TimToady> crud, the civil time idiots are adding another leap-second in June"
13:59 brrt joined #perl6
14:00 donaldh Java 7 reaches end of public updates in April - http://www.oracle.com/technetwork/java/javase/eol-135779.html
14:03 kaleem joined #perl6
14:03 pmurias joined #perl6
14:04 pmurias if I have a chunk of QAST how should I run it on moarvm?
14:04 pmurias (when running on moarvm)
14:05 xinming joined #perl6
14:07 timotimo you can feed it to what you get from getcomp
14:08 timotimo getcomp gives you the HLL::Compiler subclass for the given name
14:09 adu pmurias: something along the lines of Perl6::Compiler.eval() or something
14:13 timotimo you can feed it to the stage that comes after qast
14:13 pmurias what I have thus far: http://pastie.org/9835301
14:14 dalek mojo6: aa71078 | hoelzro++ | t/mojo/css.t:
14:14 dalek mojo6: Test E[attr]
14:14 dalek mojo6: review: https://github.com/coke/mojo6/commit/aa71078788
14:14 dalek mojo6: 7c63f76 | hoelzro++ | lib/Mojo/DOM/CSS.pm:
14:14 dalek mojo6: Implement E[attr]
14:14 dalek mojo6: review: https://github.com/coke/mojo6/commit/7c63f76812
14:14 dalek mojo6: 48e4f5e | hoelzro++ | lib/Mojo/DOM/CSS.pm:
14:14 dalek mojo6: Notes for cleanup
14:14 dalek mojo6: review: https://github.com/coke/mojo6/commit/48e4f5e911
14:14 dalek mojo6: a94613f | hoelzro++ | t/mojo/css.t:
14:14 dalek mojo6: Test E[attr="value"]
14:14 dalek mojo6: review: https://github.com/coke/mojo6/commit/a94613fb96
14:14 dalek mojo6: 45d0362 | hoelzro++ | lib/Mojo/DOM/CSS.pm:
14:14 dalek mojo6: Implement E[attr="value"]
14:14 dalek mojo6: review: https://github.com/coke/mojo6/commit/45d0362eae
14:14 dalek mojo6: cb2254d | hoelzro++ | lib/Mojo/DOM/CSS.pm:
14:14 dalek mojo6: A bit of refactoring
14:14 dalek mojo6: review: https://github.com/coke/mojo6/commit/cb2254d04a
14:14 donaldh I don't think there is a compiler exposed for QAST tho
14:15 timotimo every compiler turns their stuff into qast
14:15 masak well. NQP and Rakudo do.
14:17 masak adu: I guessed that it was a continuation of that conversation. where you're heading with that question still eludes me, though. what would be a possible answer? "well, I guess they might be one second too late in their estimated impact calculations..." ?
14:17 pmurias nqp::getcomp('nqp') does seem to be available from Perl 6
14:17 donaldh Oh, they do expose their stages :D
14:20 timotimo that's what i meant
14:20 [Coke] hoelzro++
14:20 pmurias just abusing the Perl6 compiler and turning of optimalisation works
14:21 donaldh Something like nqp::getcomp('perl6').compile($qast, :from('ast'))
14:21 jnthn timotimo: Yes, but only 'cus I didn't write enough tests :P
14:21 timotimo :D
14:21 jnthn masak: "6model parametric extensions"
14:23 jnthn nqp::getcomp('QAST') may also work :)
14:23 pmurias jnthn: that gets me mast
14:23 jnthn Yes, true :)
14:24 pmurias which I figured how to save to disk but not how to run
14:24 pmurias I'm not sure what to do with the result of assemble_and_load
14:24 jnthn Invoke it, iirc :)
14:25 jnthn See what method eval in HLL::Compiler does
14:25 pmurias doesn't seem to work from Perl6 land
14:25 jnthn oh, wait, it refers to the whole compilation unit
14:25 jnthn So you need to get the mainline code iirc
14:26 jnthn But yeah, using the pipeline of one of the existing compilers using HLL::Compiler is likely easier.
14:27 pmurias abusing the pipeline of an existing compiler should be enough for stage 1 of secret project
14:29 jnthn Ooh, what does it do? :)
14:29 donaldh r: nqp::getcomp('perl6').compile('say "hi"'))()
14:29 camelia rakudo-{parrot,moar} 200478: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unexpected closing bracket�at /tmp/tmpfile:1�------> [32mqp::getcomp('perl6').compile('say "hi"')[33m�[31m)()[0m�»
14:29 donaldh r: nqp::getcomp('perl6').compile('say "hi"')()
14:29 camelia rakudo-{parrot,moar} 200478: OUTPUT«hi␤»
14:32 skids joined #perl6
14:34 lizmat jnthn: before gimme MMD patch: Files=935, Tests=34357, 197 wallclock secs ( 8.92 usr  3.03 sys + 1194.02 cusr 144.41 csys = 1350.38 CPU)
14:35 lizmat after: Files=935, Tests=34357, 217 wallclock secs ( 9.54 usr  3.40 sys + 1329.13 cusr 151.26 csys = 1493.33 CPU)
14:35 IllvilJa joined #perl6
14:36 lizmat that's 10% more CPU and wallclock
14:37 vendethiel all(@names.map: { $attrs{$^name}:exists }); <- can't that be all($attrs{@names}:exists) ?
14:39 Juerd joined #perl6
14:39 pmichaud joined #perl6
14:40 lizmat vendethiel: feels that it should
14:40 timotimo i'd prefer [&&] tbh
14:40 vendethiel right
14:41 vendethiel [&&] is definitely better when just using the junction as a bool :)
14:42 timotimo and yeah, putting @names inside the { } as an array should be optimizabler.
14:42 hugme joined #perl6
14:42 [Coke] in https://github.com/rakudo/rakudo/commit/2004789b061f6b04d2b4bb483196b84a4be06e90, a method is changed to multi but there don't appear to be any actual multi methods; isn't this a behavioral change (now we can have multis, before we couldn't) to get a speedup? is this right?
14:43 synopsebot joined #perl6
14:43 lizmat [Coke]: that's what I understand
14:43 Util joined #perl6
14:44 chenryn joined #perl6
14:44 timotimo having the :D check in a place that's closer to the MMD itself lets us optimize (or rather: introspect) it more easily
14:45 FROGGS I understand [Coke]++'s question more as: do we want to make changes to behaviour for the sake of performance?
14:45 FROGGS and... is this behaviour wanted?
14:46 sjn woolfy++ # great fosdem devroom schedule!
14:46 sjn oh and good *, #perl6 :)
14:46 moritz without answering the actual question, I'd like to add that the specs are not very explicit about which methods are multis and which aren't
14:46 pmurias jnthn: 007.js
14:47 lizmat [Coke]: in any case, I try to batch my commits for easy revertability
14:47 PerlJam FROGGS: what's the downside of changing the behavior?  (I can't think of one)
14:47 sjn woolfy: a few typos though, but nothing horrible :)
14:48 FROGGS PerlJam: I am just formulating how I understood [Coke]'s question :o)
14:48 pmurias jnthn: stage 1 is a Q -> QAST translator
14:48 FROGGS I also think that there is no pro or contra to the behaviour change...
14:48 woolfy sjn: the texts are from the speakers...  and we did remove some typos.  You're very much welcome to send me (and/or El_Che) any corrections.
14:49 woolfy sjn: The corrections can/will be put into the texts online.  It's too late to change anything in the printed texts.  FOSDEM has sent all texts to the printer.  The whole schedule for the Perl-devroom will be in the booklet.
14:51 gfldex joined #perl6
14:52 sjn woolfy: s/""/"/g; s/^"|"$//g;
14:52 [Coke] FROGGS++ has it. just wondering if the behavior change is worth it. to moritz++'s point, we should probably decide if we want multis or not for core class methods.
14:52 [Coke] also, lizmat++ for doing the work in the first place.
14:52 chenryn joined #perl6
14:52 woolfy sjn: in my thoughts, I will distribute your ++ to the speakers, of which several can be found in this awesome channel!  jnthn++ tadzik++ nine++ pmichaud++ FROGGS++ CurtisOvidPoe++ mst++ rjbs++ sawyer++ stevanlittle++ mickeyn++
14:53 * sjn agrees :)
14:53 PerlJam woolfy++ too for doing the work  :)
14:53 [Coke] as a generic OO user, I'm still kind of surprised we have multi methods and non multi methods.
14:53 moritz and [Coke]++ for raising the issue
14:53 woolfy and El_Che++ !!!
14:53 moritz and hugs for everybody!
14:54 lizmat [Coke]: jnthn can explain that one better, from an implementation point of view
14:54 FROGGS free hugs /o/
14:54 sjn El_Che++ # deserves lots of praise
14:54 PerlJam moritz++ for the FindBin patch that you submitted in 2011 and I just noticed that it was you today  ;)
14:54 beastd joined #perl6
14:54 woolfy sjn: I don't understand...
14:55 moritz PerlJam: tinita++ has been nagging about that FindBin thingy
14:55 sjn woolfy: there are a couple of the talk descriptions that are in quotes
14:56 Ven joined #perl6
14:56 woolfy Just got word that somebody from the city of Perl has an extra special surprise for the Perl 6 speakers at FOSDEM...  I hope it works out.
14:56 sjn hehe
14:56 woolfy sjn: ah.  Yes, I saw that.  I will leave that to El_Che to fix.
14:57 * sjn vaguely remembers one more typo, but can't seem to find it any more
14:57 donaldh r: my Mu $c := nqp::getcomp('perl6'); $c.compile($c.compile('say "hi"', :target('ast'), :compunit_ok), :from('ast'))
14:57 camelia rakudo-{parrot,moar} 200478: ( no output )
14:57 donaldh my Mu $c := nqp::getcomp('perl6'); $c.compile($c.compile('say "hi"', :target('ast'), :compunit_ok), :from('ast'))()
14:57 PerlJam woolfy: some random person from the city of Perl or an offical of the city?
14:57 PerlJam *official
14:57 sjn well, there are still some capitalization bugs in mst's text :)
14:57 sjn nothing major though
14:57 PerlJam sjn: I haven't looked, but are you sure mst didn't captialize that way on purpose ? :)
14:58 sjn heheh
14:58 woolfy mst's text might be from Mark...  ;-)
14:59 woolfy PerlJam: neither...  and if I explain, the surprise is gone. :-)
14:59 chenryn joined #perl6
15:01 dalek rakudo/nom: 1b59b0b | lizmat++ | src/core/GatherIter.pm:
15:01 dalek rakudo/nom: Use natives in GatherIter.reify
15:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1b59b0bc83
15:02 PerlJam woolfy: Just make sure the interaction is recorded so that those of us who are locationally challenged can fee like we were there  :)
15:02 woolfy sjn: the awesome El_Che already fixed the "..." typos.  Thanks for mentioning.
15:02 PerlJam *feel
15:03 woolfy PerlJam: see http://video.fosdem.org/  and that will happen this year again!
15:04 woolfy Though, we have one volunteer now for doing the videorecording.  And we could use another one or two.  There will be 8 hours of recording to do...
15:04 woolfy So if anybody here would like to volunteer for doing some video recording...  please message me.
15:05 woolfy Ow, this was the Perl-room last year: K.3.201   http://video.fosdem.org/2014/K3201/Saturday/
15:06 woolfy The volunteer will get a little bit of training: push this button to start, that one to end, that one to focus, etc.  Take care of the cables, microphone, aim camera at the speaker and/or at the screen and sometimes at the audience.
15:09 espadrine I'm tempted, but I haven't even got my train ticket to fosdem
15:09 espadrine (yet)
15:11 PZt joined #perl6
15:11 * sjn hopes the videos this year work out
15:12 sjn too many bad ones last year :-(
15:12 rurban joined #perl6
15:16 dalek rakudo/nom: 3b0cef5 | lizmat++ | src/core/Str.pm:
15:16 dalek rakudo/nom: Lose |c on signature
15:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3b0cef5239
15:16 dalek rakudo/nom: 997864d | lizmat++ | src/core/ (6 files):
15:16 dalek rakudo/nom: Reify is always called with parameters
15:16 dalek rakudo/nom:
15:16 dalek rakudo/nom: So lose the defaults for faster MMD dispatch / smaller binary
15:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/997864dae3
15:17 woolfy sjn: we hope the same...  problem with cables (to microphones, and power cables), and the power units...  It was driving VanHoesel crazy (our volunteer).
15:18 sjn mm
15:18 woolfy This has been reported to FOSDEM, and we were not the only ones.
15:18 sjn one useful trick would be to offer some headphones so that one might at least hear what's being recorded
15:18 woolfy So, let's hope lessons were learned.  It was the first time every room got a videorecording setup
15:18 xinming joined #perl6
15:20 anaeem1_ joined #perl6
15:21 Mso150 joined #perl6
15:22 telex joined #perl6
15:24 sjn woolfy, El_Che: Oh, one more thing for the schedule! Stevan Little should be Stevan "#damnitstevan" Little! :D
15:24 woolfy Oh no, absolutely not, that meme should have died some time ago!
15:25 sjn aw :-(
15:25 El_Che hi sjn thx for the fixes
15:25 woolfy well, we can change your name to dammitsalve!
15:26 * sjn isn't competent enough to deliver #p5mop and that goodness, so damning me wouldn't make any difference :-|
15:27 El_Che sjn: we can try :)
15:27 adu joined #perl6
15:28 El_Che sjn: will we be honoured by your gracious presence at fosdem this year?
15:28 woolfy sjn: the dammit was because of something else...
15:29 lizmat afk for a few hours
15:30 sjn El_Che: I'll be there, arriving friday, leaving monday
15:30 sjn although s/gracious/bumbling/ :)
15:31 El_Che sjn: nice
15:31 woolfy sjn: \o/
15:31 woolfy afk for some time
15:31 El_Che woolfy: don't let lizmat escape now she's afk
15:31 El_Che :)
15:32 woolfy ->  ...(bicycle trip...)
15:33 Mso150 joined #perl6
15:36 rurban found the blocking parrot resizablepmcarray bug https://github.com/parrot/parrot/issues/1174
15:41 anaeem1 joined #perl6
15:42 masak pmurias: did you say... 007.js?
15:44 anaeem1 joined #perl6
15:44 hoelzro there's no shorthand for $<foo>.defined ?? $<foo>.Str !! '', is there?
15:45 moritz ~($<foo> // '')
15:45 hoelzro ah, that makes sense
15:46 hoelzro I was thinking something along the lines of $<foo>.?Str
15:50 treehug88 joined #perl6
16:01 anaeem1 joined #perl6
16:06 mst woolfy: actually, I think it's recycled from a previous submission
16:12 robinsmidsrod joined #perl6
16:23 mr-foobar joined #perl6
16:26 dalek roast: a31f1e7 | lizmat++ | test_summary:
16:26 dalek roast: Fix deprecation
16:26 dalek roast: review: https://github.com/perl6/roast/commit/a31f1e72c0
16:27 timotimo lizmat: "reify is always called with parameters" and then +    method reify() { () }
16:27 timotimo seems wrong?
16:28 lizmat timotimo: excellent catch
16:28 timotimo :)
16:28 ugexe re META6.json: if a module B emulates module A, and module C depends on module A, if module B is already installed should module A be pulled in as a dependency of module C? or should module B satisify that dependency?
16:29 dalek rakudo/nom: 407630f | lizmat++ | src/core/Nil.pm:
16:29 dalek rakudo/nom: Nil.reify always called with 1 param, timotimo++
16:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/407630fb98
16:29 anaeem1 joined #perl6
16:30 kaleem joined #perl6
16:31 anaeem1_ joined #perl6
16:33 anaeem1 joined #perl6
16:36 dalek roast: 2fe1e1f | lizmat++ | S32-io/copy.t:
16:36 dalek roast: Replace deprecated .path by .IO
16:36 dalek roast: review: https://github.com/perl6/roast/commit/2fe1e1f897
16:40 dalek roast: 01dd57f | lizmat++ | S32-io/io-path-cygwin.t:
16:40 dalek roast: Replace deprecated .directory by .dirname
16:40 dalek roast: review: https://github.com/perl6/roast/commit/01dd57f658
16:42 dalek roast: 2e63301 | lizmat++ | S32-io/io-path.t:
16:42 dalek roast: Replace deprecated .path by .IO
16:42 dalek roast: review: https://github.com/perl6/roast/commit/2e63301744
16:43 anaeem1_ joined #perl6
16:44 dalek roast: 3c0f230 | lizmat++ | S32-io/io-path.t:
16:44 dalek roast: Replace deprecated .directory by .dirname
16:44 dalek roast: review: https://github.com/perl6/roast/commit/3c0f23057f
16:44 molaf joined #perl6
16:47 [Sno] joined #perl6
16:48 dalek roast: 42a5d1b | lizmat++ | S32-list/uniq (2 files):
16:48 dalek roast: .uniq is now .unique
16:48 dalek roast: review: https://github.com/perl6/roast/commit/42a5d1bc37
16:48 dalek roast: 6bbf7c3 | lizmat++ | S32-list/unique.t:
16:48 dalek roast: Change all the references of .uniq to .unique
16:48 dalek roast: review: https://github.com/perl6/roast/commit/6bbf7c37ab
16:49 dalek rakudo/nom: 63402e5 | lizmat++ | t/spectest.data:
16:49 dalek rakudo/nom: We renamed the .uniq testfile, so follow suit
16:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/63402e53ec
16:50 Alina-malina joined #perl6
16:50 anaeem1 joined #perl6
16:52 dalek roast: 8c129b3 | lizmat++ | integration/advent2011-day23.t:
16:52 dalek roast: Replace deprecated .uniq by .unique
16:52 dalek roast: review: https://github.com/perl6/roast/commit/8c129b329e
17:19 TimToady adu: the location of the earth in its orbit has almost nothing to do with the earth's wobble, so astronomers will already be using a timebase independent of leap seconds for that purpose
17:20 TimToady but it's true that astronomers are really the only group of people who care much about exactly where to point their telescopes when
17:20 TimToady but they're already used to doing complicated calculations
17:21 TimToady inflicting that damage on all users of civil time, a much larger group, is not really supportable
17:22 reshtnk71 joined #perl6
17:22 tadzik hmm, didn't github use to use gravatar for avatars?
17:26 dalek rakudo/nom: a3e5f25 | lizmat++ | src/core/ListIter.pm:
17:26 dalek rakudo/nom: Presize array with 5 for .reify(Whatever)
17:26 dalek rakudo/nom:
17:26 dalek rakudo/nom: This seems to have a slightly beneficial effect on the spectest.  Please
17:26 dalek rakudo/nom: revert if this is showing up as badness in other ways.
17:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a3e5f25ab2
17:40 rmgk_ joined #perl6
17:46 sqirrel_ joined #perl6
18:01 Rounin joined #perl6
18:01 hoelzro does Perl 6 have something like \Q ... \E or quotameta from Perl 5?
18:02 flussence er... normal ' and " should do it
18:02 hoelzro I would like to see if a string begins with an arbitrary substring, where the latter can contain regex meta characters
18:02 hoelzro oh, really?
18:02 hoelzro so $str ~~ /^ "$prefix" /?
18:02 flussence exactly!
18:03 psch m: say '$prefix' ~~ / '$prefix' /
18:03 camelia rakudo-moar 63402e: OUTPUT«「$prefix」␤»
18:03 flussence wait... you don't need quotes there
18:03 flussence $vars just interpolate as strings.
18:03 hoelzro oooooh
18:03 hoelzro thanks flussence
18:03 osfameron what if you *wanted* them to expand to regexp metachars? ;-)
18:03 psch m: my $prefix = '$%foo'; say '$%foo-baz' ~~ / ^ $prefix /
18:03 camelia rakudo-moar 63402e: OUTPUT«「$%foo」␤»
18:03 flussence if you *want* a variable interpreted as regex, <$var> iirc
18:03 osfameron cute
18:05 TimToady osfameron: note that changing the default here is what allows us to combine Perl 5's $1 and \1 into a consistent $0
18:06 TimToady and we can do that because regexes are no longer considered strings, but a language of their own
18:06 TimToady so it's easy to flip the semantics of interpolation
18:07 eternaleye joined #perl6
18:07 masak oh, nice. I had never put those two facts together before.
18:08 kjs_ joined #perl6
18:11 Mso150_y joined #perl6
18:20 timotimo hoelzro: i'm surprised you didn't know that o_O
18:20 hoelzro timotimo: regexes are one of my weaker areas in P6 =/
18:21 hoelzro and I seldom use / $var /
18:21 timotimo but they are one of the stronger areas in P6 :)
18:21 hoelzro yes
18:21 hoelzro so I need to work on that =)
18:21 dwarring joined #perl6
18:23 kjs_ joined #perl6
18:26 nwc10 did you see how close they got to pulling it off? https://vine.co/v/OjqeYWWpVWK
18:28 masak nwc10: o.O
18:28 TimToady the problem appears to be attidude more than velocity
18:28 * masak .oO( think positive thoughts! ) :P
18:28 TimToady unless it fell over from knocking one of the legs off
18:28 nwc10 there's an explanation here https://twitter.com/elonmusk/with_replies
18:29 jercos So... is there anything practical to do with lists constructed from pairs, like [=>] 1, 2, 3, 4? Sorta vaugely resembles lispy cons lists, but doesn't seem too useful given the higher level datastuctures available.
18:29 nwc10 with the lovely final (so far) comment "At least it shd explode for a diff reason."
18:29 TimToady they said it wouldn't be a slamdunk, but it might be a slam or a dunk; looks like the slam won... :)
18:29 nwc10 TimToady: explanation in twitter suggests your observations are spot on, and explain why
18:30 TimToady *attitude
18:30 TimToady is an 'attidude' like an 'attaboy'?
18:31 masak jercos: only "practical" uses of it I've seen are when the problem was specified such that cons lists were required. (on RC, for example)
18:32 FROGGS joined #perl6
18:33 TimToady masak: it's a useful data structure when you want to share tails of lists
18:33 masak troo
18:33 TimToady and trim the fronts visibly to the GC
18:34 * masak read that as "and trim the fronds"
18:34 TimToady you have a fern grasp of the facts
18:35 jercos with fronds like these, who needs anemones?
18:35 * TimToady has only a spore grasp of the facts
18:35 masak I just need to read the sentence slower and more palmly
18:36 TimToady for that you need more date-time
18:36 sqirrel_ joined #perl6
18:42 raydiak m: my int $a = 1; say $a.WHAT;
18:42 yoleaux 10:33Z <lizmat_> raydiak: my $a = "foo"; $a.substr-rw(2,1) = "x"; say $a  #  -> fox
18:42 camelia rakudo-moar a3e5f2: OUTPUT«(Int)␤»
18:42 yoleaux 10:34Z <lizmat> raydiak: https://github.com/rakudo/rakudo/commit/6f79fcc296 implements it, tests welcome
18:43 raydiak oh brilliant, lizmat++
18:43 raydiak m: my int $a = 1; say $a.WHAT; # anyway, what is going on here?
18:43 camelia rakudo-moar a3e5f2: OUTPUT«(Int)␤»
18:46 TimToady boxing
18:48 TimToady natives can only be storage types, not object types
18:48 TimToady at least until we get typed pointers of some sort
18:50 raydiak I see...thank you
18:50 TimToady but letting in pointers without the rest of C's ills is somewhat...fraught...
18:50 TimToady especially since JVM goes out of its way to make pointers very difficult
18:52 TimToady jnthn++ is working on native arrays with the 6pe branch, which should help with that sort of thing some
18:54 TimToady but Perl 6 is defined to keep temporary values in the widest types by default, so for any normal method call, the int has to be boxed into an Int
18:54 TimToady we may add pragmas that change the default at some point
18:56 TimToady keeping integer temps in an int64 is going to be indistinguishable for most practical purposes, which typically excludes math :)
18:57 TimToady defaulting to correct is important though
18:58 raydiak so using native types in pure P6 code isn't likely to gain you anything, then...not speed, memory savings...nothing?
18:58 TimToady native arrays are very compact
18:58 lizmat m: class A { multi method a(int $a) { say "int" }; multi method a(Int $a) { say "Int" } }; A.a(my int $ = 42); A.a(42)   # native int multis work
18:58 camelia rakudo-moar a3e5f2: OUTPUT«int␤Int␤»
18:59 TimToady and certainly if the optimizer can determine that your temps won't exceed a certain value, they can substitute faster representations
18:59 TimToady s/they/it/
19:01 TimToady and the spesher can deal with that sort of thing dynamically to some extent
19:02 jnthn The actual rules at the moment de facto are that if you declared at least one of the things involved in a computation as a native int, then you'll get native int operations.
19:03 TimToady m: my int $x = 2 ** 60; say $x * $x
19:03 camelia rakudo-moar a3e5f2: OUTPUT«0␤»
19:03 TimToady I see
19:04 jnthn Which imo is fair game; you opted in.
19:04 jnthn literal op literal will never go for native int versions
19:05 jnthn otoh, it'll probably also have gotten constant folded by the time you're doing runtime. But still, it's the same interpreter on both sides of the fence...
19:05 TimToady m: my int $x = 2 ** 60; say $x * 2 ** 60
19:05 camelia rakudo-moar a3e5f2: OUTPUT«1329227995784915872903807060280344576␤»
19:06 TimToady in this case it looks like both args have to be int to get int semantics
19:06 jnthn Hm, odd
19:06 jnthn Oh
19:07 TimToady perhaps that a good thing?
19:07 jnthn I wonder if the 2 ** 60 gets constant folded to something that doesn't look like a normal literal
19:07 TimToady sez it's an Int
19:07 jnthn m:  my int $x = 2 ** 60; say $x * 1329227995784915872903807060280344576
19:07 camelia rakudo-moar a3e5f2: OUTPUT«1532495540865888858358347027150309183618739122183602176␤»
19:08 jnthn oh, what on earth am I doing... :)
19:08 TimToady beats me
19:08 * jnthn survived 3 days teaching with a cold, but probably ain't good for much tonight :)
19:09 jnthn It's almost gone, though, so I should be able to have a good run at the parametric stuffs at the weekend :)
19:10 * TimToady prefers his parameters without goobers all over them...
19:11 adu TimToady: I suppose
19:12 b2gills I think I would settle for parametric types with "goobers" on them, than no parametric types at all.
19:12 * adu just saw the "timebase independent of leap seconds" comment
19:13 TimToady hmm, maybe that slang term for snot is more of a regionalism than I thot
19:13 jnthn We call 'em bogies where I'm from :P
19:14 * TimToady thinks the 'goober' slang is probably a metathesis of 'boogers'
19:14 TimToady which is obviously related etymologically to 'bogies'
19:15 jercos so *that's* what a bat bogey hex does.
19:15 jnthn .oO( They asked me to defend my thesis, so I wrote them a metathesis... )
19:16 jercos defend your thesis, take up a sword!
19:16 TimToady syncpe, apocop, methatesis...
19:16 TimToady garden pathological
19:17 jdv79 isn't goobers a candy?
19:17 raydiak yum
19:17 jnthn If you're desparate enough, I guess... :P
19:17 TimToady probably, it's also peanuts in the south
19:17 jdv79 that might be a regional and/or generational slang
19:17 TimToady the original is apparently a rube or hick sort of person
19:19 TimToady oh, and our favorite: vowul harmonu
19:20 TimToady we used to collect linguistic terms that were examples of themselves :)
19:20 jnthn :D
19:21 TimToady epinethesis
19:21 TimToady er, epenethesis
19:21 jnthn *groan*
19:22 arnsholt Vowul harmonu is pretty nice!
19:22 arnsholt I like epenenthesis too =D
19:22 lizmat m: sub a(\b) { b(42) }; say a(*-1)   # would expect to see 41 there
19:22 camelia rakudo-moar a3e5f2: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/dOJoqUuttEâ�¤Variable '&b' is not declaredâ�¤at /tmp/dOJoqUuttE:1â�¤------> [32msub a(\b) { [33mâ��[31mb(42) }; say a(*-1)   # would expect to [0mâ�¤Â»
19:23 lizmat jnthn: is that a bug or something that we just cannot expect to work ?
19:23 TimToady garden pathological is the one I made up after grad school, and wish we could've thunk of it in time to impress our profs
19:23 jnthn lizmat: Your expectations are off.
19:23 jnthn m: sub a(&b) { b(42) }; say a(*-1)
19:23 camelia rakudo-moar a3e5f2: OUTPUT«41␤»
19:23 jnthn That's how to write it.
19:24 lizmat ok, and if b could be something else, we need to write $b
19:24 TimToady m: sub a(\b) { b.(42) }; say a(*-1)
19:24 camelia rakudo-moar a3e5f2: OUTPUT«41␤»
19:24 TimToady or that way
19:24 TimToady but b is defined as a term
19:24 lizmat that's probably sub-optimal from a performance point of view
19:24 TimToady so it will never expect arguments
19:25 TimToady it's like saying pi()
19:25 dalek roast: 6740efe | raydiak++ | S32-str/substr-rw.t:
19:25 dalek roast: Add a test for method form of substr-rw
19:25 dalek roast: review: https://github.com/perl6/roast/commit/6740efed5a
19:25 jnthn b.(42) should compile into something sensible
19:25 lizmat ok, I'll go with that then
19:25 TimToady m: sub a(\b) { (b)(42) }; say a(*-1)
19:25 camelia rakudo-moar a3e5f2: OUTPUT«41␤»
19:26 TimToady m: sub a(\b) { b\(42) }; say a(*-1)
19:26 camelia rakudo-moar a3e5f2: OUTPUT«41␤»
19:26 TimToady that almost works visually :)
19:26 TimToady or should I say :\
19:27 TimToady m: sub a(\b) {\ b\(42)\ }; say a(*-1);  # if you can't convince 'em, confuse 'em
19:27 camelia rakudo-moar a3e5f2: OUTPUT«41␤»
19:28 TimToady m: sub a(\b) { b andthen .(42) }; say a(*-1)
19:28 camelia rakudo-moar a3e5f2: OUTPUT«Nil␤»
19:28 TimToady aww
19:28 TimToady m: sub a(\b) { .(42) given b }; say a(*-1)
19:28 camelia rakudo-moar a3e5f2: OUTPUT«41␤»
19:29 Sqirrel joined #perl6
19:30 TimToady m: sub a(\b) { b andthen 41 }; say a(*-1)
19:30 camelia rakudo-moar a3e5f2: OUTPUT«41␤»
19:30 TimToady so it's not topicalizing correclty
19:33 TimToady I guess that was a tpyo
19:33 kaare__ joined #perl6
19:38 jnthn Hm, yeah. Though I can never quite remember the spec of andthen... :)
19:38 * jnthn back in 20 or so
19:40 kaare__ joined #perl6
19:43 Khisanth joined #perl6
19:44 robinsmidsrod joined #perl6
19:45 japhb goobers are peanuts, in my mind
19:45 japhb Heh
19:45 japhb Backscrolled, didn't realize it.  :-)
19:50 robinsmidsrod joined #perl6
19:51 lizmat hmmm... interesting state of affairs:
19:51 lizmat nice patch to make substr() a lot faster
19:52 lizmat it fails *every* spec test when run under make
19:52 lizmat it runs all of them fine with perl6
19:54 robinsmidsrod joined #perl6
19:58 kaare__ joined #perl6
19:58 robinsmidsrod joined #perl6
19:59 robinsmidsrod joined #perl6
20:08 lizmat it appears PERL6LIB setting is the difference
20:11 ugexe if i create a CompUnit with a module that already has a precompiled version, and then delete that precompiled version, am i supposed to create a new CompUnit or somehow tell the CompUnit that it no longer $has-precomp?
20:12 ugexe im creating a CompUnit, then checking for precomp-path.e and deleting if true. then calling .precomp but get cannot pre-compile an already pre-compiled file
20:12 lizmat A CompUnit for a given source path is a sentinel for the process
20:12 lizmat ugexe: in that case, there is a bug
20:12 lizmat you can also specify the :force flag with .precomp
20:13 ugexe force doesnt affect that specific die statement
20:13 lizmat on another note: https://vine.co/v/OjqeYWWpVWK   # close but no cigar
20:14 lizmat ugexe: oops, wrong order in checks
20:14 ugexe die <message> if $.has-precomp;
20:15 ugexe https://github.com/rakudo/rakudo/blob/0154f13aa39a7c55fd4a5469d2c5979b77acdd44/src/core/CompUnit.pm#L113-L114
20:16 lizmat ugexe: yeah, looking at it now
20:17 lizmat testing a fix
20:17 ugexe cool
20:23 dalek rakudo/nom: 2cd9645 | lizmat++ | src/core/CompUnit.pm:
20:23 dalek rakudo/nom: Make CompUnit.precomp(:force) work, ugexe++
20:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2cd96450af
20:24 * jnthn back
20:24 araujo joined #perl6
20:37 ugexe lizmat: just so i understand correct... if i create a CompUnit that already has a precomp, then delete the precompiled file, its correct for $comp-unit.has-precomp to return true?
20:38 lizmat well, fwiw, I'd like to think that the location of the precomped file is not important
20:38 lizmat so, if you want to create a new one regardless of existing, use :force
20:39 ugexe right, but the existence of the file is
20:40 lizmat if you remove the file underneath the object, you will get failure later
20:40 lizmat I'm just trying to reduce the number of stat calls
20:40 lizmat I mean, during the lifetime of a CompUnit object, you'd expect it to be the same all the time
20:41 lizmat creating a new precomp would be ok, I guess, but not much more
20:42 ugexe so i should treat .has-precomp's value as what it was during .new, not during the time it was called?
20:42 ugexe i understand how to work around it and what you are saying
20:43 lizmat yeah, that's the idea
20:43 ugexe ok. thanks for fixing it lizmat++
20:43 lizmat yw
20:47 lizmat jnthn: will ~ box unboxed strings ?
20:50 moritz m: say .signature.perl for &prefix:<~>.candidates
20:50 camelia rakudo-moar a3e5f2: OUTPUT«:(Any \a)␤:(Str:D \a --> Str)␤:(str $a --> str)␤»
20:50 lizmat I guess that would be a yes then
20:50 lizmat ?
20:50 moritz no
20:50 moritz str $a --> $str
20:50 moritz the last one looks suspiciously like a no-op to me
20:50 lizmat m: say .signature.perl for &infix:<~>.candidates
20:50 camelia rakudo-moar a3e5f2: OUTPUT«:(Any $x = { ... })␤:(Any \a, Any \b)␤:(Blob:D $a, Blob:D $b)␤:(Str:D \a, Str:D \b --> Str)␤:(str $a, str $b --> str)␤»
20:51 lizmat that would be a yes then  :-)
20:51 lizmat sorry for not being clear I meant infix ~
20:57 moritz except infix ~ on two str
20:57 moritz which doesn't box
21:00 jnthn What moritz said. :)
21:00 jnthn moritz++, I mean :)
21:08 dalek doc: 280c3c4 | moritz++ | lib/Type/Metamodel/AttributeContainer.pod:
21:08 dalek doc: document set_rw
21:08 dalek doc: review: https://github.com/perl6/doc/commit/280c3c47be
21:09 leont joined #perl6
21:10 dalek doc: 77cac07 | moritz++ | lib/Type/Metamodel/AttributeContainer.pod:
21:10 dalek doc: Metamodel::AttributeContainer: document rw
21:10 dalek doc: review: https://github.com/perl6/doc/commit/77cac0743f
21:10 denis_boyun_ joined #perl6
21:11 * moritz wonders if those docs are actually of use to anybody
21:11 skids joined #perl6
21:11 masak that one in particular, or all of the doc effort?
21:12 moritz masak: the metamodel docs
21:12 masak ah.
21:12 masak it's hard for me to gauge. I think what I'd most expect to find as a newcomer, is a document giving an overview of *all* of the MOP.
21:13 masak there could well be individual articles with stuff too, but the overview would be the valuable/central one.
21:13 masak kind of a `perldoc perlmop` thing, if you see what I mean.
21:17 anaeem1 joined #perl6
21:21 jnthn I can imagine various module authors wanting to do MOP stuff.
21:28 psch fwiw, i hope MOP docs will help me with a fully functional JavaHOW
21:28 bcode joined #perl6
21:34 rurban joined #perl6
21:38 dalek rakudo/nom: 1b417d8 | lizmat++ | src/core/ (2 files):
21:38 dalek rakudo/nom: Streamline substr()/.substr substr-rw/.substr-rw
21:38 dalek rakudo/nom:
21:38 dalek rakudo/nom: - substr() is about 15% faster
21:38 dalek rakudo/nom: - .substr() is about 7% *SLOWER*
21:38 dalek rakudo/nom: - substr-rw is almost 4x as fast
21:38 dalek rakudo/nom: - .substr-rw is just over 3x as fast
21:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1b417d813e
21:39 jack_rabbit joined #perl6
21:46 telex joined #perl6
21:47 anaeem1 joined #perl6
21:47 virtualsue joined #perl6
21:49 sivoais joined #perl6
22:01 psch https://gist.github.com/peschwa/45ff88238adc74aa2405 <- fixed this just now \o/
22:04 jnthn psch++
22:05 FROGGS dang, how I love documentation.... >.<
22:05 FROGGS xmlXPathObjectPtrxmlXPathNewString(const xmlChar * val)
22:05 FROGGS Create a new xmlXPathObjectPtr of type string and of value @val
22:05 FROGGS val:the xmlChar * value
22:05 FROGGS Returns:the newly created object.
22:06 FROGGS ?
22:06 jnthn "the newly created object" :D
22:06 jnthn So insight!
22:06 psch ah yes, the "reorder the objects in the description" documentation method, often seen in javadoc as well
22:06 FROGGS absolutely...
22:07 FROGGS I'd like to know what I'd use it for
22:08 dalek roast: 47d0d01 | lizmat++ | S32-str/substr.t:
22:08 dalek roast: Fudge dubious test
22:08 dalek roast: review: https://github.com/perl6/roast/commit/47d0d01f92
22:09 raydiak can anyone suggest something faster than but equally portable to "my &clear = $*DISTRO.is-win ?? {shell 'cls'} !! {run 'clear'};" ?
22:14 lizmat not me  :-(
22:15 * psch .oO( readline bindings..? )
22:17 psch oh hm.  during debugging i merged my JavaHOW work that implements .^methods and .^add_method, but now the PR wouldn't be minimally scoped anymore
22:17 psch that's what cherry-picking is for i think?
22:17 jnthn The depressing Windows answer... http://support.microsoft.com/kb/99261
22:18 dalek rakudo/nom: 46e92b2 | lizmat++ | src/core/ (17 files):
22:18 dalek rakudo/nom: Favour substr(foo,...) over foo.substr(...)
22:18 dalek rakudo/nom:
22:18 dalek rakudo/nom: as substr() is 13% faster than .substr()
22:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/46e92b20fe
22:19 lizmat .oO( shell 'cls' it is then )
22:20 psch oh, now, cherry-picking is for repacking changes into different commits apparently
22:20 psch *no
22:21 raydiak thanks jnthn++, won't be wasting any more time on that for now :)
22:24 dalek Heuristic branch merge: pushed 22 commits to rakudo/newio by lizmat
22:25 eiro joined #perl6
22:30 ajr joined #perl6
22:34 lizmat good night, #perl6!
22:34 raydiak sleep well lizmat
22:41 psch jnthn: is it sensible/feasible to bring this into the JavaHOW? https://gist.github.com/peschwa/0f8830ba3c6a2eb852ba
22:41 psch jnthn: that is, for every method pair of the form set_$ident generate a method named just $ident that wraps the previous two in a Proxy
22:42 psch *set_$ident and get_$ident
22:44 jnthn psch: For public fields?
22:45 psch jnthn: right.  my qualms about this is more about the perl6 side though
22:45 jnthn But yeah, that'd seem helpful...I just wonder if there's cases where it collides with a method name. But that'd be odd I guess.
22:45 psch jnthn: as in, i have no clue how to Proxy.new in JavaHOW.nqp
22:46 jnthn Ah
22:46 jnthn Yeah...hmm. "With difficulty."
22:47 psch afaict we don't have $*W in Metamodel/, so i can't find_symbol
22:47 jnthn I wonder if we could write JavaHOW in Perl 6
22:47 jnthn And include it in the CORE.setting instead somehow.
22:48 jnthn Then we would have easy access :)
22:49 psch i suppose i could call a method on the JavaHOW from the vm in RakudoJavaInterop too, but i don't know if that's actually easier...
22:49 psch as for having the JavaHOW in Perl 6, i'm not sure where i'd start :)
22:51 timotimo m: if 1 ~~ True { }
22:51 camelia rakudo-moar 1b417d: OUTPUT«Potential difficulties:â�¤    Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* insteadâ�¤    at /tmp/G_NH7xOKPE:1â�¤    ------> [32mif 1 ~~[33mâ��[31m True { }[0mâ�¤Â»
22:51 sivoais joined #perl6
22:51 timotimo m: enum Frob <Hello Goodbye>; if 1 ~~ Hello { }
22:51 camelia rakudo-moar 1b417d: ( no output )
22:51 psch as for collisions, my idea was to warn and drop the field, seeing as we still get set_$ident and get_$ident as fallback
22:51 timotimo hum.
22:51 psch but reaching the method isn't as easy when the shortname gets dropped
22:52 timotimo oh
22:52 timotimo m: enum Frob <Hello Goodbye>; if 1 ~~ Helloo { }
22:52 camelia rakudo-moar 1b417d: OUTPUT«[31m===[0mSORRY![31m===[0m�Function Helloo needs parens to avoid gobbling block�at /tmp/hiMtyy9z5f:1�------> [32mFrob <Hello Goodbye>; if 1 ~~ Helloo { }[33m�[31m<EOL>[0m�Missing block (apparently taken by 'Helloo')�at /tmp/hiMtyy9z5f:1…»
22:53 psch and telling users "if you have a field and overloaded methods of the same name you have to call the method with 'method/mmd+$methName/([Ljava/lang/Object;)java/lang/Object' instead" feels kind of unreasonable
22:53 araujo joined #perl6
22:53 psch because that's (at least close to) the descriptor for the generated dispatch method
22:54 psch i'm not 100% sure on the return type, might be SixModelObject :)
22:58 eiro joined #perl6
23:06 adu joined #perl6
23:08 adu hey
23:08 adu why does this not work? http://pastie.org/9836063
23:08 adu I get the error "Variable '$op' is not declared"
23:09 timotimo i think you want to put a : before "our"
23:09 timotimo um
23:09 timotimo actually
23:09 timotimo you're putting perl6 code directly into a rule
23:09 timotimo that is parsed as regex syntax
23:09 timotimo that's kinda weird
23:09 psch that's a weird mixture of action method and rule
23:10 psch timotimo++ for the details
23:10 adu o crap, s/rule/method/ works
23:10 timotimo :)
23:10 adu sorry guys
23:11 adu my bad
23:11 timotimo :)
23:14 adu another thing
23:14 adu CAST::TransUnit or
23:15 adu C::AST::TransUnit ?
23:15 psch adu: isn't that between C::Parser::CAST::TransUnit and C::Parser::C::AST::TransUnit?
23:16 adu psch: https://github.com/andydude/p6-c-parser/blob/cast-version-3/lib/C/AST3.pm6
23:17 adu psch: I'm thinking of just removing the 3, and merging that into the master branch
23:18 adu I think the ${SingleChar}AST system works for 2 or 3 systems, but it's not extensible to every language and/or Slang that will be written
23:18 adu so I think C::AST is better
23:18 psch adu: right.  having CAST in the root namespace seems pollute-y to me
23:19 psch there's an argument to be made for having Language::C::* instead, but i'm not gonna make.  i think it's probably mostly traditional
23:19 adu psch: right, but using C::AST in a package called "C::Parser" is also a little poluty
23:20 adu Language::C is how Haskell does it
23:20 adu but I don't know anything about Perl5 convention, I'm just guessing, basically
23:20 psch adu: but people could only use C::AST if they don't need the Parser, couldn't they?  which imho justifies having it next to Parser instead of below
23:21 psch s/only use/use only/
23:21 adu I'm a convert from Java ANTLR to Perl6, so all that "oh it's just like Perl5" means nothing to me
23:22 adu psch: should I put C::AST into a different github repo?
23:22 dalek nqp: 0556d2e | donaldh++ | src/HLL/Compiler.nqp:
23:22 dalek nqp: Fixed thinkos in HLL::Compiler.removestage
23:22 dalek nqp: review: https://github.com/perl6/nqp/commit/0556d2e62b
23:22 adu psch: or should I just declare it in the META.info thing?
23:22 psch adu: i think the latter, iirc provides allows this kinda of thing
23:23 adu ok :) thanks for the help
23:23 psch i.e. "the 'provides' field allow one repo to supply multiple packages"
23:24 psch adu: in the end this is just what i think, and i'm far from a champion for our cpan-ish thingy
23:24 adu cpanish, that's a new one
23:25 adu I think "C::AST" and "C::Parser" is a good example of that
23:37 anaeem1 joined #perl6
23:38 skids joined #perl6
23:45 prime joined #perl6

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

Perl 6 | Reference Documentation | Rakudo