»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:00 jaldhar left 00:01 jaldhar joined 00:02 Woodi left, Woodi joined 00:20 logie joined 00:25 logie left 00:36 raiph joined 00:46 dayangkun joined 00:55 FROGGS joined 00:57 thundergnat left 01:00 Chillance_ left 01:05 xilo_ joined 01:12 FROGGS_ joined 01:15 Chillance_ joined, FROGGS left
BenGoldberg rn: cwd.say 01:17
camelia niecza v24-86-g39ab531: OUTPUT«Unhandled exception: cwd may not be used in safe mode␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (cwd @ 0) ␤ at /tmp/FpjaWRGa0g line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.…
..rakudo 567941: OUTPUT«/home/p6eval␤»
01:18 hypolin left 01:21 hypolin joined
BenGoldberg rn: enum E <A B>; A.pick.say 01:32
camelia rakudo 567941, niecza v24-86-g39ab531: OUTPUT«B␤»
BenGoldberg rn: enum E <A B C D E>; C.pick.say
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤Illegal redeclaration of symbol 'E' (see line 1) at /tmp/elqXXYbwW1 line 1:␤------> enum E <A B C D E>⏏; C.pick.say␤␤cannot bind constant value at /tmp/elqXXYbwW1 line 1:␤------> enum E <A B C D E>[3…
..rakudo 567941: OUTPUT«B␤»
BenGoldberg rn: enum E <A B C D F>; C.pick.say
camelia rakudo 567941: OUTPUT«B␤»
..niecza v24-86-g39ab531: OUTPUT«A␤»
BenGoldberg rn: enum E 'E'; E.say 01:33
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤Undeclared name:␤ 'E' used at line 1,1␤Undeclared routine:␤ 'enum' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) ␤ at /home/p6eval/niecza/src/STD.pm6
..l…
..rakudo 567941: OUTPUT«===SORRY!===␤Undeclared name:␤ E used at line 1␤Undeclared routine:␤ enum used at line 1␤␤»
BenGoldberg rn: enum E <E>; E.say
camelia rakudo 567941: OUTPUT«(E)␤»
..niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤Illegal redeclaration of symbol 'E' (see line 1) at /tmp/l7fFE0F7_a line 1:␤------> enum E <E>⏏; E.say␤␤cannot bind constant value at /tmp/l7fFE0F7_a line 1:␤------> enum E <E>⏏; E.say␤␤…
01:42 raiph left 01:43 raiph joined
[Coke] updated gist.github.com/coke/5879701 01:50
nice new failure mode:nextsame/nextwith/callwith is not in the dynamic scope of a dispatcher
sorear nice 01:55
total errors are down?
timotimo huh, rakudo is still regressing? 01:58
on parrot?
sorear timotimo: where? 02:04
timotimo in the last few days os cokes updates
github.com/coke/perl6-roast-data/b...pass_rates - used to be 26020 on the third entry, now it's still on only 25717
anyway, i should be going to bed 02:05
[Coke] ~.
timotimo: there's no failures on rakudo.parrot - possible tests were removed or something. 02:07
timotimo yes, i didn't see that. in the skip column there was a bump 02:09
sorear mostly just the "plan" column falling 02:10
02:10 abnorman joined
JimmyZ hmm, when I typed nmake, I saw 'perl -MExtUtils::Command -e cp src/stage2/nqp.jar .' and similar things about 9 times once. 02:14
sorear JimmyZ: were you building nqp for the jvm?
JimmyZ yes
and saw 'perl -MExtUtils::Command -e mkpath src/stage2/gen' many times 02:15
sorear JimmyZ: does github.com/perl6/nqp/blob/master/t...VM.in#L330 look familier?
02:15 abnorman left
JimmyZ sorear: yes 02:16
sorear or: "Yes, it's supposed to do that"
JimmyZ nope, It's not suppoesed 02:17
sorear what do you mean?
JimmyZ sorear: gist.github.com/zhuomingliang/5897963 02:18
sorear: also 'perl -MExtUtils::Command -e mkpath src/stage2/gen' 02:19
sorear Oh, I thought you meant "9 times" as in "it copies 9 files"
JimmyZ :D 02:20
02:20 ggoebel joined
benabik I can do it. I will do it nine times. 02:21
02:26 dayangkun left 02:28 hypolin left, hypolin joined 02:35 mdxi joined 02:38 ManAmongHippos joined
ManAmongHippos Is there going to be a full fledged perl6 reference implementation? 02:39
02:40 hypolin left, hypolin joined
sorear ManAmongHippos: No, we use a reference test suite instead 02:44
[Coke] I doubt there will anything called a reference implementation. There are multiple implementations in progress, with rakudo being the most complete. 02:45
sorear ManAmongHippos: see github.com/perl6/roast/
[Coke] sorear++ # better answer.
ManAmongHippos Ok that answers my question. Thanks
[Coke] r: say (1|2)+(3|4) 02:46
camelia rakudo 567941: OUTPUT«any(any(4, 5), any(5, 6))␤»
[Coke] is there a way to flatten that to any(4, 5, 6) ?
flussence come to think of it, I've never seen anything computing related of this scale where a single group's produced both a solid spec and a good reference design. 02:47
sorear flussence: To be fair, we've produced quite a few bad reference designs 02:48
[Coke]: I don't think so 02:49
03:03 FROGGS_ left 03:22 xinming left 03:24 xinming joined 03:33 SamuraiJack_ joined 03:37 ManAmongHippos left 03:39 FROGGS joined 03:51 preflex_ joined, ChanServ sets mode: +v preflex_ 03:52 preflex left, preflex_ is now known as preflex 03:57 fridim__ joined 04:00 chayin joined, chayin_ left 04:15 FROGGS left 04:27 Psyche^ joined 04:32 Patterner left, Psyche^ is now known as Patterner 04:36 ManAmongHippos joined, ManAmongHippos left 04:41 FROGGS joined 04:48 birdwindupbird joined 04:53 ilbot_nextgen joined 04:58 konundra left 05:08 atroxaper joined 05:09 hypolin left, hypolin joined 05:18 lawrmcfa joined 05:19 lawrmcfa left 05:20 xenoterracide left 05:23 raiph left
segomos moritz: you around for a DBIish q? 05:28
05:29 xilo left
moritz segomos: yes-ish 05:36
segomos with the mysql portion i'm preparing a simple insert stmt and getting 'Any' as the errstr being returned for the statement..not even sure where to start debugging - i looked at DBDish BUILD and didn't see much there to try 05:37
moritz segomos: so, no error occured? 05:38
segomos doesn't appear to have occurred but the statement doesn't execute
moritz have you set RaiseError? 05:39
segomos yes
moritz segomos: can you show me the code?
segomos no error is caught and (try CATCH) and the $! variable is empty
moritz (which all indicates that no error actually happened)
segomos yea let me throw it up on a gist
:q 05:40
hugme hugs segomos, good vi(m) user!
segomos lol, sorry - gist.github.com/tony-o/5898608 05:43
i have user/password/database set properly in the script where i can successfully prepare/execute SELECT statements 05:44
and the db user has full privs
moritz but the entry isn't written? 05:45
segomos correct 05:46
moritz that's very weird
because I know I've successfully inserted many rows with pretty much the same code 05:47
maybe something broke recently :/
segomos: if you set up the credentials correctly in t/25-mysql-common.t (in the DBIish repo), do the tests pass? 05:48
segomos moritz: i'll check it now 05:49
05:51 FROGGS left
segomos moritz: yes 'All tests successful.' 05:52
05:52 abnorman joined, ecocode joined
segomos going to try 10- 05:52
05:59 fridim__ left 06:02 mstefanko left 06:05 Chillance_ left, kingbeast left
moritz segomos: are you quite sure you're checking the right database and right host when checking whether the row was written? 06:05
06:06 mstefanko joined
moritz 'cause when the tests pass, DBIish shouldn't be *that* busted that it doesn't even report an error 06:06
segomos yea - i think i have a problem with the way panda installed the lib. i'm getting kind of sleepy and fat fingering a bunch of stuff so i'm going to take a look in the morning but cloning your repo and running tests is passing and running the same tests against what's in my global @*INC is failing 06:07
06:07 ecocode left 06:08 abnorman left
segomos moritz: thanks for the leads 06:11
06:17 salv0 left 06:31 FROGGS joined
rs0_ is there a direct perl6 equivalent of while (<>)? 06:31
lizmat $file.lines as .lines is lazy 06:32
06:33 salv0 joined
rs0_ well, while(<>) reads from either stdin or from files given as script arguments 06:33
i don't know if there's a similar shorthand in perl 6. some ancient web page i found claimed that for =<> is a direct equivalent, but that didn't compile 06:34
sorear $*ARGFILES is a magical filehandle with the same behavior
you can do for $*ARGILES.lines { }
just for lines() { } might also work 06:35
FROGGS it does
morning btw
sorear yeah
(the parens are not optional in this case)
r: for lines() { .say } 06:36
camelia rakudo 567941: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmi…
sorear ok, one more difference: lines() autochomps 06:37
rs0_ interesting stuff 06:38
sorear there was a = prefix operator in ancient versions of p6, but it was ripped out before I joined the project 06:39
rs0_ oh, something else i was wondering about was whether there is a perl6 equivalent of Java's @Override annotation, such that you get a compile-time error if a corresponding method cannot be found in the class hierarchy
sorear no
rs0_ i think i saw in the logs that someone was looking at adding that feature but i'm pretty sure he was doing it on spec 06:40
sorear would be relatively easy to add as a module though, if anyone's interested
"on spec"?
rs0_ on spec, made, built, or done with hopes of but no assurance of payment or a sale; without commitment by a client or buyer: ad illustrations done on spec; luxury homes built on spec and sold before completion.
06:41 hypolin left 06:42 hypolin joined, hypolin left, hypolin joined, hypolin left 06:43 hypolin joined 06:44 hypolin left, hypolin joined
BenGoldberg r: $*ARGILES.say 06:44
camelia rakudo 567941: OUTPUT«Dynamic variable $*ARGILES not found␤ in method gist at src/gen/CORE.setting:10477␤ in method gist at src/gen/CORE.setting:913␤ in sub say at src/gen/CORE.setting:11365␤ in method say at src/gen/CORE.setting:910␤ in method say at src/gen/CORE.setting:909␤ in …
rs0_ r: $*ARGFILES.say
camelia rakudo 567941: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤ in method print at src/gen/CORE.setting:911␤ in method print at src/gen/CORE.setting:11545␤ in method print at src/gen/CORE.setting:11543␤ in method say at src/gen/CORE.setting:11557␤ in method say a…
sorear r: say ~$*ARGFILES 06:45
camelia rakudo 567941: OUTPUT«(Any)␤»
sorear r: say $*ARGFILES.gist
camelia rakudo 567941: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/lc8R9ZnYWQ:1␤␤IO::Handle<>(closed)␤»
BenGoldberg r: .say for $*ARGFILES 06:46
camelia rakudo 567941: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤ in method print at src/gen/CORE.setting:911␤ in method print at src/gen/CORE.setting:11545␤ in method print at src/gen/CORE.setting:11543␤ in method say at src/gen/CORE.setting:11557␤ in method say a…
BenGoldberg r: .print for $*ARGFILES
camelia rakudo 567941: ( no output )
sorear probably because of the sandbox
also you should never pass a filehandle directly to print or say
the method might get confused and think you wanted to print *to* the filehandle 06:47
because someone thought it would be cute ~sigh~
FROGGS r: use Test; is (-4..-1 X+> 1..3), (-2,-1,-1,-2,-1 xx 8), ""
camelia rakudo 567941: OUTPUT«not ok 1 - ␤# got: '-2 -1 0 -1 0 0 -1 0 0 0 0 0'␤# expected: '-2 -1 -1 -2 -1 -1 -1 -1 -1 -1 -1 -1'␤»
FROGGS locally: # got: '-4 -4 -4 -3 -3 -3 -2 -2 -2 -1 -1 -1' 06:48
hmm
06:49 hypolin left, hypolin joined
BenGoldberg r: $*OUT.say('', $*ARGFILES, '') 06:49
camelia rakudo 567941: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/v_QvaacYs7:1␤␤IO::Handle<>(closed)␤»
BenGoldberg r: $*OUT.say('', ~$*ARGFILES, '')
camelia rakudo 567941: OUTPUT«(Any)␤»
sorear someday there's going to be a Perl6::BeLike::SOREAR module that permanently enables fatal, removes sink context and failures, hides the non-parametric multis for say, print, sort, makes for loops actually for loops, and anything else I think of >.> 06:50
FROGGS .oO( use Sanity; ) 06:53
rs0_ is this up to date? perlcabal.org/syn/ 06:54
FROGGS rs0_: I think so, yes 06:55
these pages should be autogenerated every hour
rs0_: ahh, scroll to the bottom and read the last line
BenGoldberg How is perl6's sink context different from !defined(wantarray()) in perl5 ? 06:56
rs0_ ah, i wasn't familiar with the mu repo 06:57
wasn't hard to find though
sorear FROGGS: i'm not mlehmann
FROGGS r: my $x = 1, 2; say $x 06:58
sorear i do not have the hubris to name a pragma common::sense. sorearish::sense maybe.
camelia rakudo 567941: OUTPUT«WARNINGS:␤Useless use of "," in expression "my $x = 1, 2" in sink context (line 1)␤1␤»
sorear std: my $x = 1, 2; say $x 06:59
camelia std d4cc5ab: OUTPUT«ok 00:00 44m␤»
sorear std: my $x = 1, $y = 2; say $x
camelia std d4cc5ab: OUTPUT«===SORRY!===␤Variable $y is not predeclared (declarators are tighter than comma, so maybe your 'my' signature needs parens?) at /tmp/wpkZubHoB0 line 1:␤------> my $x = 1, ⏏$y = 2; say $x␤Check failed␤FAILED 00:00 44m␤»
sorear r: my $x = 1, $y = 2; say $x
camelia rakudo 567941: OUTPUT«===SORRY!===␤Variable '$y' is not declared␤at /tmp/hbuMYayQo1:1␤------> my $x = 1, $y⏏ = 2; say $x␤ expecting any of:␤ postfix␤»
FROGGS BenGoldberg: it is not comparable much to P5 due to precedence
or the number of things of the lhs...
BenGoldberg r: my ($x, $y) = (1, 2); $y.say 07:01
camelia rakudo 567941: OUTPUT«2␤»
BenGoldberg goodnight 07:03
FROGGS gnight 07:07
07:08 BenGoldberg left 07:10 sqirrel joined, bbkr joined, bbkr left 07:16 lawrmcfa joined 07:17 xinming left 07:18 xinming joined 07:21 lawrmcfa left 07:22 hypolin left, domidumont joined 07:23 hypolin joined 07:25 xinming left 07:27 xinming joined
lizmat good morning #perl6! 07:40
r: my Int $a=1; $a=Nil # should this bomb? I think not? 07:41
camelia rakudo 567941: OUTPUT«Type check failed in assignment to '$a'; expected 'Int' but got 'Nil'␤ in block at /tmp/WCWcMsBHOY:1␤␤»
07:45 xinming left 07:46 domidumont left 07:47 xinming joined 07:49 domidumont joined 07:53 kaleem joined
moritz no; known NYI 08:01
08:04 xinming left
lizmat something in an .ACCEPTS that needs to be fixed? 08:04
JimmyZ nope, I think. It's compile time, not runtime 08:05
08:06 xinming joined
moritz assignment of $scalar = Nil should reset $scalar to its default value 08:06
but that default value isn't available at run time anymore
lizmat but default values are also NYI at the moment, right? 08:07
so the default value of a scalar *is* Nil at the moment, no? 08:08
moritz no
r: my $x; say $x
camelia rakudo 567941: OUTPUT«(Any)␤»
moritz the default value is Any
(here)
r: my Int $x; say $x; # the default values is Int
camelia rakudo 567941: OUTPUT«(Int)␤»
lizmat ah, in that ballpark: this seems odd
r: use Test; my Int @a=1,Nil,3; say @a.of; is( @a.of,'(Int)', "que? {@a.of}" ) # the test fails ? 08:09
camelia rakudo 567941: OUTPUT«(Int)␤use of uninitialized value of type Int in string context in block at /tmp/Kdx3Cc5ZAT:1␤␤use of uninitialized value of type Int in string context in sub is at lib/Test.pm:81␤␤not ok 1 - que? ␤use of uninitialized value of type Int in string context in sub …
lizmat because @a.of inside the test apparently is undef ?
while outside it *is?
08:10 crab2313 joined
nwc10 sorear: not totally. No-one seemed to realise that the question was "does gather/take on Rakudo on the JVM cause it to pass spectests that Rakudo on Parrot doesn't pass? If so, then it's false to assume that Rakudo on JVM can't pass more spectests than Rakudo on Parrot" 08:10
lizmat r: sub a (@a is copy) { say @a.of }; my Int @a=1; say @a.of; a(@a) # looks like "is_copy" loses type information, rakudobug? 08:11
camelia rakudo 567941: OUTPUT«(Int)␤(Mu)␤»
lizmat r: my Int @a; my @b=@a.clone; say @a.of; say @b.of # looks like .clone has the same problem, or *is* the same problem 08:12
camelia rakudo 567941: OUTPUT«(Int)␤(Mu)␤»
08:15 domidumont left
moritz (fwiw there are known problems with gather/take on parakudo) 08:15
08:15 domidumont joined
lizmat r: my %h; %h<a>=Nil; say %h.exists("a") # according to S02:2286, one could argue that assigning Nil to a hash element, would be deleting it 08:26
camelia rakudo 567941: OUTPUT«True␤»
lizmat TimToady: would you agree with that interpretation, and is this an NYI/rakudobug? or does this work as intended? 08:27
moritz wonders how that's supposed to work under the hood 08:28
lizmat as well, but that doesn't change the question :-) 08:29
actually, this could only work at compile time, as you cannot "keep" the value Nil in a variable, or can you? 08:31
moritz you can return Nil from a function 08:32
so not amendable to static analsys
*i
08:35 daxim joined 08:37 Celelibi left 08:38 Celelibi joined
lizmat grrr, you're right, moritz++ 08:39
08:40 dakkar joined
dalek ast: f962b6d | (Elizabeth Mattijsen)++ | S02-types/undefined-types.t:
Added some more Nil related tests, mostly todo and skup atm
08:41
lizmat *skip :-)
08:51 domidumont left, domidumont joined 08:53 lelf``` joined 08:54 domidumont left, lelf`` left, crab2313 left, domidumont joined
masak good antenoon, me hearties. 08:56
08:56 raiph joined 08:57 hypolin left 08:58 fhelmberger joined, hypolin joined
masak .oO( you are all less than three to me! ) 08:58
tadzik so, I've been given 18446744073709551616 IPv6 addresses
masak ooh, 2**64 08:59
tadzik that's 2^64, so, if I count correctly, it's the current number of IPv4 addresses. Squared.
will be useful once I officially open my private earth
masak it will happen, you know it.
tadzik yep 09:00
DrEeevil tadzik: so you can use a new IP for every http request ;)
tadzik DrEeevil: you live up to your name :>
moritz has a /48 net
r: say 2**(128 - 48)
camelia rakudo 567941: OUTPUT«1208925819614629174706176␤»
DrEeevil tadzik: hey, fully dynamic DNS!
moritz and now I have separate IPv6 addresses for sites that I serve as virtual hosts over IPv4 09:01
tadzik I have a serious trouble imagining that it'll ever be useful
moritz so I use less than a dozen of those addresses :-) 09:02
tadzik ports are obsolete
moritz DNS doesn't resolve ports :-) 09:03
tadzik yeah :) How fun that'll be. ssh.tadzik.foo, http.tadzik.foo
moritz tadzik: at least you can now route packets to your army of nanorobots! 09:04
tadzik oh yeah! 09:08
moritz and when they attack, I'll counter with a DELETE on the RIPE database :-)
09:09 Celelibi left 09:10 Celelibi joined 09:13 mj41 left, dayangkun joined
dalek ast: 34ef6de | (Elizabeth Mattijsen)++ | S02-types/undefined-types.t:
Removed some bogus tests, added some more Nil related tests
09:16
jnthn morning, #perl6 09:17
lizmat morning jnthn!
r: my Int $a is default(1); say $a # this *should* say "a", right? 09:23
camelia rakudo 567941: OUTPUT«(Int)␤»
lizmat "1" I mean :-) 09:24
r: my Int $a is default(42); say $a # this *should* say 42, right?
camelia rakudo 567941: OUTPUT«(Int)␤»
moritz is 'is default' even specced?
lizmat S02:653
jnthn And is it meant to bind or assign? 09:26
Assign I guess...
lizmat "Any container's default may be overridden by the C<is default(VALUE)> trait."
jnthn Is that connected to Nil assignment? 09:27
lizmat "If the container's contents are deleted, the value is notionally set to provided default value; this value may or may not be physically represented in memory, depending on the implemention of the container.
yes
jnthn ugh
Yeah, I keep ignoring implementing that on purpose.
Hoping it changes.
Sometimes this approach works. :)
lizmat it doesn't work for native types
jnthn Right, it can't. :) 09:28
It just means every single variable assignment needs to check this special case...
lizmat well, actually, it is specced to work for native types, as long as the default value can be represented
jnthn I guess it can be a type check failover...
lizmat jnthn: why would that be with every assignment?
I mean, we would need something special for Nil assigment 09:29
jnthn OK, every assignment we can't statically analyze. Which is the common case.
Yes, so you need to check, every assignment, if the thing on the RHS is a Nil.
lizmat ah, yes, but that hasn't got anything to do with "is_default"
jnthn As I said, that could happen because the assignment typecheck fails and then before throwing we say "oh, is it because it's Nil"?
Well, it has 'cus "is default" is where the default value comes from when Nil is assigned... 09:30
lizmat yup, and *then* check for any is default after we determine it was Nil
jnthn Right, it's the Nil check we'd need. But since it can be a type check fallback, it ain't so bad. 09:31
lizmat indeed...
jnthn wakes up a bit more and realizes that isn't the bit of type system cheating that bothers him.
lizmat what is? 09:32
jnthn The thing I absolutely do NOT want to allow is sub foo() returns Int { } to hand back a Failure. If we do that, we're utterly screwed.
lizmat wouldn't that work in a similar way then?
jnthn Well, the only way it can work is if we immediately throw the exception in the failure before it leaks out. 09:33
The problem is 09:34
moritz is for abolishing Failure anyway
jnthn foo(something-that-returns-Int())
moritz is dispatched to the foo(Int) variant, which unboxes
jnthn So, the optimizer sees Int, picks the multi-candidate for foo, says "oh, I can inline it and I can completely skip type checks too"
moritz boom
jnthn Then somebody gets upset because they get the "Cannot unbox Failure as a native int" they deserve.
Returning a Failure is fine...if you don't promise to return an Int. 09:35
masak right.
lizmat I guess the alternative would be to not let the optimizer pick multi-candidate at cimpile time :-(
jnthn Well, if we do that, we may as well forget Perl 6 ever being fast. 09:36
nwc10 jnthn: is there a test yet for foo(something-that-returns-Int()) ?
jnthn nwc10: I'd hope so :)
nwc10 ie, soething that tries to enforce sanity
lizmat will look, otherwise I'll add some
jnthn nwc10: Remember that infix:<+> (as in, addition) is an example :)
nwc10: Since all operators are function dispatches too.
r: sub foo() returns Int { fail 'oops' }; foo() 09:38
camelia rakudo 567941: OUTPUT«oops␤ in method sink at src/gen/CORE.setting:10485␤ in method BUILDALL at src/gen/CORE.setting:820␤ in method bless at src/gen/CORE.setting:761␤ in method new at src/gen/CORE.setting:746␤ in method new at src/gen/CORE.setting:744␤ in sub foo at /tmp/x7fHuBrsb…
jnthn r: sub foo() returns Int { fail 'oops' }; my $x := foo(); say 'ok'; 09:39
camelia rakudo 567941: OUTPUT«oops␤ in method sink at src/gen/CORE.setting:10485␤ in method BUILDALL at src/gen/CORE.setting:820␤ in method bless at src/gen/CORE.setting:761␤ in method new at src/gen/CORE.setting:746␤ in method new at src/gen/CORE.setting:744␤ in sub foo at /tmp/NXxeM295F…
jnthn Note it fails inside of sub foo in this case.
r: sub foo() { fail 'oops' }; my $x := foo(); say 'ok';
camelia rakudo 567941: OUTPUT«ok␤»
jnthn And it's fine with the type constraint gone.
nwc10 OK, specifically, is there a test that the error doesn't happen in the wrong place? 09:41
lizmat closest appropriate place I could find was t/spec/S06-signature/types.t, and it doesn't have any tests like that 09:46
09:46 dayangkun left 09:50 raiph left
lizmat so I'm looking at making my class X::TypeCheck::Assignment resume on assignment with Nil 09:53
so, would making a method "resume" or "resumable" in there do the trick? 09:54
jnthn No
lizmat should I look at something else to do ? :-)
jnthn That exception is thrown somewhere internals-y and ain't gonna be resumable.
But you can still probably fix it 09:55
I think the place to look is inside the container spec for Rakudo scalars
lizmat any particular files ?
jnthn After the type check fails, but before throwing an exception...
src/vm/parrot/guts/container.c or so, and there's a similar container-related .java for JVM too 09:56
masak .oO( "look inside the container spec" sounds like a kind of dumpster diving )
lizmat will see if I can make something of that
09:57 cognominal left, cognominal joined
lizmat so where is ->type_check defined? 10:01
jnthn Somewhere over in the nqp repo, iirc 10:02
Probably in sixmodelobject.[ch]
lizmat ok
jnthn That never throws, it only returns true/false
So it doesn't need changing; the change is to react if it's false.
lizmat ah, so not returning false on Nil as the RHS, is not the way ? 10:03
jnthn No, type_check should never lie. It's the low level thing. 10:04
It's the surrounding code that should cheat.
"Oh, you gave back false? Well, before throwing an exception, let's see if the RHS is Nil..."
lizmat jup
jnthn It's not a general type checking thing, it's a special case in assignment.
lizmat I guess "is default" would need to be known at this level then as well 10:06
so it can change the value to be asisgned
assigned
jnthn Yeah
That probably wants to live in container descriptor 10:07
lizmat is feeling completely out of her league now :-)
jnthn src/Perl6/Metamodel/ContainerDescriptor.nqp iirc 10:08
It's not a complicated object :)
lizmat says you :-)
jnthn I suspect the code you're looking at already accesses it, fwiw :)
lizmat trying to wrap my head around it 10:10
jnthn If it helps to know, a Scalar basically has a $!value for the value in the scalar, and a $!descriptor which points to a ContainerDescriptor containing the type, rw-ness, etc. 10:11
So it's really the "static aspects" of a scalar.
lizmat gotcha
10:20 fgomez left
lizmat jnthn: my progress so far: gist.github.com/lizmat/5899824 10:30
lines 41/42 in the gist are the pb for me now
jnthn lizmat: good start 10:31
value = cont->default;
desc->default, no? :)
See types.[ch] for how to cope with Nil
lizmat yup
ok, thanks
jnthn You may have to update container.h also to add ->default.
lizmat ok 10:32
jnthn We rely on P6opaque laying stuff out like a C compiler would. ;)
At least, in the cases when we are.
*care
10:32 lelf``` left
lizmat can I have a struct element with name "default" in C? 10:36
tadzik I don't think so
jnthn No, it's a keyword
_default
lizmat maybe better : the_defauilt ?
the_default ? 10:37
jnthn or that :)
tadzik I think the standard says that underscored things may be reserved in the future
see also: _Bool, or whatsitsname
lizmat I guess then I would have to rename the attribute as well, right ?
jnthn No
Names don't matter at all in C
It's all compiled down to offsets in memory. 10:38
lizmat ok, but it would have to be a PMC *, right ?
like value
jnthn Yes
PMC *the_default;
lizmat :-)
jnthn Note that you'll need to set it to something too :) 10:39
World.pm, see install_lexical_container or so
lizmat cool
jnthn Note that the real "default" handling will need some work. But for now, the Any or whatever can go in there
So my Int $x; ... $x = Nil; sets it to Int at least. 10:40
pmurias jnthn: it's not possible to serialize nqp subs?
jnthn pmurias: Hmm.
pmurias: There are some things that get code objects in NQP and some that don't...
lizmat if nqp::existskey(%cont_info, 'default_value') { # seems some support for default values is there already 10:41
jnthn I forget about how a Sub will be. I guess multi subs must get 'em so there's a place to hang the signature...
lizmat: Yes, that's the Mu/Any distinction.
lizmat: I do sometimes plan ahead a little :)
lizmat: It's probably already computing the correct thing to stick into the $!default you just added. :)
lizmat: At least, in the absence of an "is default" trait. 10:42
lizmat except it's called "default_value" here
jnthn Well, %cont_info is a compiler-internals hash.
It's not related to anything in the outside world.
It currently sets what ->value of the Scalar contains.
Thus the name. 10:43
pmurias jnthn: I'm fixing BEGIN for nqp, and I'm having problems with serializing &say, etc.
jnthn pmurias: I'm pretty sure BEGIN has no clue about its outer lexical scope...
Oh, you're trying to fix that...
:)
Um. Hmm. :)
pmurias yes
jnthn Yeah, some things I put off for a reason :D
I think the answer may be to look at giving subs code objects always, not just when they're multi. 10:44
See Rakudo's compile_in_context, though, if you didn't already.
pmurias I'm stealing code from compile_in_context, will look at it more ;) 10:46
jnthn: to create a code object, I need the orginal QAST (so they can be fixed up), so by the time I get the none-sixmodel code ref in the BEGIN handling code it's too late to do anything? 11:00
11:00 xenoterracide joined
jnthn pmurias: No, the idea was to install code objects in the first place 11:00
Not create them on demand. 11:01
That is, update routine_def
lizmat jnthn: not quite sure how to check for Nil in the value yet 11:02
container.c:46:59: warning: incompatible integer to pointer conversion passing
'int' to parameter of type 'PMC *' (aka 'struct PMC *');
...( STABLE(value)->type_check(interp, value, Rakudo_types_nil_get() ) ) {
jnthn STABLE(value)->WHAT == Rakduo_types_nil_get()
lizmat container.c:46:38: warning: comparison between pointer and integer ('PMC *' 11:03
(aka 'struct PMC *') and 'int')
if ( STABLE(value)->WHAT == Rakudo_types_nil_get() )
jnthn Though not sure why the warning
Um...how is Rakudo_types_nil_get() defined? 11:04
lizmat hehe
container.c:46:41: error: implicit declaration of function
'Rakudo_types_nil_get' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
jnthn OK, does it exist in types.h/types.c? :)
lizmat yeah, but types.h is not included, I guess that's the pb
jnthn ah 11:05
yeah, that'd do it
lizmat well, it compiles now
jnthn ship it!
lizmat first do some testing, who knows what I broke with this :-) 11:06
11:07 xenoterracide left 11:12 sqirrel left
lizmat Routine declaration requires a signature at line 2892, near "(:$of, :$r grrr 11:13
found it, tpyo 11:14
dalek ecs: 9634574 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
Typo
11:15
11:16 mstefanko left
masak hm. "A junction that is or-associative." -- it's not much to do with associativity, I think. 11:20
11:20 atroxaper left
lizmat jnthn: src/Perl/Actions.nqp: 210-212 all seem to use the same value: this seems wrong 11:21
masak: patches welcome?
masak think of "precedence" as the strength of the tightness by which the operator binds. think of "associativity" as the direction it wants to bind.
as far as I know, both "and" and "or" (in all their incarnations) are left-associative, because that's what people expect. 11:22
11:22 mstefanko joined
masak lizmat: yeah, fixing. 11:22
jnthn lizmat: Why? 11:25
If you say
my Int $x;
Then $x defaults to Int, you can only assign an Int, and you can only bind an Int.
lizmat but I would expect the default value to be set there already if one was specified 11:26
jnthn From the default trait?
No...we won't implement it that way
We'll set it to that as a default, then apply the traits later and it can fix it up.
lizmat r: my Int $x is default(4); # from this
camelia rakudo 567941: ( no output )
jnthn Right, it'll create it as Int for all of them.
lizmat r: my Int $x is default(4); say $x # expect 4 11:27
jnthn And then the trait_mod can tweak that initial setup.
camelia rakudo 567941: OUTPUT«(Int)␤»
dalek ecs: e0325a6 | masak++ | S99-glossary.pod:
[S99] associativity's got nothing to do with it :)
ecs: 793baba | masak++ | S99-glossary.pod:
[S99] actually explain API, not just expand it
jnthn Just like parameters are ro by default, but is copy or is rw tweaks them later.
Otherwise you end up special casing various traits in Actions.pm. I did that 3 years ago. It hurt. 11:28
lizmat ok, so the actual assignment of the default value for that specific container, needs to happen later?
jnthn Yeah
When we have container traits I suspect it'll be something like
multi sub trait_mod:<is>(Variable:D $v, :$default!) { 11:29
...tweaking here...
}
masak moritz: 'Some other objects that "Field".' -- this sentence no verb? did you mean to write a more complete sentence? :)
moritz: also, some other objects that 'Property' or 'Slot' or 'Member'. 11:30
moritz I meant to write "languages", and I meant to write a verb, yes :-) 11:31
masak++
dalek ecs: 1c27694 | moritz++ | S99-glossary.pod:
[S99] fix "attribute" explanation, and exand it. masak++
11:34
jnthn hands moritz++ a p :) 11:35
11:35 pecastro_ joined, pecastro left
masak "Warnocked -- This lemma will never be explained." -- ok, I see the attempt at humor here. it fails the usefulness test, though. 11:36
jnthn
.oO( I'd respond to the feedback but it's funnier not to :P )
11:38
masak :P 11:39
11:39 daniel-s_ left
masak "I know, let's create a resource that will explain *words* to people!" ...later... "Oh, this is a chance to make hilarious in-jokes, at the expense of practically all explanatory power!" FAIL 11:43
rule #19: if you're laughing and the student is looking puzzled, what you're doing is probably not teaching. :) 11:44
lizmat pleads guilty 11:50
11:51 pecastro_ is now known as pecastro
masak there should be a source docuement we could link to with Warnock's original email, or something. 11:51
lizmat now running spectest with Nil softfail patch
masak heh, when I started out with Perl 6, I thought Warnock was this really productive developer, that just applied patches as soon as someone asked something :) because the then-weekly summaries kept saying "Warnock applies". 11:52
lizmat for ~20 mins&
12:19 dayangkun joined
FROGGS can somebody explain what that means? github.com/libtom/libtommath/blob/...rshd.c#L28 12:20
tadzik well, if you shift by more digits than a has, it zeroes a, which sounds like a fair deal 12:22
unless I misunderstand a->used
FROGGS I have no idea what ->used is
moritz a->used is indeed the number of digits used
FROGGS hmmm
do I need to compute that?
moritz where "digit" is usually 30 bits on 32 bit platforms, and ~50 on 64 bit platforms 12:23
no
FROGGS because mp_rshd( 50000, 1 ) results in 0
moritz it does that for you
FROGGS hmmm
moritz well, maybe the problem is really that you expect bn_mp_rshd to shift by b bits 12:24
and it shifts by b digits
orelse the code is buggy
FROGGS ohh
moritz what does the documentation say about mp_rshd?
FROGGS shift right a certain amount of digits
-.-
okay, back to the previous plan 12:26
moritz there's probably a mp_rsh or so too
FROGGS: what are you trying to do?
FROGGS rn: say -50000 +> 8 # fix this
camelia niecza v24-86-g39ab531: OUTPUT«-196␤»
..rakudo 567941: OUTPUT«-195␤»
moritz well, libtommath implements sign + mantissa, not 2's complement 12:27
which is why I wrote some buggy translation code between the two
which you likely have to fix
FROGGS ahh, I was hoping I just need to *use* it :/ 12:28
12:28 sqirrel joined
moritz see function grow_and_negate in src/vm/parrot/ops/nqp_bigint.ops 12:29
FROGGS yes, I see this one 12:30
moritz maybe nqp_bigint_shr and nqp_bigint_shl just need to use it
(before and after the shifting, that is)
FROGGS ahh, I only did it before 12:31
moritz that would be unwise, I think :-) 12:32
FROGGS moritz: that is what currently compiles: gist.github.com/FROGGS/836912b4855d6d9f05e1
12:33 jaldhar left
colomon is trying to remember why he was converting between 1s and 2s complement relatively recently... 12:34
12:34 xinming left 12:35 ajr joined, xinming joined, ajr is now known as Guest22051
moritz because you could! 12:36
12:36 Guest22051 is now known as ajr_
colomon nope, because I had to learn what I was doing to do it! 12:37
colomon remembers talking with TimToady about it...
12:38 birdwindupbird left
pmurias jnthn: how can I check if something is a nqp integer or nqp string? 12:41
colomon noooooo! new github interface, don't know how to do anything!
moritz colomon: msb / lsb probably
at least that's what tina.perlgeek.de/perl6/search/?nick...complement suggests
jnthn pmurias: nqp::isint, nqp::isstr
(it's portable; looks for P6int/Pstr reprs on JVM/MoarVM) 12:42
uh, actually maybe it goes on unboxability
forget
moritz (woah, searching by nick name is case sensitive; there's a reason that search feature is in beta)
colomon moritz++ 12:43
12:44 xinming left 12:48 dmol left 12:49 dmol joined
pmurias how should I build both nqp-jvm and nqp-parrot using a single repo? 12:49
12:50 xinming joined
jnthn pmurias: If you want to keep both built, with difficulty 12:51
pmurias: I usually have one at a time and keep an install of the other.
pmurias: You could never work in your actual nqp checkout, but instead make a pair of local clones and shuffle commits between those
Since it's all local you can do as you wish with the commits before pushing them on upwards. 12:52
Though maybe you want a bear clone for that
uh, bare
12:54 konundra joined 12:56 benabik left 13:02 skids left
lizmat going down for full backup and restore on new MBP 13:04
back in a few hours&
13:04 lizmat left
[Coke] /me yawns 13:05
timotimo so, if i were to "use fatal", would i get a 50% speed boost in a properly optimized perl6 implementation? 13:07
FROGGS moritz: gist.github.com/FROGGS/836912b4855d6d9f05e1 13:10
pmurias jnthn: what does nqp::getstaticcode do?
FROGGS moritz: so I called grow_and_negate again on the result of mp_div_2d...
pmurias jnthn: it's failing when passed a code object (after I wrapped all the subs in ones)
FROGGS moritz: is it what you meant? 13:11
moritz FROGGS: does it work? :-) 13:13
13:13 PacoAir joined
FROGGS no, see the test.out in the gist 13:13
jnthn pmurias: It needs a coderef
moritz I think it should be grow_and_negate both before and after the bit shit, only if it's negative
and no two_complement_bitop (that's meant for two bigints) 13:14
FROGGS okay
moritz: thanks
jnthn pmurias: It gives back the original, static code ref, as opposed to a particular closure clone 13:15
13:18 birdwindupbird joined, fridim__ joined 13:23 xilo joined 13:26 Guest1337 joined 13:30 JimmyZ left 13:31 JimmyZ joined
[Coke] jnthn: any new interesting errors on the gist? :) 13:38
jnthn [Coke]: "nextsame/nextwith/callwith is not in the dynamic scope of a dispatcher" is a bit weird 13:40
[Coke]: I had that, but thought I fixed it
In nqp 2cb852a
[Coke] hurm. it is possible that when I ran it manually, I didn't update nqp. 13:42
jnthn ah
That may 'splain it
[Coke] I'll post a new one after today's run. 13:43
13:43 kingbeast joined
jnthn wonders if we'll clear 90% today :) 13:43
[Coke] r: say 25717*.9-23052 13:45
camelia rakudo 567941: OUTPUT«93.3␤»
[Coke] that's what we needed after about 2pm eastern.
if not, it'll be close - if those nextsame things are fixed, that's another 44.. 13:46
jnthn They're not all fixed... 13:47
oh, you didn't have nqp::attrinited fix also though, which got us default.t and probably some other passes.
So we may just scrape past :)
If we do, I'll drink a nice beer and write a blog post update :) 13:48
gfldex blog++
masak post++
colomon jnthn++ 13:49
jnthn beer++ 13:50
diakopter karma++
FROGGS \o/ 13:51
[Coke] -> meetings. 13:53
13:57 dayangkun left
masak meetings++ # oh wait 13:58
13:59 kaare_ joined
colomon meetings-- 13:59
14:02 logie joined 14:03 dayangkun joined 14:11 domidumont left, domidumont joined 14:24 rafl left, rafl joined
[Coke] returns, unscathed. 14:26
14:28 SamuraiJack_ left 14:30 skids joined
pmurias jnthn: what's a code object creating equivalent of takeclosure? 14:31
jnthn pmurias: I think in Rakudo we just call .clone on the code object 14:33
14:36 crab2313 joined
pmurias plus p6capturelex which seems to just extract $!do 14:36
jnthn yeah
14:39 BenGoldberg joined
pmurias [Coke]: have you started working on the opcodes docs? 14:39
pmurias would like to add the little bits of info about strange ops he gets from jnthn somewhere 14:40
14:40 geekosaur left
[Coke] pmurias: no. was derailed. 14:40
14:40 geekosaur joined
[Coke] pmurias: start throwing them in a gist or something? 14:40
TimToady sorear: I would consider 'print $handle' printing to handle to be a plain old bug 14:42
jnthn r: print $*IN 14:43
camelia rakudo 567941: OUTPUT«-»
jnthn r: print $*OUT
camelia rakudo 567941: OUTPUT«-»
jnthn Hm :)
Didn't quite expect they'd stringify that way. But ok :) 14:44
TimToady hmm, I got Nil in the REPL
jnthn say $*IN
r: say $*IN
camelia rakudo 567941: OUTPUT«IO::Handle<->(opened, at line 0 / octet 0)␤»
TimToady that wone works okay
s/w//
jnthn r: say $*IN.Str
camelia rakudo 567941: OUTPUT«-␤»
jnthn Yeah, it's calling print and producing the Str output. So seems to do the right thing in terms of print. 14:45
TimToady in the REPL, when I say print $*OUT;, I get a -> prompt
jnthn Maybe IO::Handle.Str wants to look different...
Sure, it's the - and then no newline. :)
TimToady ah
TimToady better drink the rest of the pot of coffee 14:46
jnthn ;)
TimToady so anyway, no bug of the sort sorear++ seemed to think was there 14:47
jnthn
.oO( phew :) )
14:47 crab2313 left
FROGGS moritz: negative values are still borken: gist.github.com/FROGGS/836912b4855d6d9f05e1 14:47
14:48 fgomez joined
FROGGS (and I have no clue what I am doing) 14:49
moritz + grow_and_negate(a, (&b)->used, &c); 14:54
+ mp_div_2d(&c, $3, &d, NULL);
+ grow_and_negate(&d, (&b)->used, e);
it looks like the last line has no effect at all
TimToady assigning Nil to a hash element sets the element to the default for the array, which does not delete it unless it happens to be some kind of KeyHash 14:55
FROGGS hmmm, why?
TimToady s/array/hash/
moritz $3 is a PMC, and the return value
so the last line doens't touch the return value at all
FROGGS I thought $3 is the INT
moritz erm, wait 14:56
14:56 arnsholt joined
FROGGS mp_div_a( 32, 2, $x ) is $x = 32 +> 2 14:56
arnsholt o/
moritz erm right
FROGGS at least that is what I think
jnthn arnsholt! \o/
FROGGS hi arnsholt
long time no read
TimToady thinks that IPv6 addresses will also be promoted to the level of the incompetence, perhaps by assigning an IP addr to every object in your program :) 14:57
*their
moritz right, memory addresses :-) 14:58
arnsholt My IRC machine has had connectivity issues recently, thus the lack of IRC 14:59
moritz knows that feeling very well 15:01
masak arnsholt! \o/ 15:07
15:09 ManAmongHippos joined 15:12 benabik joined, Khisanth left
timotimo so, if it's true that sink context and Failure objects make perl6 impossible to execute swiftly, what's the answer to that? 15:12
15:13 birdwindupbird left 15:14 xinming left
JimmyZ remove sink context, per sorear++ said :P 15:14
TimToady sink context is not in the same league as Failure, in that respect
timotimo as in less bad or worse?
TimToady yes
FROGGS moritz: I'm walking home now... If you have some hints/thoughts about rshift, please dump there here :o) 15:15
timotimo heh. so which of the two is it? :)
TimToady it's less worse :)
on returning Failure, even if you outlaw that on --> Int, you still have the problem of returning an Int type object 15:16
15:16 xinming joined
timotimo OK. and the answer to Failure is: "use fatal can make it execute as fast as if Failure didn't exist"? 15:16
TimToady but at least it will dispatch to the right multi before failing :)
jnthn TimToady: Yes, but that's fixable with returns Int:D :)
timotimo does --> Int:D make any sense?
jnthn Which is what the constraint really should be saying. 15:17
TimToady well, the question is whether we default all our types to Maybe/Error types or not
if it adversely impacts performance, I can live with --> Int being a kind of 'use fatal'
jnthn TimToady: It means we can't trust a retursn declaration for making an inlining decision, which feels high impact to me.
TimToady timotimo: yes, that should work too
jnthn: I understand the argument 15:18
jnthn TimToady: Especially when we've talked about aggresive inlining being one of the things we like to know we can do.
timotimo "that" refering to use fatal or --> Int:D?
TimToady and I'm kinda agreeing with you already
jnthn *nod*
timotimo yay, perl6 is saved ;) 15:19
jnthn Sink is a more interesting one because it's the thing that lets us know when we don't need to build up result lists.
So it can help as well. :) 15:20
TimToady it's basically serving the role of the IO monad
15:20 xinming_ joined
TimToady saying when side effects are expected 15:20
15:21 xinming left
timotimo how high is the percentage of cases where sinkness can be determined at compile time? would there be any value to compiling two different versions of each method and compile-time switching to the definitely-sunk version? 15:21
or is that not even the problem?
TimToady timotimo: most of the time it's compile-time; it's the run-time aspects that are debatable
but then, the same argument applies to lazy/eager/hyper/race
"How much does my caller care about when things happen?" 15:22
timotimo mh 15:23
TimToady if we can limit that handshaking to listy calls, then scalar calls don't have to do that sort of handshaking
but this is one of those areas where we're doing research :) 15:24
15:24 FROGGS left, bluescreen10 joined 15:25 Khisanth joined
timotimo is there a :Something that means "defined or undefined, both is okay"? 15:26
so that it would make sense to turn --> Int into --> Int:D by default 15:27
TimToady but perhaps the called function doesn't really get involved; it just returns a listy thing, and the caller then instructs that listy thing which context it's in; this would save having to pass context inward
timotimo: I don't think we should try to DWIM that
:D is short for a reason 15:28
timotimo makes sense
it would be a healthy default for performance i guess ... what about the "use fatal" thing i wondered about before?
TimToady Haskel picks the other default, and has to add Maybe/Error monads all over
we just pick the other default
timotimo ah, yes, that's a sane choice indeed 15:29
sergot hi! o/ 15:30
TimToady another thing is that I'm not entire sure we should always be optimizing for inlineability; there are hardware architectures where function calls are just about as fast as inlined code, and may be faster depending on the caching
on such architectures, inlining actually slows you down 15:31
moritz then you don't inline :-)
timotimo but are these calls actually at a level that would make those hardware details turn out different?
15:31 xenoterracide joined
TimToady yes, it's a different level, but the same principles *might* apply 15:31
timotimo we're not yet generating machine-level instructions, and even if so, that would probably be more interesting for the jit rather than the compiler 15:32
TimToady I just don't want to get blinders that make us focus on one optimization
timotimo fwiw, i don't know terribly much about optimisation and just grasping at any straw that claims to make perl6 run faster ;)
TimToady fundamentally, it's knowing the types that allows for optimization; inlining is just one possible manifestation of that 15:33
but the whole notion of gradual typing is not forcing people to put types where they don't contribute much to optimization
timotimo that's a good point 15:34
moritz but when you declare a type, you should rely on it being enforced, no?
TimToady moritz: sure, that's what I'm agreeing with jnthn++ about 15:35
but the flip side is whether Failure is a "bottom" type 15:36
15:36 Pleiades` left 15:37 xinming joined
TimToady my current feeling is that we don't yet know enough about type theory in Perl 6 to introduce a bottom type efficiently 15:37
15:37 xinming_ left
TimToady it also might be a bad idea to think that a bottom type could carry failure information :) 15:38
15:39 FROGGS joined
TimToady so for now I am content that Failure should be a conceptual type (like Junction) that sits outside of Any 15:39
15:40 Pleiades` joined
TimToady (assuming the default return type is --> Mu, or it won't work) 15:40
shachaf Is the main point of "gradual typing" really optimization? 15:41
TimToady the main point is user convenience while not ruling out writing faster code when you want to
user convenience comes first because the system may be able to optimize it anyway based on dynamic performance characteristics 15:43
timotimo right, the JIT approach?
TimToady beyond JIT, even
hot path analysis
certainly a realm where the JVM has done some work 15:44
timotimo ah; what pypy has, the tracing jit, is probably a combination of what you mean + a jit
shachaf I mean that I don't think of optimization as being the point of types in the first place. But I see that's not the topic of the discussion here anyway.
15:44 rindolf joined
TimToady sure, optimization is not the main point of types 15:45
nor is strong typing, in Perl 6
it's really to be able to express multiple dispatch
that's the main point of types in P6
timotimo i like having my stupidest mistakes pointed out to me directly at compile time, too, which is possible only if you specify types here and there
TimToady yes, and P6 is allowed to point out such mistakes when it can deduce them, but it's not the main reason for types in P6 15:46
15:46 Guest1337 left
TimToady the real reason for types is to allow you to write code of the correct genericity/specificity for the problem 15:46
which ties back to the notion that we know exactly which language we're in 15:48
which may be a generic language, which is fine as long as it's on purpose
but accidental genericity is what kills things like source filters
as you add more multis, you are gradually increasing the intentional genericity of that call
and that's a good thing 15:49
15:49 kaleem left
TimToady unless of course you shouldn't have :) 15:49
timotimo that sounds very sensible indeed. 15:50
FROGGS skids: ping 15:51
segomos moritz: problem seems to be gone after a reinstall of DBIish - thank you 15:52
timotimo life is too short for having empty or otherwise broken ballpoint pens lying on or next to your desk
15:52 fhelmberger left
FROGGS .oO( lying on or next to you ... ) 15:53
timotimo oh bleh, my super awesome lamy combined ballpoint pen and pencil doesn't ballpointpen any more
i also haven't been able to figure out how to open it for replacing the contents yet 15:54
oh
that was simple
FROGGS hehe 15:55
15:56 domidumont left 15:57 raiph joined
pmurias jnthn: nqp::freshcoderef(sub {}) breaks when wrapping everything in code objects, should I just extract the sub from the code object? 15:57
jnthn pmurias: yeah
All the code* ops expect to work on a CodeRef REPR or whatever the equivalent is on the current backend 15:58
pmurias should we have a method on code objects to return the code ref? 15:59
extracting $!do by nqp::getattr is kind of ugly
jnthn Yeah, but we shouldn't be doing it too often... 16:00
pmurias everytime we call a code* op 16:01
well, almost every time
jnthn yes, but most usages of those are *inside* the code object where you have $!do
And there are methods like .name or .clone
pmurias so maybe we should move nqp::freshcode inside a fresh method? 16:02
jnthn That'd be better
16:05 Chillance joined
Woodi belives in one type of optimalisation: do less 16:22
timotimo indeed, you can hardly ever tell your computer to do something faster, you can mostly only tell them to do less 16:23
even when you're parallelising, you're basically telling your computer to "do less waiting" :P 16:24
16:36 raiph left 16:38 raiph joined
timotimo i tweeted "i finally ordered a new aerator" (in german, and the german word for it is "Perlator") and i was asked "perlator 6?" m) 16:46
arnsholt =D
arnsholt downloads JNA 16:49
16:55 pochi left 16:57 dakkar left 17:00 pochi joined
arnsholt Holy Makefile, Batman. JNA's Ant logic for compiling the native sources looks awfully complicated... 17:03
17:03 rindolf left
arnsholt jnthn: JNA uses libffi, it seems. You think that might become a problem if I end up using JNA for NativeCall? 17:05
17:06 bluescreen10 left 17:07 bluescreen10 joined
moritz blogs.perl.org/users/stevan_little/...d-moe.html # mostly off-topic but still interesting, IMHO 17:07
17:07 xenoterracide left 17:09 raiph left 17:12 rindolf joined
moritz has implemented basic ajax polling for the IRC log 'today' page 17:12
17:13 raiph joined
moritz now comes the hard part: implementing some UI that makes it easy to enable it, configure the polling rate, and switch it off by default :-) 17:13
diakopter moritz: :) 17:17
jnthn arnsholt: Are there binaries available? 17:21
arnsholt: e.g. for Windows users? 17:22
jnthn guesses so if it's popular :) 17:23
arnsholt: Anyway, it's probably fine
17:24 baest left
jnthn arnsholt: Seems that JARs with the platform stuff bundled in exist. 17:25
17:26 ajr_ left
timotimo moritz: are you looking for polling intervals in the range of multiple minutes? otherwise, perhaps pushing via websockets would be a better choice? 17:29
17:29 rindolf left, konundra left
moritz timotimo: so far I thought of ~20s intervals 17:30
timotimo: I thought about websockets, but I don't think it's worth the effort
17:30 daxim left
moritz (and I have no idea how easy or hard deployment of websockets code is) 17:30
arnsholt jnthn: Yeah, I think there are binaries 17:31
djanatyn hmm, doing command line magic with perl6 is confusing me 17:32
perl -ne 'if (/^>/) { print }' foo.txt 17:33
^- doing that in perl5 is easy enough. but with perl6
perl6 -ne 'if /^>/ { say }' foo.txt
moritz perl6 -e 'say if /^>/' 17:34
perl6 -n -e 'say if /^>/'
that should work
djanatyn Preceding context expects a term, but found infix / instead
oh, my perl6 is old?? 17:35
weird, I know I compiled a new one juts a few days ago
17:35 rindolf joined
djanatyn okay, found my new version 17:36
gfldex djanatyn: what does perl6 --version say?
nvm
djanatyn yeah, just installing it, one sec 17:37
masak hopes he can some day write 'perl6 -ne' :)
djanatyn me too
I've set up shop with a bunch of bioninformaticists during the summer 17:38
masak nice!
djanatyn they often need quick fixes I can give them with a regular expression or two so I'm trying to refine my setup
and timotimo suggested me teaching them perl6 grammars
masak makes sense.
djanatyn while that seems a bit, uhh, not-very-practical, I *can* start using perl6 instead of just using regular perl 17:39
since most of the time they just send me files to my laptop on a flash drive to reformat for them
masak :)
17:40 ManAmongHippos left
FROGGS moritz: mp_add_d(b, 1, b) is the negation of b? 17:44
ahh, no, there is an mp_neg too
djanatyn This is perl6 version 2013.06-39-gd02067f built on parrot 5.5.0 revision RELEASE_5_5_0 17:46
woo :)
FROGGS :o)
masak version-revision-release oh my 17:47
djanatyn sprunge.us/cTKW -- hmm, still getting an error :( 17:49
moritz oh, /^\>/ 17:50
FROGGS > is a regex special token nowadays
17:50 stevan__ left
djanatyn okay I escaped it and now it's just kind of sitting there 17:51
foo.txt is 296478 lines; should that take a long time?
it's, umm, still sitting there ._.
FROGGS hmmm, just wait a bit
(to be sure)
djanatyn now it's printing out a lot of empty lines 17:52
if I type a character it looks like it's flying upwards :)
FROGGS maybe it should be .say ?
hehe
17:52 fgomez left
FROGGS r: $_ = "hi"; say 17:52
camelia rakudo 567941: OUTPUT«␤»
FROGGS r: $_ = "hi"; .say
camelia rakudo 567941: OUTPUT«hi␤»
FROGGS see 17:53
djanatyn there we go
okay I changed it but now we're juts sitting here a long time again
17:53 fgomez joined
FROGGS and yes, speed is still an issue (but we are working on that) 17:53
djanatyn there we go!
yeah, I'm aware that speed isn't the fastest 17:54
at this speed it doesn't seem very practical for me to use perl6 to make changes to large files, but I'm sure I can find other ways to incorporate it
like maybe automating tasks that I need to do on lots of things? I'll figure something out
FROGGS I'd say it comes to use when perl5's regexes are just too unreadable 17:55
then the Perl 6 grammars are just awesome
djanatyn mmm
FROGGS and there might be some other reasons of course :o)
djanatyn well, this file is only 18M
a lot of the files we work with here are several gigabytes, so if it's taking that long using perl6 regexes doesn't seem very practical 17:56
FROGGS true
djanatyn but like I said, there's lots of other stuff we do here, so I'll look out for new ways to use perl6
FROGGS I'd guess it wouldnt even finish
djanatyn++
17:56 kaleem joined
timotimo it will be interesting to investigate jvm performance in such cases 17:57
djanatyn yeah, I'd be willing to try that out 17:58
17:58 spider-mario joined
timotimo do you know how to build it? 17:58
djanatyn I have lots of real world, high performance test cases
yes
timotimo i read some commit recently that seemed to say "the evalserver can now take commandline args" or something similar
no idea how complete that is
djanatyn I run most jobs on a 16cpu cluster called BioU
but we've all got access to a rather large shared memory system with 4096 cores 17:59
we can run perl6 on that :)
as a matter of fact, I'll go compile perl6 over there now
timotimo if you're applying one regex to each line separately, that should trivially be distributable; i just don't know what tool to use to get proper splitting and distribution done without any headaches 18:00
18:00 konundra joined
FROGGS O.o 18:00
djanatyn FROGGS: I work at the Pittsburgh Supercomputing Center :) it's at CMU 18:01
www.psc.edu/index.php/computing-res...blacklight -- this is the machine I'm compiling perl6 on now 18:02
dalek p: 3890c61 | (Pawel Murias)++ | / (5 files):
Wrap subs in a NQPRoutine code object when NQPRoutine is in scope.

We need this to fix BEGIN blocks.
18:03 chrisdev joined
jnthn pmurias: This works out on Parrot and JVM? 18:03
FROGGS djanatyn: I believe our biggest machine has 24 cores and 96gig ram :o( 18:04
djanatyn FROGGS: D:
pmurias jnthn: on parrot, testing it on the JVM right now 18:05
pmurias just relised rakudo-jvm depends on HEAD nqp, and not a specific version 18:06
jnthn pmurias: yes
pmurias tries to fix the commit 18:11
18:15 stevan_ joined 18:16 kaleem left
pmurias jnthn: do we need line 924 in NQP::World? (github.com/perl6/nqp/commit/3890c6...86#L0R924) 18:17
I get a Duplicate method name&signature on the jvm
* NQP::Actions 18:18
jnthn If we don't have that, does the block every get pushed? 18:19
*ever
FROGGS gah, almost: gist.github.com/FROGGS/836912b4855d6d9f05e1 18:20
djanatyn okay, compiled the latest rakudo star on the high performance shared memory system I have access to 18:21
I'll let you guys know if I end up doing anything with it
FROGGS cool
djanatyn um, does rakudo currently have support for parallelism
because if not that will kind of limit the use of the 4096 available cores 18:22
jnthn djanatyn: No, but now there's a JVM port making good progress I'm hoping to work on that rather soon.
djanatyn oh yeah!
timotimo the jvm port of rakudo already gets a performance boost from the fully parallelized (?) GC of the jvm 18:23
also, some jitting
djanatyn and you're like the living legend who has done an inhuman amount of work on the jvm port
jnthn++
FROGGS well, he is Not Quite Human(tm) 18:36
pmurias jnthn: did the name&signature exception appear under other circumstances? 18:38
jnthn pmurias: There is one spectest in Rakudo that explodes that way. That's the only other place I ever saw it. I didn't try to track down what's going on. 18:39
18:39 ManAmongHippos joined
TimToady npr: say (42,1..*) eqv (42,1..10) 18:51
camelia rakudo 567941: OUTPUT«False␤»
..pugs: OUTPUT«␤»
..niecza v24-86-g39ab531: OUTPUT«True␤»
TimToady nieczabug
dalek rl6-roast-data: b2cf05c | coke++ | / (5 files):
today (automated commit)
[Coke] r: say 26087*.9-23438
camelia rakudo 567941: OUTPUT«40.3␤»
[Coke] 41 more tests, jnthn. :)
timotimo great, rakudo.parrot went up and rakudo.jvm got an even better percentage! :) 18:52
jnthn Aww...no awesome beer and blog post tonight then!
moritz speaking of awesome blog posts... masak, how's the t3 review coming along? :-) 18:53
18:53 ggoebel2 joined
timotimo you were going to wait for an even >= 90%? 18:53
jnthn r: say 23438 - 23052
camelia rakudo 567941: OUTPUT«386␤»
jnthn We gained 386 tests since yesterday, though :)
timotimo: Yeah :)
I'll just have a good beer and make more tests pass, then, I guess :P 18:54
timotimo and then still write the blogpost today? ;)
nah, some people might consider that cheating!
18:54 ggoebel left
timotimo jnthn: if my dir changes had been merged, there would have been 12 more tests passing *nag nag nag* ;) 18:56
jnthn Oh, there's somehing outstanding for me to review?
nwc10 right now there will be zero passing tests on NQP HEAD
jnthn :/
nwc10 building HEAD^ to see if the commit 3890c61eda8d3c1a7c0f59147015a7b60fa0fc86 is the porblem 18:57
jnthn Yeah, that patch really shoulda gone in a branch if it wasn't tested on both backends...
timotimo github.com/rakudo/rakudo/pull/173 - i'd love a review of that :)
jnthn It's a tricky change I'd kinda been putting off... :) pmurias++ for taking it on though
nwc10 would have waited until I knew the answer, but was thinking that it's a bad plan to do a pull request in this state.
timotimo pull requests also serve very well as discussion platforms 18:58
i think the verbiage should be a bit different for pull requests in general 18:59
or maybe there should be a little switch that says "i'd like this discussed, but probably not yet merged"
at the moment it says "$user wants to merge $n commits into $branch" or something
nwc10 OK, HEAD^ builds and has got to running tests. First 5 pass 19:00
I doubt I can be more helpful than this
19:02 lizmat joined
lizmat good *, #perl6! 19:02
jnthn *, lizmat 19:03
lizmat coming to you from a brand new MBP, which should do spectests about three times as fast
moritz doubled number of CPUs, and each a bit faster? 19:04
diakopter lizmat*=3 19:05
lizmat 2.8GHz i7 with 768G SSD, 16G RAM
jnthn mm...new laptop :)
timotimo oooh 16 gb ram
jnthn should really get around to that before the next time he does a hackathon...
moritz oooo
lizmat but make is not installed
jnthn Whoa! Dammit, that beats my desktop machine :P
lizmat is fetching latest Xcode
timotimo i was thinking about if my next laptop should have 8 or 16
moritz doesn't have a laptop anymore :( 19:06
timotimo my desktop has 8 and that seems to be enough
moritz timotimo: 32, of course :-)
flussence
.oO( they make SSDs that big now?! )
lizmat jnthn: but then again, this one doesn't have a DVD drive
benabik The answer to "how much memory should I install" is "as much as you can afford"
moritz but who needs optical drives anyway?
jnthn lizmat: Hmm. 19:07
lizmat indeed, and I have plenty of external ones if I really need one
lue flussence: yes, but HDDs are *much* cheaper still :) 19:08
timotimo my next laptop will probably be a t4x0s with an ssd used for caching and a big-ish HDD, as well as an ultrabay extra-battery and hopefully properly high resolution on the display
pmurias jnthn: sorry for taking rakudo-jvm down 100%, I fought "ahh, rakudo uses some version stored in that file... so nothing bad will happend if I push and test on jvm afterwords" ;) 19:09
timotimo would be amazing to get a haswell laptop *drool*
flussence I'm not picky when it comes to laptops, all I want is a good screen, keyboard & battery... none of which are in my current one :D 19:10
timotimo in my experience, thinkpads come with pretty darn good linux support, which matters a lot for me 19:13
jnthn has had 2 thinkpads and plans to stick with 'em
The battery life on my current one is pretty nice.
It's funny working on it for hours, and masak going "huh...you weren't plugged in all that time?" :D 19:14
Gotta keep winning the laptop battery life wars at $dayjob :P
lizmat this MBP has a battery with 8731 mAh 19:15
jnthn :)
timotimo i wish those new battery technologies we keep hearing about all the darn time would actually land in a form that is usable ... 19:16
TimToady they should figure out how to power laptops off of excess body fat... 19:17
geekosaur scaling batteries up without having them explode or stop working is remarkably difficult
FROGGS moritz / jnthn: I believe I have a fix for right shift on negative numbers: gist.github.com/FROGGS/836912b4855d6d9f05e1
timotimo TimToady: that could get dangerous, remember all the people who starve while playing MMOs? imagine they are being drained off their fat reserves at the same time as well 19:18
FROGGS TimToady: in case it is optional...
timotimo scary, scary deaths :o 19:19
FROGGS .oO( Welcome to our starvathon! o/ )
timotimo speaking about starving, i shoud go do a grocery-run before stores close 19:20
TimToady obviously if you're underweight you shouldn't use it; instead you should attach your pet goose you've been forcefeeding
FROGGS hehe
>.<
timotimo that sounds ... pretty terrible :|
19:21 tomyan joined
TimToady where we were in southern France, you don't order foie gras, it just comes anyway 19:22
lizmat TimToady: that's a very Franch way of doing things
French
;-)
FROGGS *g*
19:23 tomyan left
FROGGS I hope there are sane bitops tests, but I think I already know the answer 19:24
TimToady y'know, it's quite possible to be sane, and yet very wrong... 19:25
19:28 cognominal left, cognominal joined
jnthn OK, enough JavaScript for today... 19:30
pmurias jnthn: you do JavaScript at $work?
jnthn pmurias: Amongst many other things. 19:31
But yeah, JavaScript this week. :) 19:32
FROGGS n: say (-300..300 X+> -5..5)
camelia niecza v24-86-g39ab531: OUTPUT«-1 -1 -1 -1 -1 -300 -150 -75 -38 -19 -10 -1 -1 -1 -1 -1 -299 -150 -75 -38 -19 -10 -1 -1 -1 -1 -1 -298 -149 -75 -38 -19 -10 -1 -1 -1 -1 -1 -297 -149 -75 -38 -19 -10 -1 -1 -1 -1 -1 -296 -148 -74 -37 -19 -10 -1 -1 -1 -1 -1 -295 -148 -74 -37 -19 -10 -1 -1 -1 -…
FROGGS n: say (-300...300 X+> -5...5)
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤"X+>" and "..." are non-associative and require parens at /tmp/avx8cmUHfa line 1:␤------> say (-300...300 X+> -5...⏏5)␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting lin…
jnthn Get to go back to C# after this, I think :)
FROGGS is the latter a bug?
jnthn std: say (-300...300 X+> -5...5) 19:33
camelia std d4cc5ab: OUTPUT«===SORRY!===␤"..." and "X+>" are non-associative and require parens at /tmp/hvCusZFYmb line 1:␤------> say (-300...300 X+> ⏏-5...5)␤"X+>" and "..." are non-associative and require parens at /tmp/hvCusZFYmb line 1:␤------> say…
jnthn r: say (-300...300 X+> -5...5)
camelia rakudo 567941: OUTPUT«-300 -299 -298 -297 -296 -295 -294 -293 -292 -291 -290 -289 -288 -287 -286 -285 -284 -283 -282 -281 -280 -279 -278 -277 -276 -275 -274 -273 -272 -271 -270 -269 -268 -267 -266 -265 -264 -263 -262 -261 -260 -259 -258 -257 -256 -255 -254 -253 -252 -251 -250 -249 -248 …
[Coke] I must be using junctions wrong, because I keep wanting to collapse them into distinct states.
19:33 BenGoldberg left
jnthn Probably legit. 19:33
masak [Coke]: yes, if you want states back out of junctions, by definition you're using them wrong. 19:34
TimToady a legit bug, I think jnthn++ means
[Coke] r: say (1|2|3).^methods;
camelia rakudo 567941: OUTPUT«new BUILD postcircumfix:<( )> sink AUTOTHREAD Bool Str ACCEPTS gist perl␤»
masak submits rakudobug
TimToady might already be there somewhere 19:35
jnthn TimToady: I meant niecza/std's message was legit, yes
I thought I'd put in the non-assoc stuff...
[Coke] r: say (1|2|3).sink
jnthn r: 1..10..20
camelia rakudo 567941: OUTPUT«Nil␤»
rakudo 567941: OUTPUT«===SORRY!===␤Operators '..' and '..' are non-associative and require parenthesis␤at /tmp/vsaexKbPTz:1␤------> 1..10.⏏.20␤ expecting any of:␤ postfix␤ dotty method or postfix␤»
jnthn Hmm. I did. Is there more than one way to be non-assoc? :)
[Coke] r: say (1|2|3).perl
camelia rakudo 567941: OUTPUT«any(1, 2, 3)␤»
[Coke] r: say ((1|2|3)+(4|5)).perl 19:36
camelia rakudo 567941: OUTPUT«any(any(5, 6), any(6, 7), any(7, 8))␤»
TimToady nr: say 1,2 X 3,4 Z 5,6
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤"X" and "Z" are non-associative and require parens at /tmp/UHmXFTofvK line 1:␤------> say 1,2 X 3,4 Z ⏏5,6␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die …
..rakudo 567941: OUTPUT«1 3 1 5 1 4 1 6 2 3 2 5 2 4 2 6␤»
TimToady jnthn: apparently
jnthn :)
TimToady nr: say 1 <=> 2 <=> 3 19:39
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤"<=>" and "<=>" are non-associative and require parens at /tmp/fyOGuconWy line 1:␤------> say 1 <=> 2 <=> ⏏3␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (di…
..rakudo 567941: OUTPUT«===SORRY!===␤Operators '<=>' and '<=>' are non-associative and require parenthesis␤at /tmp/fypD_UusZt:1␤------> say 1 <=> 2 ⏏<=> 3␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤»…
TimToady that's the normal way to be non-associative
with list infixes, the associativity is allowed only between identical operators 19:40
so X X is okay, but X Z isn't (or X ... )
s/list/list associative/ 19:43
nr: say 1 | 2 ^ 3 19:44
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤"|" and "^" are non-associative and require parens at /tmp/Flnck0PR21 line 1:␤------> say 1 | 2 ^ ⏏3␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) ␤…
..rakudo 567941: OUTPUT«any(1, one(2, 3))␤»
TimToady same deal
pmurias all nqp-jvm test normally pass 19:47
?
as I'm getting a crazy java.lang.VerifyError exception on some tests 19:48
lizmat my first spectest on the new machine: Files=741, Tests=26239, 479 wallclock secs ( 8.75 usr 2.69 sys + 2680.17 cusr 183.81 csys = 2875.42 CPU) 19:52
t/spec/S32-io/IO-Socket-INET.t took a very long time, about 30 seconds
hmmm… suddenly I have changes to rakudo/Binder.java in my active set 19:57
which I'm very sure I didn't do?
FROGGS nr:: say "11 1111 111 111 11 11 1111 11 11 1 11 111 11 111 111".split(/ <?before .**10..15> ' ' /)
nr: say "11 1111 111 111 11 11 1111 11 11 1 11 111 11 111 111".split(/ <?before .**10..15> ' ' /)
camelia rakudo 567941, niecza v24-86-g39ab531: OUTPUT«11 1111 111 111 11 11 1111 11 11 1 11 111 11 111 111␤»
FROGGS hmmm
dalek p: c58b48c | (Pawel Murias)++ | / (5 files):
Revert "Wrap subs in a NQPRoutine code object when NQPRoutine is in scope."

This reverts commit 3890c61eda8d3c1a7c0f59147015a7b60fa0fc86.
19:58
FROGGS r: say "11 1111 111 111 11 11 1111 11 11 1 11 111 11 111 111".match(/ (.**10..15) ' ' /, :g).join("\n") 20:00
camelia rakudo 567941: OUTPUT«11 1111 111 111 ␤11 11 1111 11 ␤11 1 11 111 11 ␤»
20:00 zby_home joined 20:08 ecocode joined
FROGGS that is what I call Power of Perl 6: 20:09
run/Niecza.exe -e 'say (-300..300 X+> 0..9).join(", ")' > ../rakudo/rshift.t1
perl6 -e 'my @a = map { .Str ~ "\n" }, "../rakudo/rshift.t1".IO.slurp.match(/(.**100..105 ", ")/, :g); say @a' >../rakudo/rshift.t
:P
timotimo haha :) 20:12
FROGGS (because both cant do both)
20:12 sqirrel left
dalek kudo/nom: c186fc3 | (Elizabeth Mattijsen)++ | src/Perl6/Metamodel/ContainerDescriptor.nqp:
Added support for default value in container description of Metamodel
20:15
kudo/nom: a9094aa | (Elizabeth Mattijsen)++ | src/vm/parrot/guts/container.c:
Make (Int) = Nil error soft, putting default value in place

It compiles ok, but it doesn't seem to trigger yet
kudo/nom: ce81030 | (Elizabeth Mattijsen)++ | src/vm/parrot/guts/container.h:
Add pointer for the defaul value in the container struct
lizmat and here's my first foray into NQP/C land in a *long* while
timotimo lizmat++ # daring to go to scary places 20:16
lizmat it spectests ok, just no extra todo's passing yet 20:17
pmurias what could cause such a horrible exception: pastie.org/8101068?
timotimo is that the bytecode verifier that sorear wrote in order to make methods splittable or is it something built into the java compiler? 20:18
lizmat I'm stuck with these changes in my repo: gist.github.com/lizmat/5904194 which I did not do, but which apparently are not committed yet
segomos rewind
lizmat git rewind ?
timotimo nah, git reset --hard is the one you want
it could be you accidentally git reset without --hard some time ago? 20:19
lizmat but how did they get here in the first place?
FROGGS yay, it proves my algorithm is right!
segomos yea
stackoverflow.com/questions/9529078...-hard-head
lizmat I know about git reset --hard, that's not the issue
pmurias timotimo: it seems to be raised by something built into the java compiler
lizmat I'm just afraid that I'll throw away someone elses work
timotimo you probably pulled from some region and then didn't reset hard enough to another place perhaps?
20:19 tomyan joined
moritz lizmat: maybe you accidentally did a 'git pull --rebase' over a merge commit, or something similar weird 20:20
20:20 tomyan left
lizmat possibly, I'll just put the changes into a branch just to be sure 20:20
FROGGS the tail of that test is pretty nice actually: gist.github.com/FROGGS/836912b4855...s_amount-t
moritz^^
rshifting a positive/negative value using positive amounts is working now here 20:21
20:22 ecocode left
moritz FROGGS++ 20:24
20:24 ilbot_nextgen left
FROGGS :o) 20:24
I'm not sure I understand what shifting by a negative amount means 20:26
pmurias FROGGS: how did you solve your settings problem? 20:28
FROGGS what settings problems? 20:29
-s
pmurias: you mean the v5 module?
pmurias yes
using the Perl 5 setting in a 'use v5' scope 20:30
FROGGS I thinnk the solution was not to inherit from Perl6::Grammar/Actions
and to have the EXPORT sub in v5.pm
I almost cant remember what the trouble was :o) 20:31
there is no Perl 5 setting
lizmat jnthn: it feels like " if ( STABLE(value)->WHAT == Rakudo_types_nil_get() ) {" is not triggering in container.c
suggestions?
pmurias FROGGS: so what happens when you call a perl5 sub? 20:32
FROGGS I just make the P5 special vars available, and dispatch the Perl 5 builtins to methods on P6's types
pmurias: what do you mean? a sub declared in a v5 block or a P5 "builtin"?
jnthn lizmat: Hm, is Nil a type? 20:34
lizmat PMC * Rakudo_types_nil_get(void) { return Nil; }
jnthn pmurias: The verity error sounds like bad code-gen... 20:35
lizmat static PMC * Nil = NULL;
not sure where this gets initializad
jnthn Is there a Rakudo_types_nil_set? :) 20:36
lizmat good point, checking
20:37 konundra left
lizmat apparently, Rakudo_types_nil_set is never called 20:37
pmurias jnthn: so I should look for error in the codegen layer?
s/error/errors/
jnthn pmurias: Perhaps, yeah...hmm 20:38
FROGGS n: say -300 +> -9999999 # is that like 300 +> invert(-9999999) ? 20:39
camelia niecza v24-86-g39ab531: OUTPUT«-150␤»
jnthn pmurias: Of course, it's possible your changes somehow broke closure semantics... 20:40
lizmat: OK, well, that explains a bit ;)
20:40 zby_home left
lizmat so, any idea where this should be initialized, and with what value ? 20:40
jnthn Hmm...other types the C code knows about are set up in the BOOTSTRAP. But not Nil, it appears... 20:41
Could stub it in there, then it's just the existing nqp::p6settypes op 20:43
pmurias jnthn: I get that on the more complex tests (like the regex ones), the simpler ones pass with a simple fix to my reverted commit
20:43 kaare_ left
lizmat makes gesture with hand going way above her head 20:43
FROGGS hugs lizmat 20:44
perigrin returns lizmat Mooze gesture.
jnthn lizmat: p6settypes just pulls things out of a hash and calls Rakudo_types_*_set on 'em. 20:45
lizmat src/vm/parrot/Perl6/Ops.nqp ?
jnthn That maps it, to something in src/vm/parrot/ops/perl6.ops 20:46
pmurias jnthn: the biggest leap of cargo cult faith is github.com/perl6/nqp/commit/3890c6...86#L0R807, where instead of nqp::takeclosure(QAST::Block) I clone a WVal
jnthn pmurias: Ah...but I guess the clone doesn't actually do a take...
pmurias: That is, it doesn't set the outer... 20:47
It just copies
takeclosure I *think* does the two
clone then set outer
lizmat jnthn: foundi it, I think, making now 20:50
pmurias jnthn: p6capturelex also sets outer
now we need p6capturelex in nqp ;) 20:51
20:52 zby_home_ joined
pmurias but I suppose it would be better to sleep and do that tomorrow 20:53
jnthn :) 20:54
pmurias++
lizmat jnthn: alas, no change 20:56
what is a good way to show the actual values from such a piece of C code nowadays / in this context 20:57
fwiw, I've added: + Rakudo_types_nil_set(VTABLE_get_pmc_keyed_str(interp, $1, 20:58
+ Parrot_str_new_constant(interp, "Nil")));
to src/vm/parrot/ops/perl6.ops
jnthn lizmat: Yes, but I don't think Nil is set up in BOOTSTRAP
That is correct, just not sufficient :)
20:58 raiph left
lizmat check BOOTSTRAP 20:58
+ my stub Nil metaclass Perl6::Metamodel::ClassHOW { ... }; ??? 21:00
nope: Representation must be composed before it can be serialized 21:02
21:02 zby_home_ left 21:03 arlinius left 21:05 skids left
lizmat r: say Nil.^mro # is this right ? 21:05
camelia rakudo 567941: OUTPUT«Nil (Iterator) (Iterable) (Cool) (Any) (Mu)␤»
jnthn Yes
dalek kudo/nom: d2bf028 | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/ (2 files):
Avoid exploding null things in a capture.
TimToady Nil is not supposed to be an iterator anymore
jnthn It'll need more than just ceating the meta-object
masak submits rakudobug
jnthn It'll need add_parent'ing. 21:06
lizmat ah, ok, with that order?
jnthn TimToady: Yes, but that can't be fixed without the wider Nil changes.
21:06 PacoAir left
jnthn lizmat: Well, it's a single inheritance chain 21:06
lizmat ok, will do 21:07
jnthn So just need to add the immediate parent
21:07 benabik left
jnthn And you get the rest by default 21:07
Just make sure it comes late enough
Above commit gets us 20 or so more tests.
21:09 arnsholt left 21:11 BenGoldberg joined
lizmat jnthn: Can only use get_who on a SixModelObject 21:11
21:11 Rotwang joined
lizmat jnthn: gist.github.com/lizmat/5904671 the diff so far 21:12
dalek p: 2b30e32 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
nqp::readlinefh should never return null.

Resolves 5 of the NullPointerException aborts in the Rakudo spectests, leading to 4 of the affected files now passing in full.
21:14
lizmat jnthn: found the pb, making again
21:14 raiph joined
jnthn lizmat: Missing insertion into EXPORT::DEFAULT, I suspect 21:15
And maybe need to remove the "is Iterator" in src/core/Nil.pm
Since that's done already
lizmat I had removed the stub again, that stopped it from compiling
jnthn Down to just 2 spectests that explode with NullPointerException now :) 21:16
lizmat why remove the "is Iterator" ?
that's what I've just stubbed in BOOTSTRAP, no? 21:17
jnthn lizmat: Yes, if you leave it in src/core/Nil.pm it will probably try to add_parent it again, which'll get you in trouble, I suspect
lizmat we'll see… it got through the setting 21:18
$ perl6 -e 'say Nil.^mro' 21:19
Nil (Iterator) (Iterable) (Cool) (Any) (Mu)
still seems ok there
21:19 pmurias left
lizmat alas, trying something else 21:23
dalek p: 7aa9b2f | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
nqp::where should not decontainerize.

This fixes the last two aborts due to NullPointerException in the Rakudo spectest.
21:24
lizmat TimToady: so what is the expected parent of Nil: Mu ? 21:25
jnthn There's 10 tests that no longer abort, with many of them now fully passing. :)
FROGGS jnthn++ # I like words like "last" and "all" in commit messages :o)
masak rn: reverse ^10 ==> map { $_ ?? <tick tock>[$_ %% *] !! <... BOOM> } ==> say
camelia rakudo d2bf02: OUTPUT«tick tock tick tock tick tock tick tock tick ... BOOM␤»
..niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/0oK0blhS_L line 1 (EOF):␤------> k tock>[$_ %% *] !! <... BOOM> } ==> say⏏<EOL>␤␤Un…
21:29 stevan_ left
lizmat jnthn: I think I'm barking up the wrong tree: I changed the type check message in container.c, but the message I get when trying to assign Nil to an Int, is unchanged 21:30
jnthn lizmat: Is that 'cus the exception message is only the fallback, if it can't find the typed thrower? 21:31
lizmat ah, good point 21:32
jnthn I'm almost certain you're changing the right place.
Want me to look at latest diff?
lizmat gist.github.com/lizmat/5904671 21:33
dalek kudo/nom: dbc5f1a | jnthn++ | src/core/Code.pm:
Avoid a Parrot-specific .get_lexinfo call.

Unbusts S11-modules/import-multi.t, which now fully passes on JVM.
jnthn lizmat: ah, important missing line 21:34
lizmat what what what ?
jnthn lizmat: See the lines started below # Fill out EXPORT namespace.
TimToady an argument could be made that Nil is a conceptual type like junctions; in fact, one could posit that Nil is an alias for one(), that is, the simultaneous requirement that something be one thing and zero things :)
jnthn You need a line there to actually export the Nil that you've crated.
*created
lizmat checking
jnthn That's probably why the extra "is Iterator" in the setting doesn't explode.
TimToady in any case, if Nil were put outside of Any, we'd have to do something like with junctions in order to use Nil to represent the absence of an argument to the binder 21:36
lizmat jnthn: indeed, Package 'Nil' already has parent 'Iterator' 21:37
so src/core/Nil wouild need to have its "is Iterator" removed? 21:38
(trying that now)
jnthn Yes 21:39
TimToady wonders what else might break if we move Nil outside of Any...
lizmat I'll try, after I get this working :-)
21:40 dmol left
lizmat getting closer: perl6 -e 'my Int $a=1; $a=Nil; say $a' 21:42
No such method 'gist' for invocant of type 'NQPMu'
jnthn huh... 21:44
21:44 rindolf left
jnthn That means Nil somehow ended up being something other than the stubbed Nil? :s 21:45
[Coke] jnthn: let me know when I should regen the errors gist.
lizmat seems to me "value = desc->the_default;" is being done, but desc->the_default is somehow wrong
jnthn lizmat: Yes, that's my analysis too
lizmat ok, getting to tired now 21:46
jnthn OK, let's try and crack it tomorrow. Must be close...
21:46 lue left
lizmat will run a spectest: this should be ok, if it is, I'll commit and lookm at it tomorrow 21:46
indeed
21:48 chrisdev left 21:50 spider-mario left
timotimo jnthn: do you have the one or two minutes that'll probably be enough to review the dir.contents implementation i came up with? 21:51
jnthn timotimo: ooh, forgot that
timotimo added a note to the pull request 21:52
github.com/rakudo/rakudo/pull/173 - here's the link again
jnthn timotimo: Any reason to use while $next ... $next = 0, rather than loop { ... last ... } ? 21:53
timotimo oh. no, there isn't
jnthn Did the nqp patch to add these things already go in?
timotimo yes 21:54
jnthn k 21:55
timotimo github.com/perl6/nqp/commit/bfe5a0...e04f6c597c
21:57 FROGGS left, bluescreen10 left
jnthn mebbe should do that in the op... 21:58
21:59 lue joined
timotimo that == chopping off ./? 22:00
jnthn yeah
ok, I got it passing 11 out of 12 on Windows
timotimo can surely do that if you ask me to 22:01
ah, that's good to know
i don't have a windows to test it on
does it fail because it would have to cut off .\ instead? ;)
22:01 Rotwang left
dalek kudo/nom: 1ca2ea2 | (Timo Paulssen)++ | src/core/IO.pm:
implement IO::Path::contents on jvm w/ nqp::opendir, ...
22:01
kudo/nom: 080a6bb | jnthn++ | src/Perl6/Actions.nqp:
Generate lexical accessor after declaring var.

Unbusts S12-attributes/class.t.
kudo/nom: 09be2b6 | jnthn++ | src/core/IO.pm:
Merge branch 'jvm-dir' of git://github.com/timo/rakudo into nom
kudo/nom: 532a3b9 | jnthn++ | src/core/IO.pm:
Idiomaticism and Win32 fixes for dir(...).
jnthn Well, I fixed that bit already.
timotimo cool, thanks! :) 22:02
jnthn Anyway, I'll take passing 11 out of 12 out of passing 0 out of 12. :)
*over
timotimo hey, if you write "./" | ".\\", you'll get the junction optimisation for free 22:03
jnthn Oh, don't I get it with any?
timotimo i don't think so
because of flattening issues i decided not to touch that
jnthn ah 22:04
timotimo that's probably a LHF for you ;P
[Coke] ... stops his build and kicks it off again to get jvm-dir fixes.
timotimo s/for/to/
jnthn nah, it's kinda tricky...
timotimo [Coke]: you're too kind :3
jnthn: well, there's an "any" or "all" call op and its only child is an infix:<,> and that , comes from core and all the children of the , have compile-time-values that are not lists, it could be wrapped into a || or && instead 22:05
plus or minus lots of edge cases i didn't notice yet :)
dalek kudo/nom: d67185a | (Elizabeth Mattijsen)++ | src/ (3 files):
Further work to make Type $foo = Nil work, jnthn++

Seems that the assignment of the default value is still bogus, more tomorrow.
timotimo jnthn: be advised, i can create a .\ folder on my linux box. we probably want to have more intelligence for that in the future 22:06
and that very bit of intelligence may be easier to implement in the java code
dalek ast: 2329bdd | (Elizabeth Mattijsen)++ | S02-types/nil.t:
Temporary fudge for Nil changes
lizmat spectest should be clean for Nil related changes
jnthn k 22:07
jnthn is doing a spectest run now to see if his evening changes have regressed anything notably
lizmat calling it a night, cu all 2morrow
timotimo [Coke]: ^ may want to restart again real quick? 22:08
jnthn ;)
'night, lizmat
masak night, lizmat++ 22:09
22:14 FROGGS joined
jnthn OK, looks like we're attempting some copule of hundred more, and hopefully that translates to a decent number of passes too :) 22:18
22:18 raiph left
jnthn So, hopefully we cross the 90% tomorrow :) 22:18
(as in, in tomorrow's run) 22:19
22:20 FROGGS left
timotimo great! :) 22:21
isn't it enough for today's run?
22:21 arlinius joined
jnthn Depends how you're counting today/tomorrow :) 22:22
"today's" (UGT) run already happened :)
timotimo ah. i was refering to the one coke is running right now
jnthn Oh, but that's not the one that updates roast data :) 22:23
timotimo oh, righto
22:24 FROGGS joined 22:26 ManAmongHippos left
[Coke] I just wanted to update the categorized failures gist. 22:27
jnthn ah :)
That's useful; I won't do more tonight, but I'll be glad to have it for tomorrow.
timotimo will you tell us the numbers, too, or is that data not being generated at all?
22:29 stevan_ joined
masak 'night, #perl6 22:29
timotimo night masak! 22:30
[Coke] timotimo: I can paste in the total line from this run. 22:31
but it's only on S06 yet.
22:31 skids joined
timotimo i'd like that very much thanks :) 22:32
colomon here the latest run went from 22896 to 23126 passoing 22:36
timotimo so close to 90% 22:37
89.92% it seems like
22:39 FROGGS left
jnthn huh, I thought we had to get 40ish more for 90%? 22:39
22:39 konundra joined
timotimo i don't know the accurate pass numbers for rakudo at the time of colomons posting, though 22:39
[Coke] 41 more from the daily roast run; we'll probably make it. 22:41
timotimo wow, clutch :)
TimToady quick, we need to break something 22:42
[Coke] quiet, you troublemaker! 22:43
"total", 23667, 2316, 571, 1889, 27938, 25913 22:44
jnthn Up from 23438 :) 22:45
Over 200 more. That's > 41 :)
[Coke] r: say 23667/26087
camelia rakudo d67185: OUTPUT«0.907233␤»
TimToady \o/
jnthn Into the last 10% \o/ 22:46
timotimo oh, that is above 90%!
congratulations to all involved! :)
jnthn Of course, this is where the S starts to flatten :)
[Coke] some slush since I'm running against a 7 hour old roast.
updating the gist...
timotimo how hard does it seem to make open work? 22:51
or perhaps making slurp work first? it seems to pass the open call and die upon trying to set an encoding 22:52
jnthn I think open works...
Must be the encoding-y stuff
timotimo i just tried to open for writing and it didn't work, but perhaps opening for reading does
jnthn The IO stuff wants a good look over, I think...
timotimo ah, i know what's going wrong 22:53
i wasn't terminating the line with ;1 in the repl and stringifying dies because .tell doesn't exist
method read_bytes not found, heh. probably because it operates on something called $!PIO ;) 22:54
jnthn *sigh* yeah, and that probably depends on Buf... 22:55
timotimo *of course* IO is among the last things to get running in a perl6 implementation ;) 22:56
22:58 FROGGS joined
timotimo kind of bummed i don't get to see line numbers for src/gen/CORE.setting in jvm :| 22:59
well, i do, but only for one stack level it seems 23:00
23:04 raiph joined 23:05 pmurias joined
timotimo looking forward to the new vim version with the alleged new and much faster regexp engine for highlighting and such 23:07
hopefully scrolling through perl6 code no longer stutters :P
23:09 lue left 23:18 fridim__ left 23:20 lue joined
timotimo oh, i made more tests succeed! :) 23:21
gist.github.com/timo/4b4dc754a509ff0a14b7 <- i don't want to make a pullrequest for such a peanut change. please apply it, someone? 23:22
(should make 46 tests pass!) 23:23
jnthn hm...
I wonder if that means our Makefile.in entries are mis-ordered compared to on Parrot... 23:24
timotimo oh, good question
jnthn That shouldn't be needed on one and not the other.
timotimo otherwise these should fail on parrot, too
jnthn Right.
I'd rather fix that.
Gonna go rest now.
timotimo good, do that. i'll delete the gist.
jnthn Back tomorrow...should have a few more tuits tomorrow also :) 23:25
Feel free to tweak the ordering and test it... :)
'night o/
pmurias jnthn: adding a capturelex solved the strange error 23:28
timotimo pulling only Exception.pm back to the front gives an NPE, but i'm trying to put the whole block that had been moved back to where it is on parrot 23:29
seems like more work that i'd care to handle right now. i'll probably go to bed instead 23:31
23:34 pmurias left 23:42 gtodd joined
gtodd yoleaux: U+1F341 23:47
yoleaux: .u U+1F341 23:48
timotimo .u U+1F341
yoleaux U+1F341 MAPLE LEAF [So] (🍁)
gtodd :P
timotimo ;) 23:49
gtodd &#127809;
timotimo .o(mhhh maple syrup)
23:49 gtodd left
timotimo fixing the build order will also transform Could not find symbol '&Chdir' into Failed to change the working directory to '/home/timo/build/jakudo/./t': java.lang.NoSuchMethodError: org.perl6.nqp.runtime.Ops.chdir(Ljava/lang/String;)Ljava/lang/String; 23:50