Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-07-05

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:04 berekuk joined #perl6
00:05 sorear o/ colomon
00:05 colomon \o sorear
00:33 berekuk joined #perl6
00:41 gudahtt left #perl6
00:58 hypolin joined #perl6
01:06 Vlavv_ joined #perl6
01:49 _ilbot joined #perl6
01:49 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
01:50 [particle]1 joined #perl6
01:50 szbalint_ joined #perl6
01:50 PerlPilot joined #perl6
01:50 Tene_ joined #perl6
01:51 chayin_ joined #perl6
01:52 geekosaur joined #perl6
01:52 Celelibi joined #perl6
01:52 preflex_ joined #perl6
01:53 arnsholt_ joined #perl6
01:53 shachaf_ joined #perl6
01:54 apejens_ joined #perl6
01:54 Hor|zon_ joined #perl6
01:55 Woodi_ joined #perl6
01:58 crazed- joined #perl6
01:59 colomon_ joined #perl6
01:59 kst joined #perl6
02:00 mathw_ joined #perl6
02:00 obra_ joined #perl6
02:00 p5eval_ joined #perl6
02:00 __rnddim__ joined #perl6
02:01 [particle] joined #perl6
02:01 markov1 joined #perl6
02:01 timotimo joined #perl6
02:01 cosimo_ joined #perl6
02:01 ponbiki joined #perl6
02:02 shachaf joined #perl6
02:06 cooper joined #perl6
02:08 camelia joined #perl6
02:08 woosley joined #perl6
02:11 dalek specs: 45caa2b | larry++ | S06-routines.pod:
02:11 dalek specs: Allow 'is parcel' on subs that are only sorta rw
02:11 dalek specs: review: https://github.com/perl6/specs/commit/45caa2bebf
02:12 preflex joined #perl6
02:12 TimToady pop and shift should now be marked 'is parcel' rather than 'is rw'
02:13 felher joined #perl6
02:13 BenGoldberg joined #perl6
02:14 TimToady and presumably 'is rw' should enforce lvalueness, not just allow it
02:15 TimToady on '-rw' verbs, we only do that when the overhead of a rw version is likely to be much larger than the readonly version
02:16 TimToady for most things such as grep, the parcel version is likely to be least overhead
02:16 TimToady but substr-rw has to do a lot of extra work
02:17 TimToady as for return-rw, it probably doesn't need to exist, especially now that we distinguish 'is rw' subs from 'is parcel' subs
02:17 JimmyZ and take-rw?
02:18 TimToady well, it probably means take-parcel really
02:19 TimToady I might argue that it should be put on the gather rather rather than the take
02:19 sorear take/take-rw is split because we had semantic problems back when take-rw was default
02:19 TimToady decont is still probably the right default
02:19 sorear e.g. gather { my $i = 0; take $i until $i++ == 10 }
02:20 sorear returned a bunch of references to the same container.  which confused people.
02:20 TimToady maybe gather-rw or gather-parcel
02:20 TimToady "parcel" is kinda long, for something that basically means "raw"
02:20 TimToady or "ref"
02:21 TimToady I dunno whether gather has a good way to tell the take what its policy should be, though...
02:21 TimToady or whether people will want to intermix different kinds of take
02:24 TimToady 'is parcel' used to be 'is ref', and maybe take-ref is more readable on the returning end of things
02:25 TimToady though 'ref' implies a ref when there perhaps isn't one, in a P5-Think way
02:28 DarthGandalf joined #perl6
02:28 yoleaux joined #perl6
02:28 _daniel-s__ joined #perl6
02:31 nyuszika7h joined #perl6
02:35 Maddingue joined #perl6
02:41 SamuraiJack joined #perl6
02:57 fridim_ joined #perl6
03:00 konundra joined #perl6
03:00 danaj sorear: I finally got two concrete examples of numbers that fool the current is-prime.  I got caught up implementing BPSW for SymPy, which did the same problematic MR-to-first-N-bases test.  I really think the right thing is to put a Lucas test in libtommath so we can use BPSW.  It should also end up much faster.  That still leaves the API question, which I need to write up in something bigger than an IRC post.
03:12 diakopter danaj++
03:21 BenGoldberg I think there ought to be a few separate primality methods for ints...
03:21 preflex joined #perl6
03:22 BenGoldberg .is-definitely-prime(), .is-probably-prime($min_probability, $rand_object), .odds-of-being-prime($rand_object)
03:23 BenGoldberg .odds-of-being-composite($rand_object)
03:25 bonsaikitten BenGoldberg: you don't trust the usual probabilistic tests? ;)
03:26 BenGoldberg I've nothing against probablistic tests...
03:26 BenGoldberg As long as they're labeled as such
03:26 BenGoldberg And as long as I can supply my own random numbers to them
03:26 danaj odds are difficult when talking about things like BPSW.  33 years, no counterexamples, but the best worst-case probabilities are way too high.
03:26 BenGoldberg And as long a I know the odds of a false positive or a false negative
03:27 sorear um, that's not how probabilistic tests work.
03:27 benabik Odd of false negative are zero for all the methods I know.
03:28 BenGoldberg Knowing that it's zero is good! :)
03:28 danaj Primality proving is possible, but can take a while.  Putting APRCL or ECPP in the language seems overkill.
03:28 sorear BenGoldberg: please do not inflict anything named offs-of-being-prime on the spec
03:28 BenGoldberg :)
03:29 sorear please take some time to learn about the difference between a posterior probability and a likelihood
03:30 benabik danaj: How about AKS?  It's only polynomial time.  ;-)
03:30 xilo_ joined #perl6
03:31 danaj benabik: :)
03:31 bonsaikitten isn't that something that should be in an external library?
03:31 * bonsaikitten wonders if NFS for factor() would be acceptable ;)
03:33 danaj bonsaikitten: But if we have is-prime in the spec, and someone wants to add a "prove" option, then we're stuck having to do some sort of proof.  Then someone will ask for a certificate....
03:34 bonsaikitten danaj: and then you need to decide how far down that rabbit hole you want to go
03:34 danaj Noting that BPSW is deterministic to 2^64, so there's no need to get fancy for tiny 64-and-under-bit numbers.
03:36 BenGoldberg How about this for the api? $primality_posterior_probability = $someint.prime-test($rand_source, $prior_probability, $desired_probability_improvement)
03:38 benabik Adding a simple is-(probably-)prime is generally fairly easy as most numeric libraries have one.  Going into detail like that is definitely for CPAN6.
03:39 danaj There are a lot that don't have primality proofs.
03:40 danaj But if we're talking CPAN6, then it's easy enough to add.  There's already some in CPAN.
03:42 dalek roast: 7ac5b79 | (Brent Laabs)++ | S32-list/first.t:
03:42 dalek roast: test RT #118141 first returns Nil when no values match
03:42 dalek roast: review: https://github.com/perl6/roast/commit/7ac5b793f0
03:45 BenGoldberg goodnight folks
03:45 diakopter o/
03:49 ChanServ joined #perl6
03:49 DarthGandalf joined #perl6
03:59 diakopter rn: say (2**2203-1).is-prime
03:59 camelia niecza v24-86-g39ab531: OUTPUT«(timeout)»
03:59 camelia ..rakudo 677e0e: OUTPUT«True␤»
03:59 diakopter rn: say (2**1279-1).is-prime
04:00 camelia rakudo 677e0e, niecza v24-86-g39ab531: OUTPUT«True␤»
04:22 DarthGandalf joined #perl6
04:22 ChanServ joined #perl6
04:25 ChanServ left #perl6
04:27 cooper joined #perl6
04:29 yoleaux joined #perl6
04:30 cognominal joined #perl6
04:33 berekuk joined #perl6
04:42 cognominal joined #perl6
04:47 birdwindupbird joined #perl6
04:57 Tene_ joined #perl6
05:05 sivoais joined #perl6
05:29 mstefanko joined #perl6
05:34 skids joined #perl6
05:37 dayangkun joined #perl6
05:58 PacoAir joined #perl6
06:26 FROGGS joined #perl6
06:31 kaleem joined #perl6
06:53 life joined #perl6
07:00 domidumont joined #perl6
07:05 daxim joined #perl6
07:27 domidumont joined #perl6
07:33 jercos So I'm uh, trying to poke around with Unix sockets... IO::Socket::INET uses Q:PIR { %r = root_new ['parrot';'Socket'] };, but I couldn't find any way to get a sockaddr for a Unix socket, so that's not really working for me...
07:34 jercos r: my $PIO := Q:PIR { %r = root_new ['parrot';'Socket'] };$PIO.socket(1, 1, 0);my $addr = $PIO.sockaddr("/tmp/test.sock", 0, 1);
07:34 camelia rakudo 677e0e: OUTPUT«getaddrinfo failed: /tmp/test.sock: No such file or directory␤  in block  at /tmp/AaSVgM68Qr:1␤␤»
07:34 moritz I guess the file doesn't exist :-)
07:34 jercos Erm. Well maybe I'm closer than I thought. Doing that on an existing socket on my machine gives:
07:34 jercos getaddrinfo failed: /tmp/artemis.sock: Undefined error: 0
07:34 jercos Since I have a /tmp/artemis.sock that I'm using with another project.
07:36 moritz ok, "undefined error" isn't too helpful :/
07:36 jercos yeah :(
07:36 jercos hrm, I wonder...
07:36 jercos r: my $PIO := Q:PIR { %r = root_new ['parrot';'Socket'] };$PIO.socket(1, 1, 0);my $addr = $PIO.sockaddr("/dev/log", 0, 1);
07:36 camelia rakudo 677e0e: OUTPUT«getaddrinfo failed: /dev/log: No such file or directory␤  in block  at /tmp/ck_nxYQsWr:1␤␤»
07:36 jercos Ah well.
07:37 jercos I think the problem would be that getaddrinfo doesn't implement PF_UNIX, so really I guess what one would need is a Socket.sockaddr designed for Unix sockets. I was hoping that wouldn't be the case. Ah well, time to go digging I guess
07:39 moritz a big problem is also that parts of the sockets stuff in rakudo was written by me, and I have basically no idea how the whole stuff should work :-)
07:44 jercos Heh. Well it seems pretty reasonable to me, as long as one only wants to use TCP/IP. The problem looks to be in Parrot here, not in rakudo.
07:45 jercos Namely, ah, sockaddr is actually implemented *using* getaddrinfo, so I don't even know how I'd replace that.
07:45 jercos erm, at least, Socket.sockaddr is.
07:48 jercos And Sockaddr itself seems to assume that getnameinfo is usable on the sockaddr_* structure it keeps a pointer to, which I don't think is the case for sockaddr_un
08:02 sorear sleep&
08:03 lizmat gnight sorear!
08:03 lizmat TimToady: "567     +be returned raw, with attempting any decontainerization.  This can be useful for", shouldn't that be s/with/without/ ?
08:03 moritz jercos: if you are adventurous, you could try rakudo on jvm, and see if it fares any better, or at least allows you to implement what's missing without hacking the VM :-)
08:08 jercos Well I do love a good adventure...
08:12 moritz \o/
08:29 _ilbot joined #perl6
08:29 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
08:33 dmol joined #perl6
08:34 Stygia joined #perl6
08:39 jercos Wow this is slow.
08:42 jercos Uh, heh, I expected there to be something here. There is not something here :p
08:42 * jercos wonders how many useful libraries are actually wrapped in #?if parrot
08:46 dalek rakudo/nom: d990eee | (Elizabeth Mattijsen)++ | src/core/Any.pm:
08:46 dalek rakudo/nom: Make sure grep() and first() use the same check
08:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d990eee229
08:50 berekuk joined #perl6
08:58 xinming joined #perl6
09:00 dayangkun joined #perl6
09:01 jercos moritz: So yeah, I'm not really familiar with rakudo on the JVM... Is there some method for compiling and executing Java code, like Q:PIR for parrot?
09:03 moritz jercos: I'm not really familiar with rakudo on the JVM either, but I think one approach is to write an op in java, and call that via nqp::yournewop
09:03 jercos Everything I see in the core libraries calls out to nqp::, which might as well be the case for #?if !parrot, rather than #?if jvm
09:04 jercos yeah, cool.
09:05 moritz (fwiw the Q:PIR { } stuff was from the time when rakudo had only one backend, and we try to get rid of it)
09:07 lizmat_ indeed, anything PIR not wrapped in nqp:: smells
09:08 FROGGS right, in an ideal world rakudo should just know about nqp at all
09:12 berekuk joined #perl6
09:13 nyuszika7h joined #perl6
09:15 mattp__ joined #perl6
09:24 Stygia joined #perl6
09:33 dalek rakudo/nom: cd92765 | (Elizabeth Mattijsen)++ | src/core/Hash.pm:
09:33 dalek rakudo/nom: Add (Typed)Hash method "keyof"
09:33 dalek rakudo/nom:
09:33 dalek rakudo/nom: Not sure where to spec this, and whether the name is ok
09:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cd927656d7
09:34 jercos Heh, okay, java.net.Socket only handles AF_INET, so that's a bust. Presumably I could use one of the handful of JNI libraries that exposes Unix sockets, but that doesn't seem very uh, good.
09:35 moritz :(
09:35 masak good antenoon, #perl6
09:35 moritz good an, masak
09:36 lizmat_ masak!
09:41 masak and what a lovely an it is!
09:43 lizmat .oO( sounds like a disease, anitis )
09:45 jnthn o/
09:47 lizmat jnthn o/
09:47 masak lizmat: anitis strikes down on unsuspecting hosts, making them use the wrong article before an word ;)
09:47 shachaf left #perl6
09:49 jnthn Sounds like an painful codition...
09:49 jnthn *condition...
09:49 jnthn .oO( fishy spelling before coffee... )
09:49 masak of all the people, I thought you'd manage to avoid fishy spelling.
09:50 * jnthn tries to avoid all things fishy :)
09:51 lizmat good thing, things are only fishy in the state of Denmark
09:51 lizmat although that *is* geographically very close to jnthn and masak  :-)
09:51 jnthn oh noes, I has to pass through the whole Denmark next week :)
09:52 masak jnthn: did you at least book a no-fish compartment?
09:52 moritz luckily it's not that big :-)
09:52 masak jnthn: if you did, you should be safe.
09:52 jnthn masak: Not sure, but I'm guessing it'll at least be cold on board, given it's an ICE train...
09:53 masak ok, so the worst that can befall you is frozen fish.
09:53 dmol joined #perl6
09:53 * masak .oO( people attacking you with frozen fish just for the halibut )
09:53 Guest1337 joined #perl6
09:54 masak hello, o leet guest.
09:57 lizmat sanity check: a unconstrained key hash is supposed have Str(Any) as keys, right?
09:58 jnthn yes
09:58 lizmat so its .keyof should be (Str) rather than (Any)
09:59 jnthn We don't have coercion types yet, which means we just get to pick which was we're wrong :)
09:59 jnthn Any is correct in so far as it's what we can shove in
09:59 jnthn Str is correct in so far as it's what we get out
10:01 moritz (solution: implement coercion types :-)
10:01 JimmyZ maybe .typeof('key'), .typeof('value') is something better?
10:01 lizmat I may get to that  :-)
10:02 jnthn They're kinda evil to implement...
10:02 * lizmat is feeling pretty agitated :-)
10:03 moritz jnthn: do you have an idea how to approach them?
10:03 lizmat maybe do shaped arrays first
10:03 moritz (not that I'd do that; just curious)
10:03 lizmat :-)
10:05 moritz is Str(Any) be supposed to be a type object which conforms to Str, but also .ACCEPTS Any, somehow?
10:05 moritz and in MMD narrowness analysis behaves like Any?
10:07 jnthn Well, the problem is that we need to start distinguishing scenarios where you can coerce from those where you can only check
10:07 jnthn And in some cases, we need to work out which we mean :)
10:08 jnthn $x ~~ Str(Any) # do we expect $x to be mutated?
10:09 moritz I kinda hope not
10:09 moritz I think it's best to have the coercion explicit
10:09 jnthn Well, but there's some places we want it implicit. :)
10:09 moritz and only the dispatcher (or binder) invoke it implicit for you
10:09 jnthn my Str(Any) $x; # any assignment to $x should do it
10:09 moritz and, uhm, assignment to such a variable
10:09 moritz ok, rephrase
10:10 moritz I'd like the coercion to be available explicitly
10:10 moritz and only have it performed implicitly when absolutely required
10:18 census joined #perl6
10:22 mstefanko joined #perl6
10:23 woosley left #perl6
10:25 lizmat moritz: my %h; %h{Something.new}=1 would be an example of implicit coercion?
10:26 rindolf joined #perl6
10:28 jnthn lizmat: I expect that happens because method at_key(Str(Any) $key) {...}
10:31 lizmat aha, yes
10:41 Rix joined #perl6
10:44 lizmat jnthn: thinking more about Nil and Mu
10:45 lizmat if Nil is outside of any, wouldn't ->type_check automatically fire if Nil is being assigned to anything other than a Mu?
10:46 dalek roast: 7b7bab4 | (Elizabeth Mattijsen)++ | S09-typed-arrays/hashes.t:
10:46 dalek roast: Add tests for typed hashes with key constraints
10:46 dalek roast: review: https://github.com/perl6/roast/commit/7b7bab4a6c
10:46 lizmat jnthn: from this would follow that only a Mu typed container would be able to contain Nil
10:48 lizmat r: my Mu $a=1; say $a; $a=Nil; say $a  # already correct, but for the wrong reason
10:48 camelia rakudo cd9276: OUTPUT«1␤Nil␤»
10:48 lizmat r: my Any $a=1; say $a; $a=Nil; say $a  # should say Any, as that is the default
10:48 camelia rakudo cd9276: OUTPUT«1␤Nil␤»
10:49 lizmat then, whenever one has a potential return of Nil from a sub/method, and you would want to contain the Nilness of the return value
10:49 lizmat the receiving container should be typed Mu
10:50 lizmat r: my $f= (1.2.3.4.5).first( { $_ > 5 }); say $f
10:50 camelia rakudo cd9276: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Confusedâ�¤at /tmp/iLblUfk0Jl:1â�¤------> [32mmy $f= (1.2.[33mâ��[31m3.4.5).first( { $_ > 5 }); say $f[0mâ�¤    expecting any of:â�¤        postfixâ�¤        dotty method or postfixâ�¤Â»
10:50 lizmat r: my $f= (1..5).first( { $_ > 5 }); say $f
10:50 camelia rakudo cd9276: OUTPUT«Nil␤»
10:51 lizmat that should be any then
10:51 lizmat r: my Mu $f= (1..5).first( { $_ > 5 }); say $f  # correct
10:51 camelia rakudo cd9276: OUTPUT«Nil␤»
10:51 lizmat r: my Int $f= (1..5).first( { $_ > 5 }); say $f  # should say (Int)
10:51 camelia rakudo cd9276: OUTPUT«(Int)␤»
10:52 lizmat (which it clearly already does, because the ->type_check triggers
11:01 zacts joined #perl6
11:02 dmol joined #perl6
11:03 zacts left #perl6
11:18 lizmat cycling&
11:24 FROGGS EIAMAPRAT, obviously this is not what I intended to do: $a +& 0x11111
11:25 masak hee hee
11:25 masak your binary looks a bit too hexadecimal... :)
11:25 FROGGS yeah
11:26 FROGGS 10 minutes headaches :/
11:27 * FROGGS .oO( If you know you  are a jerk clap your hands... *clap clap* )
11:28 diakopter CLAP CLAP CLAP CLAP CLAP
11:29 FROGGS hehe
11:30 masak as long as your delta-jerkness is negative...
11:31 diakopter well, I think my delta-delta-delta-delta-jerkness is negative
11:32 masak so eventually you'll be fine ;)
11:33 FROGGS ohh, and doing binary things right allows pack-ing to unicode \o/
11:40 FROGGS $ ./p5 'use bytes; say sprintf "%#b %#b", unpack "C2", pack "U", 300'
11:40 FROGGS Perl5: 0b11000100 0b10101100␤
11:40 FROGGS v5:    0b11000100 0b10101100␤
11:40 army joined #perl6
11:40 FROGGS (a little cheaty because v5 doesnt handle "use bytes" and "no bytes" yet)
11:46 SamuraiJack joined #perl6
11:54 JimmyZ FROGGS++
11:55 FROGGS thanks
11:56 JimmyZ :P
11:57 kingbeast joined #perl6
11:58 kingbeast joined #perl6
12:00 kingbeast joined #perl6
12:20 SamuraiJack joined #perl6
13:15 DarthGandalf joined #perl6
13:15 Guest56532 joined #perl6
13:15 konundra joined #perl6
13:15 tomaw joined #perl6
13:15 larks joined #perl6
13:15 `patch` joined #perl6
13:15 Exodist joined #perl6
13:15 zamolxes joined #perl6
13:15 LordVorp joined #perl6
13:15 cxreg joined #perl6
13:15 yeltzooo joined #perl6
13:15 risou_awy joined #perl6
13:15 avar joined #perl6
13:15 cotto joined #perl6
13:15 diakopter joined #perl6
13:15 ilogger2 joined #perl6
13:15 rs0_ joined #perl6
13:15 zakalwe joined #perl6
13:15 Lorn joined #perl6
13:15 rjbs joined #perl6
13:15 snarkyboojum joined #perl6
13:15 perigrin joined #perl6
13:15 odoacre joined #perl6
13:15 hoelzro joined #perl6
13:15 Ulti joined #perl6
13:15 ivan``_ joined #perl6
13:15 dylanwh joined #perl6
13:15 atrodo joined #perl6
13:15 Nom- joined #perl6
13:15 [Coke] joined #perl6
13:15 cibs joined #perl6
13:15 avuserow joined #perl6
13:15 rom1504 joined #perl6
13:15 hugme joined #perl6
13:15 gfldex joined #perl6
13:15 anocelot joined #perl6
13:15 Yappo_________ joined #perl6
13:15 revdiablo joined #perl6
13:15 flussence joined #perl6
13:15 Bucciarati joined #perl6
13:15 jercos joined #perl6
13:15 eternaleye joined #perl6
13:15 rafl joined #perl6
13:15 mikemol joined #perl6
13:15 JimmyZ joined #perl6
13:15 labster joined #perl6
13:15 frdmn joined #perl6
13:15 ugexe joined #perl6
13:15 Kelder joined #perl6
13:15 simcop2387 joined #perl6
13:15 imarcusthis- joined #perl6
13:15 mangala joined #perl6
13:15 jfried joined #perl6
13:15 ruoso joined #perl6
13:15 sitaktif joined #perl6
13:15 betterworld joined #perl6
13:15 gdey joined #perl6
13:15 SHODAN joined #perl6
13:15 GlitchMr joined #perl6
13:15 frettled joined #perl6
13:15 djanatyn joined #perl6
13:15 Teratogen joined #perl6
13:15 jlaire joined #perl6
13:15 jnthn joined #perl6
13:15 itz joined #perl6
13:15 mst joined #perl6
13:15 pmichaud joined #perl6
13:15 tokuhirom_ joined #perl6
13:15 sjohnson joined #perl6
13:15 salv0 joined #perl6
13:15 Guest45844 joined #perl6
13:15 sciurius joined #perl6
13:15 iSlug joined #perl6
13:15 Pleiades` joined #perl6
13:15 snoopy joined #perl6
13:15 Timbus joined #perl6
13:15 Guest77334 joined #perl6
13:15 mtk joined #perl6
13:15 Guest5775 joined #perl6
13:15 Juerd joined #perl6
13:15 smash joined #perl6
13:15 broquaint joined #perl6
13:15 Util_ joined #perl6
13:15 awwaiid_ joined #perl6
13:15 eiro joined #perl6
13:15 mls joined #perl6
13:15 segomos joined #perl6
13:15 gabriel joined #perl6
13:15 hlin_ joined #perl6
13:15 lestrrat joined #perl6
13:15 bloonix joined #perl6
13:15 amoe_ joined #perl6
13:15 bakedb_ joined #perl6
13:15 dagurval joined #perl6
13:15 sergot_ joined #perl6
13:15 yves joined #perl6
13:15 silug_ joined #perl6
13:15 szbalint_ joined #perl6
13:15 PerlPilot joined #perl6
13:15 Tene joined #perl6
13:15 Celelibi joined #perl6
13:15 apejens joined #perl6
13:15 Woodi_ joined #perl6
13:15 Guest106 joined #perl6
13:15 mathw_ joined #perl6
13:15 obra joined #perl6
13:15 p5eval_ joined #perl6
13:15 lue joined #perl6
13:15 [particle] joined #perl6
13:15 markov1 joined #perl6
13:15 timotimo joined #perl6
13:15 cosimo_ joined #perl6
13:15 Guest79703 joined #perl6
13:15 cooper joined #perl6
13:15 Maddingue joined #perl6
13:15 birdwindupbird joined #perl6
13:15 sivoais joined #perl6
13:15 skids joined #perl6
13:15 FROGGS joined #perl6
13:15 domidumont joined #perl6
13:15 daxim joined #perl6
13:15 masak joined #perl6
13:15 geekosaur joined #perl6
13:15 lizmat joined #perl6
13:15 Hor|zon joined #perl6
13:15 xinming joined #perl6
13:15 mattp__ joined #perl6
13:15 Guest1337 joined #perl6
13:15 census joined #perl6
13:15 Rix joined #perl6
13:15 army joined #perl6
13:15 kingbeast joined #perl6
13:15 SamuraiJack joined #perl6
13:15 bruges joined #perl6
13:15 nebuchadnezzar joined #perl6
13:15 takesako______ joined #perl6
13:15 robinsmidsrod joined #perl6
13:15 woolfy joined #perl6
13:15 Guest89658 joined #perl6
13:15 scottp_ joined #perl6
13:15 xilo joined #perl6
13:15 pochi joined #perl6
13:15 pjcj joined #perl6
13:15 sunnavy_ joined #perl6
13:15 telex joined #perl6
13:15 moritz joined #perl6
13:15 berekuk joined #perl6
13:15 dmol joined #perl6
13:15 danaj joined #perl6
13:15 huf joined #perl6
13:15 sorear joined #perl6
13:15 FOAD joined #perl6
13:15 prammer joined #perl6
13:15 amkrankruleuen joined #perl6
13:15 BooK_ joined #perl6
13:15 TimToady joined #perl6
13:15 sftp joined #perl6
13:15 Vlavv_ joined #perl6
13:15 pecastro_ joined #perl6
13:15 chayin_ joined #perl6
13:15 arnsholt joined #perl6
13:15 colomon joined #perl6
13:15 camelia joined #perl6
13:15 Guest37376 joined #perl6
13:15 kaleem joined #perl6
13:15 charsbar_______2 joined #perl6
13:15 jtpalmer joined #perl6
13:15 breinbaas joined #perl6
13:15 kshannon joined #perl6
13:15 patspam joined #perl6
13:15 rhr joined #perl6
13:15 nwc10 joined #perl6
13:15 Guest82751 joined #perl6
13:15 tadzik joined #perl6
13:15 BinGOs joined #perl6
13:15 logie joined #perl6
13:15 clkao joined #perl6
13:15 stevan_ joined #perl6
13:15 dalek joined #perl6
13:15 groky joined #perl6
13:15 wtw_ joined #perl6
13:15 pnu joined #perl6
13:15 Gothmog_ joined #perl6
13:15 sjn joined #perl6
13:15 __sri joined #perl6
13:15 ingy joined #perl6
13:17 nyuszika7h joined #perl6
13:18 kaare_ joined #perl6
13:18 army joined #perl6
13:18 xinming joined #perl6
13:18 Hor|zon joined #perl6
13:18 lizmat joined #perl6
13:18 masak joined #perl6
13:18 [particle] joined #perl6
13:18 p5eval_ joined #perl6
13:18 obra joined #perl6
13:18 dagurval joined #perl6
13:18 amoe_ joined #perl6
13:18 bloonix joined #perl6
13:18 segomos joined #perl6
13:18 mls joined #perl6
13:18 eiro joined #perl6
13:19 daxim joined #perl6
13:19 Celelibi joined #perl6
13:19 smash joined #perl6
13:19 Juerd joined #perl6
13:19 Timbus joined #perl6
13:19 Pleiades` joined #perl6
13:19 jlaire joined #perl6
13:19 frdmn joined #perl6
13:19 labster joined #perl6
13:19 mikemol joined #perl6
13:19 rafl joined #perl6
13:19 eternaleye joined #perl6
13:19 rs0_ joined #perl6
13:19 zakalwe joined #perl6
13:19 Lorn joined #perl6
13:19 rjbs joined #perl6
13:19 hoelzro joined #perl6
13:19 ivan``_ joined #perl6
13:19 dylanwh joined #perl6
13:19 atrodo joined #perl6
13:19 rom1504 joined #perl6
13:19 hugme joined #perl6
13:19 gfldex joined #perl6
13:19 anocelot joined #perl6
13:19 Yappo_________ joined #perl6
13:19 revdiablo joined #perl6
13:19 flussence joined #perl6
13:19 xilo_ joined #perl6
13:20 SamuraiJack joined #perl6
13:20 kingbeast joined #perl6
13:20 Rix joined #perl6
13:20 domidumont joined #perl6
13:20 FROGGS joined #perl6
13:20 Maddingue joined #perl6
13:20 Guest79703 joined #perl6
13:20 cosimo_ joined #perl6
13:20 timotimo joined #perl6
13:20 silug_ joined #perl6
13:20 Util_ joined #perl6
13:20 sciurius joined #perl6
13:20 mst joined #perl6
13:20 djanatyn joined #perl6
13:20 betterworld joined #perl6
13:20 imarcusthis- joined #perl6
13:20 ugexe joined #perl6
13:20 snarkyboojum joined #perl6
13:20 Ulti joined #perl6
13:20 Nom- joined #perl6
13:20 census joined #perl6
13:20 snoopy joined #perl6
13:21 Stygia joined #perl6
13:22 colomon rn: say 2 ** 68
13:22 camelia rakudo cd9276, niecza v24-86-g39ab531: OUTPUT«295147905179352825856␤»
13:22 cibs joined #perl6
13:23 nyuszika7h joined #perl6
13:25 konundra joined #perl6
13:26 yoleaux joined #perl6
13:26 Guest106 joined #perl6
13:26 apejens joined #perl6
13:26 szbalint_ joined #perl6
13:26 awwaiid_ joined #perl6
13:26 broquaint joined #perl6
13:26 SHODAN joined #perl6
13:26 sitaktif joined #perl6
13:26 simcop2387 joined #perl6
13:26 JimmyZ joined #perl6
13:26 perigrin joined #perl6
13:26 odoacre joined #perl6
13:26 [Coke] joined #perl6
13:26 avuserow joined #perl6
13:29 colomon Can someone with more NQP experience take a peek at https://github.com/colomon/sprintf/commit​/fb43a1a2aab18bd0bce400674dc6a90603b91dde and see if it makes any sense?
13:34 Rix joined #perl6
13:34 raiph joined #perl6
13:34 moritz looks good at first glance
13:36 colomon the sprintf tests I added using them all fail, which makes it hard to tell if they are correct or not.
13:37 * JimmyZ wonders who users Clojure here
13:37 JimmyZ *uses
13:39 masak JimmyZ: I would like to start using Clojure. lots of things about it seem very interesting.
13:40 masak not least of them Rich Hickey himself and all his ideas :)
13:40 telex joined #perl6
13:41 bonsaikitten joined #perl6
13:41 * diakopter wonders if the name is a pun on closure or cloture ;)
13:42 woosley joined #perl6
13:42 colomon diakopter: I believe it is supposed to be pronounced closure
13:42 colomon so, probably yes.  :)
13:43 masak it is.
13:43 masak the 'j' is because JVM.
13:43 diakopter right, but cloture sounds very very close to closure
13:43 colomon moritz: hmmm, "say" doesn't work on those two alleged bigints of mine.  :\
13:43 JimmyZ masak: yep, It looks like more interesting than java(to me)
13:44 masak that isn't saying much, though :P
13:44 colomon JimmyZ: what doesn't look more interesting than java?
13:44 JimmyZ colomon: lispish with map-reduce, methinks
13:45 masak not just map-reduce. persistent data structures. excellent concurrency support. actors, I think.
13:45 JimmyZ and lightweight
13:45 masak in many ways, it's what Arc never became.
13:46 FROGGS colomon: I get: get_number() not implemented in class 'TestBigInt'
13:46 colomon JimmyZ: sorry, that was an idiom.  I was trying to say that almost every programming language looks more interesting than Java.
13:46 diakopter are you confusing clojure with scala?
13:46 masak JimmyZ: like "how can a language not look more interesting that Java?"
13:46 masak diakopter: no.
13:47 masak diakopter: Scala is interesting, too, though.
13:47 colomon FROGGS: with parrot nqp?  I've been testing with jvm nqp
13:47 FROGGS ohh
13:47 FROGGS colomon: yes, with parrot nqp
13:47 colomon FROGGS: interesting
13:48 FROGGS colomon: okay, using nqp-jvm it fails the tests you added
13:48 JimmyZ masak, colomon: I think because https://github.com/nathanmarz/storm use clojure, which is useful to me :P
13:49 FROGGS looks like 2 ** 68 results in 0
13:49 colomon FROGGS: yes
13:50 colomon I'm studying 60-bigint.t, but I don't understand it at all, alas.  :(
13:50 berekuk joined #perl6
13:50 masak JimmyZ: if that was a reply to us trying to explain how you misunderstood the idiom, then we are still not coming across to each other. :/
13:51 masak but at this point trying to explain the original idiom and the misunderstanding may not be worth it.
13:51 colomon JimmyZ: I think we all agree that clojure is interesting.  :)
13:51 JimmyZ masak: no, I'm not replay your question ;D
13:51 masak s/coming across/getting across/
13:51 JimmyZ *reply
13:52 masak ok, that makes it less of a misunderstanding, then ;)
13:53 JimmyZ I just explains storm is the sake, for me :P
13:54 masak nodnod
13:55 masak "the end that justifies the means" :)
13:56 * JimmyZ really want storm will be implemented by Perl6 someday :P
14:00 cognominal joined #perl6
14:02 timotimo .o("the end that justifies the memes")
14:03 colomon update to nqp big int: say(nqp::tostr_I($two-to-the-sixty-eight)); does indeed print 295147905179352825856
14:04 colomon so I think the big int stuff is right, and the bugs are in sprintf / say ?
14:04 colomon "bugs" possibly
14:06 FROGGS colomon: btw, you are missing $s at line 352/353
14:07 colomon FROGGS++
14:09 lama joined #perl6
14:11 colomon so I guess at this point, I'm definitely creating some big ints.  but are they of the right sort to be passing to sprintf?
14:12 jnthn colomon: There's an op for doing bigint => string
14:12 colomon tostr_I, right?
14:12 jnthn yeah, pretty sure that's it
14:14 colomon jnthn: I'm trying to figure out how to properly create bigints to pass to the NQP sprintf to see if it handles bigints.
14:15 colomon right now I'm successfully creating a big int, but I don't know if it's the right sort to pass to sprintf.
14:17 PacoAir joined #perl6
14:19 moritz do you pass it in for a %d placeholder?
14:20 colomon yes
14:20 colomon and %u
14:20 moritz if yes, you could check if it's a normal int (there an is_str or somthing), and if not, simply assume it's a bigint
14:21 colomon moritz: at this point, I think knowing that I'm passing the right sort of thing to sprintf is a bigger problem than knowing how sprintf should handle it when  it gets it.  :)
14:21 cognominal__ joined #perl6
14:22 moritz colomon: thing is, nqp handles bigint-ness at the REPR level, not at the type level
14:22 moritz colomon: so if you pass something to an nqp::\w+_I op, and it doesn't blow up, it was the right thing to pass in
14:23 colomon moritz: \w+_I ?
14:25 sergot joined #perl6
14:25 Woodi joined #perl6
14:26 PerlJam joined #perl6
14:27 colomon oh
14:27 colomon !
14:27 colomon so if I pass it to, say add_I, it's good.
14:28 sivoais_ joined #perl6
14:29 cooper joined #perl6
14:29 araujo joined #perl6
14:29 araujo joined #perl6
14:30 cooper joined #perl6
14:32 colomon can't tell if I'm netsplit or not.
14:32 benabik joined #perl6
14:33 rindolf joined #perl6
14:33 moritz colomon: looks right, yes
14:34 colomon groovy!  next, to make them actually work....
14:34 Pompel_ joined #perl6
14:35 * colomon seems to have crashed textmate by doing an ack search for w+ on the entire nqp repo.  (It was supposed to be literal, darn it.)
14:35 salv0 joined #perl6
14:36 lestrrat joined #perl6
14:36 sivoais joined #perl6
14:37 jnthn I think that may match in a few places :P
14:40 colomon is there an nqp::is_int, or something like that?
14:41 moritz there's an nqp::isstr
14:42 colomon and isint
14:42 moritz \o/
14:42 colomon moritz++
14:45 colomon what's the difference between _i and _I ?
14:45 moritz _I is bigint
14:45 moritz _i is nativ int
14:47 colomon moritz++
14:51 colomon huh.  so how do I convert from an int to an Int in nqp code?  I needed to add a new type for the sprintf tests, do I also need to add it for the sprintf code?
14:53 colomon it seems like all the nqp _I ops take a type parameter...
14:54 moritz yes
14:54 moritz because bigintness is only tied to the REPR
14:54 moritz so it doesn't know which type to box into unless you supply a type on your own
14:54 dalek specs: b327dcf | larry++ | S06-routines.pod:
14:54 dalek specs: typo spotted by lizmat++
14:54 dalek specs: review: https://github.com/perl6/specs/commit/b327dcf59a
14:55 colomon moritz: does that imply that I need to have separate int and Int code paths?
14:55 moritz colomon: yes
14:55 colomon and then how do I tell the difference between them?
14:55 moritz (there's a reason you usually want to use a high-level language like Perl 6 :-)
14:55 colomon amen to that
14:56 moritz if nqp::isint($thingy) { int code path } else { bigint code path }
14:56 colomon hmmm… okay, how do I figure out if something is a bigint?
14:56 thou joined #perl6
14:57 TimToady the old Fortran answer: convert to the restricted type, convert back, see if still equal...
14:58 moritz colomon: best add an nqp::isbigint op or so
14:58 moritz colomon: see src/vm/parrot/ops/nqp_bigint.ops
14:58 TimToady what do you mean by "bigint"?
14:58 moritz or better, hasbigintrepr or so
14:59 moritz nqp: nqp::add_I(1, 2, 3)
14:59 camelia nqp: OUTPUT«(signal SEGV)»
14:59 colomon TimToady: something which might be *anything* -- I need to tell if we're dealing with an int, a num, or an Int.  (but in p6ese)
14:59 TimToady by one def, Int is always bigint, even if its number would fit into a native int
15:00 berekuk joined #perl6
15:00 * TimToady should probably read the backlog 1st
15:00 moritz maybe the contents of 'get_bigint' is of some inspiration of how to check whether something is big on the C level
15:00 colomon TimToady: in NQP land
15:01 TimToady maybe it'd be nice if nqp were a little less nq in that regard :)
15:02 cognominal joined #perl6
15:02 jnthn nqp::isint may tell you if the thing you're looking at is a simple boxed native int ratehr than a bigint.
15:02 TimToady but I understand the need to bridge the semantic gap between native architectures and virtual
15:03 moritz the whole bigint mess in NQP is really optimized for generated code and/or usage by Perl 6
15:03 colomon jnthn: looking at the source, it only seems to return true or false.  well, 1 or 1
15:03 colomon 0
15:04 moritz I think colomon's problem is that people are used to pass in integers as strings, for example
15:04 moritz so one need to check if nqp bigint ops can be applied to the thing or not
15:05 moritz and there seems to be no way to check that, at the moment
15:05 colomon moritz: haven't even considered that case
15:05 colomon I'm just looking at the simplest case: actually passing an int or a bigint
15:06 moritz then you do   if nqp::isint($v) { normal int } else { assume bigint }
15:06 jnthn Yeah, that's what I was suggesting...
15:06 colomon as written, the sprintf code actually calls floor_n or ceil_n on the op, then (in the sized case) calls abs_i on the number
15:06 jnthn But yes, it's an assumption...
15:06 colomon okay, it's not quite that simple, because nums also have to be allowed.
15:06 jnthn ...that probably won't hold up
15:06 colomon and of course, long term str, etc
15:07 jnthn There's nqp::isstr, nqp::isnum also fwiw
15:07 TimToady would be nice to solve it with dispatch rather than introspection, perhaps
15:07 colomon I'm trying to make sure the basics work without making assumptions that will totally break in a day or two.  :)
15:07 jnthn Well, if you know the objects you're getting passed come from Perl 6 land, then you can call .Int on 'em...
15:07 ajr joined #perl6
15:08 jnthn At which point you know for sure you've got a bigint.
15:09 colomon jnthn: nqp sprintf tests are entirely nqp based.
15:09 JimmyZ it's nice to have nqp::isbigint?
15:10 TimToady maybe you should ask each type to convert to a decimal string, then work with that, since native types are likely to do division by 10 much faster than bigint
15:10 TimToady or is this before the radix decision?
15:12 TimToady given how sprintf works, I'd think the radix would already be known
15:12 colomon oh, wait!
15:12 colomon looks like %u already has code which tries to do this?
15:13 TimToady oh yeah, signs...TimToady wanders off to get more coffee...
15:21 colomon okay, progress
15:21 colomon except I still need to recognize when I've got a bigint
15:22 xilo_ joined #perl6
15:31 berekuk joined #perl6
15:33 colomon like asking a variable if it has REPR P6bigint?
15:36 jnthn Trouble is that Perl 6's Int contains a P6bigint, but is itself a P6opaque
15:42 colomon arg
15:43 colomon basically, as I see it, we need to handle four cases:
15:43 colomon 1) it's an int
15:43 colomon 2) it is (or has?) a P6bigint
15:44 [Coke] labster++ # closing out rts
15:44 colomon 3) it's a non-integer numeric type
15:44 colomon 4) it's not a numeric type at all
15:45 colomon right now I'm successfully converting cases 1, 3,  and 4 to P6bigint, and that seems to work.  But I've got no clue how to detect case 2.
15:45 berekuk joined #perl6
15:46 Pleiades` joined #perl6
15:48 colomon (meaning that incoming P6bigints are converted to num, then int, then P6bigint again, which is Not Correct.
16:12 arnsholt o/
16:12 arnsholt colomon: I suspect the Zavolaj-bug reflects and underlying Rakudo issue
16:14 benabik joined #perl6
16:15 colomon arnsholt: okay.  want me to try to golf it down?  is it as simple as "second role added doesn't work", or is there more to it?
16:19 arnsholt colomon: https://gist.github.com/arnsholt/5929886
16:19 arnsholt That's as far as I got last night
16:20 arnsholt The fact that a normal sub doesn't handle invocation via the postcircumfix:<( )> method might have something to do with it
16:21 colomon arnsholt++
16:21 colomon jnthn: ^^^^^
16:22 dmol1 joined #perl6
16:24 PZt joined #perl6
16:30 arnsholt Yeah, I think I can repro with plain classes. Gimme a sec to gist it
16:31 arnsholt Wait, no. I was wrong =/
16:32 colomon I think adding a call to foo() between &foo does Test and &foo does Other helps clarify matters.  :)
16:33 colomon (that the first does seems to disappear)
16:33 arnsholt Point, point
16:34 colomon curiouser and curiouser: I tried it under niecza, and it points out that postcircumfix:<( )>($args) takes arguments which you don't pass it.
16:35 arnsholt IIRC $args on Rakudo is an object representing the full argument list
16:35 arnsholt Or did you mean something else?
16:36 colomon no, that's it.  pretty sure $args has no special meaning (but I've been wrong many times before)
16:37 colomon or maybe not?  If I remove $args, niecza works as desired.
16:37 colomon but rakudo says Too many positional parameters passed; got 2 but expected 1
16:37 cognominal joined #perl6
16:38 arnsholt Huh
16:39 jnthn Thanks for the golf; will look into it.
16:39 arnsholt If you look at NativeCall.pm6:128 it fetches a Capture from $args
16:39 arnsholt Looks like Rakudo and Niecza have different APIs here. Odd.
16:39 jnthn It may be a consequence of changes to invocation protocol a while back.
16:40 arnsholt Yeah, that sounds plausible
16:40 colomon jnthn: I believe the test failure cropped up during YAPC::NA
16:41 jnthn Hm. Well the chagne happened way before then. But I wonder if the change was done in the jvm support branch, which got merged at YAPC::NA.
16:42 colomon certainly could be the case, I guess
16:43 colomon I guess it wouldn't be too hard to test that notion… grab the appropriate merge commit and rebuild everything.
16:43 arnsholt flussence++'s patch is to fix something you pointed out had to be fixed as a consequence of the jvm support branch, so I think that might be it
17:01 mtk joined #perl6
17:21 Rotwang joined #perl6
17:21 labster joined #perl6
17:25 FROGGS joined #perl6
17:26 * __sri wonders if the release of the HTTP/2.0 spec in 2014/2015 could be *the* big chance for perl6, considering that threads will be huge for the new generation of application servers
17:27 dmol joined #perl6
17:28 moritz well, first we have to actually implement decent threads :-)
17:31 timotimo that should be doable until 2014/2015, i'd hope
17:33 ajr joined #perl6
17:35 domidumont joined #perl6
17:35 * jnthn would hope so too
17:43 __sri \o/
17:44 flussence wait, I wrote a patch?
17:44 __sri (btw. threads will be huge because HTTP/2.0 multiplexes multiple streams on every socket, which means workers need to be able to handle concurrent requests)
17:47 jnthn arnsholt: Got a patch that fixes the issue
17:48 jnthn Well, at least, does under JVM, and shouldn't be backend specific.
17:48 dalek rakudo/nom: 9e05b52 | jnthn++ | src/Perl6/Metamodel/InvocationProtocol.nqp:
17:48 dalek rakudo/nom: Fix postcircumfix:<( )> / mixin semantics.
17:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9e05b525f3
17:49 jnthn arnsholt, colomon: Hopefully ^^ helps
17:49 masak __sri: I love these little interlocutions you do. they are pretty nice. :)
17:49 __sri :D
17:49 masak __sri++ # hanging around here, telling us about the future
17:54 dalek perl6-roast-data: a5375dc | coke++ | / (5 files):
17:54 dalek perl6-roast-data: today (automated commit)
17:54 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/a5375dc2f3
17:56 FROGGS jnthn: ahh, so not my fault at all :o)
17:57 jnthn FROGGS: No, it turned out to be less to do with mixins in the end :)
17:58 FROGGS that is somehow good and somehow scary
18:00 masak rn: sub foo { 1, 2, 3 }; say "it is as easy as $(my @x)" if @x = foo
18:00 camelia rakudo cd9276, niecza v24-86-g39ab531: OUTPUT«it is as easy as 1 2 3␤»
18:00 masak :D
18:01 spider-mario joined #perl6
18:02 * masak just had an actual use for that pattern in some real-world code, and wanted to make sure it works on all modern impls
18:03 jnthn :)
18:03 dmol joined #perl6
18:03 masak note the need to do $(), not {}, inside the string. I need a thunk. not a block, because a block would get its own pad, and I don't want a new pad, I want the mainline code pad.
18:04 jnthn Right. :)
18:04 jnthn That's cute.
18:04 masak no, it's horrible :P
18:04 masak I am a bad, bad coder...
18:04 jnthn But in the "you think it's cute today" sense.
18:04 jnthn Right. :P
18:04 masak so we agree.
18:05 * masak .oO( we are in #f0f agreement )
18:05 masak or more like #90f, according to Wikipedia... :)
18:07 timotimo peachy keen?
18:08 masak "violet"
18:08 masak the real line of code looks like this: die "'$topic' is ambiguous: $(my @alternatives)" if @alternatives = substring_matches lc $topic;
18:08 masak oops, no.
18:08 timotimo ah
18:09 TimToady .u ए
18:09 yoleaux U+090F DEVANAGARI LETTER E [Lo] (ए)
18:09 masak die "'$topic' is ambiguous: $(my @alternatives)" if 1 < @alternatives = substring_matches lc $topic;
18:09 [Coke] https://gist.github.com/coke/5879701 updated.
18:09 masak [Coke]++
18:09 TimToady so you are in Lo agreement?  :P
18:09 masak TimToady: :P
18:10 timotimo [Coke]: next time, can you send the text through a replacement that turns < and > into &lt; and &gt;? :)
18:10 masak std: say 000
18:11 camelia std 85cf51d: OUTPUT«Potential difficulties:â�¤  Leading 0 does not indicate octal in Perl 6; please use 0o00 if you mean that at /tmp/9EIHYpB2wa line 1:â�¤------> [32msay 000[33mâ��[31m<EOL>[0mâ�¤ok 00:00 42mâ�¤Â»
18:11 FROGGS [Coke]++
18:11 masak timotimo: fork it and do it?
18:11 masak gists are git repositories, so it can easily be done locally.
18:12 n0den1te joined #perl6
18:12 nitrodex joined #perl6
18:12 nitrodex joined #perl6
18:13 nitrodex joined #perl6
18:13 nitrodex joined #perl6
18:13 Guest40148 joined #perl6
18:13 Guest40148 joined #perl6
18:14 raiph joined #perl6
18:17 masak n0den1te: yo
18:17 masak raiph! \o/
18:17 n0den1te hello, masak. :)
18:18 masak n0den1te: doing well? done any Perl 6 lately? :)
18:19 n0den1te masak: I'm good, thanks. I've been following chat logs - you guys seem to have come very far on rakudo-jvm. :)
18:20 [Coke] I figured it wasn't worth doing a 100% clean .md conversion on bugs that everyone was going to fix so soon. :)
18:20 masak n0den1te: yes, it's rather incredible.
18:20 masak all that architectural planning seems to have paid off! \o/
18:21 masak pmichaud++ jnthn++
18:21 n0den1te \o/
18:21 n0den1te I haven't yet gotten around to trying out rakudo-jvm, but hey - atleast, I was able to get rakudo up on slackbuilds.org! :D
18:22 n0den1te It's on 2013.05, though.
18:22 [Coke] minor updates.
18:22 n0den1te Not sure if we had a June release
18:23 raiph hi #perl6. aiui, assuming p6 is otherwise adequate, solid nfg support ought make it a go to lang for relatively easily dealing easily with mixed unicode encodings, right?
18:24 n0den1te mixed unicode encodings?
18:24 colomon jnthn: I seem to be having trouble building parrakudo with your latest patch?
18:25 masak raiph: yes, can you please be more specific what you mean by 'mixed unicode encodings'?
18:25 masak what, like, in the same file?
18:26 raiph no, just bit of texts in various encodings, and then appending them, regex searching them, substr'ing them, etc.
18:26 raiph or if encoding is the wrong term, just whatever it is that led to nfg being a good idea
18:27 raiph in other words, aiui, nfg isn't about catching up, it's about getting it right where other current langs don't so much
18:28 raiph built in to the lang rather than requiring libs, discipline and acrobatics
18:28 masak NFG is about a sensible normalization for multi-codepoint graphemes, IMU.
18:28 n0den1te heh - I always think "Non Functional Grammar" whenever I see NFG. :P
18:29 raiph my interest is figuring out whether, at either a technical or marketing level, nfg is anything to write home about
18:29 masak like, you can do "ä" either by doing "ä" or by doing "a" and then a two-dot thing.
18:30 masak where the two-dot thing says "I belong over at that previous grapheme".
18:30 masak now, "ä" has its own codepoint already, but most combinations won't have that.
18:31 masak so NFG hijacks the negative numbers for all such new combinations.
18:31 masak no particular order, just grab the next (previous) free one.
18:32 masak I think the advantage is speed. because if you store things that way internally, you don't have to do normalization every time you want to compare strings.
18:32 raiph masak: i'm assuming that, over the coming decade, some programming and scripting folk are going to have to deal with handling text with these different multi-codepoint combinations, and nfg is the right answer, sufficiently so that it may be reason enough to make use of p6 compelling just for that reason
18:33 raiph masak: but i also know it may be getting that completely wrong so i'm asking folk who are a lot more likely to know than me :)
18:33 timotimo but utf8, for instance, doesn't cover the negative numbers?
18:37 masak timotimo: right.
18:38 timotimo [Coke]: there's an html thingie that will turn into a line-break without hyphen if need be, right? i think all the .s could be replaced by . and that char, because some of the lines are too damn long ;)
18:38 jnthn colomon: oh?
18:38 masak raiph: I don't know about "compelling". Unicode is big and scary and most people don't understand it. so the advantage Perl 6 has compared to other languages in that regard, will also be hard for people to understand.
18:38 colomon jnthn: I'm trying a fresh (from scratch) build right now
18:39 timotimo have we an idea why string trimming is so ridiculously fast in perl5 as compared to our perl6 implementations?
18:39 timotimo does perl5 ignore unicode-y whitespace characters?
18:39 jnthn colomon: What was the failure mode?
18:39 colomon efault invocation handler is not invokable
18:39 colomon current instr.: 'compose_invocation' pc 13409 (src/gen/perl6-metamodel.pir:6489) (src/gen/Metamodel.nqp:1270)
18:39 colomon called from Sub 'compose' pc 27367 (src/gen/perl6-metamodel.pir:12412) (src/gen/Metamodel.nqp:2500)
18:39 colomon *Default
18:39 timotimo does perl5 remember when a string gets created like " " x 1000 and prepended/appended to another string? m)
18:40 colomon jnthn: and yup, happens in a fresh rakudo clone, too.
18:41 [Coke] timotimo: I changed to a .txt file. enjoy
18:41 [Coke] now you must fix one of the jvm bugs.
18:41 timotimo ooooh
18:41 timotimo i must? :(
18:42 TimToady timotimo: depends on how the program is written, but \s matches unicode whitespace by default
18:42 jnthn colomon: oh, I wonder...
18:42 timotimo perl5 => 'my $s = " " x SCALE . "x" x SCALE . " " x SCALE; /^\s*(.*?)\s*$/s for 1 .. SCALE',
18:42 TimToady P5's advantage may be in being able to chop things off either the beginning or end of a string without any copying
18:43 timotimo that could definitely make a difference, yeah
18:43 timotimo i just read in pypy that they had some place in the code that used char-by-char-copying instead of memcpy and changing that gave them a huge boost; maybe our implementations in p6 are doing something naive like that, too?
18:43 timotimo (the p6 version just calls .trim
18:44 TimToady though that's not how I'd write trim in P5
18:44 timotimo and that uses a loop from the left end while the current character is considered whitespace and then chops or something like that)
18:45 TimToady oh, the P5 version is cheating
18:45 TimToady it's not actually doing anything with $1
18:45 timotimo oh?
18:45 timotimo so it just gets ignored? that's bad! :)
18:45 TimToady it's just running the match
18:46 dalek rakudo/nom: 29fb2b5 | jnthn++ | src/Perl6/Metamodel/InvocationProtocol.nqp:
18:46 dalek rakudo/nom: Hopefully fix Rakudo Parrot build.
18:46 dalek rakudo/nom:
18:46 dalek rakudo/nom: colomon++ for reporting.
18:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/29fb2b559e
18:46 timotimo if you give me the fixed version, i'll contribute and re-run the benchmarks.
18:46 timotimo contribute a pull request to japhb*
18:46 colomon jnthn: trying...
18:46 jnthn timotimo: What is the trim benchmark?
18:47 timotimo https://github.com/japhb/perl6-bench​/blob/master/microbenchmarks.pl#L225
18:47 timotimo http://t.h8.lv/p6bench/native_fixed.html - here's the comparison of the results again
18:48 raiph masak: if Unicode is big and complex and scary, and p6 just gets it right, that would likely be a big "marketing" win, imo
18:48 timotimo oh, yeah, that graph should have raised a big red flag in my mind; the string gets much bigger every time so it should really not be as fast.
18:48 colomon jnthn: looks like it's getting much further right now...
18:48 jnthn \o/
18:49 jnthn timotimo: Is that Perl 5 one even actually pulling out the trimmed thing? :)
18:49 colomon jnthn: still not finih.. finished!
18:49 TimToady nope
18:49 timotimo jnthn: TimToady just said that it doesn't :)
18:49 colomon jnthn: make test passing, looks like we're in good shape.
18:49 jnthn That's cheating :P
18:49 timotimo that's why i asked him to fix it for me :)
18:50 colomon jnthn: more testing forthcoming
18:50 timotimo but also, TimToady said he wouldn't write trim like that in p5, so i'm awaiting his clever rewrite that'll still beat perl6 by a factor of 100 ;)
18:50 TimToady the P6 one might even be treating the for loop as a list comprehension, depending on the context.
18:52 masak raiph: you may be right.
18:52 TimToady well, the usual way would be to say $_ = $s; s/^\s+//; s/\s+$//; when you're not using the same string over and over
18:52 masak raiph: but I believe p5 is a data point there. Perl 5 does Unicode very well, but it's not very popular.
18:53 jnthn Most people don't know what they don't know about Unicode.
18:53 masak raiph: specifically, it's not popular because it does Unicode very well.
18:53 masak jnthn: right, that's what I'm getting at.
18:53 timotimo i have heard "perl5 is the best language in terms of unicode support" a couple of times before - even outside this channel! ;)
18:53 TimToady but you could change yours to read 'my ($result) = /^\s*(.*?)\s*$/s for 1 .. SCALE'
18:53 moritz well, P5 does Unicode very well, but it's far too easy to mess up encodings
18:54 TimToady then you're at least getting the result out
18:56 colomon jnthn: results looking promising
18:56 TimToady I would also like to know what context perl6-bench puts around the code
18:56 jnthn colomon: yay
18:56 TimToady because P5 knows more about optimizing for context than P6 does yet
18:57 preflex joined #perl6
18:57 masak timotimo: yes, sure. but raiph was talking about marketing.
19:00 colomon jnthn: Successfully installed NativeCall   \o/
19:00 timotimo right.
19:00 colomon jnthn: suspect this will get us a dozen modules working again.  about to launch a smoke test....
19:00 berekuk joined #perl6
19:00 timotimo excellent!
19:00 thundergnat joined #perl6
19:00 timotimo the next star release is going to happen, then?
19:00 n0den1te Talking about marketing, don't (atleast initially) mention perl6. People will just liken that to perl5 and say "Oh, it's just the new perl. Naw, not interested." I know this has been talked to death and no amount of reasons can convince them otherwise. :|
19:01 timotimo no, actually when they hear "perl6", they'll say "oh, they still believe in that crappy piece of pipedream vaporware?"
19:01 jnthn colomon: Excellent!
19:02 n0den1te timotimo: yeah, DNF jokes are getting too old.
19:03 masak timotimo: it can't both be crappy and vaporware, can it? :P
19:04 colomon arnsholt++
19:04 n0den1te pipedream and vaporware. redundant words. :P
19:04 colomon jnthn++
19:05 n0den1te Also, when they still see things happening, how can that be vaporware?
19:06 census joined #perl6
19:07 lizmat back from cycling, too tired to fcous, may try again in a few hours
19:08 xinming joined #perl6
19:12 raiph masak: i'm talking about technical too. marketing that does not pretty precisely align with technical truth is worse than useless
19:12 masak n0den1te: I, don't know, I just... when we say "we make monthly releases", they move the goalposts. I see where they're coming from, and yes, being a significant player in the industry is important.
19:13 masak n0den1te: but if people use "vaporware" as a word and then regroup and start talking about other things when we explain how it's not vaporware... then it's hard to have a reasonable discussion.
19:14 n0den1te I know - I've seen discussions on reddit. I'm just saying that reddit is not our audience - hive mentality doesn't work for reasoned conversation.
19:15 n0den1te masak: ^^
19:15 [Coke] there are some colleagues that I have given up having reasonable perl6 discussions with. (people who contributed to parrot back in the early days).
19:15 raiph masak: and i'm talking about what we hope will be, not what is. i'm thinking about what the marketing message could be in, say, 2 years, not now
19:15 masak raiph: I see.
19:19 dalek nqp: 5c0351d | jnthn++ | src/QRegex/Cursor.nqp:
19:19 dalek nqp: Avoid over-sharing.
19:19 dalek nqp:
19:19 dalek nqp: This was in theory an optimization, but in reality trips an SC write
19:19 dalek nqp: barrier all the time and would stop us parsing grammars in two threads
19:19 dalek nqp: at once.
19:19 dalek nqp: review: https://github.com/perl6/nqp/commit/5c0351ddd8
19:19 dalek nqp: 82cdfba | jnthn++ | / (11 files):
19:19 dalek nqp: Update bootstrap; switch all to use .jar.
19:19 dalek nqp: review: https://github.com/perl6/nqp/commit/82cdfba321
19:19 masak rn: my @x = { :delta(1) }, { :delta(2) }, { :delta(3) }; say [+] map { .<delta> }, @x
19:19 camelia rakudo 29fb2b, niecza v24-86-g39ab531: OUTPUT«6␤»
19:19 masak rn: my @x = { :delta(1) }, { :delta(2) }, { :delta(3) }; say [+] @x».<delta>
19:19 camelia niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Cannot use hash access on an object of type Int␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 355 (Any.at_key @ 9) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/Sa8ZAifpkp line 0 (ANON @ …
19:19 camelia ..rakudo 29fb2b: OUTPUT«postcircumfix:<{ }> not defined for type Int␤  in method sink at src/gen/CORE.setting:10500␤  in method STORE at src/gen/CORE.setting:7264␤  in sub hash at src/gen/CORE.setting:7475␤  in sub hyper at src/gen/CORE.setting:14593␤  in sub hyper at src/gen/CORE.setting…
19:20 ilogger2 joined #perl6
19:20 masak rn: my @x = { :delta(1) }, { :delta(2) }, { :delta(3) }; say [+] @x»<delta>
19:20 camelia rakudo 29fb2b: OUTPUT«postcircumfix:<{ }> not defined for type Int␤  in method sink at src/gen/CORE.setting:10500␤  in method STORE at src/gen/CORE.setting:7264␤  in sub hash at src/gen/CORE.setting:7475␤  in sub hyper at src/gen/CORE.setting:14593␤  in sub hyper at src/gen/CORE.setting…
19:20 camelia ..niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Cannot use hash access on an object of type Int␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 355 (Any.at_key @ 9) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/GQ8ZPGaKp0 line 0 (ANON @ …
19:20 masak :/
19:20 masak I expected either of the above to work.
19:20 masak where did I go wrong?
19:20 masak (where "work" is defined as "produce the same result as the 'map' case above")
19:21 * timotimo runs all the benchmarks
19:26 jnthn masak: Maybe 'cus Rakudo's hypers still go too deep?
19:26 moritz yes, that's the cause
19:26 jnthn 'cus didn't get to doing the nodal thing yet
19:26 grondilu joined #perl6
19:27 masak aha.
19:28 grondilu I'd like some help on running rakudo on JVM, but here is probably not the best place.  Maybe on reddit or perlmonks.org?
19:28 masak yes, I never stopped to internalize the current Rakudo semantics for »
19:28 masak grondilu: why wouldn't here be the best place?
19:28 * moritz can't build nqp-jvm anymore
19:29 moritz Error: Could not find or load main class nqp
19:29 moritz make: *** [src/stage1/ModuleLoader.jar] Error 1
19:29 jnthn moritz: Re-configure?
19:29 moritz jnthn: I did
19:29 grondilu masak: because there's no persistence in the messages, and it might take some time to find the problem.
19:29 * moritz tries again without -j3
19:29 jnthn hmmm
19:29 xilo_ joined #perl6
19:29 moritz same error
19:30 timotimo moritz: did you make extra-extra-extra-really sure it's clean?
19:30 moritz timotimo: is 'git clean -xdf' enough?
19:30 timotimo i recommend rf -rf /path/to/repository && git checkout HEAD
19:30 timotimo er, that's wrong
19:30 timotimo i recommend rf -rf /path/to/repository/* && git checkout HEAD
19:30 * moritz removes the install dir too and tries again
19:30 moritz same error
19:30 masak n: my @x = <& a& &b>; s:g/\&/\\\&/ for @x; say @x
19:30 camelia niecza v24-86-g39ab531: OUTPUT«\& a\& \&b␤»
19:31 masak r: my @x = <& a& &b>; s:g/\&/\\\&/ for @x; say @x
19:31 jnthn moritz: Can you check there's no *.class in src/vm/jvm/stage0, just jar?
19:31 camelia rakudo 29fb2b: OUTPUT«Cannot assign to a readonly variable or a value␤  in sub infix:<=> at src/gen/CORE.setting:13980␤  in block  at /tmp/WTqKNtTlAh:1␤␤»
19:31 grondilu (well I try to describe the issue here after all)
19:31 masak I expect to be able to change those things in an array. is Rakudo wrong and Niecza right?
19:31 moritz jnthn: there is no src/vm/jvm/stage0
19:31 * grondilu runs "cd nqp; perl ConfigureJVM.pl --prefix=../install-jvm"
19:32 moritz jnthn: your bootstrap update removed lots of .class files, but didn't add any .jar
19:32 masak rn: my @x = <& a& &b>; for @x { s:g/\&/\\\&/ }; say @x
19:32 camelia rakudo 29fb2b, niecza v24-86-g39ab531: OUTPUT«\& a\& \&b␤»
19:32 jnthn oh crap
19:32 moritz :-)
19:32 jnthn You'd think I could actually use git...
19:32 masak $_ should be 'is rw' both in a normal for loop and in a statement_mod for loop, right?
19:32 * masak submits rakudobug
19:32 jnthn right
19:33 * masak wonders if this is a regressing or if it was always thus
19:33 masak regression*
19:34 moritz I'm sure it wasn't like this before we had a container model :-)
19:34 grondilu fatal error:  http://paste.siduction.org/20130705193431
19:35 masak r: my @x = <x x x>; $_ = 'foo' for @x; say @x
19:35 camelia rakudo 29fb2b: OUTPUT«Cannot assign to a readonly variable or a value␤  in block  at /tmp/vbd0908EfA:1␤␤»
19:35 masak n: my @x = <x x x>; $_ = 'foo' for @x; say @x
19:35 camelia niecza v24-86-g39ab531: OUTPUT«foo foo foo␤»
19:35 grondilu is jakudo supposed to work with OpenJDK?
19:35 dalek nqp: b21bd22 | jnthn++ | src/vm/jvm/stage0/ (10 files):
19:35 dalek nqp: Actually add the stage0 jars.
19:35 dalek nqp: review: https://github.com/perl6/nqp/commit/b21bd2230a
19:35 moritz grondilu: yes, with a sufficiently new openjdk 1.7
19:37 dalek nqp: f402e3e | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/ (3 files):
19:37 dalek nqp: Get serialized object ownership model in place.
19:37 dalek nqp:
19:37 dalek nqp: For historical reasons, some things are not handled as direct objects,
19:37 dalek nqp: but rather as special cases in the serializer. This gets support for
19:37 dalek nqp: that handling in place, in hope of using it to resolve some of the
19:37 dalek nqp: remaining serialization/repossession issues.
19:37 dalek nqp: review: https://github.com/perl6/nqp/commit/f402e3e077
19:37 dalek nqp: 022e67c | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
19:37 dalek nqp: Add missing repossession barriers.
19:37 dalek nqp: review: https://github.com/perl6/nqp/commit/022e67c23c
19:37 jnthn That final patch manages to fix some spectest failures.
19:37 timotimo oh yay! :)
19:37 colomon \o/
19:38 * arnsholt rebuilds Rakudo
19:39 timotimo the evalserver works with -e, right?
19:39 * grondilu forgot to git pull in nqp/
19:41 timotimo so, in perl5 $foo{bar} is the same as $foo<bar> is now?
19:41 jnthn r: my $a = 'xxx'; given $a { s/x/y/ }; say $a
19:41 camelia rakudo 29fb2b: OUTPUT«yxx␤»
19:41 jnthn r: my $a = 'xxx'; s/x/y/ given $a; say $a
19:41 camelia rakudo 29fb2b: OUTPUT«Cannot assign to a readonly variable or a value␤  in sub infix:<=> at src/gen/CORE.setting:13980␤  in block  at /tmp/ciBOdihmX7:1␤␤»
19:42 jnthn Same bug
19:42 arnsholt timotimo: IIRC the evalbot stuffs the code in a temporary file and runs that
19:42 * moritz wonders if it's the optimizer
19:42 jnthn nah
19:42 jnthn Trying a patch
19:43 timotimo arnsholt: as long as i can call it via -e, that should be totally fine
19:44 arnsholt Test suite passes \o/
19:44 arnsholt jnthn++ # bugfix
19:44 jnthn jnthn-- # busting it
19:45 timotimo there's no evalserver for nqp-jvm though, right?
19:45 jnthn > my @x = <& a& &b>; s:g/\&/\\\&/ for @x; say @x
19:45 jnthn \& a\& \&b
19:46 dalek rakudo/nom: be89a43 | jnthn++ | src/Perl6/Actions.nqp:
19:46 dalek rakudo/nom: Fix statement mod given/for rw-ness.
19:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/be89a4319a
19:46 jnthn timotimo: It may well be usable for nqp too, dunno how to make it run.
19:46 jnthn masak: ^^
19:49 masak jnthn: \o/
19:50 moritz fwiw nqp-jvm builds again
19:51 nwc10 aha. I'd just found that something was bust, but wasn't sure what. Trying the new mater
19:51 nwc10 er, master
19:52 grondilu ok you can ignore my error message above.  With a fresh nqp it did not occur.
19:52 jnthn whee
19:53 masak nwc10: your mom is the new mater.
20:02 * grondilu is watching compilation of rakudo on JVM and would be amazed if it would actually work.
20:02 grondilu "The following step can take a long time, please be patient."  ==>  :popcorn:
20:03 timotimo amusingly, it's at least 2x faster than on parrot :)
20:04 grondilu java.lang.StackOverflowError in  (src/stage2/gen/NQPHLL.nqp:430)
20:04 jnthn ...what.
20:05 grondilu compilation failed :-
20:05 grondilu :(
20:06 grondilu full error log: http://paste.siduction.org/20130705200614
20:07 jnthn Really? Stack overflow? That doens't even look deep
20:07 grondilu I used -Xms500m -Xmx500m.  Maybe that's too low?
20:08 * grondilu has 1G RAM, 2Go Swap
20:08 jnthn That's heap size
20:08 jnthn -Xss allows tweaking of stack size
20:08 snearch joined #perl6
20:08 grondilu what size should I try then?
20:09 jnthn Try -Xss1m perhaps
20:10 jnthn Are you on 32-bit?
20:10 jnthn Seems that 32-bit machines get a decidedly smaller stack
20:10 masak how do I build my Parrot with ICU, again? it seems I do not have it.
20:10 grondilu yes, 32bit
20:10 masak I'm on Linux Mint.
20:10 grondilu Linux redkey 3.9-8.towo-siduction-686 #1 SMP PREEMPT Fri Jun 28 21:09:01 UTC 2013 i686 GNU/Linux
20:11 jnthn k
20:11 * grondilu tries with -Xss10m (pure random number)
20:11 * timotimo has passed nqp-jvm and rakudo-jvm in benchmarking
20:12 masak ah, `sudo apt-get install libicu-dev`
20:12 masak "Perl 6 is great for Unicode... provide you know which Debian package to install." :P
20:14 * timotimo lied
20:14 timotimo apparently i'm currently at rakudo-jvm.
20:14 grondilu ... still compiling...
20:15 grondilu anothr fatal error:  http://paste.siduction.org/20130705201539
20:16 masak HALP I can't build Rakudo on Parrot! :(
20:16 sjohnson joined #perl6
20:16 masak hold on, pasting gist...
20:17 masak https://gist.github.com/masak/5936970
20:17 masak jnthn: ^
20:17 timotimo grondilu: all you need to do to fix that is try again (i had the same problem and i have no idea why that helped, but it did)
20:18 masak during compilation of CORE, "Method 'defined' not found for invocant of class 'Parameter''
20:18 jnthn wtf
20:18 masak nuking everything and trying again.
20:19 * grondilu tries again
20:19 TimToady lizmat: I'm reconsidering putting Nil outside of Any; it doesn't seem to work out very well in practice, from what I've seen in niecza
20:20 jnthn masak: Does reverting the last patch help at all?
20:20 masak jnthn: I'll check after I rebuild with a completely fresh one.
20:21 jnthn k
20:21 masak TimToady: oh -- last I heard, it was working well...?
20:22 masak TimToady: (last I heard you report about it, that is). what changed?
20:22 jnthn masak: Doing a Rakudo on Parrot build here too; want to refactor something...
20:23 jnthn Think I can save us a little boilerplate per block and make my life easier on JVM to boot...
20:23 masak jnthn: cloning Parrot right now...
20:24 masak jnthn: Parrot has lots of history... :P
20:24 jnthn :P
20:24 TimToady masak: it just makes it too fatal to mention Nil in too many places
20:24 masak ah.
20:25 * masak .oO( I could mention it to you, but I'd have to Nil you )
20:26 TimToady it would be more appropriate to put Failure outside of Any, since we do want that to throw on any unanticipated use, but Nil ought to be a bit more failure tolerant
20:26 jnthn masak: reproduced. wtf.
20:27 TimToady something like 42 + Nil would not be failsoft; it dies before it gets a chance to issue a warning and return 0
20:28 masak jnthn: ok, then maybe I should revert to HEAD^ without trying to reproduce it here?
20:28 jnthn masak: Trying a fix
20:28 moritz so, in general, when you should Failure be returned, and when should an exception be thrown?
20:34 masak jnthn: re-reproduced.
20:35 masak with a nuked, re-cloned build.
20:35 jnthn wtf...
20:35 jnthn Yeah, found it
20:36 jnthn copy-pasto from year or two ago, looks like...
20:37 labster rn: my $r = rx/foo/; if $r { say 'hi' };
20:37 camelia rakudo 29fb2b: OUTPUT«No such method 'match' for invocant of type 'Any'␤  in method Bool at src/gen/CORE.setting:10873␤  in method Bool at src/gen/CORE.setting:732␤  in block  at /tmp/GRMz10PCa0:1␤␤»
20:37 camelia ..niecza v24-86-g39ab531: OUTPUT«Use of uninitialized value in string context␤  at /home/p6eval/niecza/lib/CORE.setting line 1384 (warn @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 269 (Mu.Str @ 15) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.settin…
20:37 labster DIHWIDT error?
20:38 masak labster: you're matching a regex against an uninitialized $_
20:39 timotimo gosh those benchmarks take so long ... :(
20:39 timotimo but i admire the architecture behind perl6-bench. it seems pretty well designed
20:40 labster masak: I thought something like that was the case
20:40 dalek rakudo/nom: 58f56f4 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
20:40 dalek rakudo/nom: Fix long standing copy-pasto.
20:40 dalek rakudo/nom:
20:40 dalek rakudo/nom: Exposed by what should have been a benign fix to for/given statement
20:40 dalek rakudo/nom: modifiers.
20:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/58f56f45e1
20:41 labster I'm working on updating S32::Rules because of the amount of plain wrong information in it.
20:41 masak labster++
20:42 moritz wtf is S32::Rules?
20:42 moritz oh, Match and Cursor and things
20:43 masak "who wrote all this stuff?" :P
20:43 * ingy *waves* o/
20:43 masak ingy-san! \o/
20:43 * moritz idly wonders how a document with just one version can have two authors
20:43 ingy moritz: siamese twins?
20:44 masak moritz: it's Perl 6! we make the impossible seem merely a slight detour. :P
20:44 moritz :-)
20:45 masak jnthn: yes, master^^ built fine.
20:45 * grondilu notices that rakudo-JVM compilation takes its sweet time on the "optimize" stage.
20:45 masak checking out latest and rebuilding one last time :)
20:46 timotimo 28/42: Testing for_array_set ...     *yawn*
20:49 berekuk joined #perl6
20:55 grondilu ... 35 minutes of compilation so far
20:55 timotimo wow, what?
20:55 timotimo the core.setting stage?
20:55 jnthn um.
20:55 grondilu yeah
20:55 timotimo no, that can't be right
20:55 timotimo it must be infinilooping or swapdeathing or something
20:56 grondilu how could I know?
20:58 grondilu I'm stuck at:  Stage optimize   :  61.753
20:58 timotimo that's before it creates the JAST
20:58 jnthn that takes ~3s for me...
20:58 jnthn How long did parse take?
20:58 grondilu a few minutes IIRC
20:59 timotimo holy crap, wow
20:59 timotimo are you on an embedded processor or something?
20:59 grondilu "embedded"?
21:00 grondilu I'm using a netbook, Atom based processor if that's what you mean.
21:01 colomon jnthn: interesting results on the smoke test.  6 additional modules passing, which I think brings us to our highest post-YAPC::NA level.  But there are 5 modules that were allegedly making it to the test stage (and failing there) yesterday, which are now crapping out in the build stage.
21:01 timotimo oh, that might be the cause. but that's still an amazing slowdown
21:02 jnthn colomon: Interesting...
21:02 colomon jnthn: might actually be a panda bug causing that, I seem to recall there's still some weirdness in its error handling
21:03 colomon (Like maybe it actually was the prerequisites failing, but getting incorrectly reported as tests failing.)
21:03 grondilu it's way faster on parrot anyway
21:19 timotimo hm, i set the benchmark processes to -20 nice and ionice -c 2 -n 0, i wonder if i can start a backup at the same time and not interfere wildly with the timings?
21:19 timotimo i suppose i can wait a bit longer.
21:23 sunnavy joined #perl6
21:28 timotimo does it seem sensible to introduce an optimization for any(Range)/all(Range) for autothreading?
21:29 jnthn When is that used?@
21:29 * jnthn woulda thought $foo ~~ 1..100 woulda been the idiomatic way rather than $foo ~~ any(1..100)
21:30 masak people are likely to do both, methinks.
21:30 timotimo mhm
21:31 timotimo well, for one there's this ridiculous microbenchmark in perl6-bench that basically does 1 == any(1..SCALE) ;)
21:32 timotimo rakudo is almost done benchmarking, after that only perl5 remains
21:32 timotimo (also, i cannot build niecza, because it looks for some .dll file in /blah/mono/2.0/... but i only have /blah/mono/4.0/...
21:34 dalek rakudo/nom: 11b5dae | jnthn++ | src/ (5 files):
21:34 dalek rakudo/nom: Eliminate call_sig lexical.
21:34 dalek rakudo/nom:
21:34 dalek rakudo/nom: Wasteful to do this for every block, and would be doubly wasteful on
21:34 dalek rakudo/nom: JVM to do it right.
21:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/11b5dae166
21:36 timotimo does that make performance go wiiiiiild? :)
21:36 jnthn doubt it :)
21:36 timotimo aaw
21:36 jnthn But it's a saving
21:36 timotimo i estimate 10 minutes until i can supply the benchmarks i have been running forever now ;)
21:37 timotimo after that i'll make a backup so that i can install the new linux mint oooh yeah! blimps and trains on my login screen <3
21:44 timotimo the 10 minute estimate was too optimistic it seems
21:49 benabik joined #perl6
21:54 * timotimo renders the plots
21:56 timotimo http://t.h8.lv/p6bench/2013-07-05.html - here we go
21:58 timotimo it seems like i didn't do the trim_string thing right
22:00 timotimo my $s = " " x SCALE . "x" x SCALE . " " x SCALE; my ($result) = /^\s*(.*?)\s*$/s for 1 .. SCALE - is apparently not correctly extracting the middle part or something like that.
22:02 TimToady oh, you're not $s =~
22:02 timotimo ah, that must be it.
22:02 TimToady you're always testing empty $_
22:02 timotimo m(
22:02 timotimo that would change things a lot, yeah
22:02 timotimo does that mutate $s?
22:03 TimToady no, it's just a match, but you still have to match the correct thing
22:03 TimToady if you mutated it, you'd have to recreate the string each time
22:03 timotimo so will my ($result) = $s =~ /.../ DTRT?
22:03 TimToady looks right
22:04 timotimo good, i'll re-run and see if this merge tool works the way i think it does
22:10 konundra joined #perl6
22:12 timotimo .o(there is not actually a merge tool)
22:13 timotimo http://t.h8.lv/p6bench/2013-​07-05_trim_string_only.html - now that looks much more realistic!
22:13 timotimo about 100x slower than perl5 (for rakudo-jvm)
22:13 timotimo (about 500x slower with long strings on parrot)
22:16 * [Coke] hacks on a crappy version of shell for the jvm.
22:17 timotimo you mean repl?
22:17 timotimo oh!
22:17 timotimo actually shell!
22:17 timotimo cool beans :)
22:19 * jnthn investigates some of the timotimo++ results
22:20 BenGoldberg joined #perl6
22:20 labster r: say Grammar.^methods
22:20 camelia rakudo 11b5da: OUTPUT«No such method 'gist' for invocant of type 'NQPRoutine'␤  in method gist at src/gen/CORE.setting:5619␤  in method gist at src/gen/CORE.setting:913␤  in sub say at src/gen/CORE.setting:11386␤  in block  at /tmp/mbJb8A6rlS:1␤␤»
22:22 [Coke] > nqp::shell("touch foo"); # hey, foo now exists.
22:24 [Coke] at some point, we need to squish all the stuff in rakudo that says "if parrot" into NQP, I think.
22:25 [Coke] ... I am probably not going to be abe to finish testing this before I have to vanish. :|
22:26 timotimo feel free to push it to a WIP branch and let others poke around? :)
22:34 masak 'night, #perl6
22:42 berekuk joined #perl6
22:45 thundergnat left #perl6
22:54 TimToady so we've got immutable strings, but does that mean substr can return something pointing to the middle of another string?
22:55 timotimo it can mean that, i think
22:57 jnthn Think the JVM does it that way.
23:00 TimToady must keep a pointer to the front for GC I suppose
23:00 timotimo for sure
23:00 jnthn *nod*
23:05 Pleiades` joined #perl6
23:06 dalek specs: eddc65f | (Brent Laabs)++ | S32-setting-library/Rules.pod:
23:06 dalek specs: try to make S32::Roles useful by taking info from S05
23:06 dalek specs: review: https://github.com/perl6/specs/commit/eddc65f2de
23:15 Radvendii joined #perl6
23:18 colomon joined #perl6
23:19 Radvendii how do I force lazy evaluation again?
23:21 Radvendii never mind
23:26 Radvendii joined #perl6
23:40 TimToady forcing lazy evaluation, what a concept...
23:40 TimToady maybe needs ACME::Don't  :)
23:41 lue .oO( my @a = waitaminute eager 1..* ; )
23:41 jnthn benchmarks++ profiler++
23:54 benabik joined #perl6

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

Perl 6 | Reference Documentation | Rakudo