»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:02 berekuk left 00:04 berekuk joined
sorear o/ colomon 00:05
colomon \o sorear
00:22 berekuk left 00:27 konundra left 00:33 berekuk joined 00:36 berekuk left 00:41 gudahtt left 00:53 Vlavv_ left 00:58 hypolin joined 01:06 Vlavv_ joined 01:22 raiph left 01:32 bakedb_ joined 01:33 dagurval joined, pecastro_ joined 01:34 raiph joined, sivoais_ joined, sergot_ joined 01:38 bakedb left, sivoais left, pecastro left, yves left, xilo_ left, woosley left, yoleaux left, _ilbot left, dagurval_ left, sergot left, silug_ left, DarthGandalf left 01:42 daniel-s_ left 01:45 yves joined 01:46 woosley joined, silug_ joined 01:47 [particle]1 joined 01:48 szbalint_ joined, PerlPilot joined, Tene_ joined 01:49 [particle] left, Tene left, Celelibi left, szbalint left, PerlJam left, masak left, masak joined, _ilbot joined 01:50 geekosaur left 01:51 chayin_ joined 01:52 geekosaur joined, Celelibi joined, preflex_ joined 01:53 arnsholt_ joined, shachaf_ joined 01:54 apejens_ joined, Hor|zon_ joined, shachaf_ left 01:55 Woodi_ joined 01:58 crazed- joined 01:59 colomon_ joined, woosley left, preflex left, ponbiki_ left, Hor|zon left, camelia left, crazedpsyc left, timotimo left, arnsholt left, Woodi left, chayin left, shachaf left, kst left, apejens left, kst joined 02:00 mathw_ joined, apejens_ is now known as apejens, obra_ joined, p5eval_ joined, __rnddim__ joined 02:01 [particle] joined, markov1 joined, timotimo joined, cosimo_ joined, ponbiki joined 02:02 shachaf joined 02:05 [particle]1 left, PZt left, colomon left, markov left, lue left, mathw left, obra left, felher left, p5eval left, cosimo left, cooper left, colomon_ is now known as colomon 02:06 cooper joined 02:07 ssutch left 02:08 camelia joined, woosley joined 02:11 crazed- is now known as crazedpsyc
dalek ecs: 45caa2b | larry++ | S06-routines.pod:
Allow 'is parcel' on subs that are only sorta rw
02:11
02:12 preflex joined, preflex_ left
TimToady pop and shift should now be marked 'is parcel' rather than 'is rw' 02:12
02:13 felher joined, BenGoldberg joined
TimToady and presumably 'is rw' should enforce lvalueness, not just allow it 02:14
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:15
for most things such as grep, the parcel version is likely to be least overhead 02:16
but substr-rw has to do a lot of extra work
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?
TimToady well, it probably means take-parcel really 02:18
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
TimToady decont is still probably the right default
sorear e.g. gather { my $i = 0; take $i until $i++ == 10 }
returned a bunch of references to the same container. which confused people. 02:20
TimToady maybe gather-rw or gather-parcel
"parcel" is kinda long, for something that basically means "raw"
or "ref"
I dunno whether gather has a good way to tell the take what its policy should be, though... 02:21
or whether people will want to intermix different kinds of take
'is parcel' used to be 'is ref', and maybe take-ref is more readable on the returning end of things 02:24
though 'ref' implies a ref when there perhaps isn't one, in a P5-Think way 02:25
02:26 __rnddim__ is now known as lue 02:28 DarthGandalf joined, yoleaux joined, verne.freenode.net sets mode: +v yoleaux, _daniel-s__ joined 02:30 Maddingue left, nyuszika7h left 02:31 nyuszika7h joined, daniel-s__ left 02:35 Maddingue joined 02:41 SamuraiJack joined 02:45 DarthGandalf left, yoleaux left 02:57 fridim_ joined 03:00 konundra joined
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:01
diakopter danaj++ 03:12
03:20 obra_ is now known as obra, preflex left
BenGoldberg I think there ought to be a few separate primality methods for ints... 03:21
03:22 preflex joined
BenGoldberg .is-definitely-prime(), .is-probably-prime($min_probability, $rand_object), .odds-of-being-prime($rand_object) 03:22
.odds-of-being-composite($rand_object) 03:23
03:25 _daniel-s__ is now known as daniel-s
bonsaikitten BenGoldberg: you don't trust the usual probabilistic tests? ;) 03:25
BenGoldberg I've nothing against probablistic tests... 03:26
As long as they're labeled as such
And as long as I can supply my own random numbers to them
danaj odds are difficult when talking about things like BPSW. 33 years, no counterexamples, but the best worst-case probabilities are way too high.
BenGoldberg And as long a I know the odds of a false positive or a false negative
sorear um, that's not how probabilistic tests work. 03:27
benabik Odd of false negative are zero for all the methods I know.
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.
sorear BenGoldberg: please do not inflict anything named offs-of-being-prime on the spec
BenGoldberg :)
sorear please take some time to learn about the difference between a posterior probability and a likelihood 03:29
benabik danaj: How about AKS? It's only polynomial time. ;-) 03:30
03:30 xilo_ joined
danaj benabik: :) 03:31
bonsaikitten isn't that something that should be in an external library?
bonsaikitten wonders if NFS for factor() would be acceptable ;)
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:33
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.
BenGoldberg How about this for the api? $primality_posterior_probability = $someint.prime-test($rand_source, $prior_probability, $desired_probability_improvement) 03:36
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:38
danaj There are a lot that don't have primality proofs. 03:39
But if we're talking CPAN6, then it's easy enough to add. There's already some in CPAN. 03:40
dalek ast: 7ac5b79 | (Brent Laabs)++ | S32-list/first.t:
test RT #118141 first returns Nil when no values match
03:42
BenGoldberg goodnight folks 03:45
diakopter o/
03:49 ChanServ joined, DarthGandalf joined, verne.freenode.net sets mode: +o ChanServ 03:50 BenGoldberg left
diakopter rn: say (2**2203-1).is-prime 03:59
camelia niecza v24-86-g39ab531: OUTPUT«(timeout)»
..rakudo 677e0e: OUTPUT«True␤»
diakopter rn: say (2**1279-1).is-prime
camelia rakudo 677e0e, niecza v24-86-g39ab531: OUTPUT«True␤» 04:00
04:00 DarthGandalf left, ChanServ left 04:12 xilo_ left 04:23 DarthGandalf joined, ChanServ joined, verne.freenode.net sets mode: +o ChanServ 04:25 ChanServ left 04:27 ponbiki is now known as Guest79703, crazedpsyc is now known as Guest106, felher is now known as Guest37376, cooper left, cooper joined 04:29 yoleaux joined, ChanServ sets mode: +v yoleaux, cognominal left 04:30 cognominal joined 04:33 berekuk joined 04:34 berekuk left 04:41 cognominal left 04:42 cognominal joined 04:48 birdwindupbird joined 04:54 benabik left 04:57 Tene_ left, Tene_ joined, Tene_ is now known as Tene 05:05 sivoais_ left, sivoais joined 05:27 mstefanko left 05:29 mstefanko joined 05:34 skids joined 05:37 dayangkun joined 05:55 raiph left 05:58 PacoAir joined 06:03 Chillance left 06:18 preflex left 06:27 FROGGS joined 06:31 kaleem joined 06:37 PacoAir left 06:53 life joined, life left 07:00 domidumont joined 07:05 daxim joined 07:17 arnsholt_ is now known as arnsholt 07:25 domidumont left 07:27 domidumont joined
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:33
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␤␤»
moritz I guess the file doesn't exist :-)
jercos Erm. Well maybe I'm closer than I thought. Doing that on an existing socket on my machine gives:
getaddrinfo failed: /tmp/artemis.sock: Undefined error: 0
Since I have a /tmp/artemis.sock that I'm using with another project.
moritz ok, "undefined error" isn't too helpful :/ 07:36
jercos yeah :(
hrm, I wonder...
r: my $PIO := Q:PIR { %r = root_new ['parrot';'Socket'] };$PIO.socket(1, 1, 0);my $addr = $PIO.sockaddr("/dev/log", 0, 1);
camelia rakudo 677e0e: OUTPUT«getaddrinfo failed: /dev/log: No such file or directory␤ in block at /tmp/ck_nxYQsWr:1␤␤»
jercos Ah well.
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:37
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:39
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:44
Namely, ah, sockaddr is actually implemented *using* getaddrinfo, so I don't even know how I'd replace that. 07:45
erm, at least, Socket.sockaddr is.
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 07:48
sorear sleep& 08:02
lizmat gnight sorear! 08:03
TimToady: "567 +be returned raw, with attempting any decontainerization. This can be useful for", shouldn't that be s/with/without/ ?
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 :-)
jercos Well I do love a good adventure... 08:08
moritz \o/ 08:12
08:18 broquain1 is now known as broquaint
FROGGS moritz: does it make sense to reimplement the networking stuff in nqp/vm/parrot/... and drop the Q::PIRs ? 08:19
08:20 daxim_ joined, masak_ joined
moritz FROGGS: I don't know. TBH I'm not very familiar with the multi-vm stuff yet 08:20
08:21 eviltwin_b joined, Grrrr joined
FROGGS me neither... I mean, MoarVM will ship network stuff at some point and I dont think it be moved to nqp ever 08:22
but we need better network/io support on parrot
08:23 lizmat_ joined 08:24 genehack_ joined
moritz we need better network/io everywhere :-) 08:24
jercos 'twould be nice. 08:25
At very least anyway, there shouldn't be a loss in networking functionality between perl5 and perl6 :p
08:25 Hor|zon joined
moritz (and I want ipv6 in core) 08:25
08:28 daxim left, Hor|zon_ left, geekosaur left, _ilbot left, masak left, Gruber left, genehack left, lizmat left, eviltwin_b is now known as geekosaur, daxim_ is now known as daxim, Rix left 08:29 _ilbot joined 08:33 dmol joined 08:34 Stygia joined
jercos Wow this is slow. 08:39
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
dalek kudo/nom: d990eee | (Elizabeth Mattijsen)++ | src/core/Any.pm:
Make sure grep() and first() use the same check
08:46
08:50 berekuk joined 08:54 dayangkun left 08:58 xinming joined 09:00 dayangkun joined, dayangkun left
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:01
09:01 xinming_ left 09:03 berekuk left
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
yeah, cool. 09:04
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:05
lizmat_ indeed, anything PIR not wrapped in nqp:: smells 09:07
FROGGS right, in an ideal world rakudo should just know about nqp at all 09:08
09:12 berekuk joined, nyuszika7h left 09:13 nyuszika7h joined 09:14 mattp__ left 09:15 mattp__ joined 09:19 Stygia left 09:24 Stygia joined
dalek kudo/nom: cd92765 | (Elizabeth Mattijsen)++ | src/core/Hash.pm:
Add (Typed)Hash method "keyof"

Not sure where to spec this, and whether the name is ok
09:33
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:34
09:34 masak_ is now known as masak
moritz :( 09:35
masak good antenoon, #perl6
moritz good an, masak
lizmat_ masak! 09:36
09:36 lizmat_ is now known as lizmat
masak and what a lovely an it is! 09:41
09:41 daniel-s left
lizmat
.oO( sounds like a disease, anitis )
09:43
jnthn o/ 09:45
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
jnthn Sounds like an painful codition... 09:49
*condition...
.oO( fishy spelling before coffee... )
masak of all the people, I thought you'd manage to avoid fishy spelling.
jnthn tries to avoid all things fishy :) 09:50
lizmat good thing, things are only fishy in the state of Denmark 09:51
although that *is* geographically very close to jnthn and masak :-)
jnthn oh noes, I has to pass through the whole Denmark next week :)
masak jnthn: did you at least book a no-fish compartment? 09:52
moritz luckily it's not that big :-)
masak jnthn: if you did, you should be safe.
jnthn masak: Not sure, but I'm guessing it'll at least be cold on board, given it's an ICE train...
09:53 dmol left
masak ok, so the worst that can befall you is frozen fish. 09:53
09:53 dmol joined
masak .oO( people attacking you with frozen fish just for the halibut ) 09:53
09:53 Guest1337 joined
masak hello, o leet guest. 09:54
lizmat sanity check: a unconstrained key hash is supposed have Str(Any) as keys, right? 09:57
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 :)
Any is correct in so far as it's what we can shove in
Str is correct in so far as it's what we get out
moritz (solution: implement coercion types :-) 10:01
JimmyZ maybe .typeof('key'), .typeof('value') is something better?
lizmat I may get to that :-)
jnthn They're kinda evil to implement... 10:02
lizmat is feeling pretty agitated :-)
moritz jnthn: do you have an idea how to approach them? 10:03
lizmat maybe do shaped arrays first
10:03 dmol left
moritz (not that I'd do that; just curious) 10:03
lizmat :-)
10:03 hypolin left
moritz is Str(Any) be supposed to be a type object which conforms to Str, but also .ACCEPTS Any, somehow? 10:05
and in MMD narrowness analysis behaves like Any?
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
And in some cases, we need to work out which we mean :)
$x ~~ Str(Any) # do we expect $x to be mutated? 10:08
moritz I kinda hope not 10:09
I think it's best to have the coercion explicit
jnthn Well, but there's some places we want it implicit. :)
moritz and only the dispatcher (or binder) invoke it implicit for you
jnthn my Str(Any) $x; # any assignment to $x should do it
moritz and, uhm, assignment to such a variable
ok, rephrase
I'd like the coercion to be available explicitly 10:10
and only have it performed implicitly when absolutely required
10:18 census joined 10:20 mstefanko left 10:22 mstefanko joined 10:23 woosley left
lizmat moritz: my %h; %h{Something.new}=1 would be an example of implicit coercion? 10:25
10:26 rindolf joined
jnthn lizmat: I expect that happens because method at_key(Str(Any) $key) {...} 10:28
lizmat aha, yes 10:31
10:41 Rix joined
lizmat jnthn: thinking more about Nil and Mu 10:44
if Nil is outside of any, wouldn't ->type_check automatically fire if Nil is being assigned to anything other than a Mu? 10:45
dalek ast: 7b7bab4 | (Elizabeth Mattijsen)++ | S09-typed-arrays/hashes.t:
Add tests for typed hashes with key constraints
10:46
lizmat jnthn: from this would follow that only a Mu typed container would be able to contain Nil
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␤»
lizmat r: my Any $a=1; say $a; $a=Nil; say $a # should say Any, as that is the default
camelia rakudo cd9276: OUTPUT«1␤Nil␤»
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
the receiving container should be typed Mu
r: my $f= (1.2.3.4.5).first( { $_ > 5 }); say $f 10:50
camelia rakudo cd9276: OUTPUT«===SORRY!===␤Confused␤at /tmp/iLblUfk0Jl:1␤------> my $f= (1.2.⏏3.4.5).first( { $_ > 5 }); say $f␤ expecting any of:␤ postfix␤ dotty method or postfix␤»
lizmat r: my $f= (1..5).first( { $_ > 5 }); say $f
camelia rakudo cd9276: OUTPUT«Nil␤»
lizmat that should be any then 10:51
r: my Mu $f= (1..5).first( { $_ > 5 }); say $f # correct
camelia rakudo cd9276: OUTPUT«Nil␤»
lizmat r: my Int $f= (1..5).first( { $_ > 5 }); say $f # should say (Int)
camelia rakudo cd9276: OUTPUT«(Int)␤»
lizmat (which it clearly already does, because the ->type_check triggers 10:52
11:01 zacts joined 11:02 dmol joined 11:03 zacts left 11:12 Stygia left, fridim_ left
lizmat cycling& 11:18
FROGGS EIAMAPRAT, obviously this is not what I intended to do: $a +& 0x11111 11:24
masak hee hee 11:25
your binary looks a bit too hexadecimal... :)
FROGGS yeah
10 minutes headaches :/ 11:26
FROGGS .oO( If you know you are a jerk clap your hands... *clap clap* ) 11:27
diakopter CLAP CLAP CLAP CLAP CLAP 11:28
FROGGS hehe 11:29
masak as long as your delta-jerkness is negative... 11:30
diakopter well, I think my delta-delta-delta-delta-jerkness is negative 11:31
masak so eventually you'll be fine ;) 11:32
FROGGS ohh, and doing binary things right allows pack-ing to unicode \o/ 11:33
11:39 SamuraiJack left
FROGGS $ ./p5 'use bytes; say sprintf "%#b %#b", unpack "C2", pack "U", 300' 11:40
Perl5: 0b11000100 0b10101100␤
v5: 0b11000100 0b10101100␤
11:40 army joined
FROGGS (a little cheaty because v5 doesnt handle "use bytes" and "no bytes" yet) 11:40
11:42 mstefanko left, yoleaux left, DarthGandalf left 11:46 SamuraiJack joined
JimmyZ FROGGS++ 11:54
FROGGS thanks 11:55
JimmyZ :P 11:56
11:58 kingbeast joined, kingbeast left, kingbeast joined 12:00 kingbeast left, kingbeast joined 12:11 rindolf left 12:18 SamuraiJack left 12:20 SamuraiJack joined 12:46 kaleem left, Guest37376 left, camelia left, colomon left, arnsholt left, chayin_ left, pecastro_ left, Vlavv_ left, sftp left, TimToady left, BooK_ left, amkrankruleuen left, prammer left, FOAD left, sorear left, huf left, danaj left 12:52 BinGOs left, logie left, clkao left, stevan_ left, dalek left, groky left, wtw_ left, pnu left, Gothmog_ left, sjn left, __sri left, ingy left, tadzik left, felipe left, nwc10 left, rhr left, patspam left, kshannon left, breinbaas left, jtpalmer left, charsbar_______2 left, tomaw left 12:53 dmol left, berekuk left, moritz left, telex left, sunnavy_ left, pjcj left, pochi left, xilo left, scottp_ left, araujo left, woolfy left, robinsmidsrod left, takesako______ left, nebuchadnezzar left, konundra left 12:54 bruges_ left, bruges joined 12:56 charsbar_______2 joined, jtpalmer joined, breinbaas joined, kshannon joined, patspam joined, rhr joined, nwc10 joined, felipe joined, tadzik joined, BinGOs joined, logie joined, clkao joined, stevan_ joined, dalek joined, groky joined, wtw_ joined, pnu joined, Gothmog_ joined, sjn joined, __sri joined, ingy joined, verne.freenode.net sets mode: +v dalek, kaleem joined, Guest37376 joined, camelia joined, colomon joined, arnsholt joined, chayin_ joined, pecastro_ joined, Vlavv_ joined, sftp joined, TimToady joined, BooK_ joined, amkrankruleuen joined, prammer joined, FOAD joined, sorear joined, huf joined, danaj joined, dmol joined, berekuk joined, moritz joined, telex joined, sunnavy_ joined, pjcj joined, pochi joined, xilo joined, scottp_ joined, araujo joined, woolfy joined, robinsmidsrod joined, takesako______ joined, nebuchadnezzar joined 12:59 tomaw joined 13:02 konundra joined 13:07 ajr joined 13:09 gtodd joined, gtodd left 13:11 bonsaikitten is now known as Guest5775, araujo is now known as Guest89658, felipe is now known as Guest82751, Khisanth is now known as Guest45844, autumn is now known as Guest77334, ajr is now known as Guest56532 13:12 DarthGandalf joined 13:14 nyuszika7h left, _ilbot left, genehack_ left, Grrrr left, cognominal left, kst left, estrabd_ left, integral_ left, drbean left, lee_ left 13:15 nyuszika7h joined, _ilbot joined, genehack_ joined, Grrrr joined, cognominal joined, kst joined, estrabd_ joined, integral_ joined, drbean joined, lee_ joined, nyuszika7h left 13:17 nyuszika7h joined 13:18 army left, xinming left, Hor|zon left, lizmat left, SamuraiJack left, kingbeast left, Rix left, domidumont left, FROGGS left, Maddingue left, Guest79703 left, cosimo_ left, timotimo left, silug_ left, Guest106 left, apejens left, szbalint_ left, awwaiid_ left, broquaint left, SHODAN left, sitaktif left, simcop2387 left, perigrin left, JimmyZ left, odoacre left, [Coke] left, avuserow left, Util_ left, sciurius left, mst left, djanatyn left, betterworld left, imarcusthis- left, ugexe left, snarkyboojum left, Ulti left, Nom- left, masak left, [particle] left, obra left, p5eval_ left, dagurval left, amoe_ left, bloonix left, segomos left, mls left, eiro left, census left, snoopy left, cibs left, daxim left, Celelibi left, smash left, Juerd left, Timbus left, Pleiades` left, jlaire left, frdmn left, labster left, mikemol left, rafl left, eternaleye left, zakalwe left, Lorn left, rs0_ left, rjbs left, hoelzro left, ivan``_ left, dylanwh left, atrodo left, rom1504 left, hugme left, gfldex left, anocelot left, Yappo_________ left, revdiablo left, flussence left 13:19 kaare_ joined, army joined, xinming joined, Hor|zon joined, lizmat joined, masak joined, [particle] joined, p5eval_ joined, obra joined, dagurval joined, amoe_ joined, bloonix joined, segomos joined, mls joined, eiro joined, daxim joined, Celelibi joined, smash joined, Juerd joined, Timbus joined, Pleiades` joined, jlaire joined, frdmn joined, labster joined, mikemol joined, rafl joined, eternaleye joined, rs0_ joined, zakalwe joined, Lorn joined, rjbs joined, hoelzro joined, ivan``_ joined, dylanwh joined, atrodo joined, rom1504 joined, hugme joined, gfldex joined, anocelot joined, Yappo_________ joined, revdiablo joined, flussence joined, xilo_ joined 13:20 SamuraiJack joined, kingbeast joined, Rix joined, domidumont joined, FROGGS joined, Maddingue joined, Guest79703 joined, cosimo_ joined, timotimo joined, silug_ joined, Util_ joined, sciurius joined, mst joined, djanatyn joined, betterworld joined, imarcusthis- joined, ugexe joined, snarkyboojum joined, Ulti joined, Nom- joined 13:21 census joined, snoopy joined, Rix left, Stygia joined
colomon rn: say 2 ** 68 13:22
camelia rakudo cd9276, niecza v24-86-g39ab531: OUTPUT«295147905179352825856␤»
13:22 cibs joined, nyuszika7h left 13:23 nyuszika7h joined 13:25 konundra left 13:26 konundra joined 13:27 yoleaux joined, Guest106 joined, apejens joined, szbalint_ joined, awwaiid_ joined, broquaint joined, SHODAN joined, sitaktif joined, simcop2387 joined, JimmyZ joined, perigrin joined, odoacre joined, [Coke] joined, avuserow joined
colomon Can someone with more NQP experience take a peek at github.com/colomon/sprintf/commit/...0603b91dde and see if it makes any sense? 13:29
13:34 Rix joined, raiph joined
moritz looks good at first glance 13:34
colomon the sprintf tests I added using them all fail, which makes it hard to tell if they are correct or not. 13:36
JimmyZ wonders who users Clojure here 13:37
*uses
13:38 Guest5775 left 13:39 telex left
masak JimmyZ: I would like to start using Clojure. lots of things about it seem very interesting. 13:39
not least of them Rich Hickey himself and all his ideas :) 13:40
13:40 telex joined 13:41 bonsaikitten joined
diakopter wonders if the name is a pun on closure or cloture ;) 13:41
13:42 berekuk left, woosley joined
colomon diakopter: I believe it is supposed to be pronounced closure 13:42
so, probably yes. :)
13:43 Guest106 is now known as crazedpsyc
masak it is. 13:43
the 'j' is because JVM.
diakopter right, but cloture sounds very very close to closure
colomon moritz: hmmm, "say" doesn't work on those two alleged bigints of mine. :\
JimmyZ masak: yep, It looks like more interesting than java(to me) 13:44
masak that isn't saying much, though :P
colomon JimmyZ: what doesn't look more interesting than java?
JimmyZ colomon: lispish with map-reduce, methinks
masak not just map-reduce. persistent data structures. excellent concurrency support. actors, I think. 13:45
JimmyZ and lightweight
masak in many ways, it's what Arc never became.
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.
diakopter are you confusing clojure with scala?
masak JimmyZ: like "how can a language not look more interesting that Java?"
diakopter: no.
diakopter: Scala is interesting, too, though. 13:47
colomon FROGGS: with parrot nqp? I've been testing with jvm nqp
FROGGS ohh
colomon: yes, with parrot nqp
13:47 census left
colomon FROGGS: interesting 13:47
FROGGS colomon: okay, using nqp-jvm it fails the tests you added 13:48
JimmyZ masak, colomon: I think because github.com/nathanmarz/storm use clojure, which is useful to me :P 13:49
FROGGS looks like 2 ** 68 results in 0
colomon FROGGS: yes
I'm studying 60-bigint.t, but I don't understand it at all, alas. :( 13:50
13:50 berekuk joined
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:50
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. :)
JimmyZ masak: no, I'm not replay your question ;D
masak s/coming across/getting across/
JimmyZ *reply 13:52
masak ok, that makes it less of a misunderstanding, then ;)
JimmyZ I just explains storm is the sake, for me :P 13:53
masak nodnod 13:54
"the end that justifies the means" :) 13:55
JimmyZ really want storm will be implemented by Perl6 someday :P 13:56
13:59 Guest82751 is now known as felipe 14:00 cognominal left, cognominal joined
timotimo .o("the end that justifies the memes") 14:02
colomon update to nqp big int: say(nqp::tostr_I($two-to-the-sixty-eight)); does indeed print 295147905179352825856 14:03
so I think the big int stuff is right, and the bugs are in sprintf / say ? 14:04
"bugs" possibly
FROGGS colomon: btw, you are missing $s at line 352/353 14:06
14:06 tomaw is now known as 5EXAA21C0
colomon FROGGS++ 14:07
14:07 5EXAA21C0 is now known as tomaw 14:09 lama joined 14:10 FROGGS left
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:11
jnthn colomon: There's an op for doing bigint => string 14:12
colomon tostr_I, right?
jnthn yeah, pretty sure that's it
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:14
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:15
14:17 PacoAir joined 14:19 lama left
moritz do you pass it in for a %d placeholder? 14:19
colomon yes 14:20
and %u
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
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
14:21 cognominal__ joined
moritz colomon: thing is, nqp handles bigint-ness at the REPR level, not at the type level 14:22
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
colomon moritz: \w+_I ? 14:23
14:24 raiph left, Stygia left 14:25 sergot joined, Woodi joined, cognominal left, Woodi_ left, sergot_ left, cooper left, lestrrat left 14:26 PerlJam joined, PerlPilot left
colomon oh 14:27
!
so if I pass it to, say add_I, it's good.
14:27 salv0 left 14:28 sivoais_ joined 14:29 Guest89658 left, cooper joined 14:30 araujo joined, araujo left, araujo joined, cooper left, cooper joined, sivoais left
colomon can't tell if I'm netsplit or not. 14:32
14:32 benabik joined 14:33 rindolf joined
moritz colomon: looks right, yes 14:33
colomon groovy! next, to make them actually work.... 14:34
14:34 Pompel_ joined
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
14:35 salv0 joined 14:36 sivoais_ left, frettled left, lestrrat joined, sivoais joined
jnthn I think that may match in a few places :P 14:37
colomon is there an nqp::is_int, or something like that? 14:40
moritz there's an nqp::isstr 14:41
colomon and isint 14:42
moritz \o/
colomon moritz++
what's the difference between _i and _I ? 14:45
14:45 kaleem left
moritz _I is bigint 14:45
_i is nativ int
colomon moritz++ 14:47
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:51
it seems like all the nqp _I ops take a type parameter... 14:54
moritz yes
because bigintness is only tied to the REPR
so it doesn't know which type to box into unless you supply a type on your own
dalek ecs: b327dcf | larry++ | S06-routines.pod:
typo spotted by lizmat++
colomon moritz: does that imply that I need to have separate int and Int code paths? 14:55
moritz colomon: yes
colomon and then how do I tell the difference between them?
moritz (there's a reason you usually want to use a high-level language like Perl 6 :-)
colomon amen to that 14:56
moritz if nqp::isint($thingy) { int code path } else { bigint code path }
colomon hmmm… okay, how do I figure out if something is a bigint?
14:56 thou joined
TimToady the old Fortran answer: convert to the restricted type, convert back, see if still equal... 14:57
14:58 berekuk left
moritz colomon: best add an nqp::isbigint op or so 14:58
colomon: see src/vm/parrot/ops/nqp_bigint.ops
TimToady what do you mean by "bigint"?
moritz or better, hasbigintrepr or so
nqp: nqp::add_I(1, 2, 3) 14:59
camelia nqp: OUTPUT«(signal SEGV)»
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)
TimToady by one def, Int is always bigint, even if its number would fit into a native int
15:00 berekuk joined
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
colomon TimToady: in NQP land
TimToady maybe it'd be nice if nqp were a little less nq in that regard :) 15:01
15:01 cognominal__ left 15:02 cognominal joined
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
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
0
moritz I think colomon's problem is that people are used to pass in integers as strings, for example 15:04
so one need to check if nqp bigint ops can be applied to the thing or not
and there seems to be no way to check that, at the moment 15:05
colomon moritz: haven't even considered that case
I'm just looking at the simplest case: actually passing an int or a bigint
moritz then you do if nqp::isint($v) { normal int } else { assume bigint } 15:06
jnthn Yeah, that's what I was suggesting...
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
jnthn But yes, it's an assumption...
colomon okay, it's not quite that simple, because nums also have to be allowed.
jnthn ...that probably won't hold up
colomon and of course, long term str, etc
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 Guest56532 left, xilo_ left
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:08 ajr joined
jnthn At which point you know for sure you've got a bigint. 15:08
15:08 ajr is now known as Guest96412, Guest96412 is now known as ajr_
colomon jnthn: nqp sprintf tests are entirely nqp based. 15:09
JimmyZ it's nice to have nqp::isbigint?
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
or is this before the radix decision?
15:12 birdwindupbird left
TimToady given how sprintf works, I'd think the radix would already be known 15:12
colomon oh, wait!
looks like %u already has code which tries to do this?
15:12 woosley left
TimToady oh yeah, signs...TimToady wanders off to get more coffee... 15:13
colomon okay, progress 15:21
except I still need to recognize when I've got a bigint
15:22 xilo_ joined 15:23 berekuk left 15:31 berekuk joined
colomon like asking a variable if it has REPR P6bigint? 15:33
jnthn Trouble is that Perl 6's Int contains a P6bigint, but is itself a P6opaque 15:36
15:40 berekuk left
colomon arg 15:42
15:42 Pleiades` left
colomon basically, as I see it, we need to handle four cases: 15:43
1) it's an int
2) it is (or has?) a P6bigint
[Coke] labster++ # closing out rts 15:44
colomon 3) it's a non-integer numeric type
4) it's not a numeric type at all
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
15:45 berekuk joined 15:46 Pleiades` joined
colomon (meaning that incoming P6bigints are converted to num, then int, then P6bigint again, which is Not Correct. 15:48
15:52 Guest1337 left
arnsholt o/ 16:12
16:12 benabik left
arnsholt colomon: I suspect the Zavolaj-bug reflects and underlying Rakudo issue 16:12
16:13 SamuraiJack left 16:14 benabik joined
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:15
16:16 benabik left 16:17 cognominal left
arnsholt colomon: gist.github.com/arnsholt/5929886 16:19
That's as far as I got last night
The fact that a normal sub doesn't handle invocation via the postcircumfix:<( )> method might have something to do with it 16:20
colomon arnsholt++ 16:21
jnthn: ^^^^^
16:22 dmol1 joined, dmol left 16:24 PZt joined
arnsholt Yeah, I think I can repro with plain classes. Gimme a sec to gist it 16:30
Wait, no. I was wrong =/ 16:31
colomon I think adding a call to foo() between &foo does Test and &foo does Other helps clarify matters. :) 16:32
(that the first does seems to disappear) 16:33
arnsholt Point, point
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:34
arnsholt IIRC $args on Rakudo is an object representing the full argument list 16:35
Or did you mean something else?
colomon no, that's it. pretty sure $args has no special meaning (but I've been wrong many times before) 16:36
or maybe not? If I remove $args, niecza works as desired. 16:37
but rakudo says Too many positional parameters passed; got 2 but expected 1
16:37 cognominal joined
arnsholt Huh 16:38
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
Looks like Rakudo and Niecza have different APIs here. Odd.
jnthn It may be a consequence of changes to invocation protocol a while back.
arnsholt Yeah, that sounds plausible 16:40
colomon jnthn: I believe the test failure cropped up during YAPC::NA
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:41
colomon certainly could be the case, I guess 16:42
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
16:53 ajr_ left 16:58 mtk left 17:00 domidumont left 17:01 mtk joined 17:17 dmol1 left 17:20 labster left 17:21 Rotwang joined, labster joined 17:25 FROGGS joined
__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:26
17:27 dmol joined
moritz well, first we have to actually implement decent threads :-) 17:29
17:30 daxim left
timotimo that should be doable until 2014/2015, i'd hope 17:31
17:33 ajr joined 17:34 ajr is now known as Guest43081 17:35 domidumont joined
jnthn would hope so too 17:35
17:40 Guest43081 is now known as ajr_
__sri \o/ 17:43
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)
jnthn arnsholt: Got a patch that fixes the issue 17:48
Well, at least, does under JVM, and shouldn't be backend specific.
dalek kudo/nom: 9e05b52 | jnthn++ | src/Perl6/Metamodel/InvocationProtocol.nqp:
Fix postcircumfix:<( )> / mixin semantics.
jnthn arnsholt, colomon: Hopefully ^^ helps 17:49
masak __sri: I love these little interlocutions you do. they are pretty nice. :)
__sri :D
masak __sri++ # hanging around here, telling us about the future
dalek rl6-roast-data: a5375dc | coke++ | / (5 files):
today (automated commit)
17:54
FROGGS jnthn: ahh, so not my fault at all :o) 17:56
jnthn FROGGS: No, it turned out to be less to do with mixins in the end :) 17:57
17:57 dmol left
FROGGS that is somehow good and somehow scary 17:58
18:00 army is now known as mstefanko
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␤»
masak :D
18:01 spider-mario joined
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:02
jnthn :) 18:03
18:03 dmol joined
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:03
jnthn Right. :) 18:04
That's cute.
masak no, it's horrible :P
I am a bad, bad coder...
jnthn But in the "you think it's cute today" sense.
Right. :P
masak so we agree.
masak .oO( we are in #f0f agreement ) 18:05
or more like #90f, according to Wikipedia... :)
timotimo peachy keen? 18:07
masak "violet" 18:08
the real line of code looks like this: die "'$topic' is ambiguous: $(my @alternatives)" if @alternatives = substring_matches lc $topic;
oops, no.
timotimo ah 18:09
TimToady .u ए
yoleaux U+090F DEVANAGARI LETTER E [Lo] (ए)
masak die "'$topic' is ambiguous: $(my @alternatives)" if 1 < @alternatives = substring_matches lc $topic;
[Coke] gist.github.com/coke/5879701 updated.
masak [Coke]++
TimToady so you are in Lo agreement? :P
masak TimToady: :P
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:␤------> say 000⏏<EOL>␤ok 00:00 42m␤»
FROGGS [Coke]++
masak timotimo: fork it and do it?
gists are git repositories, so it can easily be done locally.
18:12 n0den1te joined, nitrodex joined, nitrodex left 18:13 nitrodex joined, nitrodex left, nitrodex joined, nitrodex left, nitrodex joined, nitrodex left, Guest40148 joined, Guest40148 left, Guest40148 joined, Guest40148 left 18:14 raiph joined
masak n0den1te: yo 18:17
raiph! \o/
n0den1te hello, masak. :)
masak n0den1te: doing well? done any Perl 6 lately? :) 18:18
n0den1te masak: I'm good, thanks. I've been following chat logs - you guys seem to have come very far on rakudo-jvm. :) 18:19
[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.
all that architectural planning seems to have paid off! \o/
pmichaud++ jnthn++ 18:21
n0den1te \o/
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
It's on 2013.05, though.
[Coke] minor updates.
n0den1te Not sure if we had a June release
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:23
n0den1te mixed unicode encodings? 18:24
colomon jnthn: I seem to be having trouble building parrakudo with your latest patch?
masak raiph: yes, can you please be more specific what you mean by 'mixed unicode encodings'? 18:25
what, like, in the same file?
raiph no, just bit of texts in various encodings, and then appending them, regex searching them, substr'ing them, etc. 18:26
or if encoding is the wrong term, just whatever it is that led to nfg being a good idea
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:27
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.
n0den1te heh - I always think "Non Functional Grammar" whenever I see NFG. :P
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.
where the two-dot thing says "I belong over at that previous grapheme". 18:30
now, "ä" has its own codepoint already, but most combinations won't have that.
so NFG hijacks the negative numbers for all such new combinations. 18:31
no particular order, just grab the next (previous) free one.
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
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?
masak timotimo: right. 18:37
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?
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.
colomon jnthn: I'm trying a fresh (from scratch) build right now
timotimo have we an idea why string trimming is so ridiculously fast in perl5 as compared to our perl6 implementations? 18:39
does perl5 ignore unicode-y whitespace characters?
jnthn colomon: What was the failure mode?
colomon efault invocation handler is not invokable
current instr.: 'compose_invocation' pc 13409 (src/gen/perl6-metamodel.pir:6489) (src/gen/Metamodel.nqp:1270)
called from Sub 'compose' pc 27367 (src/gen/perl6-metamodel.pir:12412) (src/gen/Metamodel.nqp:2500)
*Default
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.
[Coke] timotimo: I changed to a .txt file. enjoy 18:41
now you must fix one of the jvm bugs.
timotimo ooooh
i must? :(
TimToady timotimo: depends on how the program is written, but \s matches unicode whitespace by default 18:42
jnthn colomon: oh, I wonder...
timotimo perl5 => 'my $s = " " x SCALE . "x" x SCALE . " " x SCALE; /^\s*(.*?)\s*$/s for 1 .. SCALE',
TimToady P5's advantage may be in being able to chop things off either the beginning or end of a string without any copying
timotimo that could definitely make a difference, yeah 18:43
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?
(the p6 version just calls .trim
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)
TimToady oh, the P5 version is cheating 18:45
it's not actually doing anything with $1
timotimo oh?
so it just gets ignored? that's bad! :)
TimToady it's just running the match
dalek kudo/nom: 29fb2b5 | jnthn++ | src/Perl6/Metamodel/InvocationProtocol.nqp:
Hopefully fix Rakudo Parrot build.

  colomon++ for reporting.
18:46
timotimo if you give me the fixed version, i'll contribute and re-run the benchmarks.
contribute a pull request to japhb*
colomon jnthn: trying...
jnthn timotimo: What is the trim benchmark?
timotimo github.com/japhb/perl6-bench/blob/...ks.pl#L225 18:47
t.h8.lv/p6bench/native_fixed.html - here's the comparison of the results again
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.
colomon jnthn: looks like it's getting much further right now...
jnthn \o/
timotimo: Is that Perl 5 one even actually pulling out the trimmed thing? :) 18:49
colomon jnthn: still not finih.. finished!
TimToady nope
timotimo jnthn: TimToady just said that it doesn't :)
colomon jnthn: make test passing, looks like we're in good shape.
jnthn That's cheating :P
timotimo that's why i asked him to fix it for me :)
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 berekuk left
TimToady the P6 one might even be treating the for loop as a list comprehension, depending on the context. 18:50
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
masak raiph: but I believe p5 is a data point there. Perl 5 does Unicode very well, but it's not very popular.
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.
jnthn: right, that's what I'm getting at.
timotimo i have heard "perl5 is the best language in terms of unicode support" a couple of times before - even outside this channel! ;)
TimToady but you could change yours to read 'my ($result) = /^\s*(.*?)\s*$/s for 1 .. SCALE'
moritz well, P5 does Unicode very well, but it's far too easy to mess up encodings
TimToady then you're at least getting the result out 18:54
colomon jnthn: results looking promising 18:56
TimToady I would also like to know what context perl6-bench puts around the code
jnthn colomon: yay
TimToady because P5 knows more about optimizing for context than P6 does yet
18:57 preflex joined, ChanServ sets mode: +v preflex
masak timotimo: yes, sure. but raiph was talking about marketing. 18:57
colomon jnthn: Successfully installed NativeCall \o/ 19:00
timotimo right.
colomon jnthn: suspect this will get us a dozen modules working again. about to launch a smoke test....
19:00 berekuk joined
timotimo excellent! 19:00
19:00 thundergnat joined
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. :|
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!
n0den1te timotimo: yeah, DNF jokes are getting too old. 19:02
19:02 domidumont left
masak timotimo: it can't both be crappy and vaporware, can it? :P 19:03
colomon arnsholt++ 19:04
n0den1te pipedream and vaporware. redundant words. :P
colomon jnthn++
n0den1te Also, when they still see things happening, how can that be vaporware? 19:05
19:06 census joined 19:07 xinming left
lizmat back from cycling, too tired to fcous, may try again in a few hours 19:07
19:08 xinming joined 19:20 ilogger2 joined, ChanServ sets mode: +v ilogger2
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…
..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 @ …
masak :/
I expected either of the above to work.
where did I go wrong?
(where "work" is defined as "produce the same result as the 'map' case above")
timotimo runs all the benchmarks 19:21
jnthn masak: Maybe 'cus Rakudo's hypers still go too deep? 19:26
moritz yes, that's the cause
jnthn 'cus didn't get to doing the nodal thing yet
19:26 grondilu joined
masak aha. 19:27
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 »
grondilu: why wouldn't here be the best place?
moritz can't build nqp-jvm anymore
Error: Could not find or load main class nqp 19:29
make: *** [src/stage1/ModuleLoader.jar] Error 1
jnthn moritz: Re-configure?
moritz jnthn: I did
grondilu masak: because there's no persistence in the messages, and it might take some time to find the problem.
moritz tries again without -j3
jnthn hmmm
19:29 xilo_ joined
moritz same error 19:29
timotimo moritz: did you make extra-extra-extra-really sure it's clean? 19:30
moritz timotimo: is 'git clean -xdf' enough?
timotimo i recommend rf -rf /path/to/repository && git checkout HEAD
er, that's wrong
i recommend rf -rf /path/to/repository/* && git checkout HEAD
moritz removes the install dir too and tries again
same error
masak n: my @x = <& a& &b>; s:g/\&/\\\&/ for @x; say @x
camelia niecza v24-86-g39ab531: OUTPUT«\& a\& \&b␤» 19:31
masak r: my @x = <& a& &b>; s:g/\&/\\\&/ for @x; say @x
jnthn moritz: Can you check there's no *.class in src/vm/jvm/stage0, just jar?
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␤␤»
grondilu (well I try to describe the issue here after all)
masak I expect to be able to change those things in an array. is Rakudo wrong and Niecza right?
moritz jnthn: there is no src/vm/jvm/stage0
grondilu runs "cd nqp; perl ConfigureJVM.pl --prefix=../install-jvm"
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
camelia rakudo 29fb2b, niecza v24-86-g39ab531: OUTPUT«\& a\& \&b␤»
jnthn oh crap
moritz :-)
jnthn You'd think I could actually use git...
masak $_ should be 'is rw' both in a normal for loop and in a statement_mod for loop, right?
masak submits rakudobug
jnthn right
masak wonders if this is a regressing or if it was always thus 19:33
regression*
moritz I'm sure it wasn't like this before we had a container model :-) 19:34
grondilu fatal error: paste.siduction.org/20130705193431
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␤␤»
masak n: my @x = <x x x>; $_ = 'foo' for @x; say @x
camelia niecza v24-86-g39ab531: OUTPUT«foo foo foo␤»
grondilu is jakudo supposed to work with OpenJDK?
dalek p: b21bd22 | jnthn++ | src/vm/jvm/stage0/ (10 files):
Actually add the stage0 jars.
moritz grondilu: yes, with a sufficiently new openjdk 1.7
dalek p: f402e3e | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/ (3 files):
Get serialized object ownership model in place.

For historical reasons, some things are not handled as direct objects, but rather as special cases in the serializer. This gets support for that handling in place, in hope of using it to resolve some of the remaining serialization/repossession issues.
19:37
p: 022e67c | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Add missing repossession barriers.
jnthn That final patch manages to fix some spectest failures.
timotimo oh yay! :)
colomon \o/
arnsholt rebuilds Rakudo 19:38
timotimo the evalserver works with -e, right? 19:39
grondilu forgot to git pull in nqp/
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
camelia rakudo 29fb2b: OUTPUT«yxx␤»
jnthn r: my $a = 'xxx'; s/x/y/ given $a; say $a
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␤␤»
jnthn Same bug 19:42
arnsholt timotimo: IIRC the evalbot stuffs the code in a temporary file and runs that
moritz wonders if it's the optimizer
jnthn nah
Trying a patch
timotimo arnsholt: as long as i can call it via -e, that should be totally fine 19:43
arnsholt Test suite passes \o/ 19:44
jnthn++ # bugfix
jnthn jnthn-- # busting it
timotimo there's no evalserver for nqp-jvm though, right? 19:45
jnthn > my @x = <& a& &b>; s:g/\&/\\\&/ for @x; say @x
\& a\& \&b
dalek kudo/nom: be89a43 | jnthn++ | src/Perl6/Actions.nqp:
Fix statement mod given/for rw-ness.
19:46
jnthn timotimo: It may well be usable for nqp too, dunno how to make it run.
masak: ^^
masak jnthn: \o/ 19:49
moritz fwiw nqp-jvm builds again 19:50
nwc10 aha. I'd just found that something was bust, but wasn't sure what. Trying the new mater 19:51
er, master
grondilu ok you can ignore my error message above. With a fresh nqp it did not occur. 19:52
jnthn whee
masak nwc10: your mom is the new mater. 19:53
grondilu is watching compilation of rakudo on JVM and would be amazed if it would actually work. 20:02
"The following step can take a long time, please be patient." ==> :popcorn:
timotimo amusingly, it's at least 2x faster than on parrot :) 20:03
grondilu java.lang.StackOverflowError in (src/stage2/gen/NQPHLL.nqp:430) 20:04
jnthn ...what.
grondilu compilation failed :- 20:05
:(
full error log: paste.siduction.org/20130705200614 20:06
jnthn Really? Stack overflow? That doens't even look deep 20:07
grondilu I used -Xms500m -Xmx500m. Maybe that's too low?
grondilu has 1G RAM, 2Go Swap 20:08
jnthn That's heap size
-Xss allows tweaking of stack size
20:08 snearch joined
grondilu what size should I try then? 20:08
jnthn Try -Xss1m perhaps 20:09
Are you on 32-bit? 20:10
Seems that 32-bit machines get a decidedly smaller stack
masak how do I build my Parrot with ICU, again? it seems I do not have it.
grondilu yes, 32bit
masak I'm on Linux Mint.
grondilu Linux redkey 3.9-8.towo-siduction-686 #1 SMP PREEMPT Fri Jun 28 21:09:01 UTC 2013 i686 GNU/Linux
jnthn k 20:11
grondilu tries with -Xss10m (pure random number)
timotimo has passed nqp-jvm and rakudo-jvm in benchmarking 20:12
masak ah, `sudo apt-get install libicu-dev`
"Perl 6 is great for Unicode... provide you know which Debian package to install." :P
timotimo lied 20:14
apparently i'm currently at rakudo-jvm.
grondilu ... still compiling...
anothr fatal error: paste.siduction.org/20130705201539 20:15
masak HALP I can't build Rakudo on Parrot! :( 20:16
20:16 sjohnson joined
masak hold on, pasting gist... 20:17
gist.github.com/masak/5936970
jnthn: ^
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''
jnthn wtf
masak nuking everything and trying again.
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
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.
jnthn k 20:21
masak TimToady: oh -- last I heard, it was working well...?
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...
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...
jnthn: Parrot has lots of history... :P 20:24
jnthn :P
TimToady masak: it just makes it too fatal to mention Nil in too many places
masak ah. 20:25
masak .oO( I could mention it to you, but I'd have to Nil you )
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.
TimToady something like 42 + Nil would not be failsoft; it dies before it gets a chance to issue a warning and return 0 20:27
masak jnthn: ok, then maybe I should revert to HEAD^ without trying to reproduce it here? 20:28
jnthn masak: Trying a fix
moritz so, in general, when you should Failure be returned, and when should an exception be thrown?
masak jnthn: re-reproduced. 20:34
with a nuked, re-cloned build. 20:35
jnthn wtf...
Yeah, found it 20:36
copy-pasto from year or two ago, looks like...
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␤␤»
..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…
labster DIHWIDT error?
masak labster: you're matching a regex against an uninitialized $_ 20:38
timotimo gosh those benchmarks take so long ... :( 20:39
but i admire the architecture behind perl6-bench. it seems pretty well designed
labster masak: I thought something like that was the case 20:40
dalek kudo/nom: 58f56f4 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Fix long standing copy-pasto.

Exposed by what should have been a benign fix to for/given statement modifiers.
labster I'm working on updating S32::Rules because of the amount of plain wrong information in it. 20:41
masak labster++
moritz wtf is S32::Rules? 20:42
oh, Match and Cursor and things
masak "who wrote all this stuff?" :P 20:43
ingy *waves* o/
masak ingy-san! \o/
moritz idly wonders how a document with just one version can have two authors
ingy moritz: siamese twins?
masak moritz: it's Perl 6! we make the impossible seem merely a slight detour. :P 20:44
moritz :-)
masak jnthn: yes, master^^ built fine. 20:45
grondilu notices that rakudo-JVM compilation takes its sweet time on the "optimize" stage.
masak checking out latest and rebuilding one last time :)
timotimo 28/42: Testing for_array_set ... *yawn* 20:46
20:49 berekuk joined
grondilu ... 35 minutes of compilation so far 20:55
timotimo wow, what?
the core.setting stage?
jnthn um.
grondilu yeah
timotimo no, that can't be right
it must be infinilooping or swapdeathing or something
grondilu how could I know? 20:56
I'm stuck at: Stage optimize : 61.753 20:58
timotimo that's before it creates the JAST
jnthn that takes ~3s for me...
How long did parse take?
grondilu a few minutes IIRC
timotimo holy crap, wow 20:59
are you on an embedded processor or something?
grondilu "embedded"?
I'm using a netbook, Atom based processor if that's what you mean. 21:00
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
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
(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:10 snearch left
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
i suppose i can wait a bit longer.
21:23 sunnavy joined
timotimo does it seem sensible to introduce an optimization for any(Range)/all(Range) for autothreading? 21:28
jnthn When is that used?@ 21:29
jnthn woulda thought $foo ~~ 1..100 woulda been the idiomatic way rather than $foo ~~ any(1..100)
masak people are likely to do both, methinks. 21:30
timotimo mhm
well, for one there's this ridiculous microbenchmark in perl6-bench that basically does 1 == any(1..SCALE) ;) 21:31
rakudo is almost done benchmarking, after that only perl5 remains 21:32
(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/...
dalek kudo/nom: 11b5dae | jnthn++ | src/ (5 files):
Eliminate call_sig lexical.

Wasteful to do this for every block, and would be doubly wasteful on JVM to do it right.
21:34
timotimo does that make performance go wiiiiiild? :) 21:36
jnthn doubt it :)
timotimo aaw
jnthn But it's a saving
timotimo i estimate 10 minutes until i can supply the benchmarks i have been running forever now ;)
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:37
the 10 minute estimate was too optimistic it seems 21:44
21:49 benabik joined
timotimo renders the plots 21:54
t.h8.lv/p6bench/2013-07-05.html - here we go 21:56
it seems like i didn't do the trim_string thing right 21:58
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:00
TimToady oh, you're not $s =~ 22:02
timotimo ah, that must be it.
TimToady you're always testing empty $_
timotimo m(
that would change things a lot, yeah
does that mutate $s?
TimToady no, it's just a match, but you still have to match the correct thing 22:03
if you mutated it, you'd have to recreate the string each time
timotimo so will my ($result) = $s =~ /.../ DTRT?
TimToady looks right
timotimo good, i'll re-run and see if this merge tool works the way i think it does 22:04
22:10 konundra joined
timotimo .o(there is not actually a merge tool) 22:12
t.h8.lv/p6bench/2013-07-05_trim_string_only.html - now that looks much more realistic! 22:13
about 100x slower than perl5 (for rakudo-jvm)
(about 500x slower with long strings on parrot)
[Coke] hacks on a crappy version of shell for the jvm. 22:16
timotimo you mean repl? 22:17
oh!
actually shell!
cool beans :)
jnthn investigates some of the timotimo++ results 22:19
22:20 BenGoldberg joined
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␤␤»
[Coke] > nqp::shell("touch foo"); # hey, foo now exists. 22:22
at some point, we need to squish all the stuff in rakudo that says "if parrot" into NQP, I think. 22:24
... I am probably not going to be abe to finish testing this before I have to vanish. :| 22:25
timotimo feel free to push it to a WIP branch and let others poke around? :) 22:26
22:28 grondilu left
masak 'night, #perl6 22:34
22:35 konundra left 22:40 berekuk left 22:42 berekuk joined
TimToady so we've got immutable strings, but does that mean substr can return something pointing to the middle of another string? 22:54
22:55 Guest79703 is now known as ponbiki
timotimo it can mean that, i think 22:55
jnthn Think the JVM does it that way. 22:57
TimToady must keep a pointer to the front for GC I suppose 23:00
timotimo for sure
jnthn *nod*
23:05 Pleiades` joined
dalek ecs: eddc65f | (Brent Laabs)++ | S32-setting-library/Rules.pod:
try to make S32::Roles useful by taking info from S05
23:06
23:15 Radvendii joined 23:18 colomon joined
Radvendii how do I force lazy evaluation again? 23:19
never mind 23:21
23:21 Radvendii left 23:26 Radvendii joined 23:33 colomon left, Radvendii left
TimToady forcing lazy evaluation, what a concept... 23:40
maybe needs ACME::Don't :)
lue
.oO( my @a = waitaminute eager 1..* ; )
23:41
jnthn benchmarks++ profiler++
23:42 benabik left 23:54 benabik joined