Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-03-02

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:06 xenoterracide joined #perl6
00:26 Targen joined #perl6
00:27 thou joined #perl6
00:27 labster joined #perl6
00:29 fgomez joined #perl6
00:30 donaldh joined #perl6
00:33 fgomez joined #perl6
00:35 * japhb_ finally gets a working self-hosted build of nqp-on-jvm ... and fib.nqp reports it's over 3.4x faster o/
00:36 japhb_ Even with startup time included, it's still 1.9x faster
00:51 benabik joined #perl6
00:55 Eddward joined #perl6
01:04 colomon japhb_: faster than what?
01:24 Eddward Is there any way that reads of or jumps based on uninitialized values wouldn't be bad in perl6?
01:25 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;'
01:26 japhb_ colomon, faster than nqp-on-parrot
01:43 woosley joined #perl6
02:27 grr joined #perl6
02:28 sqirrel_ joined #perl6
02:28 FROGGS_ joined #perl6
02:31 grr http://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:33 benabik joined #perl6
02:33 diakopter grr: gather/take utilizes coroutines
03:08 lue (to be fair, the word "coroutine" only occurs in S17 (twice), and never anywhere else in the specs)
03:19 fgomez joined #perl6
03:22 CharellKing joined #perl6
03:24 orafu joined #perl6
03:37 Khisanth joined #perl6
03:52 ikrs joined #perl6
04:11 rindolf joined #perl6
04:34 preflex_ joined #perl6
04:46 sftp joined #perl6
04:53 sunnavy joined #perl6
05:17 sunnavy joined #perl6
05:24 skids joined #perl6
05:36 benabik_ joined #perl6
05:39 sunnavy joined #perl6
05:40 raiph joined #perl6
05:46 sunnavy joined #perl6
05:54 gcole joined #perl6
06:13 kaare__ joined #perl6
06:26 gcole joined #perl6
06:40 toddr_ joined #perl6
07:02 gcole joined #perl6
07:12 drKreso joined #perl6
07:13 am0c joined #perl6
07:30 araujo joined #perl6
07:39 gcole joined #perl6
07:42 drKreso joined #perl6
07:46 moritz \o
07:46 diakopter hi
07:47 diakopter moritz: the p6eval nqp-jvm dir and rebuild script are ready; I just need to add the p6eval target..
07:47 diakopter but you can start setting up the rsync anytime you like
07:48 moritz diakopter: or you can
07:48 diakopter true... :)
07:48 drKreso Hi
07:49 diakopter hi
07:49 moritz diakopter: build.pl runs the build-scripts/rebuild-$target.{sh,pl} script first, then sync.pl $target
07:49 moritz hello drKreso
07:49 drKreso moritz: Hii, I get Cannot locate native library 'libmysqlclient.bundle' while panda installing MiniDBI on OSX
07:50 moritz drKreso: do you have libmysqlclient installed?
07:50 moritz drKreso: if yes, that's a bug in NativeCall, not MiniDBI
07:50 drKreso I did install mysql libs for ruby?
07:50 moritz (and I maintain DBIish, not MiniDBI)
07:51 drKreso Yes definitely NativeCall - been compiling it since yesterday (big hurdle for me was that it doesn't detect darwin)
07:52 drKreso moritz: So DBIish is in better shape? I thought you ported both (on github)
07:54 drKreso DBIish installs fine - when invoking I get same message Cannot locate native library 'libmysqlclient.bundle'
08:03 quester left #perl6
08:16 gcole joined #perl6
08:17 mattp_ joined #perl6
08:19 drKreso NativeCall message: Cannot locate native library 'libmysqlclient.bundle'  When trying to talk to MySQL
08:22 FROGGS_ morning
08:22 drKreso morning
08:22 sorear o/ FROGGS
08:23 FROGGS hi sorear, hi drKreso
08:23 drKreso FROGGS: I have many problems :) Good that you showed up
08:24 grondilu joined #perl6
08:24 dalek perl6-examples: bbdecbd | (L. Grondin)++ | rosalind/pmch-grondilu.pl:
08:24 dalek perl6-examples: [rosaling] PMCH
08:24 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/bbdecbdd23
08:24 FROGGS ohh well
08:24 FROGGS :o)
08:26 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  :/
08:26 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...
08:26 phenny FROGGS: I'll pass that on when jnthn is around.
08:27 FROGGS drKreso: do you know where that library is on your disk?
08:27 FROGGS is it called .bundle? there can be a .dylib too, so maybe nativecall is searching for the wrong file
08:28 drKreso FROGGS: /usr/local/mysql/lib
08:29 FROGGS so I guess it is either the library search path or wrong file extension
08:29 drKreso it's .dylib
08:29 FROGGS see
08:29 drKreso I tried DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH" but no progress
08:30 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 ?
08:31 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
08:31 FROGGS lets have a look at its source
08:32 drKreso I have a feeling NativeCall is not OSX guy, and that is source of my suffering :)
08:32 drKreso jnthn that is
08:32 FROGGS see this for example: https://github.com/jnthn/zavolaj/blob/master/lib/NativeCall.pm6#L117
08:33 FROGGS 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:34 FROGGS (thinking of fat libs for example)
08:35 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
08:35 drKreso ?
08:35 FROGGS no, *VM is the virtual machine rakudo is running on, currently parrot
08:36 FROGGS can you gist the code that is failing?
08:37 drKreso https://gist.github.com/drKreso/5070183
08:39 FROGGS ahh, so you/we have to patch DBIish
08:40 drKreso FROGGS: ?
08:40 FROGGS hold on
08:41 FROGGS see https://github.com/perl6/DBIish/blob/master/lib/DBDish/mysql.pm6#L12
08:41 FROGGS this line tells NativeCall to load libmysqlclient
08:42 FROGGS NativeCall will append the file extension then, using the one given by parrot (which is the same gcc tells you)
08:44 FROGGS drKreso: can you try that? perl6 -MNativeCall -e ' sub a is native("libmysqlclient") { * }; a() '
08:44 FROGGS this should give you the same error message
08:45 drKreso Wow, what? I mean it does, but I have no idea on what are you doing there?
08:47 ObseLeTe joined #perl6
08:47 FROGGS this line loads NativeCall, and tells it to load the mysqlclient library
08:47 domidumont joined #perl6
08:47 FROGGS and now try: perl6 -MNativeCall -e ' sub a is native("libmysqlclient.dylib") { * }; a() '
08:49 drKreso what is tho is native? a = load lib?
08:49 drKreso Cannot locate symbol 'a' in native library 'libmysqlclient.dylib'
08:50 drKreso but lib is found
08:51 FROGGS "is native" after the subroutine name is called a trait
08:52 FROGGS this trait for example applies some behaviour to the sub
08:52 FROGGS like doing extra things when the sub is getting called
08:52 FROGGS so, we found the lib, but there is no symbol a in it, but thats ok, just was a test
08:53 gcole joined #perl6
08:53 FROGGS I dont expected it to have that symbol :o)
08:53 FROGGS so, I'd say we try to fix NativeCall to check for .dylibs too, okay?
08:55 drKreso FROGGS: Got it, and how would I proceed on checking .dylibs?
08:55 drKreso Oh , after first call, try second and than fail
08:56 FROGGS at this point the libmysqlclient.bundle is expected: https://github.com/jnthn/zavolaj/blob/master/lib/NativeCall.pm6#L119
08:56 FROGGS I'll have a look at that nqp:: sub
09:00 FROGGS drKreso: I'm not sure, this might be a good place to do that: https://github.com/perl6/nqp/blob/master/src/ops/nqp_dyncall.ops#L851-L858
09:01 FROGGS but I'll have to ask jnthn, because this is out of control for NativeCall then...
09:02 FROGGS 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.
09:02 drKreso FROGGS: It looks like a good place
09:03 drKreso FROSSS: I'll play with it for a bit :)
09:06 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 drKreso At least for nqp
09:06 FROGGS how many cores do you have?
09:07 FROGGS (cpu cores)
09:07 drKreso 4
09:07 FROGGS good
09:08 FROGGS so, after changing that C file within the nqp folder do: make -j4 && make install
09:08 FROGGS then in the rakudo dir: make realclean && make -j4 && make install
09:08 FROGGS takes about 3 to 4 minutes on my laptop
09:12 drKreso FROGGS: Brilliant. BTW I think you guys are completely MAD (In a good way).
09:12 FROGGS *g*
09:12 FROGGS thanks
09:14 X-Scale joined #perl6
09:14 drKreso FROGGS: I get this in rakudo folder : make: *** No targets specified and no makefile found.  Stop.
09:15 FROGGS that is weird
09:15 drKreso Configure again?
09:15 FROGGS well, then you have to say that it should use the given nqp, and not clone it again
09:16 drKreso i runned configure and it was done instantly - no cloning
09:17 FROGGS ohh
09:17 drKreso CPU is sweating :) All 4 cores :)
09:17 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
09:17 FROGGS (I have a batch file for rebuilding)
09:18 FROGGS all 4 cores, -j4 does that
09:18 drKreso I think I will just steal it :0
09:19 PacoAir joined #perl6
09:22 FROGGS that's how software development works
09:25 drKreso FROGGS :) I guess. One question - I do need to delete site, and reinstall panda, and modules?
09:26 FROGGS there is a rebootstrap script, you need to run that
09:26 FROGGS ask tadzik for help if this doesnt work :o)
09:27 FROGGS it's in pandas directory somewhere
09:30 gcole joined #perl6
09:31 FROGGS drKreso: I'm afk for a while, enjoying the sun with kids
09:31 FROGGS see ya
09:32 drKreso FROGGS: By, thanks
09:54 PacoAir joined #perl6
10:00 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 jac50 joined #perl6
10:00 FROGGS jnthn: t/spec/S32-str/substr.rakudo                            (Wstat: 256 Tests: 91 Failed: 0)
10:00 FROGGS Non-zero exit status: 1
10:00 FROGGS Parse errors: Bad plan.  You planned 92 tests but ran 91.
10:05 Chillance joined #perl6
10:07 gcole joined #perl6
10:21 preflex joined #perl6
10:24 isomorphisms joined #perl6
10:25 saeidw joined #perl6
10:26 drKreso My try at replacing ".budnle" with ".dylib" https://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:30 preflex joined #perl6
10:43 kivutar joined #perl6
10:43 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...
10:43 phenny jnthn: 09:02Z <FROGGS> ask jnthn if he can scroll back to 10 a.m. please? :o)
10:44 gcole joined #perl6
10:44 nwc10 jnthn: all tests sucessful (apart from the ICU one)
10:44 jnthn nwc10: And that test passes for you with selftest, I guess? :)
10:44 rindolf joined #perl6
10:44 nwc10 yes.
10:44 jnthn drKreso: On line 18, the argument to Parrot_str_replace
10:45 jnthn FROGGS: I think the substr thing just means you need to pull
10:45 jnthn (Rakudo)
10:45 jnthn The test covers a bug I fixed a day or so ago.
10:45 drKreso jnthn:       STRING  * lib_name_alternative = Parrot_str_replace(interp, $2, pos, 6, Parrot_str_new(interp, ".dylib", 0)));
10:47 jnthn Wait, what's the 6 argument?
10:47 drKreso jnthn: I have no idea :)
10:48 drKreso 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
10:48 drKreso So is it zero based? 5 or 6?
10:49 jnthn r: say '.bundle'.chars
10:49 p6eval rakudo 40069f: OUTPUT«7␤»
10:49 jnthn That number
10:49 jnthn No, it's not an offset, it's a number of chars.
10:50 drKreso So it means start at pos, remove x(7) and put string
10:50 jnthn yeah
10:50 drKreso makes sense now that you say it
10:51 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:52 jnthn bbi15
10:53 preflex joined #perl6
10:54 pmurias joined #perl6
10:59 preflex_ joined #perl6
11:06 drKreso jnthn: https://gist.github.com/drKreso/5070534 Now I get Illegal instruction: 4
11:10 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?
11:10 moritz yes
11:11 nwc10 and we can all say nasty things about Perl 4 without fear of repercussion?
11:12 sorear um
11:12 sorear I can't remember if preflex has log functionality
11:13 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 diakopter *cheek
11:16 moritz there's lots of stuff I could do, but in the end it's not worth the effort IMHO
11:16 moritz it's not a credit card processing audit log; it's just some more-or-less random conversation that's being logged
11:17 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
11:17 huf just patch in something from frogs
11:17 huf worked for jurassic park
11:18 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 spider-mario joined #perl6
11:19 moritz yes
11:19 moritz huf: maybe FROGGS would mind :-)
11:20 huf :)
11:21 gcole joined #perl6
11:28 PacoAir joined #perl6
11:38 jnthn drKreso: Oh, I missed something... :(
11:38 jnthn *lib_name_2 = Parrot_str_to_cstring(interp, lib_name_alternative);
11:38 jnthn That * should not be there
11:39 jnthn Also I'd put in a check after it tries to locate the thing with the second name.
11:39 jnthn To check it isn't coming back with null there.
11:39 James_ joined #perl6
11:39 diakopter I'm in your pointers dereferencing all the things
11:40 drKreso jnthn so if there is no "bundle" pos == NULL ?
11:41 drKreso https://gist.github.com/drKreso/5070628
11:42 jnthn drKreso: pos is an integer, so just check pos < 0
11:42 jnthn er, if pos < 0 it wasn't found, that is
11:42 drKreso thanks
11:42 jevin_ joined #perl6
11:43 gcole joined #perl6
11:48 pmurias joined #perl6
11:48 drKreso joined #perl6
11:55 drKreso jnthn: great success :) DBD::mysql connection failed: Unknown database 'zavolaj' - DBIish is working
11:55 jnthn \o/
11:56 moritz now create that database :-)
11:56 moritz or connect to a different one
12:04 moritz r: say (1, 2, 3).Array.[0] = 42
12:04 p6eval rakudo 40069f: OUTPUT«42␤»
12:06 FROGGS jnthn: I thought I pulled before that, sorry for the accusation :o)

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo