Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-01-17

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:05 cognominal joined #perl6
00:15 * [Coke] probably should stop drinking coffee after, oh, 10am.
00:15 [Coke] (and coke zero, and diet mountain dew...)
00:19 TimToady yeah, go for the sugary stuf after 10am
00:19 TimToady *ff
00:19 Khisanth joined #perl6
00:20 dalek roast: cf4f001 | coke++ | S04-declarations/my.t:
00:20 dalek roast: niecza fudge
00:20 dalek roast: review: https://github.com/perl6/roast/commit/cf4f001a5c
00:21 timotimo i read "surgery" and was thoroughly confused
00:22 colomon [Coke]++ # beat me to it
00:26 timotimo phenny: tell jnthn: is World::apply_trait the best place to put the levenshtein search or would it better be placed in your proposed trait_mod:<is>(Mu:U $type, *%fail)?
00:26 phenny timotimo: I'll pass that on when jnthn is around.
00:40 [Coke] colomon: https://gist.github.com/4552472 - some potentially low hanging fruit.
00:43 colomon [Coke]: danke
00:46 isBEKaml [Coke]: say, have you had any spectest failures with rakudo?
00:47 isBEKaml I get two in filestat.t and filetest.rakudo
00:51 isBEKaml It's repeatable.
00:52 japhb_ Thanks for the mention in the release announcement.  :-)
00:53 isBEKaml not ok 28 - ~~:z returns false on directories
00:53 isBEKaml ^^ filetest.t
00:54 isBEKaml not ok 8 - IO.accessed should be updated when contents of file is read
00:54 isBEKaml ^^ filestat.t
00:54 isBEKaml japhb: It's all our pleasure - :-)
00:55 isBEKaml The above are the two failures I see here.
00:58 whiteknight joined #perl6
01:01 anuby joined #perl6
01:02 isBEKaml r: qx(ls)
01:02 p6eval rakudo efac0f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routines:â�¤    ls used at line 1â�¤    qx used at line 1â�¤â�¤Â»
01:02 isBEKaml r: say "t".IO
01:03 p6eval rakudo efac0f: OUTPUT«IO.new(ins => 0, chomp => Bool::True, path => "t")␤»
01:03 isBEKaml r: say "t".IO ~~ :z
01:03 p6eval rakudo efac0f: OUTPUT«False␤»
01:04 isBEKaml ^^ this returns True locally
01:05 isBEKaml (of course, I have a folder called "t" in the current directory)
01:05 benabik :z?
01:05 isBEKaml yeah
01:07 benabik r: say 't'.IO.s
01:07 p6eval rakudo efac0f: OUTPUT«4096␤»
01:08 benabik isBEKaml: Is your t directory empty?
01:08 isBEKaml benabik: no, that's the spectest folder. It should return False.
01:09 benabik isBEKaml: OS?
01:09 isBEKaml win7 cygwin
01:10 benabik I wonder if Win7 always returns 0 size for directories.  Linux and Darwin seem to give a size.
01:10 isBEKaml yup, it's 0 sized.
01:11 isBEKaml :/
01:11 benabik Bad test?
01:12 isBEKaml Might be: https://github.com/perl6/roast/blob/m​aster/S16-filehandles/filetest.t#L73
01:12 isBEKaml And the other failure is here: https://github.com/perl6/roast/blob/m​aster/S16-filehandles/filestat.t#L58
01:15 isBEKaml hmm, this happens even with the older rakudo I have here. (about 2 months old)
01:15 hypolin joined #perl6
01:15 benabik It's because .z == .e && .s == 0
01:16 benabik And cygwin always gives .s == 0 for directories.
01:16 isBEKaml So, it's cygwin - I'll go ahead and make a release.
01:18 isBEKaml benabik++
01:18 benabik For future reference: http://cygwin.com/ml/cygwin/2011-01/msg00170.html
01:19 isBEKaml benabik: thanks, I'll keep that in mind.
01:19 benabik I'll leave it to others to decide if this is stupid behavior of Cygwin or a bad assumption in the tests.
01:20 am0c joined #perl6
01:21 * geekosaur would be inclined to consider taking the size of a directory to be dubious at best
01:22 geekosaur (note that cygwin has to deal with a very ugly special case, to wit, the root directory of a FAT drive)
01:23 geekosaur (also I'm not sure you can even take the size of a directory specified as a UNC path)
01:24 geekosaur if the concept is to be meaningful at all in perl6, perhaps it should be implemented by globbing the entries in the directory and counting the result
01:25 geekosaur also note an additional screw case with regard to portability:  what does :s do on OS/400 and successors?
01:25 benabik *nix appears to give a size based on the blocks needed to store the directory entry.  Relying on that cross-platform is probably not good.
01:25 geekosaur exactly
01:26 geekosaur you can't even do that much in the FAT case I mentioned; root directories have a fixed preallocated space that isn't part of the filesystem /per se/
01:26 geekosaur (mmm, backward compatibility)
01:29 sorear I thought FAT32 allowed the root to grow
01:29 sorear what's the deal with OS/400 and sizes?
01:29 geekosaur I think it does, but the base part is still not represented as a disk file like on unixy filesystems or (I think) ntfs
01:29 geekosaur os/400 allows a container and a file to have the same name
01:29 japhb_ sorear, yeah, but cygwin probably has to support anything Windows supports -- all the way back to FAT16 or even FAT12.
01:30 geekosaur (it's somewhat more complicated than that but that's the part I'm thinking of)
01:30 sorear ntfs is pretty unixy, it has inode numbers and the root directory is identified by a well-known inode number
01:30 sorear ntfs' personal brand of crazy is that the inode table and the free block list are also files with inode numbers
01:30 geekosaur and all bets are off if you're accessing a network filesystem
01:31 geekosaur um.  ever wonder why unix traditionally doesn't use inode 1?
01:32 sorear I did not know that 1 was traditionally avoided
01:32 * benabik didn't know it didn't.
01:32 geekosaur I think early pre-bitmap ext2 even continued that tradition for a while:  inode 1 was the free list
01:33 isBEKaml rakudo and nqp tarballs: https://www.dropbox.com/sh/​fkk6frqdiknwfso/ptM3dojQsC
01:33 isBEKaml let me know if you see any problems
01:33 geekosaur and very early unix filesystems gave inode 0 the allocation for the superblock and inode table
01:34 geekosaur this kinda broke with FFS and successors
01:34 isBEKaml Also, if you have access to upload to rakudo.org, please feel free to do the same. :-)
01:34 geekosaur (specifically cylinder groups)
01:39 MikeFair joined #perl6
01:39 leprevost joined #perl6
01:42 isBEKaml I've sent out a pull request for rakudo release. Day job beckons. :-)
01:43 isBEKaml Thanks! (I'll be away for a couple of weeks now - please upload those tarballs too from my dropbox folder or make anew)
02:04 FROGGS_ joined #perl6
02:05 alec joined #perl6
02:28 leprevost joined #perl6
02:49 [Coke] phenny: tell isBEKaml about https://github.com/coke/perl6-roast-​data/blob/master/rakudo_summary.out
02:49 phenny [Coke]: I'll pass that on when isBEKaml is around.
02:50 [Coke] (no failures in filestat)
03:12 jokar joined #perl6
03:42 ph1ur3 joined #perl6
03:42 orafu joined #perl6
03:46 Targen joined #perl6
03:47 SamuraiJack joined #perl6
03:49 grondilu_ joined #perl6
04:00 fgomez joined #perl6
04:03 broquaint joined #perl6
04:21 grondilu joined #perl6
04:26 preflex_ joined #perl6
05:19 aindilis joined #perl6
05:23 kaleem joined #perl6
05:26 dayangkun joined #perl6
05:29 fgomez joined #perl6
05:32 stevan_ joined #perl6
05:48 * lue wonders if the lack of anything in NQPParametricRoleHOW's compose method (as opposed to Concrete's version of the method) is the cause of that bug he encountered a month or so ago...
05:48 For-Odin joined #perl6
05:50 cognominal joined #perl6
06:07 moritz \o
06:19 jaldhar joined #perl6
06:26 quester joined #perl6
06:29 raiph o/
06:51 quester left #perl6
07:02 cognominal_ joined #perl6
07:04 cog joined #perl6
07:13 kaleem joined #perl6
07:32 kaleem joined #perl6
07:50 Pleiades` joined #perl6
07:58 FROGGS joined #perl6
08:13 rindolf joined #perl6
08:33 Pleiades` joined #perl6
08:41 brrt joined #perl6
08:51 wk joined #perl6
08:53 Su-Shee good morning everyone.
08:53 moritz \o
08:53 moritz aloha: seen FROGGS
08:53 aloha moritz: FROGGS was last seen in #perl6 55 mins 21 seconds ago joining the channel.
08:56 FROGGS moritz: morning
08:56 FROGGS you miss me?
08:56 FROGGS btw, I'm not in eckental next monday, so no beer for us ó.ò
08:56 moritz FROGGS: :(
08:57 moritz that was actually what I was aiming at
08:57 FROGGS ya, sad that is
08:58 moritz ah well, I won't run away; if you come into that region again, just drop me a line
08:58 Pleiades` joined #perl6
08:59 FROGGS I will
09:04 cog_ joined #perl6
09:04 rindolf Su-Shee: morning.
09:05 rindolf FROGGS: hi.
09:05 FROGGS hi rindolf
09:06 rindolf FROGGS: what's up?
09:06 rindolf moritz: morning.
09:07 cedrvint hello #perl6
09:07 cedrvint rn: subset UInt of Int where * >= 0; sub foo (UInt $bar?) { }; foo();
09:07 p6eval niecza v24-17-gd343a2a: OUTPUT«Potential difficulties:â�¤  $bar is declared but not used at /tmp/IuSYCRdJwn line 1:â�¤------> [32mUInt of Int where * >= 0; sub foo (UInt [33mâ��[31m$bar?) { }; foo();[0mâ�¤â�¤Â»
09:07 p6eval ..rakudo efac0f: OUTPUT«Parameter '' requires an instance, but a type object was passed␤  in method Bridge at src/gen/CORE.setting:3097␤  in sub infix:<>=> at src/gen/CORE.setting:3028␤  in block  at /tmp/1TWJJ_uTap:1␤␤»
09:08 cedrvint is this ^ a known Rakudo bug?
09:08 cedrvint it seems subsets and missing-but-optinal arguments don't mix well
09:10 FROGGS rindolf: $work
09:11 FROGGS rn: subset UInt of Int where * >= 0; sub foo (UInt:D: $bar?) { }; foo();
09:11 p6eval rakudo efac0f: OUTPUT«Not enough positional parameters passed; got 0 but expected between 1 and 2␤  in sub foo at /tmp/Lf_44uAt2f:1␤  in block  at /tmp/Lf_44uAt2f:1␤␤»
09:11 p6eval ..niecza v24-17-gd343a2a: OUTPUT«Potential difficulties:â�¤  $bar is declared but not used at /tmp/wjcmtW2Xp2 line 1:â�¤------> [32mt of Int where * >= 0; sub foo (UInt:D: [33mâ��[31m$bar?) { }; foo();[0mâ�¤â�¤Unhandled exception: No value for parameter '' in 'foo'â�¤  at /tmp/wjcmtW2Xp2 line 0 (…
09:12 FROGGS rn: subset UInt of Int where * >= 0; sub foo (UInt:D: :$bar?) { }; foo();
09:12 p6eval niecza v24-17-gd343a2a: OUTPUT«Potential difficulties:â�¤  $bar is declared but not used at /tmp/SN29Hmdx_i line 1:â�¤------> [32m of Int where * >= 0; sub foo (UInt:D: :[33mâ��[31m$bar?) { }; foo();[0mâ�¤â�¤Unhandled exception: No value for parameter '' in 'foo'â�¤  at /tmp/SN29Hmdx_i line 0 (…
09:12 p6eval ..rakudo efac0f: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in sub foo at /tmp/OdxSr7x077:1␤  in block  at /tmp/OdxSr7x077:1␤␤»
09:12 FROGGS rn: subset UInt of Int where * >= 0; sub foo (UInt :$bar?) { }; foo();
09:12 p6eval rakudo efac0f: OUTPUT«Parameter '' requires an instance, but a type object was passed␤  in method Bridge at src/gen/CORE.setting:3097␤  in sub infix:<>=> at src/gen/CORE.setting:3028␤  in block  at /tmp/LdpgjnS3sx:1␤␤»
09:12 p6eval ..niecza v24-17-gd343a2a: OUTPUT«Potential difficulties:â�¤  $bar is declared but not used at /tmp/pSKT8VkPHQ line 1:â�¤------> [32mInt of Int where * >= 0; sub foo (UInt :[33mâ��[31m$bar?) { }; foo();[0mâ�¤â�¤Â»
09:12 FROGGS weird indeed
09:12 FROGGS please file a bug, I've seen no such ticket
09:12 cedrvint OK
09:31 kaleem joined #perl6
09:42 Psyche^ joined #perl6
09:51 dakkar joined #perl6
10:06 sqirrel joined #perl6
10:08 Ayiko joined #perl6
10:18 wk joined #perl6
10:19 fhelmberger joined #perl6
10:34 avay joined #perl6
10:34 cog joined #perl6
10:36 avay is there any compiler on internet for perl ,which has many modules installed in it, and doesn't give errors of not finding the modules used in the code
10:37 FROGGS avay: rakudo star distribution is your friend
10:37 FROGGS avay: go to rakudo.org
10:37 FROGGS but I really hope you are talking about Perl 6, not Perl 5
10:37 avay yeah
10:38 FROGGS :o)
10:38 FROGGS well then, welcome in our midst ;o)
10:38 avay thanks FROGGS!!!
10:38 FROGGS you're welcome
10:49 b1rkh0ff joined #perl6
11:04 xinming joined #perl6
11:05 Su-Shee_ joined #perl6
11:14 timotimo FROGGS: now that multi-merging is finished, what cool stuff you wanted to do was unblocked? it was at least in big part about Inline::C, right?
11:18 FROGGS timotimo: it was the SDL module
11:18 FROGGS this one needed Inline::C together with NativeCall
11:18 FROGGS so this should work now, and my game BubbleBreaker too
11:18 FROGGS maybe there are minor issues, dont know right now
11:19 FROGGS all these modules might need a bit more love
11:21 timotimo https://github.com/FROGGS/Games-BubbleBrea​ker/blob/master/bin/bubble-breaker.pl#L24 - typo: "buubles"
11:22 timotimo also, this isn't the perl6 version! *gasp*
11:25 cog joined #perl6
11:25 cog joined #perl6
11:25 cog_ joined #perl6
11:32 FROGGS timotimo: https://github.com/FROGGS/p6-Games-BubbleBreaker
11:33 FROGGS the File::HomeDir fix isnt pushed to the repo as I see now
11:34 timotimo found it already, thanks :)
11:35 timotimo hm, the code looks like it could be much prettier
11:36 FROGGS ohh ya, that was the first thing I did in perl 6
11:36 FROGGS I know a bit more now ;o)
11:37 timotimo :D
11:41 bbkr_ is there any chance that Socket.get() will be fixed in 2013.01 - https://rt.perl.org/rt3/Tic​ket/Display.html?id=116302 ? without it all modules that depends on HTTP::Easy will be broken again in Star release.
11:41 moritz yes, there is any chance.
11:41 bbkr_ a chance* :)
11:42 timotimo not to burst your sarcasm, or anything ... but
11:42 timotimo isn't it already fixed in the compiler that was released today?
11:42 moritz I didn't fix it
11:43 bbkr_ Socket.read was fixed, Socket.get not
11:43 timotimo https://github.com/svatsan/rakudo/b​lob/69b53cf907d44ce5ccbd2a5889005c3​f5f7a2478/docs/announce/2013.01#L26
11:43 timotimo ooooh, okay :(
11:43 timotimo sorry about that
11:52 timotimo wtf is that song, that doesn't even sound good
12:04 timotimo (that was a mischan, btw)
12:11 timotimo FROGGS: what necessitates use soft; for inline::c? is it a bug in rakudo or just something that's missing from inline::c?
12:13 moritz usualy run-time &routine.wrap is the reason
12:13 moritz rakudo optimizes dispatch (and somtimes even inlines calls) at compile time
12:14 moritz so if you wrap at run time, ith might not call the correct routine unless you 'use soft;'
12:15 timotimo hm, i see
12:16 timotimo at first i thought use soft; was the negative counterpart of what use strict did in perl5. is that wrong?
12:17 moritz yes, that's wrong
12:18 moritz well, not too wrong. It allows some run-time mucking that's otherwise forbidden. But none of the details of 'use strict;' (strict refs, vars, subs) contradict it
12:19 moritz r: use soft; if 0 { nosuchsub }
12:19 p6eval rakudo efac0f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    nosuchsub used at line 1â�¤â�¤Â»
12:19 moritz still complains at compile time
12:28 Pleiades` joined #perl6
12:30 drbean joined #perl6
12:35 FROGGS timotimo: I believe this use soft isnt needed anymore but need to test to confirm
12:35 FROGGS it was a try to get the multi import merging right
12:57 jnthn The "soft" thing prevents inlining
12:57 phenny jnthn: 00:26Z <timotimo> tell jnthn is World::apply_trait the best place to put the levenshtein search or would it better be placed in your proposed trait_mod:<is>(Mu:U $type, *%fail)?
12:57 jnthn Which is normally undesirable, but if you're gonna do runtime wrapping will matter
12:58 jnthn timotimo: Since you have NQP code, maybe best in apply_trait. But I suggest that you throw a typed exception from the proposed trait mod I suggested, and then detect it in apply_trait and augment it with the suggestions then rethrow it.
13:01 dalek rakudo/nom: 179fd4b | isBEKaml++ | src/core/tai-utc.pm:
13:01 dalek rakudo/nom: updated tai-utc
13:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/179fd4bf0b
13:01 dalek rakudo/nom: d0e16da | isBEKaml++ | docs/release_guide.pod:
13:01 dalek rakudo/nom: Updated release guide
13:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d0e16dadbf
13:01 dalek rakudo/nom: 0de5379 | isBEKaml++ | tools/build/NQP_REVISION:
13:01 dalek rakudo/nom: [Release] Bump NQP_REVISION
13:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0de53790aa
13:01 dalek rakudo/nom: 59c2982 | isBEKaml++ | VERSION:
13:01 dalek rakudo/nom: [Release] Bump VERSION
13:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/59c2982c53
13:01 dalek rakudo/nom: 69b53cf | isBEKaml++ | docs/announce/2013.01:
13:01 dalek rakudo/nom: [Release] Add 2013.01 Rakudo compiler release announcement.
13:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/69b53cf907
13:01 dalek rakudo/nom: 3ee51ac | isBEKaml++ | docs/release_guide.pod:
13:01 dalek rakudo/nom: Remove Sonoma from suggested pm names
13:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3ee51ac09e
13:01 dalek rakudo/nom: 3a8d48a | moritz++ | / (5 files):
13:01 dalek rakudo/nom: Merge pull request #94 from svatsan/rel-2013.01
13:01 dalek rakudo/nom:
13:01 dalek rakudo/nom: Rakudo compiler release 2013.01
13:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3a8d48a50b
13:03 moritz did isBEKaml++ create a tarball?
13:03 FROGGS it's in his dropbox
13:04 FROGGS (where ever this is)
13:04 FROGGS he mentioned it this morning
13:04 moritz https://www.dropbox.com/sh/​fkk6frqdiknwfso/ptM3dojQsC
13:04 moritz FROGGS: thanks, that made it easy for me to find the link in the logs
13:05 FROGGS np ;o)
13:05 pmurias joined #perl6
13:05 moritz but I only have the wrong SSH keys here :(
13:05 moritz so I can't upload them until I get home
13:06 * moritz pushes the tags
13:13 cog joined #perl6
13:15 FROGGS I believe this can wait a few hours
13:24 dayangkun joined #perl6
13:37 cog joined #perl6
13:43 pmurias jnthn: t/qast_tring.t expects 0.0, isn't 0 the correct answer?
13:44 pmurias jnthn: correct as in what nqp-parrot would produce
13:50 * bbkr_ is testing new release
13:52 FROGGS bbkr_: if you get the chance, can you test the rakudo/froggs_multibyte branch? there are bugfixes for multibyte chars for IO::Socket::INET.recv
13:52 FROGGS it also introduces an optional $bin param that will give you a Buf instead of a Str when true
13:54 bbkr_ FROGGS: sure, I'll test it right after $dayjob
13:54 FROGGS no hurry, I just want to make sure that this is tested positive before merging in
13:55 FROGGS ++bbkr_ # but thanks already for taking the time
14:18 PacoAir joined #perl6
14:18 atrodo joined #perl6
14:19 hash_table joined #perl6
14:24 Vlavv joined #perl6
14:36 colomon joined #perl6
14:45 MikeFair joined #perl6
14:45 mtk joined #perl6
14:47 cog joined #perl6
14:52 dayangkun joined #perl6
14:53 kaare_ joined #perl6
14:59 bbkr joined #perl6
14:59 eternaleye_ joined #perl6
15:00 kst` joined #perl6
15:01 nebuchad` joined #perl6
15:01 SamuraiJack_ joined #perl6
15:03 zamolxes_ joined #perl6
15:03 steven__1 joined #perl6
15:03 Woodi_ joined #perl6
15:03 amkrankr1leuen joined #perl6
15:05 colomon_ joined #perl6
15:06 colomon_ rn: say +"1428."
15:06 p6eval niecza v24-17-gd343a2a: OUTPUT«Unhandled exception: Cannot parse number: 1428.␤  at /home/p6eval/niecza/lib/CORE.setting line 1435 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3539 (ANON @ 10) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3541 (NumSyntax.str2num @ 5) ␤  a…
15:06 p6eval ..rakudo 3a8d48: OUTPUT«Cannot convert string to number: radix point must be followed by one or more valid digits in '1428.⏏' (indicated by ⏏)␤  in method gist at src/gen/CORE.setting:10404␤  in sub say at src/gen/CORE.setting:7559␤  in block  at /tmp/wCvdIed8f9:1␤␤»
15:06 colomon_ that seems... unperlish to me.
15:07 colomon_ not sure what's up with freenode (like why I've got a colomon_, and why my previous comments didn't go to the actual channel.)
15:07 jaldhar joined #perl6
15:08 colomon r: printf ("%g\n", "1428.")
15:08 FROGGS colomon: that answers your question
15:08 p6eval rakudo 3a8d48: OUTPUT«Null PMC access in get_number()␤  in sub sprintf at src/gen/CORE.setting:2414␤  in sub printf at src/gen/CORE.setting:2419␤  in block  at /tmp/wq16xfG0aP:1␤␤»
15:08 colomon known rakudo-bug?
15:08 FROGGS I'm talking about the netplit ;o)
15:08 arnsholt Probably. NULL PMC errors usually are
15:08 FROGGS dunno if 42. should work
15:08 arnsholt Unless they're NQP bugs =)
15:08 colomon arnsholt: Null PMCs are *definitely* a Rakudo bug
15:08 FROGGS r: say 42. + 1
15:08 p6eval rakudo 3a8d48: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of . to concatenate strings; in Perl 6 please use ~�at /tmp/l7VOP660B_:1�------> [32msay 42. [33m�[31m+ 1[0m�»
15:09 stopbit joined #perl6
15:09 colomon even if the string does not make a valid number.
15:09 colomon though...
15:09 colomon rn: say "1428djsklfj"
15:09 p6eval rakudo 3a8d48, niecza v24-17-gd343a2a: OUTPUT«1428djsklfj␤»
15:09 colomon rn: say +"1428djsklfj"
15:09 p6eval niecza v24-17-gd343a2a: OUTPUT«Unhandled exception: Cannot parse number: 1428djsklfj␤  at /home/p6eval/niecza/lib/CORE.setting line 1435 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3539 (ANON @ 10) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3541 (NumSyntax.str2num @ 5…
15:09 p6eval ..rakudo 3a8d48: OUTPUT«Cannot convert string to number: trailing characters after number in '1428⏏djsklfj' (indicated by ⏏)␤  in method gist at src/gen/CORE.setting:10404␤  in sub say at src/gen/CORE.setting:7559␤  in block  at /tmp/h00UnoIbtV:1␤␤»
15:09 colomon ah, at least it's consistent there.
15:10 FROGGS n: say 42. + 1
15:10 p6eval niecza v24-17-gd343a2a: OUTPUT«[31m===[0mSORRY![31m===[0m��Decimal point must be followed by digit at /tmp/h7SXCRXVQu line 1:�------> [32msay 42.[33m�[31m + 1[0m��Unsupported use of . to concatenate strings; in Perl 6 please use ~ at /tmp/h7SXCRXVQu line 1:�------> [32msay 42. …
15:10 FROGGS okay, not supported
15:10 sweet_kid joined #perl6
15:10 colomon I don't have any issues with it being not supported in p6 code.  But it's not as clear to me it should be not supported in string to number conversion at runtime.
15:11 sweet_kid joined #perl6
15:11 FROGGS I'd vote for it beeing handled exactly the same
15:12 arnsholt std: my $x 42.
15:12 p6eval std 7deb9d7: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Confused at /tmp/zza8cfliDj line 1:â�¤------> [32mmy $x [33mâ��[31m42.[0mâ�¤    expecting any of:â�¤     constraintâ�¤     infix or meta-infixâ�¤    infixed functionâ�¤       initializerâ�¤    statement modifier loopâ�¤        traitâ�¤Parse failedâ�¤FAILED 00:00
15:12 p6eval ..42m␤»…
15:12 arnsholt std: my $x = 42.
15:12 sweet_kid joined #perl6
15:12 arlinius joined #perl6
15:12 p6eval std 7deb9d7: OUTPUT«[31m===[0mSORRY![31m===[0m�Decimal point must be followed by digit at /tmp/tTf9e_iIyS line 1:�------> [32mmy $x = 42.[33m�[31m<EOL>[0m�Unsupported use of . to concatenate strings; in Perl 6 please use ~ at /tmp/tTf9e_iIyS line 1 (EOF):�------> [32mmy $x = 42…
15:12 arnsholt colomon: There you go. Apparently it's not supposed to be allowed =)
15:12 FROGGS if numbers is strings will be pasred differently than in code, this will just add complexity
15:12 sweet_kid joined #perl6
15:12 dalek rakudo-js: 345e4e2 | (Paweł Murias)++ | runtime.js:
15:12 dalek rakudo-js: Implement some trig ops.
15:12 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/345e4e2d3c
15:12 dalek rakudo-js: 46f606a | (Paweł Murias)++ | / (2 files):
15:12 dalek rakudo-js: Steal t/qast_math.t.
15:12 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/46f606a3ad
15:12 FROGGS even to my head
15:13 arnsholt Because it might throw a spanner in the works when you want to do "42.some-method()" perhaps?
15:14 FROGGS r: class 3 { method 14159265358979 { say 42 } }; say 3.14159265358979
15:14 p6eval rakudo 3a8d48: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse class definitionâ�¤at /tmp/Bq6v7T872_:1â�¤------> [32mclass [33mâ��[31m3 { method 14159265358979 { say 42 } }; [0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤       …
15:14 FROGGS std: class 3 { method 14159265358979 { say 42 } }; say 3.14159265358979
15:14 p6eval std 7deb9d7: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse class definition at /tmp/J29wcyQkRY line 1:â�¤------> [32mclass [33mâ��[31m3 { method 14159265358979 { say 42 } }; [0mâ�¤    expecting any of:â�¤        nameâ�¤   traitâ�¤Parse failedâ�¤FAILED 00:00 40mâ�¤Â»
15:14 FROGGS n: class 3 { method 14159265358979 { say 42 } }; say 3.14159265358979
15:14 p6eval niecza v24-17-gd343a2a: OUTPUT«[31m===[0mSORRY![31m===[0m��Unable to parse class definition at /tmp/Rm_qFBFG2l line 1:�------> [32mclass [33m�[31m3 { method 14159265358979 { say 42 } }; [0m��Parse failed��»
15:14 colomon identifiers have to start with a letter, don't they?
15:14 FROGGS damn :o)
15:15 FROGGS looks like
15:15 moritz yes, and that's a very good thing :-)
15:15 moritz r: class _3 { method _14 { say 'pi' } }; _3._14
15:15 p6eval rakudo 3a8d48: OUTPUT«pi␤»
15:16 moritz IMHO that's already confusing enough :-)
15:16 FROGGS ohh, you could use class and methodnames like GOTO and JUMP
15:16 FROGGS and of course mix german names in
15:17 FROGGS r: sub Ox34254 { 42 }; say Ox34254 # haha
15:17 p6eval rakudo 3a8d48: OUTPUT«42␤»
15:18 FROGGS I think you can do really weird stuff using unicode letters
15:18 FROGGS like trolling your fellows
15:19 SunilJoshi joined #perl6
15:19 colomon argh, this script is infuriating.
15:20 moritz .u O
15:20 phenny U+004F LATIN CAPITAL LETTER O (O)
15:21 colomon Null PMCs when I run it in rakudo, "index out of range" (when I never use an index) when I run it in niecza
15:22 moritz colomon: what are you trying to do?
15:22 moritz (if it's a compile-time error, --ll-exception might give you a better idea about what the error is about)
15:23 colomon take a bunch pairs of 3D points, split them into two groups, and print out each group
15:23 colomon r: printf ("%g\n", "1428.")
15:23 p6eval rakudo 3a8d48: OUTPUT«Null PMC access in get_number()␤  in sub sprintf at src/gen/CORE.setting:2414␤  in sub printf at src/gen/CORE.setting:2419␤  in block  at /tmp/b6ZKSUbdZI:1␤␤»
15:23 colomon r: printf ("%g\n", "1428")
15:23 p6eval rakudo 3a8d48: OUTPUT«Null PMC access in get_number()␤  in sub sprintf at src/gen/CORE.setting:2414␤  in sub printf at src/gen/CORE.setting:2419␤  in block  at /tmp/URFTSDV2Rn:1␤␤»
15:23 colomon r: printf ("%f\n", "1428")
15:23 p6eval rakudo 3a8d48: OUTPUT«Null PMC access in get_number()␤  in sub sprintf at src/gen/CORE.setting:2414␤  in sub printf at src/gen/CORE.setting:2419␤  in block  at /tmp/tIRAW6MmH1:1␤␤»
15:24 colomon r: printf ("%g\n", +"1428")
15:24 p6eval rakudo 3a8d48: OUTPUT«Null PMC access in get_number()␤  in sub sprintf at src/gen/CORE.setting:2414␤  in sub printf at src/gen/CORE.setting:2419␤  in block  at /tmp/dV7xkY4ihn:1␤␤»
15:24 colomon r: printf ("%g\n", +"1428.3")
15:24 p6eval rakudo 3a8d48: OUTPUT«Null PMC access in get_number()␤  in sub sprintf at src/gen/CORE.setting:2414␤  in sub printf at src/gen/CORE.setting:2419␤  in block  at /tmp/QP2BNqcQmK:1␤␤»
15:24 colomon r: printf ("%g\n", 1428.3)
15:24 p6eval rakudo 3a8d48: OUTPUT«Null PMC access in get_number()␤  in sub sprintf at src/gen/CORE.setting:2414␤  in sub printf at src/gen/CORE.setting:2419␤  in block  at /tmp/tfXBCoKUNG:1␤␤»
15:24 colomon r: printf ("%f\n", 1428.3)
15:24 p6eval rakudo 3a8d48: OUTPUT«Null PMC access in get_number()␤  in sub sprintf at src/gen/CORE.setting:2414␤  in sub printf at src/gen/CORE.setting:2419␤  in block  at /tmp/5_rUagHeEK:1␤␤»
15:25 colomon am I doing something obvious wrong there?
15:25 colomon n: printf ("%f\n", 1428.3)
15:25 p6eval niecza v24-17-gd343a2a: OUTPUT«Unhandled exception: index out of range␤  at /home/p6eval/niecza/lib/CORE.setting line 1301 (sprintf @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1302 (printf @ 5) ␤  at /tmp/Ls_xw_E4jY line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setti…
15:26 colomon n: printf ("%e\n", 1428.3)
15:26 p6eval niecza v24-17-gd343a2a: OUTPUT«Unhandled exception: index out of range␤  at /home/p6eval/niecza/lib/CORE.setting line 1301 (sprintf @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1302 (printf @ 5) ␤  at /tmp/_m0G3uw7aR line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setti…
15:29 moritz colomon: yes, you're only passing one argument (a parcel) to printf
15:30 moritz colomon: because there's a space before the (
15:30 colomon n: printf("%e\n", 1428.3)
15:30 p6eval niecza v24-17-gd343a2a: OUTPUT«1.428300e+003␤»
15:31 colomon moritz++
15:31 PerlJam Seems like that would be an easy thing to check for and give a more awesome error message
15:31 colomon PerlJam: amen
15:31 isBEKaml_mobile joined #perl6
15:35 colomon can anyone think of a better error message for this than "Not enough arguments for this format string" ?
15:35 hash_table joined #perl6
15:36 isBEKaml_mobile moritz: thanks for the merge. Can I send out the mail to p6c or will you? (I figured I'd send it out after upload to rakudo.org, so as not to cause confusion)
15:36 * colomon has the Niecza source open and is only pausing in case someone has a more awesome message
15:36 isBEKaml_mobile (I won't be around for long - crappy network on mobile)
15:40 PerlJam colomon: if you could check the type of the format and see that it's a Parcel, you could say "maybe you put a space before the opening parenthesis?"   :)
15:40 FROGGS colomon: there are error message like: Do ABC if you meant to do XY.
15:41 colomon PerlJam: That is a much more complicated solution!
15:41 FROGGS PerlJam: right
15:41 PerlJam indeed
15:41 FROGGS but these suggestions in the messages are pretty awesome
15:42 leprevost joined #perl6
15:43 PerlJam or ... you could make passing a Parcel as the only arg do what you were expecting.
15:44 PerlJam (I know ... I'm going the wrong way on the simple..complex spectrum)
15:46 moritz isBEKaml_mobile: I haven't uploaded yet (don't have the ssh key at hand; must wait until I get home), so please wait with the p6c mail
15:47 jlaire joined #perl6
15:47 dalek niecza: af64300 | (Solomon Foster)++ | lib/Printf.cs:
15:47 dalek niecza: More meaningful error message when a printf format string tries to consume more arguments than are available.
15:47 dalek niecza: review: https://github.com/sorear/niecza/commit/af64300b47
15:47 * colomon now understands the original $work problem this script was supposed to study, for what it's worth.
15:47 isBEKaml_mobile moritz: Okay. I'll come back in 3-4 hrs ish.
15:48 isBEKaml_mobile BBL
15:48 isBEKaml_mobile left #perl6
15:50 * colomon checked in the simple change to Niecza that probably would have told him what the heck was going on, without mucking about triyng to analyze parcels.
15:52 PerlJam colomon++
15:54 skids joined #perl6
15:59 moritz http://joyofcoding.org/ # sounds like fun :-)
16:01 colomon Huh.  I love the idea of the conference, but the actual schedule they have probably would not convince me to drive an hour for it, much less fly to Europe.  :)
16:01 moritz yes, same here
16:02 timotimo wow, 180 euros
16:02 timotimo for such a short conference!
16:02 FROGGS thats a bit much compared to perl conferences
16:04 tadzik moritz: are you not in Europe anymore?
16:04 benabik joined #perl6
16:07 moritz tadzik: I am :-)
16:07 tadzik not in Europe? :)
16:07 * moritz slaps tadzik
16:07 tadzik Really, how can I tell! :D
16:08 FROGGS ohh, you could tracert him
16:08 tadzik suddenly, Netherlands
16:09 FROGGS gtg home, see ya later
16:09 benabik_ joined #perl6
16:13 brrt joined #perl6
16:14 brrt hi folks, i had an idea recently
16:14 brrt what if we made the allocators / garbage collectors for a (hypothetical) perl vm not only polymorphic, but hierarchical?
16:15 brrt so that for example, we could have an actual stack of call frames, allocated by its own special magic allocator
16:16 brrt and this would live alongside of the common allocator
16:17 rurban wouldn't this be super slow?
16:18 brrt no why?
16:18 brrt or, why whould you think it'd be slow
16:18 rurban The GC wouldn't have a world-view then, it would need to scan all active call frames also
16:18 brrt could easily be that i'd oversee something
16:18 brrt well, yes
16:19 rurban not only data, code also
16:19 brrt why code?
16:19 rurban I'm also thinking the GC for my p2 vm right now.
16:19 brrt whats p2? parrot-two?
16:19 rurban the call frames are in code only
16:19 brrt rurban, we should work together
16:19 rurban perl 11
16:20 brrt ah
16:20 rurban http://perl11.org/p2/
16:20 brrt very well
16:20 brrt hmm
16:20 rurban my GC has no proxies yet, so GC with native threads are slower
16:20 brrt obviously its more complex than i had imagined just now
16:21 rurban Stefan Seiferts hybrid threads are better
16:21 brrt but hierarchical allocators / collectors would allow you to lock only a single allocator at a time
16:21 rurban I'd need some help for sure :)
16:21 rurban hmm
16:22 brrt but, indeed, you wouldn't view the world
16:23 brrt i'm reading that page
16:23 brrt it seems pretty nice
16:27 brrt i'm impressed
16:27 rurban I believe libp2 would easier to target than jvm for nqp, and it will be smaller and faster for sure.
16:27 * PerlJam gets lots of segfaults when running "make test" on potion
16:27 rurban yes, Just fixed the segfaults now... my fault
16:27 brrt well, you can't always get what you want
16:27 brrt :-p
16:27 * brrt is going to be off
16:28 brrt and whenever i do get my own computer back, well, i'll look into this some more
16:28 brrt and maybe i'm going to have to work out the details of a hierarchical allocator / collector scheme, too
16:29 rurban I got windows problems on p2, after switching to a shared lib
16:29 brrt its like evolution, but for vms
16:29 brrt awesome
16:31 PerlJam It would be interesting to see a potion-backed NQP
16:34 pmurias joined #perl6
16:35 hoelzro potion as in _why potion?
16:35 pmurias jnthn: would it be a good idea to use qast_output_is_approx($block,$number)?
16:35 amkrankruleuen joined #perl6
16:38 rurban yes, _why's potion. I tried to contact hime, but it's hard when you are not french, I guess. I'll be in Sandy, UT tomorrow though
16:38 rurban Esp. to ask around the GC
16:41 pmurias rurban: how does being french help with contacting _why? timezones?
16:47 rurban pmurias: He is notorious for not ansering, but he loves the french somehow
16:51 bluescreen10 joined #perl6
16:51 rurban we are also struggling with libsyck not being maintained
16:57 pmurias rurban: have you considered basing p2 on v8 or the dart vm?
16:58 rurban for sure not. p2 is a much better VM than v8 or the dart vm.
16:58 rurban faster, better and smaller
16:58 spider-mario joined #perl6
16:58 rurban I thought first of vmkit, but it was too big and horrible code.
17:02 benabik I lost a lot of interest in VMKit once I realized their GC was written in Java and then JITted using their custom JVM-in-VMKit system.
17:07 benabik_ joined #perl6
17:10 FROGGS joined #perl6
17:13 pmurias rurban: did you do benchmarks? (I didn't)
17:13 dalek rakudo-js: 82e01d7 | (Paweł Murias)++ | t/ (3 files):
17:13 dalek rakudo-js: steal t/qast_trig.t, use &quast_output_is_approx when comparing floating point values
17:13 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/82e01d7cab
17:16 Chillance joined #perl6
17:21 dalek rakudo-js: 401da8f | (Paweł Murias)++ | t/qast_string.t:
17:21 dalek rakudo-js: steal t/qast_string.t
17:21 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/401da8f540
17:23 rurban pmurias: benches are at the top of http://perl11.org/p2/   the alioth benchmartk scripts are also there as example.
17:27 benabik joined #perl6
17:28 thou joined #perl6
17:32 kaleem joined #perl6
17:36 wk joined #perl6
17:37 MayDaniel joined #perl6
17:56 rurban I'm gone now for a week into the mountains of UTAH
18:00 PacoAir joined #perl6
18:06 moritz phenny: tell isBEKaml that I uploaded the 2013.01 release tarballs. Thanks for doing the release!
18:06 phenny moritz: I'll pass that on when isBEKaml is around.
18:07 [Coke] rurban: have fun!
18:14 PerlJam moritz: is there more of a procedure than "whoever is doing the release gets the tarballs to someone who can upload them" ?
18:16 moritz PerlJam: no, not yet :(
18:16 moritz PerlJam: we're pretty new to this business of having 1) non-commiters doing the releases and 2) not having github uploads
18:47 colomon joined #perl6
18:54 simcop2387_ joined #perl6
18:54 simcop2387_ joined #perl6
18:57 jnthn evening o/
18:58 arnsholt 'lo
18:58 FROGGS hi
19:01 alec joined #perl6
19:02 fgomez joined #perl6
19:04 FROGGS r: sub redo_ { 42 }; say redo_
19:04 p6eval rakudo 3a8d48: OUTPUT«42␤»
19:04 FROGGS r: sub next_ { 42 }; say next_
19:04 p6eval rakudo 3a8d48: OUTPUT«42␤»
19:04 FROGGS r: sub next_ { 42 }; say next_()
19:04 p6eval rakudo 3a8d48: OUTPUT«42␤»
19:04 FROGGS r: sub next_() { 42 }; say next_()
19:04 p6eval rakudo 3a8d48: OUTPUT«42␤»
19:05 FROGGS nqp: sub next_() {}; next_()
19:05 p6eval nqp: OUTPUT«Confused at line 2, near "next_()"␤current instr.: 'panic' pc 13207 (src/stage2/gen/NQPHLL.pir:4680) (src/stage2/gen/NQPHLL.pm:328)␤»
19:05 FROGGS nqp: sub redo_() {}; redo_()
19:05 p6eval nqp: OUTPUT«Confused at line 2, near "redo_()"␤current instr.: 'panic' pc 13207 (src/stage2/gen/NQPHLL.pir:4680) (src/stage2/gen/NQPHLL.pm:328)␤»
19:05 FROGGS ahh
19:05 FROGGS nqp: sub last_() {}; last_()
19:05 p6eval nqp: OUTPUT«Confused at line 2, near "last_()"␤current instr.: 'panic' pc 13207 (src/stage2/gen/NQPHLL.pir:4680) (src/stage2/gen/NQPHLL.pm:328)␤»
19:05 FROGGS nqp: sub ne_() {}; ne_()
19:05 p6eval nqp:  ( no output )
19:08 jnthn phenny: tell pmurias we could do something like that, yes
19:08 phenny jnthn: I'll pass that on when pmurias is around.
19:19 alec__ joined #perl6
19:25 masak_ joined #perl6
19:25 sergot_ joined #perl6
19:26 Yappocall_ joined #perl6
19:26 Gothmog__ joined #perl6
19:26 zby_home joined #perl6
19:29 jlaire_ joined #perl6
19:30 bakedb joined #perl6
19:32 * skids has officially done too much perl6.  Finding perl5 sigil dereferencing very foreign
19:35 moritz skids: today I tried %hash.perl in Perl 5 code :-)
19:36 skids I spent 3 minutes trying to figure out that I should be saying $r->{key} instead of $r{key}
19:37 sjn joined #perl6
19:37 skids fortunately I did remember to use Data::Dumper :-)
19:37 TimToady that's just about the first thing we fixed in designing Perl 6
19:39 masak_ skids: well, naturally you can't call the reference to a function, you have to call the function :P
19:41 timotimo what does using $r{key} cause in perl5? a LTA error message?
19:42 TimToady no such array %r
19:42 doy "Global symbol "%r" requires explicit package name"
19:42 TimToady which is LTA several ways
19:42 Targen joined #perl6
19:43 timotimo "in perl5, please use ->{...}" ;)
19:43 skids That is assuming you are using strict.  Otherwise it just hands you and undef.
19:43 huf err, hash
19:43 skids s/d//
19:43 arnsholt skids: If you're not using strict you deserve what you get ;p
19:44 TimToady "it just hans you and undef"?  :)
19:44 skids damn I missed a d.
19:46 geekosaur just displaced it a bit :)
19:47 timotimo i would like some help to figure out why i get "Null PMC access in get_string()" when i do this locally:
19:47 timotimo r: class Foo is Barf { }
19:47 p6eval rakudo 3a8d48: OUTPUT«[31m===[0mSORRY![31m===[0m�Cannot call 'trait_mod:<is>'; none of these signatures match:�:(Mu:U $child, Mu:U $parent)�:(Attribute:D $attr, :rw(:$rw)!)�:(Attribute:D $attr, :readonly(:$readonly)!)�:(Attribute:D $attr, :box_target(:$box_target)!)�:(Routine:D $r, …
19:53 [Coke] timotimo: what version of rakudo?
19:54 [Coke] are you using the REPL, command line, a fiel?
19:54 timotimo based on efac0f172751d41bbeb7b4639b3325cf557312ef - this is the repl
19:55 [Coke] works the other 2 ways - it's only failing in the REPL.
19:55 [Coke] I suspect because it's throwing an error
19:57 [Coke] you need the REPL and the is.
19:57 timotimo ah, yes, when i use a file instead, i get a more helpful error. thanks!
19:58 timotimo indeed, i forgot to yada the exception i had created
19:59 [Coke] that's probably still a bug that should be fixed, though.
19:59 [Coke] not sure why the REPL is acting differently on that particular error.
20:01 timotimo is there any hope at all for getting a faster rakudo compilation in the future?
20:01 timotimo except: "throw a faster cpu at it"?
20:02 nwc10 throw it onto a different VM?
20:02 timotimo hm, jnthn do you think nqp-jvm will be faster at compiling?
20:04 timotimo maybe when the compiler itself runs on the jvm already
20:06 timotimo Nominal type check failed for parameter '$got'; expected Any but got Foo instead  -  i *really* have no idea how i got that to happen. any way to get a nqp-level stacktrace or something?
20:08 alec__ joined #perl6
20:09 timotimo indeed, --ll-exception seems helpfuler
20:09 ermlich joined #perl6
20:12 masak jQuery seems to have an interesting approach to their ecosystem: http://blog.jquery.com/2013/01/16/an​nouncing-the-jquery-plugin-registry/
20:12 masak (possibly relevant for Panda enthusiasts)
20:12 * tadzik reads
20:12 nwc10 this is arm-wavy, but I hope that the JVM offers better profiling tools than Parrot, meaning that it becomes easier to spot if there are any quick wins on the compiler
20:12 nwc10 either CPU or memory
20:26 sjohnson joined #perl6
20:30 swarley-freenode joined #perl6
20:38 swarley How would I do a unicode range in a regular expression?
20:38 swarley i.e [\u0080-\00c0]
20:39 swarley s/\\00c0/\\u00c0/
20:39 moritz nr: say 'A' ~~  / <[  \c[64] .. \c[66] ]> /
20:39 p6eval rakudo 3a8d48: OUTPUT«「A」␤␤»
20:39 p6eval ..niecza v24-18-gaf64300: OUTPUT«#<match from(0) to(1) text(A) pos([].list) named({}.hash)>␤»
20:39 moritz skids: like this
20:39 moritz erm sorry, meant swarley
20:40 swarley oh okay, thank you
20:46 ismail joined #perl6
20:46 masak swarley: infix:<..> means "range" in the big language, so we borrowed it to mean that in the small language too :)
20:50 timotimo jnthn: so i'm trying to enhance apply-trait to catch the X::Inheritance::UnknownParent (that i just created) that gets rethrown from self.ex-handle, but i don't know how. nqp doesn't seem to like my try { ex-handle; CATCH { when X::Inheritance::UnknownParent { ... } } }.
20:52 timotimo oh, duh, of course say takes parens around the argument
20:56 timotimo didn't make it better, now it gets OOM-killed in stage "start"
21:11 jnthn timotimo: NQP doesn't have given/when, you'll need an explicit nqp::istype
21:11 jnthn Or something like
21:11 jnthn *like that
21:13 [Coke] nwc10: the kcachegrind output from parrot is pretty helpful.
21:14 [Coke] but yah, there are alot of JVm specific tools that can give you a lot of data - some of it only relevant to the java side, though.
21:15 timotimo i'm not doing that correctly. can i nopaste you my diff and you'll have a quick look?
21:15 timotimo http://sprunge.us/Taei
21:15 timotimo currently unable to compile it, i think. it OOMs.
21:16 [Coke] am I the only one that wants to line up those { ... } blocks?
21:17 [Coke] timotimo: why is the CATCH doing an explicit check on exception type in code rather than as CATCH { <type> { handler for this type } } ?
21:17 prammer joined #perl6
21:18 [Coke] er, CATCH { when X::Inheritance::UnknownParent { ... } }
21:19 bapa joined #perl6
21:19 jnthn [Coke]: it's NQP code
21:19 jnthn [Coke]: NQP doesn't support such sugar :)
21:19 [Coke] jnthn: but waaaaaah
21:19 thou joined #perl6
21:19 jnthn timotimo: Try commenting out the rethrow
21:19 * [Coke] wishes there was some sort of easy way to tell if something is p6 or nqp6.
21:21 jnthn timotimo: Oh. NQP has an annoying bug that can make rethrows inside CATCH blocks hang (since the CATCH block catches the re-throw) :/
21:21 timotimo ooooh
21:21 jnthn You may be running into that.
21:21 timotimo that's why ex-handle does the thing with the $nok variable!
21:24 timotimo bbl
21:31 masak [Coke]: I've been coding nqp for a few days now. I tend to lean on the files in t/nqp for what's possible and idiomatic.
21:57 timotimo "half minute hero" is the right game for compiling rakudo in between tests
22:04 LordVorp joined #perl6
22:05 johnjohn101 joined #perl6
22:06 johnjohn101 do i get rakudo support in this channel?
22:06 doy yes
22:06 johnjohn101 what it the best way to put rakudo onto ubuntu?
22:10 jnthn johnjohn101: Depends how you define "best". Probably best is to grab the latest tarball from http://rakudo.org/downloads/star/ and compile it. That way you get something up to date.
22:14 timotimo how do i get the name of a class? Mu:U $type is the thing in my signature. neither ^.name nor .name nor HOW.name work
22:14 timotimo (at least with .HOW.name i get "too few positional arguments passed: 1. expected 2")
22:14 jnthn $obj.HOW.name($obj)
22:15 timotimo oh. well that makes some sense
22:15 jnthn meta-objects are factored that way to make sure we can support prototypical object systems too, where the HOW is a singleton.
22:22 timotimo i've got multi trait_mod:<is>(Mu:U $type, *%fail) { and i use %fail.keys[0] to initialise the $.parent attribute of the exception. any idea why it's Any instead of a string?
22:23 jnthn r: multi trait_mod:<is>(Mu:U $type, *%fail) { say %fail.keys }; class Foo is Bar { }
22:23 p6eval rakudo 3a8d48: OUTPUT«Bar␤»
22:23 jnthn r: multi trait_mod:<is>(Mu:U $type, *%fail) { say %fail.keys[0] }; class Foo is Bar { }
22:23 p6eval rakudo 3a8d48: OUTPUT«Bar␤»
22:24 jnthn timotimo: No, it seems to work there...
22:24 timotimo does it make a difference that it's in src/core?
22:24 jnthn Shouldn't.
22:24 timotimo oh, duh! i renamed the attribute some time ago, but didn't change the new call
22:24 jnthn ah :)
22:24 timotimo advancing at a snail's pace here :|
22:25 timotimo but i'm progressing in "Half Minute Hero" instead, so ... not all wasted time :)
22:25 masak isBEKaml++ # Rakudo #60
22:25 dalek perl6-roast-data: 561975f | coke++ | / (4 files):
22:25 dalek perl6-roast-data: today (automated commit)
22:25 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/561975f614
22:25 lichtkind joined #perl6
22:25 [Coke] rakudo summary showing one passed todo test.
22:26 [Coke] (integration/99problems-21-to-30.t)
22:27 erkan joined #perl6
22:27 erkan joined #perl6
22:29 timotimo sounds nice :)
22:30 timotimo "Foo cannot inherit from Unknown because it is unknown."  -  but it doesn't seem to have a proper stack trace (or rather: position information)
22:30 timotimo the line number is there, but the -----> points at an empty string
22:31 jnthn timotimo: That's not specific to your exception
22:32 timotimo OK
22:32 timotimo any particular place/file where the levenshtein function would fit in?
22:33 jnthn If you're just gonna call it from World, guess it could go in there
22:33 stevan_ joined #perl6
22:34 stevan__ joined #perl6
22:35 timotimo okay
22:37 lichtkind timotimo: may i ask you how long your active on perl6?
22:41 timotimo a few months. 2 at most, i think
22:44 timotimo oh, there's another problem, jnthn. Should i be able to nqp::istype($_, X::Inheritance::UnknownParent) inside the CATCH block? because i have a say in there that doesn't seem to be called.
22:45 jnthn timotimo: You need to use find_symbol to lookup up the exception type
22:46 hash_table joined #perl6
22:50 Rix joined #perl6
22:55 timotimo jnthn: so i'm thinking i'll look at the code in find_symbol and modify it so that it enumerates all names and compares them against the given name, would that make sense or is there a simpler way to go through all symbols that exist? should i even recurse into Foo::* and Bar::* if i find them?
22:57 jnthn timotimo: No, walking the blocks is probably the easiest way
22:57 jnthn timotimo: You only need care about type objects
22:58 jnthn nqp::isconcrete($thing) will produce 0 for the things you need to care about.
22:58 timotimo excellent, thanks! :)
23:01 timotimo would something like this work? my @candidates; sub evaluate($candidate) { nqp::push(@candidates, $candidate) if levenshtein($candidate, $attempted) < 5 }; walk-blocks(&evaluate);? (mostly wondering about passing the sub and the lexical scope of @candidates)
23:02 rking joined #perl6
23:04 jnthn Should do; nqp gets closures pretty right :)
23:05 timotimo that's a pretty excellent thing for a "low level"/"close to metal"/"compiler implementation" language
23:06 masak closures are fairly close to the metal, if your metal is made of lambda calculus :P
23:06 jnthn I use them all over the compiler. They're too useful not to have.
23:06 timotimo agreed
23:06 masak that's how I feel about them nowadays too.
23:06 jnthn I'm at the point where I find it hard to think in languages that lack them.
23:07 masak aye, same.
23:07 jnthn C I can sorta cope-ish with in so far as it has function pointers, even if not closures.
23:07 jnthn But Java often leaves me scratching my head. :)
23:07 masak C has an excuse: it has manual memory management.
23:08 jnthn Aye
23:08 masak so C essentially does the most with what it has.
23:08 masak Java has no such excuse.
23:09 jnthn C isn't a language I'd choose for many projects, but certainly ain't something I seek to avoid when it fits.
23:09 pmurias joined #perl6
23:09 pmurias jnthn: ping
23:09 phenny pmurias: 19:08Z <jnthn> tell pmurias we could do something like that, yes
23:09 jnthn pmurias: o/
23:14 TimToady swarley: you'd want \xDEAD to specify a Unicode character in hex
23:15 masak r: say "\xDEAD"
23:15 p6eval rakudo 3a8d48: OUTPUT«===SORRY!===␤Invalid character for UTF-8 encoding␤␤»
23:16 masak ...though perhaps not exactly that one :P
23:16 pmurias jnthn: I have already switched to that for rakudo-js, should I change nqp-jvm-pre?
23:16 jnthn pmurias: Yes, please.
23:16 swarley r: say "\x00A1"
23:16 p6eval rakudo 3a8d48: OUTPUT«¡␤»
23:16 jnthn pmurias: Have you a commit bit?
23:19 pmurias no
23:20 jnthn you have now
23:21 masak 'night, #perl6
23:23 lichtkind good night masak
23:25 sorear o/
23:25 timotimo nqp::istype($_, self.find_symbol(["X", "Inheritance", "UnknownParent"])) { - this seems wrong - what's the right way to do this?
23:26 pmurias jnthn: http://pastie.org/5712221
23:26 jnthn timotimo: It looks right to me...
23:27 timotimo http://sprunge.us/NYNI
23:27 timotimo this is the code i've come up with so far. the say doesn't seem to be called.
23:27 jnthn pmurias: Huh...
23:28 lue hello o/
23:28 jnthn pmurias: Have you had problems building this before?
23:29 jnthn timotimo: I wonder if the issue is that you've got the Parrot exception there, which has the Perl 6 one wrapped up inside of it
23:29 sorear lue o/
23:29 jnthn timotimo: Try nqp::getpayload($_)
23:29 jnthn (in place of the $_)
23:29 timotimo thanks, will try
23:29 timotimo should i ex := thepayload, too?
23:30 jnthn yeah
23:30 pmurias jnthn: tried building it for the first time
23:30 * lue is once again vexed with NQP and add_parrot_vtable_handler_mapping
23:31 pmurias jnthn: maybe I have a wrong version of java
23:31 jnthn pmurias: That's about my best guess
23:31 jnthn lue: I wouldn't vex yourself too much with that, it's endangered...
23:32 pmurias jnthn: java -version => http://pastie.org/5712243
23:32 lue Well, not that specifically. I meant a role's apparent inability to apply is traits to a role's variable in NQP.
23:32 jnthn I have java version "1.7.0_07"
23:37 * pmurias has tried to avoid java thus far, so is completely ignorant about the various versions etc.
23:38 * jnthn has avoid it for most of his career also ;)
23:38 * lue has successfully avoided Oracle Java so far.
23:39 timotimo jnthn: your guess was absolutely correct. rethrowing the payload of the exception gets me an error, though, so i'll rethrow the wrapped exception instead. ("SixModelObject does not implement get_pmc_keyed_str")
23:40 jnthn I've only ever delivered one thing in Java for a $dayjob client, some years ago. AFAIK, it's still making them plenty of money...
23:40 skids joined #perl6
23:41 jnthn timotimo: aye, sounds right
23:43 pmurias jnthn: updating the java version seemed to solve the problem
23:43 jnthn \o/
23:45 pmurias all tests pass
23:45 jnthn Dang, I need to write more tests :P
23:45 diakopter <.<.
23:46 * lue suddenly thinks of NQP and gcj ...
23:47 pbt joined #perl6
23:52 pmurias jnthn: btw shouldn't a 3.0 be printed as 3 instead of 3?
23:53 pmurias * instead of 3.0
23:55 jnthn prn: say 3.0e0
23:55 p6eval rakudo 3a8d48, niecza v24-18-gaf64300, pugs: OUTPUT«3␤»
23:55 jnthn Looks like ;)
23:55 jnthn It's not intentional, just what someDouble.toString() does by default.
23:55 pmurias nqp: say 3.0;
23:55 p6eval nqp: OUTPUT«Confused at line 2, near "say 3.0;"␤current instr.: 'panic' pc 13207 (src/stage2/gen/NQPHLL.pir:4680) (src/stage2/gen/NQPHLL.pm:328)␤»
23:55 pmurias nqp: say(3.0);
23:55 p6eval nqp: OUTPUT«3␤»
23:57 * pmurias will try to fix that once "make test" finishes running
23:58 timotimo what's the canonical way to iterate over all entries in a hash in nqp? there seems to be no nqp::hashkeys or nqp::keys or something?
23:58 pmurias timotimo: for
23:58 pmurias timotimo: it gives you a key/value object
23:59 timotimo oh, that's surprisingly good
23:59 timotimo does it work the same way with iterating over lists? why do i keep seeing my $i := +@foo; while $i > 0 { ... }?

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

Perl 6 | Reference Documentation | Rakudo