»ö« 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. |
|||
dalek | kudo/nom: 5a1e607 | jnthn++ | src/core/MapIter.pm: Fast-path for common case in MapIter on JVM. |
00:09 | |
kudo/nom: 76c3008 | jnthn++ | src/core/MapIter.pm: A couple more MapIter optimizations. |
|||
kudo/nom: f164c0f | jnthn++ | src/core/ (2 files): A couple more buffer pre-size optimizations. |
|||
00:09
eternaleye left
|
|||
jnthn | Those make a 30s thing into a 7s thing... :) | 00:10 | |
00:10
eternaleye joined
|
|||
jnthn | .tell sorear for ^64 X ^64 -> $i, $j { $i + $j } seems to generate a stack overflow, even though METAOP_CROSS (src/core/metaops.pm) is using an iterative, not recursive, algorithm. Could it be something with gather/take? | 00:15 | |
yoleaux | jnthn: I'll pass your message to sorear. | ||
00:17
eternaleye left
|
|||
jnthn | .tell sorear it does appear to be a huge number of the block that does nqp::continuationinvoke piled up on the stack, having dug a little further. | 00:18 | |
yoleaux | jnthn: I'll pass your message to sorear. | ||
00:22
eternaleye joined
|
|||
jnthn | 'night, #perl6 | 00:29 | |
00:31
colomon joined
|
|||
TimToady | the use of $*FATAL in rakudo to define fail semantics looks a bit suspicious to me, unless every single dynamic scope sets it true or false according to its lexical context, which I doubt | 00:56 | |
Teratogen | kill it with fire! | 00:57 | |
TimToady shoots firewords sideways at the spectators | 00:59 | ||
*works | |||
TimToady goes to fetch Pollo Loco & | 01:00 | ||
01:01
FROGGS_ joined
01:19
raiph joined
01:32
colomon left
01:42
ztt joined
01:54
colomon joined
02:10
aindilis joined
|
|||
timotimo | jnthn: t.h8.lv/p6bench/2013-07-05_mapiter_improv.html - you made it better! | 02:18 | |
02:20
jaldhar joined
02:30
SamuraiJack joined
02:31
jaldhar left
02:34
jaldhar joined
|
|||
benabik | timotimo: That's a lot of graphs. | 02:46 | |
labster | it sure is a lot of them | 02:49 | |
03:01
SamuraiJack left
03:02
SamuraiJack joined
|
|||
sorear | good * #perl6 | 03:03 | |
yoleaux | 00:15Z <jnthn> sorear: for ^64 X ^64 -> $i, $j { $i + $j } seems to generate a stack overflow, even though METAOP_CROSS (src/core/metaops.pm) is using an iterative, not recursive, algorithm. Could it be something with gather/take? | ||
00:18Z <jnthn> sorear: it does appear to be a huge number of the block that does nqp::continuationinvoke piled up on the stack, having dug a little further. | |||
JimmyZ | good * sorear | 03:16 | |
03:21
colomon left
|
|||
sorear | o/, JimmyZ | 03:27 | |
03:32
BenGoldberg left
03:34
colomon joined
03:37
xilo_ left
03:39
xilo_ joined
03:47
colomon left
03:53
SamuraiJack left
03:54
ztt left
04:04
benabik left
04:35
benabik joined
04:39
benabik left,
benabik joined
|
|||
labster | r: sub foo { foo(); }; my $a = try foo(); say "alive"; say $!; | 04:52 | |
camelia | rakudo f164c0: OUTPUT«(timeout)alive» | ||
labster | is $! infinite looping there? | 04:53 | |
04:55
crab2313 joined
05:01
crab2313 left
|
|||
TimToady | I doubt it, but it's probably got a huge stack trace to process | 05:13 | |
Teratogen | I've done a lot of perl 5 but very little perl 6 | 05:15 | |
am I going to have to learn a whole new language? | |||
sorear | really, Teratogen? this again? | 05:16 | |
05:16
kaare_ joined
|
|||
sorear | it's not funny. | 05:16 | |
Teratogen | it was not meant to be funny | 05:19 | |
the more examples of perl 6 I see on this channel the more DIFFERENT it seems to be from perl 56 | |||
the more examples of perl 6 I see on this channel the more DIFFERENT it seems to be from perl 5 | |||
but... I am going to sleep | 05:20 | ||
night all! | |||
=D | |||
geekosaur | apparently you've not done enough perl5 to understand its limitations | 05:21 | |
05:37
mstefanko joined
|
|||
labster | TimToady: Looking at S05:4618 - 4629. Is cat supposed to be join there? | 05:38 | |
TimToady | no, cat is something that just pretends to be a string | 05:39 | |
NYI | |||
sorear | labster: cat is lazy join | ||
05:40
raiph left
|
|||
labster | oh, hadn't seen it yet. | 05:40 | |
sorear | cat map { *~" " }, 1..* # returns a one-sided infinite rope of all the integers | 05:41 | |
NYI. | |||
TimToady | supposed to make an array or list look like a string good enough to do matching on, without necessarily doing an actual join | ||
sorear | will probably be easy enough to do once we have (strict) ropes | ||
labster | Cool. Then I can do Dog.cat | ||
TimToady | gotta work a Rat in there too | 05:42 | |
sorear | we have Dogs in the spec now? o_O | 05:43 | |
TimToady | sure, but they're all meta-Dogs | 05:44 | |
labster | grep says Dog is in nine specs | ||
TimToady | one might say they're all foo dogs.. | 05:50 | |
sorear | metasyntactic dogs? | 05:51 | |
.oO( since orthosyntax stole ... ??? !!!, metasyntax has had to make do with Dog ) |
05:52 | ||
05:52
xilo_ left
|
|||
TimToady | std: .oO(...) | 05:53 | |
camelia | std 85cf51d: OUTPUT«ok 00:00 42m» | ||
TimToady has to wonder, as a one-time organic chemist, what parasyntax would be... | 06:01 | ||
labster | syntax for parakudo? | 06:13 | |
06:18
jaldhar left
06:19
jaldhar joined
|
|||
sorear | that may have been the joke | 06:36 | |
moritz | good morning | ||
moritz just had pancakes with ice cream and fresh strawberries for breakfast o/ | 06:37 | ||
sorear | good morning moritz \o/ yum | ||
TimToady was referring to relative positions of two radicals on benzene rings: www.mhhe.com/physsci/chemistry/care...es/omp.gif | 06:40 | ||
06:42
PacoAir joined
|
|||
moritz | reading the postgres docs can be amusing, occasionally. For example www.postgresql.org/docs/9.1/static/...acter.html | 06:43 | |
An attempt to store a longer string into a column of these types will result in an error, unless the excess characters are all spaces, in which case the string will be truncated to the maximum length. (This somewhat bizarre exception is required by the SQL standard.) | |||
sorear | mmm, punchcardisms? | 06:46 | |
JimmyZ | moritz: INSERT INTO test VALUES ('12345678'::varchar(5)); won't be in an error | 06:47 | |
06:50
kaare__ joined
|
|||
moritz | it is also slightly obscure that 'time' (time of day without date) takes up more storage space than 'timestamp' (time of day + date) | 06:51 | |
06:53
cognominal joined
|
|||
sorear | obscure, indeed... | 06:53 | |
06:53
kaare_ left
06:58
berekuk left
06:59
Rotwang joined
07:01
berekuk joined,
aindilis left
|
|||
moritz | another gem from the pg docs: " conventions before the 19th century make for interesting reading, but are not consistent enough to warrant coding into a date/time handler." | 07:01 | |
07:42
domidumont joined
07:43
FROGGS_ is now known as FROGGS,
PacoAir left
|
|||
FROGGS | gmorning | 07:43 | |
sorear | o/ FROGGS | 07:44 | |
sorear peeks in bin/org/perl6/nqp/runtime/ and realizes that all but one of the nested classes are his fault | 07:52 | ||
dalek | ast: ec62150 | (Brent Laabs)++ | S05-match/capturing-contexts.t: RT #117461 Test for Match.lines (which really means Match ~~ Cool) |
08:00 | |
08:02
domidumont left
08:03
araujo joined
|
|||
labster | rn: r: class A { state $x = 0; method inc { ++$x }; }; say A.inc, A.inc, (my $x = A.new).inc, A.inc, $x.inc; | 08:19 | |
camelia | niecza v24-86-g39ab531: OUTPUT«55555» | ||
..rakudo f164c0: OUTPUT«===SORRY!===Two terms in a rowat /tmp/E2iHoBLE4K:1------> r⏏: class A { state $x = 0; method inc { + expecting any of: argument list postfix infix stopper infix or meta-infix statem… | |||
labster | rn: class A { state $x = 0; method inc { ++$x }; }; say A.inc, A.inc, (my $x = A.new).inc, A.inc, $x.inc; | ||
camelia | rakudo f164c0: OUTPUT«12345» | ||
..niecza v24-86-g39ab531: OUTPUT«55555» | |||
sorear | surprised rakudo gets that wrong: | 08:21 | |
rn: my $x = 3; (++$x) *= 2; say $x | |||
camelia | niecza v24-86-g39ab531: OUTPUT«8» | ||
..rakudo f164c0: OUTPUT«Cannot assign to a readonly variable or a value in block at src/gen/CORE.setting:14368 in block at /tmp/RNV3r6prvd:1» | |||
sorear | well, "wrong" is arguable I guess | 08:22 | |
but in niecza prefix:<++> has always returned a lvalue | |||
because it doesn't allocate any containers - it modifies the argument in place and returns it | 08:23 | ||
also it predates the read-only scalar container elision optimization | |||
testing with perl5 seems to indicate that both prefix:<++> and postfix:<++> return lvalues o_O | 08:24 | ||
labster | .oO ( kyrie containers ) | ||
prefix:<++> as an lvalue seems sane enough. | 08:25 | ||
sorear | anyway, lvalueness means that say() receives an argument list containing five of the same container | ||
which of course all have the same value | |||
labster | ah, indeed. | 08:26 | |
the whole 'state $x' sharing a variable between instances -- that maybe should be documented :/ | 08:27 | ||
sorear | erm | ||
rn: class A { my $x = 0; method inc { ++$x }; }; say A.inc, A.inc, (my $x = A.new).inc, A.inc, A.inc; | |||
camelia | niecza v24-86-g39ab531: OUTPUT«Potential difficulties: $x is declared but not used at /tmp/lDc2fPCk9b line 1:------> inc { ++$x }; }; say A.inc, A.inc, (my ⏏$x = A.new).inc, A.inc, A.inc;55555» | 08:28 | |
..rakudo f164c0: OUTPUT«12345» | |||
sorear | you're not seeing any special behavior of state in this example. | ||
it's shared between instances because *it's declared outside the method* | |||
labster | S04: Separate clones of the closure get separate state variables. However, recursive calls to the same clone use the same state variable. | 08:29 | |
classes aren't closures per se? | |||
sorear | At no point do you clone the closure which owns "state $x" | ||
which is the class body sub, which is executed only once in any event | |||
s/sub/block/ | 08:30 | ||
labster | fairy nuff | ||
sorear | also my/our/state/anon variables are completely orthogonal to the object system | ||
if you want each instance of an object to have its own version of a variable, use "has" | 08:31 | ||
labster | sorear++ | 08:33 | |
that needs to be explained more clearly somewhere | |||
moritz | doc.perl6.org/language/objects#Attributes # like this? | 08:49 | |
08:51
FROGGS left
08:52
preflex joined,
ChanServ sets mode: +v preflex
|
|||
labster | not exactly like that, because that doesn't say what happens with my/our/state in classes | 08:55 | |
nor is perlcabal.org/syn/S12.html#Class_attributes all that clear on the subject | |||
lizmat | good *, #perl6! | 09:01 | |
(still checking on backlog) | |||
meanwhile: for is the same as map, right? | |||
r: sub a { for 1..3 { return $_ } }; say a # works | |||
camelia | rakudo f164c0: OUTPUT«1» | ||
lizmat | r: sub a { (1..3).map( { return $_ } ) }; say a # doesn't work | ||
camelia | rakudo f164c0: OUTPUT«Attempt to return outside of any Routine in block at src/gen/CORE.setting:486 in block at /tmp/Yl0CJbNEKO:1» | ||
lizmat | is this a rakudobug? | 09:02 | |
09:04
iSlug joined
|
|||
sorear | it's a side effect of map being lazy | 09:07 | |
and return being lexotic and binding only to 'a' | |||
error message is misworded | 09:08 | ||
masak | good antenoon, #perl6 | ||
sorear | o/ masak!!! | ||
lizmat | n: sub a { (1..3).map( { return $_ } ) }; say a | 09:11 | |
camelia | niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Cannot unbox a Variable[] from an object of repr P6box[Int32] at <unknown> line 0 (KERNEL map @ 0)  at /home/p6eval/niecza/lib/CORE.setting line 2618 (GatherIterator.reify @ 6)  at <unknown> line 0 (ExitRunloop @ 0)  at /home/p… | ||
lizmat | masak! | 09:12 | |
09:12
spider-mario joined
|
|||
dalek | kudo/nom: 5c61f12 | (Elizabeth Mattijsen)++ | src/core/Nil.pm: Add reference to BOOTSTRAP |
09:15 | |
masak | so, 18:00Z tonight, then. some more sprintf hacking. | 09:18 | |
I'll be away for a while. going to go attent a friend's wedding. but I'll be back in time for 18:00Z :) | |||
does Teratogen have a reset function which makes him come back and ask the same questions again and again? | 09:23 | ||
(re backlog) | 09:24 | ||
I'm not upset or irritated or anything. but if we understand Teratogen's reset function semantics better, maybe we can answer his personal FAQs better. | |||
sorear | sorear$ ./nqp -e 'my %h := nqp::jvmbootinterop("java.lang.Thread"); say(%h<method:toString()Ljava/lang/String;>(%h<static_method:currentThread()Ljava/lang/Thread;>()))' | 09:25 | |
Thread[main,5,main] | |||
clunky, but a start | |||
dalek | p: f27b205 | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/BootJavaInterop.java: Java interop, part 2 |
09:27 | |
p: 4f15d7b | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/ (2 files): First working version of java interop coderef generator |
|||
tadzik | wow | 09:29 | |
sorear++ | |||
masak | sorear++! | 09:30 | |
tadzik: hey hey | |||
tadzik: are you planning to forget about tonight's sprintf hacking, too? :P | 09:31 | ||
tadzik | masak: oh, is there one tonight? :) | 09:32 | |
sorear | masak: you're planning to forget? have fun at the wedding then. | 09:33 | |
tadzik | life pro tip: if you leave your balcony open, you're going to have a pidgeon's nest in it | ||
sorear | next subgoal: callbacks! then attempt to document what exists and how it's intended to be used. | ||
tadzik | ...shit | ||
sorear | tadzik: type error with sentence. USese::Balcony does not do role "Closeable" | 09:34 | |
JimmyZ | sorear++ | 09:35 | |
sorear | autopun? 02:04 < Cale> I tried teaching autodidactism, but it seems people just have to learn it for themselves. | ||
lizmat | smells like one | 09:36 | |
masak | yes. | 09:38 | |
sorear: also, bash.org/?3936 | |||
lizmat | TimToady: stopped trying to build Rakudo with Nil outside of Any | ||
oddly enough, it built the CORE.setting, but not the restricted one | 09:39 | ||
didn't get to spectest it at all | |||
masak | I wonder if perhaps Perl 6 is the biggest spectest suite in history on which language experiments of this magnitude are performed. | 09:41 | |
Perl 6's* | 09:42 | ||
sorear | I doubt it | ||
moritz wouldn't be surprised if for example Fortress had a test suite of similar size | 09:43 | ||
sorear was thinking of C++ | 09:44 | ||
I know ginormous test suites exist for SQL, but I think SQL is more frozen than C++ | |||
lizmat | aha, the error "Odd number of elements found where hash expected" while trying to create restricted setting | 09:45 | |
is not cause by the creation of the restricted setting, but simply by loading an apparenly incorrectly generated CORE.setting | |||
sorear | sounds like a %hash = Nil thing | 09:46 | |
not being treated as %hash = () | |||
lizmat | yup, now to find that… :-( | ||
probably not a single one either | |||
lizmat goes spelunking | |||
sorear | no backtraces? | 09:47 | |
lizmat | nope | 09:48 | |
masak | & | 09:55 | |
lizmat | happy wedding, masak! | ||
09:56
tomaw joined
09:59
grondilu joined
|
|||
grondilu is trying to compile rakudo-jvm again, this time with a fresh openjdk | 10:00 | ||
grondilu managed to reach "stage jast" after about ten minutes of compilation | |||
jnthn | lizmat: --ll-exception may get you something more helpful | 10:02 | |
sorear | grondilu: on my machine, rakudo-jvm compiles about three times faster than rakudo-parrot. | 10:03 | |
grondilu | it worked! | ||
grondilu is about to run perl6 on JVM for the first time! | |||
sorear | oh, wait... you said earlier you were on 32-bit D: | ||
jnthn | ooh, I see sorear++ patches | 10:04 | |
sorear | nqp-jvm does not have 32-bit types | ||
it does everything using 64-bit integers | |||
which have to be emulated on 32-bit platforms | |||
I suspect this plays some part in the slowness you see | |||
dalek | kudo/nom: ba7f78d | (Elizabeth Mattijsen)++ | src/core/control.pm: Removed now superfluous class Nil {} definition (now done in BOOTSTRAP) |
10:05 | |
grondilu successfully ran "say "Hello, JVM!" | |||
sorear | wait x2. I thought jdk 1.7 dropped support for 32-bit CPUs | ||
grondilu | jnthn: awesome work, sir | ||
timotimo | jnthn: did you see the cool improvements your fast path caused? | 10:06 | |
grondilu tries 'my $sum; for ^10_000 { $sum += rand }; say $sum' and appreciates how fast this is | 10:07 | ||
jnthn | timotimo: Not yet, still backlogging... | ||
sorear | grondilu: wait, the setting compilation is several-x slower but that is faster? | 10:08 | |
jnthn | sorear: Looks like interop is going well ;) | ||
grondilu | sorear: yes. I've no idea why | 10:09 | |
lizmat | jnthn++, it does :-) | ||
grondilu notices that the more perlish 'say [+] rand xx 10_000' is a bit slower (but still faster than rakudo) | |||
jnthn | .oO( rakudo is faster than rakudo? :D ) |
10:10 | |
timotimo: Found the link; looking :) | |||
grondilu | I meant parrot | ||
sorry | |||
sorear thought thunky xx was a nieczaism | 10:11 | ||
timotimo | no way | 10:12 | |
thunky xx is crazy useful! | |||
grondilu | any chance nqp-jvm supports 32-bit types in a near future? Compilation worked but it was kind of a pain. | 10:13 | |
jnthn | iirc, thunky xx got spec'd and Rakudo changed to do it that way. | ||
timotimo | what's the simplest way to get around the thunkyness? here's my first idea: | ||
r: my @a = (state $ = rand) xx 10; say @a; | 10:14 | ||
camelia | rakudo ba7f78: OUTPUT«(Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any)» | ||
timotimo | er, oops | ||
jnthn | r: say rand xx 10 | ||
sorear | grondilu: I have no proof word size is the actual issue. | ||
camelia | rakudo ba7f78: OUTPUT«0.126966395971493 0.108979036604193 0.941956717378112 0.661813663912728 0.517164013101123 0.674946465666235 0.892848095431951 0.793093453851188 0.0593905554276262 0.684856679539546» | ||
jnthn | timotimo: Yes, the graphs seem better now :) | ||
jnthn will have to optimize some more :) | 10:15 | ||
timotimo | r: my $r = rand; my @a = $r xx 10; say @a; @a[2] = 100; say @a | ||
camelia | rakudo ba7f78: OUTPUT«0.23256417466061 0.23256417466061 0.23256417466061 0.23256417466061 0.23256417466061 0.23256417466061 0.23256417466061 0.23256417466061 0.23256417466061 0.232564174660610.23256417466061 0.23256417466061 100 0.23256417466061 0.23256417466061 0.23256417466061 0.2325… | ||
sorear | grondilu: diakopter thinks the OpenJDK optimizer is a joke compared to the one shipped in the closed-source releases. He might be right. | ||
grondilu | ahh. too bad. | ||
sorear | grondilu: since the oracle 1.7 releases are 64-only, the only way to test this is to set up a 64-bit openjdk and test performance | 10:16 | |
grondilu: do you have any idea how hard it would be to build a 64-bit openjdk on a 64-bit mac? | |||
grondilu | sorear: no idea. sorry. | 10:17 | |
but openjdk is easy to install, isn't it? | 10:18 | ||
10:18
colomon joined
|
|||
sorear | o/ colomon | 10:19 | |
colomon | \o sorear | ||
how goes it? | |||
grondilu | me is trying rosettacode.org/wiki/SHA-256#Perl_6 on JVM | 10:20 | |
^ wow this actually worked! | |||
noooo | 10:21 | ||
grondilu feels stupid | |||
I was actually still running perl6 on parrot. Somehow the old executable was not replaced or something. | |||
grondilu runs make install | 10:22 | ||
colomon | java interop! \o/ | 10:23 | |
grondilu makes a jakudo link in /usr/local/bin | 10:24 | ||
timotimo | push @b, 0 until (8*@b-448) %% 512; - this seems very wasteful, wouldn't one rather push @b, 0 xx ((8 * @b - 448) % 512)? | 10:25 | |
lizmat | jnthn: could it be that a bare {} somehow would be generated as {Nil} and thus cause the odd number in hash error? | 10:29 | |
grondilu | ok now that I can really discriminate rakudo-parrot and rakudo-jvm, I can say that no, rakudo-jvm is not faster on my machine. I tried 'my $sum; for ^10_000 { $sum += rand }; say $sum;'. Got 4 seconds on parrot, 16 seconds on JVM. | ||
sorear | jnthn++ # blogt and I missd it | ||
10:30
Rotwang left
|
|||
colomon | Time::Duration went from passing to test failure overnight. | 10:30 | |
lizmat | colomon: i assume that's jakudo, right? cause I haven't seen any here in any recent spectest on parakudo | 10:31 | |
jnthn | lizmat: Doesn't sound likely... | ||
colomon | lizmat: that's parakudo, it's from the module smoke test | ||
jnthn | lizmat: oh...maybe... | ||
colomon: Are the any details on the failure somewhere? | 10:32 | ||
colomon | not stored, but I can try to install by hand... | ||
lizmat | jnthn: src/core/operators has " obj.HOW.mixin(obj, $role).BUILD_LEAST_DERIVED({});", note the {} at the end | 10:33 | |
this winds up at "sub circumfix:<{ }>(*@elems) { my $x = Hash.new.STORE(@elems); }", and that bombs | 10:34 | ||
jnthn | lizmat: hmm | ||
r: my $a = -> { }; say $a().WHAT | |||
camelia | rakudo ba7f78: OUTPUT«Nil» | ||
sorear | because inside the {} is an empty block, and empty blocks are Nil | ||
jnthn | lizmat: Is ^ still meant to be the case? | ||
lizmat | jnthn: good question | 10:35 | |
sorear | jnthn: Would it be appropriate to make a t/qast/01-qast test to ensure that the compiler can cope with QAST::SVal.new( :value( nqp::x("\x[3000]", 30000) ) ) ? | 10:37 | |
lizmat | r: say {}.WHAT # but isn't this what the {} is about in the BUILD_LEAST_DERIVED context? | ||
camelia | rakudo ba7f78: OUTPUT«(Hash)» | ||
lizmat | it's winding up at the circumfix {} code | 10:38 | |
jnthn | sorear: Yeah, should test it somewhere | ||
lizmat: The action method for circumfix:<{ }> is what decides if it's a block or a hash. | |||
lizmat: We always parse it as a block, and then look at it and decide if it should be a hash or not | 10:39 | ||
sorear | lizmat: Moreover, the action method involves calling the generated block and passing whatever it returns to circumfix:sym<{ }> | 10:40 | |
lizmat | hmmm.. that's hidden from the stacktrace, then | 10:41 | |
10:46
grondilu left
|
|||
lizmat | put in a little check for @ being @=(Nil) in circumfix, and pop that, and now it builds :-) | 10:49 | |
running spectest now | 10:50 | ||
sorear | there's probably a better way | 10:54 | |
(you probably think the same) | |||
10:54
rindolf joined
|
|||
jnthn | Yeah, do it in Actions... | 10:55 | |
lizmat | spectest is definitely not clean :-) | 10:57 | |
sorear | lizmat: how about the sanitytest? | ||
lizmat | sanity test is ok | 10:58 | |
sorear | jnthn: I was thinking more along the lines of "empty block needs to be () in list context" | ||
jnthn | sorear: Well, that's why I was asking what current spec says about what empty block means... | ||
lizmat | r: my @a= ->{}; say @a.elems # should say 0, is what jnthn is saying? | 10:59 | |
camelia | rakudo ba7f78: OUTPUT«1» | ||
jnthn | oh hah, just realized...I never ported compile time bind analysis, which means the inliner never inlines anything, such as the native types... | ||
(on JVM) | |||
lizmat | hmm… it also looks like t/spec/integration/99problems-21-to-30.rakudo.parrot infiniloops | 11:00 | |
sorear | jnthn: think we might get a small speedup from that? | ||
timotimo | *small*? :D | ||
jnthn | sorear: Um, it can turn a Perl 6 multi-dispatch into an ladd :) | ||
timotimo | jnthn: i'm ready to fire you up ze benchmarks, but only if it's in about 1-2 hours | ||
jnthn | timotimo: I'm gonna fix up nextsame et al. first. | 11:01 | |
sorear: Probably means we do somewhat better on the native benchmarks... | 11:02 | ||
sorear: And in all the built-ins that use native types in their impl. | |||
sorear | yeah, I kind of wonder if there are enough of those to make a difference | 11:05 | |
11:05
woolfy1 joined
|
|||
sorear | I don't actually know what kind of win the optimizer was when it first came it | 11:05 | |
in | |||
11:07
Bucciarati joined
|
|||
[Coke] wonders where is_run is actually defined. Test/Util.pm has lots of protos, but no actual impl. | 11:07 | ||
doh, it's there, just beyond my scroll. | 11:08 | ||
sorear | jnthn: I'm pretty sure that the gather/take issue is because I stole a concept from Scheme and the papers I was basing it off of implicitly assumed proper tail recursion | 11:13 | |
I can see a couple ways to fix this, need to decide which is the most elegant | |||
jnthn | sorear: ah..that explains it. | ||
sorear | jnthn: every time you take() it seems to add a frame to the bottom of the saved stack fragment that does nothing | 11:14 | |
jnthn | sorear: Which nicely explains how things that take enough stack overflow... | 11:17 | |
11:19
colomon left
11:23
rindolf left
11:28
preflex_ joined,
ChanServ sets mode: +v preflex_
|
|||
lizmat | will look at stuff later, now cycling in the searing heat / sun& | 11:28 | |
11:29
preflex left,
preflex_ is now known as preflex
|
|||
[Coke] | java's exec doesn't handle shell redirection. Trying to figure out if I have to parse (at a minimum) > and 2> myself, or if I can cheat. | 11:30 | |
timotimo | gist.github.com/timo/2c85b3c62372b72468a3 <- link to source code in the description of the gist; does this ring a bell for any of our jvm-porters? | 11:31 | |
11:31
colomon joined
|
|||
jnthn | [Coke]: Well, I guess it's possible to invoke a shell... | 11:32 | |
[Coke]: But that may cause other issues... | |||
11:32
berekuk left
|
|||
jnthn | timotimo: There's a spectest that explodes that way, iirc | 11:32 | |
timotimo: But it may be completely unrelated. | |||
timotimo | fwiw, the == candidate is \a \b, probably comes from $n.Int, which in this case should totally be a valid integer. hm. | 11:33 | |
11:34
berekuk joined
|
|||
jnthn | timotimo: Does it do mixins? | 11:34 | |
### Cannot call 'Numeric'; none of these signatures match: | |||
* S14-roles/mixin.rakudo.jvm aborted 7 test(s) | |||
That's the spectest that fails in the same way | 11:35 | ||
sorear | [Coke]: you're looking for java.lang.ProcessBuilder. | 11:36 | |
oh, you were doing shell, not `` | |||
11:36
colomon left
|
|||
timotimo | i don't think it does | 11:37 | |
i don't think it does, but could it have something to do with enums? | |||
jnthn | Hm, maybe | ||
timotimo is unable to reproduce it in golfed form so far | |||
sorear | (you want ProcessBuilder anyway because exec() doesn't let you NOT automatically redirect output to pipes) | ||
jnthn | enum spectests are in quite good shape, though... | ||
timotimo | no luck so far. | 11:38 | |
[Coke] | I don't want processbuilder, but that means I have to parse out > and 2> myself. | ||
s/but/because/ | 11:39 | ||
I think I have a *nix version working with exec(['sh', '-c', $cmd]) | |||
\o/ | 11:40 | ||
jnthn: mind if I commit the *nix only version to start? | 11:41 | ||
dalek | p: 6602633 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/CallFrame.java: CallFrame stashing space for args/csd. Could do this always and save passing them around some, but for now this is just for Rakudo's benefit. Saves us having to savecapture in every frame just for the sake of nextsame et al. |
||
sorear | [Coke]: note that if you don't use ProcessBuilder and inheritIO, *unredirected* output will go to the wrong place | ||
[Coke] | sorear: where is "the wrong place"? Right now it goes nowhere. | 11:42 | |
timotimo | r: enum Frob <FOO BAR BAZ>; class Test { has Int $.w; has Int $.h; method foo() { [Frob.pick xx $!w] xx $!h } }; Test.new(:w(5), :h(5)).foo() # does not trigger the error | ||
camelia | rakudo ba7f78: ( no output ) | ||
dalek | kudo/nom: cab99b2 | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/Ops.java: Get nextsame, callsame etc. tests passing. |
11:43 | |
sorear | [Coke]: into an anonymous pipe that you can read with proc.getOutputStream() | ||
timotimo | .o( i think the implementation of xx could be factored out quite a bit ) | ||
[Coke] | sorear: is shell supposed to display or return any output? | 11:44 | |
I thought it discarded output and returned an exit status. | |||
jnthn: what does "say $*OS" say for you? | 11:45 | ||
jnthn | On JVM? "Windows 7" | 11:46 | |
sorear | [Coke]: It's supposed to allow the subprocess output to pass freely to the parent's standard IO | 11:47 | |
11:47
berekuk left
|
|||
[Coke] | r: shell('ls'); | 11:48 | |
sorear | with no interaction from the parent, so you can do shell("vi", $file) | ||
camelia | rakudo ba7f78: OUTPUT«shell is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting:2 in sub shell at src/RESTRICTED.setting:7 in block at /tmp/_yGLsYxjNx:1» | ||
sorear | shell(%*ENV<VISUAL> // %*ENV<EDITOR> // "vi", $file) :) | ||
11:48
berekuk joined
|
|||
[Coke] | sorear: Ok. I give up, then. | 11:49 | |
timotimo | gist.github.com/timo/91483e54fa0b20173f5f <- ? | 11:50 | |
[Coke] | Here is the wrong version: gist.github.com/coke/5939689 | 11:51 | |
to do it the write way, we need to be able to parse all the shell metacharacters ourselves. I suggest we find a third party library instead. | |||
*right | 11:52 | ||
sorear | Process proc = new ProcessBuilder("sh", "-c", cmd).inheritIO().start() | ||
ought to work | |||
sorear suspects jnthn++ can whip up an if statement involving cmd.exe | 11:54 | ||
11:54
PacoAir joined
|
|||
jnthn | I guess by looking at System.getProperty("os.name") and then "cmd", "/c/" cmd | 11:56 | |
[Coke] wonders if we have any tests for sorear's case in roast. | 11:57 | ||
11:57
berekuk left
|
|||
[Coke] | sorear++ # that worked. | 11:57 | |
sorear | jnthn: mainly that I don't know what %*VM<properties><os.name> is on windows, or what the proper syntax for cmd /c/ is | 11:58 | |
11:59
berekuk joined
|
|||
timotimo | oh, i may need to nqp::p6bool that ... | 11:59 | |
dalek | ast: 034ed21 | coke++ | packages/Test/Util.pm: workaround exec name issue on nqp-jvm |
12:01 | |
p: ef6648d | coke++ | src/vm/jvm/ (2 files): add (unix only) nqp::shell for jvm sorear++ |
12:02 | ||
kudo/nom: 0eab21a | coke++ | src/core/control.pm: shell -> nqp::shell |
12:03 | ||
[Coke] | sorear: there, now it's jnthn++'s problem. :) | ||
jnthn | :P | ||
[Coke]: Does that make spectests that depend on it run? :) | 12:04 | ||
If so, that's quite a few test files we win :D | |||
[Coke] | jnthn: at least one runs to completion now, yes. | ||
doing a rebuild with latest changes, spectesting. | 12:05 | ||
jnthn | k | ||
jnthn is looking into why installing a second categorical clobbers the first. | 12:07 | ||
sorear | mixin funs? | 12:09 | |
jnthn | Could well be. | ||
timotimo | my patch above seems to win us a tiny bit of performance | 12:11 | |
12:11
berekuk left
|
|||
timotimo | that's probably the jit figuring out everything by itself or something | 12:11 | |
12:12
berekuk joined
|
|||
jnthn | Hm, if it's mixin fun it's pretty weird mixin fun 'cus the mro length changes :) | 12:14 | |
ohhh | |||
I bet I know. | |||
12:16
birdwindupbird joined
|
|||
JimmyZ | [Coke]: github.com/clojure/clojure/blob/ma...l.clj#L140 looks like support 1>&2 | 12:17 | |
JFYI | 12:18 | ||
[Coke] | JimmyZ: I have something that looks like it works now. thanks for the pointer, though! | ||
JimmyZ | :P | 12:21 | |
12:21
berekuk left
12:24
berekuk joined
12:33
ztt joined
12:35
berekuk left,
jferrero joined
12:36
berekuk joined
|
|||
[Coke] | r: say 24604 / 26108 | 12:42 | |
camelia | rakudo 0eab21: OUTPUT«0.942393» | 12:43 | |
timotimo | sweet :) | ||
[Coke] | r: say .942393-.9348 | ||
camelia | rakudo 0eab21: OUTPUT«0.007593» | ||
timotimo | better than nothing ;) | ||
[Coke] | I'll regen the gist again after the daily run today. | ||
jnthn | How long until the daily run? | 12:44 | |
[Coke] | it's still manual. 3 kick off at about 12 eastern. rakudo-jvm I then have to run manually | 12:45 | |
timotimo | did that run already include the fixes to shell? | 12:46 | |
[Coke] | timotimo: ^^ one? yes. ran it by hand | 12:47 | |
jnthn | Not that far from 95% :) | ||
[Coke] | r: 26108*.9 - 24604 | 12:48 | |
dalek | p: 3fbb512 | sorear++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/ (3 files): Implement implementClass / callback mechanism |
||
camelia | rakudo 0eab21: ( no output ) | ||
[Coke] | r: 2say 6108*.9 - 24604 | ||
camelia | rakudo 0eab21: OUTPUT«===SORRY!===Confusedat /tmp/grfwX2fFkW:1------> 2⏏say 6108*.9 - 24604 expecting any of: whitespace» | ||
[Coke] | r: say 6108*.9 - 24604 | ||
camelia | rakudo 0eab21: OUTPUT«-19106.8» | ||
[Coke] | r: say 26108*.9 - 24604 | ||
camelia | rakudo 0eab21: OUTPUT«-1106.8» | ||
[Coke] | (oy) | ||
sorear | gist.github.com/sorear/5939789 | ||
[Coke] | r: say 26108*.95 - 24604 #oy oy | 12:49 | |
camelia | rakudo 0eab21: OUTPUT«198.6» | ||
sorear | sleep& | ||
[Coke] | yes, excellent plan. see you post nap. :) | ||
zzz | |||
jnthn | sorear: !!! :D | ||
sorear++ | |||
timotimo | looking forward to when there's some sugar for that :3 | 12:51 | |
12:57
domidumont joined
|
|||
timotimo | turns out the forest-fire benchmark was broken due to my dumbness. | 12:59 | |
masak is back from the wedding | |||
jnthn | Hm, think I may have got us another 100+ passes | ||
timotimo | i'm preparing for another benchmark run. are you going to commit something? | 13:03 | |
jnthn | yeah, but it ain't performance related | ||
timotimo | ok | ||
jnthn | I may do the compile time call analysis later | 13:04 | |
timotimo | at that time i'll be hanging around with my parents :) | ||
13:05
domidumont left
|
|||
dalek | p: 445550b | jnthn++ | src/ (2 files): Fix handling of generic method names. On JVM (and MoarVM, for that matter) the name associated with a code object is stored statically, not in the actual code ref itself like on Parrot. This is generally more efficient (saves a field in closures), but we relied on it. This prevented declaring more than one user defined operator in Rakudo on JVM, which busted various tests. On Parrot, we keep the same approach as today. |
13:10 | |
jnthn | 100ish more for the run :) | ||
walk etc. & | 13:13 | ||
timotimo | cool :) | 13:21 | |
tadzik | do we already have a perlbrew-like thing, which can do 'rakudobrew switch jvm' etc? :) | 13:22 | |
I know the answer | |||
timotimo | well volunteered :) | ||
tadzik | aye :0 | 13:23 | |
timotimo | fwiw, the perl6-bench infrastructure is cool. it allows you to specify exact revisions/tags of your stuff to be built on demand. maybe steal a bit of that? | ||
tadzik | hacking in the garden, mm | ||
wow, I will look into it | |||
1Mbit internet will be suboptimal for testing, heh | 13:25 | ||
timotimo | at first, you "./bench setup" which will clone rakudo, nqp, perl5, moarvm for you, then you "./bench extract rakudo-jvm/some-branch-or-tag-or-commit rakduo/some-blah" and then you can "./bench time rakudo-jvm/foo rakudo/bar" | ||
tadzik | hm | 13:26 | |
timotimo | make cloning all the shtuff at the beginning optional and it'll already come quite a bit closer | 13:27 | |
13:29
berekuk left
|
|||
tadzik | ah, but bench is all Perl 6 | 13:30 | |
...it tok me 5 minutes to notice that :D | |||
13:32
berekuk joined
|
|||
timotimo | no, it's a bit of perl5, too (timeall, analyze, ...) | 13:32 | |
also, that's a good point :| | |||
tadzik | well, the ./bench part | ||
where all the logic is | |||
although components.json itself is quite useful | |||
timotimo | right. | 13:33 | |
i will probably not be able to upload the benchmark results in time. | 13:35 | ||
13:36
mtk joined
|
|||
tadzik | haha. Bash uses eq for numeric comparisons, = for string comparisons | 13:41 | |
affordablehousinginstitute.org/blog...cigar1.jpg | |||
r: say $?VM | 13:44 | ||
camelia | rakudo 0eab21: OUTPUT«===SORRY!===Variable '$?VM' is not declaredat /tmp/p2aep_TGFF:1------> say $?VM⏏<EOL> expecting any of: postfix» | ||
tadzik | jvm reacts in a more spectacular way :P | ||
but just in a repl | 13:45 | ||
lee_ | i've seen that a few times on the jvm repl (infinite scrolling errors) | 13:46 | |
tadzik | yeah | ||
maybe the jvm repl is not quite there :) | 13:47 | ||
say $?VM on rakudo-jvm just prints a newline | |||
lee_ | mine is a bit out of date, guess I should rectify that | 13:48 | |
14:02
xilo_ joined
|
|||
timotimo | gaaah i'll have to wait until late at night to check out jnthns probably to arrive soon patches for native compile-time dispatch ( | 14:09 | |
:( | |||
14:16
berekuk left
|
|||
tadzik | gist.github.com/tadzik/5940022 seems to work :) | 14:18 | |
timotimo | looks good! :) | ||
gotta run now | |||
14:19
berekuk joined
14:29
dmol joined
14:54
dmol left
14:59
rindolf joined
15:00
berekuk left
15:01
berekuk joined,
berekuk left
15:21
konundra joined
|
|||
TimToady | .tell masak I suspect it's some form of en.wikipedia.org/wiki/Anterograde_amnesia | 15:25 | |
yoleaux | TimToady: I'll pass your message to masak. | ||
masak | ah. | 15:26 | |
TimToady | I believe this was even admitted at one point | ||
well, not with those words | |||
.oO(I keep forgetting that I have amnesia.) |
15:29 | ||
masak | I can't seem to prod the irclogs into remembering, either. | 15:30 | |
ah, found it. | |||
irclog.perlgeek.de/perl6/2012-02-10#i_5130347 | |||
irclog++ | 15:31 | ||
TimToady | brainlogs++ :) | 15:32 | |
moritz | masak: you might want to use tina.perlgeek.de/perl6/search/ for searching. It's still in beta, and doesn't have quite up-to-date data, but the search should work much better | ||
masak | ooh | 15:33 | |
moritz++ | |||
moritz | (it's powered by Lucy) | 15:34 | |
15:34
ajr joined
|
|||
masak | tina powered by Lucy. gotcha. | 15:34 | |
15:34
ajr is now known as Guest35475
|
|||
moritz | :-) | 15:34 | |
"tina" is just the hostname, and I use that virtual host for experimental stuff | |||
(under the hood I've mostly rewritten the IR clogs; now uses a partially normalized DB schema, Plack, and Lucy) | 15:35 | ||
15:35
benabik left
|
|||
masak | nice. | 15:35 | |
JimmyZ | how was ibot6 runing? | 15:36 | |
moritz | JimmyZ: mostly stable | ||
15:36
Guest35475 is now known as ajr_
|
|||
moritz | but the problem is that the new machine has too litle RAM to compile rakudo | 15:36 | |
JimmyZ | no memory overflow? | ||
:P | |||
TimToady | I'm sure no one has ever told me I have amnesia. | 15:37 | |
moritz | someone told me I have amnesia, but I forgot who. | 15:38 | |
TimToady | Dr Who | ||
15:39
benabik joined
|
|||
masak | there's nothing wrong with my memory; I've never forgotten anything, as far as I recall. | 15:40 | |
Teratogen | so a dyslexic walks into a bra... | 15:45 | |
TimToady | Lysdexic: someone who can't write due to a broken right hand. | 15:55 | |
masak | one of the funniest things I ever found in one of my old notebooks (that I had forgotten I had made) was a page with only big, messily scrawled letters spelling out the phrase "OBSERVE HOW I'M TRYING TO WRITE THIS WITH MY LEFT HAND". | 16:11 | |
TimToady | r: gist.github.com/anonymous/5940348 | 16:14 | |
camelia | rakudo 0eab21: OUTPUT«1..1open is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting:2 in sub open at src/RESTRICTED.setting:5 in sub nonfatalscope at /tmp/CdaZH4SaGB:10 in sub fatalscope at /tmp/CdaZH4SaGB:6 in block at /tmp/CdaZH4SaGB:13# Looks … | ||
TimToady | well, anyway, that gist is the rakudobug I was carping about last night, where $*FATAL doesn't turn off in non-fatal scopes | 16:15 | |
masak runs it locally | 16:17 | ||
masak submits rakudobug | |||
16:20
lizmat joined
16:22
dmol joined
16:27
FROGGS joined
|
|||
TimToady hates it when a language sets options using methods like .inheritIO | 16:33 | ||
diakopter | . | ||
masak | says the guy who invented $[ :P | 16:34 | |
TimToady | that's why I use the present tense :) | ||
masak | ooh, it was deprecated in 5.12 -- I did not know that. | 16:35 | |
TimToady | and it was made lexically scope much earlier | 16:36 | |
*scoped | |||
masak | ooh, I did not know that either. | ||
TimToady | in fact, I did that | ||
masak | TimToady++ # atoning, partially | ||
TimToady | and recall that $[ was really invented for Perl 0, so I could write a2p | 16:37 | |
masak | oh, because awk is 1-based? | ||
TimToady | yup | ||
masak wonders what Dijkstra thought of awk :) | 16:38 | ||
TimToady | well, Henry Spencer though awk was perl without skin cancer :) | ||
*ght | |||
and Perl 0 had no notion of modules at that point (or of lexical scopes, for that matter, or even packages), so a global made sense | 16:40 | ||
lizmat | good *, #perl6! | ||
TimToady | because that's all we had... | ||
lizmat | glad to be back in a cool place :-) | ||
TimToady | Q: Why are you banging your head against the wall? A: Because it feels so good when I stop. | 16:41 | |
lizmat | r: my $a=Hash; say $a; $a<b>=1; say $a.perl # just before I left, I realized that this already works: | ||
camelia | rakudo 0eab21: OUTPUT«(Hash){"b" => 1}» | ||
lizmat | aka, somewhere a "new" is done | 16:42 | |
masak | lizmat! \o/ | ||
FROGGS | I should try banging my head against Wall next time :o) | 16:43 | |
jnthn | o/ lizmat | 16:44 | |
16:44
crab2313 joined
|
|||
lizmat | so I decided to rig circumfix {} to do a Hash.new only if parameters are specified | 16:44 | |
otherswise, just assign the type | 16:45 | ||
s/assign/return | |||
jnthn | Could we not rig it to just not pass Nil along? :) | ||
TimToady | r: my $a; say $a; $a<b>=1; say $a.perl | ||
camelia | rakudo 0eab21: OUTPUT«(Any){"b" => 1}» | ||
TimToady | you don't need the Hash even | ||
jnthn | lizmat: That feels kinda wrong, fwiw. | ||
r: say {}.WHAT | 16:46 | ||
camelia | rakudo 0eab21: OUTPUT«(Hash)» | ||
jnthn | r: say {}.DEFINITE | ||
camelia | rakudo 0eab21: OUTPUT«True» | ||
lizmat | I think the Hash makes it cleaner | 16:47 | |
anyway, now I got the following behaviour: | |||
$ perl6 -e 'my $a={}; say $a.defined; $a<b>=1; say $a' | |||
False | |||
("b" => 1).hash | |||
16:48
ztt left
|
|||
lizmat | isn't that what we wanted for uninitialized hashes ? | 16:48 | |
TimToady | that's an empty hash, not an undefined hash | ||
jnthn | {} is ...that. | ||
lizmat | ok, so we don't want it there, but if we say: 'my %h", then the %h should not be defined, right? | 16:49 | |
jnthn | lizmat: All it needs, afaict, is setting a "it's empty" flag in the "elsif $stmts == 0 {" branch, then not looping over @children further down if that was the case. | 16:50 | |
timotimo | t.h8.lv/p6bench/2013-07-06.html more plots | ||
lizmat | jnthn: will look for that | ||
timotimo | weird, i think the trim_string benchmark b0rked again | 16:52 | |
masak | oh, how time flies. sprintf hackathon in 1h and a bit. | 16:55 | |
TimToady | timotimo: looks like | ||
16:55
atroxaper joined
|
|||
FROGGS | ohh | 16:56 | |
masak: I'll join late | |||
16:56
atroxaper left
|
|||
masak | ok. | 16:56 | |
TimToady | whoever wrote that blue-line program must have gone totally insane over performance and scaling... :) | 16:57 | |
FROGGS | I've set up a new server for that blue-line program at work yesterday | 16:58 | |
dalek | p: 121892f | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/ (5 files): Give in and move name into CodeRef itself. After finding another obscure bug that boils down to the same issue, and with the !reify_name fix feeling fragile if mixed with pre-comp, it's much easier to go this way for now. |
||
p: 8645a09 | jnthn++ | src/ (2 files): Revert "Fix handling of generic method names." This reverts commit 445550b24d7952a9a3ca440e76347474cf79715d. |
|||
FROGGS | our other servers run 5.10 still :/ | ||
dalek | kudo/nom: 4e86c80 | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/Ops.java: Chase latest NQP change. |
16:59 | |
masak | I see three things we can focus on in today's sprintf hackathon: (a) dropping the our implementation into nqp-JVM. (b) figuring out what the spectests want that we don't have yet. (c) working on those missing features. | ||
(c) is fully dependent on (b). (b) is only sorta-kinda dependent on (a). | 17:00 | ||
jnthn | That fixes S12-methods/multi.t... | ||
masak | I'll work on (a) if nothing unexpected happens. | ||
TimToady | jnthn: does/could the for ^$max {...} optimization figure out that ... doesn't use $_ and, say, substitute a countdown? | ||
lizmat | masak: why nqp-JVM only ? | ||
why not nqp, period ? | |||
TimToady | since 'while --$countdown' tends to be fast, especially in native types (assuming native decrement is available) | 17:01 | |
masak | lizmat: because I believe that'll lose us passing spectests on Parrot. | ||
jnthn | TimToady: There's no optimization of that at present, and you'd need to be sure that $max is not bigint... | ||
lizmat: I think we should do that eventually, but it should handle everything we already do first. | |||
lizmat | masak: isn't that the whole wrong reason, and a very short term as well? | ||
ok, as long as we see that's the end goal :-) | 17:02 | ||
jnthn | lizmat: Whereas with nqp-jvm we've nothing to lose by having a not-done-yet version. | ||
TimToady: Which makes it a bit harder to do static analysis of... | |||
masak | lizmat: definitely the long term. | ||
FROGGS | lizmat: I guess it is just an #?if jvm, and will be used for all backends when it supports all features | ||
masak | lizmat: I'm just *very* against regressing on passing spectests. | ||
lizmat: that just isn't done. it hurts people. it hurts the ecosystem. | 17:03 | ||
FROGGS | because no packend will ever support printing NaN in %d | ||
(or what the rt report what about) | |||
lizmat | ok ok ok :-) just wanted to make sure we're on the same page regarding the future here :-) | ||
TimToady | if $_ isn't used, then counting down from 2**64-1 will probably take a long time anyway, if you cap it at that | ||
masak | no-one would be happier/prouder than me if sprintf were the standard across all backends. that's why I started implementing it in pure nqp. | 17:04 | |
so yes, of course that's the long-term goal. ;) | |||
TimToady | I'm guessing nobody would ever notice a cap at 2**64-1 :) | ||
jnthn | timotimo: It appears that something I did unbusted S14-roles/mixin.rakudo.jvm | ||
TimToady: That's, uh, sick. But you're right. :D | |||
timotimo: Which is the test that exploded with the Numeric method error | |||
timotimo: You may want to try a forest fire again | 17:05 | ||
TimToady | see earlier note about "insane" | ||
jnthn | Hm, seems that fix I just did incidentally fixed a few things... | 17:07 | |
aww, but not S06-multi/type-based.t | 17:08 | ||
FROGGS | maybe next time *g* | 17:11 | |
lizmat | coming back to '{}' versus 'my %' I don't really see a difference | 17:17 | |
the fact that we see {} as an empty (defined) hash, feels like a p5ism to me | |||
.oO( wonder what TimToady's thoughts are on that ) |
17:18 | ||
17:18
domidumont joined
|
|||
TimToady | I already said, I thought. {} and [] are simply empty, not undefined | 17:18 | |
lizmat | argh, yes, sorry for the noise | 17:19 | |
TimToady | r: say ().defined; # this too | 17:20 | |
camelia | rakudo 4e86c8: OUTPUT«True» | ||
17:20
patspam joined
|
|||
dalek | kudo/nom: 4e9635e | (Elizabeth Mattijsen)++ | src/core/Hash.pm: Remove superfluous call to STORE, "new" handles this also |
17:20 | |
p: bc36181 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: Make nqp::shell work on Windows. Means that the spectests that spawn a sub-process can now be run on Windows also. |
|||
jnthn | ...apart from they seem to fail under make spectest... | 17:22 | |
17:23
patspam left
17:24
patspam joined
17:28
birdwindupbird left
|
|||
masak | yes, there's a discontinuity there between item-size variables and container-size variables. 'my $s' starts out undefined until assigned to. 'my %h' starts out empty-but-defined. | 17:30 | |
I guess it even makes sense in a way. there are no "empty scalars", so the only way they can show their emptiness is to be undefined. but with containers it doesn't make much sense to be undefined, only to then fill it with a container -- might as well start your existence as an empty container. | 17:31 | ||
jnthn | oh, maybe it did. | ||
TimToady | masak: it doesn't make sense to start with an empty container if you're immediately going to rebind it to something else; consider a function parameter like (@shaped[100][100]) that accepts an array of that shape, but it would not make sense to allocate @shaped and then bind over the top of that | 17:35 | |
one could argue similarly for: my @shaped[100][100]; ...; @shaped := @some_100x100_array | 17:37 | ||
autoviv just becomes an all-or-nothing affair in that case | 17:38 | ||
this would eliminate the discontinuity, though it might make optimizing harder | 17:39 | ||
masak | aye. | 17:40 | |
TimToady | s:g/'[100][100]'/[100;100]/ | ||
we'd like 'my @shaped[100][100]' to make some static guarantees that the optimizer can depend on | 17:41 | ||
masak | I wasn't thinking of shaped arrays at all -- just trying to rationalize the discontinuity between scalar containers and unshaped array/hash containers. | ||
TimToady | or that we can at least point the finger back at the user if they violate it | ||
masak | preferably at compile time. | ||
TimToady | "static" | ||
masak | *nod* | 17:42 | |
TimToady | though yes, we might not be able to detect the erroneous code at compile time | ||
darn it, I wrote [100][100] again :) | |||
TimToady wonders if we should allow that in the declaration, or maybe we do | 17:43 | ||
std: my @shaped[100][100] is Blurfl; | 17:44 | ||
camelia | std 85cf51d: OUTPUT«ok 00:00 43m» | ||
TimToady | I guess we do | ||
std: my @shaped[100]{Bool}[42] is Blurfl; | |||
camelia | std 85cf51d: OUTPUT«ok 00:00 44m» | ||
TimToady | so we can intermix array and hash shapes | 17:45 | |
std: my @shaped[*]{*}[*]; # probably see a lot of shaped arrays that merely do Array vs List like this | 17:49 | ||
camelia | std 85cf51d: OUTPUT«ok 00:00 44m» | ||
TimToady | in that case it's still autoviv at every level, arguably including @shaped itself | 17:50 | |
17:50
mstefanko left
|
|||
lizmat | jnthn: I guess this is *not* what we were going for: $ perl6 -e 'my @a=->{}; say @a[0]' | 17:50 | |
Block.new() | |||
r: my @a=->{}; say @a[0] | |||
camelia | rakudo 4e86c8: OUTPUT«Block.new()» | 17:51 | |
TimToady | looks correct to me :) | ||
jnthn | lizmat: Looks fine | ||
lizmat: It's only the {} form that becomes hash | |||
*a | |||
lizmat | r: my @a={}; say @a[0] | 17:52 | |
camelia | rakudo 4e86c8: OUTPUT«().hash» | ||
17:52
mstefanko joined
|
|||
jnthn | Right. | 17:52 | |
TimToady | because why would you write an empty closure anyway? maybe for a callback that does nothing, but {;} is not an onerous burden in that case | ||
lizmat | hmmm… seems I've lost the plot, then :-( | 17:54 | |
r: sub a {}; say a; my @a=a; say @a | 17:55 | ||
camelia | rakudo 4e86c8: OUTPUT«Nil» | ||
lizmat | jnthn: then what did you mean by "[18:50:04] <jnthn> lizmat: All it needs, afaict, is setting a "it's empty" flag in the "elsif $stmts == 0 {" branch, then not looping over @children further down if that was the case." ? | 17:56 | |
17:57
mstefanko left
|
|||
[Coke] kicks off the rakudo.jvm run | 17:57 | ||
masak | so, what is this new 'is Blurfl' trait I keep hearing about? :P | ||
TimToady | it's a trait that fails if the thing to the left doesn't parse as a shaped array :) | 17:58 | |
17:58
aindilis joined
|
|||
TimToady | std: (my @shaped[*]{*}[*]) is Blurfl; | 17:59 | |
camelia | std 85cf51d: OUTPUT«===SORRY!===Two terms in a row at /tmp/NfepoOlEkG line 1:------> (my @shaped[*]{*}[*]) ⏏is Blurfl; expecting any of: feed_separator infix or meta-infix infixed function statement modifier loopParse failedFAILED 00:00 | ||
..4… | |||
TimToady | std: my @shaped[*]{*}.[*] is Blurfl; | ||
camelia | std 85cf51d: OUTPUT«===SORRY!===Two terms in a row at /tmp/iLisXTqOpK line 1:------> my @shaped[*]{*}.[*] ⏏is Blurfl; expecting any of: feed_separator infix or meta-infix infixed function statement modifier loopParse failedFAILED 00:00 | ||
..46… | |||
masak | ok. sprintf hackathon begins. | 18:00 | |
TimToady | ^^^ a place we distinguish [] from .[] | ||
masak | TimToady: yes, and S09 mentions that, methinks. | ||
18:00
mstefanko joined
|
|||
[Coke] | jnthn++ nqp:shell for win | 18:04 | |
tadzik | for the win! | 18:06 | |
TimToady | my @shaped[100;100] = 0 xx *; # allowed? or should we require something resembling (0 xx *) xx * | 18:07 | |
masak | QAST::OperationsJAST.map_classlib_core_op('sprintf', $TYPE_OPS, 'sprintf', [$RT_STR, $RT_OBJ], $RT_STR, :tc); | ||
jnthn: ^ guessing I want to do .add_core_op here instead? | |||
TimToady: the conservative thing to do is to require something of the same shape. | 18:08 | ||
[Coke] | masak: instead of? | ||
masak | [Coke]: instead of that line, which uses JVM's sprintf. | ||
[Coke] | masak: (yes, you'll need that to put in a hook for nqp::sprintf | ||
TimToady | I think there's some constraint that we initialize a multidimensional object with a LoL that every dimension must limit either in the decl or in the initializer, but both can't be * | 18:09 | |
[Coke] | masak: yes. though I only know how to point to a java method, not a perl6 one. | ||
masak | it's implemented in nqp. | ||
and I see examples of .add_core_op in that file, don't worry. | |||
TimToady | so my @shaped[100;100] = lol (0 xx *) xx * is allowed | 18:10 | |
masak | biggest question right now is where in the file hierarchy to place the sprintf code... | ||
std: lol 42 | |||
camelia | std 85cf51d: OUTPUT«ok 00:00 42m» | ||
TimToady | but my @shaped[*;100] = lol (0 xx *) xx * is not allowed | ||
masak wasn't aware 'lol' was a listop, too | 18:11 | ||
TimToady | but my @shaped[*;100] = lol (0 xx *) xx 100 is allowed | ||
masak | TimToady: makes sense. | ||
TimToady | nr: say lol (0 xx 5) xx 5 | ||
camelia | niecza v24-86-g39ab531: OUTPUT«===SORRY!===Undeclared routine: 'lol' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 36)  at /home… | ||
..rakudo 4e86c8: OUTPUT«===SORRY!===Undeclared routine: lol used at line 1. Did you mean '&log'?» | |||
TimToady | been specced for a long time | 18:12 | |
nr: say ((0 xx 5) xx 5).lol | |||
camelia | rakudo 4e86c8: OUTPUT«ListIter.new()» | ||
..niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Unable to resolve method lol in type List at /tmp/xP4XcTkLzX line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4580 (module-CORE @ 576)  at /home/p… | |||
lizmat | I guess that qualifies as LHF | ||
TimToady | though the fact that we have to write the (0 xx *) xx 100 above probably means our xx operators are backwards | ||
you'd like to say 100 xx (* xx 0) instead | 18:13 | ||
lizmat | maybe we need a reverse version of the "xx" operator, something like "xx" ? | 18:14 | |
TimToady | :D | ||
lizmat | :-) | ||
TimToady | nr: say 'xx'.flip | ||
camelia | rakudo 4e9635, niecza v24-86-g39ab531: OUTPUT«xx» | ||
TimToady | there you go | ||
hmm | 18:15 | ||
masak | r: say 5 Rxx "OH HAI" | ||
camelia | rakudo 4e9635: OUTPUT«OH HAI OH HAI OH HAI OH HAI OH HAI» | ||
TimToady | nr: say 3 Rxx 'It's true!' | ||
camelia | rakudo 4e9635: OUTPUT«===SORRY!===Two terms in a rowat /tmp/VXFljlRaKq:1------> say 3 Rxx 'It'⏏s true!' expecting any of: postfix infix stopper infix or meta-infix statement end statement modifier … | ||
..niecza v24-86-g39ab531: OUTPUT«===SORRY!===Confused at /tmp/limiDH6GgD line 1:------> say 3 Rxx 'It'⏏s true!'Parse failed» | |||
masak | I win. | 18:16 | |
TimToady | I said hmm first though | ||
masak | ;) | ||
TimToady | sometimes this language scares me :) | 18:17 | |
masak | fwiw, I did the apostrophe-inside-singlequote-string thing yesterday... :) | ||
(in code I was writing) | |||
TimToady | it's one of the reasons I usually use "" instead | ||
lizmat | but if we will revert 'xx's meaning, a *lot* will need to be changed around | ||
masak | yes no please don't do that. | ||
TimToady | lizmat: nobody is suggesting that :) | ||
notice me not suggesting it very hard | 18:18 | ||
masak | panic oh noes aaaaaah oh ok. :P | ||
lizmat | :-D | ||
masak .oO( masak is only allowed to panic 255 times ) | |||
18:18
pmurias_ joined
|
|||
TimToady | 2**64-1 | 18:18 | |
lizmat | after that, panic really strikes | ||
TimToady | maybe Jesus really meant we should forgive our brother 70 ** 7 times | 18:20 | |
masak | "turn the 471st cheek" | ||
er, "490th" | 18:21 | ||
TimToady | nr: say 70 ** 7; say 70 R** 7 | ||
camelia | rakudo 4e9635, niecza v24-86-g39ab531: OUTPUT«8235430000000143503601609868434285603076356671071740077383739246066639249» | ||
masak | oh, ** :) | ||
TimToady | let's aim for 70 R** 7 | ||
timotimo | jnthn: i got the numeric thing in xx due to a sillyness i made mostly; forest fire actually does run | ||
just not very much | |||
masak | TimToady: right, but after that, I think the brother's actual malice has been firmly established. | 18:22 | |
TimToady | let's hear it for Bayse | ||
masak .oO( Bayes-less accusations ) | 18:23 | ||
18:24
raiph joined
|
|||
TimToady | no wonder I couldn't make Bayseian look right... | 18:24 | |
timotimo | forest fire is b0rked somehow. there's forest, but no fire | ||
TimToady | does the forest grow? | 18:25 | |
raiph | <TimToady> but my @shaped[*;100] = lol (0 xx *) xx 100 is allowed | ||
did you get that wrong? | |||
TimToady | raiph: no, the order is backwards because xx varies in the opposite order of subscripting | ||
hence the remark about it being backwards | |||
raiph | ah, gotchya | 18:26 | |
TimToady | we're supplying 100 to the * and * to the 100 | ||
just can't do * in both places, unless we allow lazy dimensions somehow (brane asplodes) | |||
lizmat | .oO( sixties colours abound ) |
18:27 | |
TimToady | or we say that a coinciding * means that we must wait till one is autovivified to initialize the child | 18:28 | |
maybe that works out | |||
but really, initializing only leaves is the bailiwick of 'is default' I suspect | 18:29 | ||
raiph | what's the term for when there's an ideal (semantic+syntax) and something less than ideal but easier to implement that will be forward compatible? | 18:30 | |
TimToady | hack? | ||
raiph | heh | ||
TimToady | stopgap? | ||
raiph | i meant something that's good planning | 18:31 | |
TimToady | a partial emulation? | ||
a subset? | |||
moritz | incomplete implementation? | ||
raiph | i don't like incomplete | ||
TimToady | subset implementation then | 18:32 | |
lizmat | suboptimal | ||
TimToady | a realistic implementation :) | ||
raiph | eg, don't allow * for both decl and init in same dimension for now; but this is forward compatible with allowing it later | ||
so we can formalize an approach toward 6.0.0 | 18:33 | ||
TimToady | a deconjectural implementation :) | ||
lizmat now can build rakudo with Nil inheriting from Mu, thanks to jnthn++'s pointers | |||
TimToady | a conservative implementation | ||
moritz | Nil outside Mu? | ||
TimToady | now that we've decided not to? | ||
lizmat | hehe | ||
yes, I know we decided not to... | 18:34 | ||
masak | yes, "conservative implementation" | ||
lizmat | call me stubborn :-) | ||
masak | it's "conservative" because it hedges in such a way that switching to the better way won't break things. | ||
lizmat | I just wanted it to at least build | ||
raiph | yes, i like conservative | ||
TimToady | we might still put Failure outside of Any, if the binding failure message can be taught to throw when it sees "got Failure, expected Any" | ||
lizmat | so coming back to Nil, should it maybe inherit from Any then? | 18:35 | |
TimToady | that's what it does if you don't say "is Mu' | ||
*" | |||
lizmat | I just want to run the spectest with Nil inherting from Mu just once, so I can gist it for future reference | 18:36 | |
TimToady | but putting Failure outside of Any also makes it impossible to say $x.WHAT === Failure | ||
lizmat | to me, putting Failure outside of Any, doesn't make much sense | 18:37 | |
as anything out of Any basically has different shades of nothingness | 18:38 | ||
TimToady | well, it traps a lot more accidental uses than the method overrides that are currently supplied with Failure | ||
lizmat | and a failure is something | ||
TimToady | my $x = thisfails(); throws, while my Mu $x doesn't | 18:39 | |
lizmat | and I would consider that a feature | ||
just as, if Nil was outside of Any, | |||
TimToady | most attempts to bind Failure would cause a binding failure, hence the need for binding failure to notice Failure and throw it instead | ||
lizmat | you could only store Nil if it was Mu | 18:40 | |
TimToady | same deal, but Nil is supposed to be failsofter than Failure | ||
lizmat | as in: my $a=1; $a= Nil # sets default | ||
my Mu $a=1; $a=Nil # sets Nil | |||
please note that neither of the above fail | 18:41 | ||
TimToady | if we wanted Nil to be failsoft outside of Any, we'd have to do things like the autothreader in Junction does to patch things up | ||
r: say Nil + 0 | 18:42 | ||
camelia | rakudo 4e9635: OUTPUT«use of uninitialized value of type Nil in numeric context in block at /tmp/vX0MZtiQYr:10» | ||
TimToady | this sort of thing becomes fatal if Nil is outside of Any, unless we "autothread" it to replace Nil with 0 | ||
lizmat | $ perl6 -e 'say Nil + 0' | 18:43 | |
Nominal type check failed for parameter '$a'; expected Any but got Nil instead | |||
<Internal error while creating backtrace: Nominal type check failed for parameter 'lhs'; expected Any but got Nil instead in sub METAOP_TEST_ASSIGN:<||> at src/gen/CORE.setting:14373 | |||
TimToady | yes, like that | ||
but Perl likes undefineds to warn and then convert to 0 or '' | |||
if Nil is outside of Any, does the dispatch failover automatically call Junction::AUTOTHREAD? | 18:45 | ||
lizmat | for the record: diff and spectest result of Nil being outside of Any: gist.github.com/lizmat/5940829 | ||
TimToady: I'm not deep enough in that to answer that yet | 18:46 | ||
TimToady | how many extra spectests fail? (niecza failed about 26 more) | ||
most of them in .trans | 18:47 | ||
but I think that's because Nil failsoft semantics are not well tested in roast | 18:49 | ||
18:49
colortiger joined
|
|||
masak | colortiger: oh hai :) | 18:50 | |
lizmat | the last test infiniloops, so I had to abort it, hence no summaries | ||
TimToady | well, one could kill the subprocess | ||
*kill only | 18:51 | ||
18:51
colortiger left
|
|||
masak | bye bye, colortiger. | 18:51 | |
TimToady | 色虎, o/ | ||
dalek | rl6-roast-data: 2426ce4 | coke++ | / (5 files): today (automated commit) |
||
masak | TimToady: 呵呵 | 18:52 | |
lizmat | 94.68% | ||
TimToady: will rebuild and spectest again :-) | |||
masak | TimToady: it's kinda cool that we both studied different languages having the same half-impossible character set, and now I get (some of) your kanji jokes without having to go via Google Translate. :) | 18:53 | |
TimToady | we've long speculated other "autothread" semantics for the Each type; fallback recovery semantics for Nil and Failure are similarly possible | 18:54 | |
masak: well, at this point I actually know more Chinese characters than Japanese | 18:55 | ||
I just don't know how to pronounce them | |||
raiph | gist.github.com/TimToady/1828667 # is this the right OKness proposal for lizmat to read? | ||
GlitchMr | fail 'Cannot .unshift an infinite list' if @elems.infinite; | 18:56 | |
TimToady | she doesn't have to read it really; we're just coming at similar ideas from a different direction | ||
GlitchMr | Why unshifting infinite list would fail. | ||
IMO, it should replace list with that infinite list. | |||
TimToady | it should just unshift into the reified part, I suspect, and leave the infinite part alone | 18:57 | |
masak | TimToady: "I know more Chinese characters than Japanese; I just don't know how to pronounce them" -- that's how my knowledge of Chinese characters feels these days :/ | 18:58 | |
GlitchMr | github.com/rakudo/rakudo/commit/68...00103f2baa | ||
Seriously? | |||
pop() in like every programming language is RW. | |||
masak | GlitchMr: that one was later reverted. | 18:59 | |
GlitchMr | ok | ||
lizmat | indeed, and TimToady later specced "is parcel" | ||
TimToady | but that's not what the 'is rw' means there anyway | ||
masak | GlitchMr: and if you're saying pop() is rw in every programming language, I don't think you understand what it does. | ||
TimToady | it's talking about the return value, not the array | ||
GlitchMr | Oh, I see. | ||
lizmat | but pop itself is not a left value, right? | 19:00 | |
TimToady | it's not 'self is rw' | ||
GlitchMr | But not sure if I understand. | ||
Why `pop` `is rw` then. | |||
TimToady | it's sort of assumed that an object is mutable anyway | ||
GlitchMr | Why I would want to assign to return value of `pop`? | ||
(I'm not talking about @array.pop[0] = 42, that still should be fine) | 19:01 | ||
TimToady | because it's like shift, and shift is what drives the mutability of 'for @x { s/foo/bar/ }' | ||
GlitchMr | Oh, right | ||
TimToady | I think that was the upshot of the conversation; correct me if I'm wrong | 19:02 | |
masak | no, that sounds right. | ||
GlitchMr | With aliases it makes sense, I guess. | ||
TimToady | presumably 'for reverse @x {}' could optimize to pops | 19:03 | |
masak | Perl 6 doesn't realy have the concept of aliases. it's just binding. | ||
GlitchMr | @array[0] := $value | ||
Looks aliasy enough for me. | 19:04 | ||
dalek | kudo/nom: 6319760 | (Elizabeth Mattijsen)++ | src/Perl6/Actions.nqp: Changes suggested by jnthn to make sure empty {} doesn't generate Nils |
||
kudo/nom: 4e29215 | (Elizabeth Mattijsen)++ | src/core/Hash.pm: Slight cleanup for circumfix {} |
|||
masak | QAST::OperationsJAST.add_core_op('sprintf', -> $qastcomp, $op { ... }); # what do I put inside the block to make it call the 'sprintf' logic? | 19:07 | |
or is that the wrong question to ask? should I be using something other than .add_core_op for this? | |||
lizmat | TimToady: wrt unshifting to infinite lists, should that be allowed? | 19:08 | |
TimToady | didn't I just say that? | ||
masak | jnthn: ping | 19:09 | |
lizmat | [20:57:16] <TimToady> it should just unshift into the reified part, I suspect, and leave the infinite part alone | ||
TimToady | r: my @array = 1..*; @array.unshift: 0; say @a[^5] | ||
camelia | rakudo 4e9635: OUTPUT«===SORRY!===Variable '@a' is not declaredat /tmp/s5fS7QCI07:1------> ay = 1..*; @array.unshift: 0; say @a[^5]⏏<EOL> expecting any of: postfix statement end statement modifier statement modi… | ||
TimToady | r: my @a = 1..*; @array.unshift: 0; say @a[^5] | 19:10 | |
camelia | rakudo 4e9635: OUTPUT«===SORRY!===Variable '@array' is not declaredat /tmp/mCJsB4h5kw:1------> my @a = 1..*; @array.unshift: 0⏏; say @a[^5] expecting any of: postfix» | ||
TimToady | r: my @a = 1..*; @a.unshift: 0; say @a[^5] | ||
camelia | rakudo 4e9635: OUTPUT«0 1 2 3 4» | ||
lizmat | I guess the "I suspect" made it unsure for me | ||
TimToady | seems like it works already :) | ||
lizmat | r: (1..5).unshift: 0 | 19:11 | |
camelia | rakudo 4e9635: OUTPUT«Cannot call 'unshift'; none of these signatures match::(Any:U \SELF: *@values, Mu *%_) in method unshift at src/gen/CORE.setting:1486 in block at /tmp/77RQQ034Ah:1» | ||
lizmat | r: (1..*).unshift: 0 | 19:12 | |
camelia | rakudo 4e9635: OUTPUT«Cannot call 'unshift'; none of these signatures match::(Any:U \SELF: *@values, Mu *%_) in method unshift at src/gen/CORE.setting:1486 in block at /tmp/r1D3TN5vyM:1» | ||
TimToady | I doubt that Range has an unshift | ||
lizmat | indeed | ||
r: (1..*).list.unshift: 0 | |||
camelia | rakudo 4e9635: ( no output ) | ||
lizmat | r: say (1..*).list.unshift: 0 | ||
19:12
crab2313 left
|
|||
camelia | rakudo 4e9635: OUTPUT«(timeout)» | 19:13 | |
TimToady | someone is being overly eager, seems | ||
lizmat | r: my @a=1..*; say @a.infinite | ||
TimToady | oh, the say is :) | ||
camelia | rakudo 4e9635: OUTPUT«True» | ||
TimToady | r: say ((1..*).list.unshift: 0)[^5] | 19:14 | |
camelia | rakudo 4e9635: OUTPUT«0 1 2 3 4» | ||
TimToady | there you go | ||
so already works | |||
lizmat | which is odd, as the code says: | ||
multi method unshift(List:D: *@elems) { | |||
fail 'Cannot .unshift an infinite list' if @elems.infinite; | |||
TimToady | perhaps slurpy arrays don't know that | 19:15 | |
oh the @elems is just the 0 | |||
means you can't say [email@hidden.address] 1..*' | |||
since it would presumably have to prepend the reified list with something non-reified | 19:16 | ||
arguably it could be allowed if the reified portion were empty, but it seems of little utility to allow it | 19:17 | ||
lizmat updated gist.github.com/lizmat/5940829 with complete test + summaries | 19:18 | ||
TimToady | but it's perfectly okay to unshift real things into the reifiedlist | ||
[Coke] | gist.github.com/coke/5879701 updated. yay, new errors. | 19:19 | |
lizmat | brb | 19:23 | |
[Coke] | jnthn: someone fixed a bunch of "Nominal type check failed" | 19:25 | |
19:27
kaare__ left
|
|||
[Coke] | r: say 12+68+1+123+56+30+131+130+22 # number of rakudo-jvm tests aborted due to sprintf | 19:30 | |
camelia | rakudo 4e2921: OUTPUT«573» | ||
masak | ooh, that's an attractive prize. | 19:31 | |
I'm currently blocking on not knowing enough about nqp internals. | |||
FROGGS | masak: I'm making #-option of %X work right now | ||
masak | FROGGS++ | ||
jnthn | [Coke]: Yes, that was me yesterday ;) | 19:32 | |
19:33
domidumont left
|
|||
[Coke] | the list of aborts is getting smaller! | 19:33 | |
I was able to generate it much quicker today. | |||
dalek | kudo/nom: 7d7df4a | (Elizabeth Mattijsen)++ | src/core/List.pm: Remove useless fail in unshift |
||
[Coke] | here's a new one, jnthn : java.lang.RuntimeException: No such attribute '$!do' for this object | 19:34 | |
jnthn | masak: pong | 19:35 | |
[Coke]: Is list updated? | |||
[Coke] | jnthn: aye | ||
jnthn | ah, I see it | ||
Yeah, though I don't think it's a regression, I think it's that we didn't get that far into that test before. | 19:36 | ||
[Coke] | jnthn: right, yah. Fix one failure, get another. | ||
masak | jnthn: see my question at irclog.perlgeek.de/perl6/2013-07-06#i_7298362 | ||
[Coke] | it used to block on shell() | 19:37 | |
jnthn | masak: Hmmm | ||
masak: I think the best bet is to install the sprintf implementation using nqp::bindhllsym('nqp', 'sprintf', ...) | 19:38 | ||
masak: And then make a QAST::Op.new( :op('call'), QAST::Op.new( :op('gethllsym'), nqp/sprint SVals here ), ...push children of op here... ) | 19:39 | ||
lizmat | WWZ& | 19:40 | |
masak | the 'and then make' part being the contents of that block? | ||
jnthn | Of the add_core_op one? Yes | 19:42 | |
Then the only question is where to put the sprintf impl :) | |||
Maybe in src/core/sprintf.nqp, and make sure it goes inside a block so that it doesn't leak out as a function. | |||
And then just include it in the JVM build for now. | 19:43 | ||
(by adding to Makefile-JVM.in or whatever it's called) | |||
masak | *nod* | 19:45 | |
requesting clarification on "make sure it goes inside a block so that it doesn't leak out as a function". | |||
how then will I be able to call it with the :op('call') thing? | 19:46 | ||
jnthn | 'cus you're stashing it in the "secret" guts-y namespace thing | ||
That's what the gethllsym thing is for. | |||
masak | could you link me to an example of this so I can see how it's done? | 19:48 | |
jnthn | I guess ModuleLoader.nqp uses the mechanism | 19:49 | |
And then somewhere in NQP::World it does the other part (the lookup) | |||
masak | oki | 19:50 | |
that should be enough to get me started. thank you. | |||
Teratogen | poor 777 | ||
19:52
dmol left,
dmol joined
|
|||
FROGGS | masak: I'm adding now (just locally) all sprintf tests from roast | 19:55 | |
but I guess next important things are %f and %e/%E | |||
diakopter | Teratogen: a 777? | 19:58 | |
19:58
berekuk joined
|
|||
masak | FROGGS: yes, I think so. | 19:59 | |
FROGGS: will be interesting to see the results of the sprintf/roast collision. | |||
FROGGS: you're essentially doing (b), then ;) | |||
FROGGS | I'll gist it | 20:00 | |
right :o) | |||
(a) is up to you :o) | |||
20:01
xilo_ left
|
|||
masak | *nod* | 20:01 | |
20:08
djanatyn joined
|
|||
[Coke] | jnthn: I golfed the duplicate method error to this snippet: | 20:09 | |
'a;b,c,' ~~ m/(<.alpha>) +%% (<.punct>)/; | |||
seeing if I can further golf it. | |||
20:10
ajr_ left,
xilo_ joined
|
|||
masak hopes juxtaposing '+' and '%%' like that doesn't become the norm | 20:12 | ||
Teratogen | diakopter, 777 crashed at SFO | ||
perigrin | Reports say most of the people are safe though. | 20:15 | |
diakopter | hunh; tail hit the rocky edge of the runway/shore | ||
perigrin has never landed at SFO but can see how that could happen | 20:17 | ||
[Coke] | jnthn: '' ~~ m/'a' +%% ('b')/; | ||
rn: say '' ~~ m/'a' +%% ('b')/; | |||
masak | actually I think I'm less against juxtaposing '+' and '%%' than I am against introducing whitespace between the atom and the postfix '+'... | ||
camelia | rakudo 7d7df4, niecza v24-86-g39ab531: OUTPUT«False» | ||
sorear | good * #perl6 | ||
masak | sorear! \o/ | 20:18 | |
[Coke] | sorear: ^^ there's the duplicate method culprit. | ||
masak | [Coke]: why do you write `'a' +%%` and not `'a'+ %%` ? | ||
[Coke]: you must have a different mental model of what those operators do :) | |||
jnthn | masak: I suspect [Coke]++ was golfing it from a test... | 20:19 | |
sorear | Teratogen: any survivors? | ||
diakopter | sorear: seems all but two | ||
Teratogen | there are reports of two deaths | ||
but it is all up in the air right now | |||
a lot of people were seen coming down chutes | |||
jnthn | .oO( I'm pretty sure the plane is not still up in the air right now... ) |
20:21 | |
FROGGS | masak: pasting the result of running roasts test too is sort of boring, the first 20 passes, then one kills the rest :o) | 20:22 | |
jnthn | [Coke]: Turns out it can be golfed to nqp -e "/'a' +%% ('b')/" | 20:23 | |
TimToady | masak: one writes it that way to allow whitespace after the left side in a rule | 20:25 | |
masak | FROGGS: could you maybe note down the killer in some list somewhere, and comment it out? | ||
TimToady | doesn't matter otherwise | 20:26 | |
masak | TimToady: right. this isn't a rule. | ||
FROGGS | it was %i, I post the out in a sec | ||
TimToady | nevertheless, if people get used to +%%, they'll right it more correctly for rules, on average | 20:27 | |
*write | |||
jnthn | %% is the one that means "and we can match another one afterwards", right? | ||
TimToady | it means they can come out even :) | ||
jnthn | yeah | ||
jnthn can see what's wrong but...hm, how to fix that... | |||
FROGGS | masak: gist.github.com/FROGGS/0fdcdde74679e512f097 | 20:28 | |
masak looks | |||
FROGGS | masak: the commented out tests do not parse | 20:29 | |
(in the diff around line 100) | |||
masak | FROGGS: wow, that still looks like really good news! | ||
FROGGS | yes, indeed | ||
masak | jnthn: could you please have a look at gist.github.com/masak/5a34e6893a80a5420c2d ? | 20:30 | |
FROGGS | mostly e, f, g | ||
TimToady | also, since %% requires a quantifier, it's arguably better to put the quantifier with it, to avoid the \w+ %% ',' confusion | ||
with \w +%% ',' it's more obvious what's wrong | |||
masak | FROGGS: e, f, g are challenging but by no means impossible. | ||
FROGGS | yeah, I'm going for %f now | ||
TimToady | so I think +%% is a good thing, on average | 20:31 | |
masak | TimToady: ok, you convinced me. | ||
jnthn | masak: "nqp/sprint SVals here" was an instruction to you :P | ||
TimToady | and I like it better than <foo> + %% <bar> | ||
masak | jnthn: yes, I realize that :) just wondering what it should be :) | ||
jnthn | two QAST::SVal nodes | ||
masak | ok, hold on. | ||
jnthn | (for nqp, then sprintf | ||
sorear | rn: say 5 Rxx rand | 20:32 | |
camelia | rakudo 7d7df4: OUTPUT«0.70025693867089 0.70025693867089 0.70025693867089 0.70025693867089 0.70025693867089» | ||
..niecza v24-86-g39ab531: OUTPUT«0.77211467026365677 0.77211467026365677 0.77211467026365677 0.77211467026365677 0.77211467026365677» | |||
FROGGS | no cookie for both | ||
masak | jnthn: like this? gist.github.com/masak/5a34e6893a80a5420c2d | 20:33 | |
jnthn | masak: right | ||
masak | hm, sorear++ just found a bug in two implementations ;) | ||
rn: say rand() xx 5 | |||
camelia | niecza v24-86-g39ab531: OUTPUT«===SORRY!===Unsupported use of rand(); in Perl 6 please use rand at /tmp/dnlJsPVO8F line 1:------> say rand⏏() xx 5Parse failed» | ||
..rakudo 7d7df4: OUTPUT«===SORRY!===Unsupported use of rand(); in Perl 6 please use randat /tmp/Y8U3jpzN6N:1------> say rand⏏() xx 5» | |||
masak | rn: say rand xx 5 | ||
camelia | niecza v24-86-g39ab531: OUTPUT«0.62266399973196163 0.18375288144860086 0.37745106424086311 0.96518965482953456 0.73068906819945623» | ||
..rakudo 7d7df4: OUTPUT«0.181609341499524 0.340130289589194 0.252906549579116 0.617402868939354 0.385966828776859» | |||
masak | right. | 20:34 | |
masak submits rakudobug | |||
I'm just assuming that if infix:<xx> thunks its lhs, then infix:<Rxx> should thunk its rhs. | |||
sorear | masak: it's a very long-standing behavior of niecza that weakly macroey operators lose their macroness when metaopped | 20:35 | |
[Coke] | masak: jnthn is right, I don't expect that to do anything except not generatea weird java bytecode issue. | ||
sorear | masak: because metaops require a coderef | 20:36 | |
masak | sorear: that sounds like an argument against this being a bug. | ||
sorear | strongly macroey operators like := can't be metaopped at all | ||
rn: my $x; 5 R:= $x; say $x | |||
camelia | rakudo 7d7df4: OUTPUT«Nominal type check failed for parameter 'op'; expected Any but got Mu instead in sub METAOP_REVERSE at src/gen/CORE.setting:14378 in block at /tmp/qy3FLcnjuj:1» | 20:37 | |
..niecza v24-86-g39ab531: OUTPUT«===SORRY!===Cannot reverse the args of := because list assignment operators are too fiddly at /tmp/zIuIfbFJwJ line 1:------> my $x; 5 R:=⏏ $x; say $xThis macro cannot be used as a function at /tmp/zIuIfbFJwJ line … | |||
masak submits LTA rakudobug | |||
20:39
domidumont joined
|
|||
sorear | done with backlog | 20:39 | |
20:41
domidumont left
|
|||
masak | jnthn: why the two SVals 'nqp' and 'sprintf', by the way? | 20:43 | |
jnthn | masak: They're the operands to look up the thing you installed with nqp::bindcurhllsym | 20:44 | |
FROGGS | like nqp::sprintf, no? | ||
jnthn | masak: oh, wait | 20:45 | |
You do need gethllsym, not getcurhllsym, there | |||
masak | that sounds... circular. | ||
ok. | |||
jnthn | And just sprintf | ||
uh, dammit | |||
You need both args | |||
But gethllsym | |||
Otherwise it won't work out in Rakudo... | |||
masak | still 'nqp' and 'sprintf'? | ||
jnthn | yes | ||
masak | I confess to being utterly confused as to the distinction between gethllsym and getcurhllsym. | 20:46 | |
sorear | why are we using an op here and not a global function? | ||
masak: do you remember how Parrot's namespace worked? | 20:47 | ||
We're emulating that. | |||
jnthn | sorear: Installing stuff with one of these is as close as you get to a global function. | ||
Well, but we don't have any nesting besides HLL name and symbol. | |||
masak | sorear: my goal tonight is to bind nqp:sprintf (an op) to a global(-ish) function (on JVM only). | ||
jnthn | masak: cur means "current HLL" | ||
masak | I guessed that. | 20:48 | |
sorear | masak: the global namespace in parrot is segregated by HLL name | ||
20:48
pmurias joined
|
|||
sorear | nqp;sprintf is a different symbol from perl6;sprintf | 20:48 | |
masak | ok. | ||
jnthn | Grr. That %% bug is hard to fix by building a different AST... | 20:49 | |
sorear | today: document jvmbootinterop and/or explain the design principles to jnthn | 20:50 | |
jnthn | The easiest fix is to fiddle with QAST::Block code-gen to not spit out the same block twice... | ||
TimToady is just a little distracted by the plane crash at SFO... | 20:52 | ||
masak | aww. got 'Can not invoke this object' during compilation of NQPCORE.setting | 20:55 | |
20:56
rindolf left
|
|||
masak | that probably means I embedded things wrongly in src/core/sprintf.nqp | 20:56 | |
jnthn | [Coke]: Trying a patch for S05-capture/caps.rakudo.jvm now, looks promising... | 20:59 | |
masak: prolly | |||
20:59
FROGGS left
|
|||
jnthn | masak: Which compilation, ooc? | 20:59 | |
stage1 or 2? | 21:00 | ||
masak | stage1 | ||
jnthn | ok, then it almost certainly really is inside what you added | ||
masak | would it help if I gisted it? | ||
jnthn | I can look | 21:01 | |
masak | gist.github.com/masak/d04ffe773bdfdc07d7e3 | ||
cognominal | that would be nice, when $<foo> is an array to have an array method .ast that did : .map: *.ast | ||
masak, what is knowhow? | 21:02 | ||
dalek | p: ad036ee | jnthn++ | src/vm/jvm/QAST/Compiler.nqp: Don't spit out same QAST::Block twice. Fixes S05-capture/caps.t in Rakudo; [Coke]++ for golfing. |
||
jnthn | masak: method sprintf($format, *@arguments) { | 21:03 | |
Should that not be sub? | |||
masak: And then in the nqp::bindcurhllsym('sprintf', sprintf); in the same scope | |||
And should probably be &sprintf | |||
dalek | kudo-js: 643e321 | (Pawel Murias)++ | runtime/serialization.js: Closure deserialization without binding contexts. |
21:04 | |
kudo-js: 2bceb50 | (Pawel Murias)++ | / (2 files): What we call an outer context is really a caller context. |
|||
kudo-js: 2c2c39c | (Pawel Murias)++ | / (4 files): Move out Ctx to a seperate file. Create closures with an outer lexical, static variables still missing. |
|||
kudo-js: b9dc21c | (Pawel Murias)++ | / (4 files): Fix bugs. |
|||
jnthn | masak: I'd also make it a "my module sprintf..." or so and remove the sprintf:: on the grammar/actions decl | ||
21:04
FROGGS joined
|
|||
sorear | TimToady: In what sense is .inheritIO like $[ ? I see it as the Java named argument faking pattern | 21:05 | |
o/ FROGGS | |||
masak | jnthn: oki | 21:06 | |
FROGGS | hi sorear | ||
sorear wonders if jnthn has seen the thread-starting gist | |||
masak | jnthn: ok, that makes more sense. | ||
jnthn: I changed 'sub' to 'method' because I was basing things off ModuleLoader. | |||
21:06
pmurias_ left
|
|||
masak | cognominal: 'knowhow' is a low-level MOP object in nqp. | 21:07 | |
jnthn | sorear: Yes! | ||
masak: Ah... | |||
sorear: Didn't try running it though... :) | |||
masak | wat, nqp, you don't know what a "modeul" is!? oh... | 21:09 | |
jnthn | :P | ||
masak .oO( it's Korean! ) | 21:10 | ||
[Coke] | ah, we will probably also get the FormatConversionException errors with a working sprintf | ||
jnthn | yeah | ||
masak | we'll... get them? | ||
jnthn | well, get rid of... :P | ||
masak | yeah, that's the idea. | ||
21:10
bruges_ joined
|
|||
masak | bruges_: aloha. | 21:11 | |
jnthn: updated sprintf.nqp and with added stacktrace: gist.github.com/masak/d04ffe773bdfdc07d7e3 | 21:12 | ||
seems it fails during parse. | |||
jnthn | class sprintf::Actions # did you meant to keep the sprintf:: there? | 21:13 | |
hmmm | 21:14 | ||
masak: Where did you add it, ooc? | |||
masak | hm, no; I'll remove the sprintf:: there too. | 21:15 | |
jnthn | Near to the end? | ||
masak | jnthn: I added a line in tools/build/Makefile-JVM.in | ||
yeah, after testing.nqp | |||
jnthn | hmmm | 21:16 | |
masak | before YOUAREHERE.nqp | ||
jnthn | Thing is that NQPRegex, the code objct for NQP regex-y things, is also declared in the NQP setting. | ||
Wondering if we're hitting a "can't do this yet" thing... | 21:17 | ||
Oh... | |||
...we don't actually have QRegex compiled at this point either. | |||
That can't help... | |||
masak: Let's put it in the HLL lib instead. | |||
We know grammars/actions work in there :) | |||
masak | ok. | 21:18 | |
src/HLL/sprintf.nqp ? | |||
jnthn | wfm | ||
masak | seems to work much better :) | 21:21 | |
jnthn++ | |||
jnthn | :) | 21:22 | |
hm, think I may have figured out why version.t explodes... | 21:24 | ||
masak | ok, I got all the way to stage2 this time ;) | 21:29 | |
jnthn | ooh | ||
And then? :) | |||
masak | "Method 'jast' not found" during compilation of src/stage2/gen/QRegex.nqp | ||
jnthn | ...what?! | 21:30 | |
oh, OK, NFA.nqp mentions nqp::sprintf, so I guess that's our first use of it | |||
Can I see the QAST::CompilerJAST patch? | 21:31 | ||
masak | gist.github.com/masak/5a34e6893a80a5420c2d | ||
jnthn | woo, I have a passing verstion.t | 21:32 | |
oh, oops | |||
yeah, you need to compile that QAST | 21:33 | ||
$qastcomp.as_jast(QAST::Op.new( ... )) | |||
Also, after :op('call'), add a :returns(str), | |||
The problem is that something registered with add_core_op needs to return JAST, not QAST, even if it is just desugaring. | 21:34 | ||
masak | ah. | 21:35 | |
:returns(str) like that? not :returns('str') or something? | 21:36 | ||
jnthn | Like that; it expects a 6model obj | ||
Well, a real type | |||
masak | I see :returns($TYPE_STR) elsewhere in that file. | 21:37 | |
jnthn | This is one of the places QAST and 6model intersect in a deeper way :) | ||
jnthn looks | |||
JAST::Method.new( :name('hllName'), :returns($TYPE_STR), :static(0) ) | |||
masak: That's a JAST node, not a QAST one ;) | |||
FROGGS | masak: %f is working for the given tests... gist.github.com/FROGGS/0fdcdde74679e512f097 | 21:38 | |
I wonder how we detect bigint stuff... | 21:39 | ||
masak | FROGGS: nice! | 21:40 | |
yes, I haven't dug into bigint matters at all. | |||
FROGGS | I'm not sure we can say: hey, this arg is a bigint, lets use abs_I instead of abs_i | 21:41 | |
jnthn | I wonder if we should provide a way to configure the bigint types | ||
Then at some point in the setting nqp::gethllsym('nqp', 'sprintf_bigint_reg')(Int) or so | 21:42 | ||
FROGGS | sounds nice... what does it do? | ||
jnthn | I dunno, I ain't the one implementing sprintf :P | 21:43 | |
FROGGS | hehe | ||
jnthn | Maybe you keep an array of known bigint types and just see if the thing you have matches that type... | ||
masak | wat... build completed! | ||
jnthn | Or just make it a scalar | ||
wat wat | |||
masak | $ ./nqp | 21:44 | |
> sprintf("OH HAI") | |||
java.lang.NullPointerException | |||
hehe. | |||
FROGGS | hehe | ||
jnthn | nqp::sprintf | ||
masak | oh! | ||
FROGGS | wait for it... | ||
jnthn | Not sure if nqp's repl auto-prints... | ||
masak | > say(nqp::sprintf("OH HAI")) | ||
OH HAI | |||
\o/ | |||
jnthn | \o/ | ||
FROGGS | \o/ | ||
jnthn | masak++ | ||
FROGGS | masak++ | ||
masak | I really didn't expect that. | ||
any test I can do to make sure it's really ours? | |||
I guess anything with %f... | 21:45 | ||
FROGGS | %B? | ||
masak | > nqp::sprintf("%f", 4.2) | ||
'f' is not valid in sprintf format sequence '%f' | |||
yes, it's ours. | |||
FROGGS | cool | ||
masak | > say(nqp::sprintf("%B", 1000)) | ||
1111101000 | |||
ok, so. I'll commit and push this, yes? :) | 21:46 | ||
jnthn | go for it, imho | ||
dalek | kudo/nom: 516d49f | jnthn++ | src/vm/jvm/Perl6/Ops.nqp: Fix // compilation, thus fixing version.t. |
||
jnthn | There's 35 more from version.t, and maybe a few more from elsewhere | 21:47 | |
dalek | p: 2057ed3 | masak++ | / (3 files): add nqp-native nqp::sprintf for the JVM backend The plan is to extend this implementation until it passes all of the roast spectests that the Parrot backend passes. Until then, it's JVM-specific, though, because currently the JVM implementation will benefit from having this one rather than what it had before. |
21:48 | |
masak | FROGGS: I didn't check whether you have pushed commits since I copy-pasted. checking now. | ||
FROGGS | I have not I guess | 21:49 | |
masak | yes, it seems I missed 3b345540 | ||
feel free to port it over. | |||
FROGGS | ohh, k | ||
masak | hm, any reason I should keep my github repo at this point? | ||
maybe I should delete it? | |||
jnthn | masak++, FROGGS++, (others who helped)++ | ||
FROGGS | masak: go ahead | ||
masak deletes | 21:50 | ||
FROGGS | hmmm, is there a sprintf.t? | 21:51 | |
masak | FROGGS: nope. | ||
jnthn installs the updated NQP and builds a Rakudo against it | |||
masak | FROGGS: we might want to port that over, too. | ||
FROGGS: but my time is up for today, realistically. | |||
FROGGS | yeah, makes sense if it is an nqp-native | ||
I'll add it | 21:52 | ||
masak | FROGGS++ | ||
FROGGS | :o) | ||
masak | FROGGS: remember that it's JVM-only for now. | ||
FROGGS | yeah... | ||
jnthn | There's a t/jvm | 21:53 | |
We can move the test file later when it comes standard on all impls | |||
FROGGS | that was what I was looking for right now :o) | 21:54 | |
thanks | |||
btw, how do I proper make clean? | |||
jnthn | There's a make clean target, no? | ||
FROGGS | yes, but it doesnt help | ||
jnthn | if it's improper I suggest properizing it | 21:55 | |
masak | git clean -dfx, perhaps? | ||
FROGGS | main class 'nqp' wasn't found or something like that | ||
jnthn | Oh, did you re-Configure? | ||
FROGGS | ahh, git clean.... I try that | ||
jnthn | 'cus a file was added... | ||
masak | yeah. | ||
FROGGS | ohh, yeah, that too | ||
masak | rakudo is better than nqp at detecting when you have an outdated Makefile | ||
jnthn | masak: Did you trying building Rakudo against this? | ||
...no, you didn't :( | |||
FROGGS | :o( | 21:56 | |
jnthn | --stagestats uses nqp::sprintf. | ||
Apparently, a not-working feature of nqp::sprintf. | |||
FROGGS | which one? | ||
I'll add it :P | |||
jnthn | Cannot stringify this in statement (src/stage2/gen/NQPHLL.nqp:2099) | ||
FROGGS | hmmm | ||
masak | oh, that's interesting. | ||
jnthn: doesn't Rakudo fix a version of nqp? | |||
and build against that? | 21:57 | ||
jnthn | oh...nqp::join | ||
masak: For Rakudo JVM we're always doing HEAD | |||
masak | oh! | ||
sorry, I didn't realize. | |||
jnthn | masak: Otherwise it'd be bump all the way... | ||
np | |||
FROGGS | jnthn: we should use join() ? | ||
masak | should I revert the nqp commit for now? | ||
FROGGS | still compiling... | ||
21:58
spider-mario left
|
|||
jnthn | masak: nah, let's fixing it | 21:58 | |
@pieces.push: infix_x(padding_char($st), $st<size>.ast - nqp::chars($st.ast)) if $st<size>; | |||
...huh, nqp supports that syntax? | |||
nqp: my @a; @a.push: 123; say(@a[0]) | |||
camelia | nqp: OUTPUT«123» | ||
jnthn | wow! | ||
I didn't know that! | |||
FROGGS | *g* | ||
masak | NQP: Quiter than you'd think! | 21:59 | |
jnthn tries a fix | |||
dammit, no | 22:04 | ||
Stage %-11s: %7.3f | 22:07 | ||
That's the format | |||
masak | oh, we don't do %f yet. | ||
FROGGS | I can push %f support in a sec | ||
jnthn | ok | ||
masak | \o/ | ||
feel free to take any action necessary to make Rakudo-JVM continue to build. | |||
I'm going to bed. | |||
'night, #perl6 | |||
jnthn | FROGGS: Can test if it works with --stagestats fwiw | 22:08 | |
FROGGS: Even with just nqp | |||
FROGGS | k | ||
gnight masak | |||
k, I see the fail on an unpatched sprintf | 22:09 | ||
jnthn: so should I use join() instead of nqp::join()? | 22:10 | ||
I remember that you mentioned it last week | |||
sorear | masak++ FROGGS++ et-al++ | ||
jnthn | FROGGS: I'm not sure that's the actual problem here, though | ||
FROGGS: That explodes with a different error. | |||
FROGGS | k | ||
jnthn | Here it really is finding a something it doesn't know how to stringify. | 22:11 | |
Meaning calling join(...) won't help as it just stringifies all the bits... | |||
sorear | um | 22:12 | |
PIRT? fresh_p()? what is this | |||
jnthn | huh? Where? | ||
sorear looking at jnthn's defor patch | |||
FROGGS | fresh prince? | ||
jnthn | sorear: The -'s, removing commented out code? | ||
sorear | yes | 22:13 | |
jnthn | sorear: The JVM Ops.nqp started out as a copy of the Parrot Ops.nqp all commented out | ||
sorear: And I uncommented/translated | |||
sorear | what's that used for? surely we couldn't have passed 92% without a working // | ||
jnthn | This was one of the last pieces, if not the last one. | ||
It "worked" | |||
It was using isconcrete | |||
Which works for most cases | |||
But not for things you actually need to call .defined on. Like a Failure. | 22:14 | ||
btw, it's 94% now :P | |||
sorear | jnthn: is PIRT QPOST? | 22:16 | |
jnthn | Yes | ||
Its main difference is it collapses to a string ASAP rather than keeping a gazillion nodes around in memory. | |||
Well | |||
"ASAP" | |||
Once a QAST::Block is done. | 22:17 | ||
22:17
iSlug left
|
|||
FROGGS | ahh | 22:18 | |
jnthn suddenly wonders if the interop stuff is gonna be efficient enough to use ASM directly from QAST::Compiler ;) | |||
Though it may not be convenient :) | |||
FROGGS | jnthn: in HLL::Compiler it gets an arrayref | ||
jnthn | FROGGS: nqp::sprintf normally takes an array no? | 22:19 | |
oh! | |||
FROGGS | no | ||
jnthn | sub sprintf($format, *@arguments) | ||
yeah :) | |||
FROGGS | :o) | ||
jnthn | It should be @arguments :) | ||
That's how the op is expected to be :) | |||
FROGGS | k | ||
then it should now be fine on my box... we'll see | 22:20 | ||
22:22
snoopy joined
|
|||
FROGGS | This representation can not unbox to a native str | 22:22 | |
:/ | 22:23 | ||
sorear | jnthn: should be. there's no reflection going on, it basically just generates sub foo($a,$b,$c) { nqp::box_j(whatever(nqp::unbox_j($a), ...)) } | ||
jnthn | neat | ||
FROGGS: OK, *that's* the join/nqp::join error :) | |||
FROGGS | yeah, already changed && compiling | ||
jnthn | .oO( a much better approach than changed & compiling ) |
22:24 | |
lizmat is back from WWZ | |||
jnthn | There's a Zth world war? | ||
lizmat | Brad Pitt's newest flick | ||
jnthn | oh! | ||
jnthn hadn't heard of it :) | |||
perigrin | based on a book of the same title. | ||
FROGGS haz kids, so no cinema for poor FROGGS | 22:25 | ||
lizmat | the way I understand it, is that the movie has not a lot to do with the book anymore | ||
perigrin | Kids enjoy seeing movies too. | ||
FROGGS | jnthn: works | ||
perigrin | lizmat: yeah I've heard it more as "based on the title of a book of the same name." | ||
sorear | jnthn: OTOH, it would basically kill any chance of ever supporting cross compiling again :( | ||
dalek | p: 74575f5 | (Tobias Leich)++ | src/HLL/sprintf.nqp: impliment %f and changed param to be non-slurpy |
22:27 | |
22:28
dmol left
|
|||
FROGGS | jnthn: "use Test" is implicit? | 22:29 | |
sorear | FROGGS: there's no Test in nqp, ok() and plan() are in the setting | 22:30 | |
jnthn | sorear: oh, good point | ||
FROGGS | sorear: k, thanks | ||
jnthn | FROGGS: Does --stagestats work now? | ||
FROGGS | jnthn: yes | ||
22:31
dmol joined
|
|||
sorear | jnthn: that said, cross compile doesn't quite work at the moment anyway. -target=jast output is missing the calls to nqp::deserialize - haven't looked closely. | 22:31 | |
jnthn | sorear: Probably that jast isn't recognized as a precomp target | 22:32 | |
timotimo | you people seem to be haling fun :) | 22:36 | |
i'm glad | |||
jnthn: you didn't get around to making compile-time inlining yet afaict? | |||
jnthn | timotimo: no | 22:39 | |
Won't get to it today | |||
Did fix some tests though :) | |||
timotimo | yeah, it's all good :) | 22:40 | |
i'm just reasonlessly fixated on benchmarking and performance improvements for some reason ;) | |||
jnthn | It's nice to make things faster, but also good to keep chewing through the spectest fails. | 22:41 | |
timotimo | has the 95% mark been reached in the mean time? last i saw we were a bit past 94% | 22:42 | |
jnthn | Though I said on my blog the aim was for 95% by the next Rakudo compiler release, and I think we're gonna make that. | ||
timotimo | sounds doable indeed | ||
jnthn | I'm not sure whether we've made it yet. We stand a good chance of doing so in the run tomorrow; if this sprintf stuff works then we'll certainly make it. | ||
We may even hit 96% or so | 22:43 | ||
timotimo | that would be swell :) | ||
jnthn | FROGGS: I'm...not sure it gives quite the right output ;) | ||
Stage start : 0 | |||
timotimo | but the compiler release is still a week into the future, no? | ||
jnthn | Not sure | ||
jnthn checks | |||
sorear | next rakudo compiler release? I think we're likely to get to 95, yeah :) | ||
jnthn | 2013-07-18 Rakudo #66 tadzik | ||
tadzik | yep | ||
jnthn | Over 10 days | 22:44 | |
FROGGS | jnthn: what is the expected? 0.0? | ||
timotimo | 0.001 or so i think | ||
sorear | erp. I was thinking of Niecza Irregular Release Day (-29) | ||
jnthn | FROGGS: I think it is meant to always get the same numbe of decimals. | ||
FROGGS | okay, will check and fix | ||
sorear | 15:07 < jnthn> Stage %-11s: %7.3f | ||
jnthn | Anyway, confirm that Rakudo builds again now | ||
FROGGS++ | |||
FROGGS | ohh, that is good to know | 22:45 | |
sorear | fF The double argument is rounded and converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point character is equal to the | ||
precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point | |||
appears, at least one digit appears before it. | |||
in %7.3f, the precision is 3 | |||
jnthn | Well, S02-literals/listquote-whitespace.rakudo.jvm passes :) | ||
sorear | so \d+\.\d**3 | ||
timotimo | tadzik: is there something i can try to do to make this compiler release already be compatible with panda? | ||
FROGGS | yeah, have to pad with 0s | ||
timotimo | because that would be ridiculously cool | ||
jnthn | And S02-literals/quoting-unicode.t | 22:46 | |
sorear | padding on the left with spaces to a minimum of 7 chars | ||
timotimo | "remember last month when our jvm port could do nothing? this time we'll give you a module installer to go with your spiffy new rakudo-jvm" | ||
sorear | FROGGS: If you're padding on the right with zeros, you're doing it wrong | ||
jnthn | ok 71 - Can't quote a string with a snowman and comet (U+2603 and U+2604) | ||
bwahahah! | |||
timotimo | :D | ||
jnthn | That still goes down as one of the best Rakudo bugs ever. :) | ||
FROGGS | sorear: yeah, need to think about it | ||
timotimo | jnthn: it would be amazing if someone actually stumbled upon that bug by accidentally having a string where they expected ... what exactly? | 22:47 | |
tadzik | timotimo: is it not compatible in some way? | ||
sorear | FROGGS: %f should basically do round($num * 10**$prec); format as %0{$prec+1}d; insert a . $prec spaces from the right if $prec > 0 | ||
timotimo | i dunno, there's probably something missing i guess? | ||
dalek | p: 706fb51 | (Tobias Leich)++ | t/jvm/06-sprintf.t: added tests for nqp::sprintf |
22:48 | |
tadzik | timotimo: you mean on the jvm part? | ||
jnthn | FROGGS: On gist.github.com/coke/5879701, first 3 test files that failed in sprintf now pass | ||
FROGGS | awesome | ||
jnthn | FROGGS: S32-str/sprintf.rakudo.jvm is the first that fails | ||
'i' is not valid in sprintf format sequence '%i' | |||
sorear | sorear$ ls t/jvm | ||
01-continuations.t 06-sprintf.t | |||
what happened to 2 thru 5? | |||
FROGGS | jnthn: that patch is in the queue | ||
tadzik | timotimo: so far it's lacking %*CUSTOM_LIB, that's what I encountered | 22:49 | |
jnthn | asbra! S32-temporal/Date.t passes! :) | ||
FROGGS | sorear, it will be moved to t/hll soonish | ||
timotimo | tadzik: i mean anywhere i might be able to chop off a LHF ;) | ||
FROGGS | so I took the named it would have in t/hll | ||
jnthn | S32-temporal/DateTime-Instant-Duration.rakudo.jvm fails 1, which may or may not be sprintf related | ||
22:50
woolfy joined
|
|||
sorear | .oO( Instant Perl 6! ) |
22:50 | |
timotimo | just add jnthn | ||
tadzik | timotimo: well, um, running rakudo-jvm from outside the source directory would be a astart :) | ||
jnthn | S32-temporal/DateTime.rakudo.jvm passes now, S32-temporal/calendar.t also, S32-temporal/local.t too | 22:51 | |
22:51
woolfy1 left
|
|||
jnthn | !! | 22:51 | |
timotimo | hmm, don't really know how to do that | ||
jnthn | So it's only sprintf.t left from that section that aborts | ||
dalek | p: 3ad22fa | (Tobias Leich)++ | src/HLL/sprintf.nqp: add %i, a synonym for %d |
||
22:51
raiph left
|
|||
FROGGS | jnthn: but sprintf.t fails because of bigints ant rats | 22:51 | |
sorear | jnthn: how many passes are we up to? | 22:52 | |
jnthn | And in other news, S02-names-vars/fmt.rakudo.jvm passes. | ||
FROGGS: integration/advent2009-day02.t is the other one needing sprintf attention. | |||
FROGGS | k | ||
jnthn | FROGGS: So, sprintf.t and that one are the ones to look at :) | ||
sorear: lemme check | |||
sorear wonders if jnthn uses the t/spec/test_summary --archive | 22:53 | ||
jnthn | sorear: I dunno about extra passes, but looking at Coke's gist, we're now running 470 tests we previously aborted. | ||
sorear | \o/ | ||
jnthn | sorear: No, I just ran the ones from [Coke]++'s gist manually, out of curiosity how we did on them. | ||
tadzik | timotimo: I suppose it's a matter of perl6.class looking for other classes | ||
so there's some CLASSPATH adjusting in order | |||
jnthn | This could mean that we're going to, for the first time, fall below 1000 failing tests. | 22:54 | |
tadzik | at least that's my guess | ||
timotimo | isn't that ... yeah classpath | ||
sorear | there is no perl6.class | ||
timotimo | perl6.jar then? | ||
jnthn | (less than 1000 behind Rakudo on Parrot) | ||
tadzik | well, whatever lives in ./perl6 | ||
timotimo | at the moment i'm very close to falling asleep unintentionally | 22:55 | |
jnthn | timotimo: Suggest finding a horizontal surface, preferably a padded one :) | ||
sorear | right now, nqp-runtime.jar, rakudo-runtime.jar, asm-4.1.jar, jline.jar, and asm-tree-4.1.jar need to be in the application classpath for nqp/rakudo to function | ||
timotimo looks at how intellij idea starts itself | 22:56 | ||
sorear | all other files are searched for using @*INC, not the classpath | ||
I've been planning to improve the classpath handling in nqp | |||
timotimo | that seems a bit overkill. | ||
sorear | in particular we're currently referencing the application class loader in quite a few places where we ought to be referencing the nqp-runtime.jar class loader | 22:57 | |
22:58
raiph joined
|
|||
timotimo | i don't even know what a classloader does | 22:59 | |
sorear | so what are *you* trying to accomplish, timotimo? | 23:01 | |
my goals for the classpath improvements are 1. one-jar deployment 2. applet mode | 23:02 | ||
jnthn | I think timotimo wants a make install so he can then try and get Panda working ;) | ||
sorear | oh | ||
15:50 < tadzik> timotimo: well, um, running rakudo-jvm from outside the source directory would be a astart :) | |||
jnthn | I think you already can do that... | ||
sorear | I thought we already had that? | ||
jnthn | :) | ||
tadzik | we do? :) | ||
jnthn | 'cus the .bat/.sh has absolute paths. :) | ||
tadzik | > .rakudobrew/jvm/perl6 | ||
Error: Could not find or load main class perl6 | 23:03 | ||
or am I missing something | |||
sorear | sorear$ cat perl6 | ||
#!/bin/sh | |||
exec java -Xms100m -Xbootclasspath/a:.:/Users/sorear/dl/rakudo-jvm/../nqp-jvm/install/nqp-runtime.jar:/Users/sorear/dl/rakudo-jvm/../nqp-jvm/install/asm-4.1.jar:/Users/sorear/dl/rakudo-jvm/../nqp-jvm/install/asm-tree-4.1.jar:/Users/sorear/dl/rakudo-jvm/../nqp-jvm/install/jline-1.0.jar:rakudo-runtime.jar:perl6.jar -cp /Users/sorear/dl/rakudo-jvm/../nqp-jvm/install perl6 "$@" | |||
note the relative paths to rakudo-runtime.jar and perl6.jar | |||
jnthn | ah | ||
tadzik | it uses relative paths here | ||
exec java -Xms100m -Xbootclasspath/a:.:nqp/install/nqp-runtime.jar:nqp/install/asm-4.1.jar:nqp/install/asm-tree-4.1.jar:nqp/install/jline-1.0.jar:rakudo-runtime.jar:perl6.jar -cp nqp/install perl6 "$@" | |||
jnthn | That is probably fixable | 23:04 | |
sorear | that's probably because you passed a relative path to --with-nqp | ||
jnthn | ah | ||
tadzik | yes | 23:05 | |
timotimo | ooooooh | 23:06 | |
is it that easy to fix? | |||
jnthn | mebbe :) | 23:08 | |
sorear: I'm thinking about sleeping soon; anything you need from me before I go? | |||
jnthn noted that "make jnthn understand X" was a goal ;) | 23:09 | ||
dalek | ecs: 47003e0 | (Elizabeth Mattijsen)++ | S99-glossary.pod: Add wfm |
23:11 | |
sorear | jnthn: nothing quick | 23:16 | |
jnthn | ok :) | ||
sorear | jnthn: if you feel like reading a half-written infodump before bed, I can gist what I have... | 23:17 | |
jnthn | sorear: Nah, it'll likely make more sense to me when it's done and I've slept ;) | 23:18 | |
sorear | gnight then :D | 23:19 | |
23:20
pmurias left
|
|||
jnthn | 'night o/ | 23:20 | |
lizmat | night jnthn! | 23:22 | |
23:29
colomon joined
23:33
dmol left
|
|||
colomon | o/ | 23:34 | |
anything exciting happen today opn #perl6? | |||
sorear | colomon: masak's sprintf stuff was merged, and I committed java->p6 callback support | 23:36 | |
colomon | \o/ | ||
sorear | we're passing "a few hundred" more tests with sprintf and other misc fixes | ||
I have a little nqp demo that subclasses java.lang.Thread, implements run, and starts it | |||
colomon | \o/ | 23:37 | |
sounds like a very good day | |||
sorear | I'm not done. | ||
colomon | \o/ | ||
sorear | Although you did just miss jnthn. | 23:38 | |
colomon | I may be just starting. :) | ||
don't really have anything else on for the night other than drinking wine with my uncle. | |||
labster | sounds exciting today, sad I missed it. I had to drive to $dayjob and pick up a new computer. It's the same model as lizmat's new laptop, so I'm very happy with it. | 23:44 | |
And hopefully, it will run the spectests faster | |||
lizmat | spectest run a ~7 minutes | 23:45 | |
labster | nice | ||
colomon | which one, jvm or parrot? | 23:46 | |
23:46
thou joined
|
|||
sorear | yow | 23:48 | |
my 1-year-old work laptop takes nearly half an hour at TEST_JOBS=4 for jvm | 23:49 | ||
23:49
augustus joined
|
|||
colomon | started now | 23:49 | |
sorear remembers dons in #haskell purloining a 16-core work machine in 2007 for work on Data Parallel Haskell | |||
lizmat | colomon: I only do parakudo for now | 23:51 | |
augustus | hello, I have some questions creating and using sub-languages, can anyone tell me if it still requires hacking the rakudo source as in this article: strangelyconsistent.org/blog/extend...x-of-perl6 | ||
FROGGS | augustus: yes, I think so | 23:52 | |
augustus: since you can't access %*LANG from perl6 land right now, if you could, you could mixin rules | |||
sorear | r: say %?LANG.WHAT | 23:53 | |
camelia | rakudo 516d49: OUTPUT«===SORRY!===Variable '%?LANG' is not declaredat /tmp/3aW7o0ysM7:1------> say %?LANG.WHAT⏏<EOL> expecting any of: method arguments» | ||
augustus | do you know if any work has been done in this area for common languages like SQL, XML, HTML etc? or is this work that needs to be done from scratch? | ||
sorear | r: say nqp::getlex('%?LANG').WHAT | ||
camelia | rakudo 516d49: OUTPUT«Can only use get_what on a SixModelObject in block at /tmp/Qjb3ajFCps:1» | ||
sorear | r: BEGIN say %*LANG | ||
camelia | rakudo 516d49: OUTPUT«===SORRY!===Nominal type check failed for parameter '$got'; expected Any but got Perl6::RegexGrammar instead» | ||
FROGGS | augustus: I am working on a Perl5 slang, but I think there is no SQL, XML or (X)HTML slang out there atm | 23:54 | |
a slang only makes sense if you perform action on the token you get IMO, so why make a HTML slang at all? | 23:55 | ||
actions* | |||
augustus | FROGGS: once I translate the standard grammars out there into Perl6 notation, how hard is it to make a "slang" | ||
23:55
lizmat left
23:56
lizmat joined
|
|||
FROGGS | augustus: not very hard, since my Perl 5 slang already is a module (just with minor rakudo-hacks) | 23:56 | |
sorear | augustus: a slang is only useful if you want to embed XML directly in your perl 6 code, without quotes | ||
augustus: this seems marginally useful at best | |||
augustus | FROGGS: yes I understand this. I am interested in making a Perl6 version of JSP type stuff | ||
FROGGS | ahh, and I should mention that the Perl 5 slang is actually a nqp-module, not Perl 6 | 23:57 | |
augustus | I'm not sure how much of a difference there is with NQP, I haven't worked with it at all | ||
FROGGS | well, when you think of the rakudo compiler, this sits on top of nqp | 23:58 | |
so if you have an nqp module, you dont have access to the high-level bits | 23:59 | ||
augustus | meaning that "slangs" have only NQP not full perl6? |