»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
japhb_ finally gets a working self-hosted build of nqp-on-jvm ... and fib.nqp reports it's over 3.4x faster o/ 00:35
Even with startup time included, it's still 1.9x faster 00:36
colomon japhb_: faster than what? 01:04
Eddward Is there any way that reads of or jumps based on uninitialized values wouldn't be bad in perl6? 01:24
swarley I'm excited, the university near my house apparently has one of the 8 existing quantum computers in the united states now 01:25
Eddward Looking at 116933, I get interesting results (I think) in valgrind with valgrind ./perl6 -e '(0 but Bool::True) and print qq{$_ } for 1..100;'
japhb_ colomon, faster than nqp-on-parrot 01:26
grr perlcabal.org/syn/S17.html says "Coroutines are covered in S07" but S07 is for "Lists and Iteration" and does not mention them in any way that I could recognise. 02:31
diakopter grr: gather/take utilizes coroutines 02:33
lue (to be fair, the word "coroutine" only occurs in S17 (twice), and never anywhere else in the specs) 03:08
moritz \o 07:46
diakopter hi
moritz: the p6eval nqp-jvm dir and rebuild script are ready; I just need to add the p6eval target.. 07:47
but you can start setting up the rsync anytime you like
moritz diakopter: or you can 07:48
diakopter true... :)
drKreso Hi 07:48
diakopter hi 07:49
moritz diakopter: build.pl runs the build-scripts/rebuild-$target.{sh,pl} script first, then sync.pl $target
hello drKreso
drKreso moritz: Hii, I get Cannot locate native library 'libmysqlclient.bundle' while panda installing MiniDBI on OSX
moritz drKreso: do you have libmysqlclient installed? 07:50
drKreso: if yes, that's a bug in NativeCall, not MiniDBI
drKreso I did install mysql libs for ruby?
moritz (and I maintain DBIish, not MiniDBI)
drKreso Yes definitely NativeCall - been compiling it since yesterday (big hurdle for me was that it doesn't detect darwin) 07:51
moritz: So DBIish is in better shape? I thought you ported both (on github) 07:52
DBIish installs fine - when invoking I get same message Cannot locate native library 'libmysqlclient.bundle' 07:54
drKreso NativeCall message: Cannot locate native library 'libmysqlclient.bundle' When trying to talk to MySQL 08:19
FROGGS_ morning 08:22
drKreso morning 08:22
sorear o/ FROGGS
FROGGS hi sorear, hi drKreso 08:23
drKreso FROGGS: I have many problems :) Good that you showed up
dalek pan style="color: #395be5">perl6-examples: bbdecbd | (L. Grondin)++ | rosalind/pmch-grondilu.pl:
[rosaling] PMCH
08:24
FROGGS ohh well
:o)
drKreso FROGGS: I've been messing with NativeCall since yesterday. It turned out that it was misconfigured fro 64bit darwin… now I finally managed to set it straight, and on the next step I get Cannot locate native library 'libmysqlclient.bundle' (DBIish call to mysql). Do you have any ideas? 08:26
grondilu rosalind's PMCH this one was a nasty trap :/
FROGGS phenny: ask jnthn if it might be helpful to have a libp6cre.so/dll that does NFA? would this be useful for the JVM port or for rakudo@parrot? Btw, I have no idea (yet) what libpcre does, but I'll investigate...
phenny FROGGS: I'll pass that on when jnthn is around.
FROGGS drKreso: do you know where that library is on your disk? 08:27
is it called .bundle? there can be a .dylib too, so maybe nativecall is searching for the wrong file
drKreso FROGGS: /usr/local/mysql/lib 08:28
FROGGS so I guess it is either the library search path or wrong file extension 08:29
drKreso it's .dylib
FROGGS see
drKreso I tried DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH" but no progress
FROGGS drKreso: perl 5 asks gcc for the possible file extension on the current system, and gcc usually reports only one 08:30
drKreso FROGGS - how can I test ?
FROGGS i guess nativecall does the same trick, se there should be a hack in nativecall that tweaks these file-exts a bit 08:31
drKreso oh - ok
FROGGS lets have a look at its source
drKreso I have a feeling NativeCall is not OSX guy, and that is source of my suffering :) 08:32
jnthn that is
FROGGS see this for example: github.com/jnthn/zavolaj/blob/mast...l.pm6#L117
OSX is a always a corner case when it comes to port things to it, they say it is just a BSD but that a lie 08:33
(thinking of fat libs for example) 08:34
drKreso Ok so *VM is ENV variable right? Where is <config> and <load_ext> set? 08:35
FROGGS drKreso: btw, you should be able to specify the full name to the "is native" trait
drKreso ?
FROGGS no, *VM is the virtual machine rakudo is running on, currently parrot
can you gist the code that is failing? 08:36
drKreso gist.github.com/drKreso/5070183 08:37
FROGGS ahh, so you/we have to patch DBIish 08:39
drKreso FROGGS: ? 08:40
FROGGS hold on
see github.com/perl6/DBIish/blob/maste...ql.pm6#L12 08:41
this line tells NativeCall to load libmysqlclient
NativeCall will append the file extension then, using the one given by parrot (which is the same gcc tells you) 08:42
drKreso: can you try that? perl6 -MNativeCall -e ' sub a is native("libmysqlclient") { * }; a() ' 08:44
this should give you the same error message
drKreso Wow, what? I mean it does, but I have no idea on what are you doing there? 08:45
FROGGS this line loads NativeCall, and tells it to load the mysqlclient library 08:47
FROGGS and now try: perl6 -MNativeCall -e ' sub a is native("libmysqlclient.dylib") { * }; a() ' 08:47
drKreso what is tho is native? a = load lib? 08:49
Cannot locate symbol 'a' in native library 'libmysqlclient.dylib'
but lib is found 08:50
FROGGS "is native" after the subroutine name is called a trait 08:51
this trait for example applies some behaviour to the sub 08:52
like doing extra things when the sub is getting called
so, we found the lib, but there is no symbol a in it, but thats ok, just was a test
FROGGS I dont expected it to have that symbol :o) 08:53
so, I'd say we try to fix NativeCall to check for .dylibs too, okay?
drKreso FROGGS: Got it, and how would I proceed on checking .dylibs? 08:55
Oh , after first call, try second and than fail
FROGGS at this point the libmysqlclient.bundle is expected: github.com/jnthn/zavolaj/blob/mast...l.pm6#L119 08:56
I'll have a look at that nqp:: sub
drKreso: I'm not sure, this might be a good place to do that: github.com/perl6/nqp/blob/master/s...#L851-L858 09:00
but I'll have to ask jnthn, because this is out of control for NativeCall then... 09:01
phenny: ask jnthn if he can scroll back to 10 a.m. please? :o) 09:02
phenny FROGGS: I'll pass that on when jnthn is around.
drKreso FROGGS: It looks like a good place
FROSSS: I'll play with it for a bit :) 09:03
drKreso FROGGS: One more question, now when I change code, what is fastest way to rebuild. I have a feeling mine is suboptimal 09:06
At least for nqp
FROGGS how many cores do you have?
(cpu cores) 09:07
drKreso 4
FROGGS good
so, after changing that C file within the nqp folder do: make -j4 && make install 09:08
then in the rakudo dir: make realclean && make -j4 && make install
takes about 3 to 4 minutes on my laptop
drKreso FROGGS: Brilliant. BTW I think you guys are completely MAD (In a good way). 09:12
FROGGS *g*
thanks
drKreso FROGGS: I get this in rakudo folder : make: *** No targets specified and no makefile found. Stop. 09:14
FROGGS that is weird 09:15
drKreso Configure again?
FROGGS well, then you have to say that it should use the given nqp, and not clone it again
drKreso i runned configure and it was done instantly - no cloning 09:16
FROGGS ohh 09:17
drKreso CPU is sweating :) All 4 cores :)
FROGGS that is my command after make realclean: perl Configure.pl --with-parrot ~/dev/rakudo/nqp/parrot/parrot --with-nqp=~/dev/nqp/nqp && make -j4 && make install
(I have a batch file for rebuilding)
all 4 cores, -j4 does that 09:18
drKreso I think I will just steal it :0
FROGGS that's how software development works 09:22
drKreso FROGGS :) I guess. One question - I do need to delete site, and reinstall panda, and modules? 09:25
FROGGS there is a rebootstrap script, you need to run that 09:26
ask tadzik for help if this doesnt work :o)
it's in pandas directory somewhere 09:27
FROGGS drKreso: I'm afk for a while, enjoying the sun with kids 09:31
see ya
drKreso FROGGS: By, thanks 09:32
drKreso I am in nqp_dyncall.ops (As far as I can tell this is C). I get char *lib_name = Parrot_str_to_cstring(interp, $2); and in that lib_name I would like to replace ".bundle" with ".dylib". But since I am rusty in C, and I can't find any documentation on Parrot_str_replace I don't know how to make it happen. 10:00
FROGGS jnthn: t/spec/S32-str/substr.rakudo (Wstat: 256 Tests: 91 Failed: 0) 10:00
Non-zero exit status: 1
Parse errors: Bad plan. You planned 92 tests but ran 91.
drKreso My try at replacing ".budnle" with ".dylib" gist.github.com/anonymous/5070416#L16-L23 it segfaults, and I need 10 minutes to rebuild. Can anybody see what I am doing wrong (problem is I don't remember C anymore, and don't know anything about parrot library) 10:26
jnthn drKreso: You probably need to Parrot_str_new that ".dylib" 10:43
phenny jnthn: 08:26Z <FROGGS> ask jnthn if it might be helpful to have a libp6cre.so/dll that does NFA? would this be useful for the JVM port or for rakudo@parrot? Btw, I have no idea (yet) what libpcre does, but I'll investigate...
jnthn: 09:02Z <FROGGS> ask jnthn if he can scroll back to 10 a.m. please? :o)
nwc10 jnthn: all tests sucessful (apart from the ICU one) 10:44
jnthn nwc10: And that test passes for you with selftest, I guess? :)
nwc10 yes. 10:44
jnthn drKreso: On line 18, the argument to Parrot_str_replace
FROGGS: I think the substr thing just means you need to pull 10:45
(Rakudo)
The test covers a bug I fixed a day or so ago.
drKreso jnthn: STRING * lib_name_alternative = Parrot_str_replace(interp, $2, pos, 6, Parrot_str_new(interp, ".dylib", 0)));
jnthn Wait, what's the 6 argument? 10:47
drKreso jnthn: I have no idea :)
What needs fro be there? Number of chars in repl string? 10:48
jnthn ah, it's the number of characters you want to replace
drKreso So is it zero based? 5 or 6?
jnthn r: say '.bundle'.chars 10:49
p6eval rakudo 40069f: OUTPUT«7␤»
jnthn That number
No, it's not an offset, it's a number of chars.
drKreso So it means start at pos, remove x(7) and put string 10:50
jnthn yeah
drKreso makes sense now that you say it
jnthn FROGGS: On the NFA thing, the NFA evaluator is actually not all that much code, but also its purpose is to calculate a ranking of longest tokens, so it's quite specialized at that. 10:51
jnthn bbi15 10:52
drKreso jnthn: gist.github.com/drKreso/5070534 Now I get Illegal instruction: 4 11:06
moritz PSA: the server on which the IRC logs are hosted id going down for reboot (and extra backup space) today 11:10
nwc10 so there will be a gap in the logging?
moritz yes
nwc10 and we can all say nasty things about Perl 4 without fear of repercussion? 11:11
sorear um 11:12
I can't remember if preflex has log functionality
diakopter moritz: maybe you could reserve a few hundred gaps in your autoincrement key for each channel so you can go in and fixup the gap in logs </tongue-in-cheeck> 11:13
*cheek
moritz there's lots of stuff I could do, but in the end it's not worth the effort IMHO 11:16
it's not a credit card processing audit log; it's just some more-or-less random conversation that's being logged
diakopter right, I was kidding, hence the </tongue-in-cheek> 11:17
moritz I know, but I also know that others aren't kidding bout this topic
huf just patch in something from frogs
worked for jurassic park
nwc10 is one of the most useful out-sourceable tasks currently to figure out how to chip away at the PIR and pir:: bits of Rakudo? 11:18
moritz yes 11:19
huf: maybe FROGGS would mind :-)
huf :) 11:20
jnthn drKreso: Oh, I missed something... :( 11:38
*lib_name_2 = Parrot_str_to_cstring(interp, lib_name_alternative);
That * should not be there
Also I'd put in a check after it tries to locate the thing with the second name. 11:39
To check it isn't coming back with null there.
diakopter I'm in your pointers dereferencing all the things 11:39
drKreso jnthn so if there is no "bundle" pos == NULL ? 11:40
gist.github.com/drKreso/5070628 11:41
jnthn drKreso: pos is an integer, so just check pos < 0 11:42
er, if pos < 0 it wasn't found, that is
drKreso thanks
drKreso jnthn: great success :) DBD::mysql connection failed: Unknown database 'zavolaj' - DBIish is working 11:55
jnthn \o/ 11:55
moritz now create that database :-) 11:56
or connect to a different one
moritz r: say (1, 2, 3).Array.[0] = 42 12:04
p6eval rakudo 40069f: OUTPUT«42␤»
FROGGS jnthn: I thought I pulled before that, sorry for the accusation :o) 12:06
jnthn FROGGS: np :) 12:08
moritz gist.github.com/moritz/5070740 # my first summary of the container/assignment/binding stuff we discussed three days ago 12:15
feedback welcome 12:16
I left out the detour about closures, because it doesn't add much to this topic 12:17
moritz nr: my @a = 1, 2, 3; @a[0] := my $x; $x = 23; say @a 12:25
p6eval rakudo 40069f, niecza v24-24-gbdc3343: OUTPUT«23 2 3␤»
FROGGS moritz: will read it after lunch 12:26
Ulti moritz it reads well 12:34
diakopter moritz++ 12:47
dalek kudo/nom: ec1c81a | jnthn++ | src/ (2 files):
Toss dead code.
colomon rn: grammar A { token this-is-a-test { "hello" }; }; 12:49
p6eval rakudo 40069f, niecza v24-24-gbdc3343: ( no output )
colomon rn: grammar A { token this-is-a-test { "hello" }; }; say A.parse("hello", A) 12:52
p6eval rakudo 40069f: OUTPUT«Too many positional parameters passed; got 3 but expected 2␤ in method parse at src/gen/CORE.setting:10788␤ in block at /tmp/6Xb_Q6rzon:1␤␤»
..niecza v24-24-gbdc3343: OUTPUT«Unhandled exception: Excess arguments to Grammar.parse, used 2 of 3 positionals␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (Grammar.parse @ 1) ␤ at /tmp/feIbmftmoS line 1 (mainline @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4233 (ANON @ 3)…
colomon rn: grammar A { token this-is-a-test { "hello" }; }; say A.parse("hello", :rule<A>)
p6eval niecza v24-24-gbdc3343: OUTPUT«Unhandled exception: Unable to resolve method A in type A␤ at /home/p6eval/niecza/lib/CORE.setting line 2924 (Grammar.parse @ 5) ␤ at /tmp/WHrpX46a7Y line 1 (mainline @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4233 (ANON @ 3) ␤ at /home/p6eval…
..rakudo 40069f: OUTPUT«No such method 'A' for invocant of type 'A'␤ in method parse at src/gen/CORE.setting:10791␤ in block at /tmp/0YBPgVBwub:1␤␤»
colomon rn: grammar A { token this-is-a-test { "hello" }; }; say A.parse("hello", :rule<this-is-a-test>)
p6eval rakudo 40069f, niecza v24-24-gbdc3343: OUTPUT«「hello」␤␤»
colomon wonders how long he has been unnecessarily using underscores instead of dashes in grammars 12:53
FROGGS t/spec/S05-metasyntax/charset.rakudo (Wstat: 0 Tests: 36 Failed: 0) 12:56
TODO passed: 10
Files=724, Tests=26827, 625 wallclock secs ( 8.91 usr 1.41 sys + 2089.19 cusr 135.13 csys = 2234.64 CPU)
Result: PASS
\o/
my patch is working, finally
jnthn FROGGS: yay...is that the cclass one? 13:03
pmurias jnthn: bootint in qast_6model.t taking a :named('type') is an error? 13:08
s/error/mistake/
jnthn pmurias: It just means it's being passed as a named parameter type to the surrounding call, iirc 13:10
FROGGS jnthn: it is 13:25
dalek p-jvm-prep: ccb441b | jnthn++ | src/org/perl6/nqp/runtime/ (2 files):
Further gutting of invokeInternal.
13:27
p-jvm-prep: f000cc7 | jnthn++ | / (4 files):
Move unwind logic out of invokeInternal.
diakopter I wish gist.github had a "turn on word wrap" option 13:33
diakopter that, if edited by the gist owner would set the default for anyone else to view it, but then others can toggle it too if they want for themselves. </wish> 13:34
timotimo builds nqp-jvm-prep to have a look-see what's new 13:38
jnthn diakopter: If it's just text, then set the filename to be foo.md or so 13:39
diakopter: And it will treat it as markdown and wrap paragraphs etc.
timotimo is there a make target to create a full nqp as a jvm thingie yet?
timotimo oh, it seems like it's already doing that 13:40
timotimo oh, so many files 13:41
hm, can't make selftest: Error: Could not find or load main class NQPJVM - what make target gives that? seems like that's missing from the dependencies of the selftest target 13:45
jnthn timotimo: In the Makefile try editing selftest and turning the : in there into ;
in the -cp argument
timotimo i'll try
ah, that works 13:46
it's the portability thing i read about recently?
timotimo well, the tests all do succeed. pretty cool :) 13:51
drKreso Hi, is there a postgres DBIish adapter? 13:59
ggoebel_ perlgeek.de appears to be down... perl6 irc logs down with it
jnthn ggoebel_: Planned maint. 14:03
ggoebel_ thx 14:04
drKreso Oh there is, 'Pg' … sorry 14:10
drKreso moritz: I got MySQL working with DBIish… Now when I try Pg, i Get No such method 'execute' for invocant of type 'Nil' on line lib/DBDish/Pg.pm6:379 (gist.github.com/drKreso/5071340) 14:50
FROGGS execute is called on the return value of prepare, right? 15:00
drKreso: what if prepare failed?
drKreso Yes it says prepared failed when i set raise error 15:01
But why?
in method prepare at lib/DBDish/Pg.pm6:357 shell returned 1
FROGGS because your sql statement is wrong somehow? 15:05
drKreso Nope i double checked, when it's wrong the error is different. even "select 1" fails the same way 15:06
FROGGS like not enough bind variables or so
hmm
drKreso For example: ERROR: syntax error at or near "form" LINE 1: SELECT * form korisnici 15:07
FROGGS ya
no idea
nwc10 jnthn: the usual. 15:25
dalek p-jvm-prep: da4616f | jnthn++ | / (3 files):
Prepare for handling callsite as arg, not field.
15:27
p-jvm-prep: 0408144 | jnthn++ | src/org/perl6/nqp/jast2bc/JASTToJVMBytecode.java:
Better handling of arg names in assembler.
p-jvm-prep: 2159682 | jnthn++ | / (5 files):
Eliminate callsite field in CallFrame.
jnthn nwc10: hah, timing win :) 15:29
nwc10 bother. yes. *that* usual also :-) 15:30
nwc10 jnthn: yes, that one *also* passes everything (except that one ICU test, when using parrot) 15:44
cue dalek...
jnthn goes for a walk before it gets dark :)
bbiab
nwc10 jnthn: currently NQPJVM is about a factor of 10 faster than nqp at running that levenstein test code. Not to be sniffed at. 17:09
japhb Is the irclog down? 17:12
jnthn japhb: Yes, for planned maint.
nwc10 og yes 17:13
Perl 4 - you're just Perl 3 with lipstick :-)
japhb jnthn, ah, thank you
japhb backlogs the old fashioned way -- with the scrollbar. 17:14
FROGGS arrr! hunting a bug within my nqp-patch wich is a typo in a test file >.< 17:23
3 hours
FROGGS cries
uvtc Hm. Unable to reach irc logs. 17:24
FROGGS uvtc: moritz does some maintenance
geekosaur [02 12:12] <japhb> Is the irclog down?
[02 12:12] <jnthn> japhb: Yes, for planned maint.
uvtc Sorry. I'm probably the nth person to log on and bring it up. :) 17:26
jnthn We should just refer people to the l...oh, wait...
FROGGS: argh!
FROGGS my own typo of course 17:26
commented out a test: is... 17:27
commented it in, deleted the i by accident, the other tests are "ok" tests
dalek kudo/nom: 0087ce6 | jnthn++ | src/Perl6/Ops.pm:
Remove redundant op mappings.
kudo/nom: 7de7725 | jnthn++ | src/ops/perl6.ops:
Toss two dead ops.
FROGGS so typed o instead
took a while to see that there is "os" 17:28
jnthn r: os
p6eval rakudo ec1c81: OUTPUT«===SORRY!===␤Undeclared routine:␤ os used at line 1␤␤»
jnthn Did it not tell you what?
*that
FROGGS no 17:29
t/spec/S05-modifier/perl5_5.rakudo (Wstat: 256 Tests: 0 Failed: 0)
Non-zero exit status: 1
Parse errors: No plan found in TAP output
japhb (from backlog) nwc10: I think jnthn is beginning to use your success reports as a reminder to push the next batch. :-)
FROGGS then I was running the test line itself and got the msg 17:30
japhb At least with all the people asking why the irclog is down, moritz can feel good that it is in heavy use. :-)
grondilu how can I have NativeCall look for a library in the current directory? 17:51
jnthn It just passes whatever you write on to dlsym, adding an extension. So is native('./libmonkey') or so may work
er, not dlsym. dlload 17:52
grondilu worked! this module is amazing 17:54
dalek p-jvm-prep: d0c8319 | jnthn++ | / (3 files):
Start passing along CodeRef.

This is in preparation for moving CallFrame creation out of invoke.
17:55
p-jvm-prep: 1359b26 | jnthn++ | / (3 files):
Move CallFrame creation inside invokee.

This gets invokeInternal down to doing nothing once it settles on a method handle to invoke; everything else is inside the method.
pan style="color: #395be5">perl6-examples: 04215ab | (L. Grondin)++ | rosalind/lcs. (4 files):
adding C module for longuest common subsequence
grondilu jnthn: I get a "Malformed UTF-8 string" with this code: paste.siduction.org/20130302180856 18:10
yet the code works with shorter strings
the C code is from rosettacode: rosettacode.org/wiki/Longest_common_subsequence
FROGGS can you gist the code of that library?
grondilu no ned for a gist, it's really the exact same as in RC: rosettacode.org/wiki/Longest_common...sequence#C 18:11
compiled with: $ gcc -o lcs.o -fPIC -c lcs.c; gcc -shared -s -o lcs.so lcs.o 18:14
jnthn grondilu: Odd. Does it happen when handling the return value? That is, does it make it into the C code? 18:18
TimToady does NativeCall have any access to the bitsizes of the actual C types of the calls its making, like off_t, size_t, or time_t? or is it just guessing?
FROGGS TimToady: you have to specify it in perl 18:19
grondilu jnthn: I guess compilation is fine since it ran well with shorter strings.
TimToady which means it will be wrong on a different machine...
FROGGS grondilu: there is a char bufr[40] 18:20
TimToady would be nice to have at least the level of portability provided by C itself...
jnthn int means "machine's native integer", so that one is already covered
FROGGS grondilu: maybe that not enough?
jnthn Yes, having a size_t available would be good too. 18:21
TimToady well, but if we don't know what type off_t maps to, we're kinda hosed
uvtc Oooh. Would be nice if the repl could remember what I typed in previous sessions, so I could up-arrow to reach longer passages without needing to re-type them.
colomon has started using the github app to track what jnthn++ is doing on nqp-jvm when colomon is away from IRC
TimToady seems that info has to be out there somewhere
or debuggers wouldn't work
grondilu FROGGS: of course that's not enough. What's the point of using a C library if it's not for tough jobs 18:22
?
TimToady the basic problem is that using a C library is only half the solution; using /usr/include is the other half 18:23
grondilu really wonders where this 40 comes from.
geekosaur you can get it from the symbol table, but only to a point: you get the size, but not e.g. signed-ness unless it has debug symbold 18:24
nwc10 jnthn: A: "works" on "my" machine
B: Time for that levenstein code was: time = 195.74100017547607
geekosaur and then you have to know how to parse the various kinds of debug symbols out there...
nwc10 is now: time = 181.15300011634827
TimToady well, we can get signedness from the Perl end, if we can get the size from the C end 18:25
nwc10 rn: say 181.15300011634827/ 195.74100017547607
p6eval rakudo 7de772: OUTPUT«0.925472946158188190␤»
..niecza v24-24-gbdc3343: OUTPUT«0.9254729461581882␤»
nwc10 7.5% win!
TimToady now do that 100 more times :)
n: say 0.9254729461581882 ** 100 18:26
p6eval niecza v24-24-gbdc3343: OUTPUT«0.00043288524025064125␤»
TimToady yah, that's about right :)
grondilu FROGGS: oops sorry I hadn't realize the 40 was in lcs.c! silly of me. 18:27
uvtc Is there a built-in Perl 6 pretty-printer? Something to show larger data structures with things lined up a bit?
grondilu (I thought it was in NativeCall. I feel stupid now)
FROGGS uvtc: "say" that structure? 18:28
uvtc: this calls .gist on it which should do the job (that is the one you can improve on you own classes) 18:29
uvtc FROGGS: Yes, that's that I'm currently doing. Works pretty well, though for nested data structures it would be nice to see things lined up vertically.
FROGGS: Thanks. 18:30
FROGGS uvts: than we should patch its .gist method
TimToady uvtc: I think gist should do a better job of prettying up long things 18:32
FROGGS he has left
I wanted to ask him to provide a sample structure and the output he would like to have
since tweaking .gist should be fun 18:34
dalek pan style="color: #395be5">perl6-examples: 52eed22 | (L. Grondin)++ | rosalind/lcsq-grondilu.pl:
LCSQ with NativeCall
18:35
dalek pan style="color: #395be5">perl6-examples: c3a73c8 | (L. Grondin)++ | rosalind/lcs (6 files):
renaming C functions
18:38
dalek p: 8fba6d4 | (Tobias Leich)++ | / (5 files):
use node name instead of subtube to identify cclass codes

This allows us to set zerowidth on character classes. This patch build the AST of cclass substractions in a way that make <[\w]-[\d]> work.
18:50
dalek kudo/nom: 82de32e | (Tobias Leich)++ | tools/build/NQP_REVISION:
bump nqp rev for cclass subtractions
18:53
jnthn - %cclass_code<nl> := '.CCLASS_NEWLINE'; 18:54
Was that bit needed?
It seems before n vs. nl was literal vs magical newline handling. 18:55
FROGGS but \n was always translated to nl
nqp: say("\r\n" ~~ /\n/) 18:56
p6eval nqp: OUTPUT«
FROGGS r: say("\r\n" ~~ /\n/)
p6eval rakudo 7de772: OUTPUT«「
jnthn Also, it looks like the codegen isn't actually looking for zerowidth? 18:57
FROGGS jnthn: how can you say that you want literal or magical handling? 18:58
jnthn FROGGS: Hm, maybe there's not a way...I just suspect Pm had a reason for the distinction.
jnthn away for dinner 19:03
FROGGS <jnthn> Also, it looks like the codegen isn't actually looking for zerowidth? <-- what do you mean? 19:05
FROGGS jnthn: about \n, I'd say I open an issue with my commit attached, and ask pmichaud for guidance 19:09
dalek pan style="color: #395be5">perl6-examples: 8eea355 | (L. Grondin)++ | rosalind/lcsq. (2 files):
removing binaries
19:10
colomon "given" a match, is there a handy way to "when" on a subrule? 19:28
so given something like token mode { <major> | <mixolydian> }, I'd like to say given $/<mode> { when .<major> { do something major } when .<mixolydian> { do something mixolydian } } . That syntax seems to compile but not actually work. 19:29
jnthn Remember that when does smartmatching. 19:30
colomon jnthn: yes, I remember. 19:31
jnthn So you're doing $_ ~~ $_<major>
TimToady try :major
no wait, that's a method call
jnthn that...yeah.
colomon pity, it looked so elegant
TimToady so, why not just use an 'if' instead? 19:32
colomon TimToady: there are actually nine different modes. above is vastly simplified
TimToady when so .<major> 19:33
jnthn ooh, that one should work...
TimToady though a Match is supposed to be like a Bool, by recent spec
colomon \o/
TimToady so when .<major> should work
colomon TimToady++
TimToady so 'when .<major>' should work 19:34
(just to be clear) 19:35
colomon understood the first time
is there something wrong with this syntax? <accidental=["#" | "b"]>? 19:39
it's parsing, but it doesn't seem to be working the way I expected it to.
jnthn soulda expected $<accidental>=["#" | "b"] 19:40
*woulda
<[...]> is a char class
nwc10 nqp-jvm doesn't work with nqp HEAD (8fba6d4d60b0795ec926a9384cb31cd8c75b917e) 19:53
nqp nqp-jvm-cc.nqp --no-regex-lib --target=classfile --output=NQPHLLJVM.class nqp-src/NQPHLL.pm 19:54
Method 'panic' not found for invocant of class 'QAST::CompilerJAST'
nwc10 snips 2 screenfuls of Java backtrace
it must get paid by the line. Enterprise!
jnthn oh 19:55
yeah, 'cus FROGGS just changed QAST...
nwc10 yes, I see the string "panic" in his commit 19:56
FROGGS what did I do? ó.ò 20:09
ahh 20:10
is it a big problem?
nr: say "\r" ~~ /\n+/ 20:11
p6eval rakudo 82de32, niecza v24-24-gbdc3343: OUTPUT«「
FROGGS weird :o)
TimToady thundergnat: I took the liberty of Unicodifying your bells :) 20:13
thundergnat :)
Feel free
jnthn FROGGS: No, just means that the cross-comp needs syncing with the changes 20:14
diakopter you're a cross-comp 20:16
FROGGS nr: say "abc123def" ~~ /<[w]-[\d]>/ 20:19
p6eval rakudo 82de32, niecza v24-24-gbdc3343: OUTPUT«#<failed match>␤»
FROGGS nr: say "abc123def" ~~ /<[\w]-[\d]>/ # -.-
p6eval rakudo 82de32, niecza v24-24-gbdc3343: OUTPUT«「a」␤␤»
FROGGS nr: say "abc123def" ~~ /<[\w]-[\d]>+/
p6eval rakudo 82de32, niecza v24-24-gbdc3343: OUTPUT«「abc」␤␤»
FROGGS nr: say "abc123def" ~~ /<[\w]-[a\d]>+/
p6eval niecza v24-24-gbdc3343: OUTPUT«「bc」␤␤» 20:20
..rakudo 82de32: OUTPUT«「abc123def」␤␤»
FROGGS ?
nqp: say("abc123def" ~~ /<[\w]-[a\d]>+/)
p6eval nqp: OUTPUT«abc123def␤»
FROGGS it was working, I'm going nuts 20:24
dalek p: 4b23ff4 | (Tobias Leich)++ | src/QRegex/P6Regex/Actions.nqp:
fix for the previous patch

Now character class subtraction do work.
20:30
diakopter as soon as I get the nqp-jvm p6eval target up, I predict there will be around a googol**googol microbenchmark comparisons with nqp-parrot
(I'm not complaining, btw) 20:31
pmurias jnthn: how does box_s, work on an object with a KnowHOW repr? 20:37
jnthn pmurias: It doesn't 20:38
dalek kudo/nom: 7a41b98 | (Tobias Leich)++ | tools/build/NQP_REVISION:
bump nqp revision
20:41
pmurias jnthn: so how does the Boolification test in qast_6model.t work? 20:42
dalek ast: 5fd6f98 | (Tobias Leich)++ | S05-metasyntax/charset.t:
tests for subtraction of mixed cclasses
pmurias it's seems to be an object with a P6opaque repr but it also seems to inherit a dummy set_str? 20:43
jnthn P6opaque knows what to do with set_str provided there is a box_target set on a native string attribute. 20:49
And yes, in that test the REPR of the type is P6opaque. The meta-object is a KnowHOW, with KnowHOWREPR. That REPR is purely for bootstrapping, though...it's useless for anything more than that.
Note that if you're looking at nqp-jvm, you won't see the set_str method in question 'cus it's generated. 20:50
dalek ast: 234af25 | (Tobias Leich)++ | S05-metasyntax/charset.t:
unfudge now passing test
20:52
pmurias jnthn: that make sense, I found the place where the boxing methods are generated 20:54
uvtc Does Perl 6 have a "pass" statement (analogous to Python's `pass`)? 21:15
FROGGS uvtc: in test files? 21:16
geekosaur ython's pass is a null statement
uvtc I mean a "do nothing" statement.
tadzik ;?
uvtc Right.
tadzik where would you need that?
uvtc if $test { pass } elsif {do this}
tadzik just leave it empty :)
uvtc Oh. That would work. :) 21:17
diakopter or you can put a semi if yoh want 21:18
uvtc Wait though. I think I recall p6 having some sort of "haven't gotten to this yet" stub-like statement...
Maybe `...`?
diakopter yes
thkugh that dies. ISTR a softer failure version 21:19
geekosaur doesn'tt hat throw a delayed exception?
and I thought that was the soft one (the others being ??? and !!! for more severe kinds of failures)
diakopter oh...
jnthn ... fails, ??? warnings, !!! dies 21:20
diakopter r: say { ...}()
p6eval rakudo 82de32: OUTPUT«Stub code executed␤current instr.: 'throw' pc 333479 (src/gen/CORE.setting.pir:149685) (src/gen/CORE.setting:9303)␤called from Sub 'sink' pc 365376 (src/gen/CORE.setting.pir:162414) (src/gen/CORE.setting:10525)␤called from Sub 'MAIN' pc 381 (src/gen/perl6.pir:146) …
diakopter r: { ...}()
p6eval rakudo 82de32: OUTPUT«Stub code executed␤current instr.: 'throw' pc 333479 (src/gen/CORE.setting.pir:149685) (src/gen/CORE.setting:9303)␤called from Sub 'sink' pc 365376 (src/gen/CORE.setting.pir:162414) (src/gen/CORE.setting:10525)␤called from Sub 'MAIN' pc 381 (src/gen/perl6.pir:146) … 21:21
diakopter r: { ...}
p6eval rakudo 82de32: OUTPUT«Stub code executed␤current instr.: 'throw' pc 333479 (src/gen/CORE.setting.pir:149685) (src/gen/CORE.setting:9303)␤called from Sub 'sink' pc 365376 (src/gen/CORE.setting.pir:162414) (src/gen/CORE.setting:10525)␤called from Sub 'MAIN' pc 381 (src/gen/perl6.pir:146) …
diakopter r: try { ...}
p6eval rakudo 82de32: OUTPUT«Stub code executed␤current instr.: 'throw' pc 333479 (src/gen/CORE.setting.pir:149685) (src/gen/CORE.setting:9303)␤called from Sub 'sink' pc 365376 (src/gen/CORE.setting.pir:162414) (src/gen/CORE.setting:10525)␤called from Sub 'MAIN' pc 381 (src/gen/perl6.pir:146) …
jnthn It's returning a Failure, and then that's ending up in sink context. 21:22
diakopter I'll sink ykur MAIN
uvtc Argh maties!
diakopter commute for realz&
uvtc jnthn: thanks for the extra info (??? !!!) 21:23
FROGGS nr: say "abc123def" ~~ /<[\w]-[a\d]>+/ 21:30
p6eval rakudo 7a41b9, niecza v24-24-gbdc3343: OUTPUT«「bc」␤␤»
FROGGS yay
nr: say "abc123def" ~~ /<[\w]-[a\D]>+/
p6eval rakudo 7a41b9, niecza v24-24-gbdc3343: OUTPUT«「123」␤␤»
FROGGS nr: say "abc123def" ~~ /<[\w]-[\D]>+/
p6eval rakudo 7a41b9, niecza v24-24-gbdc3343: OUTPUT«「123」␤␤»
FROGGS nr: say "abc123def" ~~ /<[\w]-[\D\n]>+/ 21:31
p6eval niecza v24-24-gbdc3343: OUTPUT«「c123」␤␤»
..rakudo 7a41b9: OUTPUT«「123」␤␤»
FROGGS ha!!
we beat niecza on regexes!
I've never dreamed that this will happen 21:32
nr: say "abc123def" ~~ /<[\w]-[\D\n\h]>+/
p6eval niecza v24-24-gbdc3343: OUTPUT«「c123」␤␤»
..rakudo 7a41b9: OUTPUT«#<failed match>␤»
FROGGS uhh
nr: say "abc123def" ~~ /<[\w]-[\D\h]>+/
p6eval niecza v24-24-gbdc3343: OUTPUT«「123」␤␤»
..rakudo 7a41b9: OUTPUT«#<failed match>␤»
FROGGS nr: say "abc123def" ~~ /<[\w]-[\h]>+/
p6eval rakudo 7a41b9, niecza v24-24-gbdc3343: OUTPUT«「abc123def」␤␤» 21:33
uvtc Hm. Can a given/when be used as an expression? As in, `my $x = given $something { when "foo" { 1 } when "bar" { 2 } when "baz" { 3 } };`? My experiments say "no"... If that's the case (no pun intended), why is that? 21:37
moritz just a parsing problem, easly circumvented with my $x = do given ...; 21:38
uvtc Oh, right. `do`. Thanks!
FROGGS nr: say "abc123def" ~~ /<[\w]-[\D\t]>+/ 21:40
p6eval niecza v24-24-gbdc3343: OUTPUT«「123」␤␤»
..rakudo 7a41b9: OUTPUT«#<failed match>␤»
FROGGS ó.ò
uvtc Has there been any recent work on a Perl 6 mode for Emacs? The one linked to from perl6.org (jrockway/cperl-mode) looks like it hasn't been touched in a while. 21:44
tadzik maybe it's perfect :P 21:46
FROGGS hehe 21:47
good one
*g*
uvtc Would be nice to have a dedicated p6 mode, even if only simple comments and strings were highlighted. 21:48
geekosaur I don't think perl6 syntax has undergone any radical changes recently? 21:49
uvtc So, that cperl mode is supposed to do double duty as p5 and p6? 21:50
Juerd geekosaur: Nah, I'm afraid to propose swapping infix : and => around. 21:52
geekosaur point was more that I don't think an existing perl6 editor mode would have bitrotted much 21:53
uvtc geekosaur: right. Thanks. 21:57
TimToady r: Nil; 22:17
p6eval rakudo 7a41b9: ( no output )
TimToady ouif 0 { Nilyou could put that for "pass"
er... 22:18
lue I should really start creating my own P6 mode for emacs. I hate cperl.
drKreso phenny, tell moritz "Any special reason why this example of traits is not working (fibonacci memorisation) perl6advent.wordpress.com/2011/12/0...aracter/?" 22:49
phenny drKreso: I'll pass that on when moritz is around.
dalek p-jvm-prep: 1d30e11 | jnthn++ | src/org/perl6/nqp/ (3 files):
Start passing arg list as a parameter.

This is first step in getting rid of the field for passing this.
23:02
p-jvm-prep: 02001c7 | jnthn++ | / (7 files):
Eliminate callframe args field.

This completes the refactors to argument passing that get things in a state where, once code-gen can provide it, we can start to make use of invokedynamic.
lue S02:744 shouldn't that be Rational[int128,uint64] ? (uint64 instead of what it says, int64) 23:19
TimToady yeah, probably 23:24
lue I'll fix it then. (I thought maybe there was a reason for the switch) 23:25
TimToady no point to storing the sign in two bits
though I'm sure the JVM would be happier with signed types, sigh
lue Mathematically, you'd have to xor the high bits (-3/-5 = 3/5, not -3/5) 23:28
dalek ecs: 2a706be | lue++ | S02-bits.pod:
[S02] equivalent Rational for rat64 should have unsigned denominator.

Just like every other Rat and rat in Perl 6.
23:33
jnthn 'night, #perl6 23:34
colomon jnthn++ # good night! 23:35
phenny: tell member:drKreso Seems like I had that working just a few months ago. Can you tell me more about how it's failing? 23:36
phenny colomon: I'll pass that on when member:drKreso is around.
FROGGS colomon: will that work with "member:" ? 23:37
colomon FROGGS: probably not, good catch. 23:39
phenny: tell drKreso Seems like I had that working just a few months ago. Can you tell me more about how it's failing?
phenny colomon: I'll pass that on when drKreso is around.
dalek kudo/nom: 123dfa3 | (Tobias Leich)++ | src/Perl6/Grammar.pm:
RT #116979 check for variable in regex assertions
23:47
sjn GlitchMr: "I would put a description, but who seriously cares?" >> I care, FWIW. 23:48