»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:04 breinbaas left, risou left, yeltzooo left, prammer left, patspam left, timotimo joined, patspam joined, breinbaas joined, chee joined, irclogbot_backup joined, prammer joined, huf joined, risou joined 00:07 yeltzooo joined 00:08 census left 00:09 LylePerl left 00:14 quester left 00:20 cognominal left 00:21 cognominal joined
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:25 kaare__ left
lue rn: say (2/10).perl 00:29
p6eval niecza v24-24-gbdc3343: OUTPUT«<1/5>␤»
..rakudo 123dfa: OUTPUT«1/5␤»
00:34 Khisanth left 00:37 spider-mario left 00:38 cognominal left, cognominal joined 00:39 thundergnat left
lue has that bug been reported? 00:41
[ (2/10).perl should return .2, not <1/5> ] 00:42
colomon spec reference? 00:43
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.
lue S02:787..789 00:45
uvtc lue: re. an Emacs perl6 mode, that would be nice. :)
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.
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:48
rnp: say <1/5>.perl 00:49
p6eval niecza v24-24-gbdc3343: OUTPUT«<1/5>␤»
..rakudo 123dfa, pugs: OUTPUT«"1/5"␤»
colomon n: say <1/5>.WHAT
p6eval niecza v24-24-gbdc3343: OUTPUT«(Rat)␤»
lue rp: say <1/5>.WHAT
rnp: say <1/5>.WHAT
p6eval niecza v24-24-gbdc3343: OUTPUT«(Rat)␤»
..pugs: OUTPUT«Str()␤»
..rakudo 123dfa: OUTPUT«(Str)␤»
colomon that should be RatStr according to the spec
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.
colomon glares at TimToady
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?
lue colmon: I wonder why one wouldn't want to do (1/2) (or rather, insist on <>)
uvtc: just some tutorial-esque docs for P6 (haven't publicized them anywhere yet though). Nothing I can't stop soon :) 00:53
(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.
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:55
00:56 Khisanth joined
lue I want to be done with my S02-related doc at least before pushing to a github repo :) 00:57
uvtc S02 is large. 00:58
colomon n: say <1/1000000>
p6eval niecza v24-24-gbdc3343: OUTPUT«1E-06␤»
colomon n: say pi
p6eval niecza v24-24-gbdc3343: OUTPUT«3.1415926535897931␤»
colomon n: say <1/1000000>.perl
p6eval niecza v24-24-gbdc3343: OUTPUT«<1/1000000>␤»
colomon n: say pi.perl
p6eval niecza v24-24-gbdc3343: OUTPUT«3.1415926535897931e0␤»
colomon ugh, right. 00:59
lue uvtc: yup :) . And I mention that at the very beginning.
colomon lue: say <2/6>.perl # <1/3> 01:00
ie niecza is correct
at least according to the corner of the spec I'm looking at. :)
lue
.oO(Now that my "secret" project is out, I might actually push soon, so I don't make annoyingly vague statements about it)
r: say <1/1000000>
p6eval rakudo 123dfa: OUTPUT«1/1000000␤»
lue r: say <1/1000000>.perl
p6eval rakudo 123dfa: OUTPUT«"1/1000000"␤»
colomon lue: oh, wait, found the other bit.
lue r: say (1/1000000) 01:01
p6eval rakudo 123dfa: OUTPUT«0.000001␤»
colomon n: say <1/10>.perl
p6eval niecza v24-24-gbdc3343: OUTPUT«<1/10>␤»
lue If the denominator has solely factors 2, 5, and/or -1, .perl is supposed to return a decimal.
colomon lue: yes 01:02
pulling up niecza source now
lue: can you check the test suite for this?
lue will check
The only /[Fat]?Rat/ based .perl tests don't test for decimalization, it seems 01:07
colomon FatRat shouldn't 01:08
but Rat should
you work on the tests, I'll work on the code?
lue for niecza and rakudo?
Should I place the tests in S02 or S32? (Methinks S32-num/rat.t) 01:09
colomon that's a good question. probably s32-num/rat.t is good enough for now. 01:10
lue colomon: If you aren't going to fix rakudo, I'll file the necessary rakudobug 01:19
01:19 bowtie left
colomon right now I'm pondering a good way to test for "only factors are 2 and 5". 01:19
01:20 sevin left
dalek ast: f788145 | lue++ | S32-num/rat.t:
[S32-num] add tests for Rat.perl

Specifically test to make sure .perl returns a decimal answer if the denominator consists solely of the factors 2, 5, and/or -1.
01:25
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 &
sorear lue: Those conditions are equivalent to "it terminates" 01:30
colomon: $i /= 2 while $i %% 2; %i /= 5 while $i %% 5; say $i == 1 01:31
TimToady div= ? 01:32
01:32 bowtie joined
TimToady I guess it doesn't matter 01:32
01:38 Eddward joined
colomon sorear: I was hoping for something more efficient. :) 01:39
just looking at Hacker's Delight for clues to figuring out how to get rid of the 2s quickly. 01:40
n: say 2348234893284 +& -2348234893284
p6eval niecza v24-24-gbdc3343: OUTPUT«4␤»
colomon n: say 2348234893284 / 4
p6eval niecza v24-24-gbdc3343: OUTPUT«587058723321␤»
TimToady well, find first set bit will let you divide by powers of 2 01:41
colomon TimToady: right, that's above.
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
sorear the denominator of a rat is not a bigint, though
colomon n: say 23482348932842222222222222222222222222222 +& -23482348932842222222222222222222222222222
p6eval niecza v24-24-gbdc3343: OUTPUT«2␤»
sorear niecza's bitops don't work with bigints anyway 01:43
colomon n: my $a = 4234882849023849082390489 * 2 ** 124; say $a +& -$a
r: my $a = 4234882849023849082390489 * 2 ** 124; say $a +& -$a 01:44
TimToady there's control ] in there
colomon argh
n: my $a = 321412 * 2 ** 124; say $a +& -$a
p6eval niecza v24-24-gbdc3343: OUTPUT«85070591730234615865843651857942052864␤»
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␤»
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
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
colomon sorear++
n: my $a = 321412 * 2 ** 124; my $b = $a +& -$a; say $b; say $a % $b; say $a div $b
p6eval niecza v24-24-gbdc3343: OUTPUT«85070591730234615865843651857942052864␤0␤80353␤»
sorear all odd numbers are invertable in the ring Z/2^64Z 01:47
whether this is actually any faster than division remains to be seen
You could probably use a base-5 Schoenhage-Strassen approach to find the 5-adic norm of an integer in quasilinear time 01:50
cut the number in half, multiply the left side by a large power of 2 using the radix-5 bigints, repeat
colomon I'm trying it with the $a +& -$a trick for 2 and your %i /= 5 while $i %% 5 for 5. 01:51
sorear r: say (2**128 +| 2**256) == (2**128 + 2**256) 01:53
p6eval rakudo 123dfa: OUTPUT«True␤»
sorear n: say (2**128 +| 2**256) == (2**128 + 2**256)
p6eval niecza v24-24-gbdc3343: OUTPUT«True␤»
sorear r: say (2**128 +| 2**256) 01:54
p6eval rakudo 123dfa: OUTPUT«115792089237316195423570985008687907853610267032561502502920958615344897851392␤»
sorear r: say (2**128 +^ 3)
p6eval rakudo 123dfa: OUTPUT«340282366920938463463374607431768211459␤»
sorear um
apparently somebody added bigint bitops to niecza when I wasn't looking
somebody++
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.
at least, I think I remember doing that.
BigInteger.cs has all the ones I did built-in, I think, just a matter of wiring it up. 01:56
01:56 bowtie left
colomon spectesting... 02:07
02:15 PacoAir left
Eddward r: say "test" 02:17
p6eval rakudo 123dfa: OUTPUT«test␤»
Eddward r: (0 but Bool::True) and print "$_" for 1..30
p6eval rakudo 123dfa: OUTPUT«(signal ABRT)12345678910111213»
Eddward r: (0 but Bool::True) and print "$_" for 1..33 02:18
p6eval rakudo 123dfa: OUTPUT«(signal ABRT)12345678910111213»
Eddward r: (0 but Bool::True) and print $_ for 1..33
p6eval rakudo 123dfa: OUTPUT«(signal ABRT)12345»
Eddward doesn't fail locally without the quotes. 02:19
r: (0 but Bool::True) and print $_ for 1..3
p6eval rakudo 123dfa: OUTPUT«123»
Eddward r: (0 but Bool::True) and print $_ for 1..20
p6eval rakudo 123dfa: OUTPUT«(signal ABRT)12345»
Eddward r: (0 but Bool::True) and print $_ for 1..10
p6eval rakudo 123dfa: OUTPUT«(signal ABRT)12345»
Eddward r: (0 but Bool::True) and print $_ for 1..4
p6eval rakudo 123dfa: OUTPUT«1234»
Eddward r: (0 but Bool::True) and print $_ for 1..5 02:20
p6eval rakudo 123dfa: OUTPUT«12345»
Eddward r: (0 but Bool::True) and print $_ for 1..6
p6eval rakudo 123dfa: OUTPUT«(signal ABRT)12345»
Eddward bingo
colomon ye gads, niecza is failing a lot of spectests at the moment. 02:22
02:26 FROGGS_ joined, sqirrel__ joined
colomon also, I have broken ABC. sigh. 02:28
02:30 sqirrel_ left, FROGGS left
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:30
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
rat objects are always kept in lowest terms 02:37
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:38
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␤␤»
colomon S02 does try to say you don't have to reduce, but every implementation ever has.
lue Ah. I just now see that the part on that is saying "could" instead of "will" 02:42
Should I remove the tests I added from S32-num/rat.t then? 02:44
colomon did you push them?
lue yeah, look earlier
02:46 gcole joined
colomon give me a bit to sort this out. I may just move them to this test file. 02:46
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
*removed *in stringify.t's
colomon n: (4.5 ** 60).WHAT 02:53
p6eval niecza v24-24-gbdc3343: ( no output )
colomon n: say (4.5 ** 60).WHAT 02:54
p6eval niecza v24-24-gbdc3343: OUTPUT«(Rat)␤»
colomon n: say (4.5 ** 60).nude
p6eval niecza v24-24-gbdc3343: OUTPUT«1797010299914431210413179829509605039731475627537851106401 1152921504606846976␤»
lue thinks it's safe to file a rakudobug on (1/2).perl 02:55
colomon n: say (4.5 ** 60).perl 02:56
p6eval niecza v24-24-gbdc3343: OUTPUT«<1797010299914431210413179829509605039731475627537851106401/1152921504606846976>␤»
colomon n: say 1152921504606846976 +& -1152921504606846976 02:58
p6eval niecza v24-24-gbdc3343: OUTPUT«1152921504606846976␤»
colomon n: say 1152921504606846976 / 1152921504606846976
p6eval niecza v24-24-gbdc3343: OUTPUT«1␤»
colomon oh, that's special 02:59
need a better stringifier 03:00
uvtc How do I write to stderr? 03:01
03:01 cognominal left
geekosaur $*STDERR I think? 03:01
uvtc I think it's $*ERR. 03:02
But how do I print to it?
r: say $*ERR "hi"
colomon r: $*ERR.say: "This is how?"
p6eval rakudo 123dfa: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/ecwlH6HjYq:1␤------> say $*ERR ⏏"hi"␤ expecting any of:␤ postfix␤ infix or meta-infix␤ infix stopper␤ statement end␤ statement modifier␤ statem…
rakudo 123dfa: OUTPUT«This is how?␤»
uvtc ttiar 03:03
03:03 cognominal joined
uvtc Oh. `warn` I think. 03:03
Ah, in S32/IO. 03:06
Looks like `note` is similar.
lue uvtc: did you see what colomon just tried? 03:07
uvtc Ooof!
Sorry about that. :)
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
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:10 cognominal left
uvtc Note doesn't attach any additional info for me. Which is nice. 03:11
So I got *that* going for me. Which is nice.
TimToady note is simply for talking to STDERR
03:12 xilo_ joined
lue ah. I thought it would. 03:14
03:16 xilo_ left, baest_ joined 03:17 xilo_ joined 03:18 orafu left, orafu joined, sjn joined
uvtc Is there a way to call `my @lines = slurp 'foo.txt'` to autochomp all lines? 03:18
03:19 eternaleye left
lue uvtc: if you want to remove the newline from every line, then my @lines = slurp('foo.txt').lines».chomp 03:20
(then you actually get an array too)
uvtc Oh. Whoops. Failed to notice that I wasn't getting an array back. 03:21
Hm. I'd've expected `my @lines = slurp 'foo.txt'` to give me an array there. 03:22
colomon slurp gives you a string 03:23
try @lines = 'foo.txt'.slurp.lines
uvtc Right. Though, I figured that, in list context, it would give me an array of lines.
geekosaur I would expect it to work like the perl5 module or like setting $/ = undef in perl5, the whole file as a single string
colomon no
uvtc: it's just like saying @lines = "this is a line" 03:24
uvtc colomon: ok
colomon: thanks
lue (wait, I don't think the ».chomp does anything after that)
colomon lue: you don't need to chomp the output of lines
03:24 rhr_ joined
lue I know. Quite a no-op, eh? :) 03:25
03:26 simcop2387_ joined
uvtc Hm. Also tried `my @lines = slurp('foo.txt').lines`, but that doesn't work... 03:27
colomon: `'foo.txt'.slurp.lines` doesn't work for me. 03:28
colomon yeah, I'm always fuzzy on the details.
uvtc No such method 'slurp' for invocant of type 'Str'
lue uvtc: I always do open('foo.txt',:r).slurp , so I don't recall if slurp(file) works
colomon it has at some point, but whether it still does now... 03:29
uvtc Gah. Sorry. This works: `my @lines = slurp('foo2.txt').lines;`
and it autochomps, too.
03:29 jfried_ joined
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:30 sdgvf left, jfried_ is now known as jfried, simcop2387_ is now known as simcop2387
uvtc Hehehe. Was looking for the opposite of slurp. (Clojure uses `spit`. Guess that's too vulgar for P6. :) 03:32
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
lue I recall there once being a similarly named method. Maybe it was squirt? 03:34
TimToady spurt is what it is currently
uvtc hahahaha
lue yeah, spurt
geekosaur squirt? 03:35
:)
03:36 Eddward left
lue
.oO(.inhale/.exhale)
03:36
colomon n: say 1558657976916843360832062017400788597510.58834953945635510598466400011830046423710882663726806640625.perl
p6eval niecza v24-24-gbdc3343: OUTPUT«<898505149957215605206589914754802519866043058145244698085/576460752303423488>␤»
colomon :\
03:37 stevan_ joined 03:38 sdgvf joined 03:39 Yappo__ joined
uvtc TimToady: draught / pour 03:42
geekosaur suck/blow? 03:44
lue
.oO(copy/paste ?)
03:46
geekosaur ctrlc/ctrlv :p
(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. :)
Also, if you spin a "d" upside-down it looks like a "p". :) 03:48
lue geekosaur: why would you want to interrupt a file‽ 03:49
uvtc like if you spin around reading in a file, it's writing out a file. 03:50
colomon nr: say 23123.fmt("%010d") 03:54
p6eval rakudo 123dfa, niecza v24-24-gbdc3343: OUTPUT«0000023123␤»
colomon nr: my $a = 10; say 23123.fmt("%0$ad")
p6eval niecza v24-24-gbdc3343: OUTPUT«===SORRY!===␤␤Variable $ad is not predeclared at /tmp/tPWr2D9E69 line 1:␤------> my $a = 10; say 23123.fmt("%0⏏$ad")␤␤Potential difficulties:␤ $a is declared but not used at /tmp/tPWr2D9E69 line 1:␤------> my [33…
..rakudo 123dfa: OUTPUT«===SORRY!===␤Variable '$ad' is not declared␤at /tmp/0ZOBfpJiHB:1␤------> my $a = 10; say 23123.fmt("%0$ad⏏")␤ expecting any of:␤ postfix␤»
colomon nr: my $a = 10; say 23123.fmt("%0{$a}d")
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…
..rakudo 123dfa: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/j8T8QJk6y_:1␤␤d␤»
geekosaur heh 03:55
colomon nr: my $a = 10; say 23123.fmt("\%0{$a}d")
p6eval rakudo 123dfa, niecza v24-24-gbdc3343: OUTPUT«0000023123␤»
geekosaur suggest you use '' so it doesn't try to interpolate the format
ah
colomon that'll do
geekosaur I would have used %0*d and passed a parameter, does that not work?
(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.
geekosaur nr: my $a = 10; say 23123.fmt('%0*d', $a)
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…
..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␤␤»
geekosaur apparently not 03:57
might need to think about that one...
lue nr: my $a = 10; say 23123.fmt('%0{*}d', $a)
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␤␤»
..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 sftp left
colomon rn: say 1000001/10000 03:57
p6eval rakudo 123dfa, niecza v24-24-gbdc3343: OUTPUT«100.0001␤» 03:58
03:58 sftp joined
colomon Rat.perl is getting ridiculously complex 04:00
04:02 woosley joined
TimToady I think the current .Str output is probably fine, actually 04:03
colomon rn: 1558657976916843360832062017400788597510.058834953945635510598466400011830046423710882663726806640625
p6eval rakudo 123dfa, niecza v24-24-gbdc3343: ( no output )
colomon rn: say 1558657976916843360832062017400788597510.058834953945635510598466400011830046423710882663726806640625
p6eval rakudo 123dfa: OUTPUT«1558657976916843360832062017400788597510.05883495394563551060␤»
..niecza v24-24-gbdc3343: OUTPUT«1.5586579769168432E+39␤»
lue r: say (1/2).Str
p6eval rakudo 123dfa: OUTPUT«0.5␤»
colomon rn: say 1558657976916843360832062017400788597510.058834953945635510598466400011830046423710882663726806640625.perl
p6eval niecza v24-24-gbdc3343: OUTPUT«<1797010299914431210413179829509605039731475627537851106401/1152921504606846976>␤»
..rakudo 123dfa: OUTPUT«1797010299914431210413179829509605039731475627537851106401/1152921504606846976␤»
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
takadonet irc.perl6.org down? 04:04
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
that 5 and 2 verbiage is quite ancient 04:06
colomon but... but... I just about finished writing it, darnit!
lue colomon: that's why I was reluctant to mention it just now :)
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
colomon TimToady: what current algorithm? 04:08
rn: say (4.5 ** 27).perl
TimToady the one I wrote a year ago or so
p6eval niecza v24-24-gbdc3343: OUTPUT«<58149737003040059690390169/134217728>␤»
..rakudo 123dfa: OUTPUT«58149737003040059690390169/134217728␤»
TimToady that got put into both niecza and rakudo
colomon TimToady: oh, that's where I've seen this code before.
TimToady: nope, see above
or at least, it's not in the right place there. 04:09
colomon is about to fall asleep sitting up.
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.
TimToady you sure you're not just running into the 64-bit limit on denominator? 04:10
colomon TimToady: sure
niecza> say (4.5 ** 27).perl
433249302231073824.244664378464221954345703125
lue rn: say (1/10).perl # should be .1
04:10 s0rear joined
colomon (that's with my new version of Rat.perl 04:10
p6eval niecza v24-24-gbdc3343: OUTPUT«<1/10>␤»
..rakudo 123dfa: OUTPUT«1/10␤»
colomon lue: hmmm, actually I've made that 0.1
TimToady rn: say (1/10).Str 04:11
p6eval rakudo 123dfa, niecza v24-24-gbdc3343: OUTPUT«0.1␤»
lue Oh yeah, leading zero should be there (according to the S02 examples)
TimToady the .Str algo already does it
colomon rn: say (4.5 ** 27)
p6eval niecza v24-24-gbdc3343: OUTPUT«4.3324930223107386E+17␤»
..rakudo 123dfa: OUTPUT«433249302231073824.2446643785␤»
colomon oh, only for rakudo.
interesting.
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
p6eval niecza v24-24-gbdc3343: OUTPUT«4.3324930223107386E+17␤»
..rakudo 123dfa: OUTPUT«433249302231073824.2446643785␤»
lue rn: say (1/3).Str
p6eval niecza v24-24-gbdc3343: OUTPUT«0.33333333333333331␤»
..rakudo 123dfa: OUTPUT«0.333333␤»
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
p6eval niecza v24-24-gbdc3343: OUTPUT«4.3324930223107386E+17␤»
..rakudo 123dfa: OUTPUT«433249302231073824.2446643785␤»
TimToady is not the soldier on the ground :)
colomon will happily steal TimToady's algorithms for Niecza. 04:14
colomon will leave his updated tests sitting on his harddrive, rather than generating unnecessary rakudo consternation when someone spectests in the morning. 04:15
afk # sleep
lue good ♞, colomon o/ 04:16
uvtc Ok. This seems to work: `my @txt-files = dir( test => /\.txt$/ );` 04:19
Found that at doc.perl6.org/routine/dir . 04:20
04:21 gcole left
lue strongly feels regexes should have support for matching pairs of parens from an arbitrary list of paren pairs 04:28
TimToady nr: say '((())())()' ~~ / '(' ~ ')' <~~>? / 04:30
p6eval niecza v24-24-gbdc3343: OUTPUT«===SORRY!===␤␤Action method assertion:sym<~~> not yet implemented at /tmp/SP8LeadpMW line 1:␤------> say '((())())()' ~~ / '(' ~ ')' <~~⏏>? /␤␤Unhandled exception: Unable to resolve method oplift in type Any␤ at /home/…
..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␤␤»
TimToady nr: say '((())())()' ~~ / ['(' ~ ')' <~~> | ''] / 04:31
p6eval niecza v24-24-gbdc3343: OUTPUT«===SORRY!===␤␤Action method assertion:sym<~~> not yet implemented at /tmp/wqknpm9LtR line 1:␤------> say '((())())()' ~~ / ['(' ~ ')' <~~⏏> | ''] /␤␤Unhandled exception: Unable to resolve method oplift in type Any␤ at …
..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␤␤»
lue ( and not having the power of Perl 6 makes it worse :/ )
TimToady oh, so you want real regular expressions to not be regular expressions? 04:32
that would violate the Chomsky hierarchy
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 rl6-roast-data: 15989e2 | coke++ | / (4 files):
today (automated commit)
rl6-roast-data: d4931f7 | coke++ | / (3 files):
today (automated commit)
04:34 uvtc left
TimToady we could introduce a <bracket <subrule>> matcher, I suppose, if you don't care which bracket you want 04:45
usually you do though
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) 04:47
05:00 preflex left, preflex_ joined 05:01 preflex_ is now known as preflex 05:04 takadonet left 05:07 ikrs joined 05:18 Eddward joined 05:19 sftp_ joined 05:20 quester joined, sftp left 05:21 ashleyde1 joined, mikec__ joined 05:22 baest joined, sizz joined 05:23 snarkyboojum_ joined 05:24 p5eval_ joined, sdgvf_ joined, Subterra joined 05:26 xalbo_ joined 05:27 mikec_ left, ashleydev left, snarkyboojum left, sdgvf left, baest_ left, Kelder left, xalbo left, rking left, phenny joined, mattp_ left 05:28 p6eval joined, hugme joined, ChanServ sets mode: +v hugme, ChanServ sets mode: +v p6eval, mattp_ joined 05:29 Eddward left 05:31 rking joined 05:32 gcole joined 05:36 gcole left 05:39 woosley1 joined
[Coke] still can't build rakudo. bother. 05:42
05:42 cognominal joined 05:43 woosley left, cognominal__ left
quester is backlogging using colabti.org/irclogger/irclogger_log/perl6 since irclog.perlgeek.de/perl6/today is still down for maintenance... 05:45
05:51 japhb_ joined 05:52 smash__ joined, telex_ joined, MikeyG left, MikeyG joined, robinsmidsrod left, smash left, Exodist left, rking left, snarkyboojum_ left, mikec__ left, jtpalmer left, jrockway left, pnu left, diakopte1 joined, telex left, exodist_ joined, d4l3k_ joined, sevin joined, pnu joined, d4l3k_ is now known as dalek 05:53 robins joined 05:56 rking joined, snarkyboojum_ joined, mikec__ joined, jtpalmer joined, LordVorp joined, mikemol joined, jasonmay joined, jrockway joined 05:59 Chillance joined 06:04 kst` joined 06:07 ikrs left
[Coke] is nqp known broken with parrot master? 06:16
06:18 diakopte1 is now known as diakopter
diakopter ahoy 06:22
06:50 sevin left 07:03 kaare__ joined 07:14 drKreso joined 07:16 drKreso left 07:23 Harzilein joined 07:31 robins is now known as robinsmidsrod 07:34 drKreso joined
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.
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?
drKreso: 00:22Z <colomon> tell drKreso To be more precise after experimentation, moritz's code still works for me.
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:37
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)
phenny drKreso: I'll pass that on when column is around.
moritz and it helps to spell the nicks right :-)
phenny moritz: 02 Mar 22:49Z <drKreso> tell moritz "Any special reason why this example of traits is not working (fibonacci memorisation) perl6advent.wordpress.com/2011/12/0...aracter/?" 07:39
moritz drKreso: you can tab-complete nick names in most IRC clients
drKreso So I see
Handy
Otherwise people might misspell it :)
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.
dvj r: say (1) x 10 07:43
p6eval rakudo 123dfa: OUTPUT«1111111111␤»
moritz by the way I've started a logging bot on feather, just the website continues to be down 07:44
r: say 1 xx 10
p6eval rakudo 123dfa: OUTPUT«1 1 1 1 1 1 1 1 1 1␤»
07:44 japhb_ is now known as japhb
dvj what's xx? 07:45
TimToady dvj: unlike in perl 5, putting parens aroudn the left has no effect
xx is what we do instead of putting parens
dvj ok
TimToady x replicates as string, xx as list
dvj r: 1 x 10 xx 100
p6eval rakudo 123dfa: ( no output )
TimToady need to say it
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…
dvj fun :)
TimToady well, we think so :)
rosettacode.org/wiki/Xiaolin_Wu%27s...thm#Perl_6
for some reason this one blows up rakudo 07:47
FROGGS_ .oO( backslash - our new sigil O.o ) 07:48
07:48 FROGGS_ is now known as FROGGS
dvj so what is backslash used for? 07:49
TimToady in this case, to declare a new pseudo-constant 07:51
it's written in the SSA style where you don't use many variables
there's nothing wrong with sigils, but in this case it's a closer translation of the original 07:52
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
07:53 PZt joined
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:56
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*
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 07:59
TimToady it's a strange error from rakudo 08:01
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')
but 'handle' is in a comment!
FROGGS and removing that comment helps? 08:02
O.o
TimToady no, so maybe it's a different 'handle'
FROGGS coincidence
I'll debug it 08:03
08:04 s0rear is now known as sorear
TimToady thanks 08:04
TimToady --> bed
FROGGS gnight 08:05
TimToady: it is the: my \dx = x1 - x0; 08:06
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…
..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')␤»
FROGGS nr: my \x0; my \x1; my \dx = x1 - x0;
p6eval rakudo 123dfa: OUTPUT«===SORRY!===␤Method 'ast' not found for invocant of class 'NQPMu'␤» 08:08
..niecza v24-24-gbdc3343: OUTPUT«===SORRY!===␤␤Term definition requires an initializer at /tmp/XvdGBzEDF4 line 1:␤------> my \x0⏏; my \x1; my \dx = x1 - x0;␤␤Term definition requires an initializer at /tmp/XvdGBzEDF4 line 1:␤------> my \x0; my \x1…
FROGGS nr: my \x0 = 0; my \x1 = 0; my \dx = x1 - x0;
p6eval rakudo 123dfa, niecza v24-24-gbdc3343: ( no output )
FROGGS nr: my (\x0, \x1) = 1, 2; my \dx = x1 - x0; 08:09
p6eval niecza v24-24-gbdc3343: ( no output )
..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')␤»
FROGGS nr: my (\x0, \x1) = 1, 2; say \x0; say \x1; #my \dx = x1 - x0;
p6eval rakudo 123dfa: OUTPUT«(Any)␤(Any)␤»
..niecza v24-24-gbdc3343: OUTPUT«\(1)␤\(2)␤»
FROGGS nr: my (\x0, \x1) = (1, 2); say \x0; say \x1; #my \dx = x1 - x0;
p6eval rakudo 123dfa: OUTPUT«(Any)␤(Any)␤»
..niecza v24-24-gbdc3343: OUTPUT«\(1)␤\(2)␤»
FROGGS nr: my ($x0, \x1) = (1, 2); say $x0; say \x1; #my \dx = x1 - x0;
p6eval rakudo 123dfa: OUTPUT«1␤(Any)␤»
..niecza v24-24-gbdc3343: OUTPUT«1␤\(2)␤»
FROGGS interesting
08:10 drKreso left 08:12 ObseLeTe joined
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
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)␤»
FROGGS nqp: my \a = 7;
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)␤»
FROGGS hmmm
phenny: tell TimToady see gist.github.com/FROGGS/281ee5b2ed5563b5ccb6 08:18
phenny FROGGS: I'll pass that on when TimToady is around.
FROGGS phenny: tell phenny Good girl!
phenny Hey, I'm not as stupid as Monty you know!
FROGGS haha 08:19
nr: my ($x0, \x1) = (1, 2); say $x0; say x1; #my \dx = x1 - x0; 08:20
p6eval niecza v24-24-gbdc3343: OUTPUT«1␤2␤»
..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')␤»
FROGGS nr: my $x0 = 1; say x0 08:21
p6eval rakudo 123dfa: OUTPUT«===SORRY!===␤Undeclared routine:␤ x0 used at line 1␤␤»
..niecza v24-24-gbdc3343: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'x0' used at line 1␤␤Potential difficulties:␤ $x0 is declared but not used at /tmp/lyG8SnQrd9 line 1:␤------> my ⏏$x0 = 1; say x0␤␤Unhandled exception: Check failed␤␤ at /home/p6eval…
FROGGS nr: my \x0 = 1; say x0
p6eval rakudo 123dfa, niecza v24-24-gbdc3343: OUTPUT«1␤»
FROGGS need more coffee
08:21 terry_ joined
JimmyZ phenny: tell moritz I can't open irclog 08:30
phenny JimmyZ: I'll pass that on when moritz is around.
08:31 JimmyZ left
FROGGS one minute longer and he would know the answer 08:32
quester rn: my \a = 7; say a; 08:35
moritz phenny: tell JimmyZ neither can anybody else; the server did not boot again
phenny moritz: I'll pass that on when JimmyZ is around.
p6eval rakudo 123dfa, niecza v24-24-gbdc3343: OUTPUT«7␤»
phenny moritz: 08:30Z <JimmyZ> tell moritz I can't open irclog
quester my (\a, $b) = (7, 8); say a;
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:␤------> my ⏏(\a, $b) = (7, 8); say a;␤␤7␤»
..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')␤»
diakopter has anyone used Libevent and/or libuv enough to comment on them? 08:37
tadzik you may want to ask _sri 08:38
08:40 quester left 08:46 terry_ left 08:59 eternaleye joined 09:00 FROGGS left 09:17 FROGGS joined 09:22 woosley1 left 09:33 sizz left, sizz joined
grondilu solved rosalind.info/problems/trie but it was 50 seconds too slow for perl6. Had to translate it in perl5 :( 09:37
I'll publish it in case someone can figure out how to make it faster 09:39
dalek pan style="color: #395be5">perl6-examples: c8fbc86 | (L. Grondin)++ | rosalind/trie-grondilu.pl:
TRIE solution. 50 seconds too slow though
09:40
grondilu The difference in speed between P5 and P6 for this kind of algorithms is really enormous. Just saying. 09:41
nwc10 translate it to NQP and run it on the JVM? :-) 09:43
</ducks>
tadzik grondilu: did you try profiling it? 09:45
diakopter grondilu: what's the ratio?
ok bedtime for now 09:46
moritz runs in 3.3s here 09:47
how can it be 50s too slow?
moritz confused
also what's the deal with building a data structure and then discarding it? 09:49
oh, it's not always discarded 09:50
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.
*no
dalek pan style="color: #395be5">perl6-examples: de4978d | (L. Grondin)++ | rosalind/trie-grondilu.pl:
minor fix with input
09:54
pan style="color: #395be5">perl6-examples: 50cff13 | (L. Grondin)++ | rosalind/rosalind_trie.txt:
adding input for trie
09:55
grondilu tadzik: "profiling"?
diakopter: seconds for P5, 5m55s for P6 09:56
.730s for P5, to be exact 10:00
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?
tadzik grondilu: run with --profile, look with qcachegrind or kcachegrind
FROGGS: yep, built-in profiling runcore
FROGGS hmmm, k, will try later
tadzik grondilu: perhaps they run some old-ass version?
grondilu "they"? Not sure what you mean. I use a very recent version of perl6/parrot 10:03
This is perl6 version 2013.02.1-21-g40069f9 built on parrot 4.10.0 revision RELEASE_4_10_0
tadzik ok, so who defines "too slow"? 10:04
I thought it's sort of a thing like "send your code and we'll run it against our spectests", like SPOJ
grondilu it was too slow because a task in rosalind must be solved in five minutes. 10:05
there's a js code that makes sure the user loses when the delay is over.
tadzik but it's ran locally, still? 10:07
grondilu yes
tadzik curious thing
grondilu it's ran locally. You submit the output, not the code. 10:08
tadzik I see 10:09
well, you can always make it run 'say $result' :P
I'm building rakudo locally now to try it
10:09 ObseLeTe left
grondilu the input is different each time, so it's not that easy to cheat. 10:10
tadzik grondilu: perl6 trie.pl 0.89s user 0.22s system 98% cpu 1.132 total 10:18
on rakudo HEAD, and an old core2duo
weird :|
profiler says that the slowest part is infix«<» 10:20
but it's not really significant at all, if the full thing runs in a fraction of a second 10:23
nwc10 jnthn: at 21596828fbba54783a43 (Eliminate callsite field in CallFrame.), dumbbench says 10:24
cmd: Ran 20 iterations (0 outliers). 10:25
cmd: Rounded run time per iteration: 1.911e+02 +/- 1.1e+00 (0.6%)
at 02001c70b42d87da3 (Eliminate callframe args field.) (ie HEAD), dumbbench says
cmd: Ran 20 iterations (0 outliers).
cmd: Rounded run time per iteration: 1.887e+02 +/- 1.5e+00 (0.8%)
10:31 gcole joined 10:33 ObseLeTe joined
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
10:38 constantined joined
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:39
tadzik oh, that I didn't try :) 10:40
yes, true
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:44 fgomez left 10:48 SamuraiJack joined
tadzik ok, 116.22s with the big input, grondilu 10:48
trying the profile
FROGGS tadzik: can you gist the steps you take? 10:55
tadzik FROGGS: to profiling, or what?
FROGGS right
tadzik well, it's not too much 10:56
first, remove 'say' from the code :)
then perl6 --profile code.pl
then run qcachegrind and feed it with the output
so the second step is really 'perl6 --profile code.pl &> profile'
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
but i don't think bitage will make that much of a difference here
I guess my c2d is no that bad :) 10:58
on the other hand, the profile runs for 6 minutes already 11:03
jnthn nwc10: So, another little speedup it seems. 11:06
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
tadzik ha, ok
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
tadzik I'll wait for jvm to catch up :)
jnthn I'll try and update it today, but got various errands/travel/distractions
tadzik no hurry :) 11:14
11:20 Chillance left 11:26 Chillance joined, bruges left 11:27 bruges joined
nwc10 jnthn: yes. my initial run-it-once last night didn't think so 11:27
but it occurred to me to use dumbbench to run it a few times
dalek p-jvm-prep: caf2b43 | jnthn++ | / (3 files):
Update to work with latest NQP.
11:33
jnthn Was fairly easy in the end.
11:42 spider-mario joined
FROGGS cool 11:48
11:50 daniel-s joined
FROGGS jnthn: nep::die? what is nep:: ? 11:59
typo?
12:03 rindolf joined 12:07 SamuraiJack left
dalek p-jvm-prep: 54a22a2 | jnthn++ | lib/QAST/JASTCompiler.nqp:
Typo.
12:19
12:20 ObseLeTe left 12:24 saeidw joined 12:28 wk joined
nwc10 jnthn: all tests passed with the typo there (except the ICU one). Clearly not a tested typo :-( 12:28
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
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: stackoverflow.com/questions/7501581...-in-perl-6 12:38
tadzik FLOSSrookie: try github.com/perl6/DBIish/ 12:39
12:44 arnsholt joined
FLOSSrookie tadzik: Uh...Do you have another link to help me understand how to incorporate the DBIish data? 12:45
tadzik: I am brand new.
tadzik what is that you have a problem with>?
FLOSSrookie tadzik: Mainly where do I place those files on my filesystem and how do I go about "installing" it. 12:46
tadzik: Do I just use perl itself to install? 12:47
tadzik: I see in the makefile the @echo "install copies .pm and .pir files to system perl6 lib/" 12:48
Does that mean I just need to call perl and it will do the install?
tadzik hold 12:49
hold on
what do you have installed? Rakudo, Rakudo Star?
FLOSSrookie tadzik: Is there a terminal command to help me find? 12:50
tadzik how did you install perl 6?
or did you install it at all?
FLOSSrookie sudo yum install and it even gave me a nice perl 6 book too.
tadzik is there a command 'panda'? 12:51
FLOSSrookie tadzik: Negative
tadzik ok, you'll need that first
there are instructions at github.com/tadzik/panda
clone the repo, and then perl6 bootstrap.pl
FLOSSrookie tadzik: Is this like the "yum" of perl? 12:52
tadzik somewhat 12:53
it installs modules for you
so after you have that, you only need to 'panda install DBIish'
FLOSSrookie tadzik: Oh...I see.
tadzik: Is this your software? 12:54
tadzik yep
feel free to nag me if you don't like it :) 12:58
or if it doesn't work as advertised
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:05
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?
grondilu I'd like to do that because each time I type '$s' in a perl6 file, Vim messes up the syntax highliting. 13:08
moritz FLOSSrookie: after installing DBIish, you can use the module in your regular Perl 6 scripts 13:09
FLOSSrookie moritz: Yes, but I need to reference a file for panda to install like: "panda install ./some_file" 13:11
moritz: I do not know which file panda is expecting. 13:12
moritz: Yes, I am new.
rindolf Hi all. Slow day today on IRC.
can you people review www.shlomifish.org/invisibles-of-th...phas.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:13
13:14 SamuraiJack joined
FLOSSrookie tadzik: I am almost there. I just need to be told which file to pass as an argument to panda. 13:16
13:16 not_gerd joined
FLOSSrookie tadzik: Is it the makefile or some other file or the entire directory? 13:16
not_gerd o/
tadzik FLOSSrookie: did you read the panda README? 13:17
not_gerd r: multi foo(True, True) { say "WTF?" }; foo(True, False) 13:18
p6eval rakudo 123dfa: OUTPUT«WTF?␤»
FLOSSrookie tadzik: It failed so I do not know if I did it correctly.
t/05-arrays.t .......... Failed 9/26 subtests 13:19
t/06-struct.t .......... Failed 23/30 subtests
13:19 SamuraiJack_ joined 13:20 SamuraiJack left
tadzik that's zavolaj readme 13:20
jnthn not_gerd: Constraints smartmatch; anything ~~ True comes out as True
tadzik erm, zavolaj failures
13:20 PacoAir joined
tadzik DBIish depends on NativeCall, and NativeCall seems to not work on your system 13:20
FLOSSrookie tadzik: Uh Oh
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:22
not_gerd jnthn: thanks 13:23
FLOSSrookie jnthn: Are you responding to me or not_gerd?
jnthn: I was discussing NativeCall too. 13:24
jnthn FLOSSrookie: you/tadzik :)
perl6 -v will tell you what Rakudo you're running 13:25
FLOSSrookie This is perl6 version 2013.01 built on parrot 5.0.0 revision 0 13:26
jnthn: If this is out of date would the update be reflected in yum with "yum update" 13:27
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:29
FLOSSrookie: Hm, but if you got the book your package musta included various other things, I suspect. 13:30
FLOSSrookie: Try perl6 -e "use NativeCall; say 'ok'"
FLOSSrookie: You may already have DBIish/NativeCall installed thanks to the package.
13:30 JimmyZ joined
FLOSSrookie jnthn: It said "ok" 13:30
jnthn FLOSSrookie: Try the same, but with use DBIish 13:31
If that is also OK then you have it already
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:32
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
tadzik: And to you too. Sorry.
jnthn FLOSSrookie: No problem. :) Hope now you know it's there, it works out :)
jnthn vanishes again to catch a train 13:35
13:36 JimmyZ left
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:41 not_gerd left 13:43 not_gerd joined, FLOSSrookie left
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␤␤␤»
..niecza v24-24-gbdc3343: OUTPUT«Rat()␤»
13:51 gcole_ joined 13:52 stevan__ joined 13:54 pnu_ joined, FROGGS left, d4l3k_ joined, s0rear joined 13:55 breinbaa1 joined, jaldhar_ joined, awwaiid_ joined, prammer_ joined 13:57 not_gerd left, spider-mario_ joined 13:58 PacoAir left, PacoAir joined 14:01 sftp_ left, spider-mario left, pnu left, dalek left, sorear left, stevan_ left, Khisanth left, prammer left, breinbaas left, mtk left, araujo left, _jaldhar left, d4l3k_ is now known as dalek 14:03 sftp_ joined 14:05 SamuraiJack_ left 14:06 SamuraiJack_ joined 14:08 Khisanth joined, araujo joined 14:10 mtk joined 14:19 saeidw left 14:21 Psyche^ joined 14:25 Patterner left, Psyche^ is now known as Patterner, saeidw joined 14:29 PacoAir left, PacoAir joined 14:33 spider-mario_ is now known as spider-mario 14:34 Eddward joined 14:36 spider-mario left 14:42 saeidw left 14:43 SamuraiJack_ left 14:45 pnu_ left, pnu joined 14:48 wk_ joined 14:49 wk left 14:55 emilbarton joined
emilbarton hi, I'm meeting a problem building rakudo -- can you help me pastebin.com/27h3QqQN 14:57
grondilu weird. HAve you tried --gen-parrot --gen-nqp? 15:01
emilbarton --gen-parrot only
parrot was built successfully 15:02
15:02 skyheights joined, sftp_ left
grondilu is it the first time you try compiling rakudo? 15:02
(on this machine I mean) 15:03
emilbarton no I have running smoothly on a powerpc64
15:03 gcole_ left
emilbarton yes it 's the first time on this machine 15:03
stupid question : do I need nqp at all? 15:04
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
colomon rakudo should build nqp automatically if you request --gen-parrot 15:07
geekosaur That read jobs pipe thing is a very strange error...
colomon yes 15:08
grondilu indeed I've never seen this message
emilbarton wha'ts this 3rdparty/dyncall that makes problem?
geekosaur I don;t think it's the problem, it's just the first thing that triggers it 15:09
that ism it's the first thing being built. this is some make screwage on windows
s/m/,/
15:09 FROGGS joined
geekosaur looks like it relates to make doing parallel build? try make -j1 15:10
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 ast: c5b6cfa | (Solomon Foster)++ | S32-num/stringify.t:
Rework Rat stringification tests (and add FatRat ones) to conform to current spec.
geekosaur I have no idea :(
15:13 drKreso joined
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:13
15:14 cognominal left
geekosaur you might try setting MAKEFLAGS=-j1 in the environment 15:15
15:16 cognominal joined, constantined left
emilbarton I'll do that -- I've found an occurence of the same error in another context: www.cmake.org/pipermail/cmake/2010-...39679.html 15:17
geekosaur yep, that was one of the messages I found while poking (and there are others)
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
15:18 constantined joined, census joined
dalek ecza: 08a736f | (Solomon Foster)++ | lib/CORE.setting:
Rat / FatRat stringification improvements.

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
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:21
also there's an obvious mistake in the spec that I worked around, I'll try to fix the spec later as well. :) 15:23
15:24 xinming_ joined
emilbarton thanks geekosaur : MAKEFLAGS=-j1 was the solution 15:26
15:27 xinming left
dalek ecs: 220f088 | (Solomon Foster)++ | S02-bits.pod:
<555555555555555555555555555555555555555555555/5>.perl should be 111111111111111111111111111111111111111111111.0 (IMO).
15:30
colomon Turns out I'm not skiing this morning after all.
15:31 fgomez joined 15:32 drKreso left
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
dalek ecza: 713c785 | (Solomon Foster)++ | lib/CORE.setting:
Simplify RatToStr code, making it closer to TimToady's original.
15:39
colomon emilbarton: I don't believe so at the moment.
emilbarton anything in preparation ? 15:41
colomon emilbarton: I don't know. 15:45
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:47
emilbarton ok - I hope something gets done soon 15:51
15:55 pmurias joined
pmurias jnthn: hi 15:55
FROGGS emilbarton: sometimes the best thing is to start working on it
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.
emilbarton unfortunately I wouldn't be of great help I'm afraid (too amateurish)
FROGGS colomon: I believe the NativeCall API won't change much, so it might be easily portable 15:59
colomon FROGGS: may be true, but something interfacing more directly with JVM libraries might be a better choice by summertime. maybe. 16:00
FROGGS ya, if you target the JVM only 16:02
16:02 sftp joined
FROGGS depends on what are the needs I suppose 16:02
pmurias which library do we need bound? 16:03
FROGGS ohh, it was about Tk an the like
dalek kudo-js: ae25c11 | (Pawel Murias)++ | run (2 files):
Bring our 6model implementation closer to nqp-jvm.

Pass qast_6model.t
16:06
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)
p6eval rakudo 123dfa: OUTPUT«===SORRY!===␤Unable to parse expression in block; couldn't find final '}'␤at /tmp/7TInOEFoft:1␤------> che; @cache[$n] //= $n < 2 ?? 1 !! .($n)⏏<EOL>␤ expecting any of:␤ postfix␤ infix or meta-infix␤ infi…
..niecza v24-26-g713c785: OUTPUT«===SORRY!===␤␤Unable to parse block at /tmp/nWxUMdb_Hi line 1:␤------> sub f($n) {⏏ state @cache; @cache[$n] //= $n < 2 ?? ␤Couldn't find final '}'; gave up at /tmp/nWxUMdb_Hi line 1 (EOF):␤------> che; @cache[$n] …
grondilu rn: sub f($n) { state @cache; @cache[$n] //= $n < 2 ?? 1 !! .($n)*$n given &?ROUTINE }; say f 4;
p6eval niecza v24-26-g713c785: OUTPUT«(timeout)»
..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␤␤»
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␤␤»
..niecza v24-26-g713c785: OUTPUT«24␤»
grondilu ^I've spent an hour trying to understand why a code like this did not work.
FROGGS emilbarton: I will use it for $work this year, but I need to port some (just a few) modules from p5 land first
grondilu: and the answer is? 16:11
jnthn: can you guess why !INTERPOLATE isnt called for $x here? 16:12
nqp: my $x := "ab"; say("ab" ~~ / $x | a /)
p6eval nqp: OUTPUT«a␤»
16:13 am0c left
FROGGS jnthn: and I'm right that NFA.subrule is the one who should call it? 16:13
grondilu FROGGS: it's a rakudo bug. Niecza gives the correct answer. 16:14
(it was just a fancy way to write the factorial function)
pmurias FROGGS: what do you plan to use perl6 for? 16:15
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
parsing custom formats is absolutely a strength of perl 6
emilbarton ciao 16:33
16:33 emilbarton left
nwc10 irclog.perlgeek.de is back up, but the logger bot is not? (I'm aware of colabti.org/irclogger/irclogger_log...2013-03-03 ) 16:33
16:37 cognominal left 16:42 Rotwang joined 16:58 census_ joined, census left 16:59 census_ left, census joined 17:11 skyheights left
dalek ast: b10025a | (Solomon Foster)++ | S32-num/rat.t:
Refudge for current Niecza.
17:20
masak greetings, #perl6! 17:23
17:23 SunilJoshi joined
masak I've been gone a week. am back now. :) 17:23
didn't really announce my departure, I think.
masak has been to .cn
nwc10 was it fun? 17:25
masak yeah. 17:27
17:28 pmurias left
masak my Mandarin is still 不太好... but every little bit helps, fersure. 17:30
colomon \o/ masak! 17:32
masak \o/ 17:33
17:41 spider-mario joined 17:44 SamuraiJack_ left
japhb Welcome back, masak! 17:47
masak thanks!
17:48 pmurias joined
pmurias when will be the irc logger back on? 17:49
ggoebel_ pmurias: I'm suffering irc archive withdraw too
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 17:55 uvtc joined
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
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
Also, I think `say` implies .gist.
18:05 SunilJoshi left
arnsholt Starting from the .gist code in Rakudo, it might not be too hard to write an indented pretty-printer 18:06
masak .oO( no pun indented ) 18:09
18:15 mtk left 18:16 mtk joined 18:17 mtk left 18:24 mtk joined
dvj rn: (1..2 x 1 xx 10 xx 5 ).perl.gist.say 18:28
p6eval rakudo 123dfa: OUTPUT«1..50␤»
..niecza v24-26-g713c785: OUTPUT«1..5␤»
dvj different outputs!
18:29 pmurias_ left
dvj p: (1..2 x 1 xx 10 xx 5).say 18:30
p6eval pugs: OUTPUT«1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950␤»
pmichaud good afternoon, #perl6 18:31
masak pmichaud! \o/
18:38 Eddward left 18:40 rgc` joined
FROGGS r: '' ~~ / :my $a; <{ '$a' }> / 18:41
p6eval rakudo 123dfa: ( no output )
FROGGS r: say '' ~~ / :my $a; <{ '$a' }> /
p6eval rakudo 123dfa: OUTPUT«#<failed match>␤»
FROGGS r: say '123' ~~ / :my $a=2; <{ '$a' }> /
p6eval rakudo 123dfa: OUTPUT«「1」␤␤»
FROGGS r: say '123' ~~ / :my $a=2; <{ "$a" }> /
p6eval rakudo 123dfa: OUTPUT«「2」␤␤»
FROGGS r: say '$a' ~~ / :my $a=2; <{ '$a' }> / 18:43
p6eval rakudo 123dfa: OUTPUT«#<failed match>␤»
FROGGS n: say '$a' ~~ / :my $a=2; <{ '$a' }> /
p6eval niecza v24-26-g713c785: OUTPUT«Potential difficulties:␤ $a is declared but not used at /tmp/7ZRtneUyHR line 1:␤------> say '$a' ~~ / :my ⏏$a=2; <{ '$a' }> /␤␤#<failed match>␤»
FROGGS n: say '$a' ~~ / <{ '$a' }> /
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) ␤ …
FROGGS std: say '$a' ~~ / <{ '$a' }> /
p6eval std 52fe6d2: OUTPUT«ok 00:00 43m␤»
18:43 rindolf left
dalek kudo/nom: fd27043 | pmichaud++ | src/core/Rat.pm:
Have Rat.perl return decimal numbers if denominator is normalizable to a power of 10. Fixes RT #117013.
18:45
masak TimToady: is <~~> in the regex slang considered procedural? S05 doesn't say it is.
colomon pmichaud++ 18:46
masak TimToady: reason I ask was your comment about the Chomsky hierarchy.
dvj n: say 4 xx * 18:48
p6eval niecza v24-26-g713c785: OUTPUT«(timeout)»
masak sincerely wishes he knew more about automata theory to be able to express the problematics of <~~> being fully declarative 18:49
it seems /<~~>/ is problematic, for example. in an almost Russellian way.
std: /<~~>/ 18:50
p6eval std 52fe6d2: OUTPUT«ok 00:00 42m␤»
18:52 ObseLeTe joined
pmichaud r: say (3/1).perl 18:52
p6eval rakudo 123dfa: OUTPUT«3/1␤»
pmichaud now returns "3.0" 18:53
> say (3/1).perl
3.0
masak \o/
pmichaud > say (1/5).perl 18:54
0.2
> say (1/6).perl
1/6
tadzik pmichaud++
nwc10 rn: say (1/2).perl
p6eval rakudo 123dfa: OUTPUT«1/2␤»
..niecza v24-26-g713c785: OUTPUT«0.5␤»
nwc10 rn: say (42/42).perl 18:55
p6eval rakudo 123dfa: OUTPUT«1/1␤»
..niecza v24-26-g713c785: OUTPUT«1.0␤»
nwc10 :-)
pmichaud > say (1/2).perl
0.5
I have to run errands again... hopefully someone can un-todo the now-passing tests 18:56
colomon n: say (3/1).perl
p6eval niecza v24-26-g713c785: OUTPUT«3.0␤»
[Coke] anyone else using rakudo on OS X? I can no longer build.
18:57 cognominal joined
[Coke] (trying rakudo using --gen-nqp=master -gen-parrot=master, and just --gen-nqp=master. (retrying with just --gen-nqp) 18:57
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 18:59
geekosaur tries 19:00
colomon [Coke]: I'm loath to mess with my build because I'm actively working on ABC in Rakudo atm.
[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
colomon: bleeding edge sometimes painful, aye.
geekosaur hm, no, actually, not quite willing to use =master :)
[Coke] nope, that fails also. time to ditch rakudo and see if I can just get nqp built. 19:02
dalek rl6-roast-data: 2743fb2 | coke++ | / (4 files):
today (automated commit)
19:13
19:14 adu_ joined
[Coke] NOOOO SOMEONE BROKE THE DAILY TEST RUN 19:14
rakudo now has 3 failures.
FROGGS moritz: can you comment on rt.perl.org/rt3/Ticket/Display.html?id=76744 and ad an example?
[Coke]: wasnt me 19:15
[Coke]: just a timing issue as it seems 19:16
colomon [Coke]: probably me. 19:17
[Coke]: lots of changes in Rat stringification so the tests actually match the spec. I believe pmichaud++ has fixed rakudo by now, too. 19:18
colomon just realized his problem is he switched back to using niecza without thinking about it! grump. 19:21
lue hello o/ 19:23
colomon \o 19:24
19:30 ObseLeTe left
[Coke] pr: sub a($a, $b=$a) { say "$a $b" } ; a("hello"); 19:33
npr: sub a($a, $b=$a) { say "$a $b" } ; a("hello");
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…
..rakudo fd2704, niecza v24-26-g713c785: OUTPUT«hello hello␤»
[Coke] colomon: that broke S32-num/stringify.t for pugs. :( 19:34
colomon [Coke]: sorry!
[Coke] eh. pugs gets more fragile as time goes on.
19:35 cognominal left
FROGGS no, you just discover it :o) 19:35
[Coke] I'll remove it from the run list for now.
19:36 cognominal joined, aqwzsx joined
dalek ast: 7156048 | coke++ | / (13 files):
pugs fudges

Recent spec updates mean we no longer conform. (plus some new tests we never passed)
19:37
gs.hs: 20b98d5 | coke++ | t/spectest.data:
Recent spec changes mean we no longer conform.
[Coke] These are probably easily fixed by someone who knows a minimum of haskell. 19:38
pmurias is there any motivation for updating pugs? 19:40
[Coke] Do you have any?
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
it's still faster than rakudo.
geekosaur would still like to try to get it up to speed, but still flounders trying to deal with its source... 19:43
census poor geekosaur :( 19:44
dalek p: 110a95d | (Tobias Leich)++ | src/QRegex/P6Regex/Actions.nqp:
RT #77410 implement :ignorecase for cclasses

Approach was taken from P5Regex.
19:46
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\$"]␤»
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"]␤»
jnthn evening, #perl6 19:53
diakopter o/ 19:54
masak jnthn! \o/
jnthn is safely in goteborg 19:55
dalek ast: 21c8ec8 | coke++ | S32-str/substr.t:
pugs fudge
[Coke] got borg?
masak en.wikipedia.org/wiki/Gothenburg 19:57
jnthn *e*borg. Electronic ones!
dvj I made a pull request on roast :) 19:58
diakopter dvj: you don't have a commit bit? 20:00
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
I'll just merge it myself then :)
dalek ast: 76a86f7 | dagurval++ | S12-attributes/class.t:
don't create accessor if the class declares an explicit method of that name
20:03
ast: 24bb91f | Dagur++ | S12-attributes/class.t:
Merge pull request #28 from dagurval/master

test for having a method with the same name as an accessor
diakopter \o/
dvj \o/
[Coke] tries to fix Pugs so we get (Int) instead of Int() 20:04
20:04 sevin joined
masak dvj: was that pull request related to some RT ticket? 20:05
ISTR discussing this issue with jnthn, and possibly filing away the discussion as an RT resource.
20:05 cognominal__ joined 20:06 cognominal left
dvj masak: no, it's an issue I ran into a couple of weeks ago 20:06
I talked about it here though
masak I remember talking about it with jnthn at least twice.
I think it was >2weeks ago. 20:07
20:08 adu_ left
dvj well, now there's a test for it :) 20:08
so, what's an RT ticket?
20:09 adu_ joined
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…
masak tries to find it
geekosaur has pugs source in his haskell container now but has no idea where to start... sigh 20:10
wonder if there's some overview of how the source works 20:11
diakopter dvj: rt.perl.org/rt3/Public/?nossl=true
masak no, can't find such a tikkit. 20:12
[Coke] geekosaur: not that I've found.
Look at recent commits - some touch Prim.hs - a lot of simple stuff can be added/tweaked in there.
if adding a new top level sub, or a method to Str, e.g. 20:13
dalek ast: add5509 | (Tobias Leich)++ | S05-modifier/ignorecase.t:
RT #77410 test for :ignorecase in character classes
ast: 0a5c79d | (Tobias Leich)++ | S05-metasyntax/charset.t:
added TODOs for niecza/rakudo about cclass subtraction
20:14
ggoebel_ perlgeek.de and irc archives are back up :-)
dalek gs.hs: 5933753 | coke++ | / (2 files):
stringify types as (Int) instead of Int()
20:16
ast: 5e810cf | coke++ | / (3 files):
pugs re-unfudge some tests.
20:17
FROGGS ggoebel_++ 20:18
[Coke] geekosaur: I fixed that by search for "()" in the source: :|
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:19
geekosaur tosses cabal tree, pulls from github 20:20
masak ggoebel_++
ggoebel_ irclog.perlgeek.de is up... but doesn't appear to be logging anything 20:22
FROGGS what bot does that? 20:24
[Coke] r: say 3/2 20:26
p6eval rakudo fd2704: OUTPUT«1.5␤»
[Coke] r: say 3/7
p6eval rakudo fd2704: OUTPUT«0.428571␤»
[Coke] r: say 3/7.perl
p6eval rakudo fd2704: OUTPUT«0.428571␤»
[Coke] r: say (3/7).perl
p6eval rakudo fd2704: OUTPUT«3/7␤»
[Coke] rpn: say (3/7).perl
p6eval niecza v24-26-g713c785: OUTPUT«<3/7>␤»
..rakudo fd2704, pugs: OUTPUT«3/7␤»
diakopter phenny: tell ilbot2 welcome back!
phenny diakopter: I'll pass that on when ilbot2 is around.
geekosaur right, still need that patch to HsPerl5 20:30
20:31 adu_ left 20:34 cognominal__ left 20:38 cognominal__ joined
[Coke] (nqp builds fine. rakudo, with --gen-nqp, fails) 20:41
20:51 moritz left, moritz_ joined, moritz_ is now known as moritz 20:52 adu_ joined
masak it's nice to be back. :) 20:53
good night, #perl6
moritz \o masak
[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␤␤»
[Coke] r: sub foo() { return 1,2,:c<3> }; say foo().perl 20:55
p6eval rakudo fd2704: OUTPUT«(1, 2, "c" => Mu)␤»
[Coke] rakudo: "foo" ~~ / $<foo><bar> = [ foo ] /; say $<foo><bar>
p6eval rakudo fd2704: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter = (must be quoted to match literally)␤at /tmp/6bCxyI2eyu:1␤------> "foo" ~~ / $<foo><bar> ⏏= [ foo ] /; say $<foo><bar>␤Unable to parse regex; couldn't find final '/'␤at /tmp/6bCxyI2…
FROGGS [Coke]: I can tell you which line of yode you need to tweak :o) 20:56
*code
20:57 irclogbot_backup left
FROGGS this one: github.com/perl6/nqp/blob/master/s...r.nqp#L228 20:57
[Coke] FROGGS: that was RT #76266 if you want to claim it.
FROGGS I know, I skimmed through regex tickets
jnthn FROGGS: On / $x | a /, $x is not declarative. 20:58
FROGGS: When it constructs the NFA, the LHS has length 0 and the RHS has 1 if there's an a 20:59
20:59 trexy joined
FROGGS hmmm, how do we come around that? 21:00
jnthn Good question; it'll need constructing an NFA at runtime. 21:02
FROGGS it has to go all into INTERPOLATE and this should then build the NFA?
k
jnthn Yeah, but building an NFA ain't scary realy 21:03
*really
FROGGS LIES
jnthn :P
FROGGS *g*
jnthn You don't even have to build it. :)
21:03 kaare__ left
jnthn You just gotta create a QRegex::NFA and obtain NFAs for each of the things and then call mergesubstates for those to get an NFA of the olt 21:03
*lot 21:04
FROGGS ya, because I really dont know what I have to do... some comments within NFA.nqp would be awesome
and then return the nfa instead of the cursor?
jnthn No, you run the NFA (using one of the methods on)
FROGGS okay... 21:05
jnthn The NFA then gives you back an indication of what things to try and in what order
FROGGS interesting
jnthn Like, try branch 8, then 5, then 3
FROGGS I guessed it does more
jnthn No, it "just" computes an ordering. 21:06
And doesn't include things it knows could never work so you don't bother trying them.
FROGGS and the branches are the "those things" I pass to mergesubstates? 21:07
jnthn Yes, you pass a fate 21:09
The fate is the thing you get back
FROGGS and you said I can get an NFA from a given Regex? 21:12
nqp: my $rx := /a/; say( $rx.NFA )
p6eval nqp: OUTPUT«Method 'NFA' not found for invocant of class 'NQPRegex'␤current instr.: '' pc 129 ((file unknown):171295405) (/tmp/r3ujzDTMbf:1)␤»
21:13 _ilbot joined
FROGGS nqp: my $rx := /a/; say( $rx.GET_NFA_TYPE ) 21:13
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...
FROGGS nqp: my $rx := /a/; say( $rx.!nfa )
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)␤»
jnthn r: /a/.NFA
p6eval rakudo fd2704: ( no output )
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)␤»
jnthn Oh...there's some weird wrapping thing going on there
FROGGS the knowhow NQPRegex has method NFA 21:17
which returns $!nfa
jnthn Yes 21:18
FROGGS looks like I'm lacking NQPRegex knowhow here 21:19
21:25 jaldhar_ left, Chillance left
FROGGS .NFA only occurs once: 21:30
my $meth := $cursor.HOW.find_method($cursor, $name, :no_trace(1));
@substates := $meth.NFA() if nqp::can($meth, 'NFA');
hmmm 21:31
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)␤»
FROGGS nqp: say( /a/.ALT_NFAS ) 21:35
p6eval nqp: OUTPUT«Method 'ALT_NFAS' not found for invocant of class 'NQPRegex'␤current instr.: '' pc 119 ((file unknown):65) (/tmp/zNmDmZodbP:1)␤»
FROGGS nqp: my $code_obj := nqp::create(NQPRegex); say($code_obj.ALT_NFAS) 21:41
p6eval nqp: OUTPUT«Hash[0x942dd70]␤»
21:43 s0rear is now known as sorear 21:45 jaldhar_ joined
jnthn FROGGS: well, what on earth...there's two things called NQPRegex... 21:46
FROGGS O.o 21:47
a class and a knowhow 21:49
or something else?
jnthn yeah 21:50
Un-cleaned-up leftovers, it seems
22:05 uvtc left, am0c joined 22:12 adu_ left 22:22 spider-mario left
jnthn 'night, #perl6 22:23
FROGGS gnight
22:32 PacoAir left 22:33 pmurias left 22:35 aqwzsx left 22:36 Rotwang left 22:42 gcole left 22:43 adu_ joined 22:48 mberends joined 22:54 mberends left 22:55 mberends joined 23:09 FROGGS left 23:38 cognominal__ left
sjn enjoys looking at www.youtube.com/watch?v=_ahvzDzKdB0 23:49
"Growing a language" by Guy Steele, at 1998 ACP OOPSLA
increadibly clever talk! :) 23:50
also, it contains the phrase "There's more than one way to do it", even if he's talking about Java :)
tadzik ha! 23:57
sjn it's are *really* good talk