»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:05 packetknife left
Woodi hmm, should be 'my' not required ? in perl5 it's needed for marking not global vars... 00:07
tadzik always required in Perl 6 00:08
Woodi would be nice if it will be default... 00:09
00:09 fridim_ joined
Woodi if possible 00:09
jnthn Good Perl 5 programmers - 1-liners aside - pretty much always "use strict" in perl 5 anyway.
Woodi yes, it is 'must' in p5 00:10
jnthn So we're just saving everyone a line of boilerplate. :)
I think in -e "..." it should be relaxed
So one-liners are still convenient.
But we don't implement that in Rakudo yet.
Woodi do not understund - not saving by requiring it... 00:11
jnthn Woodi: You don't have to write "use strict;" in Perl 6, because it's on by default. 00:12
sorear Woodi: We require you to explicitly declare variables to help prevent typo bugs
Woodi: If 'my' wasn't required, then the compiler would accept $color = read_from_db(); say $colour; but would always output "Any"
00:14 pernatiy joined
Woodi perl is scripting language, not see problem in that 00:14
but understud explicity boilerplate part
sorear Perl is a multiparidigm language.
It does applications too. 00:15
tadzik I'd be careful with this 'scripting' part :) 00:16
Woodi oki, can someone point me to some IO::Socket::INET code/module ? need examples 00:17
found
jnthn sleep & 00:22
tadzik g'night 00:23
Woodi base64 is builtin now ?
tadzik nope
there's a MIME::Base64 module
Woodi not working
ok, gn all 00:24
00:26 wolfman2000 joined
tadzik gn 00:27
snarkyboojum Woodi: There are now two different versions of MIME::Base64, the latest works on latest Rakudo (v1.1). v1.0 works on earlier Rakudos based on ng, like the last Star release 00:56
00:56 alvis left 00:57 thundergnat left, ZapZ left
snarkyboojum phenny: tell moritz++ thanks for the fix to MIME::Base64 on nom - not backwards compatible with ng, but at least it works :) have committed it as a new version of the module for now 00:59
phenny snarkyboojum: I'll pass that on when moritz++ is around.
snarkyboojum whoops - that won't work 01:00
phenny: tell moritz thanks for the fix to MIME::Base64 on nom - not backwards compatible with ng, but at least it works have committed it as a new version of the module for now
phenny snarkyboojum: I'll pass that on when moritz is around.
01:04 ZapZ_ joined
tadzik ehh 01:06
niecza: sub a(:$b) {}; a(b => 7, b => 7) 01:07
p6eval niecza v9-32-g380d891: OUTPUT«Potential difficulties:␤ $b is declared but not used at /tmp/ECsuacmDsV line 1:␤------> sub a(:⏏$b) {}; a(b => 7, b => 7)␤␤»
tadzik pugs: sub a(:$b) {}; a(b => 7, b => 7)
p6eval pugs: OUTPUT«*** No compatible multi variant found: "&a"␤ at /tmp/92ANqf0Lp8 line 1, column 16 - line 2, column 1␤»
tadzik b: sub a(:$b) {}; a(b => 7, b => 7) 01:08
p6eval b 1b7dd1: OUTPUT«duplicate named argument in call␤ in main program body at line 22:/tmp/76l0mQll_c␤»
01:08 donri left
tadzik nom: sub a(:$b) {}; a(b => 7, b => 7) 01:08
p6eval nom 375fa0: OUTPUT«duplicate named argument in call␤ in <anon> at /tmp/a9AqJkAmil:1␤ in <anon> at /tmp/a9AqJkAmil:1␤␤»
tadzik sorear: what do you think about it? It's not per-spec, and it causes DateTime.t to break, but it may sound like a nice feature. Maybe it ought to be a warning 01:10
sorear tadzik: I am about 3/4 sure that the most useful behavior is to use the last argument, which is what niecza does
01:10 alvis joined
sorear tadzik: think about what? 01:10
JimmyZ does phenny know moritz++ ?
tadzik so you treat the set of named params similiarly to a hash?
sorear: about what you just said :)
sorear yes.
tadzik I see
sorear JimmyZ: I don't think so 01:11
tadzik DateTime.t uses sub dt(*%args) { DateTime.new(year => 1984, |%args) }
where |%args possibly contain year too
nom: sub foo(:$a); my %h = a => 5; foo(a => 6, |%h)
01:11 JimmyZ left
p6eval nom 375fa0: OUTPUT«===SORRY!===␤Missing block at line 1, near "; my %h = "␤» 01:11
tadzik nom: sub foo(:$a) {}; my %h = a => 5; foo(a => 6, |%h) 01:12
p6eval nom 375fa0: OUTPUT«duplicate named argument in call␤ in <anon> at /tmp/907YNvPNaP:1␤ in <anon> at /tmp/907YNvPNaP:1␤␤»
tadzik b: sub foo(:$a) {}; my %h = a => 5; foo(a => 6, |%h)
p6eval b 1b7dd1: ( no output )
tadzik huh
b: sub foo(:$a) {}; my %h = a => 5; foo(a => 6, a => 5)
p6eval b 1b7dd1: OUTPUT«duplicate named argument in call␤ in main program body at line 22:/tmp/Fza_E6Q285␤»
tadzik not too smart, b
lichtkind good night, hope to be more productive soon 01:46
01:47 lichtkind left 01:49 uasi joined
tadzik good night 01:52
dalek kudo/nom: eb855f3 | tadzik++ | src/core/Temporal.pm:
Fix DateTime.now
kudo/nom: 048cfd5 | tadzik++ | / (2 files):
Fix Date.clone. We now pass S32-temporal/Date.t
01:55 wolfman2000 left 01:58 thou joined 02:06 envi joined 02:07 whiteknight left 02:16 skangas left 02:53 Chillance left 03:25 packetknife joined 03:29 soh_cah_toa left 03:38 alester joined 03:51 gbacon left
dalek ecza/serialize: 876ee08 | sorear++ | Makefile:
Fix build
03:55
ecza/serialize: 7292b3a | sorear++ | / (9 files):
More tweaks, can now create SubInfo objects at compile time
03:58 packetkn_ joined 04:01 packetknife left 04:26 packetkn_ left 04:32 uasi left 04:38 nsh joined 04:42 ZapZ_ left 04:54 alester left 05:07 packetknife joined 05:10 packetknife left 05:11 miguet left
cognominal_ github.com/perl6/specs/pull/4 # replace $?ROUTINE fossils by &?ROUTINE 05:57
06:03 ZapZ joined 06:09 orafu left 06:11 orafu joined 06:13 kaare_ joined 06:14 bluescreen10 left 06:20 thou left, jimmy1980 joined
dalek ecza/serialize: 02f306a | sorear++ | / (3 files):
Start on lexicals in new model
06:50
sorear sleep
06:53 mberends joined 06:55 _jaldhar joined
mberends aww, missed sorear by 3 minutes # just arrived home in .nl 06:56
06:56 jaldhar left
sorear mberends: I'm not actually asleep yet, I have a moment. 07:04
mberends sorear: :-)
I wrote a small GUI Sierpinski triangles app en route, not problems with it 07:05
07:05 daniel-s joined
mberends I had earlier found a blocker on Gtk menus, but cannot remember the exact problem. Will re-do. I've started writing a Gtk text editor as well, mainly to explore GUI functionality. 07:06
The blockers are likely to be around native types. There was the inability to resize the clock as well, because the Geometry function is meant to pass pointers to ints. I think the menus had a similar requirement. 07:08
07:09 wamba joined
sorear oh yes 07:10
I actually thought I implemented pointers-to-ints
please leave tickets for any issue(s) you find 07:11
I'm not likely to get to this stuff for a while
hmm, only one more week 'till the release
sorear wonders if /serialize will be ready by then
mberends ok. generally the feel of Gtk programming is very friendly and the docs are sufficient. 07:12
07:13 wamba left, wamba joined
sorear mberends: I just added #56 and #57 for your existing issues 07:13
mberends I hope serialize goes well. I slowed down on guts documentation because I saw you were refactoring the files I was studying.
sorear: thanks 07:14
sorear I'd be happy to talk about my plans, but unless you have something urgent I'm going to leave now.
mberends I have a very free day. It's probably better for you to sleep first and talk later. I'd like to talk anyhow. 07:15
jlaire .u ⸘‽ 07:19
phenny U+2E18 INVERTED INTERROBANG (⸘)
U+203D INTERROBANG (‽)
jlaire phenny: ty
benabik .u ⸮ 07:21
phenny U+2E2E REVERSED QUESTION MARK (⸮)
mberends wow, interrobang! Ansa da question, or teh kitty gets it! 07:22
another Niecza GUI idea: John Horton Conway's Game of Life 07:26
Niecza master 'make test' fails test number 974 - Hash.any means any(keys): got: any("a", ) expected: any("a") 07:29
jlaire a hashlife implementation in Perl 6 would be interesting to see
mberends hmm, yes indeed. 07:32
07:35 birdwindupbird joined
tadzik good morning 07:35
cognominal hi, can someone apply the pull request? [07:57] <cognominal_> github.com/perl6/specs/pull/4 # replace $?ROUTINE fossils by &?ROUTINE 07:36
dalek ecs: 5b9b25e | (Stéphane Payrard)++ | S (2 files):
replace $?ROUTINE fossils by &?ROUTINE
07:38
ecs: 83f68bd | benabik++ | S (2 files):
Merge pull request #4 from cognominal/master

replace $?ROUTINE fossils by &?ROUTINE
benabik cognominal++
cognominal thx
07:41 arthur-_ left 07:43 arthur-_ joined 07:45 Kivutarrr joined
tadzik given nqp::bindpos($fia, 0, nqp::unbox_i($dt.whole-second)); I get FixedIntegerArray: index out of bounds! 07:51
benabik What's the size of the FIA? Maybe it got initialized to 0, so there's no space in it.
tadzik I'll read the docs. It's just my Mu $fia := pir::new__PS('FixedIntegerArray'); 07:52
I think this is one of those "how did it work before" moments
benabik Yes… I think that just makes a size 0 array 07:53
It needs to be pir::new__PSi('FixedIntegerArray', $size)
(Or something like that.)
tadzik that dies with init_pmc() not implemented in class 'FixedIntegerArray' 07:54
benabik That's odd…
tadzik but you can probably set size using assignment 07:55
if the tests don't lie
benabik PSi should call init_int, not init_pmc...
Ah… the set_integer_native VTABLE does it, but I'm not sure how to get at that. 07:56
assign__PI?
tadzik nom: pir::new__PSi('FixedIntegerArray', nqp::unbox_i(5));
p6eval nom 048cfd: OUTPUT«init_pmc() not implemented in class 'FixedIntegerArray'␤ in <anon> at /tmp/mXxZr8mb73:1␤ in <anon> at /tmp/mXxZr8mb73:1␤␤»
tadzik I'll try that
PI, or Pi maybe?
both die with error:imcc:syntax error, unexpected PREG, expecting '(' ('$P101') 07:57
07:57 mj41 joined
benabik nap has moved a little farther away from PIR… It's more difficult for me to figure out what'll do waht. 07:58
07:58 _jaldhar left
tadzik void set_integer_native(INTVAL size) 07:58
benabik NQP generates odd code sometimes… new__PSI('FIA', 1') creates a Float PMC, assigns 1 to it, then assigns it to an int register, then calls new. 08:00
tadzik set $S100, "FixedIntegerArray" 08:01
new $P101, $S100, 5
is the code generated by pir::new__PSi('FixedIntegerArray', 5)
it doesn't fail itself when ran in pir 08:02
benabik I was using 2011.06-196-gf3b8f73
NQP, sorry
tadzik maybe deserializing it crashes it 08:04
...not that I know how to debug it :P 08:05
I'll wait for jnthn to wake up
moritz good morning 08:06
phenny moritz: 01:00Z <snarkyboojum> tell moritz thanks for the fix to MIME::Base64 on nom - not backwards compatible with ng, but at least it works have committed it as a new version of the module for now
benabik In my copy of nom, I see nqp_get_sc_object $P101, "1316332982.94512", 6; set $S100, $P101 ; new $P102, $S100, 1
No idea why that's ending up in init_pmc 08:07
tadzik good morning moritz 08:10
08:12 wallberg joined
dalek kudo/nom: a48a985 | tadzik++ | src/core/Temporal.pm:
More Temporal fixes
08:13
tadzik fixing calendar.t 08:14
S32-temporal/local.t suffers from the "out of bounds" case
benabik tadzik: The FIA problem?
tadzik now, can we agree whether it should be method day-of-year() {} or method day-of-year {}? #perl6style
benabik: yes
moritz tadzik: I prefer the () 08:15
tadzik hmm, I prefer without :) 08:18
benabik Well, let's compromise and only use one paren.
tadzik fair enough 08:19
moritz tadzik++ # fixing Date.t
erm, the code behind Date.t
tadzik oh, moritz 08:20
dalek kudo/nom: b952372 | tadzik++ | / (2 files):
Uncomment Date.day-of-year. We now pass S32-temporal/calendar.t; track failure reasons
tadzik b: sub foo(:$a) {}; my %h = a => 5; foo(a => 6, a => 5)
p6eval b 1b7dd1: OUTPUT«duplicate named argument in call␤ in main program body at line 22:/tmp/hWnrudWXyf␤»
tadzik b: sub foo(:$a) {}; my %h = a => 5; foo(a => 6, |%h)
p6eval b 1b7dd1: ( no output ) 08:21
tadzik nom: sub foo(:$a) {}; my %h = a => 5; foo(a => 6, |%h)
p6eval nom 048cfd: OUTPUT«duplicate named argument in call␤ in <anon> at /tmp/9MKSCalq_s:1␤ in <anon> at /tmp/9MKSCalq_s:1␤␤»
tadzik moritz: see the last two. nom is certainly smarter, but it breaks DateTime.t
I already adjusted Date.clone to be smart about this limitation, but fixing the test seems wrong
moritz tadzik: yep, I've seen your patch in 048cfd5 and thought that was the case
tadzik: hm, where is that used in a test? 08:22
tadzik I like how niecza does it, it treats named params sort of like a hash keys...
moritz: sub dt() iirc
...and by the force of nature the problem doesn't exist
moreover, the spec doesn't say anything about such a limitation, and moremoreover, that error is a parrot error, not a rakudo error
so I'll just declare it a rakudobug 08:23
(and fix it, if I had a bloody idea how to do this)
or rather where to do this
moritz tadzik: it's ok to "fix" the test, because the test is not about argument passing, but about DateTime 08:24
if we want to test that feature, it should be in S06-* somewhere
and tests are supposed to minimize used of advanced features, except for the thing they are currently testing 08:25
tadzik fair enough
ok, now it fails with FixedIntegerArray: index out of bounds! too 08:26
benabik \o/
wait… /o\ 08:27
dalek ast: 62ecf0f | tadzik++ | S32-temporal/DateTime.t:
[DateTime.t] Avoid passing doubled named parameters; some implementations are not okay with that, and it's not the thing being tested here
08:28
tadzik close enough ;)
okay, time for some breakfast shopping &
08:29 miguet joined
tadzik phenny: tell flussence since nom is now default, please feel free to file every Pod-related issue you have to RT; external memory is better for me to remember about stuff 08:30
phenny tadzik: I'll pass that on when flussence is around.
tadzik phenny: thanks
08:40 im2ee joined 08:45 Kivutarrr left
dalek kudo/nom: 04532d3 | moritz++ | lib/Test.pm:
[Test.pm] show error after a failed dies_ok
09:20
kudo/nom: 2eb5b16 | moritz++ | src/core/Num.pm:
floor() now returns an Int when possible
09:42
09:46 SHODAN joined 10:18 tokuhiro_ joined
dalek kudo/nom: ab30d74 | moritz++ | src/core/Temporal.pm:
[Temporal] initialize length of FixedIntegerArray
10:19
moritz takes a break from Temporal hacking 10:23
tadzik oh, this is how you do it
how are the passes now? 10:24
moritz tadzik: it runs up to 140 now, three failures
tadzik I can give it a peek
moritz nom: new__PSI('ResizableIntegerArray', 9)
p6eval nom 2eb5b1: OUTPUT«Could not find sub &new__PSI␤ in <anon> at /tmp/AYPHTfr3SE:1␤ in <anon> at /tmp/AYPHTfr3SE:1␤␤»
moritz nom: pir::new__PSI('ResizableIntegerArray', 9) 10:25
p6eval nom 2eb5b1: OUTPUT«init_pmc() not implemented in class 'ResizableIntegerArray'␤ in <anon> at /tmp/CELB0Qiv_k:1␤ in <anon> at /tmp/CELB0Qiv_k:1␤␤»
moritz huh, I thought that would work too
tadzik don't you want that to be Fixed?
but it doesn't work anyway
moritz nom: pir::new__PSI('FixedIntegerArray', 9) 10:26
p6eval nom 2eb5b1: OUTPUT«init_pmc() not implemented in class 'FixedIntegerArray'␤ in <anon> at /tmp/xkNSUxBR0E:1␤ in <anon> at /tmp/xkNSUxBR0E:1␤␤»
tadzik it should be using init_int, not init_pmc
moritz nom: pir::new__PSP('FixedIntegerArray', 9)
p6eval nom 2eb5b1: OUTPUT«init_pmc() not implemented in class 'FixedIntegerArray'␤ in <anon> at /tmp/j8q3bMTgZK:1␤ in <anon> at /tmp/j8q3bMTgZK:1␤␤»
10:27 agentzh joined 10:38 lumi_ joined
dalek ast: 6bbd321 | tadzik++ | S32-temporal/DateTime-Instant-Duration.t:
[DateTime-Instant-Duration.t] Avoid some more doubled named parameters
10:41
10:43 MayDaniel joined
dalek ast: d9c9935 | tadzik++ | S32-temporal/DateTime.t:
DateTime.in-timezone doesn't take named parameters, use positionals
10:44
ast: 6edbf45 | tadzik++ | S32-temporal/DateTime.t:
[S32-temporal/DateTime.t] Avoid some named params magic.

The test was failing on some implementations due to that, and we should be testing DateTime's reactions, not multiple dispatching.
10:51
tadzik nom: say DateTime.new(time); say DateTime.now 10:54
p6eval nom 2eb5b1: OUTPUT«DateTime.new(year => 2011, month => 9, day => 18, hour => 10, minute => 54, second => 18)␤DateTime.new(year => 2011, month => 9, day => 18, hour => 10, minute => 54, second => 18, timezone => $*TZ)␤»
tadzik nom: say DateTime.new(time); say DateTime.now.utc 10:55
p6eval nom 2eb5b1: OUTPUT«DateTime.new(year => 2011, month => 9, day => 18, hour => 10, minute => 55, second => 12)␤FixedIntegerArray: index out of bounds!␤ in method offset at src/gen/CORE.setting:6486␤ in method postcircumfix:<( )> at src/gen/CORE.setting:6480␤ in <anon> at src/gen/Metamo…
tadzik evalbot rebuild nom
p6eval NOT OK (maybe a rebuild is already in progress?)
tadzik MAYBE. OK
anyway, DateTime.t assumes DateTime.new(time) and DateTime.now.utc to be equal, not sure if that's really timezone-friendly: on my box, the difference is 4 hours. I'll leave that for some DateTime wizards 10:57
jnthn o/ 11:02
11:02 im2ee left
jnthn Wow, crazy DateTime hacking \o/ 11:02
11:02 im2ee joined
tadzik oh hai jnthn 11:03
jnthn Note from backlog: there's a difference between pir::...__Psi and pir::...PSI
If you're putting literal values in, always use the lowercase forms.
pir::new__PSI('blah', 42) # wrong
pir::new__Psi('blah', 42) # right
11:05 buubot_backup left
tadzik oh 11:07
anyway, seen the doubled named params issues?
jnthn No
moritz nom: pir::new__Psi('ResizableIntegerArray', 9)
p6eval nom ab30d7: OUTPUT«init_pmc() not implemented in class 'ResizableIntegerArray'␤ in <anon> at /tmp/2ckgYG3O2K:1␤ in <anon> at /tmp/2ckgYG3O2K:1␤␤»
jnthn nom: pir::new__Psi('FixedIntegerArray', 9)
p6eval nom ab30d7: OUTPUT«init_pmc() not implemented in class 'FixedIntegerArray'␤ in <anon> at /tmp/sczRxFXQJx:1␤ in <anon> at /tmp/sczRxFXQJx:1␤␤» 11:08
jnthn hm, guess you can't do that. :S
tadzik jnthn: irclog.perlgeek.de/perl6/2011-09-18#i_4443641
jnthn nom: pir::set__0Pi(pir::new__Ps('FixedIntegerArray'), 9)
p6eval nom ab30d7: ( no output )
jnthn That should do it.
tadzik it did 11:09
moritz jnthn: that's what I'm using
jnthn OK.
That's probably the Right Way
moritz jnthn: but I've seen github.com/parrot/parrot/blob/mast...rray.t#L42 and wondered if we could do it that way too
jnthn tadzik: I'm not sure how much we can do abotu the dupe arg thing. 11:10
Short of migrating off Parrot :P
Or getting Parrot folks to change something, somehow.
tadzik eh? 11:11
jnthn tadzik: It's a Parrot limitation.
tadzik couldn't we just take care of it before the Parrot's invocation?
jnthn tadzik: How?
tadzik I mean, b did it partly
jnthn: I have no idea how :)
jnthn In the case you mentioned, we could spot them I guess
tadzik b: sub foo(:$a) { say $a }; foo(a => 7, a => 6)
p6eval b 1b7dd1: OUTPUT«duplicate named argument in call␤ in main program body at line 22:/tmp/5f86SdjyVB␤»
jnthn In the flattening case though...we don't know what's in the hash until runtime.
tadzik okay, that worked with the hash 11:12
jnthn Really?
tadzik b: sub foo(:$a) { say $a }; my %h = a => 5; foo(a => 6, |%h)
p6eval b 1b7dd1: OUTPUT«5␤»
tadzik yeah
bbs
jnthn nom: sub foo(:$a) { say $a }; my %h = a => 5; foo(a => 6, |%h)
p6eval nom ab30d7: OUTPUT«duplicate named argument in call␤ in <anon> at /tmp/INvgQhHryN:1␤ in <anon> at /tmp/INvgQhHryN:1␤␤»
jnthn eh, wtf.
cognominal nom: my %a; %a<a> :exists 11:13
p6eval nom ab30d7: OUTPUT«===SORRY!===␤Confused at line 1, near "%a<a> :exi"␤»
jnthn Hm, I don't see why on earth it works in b. 11:14
11:15 woosley joined
jnthn afk for a moment 11:18
moritz the hash removes the duplicates before it interpolates 11:21
nom: say List.^mr0 11:24
p6eval nom ab30d7: OUTPUT«Method 'mr0' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤ in method dispatch:<.^> at src/gen/CORE.setting:660␤ in <anon> at /tmp/pC7OHcQh_0:1␤ in <anon> at /tmp/pC7OHcQh_0:1␤␤»
moritz nom: say List.^mro
p6eval nom ab30d7: OUTPUT«List() Iterable() Cool() Any() Mu()␤»
11:26 buubot_backup joined 11:27 skangas joined
jnthn back 11:31
< jnthn> Short of migrating off Parrot :P -- ARGH! Critical missing words - off Parrot CALLING CONVENTIONS.
jnthn should not be allowed to type before coffee
:/
The thing is that we only get control of...some parts. 11:32
But the flattening and arg checking stuff is all handled before a language's own binder gets its shot at things.
|@i-am-infinite is awkward for the same reason. 11:33
Hm
er 11:37
something very weird is going on here
jnthn will have to dig a bit more in a moment. 11:38
11:39 Patterner left 11:40 Psyche^ joined, Psyche^ is now known as Patterner 11:43 jimmy1980 left
jnthn OK, I think I see how on earth to fix this. 11:45
11:51 jimmy1980 joined
snarkyboojum cool - what's b? 11:54
a particular revision of rakudo? 11:55
jnthn snarkyboojum: Yeah, before the big refactor.
snarkyboojum oh! ok 11:56
woosley perl6: say (2,4,5) <<+>> (1,1,1) 12:00
p6eval pugs: OUTPUT«*** ␤ Unexpected "<<+>>"␤ expecting operator, ":" or ","␤ at /tmp/xY26FDTDNS line 1, column 13␤»
..rakudo ab30d7, niecza v9-32-g380d891: OUTPUT«3 5 6␤»
woosley perl6: say (2,4,5)<<+>>(1,1,1)
p6eval pugs: OUTPUT«*** Odd number of elements found where hash expected: VList [VInt 2,VInt 4,VInt 5]␤ at /tmp/RUzc7va1bM line 1, column 5 - line 2, column 1␤»
..niecza v9-32-g380d891: OUTPUT«Unhandled exception: Unable to resolve method ast in class Any␤ at /home/p6eval/niecza/src/NieczaActions.pm6 line 19 (NieczaActions NieczaActions.FALLBACK @ 14) ␤ at /home/p6eval/niecza/src/STD.pm6 line 3307 (STD P6.postcircumfix:sym<<< >>> @ 19) ␤ at l…
..rakudo ab30d7: OUTPUT«Method 'at_key' not found for invocant of class 'Parcel'␤ in method postcircumfix:<{ }> at src/gen/CORE.setting:972␤ in <anon> at /tmp/cfEmZo12i7:1␤ in <anon> at /tmp/cfEmZo12i7:1␤␤»
woosley std: say (2,4,5)<<+>>(1,1,1) 12:01
p6eval std bb4f150: OUTPUT«ok 00:01 122m␤»
woosley bug? 12:02
12:03 masak joined, MayDaniel left
jnthn woosley: Whitespace matters. 12:04
Always put whitespace around infixes.
masak hello #perl6 from a train o/
12:04 masak left, masak joined
masak I wonder if there's another local minimum somewhere that would please people who don't like whitespace around their operators. 12:05
12:05 masak left 12:06 masak joined
masak probably not. 12:06
even if there is, it probably has enough drawbacks that it could never be the default.
woosley jnthn: whitespace again! Perl6 whitespace rule is confusing ... 12:08
snarkyboojum what's the rule? put whitespace around infixes?
woosley snarkyboojum: That's why it is confusing, you never know where you 'should' leave a whitespace 12:09
snarkyboojum woosley: not sure how "put whitespace around infixes" is confusing 12:10
but I don't claim to know all the whitespace specific rules :)
jnthn As a rule: always put whitespace around infix operators, don't put it before/after prefix/postfix/postcircumfix operators.
$a < $b # whitespace, 'cus it's infix
12:10 f00li5h joined
jnthn $foo<bar> # no whitespace because it's a postcircumfix 12:10
snarkyboojum that seems pretty easy to remember 12:11
woosley snarkyboojum: I met another whitespace rule yesterday
snarkyboojum woosley: ah, ok - which one?
jnthn Yes, though admittedly different from what some people may be used to coming from other languages.
Note that the parens for passing arguments to a call are a postcircumfix. 12:12
so foo(1,2,3), not foo (1,2,3)
snarkyboojum I think I've always put whitespace around infix ops and not before postfix :)
maybe I'm just "lucky" :P
jnthn :)
12:12 masak left
jnthn tries a patch to clear up the args stuff a bit. 12:12
12:12 masak joined
jnthn masak: Good connection! 12:13
snarkyboojum w00t mobile interwebs :)
woosley snarkyboojum: oh, not yesterday, but someday, here it is: irclog.perlgeek.de/perl6/2011-09-15#i_4433366
masak the whitespace rule essentially puts postfixes/postcircumfixes in a different namespace than infixes. 12:14
jnthn Maybe I shoulda phrased it as "if you don't want it to be interpreted as a postfix or postcircumfix, put spaces" :) 12:15
masak jnthn: better than nothing :) I have to micro-backlog a lot, though.
snarkyboojum woosley: oh that kinda seems like a different rule
space required between trait and { 12:16
woosley perl6: say (2,4,5)>>+<<(1,1,1)
jnthn snarkyboojum: It's not so different.
p6eval pugs: OUTPUT«356␤»
..rakudo ab30d7, niecza v9-32-g380d891: OUTPUT«3 5 6␤»
jnthn snarkyboojum: The reason it doesn't work is because it thinks you're supplying a postcircumfix to the "rw" :) 12:17
woosley Ha, you can omit whitespace here!
dalek kudo/nom: 69136a4 | moritz++ | src/core/ (2 files):
implement chrs
woosley is it confusing?
:)
jnthn woosley: Yes, the point is that in places you *can*, but if you'd like to avoid surprises then you probably shouldn't.
masak no, it's the same rule. 12:18
snarkyboojum jnthn: sure - so you shouldn't use whitespace before a postfix, except when it's not :D
I'm probably tautologising :)
jnthn woosley: The reason you hit trouble the other way is because there's a postcircumfix operator <...> for indexing.
snarkyboojum so, space everywhere apart from before postfixes ;) 12:19
woosley good to know that!
masak jnthn: actually it's the <<...>> indexing operator. 12:20
snarkyboojum how does unspace fit into this? :)
jnthn masak: ah, yes
masak snarkyboojum: unspace is necessary when you want space anyway.
snarkyboojum: that's why it's called "unspace", because it's whitespace that doesn't actually count as whitespace.
snarkyboojum masak: on a superficial reading, that sentence seems very confusing :) 12:21
but got ya
masak well, that confusion is what the term 'unspace' captures.
snarkyboojum masak: aye
12:21 MayDaniel joined
snarkyboojum so unspace is really, ignoredspace 12:22
masak yes.
snarkyboojum goody 12:23
I think this conversation has spaced me out nicely :)
masak a lot of things in Perl 6 are <ws>, whitespace. comments are <ws>, for example. I think Pod is <ws>. 12:24
the thing unspace does is let you say "I want whitespace here, but don't parse it as <ws> -- and thus don't switch from expecting a postcircumfix or a postfix to expecting an infix".
: - )
snarkyboojum could something like peg/leg parse perl 6?
masak talk about deconstructing the jokes.
snarkyboojum or bits of it?
masak the answer to the second question is trivially "yes" :) 12:25
snarkyboojum masak: gotya.. maybe it should be called antispace instead :)
trivially?
peg/leg as in an implementation of, (piumarta.com/software/peg/peg.1.html) - not the concepts 12:26
jnthn Well, parsing "1234" could count as parsing bits of Perl 6 :P
snarkyboojum oh
masak whatever peg/leg is, it could probably parse integer literals, say.
snarkyboojum how about the first question? ;)
sans "bits of"
jnthn That's probably much harder. 12:28
e.g. how to simulate LTM in that case, how to handle the non-declarative bits... I don't know PEGs well enough to be sure of the answer, but I can imagine it's hard. 12:29
12:31 masak left
jnthn > sub foo(:$a) { say $a }; foo(a => 69, a => 42) 12:31
42
> my %h = a => 69; foo(a => 42, |%h)
69
tadzik: ^^
spectesting
woosley perl6: my @a=(2,4,5); @a.map({.say})
p6eval rakudo ab30d7: ( no output )
..pugs, niecza v9-32-g380d891: OUTPUT«2␤4␤5␤»
jnthn (was quite a re-work of arg handling...there may be some fallout) 12:32
snarkyboojum ok - sounds interesting anyway
jnthn ugh, yes, something is now very broken :( 12:33
woosley \o ~~
moritz perl6: my @a=(2,4,5); sink @a.map({.say})
p6eval pugs: OUTPUT«*** No such subroutine: "&sink"␤ at /tmp/KmPTudEuGT line 1, column 16 - line 2, column 1␤»
..niecza v9-32-g380d891: OUTPUT«===SORRY!===␤␤Action method statement_prefix:sink not yet implemented at /tmp/LrvEqhYSVN line 1 (EOF):␤------> my @a=(2,4,5); sink @a.map({.say})⏏<EOL>␤␤Unhandled exception: Unable to resolve method statement_level in cl…
..rakudo ab30d7: OUTPUT«2␤4␤5␤»
jnthn just managed to make every single spectest fail o/ 12:34
Achievement!
woosley perl6: (2,4,5).map: *.say
p6eval pugs: OUTPUT«Inf␤*** Cannot cast from VList [VBool True] to Pugs.AST.Types.VCode (VCode)␤ at /tmp/JxA8wl5JwC line 1, column 1 - line 2, column 1␤»
..niecza v9-32-g380d891: OUTPUT«2␤4␤5␤»
..rakudo ab30d7: OUTPUT«*␤»
snarkyboojum jnthn: only one place to go from there! :)
jnthn oh, I see why... 12:35
moritz
.oO( achievement unlocked )
jnthn :P
woosley perl6: (2,4,5).map: {.say}
p6eval rakudo ab30d7: ( no output )
..pugs, niecza v9-32-g380d891: OUTPUT«2␤4␤5␤»
12:36 birdwindupbird left
jnthn ah, this looks better... 12:36
snarkyboojum I really like the use of colon in those cases :) 12:37
moritz too
snarkyboojum I know masak doesn't - or didn't use to ;)
woosley I wonder why {} can be omitted here with '*.say'~~
moritz woosley: beause *.say creates a block, just like { } does 12:38
map doesn't need a block, just something callable 12:39
perl6: my @a = (1, 2, 3).map(&say)
p6eval niecza v9-32-g380d891: OUTPUT«Potential difficulties:␤ @a is declared but not used at /tmp/UPPzhdj6ad line 1:␤------> my ⏏@a = (1, 2, 3).map(&say)␤␤123␤»
..pugs, rakudo ab30d7: OUTPUT«1␤2␤3␤»
woosley moritz: I am thinking with the perl5 way :)
jnthn Dang. One test fial. 12:40
felher perl6: (1,2,3,4,5).grep: { $_ % 2 }.say
p6eval rakudo ab30d7: OUTPUT«_block1010␤»
..niecza v9-32-g380d891: OUTPUT«Unhandled exception: Unable to resolve method say in class Block␤ at /tmp/gb_DLdhu6a line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2060 (CORE C968_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2061 (CORE module-CORE…
..pugs: OUTPUT«135␤»
felher Hm, Pugs++
12:40 kaare_ left
moritz woosley: even perl 5 doesn't need a block 12:41
buubot_backup: eval: [map $_ + 1, 1, 2, 3 ]
buubot_backup moritz: [2,3,4]
woosley :-( 12:43
snarkyboojum is (2,4,5).map: *.say doing something like (2,4,5).map: -> $x { $x.say } ?
woosley perldoc -f map ing
eiro snarkyboojum, remove * 12:48
(i think)
p6eval, < a b c >.map: .say 12:49
p6eval < a b c >.map: .say
p6eval: < a b c >.map: .say
??
static_perl perl6: "what".say 12:50
p6eval pugs, rakudo ab30d7, niecza v9-32-g380d891: OUTPUT«what␤»
eiro arf... epic fail :) 12:51
static_perl :) 12:52
12:52 MayDaniel left
snarkyboojum I thought * was converted into a curried closure 12:52
dalek kudo/nom: 029c30f | jnthn++ | src/ (6 files):
Refactor of flattening and better handling of duplicate named parameters. Decidedly not perfect, but maybe the best we can easily do for now.
jnthn tadzik, moritz: ^^ should help with the Temporal stuff 12:53
12:55 Chillance joined
snarkyboojum or it's doing (2,4,5).map: { $^x.say } 12:58
:)
moritz yes to both :-) 12:59
snarkyboojum moritz: which both? :D 13:00
moritz -> $x { $x.say } and { $^x.say } 13:02
both are equivalent to *.say
snarkyboojum goody 13:03
13:03 uasi joined 13:05 wolfman2000 joined
snarkyboojum so -> is kinda shorthand for a lambda 13:09
moritz it is. It starts an explicit signature 13:10
whereas { $^x } implicitly generates a signatuer
snarkyboojum so -> $x { $x.say } is kinda like \x -> say(x) 13:12
I like the explicit syntax, I reckon the -> $x { $x.say } type thing 13:13
13:20 uasi left, uasi joined 13:25 jimmy1980 left 13:31 jimmy1980 joined 13:34 donri joined
tadzik jnthn: cool 13:34
13:42 jimmy1980 left 13:54 lateau_ joined 14:00 _jaldhar joined 14:07 wolfman2000 left 14:10 bloonix joined, _jaldhar left 14:19 mj41 left 14:28 agentzh left
sorear good * #perl6 14:28
jnthn: I'm curious what you think of the niecza approach to identifying type objects. 14:30
14:37 MayDaniel joined
mberends good * sorear 14:37
14:40 woosley left 14:42 whiteknight joined
sorear mberends: no more questions for me? 14:48
mberends sorear: so far so good, menus are almost working, I had previous not configured them properly. Toolbars also work ok. 14:49
jnthn sorear: Essentially, $obj =:= $obj.WHAT ? 14:52
14:53 daniel-s left, daniel-s joined
sorear jnthn: more like === 14:58
jnthn Well, then depends how the === is implemented ;) 14:59
sorear jnthn: it's up to the REPR; my equivalent of P6opaque just happens to know that it never creates more than one undefined object
mberends sorear: here's one: in niecza/examples/gtk1.pl:13, what would the syntax be to refer to a named event handler instead of the inline anonymous one? 15:01
15:02 whiteknight left
sorear you mean like .add_Clicked(&my_sub); ? 15:02
mberends sorear: yes, like that. I had tried some variation(s) before that didn't work. 15:03
jnthn sorear: Well, as I have it it's also up to the REPR; we just do REPR(foo)->defined(...).
sorear: If you can absoletely be sure you'll only ever create the one, it can work the way you have it. 15:04
sorear jnthn: under what circumstances will jnthn:P6opaque ever create more than one type object? 15:05
jnthn sorear: Clone the type object.
sorear per STable
jnthn sorear: Also, representation polymorphism.
sorear jnthn: that doesn't make more than one per STable though
15:05 _jaldhar joined
jnthn sorear: True, but I've been expecting that there'll still be a "canonical" WHAT. 15:06
$p6opague-dog ~~ Dog and $p6hash-dog ~~ Dog should both be true. 15:07
Anyway, if you forbid cloning the type object and were able to be sure that .WHAT on an s-table always pointed off to the type object for that representation, then yeah, it can work the way you have it. 15:08
As you said, it's up to the REPR.
On the rep poly, I need to think a little more there...or just implement it. :)
(As in, actually make it work for real.) 15:09
I'll try and do that in the not too distant future.
15:10 packetknife joined
sorear jnthn: I could add a SAME_REPR_WHAT easily enough. Type object cloning concerns me more - it had never occurred to me that anyone might want to do that 15:10
sorear grumbles that the CLR *doesn't* give em any free bits to play with 15:11
15:11 replore joined
jnthn I think I did it based on nullness of the attribute store or some such. 15:12
sorear Yes, you talked about that in the blog. :)
15:12 packetknife left
jnthn A null is a bit in a twisted sense. ;) 15:12
sorear which is why I brought up my approach.
jnthn No, I meant in the CLR version I used that. :)
sorear Oh, right. 15:13
15:13 packetknife joined
jnthn I need to figger out how to do P6opaque well on the CLR at some point soon I guess... 15:13
sorear niecza often has defined objects with a null attribute store for memory-saving reasons
jnthn What I did when prototyping was, well, sucky.
15:13 _jaldhar left
jnthn sorear: BTW, iiuc you're doing a CPS transform in order to support gather/take? 15:14
Did you consider any other approaches? 15:15
sorear jnthn: stack reification, yes. CPS is a bit of an inexact term
jnthn "stack reification"?
As in, allocate stack frames on the heap?
sorear Niecza's call stack is made out of System.Object subclasses, not CLR runtime magic
and on the heap
niecza uses the CLR-stack about as much as nom uses the C-stack - a runops-like function receives control constantly and passes it to many different functions 15:16
moritz so it's kinda of a small VM on top of mono? 15:17
s/VM/runloop/
sorear the main other approach I considered was fibers, until someone in #mono politely informed me that they consumed 1MB of address space each on Windows, which would have limited me to ~2k concurrent gathers on Win32, which seemed unacceptably low 15:18
jnthn sorear: I was also bothered and synchronization overhead there. 15:19
sorear moritz: in some ways yes
I also considered CLR-level threads for a few seconds, then laughed and moved on :)
jnthn s/and/about/
15:20 lateau_ left
jnthn A fiber is far less overhead than a thread but less doesn't mean "very little", from what I've read. 15:20
Also, I dunno how well they work out away from Windows.
Windows does fibers at kernel level, iiuc.
Gah, too many interesting things to work on ;) 15:21
jnthn should call family and let them know he's still alive and stuff...bbiab :) 15:22
15:28 _jaldhar joined 15:29 packetknife left 15:42 MayDaniel left
dalek ecza/serialize: 06a8815 | sorear++ | / (3 files):
Add support for remaining types of lexicals in new model
15:51
15:51 shinobicl_ joined 16:04 birdwindupbird joined, birdwindupbird left 16:05 shinobicl_ left, jferrero joined
dalek ecza/serialize: 90803c5 | sorear++ | / (3 files):
Add signatures to new model
16:11
16:20 tokuhir__ joined, tokuhiro_ left
diakopter so ... much ... scrollback 16:24
benabik diakopter: I rarely read the scrollback in #perl6… Just too much happening. :-/ 16:26
sorear I used to. Now I just /lastlog sorear, /lastlog niecza, and call it done 16:28
jnthn tends do to it if there's ~12 hours missed 16:31
But it's more "skim" than "read in full". :)
TimToady still tries to read everything, eventually, though skim happens... 16:35
16:35 thou joined
jnthn :) 16:36
jnthn has a nose for puns, OO stuff and multi-dispatch :)
16:42 daniel-s left 16:44 Moukeddar joined 16:45 Moukeddar left 16:49 uasi left 16:51 ZapZ left
cognominal std: my %a; %a<a> :exists 17:03
p6eval std bb4f150: OUTPUT«ok 00:01 120m␤»
cognominal std: my %a; say %a<a> :exists
p6eval std bb4f150: OUTPUT«ok 00:01 121m␤»
diakopter if only 17:04
17:05 MayDaniel joined
sorear diakopter: if only what? 17:06
diakopter if only std could do 'say' 17:08
but, of course, I should point out to cognomial that niecza runs std
moritz whaz would it say?
*what
diakopter doesn't know 17:09
sorear I should get back on that project
cognominal I forgot that std does only parse
diakopter *cognominal
sorear niecza: my %a; say %a<a> :exists; # should be 'Bool::False'
p6eval niecza v9-32-g380d891: OUTPUT«Bool::False␤»
17:10 DarthGandalf left
cognominal btw, how adverb like :exists works. Are they additional named parameters, to circumfix:<{ }> here? 17:11
17:11 envi left
sorear cognominal: yes 17:11
niecza: sub postcircumfix:<{ }>(|$args) { say $args.perl }; my %a; %a<a> :exists; 17:12
p6eval niecza v9-32-g380d891: OUTPUT«\({}.hash, "a", |{"exists" => Bool::True})␤»
sorear hmm, that output could be simplified a bit
cognominal so, they just are syntactic sugar. 17:13
sorear yes.
17:13 DarthGandalf joined
sorear niecza: my %a; say postcircumfix:<{ }>(%a, 'a', :exists) 17:13
p6eval niecza v9-32-g380d891: OUTPUT«Bool::False␤»
cognominal does niecza run on Lion? 17:14
moritz it runs on mono
cognominal I suppose I can install mono with macbrew
sorear istr someone saying that mono 2.8 doesn't run on Lion but 2.10 does
17:17 thou left
dalek ast: b12d943 | jnthn++ | S03-smartmatch/any-hash-pair.t:
Turn a todo into a skip.
17:22
jnthn b: say (*.foo).WHAT
p6eval b 1b7dd1: OUTPUT«WhateverCode()␤»
dalek kudo/nom: c41a88b | jnthn++ | src/Perl6/Actions.pm:
Fix up *.foo(...) becoming a closure that does the method call.
sorear b: say *(15).WHAT 17:27
p6eval b 1b7dd1: OUTPUT«invoke() not implemented in class 'Whatever'␤ in main program body at line 22:/tmp/8HcCsIbZfY␤»
sorear niecza: say *(15).WHAT
p6eval niecza v9-32-g380d891: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Whatever␤ at /tmp/QECu0C8oS2 line 1 (MAIN mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2060 (CORE C968_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 206…
sorear huh.
I thought I implemented that
jnthn What're you expecting it to do?
moritz I don't think so
sorear same as *.postcircumfix:<( )>(15) 17:28
jnthn hm
Guess it could be useful.
moritz right 17:29
dalek kudo/nom: 15af90f | jnthn++ | src/Perl6/Actions.pm:
Don't Whatever-curry macros like .WHAT.
17:30
jnthn Guess we can get back some tests now :)
moritz: Any idea where some *.foo tests are? Or can I leave that with you? :)
moritz jnthn: I'll run autounfudge 17:31
jnthn OK, thanks
moritz S02-types/whatever.t has some
jnthn hmm, we don't run that one at all yet. 17:32
dalek kudo/nom: 1c7dde0 | jnthn++ | NOMMAP.markdown:
Remove a nommap entry.
moritz nom: say (*+1).WHAT
p6eval nom 029c30: OUTPUT«_block1014␤»
moritz should be WhateverCode
jnthn moritz: 15af90f 17:33
> say (*+1).WHAT 17:34
WhateverCode()
:)
moritz \o/
jnthn It was currying the .WHAT.
moritz still compiles that commit
sorear jnthn: about how many tests/files does nom run? 17:35
17:35 packetknife joined
jnthn sorear: In the run I just did, Files=460, Tests=14453 17:36
Though that includes skips/todo's.
moritz about 500 skips, I'd guess
jnthn I *think* it does, anyway.
moritz yes, it does
jnthn OK, so 14,000ish.
We should get another one or two thousand back once Pm lands regexy things.
hmm, most of the punch list is regex related now. 17:37
Well, much of.
moritz nom: sub infix:<quack>($a, $b) { say "$a, $b" }; 5 quack 5
p6eval nom 029c30: OUTPUT«===SORRY!===␤Confused at line 1, near "5 quack 5"␤» 17:38
jnthn That's one of the regex related things ;)
moritz I know :-)
it's in whatever.t
jnthn ah
guess we have to skip that bit.
DateTime, Date is one nommap entry. Seems that's well on the way now that various blockers are cleared up. 17:39
moritz indeed
jnthn The parametric roles entry is just down to me having the patience to crank through a few more issues.
None of them are especially hard/major.
moritz nom: my $code = *.uc eq 'FOO'; say $code(5) 17:40
p6eval nom 029c30: OUTPUT«Method 'uc' not found for invocant of class 'Whatever'␤ in <anon> at /tmp/LFLOZXfWOS:1␤ in <anon> at /tmp/LFLOZXfWOS:1␤␤»
moritz evalbot rebuild nom
p6eval OK (started asynchronously)
moritz locally that dies with
Too many positional parameters passed; got 1 but expected 0
nom: my $c = (* + 1) * 2; say $c(5)
p6eval nom 029c30: OUTPUT«12␤» 17:41
moritz so recursive currying works with ops, but not with *.method
jnthn hm, huh. :S
jnthn looks
moritz roast++
17:42 MayDaniel left
jnthn > my $code = *.uc eq 'FOO'; say $code(5) 17:43
Bool::False
> my $code = *.uc eq 'FOO'; say $code('foo')
Bool::True
Testing then will push 17:44
sorear *mumble* niecza isn't ahead of nom anymore :D 17:46
jnthn moritz: As an Englishman, I have to say roast++ indeed ;)
jnthn enjoyed his regular Sunday roast when he lived back in the UK :)
moritz nom: say 1 R- 5 17:47
p6eval nom 029c30: OUTPUT«4␤»
moritz nom: say (1 R- *).(5);
p6eval nom 029c30: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu, Mu %_)␤␤ in method Numeric at src/gen/CORE.setting:560␤ in sub infix:<-> at src/gen/CORE.setting:1877␤ in <anon> at /tmp/VUyzBcFd_8:1␤ in <anon> at /tmp/VUyzBcFd_8:1␤␤»…
jnthn nom: say (1 R- *).WHAT 17:48
p6eval nom 029c30: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu, Mu %_)␤␤ in method Numeric at src/gen/CORE.setting:560␤ in sub infix:<-> at src/gen/CORE.setting:1877␤ in <anon> at /tmp/EwhmQpq2JJ:1␤ in <anon> at /tmp/EwhmQpq2JJ:1␤␤»…
jnthn ah
17:48 thou joined
dalek kudo/nom: 165527d | jnthn++ | src/Perl6/Actions.pm:
Make nested curryings of whatever-curried method calls work (moritz++ for reporting).
17:50
ast: f1a2a79 | moritz++ | S02-types/whatever.t:
fudge whatever.t for rakudo
17:51
moritz b: * = 5; say 'alive'
p6eval b 1b7dd1: OUTPUT«alive␤»
moritz b: * = 5; say 'alive'; say *
p6eval b 1b7dd1: OUTPUT«alive␤Whatever()<0x200d770>␤»
moritz nom: * = 5; say 'alive'; say * 17:52
p6eval nom 029c30: OUTPUT«Cannot assign to a non-container␤ in <anon> at /tmp/zT_Y1ps3SY:1␤ in <anon> at /tmp/zT_Y1ps3SY:1␤␤»
jnthn hm, well, it ain't a container :)
moritz that's for things like my ($first, *, $third) = $str.split('foo')
jnthn wonders what the right way to make that one work is.
moritz special-casing = ? 17:53
17:53 packetknife left
sorear TomC++ # cute parrot-dev@ post 17:53
moritz aye :-)
jnthn moritz: Well, more special cases on the assignment critical path are kinda annoying. 17:54
moritz jnthn: well, that one kicks only in if the RHS is not a container
jnthn oh, I wonder if...
sorear moritz: lhs you mean?
moritz erm, yes
sorry
jnthn moritz: oh, good point, it's a failover.
OK, then ti's cheap enough.
17:55 _jaldhar left
dalek ast: 5a430b3 | moritz++ | S02-types/whatever.t:
rakudo unfudges for whatever.t
18:02
moritz oh noez, the OOM killer eated my thunderbird! 18:03
nom: my @a = 1..4; say @a[1..*].join('|') 18:04
p6eval nom 1c7dde: OUTPUT«2|3|4␤»
moritz \o/ 18:05
moritz closes three long-ish standing tickets 18:08
jnthn++ 18:12
18:13 donri left
dalek ast: 47a4fa9 | moritz++ | S0 (2 files):
more rakudo unfudges
18:13
18:14 SHODAN left 18:15 alester joined
dalek ecza/serialize: 788e3f1 | sorear++ | / (4 files):
Changes required for finishlex/getsig/explain_mystery
18:16
18:19 masonkramer joined 18:26 kaare_ joined
ingy hi moritz 18:30
moritz hi ingy
ingy wanna play with me? 18:31
18:31 donri joined
ingy actually, I was wondering if you'd review some stuff for me 18:31
alester ping dukeleto
moritz ingy: depends on the stuff :-)
alester seen dukeleto?
aloha dukeleto was last seen in #perl6 18 hours 59 mins ago joining the channel.
ingy I've been polishing on the pegex all day
moritz: github.com/ingydotnet/pegex-json-p...r/json.pgx 18:32
moritz I have to eat my supper first, but after that I'll be happy to review it
alester What is winxed? 18:33
github.com/petdance/ack/pull/177
Is it separate from nap? 18:34
ingy moritz: that's working now, with this receiver github.com/ingydotnet/pegex-json-p...ON/Data.pm
moritz -<pair>? ** /~<COMMA>~/
wouldn't that allow several commas in a row?
18:34 miso2217 left
ingy moritz: that's [<pair> ** <COMMA>]? 18:35
benabik alester: Winxed is a system-level language on Parrot. Something like C to PIR's assembler.
ingy ~ is short for <WS>* 18:36
effectively
alester benabik: extension would be what? 18:38
benabik alester: File extension? Most people seem to use .winxed
alester maybe I'll hold off on winxed
but add nqp
if winxed isn't standardized yet
Then again, the only people using nqp are, what, a dozen Perl 6 devs? 18:39
benabik NotFound's very good at balancing needed features vs. not. It's pretty stable.
Only people using winxed are, what, a dozen parrot devs? ;-)
alester yeah, that' 18:40
I meant swinxed
ingy moritz: I had <pair> ** <comma> working
moritz: and I went to do [ <pair> ** <comma> ]? 18:41
benabik winxed is rapidly becoming the main way to develop on Parrot. We used NQP-rx for quite a while, but winxed is closer to the "metal". If you want to work on P6 on Parrot, NQP is the way to go. Most new projects are using winxed.
ingy moritz: but noticed it compiled down to <pair>? ** <comma> internally
moritz: so I thought, sure, why not? that's not so bad 18:42
moritz: also <p>5 **<c> could mean list of 5 and <p> ** <c>? could mean trailing separator optional 18:43
sorear alester: I don't think winxed will ever be standardized, in the way C or Javascript is 18:50
alester: it's a small implementation-defined language like Lua
benabik sorear: Lua's not standardized? People should stop using it immediately. ;-) 18:51
sorear benabik: non sequiter
(today's random idea: add S33 with rules for amending the synopses and turn perl6/specs into a nomic.) 18:52
benabik sorear: I just want people to move to a language with an excellent specifications. Like Perl 6.
;-)
sorear Lua fills Lua's niche far better than Perl 6 can hope to 18:53
19:00 wolfman2000 joined 19:03 thou left 19:07 miso2217 joined
moritz ingy: so why does <pair>? ** <comma> not allow multiple commas in a row? 19:07
perl6: say ',,' =~ /[<pair>?] ** \,/ 19:08
p6eval pugs: OUTPUT«*** ␤ Unexpected "/[<"␤ There is no =~ operator in Perl 6 -- did you mean ~~ (match) or ~= (concat-assign)?␤ at /tmp/asu0OFNHG9 line 1, column 13␤»
..rakudo 165527: OUTPUT«===SORRY!===␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at line 1, near " /[<pair>?"␤»
..niecza v9-32-g380d891: OUTPUT«===SORRY!===␤␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at /tmp/KcxzPpTlBI line 1:␤------> say ',,' =~⏏ /[<pair>?] ** \,/␤␤Parse failed␤␤»
moritz perl6: say ',,' ~~ /[<pair>?] ** \,/
p6eval niecza v9-32-g380d891: OUTPUT«Unhandled exception: Unable to resolve method pair in class Cursor␤ at /tmp/feW2pvouvu line 1 (MAIN C1_ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1543 (CORE Regex.ACCEPTS @ 3) ␤ at /tmp/feW2pvouvu line 1 (MAIN mainline @ 1) ␤ at /home/p6ev…
..rakudo 165527: OUTPUT«Method 'pair' not found for invocant of class 'Cursor'␤ in regex <anon> at /tmp/4KxVL_YUTy:1␤ in method ACCEPTS at src/gen/CORE.setting:5919␤ in <anon> at /tmp/4KxVL_YUTy:1␤ in <anon> at /tmp/4KxVL_YUTy:1␤␤»
..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…
moritz perl6: say ',,' ~~ /[a?] ** \,/
p6eval niecza v9-32-g380d891: OUTPUT«#<match from(0) to(2) text(,,) pos([].list) named({}.hash)>␤» 19:09
..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…
..rakudo 165527: OUTPUT«,,␤»
moritz ingy: matches in perl 6
ingy: I find compiling [a ** b]? to [a? ** b] highly dubious
matches a zero times, then b, then a zero times, then b, then a zero times 19:12
PerlJam alester: just read the recent scrollback and you might want to mention to dukeleto that he can add his own types via the .ackrc file.
19:15 gbacon joined
alester PerlJam: I think it's safe to assume that he knows that. 19:19
moritz adds .nqp to his ackrc 19:20
19:22 alester left
benabik Hm. ackrc you say? That would be useful. 19:25
sorear moritz: I've seen syntaxes like <term>? ** ',' in the wild 19:28
(specifically the Haskell' tuple sections proposal comes to mind)
moritz sorear: that might well be the case, but it's definitive wrong for matching JSON lists 19:29
(which doesn't allow multiple or trailing commas) 19:30
ingy hi moritz
moritz waves again
19:31 wolfman2000 left
moritz ingy: did you see my comments above? 19:31
ingy yeah
moritz one more thing... where are all the character names defined?
ingy well <a> ** <b> matches a or aba etc 19:32
ones sec
moritz yes, and <a>? ** <b> matches a, b, abba, bb, bba, ...
ingy no 19:33
moritz why not?
<a>? matches ''
<b> matches 'b'
ingy because it is a special case
moritz <a>? matches ''
ah
you failed to mention that, I think :-)
ingy: wouldn't it make more sense to put the ? onto the operator then? 19:34
<a> ?** <b>
20:41 < ingy> moritz: and I went to do [ <pair> ** <comma> ]?
ingy moritz: I did think about that, yes
moritz 20:41 < ingy> moritz: but noticed it compiled down to <pair>? ** <comma>
ingy right
moritz that's just plain wrong
... unless you already had the special case implemented at that point 19:35
ingy I did have a special case for ** yeah
and it didn't allow and ?+*
anyway 19:36
it's all up for ideas
which is why I came here
one sec
btw, github.com/ingydotnet/pegex-pm/blo...r/Atoms.pm is where those are currently 19:37
moritz ok, my idea is to write it as '<a> ?** <b>' rather than '<a>? ** <b>', because it's not the same as '[<a>?] ** <b>'
ingy yeah, makes sense
I wanted ** to do ?** and ++ to do ** 19:38
iykwim
moritz that's only nice if you never plan to do possessive quantifiers
ingy github.com/ingydotnet/pegex-json-p...n.pgx.json 19:39
look at the .sep under map
moritz one more thing, are you restricting the regexes to ASCII?
ingy no
just the current atoms are defined that way, but they should not be so special 19:40
moritz ok
ingy they are just Pegex defined rules
whatever I do though needs to support very many programming langs 19:41
moritz then you should think about (1) how to make Unicode properties available
and (2) how get more concistent character names
maybe allow <U+2024> or so
ingy I think you misunderstand
I really just wanted names for punctuation chars 19:42
but really anything between // is a plain old regex
moritz ok
all in all I rather like the pegex syntax 19:43
ingy I'm not even sure how I feel about all the NAMEs, but I'm going with it for now 19:44
well it is heavily influenced by p6 :)
moritz I find some of the NAMES a bit weird
ingy github.com/ingydotnet/testml-pgx/b...testml.pgx 19:45
that is my most complex grammar
moritz they are a wild mixture of HTML entities names and other stuff :-)
ingy it defines TestML
which many of the TestML and Pegex tests are written in
moritz ingy: how do error messages of parse errors look like? 19:46
ingy pretty decent 19:47
I'll gist one
github.com/ingydotnet/pegex-pm/blo...compiler.t
that test has inline testml, fyi
the test suite is amazingly fast
which seems to mean that pegex is fast 19:48
which is nice
moritz: here is a simple Pegex CLI one liner 19:53
gist.github.com/1225480
And I'll make a syntax error...
gist.github.com/1225483 19:54
:)
The grammar actually has that msg built in 19:55
19:55 Moukeddar joined, Moukeddar left 19:56 whiteknight joined
moritz nice 19:56
dalek kudo/nom: e051c8f | jnthn++ | t/spectest.data:
Run S02-types/whatever.t.
ingy moritz: gist.github.com/1225486 is more common
moritz that's... less awesome :-) 19:57
19:58 soh_cah_toa joined 19:59 im2ee left
ingy moritz: with debugging: gist.github.com/1225488 20:00
I think I'll need to add commit syntax soon 20:01
I'm pretty happy with the look of that JSON grammar 20:02
I don't think I need to add in the magic WS matching like Regexp::Grammars now that I have ~ 20:03
but I am less pleased with the code that receives the parse events and turns them into real data
moritz that always feels like boilerplate 20:04
20:04 localhost left
ingy this guy: github.com/ingydotnet/pegex-json-p...ON/Data.pm 20:04
could be just a bit simpler
currently I ast /a(b)c(d)e/ matches as a hash {1=>'b', 2=>'d'} 20:05
20:05 localhost joined
ingy but I should just ['b', 'd'] 20:06
and just 'b' for /a(b)cde/
if a regex has no captures I don't ast the match 20:07
which is nice
anyway I'll try <a> ?** <b> for now 20:08
seems pretty good
The json parser has one serious bug 20:09
it barfs on 0, "" and false
oops!
very soon I'll have a Perl 6 Pegex grammar started 20:10
for te C'Dent model at least
20:11 zb left
ingy since the grammars are just data structures it makes runtime grammar mod pretty easy 20:11
20:11 zb joined
Woodi ingy: you plan to add plain C to C'Dent ? 20:13
moritz -> sleep
Woodi gn moritz 20:14
ingy moritz: night but look at gist.github.com/1225503 20:16
pegex compiling the pegex grammar and using it to parse the pegex grammar :)
that's with no special receiver of course... 20:17
receiving the parse with Pegex::Compiler::AST produces this: github.com/ingydotnet/pegex-pm/blo...r/Pegex.pm 20:18
I made a special thing: > perl -Ilib -MPegex::JSON::Grammar=compile 20:20
will compile that grammar and dump it into itself
So pegex grammar classes are always precompiled 20:21
Woodi: as a backend? C++ for certain
also beend thinking about XS as a C'Dent backend
so you could write p5 xs modules in p6 python or js 20:22
:D
some kind of C backend is a really big goal though 20:23
because then you get people using C'Dent subsets of their language just to get fast compiled modules
but then every other C'Dent backend language wins 20:24
whether they intended that or not
Woodi just clonet C'Dent repo and C marked as output langueage 20:25
ingy ? 20:26
Woodi so, can C'Dent replace Perl[56], Python, Ruby, etc cpmpilers ? :)
*compilers
ingy C'Dent is only for writing modules 20:27
and you have to use a the strict C'Dent langugae subset
but the win is that your module works everywhere
so I don't think it replaces anything 20:28
Woodi so i can get Python module and translate it to Perl6 ?
ingy correct
Woodi :)
ingy wait no
you can write a Foo.cd.py module and compile to .pm6 or .go or whatever 20:29
you can't compile any .py
Woodi it's translate for me...
ingy and currently you can't do anything more than a module that prints hello world 20:30
:)
but that's just a matter of programming
Woodi damn :) 20:31
ingy Pegex is now almost complete enough to start implementing C'Dent in
the idea is to get C'Dent on Pegex this week
then start adding features to C'Dent
Woodi i need any working db driver in Perl6, and was hoping :) 20:32
20:32 pmurias joined
ingy I want to start writing CPAN p5 modules in C'Dent soon 20:32
acutally 20:33
Woodi p6 is in bigger need for modules...
ingy a huge success would be to implement all of Pegex in C'Dent
Woodi can PEG parse Perl ? :) 20:34
ingy it can Parse C'Dent Perl :)
.cd.pm
Woodi k, understud
ingy Woodi: any module I write for CPAN in C'Dent automatically works in P6 :) 20:35
so (for CPAN) is a bit misleading
actually I have no grammar yet for .cd.pm 20:36
20:36 _jaldhar joined
ingy only for .cd.pm6 20:36
but theoretically in can parse cdp5
anyway, back to the trenches...
Woodi so no translation from p[56] to C'Dent, back and forth ? someone need to writr in plain C'Dent and then compile to Perl, Python and rest ? 20:37
gl ingy
ingy there is no plain c'dent. there is .cd.pm6 .cd.py and .cd.js parsers 20:43
and .cd.yaml too :)
but who wants to write an ast by hand?
.cd.yaml is great for testing though 20:44
pmurias ingy: if c'dent is supposed to be the lowest common denominator of dynamic languages won't writing in it be annoying?
ingy pmurias: I hope not 20:45
if you've ported a lot of your own code
you start using idions that translate 20:46
c'dent is pretty much automated porting
20:46 kaare_ left
ingy c'dent is defined at the ast level 20:46
20:46 vlixes joined
ingy so anything that can compile into a given ast is ok 20:47
20:47 dorlamm joined
ingy so we could add a lot of tmtowtdi to the .cd.pm[56] langs 20:47
I mean, just because I can't use hyperoperators in .cd.pm6 is not annoying to me 20:48
if I planned to port it 10 times in the first place 20:49
it would be really dumb to use things that wouldn't work elsewhere
pmurias beating manual porting shouldn't be hard
ingy just pulled hyperoperators out of his butt 20:50
that is a p6 thing, yeah? :)
pmurias doesn't see a reason why .cd.pm6 shouldn't support them ;)
Woodi so you need cd.nqp and perl6 compiler generating nqp code :)
pmurias ingy: yes
ingy actually I think dukeleto and me made .cd.pir 20:51
as an input lang!
Woodi right, pir.
ingy we definitely add .pir to backends
and .nqp too 20:52
pmurias ingy: do a lot of people actually port their code to multiple languages?
ingy sadly I don't think so. I'm trying to change that
that's what acmeism is all about 20:53
with pegex we can start a p6 implementation in any lang!! 20:54
pmurias no
well you can start one 20:55
ingy pegex is really about sharing some of the p6 goodness with everyone
pmurias but you won't be able to fullfil the spec with a grammar that is not in perl6
ingy I really ♥d p6 regexes
pmurias: sure but hey
I think when rakudo adds a pcre extension I'll be able to convert a lot of p6 grammars to pegex and get 1000 times speed boost 20:56
20:58 pernatiy left
ingy pegex is just an approximation or p6regexes, but it's all done in very simple and extendable classes 20:58
tadzik Woodi: re Perl 6 and modules, me silent dream is to bring blizkost back to life make it run more stuff than it used to
ingy hi tadzik 20:59
pmurias ingy: and one other possible problem i see with c'dent is that the apis will be unpythonic/unperlish/unrubish
ingy pmurias: c'dent is not for writing code, it's for writing modules :)
but I don't think that's true anyway 21:00
I've done a ton of porting
and everything generally matches up line for line
once you define your idiom set
21:01 MayDaniel joined
tadzik hi ingy 21:01
pmurias ingy: so you end up having the same api for your modules in all the languages you port it to? 21:02
ingy oh I see what you mean 21:05
sorry it's late
Woodi tadzik: what was a stopper on blizkost ?
21:05 gbacon left
tadzik Woodi: manpower I suppose 21:05
ingy pmurias: yeah sure 21:06
Woodi tuits--
ingy I mean it's targeted at OO langs only
the cool thing is that if you generate C then when you swig or XS it back you get the exact same api 21:09
21:12 MayDaniel left
ingy tadzik: what is blizkost? 21:12
tadzik ingy: Parrot - Perl 5 bridge
so you can use CGI:from<perl5> and it works in Perl 6 21:13
ingy is there current effort to implement p6 in p5?
diakopter no 21:14
ingy pugs had a p5 runtime, yes?
soh_cah_toa that's an interesting idea...
ingy audreyt once showed me that you can build a vm for function programming on top of any lang that supports closures :) 21:15
21:15 dukeleto left
plobsing parrot's m0 has a perl5 backend. so rakudo might conceivably runnable on p5 at some point 21:16
21:16 dukeleto joined
ingy that was here answer to me when I asked if Bash could possibly be a backend for C'Dent 21:16
*her
plobsing bash has closures?
ingy nope 21:17
:)
soh_cah_toa plobsing: i think the current m0 backend is just a prototype and the final implementation won't be p5 but c
ingy it doesn't even have functions that return things
plobsing soh_cah_toa: there are at least some people that want multiple backends
ingy still it was a great answer 21:18
soh_cah_toa i don't really see any advantages to multiple m0 backends but i'm not gonna digress the conversation and debate it here ;) 21:19
ingy what is m0? 21:20
soh_cah_toa ingy: a rework of parrot's internal vm components
plobsing ingy: maybe I've missed something. how does the fact that you can't use one implementation strategy bar the existence of any simple (not too turing tarpit) implementation?
ingy plobsing: it doesn't 21:21
plobsing so how does the answer given have anything to do with the question asked?
ingy well audreyt didn't know if bash had closures 21:22
plobsing ah
ingy it was a great answer with a disappointing ending 21:23
I like hacking in bash sometimes. it's amazing how far you can swim in that turing tarpit
plobsing wait, doesn't creating a new process close-over the environment? couldn't subshells then be treated as closures? 21:28
ingy I leave this as an exercise for the reader :] 21:30
Woodi or use `cat somefile` :)
ingy how does one get a callable reference to a subshell? 21:31
plobsing will now be unable to think about anything else this afternoon. thanks a lot ingy.
ingy is one of the readers
plobsing igny: the PID is the reference. call is done via stdin/stdout (it is a pipe-mill). you can fetch those from /proc/ if necessary. 21:33
ingy plobsing: do you need a thesis topic? 21:35
plobsing what institution would take such a proposal? besides an asylum? 21:38
21:46 dorlamm left
plobsing it does seem like an interesting (and challenging topic). I might try to implement a scheme that way sometime. 21:46
21:57 wallberg left, wolfman2000 joined 22:02 wolfman2_ joined 22:03 wolfman2_ left
ingy plobsing: nice :) 22:03
let me know what comes of it if you do.
22:05 wolfman2000 left 22:17 tokuhiro_ joined 22:20 tokuhir__ left
sorear good * #perl6 22:22
22:26 Trashlord left
dalek ecza/serialize: fb5e02c | sorear++ | / (7 files):
Compiler-side modifications to attach code to subs and run units
22:41
ingy I am finding the ** syntax less and less usefu :( 22:46
useful
it seems I never want just a ** b 22:47
I want [a ** b]? or a [ b a ]+ 22:48
soh_cah_toa ingy: you're saying the ** quantifier doesn't work inside non-capturing groups? 22:50
ingy no 22:52
I'm saying that matching one or more a's separated by b's is not useful to me yet 22:53
I seem to want 0 or more or 2 or more
so the special ** syntax for one or more feels yagni at the moment 22:54
I'm sure ** is more generalized in p6 than what I am using it for
but i feel like I wasted my time implementing it in pegex 22:55
soh_cah_toa ah, ok 22:56
ingy then again, a [ b a ]* has a subtle difference than a ** b
in that I had to return the result of the first as [a,[a,a,...]] 22:57
but with ** I can return [a,a,a,...]
which is much cleaner
sigh. I'll pester moritz tomorrow 22:59
soh_cah_toa :)
plobsing ingy: does pegex have semantic expressions, or does it always return the tree of matched terminals? 23:04
23:07 [particle]1 joined, vlixes left
sorear plobsing: iirc, pegex uses an actions-like mechanism to make pegex files more language-independant 23:08
plobsing: it's a little more powerful than p6 actions because it can trigger not just on rule successful exit but also on rule start and rule failure 23:09
23:09 [particle] left
plobsing sorear: cool! can the actions rewrite the tree being returned? 23:11
sorear plobsing: unknown 23:13
plobsing I ask, because the [a, [a, [...]]] problem could easily be solved by rewritting the tree as we bubble up 23:14
my experience with pegs is from ometa, where listOf is easy for users to implement (but is common enough that it became a builtin). 23:17
sorear does ohmeta use combinatorial pegs like parsec? 23:19
plobsing sort of. parameterized rule calls are implemented by creating a new stream with the arguments at the head and the current stream as a shared tail. 23:21
23:21 egillth left
plobsing it is a rather simple argument-passing mechanism, but it lets you do cool things like pattern-match on your arguments the same way you pattern-match on the input 23:22
(also, most implementations, including the original, are called OMeta)
only mine is ohm
23:23 whiteknight left 23:24 whiteknight joined 23:25 dukeleto left 23:26 dukeleto joined, dukeleto left
sorear plobsing: wait, wait, I think I confused myself. I thought ometa was the previous name of winxed? 23:26
23:26 dukeleto joined, dukeleto left 23:27 dukeleto joined, dukeleto left
plobsing no. ometa is a peg system written by alessandro warth, originally in smalltalk, but then also in javascript 23:27
it has since been ported to several languages, winxed included 23:28
23:28 dukeleto joined 23:32 dukeleto left, Exodist joined 23:33 dukeleto joined 23:44 molaf left 23:46 pmurias left 23:49 Trashlord joined 23:51 Trashlord left 23:56 molaf joined 23:57 LoRe_ joined