»ö« 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.
dalek p/bs: 947ad8b | jnthn++ | src/6model/serialization.c:
Improve error on unimplemented serialization object type to be more informative.
00:03
p/bs: cca9005 | jnthn++ | src/6model/serialization.c:
Handling of Pointer PMC in serializer.
p/bs: 590d356 | jnthn++ | src/6model/serialization.c:
Block GC while we serialize, to be on the safe side. Sadly, doesn't eliminate the serializer segfault Rakudo's CORE.setting now triggers...
p/bs: 75d8264 | jnthn++ | src/6model/reprs/P6opaque.c:
Add a sanity check for missing serialize function in P6opaque.serialize.
p/bs: bf9f634 | jnthn++ | src/6model/reprs/P6bigint.c:
Implement serialize/deserialize for P6bigint REPR.
kudo/bs: 3878d27 | jnthn++ | src/Perl6/World.pm:
Add static code ref marking; gets us a bit further with the serialization.
00:04
jnthn Enough for today...that gets things a decent nudge further, though :) 00:10
colomon jnthn++ 00:11
cognominal jnthn++ 00:12
lue jnthn++ # I'm very interested in your memory-saving serialization efforts, jnthn :) 00:19
00:23 bkolera joined
jnthn Hopefully will have some numbers on how much of an improvement it is in the coming days. :) 00:24
jnthn goes for sleep & 00:26
00:28 lue left 00:29 Trashlord joined 00:30 PacoAir left 00:32 PZt joined 00:38 snearch joined 00:56 snearch left 01:01 lue joined
colomon anyone out there know where the specs are for run and qx? 01:04
TimToady run is in S29-functions 01:05
colomon TimToady++
TimToady qx is S02:Adverbs_on_quotes 01:06
colomon TimToady: why is run run ( *$cmd, *@args, ... ) 01:13
*$cmd?
sorear *$cmd (NYI in niecza) means that the slurpy list is initialized, and $cmd ::= @slurpy.shift 01:14
it means that you can do run(@argv) and not fuss with separating off the command first 01:15
it could also be written run(*@argv)
colomon sorear++
01:16 preflex_ joined
colomon how do I pass null to a C# function (from niecza)? 01:17
Str ?
(for type string)
01:17 preflex left, preflex_ is now known as preflex
sorear colomon: (null str) 01:18
colomon has forgotten the nuances of calling CLR libraries from p6-niecza. 01:23
sorear: do you recall how to create a string[]? 01:49
I had it in one of my scripts at one point, but can't find it now.... 01:50
Array... 02:00
02:03 havenn left 02:09 Chillance left 02:12 NamelessTee left 02:19 sisar joined, ribayr left, tokuhirom joined
sorear colomon: it's usually easier to do that sort of marshalling at the C# level; look at Builtins.UnboxLoS 02:20
02:21 thou joined 02:25 seanstickle joined 02:26 wolfman2000 joined 02:27 ribayr joined, ribayr left, ribayr joined 02:32 thou left
sorear now appears to be writing a mono profiler (sort of) 02:42
02:46 ksi left 02:52 havenn joined
sorear yay, I have mono running my profiler 03:05
03:07 dbr left
dalek ecza: ef5fdf8 | sorear++ | tools/extheapshot.c:
Add a skeleton of a heap profiler extracted from Mono
03:15
03:22 orafu left, orafu joined 03:33 preflex_ joined 03:34 preflex left, preflex_ is now known as preflex 03:38 havenn left 03:40 havenn joined 03:49 tokuhirom left 03:52 Patterner left 03:54 aindilis joined
dalek ecza: 06138f0 | sorear++ | tools/extheapshot.c:
Add a crude ability to count objects per high-level type
04:08
sorear it seems that the most numerous objects during -C CORE execution are Matches (25522)
followed by Hash, Int, CallFrame, Str, Array, Num, Parameter, Signature, Block, Cursor, Method 04:09
etneg checks for niecza's official site 04:10
sorear github.com/sorear/niecza 04:11
etneg waits for it to be moved to a niecza.com 04:12
04:13 plobsing left
sorear out of 193098 objects total, Match, Hash, Int, CallFrame, and Str account for 107754 04:13
it would probably be better if I had byte counts, but that accounting would be very hard 04:14
etneg: I'm not a commercial entity
etneg well then niecza.org 04:15
04:20 birdwindupbird joined 04:30 noam joined
sisar um, what is HTAAF ? #Google does not help. Though i got someting like "think of Camel introduction". 04:31
*HTAAOF
04:32 Psyche^ joined, Psyche^ is now known as Patterner 04:33 noam_ left 04:36 MayDaniel left
jlaire sisar: have the appropriate amount of fun 04:39
04:39 havenn left
sisar jlaire: ah. thanks 04:39
05:14 marmalade left
moritz \o 05:39
sorear o/ moritz 05:42
moritz <sorear> It's a workaround for the fact that some compilers implement is using .Str 05:45
erm, is() is *specced* to do a string comparison 05:46
sorear oh
moritz if tehre are "some compilers" that use different semantics, they are buggy :-)
sorear for some reason I thought is() was specced to do ===
moritz no
sorear well, I'm glad I haven't "fixed" niecza yet!
moritz but one could use is_deeply to compare type objects 05:47
05:49 zhangkaizhao joined 05:53 lestrrat left, lestrrat joined
[Coke] "total", 4410, 6, 1974, 302, 6692, 23430 05:56
(pugs) 05:57
dalek ast: e4b089d | coke++ | S (16 files):
pugs fudges
gs.hs: abaccdf | coke++ | t/spectest.data:
run fudged tests
05:58
[Coke] b: say 4410 / 20298 05:59
p6eval b 1b7dd1: OUTPUT«0.217262784510789␤»
[Coke] pugs at 21.73% if the big 2 don't move before the run later.
dalek gs.hs: 76de685 | moritz++ | Pugs/ext/Test/lib/Test.pm:
untested implemented of eval_lives_ok
06:01
moritz eeks, that broke stuff
dalek gs.hs: 628adae | moritz++ | Pugs/ext/Test/lib/Test.pm:
fix syntax error
06:02
[Coke] where is gist specced? 06:05
moritz S29, S02 06:07
[Coke] ah, and S32.
06:11 seanstickle left 06:14 birdwindupbird left
[Coke] b: say ( 4410 + 658 ) / 20298 # increasingly hard to reach fruit. 06:14
p6eval b 1b7dd1: OUTPUT«0.24967977140605␤»
sorear wonders if we need a one-letter alias for at least one maintained impl 06:17
geekosaur wonders if it would be (a) useful (b) too evil, to have "*" 06:18
moritz geekosaur++ # that's the right mind set 06:19
sorear: I wouldn't object
lue Has anyone else tried compiling the most recent nqp/bs?
moritz lue: I'm pretty sure jnthn++ has
lue Of course :) . I seem to be getting an error with an undeclared NEED_CONTINUATION (in serialization.c). 06:20
moritz lue: oh, that means your parrot is too old 06:21
lue: in the development branches, we're not very good at keeping track of the parrot and nqp revisions we need 06:22
lue That's... interesting. I *just* recompiled a new parrot (pulled at around the same time as nqp/bs and rakudo/bs). Lemme check... yep, up-to-date
moritz lue: which parrot revision have you compiled? 06:25
lue Oh, maybe I have something too new (nqp's tools/build/PARROT_REVISION say 4.0.0, I have 4.1.0)
moritz you need at least RELEASE_4_1_0-11-something 06:26
dalek ast: 1e33805 | coke++ | S (7 files):
pugs unfudge for eval_lives_ok
moritz huh, but I get the same error
moritz checks 06:27
06:27 zhangkaizhao left 06:28 zhangkaizhao joined
moritz oh, maybe then the parrot is too new :( 06:28
lue I'll try bumping down to 4.0.0 then 06:29
moritz 4.1.0
06:30 preflex left, preflex_ joined
lue Do you mean I should bump down to 4.1.0? (Or are you just listing your parrot version?) 06:31
06:31 preflex_ is now known as preflex, noam left, noam joined
moritz I spend all my days making meaningless lists of parrot versions. It's such fun! 06:36
06:37 Oofbitau1 joined 06:38 Oofbitau1 left
lue switching to RELEASE_4_1_0 (this'll take a while...) 06:47
07:12 birdwindupbird joined
moritz std: my ($a, $b) .= new 07:12
p6eval std a540d4e: OUTPUT«ok 00:01 112m␤»
07:16 kaare_ joined
moritz std: :($a, $b:) 07:19
p6eval std a540d4e: OUTPUT«ok 00:01 110m␤»
07:21 birdwindupbird left
moritz std: :($.) 07:22
p6eval std a540d4e: OUTPUT«===SORRY!===␤Unable to parse signature at /tmp/AXtxXcEwZz line 1:␤------> <BOL>⏏:($.)␤Couldn't find final ')'; gave up at /tmp/AXtxXcEwZz line 1:␤------> :($⏏.)␤ expecting any of:␤ constraint␤ param_sep␤
..para…
moritz std: :(:$.)
p6eval std a540d4e: OUTPUT«===SORRY!===␤Unable to parse signature at /tmp/VRRNIys7KO line 1:␤------> <BOL>⏏:(:$.)␤Couldn't find final ')'; gave up at /tmp/VRRNIys7KO line 1:␤------> :(:$⏏.)␤ expecting any of:␤ constraint␤ param_sep␤ pa…
moritz nom: :($.)
p6eval nom 4f0ed5: OUTPUT«===SORRY!===␤Unable to parse colonpair, couldn't find final ')' at line 2␤»
moritz nom: sub (:$.) { } 07:23
p6eval nom 4f0ed5: OUTPUT«===SORRY!===␤Missing block␤at /tmp/Kx6USJBMuU:1␤»
moritz nom: sub ($.) { }
p6eval nom 4f0ed5: OUTPUT«===SORRY!===␤Missing block␤at /tmp/SMW7SFBkRd:1␤»
moritz I'm trying to trigger an error "Cannot declare $. parameter in signature without an accessor name" which I found in rakudo's Actions.pm 07:24
nom: sub ($.foo) { } 07:25
p6eval nom 4f0ed5: ( no output )
moritz nom: sub (:$.foo) { }
p6eval nom 4f0ed5: ( no output )
moritz but it seems the parser doesn't ever allow that error to trigger
or I'm not creative enough :-)
dalek kudo/nom: 9d39e88 | moritz++ | src/ (2 files):
X::Syntax::Signature::InvocantMarker
07:26
moritz perl6: my @fib := 1, 1, *+* ... *; say @fib[10] 07:29
p6eval rakudo 4f0ed5, niecza v14-72-gf99bd59: OUTPUT«89␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected " say"␤ at /tmp/t1aCiylEwn line 1, column 28␤»
geekosaur nom: class Foo { method foo ($.) { } } 07:32
p6eval nom 4f0ed5: OUTPUT«===SORRY!===␤Missing block␤at /tmp/3RhEVvfNF2:1␤»
geekosaur didn't think so, but what the heck
lue nom: sub ($., $a) { say $a;}
p6eval nom 4f0ed5: OUTPUT«===SORRY!===␤Missing block␤at /tmp/zd7brrjgrD:1␤» 07:33
lue my guess is that the dot in $. is being handled by something else first (sub (($.)) { } generates a different error about missing right paren) 07:38
07:48 birdwindupbird joined 07:59 sisar left 08:11 birdwindupbird left
dalek ecza: 3d88c41 | sorear++ | tools/extheapshot.c:
Start on full implementation of blaming heap profiler
08:20
colomon sorear: how do I pass an @variable to a sub in Q:CgOp? the sub is expecting a Variable... 08:27
sorear {@variable} 08:28
colomon sorear++
sorear: I've got run all hooked up using GLib.Process.SpawnSync (no fallback yet). But it's failing when I try to execute "ls" using it: GLib.GException: Failed to execute child process "ls" (No such file or directory) 08:33
sorear try using an absolute path 08:34
colomon ooo, that at least gets me a different error
System.InvalidCastException: Cannot cast from source type to destination type. 08:35
sorear pass --debug=casts to mono to get a slightly better error
colomon I guess this may have something to do with my second question: how do I handle "out" parameters using Invoke?
08:36 bkolera left
sorear see WritebackRefs in NieczaCLR.cs 08:36
colomon Unable to cast object of type 'System.Boolean' to type 'System.Int32'.
that error I understand. :)
Teratogen bah, it should cast it to a 0 or 1. 08:40
I never heard of anything so silly!
colomon sorear: fixing the return value cast and using the absolute location of ls seems to make it work. still trying to figure out how WritebackRefs works to get results from the ls command... 08:44
08:50 Tedd1 joined
colomon ooo, I think I've got it 08:50
boo-ya! 08:53
it's definitely working 08:55
gonna try to get back to sleep now, and clean it up in the morning. 09:02
sorear++
09:13 isBEKaml joined
isBEKaml [Coke]++ # pugs! 09:14
moritz++ and masak++ too 09:15
09:16 noam_ joined 09:20 noam left
isBEKaml hackage down? I'm trying to build latest pugs, but it's stuck on cabal update while retrieving package list from hackage. :( 09:22
dalek ecza: aaedd91 | sorear++ | tools/extheapshot.c:
Finish the basic mechanism for the new profiler; needs more description functions
09:23
09:23 noam__ joined 09:27 noam_ left 09:30 noam_ joined 09:33 kaare__ joined, kaare_ left
dalek ecza: 05fa915 | sorear++ | lib/Cursor.cs:
Fix retention of call frames by way of unneeded LTM construction lists
09:33
09:34 noam__ left
sorear memory usage is down to 150m for the setting, from ~250m at the beginning of the week 09:38
moritz \o/
sorear I'll probably have to release mostly as is 09:40
09:43 NamelessTee joined 09:46 tokuhirom joined 09:50 packetknife joined
sorear STD.pm6 is *almost* back under a minute, and uses well under 200m 10:00
sorear -> sleep
10:01 packetknife left 10:10 xinming_ left 10:16 sisar joined, am0c joined
fsergot o/ 10:17
sisar hi ! 10:18
cognominal nom: sub t($/) { say $/.^name }; t(1)
p6eval nom 9d39e8: OUTPUT«Int␤»
10:19 birdwindupbird joined
cognominal should not the parameter $/ be contrained to be a Match? 10:19
sisar perl6: my $a = 'd'; say $a +4;
p6eval pugs b927740, rakudo 9d39e8: OUTPUT«4␤»
..niecza v14-77-g05fa915: OUTPUT«Unhandled exception: Cannot parse number: d␤ at /home/p6eval/niecza/lib/CORE.setting line 1360 (die @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3398 (ANON @ 10) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3400 (NumSyntax.str2num @ 4) ␤ at /h…
cognominal *constrained.
sisar wth. can someone explain ? ^^ 10:20
cognominal 'd' cannot be converted to a number 10:21
geekosaur I think the real question is why did rakudo take it as 0 instead of complaining 10:22
sisar cognomonal: what about rakudo & pugs ?
geekosaur (seems to me niecza is right. pugs is just old, per usual...)
sisar geekosaur: yep !
geekosaur sisar, pugs has not been updated beyond being able to build it, it still follows some rules that no longer apply 10:23
rakudo ought to know better but may be doing something strange in terms of numeric parsing. 10:25
isBEKaml buubot_backup: eval print 'd' + 4;
buubot_backup isBEKaml: 41
geekosaur rakudo: my $a = 'g'; say $a + 4;
p6eval rakudo 9d39e8: OUTPUT«4␤»
geekosaur hm, ok, first idea out the window
rakudo: my $a = 'duh'; say $a + 4; 10:26
p6eval rakudo 9d39e8: OUTPUT«4␤»
geekosaur that be b0rked
10:26 dukeleto left 10:27 dukeleto joined
isBEKaml b: my $foo='h'; say 4 + $foo; 10:27
p6eval b 1b7dd1: OUTPUT«4␤»
isBEKaml hmm, that was always like this?
b: my $foo = 'd'; +$foo.say; 10:28
p6eval b 1b7dd1: OUTPUT«d␤»
isBEKaml niecza: my $foo = 'd'; +$foo.say;
p6eval niecza v14-77-g05fa915: OUTPUT«d␤»
isBEKaml Am I misremembering something now or isn't +$x numifying anymore? 10:29
perl6: my $foo='foobarbaz'; say +$foo;
p6eval niecza v14-77-g05fa915: OUTPUT«Unhandled exception: Cannot parse number: foobarbaz␤ at /home/p6eval/niecza/lib/CORE.setting line 1360 (die @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3398 (ANON @ 10) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3400 (NumSyntax.str2num @ 4) … 10:30
..pugs b927740, rakudo 9d39e8: OUTPUT«0␤»
isBEKaml perl6: my $foo='f'; say +$foo;
p6eval niecza v14-77-g05fa915: OUTPUT«Unhandled exception: Cannot parse number: f␤ at /home/p6eval/niecza/lib/CORE.setting line 1360 (die @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3398 (ANON @ 10) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3400 (NumSyntax.str2num @ 4) ␤ at /h…
..pugs b927740, rakudo 9d39e8: OUTPUT«0␤»
isBEKaml that's more like it.
sisar what is +$var supposed to do ? 10:33
fsergot nom: say +'1'; 10:34
p6eval nom 9d39e8: OUTPUT«1␤»
fsergot It changes to Int
nom: say +'1'.WHAT;
p6eval nom 9d39e8: OUTPUT«use of uninitialized value of type Str in numeric context␤0␤»
fsergot nom: say (+'1').WHAT; 10:35
p6eval nom 9d39e8: OUTPUT«Int()␤»
fsergot sisar: :)
isBEKaml sisar: it converts the var to numeric form. like a .Int 10:36
perl6: my $limit="4"; for 0..^ +$limit { say "a" } 10:37
p6eval pugs b927740, rakudo 9d39e8, niecza v14-77-g05fa915: OUTPUT«a␤a␤a␤a␤»
sisar ok, so +'f' should give zero (like rakudo) or error (like niecza) ? or maybe f's ASCII value or something?
fsergot nom: say (+'1.1').WHAT; 10:38
p6eval nom 9d39e8: OUTPUT«Rat()␤»
isBEKaml sisar: I'm leaning towards niecza. If you're thinking like Java, that's a NumberFormatException. :)
sisar isBEKaml: thats allright, but what do the specs have to say about it? 10:39
isBEKaml sisar: can't say for sure. The best I could pick up is S03:618 10:40
perl6: +Int.say; # undefined behaviour?
p6eval pugs b927740: OUTPUT«Int␤»
..rakudo 9d39e8, niecza v14-77-g05fa915: OUTPUT«Int()␤»
isBEKaml sisar: now that I read it again, it seems to be saying that the return value should be the least value of a number. In that case, rakudo and pugs would be right. 10:42
sisar isBEKaml: did you interpret "the narrowest appropriate type"(S03:618) to mean "should be the least value of a number" ? 10:44
isBEKaml sisar: yes - in the scenario of a var not being a number. 10:45
fsergot perl6: say (+'f2').WHAT;
p6eval niecza v14-77-g05fa915: OUTPUT«Unhandled exception: Cannot parse number: f2␤ at /home/p6eval/niecza/lib/CORE.setting line 1360 (die @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3398 (ANON @ 10) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3400 (NumSyntax.str2num @ 4) ␤ at /…
..pugs b927740: OUTPUT«Num␤»
..rakudo 9d39e8: OUTPUT«Int()␤»
isBEKaml perl6: say (+'e42').WHAT 10:46
p6eval niecza v14-77-g05fa915: OUTPUT«Unhandled exception: Cannot parse number: e42␤ at /home/p6eval/niecza/lib/CORE.setting line 1360 (die @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3398 (ANON @ 10) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3400 (NumSyntax.str2num @ 4) ␤ at …
..pugs b927740: OUTPUT«Num␤»
..rakudo 9d39e8: OUTPUT«Int()␤»
isBEKaml perl6: say (+'1.5e42').WHAT 10:47
p6eval rakudo 9d39e8, niecza v14-77-g05fa915: OUTPUT«Num()␤»
..pugs b927740: OUTPUT«Num␤»
sisar isBEKaml: i think it is not clear at all what is meant by "narrowest .. ". Lets wait for TimToady, or someone who knows better to clear this up
10:50 snearch joined
isBEKaml sisar: I'm no expert, but I'm thinking of numeric types as containers for bounded numeric values. The narrowest appropriate scope would then be the least bound of the numeric scope applicable. 10:51
10:51 bacek left
isBEKaml sisar: In the case above where '+e42' yielded an Int(), while '+1.5e42' yielded a Num, what I said above seems to hold. 10:52
sisar isBEKaml: maybe yes, maybe no. #reluctant to agree, yet :)
back to my original problem, if $x = <someAlphabet>, and i want to increase $x by 2, i.e. 'a' goes to 'c' , how would i do that ? 10:53
isBEKaml just be aware that this would fail when you're talking about Complex, unordered.
jnthn mornin' 10:55
isBEKaml jnthn! \o/
nom: 'aa'.succ.say;
p6eval nom 9d39e8: OUTPUT«ab␤»
isBEKaml nom: 'a'.succ.say;
p6eval nom 9d39e8: OUTPUT«b␤»
isBEKaml sisar: ^^
sisar isBekaml: thanks :) 10:56
isBEKaml nom: my @foo=<a b c d>; @foo.map { .succ }.gist.say; 10:58
p6eval nom 9d39e8: OUTPUT«===SORRY!===␤Confused␤at /tmp/LKZ1zHzOpF:1␤» 10:59
isBEKaml nom: my @foo=<a b c d>; say @foo.map { .succ }
p6eval nom 9d39e8: OUTPUT«===SORRY!===␤Confused␤at /tmp/38apvdD6dT:1␤»
isBEKaml grumbles about nommap... 11:01
jnthn nom: my @foo=<a b c d>; say @foo.map: { .succ } 11:02
p6eval nom 9d39e8: OUTPUT«b c d e␤»
isBEKaml nom: my @foo=<a b c d>; say @foo>>.succ;
p6eval nom 9d39e8: OUTPUT«b c d e␤»
jnthn Nothing to do with map - you need a colon if you're using that syntax for a method call.
(general syntax rules)
isBEKaml jnthn: Ah, I see.. generally, can I say that ": { ... }" would need a callable block in its signature? 11:03
jnthn: for future help, how do I ask the compiler to give me the method signature for any function/multi?
jnthn isBEKaml: No, it's actually just another way to write the argument list
$foo.meth(arg1, arg2) can also be $foo.meth: arg1, arg2 11:04
nom: Array.^find_method('map').signature.perl.say 11:05
p6eval nom 9d39e8: OUTPUT«:(Any , Any $block, Mu %_!)␤»
jnthn nom: Array.^find_method('grep').signature.perl.say
p6eval nom 9d39e8: OUTPUT«:(Any , Mu $test, Mu %_!)␤»
jnthn etc. 11:06
isBEKaml jnthn: Gee, thanks! Though it doesn't say which params are optional or implicit, I sure hope you'd be including that in the Metamodel as well!
jnthn It's...getting that last one really wrong. :/
Should be *%_
11:07 bacek joined
jnthn nom: class A { method foo($a, $b?) { } }; A.^find_method('foo').signature.perl.say 11:07
p6eval nom 9d39e8: OUTPUT«:(A , Any $a, Any $b?, Mu %_!)␤»
isBEKaml jnthn: just what I meant. I kind of figured that %_ are implicit..
jnthn Yeah, it should be tagged slurpy, not required. :/
I mean, I'm guessing it actually is set up that way. 11:08
It's just Signature.perl doing something silly
isBEKaml nom: class A { method foo($a, $b?) { } }; A.^find_method('foo').signature.say
p6eval nom 9d39e8: OUTPUT«:(A , Any $a, Any $b?, Mu %_!)␤»
jnthn It's correct until the final parameter.
isBEKaml yes 11:09
does .say .perl too?
^^ Signatures
jnthn Looks like Signature.gist delegates to .perl or something.
Which seems reasonable.
11:11 Trashlord left
isBEKaml jnthn: Where Mu comes in, is that something meant for discarding more params than defined signature? # I think not... 11:12
nom: class A { method foo($a, $b, $c?) { say $a, $b; }; }; my $ff = A.new; $ff.foo(23,42,45 89238); 11:13
p6eval nom 9d39e8: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2␤»
jnthn It's kinda meaningless on a slurpy.
Missing...either a comma or a . there 11:14
tadzik good morning
isBEKaml nom: class A { method foo($a, $b, $c?) { say $a, $b; }; }; my $ff = A.new; $ff.foo(23,42,45,89238);
p6eval nom 9d39e8: OUTPUT«Too many positional parameters passed; got 5 but expected between 3 and 4␤ in method foo at /tmp/1LsXPOzcaG:1␤ in block <anon> at /tmp/1LsXPOzcaG:1␤␤»
isBEKaml nom++ #params no more than what's defined. 11:15
jnthn tadzik: Morning finished only 14 minutes ago! Good going!
isBEKaml tadzik: o/
tadzik jnthn: better than usual :)
jnthn tadzik: Aye. :)
11:25 Trashlord joined 11:34 sisar left 11:37 isBEKaml left 11:43 ascent_ joined 11:44 ascent_ left 11:55 birdwind1pbird joined 12:05 isBEKaml joined 12:10 mj41 left 12:11 isBEKaml left
dalek p/bs: 600a772 | jnthn++ | src/pmc/nqplexinfo.pmc:
Make sure we don't lose the static_code reference over the PBC boundary.
12:12
kudo/bs: 5bc64cc | jnthn++ | src/pmc/perl6lexinfo.pmc:
Update Perl6LexInfo to save static_code ref over the PBC boundary also.
12:24 seanstickle joined 12:26 jack123 joined, lateau__ joined 12:30 jack123 left 12:31 Chillance joined 12:42 noam_ left 12:45 noam_ joined 12:46 lateau__ left 13:04 ggoebel joined 13:19 birdwind1pbird left 13:36 am0c left 13:39 sisar joined 13:40 whiteknight joined 13:45 birdwindupbird left 13:47 mj41 joined
masak good postnoon, #perl6. 14:01
fsergot masak \o/ 14:03
masak \o/ 14:04
fsergot perl6: sub infix:<I>(@a, @b){ my @r gather for @a { take $_ when any(@b) & !any(@r);}} say <a b c d> I <a h j>; 14:05
p6eval pugs b927740: OUTPUT«*** ␤ Unexpected "gather"␤ expecting "?", "!", trait, "=", infix assignment, operator or "}"␤ at /tmp/M9nmWyZwb3 line 1, column 30␤»
..niecza v14-77-g05fa915: OUTPUT«===SORRY!===␤␤Two terms in a row at /tmp/PQ_9bTe6EB line 1:␤------> sub infix:<I>(@a, @b){ my @r ⏏gather for @a { take $_ when any(@b) & !␤␤Parse failed␤␤»
..rakudo 9d39e8: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
fsergot eh 14:06
14:06 mj41 left
fsergot perl6: sub infix:<I>(@a, @b){ my @r = gather for @a { take $_ when any(@b) & !any(@r);}} say <a b c d> I <a h j>; 14:06
p6eval niecza v14-77-g05fa915: OUTPUT«===SORRY!===␤␤Strange text after block (missing comma, semicolon, comment marker?) at /tmp/ZLd9CWuUg2 line 1:␤------> @a { take $_ when any(@b) & !any(@r);}}⏏ say <a b c d> I <a h j>;␤␤Parse failed␤␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected "@r"␤ expecting "=", operator, ":", ",", "}", context or "("␤ at /tmp/xzqjrfJMUR line 1, column 27␤»
..rakudo 9d39e8: OUTPUT«===SORRY!===␤Confused␤at /tmp/IVtq4NVqPB:1␤»
fsergot perl6: sub infix:<I>(@a, @b){ my @r = gather for @a { take $_ when any(@b) & !any(@r);}}; say <a b c d> I <a h j>;
sorry
p6eval pugs b927740: OUTPUT«*** ␤ Unexpected "@r"␤ expecting "=", operator, ":", ",", "}", context or "("␤ at /tmp/tmlCeOMFxh line 1, column 27␤»
..rakudo 9d39e8, niecza v14-77-g05fa915: OUTPUT«a␤»
fsergot nom: sub infix:<I>(@a, @b){ my @r = gather for @a { take $_ when any(@b) & !any(@r);}}; say <a b c d> I <a h j c>; 14:07
p6eval nom 9d39e8: OUTPUT«a c␤»
fsergot Is there a built-in functions which returns intersection of 2 arrays?
function* 14:08
masak there's the set intersection function/method. 14:10
github.com/sorear/niecza/blob/mast...ting#L2057 14:12
fsergot \o/ :) 14:14
masak I didn't find any word methods for those. maybe that's too much repetition to have all three of unicode ops, texas ops, and word methods? 14:16
.intersection, .union, etc.
fsergot How easily to convert char to hex representation? :) 14:24
nom: 'A'.ord.base(16).say; 14:25
p6eval nom 9d39e8: OUTPUT«41␤»
fsergot ?
:)
jnthn Think that's probably the easiest way :) 14:26
14:27 ascrazy joined, xinming joined 14:35 Chillance left, xinming left, Chillance joined 14:42 seanstickle left
fsergot Error which is showed when We start nom with file that doesn't exist as argument is quite strange, isn't it? 14:43
Only the first line of whole error msg is needed. 14:44
:)
s/start/run/ :) 14:45
jnthn Then patch it. :) 14:46
The backtrace is indeed useless there.
Or if you're not sure how to patch it, ticket it. :) 14:47
fsergot jnthn, could You help me? :)
jnthn It'll likely be somewhere in HLL::Compiler
In the NQP repo
fsergot jnthn++ thanks
jnthn fsergot: Line 404, in evalfiles 14:48
oh, that's in my branch, may be a tad off
Anyway, the die there is what results in the backtrace 14:49
colomon niecza: say Mu.WHAT === Mu.WHAT
p6eval niecza v14-77-g05fa915: OUTPUT«Unhandled exception: Nominal type check failed in binding '$l' in 'infix:<===>'; got Mu, needed Any␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (infix:<===> @ 1) ␤ at /tmp/1saETMLb0u line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting li…
cognominal nom: say Match ~~ Match:U
p6eval nom 9d39e8: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Match:U' called (line 1)␤»
colomon niecza: say Any.WHAT === Any.WHAT
p6eval niecza v14-77-g05fa915: OUTPUT«True␤»
cognominal I suppoose :U and :D should work outside signature. Not sure if they are regular adverbs (which are not implemented) 14:50
jnthn fsergot: If you can change it to print to stderr and then exit with code 1 or so I guess that works. 14:51
14:51 noam__ joined
jnthn cognominal: That would imply that they have a first-class representation. 14:51
14:51 noam__ left
fsergot jnthn: Ok, I'll. :) Now I'm looking for evalfiles :) 14:51
jnthn cognominal: Which isn't the case just yet.
14:51 noam__ joined
jnthn fsergot: OK. Note, nqp repository :) 14:52
14:52 noam__ left
cognominal jnthn: what do you mean by "they"? 14:52
fsergot jnthn: found in src/HLL/Compiler.pm \o/
14:52 noam joined
jnthn cognominal: Foo:D and Foo::U 14:53
er
Foo:U
cognominal adverbs are pairs, aren't they
jnthn cognominal: Yes but they have to be given semantics on order to mean anything.
14:53 noam_ left
cognominal yes 14:54
jnthn cognominal: At the moment the only thing that does that is the signature handling.
cognominal yes, that's my point :)
colomon niecza: say Mu.WHAT.gist === My.WHAT.gist
p6eval niecza v14-77-g05fa915: OUTPUT«===SORRY!===␤␤Undeclared name:␤ 'My' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1344 (die @ 3) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 33) ␤ at /home/p6e…
colomon niecza: say Mu.WHAT.gist === Mu.WHAT.gist 14:55
p6eval niecza v14-77-g05fa915: OUTPUT«True␤»
jnthn cognominal: I suspect they should work "first class".
cognominal: Didn't work out exactly how to factor it yet.
14:55 am0c joined
cognominal that's what S12:1593 implies 14:55
fsergot jnthn: If I change something in nqp on my machine, I'll have to recompile the whole rakudo? 14:58
jnthn fsergot: yes
fsergot: Though you can test your chagne in nqp repo first
fsergot: Since if you do nqp something-that-does-not-exist
then it should not have the backtrce
fsergot jnthn++: thank You. :) 14:59
jnthn Thanks for working on the fix :) 15:02
15:03 PacoAir joined
dalek p/bs: 9acb660 | jnthn++ | src/6model/serialization.c:
Improved diagnostics for Parrot Object types sneaking into places that need serialization.
15:08
p/bs: 5fb6da3 | jnthn++ | src/6model/serialization.c:
Look for COMPILER_STUB marker and, if seen, don't serialize outer.
kudo/bs: 5fb6c0b | jnthn++ | src/Perl6/ (2 files):
Tag compile-time stubs so we don't try and serialize their outer (which is the create_code_object method in World).
15:10 tokuhirom left, noam_ joined 15:13 noam left
dalek p/bs: efcb770 | jnthn++ | src/6model/serialization.c:
Skip over any CallContext we encounter - future Rakudo refactors will avoid the need for this hack in the long run. And...tada! We successfully serialize CORE.setting, producing 1393664 bytes of serialized data with 10578 strings in the string heap. Sadly, we then explode in the optimizer...
15:23
kudo/bs: d3bd66a | jnthn++ | src/Perl6/Actions.pm:
Fix a pirop signature (nothing to do with this branch, just spotted it).
masak jnthn++!
jnthn No word on if it deserializes again yet, mind ;) 15:24
masak psshf, details ;)
jnthn Though those kinds of issues have been very rare.
15:24 mj41 joined
jnthn Well, more fun coming yet but...time for a walk. bbiab 15:25
masak yay, more fun! 15:28
15:30 am0c left 15:31 sisar left
tadzik woot 15:32
15:32 lateau__ joined
tadzik that is awesome :) 15:32
15:35 sisar joined 15:37 Jerkwad joined, thou joined 15:47 Patterner left 15:49 Psyche^ joined, Psyche^ is now known as Patterner
dalek ast: 6728253 | (Solomon Foster)++ | S09-subscript/slice.t:
Fix typo that slipped in somehow.
16:06
masak perl6: my @a of Int; push @a, "OH HAI"; say @a.perl 16:08
p6eval niecza v14-77-g05fa915: OUTPUT«===SORRY!===␤␤Trait of not available on variables at /tmp/rT_DSgHQWQ line 1:␤------> my @a of Int⏏; push @a, "OH HAI"; say @a.perl␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line …
..pugs b927740: OUTPUT«*** ␤ Unexpected "of"␤ expecting "?", "!", trait, "=", infix assignment or operator␤ at /tmp/xQ0jWLEruO line 1, column 7␤»
..rakudo 9d39e8: OUTPUT«Array.new("OH HAI")␤»
16:10 libreofficer joined
libreofficer Hello! Can I get some info about gsoc? I use perl not so long time, but I want to join in and help perl6. Is there some simple tasks to try it? 16:14
masak libreofficer: hi! welcome! 16:15
we do have a list somewhere... 16:16
tadzik hello libreofficer
jnthn wiki.enlightenedperl.org/gsoc2012/ideas 16:17
libreofficer Thanks! I read wiki.enlightenedperl.org/gsoc2012/ideas and I think writing "custom sprintf" will be simple enough. But I want to write some simplest things for start 16:18
jnthn Though I need to update that optimisation task...
libreofficer jnthn, yes, I'd read it
jnthn libreofficer: Yeah, much of that work got done. There's still LOADS of options in the area of optimization, however.
tadzik ponders a thought about a full-blown web framework as a gsoc task 16:20
16:20 fsergot left
jnthn tadzik: Could be fun. 16:20
tadzik: An NFG strings implementation - if you feel like some guts-y stuff - could also be an interesting project. 16:21
tadzik New Found Glory is an American rock band from Coral Springs, Florida.
jnthn :
:D
tadzik NFG strings?
:) 16:22
tadzik reads www.parrot.org/content/what-nfg-why...ot-have-it
jnthn tadzik: There's some bits in S02 16:23
16:23 pmurias joined
libreofficer so, could I find some TODOs anywere? 16:23
jnthn libreofficer: I can think of a few ways in. (more)
libreofficer: One easy way to get started is writing tests. We have a bunch of fixed bugs that are lacking tests in the spectest suite. 16:24
libreofficer: Then there's attempting to fix stuff, but that can vary from not so had to "ouch, my brain" 16:25
dalek ecza: 09d5111 | (Paweł Murias)++ | perl5/Niecza/.gitignore:
Add a .gitignore for all the Niecza.pm build process byproducts.
ecza: a9d984a | (Paweł Murias)++ | / (8 files):
make perl5 now always rebuilds Niecza.pm.

land.
jnthn libreofficer: If you're interested in adding features to Rakudo then we have a ROADMAP in docs/ROADMAP
libreofficer: Each item is marked with how much effort is involved. 16:26
libreofficer: Though many will need a little asking around here for tips. :) 16:27
libreofficer I see
jnthn libreofficer: Some things just need writing Perl 6 code, others need compiler skills (this isn't always hard), occasionally you may need to write some C stuff, but that's not all that common. 16:28
masak github.com/rakudo/rakudo/blob/nom/docs/ROADMAP
flussence is Str.indent in nom yet? That should be a really easy one, I've got working code but I procrastinate too much to get it in :)
jnthn flussence: Don't believe it is in yet. :) 16:29
masak nom: my @foo of Int = "OH HAI"; say "alive" 16:30
p6eval nom 9d39e8: OUTPUT«alive␤»
jnthn masak: Known.
masak: The usual "variable traits NYI" thingy.
nom: my Int @foo; @foo[0] = "OH HAI"
p6eval nom 9d39e8: OUTPUT«Type check failed in assignment to '$v'; expected 'Int' but got 'Str'␤ in block <anon> at /tmp/EXXAfym0UN:1␤␤»
flussence hm, it's bitrotted quite a bit since it's still using as-coercion syntax... but it's a start: github.com/flussence/p6-misc/blob/.../Indent.pm 16:31
jnthn flussence: Rakudo still uses the "as" coercion syntax anyway :) 16:32
masak nom: my Int @foo; push @foo, "OH HAI"; say "alive"
p6eval nom 9d39e8: OUTPUT«alive␤»
libreofficer C does not scared me, I'd wrote on it. But I don't know arch of Racudo yet
tadzik so what's then new '$foo as Int'?
masak never used '$foo as Int' 16:33
but 'my Int @foo' is really old.
jnthn Int() $foo
tadzik odd
jnthn It's meant to remind you of the coercion syntax. :) 16:34
tadzik :)
masak I like 'my Int() $foo'.
it's short, and easy to get used to.
jnthn Note that sub foo(Int(Str) $foo) { } means "a Str must be passed, and will be coerced to an Int"
flussence
.oO( "coercion" looks like a word that should have an accented letter or two )
16:35
libreofficer Operators
2 *** missing native operators, including ++/-- (jnthn)
Is it difficult?
jnthn Yeah.
Well.
It's difficult because it depends on missing native type infrastructure.
libreofficer oh 16:36
jnthn The operators themselves are trivial to write.
But the stuff needed to actually make that happen is trickier.
(Mostly because it needs to be something that the optimizer can reduce to a really efficient operation)
16:37 thou left
libreofficer ok, and what about 3 ** Optimizing multis for `[+] 1..10` and `[<=] 1..10` etc. ? 16:38
jnthn That should be somewhat easier. 16:39
masak and fun to think about :) 16:40
gfldex masak , moritz : re: Temporal-questions 2 days ago: gist.github.com/1917526 16:41
libreofficer jnthn, so, I think I try it. Can you explain in details this task? 16:42
16:42 sisar left
masak my @post-to-display := @posts.grep: ($last-visit - .posted-at) < 24h; 16:42
needs curlies or * 16:43
hm, I would hesitate to accept postfix:<h> into core. it's a really nice syntax to load in using a module, though.
gfldex i was thinking the same 16:44
it's basicly the same syntax then most of us where teached in school
masak then the Metric::Length module can peacefully co-exist with the Calendar module somehow over what postfix:<m> means :)
gfldex: re example on lines 30..34: just use Date. problem solved. 16:46
oh, you *are* using Date. just not enough. :)
gfldex the problem is not so much having the same name but that you can't mix SI minutes with UTC minutes
jnthn libreofficer: The idea is (for the [+] 1..10 case anyway) that instead of doing the normal reduction operator (which does 1 + 2 + ... + 10) there's a formula for this case. 16:47
masak you can do things like $tom.birth + 365.
gfldex for years that are not leap years
masak but honestly I'd prefer to do $tom.birth + years(1) or something.
right.
jnthn libreofficer: At the moment we always auto-generate these reduction operators (it all boils down to higher order programming)
masak all( January | Sunday ) # this has got to be confused -- you probably want a comma, not an infix:<|> 16:48
gfldex it's brain compiled :)
libreofficer jnthn, I see
masak gfldex: most of what you're proposing seems to be neat little extensions to what we have already in core. 16:49
neat little non-core extensions, I should say.
what's there already is meant to provide neat little extensions like this.
feel free to actually implement them -- preferably with tests -- and put them up on module.perl6.org 16:50
16:50 wolfman2000 left
gfldex i'm happy do to so 16:51
masak pulling in Julian calendar or Chinese lunar calendar into core is not on the table unless you've convinced me of why it's important.
gfldex there are a few things mission in Temporal tho
like Date.new(now);
masak how about Date.today?
if it's missing, that's an omission :)
gfldex you have to do Date.new(DateTime.now)
masak yeah, I want Date.today. that makes perfect sense.
nom: say Date.today 16:52
p6eval nom 9d39e8: OUTPUT«2012-02-26␤»
masak oh! there it is! :)
we could add Date.now as a synonym, but that feels only half-important.
gfldex nom: say Date.new(now);
p6eval nom 9d39e8: OUTPUT«Default constructor only takes named arguments␤ in method new at src/gen/CORE.setting:569␤ in block <anon> at /tmp/xsFatLyXgg:1␤␤»
masak nom: say Date(now)
p6eval nom 9d39e8: OUTPUT«Method 'Date' not found for invocant of class 'Instant'␤ in <anon> at src/gen/Metamodel.pm:3425␤ in <anon> at src/gen/Metamodel.pm:3422␤ in block <anon> at /tmp/LK71VuS8X3:1␤␤»
masak arguably that should work.
masak submits rakudobug 16:53
gfldex nom: say Date.new('2010-02-30'); 16:54
p6eval nom 9d39e8: OUTPUT«day of 2010/2 out of range. Is: 30, should be in 1..28␤ in method check-value at src/gen/CORE.setting:8719␤ in method check-date at src/gen/CORE.setting:8729␤ in method new at src/gen/CORE.setting:9035␤ in method new at src/gen/CORE.setting:9041␤ in method new at…
masak TimToady: in the case of Date(Instant), it really feels like the conversion method should sit on Date, not Instant. could that be made to work at all? 16:55
nice error message, by the way.
jnthn masak: You implement method postcircumfix:<( )> in Date. 16:56
masak ooh
jnthn I'm pretty sure I already wired up that case :)
masak can't we have some nice sugar for such conversions, too?
jnthn You likely want to constraint it to :U only
masak like `method FROM(Instant:U $i) { ... }` 16:57
jnthn Heh...never satisfied :P
masak no :)
so that I don't have to write up postcircumfix:<( )> myself with all the types I want to convert from.
wire up*
jnthn yeah, I can see the argument for something like that.
Hm, isn't method &.() or so not already spec'd? 16:58
yeah, see S13. Though NYI in Rakudo 16:59
moritz \o
jnthn hi, moritz o/
masak jnthn: ooh! so doing multis on that already gives me what I want. :)
moritz! \o/ 17:00
jnthn masak: Yeah, and (though S13 looks out of date there) I think the spec changed recently so you can do multis there
I didn't get around to updating Rakudo for that yet.
Though it's LHF if anybody wants to take it on.
tadzik hello moritz
masak yeah, sorear++ updated it to be simpler, I think. 17:02
moritz nom: try Date.new('2011-02-30'); say $!.WHAT 17:06
p6eval nom 9d39e8: OUTPUT«X::OutOfRange()␤»
moritz \o/
masak \o/
that's... beautiful.
moritz nom: try Date.new('2011-02-30'); say $!.perl
p6eval nom 9d39e8: OUTPUT«X::OutOfRange.new(what => "day of 2011/2", got => 30, range => "1..28")␤»
jnthn moritz++ 17:07
dalek p/bs: 7c0ad48 | jnthn++ | src/6model/reprs/P6opaque.c:
Add a better error rather than giving an unhelpful Null PMC Access for a possible failure mode in P6opaque.
17:08
kudo/bs: 854d464 | jnthn++ | src/ (2 files):
A type declared in BOOTSTRAP should have its attributes set up there also; Capture broke this rule, which caused issues.
tadzik moritz: purely awesome
moritz in such cases I wonder if it the range should be an actual Range object instead of a string
libreofficer jnthn, where to start? Where can I found current realization and how to write it clearly?
masak nom: sub check-range($got, $range) { die X::OutOfRange.new(:$got, :$range) unless $got ~~ $range }; try check-range(10, 1..8); say $!.perl
p6eval nom 9d39e8: OUTPUT«X::OutOfRange.new(what => "Argument", got => 10, range => 1..8)␤»
masak moritz: "Argument"? :) 17:09
oh, I think I see.
moritz: actual Range, no question.
otherwise you just invite useless parsing.
moritz nom: say (1..18).gist 17:10
p6eval nom 9d39e8: OUTPUT«1..18␤»
masak yeah. there's no ungist :)
well.
there's &eval, and &val, I guess. :)
but the less of them, the better.
moritz well, it's pretty obvious in this case 17:11
but in others, I'm not so sure
for example when types are concerned
Method 'foo' not found for invocant of type Int
[Coke] Cannot Be Ungist 17:12
moritz Int could be stored as a type object, but it would require us to be much more careful about .gist vs .Str in the error message
jnthn libreofficer: Take a look in src/core/metaops.pm for where reduction is implemented today
moritz and then there are error messages where the type might not yet be composed etc.
pmurias moritz: I need to put p5 module in roast (to test use ...:from<perl5>) properly, is the current working directory guaranteed when running the test suit? 17:16
moritz: that is can I set the p5 inc relative to that? 17:18
moritz pmurias: depends on what you mean by "guaranteed". The README in roast says that all tests should be executed as t/spec/*/*.t, and thus defines the current directory. Several other tests rely on it.
pmurias moritz: that's what i meant thanks
moritz pmurias: but of course we are never guarded against the insanity of future compiler writers :-)
we have t/spec/packages/, maybe add t/spec/p5-packages/ or packages/p5/ or so
dalek kudo/nom: c295b53 | moritz++ | src/core/ (2 files):
include actual Range object in X::OutOfRange error from Date.new
17:32
ast: 26f6834 | moritz++ | S32-exceptions/misc.t:
X::Syntax::Signature::InvocantMarker
17:33
ast: 1bf4f1d | moritz++ | S32-exceptions/misc.t:
X::OutOfRange
masak no-one expects the insanity of future compiler writers! 17:41
17:42 mj41 left
masak er, nobody* 17:42
[Coke] pugs: say 3 eqv 3 17:44
p6eval pugs b927740: OUTPUT«1␤»
dalek p/bs: 7fd001a | jnthn++ | src/HLL/World.pm:
Harden null string handling in string heap code-gen.
17:49
p/bs: 833c719 | jnthn++ | src/PAST/NQP.pir:
Oops, forgot to commit isnull_s addition.
p/bs: 37cac25 | jnthn++ | src/6model/serialization.c:
Don't duplicate the null string in the strings heap. Turns out it showed up a load when doing CORE.setting compilation. Reduces string heap size from 10578 to 2483.
17:51 zhangkaizhao left
masak LINQ and macros came up yesterday. this seems apropos: scalamacros.org/usecases/language-i...eries.html 17:59
[Coke] Failed tests: 18-24
TODO passed: 22-24
O_o 18:00
masak that can't be right :)
18:00 icwiener joined
masak [Coke]: I say bug in the test harness. 18:00
[Coke] plan was 17. that'll do it. 18:01
masak yeah, prolly. 18:02
colomon [Coke]: I've been seeing weird test harness results apparently from pugs fugding 18:03
dalek ast: b6ba504 | coke++ | S (11 files):
pugs fudges
18:03 lateau__ left
dalek ecza: e5096c2 | (Solomon Foster)++ | lib/ (2 files):
Start of implementation of run. Still needs work, but can execute commands already.
18:04
ecza: a69231e | (Solomon Foster)++ | lib/CORE.setting:
Make infix:<eqv> and infix:<cmp> accept Mu arguments. Relies on a slightly hacky change from $a.WHAT === $b.WHAT to $a.WHAT.gist eq $b.WHAT.gist; my memory suggests there are obscure edge cases there the new version fails, but I was unable to figure out how to modify the old version to get it to work.
ecza: 7ccd4bc | (Solomon Foster)++ | lib/Builtins.cs:
Comment out code that isn't doing anything yet, to avoid warnings.
gs.hs: 96b47de | coke++ | t/spectest.data:
run fudged tests
[Coke] colomon: apologies. I've only been checking in pugs because "what could possible go wrong"
*ly. ;)
18:05 skids joined
[Coke] properties-general, looks like. 18:07
colomon: weird - only thing I did to that file was add individual #?pugs todo markers. 18:11
moritz niecza: role A { }; my $x = 3 but A; say $x.WHAT 18:12
p6eval niecza v14-82-g7ccd4bc: OUTPUT«Int+A()␤»
moritz niecza: my $x = do { my role A { }; 5 but A }; my $y = do { my role A { }; 5 but A }; say $x.WHAT; say $y.WHAT 18:13
p6eval niecza v14-82-g7ccd4bc: OUTPUT«Int+A()␤Int+A()␤»
18:13 havenn joined
moritz niecza: my $x = do { my role A { }; 5 but A }; my $y = do { my role A { }; 5 but A }; say $x eqv $y 18:13
p6eval niecza v14-82-g7ccd4bc: OUTPUT«True␤»
moritz ... and that's the obscure edge case that colomon++ wasn't able to remember
rakudo: my $x = do { my role A { }; 5 but A }; my $y = do { my role A { }; 5 but A }; say $x eqv $y
p6eval rakudo c295b5: OUTPUT«True␤»
moritz hm, same problem 18:14
jnthn Type equivalence should go on .WHAT being the same object, not on some name stringification.
moritz correct 18:16
[Coke] jnthn: there are lots of tests that are comparing .WHAT.gist instead of just .WHAT 18:18
jnthn [Coke]: That's OK for the tests, imo.
[Coke] (which I'm only finding because pugs has no .gist)
jnthn: ok then. ;) 18:19
jnthn [Coke]: But Rakudo's eqv implementation shouldn't use it.
18:21 mucker joined
dalek p/bs: 4524488 | jnthn++ | src/HLL/World.pm:
Toss legacy dependency handling code.
18:22
kudo/bs: 8193d6b | jnthn++ | src/Perl6/World.pm:
Don't need to merge globals when loading the module loader. With this, the produced CORE.setting.pbc loads up until attempting to deserialize, which currently fails for some reason.
18:23
18:24 packetknife joined
jnthn away for a bit 18:28
dalek ast: 18311a3 | (Solomon Foster)++ | S03-operators/eqv.t:
Unfudge tests that now work.
18:29
18:32 xinming joined, havenn_ joined 18:35 fsergot joined
pmurias colomon: hi 18:36
colomon o/
pmurias colomon: why do we use Glib for &run?
instead of System.Diagnostics.Process?
colomon pmurias: it's the best....
err I don't know. 18:37
hold on
is that what you're using for p5 interop? 18:38
18:38 havenn left
colomon is now browsing docs... 18:38
pmurias colomon: for p5 interop i'm using p/invoke 18:39
18:43 mucker left
pmurias moritz: if the only test is in eval_lives_ok I can move it out from there? 18:47
moritz pmurias: if it makes sense outside an eval_lives_ok, yes 18:48
dalek ecza: 404996f | (Paweł Murias)++ | t/spectest_p5.data:
Add test to t/spectest_p5.data.
18:50
pmurias moritz: should I just put anything that I'm adding to niecza (and isn't obviously niecza specific) to S01-perl5-integration? 18:51
18:51 havenn joined
moritz pmurias: if it's specific to niecza, it should go into niecza's repo 18:52
pmurias: if it's specced, but only niecza handles it right now, it should be treated like any other spectest 18:53
pmurias the p5 integration isn't specced
and currently the directory hold pugs fossils
* holds
moritz S01 does spec p5 integration 18:54
pmurias in a "yes we have it manner"
18:54 havenn left 18:55 havenn_ left
moritz it gives concrete examples 18:55
18:55 havenn joined 18:57 havenn left, skipper joined
pmurias moritz: it only specs that 'use v5' works 18:57
18:58 birdwindupbird joined
moritz yes. That's a quite concrete form of interop with v5, isn't it? 18:58
pmurias it's still not specced only mentioned 19:03
19:04 retupmoca joined 19:05 skipper left
colomon pmurias: oh, I think I see the issue that bugged sorear about System.Diagnostics.Process -- it takes all its arguments as one string, instead of passing them argument by argument. 19:14
on the other hand, if it actually is portable, it might be a great fall-back approach... 19:15
sorear good * #perl6 19:22
colomon: S02:1283 is slightly relevant to what you've done today 19:25
colomon o/
sorear: you mean the $a.WHAT.gist eq $b.WHAT.gist thing? 19:28
sorear yes
colomon I guess my question here is, what is the type returned by .WHAT? 19:31
fsergot nqp: say 1;
p6eval nqp: OUTPUT«Confused at line 1, near "say 1;"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23433 (src/stage2/gen/NQPHLL.pir:6734) (src/stage2/gen/NQPHLL.pm:329)␤»
colomon niecza: say Mu.WHAT.perl
p6eval niecza v14-82-g7ccd4bc: OUTPUT«Mu␤»
fsergot nqp: say(1);
p6eval nqp: OUTPUT«1␤»
fsergot nqp: exit(1); 19:34
p6eval nqp: OUTPUT«Could not find sub exit␤current instr.: '_block1000' pc 30 ((file unknown):36) (/tmp/56xUVG9Xw4:1)␤»
sorear colomon: .WHAT always returns the same type as the argument 19:36
colomon sorear: yeah, I was just starting to realize that
so it's an undefined object of the given object's type?
sorear yes 19:37
fsergot How to force NQP to exit? :) 19:38
sorear nqp: say(1); pir::exit(3); say(2);
p6eval nqp: OUTPUT«1␤»
sorear that seems like it might have worked 19:39
fsergot sorear++ thanks
sorear note that pir::exit doesn't actually call exit(2)
it just throws an exception with the severity set to EXIT
fsergot: you said hi the other day and I tried to return it but I couldn't because your connection kept dropping out :( 19:40
pmurias: I'm serious about wanting something on the new p5 stuff for announce.v15 19:41
19:41 noam_ left
fsergot I had some troubles with connection recently. :( 19:41
19:41 noam_ joined
fsergot sorear: It's the only way to exit in nqp? 19:42
colomon sorear: the problem with changing infix:<===> to take Mu arguments is that it no longer autothreads properly when you do that. 19:47
pmurias sorear: when is the deadline for the annocement? 19:49
sorear colomon: the other problem is that === is specifically specced to take (Any,Any)
pmurias: tomorrow 19:50
colomon sorear: ah, those things probably go together, eh?
sorear Now that you bring it up I don't think the signatures for eqv and cmp are explicitly given anywhere 19:51
pmurias: 36 hours before the end of the release window
colomon there are spec tests which check things like Mu eqv Any, which is how I got into this mess in the first place. 19:52
and it makes much less sense to autothread them 19:53
pmurias sorear: i'll start writing something down then 19:54
19:54 havenn joined
colomon sorear: is ^isa exact? that is, if I say $a.^isa(Mu), then $a really is a Mu and not just something derived from Mu? 19:55
masak perl6: say Cool.^isa(Any)
p6eval rakudo c295b5: OUTPUT«1␤»
..pugs b927740: OUTPUT«*** No such subroutine: "&Cool"␤ at /tmp/1PJ0ccoMgD line 1, column 5 - line 2, column 1␤»
..niecza v14-82-g7ccd4bc: OUTPUT«True␤»
19:56 ribayr left
jnthn No, it's not "exact" 19:57
So Rakudo and Niecza are correct here
fsergot: Using pir::exit is fine
Or you may want to add an entry to the mapping table in src/PAST/NQP.pir, then you can write nqp::exit() 19:58
er, nqp::exit($code)
colomon jnthn: is there a better way determine type equivalenc than $a^.isa($b) and $b^.isa($a)?
s/and/&&/
moritz $a.WHAT === $b.WHAT 19:59
colomon moritz: doesn't work if $a or $b is Mu
jnthn What moritz++ said shoudl do it, modulo the Mu case
colomon which is exactly the case I'm worried about
moritz eeks
masak so the question boils down to: how do you determine whether an object is Mu but not derived from Mu? 20:00
solve that, and you solve the whole problem.
20:01 ribayr joined
colomon masak: I've been trying to do exactly that for the last six minutes 20:01
moritz $a !~~ Any
perl6: say Junction !~~ Any
p6eval pugs b927740: OUTPUT«1␤»
..rakudo c295b5, niecza v14-82-g7ccd4bc: OUTPUT«True␤»
colomon ooooo
moritz nom: say Junction.^mro 20:02
p6eval nom c295b5: OUTPUT«Junction() Mu()␤»
moritz $a.^mro.elems == 1 # Mu or Mu.new
colomon niecza: say Junction.^mro
moritz and you can distinguish those two cases with $a.DEFINITE
p6eval niecza v14-82-g7ccd4bc: OUTPUT«Unhandled exception: Unable to resolve method mro in class ClassHOW␤ at /tmp/mLVVTfYUtV line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3836 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3837 (module-CORE @ 65) ␤ at /ho…
20:02 ribayr left
sorear niecza: say Junction.WHICH 20:03
p6eval niecza v14-82-g7ccd4bc: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤ at Niecza.Frame.BindSignature (Niecza.Frame th, Niecza.Signature sig, Int32 mode, System.String signame, Niecza.Variable[] pos, Niecza.VarHash named,…
sorear niecza: say Junction.WHICH === Junction.WHICH
p6eval niecza v14-82-g7ccd4bc: OUTPUT«True␤»
sorear niecza: say Junction.WHICH === Mu.WHICH
p6eval niecza v14-82-g7ccd4bc: OUTPUT«False␤»
moritz hates the fact that === autothreads 20:04
sorear masak, however, has used === autothreading in yapsi 20:05
that was one of the features whose lack in contemporary niecza I had to deal with in the yapsi/niecza branch
masak I have? huh. 20:06
ISTR TimToady has been going back and forth a bit on whether === really autothreads. 20:07
felher jnthn: out of curiosity: Why would one create a mapping and than use nqp::exit instead of pir::exit? Is it because then one may later rewrite/change the implementation of it in NQP and have all the code automagically use it? 20:14
sorear felher: nqp is not limited to Parrot anymore 20:17
nqp::exit has the potential of doing the right thing on nqp/jvm, nqp/lua, and nqp/dotnet
moritz and even on pure parrot, we have some nqp:: opcodes that don't directly map to a single pir:: opcode 20:18
sorear also pir is going to be killed with fire at the first opportunity, but all that means is that the "pir::" name will become a fossil 20:20
moritz great point, which chromatic completely misses when bashing the nqp:: opcodes
felher sorear++, moritz++. Thanks for the explanation :) 20:22
sorear chromatic is still at it huh.
moritz well, not right now, just last time I tried to discuss with him
TimToady I have never gone back and forth on === autothreading 20:23
moritz old S03 was just silent on whether it autothreads 20:24
TimToady I'm the one who insists it must
colomon sorear: okay if I refactor infix:<===> to use a Niecza:: sub which does take Mu? Then use that version instead of === in infix:<cmp>.
TimToady and that junctions must be written in terms of something lower level
sorear colomon: ok 20:25
colomon sorear: on it, then.
masak TimToady: ah. 20:27
dalek ecza: 0e1f874 | sorear++ | tools/extheapshot.c:
[extheapshot] Refactor and orthogonalize image handling
20:28
TimToady === is not there for the convenience of people writing CORE stuff, but for mere mortals who are dealing with various derived types that they'll expect to autothread 20:29
20:29 plobsing joined 20:30 birdwindupbird left
colomon sorear: seems to work like a charm. :) 20:33
20:35 seanstickle joined 20:42 plobsing left 20:43 Chillance left, Chillance joined 20:47 razor42 joined, benabik left 20:48 plobsing joined
masak TimToady: makes sense. 20:49
moritz only half to me
IMHO it's a really good idea to provide low-level-ish primitives 20:50
which are consistent more than they DWIM
20:50 benabik joined 20:51 ribayr joined
dalek ecza: f8c5ab8 | sorear++ | tools/extheapshot.c:
[extheapshot] Record and report root types
20:51
moritz so if === autothreads, we should really make a more primitive way available
masak no argument there.
fsergot nom: <1 2 3 1>.uniq.say; 20:52
p6eval nom c295b5: OUTPUT«1 2 3␤»
dalek ecza: 834f2d9 | (Solomon Foster)++ | lib/CORE.setting:
Refactor infix:<===> to be built using a new Niecza::ValueIdentity sub, which can take Mu arguments. Then use Niecza::ValueIdentity where we were previously using infix:<===> in infix:<cmp>.
fsergot nom: <abc cba b abc>.uniq.say;
p6eval nom c295b5: OUTPUT«abc cba b␤»
masak does uniq in Niecza use Set? :) 20:53
fsergot Why "slurp('file').Array.uniq.say" doesn't work? 20:54
colomon masak: nope
masak colomon: just noticed :)
colomon fsergot: because slurp returns a single string
masak niecza: class C { method Str { "OH HAI" } }; say ~C.new
p6eval niecza v14-82-g7ccd4bc: OUTPUT«OH HAI␤»
masak niecza: class C { method Str { "OH HAI" } }; say +uniq C.new, C.new 20:55
p6eval niecza v14-82-g7ccd4bc: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'uniq' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1344 (die @ 3) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 33) ␤ at /hom…
fsergot colomon: even in array context? Like: "my @lines = slurp 'file';"
colomon fsergot: yes
masak niecza: class C { method Str { "OH HAI" } }; say +(C.new, C.new).uniq
p6eval niecza v14-82-g7ccd4bc: OUTPUT«1␤»
masak should be 2, IMO.
nom: class C { method Str { "OH HAI" } }; say +(C.new, C.new).uniq
moritz fsergot: use open('file').lines instead
p6eval nom c295b5: OUTPUT«1␤»
colomon fsergot: if you want lines, you have to ask for them
masak submits rakudobug
colomon or slurp('file').lines
open('file').lines should be preferable, but I don't think either implementation will close the file if you do it that way.... 20:56
20:56 MayDaniel joined
fsergot Hmm, I was convinced that slupr in array context returns an array. :) 20:57
I know other ways, but I was curious.
moritz fsergot: that might be true in p5 20:58
fsergot: but in perl 6, a routine doesn't know which context it's called in
masak in a sense, array context is gone.
jnthn We got object hashes in Rakudo now, so should be able to get uniq righter :) 20:59
masak that's my idea.
moritz fsergot: so the only way to make that work would be by returning an object that can be used either as a Str or a List. Which is totally possible, but a waste of memory
jnthn: I'm already compiling a possible fix :-)
masak might be this bug has been submat before, but this makes it stand out :)
jnthn fsergot: Your patch is a tad off - it puts the error on STDOUT instead of STDERR
pir::printerr will write to STDERR
21:00 MayDaniel left
moritz we should totally alias that as nqp::note 21:00
oh wait, &note appends a newline
jnthn +1
dang :)
fsergot jnthn: Oh, right. I forget about it.
this* 21:01
moritz also I'm not sure that's the right approach 21:03
sorear masak: uniq should use set, which should use object hashes 21:04
jnthn: What's the user interface for object hashes?
moritz what if a a compiler wants to call evalfile without having it exit on failure?
sorear: my %hash{Type}
dalek ecza: 15bcd26 | sorear++ | tools/extheapshot.c:
[extheapshot] Generate full class names
colomon sorear: doesn't uniq preserve order?
moritz nom: my %h{Any}; 21:05
p6eval nom c295b5: ( no output )
sorear moritz: does that syntax actually work in nom?
moritz sorear: yes
nom: class A { has $.x; method Str() { 'a' } }; my %h{Any}; %h{A.new(x => 3) } = 3; %h{A.new(x => 5)} = 2; say %h.keys.perl 21:06
p6eval nom c295b5: OUTPUT«(A.new(x => 3), A.new(x => 5)).list␤»
moritz it's a newish feature
masak \o/
masak has been looking forward to it for years 21:07
jnthn moritz: What would you suggest as a better approach?
masak: Now write something awesome using it :) 21:08
moritz jnthn: I don't know. I'd know how to solve this on the Perl 6 level
sorear nom: my %h{Any}; say %h
p6eval nom c295b5: OUTPUT«().hash␤»
sorear nom: my %h{Any}; say %h.WHAT
p6eval nom c295b5: OUTPUT«Hash+{TypedHash}()␤»
sorear nom: my %h; say %h.WHAT
p6eval nom c295b5: OUTPUT«Hash()␤»
masak jnthn: :)
sorear nom: my %h{Any}; say %h.^methods(:local)
masak jnthn: I will.
p6eval nom c295b5: OUTPUT«at_key STORE_AT_KEY bind_key pairs of␤»
sorear nom: my %h{Any}; say %h.of
p6eval nom c295b5: OUTPUT«Mu()␤» 21:09
masak o.O
sorear nom: my %h{Any}; say %h.^mro
p6eval nom c295b5: OUTPUT«Hash+{TypedHash}() Hash() EnumMap() Iterable() Cool() Any() Mu()␤»
jnthn What're you o.O-ing at?
moritz .of returns the type constraint for the values
jnthn Right, exactly.
masak ah, 'course.
sorear nom: say Hash.^methods(:local)
p6eval nom c295b5: OUTPUT«new at_key bind_key STORE_AT_KEY STORE delete push PARAMETERIZE_TYPE perl␤»
masak how to I get the type constraint for the keys?
sorear nom: say EnumMap.^methods(:local)
p6eval nom c295b5: OUTPUT«elems exists iterator list keys kv values pairs invert at_key STORE_AT_KEY Capture FLATTENABLE_LIST FLATTENABLE_HASH fmt of Bool ACCEPTS perl␤»
TimToady there should be a shape property, methinks 21:10
moritz masak: spec a way to introspect it, and we'll implement it
jnthn masak: None yet implemented.
benabik What's the +{TypedHash} bit?
jnthn Well, that's not *strictly* true. There probably is a way to go looking at the meta-object
sorear jnthn: is there *any* way to get at the key constraint, using pir:: etc?
havenn Noob question here, but Ruby folks are telling me the reason 'puts' (print with a \n) can't be called like "hi".puts is because puts is a private method of every object, so that you can call "puts 'hi'" in any context in your code"
masak +1 on TimToady'd .shape proposal. 21:11
jnthn sorear: If there is a way, it's almost certainly not with that.
havenn How does perl6 get around issue of context?
jnthn sorear: It'd be by introspecting the type args on a role.
masak it's just a matter of spec'ing what .shape returns briliiantly.
havenn Or do I just need to read more and ask less? =P
sorear jnthn: basically I want to know how nom reacts to my %h{$type}
nom: sub evil($x = my %h{$x}) { }
p6eval nom c295b5: OUTPUT«===SORRY!===␤Invalid hash shape; type expected␤»
masak havenn: no, it's a fine question.
TimToady havenn: in P6-ese we'd say that those are submethods, not methods
moritz benabik: it works by mixing in a parameterized role into hash
sorear nom: sub less_evil($x; $y = my %h{$x}) { }
p6eval nom c295b5: OUTPUT«===SORRY!===␤Invalid hash shape; type expected␤»
sorear nom: sub still_a_bit_evil($x) { my %hash{$x} } 21:12
p6eval nom c295b5: OUTPUT«===SORRY!===␤Invalid hash shape; type expected␤»
masak havenn: used to be 'say $x' and '$x.say' were "the same" in Perl 6. but now they're distinct, and one delegates to the other.
TimToady havenn: and it is a good question, because we keep finding people writing methods that should be submethods, like .gist
moritz sorear: it's syntactic, iirc
masak havenn: turned out we weren't that much helped by methods exporting themselves as subs.
sorear I am +1 to requiring the stuff in the shape brackets to be compile time constants 21:13
jnthn sorear: It handles it by mixing in a role.
TimToady if a method is accessing the private attributes of the current class, it should probably be a submethod
sorear C99 has to be better at something
masak heh, TimToady and I seem to be explaining different things :)
TimToady unless you are very careful for your method to be usable by subclasses
jnthn sorear: If you manage to get it a type known at compile time in there somehow it'll probably be happy.
TimToady I am +1 to relying on constant folding for compile-time shapes, and allow run-time shapes like Algol :) 21:14
jnthn nom: constant Foo = Int; my %hash{Foo} # think this may work out...
p6eval nom c295b5: ( no output )
fsergot jnthn: I sended a new patch! :) 21:15
TimToady I am +1 to that because I like to torment implementors :)
masak knew it!
sorear TimToady: at issue is the behavior of declarations being lifted to the top of the scope
21:15 kaare__ left
sorear TimToady: say %*foo.shape; my $x = (Int, Str).pick; my %*foo{$x}; 21:15
TimToady that doesn't look like legal P6 to me... 21:16
21:16 Trashlord left
jnthn sorear: TimToady said constant folding and compile time...that seems decidedly runtime :) 21:16
TimToady he's trying to show the problem with runtime 21:17
jnthn Now, if that was constant $x... :)
sorear TimToady: In what way is it not legal P6?
TimToady std: say %*foo.shape; my $x = (Int, Str).pick; my %*foo{$x};
p6eval std a540d4e: OUTPUT«ok 00:01 113m␤»
sorear Other than the whole "requires closed timelike curves" thing
masak :D
TimToady ah, missed the * 21:18
masak closed timelike curves are not a syntactic feature!
thus, STD.pm6 doesn't check for them.
TimToady but anything that relies on a run-time value obviously can't be elaborated till that value is available
so the shape would be undefined
masak wfm
dalek p: aee97aa | (Filip Sergot)++ | src/HLL/Compiler.pm:
nicer error message of &evalfiles
21:19
p: d85df9e | (Filip Sergot)++ | src/HLL/Compiler.pm:
nicer error message of &evalfiles
p: 5030ed5 | (Filip Sergot)++ | src/HLL/Compiler.pm:
&evalfiles will print error msg to the STDERR
p: 3133d4a | (Filip Sergot)++ | src/HLL/Compiler.pm:
&evalfiles will print error msg to the STDERR
p: 9903471 | jonathan++ | src/HLL/Compiler.pm:
Merge pull request #30 from sergot/master

nicer error message when file specified at command line is not found; maybe not perfect, but surely an improvement from user's point of view
jnthn TimToady: I assume in this case it's OK to whine about this as a problem at compile time, rather than being undefined at runtime? :) 21:20
TimToady well, with contextuals it's difficult for the compiler to detect much
but something coming in lexically would give the compiler more to work with, of course 21:21
jnthn The declaration of the contextual is just a normal lexical declaration, though.
TimToady yes, but we could conceivable call ourselves recursively, and pass things down that way 21:22
mind, it's a smelly way to pass parameters
contextuals are kind of an escape valve too 21:23
they should be exceptional much as exceptions are exceptional
sorear What I had been thinking is that my %foo{...} binds %foo to an unusable placeholder at block entry, and becomes (%foo := Hash.new(shape => ...)) at normal execution time
fsergot Sorry for 4 commits, not only 1.
moritz fsergot: no problem. If we really cared, we could have squashed them into one 21:24
TimToady sorear: something like that
it's a bit harder to implement than just putting arbitrary restrictions, but it fits in with the P6 notion of not doing things either too early or too late, but letting the data relationships drive the implicit control flow 21:25
jnthn In Rakudo the type-y stuff is resolved at compile time, so the block entry action is cheap. 21:26
Anything as the shape which is compile-time knowable should be fine. 21:27
fsergot It was my second patch, so it's not advenced. :)
jnthn (Almost certainly it's too restrictive in Rakudo today.)
TimToady I view run-time shaped arrays as another way to write generic code
P6 is fine with intentional generic code; it's the unintentional generic code that is forbidden
jnthn Wait, so you want the compile time case to work too? 21:28
gah
You want the runtime case to work too?
TimToady if the shape is a constant, sure
yeah, like in Algol :) 21:29
jnthn For...what definition of "constant"?
I take "constant" to mean "we know it at compile time" :P
TimToady yes
otherwise you pessimize for run time correctness
21:30 whiteknight left
TimToady we have to do something similar already for dimensions that are *, and shrink and grow them depending on usage, not just the declaration 21:30
but a run-time shape is at least constant over the particular elaboration of the declaration 21:31
(elaboration being a run-time concept borrowed from Ada)
note that in the typcical case of my @array[10,10] we very much know that 10 and 10 are both constants 21:32
sorear sub foo { my $x; } # in p5, every SV that is bound to $x is an elaboration of the pad slot? is that what elaboration means? 21:33
TimToady [10;10] I mean
sorear TimToady: the other question is what to do about @*foo[1] = 5; my @*foo[10];
TimToady yes, more or less; Ada includes the notion of initializing in that
sorear the obvious answer is to reject it, if we're delaying shape evaluation until execution time 21:34
but we could have a split approach that hoists constant shapes
(ow)
jnthn perl6: my $*x = 42; sub foo() { say $*x; my $*x = 100; }; foo()
p6eval rakudo c295b5, niecza v14-87-g15bcd26: OUTPUT«Any()␤»
..pugs b927740: OUTPUT«␤»
lue hello world o/
jnthn hellue! 21:35
TimToady I really think it's pathological to refer to a contextual before it's defined
jnthn Pathological enough to make it behave like...
std: say $x; my $x;
p6eval std a540d4e: OUTPUT«===SORRY!===␤Variable $x is not predeclared at /tmp/O0bQKW97Ti line 1:␤------> say ⏏$x; my $x;␤Check failed␤FAILED 00:01 110m␤»
jnthn er
std: my $x; { say $x; my $x; }
p6eval std a540d4e: OUTPUT«===SORRY!===␤Lexical symbol '$x' is already bound to an outer symbol (see line 1);␤ the implicit outer binding at line 1 must be rewritten as OUTER::<$x>␤ before you can unambiguously declare a new '$x' in this scope at /tmp/WJkECNDRPj line 1:␤---… 21:36
TimToady yes, or at least like a rebinding error
yes, that one
jnthn Yeah, that's the one I messed up tyring to trigger :)
sorear jnthn: are you thinking of having the pad slot be initially NULL and throwing a runtime exception if accessed before declaration? 21:37
jnthn sorear: No, I was thinking of catching the usage at compile time. 21:38
sorear: See what contextuals we've seen being used
sorear jnthn: could you elaborate on that?
jnthn sorear: Then if a my $*ooh-i-saw-this-already is declared, whine like STD does above
sorear jnthn: also, what about MY::{'@foo'}; my @foo[5] ?
jnthn sorear: I guess if you're using that syntax you "escape" the predeclaration check. 21:39
TimToady though in this case we don't know *where* the contextual is actually coming from, only that $*foo has been used ambiguously
sorear (pretend '@foo' is an expression that the constant folder can't see through)
TimToady well, or @::('foo') likewise 21:41
jnthn nom: say pir::find_lex__Ps('%h').of; my Int %h{Str};
p6eval nom c295b5: OUTPUT«Int()␤»
TimToady we've already said that an eval may see only one lexical of a given name, and can't know whether the eval is before or after the declaration
perl6: say eval '$foo'; my @foo = 42; 21:42
p6eval rakudo c295b5: OUTPUT«===SORRY!===␤Variable $foo is not declared␤at eval_0:1␤»
..niecza v14-87-g15bcd26: OUTPUT«Potential difficulties:␤ @foo is declared but not used at /tmp/LQnUHl8eos line 1:␤------> say eval '$foo'; my ⏏@foo = 42;␤␤Unhandled exception: Variable $foo is not predeclared (did you mean @foo?)␤ at /home/p6eval/niecza/boot/lib/CORE…
..pugs b927740: OUTPUT«␤»
TimToady oops
perl6: say eval '$foo'; my $foo = 42;
p6eval niecza v14-87-g15bcd26: OUTPUT«Potential difficulties:␤ $foo is declared but not used at /tmp/jzygnhRfhE line 1:␤------> say eval '$foo'; my ⏏$foo = 42;␤␤Any()␤»
..rakudo c295b5: OUTPUT«Any()␤»
..pugs b927740: OUTPUT«␤»
jnthn perl6: say eval '$foo'; my Int $foo = 42; 21:43
TimToady perl6: say eval '$OUTER::foo'; my $foo = 42;
p6eval niecza v14-87-g15bcd26: OUTPUT«Potential difficulties:␤ $foo is declared but not used at /tmp/L1tkXHgEr9 line 1:␤------> say eval '$foo'; my Int ⏏$foo = 42;␤␤Int()␤»
..pugs b927740: OUTPUT«Int␤»
..rakudo c295b5: OUTPUT«Int()␤»
niecza v14-87-g15bcd26: OUTPUT«Potential difficulties:␤ $foo is declared but not used at /tmp/RPzWmovT73 line 1:␤------> say eval '$OUTER::foo'; my ⏏$foo = 42;␤␤Any()␤»
..rakudo c295b5: OUTPUT«Any()␤»
..pugs b927740: OUTPUT«␤»
TimToady right, in this case elaboration is after the eval 21:44
perl6: for 1..2 { say eval '$foo'; state $foo = 42; } 21:45
p6eval rakudo c295b5: OUTPUT«Any()␤42␤»
..pugs b927740: OUTPUT«␤42␤»
..niecza v14-87-g15bcd26: OUTPUT«Potential difficulties:␤ $foo is declared but not used at /tmp/an83tM2Zz3 line 1:␤------> for 1..2 { say eval '$foo'; state ⏏$foo = 42; }␤␤Any()␤42␤»
TimToady that's better
masak and not a problem at all. 21:47
that's a nice example -- I must remember to include that one in my macro talk in Erlangen. 21:48
the whole trick to remaining sane when doing macros turns out to be to have a sharp eye for when different things in a program "activate".
jnthn omg, I have to write a talk for Erlangen :)
masak things may be right next to each other, but if one is run-mode and the other is compile-mode, they will not fire adjacent in time.
great fun.
mwhahaha 21:49
21:50 SHODAN left, seanstickle left 21:52 SHODAN joined 21:55 pmurias left 22:14 havenn left 22:15 fsergot left
cognominal nom: grammar G { token TOP { [<a>|<b>]+ }; token a { a }; token b { b} }; say G.parse: 'ababb' 22:17
p6eval nom c295b5: OUTPUT«=> <ababb>␤ b => <b>␤ b => <b>␤ b => <b>␤␤»
cognominal something around the grammar engine seems seriously broken. 22:18
22:19 icwiener left 22:20 ribayr left
cognominal good night 22:23
22:24 Trashlord joined 22:26 snearch left 22:29 Tedd1 left 22:45 ribayr joined 22:49 plobsing left
masak good night, #perl6 22:51
23:15 PacoAir left
colomon o/ 23:19
sorear o/ colomon
23:21 Trashlord left
colomon sorear: what do you think of system.diagnostics.process? 23:21
sorear I think it's a pretty good wrapper for the Windows process-control functions 23:22
but it fails moderately hard for POSIX
colomon I was wondering if it might make sense to use it as a backup for the run sub if GLib isn't available.
sorear I don't think Microsoft can be faulted for designing APIs that work well on their own systems
yes, it would.
au was talking about some kind of shell quoting thing earlier 23:23
colomon to the backlog!
sorear I am not really an expert on shell diversity
23:23 dorlamm joined
colomon is glad to have au around more regularly again 23:23
sorear we need to find some autoconf geeks and some cmd.exe geeks
agreed
23:23 Trashlord joined 23:24 Trashlord is now known as Guest17202
jnthn cmd.exe isn't cool enough to have geeks :) 23:24
In short - don't even think about trying to quote stuff using single quotes. :) Only doubles work. :)
23:28 franek joined 23:29 dorlamm left
colomon sorear: I've gone back in the logs to the 23rd, haven't seen au talking about shells yet... 23:30
err, shelling out, I mean.
sorear ShellQuote
2012.02.18.13.48.09 < au> yeah, one'd need a String::ShellQuote equivalent.
23rd of which month?
colomon this month 23:31
but going backwards
23:31 plobsing joined 23:32 Chillance left, carlos joined, franek left
colomon "Only Bourne shell quoting is supported. I'd like to add other shells 23:32
(particularly cmd.exe), but I'm not familiar with them. It would be a
big help if somebody supplied the details."
groan
23:32 carlos is now known as Guest67167
sorear I did not mean to imply that it would be _useful_. 23:34
colomon snort
[Coke] (pugs fossils) which pugs is now running again!
colomon actually, I'm not sure the other way around wouldn't be more useful -- properly breaking up a command line into command and arguments 23:35
jnthn wanders afk...'night 23:37
colomon 'night
23:45 ribayr left 23:51 Guest67167 left 23:56 tokuhirom joined
[Coke] # 02/26/2012 - niecza++ ; pugs (22.81%); rakudo (99.2%) 23:59
"niecza", 20298, 8, 751, 1548, 22601, 23646
"pugs" , 4632, 5, 1999, 332, 6968, 23437
"rakudo", 20136, 28, 604, 1864, 22632, 23656