Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-03-03

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:04 irclogbot_backup joined #perl6
00:04 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
00:04 prammer joined #perl6
00:04 huf joined #perl6
00:04 risou joined #perl6
00:07 yeltzooo joined #perl6
00:14 quester left #perl6
00:21 cognominal joined #perl6
00:22 colomon phenny: tell drKreso To be more precise after experimentation, moritz's code still works for me.
00:22 phenny colomon: I'll pass that on when drKreso is around.
00:29 lue rn: say (2/10).perl
00:29 p6eval niecza v24-24-gbdc3343: OUTPUT«<1/5>␤»
00:29 p6eval ..rakudo 123dfa: OUTPUT«1/5␤»
00:38 cognominal joined #perl6
00:41 lue has that bug been reported?
00:42 lue [ (2/10).perl should return .2, not <1/5> ]
00:43 colomon spec reference?
00:44 colomon Last time I looked, niecza had it correct there.
00:44 uvtc TimToady: thanks. Didn't know P6 had Nil, nor True and False come to think of it.
00:45 lue S02:787..789
00:45 uvtc lue: re. an Emacs perl6 mode, that would be nice. :)
00:47 lue colomon: there's the reference ^^^ (if you didn't already see it)
00:47 colomon hmmm.  <1/5> is a Rational literal.  but I suppose it's arguably not a Rat.  interesting.
00:48 lue uvtc: I actually modified my copy of cperl to not count «» as punctuation (which fixes hyperops etc. parsing.) Sadly I haven't the patience to dig through the rest of that beast
00:49 lue rnp: say <1/5>.perl
00:49 p6eval niecza v24-24-gbdc3343: OUTPUT«<1/5>␤»
00:49 p6eval ..rakudo 123dfa, pugs: OUTPUT«"1/5"␤»
00:49 colomon n: say <1/5>.WHAT
00:49 p6eval niecza v24-24-gbdc3343: OUTPUT«(Rat)␤»
00:49 lue rp: say <1/5>.WHAT
00:49 lue rnp: say <1/5>.WHAT
00:49 p6eval niecza v24-24-gbdc3343: OUTPUT«(Rat)␤»
00:49 p6eval ..pugs: OUTPUT«Str()␤»
00:49 p6eval ..rakudo 123dfa: OUTPUT«(Str)␤»
00:49 colomon that should be RatStr according to the spec
00:50 uvtc lue: I've never written an Emacs mode, nor worked on one. I wonder if it would be worthwhile to have a simple p6 mode that would just for now highlight comments and strings.
00:50 colomon oh, no, <1/2> should be a Rat, but < 1/2 > is a RatStr.
00:50 * colomon glares at TimToady
00:51 lue uvtc: I could start on a P6 mode later, once I'm done working on my current P6 endeavor.
00:51 uvtc lue: just curious: what's your current p6 endeavor?
00:51 lue colmon: I wonder why one wouldn't want to do (1/2) (or rather, insist on <>)
00:53 lue uvtc: just some tutorial-esque docs for P6 (haven't publicized them anywhere yet though). Nothing I can't stop soon :)
00:54 lue (that's also why I've been testing things and such in S02 the past few days, including this Rat business right now)
00:54 uvtc lue: be sure to talk with tadzik ; I think he may also be interested in tutorial-esque docs.
00:55 uvtc lue: I've been keeping some notes of my own (different url since the last time I mentioned it), but they're mostly just basic "baby Perl 6" notes right now.
00:56 Khisanth joined #perl6
00:57 lue I want to be done with my S02-related doc at least before pushing to a github repo :)
00:58 uvtc S02 is large.
00:58 colomon n: say <1/1000000>
00:58 p6eval niecza v24-24-gbdc3343: OUTPUT«1E-06␤»
00:58 colomon n: say pi
00:58 p6eval niecza v24-24-gbdc3343: OUTPUT«3.1415926535897931␤»
00:58 colomon n: say <1/1000000>.perl
00:58 p6eval niecza v24-24-gbdc3343: OUTPUT«<1/1000000>␤»
00:58 colomon n: say pi.perl
00:58 p6eval niecza v24-24-gbdc3343: OUTPUT«3.1415926535897931e0␤»
00:59 colomon ugh, right.
00:59 lue uvtc: yup :) . And I mention that at the very beginning.
01:00 colomon lue: say <2/6>.perl  # <1/3>
01:00 colomon ie niecza is correct
01:00 colomon at least according to the corner of the spec I'm looking at.  :)
01:00 lue .oO(Now that my "secret" project is out, I might actually push soon, so I don't make annoyingly vague statements about it)
01:00 lue r: say <1/1000000>
01:00 p6eval rakudo 123dfa: OUTPUT«1/1000000␤»
01:00 lue r: say <1/1000000>.perl
01:00 p6eval rakudo 123dfa: OUTPUT«"1/1000000"␤»
01:00 colomon lue: oh, wait, found the other bit.
01:01 lue r: say (1/1000000)
01:01 p6eval rakudo 123dfa: OUTPUT«0.000001␤»
01:01 colomon n: say <1/10>.perl
01:01 p6eval niecza v24-24-gbdc3343: OUTPUT«<1/10>␤»
01:01 lue If the denominator has solely factors 2, 5, and/or -1, .perl is supposed to return a decimal.
01:02 colomon lue: yes
01:02 colomon pulling up niecza source now
01:02 colomon lue: can you check the test suite for this?
01:02 * lue will check
01:07 lue The only /[Fat]?Rat/ based .perl tests don't test for decimalization, it seems
01:08 colomon FatRat shouldn't
01:08 colomon but Rat should
01:08 colomon you work on the tests, I'll work on the code?
01:08 lue for niecza and rakudo?
01:09 lue Should I place the tests in S02 or S32? (Methinks S32-num/rat.t)
01:10 colomon that's a good question.  probably s32-num/rat.t is good enough for now.
01:19 lue colomon: If you aren't going to fix rakudo, I'll file the necessary rakudobug
01:19 colomon right now I'm pondering a good way to test for "only factors are 2 and 5".
01:25 dalek roast: f788145 | lue++ | S32-num/rat.t:
01:25 dalek roast: [S32-num] add tests for Rat.perl
01:25 dalek roast:
01:25 dalek roast: Specifically test to make sure .perl returns a decimal answer if the
01:25 dalek roast: denominator consists solely of the factors 2, 5, and/or -1.
01:25 dalek roast: review: https://github.com/perl6/roast/commit/f788145091
01:27 lue .oO(I personally feel .perl should just return the decimal if it terminates, as opposed to the weirdly specific conditions, but oh well.)
01:27 * lue --dinner &
01:30 sorear lue: Those conditions are equivalent to "it terminates"
01:31 sorear colomon: $i /= 2 while $i %% 2; %i /= 5 while $i %% 5; say $i == 1
01:32 TimToady div= ?
01:32 bowtie joined #perl6
01:32 TimToady I guess it doesn't matter
01:38 Eddward joined #perl6
01:39 colomon sorear: I was hoping for something more efficient.  :)
01:40 colomon just looking at Hacker's Delight for clues to figuring out how to get rid of the 2s quickly.
01:40 colomon n: say 2348234893284 +& -2348234893284
01:40 p6eval niecza v24-24-gbdc3343: OUTPUT«4␤»
01:40 colomon n: say 2348234893284 / 4
01:40 p6eval niecza v24-24-gbdc3343: OUTPUT«587058723321␤»
01:41 TimToady well, find first set bit will let you divide by powers of 2
01:41 colomon TimToady: right, that's above.
01:42 colomon does that formula actually work with bigints?  I'm thinking yes, but I'm always worried about it.  :)
01:42 TimToady and you can put powers of 5 in a table, if that's faster than division
01:42 sorear the denominator of a rat is not a bigint, though
01:42 colomon n: say 23482348932842222222222222222222222222222 +& -23482348932842222222222222222222222222222
01:42 p6eval niecza v24-24-gbdc3343: OUTPUT«2␤»
01:43 sorear niecza's bitops don't work with bigints anyway
01:43 colomon n: my $a = 4234882849023849082390489 * 2 ** 124; say $a +& -$a
01:44 colomon r: my $a = 4234882849023849082390489 * 2 ** 124; say $a +& -$a
01:44 TimToady there's control ] in there
01:44 colomon argh
01:44 colomon n: my $a = 321412 * 2 ** 124; say $a +& -$a
01:44 p6eval niecza v24-24-gbdc3343: OUTPUT«85070591730234615865843651857942052864␤»
01:45 colomon n: my $a = 321412 * 2 ** 124; my $b =  $a +& -$a; say $b; say $a % $b
01:45 p6eval niecza v24-24-gbdc3343: OUTPUT«85070591730234615865843651857942052864␤0␤»
01:45 sorear colomon: If you multiply a 64-bit number by 14757395258967641293 and throw away the overflow, you get the same result as dividing by 5 if the number was divisible by 5 in the first plce
01:46 sorear you can check if it worked correclty by testing the result against 3689348814741910323.  if it's greater, there was a remainder.
01:46 * sorear hides
01:46 colomon sorear++
01:46 colomon n: my $a = 321412 * 2 ** 124; my $b =  $a +& -$a; say $b; say $a % $b; say $a div $b
01:46 p6eval niecza v24-24-gbdc3343: OUTPUT«85070591730234615865843651857942052864␤0␤80353␤»
01:47 sorear all odd numbers are invertable in the ring Z/2^64Z
01:47 sorear whether this is actually any faster than division remains to be seen
01:50 sorear You could probably use a base-5 Schoenhage-Strassen approach to find the 5-adic norm of an integer in quasilinear time
01:50 sorear cut the number in half, multiply the left side by a large power of 2 using the radix-5 bigints, repeat
01:51 colomon I'm trying it with the $a +& -$a trick for 2 and your %i /= 5 while $i %% 5 for 5.
01:53 sorear r: say (2**128 +| 2**256) == (2**128 + 2**256)
01:53 p6eval rakudo 123dfa: OUTPUT«True␤»
01:53 sorear n: say (2**128 +| 2**256) == (2**128 + 2**256)
01:53 p6eval niecza v24-24-gbdc3343: OUTPUT«True␤»
01:54 sorear r: say (2**128 +| 2**256)
01:54 p6eval rakudo 123dfa: OUTPUT«115792089237316195423570985008687907853610267032561502502920958615344897851392␤»
01:54 sorear r: say (2**128 +^ 3)
01:54 p6eval rakudo 123dfa: OUTPUT«340282366920938463463374607431768211459␤»
01:54 sorear um
01:54 sorear apparently somebody added bigint bitops to niecza when I wasn't looking
01:54 sorear somebody++
01:55 sorear also, I can't seem to find anything online on fast ways to do the 5-adic norm of a bigint
01:55 colomon sorear: that was me.
01:55 colomon at least, I think I remember doing that.
01:56 colomon BigInteger.cs has all the ones I did built-in, I think, just a matter of wiring it up.
02:07 colomon spectesting...
02:17 Eddward r: say "test"
02:17 p6eval rakudo 123dfa: OUTPUT«test␤»
02:17 Eddward r: (0 but Bool::True) and print "$_" for 1..30
02:17 p6eval rakudo 123dfa: OUTPUT«(signal ABRT)12345678910111213»
02:18 Eddward r: (0 but Bool::True) and print "$_" for 1..33
02:18 p6eval rakudo 123dfa: OUTPUT«(signal ABRT)12345678910111213»
02:18 Eddward r: (0 but Bool::True) and print $_ for 1..33
02:18 p6eval rakudo 123dfa: OUTPUT«(signal ABRT)12345»
02:19 Eddward doesn't fail locally without the quotes.
02:19 Eddward r: (0 but Bool::True) and print $_ for 1..3
02:19 p6eval rakudo 123dfa: OUTPUT«123»
02:19 Eddward r: (0 but Bool::True) and print $_ for 1..20
02:19 p6eval rakudo 123dfa: OUTPUT«(signal ABRT)12345»
02:19 Eddward r: (0 but Bool::True) and print $_ for 1..10
02:19 p6eval rakudo 123dfa: OUTPUT«(signal ABRT)12345»
02:19 Eddward r: (0 but Bool::True) and print $_ for 1..4
02:19 p6eval rakudo 123dfa: OUTPUT«1234»
02:20 Eddward r: (0 but Bool::True) and print $_ for 1..5
02:20 p6eval rakudo 123dfa: OUTPUT«12345»
02:20 Eddward r: (0 but Bool::True) and print $_ for 1..6
02:20 p6eval rakudo 123dfa: OUTPUT«(signal ABRT)12345»
02:20 Eddward bingo
02:22 colomon ye gads, niecza is failing a lot of spectests at the moment.
02:26 FROGGS_ joined #perl6
02:26 sqirrel__ joined #perl6
02:28 colomon also, I have broken ABC.  sigh.
02:30 lue sorear: under the current "can return a decimal under .perl" rules (as I understand them), 3/6 wouldn't count, despite being just .5 (but if I *really* needed stuff like this to work, I'd use .gist or create my own method, so it's not that problematic)
02:36 colomon lue: there are rat stringification tests in S32-num/stringify.t and they are wrong.
02:36 sorear lue: 3/6 isn't a valid rational
02:37 sorear rat objects are always kept in lowest terms
02:38 lue ? I could swear S02 says it only reduces if needed (So if .perl doesn't imply the need to reduce first, 3/6 is valid)
02:39 lue r: my $a = 3/6; say $a.nu; say $a.de;
02:39 p6eval rakudo 123dfa: OUTPUT«No such method 'nu' for invocant of type 'Rat'␤  in block  at /tmp/y7HEVCbzAY:1␤␤»
02:39 colomon S02 does try to say you don't have to reduce, but every implementation ever has.
02:42 lue Ah. I just now see that the part on that is saying "could" instead of "will"
02:44 lue Should I remove the tests I added from S32-num/rat.t then?
02:44 colomon did you push them?
02:44 lue yeah, look earlier
02:46 gcole joined #perl6
02:46 colomon give me a bit to sort this out.  I may just move them to this test file.
02:48 lue oh, if you're working on the spec, I'll leave it alone. (I remove the angle brackets stringify.t's Rat_str_test and converted the calls to it appropriately)
02:48 lue *removed *in stringify.t's
02:53 colomon n: (4.5 ** 60).WHAT
02:53 p6eval niecza v24-24-gbdc3343:  ( no output )
02:54 colomon n: say (4.5 ** 60).WHAT
02:54 p6eval niecza v24-24-gbdc3343: OUTPUT«(Rat)␤»
02:54 colomon n: say (4.5 ** 60).nude
02:54 p6eval niecza v24-24-gbdc3343: OUTPUT«1797010299914431210413179829509605039731475627537851106401 1152921504606846976␤»
02:55 * lue thinks it's safe to file a rakudobug on (1/2).perl
02:56 colomon n: say (4.5 ** 60).perl
02:56 p6eval niecza v24-24-gbdc3343: OUTPUT«<1797010299914431210413179829509605039731475627537851106401/1152921504606846976>␤»
02:58 colomon n: say 1152921504606846976 +& -1152921504606846976
02:58 p6eval niecza v24-24-gbdc3343: OUTPUT«1152921504606846976␤»
02:58 colomon n: say 1152921504606846976 / 1152921504606846976
02:58 p6eval niecza v24-24-gbdc3343: OUTPUT«1␤»
02:59 colomon oh, that's special
03:00 colomon need a better stringifier
03:01 uvtc How do I write to stderr?
03:01 geekosaur $*STDERR I think?
03:02 uvtc I think it's $*ERR.
03:02 uvtc But how do I print to it?
03:02 uvtc r: say $*ERR "hi"
03:02 colomon r: $*ERR.say: "This is how?"
03:02 p6eval rakudo 123dfa: OUTPUT«[31m===[0mSORRY![31m===[0m�Two terms in a row�at /tmp/ecwlH6HjYq:1�------> [32msay $*ERR [33m�[31m"hi"[0m�    expecting any of:�        postfix�        infix or meta-infix�        infix stopper�        statement end�        statement modifier�        statem…
03:02 p6eval rakudo 123dfa: OUTPUT«This is how?␤»
03:03 uvtc ttiar
03:03 cognominal joined #perl6
03:03 uvtc Oh. `warn` I think.
03:06 uvtc Ah, in S32/IO.
03:06 uvtc Looks like `note` is similar.
03:07 lue uvtc: did you see what colomon just tried?
03:07 uvtc Ooof!
03:07 uvtc Sorry about that. :)
03:08 uvtc lue, colomon : thanks
03:08 lue (you *could* use note or warn, but $*ERR.say doesn't attach any Perl 6-y exception stuff to the message)
03:10 cognominal__ joined #perl6
03:10 colomon also the basics of $*ERR.say generalize to outputting to any file handle.
03:10 TimToady note is not supposed to attach anything
03:11 uvtc Note doesn't attach any additional info for me. Which is nice.
03:11 uvtc So I got *that* going for me. Which is nice.
03:11 TimToady note is simply for talking to STDERR
03:12 xilo_ joined #perl6
03:14 lue ah. I thought it would.
03:16 baest_ joined #perl6
03:17 xilo_ joined #perl6
03:18 orafu joined #perl6
03:18 sjn joined #perl6
03:18 uvtc Is there a way to call `my @lines = slurp 'foo.txt'` to autochomp all lines?
03:20 lue uvtc: if you want to remove the newline from every line, then    my @lines = slurp('foo.txt').lines».chomp
03:20 lue (then you actually get an array too)
03:21 uvtc Oh. Whoops. Failed to notice that I wasn't getting an array back.
03:22 uvtc Hm. I'd've expected `my @lines = slurp 'foo.txt'` to give me an array there.
03:23 colomon slurp gives you a string
03:23 colomon try @lines = 'foo.txt'.slurp.lines
03:23 uvtc Right. Though, I figured that, in list context, it would give me an array of lines.
03:23 geekosaur I would expect it to work like the perl5 module or like setting $/ = undef in perl5, the whole file as a single string
03:23 colomon no
03:24 colomon uvtc: it's just like saying @lines = "this is a line"
03:24 uvtc colomon: ok
03:24 uvtc colomon: thanks
03:24 lue (wait, I don't think the ».chomp does anything after that)
03:24 colomon lue: you don't need to chomp the output of lines
03:24 rhr_ joined #perl6
03:25 lue I know. Quite a no-op, eh? :)
03:26 simcop2387_ joined #perl6
03:27 uvtc Hm. Also tried `my @lines = slurp('foo.txt').lines`, but that doesn't work...
03:28 uvtc colomon: `'foo.txt'.slurp.lines` doesn't work for me.
03:28 colomon yeah, I'm always fuzzy on the details.
03:28 uvtc No such method 'slurp' for invocant of type 'Str'
03:28 lue uvtc: I always do open('foo.txt',:r).slurp , so I don't recall if slurp(file) works
03:29 uvtc Gah. Sorry. This works: `my @lines = slurp('foo2.txt').lines;`
03:29 colomon it has at some point, but whether it still does now...
03:29 uvtc and it autochomps, too.
03:29 jfried_ joined #perl6
03:30 lue uvtc: lines is just short for split("\n"), which doesn't leave the \n's anywhere in the result (and I thought for a moment earlier it did, so sorry about that)
03:30 uvtc lue: thanks. No prob. Trying things out as I go. :)
03:32 uvtc Hehehe. Was looking for the opposite of slurp. (Clojure uses `spit`. Guess that's too vulgar for P6. :)
03:33 TimToady well, that's too short, and ejaculate is too long :)
03:33 colomon uvtc: we talked about one, but I don't remember what we settled on
03:34 lue I recall there once being a similarly named method. Maybe it was squirt?
03:34 TimToady spurt is what it is currently
03:34 uvtc hahahaha
03:34 lue yeah, spurt
03:35 geekosaur squirt?
03:35 geekosaur :)
03:36 colomon n: say 1558657976916843360832062017400788597510.58834953945635510598466400011830046423710882663726806640625.perl
03:36 lue .oO(.inhale/.exhale)
03:36 p6eval niecza v24-24-gbdc3343: OUTPUT«<898505149957215605206589914754802519866043058145244698085/576460752303423488>␤»
03:36 colomon :\
03:37 stevan_ joined #perl6
03:38 sdgvf joined #perl6
03:39 Yappo__ joined #perl6
03:42 uvtc TimToady: draught / pour
03:44 geekosaur suck/blow?
03:46 lue .oO(copy/paste ?)
03:46 geekosaur ctrlc/ctrlv :p
03:47 geekosaur (he says, from his mac)
03:47 uvtc draught/pour work nicely because (1) side-steps crass jokes about squirt/spurt/whatever, (2) beer, and (3) "draught" reminds me of Tolkien. :)
03:48 uvtc Also, if you spin a "d" upside-down it looks like a "p". :)
03:49 lue geekosaur: why would you want to interrupt a file‽
03:50 uvtc like if you spin around reading in a file, it's writing out a file.
03:54 colomon nr: say 23123.fmt("%010d")
03:54 p6eval rakudo 123dfa, niecza v24-24-gbdc3343: OUTPUT«0000023123␤»
03:54 colomon nr: my $a = 10; say 23123.fmt("%0$ad")
03:54 p6eval niecza v24-24-gbdc3343: OUTPUT«[31m===[0mSORRY![31m===[0m��Variable $ad is not predeclared at /tmp/tPWr2D9E69 line 1:�------> [32mmy $a = 10; say 23123.fmt("%0[33m�[31m$ad")[0m��Potential difficulties:�  $a is declared but not used at /tmp/tPWr2D9E69 line 1:�------> [32mmy [33…
03:54 p6eval ..rakudo 123dfa: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable '$ad' is not declared�at /tmp/0ZOBfpJiHB:1�------> [32mmy $a = 10; say 23123.fmt("%0$ad[33m�[31m")[0m�    expecting any of:�        postfix�»
03:54 colomon nr: my $a = 10; say 23123.fmt("%0{$a}d")
03:54 p6eval niecza v24-24-gbdc3343: OUTPUT«Unhandled exception: Unmatched key in Hash.LISTSTORE␤  at /home/p6eval/niecza/lib/CORE.setting line 388 (Any.hash @ 3) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/5_f845VBQh line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4233…
03:54 p6eval ..rakudo 123dfa: OUTPUT«use of uninitialized value of type Any in string context  in block  at /tmp/j8T8QJk6y_:1␤␤d␤»
03:55 geekosaur heh
03:55 colomon nr: my $a = 10; say 23123.fmt("\%0{$a}d")
03:55 p6eval rakudo 123dfa, niecza v24-24-gbdc3343: OUTPUT«0000023123␤»
03:55 geekosaur suggest you use '' so it doesn't try to interpolate the format
03:55 geekosaur ah
03:55 colomon that'll do
03:55 geekosaur I would have used %0*d and passed a parameter, does that not work?
03:56 geekosaur (I thought you were trying to invoke positional syntax, but that's the wrong place for it anyway)
03:56 colomon I don't know.
03:56 geekosaur nr: my $a = 10; say 23123.fmt('%0*d', $a)
03:56 p6eval niecza v24-24-gbdc3343: OUTPUT«Unhandled exception: Excess arguments to Cool.fmt, used 2 of 3 positionals␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (Cool.fmt @ 1) ␤  at /tmp/kNIPHRc6Sm line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4233 (ANON @ 3) ␤  at /ho…
03:56 p6eval ..rakudo 123dfa: OUTPUT«Too many positional parameters passed; got 3 but expected between 1 and 2␤  in method fmt at src/gen/CORE.setting:2269␤  in block  at /tmp/EsWR5lAmWq:1␤␤»
03:57 geekosaur apparently not
03:57 geekosaur might need to think about that one...
03:57 lue nr: my $a = 10; say 23123.fmt('%0{*}d', $a)
03:57 p6eval rakudo 123dfa: OUTPUT«Too many positional parameters passed; got 3 but expected between 1 and 2␤  in method fmt at src/gen/CORE.setting:2269␤  in block  at /tmp/xpEJKlJ4Ms:1␤␤»
03:57 p6eval ..niecza v24-24-gbdc3343: OUTPUT«Unhandled exception: Excess arguments to Cool.fmt, used 2 of 3 positionals␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (Cool.fmt @ 1) ␤  at /tmp/Of8so5q6cs line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4233 (ANON @ 3) ␤  at /ho…
03:57 colomon rn: say 1000001/10000
03:58 p6eval rakudo 123dfa, niecza v24-24-gbdc3343: OUTPUT«100.0001␤»
03:58 sftp joined #perl6
04:00 colomon Rat.perl is getting ridiculously complex
04:02 woosley joined #perl6
04:03 TimToady I think the current .Str output is probably fine, actually
04:03 colomon rn: 1558657976916843360832062017400788597510.058834953945635510598466400011830046423710882663726806640625
04:03 p6eval rakudo 123dfa, niecza v24-24-gbdc3343:  ( no output )
04:03 colomon rn: say 1558657976916843360832062017400788597510.058834953945635510598466400011830046423710882663726806640625
04:03 p6eval rakudo 123dfa: OUTPUT«1558657976916843360832062017400788597510.05883495394563551060␤»
04:03 p6eval ..niecza v24-24-gbdc3343: OUTPUT«1.5586579769168432E+39␤»
04:03 lue r: say (1/2).Str
04:03 p6eval rakudo 123dfa: OUTPUT«0.5␤»
04:03 colomon rn: say 1558657976916843360832062017400788597510.058834953945635510598466400011830046423710882663726806640625.perl
04:03 p6eval niecza v24-24-gbdc3343: OUTPUT«<1797010299914431210413179829509605039731475627537851106401/1152921504606846976>␤»
04:03 p6eval ..rakudo 123dfa: OUTPUT«1797010299914431210413179829509605039731475627537851106401/1152921504606846976␤»
04:04 TimToady it's already scaled to a few digits more than it needs if it is divisible by 5 or 2
04:04 colomon TimToady: hmmm?
04:04 takadonet joined #perl6
04:04 takadonet irc.perl6.org down?
04:05 lue TimToady: I was just thinking maybe Rat.perl would always return a (reduced) fraction (to complement the always-decimal nature of .Str and .gist)
04:05 TimToady that seems reasonable
04:06 TimToady that 5 and 2 verbiage is quite ancient
04:06 colomon but... but... I just about finished writing it, darnit!
04:06 lue colomon: that's why I was reluctant to mention it just now :)
04:07 colomon exact decimal output for any Rat which only has powers of 2 and 5 in its denominator!
04:07 TimToady I'm saying the current algorithm supposedly already does that
04:08 colomon TimToady: what current algorithm?
04:08 colomon rn: say (4.5 ** 27).perl
04:08 TimToady the one I wrote a year ago or so
04:08 p6eval niecza v24-24-gbdc3343: OUTPUT«<58149737003040059690390169/134217728>␤»
04:08 p6eval ..rakudo 123dfa: OUTPUT«58149737003040059690390169/134217728␤»
04:08 colomon TimToady: oh, that's where I've seen this code before.
04:08 TimToady that got put into both niecza and rakudo
04:08 colomon TimToady: nope, see above
04:09 colomon or at least, it's not in the right place there.
04:09 * colomon is about to fall asleep sitting up.
04:09 uvtc How can I do `my @txt-files = glob('*.txt');`? I can do, `my @files = dir;`, and that includes dotfiles (though not "." and ".."), but `dir('*.txt')` doesn't work.
04:10 TimToady you sure you're not just running into the 64-bit limit on denominator?
04:10 colomon TimToady: sure
04:10 colomon niecza> say (4.5 ** 27).perl
04:10 colomon 433249302231073824.244664378464221954345703125
04:10 lue rn: say (1/10).perl # should be .1
04:10 s0rear joined #perl6
04:10 colomon (that's with my new version of Rat.perl
04:10 p6eval niecza v24-24-gbdc3343: OUTPUT«<1/10>␤»
04:10 p6eval ..rakudo 123dfa: OUTPUT«1/10␤»
04:10 colomon lue: hmmm, actually I've made that 0.1
04:11 TimToady rn: say (1/10).Str
04:11 p6eval rakudo 123dfa, niecza v24-24-gbdc3343: OUTPUT«0.1␤»
04:11 lue Oh yeah, leading zero should be there (according to the S02 examples)
04:11 TimToady the .Str algo already does it
04:11 colomon rn: say (4.5 ** 27)
04:11 p6eval niecza v24-24-gbdc3343: OUTPUT«4.3324930223107386E+17␤»
04:11 p6eval ..rakudo 123dfa: OUTPUT«433249302231073824.2446643785␤»
04:11 colomon oh, only for rakudo.
04:11 colomon interesting.
04:12 lue TimToady: The .Str algo (according to S02) goes further, printing decimal forms of 1/3 and such (when .perl is not supposed to)
04:12 TimToady rn: say (4.5 ** 27).Str
04:12 p6eval niecza v24-24-gbdc3343: OUTPUT«4.3324930223107386E+17␤»
04:12 p6eval ..rakudo 123dfa: OUTPUT«433249302231073824.2446643785␤»
04:12 lue rn: say (1/3).Str
04:12 p6eval niecza v24-24-gbdc3343: OUTPUT«0.33333333333333331␤»
04:12 p6eval ..rakudo 123dfa: OUTPUT«0.333333␤»
04:13 colomon I need to sleep before I try to fix niecza.  Should I check in my updated spec tests?
04:13 TimToady rn: say ([*] 4.5 xx 27).Str
04:13 p6eval niecza v24-24-gbdc3343: OUTPUT«4.3324930223107386E+17␤»
04:13 p6eval ..rakudo 123dfa: OUTPUT«433249302231073824.2446643785␤»
04:13 * TimToady is not the soldier on the ground :)
04:14 * colomon will happily steal TimToady's algorithms for Niecza.
04:15 * colomon will leave his updated tests sitting on his harddrive, rather than generating unnecessary rakudo consternation when someone spectests in the morning.
04:15 colomon afk # sleep
04:16 lue good ♞, colomon o/
04:19 uvtc Ok. This seems to work: `my @txt-files = dir( test => /\.txt$/ );`
04:20 uvtc Found that at http://doc.perl6.org/routine/dir .
04:28 * lue strongly feels regexes should have support for matching pairs of parens from an arbitrary list of paren pairs
04:30 TimToady nr: say '((())())()' ~~ / '(' ~ ')' <~~>? /
04:30 p6eval niecza v24-24-gbdc3343: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method assertion:sym<~~> not yet implemented at /tmp/SP8LeadpMW line 1:�------> [32msay '((())())()' ~~ / '(' ~ ')' <~~[33m�[31m>? /[0m��Unhandled exception: Unable to resolve method oplift in type Any�  at /home/…
04:30 p6eval ..rakudo 123dfa: OUTPUT«Unable to parse expression in ; couldn't find final ')'␤  in any FAILGOAL at src/stage2/QRegex.nqp:1084␤  in regex  at /tmp/bvTAHhQz_9:1␤  in method ACCEPTS at src/gen/CORE.setting:10804␤  in block  at /tmp/bvTAHhQz_9:1␤␤»
04:31 TimToady nr: say '((())())()' ~~ / ['(' ~ ')' <~~> | ''] /
04:31 p6eval niecza v24-24-gbdc3343: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method assertion:sym<~~> not yet implemented at /tmp/wqknpm9LtR line 1:�------> [32msay '((())())()' ~~ / ['(' ~ ')' <~~[33m�[31m> | ''] /[0m��Unhandled exception: Unable to resolve method oplift in type Any�  at …
04:31 p6eval ..rakudo 123dfa: OUTPUT«Unable to parse expression in ; couldn't find final ')'␤  in any FAILGOAL at src/stage2/QRegex.nqp:1084␤  in regex  at /tmp/IPBTTSDnpM:1␤  in method ACCEPTS at src/gen/CORE.setting:10804␤  in block  at /tmp/IPBTTSDnpM:1␤␤»
04:31 lue ( and not having the power of Perl 6 makes it worse :/ )
04:32 TimToady oh, so you want real regular expressions to not be regular expressions?
04:32 TimToady that would violate the Chomsky hierarchy
04:33 lue TimToady: I meant being able to match (), [], ⦃⦄, etc. without having to create a really big regex. Just a pipe dream, I guess.
04:33 dalek perl6-roast-data: 15989e2 | coke++ | / (4 files):
04:33 dalek perl6-roast-data: today (automated commit)
04:33 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/15989e29e7
04:33 dalek perl6-roast-data: d4931f7 | coke++ | / (3 files):
04:33 dalek perl6-roast-data: today (automated commit)
04:33 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/d4931f7888
04:34 uvtc left #perl6
04:45 TimToady we could introduce a <bracket <subrule>> matcher, I suppose, if you don't care which bracket you want
04:45 TimToady usually you do though
04:47 lue Well, I'm trying to write a Perl 6 mode for emacs, so I would need it :) (but I've decided to hold off on matching parens until much later)
05:00 preflex_ joined #perl6
05:07 ikrs joined #perl6
05:18 Eddward joined #perl6
05:19 sftp_ joined #perl6
05:20 quester joined #perl6
05:21 ashleyde1 joined #perl6
05:21 mikec__ joined #perl6
05:22 baest joined #perl6
05:22 sizz joined #perl6
05:23 snarkyboojum_ joined #perl6
05:24 p5eval_ joined #perl6
05:24 sdgvf_ joined #perl6
05:24 Subterra joined #perl6
05:26 xalbo_ joined #perl6
05:27 phenny joined #perl6
05:28 hugme joined #perl6
05:28 p6eval joined #perl6
05:28 mattp_ joined #perl6
05:31 rking joined #perl6
05:32 gcole joined #perl6
05:39 woosley1 joined #perl6
05:42 * [Coke] still can't build rakudo. bother.
05:42 cognominal joined #perl6
05:45 * quester is backlogging using http://colabti.org/irclogger/irclogger_log/perl6 since http://irclog.perlgeek.de/perl6/today is still down for maintenance...
05:52 MikeyG joined #perl6
05:52 diakopte1 joined #perl6
05:52 exodist_ joined #perl6
05:52 d4l3k_ joined #perl6
05:52 sevin joined #perl6
05:52 pnu joined #perl6
05:52 japhb_ joined #perl6
05:52 smash__ joined #perl6
05:52 telex_ joined #perl6
05:53 robins joined #perl6
05:56 rking joined #perl6
05:56 snarkyboojum_ joined #perl6
05:56 mikec__ joined #perl6
05:56 jtpalmer joined #perl6
05:56 LordVorp joined #perl6
05:56 mikemol joined #perl6
05:56 jasonmay joined #perl6
05:56 jrockway joined #perl6
05:59 Chillance joined #perl6
06:04 kst` joined #perl6
06:16 [Coke] is nqp known broken with parrot master?
06:22 diakopter ahoy
07:03 kaare__ joined #perl6
07:14 drKreso joined #perl6
07:16 drKreso left #perl6
07:23 Harzilein joined #perl6
07:34 drKreso joined #perl6
07:36 drKreso phenny, tell mortiz "Oh wow, I am an idiot :) Traits example works just fine, i was trying to execute script with ruby… as a side not - it's not working very well there! :)"
07:36 phenny drKreso: I'll pass that on when mortiz is around.
07:36 phenny drKreso: 02 Mar 23:39Z <colomon> tell drKreso Seems like I had that working just a few months ago.  Can you tell me more about how it's failing?
07:36 phenny drKreso: 00:22Z <colomon> tell drKreso To be more precise after experimentation, moritz's code still works for me.
07:37 drKreso colomon: You are right… I had a wrong ,r mapping from vim, so I was running it with ruby (In my defence it was early in the morning) :)
07:38 TimToady note that there's still no logging, so you might consider using phenny
07:38 drKreso phenny, tell column : You are right… I had a wrong ,r mapping from vim, so I was running it with ruby (In my defence it was early in the morning)
07:38 phenny drKreso: I'll pass that on when column is around.
07:38 moritz and it helps to spell the nicks right :-)
07:39 phenny moritz: 02 Mar 22:49Z <drKreso> tell moritz "Any special reason why this example of traits is not working (fibonacci memorisation) http://perl6advent.wordpress.com/2011/12/04/traits-meta-data-with-character/?"
07:39 moritz drKreso: you can tab-complete nick names in most IRC clients
07:39 drKreso So I see
07:39 drKreso Handy
07:39 drKreso Otherwise people might misspell it :)
07:40 drKreso phenny, tell colomon :  You are right… I had a wrong ,r mapping from vim, so I was running it with ruby
07:40 phenny drKreso: I'll pass that on when colomon is around.
07:43 dvj r: say (1) x 10
07:43 p6eval rakudo 123dfa: OUTPUT«1111111111␤»
07:44 moritz by the way I've started a logging bot on feather, just the website continues to be down
07:44 moritz r: say 1 xx 10
07:44 p6eval rakudo 123dfa: OUTPUT«1 1 1 1 1 1 1 1 1 1␤»
07:45 dvj what's xx?
07:45 TimToady dvj: unlike in perl 5, putting parens aroudn the left has no effect
07:45 TimToady xx is what we do instead of putting parens
07:45 dvj ok
07:45 TimToady x replicates as string, xx as list
07:45 dvj r: 1 x 10 xx 100
07:45 p6eval rakudo 123dfa:  ( no output )
07:45 TimToady need to say it
07:46 dvj r: (01 x 10 xx 100).say
07:46 p6eval rakudo 123dfa: OUTPUT«1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1…
07:46 dvj fun :)
07:46 TimToady well, we think so :)
07:46 TimToady http://rosettacode.org/wiki/Xiaolin_Wu%27s_line_algorithm#Perl_6
07:47 TimToady for some reason this one blows up rakudo
07:48 * FROGGS_ .oO( backslash - our new sigil O.o )
07:49 dvj so what is backslash used for?
07:51 TimToady in this case, to declare a new pseudo-constant
07:51 TimToady it's written in the SSA style where you don't use many variables
07:52 TimToady there's nothing wrong with sigils, but in this case it's a closer translation of the original
07:53 TimToady we've put a few entries out on rosettacode in that style so that people who always carp about the sigils won't always carp about them :)
07:53 PZt joined #perl6
07:56 FROGGS TimToady: I would agree if one uses the backslashes a few times, and uses the pseudo-constants often, but having dozens of backslashes looks weird
07:57 TimToady well, but they also visually indicate where the declarations are, which is a nice thing
07:57 FROGGS well, the 'my' is blue *g*
07:59 FROGGS and someone who is not that used to perl 6 might think that 'y-end1' is a subtraction, where '$y-end1' would be more clear that it's not
08:01 TimToady it's a strange error from rakudo
08:01 TimToady Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling block draw-line: Error while compiling op p6typecheckrv: Error while compiling op lexotic: Error while compiling op p6decontrv: Error while compiling op bind: Error while compiling op call: Null PMC access in find_method('handle')
08:01 TimToady but 'handle' is in a comment!
08:02 FROGGS and removing that comment helps?
08:02 FROGGS O.o
08:02 TimToady no, so maybe it's a different 'handle'
08:02 FROGGS coincidence
08:03 FROGGS I'll debug it
08:04 TimToady thanks
08:04 * TimToady --> bed
08:05 FROGGS gnight
08:06 FROGGS TimToady: it is the: my \dx = x1 - x0;
08:07 FROGGS nr: my (\x0, \x1); my \dx = x1 - x0;
08:07 p6eval niecza v24-24-gbdc3343: OUTPUT«Use of uninitialized value in numeric context␤  at /home/p6eval/niecza/lib/CORE.setting line 1290 (warn @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 294 (Any.Numeric @ 8) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/sJqxDvpQhN line 1 (mainli…
08:07 p6eval ..rakudo 123dfa: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling op bind: Error while compiling op call: Null PMC access in find_method('handle')␤»
08:07 FROGGS nr: my \x0; my \x1; my \dx = x1 - x0;
08:08 p6eval rakudo 123dfa: OUTPUT«===SORRY!===␤Method 'ast' not found for invocant of class 'NQPMu'␤»
08:08 p6eval ..niecza v24-24-gbdc3343: OUTPUT«[31m===[0mSORRY![31m===[0m��Term definition requires an initializer at /tmp/XvdGBzEDF4 line 1:�------> [32mmy \x0[33m�[31m; my \x1; my \dx = x1 - x0;[0m��Term definition requires an initializer at /tmp/XvdGBzEDF4 line 1:�------> [32mmy \x0; my \x1…
08:08 FROGGS nr: my \x0 = 0; my \x1 = 0; my \dx = x1 - x0;
08:08 p6eval rakudo 123dfa, niecza v24-24-gbdc3343:  ( no output )
08:09 FROGGS nr: my (\x0, \x1) = 1, 2; my \dx = x1 - x0;
08:09 p6eval niecza v24-24-gbdc3343:  ( no output )
08:09 p6eval ..rakudo 123dfa: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling op bind: Error while compiling op call: Null PMC access in find_method('handle')␤»
08:09 FROGGS nr: my (\x0, \x1) = 1, 2; say \x0; say \x1; #my \dx = x1 - x0;
08:09 p6eval rakudo 123dfa: OUTPUT«(Any)␤(Any)␤»
08:09 p6eval ..niecza v24-24-gbdc3343: OUTPUT«\(1)␤\(2)␤»
08:09 FROGGS nr: my (\x0, \x1) = (1, 2); say \x0; say \x1; #my \dx = x1 - x0;
08:09 p6eval rakudo 123dfa: OUTPUT«(Any)␤(Any)␤»
08:09 p6eval ..niecza v24-24-gbdc3343: OUTPUT«\(1)␤\(2)␤»
08:09 FROGGS nr: my ($x0, \x1) = (1, 2); say $x0; say \x1; #my \dx = x1 - x0;
08:09 p6eval rakudo 123dfa: OUTPUT«1␤(Any)␤»
08:09 p6eval ..niecza v24-24-gbdc3343: OUTPUT«1␤\(2)␤»
08:09 FROGGS interesting
08:12 ObseLeTe joined #perl6
08:14 FROGGS nqp: my ($x0, \x1) =: (1, 2); say($x0); say(\x1); #my \dx = x1 - x0;
08:14 p6eval nqp: OUTPUT«Confused at line 2, near "my ($x0, \\"␤current instr.: 'panic' pc 14698 (src/stage2/gen/NQPHLL.pir:5229) (src/stage2/gen/NQPHLL.pm:278)␤»
08:15 JimmyZ joined #perl6
08:15 FROGGS nqp: my ($x0, \x1) := (1, 2); say($x0); say(\x1); #my \dx = x1 - x0;
08:15 p6eval nqp: OUTPUT«Confused at line 2, near "my ($x0, \\"␤current instr.: 'panic' pc 14698 (src/stage2/gen/NQPHLL.pir:5229) (src/stage2/gen/NQPHLL.pm:278)␤»
08:15 FROGGS nqp: my \a = 7;
08:15 p6eval nqp: OUTPUT«Confused at line 2, near "my \\a = 7;"␤current instr.: 'panic' pc 14698 (src/stage2/gen/NQPHLL.pir:5229) (src/stage2/gen/NQPHLL.pm:278)␤»
08:15 FROGGS hmmm
08:18 FROGGS phenny: tell TimToady see https://gist.github.com/FROGGS/281ee5b2ed5563b5ccb6
08:18 phenny FROGGS: I'll pass that on when TimToady is around.
08:18 FROGGS phenny: tell phenny Good girl!
08:18 phenny Hey, I'm not as stupid as Monty you know!
08:19 FROGGS haha
08:20 FROGGS nr: my ($x0, \x1) = (1, 2); say $x0; say x1; #my \dx = x1 - x0;
08:20 p6eval niecza v24-24-gbdc3343: OUTPUT«1␤2␤»
08:20 p6eval ..rakudo 123dfa: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling op call: Null PMC access in find_method('handle')␤»
08:21 FROGGS nr: my $x0 = 1; say x0
08:21 p6eval rakudo 123dfa: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:�    x0 used at line 1��»
08:21 p6eval ..niecza v24-24-gbdc3343: OUTPUT«[31m===[0mSORRY![31m===[0m��Undeclared routine:�     'x0' used at line 1��Potential difficulties:�  $x0 is declared but not used at /tmp/lyG8SnQrd9 line 1:�------> [32mmy [33m�[31m$x0 = 1; say x0[0m��Unhandled exception: Check failed��  at /home/p6eval…
08:21 FROGGS nr: my \x0 = 1; say x0
08:21 p6eval rakudo 123dfa, niecza v24-24-gbdc3343: OUTPUT«1␤»
08:21 FROGGS need more coffee
08:21 terry_ joined #perl6
08:30 JimmyZ phenny: tell moritz I can't open irclog
08:30 phenny JimmyZ: I'll pass that on when moritz is around.
08:32 FROGGS one minute longer and he would know the answer
08:35 quester rn: my \a = 7; say a;
08:35 moritz phenny: tell JimmyZ neither can anybody else; the server did not boot again
08:35 phenny moritz: I'll pass that on when JimmyZ is around.
08:35 p6eval rakudo 123dfa, niecza v24-24-gbdc3343: OUTPUT«7␤»
08:35 phenny moritz: 08:30Z <JimmyZ> tell moritz I can't open irclog
08:35 quester my (\a, $b) = (7, 8); say a;
08:36 quester rn: my (\a, $b) = (7, 8); say a;
08:36 p6eval niecza v24-24-gbdc3343: OUTPUT«Potential difficulties:�  $b is declared but not used at /tmp/RBm8A54p1F line 1:�------> [32mmy [33m�[31m(\a, $b) = (7, 8); say a;[0m��7�»
08:36 p6eval ..rakudo 123dfa: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling op call: Null PMC access in find_method('handle')␤»
08:37 diakopter has anyone used Libevent and/or libuv enough to comment on them?
08:38 tadzik you may want to ask _sri
08:40 quester left #perl6
08:59 eternaleye joined #perl6
09:17 FROGGS joined #perl6
09:33 sizz joined #perl6
09:37 * grondilu solved rosalind.info/problems/trie but it was 50 seconds too slow for perl6.  Had to translate it in perl5 :(
09:39 grondilu I'll publish it in case someone can figure out how to make it faster
09:40 dalek perl6-examples: c8fbc86 | (L. Grondin)++ | rosalind/trie-grondilu.pl:
09:40 dalek perl6-examples: TRIE solution.  50 seconds too slow though
09:40 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/c8fbc861e2
09:41 grondilu The difference in speed between P5 and P6 for this kind of algorithms is really enormous.   Just saying.
09:43 nwc10 translate it to NQP and run it on the JVM? :-)
09:43 nwc10 </ducks>
09:45 tadzik grondilu: did you try profiling it?
09:45 diakopter grondilu: what's the ratio?
09:46 diakopter ok bedtime for now
09:47 moritz runs in 3.3s here
09:47 moritz how can it be 50s too slow?
09:47 * moritz confused
09:49 moritz also what's the deal with building a data structure and then discarding it?
09:50 moritz oh, it's not always discarded
09:53 grondilu moritz: you used the example input I guess.  Not the full data.
09:53 moritz sure. I have now idea what the full data is.
09:53 moritz *no
09:54 dalek perl6-examples: de4978d | (L. Grondin)++ | rosalind/trie-grondilu.pl:
09:54 dalek perl6-examples: minor fix with input
09:54 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/de4978db55
09:55 dalek perl6-examples: 50cff13 | (L. Grondin)++ | rosalind/rosalind_trie.txt:
09:55 dalek perl6-examples: adding input for trie
09:55 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/50cff138ed
09:55 grondilu tadzik: "profiling"?
09:56 grondilu diakopter: seconds for P5, 5m55s for P6
10:00 grondilu .730s for P5, to be exact
10:01 grondilu so in other words, Perl6 is ridiculously slow here.  I don't like to complain, but this has to be said imho.
10:01 FROGGS tadzik: do we have a profiler?
10:01 tadzik grondilu: run with --profile, look with qcachegrind or kcachegrind
10:01 tadzik FROGGS: yep, built-in profiling runcore
10:01 FROGGS hmmm, k, will try later
10:01 tadzik grondilu: perhaps they run some old-ass version?
10:03 grondilu "they"?  Not sure what you mean.  I use a very recent version of perl6/parrot
10:03 grondilu This is perl6 version 2013.02.1-21-g40069f9 built on parrot 4.10.0 revision RELEASE_4_10_0
10:04 tadzik ok, so who defines "too slow"?
10:04 tadzik I thought it's sort of a thing like "send your code and we'll run it against our spectests", like SPOJ
10:05 grondilu it was too slow because a task in rosalind must be solved in five minutes.
10:05 grondilu there's a js code that makes sure the user loses when the delay is over.
10:07 tadzik but it's ran locally, still?
10:07 grondilu yes
10:07 tadzik curious thing
10:08 grondilu it's ran locally.  You submit the output, not the code.
10:09 tadzik I see
10:09 tadzik well, you can always make it run 'say $result' :P
10:09 tadzik I'm building rakudo locally now to try it
10:10 grondilu the input is different each time, so it's not that easy to cheat.
10:18 tadzik grondilu: perl6 trie.pl  0.89s user 0.22s system 98% cpu 1.132 total
10:18 tadzik on rakudo HEAD, and an old core2duo
10:18 tadzik weird :|
10:20 tadzik profiler says that the slowest part is infix«<»
10:23 tadzik but it's not really significant at all, if the full thing runs in a fraction of a second
10:24 nwc10 jnthn: at 21596828fbba54783a43 (Eliminate callsite field in CallFrame.), dumbbench says
10:25 nwc10 cmd: Ran 20 iterations (0 outliers).
10:25 nwc10 cmd: Rounded run time per iteration: 1.911e+02 +/- 1.1e+00 (0.6%)
10:25 nwc10 at 02001c70b42d87da3 (Eliminate callframe args field.) (ie HEAD), dumbbench says
10:25 nwc10 cmd: Ran 20 iterations (0 outliers).
10:25 nwc10 cmd: Rounded run time per iteration: 1.887e+02 +/- 1.5e+00 (0.8%)
10:31 gcole joined #perl6
10:33 ObseLeTe joined #perl6
10:38 grondilu tadzik: 0.89s??  have you used rosalind_trie.txt as input?  (Check that the scripts runs 'trie lines' and not 'trie <ATAGA ATC GAT>;')
10:38 constantined joined #perl6
10:39 grondilu I made an error during the first upload, leaving the version with <ATAGA ...> instead of reading stdin.  I guess you used the uncorrected version.
10:40 tadzik oh, that I didn't try :)
10:40 tadzik yes, true
10:40 nwc10 jnthn: both with the most recent nqp that works. Tests for other revisions available on request, but will take about 1h15 each to deliver
10:48 SamuraiJack joined #perl6
10:48 tadzik ok, 116.22s with the big input, grondilu
10:48 tadzik trying the profile
10:55 FROGGS tadzik: can you gist the steps you take?
10:55 tadzik FROGGS: to profiling, or what?
10:55 FROGGS right
10:56 tadzik well, it's not too much
10:56 tadzik first, remove 'say' from the code :)
10:56 tadzik then perl6 --profile code.pl
10:56 tadzik then run qcachegrind and feed it with the output
10:56 tadzik so the second step is really 'perl6 --profile code.pl &> profile'
10:57 grondilu that's still much faster than my 5m55s.  I use a "intel atom cedar trail dual core".  I guess it's not very good.
10:57 tadzik I think rakudo runs then on a single 32-bit core
10:57 tadzik but i don't think bitage will make that much of a difference here
10:58 tadzik I guess my c2d is no that bad :)
11:03 tadzik on the other hand, the profile runs for 6 minutes already
11:06 jnthn nwc10: So, another little speedup it seems.
11:12 tadzik jnthn: I get Method 'panic' not found for invocant of class 'QAST::CompilerJAST' trying to build fresh nqp-jvm-prep
11:12 FROGGS tadzik: that was me
11:12 tadzik ha, ok
11:13 FROGGS I made changes to the ast within nqp, and the ndqp-jvm-prep repo must be updated to handle that
11:13 jnthn tadzik: Try a slightly older nqp
11:13 tadzik I'll wait for jvm to catch up :)
11:13 jnthn I'll try and update it today, but got various errands/travel/distractions
11:14 tadzik no hurry :)
11:26 Chillance joined #perl6
11:27 bruges joined #perl6
11:27 nwc10 jnthn: yes. my initial run-it-once last night didn't think so
11:27 nwc10 but it occurred to me to use dumbbench to run it a few times
11:33 dalek nqp-jvm-prep: caf2b43 | jnthn++ | / (3 files):
11:33 dalek nqp-jvm-prep: Update to work with latest NQP.
11:33 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/caf2b4343e
11:33 jnthn Was fairly easy in the end.
11:42 spider-mario joined #perl6
11:48 FROGGS cool
11:50 daniel-s joined #perl6
11:59 FROGGS jnthn: nep::die? what is nep:: ?
11:59 FROGGS typo?
12:03 rindolf joined #perl6
12:19 dalek nqp-jvm-prep: 54a22a2 | jnthn++ | lib/QAST/JASTCompiler.nqp:
12:19 dalek nqp-jvm-prep: Typo.
12:19 dalek nqp-jvm-prep: review: https://github.com/jnthn/nqp-jvm-prep/commit/54a22a2e8b
12:24 saeidw joined #perl6
12:28 wk joined #perl6
12:28 nwc10 jnthn: all tests passed with the typo there (except the ICU one). Clearly not a tested typo :-(
12:29 jnthn nwc10: It's not a code-path you can hit unless something spits out a bad QAST tree
12:29 FROGGS nwc: the statement should never be executed
12:37 FLOSSrookie joined #perl6
12:38 FLOSSrookie If perl6 is capable of accessing sqlite can someone give me a link which contains information on how to do it? I found this but hope it is dated and no longer applicable: http://stackoverflow.com/questions/7501581/how-does-one-use-sqlite-in-perl-6
12:39 tadzik FLOSSrookie: try https://github.com/perl6/DBIish/
12:44 arnsholt joined #perl6
12:45 FLOSSrookie tadzik: Uh...Do you have another link to help me understand how to incorporate the DBIish data?
12:45 FLOSSrookie tadzik: I am brand new.
12:45 tadzik what is that you have a problem with>?
12:46 FLOSSrookie tadzik: Mainly where do I place those files on my filesystem and how do I go about "installing" it.
12:47 FLOSSrookie tadzik: Do I just use perl itself to install?
12:48 FLOSSrookie tadzik: I see in the makefile the @echo "install        copies .pm and .pir files to system perl6 lib/"
12:48 FLOSSrookie Does that mean I just need to call perl and it will do the install?
12:49 tadzik hold
12:49 tadzik hold on
12:49 tadzik what do you have installed? Rakudo, Rakudo Star?
12:50 FLOSSrookie tadzik: Is there a terminal command to help me find?
12:50 tadzik how did you install perl 6?
12:50 tadzik or did you install it at all?
12:50 FLOSSrookie sudo yum install    and it even gave me a nice perl 6 book too.
12:51 tadzik is there a command 'panda'?
12:51 FLOSSrookie tadzik: Negative
12:51 tadzik ok, you'll need that first
12:51 tadzik there are instructions at https://github.com/tadzik/panda
12:51 tadzik clone the repo, and then perl6 bootstrap.pl
12:52 FLOSSrookie tadzik: Is this like the "yum" of perl?
12:53 tadzik somewhat
12:53 tadzik it installs modules for you
12:53 tadzik so after you have that, you only need to 'panda install DBIish'
12:53 FLOSSrookie tadzik: Oh...I see.
12:54 FLOSSrookie tadzik: Is this your software?
12:54 tadzik yep
12:58 tadzik feel free to nag me if you don't like it :)
12:58 tadzik or if it doesn't work as advertised
13:05 FLOSSrookie Okay, now DBIish is on the filesystem. Now, with panda... Is it like "cd DBIish" then "panda [some file but I do not know which]"
13:07 grondilu not really perl6 related, but how do you type an italic character in X?  I've seen TimToady do it several times but I've no idea how to do it.
13:07 FLOSSrookie tadzik: Which file in DBIish do I run with panda?
13:08 grondilu I'd like to do that because each time I type '$s' in a perl6 file, Vim messes up the syntax highliting.
13:09 moritz FLOSSrookie: after installing DBIish, you can use the module in your regular Perl 6 scripts
13:11 FLOSSrookie moritz: Yes, but I need to reference a file for panda to install like: "panda install ./some_file"
13:12 FLOSSrookie moritz: I do not know which file panda is expecting.
13:12 FLOSSrookie moritz: Yes, I am new.
13:12 rindolf Hi all. Slow day today on IRC.
13:13 rindolf can you people review http://www.shlomifish.org/invisibles-of-the-world-ascend/invisibles-of-the-world-ascend-and-become-alphas.xhtml (incomplete but should be usable) and comment (even with the smallest comments)? You can use ##English for that instead of lowering the SNR of #perl6 .
13:14 SamuraiJack joined #perl6
13:16 FLOSSrookie tadzik: I am almost there. I just need to be told which file to pass as an argument to panda.
13:16 not_gerd joined #perl6
13:16 FLOSSrookie tadzik: Is it the makefile or some other file or the entire directory?
13:16 not_gerd o/
13:17 tadzik FLOSSrookie: did you read the panda README?
13:18 not_gerd r: multi foo(True, True) { say "WTF?" }; foo(True, False)
13:18 p6eval rakudo 123dfa: OUTPUT«WTF?␤»
13:18 FLOSSrookie tadzik: It failed so I do not know if I did it correctly.
13:19 FLOSSrookie t/05-arrays.t .......... Failed 9/26 subtests
13:19 FLOSSrookie t/06-struct.t .......... Failed 23/30 subtests
13:19 SamuraiJack_ joined #perl6
13:20 tadzik that's zavolaj readme
13:20 jnthn not_gerd: Constraints smartmatch; anything ~~ True comes out as True
13:20 tadzik erm, zavolaj failures
13:20 PacoAir joined #perl6
13:20 tadzik DBIish depends on NativeCall, and NativeCall seems to not work on your system
13:20 FLOSSrookie tadzik: Uh Oh
13:22 jnthn Could be that some of what NativeCall does depends on a newer Rakudo than the one available through the package system also. It's had a bunch of improvements recently...
13:23 not_gerd jnthn: thanks
13:23 FLOSSrookie jnthn: Are you responding to me or not_gerd?
13:24 FLOSSrookie jnthn: I was discussing NativeCall too.
13:24 jnthn FLOSSrookie: you/tadzik :)
13:25 jnthn perl6 -v will tell you what Rakudo you're running
13:26 FLOSSrookie This is perl6 version 2013.01 built on parrot 5.0.0 revision 0
13:27 FLOSSrookie jnthn: If this is out of date would the update be reflected in yum with "yum update"
13:29 jnthn FLOSSrookie: No, typically what's packaged lags a bit behind the monthly releases we make. You may find that the failing tests are for features of NativeCall you don't need, given that the sqlite module has been around since last year...
13:30 jnthn FLOSSrookie: Hm, but if you got the book your package musta included various other things, I suspect.
13:30 jnthn FLOSSrookie: Try perl6 -e "use NativeCall; say 'ok'"
13:30 jnthn FLOSSrookie: You may already have DBIish/NativeCall installed thanks to the package.
13:30 JimmyZ joined #perl6
13:30 FLOSSrookie jnthn: It said "ok"
13:31 jnthn FLOSSrookie: Try the same, but with use DBIish
13:31 jnthn If that is also OK then you have it already
13:32 FLOSSrookie jnthn: Well, I was just testing you ;) and you passed it says "ok." You sure are good at this. Of, course I already knew that it was there...of course.
13:34 FLOSSrookie jnthn: I cannot believe I did not know it was there. I am so new I did not even know I had what I needed. Sorry.
13:34 FLOSSrookie tadzik: And to you too. Sorry.
13:34 jnthn FLOSSrookie: No problem. :) Hope now you know it's there, it works out :)
13:35 * jnthn vanishes again to catch a train
13:37 colomon Rat stringification is driving me batty.....
13:37 phenny colomon: 07:40Z <drKreso> tell colomon :  You are right… I had a wrong ,r mapping from vim, so I was running it with ruby
13:43 not_gerd joined #perl6
13:43 FLOSSrookie left #perl6
13:43 colomon nr: say Rat.Str
13:43 p6eval rakudo 123dfa: OUTPUT«use of uninitialized value of type Rat in string context  in block  at /tmp/iyvkluLQbx:1␤␤␤»
13:43 p6eval ..niecza v24-24-gbdc3343: OUTPUT«Rat()␤»
13:51 gcole_ joined #perl6
13:52 stevan__ joined #perl6
13:54 pnu_ joined #perl6
13:54 d4l3k_ joined #perl6
13:54 s0rear joined #perl6
13:55 breinbaa1 joined #perl6
13:55 jaldhar_ joined #perl6
13:55 awwaiid_ joined #perl6
13:55 prammer_ joined #perl6
13:57 spider-mario_ joined #perl6
13:58 PacoAir joined #perl6
14:03 sftp_ joined #perl6
14:06 SamuraiJack_ joined #perl6
14:08 Khisanth joined #perl6
14:08 araujo joined #perl6
14:10 mtk joined #perl6
14:21 Psyche^ joined #perl6
14:25 saeidw joined #perl6
14:29 PacoAir joined #perl6
14:34 Eddward joined #perl6
14:45 pnu joined #perl6
14:48 wk_ joined #perl6
14:55 emilbarton joined #perl6
14:57 emilbarton hi, I'm meeting a problem building rakudo -- can you help me http://pastebin.com/27h3QqQN
15:01 grondilu weird.  HAve you tried --gen-parrot --gen-nqp?
15:01 emilbarton --gen-parrot only
15:02 emilbarton parrot was built successfully
15:02 skyheights joined #perl6
15:02 grondilu is it the first time you try compiling rakudo?
15:03 grondilu (on this machine I mean)
15:03 emilbarton no I have running smoothly on a powerpc64
15:03 emilbarton yes it 's the first time on this machine
15:04 emilbarton stupid question : do I need nqp at all?
15:06 grondilu I don't know.  Wait a bit, someone more qualified will answer eventually.
15:06 geekosaur most of rakudo is written in nqp, I believe
15:07 colomon rakudo should build nqp automatically if you request --gen-parrot
15:07 geekosaur That read jobs pipe thing is a very strange error...
15:08 colomon yes
15:08 grondilu indeed I've never seen this message
15:08 emilbarton wha'ts this 3rdparty/dyncall that makes problem?
15:09 geekosaur I don;t think it's the problem, it's just the first thing that triggers it
15:09 geekosaur that ism it's the first thing being built. this is some make screwage on windows
15:09 geekosaur s/m/,/
15:09 FROGGS joined #perl6
15:10 geekosaur looks like it relates to make doing parallel build? try make -j1
15:12 emilbarton in fact I don't issue a make command it's done automatically with Configure.pl --gen-parrot (should I patch something?)
15:12 dalek roast: c5b6cfa | (Solomon Foster)++ | S32-num/stringify.t:
15:12 dalek roast: Rework Rat stringification tests (and add FatRat ones) to conform to current spec.
15:12 dalek roast: review: https://github.com/perl6/roast/commit/c5b6cfa5fe
15:12 geekosaur I have no idea :(
15:13 drKreso joined #perl6
15:13 geekosaur in any case, I am still poking but it definitely looks like this has nothing to do with rakudo/parrot/nqp /per se/, it is gnu make screwing up internally for some reason
15:15 geekosaur you might try setting MAKEFLAGS=-j1 in the environment
15:16 cognominal joined #perl6
15:17 emilbarton I'll do that -- I've found an occurence of the same error in another context: http://www.cmake.org/pipermail/cmake/2010-September/039679.html
15:17 geekosaur yep, that was one of the messages I found while poking (and there are others)
15:18 geekosaur but even without that, the make disgnostic is not anything that should be triggerable from outside of make, it is clearly an internal screwup
15:18 constantined joined #perl6
15:18 census joined #perl6
15:20 dalek niecza: 08a736f | (Solomon Foster)++ | lib/CORE.setting:
15:20 dalek niecza: Rat / FatRat stringification improvements.
15:20 dalek niecza:
15:20 dalek niecza: Borrow TimToady++'s rat stringification code from Rakudo, modify it to allow it to output all decimal digits if requested.  Use that to implement Rat.Str, Rat.perl, and FatRat.Str.
15:20 dalek niecza: review: https://github.com/sorear/niecza/commit/08a736f98b
15:21 colomon The  S32-num/stringify.t patch probably breaks the test file on Rakudo.  I don't have time to sort that out at the moment, but it would be easy enough for someone to copy the Niecza code over.
15:23 colomon also there's an obvious mistake in the spec that I worked around, I'll try to fix the spec later as well.  :)
15:24 xinming_ joined #perl6
15:26 emilbarton thanks geekosaur : MAKEFLAGS=-j1 was the solution
15:30 dalek specs: 220f088 | (Solomon Foster)++ | S02-bits.pod:
15:30 dalek specs: <555555555555555555555555555555555555555555555/5>.perl should be 111111111111111111111111111111111111111111111.0 (IMO).
15:30 dalek specs: review: https://github.com/perl6/specs/commit/220f088be7
15:30 colomon Turns out I'm not skiing this morning after all.
15:31 fgomez joined #perl6
15:33 * colomon is hoping the trail will still be ski-able at dinnertime.
15:33 emilbarton is there anything like Tk in rakudo?
15:33 SamuraiJack_ joined #perl6
15:39 dalek niecza: 713c785 | (Solomon Foster)++ | lib/CORE.setting:
15:39 dalek niecza: Simplify RatToStr code, making it closer to TimToady's original.
15:39 dalek niecza: review: https://github.com/sorear/niecza/commit/713c785a6c
15:39 colomon emilbarton: I don't believe so at the moment.
15:41 emilbarton anything in preparation ?
15:45 colomon emilbarton: I don't know.
15:47 colomon I mean, I'm sure it's on the radar somewhere, but I haven't heard anything about active work on it.  Of course, I miss a lot here too.
15:51 emilbarton ok - I hope something gets done soon
15:55 pmurias joined #perl6
15:55 pmurias jnthn: hi
15:55 FROGGS emilbarton: sometimes the best thing is to start working on it
15:57 emilbarton I knew you'd say that
15:57 colomon FROGGS: to be fair, this might be a particularly poor time to start working on it, given jnthn++'s current work.
15:57 emilbarton unfortunately I wouldn't be of great help I'm afraid (too amateurish)
15:59 FROGGS colomon: I believe the NativeCall API won't change much, so it might be easily portable
16:00 colomon FROGGS: may be true, but something interfacing more directly with JVM libraries might be a better choice by summertime.  maybe.
16:02 FROGGS ya, if you target the JVM only
16:02 sftp joined #perl6
16:02 FROGGS depends on what are the needs I suppose
16:03 pmurias which library do we need bound?
16:03 FROGGS ohh, it was about Tk an the like
16:06 dalek rakudo-js: ae25c11 | (Pawel Murias)++ | run (2 files):
16:06 dalek rakudo-js: Bring our 6model implementation closer to nqp-jvm.
16:06 dalek rakudo-js:
16:06 dalek rakudo-js: Pass qast_6model.t
16:06 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/ae25c11dd6
16:08 emilbarton this question must arise often I suppose -- what has been the main use for perl6 until now -- is it already taken by professionals in some fields?
16:08 grondilu rn: sub f($n) { state @cache; @cache[$n] //= $n < 2 ?? 1 !! .($n)
16:08 p6eval rakudo 123dfa: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse expression in block; couldn't find final '}'�at /tmp/7TInOEFoft:1�------> [32mche; @cache[$n] //= $n < 2 ?? 1 !! .($n)[33m�[31m<EOL>[0m�    expecting any of:�        postfix�        infix or meta-infix�        infi…
16:08 p6eval ..niecza v24-26-g713c785: OUTPUT«[31m===[0mSORRY![31m===[0m��Unable to parse block at /tmp/nWxUMdb_Hi line 1:�------> [32msub f($n) {[33m�[31m state @cache; @cache[$n] //= $n < 2 ?? [0m�Couldn't find final '}'; gave up at /tmp/nWxUMdb_Hi line 1 (EOF):�------> [32mche; @cache[$n] …
16:08 grondilu rn: sub f($n) { state @cache; @cache[$n] //= $n < 2 ?? 1 !! .($n)*$n given &?ROUTINE }; say f 4;
16:08 p6eval niecza v24-26-g713c785: OUTPUT«(timeout)»
16:08 p6eval ..rakudo 123dfa: OUTPUT«No such method 'Any' for invocant of type 'Int'␤  in  at src/gen/BOOTSTRAP.pm:882␤  in any  at src/gen/BOOTSTRAP.pm:879␤  in sub f at /tmp/T2NVgsUKeT:1␤  in block  at /tmp/T2NVgsUKeT:1␤␤»
16:09 grondilu rn: sub f($n) { state @cache; @cache[$n] //= $n < 2 ?? 1 !! .($n-1)*$n given &?ROUTINE }; say f 4;
16:09 p6eval rakudo 123dfa: OUTPUT«No such method 'Any' for invocant of type 'Int'␤  in  at src/gen/BOOTSTRAP.pm:882␤  in any  at src/gen/BOOTSTRAP.pm:879␤  in sub f at /tmp/mFN9mnsKjO:1␤  in block  at /tmp/mFN9mnsKjO:1␤␤»
16:09 p6eval ..niecza v24-26-g713c785: OUTPUT«24␤»
16:09 grondilu ^I've spent an hour trying to understand why a code like this did not work.
16:09 FROGGS emilbarton: I will use it for $work this year, but I need to port some (just a few) modules from p5 land first
16:11 FROGGS grondilu: and the answer is?
16:12 FROGGS jnthn: can you guess why !INTERPOLATE isnt called for $x here?
16:12 FROGGS nqp: my $x := "ab"; say("ab" ~~ / $x | a /)
16:12 p6eval nqp: OUTPUT«a␤»
16:13 FROGGS jnthn: and I'm right that NFA.subrule is the one who should call it?
16:14 grondilu FROGGS: it's a rakudo bug. Niecza gives the correct answer.
16:14 grondilu (it was just a fancy way to write the factorial function)
16:15 pmurias FROGGS: what do you plan to use perl6 for?
16:18 FROGGS well, to replace smaller perl 5 jobs (like sending sms to technicians on events), but in the end to use its grammars to parse incomming rpc calls which are not always soap
16:18 FROGGS parsing custom formats is absolutely a strength of perl 6
16:33 emilbarton ciao
16:33 nwc10 http://irclog.perlgeek.de is back up, but the logger bot is not? (I'm aware of http://colabti.org/irclogger/irclogger_log/perl6?date=2013-03-03 )
16:42 Rotwang joined #perl6
16:58 census_ joined #perl6
16:59 census joined #perl6
17:20 dalek roast: b10025a | (Solomon Foster)++ | S32-num/rat.t:
17:20 dalek roast: Refudge for current Niecza.
17:20 dalek roast: review: https://github.com/perl6/roast/commit/b10025a13c
17:23 masak greetings, #perl6!
17:23 SunilJoshi joined #perl6
17:23 masak I've been gone a week. am back now. :)
17:23 masak didn't really announce my departure, I think.
17:23 * masak has been to .cn
17:25 nwc10 was it fun?
17:27 masak yeah.
17:30 masak my Mandarin is still 不太好... but every little bit helps, fersure.
17:32 colomon \o/ masak!
17:33 masak \o/
17:41 spider-mario joined #perl6
17:47 japhb Welcome back, masak!
17:47 masak thanks!
17:48 pmurias joined #perl6
17:49 pmurias when will be the irc logger back on?
17:49 ggoebel_ pmurias: I'm suffering irc archive withdraw too
17:50 ggoebel_ guess the maintenance may not have turned out to be routine scheduled maintenance...
17:50 masak IRC logger down? oh noes...
17:51 pmurias_ joined #perl6
17:55 uvtc joined #perl6
17:59 Rotwang can I get somehow nicely indented output with .perl just like in Data::Dumper?
17:59 tadzik there's no way I know of
18:01 uvtc Rotwang: I was just asking about that yesterday. My understanding is that `.gist` is the pretty-printer, but also that it doesn't yet do nested data structures as pretty as I'd like.
18:01 uvtc Also, I think `say` implies .gist.
18:06 arnsholt Starting from the .gist code in Rakudo, it might not be too hard to write an indented pretty-printer
18:09 * masak .oO( no pun indented )
18:16 mtk joined #perl6
18:24 mtk joined #perl6
18:28 dvj rn: (1..2 x 1 xx 10 xx 5 ).perl.gist.say
18:28 p6eval rakudo 123dfa: OUTPUT«1..50␤»
18:28 p6eval ..niecza v24-26-g713c785: OUTPUT«1..5␤»
18:28 dvj different outputs!
18:29 pmurias_ left #perl6
18:30 dvj p: (1..2 x 1 xx 10 xx 5).say
18:30 p6eval pugs: OUTPUT«1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950␤»
18:31 pmichaud good afternoon, #perl6
18:31 masak pmichaud! \o/
18:40 rgc` joined #perl6
18:41 FROGGS r: '' ~~ / :my $a; <{ '$a' }> /
18:41 p6eval rakudo 123dfa:  ( no output )
18:41 FROGGS r: say '' ~~ / :my $a; <{ '$a' }> /
18:41 p6eval rakudo 123dfa: OUTPUT«#<failed match>␤»
18:41 FROGGS r: say '123' ~~ / :my $a=2; <{ '$a' }> /
18:41 p6eval rakudo 123dfa: OUTPUT«「1」␤␤»
18:41 FROGGS r: say '123' ~~ / :my $a=2; <{ "$a" }> /
18:41 p6eval rakudo 123dfa: OUTPUT«「2」␤␤»
18:43 FROGGS r: say '$a' ~~ / :my $a=2; <{ '$a' }> /
18:43 p6eval rakudo 123dfa: OUTPUT«#<failed match>␤»
18:43 FROGGS n: say '$a' ~~ / :my $a=2; <{ '$a' }> /
18:43 p6eval niecza v24-26-g713c785: OUTPUT«Potential difficulties:�  $a is declared but not used at /tmp/7ZRtneUyHR line 1:�------> [32msay '$a' ~~ / :my [33m�[31m$a=2; <{ '$a' }> /[0m��#<failed match>�»
18:43 FROGGS n: say '$a' ~~ / <{ '$a' }> /
18:43 p6eval niecza v24-26-g713c785: OUTPUT«Unhandled exception: Variable $a is not predeclared␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) ␤  at /home/p6eval/niecza/src/STD.pm6 line 5633 (STD.sorry @ 7) ␤  at /home/p6eval/niecza/src/NieczaActions.pm6 line 2049 (ANON @ 41) ␤  Ã¢â‚¬Â¦
18:43 FROGGS std: say '$a' ~~ / <{ '$a' }> /
18:43 p6eval std 52fe6d2: OUTPUT«ok 00:00 43m␤»
18:45 dalek rakudo/nom: fd27043 | pmichaud++ | src/core/Rat.pm:
18:45 dalek rakudo/nom: Have Rat.perl return decimal numbers if denominator is normalizable to a power of 10.  Fixes RT #117013.
18:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fd2704355e
18:45 masak TimToady: is <~~> in the regex slang considered procedural? S05 doesn't say it is.
18:46 colomon pmichaud++
18:46 masak TimToady: reason I ask was your comment about the Chomsky hierarchy.
18:48 dvj n: say 4 xx *
18:48 p6eval niecza v24-26-g713c785: OUTPUT«(timeout)»
18:49 * masak sincerely wishes he knew more about automata theory to be able to express the problematics of <~~> being fully declarative
18:49 masak it seems /<~~>/ is problematic, for example. in an almost Russellian way.
18:50 masak std: /<~~>/
18:50 p6eval std 52fe6d2: OUTPUT«ok 00:00 42m␤»
18:52 ObseLeTe joined #perl6
18:52 pmichaud r: say (3/1).perl
18:52 p6eval rakudo 123dfa: OUTPUT«3/1␤»
18:53 pmichaud now returns "3.0"
18:53 pmichaud > say (3/1).perl
18:53 pmichaud 3.0
18:53 masak \o/
18:54 pmichaud > say (1/5).perl
18:54 pmichaud 0.2
18:54 pmichaud > say (1/6).perl
18:54 pmichaud 1/6
18:54 tadzik pmichaud++
18:54 nwc10 rn: say (1/2).perl
18:54 p6eval rakudo 123dfa: OUTPUT«1/2␤»
18:54 p6eval ..niecza v24-26-g713c785: OUTPUT«0.5␤»
18:55 nwc10 rn: say (42/42).perl
18:55 p6eval rakudo 123dfa: OUTPUT«1/1␤»
18:55 p6eval ..niecza v24-26-g713c785: OUTPUT«1.0␤»
18:55 nwc10 :-)
18:55 pmichaud > say (1/2).perl
18:55 pmichaud 0.5
18:56 pmichaud I have to run errands again... hopefully someone can un-todo the now-passing tests
18:56 colomon n: say (3/1).perl
18:56 p6eval niecza v24-26-g713c785: OUTPUT«3.0␤»
18:56 [Coke] anyone else using rakudo on OS X? I can no longer build.
18:57 cognominal joined #perl6
18:57 [Coke] (trying rakudo using --gen-nqp=master -gen-parrot=master, and just --gen-nqp=master. (retrying with just --gen-nqp)
18:59 colomon [Coke]: I haven't had any difficulties, but I'm probably a few days out of date, and always use just --gen-parrot with no arg
19:00 * geekosaur tries
19:00 colomon [Coke]: I'm loath to mess with my build because I'm actively working on ABC in Rakudo atm.
19:01 [Coke] (I was just trying to get a recent NQP installed so I could play with nqp-jvm-prep)... argh, so even if it works with old NQP, that probably still won't help me with nqp-jvm.
19:01 [Coke] colomon: bleeding edge sometimes painful, aye.
19:01 geekosaur hm, no, actually, not quite willing to use =master :)
19:02 [Coke] nope, that fails also. time to ditch rakudo and see if I can just get nqp built.
19:13 dalek perl6-roast-data: 2743fb2 | coke++ | / (4 files):
19:13 dalek perl6-roast-data: today (automated commit)
19:13 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/2743fb2b48
19:14 adu_ joined #perl6
19:14 [Coke] NOOOO SOMEONE BROKE THE DAILY TEST RUN
19:14 [Coke] rakudo now has 3 failures.
19:14 FROGGS moritz: can you comment on https://rt.perl.org/rt3/Ticket/Display.html?id=76744 and ad an example?
19:15 FROGGS [Coke]: wasnt me
19:16 FROGGS [Coke]: just a timing issue as it seems
19:17 colomon [Coke]: probably me.
19:18 colomon [Coke]: lots of changes in Rat stringification so the tests actually match the spec.  I believe pmichaud++ has fixed rakudo by now, too.
19:21 * colomon just realized his problem is he switched back to using niecza without thinking about it!  grump.
19:23 lue hello o/
19:24 colomon \o
19:33 [Coke] pr: sub a($a, $b=$a) { say "$a $b" } ; a("hello");
19:33 [Coke] npr: sub a($a, $b=$a) { say "$a $b" } ; a("hello");
19:33 p6eval pugs: OUTPUT«*** Undeclared variable: ("$a",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xf6ed1ac5>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xf6ed2531>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0xf6ed2…
19:33 p6eval ..rakudo fd2704, niecza v24-26-g713c785: OUTPUT«hello hello␤»
19:34 [Coke] colomon: that broke S32-num/stringify.t for pugs. :(
19:34 colomon [Coke]: sorry!
19:34 [Coke] eh. pugs gets more fragile as time goes on.
19:35 FROGGS no, you just discover it :o)
19:35 [Coke] I'll remove it from the run list for now.
19:36 cognominal joined #perl6
19:36 aqwzsx joined #perl6
19:37 dalek roast: 7156048 | coke++ | / (13 files):
19:37 dalek roast: pugs fudges
19:37 dalek roast:
19:37 dalek roast: Recent spec updates mean we no longer conform. (plus some new tests we never passed)
19:37 dalek roast: review: https://github.com/perl6/roast/commit/7156048a26
19:37 dalek Pugs.hs: 20b98d5 | coke++ | t/spectest.data:
19:37 dalek Pugs.hs: Recent spec changes mean we no longer conform.
19:37 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/20b98d5474
19:38 [Coke] These are probably easily fixed by someone who knows a minimum of haskell.
19:40 pmurias is there any motivation for updating pugs?
19:40 [Coke] Do you have any?
19:42 [Coke] I have enough to occasionally make sure its tests are green for anyone who wants to take a whack at making it conform to spec. But no, there doesn't seem to be any motivation to fix it or add new features.
19:42 [Coke] it's still faster than rakudo.
19:43 * geekosaur would still like to try to get it up to speed, but still flounders trying to deal with its source...
19:44 census poor geekosaur :(
19:46 dalek nqp: 110a95d | (Tobias Leich)++ | src/QRegex/P6Regex/Actions.nqp:
19:46 dalek nqp: RT #77410 implement :ignorecase for cclasses
19:46 dalek nqp:
19:46 dalek nqp: Approach was taken from P5Regex.
19:46 dalek nqp: review: https://github.com/perl6/nqp/commit/110a95d3e1
19:48 grondilu rn: my $a = [ <foo bar> ]; say $a.perl; $a »~=» '$'; say $a.perl;
19:48 p6eval rakudo fd2704, niecza v24-26-g713c785: OUTPUT«["foo", "bar"]␤["foo\$", "bar\$"]␤»
19:50 grondilu rn: my $a = [ <foo bar> ]; say $a.perl; $a = $a Z~ <$ #>; say $a.perl;
19:50 p6eval rakudo fd2704, niecza v24-26-g713c785: OUTPUT«["foo", "bar"]␤["foo", "bar"]␤»
19:53 jnthn evening, #perl6
19:54 diakopter o/
19:54 masak jnthn! \o/
19:55 * jnthn is safely in goteborg
19:55 dalek roast: 21c8ec8 | coke++ | S32-str/substr.t:
19:55 dalek roast: pugs fudge
19:55 dalek roast: review: https://github.com/perl6/roast/commit/21c8ec8df1
19:55 [Coke] got borg?
19:57 masak https://en.wikipedia.org/wiki/Gothenburg
19:57 jnthn *e*borg. Electronic ones!
19:58 dvj I made a pull request on roast :)
20:00 diakopter dvj: you don't have a commit bit?
20:02 dvj diakopter: I think I do. It's just that I haven't commited to perl6 before, so I thought it'd be safer to pull.
20:02 dvj I'll just merge it myself then :)
20:03 dalek roast: 76a86f7 | dagurval++ | S12-attributes/class.t:
20:03 dalek roast: don't create accessor if the class declares an explicit method of that name
20:03 dalek roast: review: https://github.com/perl6/roast/commit/76a86f717b
20:03 dalek roast: 24bb91f | Dagur++ | S12-attributes/class.t:
20:03 dalek roast: Merge pull request #28 from dagurval/master
20:03 dalek roast:
20:03 dalek roast: test for having a method with the same name as an accessor
20:03 dalek roast: review: https://github.com/perl6/roast/commit/24bb91f498
20:03 diakopter \o/
20:03 dvj \o/
20:04 * [Coke] tries to fix Pugs so we get (Int) instead of Int()
20:04 sevin joined #perl6
20:05 masak dvj: was that pull request related to some RT ticket?
20:05 masak ISTR discussing this issue with jnthn, and possibly filing away the discussion as an RT resource.
20:05 cognominal__ joined #perl6
20:06 dvj masak: no, it's an issue I ran into a couple of weeks ago
20:06 dvj I talked about it here though
20:06 masak I remember talking about it with jnthn at least twice.
20:07 masak I think it was >2weeks ago.
20:08 dvj well, now there's a test for it :)
20:08 dvj so, what's an RT ticket?
20:09 adu_ joined #perl6
20:09 FROGGS p: say "m" ~~ /:i [M]/
20:09 p6eval pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.20120717/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** Can't locate P…
20:09 * masak tries to find it
20:10 * geekosaur has pugs source in his haskell container now but has no idea where to start... sigh
20:11 geekosaur wonder if there's some overview of how the source works
20:11 diakopter dvj: https://rt.perl.org/rt3/Public/?nossl=true
20:12 masak no, can't find such a tikkit.
20:12 [Coke] geekosaur: not that I've found.
20:12 [Coke] Look at recent commits - some touch Prim.hs - a lot of simple stuff can be added/tweaked in there.
20:13 [Coke] if adding a new top level sub, or a method to Str, e.g.
20:13 dalek roast: add5509 | (Tobias Leich)++ | S05-modifier/ignorecase.t:
20:13 dalek roast: RT #77410 test for :ignorecase in character classes
20:13 dalek roast: review: https://github.com/perl6/roast/commit/add5509c8f
20:14 dalek roast: 0a5c79d | (Tobias Leich)++ | S05-metasyntax/charset.t:
20:14 dalek roast: added TODOs for niecza/rakudo about cclass subtraction
20:14 dalek roast: review: https://github.com/perl6/roast/commit/0a5c79d6ac
20:14 ggoebel_ perlgeek.de and irc archives are back up :-)
20:16 dalek Pugs.hs: 5933753 | coke++ | / (2 files):
20:16 dalek Pugs.hs: stringify types as (Int) instead of Int()
20:16 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/5933753509
20:17 dalek roast: 5e810cf | coke++ | / (3 files):
20:17 dalek roast: pugs re-unfudge some tests.
20:17 dalek roast: review: https://github.com/perl6/roast/commit/5e810cfcd4
20:18 FROGGS ggoebel_++
20:18 [Coke] geekosaur: I fixed that by search for "()" in the source: :|
20:19 geekosaur huh, I'm surprised that worked considering that it seems to use prettyprinting combinators for stuff, so I was expecting a call to parens
20:20 * geekosaur tosses cabal tree, pulls from github
20:20 masak ggoebel_++
20:22 ggoebel_ irclog.perlgeek.de is up... but doesn't appear to be logging anything
20:24 FROGGS what bot does that?
20:26 [Coke] r: say 3/2
20:26 p6eval rakudo fd2704: OUTPUT«1.5␤»
20:26 [Coke] r: say 3/7
20:26 p6eval rakudo fd2704: OUTPUT«0.428571␤»
20:26 [Coke] r: say 3/7.perl
20:26 p6eval rakudo fd2704: OUTPUT«0.428571␤»
20:26 [Coke] r: say (3/7).perl
20:26 p6eval rakudo fd2704: OUTPUT«3/7␤»
20:26 [Coke] rpn: say (3/7).perl
20:26 p6eval niecza v24-26-g713c785: OUTPUT«<3/7>␤»
20:26 p6eval ..rakudo fd2704, pugs: OUTPUT«3/7␤»
20:26 diakopter phenny: tell ilbot2 welcome back!
20:26 phenny diakopter: I'll pass that on when ilbot2 is around.
20:30 geekosaur right, still need that patch to HsPerl5
20:38 cognominal__ joined #perl6
20:41 [Coke] (nqp builds fine. rakudo, with --gen-nqp, fails)
20:51 moritz_ joined #perl6
20:52 adu_ joined #perl6
20:53 masak it's nice to be back. :)
20:53 masak good night, #perl6
20:53 moritz \o masak
20:54 [Coke] r: multi sub f($a) {}; multi sub f($a) {}; f(42)
20:54 p6eval rakudo fd2704: OUTPUT«Ambiguous call to 'f'; these signatures all match:␤:($a)␤:($a)␤␤  in block  at /tmp/0RGSgO7icy:1␤␤»
20:55 [Coke] r: sub foo() { return 1,2,:c<3> }; say foo().perl
20:55 p6eval rakudo fd2704: OUTPUT«(1, 2, "c" => Mu)␤»
20:55 [Coke] rakudo: "foo" ~~ / $<foo><bar> = [ foo ] /; say $<foo><bar>
20:55 p6eval rakudo fd2704: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter = (must be quoted to match literally)�at /tmp/6bCxyI2eyu:1�------> [32m"foo" ~~ / $<foo><bar> [33m�[31m= [ foo ] /; say $<foo><bar>[0m�Unable to parse regex; couldn't find final '/'�at /tmp/6bCxyI2…
20:56 FROGGS [Coke]: I can tell you which line of yode you need to tweak :o)
20:56 FROGGS *code
21:13 _ilbot joined #perl6
21:13 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
21:13 FROGGS nqp: my $rx := /a/; say( $rx.GET_NFA_TYPE )
21:14 p6eval nqp: OUTPUT«Method 'GET_NFA_TYPE' not found for invocant of class 'NQPRegex'␤current instr.: '' pc 129 ((file unknown):154423981) (/tmp/XbHI7iRvpd:1)␤»
21:14 jnthn Hmm...
21:14 FROGGS nqp: my $rx := /a/; say( $rx.!nfa )
21:14 p6eval nqp: OUTPUT«Confused at line 2, near "say( $rx.!"␤current instr.: 'panic' pc 14698 (src/stage2/gen/NQPHLL.pir:5229) (src/stage2/gen/NQPHLL.pm:278)␤»
21:14 jnthn r: /a/.NFA
21:14 p6eval rakudo fd2704:  ( no output )
21:15 jnthn nqp: (token foo { a }).NFA
21:15 p6eval nqp: OUTPUT«Method 'NFA' not found for invocant of class 'NQPRegexMethod'␤current instr.: '' pc 119 ((file unknown):65) (/tmp/4p4fMZIwV6:1)␤»
21:15 jnthn Oh...there's some weird wrapping thing going on there
21:17 FROGGS the knowhow NQPRegex has method NFA
21:17 FROGGS which returns $!nfa
21:18 jnthn Yes
21:19 FROGGS looks like I'm lacking NQPRegex knowhow here
21:30 FROGGS .NFA only occurs once:
21:30 FROGGS my $meth := $cursor.HOW.find_method($cursor, $name, :no_trace(1));
21:30 FROGGS @substates := $meth.NFA() if nqp::can($meth, 'NFA');
21:31 FROGGS hmmm
21:33 FROGGS nqp: say( /a/.ALT_NFA )
21:33 p6eval nqp: OUTPUT«Method 'ALT_NFA' not found for invocant of class 'NQPRegex'␤current instr.: '' pc 119 ((file unknown):65) (/tmp/B5P7CRvk6z:1)␤»
21:34 FROGGS nqp: say( /a/.ALT_NFAS )
21:34 p6eval nqp: OUTPUT«Method 'ALT_NFAS' not found for invocant of class 'NQPRegex'␤current instr.: '' pc 119 ((file unknown):65) (/tmp/zNmDmZodbP:1)␤»
21:41 FROGGS nqp: my $code_obj := nqp::create(NQPRegex); say($code_obj.ALT_NFAS)
21:41 p6eval nqp: OUTPUT«Hash[0x942dd70]␤»
21:45 jaldhar_ joined #perl6
21:46 jnthn FROGGS: well, what on earth...there's two things called NQPRegex...
21:47 FROGGS O.o
21:49 FROGGS a class and a knowhow
21:49 FROGGS or something else?
21:50 jnthn yeah
21:50 jnthn Un-cleaned-up leftovers, it seems
22:05 uvtc left #perl6
22:05 am0c joined #perl6
22:23 jnthn 'night, #perl6
22:23 FROGGS gnight
22:42 adu_ joined #perl6
22:48 mberends joined #perl6
22:55 mberends joined #perl6
23:49 * sjn enjoys looking at http://www.youtube.com/watch?v=_ahvzDzKdB0
23:49 sjn "Growing a language" by Guy Steele, at 1998 ACP OOPSLA
23:50 sjn increadibly clever talk! :)
23:50 sjn also, it contains the phrase "There's more than one way to do it", even if he's talking about Java :)
23:57 tadzik ha!
23:57 sjn it's are *really* good talk

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

Perl 6 | Reference Documentation | Rakudo