»ö« 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.
soh_cah_toa yeah, parrot needs a good `git gc` 00:00
[Coke] it is teh awesome. (now that I'm coming at it from git-think instead of svn-think)
sorear benabik: I wonder if git gc would improve that.
[Coke] soh_cah_toa: can you do that on the server side?
benabik sorear: That's post-gc.
sorear ah.
soh_cah_toa [Coke]: i think so. i can't imagine why not
[Coke] ask dukeleto, I'm sure he'll hook you up.
flussence [Coke]: I've used it too, but it doesn't seem to play nice with our ridiculously outdated servers hosting the svn repos... it got corrupted after a few commits one time and I had to fix the metadata by hand. Not fun 00:01
diakopter [Coke]: trac.parrot.org/parrot/ticket/2196 00:04
00:09 Chillance left
[Coke] flussence: I'm using it against svn 1.4 at work. 00:10
diakopter++
flussence I don't remember what ours is offhand, but it predates fsfs 00:11
diakopter [Coke]: it might be a cygwin/Win7 local problem
[Coke]: did a rebaseall; trying again 00:14
00:17 vlixes left
jlaire I used to get errors like that with cygwin/Win7 00:20
it broke after some cygwin update failed, iirc 00:21
I just tried building rakudo with --gen-parrot on cygwin and got a weird error, pasting..
[Coke] rakudo: enum A <b cq>; enum A <b d>; print d; print q
p6eval rakudo ebd4d8: OUTPUT«d»
[Coke] rakudo: enum A <b q>; enum A <b d>; print d; print q
p6eval rakudo ebd4d8: OUTPUT«d»
[Coke] rakudo: my %h; sub h { say "srsly wtf" }; enum Foo %h; 00:23
p6eval rakudo ebd4d8: OUTPUT«Could not find sub &Foo␤ in block <anon> at /tmp/vKPCKgfUY8:1␤ in <anon> at /tmp/vKPCKgfUY8:1␤␤»
diakopter [Coke]: didn't help :(
jlaire I got this error: gist.github.com/5e37af95acebab9d3941
[Coke] rakudo: "/etc/services".IO.WHAT.say # bug?
p6eval rakudo ebd4d8: OUTPUT«Cannot access attributes in a type object␤ in method print at src/gen/CORE.setting:5038␤ in method say at src/gen/CORE.setting:5046␤ in block <anon> at /tmp/AHHucfspN8:1␤ in <anon> at /tmp/AHHucfspN8:1␤␤»
jlaire seems to be at the same point as your error 00:24
diakopter jlaire: yeah
[Coke] rakudo: NaN.Rat.print
p6eval rakudo ebd4d8: OUTPUT«Method 'print' not found for invocant of class 'Rat'␤ in block <anon> at /tmp/IeHlMZa5uE:1␤ in <anon> at /tmp/IeHlMZa5uE:1␤␤»
[Coke] rakudo: NaN.Rat.say 00:25
p6eval rakudo ebd4d8: OUTPUT«-9.22337203685478e+18␤»
00:25 packetkn_ left
[Coke] rakudo: say ~<a b>.[^10] 00:26
p6eval rakudo ebd4d8: OUTPUT«a b␤»
[Coke] rakudo: say &print does Callable 00:27
p6eval rakudo ebd4d8: OUTPUT«print␤»
[Coke] rakudo: sub foo {}; say &foo does Callable 00:28
p6eval rakudo ebd4d8: OUTPUT«foo␤»
[Coke] wonders when rt.perl.org will update to rt4. 00:30
phenny: ask moritz if RT #77220 is closable. 00:31
phenny [Coke]: I'll pass that on when moritz is around.
diakopter jlaire: open a ticket I guess; email [email@hidden.address] 00:33
[Coke] rakudo: class A { multi method a() { }; multi method a() { } } 00:35
p6eval rakudo ebd4d8: ( no output )
[Coke] perl6: _~*.A 00:36
p6eval niecza v10-18-g5be99bf: OUTPUT«===SORRY!===␤␤Undeclared name:␤ '_' used at line 1␤␤␤Unhandled Exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) ␤ at /…
..rakudo ebd4d8: ( no output )
..pugs: OUTPUT«*** No such subroutine: "&_"␤ at /tmp/f9HF46XuIf line 1, column 1 - line 2, column 1␤»
[Coke] std: _~*.A
p6eval std 8b331d2: OUTPUT«===SORRY!===␤Undeclared name:␤ '_' used at line 1␤Check failed␤FAILED 00:01 120m␤»
[Coke] std, rakudo: 01 00:37
std: 01
rakudo: 01
p6eval std 8b331d2: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o1 if you mean that at /tmp/caCAh2Lkb5 line 1:␤------> 01⏏<EOL>␤ok 00:01 118m␤»
rakudo ebd4d8: ( no output )
sorear [Coke]: Rakudo is lazy about undefined names
perl6: if 0 { moo; }
[Coke] rakudo: say "a" ~~ m:nth(Mu)/a/ 00:38
p6eval pugs, rakudo ebd4d8: ( no output )
..niecza v10-18-g5be99bf: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'moo' used at line 1␤␤␤Unhandled Exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) ␤ …
rakudo ebd4d8: OUTPUT«=> <a>␤␤»
[Coke] sorear: I'm just testing snippets from tickets.
rakudo: my %foo XX= 1; 00:42
evalbot? 00:43
$ ./perl6 -e 'multi a (Str $a, Str $b) { [+$a, +$b] }; multi a (Array $a,$b where "+") { [+] @($a) }; say ("1", "2", "+").reduce: &a;' 00:45
can only reduce with arity 2 for now
gah.
in method reduce at src/gen/CORE.setting:4207
sorry
in method reduce at src/gen/CORE.setting:1029
rakudo: multi sub postfiz:<!>($a) { [*] 1..$a }
p6eval rakudo ebd4d8: ( no output )
[Coke] thinks 24 tickets is a nice round number. 00:53
benabik [Coke]: In octal, sure.
[Coke] ugh. the tests needed report doesn't tell you how many tickets it found. 00:54
Everything's rounder in octal. 00:55
39 tickets closable with tests.
arnsholt [Coke]: I want a big birthday party for my thirty-second =) 00:58
01:05 preflex_ joined 01:06 preflex left, preflex_ is now known as preflex 01:14 whiteknight left 01:16 whiteknight joined 01:23 packetknife joined
colomon [Coke]++ 01:40
01:48 whiteknight left
dalek ecza/serialize: 8579c2d | sorear++ | / (4 files):
Implement method definition, stubbing of packages
01:57
02:02 packetkn_ joined 02:04 packetknife left 02:13 risou_awy is now known as risou 02:58 packetkn_ left 03:30 drbean joined 03:34 drbean left 03:39 drbean joined 03:40 drbean left 03:50 tokuhiro_ left 03:51 alvis left 04:14 envi joined 04:22 bbkr_ left 04:23 bbkr_ joined 04:25 butterflykisser joined, butterflykisser left 04:27 kmwallio joined 04:30 soh_cah_toa left 04:45 Sarten-X left 04:51 abercrombie left 04:53 Sarten-X joined 04:58 kmwallio left 05:04 mberends joined 05:20 tokuhiro_ joined 05:23 molaf joined 05:45 birdwindupbird joined, birdwindupbird left 05:47 alvis joined 05:48 kaare_ joined, cooper left 05:53 daniel-s joined
moritz good morning 06:02
phenny moritz: 00:31Z <[Coke]> ask moritz if RT #77220 is closable.
moritz \o/ < 800 tickets!!
mberends \o/ 06:03
guten moritz morgen
06:04 cotto left
sorear good morning moritz 06:04
06:05 cotto joined
moritz rakudo: sub foo { say "bar" }; my $x = 'foo'; ::$x() 06:11
p6eval rakudo ebd4d8: OUTPUT«===SORRY!===␤Cannot look up empty name␤»
06:15 packetknife joined 06:30 wamba joined 06:32 molaf left 06:36 kfo joined 06:37 donri left
sorear sleep 06:41
07:02 packetknife left 07:03 espadrine joined 07:12 y3llow left, y3llow_ joined 07:13 y3llow_ is now known as y3llow 07:21 mberends left 07:42 xinming left 07:43 MayDaniel joined 07:52 tokuhiro_ left 07:54 Trashlord left 07:58 masak joined
masak goot mornink, #perl6. 07:58
< 800 !? wow! 07:59
[Coke]++ moritz++
still, it's at 797. I just need to find three bugs... :P 08:00
eiro :)) 08:06
08:15 hanekomu joined 08:25 nebuchadnezzar left 08:29 tokuhiro_ joined 08:30 tokuhiro_ left 08:31 tokuhiro_ joined 08:33 MayDaniel left
masak here's another way to implement permutations, courtesy of D. E. Knuth: 08:37
nom: sub ix($n) { !$n && [0] || map { [$^a, @^b] }, (0..$n X [ix $n-1]) }; sub perms(@a) { map { my $c = +@a; splice my @p, @^i[--$c], 0, $_ for reverse @a; [@p] }, ix @a-1 }; .join.say for perms <a b c>
p6eval nom ebd4d8: OUTPUT«Could not find sub &splice␤ in block <anon> at /tmp/wbpfmhnxhp:1␤ in method reify at src/gen/CORE.setting:3747␤ in method reify at src/gen/CORE.setting:3652␤ in method reify at src/gen/CORE.setting:3652␤ in method gimme at src/gen/CORE.setting:3989␤ in method ea…
masak oops.
moritz nom: 'foo' ~~ /\w+/; $/.print
masak b: sub ix($n) { !$n && [0] || map { [$^a, @^b] }, (0..$n X [ix $n-1]) }; sub perms(@a) { map { my $c = +@a; splice my @p, @^i[--$c], 0, $_ for reverse @a; [@p] }, ix @a-1 }; .join.say for perms <a b c>
p6eval nom ebd4d8: OUTPUT«Method 'print' not found for invocant of class 'Match'␤ in block <anon> at /tmp/84VOgEB0cY:1␤ in <anon> at /tmp/84VOgEB0cY:1␤␤»
b 1b7dd1: OUTPUT«abc␤acb␤bac␤cab␤bca␤cba␤»
masak submits rakudobug about missing 'splice'
moritz nom: 1.print
p6eval nom ebd4d8: OUTPUT«Method 'print' not found for invocant of class 'Int'␤ in block <anon> at /tmp/LxVuLTY_fS:1␤ in <anon> at /tmp/LxVuLTY_fS:1␤␤»
moritz it's curious that so far, nobody has complained about a missing Any.print or Mu.print :-) 08:38
nom: say 'foo' ~~ /<print>+/
p6eval nom ebd4d8: OUTPUT«Method 'print' not found for invocant of class 'Cursor'␤ in regex <anon> at /tmp/E5Vz9au7CZ:1␤ in method ACCEPTS at src/gen/CORE.setting:6244␤ in block <anon> at /tmp/E5Vz9au7CZ:1␤ in <anon> at /tmp/E5Vz9au7CZ:1␤␤»
masak moritz: well, two things: 'say' is commoner than 'print', and 'print' is commoner than '.print' :)
moritz nom: print 1, 2, 3 08:40
p6eval nom ebd4d8: OUTPUT«123»
moritz nom: say 1, 2, 3
p6eval nom ebd4d8: OUTPUT«123␤»
moritz nom: say (1, 2, 3)
p6eval nom ebd4d8: OUTPUT«1 2 3␤»
08:40 nebuchadnezzar joined
masak nom: say "nebuchadnezzar".comb.sort.join 08:41
p6eval nom ebd4d8: OUTPUT«aabcdeehnnruzz␤»
nebuchadnezzar hello 08:42
masak ehllo :)
nebuchadnezzar erf, you are more up to date than me
masak how so?
nebuchadnezzar the difference between helo and EHLO ;-) 08:43
masak actually, I was just giving you an alphabetically sorted greeting :P
nebuchadnezzar masak: ha ok 08:44
updates done, back to work! 08:45
see you
masak o/ 08:47
b: 42.print 08:48
p6eval b 1b7dd1: OUTPUT«42»
masak nom: 42.print
p6eval nom ebd4d8: OUTPUT«Method 'print' not found for invocant of class 'Int'␤ in block <anon> at /tmp/MpLbDODRFu:1␤ in <anon> at /tmp/MpLbDODRFu:1␤␤»
masak submits rakudobug about missint .print
...crediting moritz++ with the find.
moritz rakudo: sub foo { "OH NOES" }; constant foo = 5; say foo 08:53
p6eval rakudo ebd4d8: OUTPUT«5␤»
moritz rakudo: sub foo { "OH NOES" }; constant foo = 5; say foo()
p6eval rakudo ebd4d8: OUTPUT«OH NOES␤»
moritz rakudo: constant foo = 5; sub foo { "OH NOES" }; say foo
p6eval rakudo ebd4d8: OUTPUT«5␤»
moritz rakudo: constant foo = 5; sub foo { "OH NOES" }; say foo()
p6eval rakudo ebd4d8: OUTPUT«OH NOES␤»
masak hm :)
moritz std: constant foo = 5; sub foo { "OH NOES" }; say foo()
p6eval std 8b331d2: OUTPUT«ok 00:01 121m␤»
masak looks good to me.
moritz masak: yes, another closable ticket :-)
masak dang! :P
perl6: my $a = 1; $a **= 2; say $a 08:56
p6eval pugs, rakudo ebd4d8, niecza v10-18-g5be99bf: OUTPUT«1␤»
masak oh wait :)
perl6: my $a = 2; $a **= 2; say $a
p6eval pugs, rakudo ebd4d8, niecza v10-18-g5be99bf: OUTPUT«4␤»
masak perl6: my $a = 2; for ^16 { say $a; $a **= 2 } 08:57
p6eval niecza v10-18-g5be99bf: OUTPUT«2␤4␤16␤256␤65536␤4294967296␤18446744073709551616␤340282366920938463463374607431768211456␤115792089237316195423570985008687907853269984665640564039457584007913129639936␤1340780792994259709957402499820584612747936582059239337772356144372176403007354697680187…
..rakudo ebd4d8: OUTPUT«2␤4␤16␤256␤65536␤4294967296␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤»…
..pugs: OUTPUT«2␤4␤16␤256␤65536␤4294967296␤18446744073709551616␤340282366920938463463374607431768211456␤115792089237316195423570985008687907853269984665640564039457584007913129639936␤1340780792994259709957402499820584612747936582059239337772356144372176403007354697680187429816690342769003…
masak niecza++ pugs++ rakudo--
dalek ast: 6875b22 | moritz++ | S04-declarations/constant.t:
constants and subs of the same name (RT #69522)
08:59
ast: 55356a5 | moritz++ | S06-signature/slurpy-params.t:
remove outdated test
snarkyboojum karma rakudo 09:03
aloha rakudo has karma of 25.
masak nom: class A { role B {} }; A::B.new; say "alive"
p6eval nom ebd4d8: OUTPUT«alive␤»
snarkyboojum surely that should be higher :)
masak nom: role A { role B {} }; A::B.new; say "alive"
p6eval nom ebd4d8: OUTPUT«Could not find symbol 'A::&B'␤ in sub die at src/gen/CORE.setting:416␤ in block <anon> at /tmp/2v9vPOjw0d:1␤ in <anon> at /tmp/2v9vPOjw0d:1␤␤»
masak submits rakudobug
snarkyboojum karma std
aloha std has karma of 5.
snarkyboojum karma niecza
aloha niecza has karma of 37.
snarkyboojum :O
masak niecza++
snarkyboojum hehe 09:04
std++ # for rocking, generally
rakudo++ # for being my current Perl 6 implementation of choice :D 09:05
masak having used Niecza actively for the past few weeks, I sincerely believe it should be more people's implementation of choice. 09:06
the missing features aren't as many as you'd think, and the bug turnaround is fantastic! :) 09:07
flussence I've been trying to make Text::Wrap work in it, it supports the one bit of regex I needed to make the code less horrible :D 09:08
09:10 mberends joined
flussence (it also currently outputs nothing but \n characters there... I'll have to figure that one out) 09:11
snarkyboojum masak: Niecza rocks, but everytime I've tried to use it in anger it's missing stuff I expect to have, more so than Rakudo
perhaps that's changing :)
masak I think so. 09:12
just look at perl6.org/compilers/features :)
snarkyboojum the list of features comparison certainly shows it's close
yeah that
and sorear++ is very responsive - no doubt about it, and scarily prolific :) 09:13
masak close in some places, tied in some, more advanced in others.
mberends has a Niecza Notepad under construction :) 09:15
snarkyboojum yeah.. looking at that high level list, it's definitely catching up :)
masak mberends: wow!
snarkyboojum pity I can't run gtk niecza stuff on my mac :| 09:16
tadzik good morning 09:19
mberends snarkyboojum: colomon++ does, maybe he can help you
snarkyboojum mberends: really! I thought it flat out wasn't supported 09:20
mberends snarkyboojum: bbkr++ as well 09:21
snarkyboojum maybe I should try harder at some point :) 09:22
dalek kudo/nom: fb48457 | moritz++ | src/core/ (2 files):
restrain IO.print and say to defined invocants; add a Mu.print
mberends snarkyboojum: yes, definitely worth the effort :) 09:24
09:24 MayDaniel joined
snarkyboojum colomon: so…. :) 09:25
dalek ast: a7cc650 | moritz++ | S03-junctions/autothreading.t:
autothreading over named params (RT #69863)
moritz rakudo: 'a' ~~ /a/; say ($/.orig).rindex('a', 1) 09:26
p6eval rakudo ebd4d8: OUTPUT«substring not found␤ in method rindex at src/gen/CORE.setting:1544␤ in block <anon> at /tmp/LFU_1b9s_x:1␤ in <anon> at /tmp/LFU_1b9s_x:1␤␤»
moritz rakudo: 'a' ~~ /a/; say ($/.orig).rindex('a')
p6eval rakudo ebd4d8: OUTPUT«0␤»
09:27 orafu left, orafu joined
dalek ast: 01db9ce | moritz++ | S05-match/capturing-contexts.t:
correct and unfudge tests for RT #70003
09:29
moritz nom: say 'aa' ~~ /(.)$1/ 09:30
p6eval nom ebd4d8: OUTPUT«=> <a>␤ 0 => <a>␤␤»
moritz this... shouldn't match
nom: my $a; say so 'aaa' ~~ /$a/
p6eval nom ebd4d8: OUTPUT«Use of uninitialized value in string context␤Use of uninitialized value in string context␤Bool::True␤»
moritz RONG
09:31 MayDaniel left 09:37 skangas left
masak submits rakudobug 09:38
awesomest presentation I've seen in quite a while: www.jamisbuck.org/presentations/rub...index.html
this guy is more into labyrinth-making algorithms than I am! 09:39
masak slightly jealous :)
tadzik oh, this one is nice
masak yes! very good use of medium.
I should draw by hand and scan more. the result can be very nice. 09:40
and then integrated JS in the presentation is really nice, too.
snarkyboojum mberends: can't find any reference to colomon++ getting gtk and Niecza going on OS X - he's doing lots of trig stuff it seems - help me out? :D
masak moritz: ooc, how do you expect an undefined interpolated value to match? 09:42
moritz: always fail? 09:43
mberends snarkyboojum: all I know is colomon uses OS X all the time, and he has run all the Niecza Gtk examples. Furthermore, he's planning to do some bitmap graphics himself. I'll do a little search. irclog.perlgeek.de/perl6/2011-09-28#i_4494221 09:46
snarkyboojum mberends: great - cheers - will quiz him when he's around
mberends snarkyboojum: don't say you never found these: mjhutchinson.com/journal/2010/01/25...cation_mac gtk-osx.sourceforge.net/ live.gnome.org/GTK%2B/OSX/Integration 09:50
snarkyboojum mberends: I must have stopped when I came across a page which said "OS X not supported". Lazy me ;) 09:51
09:51 bbkr left
mberends snarkyboojum: that might have been an *old* page. Those still keep turning up :) 09:51
snarkyboojum mberends: yeah, I'm normally more thorough :) Thanks for the links.. will check it out 09:52
09:52 pernatiy joined
moritz masak: always fail 09:54
masak: we had a long discussion about that some months or years ago
rakudo: "foo" ~ my $a = "bar" 09:55
p6eval rakudo ebd4d8: OUTPUT«Use of uninitialized value in string context␤Cannot assign to a non-container␤ in block <anon> at /tmp/9JKRw8W1SH:1␤ in <anon> at /tmp/9JKRw8W1SH:1␤␤»
snarkyboojum mberends: oh that's right, it's all coming back to me. It had something to do with the monodevelop site taking me in circles when trying to d/l the GTK# package for OS X :D 09:57
10:01 mishin joined
snarkyboojum masak: ah - yes, saw that preso the other day, thought of your algorithmic endeavours :) 10:05
masak it's nice to see others set the bar high :) 10:06
moritz rakudo: class A {}; class B {}; subset C of A & B; say C ~~ A; say B ~~ C 10:10
p6eval rakudo fb4845: OUTPUT«Type check failed in assignment to '$v'; expected 'Mu' but got 'C'␤ in method REIFY at src/gen/CORE.setting:4366␤ in method reify at src/gen/CORE.setting:3653␤ in method reify at src/gen/CORE.setting:3653␤ in method gimme at src/gen/CORE.setting:3990␤ in metho…
moritz rakudo: class A {}; class B {}; subset C of A where B; say C ~~ A; say B ~~ C 10:11
p6eval rakudo fb4845: OUTPUT«Bool::True␤Bool::False␤»
moritz nom: role A { has $.x }; say A("foo").x 10:16
p6eval nom fb4845: OUTPUT«Could not find sub &A␤ in block <anon> at /tmp/gQW_FNtTIA:1␤ in <anon> at /tmp/gQW_FNtTIA:1␤␤»
moritz jnthn: that form is missing in nom, and used quite a bit in the traits tests
dalek ast: 3f79756 | moritz++ | S14-traits/routines.t:
port a few trait tests to the new spec
10:18
masak moritz: "that form"? you mean there's wording in the spec allowing explicitly for calling a constructor with one positional argument if the class only has one public attribute? 10:21
moritz masak: s/class/role/ 10:22
10:22 daniel-s left
moritz rakudo: ({nextsame})() 10:25
p6eval rakudo fb4845: OUTPUT«No dispatcher in scope␤ in block <anon> at /tmp/UJdC84qM1y:1␤ in block <anon> at /tmp/UJdC84qM1y:1␤ in <anon> at /tmp/UJdC84qM1y:1␤␤»
10:26 hanekomu left
masak moritz: oh, right. 10:27
for some reason, I buy that much more easily.
masak submits rakudobug
10:38 whiteknight joined 10:39 mishin left
ingy o/ 10:43
masak \o 10:59
11:05 buubot_backup left 11:08 tokuhir__ joined 11:10 tokuhiro_ left 11:17 wamba left
tadzik oh, can we merge this funny branch of nqp and target Parrot HEAD now? 11:18
moritz yep
tadzik I'll try it
moritz it's not hard, it merges cleanly :-) 11:19
tadzik nice :) I'll just see if the Parrot master is clean on spectest and such 11:20
moritz rakudo: grammar Integer { rule TOP { x } }; Integer.parse("x") 11:22
p6eval rakudo fb4845: ( no output )
tadzik hmm, doesn't merge cleanly for me
moritz rakudo: grammar Integer { rule TOP { x } }; say Integer.parse("x") 11:23
p6eval rakudo fb4845: OUTPUT«=> <x>␤␤»
moritz tadzik: are you nqp/master ?
tadzik moritz: yep
are you sure you're up to date?
11:31 arthur-_ left 11:33 arthur-_ joined 11:36 Psyche^ joined
masak ok, I'm off to the grocery store. but when I come back, my plan is to sit down with the macros branch and do the last bits of work to implement D1. and then I'll push it out to the world. 11:38
tadzik oh oh
masak in my opinion, once it does D1, it can already be merged with the nom branch -- and then you can all play with macros :)
& 11:39
11:40 Patterner left, Psyche^ is now known as Patterner
dalek p: a430d8d | tadzik++ | / (10 files):
Merge branch 'kill-useless-defaults'

Conflicts: src/PAST/NQP.pir tools/build/PARROT_REVISION
11:41
kudo: d4cb879 | tadzik++ | tools/build/NQP_REVISION:
Bump NQP_REVISION
11:43
tadzik gah, I fell into rakudo-master trap again
11:43 buubot_backup joined
dalek kudo/nom: 4880cea | tadzik++ | tools/build/NQP_REVISION:
Bump NQP_REVISION
11:44
tadzik rakudo/master should not be on github, right? 11:45
moritz huh, rakudo/master doesn't even have a NQP_REVISION, I thought? 11:47
tadzik: ah, I've done the merge previously (and undid it) in my local repo, so it had the conflict resolution recorded already
tadzik maybe I accidentally created rakudo/master as a child of nom some time ago, and now accidentally pushed it 11:48
there should be no master on github, si?
moritz 'si'nks so :-) 11:49
tadzik a'right, I'll remove it
sink!
done
11:51 Reaganomicon left
colomon snarkyboojum: I don't know if I have any useful insights on getting the Niecza Gtk stuff to run on OS X, it Just Worked right out of the box for me. 12:09
12:16 woosley joined, woosley left
moritz the insight is "Just Duckin' Foo it!" :-) 12:19
snarkyboojum colomon: ah - ok. I get errors complaining about not being able to find glibsharpglue dlls or some such 12:21
colomon how did you install mono? 12:22
snarkyboojum colomon: binary package/installer off the website
colomon yeah, okay, that's what I did too. hmm.
snarkyboojum colomon: weird - which version?
12:22 im2ee joined
colomon snarkyboojum: Mono JIT compiler version 2.10.2 (tarball Mon Apr 18 09:14:01 MDT 2011) 12:23
snarkyboojum colomon: ah ok - I have Mono JIT compiler version 2.10.5 (tarball Mon Aug 22 20:38:08 EDT 2011)
colomon I have a hard time imagining they just removed Gtk support between versions... 12:24
12:24 GlitchMr joined 12:26 risou is now known as risou_awy
moritz maybe there are different packages? like "full" and "bare" or so? 12:26
12:26 f00li5h left
snarkyboojum colomon: I'm trying to run mberends' old gtk example mono run/Niecza.exe calculator.pl 12:27
colomon: sane invocation?
no idea about this stuff :D esp publickeytokens and culture crapola :) 12:28
colomon snarkyboojum: I don't have that script, but I've been running things like so: 12:29
mono run/Niecza.exe examples/gtk1.pl
jnthn afternoon, #perl6
phenny jnthn: 30 Sep 23:10Z <[Coke]> tell jnthn I need some guidance on RT67364 - it refers to a 2 year old irc log, says there are examples, I don't see any. You are namedropped.
snarkyboojum colomon: ok - that doesn't work for me either
same issue
meh - should be easier than spending a few hours trying to get it to work :) 12:30
im2ee hello! :)
colomon snarkyboojum: what's the exact error message? that will let me see where the library in question lives on my machine....
snarkyboojum colomon: something like this gist.github.com/1256005 12:33
jnthn phenny: tell [Coke] It appears that the issue being discussed was resolved a different way (required named parameters). And I know that works (we use it in the setting, for one). Overall, traits are much more robust in nom, so I think we can safely close that one. 12:34
phenny jnthn: I'll pass that on when [Coke] is around.
colomon snarkyboojum: I may be getting that from a MacPorts install 12:35
snarkyboojum colomon: sorry... getting what?
colomon: which version of os x?
colomon glibsharpglue-2 12:36
dalek ast: 84330f5 | moritz++ | S05-grammar/parse_and_parsefile.t:
correct and unfudge parse_and_parsefile.t
colomon OS X 10.6.8 12:37
12:37 risou_awy is now known as risou
dalek kudo/nom: 5a38367 | moritz++ | / (2 files):
implement Grammar.parsefile, run a test for it
12:37
snarkyboojum colomon: Mmm.. 10.7.1 here
colomon: LD_LIBRARY_PATH set?
colomon I don't believe so. 12:39
snarkyboojum colomon: fun :)
colomon: seems people have had similar issues between versions of mono, albeit several versions ago.. 12:42
who knows - shouldn't be this hard anyway :) 12:43
12:46 klavs joined
jnthn moritz: Are you sure A("foo").x is not spec fossil? The traits tests are *old*. 12:50
I know that $x does SomeRole("foo") should work
But had always considered that one a special syntactic form.
moritz jnthn: I'm only sure about the role form, which nom is missing so far 12:51
klavs hey guys! i am new to perl. how can i read binary data from binary file? 12:54
jnthn moritz: Yeah, I know that bit is still to do. 12:55
Maybe I look at it today. We'll see. :)
ugh :(
Parrot build fails for me :(
src/runcore/subprof.c(152) : error C2054: expected '(' to follow 'inline' 12:56
mberends klavs: this channel is for developing a new version of perl. Try #perlhelp or #perl 12:57
klavs thanks
12:59 klavs left 13:01 downtown joined
downtown a 13:03
jnthn ugh, github's down agan. 13:05
*again
13:08 downtown left 13:13 downtown joined
masak they should invent a way to distribute the version control over all users, circumventing the need for something central altogether... 13:23
:P
jnthn We could call it distributed version control!
13:24 GlitchMr left
masak .oO( distracted version control ) 13:24
im2ee: hi, how's the Perl 6 going?
im2ee hi masak. I'm training now - so, good at all. :) 13:25
masak yay 13:26
masak imagines im2ee running on a treadmill, coding Perl 6 13:27
flussence imagines gittokenring.com 13:28
masak THE TOKEN MUST NEVER STOP 13:29
13:29 im2ee_ joined
im2ee_ masak, i mean that i'm writing some code! :) 13:29
hah
masak im2ee_: yes, I know. :P
im2ee_: and good for you! 13:30
remember that sharing makes the learning go faster!
flussence (hm, that could be a workable idea. Instead of everything going through one site, it just redirects you to project members' git servers in a round robin) 13:31
masak flussence: patent it!
flussence nah, I'll just be lazy and let someone else make it, then people can point to this as prior art if they try :) 13:32
13:32 im2ee left
masak .oO( "I call it... the gittyloop." ) 13:32
13:39 tokuhir__ left
im2ee_ How to clear out an array? :) 13:39
jnthn @array = (); 13:40
masak im2ee_: but chances are you don't need to, and could write it in a better way. :) 13:41
put differently, clearing out an array is a bit of a code smell. just ever so slightly. 13:42
13:42 whiteknight left
im2ee_ Ehh, right (why i'm not thinking :D ? ). Thanks jnthn. 13:43
masak, which better way?
13:45 f00li5h joined
masak im2ee_: arrays are made for putting things in them. if you're clearing the array, you're doing the *opposite* of what it was meant for. just saying that's not ideal -- without seeing the code I can not suggest a better way. :) 13:46
and the use case may indeed be entirely legitimate, too. it depends.
13:55 alvis left
masak im2ee_: generally, I've been settling on a style of coding where I don't "overwrite" values in variables. filling up an array is nice, but if I need to take away values, I always consider whether I don't actually need a new array instead. 13:57
im2ee_: it's sort of moving towards a functional programming thinking. 13:58
im2ee_: does that make sense? 14:03
im2ee_ Yes. :) Thank You masak++ 14:09
14:10 GlitchMr joined 14:11 alvis joined
masak greetings, GlitchMr and alvis. 14:11
im2ee_ nom: if defined($s) { say 1; }
GlitchMr Hi
p6eval nom 5a3836: OUTPUT«===SORRY!===␤Symbol '$s' not predeclared in <anonymous> (/tmp/TTutkhKj5o:1)␤»
im2ee_ How to check this?
GlitchMr nom: say 1 if defined $s 14:12
p6eval nom 5a3836: OUTPUT«===SORRY!===␤Symbol '$s' not predeclared in <anonymous> (/tmp/BxYKs5j04H:1)␤»
GlitchMr ...
mauke check what?
GlitchMr nom: say 1 if defined my $s
p6eval nom 5a3836: ( no output )
GlitchMr nom: my $s = undef; say 1 if defined $s
p6eval nom 5a3836: OUTPUT«===SORRY!===␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤ Mu (the "most undefined" type object),␤ an undefined type object such as Int,␤ Nil as an empty list,␤ !*.defined as a matcher or method,␤ Any:U as a type constraint␤ or
..fa…
GlitchMr ..fa?
But I'm not sure if Perl 6 even has defined 14:13
nom: say defined 1
p6eval nom 5a3836: OUTPUT«Bool::True␤»
GlitchMr ...
im2ee_ mauke, check that there is defined a variable.
GlitchMr nom: no warnings; say 1 unless defined $s
p6eval nom 5a3836: OUTPUT«===SORRY!===␤Symbol '$s' not predeclared in <anonymous> (/tmp/pD3nqAK_cN:1)␤»
GlitchMr nom: no warnings; no strict; say 1 unless defined $s 14:14
p6eval nom 5a3836: OUTPUT«===SORRY!===␤Symbol '$s' not predeclared in <anonymous> (/tmp/WDkbMSg5Gt:1)␤»
GlitchMr ....
mauke im2ee_: why?
im2ee_: and what do you mean by "defined"?
GlitchMr perldoc.perl.org/functions/defined.html
mauke that's perl5
im2ee_ method execute ( Str $str? )
i want to check if there is $str in arguments. 14:15
14:15 im2ee_ is now known as im2ee
GlitchMr nom: my $nom; say defined $nom; 14:15
p6eval nom 5a3836: OUTPUT«Bool::False␤»
GlitchMr If your program uses not defined values for design, there is something wrong. 14:16
flussence nom: sub a(:$a = Mu, :$b = Mu) { say $b.defined }; a(); a(:b)
p6eval nom 5a3836: OUTPUT«Bool::False␤Bool::True␤»
GlitchMr rakudo: say $]
p6eval rakudo 5a3836: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 1, near "$]"␤»
GlitchMr rakudo: say $$ 14:17
im2ee Ok, i'll use multi :)
p6eval rakudo 5a3836: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 1, near "$$"␤»
GlitchMr > $]
Unsupported use of $] variable; in Perl 6 please use $*PERL_VERSION at line 1, near "\n"
...
It's like that for me...
mauke perl6: sub foo(Str $str) { $str }; foo 2 14:19
masak im2ee: 'defined($s)' works fine, but (1) you still have to declare $s beforehand with 'my', and (2) there's no real difference between an undefined value passed in and no value passed in.
p6eval niecza v10-18-g5be99bf: OUTPUT«␤Unhandled Exception: Nominal type check failed in binding Str $str in MAIN foo; got Int, needed Str␤ at /tmp/OKx6yEOhYU line 0 (MAIN foo @ 0) ␤ at /tmp/OKx6yEOhYU line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2115 (CORE C102…
..rakudo 5a3836: OUTPUT«Nominal type check failed for parameter '$str'; expected Str but got Int instead␤ in sub foo at /tmp/ZVbytFZGgN:1␤ in block <anon> at /tmp/ZVbytFZGgN:1␤ in <anon> at /tmp/ZVbytFZGgN:1␤␤»
..pugs: ( no output )
mauke perl6: sub foo(Str $str = 2) { $str }; foo "asdf" 14:20
p6eval pugs, rakudo 5a3836, niecza v10-18-g5be99bf: ( no output )
im2ee Ok, clear. Have another question.
masak shoot :)
im2ee $str .= ';' unless $str ~~ /;$/; 14:21
Quoted method name requires parenthesized arguments at line 15, near " unless $s"
What is wrong?
masak im2ee: it's '~='
not '.='
GlitchMr rakudo: say $*PERL_VERSION
im2ee Ah.. right
p6eval rakudo 5a3836: OUTPUT«Dynamic variable $*PERL_VERSION not found␤ in sub DYNAMIC at src/gen/CORE.setting:239␤ in block <anon> at /tmp/XOyICBVDYx:1␤ in <anon> at /tmp/XOyICBVDYx:1␤␤»
im2ee sorry ..
GlitchMr ...
masak im2ee: recall that the dot has been appropriated for method calls, not string concat :)
im2ee: also, don't apologise :)
mauke aw, it was a sad day when perl6 switched away from _ 14:22
masak mauke: not for me :D
GlitchMr rakudo: say <arrays are <nice forever>>.perl 14:23
p6eval rakudo 5a3836: OUTPUT«Bool::True␤»
GlitchMr Nice. I'll use it in my obfuscated program... :P
masak o.O
GlitchMr ok, not exactly
masak oh!
it parses as say (<arrays are <nice forever> > .perl) 14:24
GlitchMr rakudo: say ().perl 14:25
p6eval rakudo 5a3836: OUTPUT«()␤»
GlitchMr Makes sense
masak rakudo: say ().perl.perl
p6eval rakudo 5a3836: OUTPUT«"()"␤»
masak rakudo: say ().perl.perl.perl 14:26
p6eval rakudo 5a3836: OUTPUT«"\"()\""␤»
GlitchMr rakudo: say ("Word").perl.perl.perl.perl.perl
p6eval rakudo 5a3836: OUTPUT«"\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"Word\\\\\\\\\\\\\\\"\\\\\\\"\\\"\""␤»
GlitchMr Escaping is fun!
masak each run of backslashes are 2 ** $N - 1 in number.
GlitchMr ~2+3
rakudo: say ~2+3
p6eval rakudo 5a3836: OUTPUT«5␤»
GlitchMr how?
masak GlitchMr: (~2) + 3 14:27
GlitchMr So...
masak prefix ops are loose, but not that loose :)
GlitchMr rakudo: say "2"+3
p6eval rakudo 5a3836: OUTPUT«5␤»
GlitchMr ...
masak aye.
Perl reaches into your string and numifies it for you.
GlitchMr $php -r "print '2'+3;" 14:28
5
...
masak PHP does, too, it seems.
GlitchMr $ perl -e "print '2'+3"
5
...
Actually, it makes sense...
For JS it's 23... but that's expected as + is overloaded... 14:29
masak GlitchMr: IIRC, it depends on whether you do "2" = 3 or 3 + "2" in JS. 14:31
and by the way, + is overloaded in Perl 6 too, and it still doesn't suck :)
it does different things for Int, Num, and Rat, for example. 14:32
but the idea is the same: numeric addition.
GlitchMr But those types are numeric...
So technically they do this same thing, just on barely changed types.
> (0.1+0.2)*10/3-1 14:33
0
> 0.1/100000000000000000000000
-6.27417313425164e-10
-6.27417313425164e-10 O_o
(yeah, I know, floats...) 14:34
masak nom: say 0.1 / 100000000000000000000000 14:35
p6eval nom 5a3836: OUTPUT«Inf␤»
moritz nom: say (0.1+0.2)*10/3-1
masak that's way off :)
p6eval nom 5a3836: OUTPUT«0␤»
GlitchMr INFINITY O_o
No, seriously. How it is infinity...
14:36 downtown left
GlitchMr nom: ?1?'i know':'the Perl 6 is using ?? and !! :P' 14:36
p6eval nom 5a3836: OUTPUT«===SORRY!===␤Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at line 1, near "'i know':'"␤»
GlitchMr rakudo: ?1?'i know':'the Perl 6 is using ?? and !! :P' 14:37
p6eval rakudo 5a3836: OUTPUT«===SORRY!===␤Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at line 1, near "'i know':'"␤»
GlitchMr niecza: ?1?'i know':'the Perl 6 is using ?? and !! :P'
p6eval niecza v10-18-g5be99bf: OUTPUT«===SORRY!===␤␤Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at /tmp/_M7KFjJene line 1:␤------> ?1?⏏'i know':'the Perl 6 is using ?? and !! ␤␤Parse failed␤␤»
GlitchMr ... so nearly every compiler detects ?: usage...
Weird...
Is detection of ?: part of Perl 6 or what? 14:38
masak GlitchMr: fwiw, 'nom:' and 'rakudo:' go to the same implementation.
GlitchMr: you could say that it's part of Perl 6, yes.
we try to be good with error messages.
we have this concept of "Awesome Error Message", so when they're Less Than Awesome, we submit bug reports about it. 14:39
GlitchMr niecza: print $]
p6eval niecza v10-18-g5be99bf: OUTPUT«===SORRY!===␤␤Non-declarative sigil is missing its name at /tmp/VnWfFhUj_d line 1:␤------> print ⏏$]␤␤Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 613 (CORE warn @ 2) …
moritz std: $] 14:40
p6eval std 8b331d2: OUTPUT«===SORRY!===␤Unsupported use of $] variable; in Perl 6 please use $*PERL_VERSION at /tmp/ErufzgESb1 line 1:␤------> $]⏏<EOL>␤Parse failed␤FAILED 00:01 119m␤»
GlitchMr std: $*PERL_VERSION
p6eval std 8b331d2: OUTPUT«ok 00:01 119m␤»
GlitchMr std: say $*PERL_VERSION
p6eval std 8b331d2: OUTPUT«ok 00:01 120m␤»
moritz GlitchMr: std only does syntax checking
GlitchMr Oh, I see 14:41
niecza: print $*PERL_VERSION
p6eval niecza v10-18-g5be99bf: OUTPUT«Any()»
dalek ast: 0629400 | moritz++ | S05-grammar/parse_and_parsefile.t:
unfudge a test for rakudo
GlitchMr niecza: use v5.14
p6eval niecza v10-18-g5be99bf: ( no output )
GlitchMr I'm not sure if "use v5.14" should be accepted. Those languages have extremally different syntax... 14:42
mberends GlitchMr: correct. Niecza probably just ignored the version number anyway. 14:43
moritz it should not be accepted, unless the compiler knows how to provide perl 5.14 semantics
GlitchMr niecza: use v7.23
p6eval niecza v10-18-g5be99bf: ( no output )
GlitchMr rakudo: use v7.23
p6eval rakudo 5a3836: ( no output )
GlitchMr rakudo: print use v7.23
p6eval rakudo 5a3836: OUTPUT«===SORRY!===␤Confused at line 1, near "print use "␤»
GlitchMr Makes sense...
masak 'use' statements are special. 14:44
in particular, they're not sub calls or anything like that. 14:45
GlitchMr > import this
P
... what is import and why it's accepted.
moritz well, Perl is not Python :-)
masak fwiw, I think implementations should warn for any other version than 'use v6'.
14:46 daniel-s joined
GlitchMr I was testing. But why "import" is accepted. What processing instruction it is (if it's processing instruction...)? 14:46
> import z::z
_block85
...
What? 14:47
moritz GlitchMr: see S11
(nope, should not return a block)
GlitchMr I could only get this once. Trying to run this again does nothing... 14:48
Unless I will exit from interpreter and run it again...
masak that's because importing something a second time is a no-op.
moritz but why does it succeed importing z::z
masak nom: import z::z 14:49
p6eval nom 5a3836: OUTPUT«===SORRY!===␤Could not find module z::z to import symbols from at line 1, near ""␤»
masak I have no idea.
GlitchMr rakudo: import z::z
p6eval rakudo 5a3836: OUTPUT«===SORRY!===␤Could not find module z::z to import symbols from at line 1, near ""␤»
GlitchMr Maybe I have old version
$ perl6 --version 14:50
This is Rakudo Perl 6, version 2011.04 built on parrot 3.3.0
Copyright 2008-2011, The Perl Foundation
moritz tadzik: I get lots of failures here on the new nom and rakudo... you too?
GlitchMr This is newest Windows build I've found... 14:51
moritz rakudo: say 6 >== 2
p6eval rakudo 5a3836: OUTPUT«Cannot assign to a non-container␤ in block <anon> at /tmp/cX5OYjJk91:1␤ in <anon> at /tmp/cX5OYjJk91:1␤␤»
moritz GlitchMr: yep, old 14:52
GlitchMr: build from source if you want something newer
GlitchMr I don't know how :(.
I never programmed in C++...
All those "unsigned long long"s confuse me... 14:53
int me(){}...
moritz why would you look at them, just for building rakudo?
nom: "foo".new 14:54
p6eval nom 5a3836: ( no output )
moritz nom: say "foo".new.WHAT
p6eval nom 5a3836: OUTPUT«Str()␤»
moritz nom: say "foo".new.chars 14:55
p6eval nom 5a3836: OUTPUT«0␤»
GlitchMr niecza.exe crashes when I run it...
Oh, I see... I was supposed to extract whole archive, not just run directory...
niecza> 6>==2 14:56
←===←SORRY!←===←
Arrows...
moritz ANSI color codes
which your terminal doesn't understand 14:57
GlitchMr cmd.exe
moritz maybe sorear++ could disable them on win32?
GlitchMr niecza> 2=<2
System.IndexOutOfRangeException: Indeks wykraczał poza granice tablicy.
...?
tadzik moritz: don't think so, will recheck
GlitchMr (I find it weird that error descriptions are in user's language)
niecza: 2=<2 14:58
p6eval niecza v10-18-g5be99bf: OUTPUT«␤Unhandled Exception: System.IndexOutOfRangeException: Array index is out of range.␤ at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤ at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename un…
GlitchMr niecza> my @array = () 15:00
Potential difficulties:
@array is declared but not used at (eval) line 1:
...?
benabik GlitchMr: You're finding all kinda of interesting errors, aren'y you? 15:01
*aren't
mberends GlitchMr: I get that all the time. You should use @array after you've declared it.
GlitchMr niecza: $@
p6eval niecza v10-18-g5be99bf: OUTPUT«===SORRY!===␤␤Non-declarative sigil is missing its name at /tmp/EsXBPWZ9SS line 1:␤------> <BOL>⏏$@␤␤Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 613 (CORE warn @ 2) ␤…
benabik That should probably be a "$@ is perl 5" type of error. 15:02
GlitchMr After I run it, I get insane long list
masak benabik: agreed. 15:03
GlitchMr: that's the stacktrace. sorry about that. :/
we're working on ways to avoid showing long stacktraces to people.
benabik STD does have a special_variable:sym<$@> rule… Doesn't niecza use STD?
masak it uses its own version of it. 15:04
std: $@
p6eval std 8b331d2: OUTPUT«===SORRY!===␤Unsupported use of $@ variable as eval error; in Perl 6 please use $! at /tmp/ElCDn_VT5g line 1:␤------> $@⏏<EOL>␤Parse failed␤FAILED 00:01 119m␤»
GlitchMr niecza> 99999999999999999**9999999999999999999
^C
One of reasons why I had to filter ** while I was making IRC bot which made calculations in Python... 15:05
benabik GlitchMr: p6eval just has a timeout.
niecza: 99999999999999999**9999999999999999999
GlitchMr Makes sense...
p6eval niecza v10-18-g5be99bf: OUTPUT«(timeout)» 15:06
GlitchMr niecza> -1 mod 12
11
Thanks :).
It always annoyed me to get -1 as result...
benabik !!!
That's awesome. I had to write a custom mod function for Haskell when I was in Crypto. 15:07
GlitchMr I like this part of Perl 6.
Why so many programming languages return -1... 15:08
moritz nom: use Test; plan 1; is 'soemthing'.new(), ''
p6eval nom 5a3836: OUTPUT«(signal SEGV)1..1␤»
benabik It depends on what meaning you use for mod/%
GlitchMr I never had need to have -1 :P. 15:09
dalek ast: 24f09e8 | moritz++ | S02-literals/string-interpolation.t:
test for RT #73144, "string".new
GlitchMr That behavior makes more sense...
moritz rakudo: say index("uuúuúuùù", "úuù")
p6eval rakudo 5a3836: OUTPUT«4␤»
benabik -N mod M can be -(N mod M)… I think that's useful for something.
GlitchMr niecza: 1.5%0.5 15:10
p6eval niecza v10-18-g5be99bf: ( no output )
GlitchMr ^ it's error for me...
niecza> 1.5 mod 0.5
System.DivideByZeroException: Nastąpiła próba podzielenia przez zero.
Weird...
moritz perl6: say 1.5 % 0.5
p6eval niecza v10-18-g5be99bf: OUTPUT«0/1␤»
..pugs, rakudo 5a3836: OUTPUT«0␤»
benabik I think the -1 result is so N == (N/M + N%M)
moritz GlitchMr: mod is not the same as %
GlitchMr Oh right
moritz iirc mod is for integers
GlitchMr niecza: 1.5 mod 0.5 15:11
p6eval niecza v10-18-g5be99bf: OUTPUT«␤Unhandled Exception: System.DivideByZeroException: Division by zero␤ at Niecza.BigInteger.DivRem (BigInteger dividend, BigInteger divisor, Niecza.BigInteger& remainder) [0x00000] in <filename unknown>:0 ␤ at Builtins.divop (Int32 opc, Niecza.Variable a1…
GlitchMr I forgot that Perl uses @ for arrays.
benabik nom: say -1 mod 12; say -1 % 12
p6eval nom 5a3836: OUTPUT«-1␤11␤»
GlitchMr % for hashes*
lol
Oh, I see. There is both mod and %.
benabik Really? mod gives -1 and % gives 11? Really?
moritz hopes not really 15:12
benabik nom: say -1 % 12; say -1 mod 12
p6eval nom 5a3836: OUTPUT«11␤-1␤»
GlitchMr nom: say 3.5 % 2.25; say 3.5 mod 2.25
p6eval nom 5a3836: OUTPUT«1.25␤No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤ in sub infix:<div> at src/gen/CORE.setting:1960␤ in sub infix:<mod> at src/gen/CORE.setting:2163␤ in block <anon> at /tmp/EgW0nDqgsT:1␤ in <anon> at…
dalek ast: 44ff863 | moritz++ | S32-str/index.t:
test or index() with non-ASCII chars, #73122
benabik moritz: That is, in fact, what nom appears to do.
moritz perl6: say -1 mod 9 15:13
p6eval niecza v10-18-g5be99bf: OUTPUT«8␤»
..pugs: OUTPUT«*** ␤ Unexpected "mod"␤ expecting operator, ":" or ","␤ at /tmp/yvb2dlmnRY line 1, column 8␤»
..rakudo 5a3836: OUTPUT«-1␤»
moritz thinks that warrants a rakudobug
where's masak when you need him? :-)
GlitchMr niecza: say 3.5 % 2.25; say 3.5 mod 2.25
p6eval niecza v10-18-g5be99bf: OUTPUT«5/4␤1␤»
benabik perl6: say -1 mod 9
GlitchMr rakudo: say 3.5 % 2.25; say 3.5 mod 2.25
p6eval niecza v10-18-g5be99bf: OUTPUT«8␤»
..pugs: OUTPUT«*** ␤ Unexpected "mod"␤ expecting operator, ":" or ","␤ at /tmp/39XBK8dein line 1, column 8␤»
..rakudo 5a3836: OUTPUT«-1␤»
rakudo 5a3836: OUTPUT«1.25␤No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤ in sub infix:<div> at src/gen/CORE.setting:1960␤ in sub infix:<mod> at src/gen/CORE.setting:2163␤ in block <anon> at /tmp/lo1ItEFNIp:1␤ in <anon>…
GlitchMr 8[NULL]nothing O_o 15:14
Oh, I see.
> 3.5 mod 2.25
No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:
:(Int $a, Int $b)
Makes sense...
But then, even 3.0 mod 2.0 fails... 15:15
(it doesn't make sense to fail there...)
moritz nom: Block()
p6eval nom 5a3836: OUTPUT«Could not find sub &Block␤ in block <anon> at /tmp/btztce6OIZ:1␤ in <anon> at /tmp/btztce6OIZ:1␤␤»
moritz GlitchMr: those are not integers
nom: Block.()
p6eval nom 5a3836: OUTPUT«Cannot access attributes in a type object␤ in block <anon> at /tmp/cVNK76AUUs:1␤ in <anon> at /tmp/cVNK76AUUs:1␤␤»
GlitchMr Yeah, but...
> 3/1 mod 1
No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:
:(Int $a, Int $b)
moritz GlitchMr: but Rat objects that happen to hold what would fit into an integer
GlitchMr This could be activated even accidentally...
TimToady P5 would just coerce 'em 15:16
moritz not sure about mod, but I think the spec is pretty cleare that div works on Int only
or has that changed in the mean time?
TimToady div works on two of the same type in P6
but we could probably have a Cool,Cool version 15:17
though you shouldn't 100% believe anything I say before coffee 15:18
GlitchMr niecza: 'a'x2 15:19
p6eval niecza v10-18-g5be99bf: OUTPUT«===SORRY!===␤␤Whitespace is required between alphanumeric tokens at /tmp/7UvwOvwh9L line 1:␤------> 'a'x⏏2␤␤␤Unhandled Exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) ␤ a…
GlitchMr niecza: 'a' x 2
p6eval niecza v10-18-g5be99bf: ( no output )
GlitchMr niecza: say 2 x 2
p6eval niecza v10-18-g5be99bf: OUTPUT«22␤»
GlitchMr :)
moritz nom: my @a = (1,2) Z (3,4); say @a.perl 15:20
p6eval nom 5a3836: OUTPUT«Array.new(1, 3, 2, 4)␤»
moritz nom: say ( (1,2) Z (3,4) ).perl;
p6eval nom 5a3836: OUTPUT«((1, 3), (2, 4)).list␤»
15:21 am0c joined
TimToady superstitious parens 15:21
masak TimToady: a Cool,Cool version seems counter to the "same type" idea.
TimToady nom: say ( 1, 2 Z 3, 4 ).perl
p6eval nom 5a3836: OUTPUT«((1, 3), (2, 4)).list␤»
GlitchMr niecza: say 0x1F xor 0x42
p6eval niecza v10-18-g5be99bf: OUTPUT«␤Unhandled Exception: System.Exception: Unable to find lexical &infix:<xor> in mainline␤ at Niecza.CLRBackend.NamProcessor.ResolveLex (System.String name, Boolean upf, System.Int32& uplevel, Boolean core) [0x00000] in <filename unknown>:0 ␤ at Niecza.CLR…
GlitchMr rakudo: say 0x1F xor 0x42 15:22
p6eval rakudo 5a3836: OUTPUT«31␤»
GlitchMr ...
TimToady o_O
GlitchMr I think it's pretty normal usage...
Unless I don't understand "xor"... 15:23
TimToady that should be false
it looks like it's doing it bitwise
doing an or
GlitchMr $ php -r "print 0x1F xor 0x42;"
31
TimToady rakudo: say 0x1f +^ 0x42
p6eval rakudo 5a3836: OUTPUT«93␤»
GlitchMr But for me it's logical to do it bitwise... 15:24
TimToady oh, precedence
GlitchMr But +^ also makes sense...
TimToady xor is looser than say
masak submits rakudobug
TimToady no bug
masak no?
TimToady say (0x1f xor 0x42)
masak oh!
TimToady mon: say (0x1f xor 0x42)
masak I see.
moritz submits masakbug
TimToady gah
moritz nom: say (0x1f xor 0x42) 15:25
p6eval nom 5a3836: OUTPUT«Nil␤»
masak TimToady: here, have some coffee ;)
TimToady ta
moritz nom: say (<a b> X <c d> X < e f>).join(',')
p6eval nom 5a3836: OUTPUT«a,c,e,a,c,f,a,d,e,a,d,f,b,c,e,b,c,f,b,d,e,b,d,f␤»
GlitchMr I just don't understand Perl 6... 15:26
moritz GlitchMr: have you tried reading some docs?
TimToady GlitchMr: nobody understands it completely :)
GlitchMr Not really...
TimToady so we're all on the learning curve
moritz GlitchMr: well, that would be a good first step
GlitchMr Unless you mean Perl 5 docs... 15:27
moritz nope
masak that only helps so much :)
TimToady if you prefer to learn from examples, try rosettacode.org
masak indeed.
TimToady it will show some comparisons of Perl 5 and Perl 6 ways of doing things
GlitchMr Yeah, I think I did some PHP examples there...
TimToady (or any other language you already know)
GlitchMr But I will look for Perl 6 languages...
masak I may also recommend the series of blog posts starting here: strangelyconsistent.org/blog/june-1...and-output 15:28
dalek ast: 4eccfcc | moritz++ | S03-metaops/cross.t:
tests cross with three lists
TimToady warning, some of the examples are showing off more than instructive :)
15:28 hanekomu joined
GlitchMr prompt "> " 15:28
Nice :).
I didn't knew it
moritz rakudo: say [1,2] X~ <a b> 15:29
p6eval rakudo 5a3836: OUTPUT«1a 1b 2a 2b␤»
moritz still RONG
GlitchMr $ perl
print ":)"
^D
:)
I love this trick... :)
TimToady moritz: why do you think it's RONG? 15:30
GlitchMr But I'm happy that Perl 6 (at least niecza and rakudo) has something like irb...
TimToady oh, flattening [], nm
15:31 Chillance joined
TimToady drinks more coffee, and is glad it's not KoolAid® 15:31
15:31 cooper joined
GlitchMr > ?0???0!!?1 15:32
Bool::True
I think I could make it better...
!0
... maybe...
moritz nom: say so Whatever
p6eval nom 5a3836: OUTPUT«Bool::False␤»
GlitchMr > say so "Whatever" 15:33
Bool::True
What is "so" doing?
moritz the same as ?
TimToady it's lo precedence like and and xor and not
GlitchMr OK, what is Whatever... 15:34
moritz a type
GlitchMr of what?
whatever?
moritz right
TimToady a type that means 'you figure it out'
it's an inside out curry, when used on operators
GlitchMr > Whatever+2
Use of uninitialized value in numeric context
moritz like all type objects
GlitchMr Oh, I see... it's everything... useful in multi subs...
I think... 15:35
TimToady you need to use the singleton object, named "*"
moritz nom: say * + 2
p6eval nom 5a3836: OUTPUT«_block1010␤»
TimToady nom: say (*+2)(3)
p6eval nom 5a3836: OUTPUT«5␤»
GlitchMr > my $dialog = prompt "> "
> aaa
> $dialog
aaa
TimToady nom: .say for 0, 1, *+* ... *
GlitchMr I guess I'm doing it correctly...
p6eval nom 5a3836: OUTPUT«(timeout)0␤1␤1␤2␤3␤5␤8␤13␤21␤34␤55␤89␤144␤233␤377␤610␤987␤1597␤2584␤4181␤6765␤10946␤17711␤28657␤46368␤75025␤121393␤196418␤317811␤514229␤832040␤1346269␤2178309␤3524578␤5702887␤9227465␤14930352␤24157817␤39088169␤63245986␤102334155␤165580141␤267914296␤433494437␤701408733… 15:36
dalek ast: 875886c | moritz++ | S03-metaops/cross.t:
test for RT #74072, [] should not flatten in cross meta op
TimToady nom: say [1,2] Z~ <a b> 15:37
p6eval nom 5a3836: OUTPUT«1a 2b␤»
TimToady moritz: same issue
GlitchMr niecza: say (0..Inf)[Inf]
p6eval niecza v10-18-g5be99bf: OUTPUT«0␤»
masak huh. 15:38
GlitchMr rakudo: say (0..Inf)[Inf]
p6eval rakudo 5a3836: OUTPUT«Nil␤»
GlitchMr Kind of makes sense
masak huh huh.
GlitchMr nom: say (0..Inf)[Inf]
p6eval nom 5a3836: OUTPUT«Nil␤»
GlitchMr 000000000000000000000000000
TimToady perl6: say (0 ... Inf)[Inf]
p6eval pugs: OUTPUT«*** ␤ Unexpected "Inf"␤ expecting operator or ")"␤ at /tmp/HYJWeilZ8w line 1, column 12␤»
..rakudo 5a3836: OUTPUT«Nil␤»
..niecza v10-18-g5be99bf: OUTPUT«0␤»
TimToady perl6: say (0 ... *)[Inf] 15:39
p6eval pugs: OUTPUT«*** ␤ Unexpected "["␤ at /tmp/r8BW1WnibA line 1, column 14␤»
..rakudo 5a3836: OUTPUT«Nil␤»
..niecza v10-18-g5be99bf: OUTPUT«0␤»
TimToady pugs: say (0 .. *)[Inf]
p6eval pugs: OUTPUT«0␤»
TimToady huh 15:40
perl6: say Inf.Int
p6eval niecza v10-18-g5be99bf: OUTPUT«1797693134862315907729305190789024733617976978942306572734300811577326758055009631327084773224075360211201138798713933576587897688144166224928474306394741243777678934248654852763022196012460941194530829520850057688381506823424628814739131105408272371633505…
..pugs: OUTPUT«*** No such method in class Num: "&Int"␤ at /tmp/xBQ8qjupNm line 1, column 5 - line 2, column 1␤»
..rakudo 5a3836: OUTPUT«-9223372036854775808␤»
TimToady 'course, Int is specced to support Inf directly... 15:41
dalek ast: 82eb8fc | moritz++ | S14-roles/composition.t:
subs from the setting should be available in methods composed from a role (RT #74078)
TimToady but it's supposed to be out of band, not MAXINT
moritz TimToady: does Int also support NaN?
TimToady wouldn't it have to be NaI :P 15:42
15:42 tokuhiro_ joined
moritz masak: you'll be happy to hear that rt.perl.org/rt3/Ticket/Display.html?id=74078 is now resolved 15:42
masak looks
indeed. \o/ 15:43
TimToady I don't know that Int needs NaN too badly, but that could just be ignorance
dalek ecza: d2c05c8 | mberends++ | examples/notepad.pl:
[examples/notepad.pl] small GUI text editor on Windows.Forms, not Gtk
moritz down to 783 open rakudo tickets
masak TimToady: Int not having NaN would resolve a lot of questions and simplify the design in places. 15:44
TimToady: but it feels easier to say that Int doesn't have NaN than to say that it doesn't have Inf... :/
TimToady I'm probably fine with that
masak perl6: say Inf ~~ Num; say Inf ~~ Int 15:45
p6eval rakudo 5a3836, niecza v10-18-g5be99bf: OUTPUT«Bool::True␤Bool::False␤»
..pugs: OUTPUT«1␤␤»
masak yeah.
that's the basic problem.
moritz rakudo: sub foo(%hash? is copy) {}; foo 15:46
p6eval rakudo 5a3836: ( no output )
TimToady well, the basic problem is that infinity is more of a concept than a value, so arguably is more like a junction than an Any
dalek ast: 4a42b2e | moritz++ | S06-traits/is-copy.t:
test "is copy" on an optional hash parameter, RT #74454
15:49
moritz class A { say (method foo { 23 }).WHAT };
rakudo: class A { say (method foo { 23 }).WHAT };
p6eval rakudo 5a3836: OUTPUT«Method()␤»
moritz \o/
another closable ticket... after tests 15:50
masak \o/
suddenly there seems to be a lot of interest in decreasing the RT count. guess it has something to do with this nom thing people keep talking about. 15:51
TimToady perl6: say <arrays are <nice forever>>.perl 15:53
p6eval rakudo 5a3836: OUTPUT«Bool::True␤»
..pugs, niecza v10-18-g5be99bf: OUTPUT«("arrays", "are", "<nice", "forever>")␤»
TimToady that one's a rakudobug
masak oh! 15:54
masak submits it
TimToady brackets are always supposed to count depth 15:55
even when it makes little sense, like here :)
otoh
perl6: say <My <em> tag is awesome.>.perl 15:56
p6eval rakudo 5a3836: OUTPUT«===SORRY!===␤Confused at line 1, near "say <My <e"␤»
..pugs, niecza v10-18-g5be99bf: OUTPUT«("My", "<em>", "tag", "is", "awesome.")␤»
masak right. that's another symptom of the same bug. 15:57
jnthn rakudo: class A { say (method foo { 23 }).WHAT }; say A.foo # checking 15:59
p6eval rakudo 5a3836: OUTPUT«Method()␤23␤»
jnthn \o/
TimToady yay!
jnthn Well, the current meta-object is just in a contextual in nom. 16:02
And method installation is totally orthogonal to lexical installation.
masak I... I should hope so! :P 16:03
jnthn Well, aside from the method being lexically inside a class body ;)
TimToady me likes orthogonal declarators, even if they're not orthodox :) 16:04
er, /me
:)
jnthn oh wow, we got below 800 tickets?! 16:05
masak and decreasing!
jnthn moritz++, [Coke]++, tadzik++, (whoever else helped)++
TimToady we're trying to fix that
jnthn :P
masak yeah, this is a worrying trend. 16:06
jnthn You know, there used to be a time when the RT queue was small enough that I could keep it in my head. :P
masak how small are we talking about here? :P
mberends jnthn: you were probably more bigheaded then :) 16:07
masak : insulting compiler implementors since 2008 :P
jnthn I think I started struggling beyond the 150 tickets point, and when it broke 250 it just got too much for that :P
ingy hi TimToady
jnthn I used to review the whole queue each Rakudo day back then, and it didn't take crazily long :)
masak jnthn: meanwhile, the rest of us tend to be able to keep ~7 things in our head without overflow :P
jnthn masak: I think my brane worked better back then. Or, well, differently at least. :P 16:08
masak heh :)
TimToady it can be proven from the bug count trajectory that your brane was better at adding bugs back then than at removing them :P 16:09
so I like this brane better 16:10
jnthn :P
Let's try and keep it going down, even if masak++ has other plans :P 16:11
ingy TimToady: I was just wondering if you saw my msgs. No hurry for an answer.
TimToady yes, still thinking, vaguely
that sort of thing has to stew in the backbrane
jnthn phenny: tell mls_ the use of the "inline" keyword in src/runcore/subprof.c (I think this is your thingy, sorry if not) makes me compiler cry very loudly and refuse to build Parrot. Just removing it fixed things, but probably there's a better way. 16:12
phenny jnthn: I'll pass that on when mls_ is around.
ingy TimToady: OK. I have this working in pegex.pgx: grammar: <rule_definition>+ %%% .<comment>* 16:13
that's my basic use case
ingy goes off to add %grammar and %extends declarations to pegex 16:14
TimToady most languages don't count comments as separators, but as whitespace
dalek kudo/nom: 464fb9f | jnthn++ | src/Perl6/Actions.pm:
Complain about declaration of placeholders in the mainline.
jnthn ^^ patches RT#75844; tagged it testneeded.
ingy TimToady: in a general sense ws is a separator :) 16:16
ws* thing ws* [thing | ws*]* => thing %%% ws* 16:17
anymo... 16:18
16:19 cooper left, cooper joined, daniel-s left 16:39 pmurias joined 16:40 wamba joined 16:45 whiteknight joined 16:47 gbacon joined
masak this may interest some: www.r-bloggers.com/hipster-programm...languages/ 16:49
TimToady moritz: === is supposed to autothread; junctions must test identity some other way 16:51
or only use === on non-junctions
S03:1273 16:52
this is in regard to github.com/perl6/roast/commit/8e96ed19b8 16:53
moritz TimToady: somehow I remember it just the other way round 17:01
hanekomu masak: "hipster" is a good word for that. i had called them "brogramming languages"
masak heh :) 17:02
moritz rakudo: use MONKEY_TYPING; class A {}; class B { }; augment class B is A { }; 17:05
p6eval rakudo 464fb9: OUTPUT«===SORRY!===␤Parents cannot be added to a class after it has been composed␤»
moritz rakudo: class A { method foo(A :$a) { say $a.WHAT } }; A.new.foo 17:06
p6eval rakudo 464fb9: OUTPUT«A()␤»
moritz rakudo: class A { method foo(A :$a = 3) { say $a.WHAT } }; A.new.foo 17:07
p6eval rakudo 464fb9: OUTPUT«Int()␤»
moritz meh
rakudo: class A {}; class B { has A $.foo .= new } 17:08
p6eval rakudo 464fb9: OUTPUT«Use of uninitialized value in string context␤Use of uninitialized value in string context␤===SORRY!===␤error:imcc:syntax error, unexpected DOT ('.')␤ in file '(file unknown)' line 243␤␤»
17:08 localhost left 17:09 localhost joined
pmurias sorear: hi 17:10
GlitchMr niecza: say 0/0
p6eval niecza v10-19-gd2c05c8: OUTPUT«0/1␤»
GlitchMr rakudo: say 0/0
p6eval rakudo 464fb9: OUTPUT«Divide by zero␤ in sub infix:<div> at src/gen/CORE.setting:2279␤ in method new at src/gen/CORE.setting:5378␤ in sub infix:</> at src/gen/CORE.setting:5472␤ in block <anon> at /tmp/eT3PCNRnpN:1␤ in <anon> at /tmp/eT3PCNRnpN:1␤␤»
GlitchMr ^ 0/1... why? 17:11
0/0 != 0/1...
0/1 is 0...
But not 0/0
dalek ast: 7b0b34d | moritz++ | S12-methods/instance.t:
tests for RT #74490, return value of named method declarations
17:14
17:15 cognominal_ joined, cognominal left 17:16 am0c left 17:17 MayDaniel joined
pmurias sorear: i get System.DllNotFoundException: /home/pawel/new_order/niecza/obj/p5embed.so but the file exists 17:18
masak GlitchMr: it's a nieczabug.
GlitchMr niecza: <<<EOF 17:20
p6eval niecza v10-19-gd2c05c8: OUTPUT«␤Unhandled Exception: System.IndexOutOfRangeException: Array index is out of range.␤ at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤ at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename un…
sorear good * #perl6 17:25
pmurias sorear: hello 17:27
sorear: found the source of the System.DllNotFoundException
sorear: a typo
sorear: plus C treating it as an implicitly defined function
jnthn moritz: re "Parents cannot be added to a class after it has been composed", I consider that the way standard Perl 6 classes work. If people want that they can write a custom meta-object that supports it. 17:29
jnthn ain't so into kitchen sinks that sink optimizability :) 17:31
moritz: The default-not-typechecked thing is certainly a bug. Will investigate that one. 17:32
17:32 donri joined
GlitchMr If I see "Unhandled Exception" it's bug in niecza, right? 17:33
It sometimes happen with invalid syntax and those exceptions aren't helpful...
pmurias jnthn: that seems inconsitent with being able to add methods at runtime
jnthn pmurias: It's not at all.
pmurias: They have very different consequences.
pmurias jnthn: what are the serious inconsequences of adding parents? 17:35
jnthn pmurias: They may want to bring in other attributes, which is a problem if you want to settle on a particular layout for objects.
pmurias: If you have a "we store attributes in a HoH" view of the world it's not a problem. But P6opaque doesn't work like that.
I guess we could say "it's OK provided the parents don't bring in more attributes". 17:36
I'm not sure it's worth the complexity though.
pmurias do we expose the way P6opaque is implemented somewhere 17:37
?
jnthn pmurias: "expose" in what sense? 17:38
Different representations all implement the representation API, but they can all make different trade-offs. That's kinda the point. 17:39
pmurias that settling on a particular layout is a part of the language model rather then an implementation feature
jnthn Well, I don't think the spec has to - or should - commit to a layout.
It should probably make it so the expectations on the default ClassHOW and its default representation allow for something fairly efficient though. 17:40
(Efficient in the common cases, that is.)
pmurias from an implementors world view i fully understand why you (and me) want to settle on a layout
jnthn Well, we can't box things in too much on layout.
pmurias but if an user is doing monkey patching he may want to add an attribute
we could put the extra one in a HoH ;) 17:41
jnthn Then the user will get the error, google it, and see the answer: "use Meta::Class::VeryCustomizableAlways;" :)
pmurias: I pondered doing that, but it's another pointer on every object. :( 17:42
Which adds up.
pmurias not nessesarly
we would use to object as a key of an extra attributes hash
slow but it's an optional feature for hardcore monkey patching 17:43
jnthn True, but that has GC implications.
Well, if people want hardcore monkey patching, I think that's something we can fairly say falls into the scope of a module.
What the default ClassHOW says is a set of defaults ideal for the common case, not something that sets the limits on what is possible. 17:44
GlitchMr niecza: print 'a'=='b'
p6eval niecza v10-19-gd2c05c8: OUTPUT«␤Unhandled Exception: System.FormatException: Unknown char: a␤ at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0 ␤ at System.Double.Parse (System.String s, IFormatProvider provider) […
pmurias the whole you can't add an attribute at runtime restriction seems arbitary
GlitchMr rakudo: print 'a'=='b'
p6eval rakudo 464fb9: OUTPUT«True»
GlitchMr ...?
oh right 17:45
It's eq
Or ===
17:45 cooper left, cooper joined 17:46 am0c^ joined
pmurias jnthn: as stopping people from adding methods would help as a lot too 17:46
s/as/us/ 17:50
jnthn: and the GC implications would be solved by cleaning the class modifing the destructor to clean up hash keys 17:51
tadzik moritz: oh wow, it's all failures indeed! 17:53
get_pointer() not implemented in class 'whatever' 17:54
dalek ecza: 18b719f | (Paweł Murias)++ | / (3 files):
Perl5 integers are converted rather than wrapped.
pmurias jnthn: you could put a NYI exception for adding attributes after class composition for now 17:55
GlitchMr rakudo: my $a=0; my $b=0; $a---$b; say $a; say $b 18:01
p6eval rakudo 464fb9: OUTPUT«-1␤0␤»
GlitchMr niecza: my $a=0; my $b=0; $a---$b; say $a; say $b
p6eval niecza v10-19-gd2c05c8: OUTPUT«-1␤0␤»
18:01 soh_cah_toa joined
jnthn pmurias: Why would I make it say "NYI" when I currently have no intention of implementing it? 18:01
tadzik: ouch, I get that here too :( 18:03
tadzik: Was that the Parrot/NQP revision bump?
bbs, cooking 18:04
sorear today's alarming comment: codepeek.com/paste/4e87560ba86b48752731a900
jnthn <@Nicholas> Rakudo also failed to release in September
wtf...a release went out yesterday.
18:05 sunnavy left 18:06 sivoais left
soh_cah_toa jnthn: there was? how come there's nothing about it on rakudo.org? 18:06
18:08 sivoais joined
moritz soh_cah_toa: rakudo.org only announce star releases these days 18:09
soh_cah_toa oh
TimToady maybe that's what the comment was really about
moritz soh_cah_toa: tadzik++ sent out an email to [email@hidden.address]
but I didn't receive it so far :(
tadzik: care to re-send?
oh, it's there 18:10
www.nntp.perl.org/group/perl.perl6....g7492.html
soh_cah_toa installing now. is there still the kill-useless-defaults issue w/ nqp?
bleh, looks like yes
TimToady I got it here 18:11
soh_cah_toa TimToady: what do you mean? you got it to install or you got the nqp error?
GlitchMr I'm going to install VirtualBox. It will probably disconnect me... :(
pmurias jnthn: i was assumping you want it to throw an exception saying it's illegal
GlitchMr I don't care... 18:12
TimToady I got the announcement here
soh_cah_toa ah
pmurias jnthn: "Adding attributes after class composition is illegal as it would hurt performance" ;) style one
18:13 GlitchMr42 joined
jnthn pmurias: I thought it already did. 18:13
18:13 sunnavy joined, GlitchMr left, GlitchMr42 is now known as GlitchMr
moritz nom: class A { }; use MONKEY_TYPING; augment class A { has $.foo }; 18:14
p6eval nom 464fb9: ( no output )
moritz nom: class A { }; use MONKEY_TYPING; augment class A { has $.foo }; say A.new(foo => 1).foo
p6eval nom 464fb9: OUTPUT«1␤»
jnthn Hm.
sorear who's replying to Klāvs? 18:15
TimToady is that the same person we sent to #perl earlier?
jnthn really afk cooking
sorear TimToady: I wasn't paying attention?
moritz rakudo: my $a = 1..10; for $^a { .say }
p6eval rakudo 464fb9: OUTPUT«===SORRY!===␤Cannot declare placeholder parameter $^a in the mainline at line 1, near " { .say }"␤»
sorear s/\?/./
TimToady irclog.perlgeek.de/perl6/2011-10-01#i_4507341 18:16
sorear sounds like
TimToady wonders if he was really asking about Perl 6? 18:17
probably not... 18:18
pmurias sorear: how should SVany.InvokeMethod return a value? 18:19
18:20 robinsmidsrod left
dalek ast: 584c1a8 | moritz++ | S06-traits/is-copy.t:
test for RT #75302
18:21
moritz rakudo: enum somenum <a b c d e>; my somenum $temp = 3 18:23
p6eval rakudo 464fb9: OUTPUT«Type check failed in assignment to '$temp'; expected 'somenum' but got 'Int'␤ in block <anon> at /tmp/J9YxQ5xcIy:1␤ in <anon> at /tmp/J9YxQ5xcIy:1␤␤»
moritz is that correct?
masak I'd like to talk with @Nicholas to know what he meant...
I think the bigger thing he's wrong on is the "Perl 6 will be Niecza". 18:25
moritz rakudo: subset A of Hash; sub foo(A $x) {}; foo {}
p6eval rakudo 464fb9: ( no output )
moritz masak: then do, he's on irc.perl.org
masak ok.
but I really need to make noms first...
moritz rakudo: role R {}; subset S of R; 1 ~~ S
p6eval rakudo 464fb9: ( no output )
masak did someone already point out to him that Rakudo had a release in September? 18:26
moritz I don't think so
I just tweeted about it
18:28 kaare_ left
masak there. message sent, and seemingly landed well. 18:30
18:31 robinsmidsrod joined
GlitchMr rakudo: my $z=2;sub z{3}say $z-z 18:32
p6eval rakudo 464fb9: OUTPUT«===SORRY!===␤Confused at line 1, near "sub z{3}sa"␤»
GlitchMr rakudo: my $z=2;sub z{3} say $z-z
p6eval rakudo 464fb9: OUTPUT«===SORRY!===␤Confused at line 1, near "sub z{3} s"␤»
sorear masak: this was on #p5p, btw.
GlitchMr rakudo: my $z=2;sub z{3} 18:33
p6eval rakudo 464fb9: ( no output )
GlitchMr rakudo: my $z=2;sub z{3}; say $z-z
p6eval rakudo 464fb9: OUTPUT«===SORRY!===␤Symbol '$z-z' not predeclared in <anonymous> (/tmp/wlaO27wlOB:1)␤»
masak sorear: ok. I privmsg'd. didn't want to face a hoard.
GlitchMr $z-z O_o
I wanted to substract $z by function z()...
rakudo: my $z=2;sub z{3}; say $z-z()
p6eval rakudo 464fb9: OUTPUT«===SORRY!===␤Symbol '$z-z' not predeclared in <anonymous> (/tmp/YjjYRhll8d:1)␤»
GlitchMr Yeah, sure it's fun
rakudo: my $z=2;sub z{3}; say $z - z()
p6eval rakudo 464fb9: OUTPUT«-1␤»
masak er, horde* 18:35
moritz rakudo: nqp::where(1)
p6eval rakudo 464fb9: OUTPUT«get_pointer() not implemented in class 'Int'␤ in block <anon> at /tmp/DWBKx07Pew:1␤ in <anon> at /tmp/DWBKx07Pew:1␤␤»
GlitchMr rakudo: my $text; $text ~= ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10 18:36
p6eval rakudo 464fb9: ( no output )
GlitchMr oh right
rakudo: my $text; $text ~= ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10; print $text
p6eval rakudo 464fb9: OUTPUT«rkiFbADC87»
GlitchMr rakudo: my $text; $text ~= ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10; print $text 18:38
p6eval rakudo 464fb9: OUTPUT«i3xQxQyPPp»
GlitchMr rakudo: {my $text; $text ~= ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10; say $text} for 1..10
ok, I think that's abuse of Perl 18:39
p6eval rakudo 464fb9: OUTPUT«(timeout)RmUAFkjAkj␤g3bbnALnbn␤sXDwHwPe17␤NRRV8r0I9E␤xUVDatq8XO␤J78AX3007I␤V3gM7DYyoz␤»
GlitchMr But it seems to work
But why it's so slow?
18:40 tokuhiro_ left
GlitchMr I can only count 7 random words when I've expected 10... 18:40
It's slow even on my PC...
niecza: {my $text; $text ~= ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10; say $text} for 1..10
p6eval niecza v10-20-g18b719f: ( no output )
moritz tadzik: I think I found the problem 18:41
GlitchMr niecza doesn't even seem to recognize .roll...
moritz tadzik: testing a fill
GlitchMr And rakudo is extremally slow with my pretty simple code...
Is random generator so slow or what?
I ran similar code in PHP without problems. 18:42
18:42 envi left
masak niecza: say ('a'..'z', 'A'..'Z', '0'..'9').roll(10).join for ^10 18:45
p6eval niecza v10-20-g18b719f: OUTPUT«␤Unhandled Exception: Unable to resolve method roll in class Parcel␤ at /tmp/LJwdxGj8_h line 1 (MAIN mainline @ 6) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2115 (CORE C1022_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2116 (CORE module…
masak huh!
sorear: ^^
nom: say ('a'..'z', 'A'..'Z', '0'..'9').roll(10).join for ^10
p6eval nom 464fb9: OUTPUT«ZwG3aRHL6Q␤wVtXZsgH9n␤p1ilPrkBJj␤U8PO2pLlR5␤sukIJVPOUg␤cGIqz96EDs␤u3wk7UWdHd␤FoV0llpOhu␤UypwAtLVCr␤Fvw5Ak2t2E␤»
TimToady doen't do roll/pick yet
masak that feels like a *big* missing feature :) 18:46
GlitchMr There is shortcut for that!
EVEN BETTER :).
TimToady note that ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10 has to rebuild the list every time through the loop
well, unless the optimizer notices that it can constant fold it 18:47
but none of the implementations are good at constant folding yet
it's funny, because constant folding is one of the most useful optimizations, but people seem to avoid doing it for some reason 18:49
GlitchMr It reminds me what I was doing to generate random strings in PHP 18:50
$return='';for ($i=0;$i<7;$i++){$return.=chr(rand(97,122));} 18:51
It would be even more complex if I would include uppercase letters and numbers...
And there is no useful .. operator. 18:52
masak TimToady: I'd definitely expect a constant list (Parcel, whatEVER) to be within the reach of an optimizer. 18:56
it's like with error messages: to a first approximation, everything that can be done at compile time, should be. :) 18:57
TimToady I'd expect that transitively through any idempotent functions
masak aye.
18:58 Chat6408 joined
masak well, at least the CORE idempotent ones ;) 18:58
Chat6408 hi ppl
TimToady what is this CORE of which you speak?
Chat6408: note: this room is only about the development of the Perl 6 programming language; general discussion is off topic 18:59
Chat6408 4any 1 from ireland here ?
GlitchMr Chat6408, ...? 19:00
TimToady Chat6408: you're welcome here, but only if you want to talk about Perl 6.
Chat6408 4what?
4whats perl 6 lol 19:01
TimToady a cool new programming language
19:01 Chat6408 left
eiro masak, still running yarn ? 19:01
GlitchMr ...
"whats perl 6 lol"
lol
pmurias sorear: do we want to convert perl5 strings or wrap them? 19:02
TimToady perl6: say lol(1,2 Z <a b>).perl
p6eval niecza v10-20-g18b719f: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'lol' used at line 1␤␤␤Unhandled Exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) ␤ …
..pugs: OUTPUT«*** ␤ Unexpected "Z"␤ expecting operator, ":" or ")"␤ at /tmp/N2nDZVEZZt line 1, column 13␤»
..rakudo 464fb9: OUTPUT«Could not find sub &lol␤ in block <anon> at /tmp/RsvITZgGRv:1␤ in <anon> at /tmp/RsvITZgGRv:1␤␤»
TimToady lol is another of those things nobody seems to want to implement...
jnthn nom: sub foo(**@a) { say @a.WHAT }; foo() 19:03
p6eval nom 464fb9: OUTPUT«LoL()␤» 19:04
TimToady masak: if the mechanism by which CORE functions are determined to be idempotent is not general enough to apply to user-defined functions as well, something is terribly wrong
GlitchMr LoL???
What it is lol?
jnthn List of List.
GlitchMr lol
dalek p: a31d3f0 | moritz++ | src/PAST/NQP.pir:
generate get_id instead of get_addr
jnthn Guess we only go so far with it in Rakudo.
TimToady nom: sub foo(**@a) { say @a.perl }; foo 1,2 Z <a b>; 19:05
p6eval nom 464fb9: OUTPUT«LoL.new(((1, "a"), (2, "b")).list.item)␤»
TimToady o_O
sorear pmurias: I say convert 'em 19:08
jnthn TimToady: What exactly is o_O? It looks to have preserved the structure...
(Disclaimer: I haven't looked at or tried to understand what pmichaud++ did so far with LoL at all...)
19:10 MayDaniel left
sorear constant folding is something we really should only do for returning immutable values 19:10
GlitchMr ('a'..'z', 'A'..'Z', '0'..'9').roll for 1..10
It seems to fit in this case...
dalek kudo/nom: 2772e64 | jnthn++ | src/binder/bind.c:
Make sure we type check default values. Note that we should really promote the one for literals to compile time.
19:11
pmurias sorear: ok
jnthn moritz: ^^ is fix for bug you showed earlier 19:12
moritz jnthn: great, I just dug up the ticket for it
dalek ecza: f20f832 | (Paweł Murias)++ | / (3 files):
Perl5 NV values are converted.
19:13
ast: 9e7fb12 | moritz++ | S (3 files):
test type checking of default values, RT #74758
19:15
moritz rakudo: class Foo { has $.bar = "baz"; submethod BUILD{}}; say Foo.new.bar 19:17
p6eval rakudo 464fb9: OUTPUT«baz␤»
19:17 GlitchMr left
[Coke] jnthn: closed. 19:18
phenny [Coke]: 12:34Z <jnthn> tell [Coke] It appears that the issue being discussed was resolved a different way (required named parameters). And I know that works (we use it in the setting, for one). Overall, traits are much more robust in nom, so I think we can safely close that one.
jnthn wtf, string range generation is RIDICULOUSLY slow
I can probably do a shot of vodka faster than it can generate 'A'..'Z'. 19:19
[Coke] rakudo: say 320+449+5
p6eval rakudo 464fb9: OUTPUT«774␤»
TimToady sorear: we were also postulating constant arguments to our idempotent functions
dalek ast: 0dc03f4 | moritz++ | S12-attributes/instance.t:
BUILD should not prevent initialization of attributes it did not mention
moritz nom: my $t = now; ('a'..'z').list; say now - $t
p6eval nom 464fb9: OUTPUT«0.0232224514998836␤»
moritz nom: my $t = now; ('A'..'Z').list; say now - $t
p6eval nom 464fb9: OUTPUT«0.0191129559046429␤»
TimToady nom: my $t = now; say now - $t 19:20
p6eval nom 464fb9: OUTPUT«0.0169231936854888␤»
jnthn nom: my $t = now; ('a'..'z', 'A'..'Z', '0'..'9').list; say now - $t
p6eval nom 464fb9: OUTPUT«0.0204615304019837␤»
moritz less then 0.1s for a shot of vodka? not bad
jnthn ...ok, maybe we need for for 1..0 for me to do the vodka :)
moritz: I trained in Russia :P
er, for 1..10
jnthn checks if the C profiler shows up anything obvious 19:21
ah, curious... 19:22
nom: say 'abcd'.index('c') 19:23
p6eval nom 464fb9: OUTPUT«2␤» 19:24
jnthn nom: say 'abcd'.index('c').WHAT
p6eval nom 464fb9: OUTPUT«Int()␤»
jnthn nom: say 'abcd'.index('e').WHAT
masak and Nicholas have a useful privmsg exchange
p6eval nom 464fb9: OUTPUT«Str()␤»
jnthn nom: say 'abcd'.index('e')
p6eval nom 464fb9: OUTPUT«Str()␤»
dalek ecza: c43c708 | (Paweł Murias)++ | / (3 files):
Convert perl 5 string in an extremely naive fashion ignoring utf and null bytes.
sorear masak: yay. Anything worth sharing?
19:24 risou is now known as risou_awy
dalek ast: ac23be8 | moritz++ | S12-subset/subtypes.t:
fix a syntax error
19:25
masak sorear: Nicholas got the p6c announcement today in the afternoon. some moderator delay going on.
so it was more of a misunderstanding due to relativistic time frames than anything else :)
sorear I wonder how hard it would be to add times to nom. 19:26
pmurias sorear: should i put failing tests in niecza/t/? 19:27
moritz sorear: times() as in system/user time reporting?
sorear moritz: yes
pmurias: sure
moritz rakudo: ␤our sub xyz($x) { say $x }␤␤+ xyz 3 19:28
p6eval rakudo 464fb9: OUTPUT«3␤No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu, Mu %_)␤␤ in method Numeric at src/gen/CORE.setting:607␤ in sub infix:<+> at src/gen/CORE.setting:1945␤ in block <anon> at /tmp/fIwsXES7pW:3␤ in <anon> at /tmp/fIwsXES…
moritz rakudo: say +True
p6eval rakudo 464fb9: OUTPUT«1␤»
moritz rt.perl.org/rt3/Ticket/Display.html?id=75710 seems to be fixed -- correct? 19:29
pmurias sorear: or should i put them in a t/todo/ or something so we can test that everything still works?
jnthn moritz: Did the nqp patch fix the Rakudo spectests? 19:30
moritz jnthn: yes
19:31 kmwallio joined
jnthn moritz: OK...you plan to bump NQP_REVISION, or shall I? 19:31
moritz jnthn: sorry, I thought I did...
pushing now
jnthn moritz: ah, thanks :)
dalek kudo/nom: d655c14 | moritz++ | tools/build/NQP_REVISION:
bump NQP_REVISION to something not so broken
19:32
moritz nom: given 1 { say "yes" when 1 } 19:34
p6eval nom 464fb9: OUTPUT«yes␤»
dalek ast: 27a2b93 | moritz++ | S04-statements/given.t:
test statement-modifying "when"
19:37
ecza: 50e0320 | (Paweł Murias)++ | t/p5/strings.t:
Test for p5 string conversion - partly failing
19:38
moritz rakudo: my @s = ($_ * 2 if $_ ** 2 > 3 for 0 .. 99); say @s.perl
p6eval rakudo 464fb9: OUTPUT«Array.new(4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 1…
soh_cah_toa does anybody recognize this error: Method 'STORE' not found for invocant of class 'Any'
i don't know what it means and i keep getting it whenever i 'use IRC::Utils' aftering installing 2011.09
pmurias sorear: i'm not sure how can i return values from InvokeMethod should i set the resultSlot on the caller Frame? 19:39
masak soh_cah_toa: probably something to do with array or hash indexing. 19:40
sorear pmurias: yes
pmurias: er, yes to "resultSlot"
pmurias: we don't currently have a unified approach to t/ tests
soh_cah_toa masak: hm, ok. it's weird though that it happens just by upgrading to 2011.09 even though i didn't change anything in the module
moritz soh_cah_toa: do you have any precompiled PIR files somewhere? 19:43
like in your ~/.perl6/lib or in the working dir
soh_cah_toa moritz: no, but i'll double check
jnthn moritz: Do you understand the Str.succ/Str.pred implementation?
flussence sorear: when I run code that contains NEXT, it gives me that exception as expected but there's also something that looks completely unrelated about statement_level
jnthn moritz: I'm finding it a tad confusing...
flussence (gist.github.com/1256552) 19:44
soh_cah_toa no pir files :\
jnthn hmm...it was written by pmichaud. 19:45
19:45 espadrine left
moritz jnthn: no 19:45
19:46 icwiener joined
jnthn oh, I guess RANGEPOS is looking for "where in the string is there a range"... 19:46
masak soh_cah_toa: please try to isolate and golf the error. this sounds interesting. 19:50
soh_cah_toa masak: yeah, i know. i have no idea what to do though. there error message doesn't give any clue as to where the problem is 19:51
jnthn soh_cah_toa: Try running with --ll-exception, it should dump a more informative backtrace.
soh_cah_toa sure
masak usually does A-B debugging at this point 19:53
soh_cah_toa nopaste.snit.ch/83649 19:54
though much of that doesn't mean much to me :\
pmurias sorear: what should be the default context for p5 subs? list or scalar? 19:58
moritz rakudo: my ($found) = grep 1, 1..1_000_000; say 'alive' 20:01
p6eval rakudo d655c1: OUTPUT«alive␤»
jnthn rakudo: my ($found) = grep 1, 1..1_000_000; say $found
p6eval rakudo d655c1: OUTPUT«1␤»
masak superstitious parens again :) 20:02
but I guess it's from an RT ticket.
oh wait.
moritz no, it's find
*fine
for list assignment
masak aye.
moritz RT #75950, to be specific
rakudo: my ($found) = grep 1, 1..1_000_000; say 'alive'; say $x; say 'alive 2' 20:03
p6eval rakudo d655c1: OUTPUT«===SORRY!===␤Symbol '$x' not predeclared in <anonymous> (/tmp/JUn0XNm32y:1)␤»
moritz rakudo: my ($found) = grep 1, 1..1_000_000; say 'alive'; say $found; say 'alive 2'
p6eval rakudo d655c1: OUTPUT«alive␤1␤alive 2␤»
moritz wow, the test hangs
nom: use Test; my $x; lives_ok { ($x) = grep 5, 1..1_000_000 }; is $x, 5, 'correct result'; 20:04
p6eval nom d655c1: OUTPUT«(timeout)ok 1 - ␤»
moritz nom: use Test; my $x; lives_ok { ($x) = grep 1, 1..1_000_000 }; is $x, 5, 'correct result';
p6eval nom d655c1: OUTPUT«(timeout)ok 1 - ␤»
moritz nom: use Test; my ($x) = grep 5, 1..1_000_000 is $x, 5, 'correct result'; 20:05
p6eval nom d655c1: OUTPUT«===SORRY!===␤Confused at line 1, near "my ($x) ="␤»
moritz nom: use Test; my ($x) = grep 5, 1..1_000_000; is $x, 5, 'correct result';
p6eval nom d655c1: OUTPUT«ok 1 - correct result␤»
moritz nom: use Test; my $x; ($x) = grep 5, 1..1_000_000; is $x, 5, 'correct result';
p6eval nom d655c1: OUTPUT«(timeout)»
moritz nom: use Test; my $x; ($x,) = grep 5, 1..1_000_000; is $x, 5, 'correct result';
p6eval nom d655c1: OUTPUT«ok 1 - correct result␤» 20:06
moritz hm, I wonder if that's correct
after all it's the comma that makes the list, not the parens
jnthn Remember that in my (...) it's parsed with <signature> 20:07
Not jsut as a normal list. 20:08
dalek ast: 2512522 | moritz++ | S03-operators/assign.t:
unfudge and correct tests for RT #75950
tadzik is back there 20:09
moritz tadzik: I've fixed the fallout from the merge
tadzik moritz++, great 20:10
I see, I should have paid more attention to this conflict 20:11
jnthn I think we still have the issue in a couple of places, but I'll look at that later.
Hunting some performance bugs at the moment. 20:12
dalek ast: e0d5199 | moritz++ | S12-class/augment-supersede.t:
Hash should be augmentable
moritz fwiw I'm closing several of the parrot-type-leak-through tickets without tests 20:17
jnthn moritz: Makes sense.
moritz because they clutter the test suite, and it simply doesn't happen accidentally anymore in nom
rakudo: my $h = {}; say (%$h).keys 20:19
p6eval rakudo d655c1: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 1, near "%$h).keys"␤»
moritz jnthn: the %$foo syntax would be a big win, and might not be too hard to implement for you
(short for @($foo))
jnthn I hope %$foo ain't short for @($foo) :P
moritz erm, modulo fright sigils, of course 20:21
*right 20:22
moritz can't type anymore
20:23 sirmacik joined
moritz std: defined() 20:24
p6eval std 8b331d2: OUTPUT«ok 00:01 118m␤»
moritz rakudo: multi f(@a) { }; multi f(*@a) { }; f(my @a = (1, 2, 3)) 20:26
p6eval rakudo d655c1: ( no output )
moritz nom: my $i = 'e'; say so 'E' ~~ /:i $i/ 20:29
p6eval nom d655c1: OUTPUT«Bool::False␤»
[Coke] rakudo: say 320+438+5 20:33
p6eval rakudo d655c1: OUTPUT«763␤»
[Coke] wow, it's dropped since I started reviewing. 20:34
jnthn Whoa.
im2ee re :)
moritz [Coke]: I've been doing lots of RT work in the last few hours
[Coke] moritz++; # I'll take the next shift. ;) 20:35
moritz :-)
[Coke] there's still 38 waiting on tests. (some of those might not even need tests.) 20:36
[Coke] zzz
tadzik I'll look through them 20:37
nom: sub s($i is copy) { my @array; for 1..3 { @array.push($i); my $i = 1 + $i; }; @array }; s(9).perl.say 20:43
p6eval nom d655c1: OUTPUT«Use of uninitialized value in numeric context␤Use of uninitialized value in numeric context␤Use of uninitialized value in numeric context␤Array.new(Any, Any, Any)␤»
tadzik I don't think that's really correct
jnthn tadzik: Should be compile time error.
tadzik jnthn: why so? 20:44
moritz std: sub s($i is copy) {my $i = $i }
p6eval std 8b331d2: OUTPUT«Potential difficulties:␤ Useless redeclaration of variable $i (see line 1) at /tmp/DzHr0lQRus line 1:␤------> sub s($i is copy) {my $i⏏ = $i }␤ok 00:01 124m␤»
jnthn std: sub s($i is copy) { my @array; for 1..3 { @array.push($i); my $i = 1 + $i; }; @array }; s(9).perl.say
p6eval std 8b331d2: OUTPUT«===SORRY!===␤Lexical symbol '$i' is already bound to an outer symbol (see line 1);␤ the implicit outer binding at line 1 must be rewritten as OUTER::<$i>␤ before you can unambiguously declare a new '$i' in this scope at /tmp/hnlZmmdofH line 1:␤---… 20:45
jnthn That's why.
tadzik then rt.perl.org/rt3/Public/Bug/Display...l?id=63596 is bogus 20:46
moritz tadzik: not bogus 20:47
tadzik: it shouldn't Null PMC Access
and I guess some of my analysis isn't write
but we still need to do the right thing
tadzik hm, how do we distinguish NPA from a compile-time error? 20:48
oh, NPA is runtime 20:49
dalek ast: af1e334 | moritz++ | S04-declarations/my.t:
test for RT #76452
tadzik still, I don't know how to tist it correctly
moritz eval_dies_ok used to fail if the error was a Null PMC access
we should add that back, I think
the test I just added is weird -- it seems to fail only in the eval_dies_ok 20:50
not when I run the same thing in the maingline
moritz -> sleep
jnthn night, moritz 20:51
masak night, moritz. dream of less than 700 open tickets. ;) 20:54
21:08 pmurias left
dalek kudo/nom: e32b7c2 | jnthn++ | src/core/List (2 files):
Couple of small optimizations in lists.
21:08
kudo/nom: 1c27dea | jnthn++ | src/Perl6/Metamodel/ (2 files):
Make boolification cheaper in cases where things don't override .Bool and instead just rely on the definedness check.
kudo/nom: c857a18 | jnthn++ | src/core/Parcel.pm:
Make parcel assignmnet a little cheaper.
im2ee good night moritz :) 21:13
hah, it was 20 minutes ago..
tadzik :) 21:15
21:23 bbkr joined
bbkr 763 tickets? everyone++ 21:26
21:26 wamba left
dalek kudo/nom: dd1307e | jnthn++ | src/core/Str.pm:
Optimize RANGEPOS a little, which improves Str.succ and Str.pred, though still not really enough.
21:32
21:34 icwiener_ joined 21:35 icwiener left 21:40 bbkr left
masak has someone responded to Klāvs on p6u yet? 21:43
it's been 8 hours. meybe he's switched to Python already. :)
21:51 Limbic_Region joined
masak re rt.perl.org/rt3/Ticket/Display.html?id=70297 -- the newline was only half of the request. the other half was that it print ^D (or ^C or ^Z as appropriate) when exiting interactive mode. 21:52
im2ee Have to go.. Good night ! :) 21:53
p/
o/
tadzik o/
masak o/
dobranoc! 21:54
im2ee :) 21:55
21:55 im2ee left 21:56 icwiener joined 21:57 icwiener_ left
masak I got a smile back this time \o/ 21:57
22:02 Reaganomicon joined 22:22 MayDaniel joined 22:30 espadrine joined
soh_cah_toa how do i make an object a singleton? i have something like: 22:39
22:39 hanekomu left
soh_cah_toa method new(Foo :$a, Bar :$b = Bar.new) { return self // $?CLASS::SUPER::new(:a($a), :b($b)) } 22:39
but i get the error message: Method 'postcircumfix:<( )>' not found for invocant of class 'Any'
22:40 [particle] joined
jnthn soh_cah_toa: Sounds right. 22:41
Is SUPER:: even spec any more?
soh_cah_toa: You're looking for callwith(:$a, :$b)
soh_cah_toa jnthn: return self // callwith(:$a, :$b) 22:42
like that?
22:42 [particle]1 left
dalek kudo/macros: ae1f0a3 | masak++ | / (5 files):
implemented quasi quotes and macros

This works:
  - Macro declarations
  - Calling a macro (using `macro()` and `macro` and operators)
  - Quasi quotes
22:42
masak people, I just pushed... what dalek++ said :)
tadzik ohohoho 22:43
masak tadzik: try something like this: 'macro foo($a, $b) { say "in macro $a"; quasi { "foo" } }; say "before"; say foo 1, 2; say "after"'
tadzik # Document it
<3
masak :) 22:44
it should output "before\nin macro AST<nnnnn>\nfoo\nafter\n".
tadzik what's "quasi"? 22:45
Tene masak: was it as straightforward as I thought it would be?
masak Tene: how should I know? :P
tadzik: it's a block of code that turns into an AST.
jnthn masak: I hope it says "in macro AST<nnnn>" before before, given it should happen at compile time...
masak jnthn: oh! yes. 22:46
my mistake.
tadzik I see
Tene masak: I thought we had discussed implementing that previously. Apparently not. :)
masak "in macro AST<nnnnn>\nbefore\nfoo\nafter"
jnthn masak: Mistake in what you said rather than mistake in implementing it at compile time, I hope :P
masak yes :)
jnthn phew
:)
dalek kudo/nom: f1eba49 | jnthn++ | src/ (2 files):
Add a couple of ops for checking if we have a VM list/hash.
22:47
kudo/nom: 27090e7 | jnthn++ | src/core/List.pm:
Make List.shift cheaper in the (common) case that we have an element. This in turn makes list assignment cheaper, wich does a gimme to ensure there is an element, followed by a shift.
masak tadzik: at present, you can pass in ASTs into a macro, and you can return ASTs, but there's no way to manipulate them on the way through. 22:52
Tene masak: Very nice work.
tadzik masak: so I can't quasi { $b }, right? 22:53
soh_cah_toa could somebody help clarify what the 'handles' keyword is for? the spec (as usual) is hard to understand there 22:55
jnthn soh_cah_toa: Delegation.
tadzik: I guess you meant quasi { {{{ $b }}} }
masak tadzik: it would be... what jnthn said.
jnthn Though that'd just be returning $b anyway.
tadzik ooh, what'd that be?
oh, that's the way you use it, I suppose? 22:56
masak and yes, just returning $b would be easier.
tadzik hrm
masak tadzik: yes, it's like string interpolation but with ASTs.
tadzik is there a spec up-to-date?
masak sure.
tadzik kay, I'll just read that
soh_cah_toa jnthn: uh, ok. could you elaborate? ;)
masak but if I were you, I'd read it with my gists.
tadzik :) I'll do that
masak tadzik: gist.github.com/1148915 gist.github.com/1149126 gist.github.com/1156662 22:57
I just tried 'macro first($a, $b, $c) { $a }; say first 42, 43, 44' and it doesn't work for some reason :/
not sure I'm awake enough to debug it now.
jnthn soh_cah_toa: It's like if you have a class with an attribute, and really you just want to forward calls on the class to calls on that attribute. 22:58
soh_cah_toa: handles sets up that "forwarding" for you
It can rename too (e.g. expose the method as one name on the class, but then call another one on the attribute)
masak it gives the error `Can not get non-existant attribute '$!past' on class 'AST'`, but there is such an attribute on that class.
soh_cah_toa jnthn: what i don't understand is that method delegation is separate from object attributes 22:59
jnthn: how does a method delegate to an object attribute? that doesn't make sense to me :\
jnthn masak: Maybe a forgotten decontainerization.
masak jnthn: oh!
maybe.
we'll discuss that tomorrow :)
mauke a method on an object delegates to a method on an attribute of that object
jnthn :)
masak dobranight, #perl6 23:00
it feels nice to have the branch pushed.
23:00 masak left
soh_cah_toa interesting. doesn't that make the inheritance tree...weird? 23:00
jnthn nom: class Tail { method wag() { say "wag wag" } }; class Dog { has $.tail handles 'wag' }; Dog.new(tail => Tail.new).wag
p6eval nom 27090e: OUTPUT«wag wag␤» 23:01
jnthn soh_cah_toa: No, it's completely orthogonal to inheritance
mauke soh_cah_toa: I don't think it affects inheritance
jnthn soh_cah_toa: That's kinda the point - it makes doing composition-y OO easy.
soh_cah_toa alright. i'm just not used to the idea of "selective inheritance"
mauke inheritance?
jnthn It's not inheritance at all.
See what I did above.
All it's doing ofr you in that case is writing a method for you, at some level. 23:02
It's like you wrote a method wag() { $!tail.wag() }
But you don't have to; you just say "handles 'wag'" and you get one generated.
soh_cah_toa yeah
it just seems weird to just "inherit" one thing (method) instead of making it a subclass of something or composing a role 23:03
dalek kudo/nom: 698e301 | jnthn++ | src/core/Array.pm:
Optimize array access a little.
soh_cah_toa where you'd "inherit" all methods and attributes
jnthn soh_cah_toa: Huh? Having an object that calls methods on its attributes is like inheriting from the object in that attribute? 23:04
soh_cah_toa i've just never heard of that before. is there any other language that's done that before p6?
mauke perl5 :-)
jnthn No, normally one has to code those things up by hand, or end up mis-using inheritance.
soh_cah_toa ok, not "inteheriting" per se. i mean you're "gaining" behavior from another class 23:05
mauke metacpan.org/module/Moose::Manual::Delegation - probably stolen from perl6
jnthn soh_cah_toa: In a sense though, that's what object oriented programming is about. :)
soh_cah_toa is not a compiler designer and does not know all the fancy pants terms 23:06
jnthn soh_cah_toa: I wish the day-to-day programmer was as aware of composition/delegation as they were inheritnace.
I've seen a few too many mis-applications of inheritance and the resulting mess.
soh_cah_toa i didn't realize there was a difference 23:07
which is your point exactly ;)
mauke a triangle has three points <> a triangle inherits from three points
jnthn mauke: ooh, nice example. :) 23:08
soh_cah_toa i suppose the root of much of my "misinformation" is due to the bad practices college enforces through c++ ;) 23:11
TimToady
.oO(Perl 6, the Language Who Does Everything Better Than You, with apologies go Martha Stewart...)
*to
tadzik g'night #perl6 23:14
jnthn night, tadzik o/
tadzik oh, almost forgot the masak++ :)
soh_cah_toa so what if you have a class Foo that has an attribute `Bar $.foo handles 'bar'` but also defines bar() itself? i'd imagine that it delegates to Foo.bar(), not Bar.bar(), right? 23:16
jnthn nom: class Foo { has $.foo handles 'bar'; method bar() { } }; Foo.bar # curious...
p6eval nom 27090e: OUTPUT«===SORRY!===␤Package 'Foo' already has a method 'bar'; did you mean to declare a multi-method?␤»
jnthn hm :) 23:17
TimToady should prolly complain about redef
jnthn TimToady: That's what it just did :)
TimToady: Though the error could probably mention delegation explicitly.
TimToady sorry, typing 1 handed, so slow...
jnthn ouch :(
Hope the other one gets well soon. 23:18
TimToady thanks, icing it currently
soh_cah_toa TimToady: what happened to the hand?
jnthn ponders how to go about getting optimizer merged
23:19 espadrine left
TimToady attached to sore elbow :) 23:19
soh_cah_toa ah...
jnthn I really don't want it to get in people's way as the quirks in the stuff it does so far are worked out, and I have a hard time knowing how much fallout their will be.
TimToady overuse of hammer mebbe
too many things looked like a nail... 23:20
jnthn ponders getting the tests it rejects correctly clenaed up, fixing the one or two places it does the wrong thing, then merging it, but requiring --optimize for now.
soh_cah_toa bashing keyboard with hammer? yeah, i do that too. sometimes with my head
jnthn And perhaps building CORE.setting with --optimize. 23:21
Opinions welcome.
dalek kudo/nom: cbe898f | jnthn++ | src/core/List.pm:
Use nqp::islist to better handle vivifying list storage.
23:22
23:29 espadrine joined 23:31 PacoLinux joined
jnthn omg what. 23:32
for 1..1000000 { } in nom spends 99% of its time in memmove, according to this profile... 23:33
soh_cah_toa perl6: "foobar" ~~ m:g/oo/ 23:57
p6eval niecza v10-23-g50e0320: OUTPUT«===SORRY!===␤␤Regex modifier g not yet implemented at /tmp/D73fgDAdc5 line 1:␤------> "foobar" ~~ m:g⏏/oo/␤␤␤Unhandled Exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) ␤ a…
..rakudo cbe898: OUTPUT«===SORRY!===␤Adverb 'g' not allowed on m at line 1, near ""␤»
..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.16/blib6/pugs/perl5/lib';␤ eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped b…
soh_cah_toa that doesn't seem right 23:58
dalek ast: 5721b37 | larry++ | S03-operators/value_equivalence.t:
=== is supposed to autothread