»ö« 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.
masak 'night, #perl6 00:02
00:06 berekuk joined 00:14 btyler left
colomon it's sort of cheating, because it gets there without having a bunch of things that are pretty essential for actual p6 coding. 00:22
whoops, lost context on that.... was commenting about how many tests were passing in rakudo-jvm 00:23
00:23 SmokeMachine left
colomon and was planning on following up by saying how awesome the progress was anywhere. 00:23
*anyway
00:23 SmokeMachine joined
colomon may have to shut up before he says more silly things 00:24
sorear huh. if I'm reading JVMS §4.10.1.9 correctly, it's possible to catch an exception thrown by a constructor, and then *use the new half-initialized object anyway*
colomon doesn't that defeat the purpose of throwing the exception? 00:25
colomon should really track down why his $work code is always output analytic curves, even when the flag says "Don't", before he starts playing more with Rakudo JVM 00:27
sorear holomorphic curves? 00:28
colomon no, simple 3d ones
well, up to NURBS
00:29 abnorman left 00:34 ecocode left
benabik sorear: 4.10.1.9 seems to be instruction verification? IS this mentioned under the new op? 00:37
sorear benabik: no, under invokespecial 00:39
benabik: note that the unitnitialized(42)->java/whatever rewrite is done BOTH for the normal termination output frame, and the exception output frame 00:40
00:42 Guest1337 left
benabik sorear: It _seems_ like there's a flag to say it's not usable in that case: see the small print at the end of the op. 00:42
sorear benabik: that only covers the case of calling a superclass/same class constructor from within a constructor 00:44
it doesn't cover the object construction case
new/dup/invokespecial
or rather, new/dup/astore/try{invokespecial}/catch{aload; mess around}/ 00:45
00:47 lelf` joined 00:48 skids joined 00:49 btyler joined
jnthn found enforcing the constructor call somewhat curious. 00:50
At least invokespecial is non-virtual...
00:50 lelf left
jnthn So it's trivial to optimize away empty ones. 00:50
(for the JVM)
sorear I'd rather get rid of new and unininitialized types and just have invokespecial return the new object on the stack like a sane op 00:56
jnthn: well, apparently there were some classes that used constructors to enforce security checks... 00:58
00:59 benabik left
sorear jnthn: btw, I'm going to attempt to write a class splitter in O(days), so we have it before we need it 00:59
colomon class splitter? 01:01
sorear colomon: produce a .jar containing several class files
colomon wouldn't that be a class joiner? 01:02
sorear colomon: class files are limited to 65535 entries in the constant pool and the setting already uses more than half of those
colomon oh
silly java
sorear there's room for optimizing our constant table usage, but only to a point: each method must have a unique name*, which must be stored in the constant pool 01:04
* technically we can use overloading to bend the limit, but there's a separate limit of 65535 methods which makes that less useful 01:05
jnthn sorear: Feel free, though there are probably more pressing things. 01:06
But -Ofun :)
sorear: If you want to figure out pipe form of open, that'd be a useful one.
sorear: The tests that use Test::Util to call out to perl6 block on that.
And you probably are cluefuller on that than I. :) 01:07
01:07 stevan_ left 01:09 stevan_ joined 01:16 FROGGS_ joined 01:19 FROGGS left
jnthn sleep & 01:25
01:26 Teratogen left 01:27 benabik joined 01:29 konundra joined
dalek ast: b836990 | (Solomon Foster)++ | integration/ (2 files):
Add two simple tests for Rakudo JVM.
01:55
ast: 680a796 | (Solomon Foster)++ | / (5 files):
Merge branch 'master' of github.com:perl6/roast
colomon colomon--
dalek kudo/nom: b510088 | (Solomon Foster)++ | t/spectest.data:
Add two new tests.

This is primarily for JVM, but should work anywhere.
02:01
ecza: 8d0cbce | (Solomon Foster)++ | t/spectest.data:
Add new tests.
02:03
02:29 xinming left 02:31 xinming joined
colomon so, how do I add a ThreadContext to rand? 02:41
rand_n, I mea
n
02:48 Chillance left
colomon .... errr, rand_I has it, rand_n doesn't? 02:49
02:59 Guest1337 joined, woosley1 joined 03:06 shinobicl_ joined
shinobicl_ hi 03:06
colomon o/ 03:08
shinobicl_ is anyone familiarized with AspectJ? 03:09
colomon not I 03:10
shinobicl_ ok, an example... lets say that i have 10 classes, objects that have a method "persist" that saves the object to the database
and i want to add logging capabilities to each "persist" method 03:11
i just program an "aspect" and then i wire the execution of each method "persist" to this logging aspect 03:12
so aspectj detects when each "persist" method runs and can inspect the method, the object, the class, etc... using introspection 03:13
you can even inject new methods and attributes (sorta like perl6 roles) to the objects
and.. that is. at least these are the parts that i've used of Aspectj 03:15
the thing is, is a damn good idea. they call these problems like logging "cross cutting concerns". tipically janitorial tasks that your system must perform. With aspectj, you can take them "out of the way" of the design of system you are building. 03:16
03:19 SamuraiJack joined
shinobicl_ i guess that is totally possible to implement in perl6, and in a much better way. aspectj has its own issues that makes you shoot you in the foot many times. 03:20
moritz iirc jnthn implemented some aspect-oriented programming in one of his talks on the MOP 03:22
sorear colomon: find the relevant line in src/vm/jvm/QAST/Compiler.nqp and add a :tc adverb 03:24
colomon sorear: thanks!
JimmyZ shinobicl_: jnthn.net/papers/2012-gpw-meta-programming.pdf
shinobicl_ thanks JimmyZ. Already reading it. Grammar:Tracer, right? 03:26
colomon sorear: rand_I's randomness looks a little dodgy to me?
JimmyZ shinobicl_: nope, next that 03:27
colomon sorear: making good progress towards srand, I think 03:28
sorear: probably go to bed first, though.
03:29 daniel-s_ left
colomon nothing like learning Java programming while working on a compiler written in it... ;) 03:31
03:32 daniel-s_ joined
sorear I hear it's even better to learn a language by writing a bootstrapped compiler. 03:34
will look at rand_I
Stefans-MacBook-Air:rakudo-jvm sorear$ ./perl6 -e '{ my %h; %h{$_}++ for (^5).roll(1000); say %h }' 03:37
("3" => 128, "2" => 242, "1" => 260, "0" => 237, "4" => 133).hash
Stefans-MacBook-Air:rakudo-jvm sorear$ ./perl6 -e '{ my %h; %h{$_}++ for (^5).roll(10000); say %h }'
===SORRY!===
java.lang.StackOverflowError 03:38
colomon yup, not that random
sorear the first test is inconclusive, the second is *clearly wrong* 03:39
colomon do you understand why the stack overflow? 03:40
sorear Stefans-MacBook-Air:rakudo-jvm sorear$ ./perl6 -e 'my @h; my int $i; while $i < 100000 { @h[nqp::rand_I(5, Int)]++; $i = $i+1; }; say @h'
24875 25063 24986 12539 12537
colomon: no, I don't
rand_I would be good enough if the bitLength() were changed to bitLength() + 32 03:41
colomon I guess I can fix rand_I the same way we (I?) did it in Niecza -- just keep on rand-ing till we get a number that matches the constraints.
sorear would still not be uniform exactly, but the statistical difference would be small enough that you'd need to run an expirment for millions of years to detect thje difference 03:42
colomon unless you have a better suggestion
next question: why is srand returning a value in parrakudo?
sorear ...or use rejection sampling, that works too
because it predates Nil? 03:43
colomon yeah, that sort of makes sense 03:48
sorear thinks that the best RNG for many applications on current CPUs is AES-CTR 03:49
colomon java.lang.NoSuchMethodError: org.perl6.nqp.runtime.Ops.srand(J)J 03:51
what's that (J)J mean?
"The point of the function is to "seed" the rand function so that rand can produce a different sequence each time you run your program. When called with a parameter, srand uses that for the seed; otherwise it (semi-)randomly chooses a seed. In either case, starting with Perl 5.14, it returns the seed. " 03:52
sorear takes one argument of type long, returns a long
colomon should be taking two args, long and ThreadContext 03:53
sorear docs.oracle.com/javase/specs/jvms/s...jvms-4.3.3
colomon QAST::OperationsJAST.map_classlib_core_op('srand', $TYPE_OPS, 'srand', [$RT_INT], $RT_INT, :tc);
03:53 daniel-s_ left
sorear that only applies to newly-compiled code 03:53
03:53 preflex_ joined, ChanServ sets mode: +v preflex_
colomon sorear: eh? 03:53
sorear you often have to keep old versions of ops around for the benefit of src/vm/jvm/stage0/*.class
colomon oh 03:54
sorear I've taken to marking things /*FOR_STAGE0*/ when that's the only reason they stick around
btw, that link convers method descriptor interpretation
colomon ah, srand used to be in the QAST thing without an actual implementation 03:55
03:55 preflex left
sorear so you'll be able to make sense of (JLorg/perl6/nqp/runtime/ThreadContext;)J or whatever else gets thrown at you 03:55
oh
03:55 preflex_ is now known as preflex
colomon sorear++ 03:55
sorear ...did you recompile?
colomon ...yes
should I not have? or do I need to do something more? 03:57
sorear do you get the srand error when trying to compile code that uses srand? 03:59
with that map_classlib_core_op you posted, if it's saved and compiled, nqp ought to be generating code which looks for (long,ThreadContext) 04:01
not (long)
colomon I got that trying to run code that uses srand 04:03
(after my normal recompile) 04:04
(normal recompile: in nqp, make install; in rakudo-jvm, perl ConfigureJVM.pl and then make)
colomon is probably doing something stupid because he is too tired to program 04:05
errr... rebuilt everything the exact same way as I thought I did it before, and now it all works. 04:07
I have a working srand here; I'll check it over and commit it once I've had some sleep. 04:08
thanks, sorear++
[Coke] categorizes the java aborts: gist.github.com/coke/5879701 04:14
sorear [Coke]: did you see my test_summary patch earlier today? 04:15
[Coke] to bin/rakudo.jvm.sh -? already applied it. Thanks! 04:19
definitely a huge improvement! 04:22
sorear [Coke]: no, the later one
[Coke]: I modified test-summary to be able to process rakudo_test_run.tar.gz files generated by the spectest harness 04:23
[Coke] the "shell" stuff jnthn mentioned is blocking 165 tests.
sorear [Coke]: so it's now possible to do TEST_JOBS=4 make rakudo_test_run.tar.gz; t/spec/test_summary rakudo.jvm --archive rakudo_test_run.tar.gz 04:24
[Coke] sorear: does it change the default behavior or take an option for that? (checking)
04:24 xilo left
sorear adds option 04:24
[Coke]: if you, I dunno, have multiple cores and want a faster test summary
04:28 Psyche^ joined 04:30 BenGoldberg left 04:31 Patterner left, Psyche^ is now known as Patterner 04:35 kingbeast joined 05:16 konundra left 05:38 Guest1337 left 05:42 xinming left 05:44 xinming joined 05:46 xenoterracide joined 06:06 kaare_ joined 06:27 xenoterracide left 06:31 logie left 06:32 woosley1 left 06:35 ggoebel left 06:39 ztt joined 06:55 Rotwang joined 06:56 scottp joined, shinobicl_ left 07:00 FROGGS[mobile] joined
FROGGS[mobile] O/ 07:00
sorear o/ FROGGS[mobile]
FROGGS[mobile] What have I missed? Is the pypy port already done? 07:03
sleeping a few hours means much in the Perl 6 world these days 07:08
sorear I wasn't aware of a pypy port 07:09
FROGGS[mobile] I wasnt serious about pypy 07:10
but it is just awesome how nicely the JVM backend is coming along 07:11
sorear :D 07:12
FROGGS[mobile] I expected this state in august or september
for* 07:13
07:13 stevan__ joined 07:14 SmokeMac_ joined 07:15 PacoAir_ joined 07:16 SamuraiJack_ joined 07:17 shachaf_ joined 07:18 dagurval_ joined, groky left, autumn left, shachaf left, stevan_ left, skids left, SmokeMachine left, lue left, araujo left, PacoAir left, SamuraiJack left, lestrrat left, renormalist joined, PacoAir_ is now known as PacoAir, noxgirl joined, skids joined, salv0 joined 07:19 lestrrat joined, __rnddim__ joined, araujo joined, tadzik joined 07:22 groky joined 07:29 ztt left 07:42 Rotwang left, Woodi left, Woodi joined
Woodi hallo 07:43
sorear Hai
Woodi I have problem with '?' in grammar...
r: gist.github.com/anonymous/5890252
camelia rakudo b51008: OUTPUT«#<failed match>␤OK␤»
Woodi \d?\d seems not work or have another syntax :) 07:44
sorear because it's a rule, the ? doesn't backtrack
Woodi backtracking here ? 07:45
so it works as required ? 07:46
sorear \d\d? would work better
Woodi heh
sorear \d?\d (in a :ratchet context) means try to match a \d. whether or not you succeed, match another 07:47
Woodi works for me :)
sorear \d\d? means match a \d, then try to match another
Woodi it's misleading... 07:48
JimmyZ shinobicl_: nope, next that 07:53
ops..
07:56 shachaf_ is now known as shachaf, shachaf left, shachaf joined
sorear o/ JimmyZ 07:58
Woodi e, what ? :) camelia OTRed me... I have no idea how to use OTR, just loaded script :) 08:01
08:02 preflex left
JimmyZ \o sorear :D 08:02
08:03 preflex joined, ChanServ sets mode: +v preflex
sorear Woodi: must be some client weirdness 08:04
camelia doesn't actually support that
Woodi say Somegrammmar.parse( ... ) shows a lot of "orig => ..." sections... is it all there in memory or just it print like that ? 08:13
sorear there's only one Str object for the original string
every match refers to it by reference
Woodi hurray! :) 08:14
08:19 woosley1 joined
sorear so yes it's all stored in memory, but the printing makes it look worse than it is :) 08:21
08:25 woosley1 left 08:34 domidumont joined 08:43 spider-mario joined 08:48 btyler left
lizmat good *, #perl6! 08:58
moritz \o * 08:59
lizmat wrt irclog.perlgeek.de/perl6/2013-06-28#i_7266026 : the meta information in pod is only used to *select* a compunit, it is *not* needed during compilation
so it *will* be possible to trivially skip pod parsing as a speed tweak 09:00
meta information in pod is of course also needed when installing a compunit
09:03 xinming left, domidumont left 09:04 domidumont joined
FROGGS_ depending on the implementation it might be needed only when installing 09:04
09:04 xinming joined
lizmat oops, yes, that's actually what I meant: the meta-information from pod is somehow stored in a database on installation, and *that* is used to select the compunit 09:09
FROGGS++ for pointing out the ambiguity of my not yet awake brane
FROGGS_ I really like that pod section... we just need to convince TimToady++ a bit more :o) 09:10
moritz I thought pod blocks are accessible at run time?
FROGGS_ moritz: they are
but you dont *have to* care what is in this particular one when you have located the unit-file 09:11
you can, of course
moritz what is "the unit-file"?
FROGGS_ Foo.pm
(because module has more than one meaning)
moritz is this about speed-parsing to find whether a given file contains the module we're looking for? 09:12
FROGGS_ yes and no
if we implement it right we wont parse every module file and then sort them out by the pod blocks
09:13 xinming left
FROGGS_ when should have built a database when installing a module 09:13
09:15 xinming joined
lizmat and actually, that part of the code I have already written more or less 09:19
moritz is still lost, but that's OK
FROGGS_ moritz: np, we take you with us :o)
lizmat currently, the CompUnitRepo module's interface is TBD 09:20
but I think it will have an "install" method
09:20 FROGGS[mobile] left
lizmat and a "find" method 09:21
sorear is doing a thing
lizmat the "install" method will take a string, parse its contents for pod meta-info, and then put the string somewhere
sorear i've hacked the test harness to make a log of which blocks are used while executing which test files 09:22
moritz "install" and "find" sound like they should go into diffrent classes
sorear my hope is that we'll find that 90% of the test files use 10% of the setting
and then maybe we can do some cool demand loading thing to improve cold start performance 09:23
lizmat while recording the meta-information in some for somewhere if needed (this is not true for the proposed CompUnitRepo::Local::File)
moritz (unless 'install' is "add to repo")
lizmat install is add to repo
please note, this does not do any dependency checking or whatever 09:24
this is the final step of installing a compunit in a repo
and that repo can be just a directory/subdirectory, for development situation, just like @*INC now works 09:25
and then the filesystem just needs to be able to support the quirks of the compunit naming it gets thrown at it
(which would be the CompUnitRepo::Local::File class doing the installing) 09:26
or it could be something more elaborate that would do filename mangling and store meta-information in some kind of database (probably just some text file) 09:27
which would be CompUnitRepo::Local::Installation in my proposal 09:28
or anybody could make a different module with the same API
using a SQLite database backend for storing compunits and their meta-information
or even one that doesn't actually install, but fetches files from the cloud at runtime and *then* store them locally 09:29
or whatever, it is intended to be flexible
FROGGS_ sorear: what do you mean by "blocks"? 09:32
code sections of the compiler or the script?
because knowing dead sections of the compiler code is a pretty cool thing 09:33
sorear FROGGS_: I'm recording all of them, but I only care about the compiler and setting ones
FROGGS_ that is pretty awesome
because if an else block will never be used there is potentially a thinko/bug... but I guess you already know that :P 09:34
sorear I hadn't even considered the test coverage angle 09:35
My main objective here is to cut down on the 6 second startup time by allowing rarely used parts of the compiler and CORE.setting to be demand-loaded
FROGGS_ cool 09:36
sorear++
sorear If this works at all. 09:37
09:37 xinming left 09:40 xinming joined
FROGGS_ ohh, I'm pretty sure that you can get this done :o) 09:43
sorear: will this be available through a --target then? 09:44
like we already have --target=profile or so
sorear now I have a 1.6 Mline, 130 MB USAGELOG file 09:45
to parse it!
FROGGS_: not unless I can come up with a sane factoring
right now this is one-off experimental coding 09:46
FROGGS_ ahh, I see
wenn, maybe once it works we can use fudge turn switch in on/off.... 09:47
like #?rakudo option XYZ
bbl 09:48
dalek kudo/nom: bbc2b3f | (Elizabeth Mattijsen)++ | src/core/operators.pm:
Fix undefine()
09:50
ast: f4472d9 | (Elizabeth Mattijsen)++ | S32-scalar/undef.t:
Unfudge now passing undefine tests
10:02
sorear 6,478 blocks are a) found in at least one precompiled jar b) used by at least one test file 10:03
1,151 of those are invoked in *every* test file 10:04
1,958 are invoked in more than half 10:05
The bottom 50% of the blocks are invoked by <5% of the test files 10:06
10:07 FROGGS[mobile] joined
jnthn sorear: Did CodeRef get changed yet to not resolve all of it's annotations until first usage? 10:10
jnthn remembers thinking of doing that, but didn't actually get to it himself... :) 10:11
BTW, friendly reminder to those going to YAPC::EU: tomorrow is last YAPC::EU talk submission day. :) 10:12
And I don't see that many Perl 6 submissions :P 10:13
sorear jnthn: we can't even create a coderef until we have an annotation, because that's how we distinguish coderefs from other blocks 10:16
jnthn: i've been toying with the idea of resurrecting getCodeRefs, possibly in a different form 10:17
also then I can kick the non-hot blocks out of the core class and demand-load them 10:18
jnthn sorear: Yes, we have to get the annotation itself, but not all of the various fields out of it.
sorear: This is assuming the individual values carry some cost to create/are built on-demand...dunno if htat's acutlaly the case.
sorear jnthn: I don't think that makes a difference
jnthn: the generated methods for the annotation don't even show up on the profile, while getAnnotation does and fairly high 10:19
so I think it's doing all the work upfront
lizmat robocup&
10:20 _daniel-s__ joined
jnthn aww, ok 10:20
10:23 tomyan joined, daniel-s__ left
sorear jnthn: I'm hesitant to do anything with shell() or open("rp") until we've had a discussion about $*EXECUTABLE_NAME and how tests should be invoking bits of subprocess perl in a test server environment 10:24
jercos r: my $x = "'foo'|'bar'";("lol foo bar" ~~ /<$x>/).print 10:28
camelia rakudo bbc2b3: OUTPUT«lol»
jercos what am I missing here
r: ("lol foo bar" ~~ /'foo'|'bar'/).print 10:29
camelia rakudo bbc2b3: OUTPUT«foo»
jercos Why are those two not equivalent?
10:47 rindolf joined
jnthn Huh...beats me... 10:47
r: my $x = "'foo'|'bar'"; say ("lol foo bar" ~~ /<$x>/).WHAT
camelia rakudo bbc2b3: OUTPUT«(Match)␤»
jnthn r: my $x = "'foo'|'bar'"; say ("lol foo bar" ~~ /<$x>/).perl
camelia rakudo bbc2b3: OUTPUT«Match.new(orig => "lol foo bar", from => 0, to => 3, ast => Any, list => ().list, hash => EnumMap.new())␤»
10:47 tomyan left
jnthn r: my $x = "'foo'|'bar'"; say $x; say ("lol foo bar" ~~ /<$x>/).perl 10:48
camelia rakudo bbc2b3: OUTPUT«'foo'|'bar'␤Match.new(orig => "lol foo bar", from => 0, to => 3, ast => Any, list => ().list, hash => EnumMap.new())␤»
jnthn wat.
Well, that's getting a bug ticket when masak++ wakes up, I suspect... 10:53
r: my $x = "'foo'||'bar'"; say $x; say ("lol foo bar" ~~ /<$x>/).perl
camelia rakudo bbc2b3: OUTPUT«'foo'||'bar'␤Match.new(orig => "lol foo bar", from => 0, to => 3, ast => Any, list => ().list, hash => EnumMap.new())␤»
jnthn r: my $x = "'foo'||'bar'"; say $x; say ("lol fo0 baa" ~~ /<$x>/).perl 10:54
camelia rakudo bbc2b3: OUTPUT«'foo'||'bar'␤Nil␤»
sorear sleep& 10:57
dalek p: ce08f8a | (Solomon Foster)++ | src/vm/jvm/ (3 files):
Add random number generator to ThreadContext.

Make rand_n and rand_I use it, and add srand that sets its seed.
11:05
colomon rn: { my %h; %h{$_}++ for (^5).roll(1000); say %h } 11:08
camelia niecza v24-86-g39ab531: OUTPUT«{"0" => 199, "1" => 189, "2" => 198, "3" => 192, "4" => 222}␤»
..rakudo bbc2b3: OUTPUT«("4" => 208, "1" => 213, "0" => 195, "3" => 196, "2" => 188).hash␤»
colomon rn: { my %h; %h{$_}++ for (^5).roll(1000); say %h }
camelia niecza v24-86-g39ab531: OUTPUT«{"0" => 194, "1" => 208, "2" => 221, "3" => 198, "4" => 179}␤»
..rakudo bbc2b3: OUTPUT«("2" => 212, "0" => 202, "1" => 180, "4" => 219, "3" => 187).hash␤»
colomon rn: { my %h; %h{$_}++ for (^5).roll(1000); say %h }
camelia niecza v24-86-g39ab531: OUTPUT«{"0" => 202, "1" => 215, "2" => 188, "3" => 200, "4" => 195}␤»
..rakudo bbc2b3: OUTPUT«("4" => 188, "2" => 200, "3" => 214, "0" => 211, "1" => 187).hash␤»
moritz submitted act.yapc.eu/ye2013/talk/4928 (no idea if you can see it before it has been approved) 11:17
remember, less than 1.5 days left for submitting talks
dalek ast: de39835 | (Solomon Foster)++ | S32-num/rand.t:
Add simple test of random number distribution.

Rakudo JVM currently has a bug where rand_I is biased towards numbers at the beginning of a range. This simple check should detect that by rolling a number from 0 to 4, then summing up the number of times 3 or 4 was found. In a proper random number generator, this should be on the order of 400. We check to see if it is less than 300 and complain if it is.
This might happened by change to a good random number generator occasionally, of course.
11:26
p: 760487e | (Solomon Foster)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Fix rand_I so that it is more even.
11:36
11:40 pmurias joined
dalek p: 20a7fe6 | (Solomon Foster)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Remove stray reference to ThreadLocalRandom.
11:46
colomon has probably made more changes to nqp in the last week than he made in the previous five years. 11:51
pmurias likes that Perl6 developers are converging on rakudo/nqp 11:52
12:04 Teratogen joined
colomon *loves* that sorear++ is working on rakudo/nqp 12:04
12:11 ggoebel joined 12:18 FROGGS joined 12:27 SamuraiJack_ left 12:31 birdwindupbird joined
jnthn Seems Rakudo going multi-backend has rather changed the dynamic of the project... ;) 12:40
jnthn was gonna go for a nice walk to the nature reserve, alas it's pouring with rain, so guess I stay in and hack instead. 12:41
moritz++ # submitting a talk 12:44
Awww! i.chzbgr.com/maxW500/7583003648/hE6270DD8/
oops, wrong window! 12:45
but it's cute anyway :)
moritz there are more incriminating links you can accidentally post into the wrong window :-)
jnthn yes! ;)
FROGGS[mobile] Hehe 12:58
13:12 Chillance joined 13:16 tomyan joined
timotimo so, to implement dir(), the parrot backend gets the full list of contents and then lazily iterates over them in nqp code; can i easily do such a lazy iteration in java code, or should i add a jvm-specific nqp::dircontents and implement the filtering and lazyness in the dir method instead? 13:16
jnthn Well, if you expose it as opendir/readdir/closedir nqp ops then I guess you can get some laziness 13:18
But I'm not sure it's worth it
Maybe for really huge directory listings it would be...
13:19 benabik left
jnthn looks through the [Coke]++ list of Java aborts 13:20
timotimo so, am i allowed to make up a new nqp op name, even if it isn't available on parrot? or perhaps i could mimic the op on parrot because it already non-lazily gets all the dirs, too ...
FROGGS jnthn: I have dirs at work that have several thousands of files... 13:21
and it would be nice if it wouldnt takes several seconds to get the content as it is now using p5 13:22
jnthn timotimo: Well, you could add an nqp:: op for it, map it on Parrot to what it currently does, then implement it for JVM also, then have the same code in Rakudo...
timotimo: But FROGGS makes a good point. 13:23
We have an opportunity to do it righter than p5, it sounds.
FROGGS yeah, for example if you want to get the first file that matches a pattern, then you dont need the full list 13:24
timotimo hm, not sure how i have to handle the encoding; on parrot it does pir::trans_encoding__Ssi($filename, find_encoding__Is('utf8')) do i have to do something in particular on the jvm to get that same behavior out?
okay, i can use the DirectoryStream<Path> thing from java; i could create such an object with nqp::opendir, destroy it in nqp::closedir and iterate one entry with nqp::nextdir or something
but where do i keep the actual DirectoryStream instance? 13:25
13:25 benabik joined
jnthn timotimo: We already have an IOHandle REPR, potentially you can use that and stash a DirectoryStream in it too... 13:25
timotimo looks 13:26
jnthn A whole load of these fails pertain to a fiddly BS issue... 13:27
colomon FROGGS++
FROGGS :o)
jnthn I guess I should work on that...
jnthn makes a cuppa while pondering the fix... 13:28
FROGGS hmmm, tea is a nice idea (bad weather here) 13:30
jnthn Same here
Summer! ;)
FROGGS hehe
13:30 Teratogen left
jnthn I shouldn't complain; hot days make my appartment warmer than I like 13:30
FROGGS yeah, for me it could be like 23°C every day... 13:31
moritz what's BS?
jnthn could settle for a little cooler, even :)
moritz: Bounded Serialization
moritz ah right 13:32
FROGGS ohh, |= is a trap!
(in case you have +> and +& next to it) 13:33
jnthn r: my $a = 1; $a |= 2; say $a.perl
camelia rakudo bbc2b3: OUTPUT«any(1, 2)␤»
jnthn :)
FROGGS yeah, but that was not what I wanted
jnthn I can't think of any particularly practical uses for making a junction that way, but I'm sure there will be one some day :)
FROGGS well, pushing things this way to a junction can be useful I imagine 13:35
but I have to get into it first... I'm still a P5 hacker using P6
jnthn :) 13:36
Yeah, I tend to experience the opposite now: I'm a P6 hacker who sometimes uses P5 and has to think about it a bit :)
colomon same here. :) 13:37
FROGGS .tell masak I am working on v5's pack/unpack right now, we obviously need the intsize there too... I am thinking of providing %Config<intsize>, which defaults to 4, and can be overridden by setting %Config and by the precision argument to sprintf
yoleaux FROGGS: I'll pass your message to masak.
timotimo jnthn: did you mean for me to add a new field for a DirectoryStream to the IOHandleInstance class? do i have to do a magic dance for nqp to work with the resulting new repr?
FROGGS .tell masak I'm not sure if this can be passed to the "i" (un)pack token somehow 13:38
yoleaux FROGGS: I'll pass your message to masak.
13:39 FROGGS_ left
jnthn timotimo: No magic dance, I shoudln't think :) 13:45
timotimo OK 13:46
how should i signal "the end of the directory has been reached" from nextfiledir if i decided to return a String from it? (also, should i call it *_s in that case?) 13:52
oh, String can be null. 13:53
13:54 tomyan left
jnthn that works, yes 13:54
timotimo DirectoryStream has no explicit close thingie, so setting ioh.dirstrm = null should suffice to get it closed, yes? 13:55
oh, nope, it inherits closable.
jnthn Suspect it wants an explicit close...
timotimo indeed, and i've done that now :) 13:56
er, but how do i make sure that the directory stream gets closed if i have dir be lazy? i can't know if the iterator was thrown away, can i? 13:57
jnthn Hmm 13:58
That is the downside of laziness. The handle won't get freed until the object is collected.
And the finalizer runs.
timotimo should i write a TODO in the ops file and be done with it for now? 13:59
jnthn If somebody iterates all the way then it'll hit the end and know to close, I guess.
It's just if they stop in the middle.
timotimo yes
should i make nqp::nextfiledir close the stream when the iterator hits the end?
probably not, if nqp::closedir is its own op 14:00
jnthn No, just make sure that when that returns a null then the calling code uses closedir, I think.
timotimo if i my Str $foo := nqp::nextfiledir and the java function returns null, how do i check it in nqp code? is there something like nqp::isdefined? 14:01
jnthn nqp::isnull 14:03
or nqp::isnull_s for strings
14:04 snoopy left
timotimo thanks! 14:05
what's mapperspeak for "returns void"? 14:07
$RT_SMO?
ah, $RT_VOID
colomon IO actually appears to be not as broken as I thought? But lines() fails hard 14:11
jnthn
.oO( fail hard with a vengence )
14:12
colomon just not fail harder, okay? 14:13
colomon did not like Die Hard 2. :\ 14:14
timotimo which one was that? 14:16
mst timotimo: the one colomon doesn't like.
colomon timotimo: the one set at an airport 14:17
timotimo oh, i remember sitting in the theater and noticing a colomon in the back getting up and leaving now that you mention it 14:18
benabik Die Hard was a good movie.
colomon it felt like they were lazily trying to just clone what worked with the first movie without having a clue about what actually worked, if that makes any sense.
timotimo the first one was the one in the skyscraper, yes?
benabik Shame they never made sequels.
timotimo is still bummed out about the first three star wars movies never being made 14:19
colomon timotimo: yes, first one was skyscraper
timotimo ConfigureJVM.pl needs a --gen-jvm for all the people who don't have jvms installed on their machines! :P 14:20
benabik timotimo: Should we add --gen-gcc to Rakudo? 14:21
timotimo sounds like a good idea 14:22
i hear there's a new upcoming C compiler called "clang" that's gaining popularity fast
maybe we should add an option for that somehow
colomon Another good project: add --make-movie-better to ffmpeg... 14:24
timotimo java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 - oooh, how did i do that? 14:25
colomon I've gotten that several times in things that didn't involve arrays this week. :\
timotimo how do i pinpoint the problem? 14:26
it happens after the jast stage, fwiw
i guess i should first make sure that my changes are at fault 14:27
colomon oo, that's happening when you're building? ugh
*building rakudo
jnthn Wait, did you use an RT_VOID return type for an op? And it's not in sink context?
Or not not last thing in a block at least... 14:28
That's asking for trouble. Pretty much all the ops leave *soemthing* on the stack just in case.
timotimo oh, interesting
colomon hmmm, we're getting NullPointerException here: (my $line = self.get).defined 14:29
timotimo it's not the last thing in a block
colomon I think the time it's not defined.
timotimo should i return a long instead?
jnthn timotimo: Well, typically one of the arguments is a good thing to return...a null SMO can also be OK 14:30
long is fine too
timotimo i'll do that then. for now i put the closedir in sink context.
just to see if it compiles and passes any tests at all
"Can not invoke this object" :\ 14:31
"in compile_all_the_stmts" %) 14:32
jnthn o.O
timotimo the uppermost one is box from QAST and a bit lower is coerce
coercion*
14:33 konundra joined
timotimo oh, *whoops*, didn't set the return types properly for the other ops 14:34
it compiles now at least :) 14:37
14:38 logie joined
timotimo er, huh? 14:38
java.lang.NoSuchMethodError: org.perl6.nqp.runtime.Ops.closedir(Lorg/perl6/nqp/sixmodel/SixModelObject;Lorg/perl6/nqp/runtime/ThreadContext;)D - but i have public static long closedir(SixModelObject obj, ThreadContext tc) { and i mapped it as QAST::OperationsJAST.map_classlib_core_op('closedir', $TYPE_OPS, 'closedir', [$RT_OBJ], $RT_NUM, :tc); 14:39
colomon oo oo ooo ooo! New bookshelves are ready for books!
jnthn $RT_NUM is double, not long 14:40
$RT_INT is long
timotimo oh, dumb me
thanks! :)
TimToady colomon: they will quickly be promoted to their level of incompetence
TimToady is home after a flight-delay of nearly three hours, and slept pretty well last night, after being up for 26 hours 14:41
mst TimToady: I just got home after being stranded in PHL for 22 hours, bringing my total Austin -> Lancaster travel time to 45h
TimToady first prize is 11 hours in PHL? 14:42
timotimo i'm curious; is there something fundamental blocking module installation on rakudo-jvm?
TimToady it was really bumpy across the country last night, even after we got going
mst it was more of a door prize
timotimo or is it just "panda nor ufo will run without many more IO ops"? 14:43
jnthn timotimo: Probably small things like that 14:45
timotimo: Also, no "make install" yet :)
14:46 xilo joined
timotimo hehe. 14:48
well, dir() can't work without self.child, which can't work without $.SPEC existing
is a dirty hack acceptable that will just ~ "/" ~? :P 14:49
well, for testing purposes at least.
blergh, can't self.directory ~ "/" ~ $elem, because self.directory delegates to self.parts which uses IO::Spec, too 14:56
jnthn I'm currently working on what I think is the issue beneath some of IO::Spec's brokenness 14:58
However, it's taking a little while
15:00 thundergnat joined
mst w2 15:02
bah
timotimo that's cool :) 15:03
jnthn Exception in thread "main" java.lang.ClassFormatError: Unknown constant tag 100 15:04
in class file nqp
...wtf?!
15:07 xenoterracide joined
thundergnat Hi #perl6 o/ 15:10
.seen masak
yoleaux I saw masak 00:02Z in #perl6: <masak> 'night, #perl6
thundergnat .tell masak Hey, any interest in adding a csv-file-write routine to Text::CSV? See gist.github.com/thundergnat/5891406 Could do a pull request (with appropriate testing) if interested. 15:11
yoleaux thundergnat: I'll pass your message to masak.
15:14 Rotwang joined
timotimo jnthn: do yox expect the Spec fix to land today? 15:22
jnthn timotimo: Well, I just discovered it may be nothing to do with the thing I'm working on and everything to do with IO::Spec being missing from the makefile on JVM :) 15:24
Currently seeing if it will build.
masak thundergnat: interesting. yes, let me have a look at the gist and I'll get back to you. 15:26
yoleaux 00:11Z <BenGoldberg> masak: Considering that the perl6 channel is utf8 friendly, why not use Mäsak as your irc nickname?
13:37Z <FROGGS> masak: I am working on v5's pack/unpack right now, we obviously need the intsize there too... I am thinking of providing %Config<intsize>, which defaults to 4, and can be overridden by setting %Config and by the precision argument to sprintf
13:37Z <FROGGS> masak: I'm not sure if this can be passed to the "i" (un)pack token somehow
15:11Z <thundergnat> masak: Hey, any interest in adding a csv-file-write routine to Text::CSV? See gist.github.com/thundergnat/5891406 Could do a pull request (with appropriate testing) if interested.
masak BenGoldberg: ...because I frequent other channels, too? 15:27
timotimo jnthn++ :)
masak FROGGS: I'm always hesitant to delegate important decisions to config options. will need to think about that one.
does Perl 5 have anything like %Config<intsize> ? 15:28
jnthn timotimo: Seems it builds but then doesn't quite work...looking. :) 15:29
15:30 telex left
timotimo i'll have to commute now and then probably be afk for a bit, though. i'll check in with you later and if i can get dir to work with spec as intended, i'll push to nqp and pullrequest to rakudo :) 15:31
15:32 telex joined 15:34 berekuk left 15:35 benabik left
TimToady $ perl -E 'use Config; say $Config{intsize}' 15:37
4
masak ah, ok. 15:39
TimToady if I were doing that again, it'd say 32 :) 15:42
15:42 mtk joined 15:43 ajr joined, ajr is now known as ajr_
TimToady 'course, if we wanted to be completely general, we wouldn't assume binary... 15:43
FROGGS masak: dont has to be called "config" though
15:44 shinobicl_ joined
FROGGS but you need to specify a width somehow when packing a negative value to a 4 byte buffer for exampel 15:45
masak yes, int size turned up all over with sprintf, too. 15:46
15:47 berekuk joined 15:52 raiph joined
dalek kudo/nom: 7db8e2c | jnthn++ | tools/build/Makefile-JVM.in:
Add IO::Spec to build.

Seems to build OK, though doesn't quite work yet.
15:55
kudo/nom: 4123079 | jnthn++ | src/core/Str.pm:
Add missing check for 0-count in subst.

Probably got away with this on Parrot due to s/// thunk not having any params, which led to the passed param being ignored. On the JVM, it is aware of such things. Fixes various of the tests failing with "Wrong number of arguments passed; expected 0..0, but got 1".
15:58 PacoAir left
masak rn: my $foo = "say"; 42.$foo 16:00
camelia niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Str␤ at /tmp/HJwtK75L9m 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…
..rakudo bbc2b3: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Str'␤ in block at /tmp/v4JEiUMQZk:1␤␤»
masak um. 16:01
std: my $foo = "say"; 42.$foo
camelia std d4cc5ab: OUTPUT«ok 00:00 43m␤»
masak thundergnat: example input is nice, but a pull request for writing CSV would need to have a nice full suite of passing tests. we can collaborate on it if you like. 16:02
thundergnat: I would also welcome a session talking through what flags/options the output part would need. they're potentially quite different from what the input part needs. 16:03
thundergnat masak Sure. I didn't invest a lot of time in it until I guaged your interest. 16:04
masak :) 16:06
TimToady rn: my $foo = "say"; 42."$foo"
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤Unsupported use of . to concatenate strings or to call a quoted method; in Perl 6 please use ~ to concatenate, or if you meant to call a quoted method, please supply the required parentheses at /tmp/ALMto0Es4w line 1 (EOF):␤…
..rakudo bbc2b3: OUTPUT«===SORRY!===␤Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.␤at /tmp/Q1kBC8pyfK:1␤------> my $foo = "say"; 42."$foo"⏏<EOL>␤»
TimToady rn: my $foo = "say"; 42."$foo"() 16:07
camelia rakudo bbc2b3, niecza v24-86-g39ab531: OUTPUT«42␤»
TimToady the .$foo form requires hard refs
to avoid the 'use strict refs' that P5 requires 16:08
16:09 PacoAir joined
TimToady it's a little sad that ."foo"() and ::("foo") are so different, but I don't think we can make those consistent, since .() is taken, and ::"foo" is close to unreadable 16:13
mst likes $obj->${"foo_${bar}"} in p5 :) 16:14
masak "hard refs" meaning "there's an actual routine (reference) in that variable", I guess. 16:19
I'm unused to thinking about those as "hard refs" in Perl 6. :)
TimToady: so... then, it's an LTA error? can we require that it be a Routine or something like that? or is the postcircumfix:<( )> error the best we can do? 16:20
dalek kudo/nom: b1f0fc0 | (Elizabeth Mattijsen)++ | src/core/Any.pm:
Use Nil instead of () for list/array adverbs
16:23
16:26 jlaire left 16:27 pecastro_ is now known as pecastro 16:29 jlaire joined
masak I wish we would use roles more for requiring stuff. like Callable actually requiring a postcircumfix:<( )>. and then we'd say that $foo in 42.$foo has to be a Callable. 16:29
of course, you could still provide postcircumfix:<( )> outside of Callable... but then you couldn't do 42.$foo 16:30
hm, and postcircumfixes are being turned from methods to subs... :/
TimToady lizmat: no, spec says that :kv and such weed out non-existing elements 16:32
so () is correct 16:33
lizmat yes, that's the idea
TimToady Nil doesn't disappear in a list
lizmat well, shouldn't I think is the phrase :)
so, () is correct in the future, is what you're saying
TimToady yes, unless my brane is in sideways 16:34
nr: say (1,Nil.3).elems
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤Two terms in a row (listop with args requires whitespace or parens) at /tmp/MuPxNPHIgc line 1:␤------> say (1,Nil⏏.3).elems␤␤Parse failed␤␤»
..rakudo 412307: OUTPUT«===SORRY!===␤Confused␤at /tmp/5UEcMu_7jY:1␤------> say (1,Nil.⏏3).elems␤ expecting any of:␤ postfix␤ dotty method or postfix␤»
TimToady nr: say (1,Nil,3).elems 16:35
colomon www.harmonyware.com/pictures/new_bookshelves.jpg # ta-da!
camelia rakudo 412307: OUTPUT«2␤»
..niecza v24-86-g39ab531: OUTPUT«3␤»
TimToady nr: say (1,(),3).elems
camelia rakudo 412307: OUTPUT«2␤»
..niecza v24-86-g39ab531: OUTPUT«3␤»
TimToady nr: say [1,Nil,3].elems
camelia rakudo 412307, niecza v24-86-g39ab531: OUTPUT«2␤»
TimToady nr: say [1,(),3].elems
camelia rakudo 412307, niecza v24-86-g39ab531: OUTPUT«2␤»
16:36 Rotwang left
TimToady [1,Nil,3] should be 3 elems, not 2 16:36
lizmat ok, so I've adapted the code to the wrong behaviour of Nil
TimToady but rakudo hasn't made the transition yet, and niecza has made it partially 16:37
timotimo it seems my dir implementation fails to return directories
colomon timotimo: that's a bit of a drawback 16:38
dalek kudo/nom: 9ded36c | (Elizabeth Mattijsen)++ | src/core/Any.pm:
Revert "Use Nil instead of () for list/array adverbs"

This reverts commit b1f0fc0165a3967b7a0d080c53d70981eccd2a75.
jnthn timotimo: On IO::Spec, got a patch coming up that fixes a bunch of the .subst bustage, which in turn fixes more IO::Spec stuff too 16:39
TimToady As a designer, sometimes I'm the Oracle at Delphi, and sometimes I'm just Maxwell's Daemon... :) 16:40
lizmat :-)
moritz as long as you're not the Oracle at Redwood Shores... :-) 16:41
timotimo colomon: it would appear that that is exactly how DirectoryStream is supposed to operate
i'm looking for something that will give me directories as well
oh, i was wrong 16:43
it does return directories
jnthn: does that fix directory.child("foo") returning something that stringifies as IO::Path<.foo>?
jnthn timotimo: Not sure 16:44
timotimo strange. i think i'm doing silly things. 16:45
lizmat gone for the evening& 16:47
jnthn Hm, well whatever I just did moved us from attempting 24786 tests to attempting 25231. Not all new passes though...
timotimo ah, interesting!
the java stuff returns "./foobar" for instance 16:48
> ".".path.child("./foo")
IO::Path<.foo>
dalek kudo/nom: 2118544 | jnthn++ | src/Perl6/Actions.nqp:
JVM is sensitive to where savecapture is used.

This corrects it to be used after the signature binder is called. This fixes complex protos (those that aren't just an onlystar), which in turn unbusts .=subst(...).
timotimo yaaaay :)
16:51 Rotwang joined
timotimo that does not fix the ./ behavior, though 16:52
jnthn I think look at the subst tests as some of those fail still...may be a better golf. 16:53
timotimo r: ".".path.child("./t").say 16:58
camelia rakudo 412307: OUTPUT«IO::Path<.t>␤»
timotimo hold up, that's wrong on rakudo, too
16:58 fgomez left 16:59 fgomez joined
timotimo maybe nextfiledir should just chop off the ./ from the beginning of the file's name. 17:02
TimToady sorear: when you copy/paste your 'Stefans-MacBook-Air:rakudo-jvm sorear$' prompt multiple times, it jangles my spam neurons just a bit :) 17:03
jnthn away for evening & 17:04
timotimo bbl 17:05
17:08 shinobicl_ left, shinobicl_ joined 17:15 shinobicl_ left 17:20 birdwindupbird left, kaare__ joined 17:23 kaare_ left 17:31 PacoAir left 17:34 segomos left, segomos joined 17:35 ugexe joined 17:47 xenoterracide left 17:52 mstefanko joined
mstefanko is perl6 the backwards incompatible perl version Larry Wall mentioned in the last minute of www.youtube.com/watch?v=LR8fQiskYII ? 17:53
TimToady very likely 17:57
17:59 sqirrel joined
mstefanko thanks; interesting how perl faded out from the 'cool' tools to work with. you don't hear nowadays startups proclaiming that they are running on perl technology 17:59
18:00 xenoterracide joined
TimToady Perl 6 aims to be cool again :) 18:01
mstefanko apparently it's however popular in banking/payment processing sectors
TimToady well, they like stability more than coolth :) 18:02
mstefanko yes def.
but i can see also a bit why when i go through the online pages and docs. websites promoting perl tend to look very pre-2000ish 18:03
perl.org screams o'reilly at you
colomon lots of neat things still being done with Perl, www.thegamecrafter.com/ is one of my favorite examples. :)
mstefanko is the website built on perl or their products? 18:04
18:04 yoleaux left 18:05 yoleaux joined, ChanServ sets mode: +v yoleaux
colomon their production method (which is what they're really selling) 18:05
JT gave a presentation on it at YAPC::NA 2011.
18:06 yoleaux left
mstefanko X-Powered-By:Perl Dancer 1.311 18:06
i see
i guess it's one of the better looking websites
colomon website too, I guess! ;)
18:10 sqirrel left, rindolf left
Ulti mstefanko: also bioinformatics is mostly perl 18:21
timotimo i wonder if catpath should be able to handle catpath(".", "./foo") properly
or if i should just cut off leading ./ from my elements in the dir traversal
18:23 dmol1 joined, dmol left
timotimo ah, it's even worse, dir("t") will give "t/t/..."), so i suppose i don't have to catpath at all. 18:23
TimToady lizmat: re irclog.perlgeek.de/perl6/2013-06-29#i_7267784 The compiler does need to know the complete identity of a module if it is to allow multiple versions to coexist at runtime
Ulti mstefanko: also I just created a startup and we're using perl on heroku for our web stuff... because its cool
mstefanko: that and I'm working with other people from bioinformatics who essentially only know perl... 18:24
TimToady
.oO(IDENTIFICATION DIVISION)
timotimo any clues to why the jast phase takes about half as long as the parse phase? is that an okay time to take? (compared to parrot where it doesn't take quite as much, but there's a pir phase directly after that as well) 18:26
colomon timotimo: you probably need to ask jnthn or sorear that, and I don't think either of them is around right now... 18:31
timotimo it's probably not that important 18:32
first we get it all to run :)
18:39 btyler joined
timotimo now has a running dir() implementation atop the jvm 18:41
colomon \o/
18:41 mikemol left
timotimo except "method basename not found" 18:43
ah, duh9~.
and now that i've fixed it to its fullest, i'll run a full spectest
timotimo finds it hard to tell if he made other stuff fail with the changes 18:52
but it's quite unlikely.
t/spec/S05-metachars/newline.rakudo.jvm ...................... Failed 2/15 subtests (2 TODO tests unexpectedly succeeded) 18:56
(probably means nothing, though)
dalek p: bfe5a06 | (Timo Paulssen)++ | src/vm/jvm/ (3 files):
create opendir, nextfiledir and closedir ops.
19:01
timotimo github.com/rakudo/rakudo/pull/173 - this is the corresponding pull request for rakudo-jvm 19:06
jercos r: my $x = "'foo'|'bar'";("lol foo lol" ~~ /<$x>/).print 19:11
camelia rakudo 211854: OUTPUT«foo»
jercos r: my $x = "'foo'|'bar'";("lol foo bar" ~~ /<$x>/).print
camelia rakudo 211854: OUTPUT«lol»
jercos :|
timotimo a junction is not what you want in this case 19:12
but try this:
er, i didn't see the " around it, sorry
er, what is going on there? o_O
FROGGS hmm 19:17
r: my $x = "'foo'|'bar'";say "lol foo bar" ~~ /<$x>/
camelia rakudo 211854: OUTPUT«「lol」␤␤»
FROGGS r: my $x = "'foo'|'bar'"; "lol foo bar" ~~ /<$x>/; say $/
camelia rakudo 211854: OUTPUT«「lol」␤␤»
FROGGS r: my $x = "'foo'|'bar'"; "lol foo bar" ~~ /<$x>/; say $/.MATCH
camelia rakudo 211854: OUTPUT«No such method 'MATCH' for invocant of type 'Match'␤ in block at /tmp/yXMKPuD5qQ:1␤␤»
FROGGS err
r: my $x = "'foo'|'bar'"; "lol foo bar" ~~ /(<$x>)/; say $/.caps 19:18
camelia rakudo 211854: OUTPUT«0 => Match.new(orig => "lol foo bar", from => 0, to => 3, ast => Any, list => ().list, hash => EnumMap.new())␤»
FROGGS r: my $x = "'foo'|'bar'"; "loll foo bar" ~~ /(<$x>)/; say $/.caps
camelia rakudo 211854: OUTPUT«0 => Match.new(orig => "loll foo bar", from => 0, to => 3, ast => Any, list => ().list, hash => EnumMap.new())␤»
FROGGS r: my $x = "'foo'"; "loll foo bar" ~~ /<$x>/; say $/ 19:19
camelia rakudo 211854: OUTPUT«「foo」␤␤»
FROGGS r: my $x = "'foo'"; "lol foo bar" ~~ /<$x>/; say $/
camelia rakudo 211854: OUTPUT«「foo」␤␤»
FROGGS r: my $x = "'foo'||'bar'"; "lol foo bar" ~~ /<$x>/; say $/
camelia rakudo 211854: OUTPUT«「lol」␤␤»
FROGGS r: my $x = "'foo' ~ 'bar'"; "lol foo bar" ~~ /<$x>/; say $/ 19:20
camelia rakudo 211854: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter ~ (must be quoted to match literally)␤at eval_0:1␤------> my $x = anon regex { ^'foo' ~ 'bar' ⏏}␤Malformed regex␤at eval_0:1␤------> my $x = anon regex { ^'foo' ~ 'bar' ⏏[…
FROGGS r: my $x = "['foo'|'bar']"; "lol foo bar" ~~ /<$x>/; say $/
camelia rakudo 211854: OUTPUT«「foo」␤␤»
FROGGS ahh
still weird
jercos: can you report a bug for that please? paste the lines here should be enough 19:22
19:27 araujo left 19:28 araujo joined
GlitchMr rn: my $val; $val.perl.say; 19:35
camelia rakudo 211854, niecza v24-86-g39ab531: OUTPUT«Any␤»
19:45 tomyan joined
timotimo looks into why open doesn't work ("method tell not found") 19:45
FROGGS what was 'tell' again? 19:46
timotimo returns the position of the file pointer 19:49
19:49 lelf` left 19:50 lelf` joined, mikemol joined
timotimo github.com/rakudo/rakudo/pull/174 - makes all 30 tests in S32-io/file-tests.t work :D 19:55
github.com/rakudo/rakudo/pull/173 - makes all 12 tests in S32-io/dir.t pass 19:56
19:59 ecocode joined
pmurias jnthn: what would be a simple nqp test for serializing a closure? 20:00
s/serializing/deserializing/
timotimo hmm, --target=jar -e 'my $a = 10; my &foo = -> { say $a }' 20:01
pmurias timotimo: that was an answer to my question? 20:02
timotimo i would attempt that 20:03
target=jar should force serialisation and that &foo should have a proper closure in it
pmurias I want to test it on the js backend
timotimo oh, in that case =jar wouldn't help 20:05
20:05 PacoAir joined
pmurias what does =jar do? 20:07
timotimo forces the jvm backend to create a .jar file
pmurias wouldn't the closure be created at runtime rather then at compile time and serialized?
timotimo oh 20:08
good point :|
pmurias ahh there's BEGIN in nqp 20:09
20:09 dmol1 left
dalek kudo-js: 10b80cc | (Pawel Murias)++ | / (5 files):
Start of implementing one shot continuations.
20:11
kudo-js: 8fb0780 | (Pawel Murias)++ | / (2 files):
Support tags in continuationcontrol and continuationreset.
kudo-js: 0c834cb | (Pawel Murias)++ | run_tests:
Clean up run_tests.
timotimo how much does nqp-js do so far? 20:12
pmurias github.com/pmurias/rakudo-js/blob/.../run_tests 20:13
timotimo ah, all nqp-js work is in that repository?
pmurias yes
dalek kudo/nom: 82437be | (Timo Paulssen)++ | src/core/IO.pm:
give IO::FileTestable more methods on jvm
kudo/nom: b7bbd67 | colomon++ | src/core/IO.pm:
Merge pull request #174 from timo/jvm-more-stat

give IO::FileTestable more methods on jvm
timotimo thank you! :) 20:14
are cokes tests already running?
pmurias cokes tests?
I get my uni exams last week so I was slacking of on my GSoC project, but I'll try to get on the project this one
s/get/had/
colomon pmurias: [Coke] usually runs daily runs of all the p6 compilers against roast 20:15
pmurias timotimo: it doesn't run rakudo yet
timotimo: I had a few rakudo tests at the start but it was a giant pile of hacks so I'm trying to get nqp to fully work before starting to work on rakudo tests 20:17
colomon timotimo: usually [Coke] runs them earlier in the day than this -- it was noon EST yesterday, I think
timotimo hehehe
20:17 tomyan left
timotimo so the tests are probably running now and they're just taking hours again ... 20:17
colomon or they're done already and he just hasn't reported them / pushed them 20:18
timotimo pmurias: would i be able to run nqp-js on some nqp code and generate js files out of that that i could somehow use from inside a browser?
colomon timotimo: I don't think I'm qualified to pull #173 at a glance. And I don't have time to study it right now, alas. Apologies. 20:19
timotimo don't worry about it 20:21
pmurias timotimo: it's all node.js atm, but I could make it generate browser usable js easily if you need it
20:22 yoleaux joined, ChanServ sets mode: +v yoleaux
timotimo only if it turns out convenient for yo 20:23
dalek : 0f7dc2f | (Tobias Leich)++ | lib/Perl5/ (2 files):
added pack and unpack (plus directive "i")
20:27
: dba0879 | (Tobias Leich)++ | / (2 files):
added directive "c" to pack/unpack
20:28 konundra left
raiph r: my $tree = 1 => 2 => 3; say $tree.kv 20:31
yoleaux 27 Jun 2013 11:24Z <daxim> raiph: learn to write better copy - www.useit.com/articles/inverted-pyr...yberspace/ - in long texts, put the conclusions first
camelia rakudo 211854: OUTPUT«1 2 => 3␤»
raiph ww
FROGGS r: my $tree = 1 => 2 => 3; say $tree.perl 20:33
camelia rakudo 211854: OUTPUT«1 => 2 => 3␤»
20:33 snoopy joined
raiph .ask daxim is that about my weird "divided we fall"? 20:35
yoleaux raiph: I'll pass your message to daxim.
20:42 dmol joined
pmurias which backend is more convinient to fix nqp bugs on jvm or parrot? 20:43
(backend independent bugs)
FROGGS I'd say parrot because you can be a bit more sure that is itself has less bugs 20:44
s/is/it/
there is too much movement for the JVM backend atm 20:45
raiph looks like my "divided we fall" post has cost me the right to post to /r/perl :/
tadzik oh
raiph it was pretty terrible, but i'm disappointed the outcome was that bad 20:46
tadzik you've been banned by one of the mods?
raiph sidelined instead 20:48
www.reddit.com/r/perl/comments/1hai..._tool_and/
never appeared in the /r/perl list
20:48 domidumont left
mst raiph: you'll get more exposure via blogs.perl.org tbh 20:50
20:51 ajr_ left
sorear good * #perl6 20:51
20:52 kaare__ left
pmurias sorear: hi 20:52
dalek : df3b3c6 | (Tobias Leich)++ | t/test.pl:
added test subs `like` and `unlike`
20:55
: 011096e | (Tobias Leich)++ | / (2 files):
force array indexes to be numeric
raiph mst: thx.
mst: i'm open to criticism about that reddit 20:56
sorear timotimo: the time required for jast is not entirely unreasonable, jast walks the entire qast tree and constructs a million instruction objects
raiph mst: because i'd rather be able to still post in /r/perl
sorear timotimo: there are probably optimizations we can make, but I don't think there's some shallow thing killing performance
are the /r/perl mods perl community members? 20:57
raiph mst: (criticism of the benchmark post)
sorear: yeah
sorear: i'm pretty sure mr_c is the one who most dislikes me 20:58
timotimo i'm afk for a bit now
20:59 PZt left
timotimo sorear: if you have a minute to kill, my pull request for dir() should be easy to review (it may even be wrong, especially the handling of the ./ from the beginning may be conceptually wrong) 20:59
er, wait, do i even do that any more?
sorear raiph: ==chromatic?
raiph sorear: yeah. (fwiw i try not to say that string publicly) 21:00
sorear timotimo: I don't see a dir() pull requast 21:01
raiph does anyone know of a compiler benchmarking package like japhb's that p5 folk like to use? 21:02
sorear timotimo: oh, you just didn't put dir() in the title 21:03
I'd want jnthn to test this on windows before doing anything with it.
21:06 pmurias left
raiph is Benchmark-Perl-Formance the standard for benchmarking p5 versions? 21:06
21:09 PZt joined
labster good *, #perl6 21:09
timotimo++ for the dir() on the jvm, and for finding a bug for me to fix in path.child. 21:11
nwc10 I am not aware of any statistically sound and representative benchmarking tool for Perl 5 21:12
er, for benchmarking the perl 5 interpreter
dumbbench seems to be pretty good as a tool for benchmarking user code
21:13 __rnddim__ is now known as lue
raiph mwc10: thx. have you looked at formance or perl6-bench? 21:13
nwc10 "formance"? 21:14
21:14 PacoAir left
nwc10 not looked at perl6-bench 21:14
raiph nwc10: search.cpan.org/~schwigon/Benchmark...ance-0.33/
lue hello world o/ 21:15
raiph hey lue 21:16
nwc10 I have not looked at what *benchmarks* it uses. The graphs that are published are (if I remember correctly) are for a build of perl 5 using the default -O2 compiler flags for gcc, and I believe for a single run
labster I got a $dayjob offer yesterday from the place tadzik++ referred me to, so I just thought I'd also thank him and others who were indirectly responsible: diakopter++ raiph++ FROGGS++ TimToady++ pmichaud++ mst++ 21:17
nwc10 They are all noise.
Sadly.
labster \o lue
FROGGS labster++ # \o/ cool!
tadzik awesome!
labster++
sorear :(
raiph labster: :)
sorear but labster++ 21:18
labster sorear: get norman to look at the resumes faster :P, I haven't accepted yet
raiph nwc10: is the formance tool itself neutral (so the problem was how it was used)? 21:19
nwc10 yes, my frustration is how it is used for the published graphs
I've not looked at the benchmarks themselves 21:20
raiph nwc10: thx. i'm reading an exchange between u and author 21:23
21:25 PacoAir joined
nwc10 I've not had time to look at using www.cs.umass.edu/~emery/pubs/stabil...plos13.pdf (and no-one else seems to have either) 21:26
but I think that that's the way to go on the compile & run side of this
not -O2
but I have recently found that crazy things that make no sense to me measurably and repeatably affect performance 21:27
such as the link ordering of object files. Object files in which everything is L1 cache aligned
or that code paths doing more work end up running faster than the same binary not taking those code paths 21:28
21:29 pmurias joined, pmurias_ joined
labster r: say "foo//bar".path.cleanup # ugh what did I do now 21:31
camelia rakudo b7bbd6: OUTPUT«IO::Path<foobar>␤»
pmurias is a segfault expected when trying to build nqp with openjdk 1.7? 21:32
raiph nwc10++ # awareness of Stabilizer and being in #perl6 to share it
pmurias pastie.org/8095338 21:33
nwc10 pmurias: pair of stupid questions - (1) that's the JVM segfaulting? (2) is it the most recent version available? 21:34
pmurias it's the jvm, not make 21:35
lizmat TimToady: wrt irclog.perlgeek.de/perl6/2013-06-29#i_7268923 : I'm not sure what you call the compiler here 21:39
The classes providing the CompUnitRepo interface, store the meta-information of compunits 21:40
pmurias nwc10: I'll try with the latest jdk from oracle 21:41
lizmat whenever a compunit needs to loaded, it will give this from/longname/auth/ver to each of the CompUnitRepo objects in @*INC
They then use whatever they need to return which compunist match in their repo 21:42
nwc10 I seem to be building NQP fine (and tests passing) with: 21:43
java version "1.7.0_25"
OpenJDK Runtime Environment (rhel-2.3.10.3.el6_4-x86_64)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
lizmat the repo also returns the meta-info of the candidates, which the compiler can use to set up introspection if the candidate is selected for loading 21:44
so the compiler *will* know all of the meta-information of a compunit when needed 21:45
raiph lizmat: i'm guessing larry's confusion is the same as FROGGS (irclog.perlgeek.de/perl6/2013-06-29#i_7267798)
21:45 spider-mario left
lizmat but not before then (unless you call the "database" that a CompUnitRepo has, knowledge of the compiler) 21:45
labster r: my $str = "foo A bar"; $str ~~ s { 'A' } = 'B'; say $str; 21:46
camelia rakudo b7bbd6: OUTPUT«foo bar␤»
labster rakudobug
lizmat raiph: indeed :-(
so: to recap: 21:47
raiph lizmat++ # right combination of skills, branepower, diplomacy, patience, impatience
lizmat *blush*
1. whenever a -use- is done in code, the CompUnitRepo-like objects in @*INC each get a chance to say whether they know of any matching candidate compunits 21:48
2. the compiler makes a choice out of these candidates, if needed, or throws an exception if nothing found or can't make a decision 21:49
3. when a compunit is selected, its meta-information (already provided to the compiler when making a choice) is installed as introspection info after the compunit is loaded 21:50
4. Rakudo will provide 2 implementations of CompUnitRepo: CompUnitRepo::Local::File (basically, the current behaviour) and CompUnitRepo::Local::Installation, which has a simple database, basically consisting of dump of a hash representation of the meta-information of installed modules, easily allowing smart-match logic on them 21:53
labster .oO (CompUnitRepo::Remote::CPAN -- store your modules in the cloud) 21:54
FROGGS .oO( CompUnitRepo::Local::DevNull -- install your modules to ... ) 21:57
lizmat labster: I would see that as an on-demand installation feature
FROGGS: I would see that as a way to make files appear to be *not* installed 21:58
FROGGS :o)
sorear ::CPAN could be cool 21:59
lizmat FWIW, I think each CompUnitRepo should be able to say that no further searching is needed
21:59 Rotwang left
FROGGS hmmm, not sure if I could agree 21:59
22:00 ecocode left
lizmat if you don't allow that, you will get modules that start fiddling with @*INC to get the same behaviour 22:00
FROGGS yeah, maybe you are right 22:01
if a repo says "hey, I've got a dev module here that should get picked no matter what" than this is the right playce to say so 22:02
lizmat indeed
FROGGS -y
k
lizmat BTW, some commit today broke spectest quite seriously 22:03
FROGGS O.o
lizmat all tests failing in t/spec/S05-metasyntax/delimiters.t
FROGGS sounds like an nqp patch
lizmat 6 tests in t/spec/S05-modifier/counted 22:04
10 tests in t/spec/S05-modifier/ii.t
24 tests in t/spec/S05-modifier/perl5_0.t 22:05
raiph lizmat: your design wouldn't preclude making all of CPAN plus local stuff appear to be installed, right?
lizmat and a lot of io-spec and io-path tests
FROGGS this could explain labster++ 's bug: github.com/rakudo/rakudo/commit/41...d003649594
raiph (or some arbitrary subset of CPAN)
lizmat raiph: indeed, that's the idea 22:06
even to the point that it may not install local copies, e.g. in small systems like a Raspberry Pi or so
only download them from a CPAN or Pinto like online repo 22:07
raiph v cool
FROGGS is that "cool" in sink context?
raiph heh
lizmat ice floats
22:10 FROGGS[mobile] left
sorear pinto-like? "it tends to catch fire in rear-end collisions?" 22:12
FROGGS so-rear-end?
damn, I need to sleep
lizmat search.cpan.org/~thaljef/Pinto/ 22:13
sorear FROGGS: en.wikipedia.org/wiki/Ford_Pinto#F...ank_defect 22:14
FROGGS ohh wow 22:15
gnight all 22:17
lizmat gnight FROGGS!
22:21 btyler left 22:23 census joined
[Coke] 22:25
timotimo i really do need to chop off "./" from the beginning, but i think i can check for the $dir to be "." or "./" and only then chop off ./ 22:27
(may be premature optimisation)
dalek ecs: fc623e9 | (Elizabeth Mattijsen)++ | S99-glossary.pod:
Added BS
22:29
sorear o/ [Coke]
lizmat sorear: on my first trip to the US in 1980, I was driven around by someone in a Pinto 22:30
timotimo hey [Coke] :)
lizmat an old model: I still remember having to switch of the contact about 100m before arriving: otherwise the engine would still be dieseling too much 22:31
timotimo [Coke]: jnthn added the Spec modules to the makefile today, so a bunch more tests should pass now :) 22:34
sorear is too young
sorear had to look up dieseling 22:35
timotimo (and i moved a few one-letter methods of FileTests from the #?if parrot piece out into the #? anything part
) 22:37
maybe i'll try to implement the other thingies in the #?if parrot block? maybe it's even easy :3 22:38
22:39 woolfy1 left
lizmat is at a loss explaining the 167 tests that are now failing spectest of the parakudo 22:39
most likely someone else will have found the reason tomorrow, or inspiration will have come to me 22:40
so on that thought, gnight #perl6!
dalek rl6-roast-data: 8c20bb3 | coke++ | / (5 files):
today (automated commit)
22:42
22:43 woolfy joined
timotimo oh, cool, my file-tests changes made it in already! 22:45
we are the 88%! 22:46
22:46 lue left
sorear cool, we made it from 84 to 88... apparently only by reducing the parrakudo pass rate 22:50
masak all is fair in love and smoking statistics. 22:51
masak makes the sky flash with lightning, and laughs maniacally
22:55 dmol left
timotimo r: my $d = "/"; say try { eval("my \$x = 'abc'; \$x ~~ m{$d}b{$d}") }; 22:55
camelia rakudo b7bbd6: OUTPUT«「b」␤␤»
timotimo those tests ought to not fail there 22:56
r: my $d = "/"; my $nok = try { eval("my \$x = 'abc'; \$x ~~ m{$d}d{$d}") };
camelia rakudo b7bbd6: ( no output )
timotimo r: my $d = "/"; my $nok = try { eval("my \$x = 'abc'; \$x ~~ m{$d}d{$d}") }; say $nok;
camelia rakudo b7bbd6: OUTPUT«False␤»
timotimo r: my $d = "/"; my $is = try { eval("my \$x = 'abc'; \$x ~~ s{$d}a{$d}b{$d}; \$x") } eq 'bbc'; say $is; 22:57
camelia rakudo b7bbd6: OUTPUT«False␤»
timotimo oh, interesting
r: my $d = "/"; say "my \$x = 'abc'; \$x ~~ s{$d}a{$d}b{$d}; \$x"
camelia rakudo b7bbd6: OUTPUT«my $x = 'abc'; $x ~~ s/a/b/; $x␤»
timotimo r: my $x = 'abc'; $x ~~ s/a/b/; say $x
camelia rakudo b7bbd6: OUTPUT«bc␤»
timotimo yeah, that's pretty wrong 22:58
22:58 lue joined
timotimo afk's 22:58
jnthn 88% is nice, losing 126 passes in parrakudo less so... 23:00
23:03 pmurias_ left, pmurias left 23:04 census left
colomon woah, what? 23:08
jnthn Not sure; will have to take a look tomorrow
23:12 BenGoldberg joined 23:20 PacoAir left
colomon is spectesting now, but has a guest over, with more possible to come, so time may be super limited.... 23:20
masak 'night, #perl6 23:23
[Coke] read_file 'TESTCOOKIE' - sysopen: No such file or directory at eval-client.pl line 19. 23:27
[Coke] finds the magic invocation to make that work. 23:32
23:41 noxgirl is now known as autumn
jnthn sleep & 23:42
23:46 dmol joined 23:47 btyler joined