»ö« 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.
colomon o/ 00:02
00:05 tokuhirom left 00:08 Maddingu1 joined 00:09 Maddingue left, rafl left 00:10 rafl joined 00:15 rjbs- joined, jrockway_ joined 00:16 geekosaur left, jrockway left, Vlavv` left, rjbs left, eviltwin_b joined 00:17 Vlavv` joined 00:19 bbkr2 joined 00:21 rafl left, bbkr1 left, rafl joined
TimToady maybe we should outlaw precedence traits on multi candidates? 00:23
after all, that's changing the language, so should follow lexical macro scoping rules really 00:25
00:26 Maddingu1 is now known as Maddingue
TimToady re flattening, the real issue here is that different declarators want different semantics for their initializers, so I think I need to make a table so we can all glare at it 00:28
dalek ecza: 9a50d69 | sorear++ | src/ (2 files):
Tweak parameter name generation to work more like Rakudo
00:39
sorear now that pmichaud++ is back I stand a decent chance of understanding LoL context and the difference between list and flat 00:44
niecza is treating constant @foo = ... as binding to @(...), that is (...).list 00:45
dalek ecs: 57a871c | larry++ | S06-routines.pod:
outlaw macro-ish traits on multi
00:49
TimToady I suspect it should probably be more like binding to *@foo, but I need to see how my table turns out 00:51
sorear I also don't understand how [||] 1, 0, 1..* is possibly supposed to work
TimToady it's a lazy list
it quits after reading the first 1 00:53
of course [||] 0 xx * is going to hang
00:59 Trashlord joined
sorear TimToady: but generic [] has to turn the lazy list into a Capture 00:59
colomon TimToady: it's easy to see how you can implement it as a special case, but how do you implementation it as an example of a general case? 01:00
TimToady which general case are you thinking of? thunky, or list associative? the latter need to have a (*@args) form if the semantics differ from binary; thunk suppression is a separate issue 01:03
as it happens, || can probably work from the binary semantics, but ^^ can't 01:04
not without playing games like Icon does, anyway
01:04 Chillance left 01:07 sftp_ left 01:12 clkao_ is now known as clkao
dalek ecza: b2c1062 | sorear++ | lib/ (2 files):
Improved Rakudo-inspired Str.perl
01:34
01:37 lutok joined
TimToady if we get bad connectivity to host02 on Tuesday, it's probably another solar flare 01:44
sorear hmm... does that mean that the problems are caused by particles moving much slower than c, and so we have warning because we saw a flare? 01:46
colomon niecza: say 1 01:48
p6eval niecza v13-335-g9a50d69: OUTPUT«1␤»
colomon how to we trigger a rebuild?
(evalbot, I mean) 01:49
TimToady sorear: yes 01:51
dalek ast: e7c703c | (Solomon Foster)++ | S02-names-vars/perl.t:
Fudge test which now fails, unfudge a batch which now work.
01:55
01:57 wolfman2000 joined
sorear evalbot rebuild niecza 02:00
p6eval OK (started asynchronously)
02:01 thou left
dalek Rebuild of niecza complete. 02:01
02:02 xinming joined 02:06 drbean joined 02:11 drbean left 02:17 drbean joined 02:19 whiteknight left
colomon sorear++ 02:23
dalek ast: 48791d6 | (Solomon Foster)++ | S05- (2 files):
Unfudge tests that now work in niecza.
ecza: 566fb13 | sorear++ | / (2 files):
Fix "\r\n".perl
02:25
02:28 lutok left
dalek ast: a39b6df | (Solomon Foster)++ | S02-names-vars/perl.t:
Unfudge test that sorear++ just fixed.
02:29
02:43 thou joined 02:53 Radvendii joined
Radvendii i just had a great idea for debugging in perl6 02:53
Have a function that enters an interactive loop (like when you just type in perl6 in the command line) and it exits when you type in a different command. 02:54
so you can just stick it into the program
and then check variables as you need, modify them if you want, etc
eh? 03:00
03:00 cognominal left
Radvendii what'd'ya guys think? 03:00
abercrombie Hi all, my $str = "abcccdef"; if $str ~~ /ab <?before (c) $0**2> (.*)/ { say $0;} how can I get 'c' instead of 'cccdef'? I want the 2nd $0 be the same as the first $0 03:02
03:02 cognominal joined
Radvendii nom: my $str = "abcccdef"; if $str ~~ /ab <?before (c) $0**2> (.*)/ { say $0;} 03:03
p6eval nom 4ffbd6: OUTPUT«=> <cccdef>␤␤»
sorear Radvendii: it's a great idea, I had it a few weeks ago but I haven't gotten around to implementing it
Radvendii: it's already available for Perl 5 in the Devel::REPL and Carp::REPL modules 03:04
Radvendii nom: my $str = "abcccdef"; if $str ~~ /ab <?before (c) $0**2> [.*]/ { say $0;}
p6eval nom 4ffbd6: OUTPUT«Any()␤»
Radvendii sorear: oh, okay. sweet.
sorear abercrombie: Why do you have the (.*) in there at all? 03:05
Radvendii sorear: also, is there a way to tell from within a sub what called that sub
sorear 'caller'
Radvendii woah
sorear nom: say caller.^methods
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&caller' called (line 1)␤»
sorear nom: say callframe(1).^methods
p6eval nom 4ffbd6: OUTPUT«new line file callframe level annotations my␤»
TimToady while prompt "And then? " -> $a { eval $a }
abercrombie sorear: because I use that to verify which is the real '$0' 03:06
sorear abercrombie: <?before> by its nature forgets everything inside 03:07
abercrombie: if you don't want the forgetting, you'll need to save state with a {}-block, or use a conjuction instead, or something
abercrombie so there is no way to refer to it later? in perl5 I can refer to it
a {} block? can you show me a simple example?
Radvendii sorear: what do you think about the idea that if you call, let's say @a.unknownmethod, instead of just failing, it first tries unknownmethod(@a). that would remove the need to implement things twice to make them functions and methods... 03:15
03:19 lutok joined
abercrombie sorear: {} works, thanks, I will try that in my example 03:24
03:25 orafu left, orafu joined
Radvendii what's the diference between ^^ and ^ 03:27
abercrombie begin of word vs begin of line
Radvendii not in regex
as in 03:28
nom: 1 ^^ 0
p6eval nom 4ffbd6: ( no output )
abercrombie not include vs include
Radvendii nom: say 1 ^^ 0
p6eval nom 4ffbd6: OUTPUT«1␤»
abercrombie oh, no, I know what you mean
Radvendii nom: say 1 ^ 0
p6eval nom 4ffbd6: OUTPUT«one(1, 0)␤»
Radvendii oh
i know
it's like & vs && 03:29
^ creates a junction ^^ just evaluates
abercrombie really? I think xor should be +^ instead of ^^ 03:32
nom: say 1^^3
p6eval nom 4ffbd6: OUTPUT«Nil␤»
colomon that's bitwise, ^^ is logical
Radvendii is there a way to cross (X) with the application of a function? 03:33
so i would say ( * + 1, *+2) X 1,2 03:34
and it would spit out 2,3,3,4
(obviously, i'd being using more than just addition
)
03:34 xinming left 03:35 xinming joined
abercrombie what's your expected output? 03:35
Radvendii what do you mean?
abercrombie colomon: I didn't get it
nom: say 1 ^^ 1 03:36
p6eval nom 4ffbd6: OUTPUT«Nil␤»
colomon nom: say "blue" ^^ "green"
p6eval nom 4ffbd6: OUTPUT«Nil␤»
doy nom: say (* + 1, * + 2) X 1, 2
p6eval nom 4ffbd6: OUTPUT«_block1011 1 _block1011 2 _block1015 1 _block1015 2␤»
colomon ^^ is logical & short-circuiting the way && and || are
doy nom: say ((* + 1, * + 2) X 1, 2)()
p6eval nom 4ffbd6: OUTPUT«Method 'postcircumfix:<( )>' not found for invocant of class 'List'␤ in <anon> at src/gen/Metamodel.pm:3418␤ in block <anon> at /tmp/mh5VjCvugM:1␤ in <anon> at /tmp/mh5VjCvugM:1␤»
colomon nom: say ((* + 1, * + 2) X 1, 2)>>.() 03:37
p6eval nom 4ffbd6: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤ in whatevercode <anon> at /tmp/wvXVlTrRua:1␤ in method reify at src/gen/CORE.setting:4471␤ in method reify at src/gen/CORE.setting:4376␤ in method reify at src/gen/CORE.setting:4376␤ in method gimme a…
abercrombie colomon: so it's a NYI now?
colomon abercrombie: what is?
abercrombie ^^
colomon no, it's working in the above examples
nom: say "blue" ^^ False 03:38
p6eval nom 4ffbd6: OUTPUT«blue␤»
colomon nom: say "blue" ^^ False ^^ False
p6eval nom 4ffbd6: OUTPUT«blue␤»
colomon nom: say "blue" ^^ False ^^ False ^^ "green"
p6eval nom 4ffbd6: OUTPUT«Nil␤»
benabik nom: say 0 but True ^^ 'bob' but False
Radvendii there is a bug with [^^] however
p6eval nom 4ffbd6: OUTPUT«bob␤»
03:38 Psyche^ joined
Radvendii BUT?? 03:38
abercrombie oh, i see 03:39
colomon nom: say (0 but True) ^^ ('bob' but False)
p6eval nom 4ffbd6: OUTPUT«bob␤»
Radvendii oh, i remember but now
nom: say [^^] 1,1,1
colomon that seems wrong to me...
p6eval nom 4ffbd6: OUTPUT«1␤»
Radvendii that's also wrong 03:40
:P
benabik nom: say 1 ^^ 1 ^^ 1
p6eval nom 4ffbd6: OUTPUT«Nil␤»
colomon right (it's wrong)
Radvendii in any case, is there a way to cross apply functions yet?
03:42 Patterner left, Psyche^ is now known as Patterner
colomon other than directly calling the routine that implements Xop (which is probably not spec) I can't think of anything. 03:42
but if you define an operator....
Radvendii which applies a sub 03:43
like in haskell
colomon nom: sub infix:<apply>(&a, $b) { a($b); }; say ((* + 1, * + 2) Xapply (1, 2))
p6eval nom 4ffbd6: OUTPUT«2 3 3 4␤»
03:43 lutok left
Radvendii BAM 03:44
colomon niecza: sub infix:<apply>(&a, $b) { a($b); }; say ((* + 1, * + 2) Xapply (1, 2))
Radvendii applaudes colomon++
i feel like that is a worthwhile operator to have in the main code.
colomon implementing new operators to take advantage of the meta ops is a handy trick to keep in your toolkit 03:45
Radvendii yeah, i didn't know that was possible, but it makes sense
colomon I hope in the long run there will be a normal sub interface for all the metaop routines, because implementing an operator and just using it once is kind of cheesy, IMO. 03:47
bedtime. 'night all.
Radvendii now i dont know what to call it... :P 03:48
o/
o̊O 03:56
what's a hyperwhatever?
it says it's not yet implemented...
sorear Radvendii: @a.foo falling back to foo(@a) - this used to be how it was done, but they changed it, before my time 03:59
Radvendii: ** in term context is "hyperwhatever"
it's reserved syntax for use with multidim arrays
Radvendii yay :D more Splats! 04:00
:P
doy that's how it works in perl 5, and it's almost universally hated
Radvendii why is it hated?
doy makes it really hard to tell how something is going to parse
and leads to confusing error messages
actually, it works the other way around in perl5, never mind 04:01
Radvendii i guess...
i guess i tend to think about methods as infix operators with an object on one side and a list on the other
nom: $a="h"; say "hi"~~/$a/ 04:05
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤Variable $a is not predeclared at line 1, near "=\"h\"; say "␤»
Radvendii nom: my $a="h"; say "hi"~~/$a/
p6eval nom 4ffbd6: OUTPUT«=> <h>␤␤»
Radvendii how do i make an argument optional?
sorear add ? 04:06
Radvendii thanks
or just give it a default value, right? 04:07
04:07 shinobicl_ joined
Radvendii i <3 perl. where you can turn 5 lines into one, with the bat of an eye 04:11
and somehow, it ends up MORE readable than any other language... 04:12
sorear nom: sub foo($x = 5) { }; say &foo.signature.params[0].optional 04:17
p6eval nom 4ffbd6: OUTPUT«Bool::True␤»
Radvendii haha, nice. 04:18
sorear ?
at me?
Radvendii i just think the &foo.signature.params[0].optional line is funny
04:20 packetknife joined, packetknife left 04:21 packetknife joined
Radvendii nom: "a" ~~ /a/; say $0 04:21
p6eval nom 4ffbd6: OUTPUT«Any()␤»
Radvendii nom: "a" ~~ /(a)/; say $0 04:22
p6eval nom 4ffbd6: OUTPUT«=> <a>␤␤»
Radvendii nom: "a" ~~ /(a)/; given "b" {when 'b' {}} say $0
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤Confused at line 1, near "given \"b\" "␤»
Radvendii nom: "a" ~~ /(a)/; given "b" {when 'b' {say "in"}} say $0 04:23
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤Confused at line 1, near "given \"b\" "␤»
Radvendii huh?
nom: "a" ~~ /(a)/; given "b" {when 'b' {say "in"}}; say $0 04:24
p6eval nom 4ffbd6: OUTPUT«in␤=> <a>␤␤»
Radvendii ah 04:25
is there a shorthand for $a eq 'b' ?? 'c' !! 'b' 04:26
as in, like !$a except that $a is not a boolean
you want to make it the inverse, of an enumeration
oh 04:27
nom: $a='b'; (a,b).grep($a) 04:28
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤Variable $a is not predeclared at line 1, near "='b'; (a,b"␤»
Radvendii nom: my $a='b'; (a,b).grep($a)
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&a' called (line 1)␤Undefined routine '&b' called (line 1)␤»
Radvendii nom: my $a='b'; <a b>.grep($a)
p6eval nom 4ffbd6: ( no output )
Radvendii nom: my $a='b'; say <a b>.grep($a)
p6eval nom 4ffbd6: OUTPUT«b␤»
Radvendii nom: my $a='b'; say <a b>.grep(!$a) 04:29
p6eval nom 4ffbd6: OUTPUT«␤»
sorear * ne $a, maybe
Radvendii nom: my $a='b'; say <a b>.grep(* ne$a)
doy nom: my $a = 'c'; say <b c>[$a eq 'b']
p6eval nom 4ffbd6: OUTPUT«a␤»
nom 4ffbd6: OUTPUT«b␤»
04:30 packetknife left
Radvendii nom: my $a='b'; say <a b>.grep(* ne $a) 04:30
p6eval nom 4ffbd6: OUTPUT«a␤»
Radvendii alright
that does it 04:31
04:36 birdwindupbird joined 04:37 packetknife joined
Radvendii What method do i overload to do more initialization after the 04:41
"has"ed variables have been initialized?
sorear you write a submethod BUILD 04:44
04:44 rsimoes1 left
sorear although technically it's supposed to run BEFORE has initialization 04:44
Radvendii exactly
and then initialization doesn't occur
nom: class A {$.b=3; submethod BUILD {$a does role {method test {} } } } say A.new.b; 04:46
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤Variable $a is not predeclared at line 1, near " does role"␤»
Radvendii nom: class A {$.b=3; submethod BUILD {$.b does role {method test {} } } } say A.new.b;
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤Confused at line 1, near "class A {$"␤»
Radvendii nom: class A {ihas $.b=3; submethod BUILD {$.b does role {method test {} } } } say A.new.b; 04:47
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤Confused at line 1, near "class A {i"␤»
Radvendii haha, ihas. been using vim too much :P
nom: class A {has $.b=3; submethod BUILD {$.b does role {method test {} } } } say A.new.b;
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤Confused at line 1, near "class A {h"␤»
sorear needs more ;s
TimToady Radvendii: you overload BUILDALL if you really want to get the final say
Radvendii nom: class A {has $.b=3; submethod BUILD {$.b does role {method test {} } } }; say A.new.b;
p6eval nom 4ffbd6: OUTPUT«Cannot use 'does' operator with a type object␤ in sub infix:<does> at src/gen/CORE.setting:8661␤ in submethod BUILD at /tmp/qrd10ZVU0z:1␤ in method BUILDALL at src/gen/CORE.setting:583␤ in method bless at src/gen/CORE.setting:573␤ in method new at src/gen/CORE.se… 04:48
sorear (but Perl 6 *still* doesn't have anything like Moose's "after")
Radvendii nom: class A {has $.b=3; submethod BUILD {$.b = 2} }; say A.new.b; 04:49
p6eval nom 4ffbd6: OUTPUT«Cannot assign to a readonly variable or a value␤ in submethod BUILD at /tmp/iBQTLYkMkD:1␤ in method BUILDALL at src/gen/CORE.setting:583␤ in method bless at src/gen/CORE.setting:573␤ in method new at src/gen/CORE.setting:558␤ in block <anon> at /tmp/iBQTLYkMkD:1␤…
Radvendii nom: class A {has $.b=3 is rw; submethod BUILD {$.b = 2} }; say A.new.b;
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
Radvendii nom: class A {has $.b=3 is rw; submethod BUILD {$.b = 2}; }; say A.new.b;
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
Radvendii i dont understand... 04:50
TimToady std: class A {has $.b=3 is rw; submethod BUILD {$.b = 2}; }; say A.new.b;
p6eval std 40d10f7: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/2H5eNxibqF line 1:␤------> class A {has $.b=3 ⏏is rw; submethod BUILD {$.b = 2}; }; say␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Parse failed␤FAIL…
TimToady doesn't make sense to have '3 is rw' :) 04:51
Radvendii nom: class A {has $.b is rw=3; submethod BUILD {$.b = 2}; }; say A.new.b;
p6eval nom 4ffbd6: OUTPUT«2␤»
Radvendii so BUILD executes first, yet the output is 2
TimToady the default is used only if it's needed 04:52
Radvendii but i think it also get's ousted if you do something like $.b does MyRole in BUILD
TimToady it's wasted energy to initialize it one way and then the other, so it only does one or the other
TimToady wonders if there's way to lazily attach the default to the first FETCH 04:54
then you could say $.b += 2 and it'd fetch the default if there's a fetch before the store
but if you store before fetch, it never needs to evaluate the default thunk 04:56
Radvendii nom: role MyRole {method hello {say "hi"} }; my @a does MyRole; @a.hello;
p6eval nom 4ffbd6: OUTPUT«Method 'hello' not found for invocant of class 'Array'␤ in block <anon> at /tmp/fFHCyI9lmE:1␤ in <anon> at /tmp/fFHCyI9lmE:1␤»
sorear TimToady: I'm pretty sure jnthn++ has talked about doing just that in the past 04:57
TimToady not that I've noticed, but I'm not (quite) omniscient...
anyway, if it can be made to work nicely, we can logically apply the initializers first without wasting much effort 04:58
dalek ecza: 9a16f57 | sorear++ | lib/Kernel.cs:
|$foo capture current state, not initial state
TimToady the apply after is just laziness reinvented poorly, in that view of things 04:59
Radvendii is there a way to say something like <a b c> does role MyRole and have it work? 05:00
TimToady but if you have 'has $.b = die "Didn't initialize required attribute"' it had better not call the thunk unless you actually fetch it first
doy nom: role MyRole {method hello {say "hi"} }; my @a is MyRole; @a.hello; 05:01
p6eval nom 4ffbd6: OUTPUT«Method 'hello' not found for invocant of class 'Array'␤ in block <anon> at /tmp/axSM9c9On4:1␤ in <anon> at /tmp/axSM9c9On4:1␤»
TimToady you can't modify the type of data in place; you need to use 'but' instead of 'does'
doy nom: role MyRole {method hello {say "hi"} }; my @a ub MyRole; @a.hello;
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤Confused at line 1, near "my @a ub M"␤»
doy nom: role MyRole {method hello {say "hi"} }; my @a but MyRole; @a.hello;
p6eval nom 4ffbd6: OUTPUT«Method 'hello' not found for invocant of class 'Array'␤ in block <anon> at /tmp/XyDcKQvlzO:1␤ in <anon> at /tmp/XyDcKQvlzO:1␤»
sorear 'does' there is a trait modifying the declarator 05:02
not the 'does' operator
TimToady I was ansering the <a b c> question
Radvendii huh?
oh 05:03
dalek ecza: cecbb7c | sorear++ | / (4 files):
First batch of signature introspection additions, largely cribbed from Rakudo
TimToady nom: role MyRole {method hello {say "hi"} }; my @a := [<a b c>] but MyRole; @a.hello 05:04
p6eval nom 4ffbd6: OUTPUT«hi␤»
TimToady like that
Radvendii nom: role MyRole {method hello {say "hi"} }; Class A {has @a := [<a b c>] but MyRole,[<d,e,f>] but MyRole;}; A.new.a[0].hello 05:06
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤You can't declare an attribute here; maybe you'd like a class or a role? at line 1, near " := [<a b"␤»
Radvendii nom: role MyRole {method hello {say "hi"} }; Class A {has @a := [<a b c>] does MyRole,[<d,e,f>] does MyRole;}; A.new.a[0].hello
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤You can't declare an attribute here; maybe you'd like a class or a role? at line 1, near " := [<a b"␤»
TimToady a 'does' must come before the block 05:07
Radvendii what do you mean?
TimToady oh, wait, I was misreading
benabik Are keywords case sensitive? 'Class A' vs 'class A'
TimToady you're more confused than I thought :)
yes, keywords are case sensitive 05:08
Radvendii TimToady: do you see what i'm trying to do? 05:09
05:09 Trashlord left
TimToady yes, I see that you're trying to confuse me, which is redundant :) 05:09
Radvendii haha. no. im trying to make it "has" an array of anonymous arrays, all of which "does" a role 05:11
TimToady nom: role MyRole {method hello {say "hi"} }; class A { has @a = [<a b c>] but MyRole, [<d e f>] but MyRole }; A.new.a[0].hello
p6eval nom 4ffbd6: OUTPUT«Method 'a' not found for invocant of class 'A'␤ in block <anon> at /tmp/a4oc4_ZhDP:1␤ in <anon> at /tmp/a4oc4_ZhDP:1␤»
TimToady nom: role MyRole {method hello {say "hi"} }; class A { has @.a = [<a b c>] but MyRole, [<d e f>] but MyRole }; A.new.a[0].hello 05:12
p6eval nom 4ffbd6: OUTPUT«Method 'hello' not found for invocant of class 'Str'␤ in block <anon> at /tmp/iUDrjtg6tm:1␤ in <anon> at /tmp/iUDrjtg6tm:1␤»
sorear TimToady: in sub foo(|bar) { ... }, is the name of the introduced variable 'bar' or '|bar'? 05:13
TimToady nom: role MyRole {method hello {say "hi"} }; class A { has @.a = ([<a b c>] but MyRole, [<d e f>] but MyRole) }; A.new.a[0].hello
p6eval nom 4ffbd6: OUTPUT«Method 'hello' not found for invocant of class 'Str'␤ in block <anon> at /tmp/YRaNhmB0_m:1␤ in <anon> at /tmp/YRaNhmB0_m:1␤»
TimToady must be flattening bogusly
nom: role MyRole {method hello {say "hi"} }; class A { has @.a = ([<a b c>] but MyRole, [<d e f>] but MyRole) }; A.new.a[0].say 05:14
p6eval nom 4ffbd6: OUTPUT«a␤»
TimToady yes, the [] is flattening in a list, boo hiss
well, maybe it's arguable that it should after the but
nom: role MyRole {method hello {say "hi"} }; class A { has @.a = $([<a b c>] but MyRole), $([<d e f>] but MyRole) }; A.new.a[0].say 05:15
p6eval nom 4ffbd6: OUTPUT«a b c␤»
TimToady nom: role MyRole {method hello {say "hi"} }; class A { has @.a = $([<a b c>] but MyRole), $([<d e f>] but MyRole) }; A.new.a[0].hello
p6eval nom 4ffbd6: OUTPUT«hi␤»
TimToady there you go
Radvendii oh, that's weird. why should it?
ooh
TimToady because function calls don't commit to either .item or .list
Radvendii that's good
thanks so much
TimToady and 'but' is really just a function call
so returns an uncommited parcel 05:16
sorear: just 'bar'
sorear yeah, I can see how that would happen
Radvendii so can i say [but MyRole] followed by a list?
TimToady likewise \bar
Radvendii and it will apply it to all of the elements?
sorear in Rakudo, the thing that makes [foo] not flatten is the Scalar wrapper; 'but' returns a naked Array, which flattens
TimToady no 05:17
only infixes can be reduced on
and metaops never allow embedded whitespace
sorear Radvendii: you can say Object but (Role1, Role2, Role3)
and it does summation automatically
TimToady besides, that's more like a map or a hyper, not a reduce
sorear seems more like a foldl to me 05:18
TimToady map * but MyRole, [], [], []
there's no folding
Radvendii oh
i see
sorear oh, I misunderstood
TimToady std: role MyRole {}; ([], [], []) »but» MyRole 05:19
p6eval std 40d10f7: OUTPUT«ok 00:01 111m␤»
TimToady std: role MyRole {}; [], [], [] Xbut MyRole
p6eval std 40d10f7: OUTPUT«ok 00:01 111m␤»
Radvendii nom: role MyRole {method hello {say "hi"} }; class A { has @.a = map * but MyRole, [<a b c>], [<d e f>] }; A.new.a[0].hello
p6eval nom 4ffbd6: OUTPUT«No applicable candidates found to dispatch to for 'map'. Available candidates are:␤:(Callable &code, *@values)␤␤ in method <anon> at /tmp/tAVx7zqpyJ:1␤ in method BUILDALL at src/gen/CORE.setting:583␤ in method bless at src/gen/CORE.setting:573␤ in method new at sr…
TimToady perhaps it's not whatevering 'but' successfully 05:20
try { $_ but MyRole } instead
Radvendii nom: role MyRole {method hello {say "hi"} }; class A { has @.a = map {$_ but MyRole} [<a b c>], [<d e f>] }; A.new.a[0].hello
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤Unable to parse infixish, couldn't find final ']' at line 2␤»
TimToady with a comma
Radvendii nom: role MyRole {method hello {say "hi"} }; class A { has @.a = map {$_ but MyRole}, [<a b c>], [<d e f>] }; A.new.a[0].hello
p6eval nom 4ffbd6: OUTPUT«Method 'hello' not found for invocant of class 'Str'␤ in block <anon> at /tmp/9OyG7xZD26:1␤ in <anon> at /tmp/9OyG7xZD26:1␤»
TimToady same deal 05:21
sorear try { $( $_ but MyRole ) }
Radvendii nom: role MyRole {method hello {say "hi"} }; class A { has @.a = map {$_ but MyRole}, $([<a b c>]), $([<d e f>]) }; A.new.a[0].hello
p6eval nom 4ffbd6: OUTPUT«Method 'hello' not found for invocant of class 'Str'␤ in block <anon> at /tmp/D1w7gc02D2:1␤ in <anon> at /tmp/D1w7gc02D2:1␤»
TimToady { ($_ but MyRole).item }
Radvendii nom: role MyRole {method hello {say "hi"} }; class A { has @.a = map {($_ but MyRole).item}, [<a b c>], [<d e f>] }; A.new.a[0].hello
TimToady maybe
p6eval nom 4ffbd6: OUTPUT«hi␤»
Radvendii YAY :D
sorear \o/
Radvendii \o/*RAINBOWS*\o/ 05:22
05:22 koban joined
TimToady hyper probably doesn't care about .item 05:22
Radvendii nom: role MyRole {method hello {say "hi"} }; class A { has @.a = map {$($_ but MyRole)}, [<a b c>], [<d e f>] }; A.new.a[0].hello
p6eval nom 4ffbd6: OUTPUT«hi␤»
Radvendii that works too
05:22 thou left 05:23 koban left
TimToady nom: role MyRole {method hello {say "hi"} }; class A { has @.a = ([<a b c>], [<d e f>]) »but» MyRole }; A.new.a[0].hello 05:23
p6eval nom 4ffbd6: OUTPUT«Method 'specialize' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤ in <anon> at src/gen/Metamodel.pm:2075␤ in <anon> at src/gen/Metamodel.pm:2071␤ in compose at src/gen/Metamodel.pm:2069␤ in mixin at src/gen/Metamodel.pm:947␤ in sub infix:<but> at …
TimToady wow
Radvendii uh... saywhatnow?
TimToady nom: role MyRole {method hello {say "hi"} }; class A { has @.a = [<a b c>], [<d e f>] Xbut MyRole }; A.new.a[0].hello 05:24
p6eval nom 4ffbd6: OUTPUT«Method 'specialize' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤ in <anon> at src/gen/Metamodel.pm:2075␤ in <anon> at src/gen/Metamodel.pm:2071␤ in compose at src/gen/Metamodel.pm:2069␤ in mixin at src/gen/Metamodel.pm:947␤ in sub infix:<but> at …
Radvendii is »something» the same as Xsomething?
TimToady it really doesn't want to meta-but
Radvendii out of context, that sounds hillarious
TimToady Radvendii: more or less, if there's only one thing on the right, and you squint to not see the differences in precedence and listiness 05:25
and eager/laziness
Xop is lazy, »op» is so eager it parallelizes
moritz \o
Radvendii o/
TimToady: ah. i see 05:26
sorear o/
niecza: 1
p6eval niecza v13-339-gcecbb7c: ( no output )
sorear niecza: .signature.perl.say for &open.candidates 05:27
p6eval niecza v13-339-gcecbb7c: OUTPUT«:(Any $filename, Any :$w, Any :$a, Any :$r, Any :$rw)␤»
05:27 jaldhar joined
sorear nom: multi MAIN('foo') { }; multi MAIN('bar', $quux) { }; @*ARGS = '--help' 05:29
p6eval nom 4ffbd6: OUTPUT«Usage:␤ --setting=SAFE foo␤ --setting=SAFE bar <quux>␤»
TimToady niecza: role MyRole {method hello {say "hi"} }; class A { has @.a = [<a b c>], [<d e f>] Xbut MyRole }; A.new.a[0].hello
p6eval niecza v13-339-gcecbb7c: OUTPUT«hi␤» 05:30
05:30 shinobicl_ left
TimToady \o/ (maybe) 05:30
niecza: role MyRole {method hello {say "hi"} }; class A { has @.a = [<a b c>], [<d e f>] »but» MyRole }; A.new.a[0].hello 05:31
p6eval niecza v13-339-gcecbb7c: OUTPUT«Unhandled exception: Unable to resolve method hello in class Array␤ at /tmp/cVEydQLl75 line 1 (mainline @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3325 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3326 (module-CORE @ 59) ␤ at /ho…
Radvendii oh bam. niecza takes the prize!
kind of...
TimToady niecza: role MyRole {method hello {say "hi"} }; class A { has @.a = ([<a b c>], [<d e f>]) »but» MyRole }; A.new.a[0].hello
p6eval niecza v13-339-gcecbb7c: OUTPUT«Unhandled exception: Unable to resolve method hello in class Array␤ at /tmp/igzNfdoUkR line 1 (mainline @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3325 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3326 (module-CORE @ 59) ␤ at /ho…
Radvendii more of the prize than rakudo?
:P
sorear »but» is recursing all the way down
buttifying the Strs
and packing them in Arrays
"buttifying"? really? 05:32
butterflying, maybe
TimToady ah, well, I've been on the warpath with deepmap semantics for hypers for a while now
Radvendii there should be new terminology made, new conjugations, new suffixes, the whole 9 yards! 05:33
TimToady if nobody wants to implement duckmap semantics instead, we'll have to put them back to shallow only, or at least only as far as the first shaped array 05:34
sorear what was duckmap?
TimToady actually, duckmap was only proposed for unaries, so nevermind
Radvendii ugh. does initialisation of "has"ed variables know about "self" 05:35
TimToady S03:4281
Radvendii: supposed to, but probably NYI
Radvendii damn. 05:36
TimToady BUILD knows about self
and if you're going to have interdependencies, probably better to have them in one place
Radvendii BTW @sorear: This is why everyone keeps asking "when is perl6 going to be finished"
it's not interdependencies... I have to pass "self" to the role 05:37
TimToady this really sounds like something you want to do in BUILD
Radvendii i dont think so... gist.github.com/1668204 05:39
(it's a chess board in case you're wondering) 05:40
is there any way to get the object that "has" you? 05:42
and by you i mean from the point of view of the variable
TimToady self is supposed to work, but NYI
the variable itself can't know 05:43
Radvendii right, but as of now, can i say @.a.super?
oh
TimToady it might have instantiations in any number of arguemtns
er, of objects
Radvendii okay
TimToady it's just an "offset" into an abstract structure
Radvendii so i just want to move all of this code into the BUILD submethod, even though that's not ideal 05:44
at least temporarily
is that right?
TimToady can probably be made to work
Radvendii as is? 05:45
oh
if i were to move it
dalek kudo/nom: 78bee73 | moritz++ | src/core/Exceptions.pm:
simplify exceptions code a bit by bringing in X::Base inheritance through X::Comp
kudo/nom: 95f97e4 | moritz++ | src/ (2 files):
first X::Parameter class; many more to come...
TimToady as long as you don't depend on other = defaults
Radvendii nope. my other ones depend on it
but not the other way around
and i may as well move them all into BUILD no?
moritz nom does allow attributes in defaults
Radvendii to keep them in one place so they're easy to find later? 05:46
moritz nom: class A { has $.a = 3; has $.b = 2 * $a; }; say A.new.b
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤Variable $a is not predeclared at line 1, near "; }; say A"␤»
Radvendii s/$a/$.a/
moritz nom: class A { has $.a = 3; has $.b = 2 * $.a; }; say A.new.b
p6eval nom 4ffbd6: OUTPUT«6␤»
Radvendii yeah i know, but i specifically want to use "self"
not access some other one 05:47
TimToady nom: class A { has $.a = 3; has $.b = 2 * self.a; }; say A.new.b
05:47 wolfman2000 left
p6eval nom 4ffbd6: OUTPUT«6␤» 05:47
Radvendii oh!
weird
TimToady nom: class A { has $.a = 3; has $.b = self; }; say A.new.b.a
p6eval nom 4ffbd6: OUTPUT«3␤» 05:48
TimToady looks like it works
Radvendii then why isn't it working for me...
Symbol 'self' not predeclared in <anonymous> (./chess_struct.pl:27)
05:48 kaleem joined
TimToady are you using a recent version? 05:49
Radvendii 2011.12
is there a newer one?
TimToady probably too old
Radvendii i thought i checked recently
TimToady most of us just use the bleading edge from github 05:50
Radvendii i thought i was
is there any way to make it autoupdate?
TimToady you don't want that, it would always be recompling at the wrong time 05:51
Radvendii yay :D we finally get a --prefix option! 05:53
TimToady: what do you mean? it would just recompile when there is a newer version... 05:55
moritz rakudo has had --prefix for ages 05:56
Radvendii it didn't have it for 2011.12
moritz nom: sub f($?x) { }
p6eval nom 4ffbd6: OUTPUT«===SORRY!===␤In signature parameter, '$?x', it is illegal to use '?' twigil at line 1, near ") { }"␤»
Radvendii or maybe the one vefore that
moritz Radvendii: of course it had 05:57
Radvendii alright, maybe i missed it/ dont remember
if this works, ill be too happy to care :P 05:58
sorear perl6: sub f($*x) { } ; say &f.signature.params[0].name
p6eval rakudo 4ffbd6, niecza v13-339-gcecbb7c: OUTPUT«$*x␤» 05:59
..pugs b927740: OUTPUT«*** No such subroutine: "&params"␤ at /tmp/yTL8ISt1WK line 1, column 22 - line 2, column 1␤»
06:01 ponbiki joined
Radvendii i just noticed that [+] can be used instead of any() if you know they're all going to be booleans... 06:02
sorear [?|] probably best
TimToady well, [*] can be used for all() 06:03
Radvendii best speed wise or funny wise?
TimToady: true dat
TimToady congratulations, you've discovered Boolean algebra
sorear clarity of intent wise
Radvendii TimToady: haha
sorear: mhmm... is there any difference between [|] and any() 06:04
sorear No
Except that [|] is a listop and so flattens lists
Radvendii ooh. any() shall henceforth begone from my memory
TimToady so's any 06:05
sorear oh, right
you don't like any()?
Radvendii but when would you ever want to evaluate a list as a boolean
sorear 1. any doesn't have anything to do with booleans
Radvendii i don't like specific functions for things that could be generalized. like having a sum() function when [+] is what you mean 06:06
sorear: yeah, i just remembered that
TimToady if all(@stations) { say "Go for launch!
")
"} even
sorear 2. if @list { } is nicer than if @list.elems != 0 { }
Radvendii sorear: how is that relevant... oh, as an example of a special case? 06:07
sorear 22:05 < Radvendii> but when would you ever want to evaluate a list as a boolean
TimToady but [|] is exactly equivalent to any as far as I can tell
sometimes the name reads better though
Radvendii sorear: oh...
sorear: i see
TimToady er, that's a rather different meaning than any or all 06:08
Radvendii TimToady: i see what you mean, but i personally tend to disagree
(about the [|] vs any())
sorear the current version of niecza can't do constant folding with higher-order functions like &reduce
Radvendii what does &reduce do?
sorear so $foo eq any < foo bar > will be quite a bit faster than $foo eq [|] <foo bar> 06:09
TimToady oh, you think the typical Perl user is going to automatically intuit what [|] means?
besides, this is Perl, so TMTOWTDI
Radvendii TimToady: no, but i will
sorear Radvendii: [|] <foo bar> means roughly &reduce(&infix:<|>, <foo bar>)
Radvendii TMTOWTDI?
sorear There (is) More Than One Way To Do It
TimToady There's
Radvendii sorear: right. exactly. I'm not saying we should get rid of it by any means 06:10
just saying [|] makes more sense to _me_
TimToady how...postmodern...
06:11 rsimoes left
sorear well, uh, Radvendii, TMTOWTDI means the language can adapt to the quirks of you and your problems... 06:11
(not to suggest that I don't have my own quirks.)
Radvendii TimToady: how so? (postmodern, that is) 06:12
TimToady TMTOWTD is a postmodern attitude
*DI
sorear niecza: $*OUT.say(5)
p6eval niecza v13-339-gcecbb7c: OUTPUT«Unhandled exception: Cannot unbox a TextWriter from an object of repr P6opaque␤ at /home/p6eval/niecza/lib/CORE.setting line 3165 (TextWriter.say @ 5) ␤ at /tmp/ClxUKgm4ZW line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3325 (ANON …
Radvendii sorear: yup
TimToady: ah
TimToady: i really can't see why anyone would use Java over Perl... I really can't. 06:13
oh
maybe for web stuff
but for applications?
TimToady www.wall.org/~larry/pm.html
sorear Java is/was more likely to work out of the box on Windows
Java uses less memory and is faster 06:14
Radvendii sorear: what??
TimToady so far
06:14 birdwindupbird left
Radvendii oh, well perl6 yeah. but if you're concerned about that then perl5 06:14
sorear no, I'm talking about perl5 06:15
the biggest thing perl5 as a platform has going for it is startup speed
Radvendii onlyjob.blogspot.com/2011/03/perl5-...a-tcl.html
TimToady we could use some HotSpot optimizing at some point
sorear have you seen the size of struct sv? 06:16
06:17 revdiablo left
sorear my @array = (15) x 1_000_000; # this will allocate about 20MB, twice that on 64-bit 06:17
Radvendii i dont even know what struct sv is...
sorear actually more than that because of temp storage on the stack
06:18 revdiablo joined, revdiablo left, revdiablo joined
Radvendii I assume that's a lot more than it should... 06:18
I'm still getting the symbol "self" undeclared error 06:19
even with the most up-to-date rakudo
whats the difference between a symbol and subroutine? 06:20
and which should "self" be?
sorear a symbol is a name
a subroutine is a thing
06:20 s1n joined
Radvendii so self is a... symbol? 06:21
sorear subroutines can (but need not) be bound to symbols
yes, self is a symbol
I think
TimToady it is a term, so doesn't expect any expression after
std: self self
p6eval std 40d10f7: OUTPUT«===SORRY!===␤'self' used where no object is available at /tmp/DeWV1e4Wck line 1:␤------> self⏏ self␤Confused at /tmp/DeWV1e4Wck line 1:␤------> self ⏏self␤ expecting any of:␤ bracketed infix␤ infix or meta-in…
sorear it's really somewhat unclear in the spec, but both rakudo and niecza use a symbol named 'self' to implement the term:self production
Radvendii so why doesn't it recognize self in the initialization? 06:22
sorear niecza: self self
p6eval niecza v13-339-gcecbb7c: OUTPUT«===SORRY!===␤␤'self' used where no object is available at /tmp/bTukeZjtgM line 1:␤------> self⏏ self␤␤Confused at /tmp/bTukeZjtgM line 1:␤------> self ⏏self␤␤Parse failed␤␤»
Radvendii i thought we determined that it should.
TimToady std: class A { method foo { self self } }
p6eval std 40d10f7: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/SOQAoHiAvR line 1:␤------> class A { method foo { self ⏏self } }␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Parse failed␤FAILED 00:01 109m␤»…
TimToady std: rand rand 06:23
p6eval std 40d10f7: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/3vXyxyURbP line 1:␤------> rand ⏏rand␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Parse failed␤FAILED 00:01 108m␤»
Radvendii nom: class A { $.a = 3; $.b=self}; say A.new.b.a;
p6eval nom 95f97e: OUTPUT«===SORRY!===␤Symbol 'self' not predeclared in <anonymous> (/tmp/g8xvFAFKum:1)␤»
Radvendii ah ha!
nom: class A { $.a = 3; $.b= self}; say A.new.b.a;
p6eval nom 95f97e: OUTPUT«===SORRY!===␤Symbol 'self' not predeclared in <anonymous> (/tmp/FRwULEUfyC:1)␤»
TimToady there's no object!
Radvendii nom: class A { has $.a = 3; has $.b = self}; my A $a.=new;say $a.b.a; 06:24
p6eval nom 95f97e: OUTPUT«3␤»
Radvendii oh 06:25
nom: class A { has $.a = 3; has $.b = self};say A.b.a;
p6eval nom 95f97e: OUTPUT«Cannot look up attributes in a type object␤ in method b at src/gen/CORE.setting:1384␤ in block <anon> at /tmp/k7rHgXOslO:1␤ in <anon> at /tmp/k7rHgXOslO:1␤»
Radvendii that's really the difference?
huh.
but in my code i _do_ have an object... 06:26
06:26 rsimoes joined
sorear adds logic to flush $*OUT at END time ... 06:26
moritz nom: class A is repr { } 06:30
p6eval nom 95f97e: OUTPUT«===SORRY!===␤Method 'cursor' not found for invocant of class 'Match'␤»
Radvendii role MyRole[$s] {method bar {say $s} }; class A { has @.a = ([<a b>],[<c d>]).map: {$($_ but MyRole[self])} } my A $foo .= new; $foo.a[0].bar; 06:31
nom: role MyRole[$s] {method bar {say $s} }; class A { has @.a = ([<a b>],[<c d>]).map: {$($_ but MyRole[self])} }; my A $foo .= new; $foo.a[0].bar;
p6eval nom 95f97e: OUTPUT«===SORRY!===␤Symbol 'self' not predeclared in <anonymous> (/tmp/wkLcYDHmti:1)␤»
Radvendii and there we have it
moritz std: @*a.*&uc 06:33
p6eval std 40d10f7: OUTPUT«ok 00:01 111m␤»
Radvendii nom: role MyRole[$s] {method bar {say $s} }; class A { has $.a = 5 but MyRole[self])} }; my A $foo .= new; $foo.a.bar;
TimToady Radvendii: that's a closure problem, not a self problem per se
p6eval nom 95f97e: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
Radvendii TimToady: how so? 06:34
nom: role MyRole[$s] {method bar {say $s} }; class A { has $.a = 5 but MyRole[self])}; my A $foo .= new; $foo.a.bar;
p6eval nom 95f97e: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
TimToady there
there's a self in the = thunk, but maps's closure isn't closing over that self
Radvendii i don't understand. 06:36
shouldn't it search the broader scope if it doesnt find self in map's scope?
TimToady I just said that 06:37
moritz right. And it doesn't do that correctly
06:37 araujo left
TimToady that's what "closing over" means 06:37
Radvendii oh
i see
moritz nom: eval '$^x'
p6eval nom 95f97e: OUTPUT«===SORRY!===␤Cannot use placeholder parameter $^x in the mainline at line 1, near ""␤»
06:37 araujo joined
Radvendii so would it even help to move it into the BUILD submethod? 06:38
moritz there's an easy way to check
Radvendii true dat
moritz std: my $::('f') 06:40
p6eval std 40d10f7: OUTPUT«ok 00:01 108m␤»
moritz not convinced :-)
06:40 birdwindupbird joined
Radvendii well, it works. : 06:44
:-D
now i've got other bugs to work out
D-:
dalek ecza: 6dab8a6 | sorear++ | lib/ (4 files):
Implement $*OUT and $*ERR
06:46
Radvendii If I overload the at_pos of an array to return a proxy where the FETCH just returns @a[$i], it'll end up in an infinite loop 06:52
and by @a[$i] i mean self[$i] 06:53
sorear ...What did you think would happen?
Radvendii no no, that's reasonable
the question is, how do i overload at_pos to make it do normal stuff and something else as well 06:54
there's no super.at_pos...
moritz there's nextsame
and nextwith and callwith 06:55
and callsame
dalek ecza: 7f9a514 | sorear++ | / (3 files):
More sub introspection fiddles, add MAIN_HELPER to setting
06:57
Radvendii i'm looking through the documentation and not getting what those subroutines do...
sorear there is no "super" in Perl 6 06:58
Radvendii sorear: i am aware
sorear: i just dont understand how to do this without it 06:59
or what (call|next)(same|with) does... 07:00
moritz Radvendii: then look for them in the test suite
Radvendii i am. 07:02
callsame.t
it's very confusing...
it calls the other multi sub?
moritz corect 07:03
sorear nextsame is, in a very loose sense, a fossil
its design can only be understood if you recognize that multi subs and methods used to be the same thing 07:04
TimToady er, not really
there were always different dispatchers
moritz sorear: huh?
Radvendii oh. so if i call it from a method, it calls the next method up? (or the method from the "super" (i know it doesnt exist) class?
)
TimToady they did have failover semantics at one point, but we weren't confusing them 07:05
well, except when we were :)
moritz Radvendii: it calls the next matching method, wherever it was defined
TimToady it calls whatever is next in the implicit loop of whichever dispatcher called you
moritz Radvendii: could even be a multi method in the same class
Radvendii but if it's just a single method, it will call the method of the super class? 07:06
TimToady what is "the" super class under multiple inheritance?
Radvendii it picks a "random" one, from my perspective?
TimToady bzzt
Radvendii or the first one that shows up when i say class XXX _is_ YYY 07:07
sorear haha!
07:07 wtw_ joined
Radvendii as in, when i say class X is Y is Z, it'll first go to Y? 07:07
TimToady and then where?
Z is not the super of Y 07:08
Radvendii then Y's superclass?
TimToady that would be Perl 5
dalek ecza: 123be0f | sorear++ | / (2 files):
Auto-call MAIN_HELPER when MAIN is defined; MAIN is now a supported feature
Radvendii but in perl6 it goes to Z?
TimToady it will go to siblings as well as parents
Radvendii both _at-the-same-time_?
TimToady no
Radvendii :P 07:09
siblings first?
TimToady there is a dispatcher loop, which is working from a list
it knows all the candidates before it starts, or at least how to find all the candidates
Radvendii okay.
TimToady imagine a dispatcher loop labeled CANDIDATE: 07:10
nextsame is just "next CANDIDATE;" in loop terms
(plus making sure the same args go to it)
Radvendii oh. so callsame calls the method i am in right now?
TimToady no, it it's nextsame plus return here 07:11
nextsame doesn't return
it's a tailcall
Radvendii so callsame is the same as "return nextsame"
TimToady except nextsame doesn't return 07:12
07:12 wtw left
TimToady nextsame is "return callsame" 07:12
Radvendii but callsame _already_ returns, right?
TimToady it returns to *here*
Radvendii oh
i see 07:13
TimToady you can put other statements after it
nextsame is a goto
Radvendii got it
sorear I never noticed before the inherent irony that "return" is a statement that never returns
Radvendii :P
so making a Proxy object who's FETCH and STORE methods are just "method {nextsame}" will do nothing? 07:14
(nothing differently than just using the normal at_pos that is) 07:15
is that right? 07:17
moritz Radvendii: nonono 07:18
Radvendii: if you write Proxy.new(FETCH => method () { nextsame } ), then nextsame won't have anywhere to go to
because it's called from an anonymous method, which doesn't know about any parent classes or so 07:19
07:19 molaf joined
Radvendii because method is anonymous? 07:19
ah
understood
moritz and it's not in the same class hierarchy as the at_pos you want to delegate to
maybe you really want the $obj.YourClass::method syntax
Radvendii how does that work? 07:20
moritz it calls the method named 'method' that is defined in YourClass
not the best possible match, as $obj.method would do 07:21
Radvendii why do we even need $obj.? why not "YourClass::method"?
the class is not linked to the $obj
07:23 raiph joined
moritz because A::b is for accessing subs, not methods 07:24
and of course $obj must conform to YourClass to be able to do that 07:25
Radvendii what if i just made an instance variable array which stored the values i wanted. and then just accessed that in FETCH?
moritz sounds good 07:26
(though I really don't know what you want to achieve in the end)
07:26 ponbiki left
Radvendii i want to make something that looks exactly like a two-dimensional array, except that it has other effects when you try to write to it 07:26
dalek ecza: 6e9a6a7 | sorear++ | src/niecza:
Only run MAIN from directly invoked units
07:31
ecza: f9b5518 | sorear++ | t/spectest.data:
Run the MAIN tests
ast: 75d071e | sorear++ | S06-multi/syntax.t:
[S06-multi/syntax] Unfudge for Niecza capture-parameter fix
ast: f72b2e8 | sorear++ | S06-other/main-usage.t:
[S06-other/main-usage] Fudge for Niecza
07:32 GlitchMr joined
dalek atures: 5d939e6 | sorear++ | features.json:
Niecza can do MAIN and some protos now
07:33
moritz \o/ 07:34
sorear std: my \foo 07:38
p6eval std 40d10f7: OUTPUT«===SORRY!===␤Malformed my at /tmp/02AwghqL96 line 1:␤------> my ⏏\foo␤ expecting any of:␤ scoped declarator␤ statement end␤ statement list␤Parse failed␤FAILED 00:01 107m␤»
sorear TimToady: I am guessing my \foo = EXPR should behave more like my \foo ::= EXPR; read-only-izing to reflect the "SSA nature"? 07:40
TimToady that doesn't seem to follow; a parcel is about as unassuming as you can get 07:42
sorear so my $x; my \y = $x; y = 5; say $x # 5 ?
TimToady it's the old "is ref" semantics 07:43
sorear also: do we want to keep '|$foo' supported as a synonym indefinitely, or only for a deprecation cycle?
'\$foo' too 07:44
TimToady well, in some sense those are okay, if you know what you're doing wrt item vs list interpolation, so I'm not in a rush to destroy them
long term, they are likely to cause misunderstanding though 07:45
moritz +1 to abolishing them in the long run
07:46 Radvendii left
TimToady re SSA, std does allow ::= as one of its four initializer infixes 07:46
not sure if that works though, since ::= just means ordinary sig binding with readonly default 07:47
it's possible we need some other syntactic help for SSA style
something equivalent to 'my \y = decontainerize $x' 07:52
sorear nom: my \y
p6eval nom 95f97e: OUTPUT«===SORRY!===␤Malformed my at line 1, near "\\y"␤»
sorear nom: sub foo(\y) { }
p6eval nom 95f97e: OUTPUT«===SORRY!===␤Malformed parameter at line 1, near "\\y) { }"␤»
sorear nom: sub foo(|y) { }
p6eval nom 95f97e: OUTPUT«===SORRY!===␤Malformed parameter at line 1, near "|y) { }"␤»
TimToady I'm not even sure std parses it yet... 07:53
std: my \y = 42;
p6eval std 40d10f7: OUTPUT«===SORRY!===␤Malformed my at /tmp/LCO6RCc8OH line 1:␤------> my ⏏\y = 42;␤ expecting any of:␤ scoped declarator␤ statement end␤ statement list␤Parse failed␤FAILED 00:01 107m␤»
TimToady nope
sorear I'm going to try and add it to niecza this week... I feel I've put this off long enough already
TimToady maybe I can have a glare at STD tomorrow and see if it's obvious 07:54
sorear there would seem to be a trick in allowing my \y to parse but not accidentally stealing the \y capturing syntax 07:55
since they both go through <variable> 07:56
probably needs an <?{ $*IN_DECL }> or two
TimToady needs to head off to bed; will try to look at it soon if you don't get to it 07:57
sorear g'night
07:58 lutok joined 08:09 xinming left 08:16 GlitchMr42 joined 08:19 charsbar___ joined, GlitchMr left, Woodi left, p6eval left, phenny left, nsh_ left, ascent__ left, Juerd left 08:20 Gothmog_ joined, yeltzooo joined 08:21 p6eval joined, ChanServ sets mode: +v p6eval, phenny joined, Woodi joined, ascent_ joined, Juerd joined 08:22 Yappoko___ joined 08:23 nsh joined, lrnperl6 joined 08:27 aloha joined 08:34 lrnperl6 left
sorear \o/ patch successfully transplanted the latest STD changes to niecza 08:35
std: constant foo == 5; 08:40
p6eval std 40d10f7: OUTPUT«ok 00:01 108m␤»
sorear phenny: tell TimToady std: constant foo == 5;
phenny sorear: I'll pass that on when TimToady is around.
08:40 mj41 joined
sorear std: my Set $x .= new 08:59
p6eval std 40d10f7: OUTPUT«ok 00:01 110m␤»
sorear std: my Set $x .=new 09:00
p6eval std 40d10f7: OUTPUT«ok 00:01 110m␤»
sorear std: my Set $x = pies
p6eval std 40d10f7: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'pies' used at line 1␤Check failed␤FAILED 00:01 110m␤»
sorear std: my Set $x = new
p6eval std 40d10f7: OUTPUT«ok 00:01 110m␤»
sorear std: my Set $x .= pies
p6eval std 40d10f7: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'pies' used at line 1␤Check failed␤FAILED 00:01 110m␤»
sorear phenny: tell TimToady std: my Set $x .= pies # also, why is 'new' a function in CORE.setting? 09:01
phenny sorear: I'll pass that on when TimToady is around.
09:01 packetknife left
dalek kudo/nom: 583949d | moritz++ | src/ (2 files):
more typed parameter exceptions
09:09
kudo/nom: fbddce7 | moritz++ | src/Perl6/Actions.pm:
fail better on 'is repr' without parameter
09:10 kaleem_ joined 09:12 kaleem left
sorear -> sleep 09:14
09:14 kaleem_ left, kaleem joined 09:27 spine_ joined 09:32 mj41 left 09:34 dakkar joined 09:35 daxim joined, odoacre left
dalek kudo/nom: 2042efb | moritz++ | src/ (2 files):
turns out we do not yet know which paramater a double type constraint is attached to
09:41
ast: 8d41f56 | moritz++ | S32-exceptions/misc.t:
more typed exception tests, better diagnosis
09:42
09:42 Alias left, Alias joined
moritz and with that rakudo passe 52 tests for typed exceptions 09:42
dalek ast: 6ff177c | moritz++ | S32-exceptions/misc.t:
even nicer test output
09:45
09:46 mj41 joined
moritz nom: class A { ... }; sub f(A $x) { } 09:47
p6eval nom fbddce: OUTPUT«===SORRY!===␤The following packages were stubbed but not defined:␤ A␤␤»
moritz nom: sub f(::A $x) { }
p6eval nom fbddce: ( no output )
moritz nom: sub f(::A $x, A $y) { } 09:48
p6eval nom fbddce: ( no output )
moritz nom: my 1 $x;
p6eval nom fbddce: OUTPUT«===SORRY!===␤Malformed my at line 1, near "1 $x;"␤»
moritz nom: 1.*"foo"() 09:49
p6eval nom fbddce: ( no output )
moritz nom: 1.*&uc()
p6eval nom fbddce: ( no output )
moritz nom: 1.*WHAT()
p6eval nom fbddce: OUTPUT«===SORRY!===␤Cannot use .* on a non-identifier method call at line 1, near ""␤»
09:57 packetknife joined
moritz nqp: say(:foo('bar')) 10:04
p6eval nqp: OUTPUT«too many named arguments: 1 passed, 0 used␤current instr.: 'say' pc 2783 (src/stage2/gen/NQPCORE.setting.pir:893) (src/stage2/NQPCORE.setting:193)␤»
moritz nqp: say(method => 1) 10:05
p6eval nqp: OUTPUT«Routine declaration requires a signature at line 1, near "=> 1)"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23433 (src/stage2/gen/NQPHLL.pir:6734) (src/stage2/gen/NQPHLL.pm:329)␤»
moritz nqp: say(:method(1))
p6eval nqp: OUTPUT«too many named arguments: 1 passed, 0 used␤current instr.: 'say' pc 2783 (src/stage2/gen/NQPCORE.setting.pir:893) (src/stage2/NQPCORE.setting:193)␤»
jnthn morning, #perl6 10:10
moritz \o jnthn 10:11
jnthn My word, how much backlog?! 10:13
moritz has skipped most of it 10:16
jnthn skimmed it 10:22
Folks re-discovered the "self on RHS of has initializer" issue, which is why I wanted the STD changes (which have no happened). :) 10:23
s/no/now/ 10:24
So...how is Star release formed...
...not on Windows, given the README. :) 10:25
moritz I think we run 'make'
but we really need to go through the list of modules shipped with it 10:26
and see which ones work on nom
and exclude or fix the others
I guess blizkost can be safely assumed to be broken, right? 10:27
jnthn Right.
Didn't get chance to update that. 10:28
moritz does Test::Mock work?
jnthn Though probably wants some more fundemental re-thinks in the light of representation poly
I think panda is using it, so I assume so
moritz ah right
jnthn moritz: Just pushed a few Makefile updates 10:30
(versions etc)
Ah...I wonder if this needs updating to build NQP also. 10:32
dalek kudo/nom: 7d0453e | moritz++ | src/ (2 files):
typed exceptions for some private method call fails
moritz it probably does :/
jnthn Since before we got parrot-nqp from just building Parrot 10:33
dalek ar: ce7a072 | jnthn++ | Makefile:
Update version and remove Blizkost for now.
tadzik wonders if the last Star is still neutro days :)
moritz ok, Term::ANSIColor works with nom 10:34
jnthn tadzik: Seems so
tadzik nah
how about shipping Bailador?
jnthn moritz: Grammar::Debugger almost certainly wants including :)
+1
moritz +1 to both 10:35
tadzik it'd need HTTP::Easy rather than HTTP::Server::Simple
github.com/supernovus/perl6-http-easy/
moritz Algorithm::Viterbi doesn't work with nom :/ 10:36
tadzik I'm leaving for my classes now, may have some tuits after the noon
moritz arnsholt: do you know if it's blocking on something? 10:37
phenny: tell pmichaud to please turn on dalek pushing for the rakudo/star repo, see github.com/perl6/mu/blob/master/mi...k-push.txt for instructions 10:38
phenny moritz: I'll pass that on when pmichaud is around.
moritz phenny: tell pmichaud and maybe turn the 'rakudo' user into an organization, and give jnthn and maybe me administrative powers? 10:39
phenny moritz: I'll pass that on when pmichaud is around.
jnthn moritz: Since I did some fixes, I think MiniDBI can be safely included also. 10:40
moritz jnthn: added it 10:42
also bailador
fwiw I've emailed with mberends++, he hopes to get back to Perl 6 hacking in a few weeks 10:43
jnthn \o/ 10:44
dalek ar: 2abd837 | moritz++ | Makefile:
change list of shipped modules

Algorithm::Viterbi is currently broken, remove it. Replace HTTP::Server::Simple with HTTP:Easy, include Baildor and MiniDBI
moritz jnthn: how does one trigger the 'private method call must be qualified' error? 10:47
dalek ar: 4d4d217 | jnthn++ | Makefile:
Try to update Star Makefile to grab NQP releases also; untesed.
10:49
10:50 nornagest joined
jnthn nom: self!foo() 10:52
p6eval nom 2042ef: OUTPUT«===SORRY!===␤Private method call to 'foo' must be fully qualified with the package containing the method at line 1, near ""␤»
jnthn nom: my $a; $a!foo()
p6eval nom 2042ef: OUTPUT«===SORRY!===␤Private method call to 'foo' must be fully qualified with the package containing the method at line 1, near ""␤»
moritz jnthn: thanks 10:53
jnthn moritz: Take the second as first could also whine about no self.
moritz 1!foo()
even shorter :-)
jnthn :)
dalek ast: c01e5d6 | moritz++ | S32-exceptions/misc.t:
tests for typed private method call exceptions
10:54
ar: 29531ce | jnthn++ | skel/build/Makefile.in:
Initial round of updates to skeleton Makefile.
ar: 303d04f | moritz++ | Makefile:
fix PARROT_REL
daxim perl6: say sprintf '%s', "foo\nbar" 10:57
p6eval pugs b927740, rakudo 2042ef, niecza v13-344-gf9b5518: OUTPUT«foo␤bar␤» 10:58
daxim can that be golfed?
moritz sure 10:59
perl6: say "foo\nbar"
p6eval pugs b927740, rakudo 2042ef, niecza v13-344-gf9b5518: OUTPUT«foo␤bar␤»
daxim ah ah
moritz or what did you want? 11:00
daxim now what if the argument is a complex expression? is there any limit to what I may put into the {} style interpolation, or when should I resort to sprintf? 11:01
moritz argument to what?
daxim say 11:02
moritz no, it an be an arbitrary expression
jnthn We just parse Perl 6 inside of there 11:03
moritz except that if you call it without parens, the precedence is not allowed to be loser than listop
jnthn ("inside of there" = inside of the {...} when doing closure interpolation) 11:04
bbi10
moritz somehow I seem to get a corrupted nqp-2012.01.tar.gz from github 11:07
I've tried to upload it, but gave me an error during upload 11:08
then I refreshed, and github showed me that file with nearly the correct size (837K instead of 840K)
and when I then re-download it, it's only 20k 11:09
could somebody else please try to put up moritz.faui2k3.org/tmp/nqp-2012.01.tar.gz onto github.com/perl6/nqp/downloads ?
11:12 Trashlord joined
moritz news.perlfoundation.org/2012/01/cra...d-don.html wow, another 100k USD for TPF 11:14
jnthn moritz: Lemme try. 11:24
moritz: github.com/perl6/nqp/downloads - better?
oh no, it says 837 again
moritz hm
maybe my 'du' command is just rounding it weirdly 11:25
jnthn: thanks, that step works now 11:26
$ tar -C rakudo-star-2012.01/nqp-2012.01 -xvzf nqp-2012.01.tar.gz
tar: rakudo-star-2012.01/nqp-2012.01: Cannot chdir: No such file or directory
ah, the tar line is wrong 11:27
jnthn oh. :)
moritz fixed.
the -C means 'chdir here', not 'unpack into this dir'
afk 11:28
jnthn didn't know what a bunch of the flags being given were ;)
dalek ar: 05ad4ae | moritz++ | Makefile:
fix nqp un-tar-ing
11:31
11:49 yves left 11:54 yves joined, bacek left 11:57 kcwu left
dalek ar: 7eea93b | jnthn++ | Makefile:
Use git:// for clones; for some reason, the http:// variant doesn't work out on my Linux box.
11:57
11:59 Bzek left 12:01 icwiener joined
dalek ar: 42bd9ab | jnthn++ | Makefile:
Fix PARROT_REVISION handling; add NQP_REVISION copying too.
12:02
12:03 dbr joined 12:04 icwiener left 12:05 icwiener joined 12:15 icwiener left, icwiener joined
moritz woah, skel/build/gen_parrot.pl tries to build a parrot-3.6.0 12:26
12:26 benabik left
jnthn eek! 12:28
moritz: oh...
oh no...it doesn't git Rakudo from git, so it can't be that it's pulling master. 12:29
*get
moritz skel/ is inside the star repo
so it's a hardcoded path in there
jnthn What's in your build/PARROT_REVISION? 12:31
It looks like Configure.pl pulls from that.
moritz that's RELEASE_3_11_0 12:32
jnthn: skel/build/gen_parrot.pl (star repo) has 3.6.0 hardcoded 12:33
jnthn oh, I see. 12:34
moritz jnthn: and inside the rakudo-star-2012.01 repo, that's available as build/gen_parrot.pl
which is quite redundant
we could just as well pass that job to rakudo's Configure.pl
jnthn moritz: If it can be told where to find the files rather than to check them out, yes 12:35
moritz: But really it needs larger tweaks because it needs to build NQP too
moritz jnthn: ah, right
12:38 icwiener left 12:39 icwiener joined, [particle] left 12:41 [particle] joined 12:42 Exodist left, trippeh_ joined, Exodist joined 12:43 icwiener left 12:44 icwiener joined
jnthn my ($reqsvn, $reqpar) = split(' ', <$REQ>); 12:45
svn?!
moritz might have been adopted (but not renamed) to git revisions. Or not, dunno. 12:46
jnthn moritz: Think I'm going to hold on for an hour or two and see if pmichaud++ appears. He re-did the Configure stuff in NQP/Rakudo since the Star stuff was put together, and may have some ideas on the best way to update things. 12:49
moritz jnthn: aye; it might be as simple as use lib 'rakudo/tools/lib/'; and a few function calls 12:50
jnthn moritz: aye.
12:51 wollmers joined
moritz at least I don't feel like going through a bunch of p5 code that looks remarkably like a bunch of p5 code that I've already fiddled with before... :-) 12:51
wollmers \o 12:52
moritz o/ wollmers
wollmers moritz: IO::Socket::INET seems to have a bug. It does not return FALSE (empty string) at eof, i.e. hangs in 'while ($line = $server.get)' after the last record. The same with .recv(). 12:55
Also IO::Socket::INET does not provide a 'timeout' parameter, which IMHO should be specced. 12:59
moritz wollmers: thanks for the report 13:00
wollmers: unfortunately I don't know how to fix either of those, since the rakudo thing is really just a thin wrapper around parrot's Socket PMC
and that provides neither EOF check nor timeout 13:01
nom: say so Buf.new() 13:02
p6eval nom 7d0453: OUTPUT«Bool::True␤»
moritz hm, maybe that's the problem?
ah wait, recv returns a Str (but why?
)
13:03 benabik joined
moritz wouldn't it make much sense to return a Buf from recv? 13:03
13:03 daemon left 13:04 dalek left
moritz hm, parrot's Socket.pmc has a get_bool vtable 13:04
13:05 dalek joined, ChanServ sets mode: +v dalek 13:06 daemon joined
moritz wollmers: LWP::Simple solves that problem by doing only a single $sock.recv(), not a loop 13:06
dalek p/bs: 2c42b1f | jnthn++ | src/6model/serialization.h:
Stub in a few serialization related data structures.
p/bs: 5c91393 | jnthn++ | / (2 files):
Add serialize/deserialize functions to REPR function table.
moritz wollmers: would that be a workaround for you? 13:07
wollmers I know LWP::Simple. It parses the return code in the massage. I also do a 'last if $line ...'. This works, but isn't a solution to catch exceptional cases. 13:09
One recv() is not enough, because recv does not return the complete message, if the message is larger than $somesize. 13:11
13:12 moritz left, moritz joined 13:13 kcwu joined 13:15 wolverian left
moritz netsplit-- 13:16
13:16 kaleem left 13:19 wolverian joined 13:20 kaleem joined 13:22 icwiener left 13:33 kaleem left 13:36 spine_ left, bkolera joined
[Coke] yawns. 13:48
moritz too 13:49
jnthn three 13:53
benabik downs more coffee to resist.
moritz has now opened the window and, and to the poor chap sitting right in front of the window he shouted "freeze!" 13:54
13:54 dakkar left
[Coke] drinks a tepid Coffee. . o O (and misses the /drink command from his MOO server.) 13:55
13:56 dakkar joined
moritz wow, I've just read some papers about image denoising and compression, and most used (among others) the same image. Now I've found www.cs.cmu.edu/~chuck/lennapg/ which explains where it comes from :-) 13:59
14:00 djanatyn left 14:04 djanatyn joined
jnthn hehe :) 14:05
dalek p/bs: 514c160 | jnthn++ | / (3 files):
Stub in serialize/deserialize functions; initial bits of buffer allocation and sketch for writer.
p/bs: 0f3e7a5 | jnthn++ | src/ops/nqp.ops:
Add dynops that will be the interface to serialization.
14:09 wollmers left
dalek kudo/nom: 3946ccf | moritz++ | src/core/Buf.pm:
make the empty Buf False
14:12
ast: a6c38c4 | moritz++ | S03-operators/buf.t:
test Buf boolification
14:24 not_gerd joined
not_gerd hello, #perl6 14:25
14:25 alvis left, shabble joined, shabble left, shabble joined
not_gerd how do I get rakudo to print where a warning comes from? 14:26
specifically: use of uninitialized value of type Any in string context
moritz hm, good question, let me experiment a bit 14:28
nom: CONTROL { default { say $_; say .backtrace } }; ~Any
p6eval nom 7d0453: OUTPUT«use of uninitialized value of type Any in string context␤»
moritz nom: CONTROL { default { say "in CONTROL"; say $_; say .backtrace } }; ~Any
p6eval nom 7d0453: OUTPUT«use of uninitialized value of type Any in string context␤»
benabik Why CONTROL instead of CATCH? 14:29
moritz benabik: because warn throws control exceptions
benabik :-/
moritz but eeks 14:30
Mu.pm uses note, not warn
I'll have to change that. 14:31
14:32 shabble left 14:36 PacoAir joined 14:44 xinming joined
dalek kudo/nom: b7cce80 | moritz++ | src/core/Mu.pm:
use &warn for uninitialized warnings
15:00
moritz not_gerd: if you upgrade ot latest rakudo, you can do something like CONTROL { default { .say; say .backtrace } }
fsergot hi o/ 15:07
not_gerd moritz: doesn't really help - the backtrace only goes up to Mu.Str :( 15:20
moritz not_gerd: that's weird; Do you have some example code that I could test? 15:21
15:22 wtw_ left
not_gerd moritz: the warning probably originates in the setting and can probably only be reproduced on Cygwin under Win64 15:22
moritz eeks 15:23
not_gerd (I'm trying to use Cygwin to cross-compile native Win64 binaries...)
that's the ultimate goal behind all my recent fixes...
moritz not_gerd: try .backtrace.full
15:24 kmwallio joined
moritz that should give you all frames, including non-routine blocks from the setting 15:24
not_gerd that only helps if the warning originates in user-supplied code - the one I'm looking for is already triggered with perl6 -e '' 15:26
moritz not_gerd: oh. Does --ll-exception help?
not_gerd no 15:27
moritz eeks.
[Coke] not_gerd: it should be possible to generate them directly with the MSVC free tools, neh?
not_gerd [Coke]: where's the fun in that? 15:28
;)
[Coke] heee!
[Coke] is seeing a few autounfudges, wonder when sorear slipped these features in.
not_gerd does make spectest work with -j5 15:30
moritz not_gerd: test concurrency is controlled by the TEST_JOBS env var 15:31
not by the concurrency option you pass to 'make'
(but yes, rakudo build is safe for multiple jobs; you just don't win very much)
15:35 tokuhirom joined 15:38 kmwallio left 15:40 fsergot left 15:58 tokuhirom left
dalek p/bs: 938a5f3 | jnthn++ | src/pmc/serializationcontext.pmc:
When we get an object added and it has an STable that was never tagged with an SC, tag it with this one.
16:06
p/bs: af3d1e4 | jnthn++ | t/serialization/01-basic.t:
Add sanity test for serializing an empty SC, then deserializing it back to one.
p/bs: 2e1ef0f | jnthn++ | src/6model/serialization. (2 files):
First crack at writing of SC header and assembly of the various tables and data segments. Gets the initial sanity tests to pass.
16:14 bkolera left 16:23 birdwindupbird left 16:30 bkolera joined 16:37 bkolera left 16:42 kaleem joined 16:55 bkolera joined 17:06 thou joined 17:14 GlitchMr42 is now known as GlitchMr 17:25 ruoso left, sudokode left 17:26 jrockway_ left, sivoais left, jrockway joined, ruoso joined, kshannon left, sivoais joined 17:27 kshannon joined
[Coke] ponders a #perl6-offcolor 17:27
17:30 cognominal left
sorear good * #perl6 17:30
off...color?
17:31 cognominal joined
[Coke] rude. 17:33
dalek ast: cf47754 | coke++ | S (11 files):
niecza autounfudge
jnthn is glad the default is to be oncolor :) 17:34
moritz ydy<<<<<<<yxxxxxxxx2 jhu hju juh l5555
TimToady children and linguists both say whatever they feel like :) 17:37
phenny TimToady: 08:40Z <sorear> tell TimToady std: constant foo == 5;
TimToady: 09:01Z <sorear> tell TimToady std: my Set $x .= pies # also, why is 'new' a function in CORE.setting?
pmichaud good morning, #perl6 17:47
phenny pmichaud: 10:38Z <moritz> tell pmichaud to please turn on dalek pushing for the rakudo/star repo, see github.com/perl6/mu/blob/master/mi...k-push.txt for instructions
pmichaud: 10:39Z <moritz> tell pmichaud and maybe turn the 'rakudo' user into an organization, and give jnthn and maybe me administrative powers?
jnthn pmichaud! \o/
[Coke] pmichaud++: \o/ 17:48
17:49 not_gerd left
dalek ar: 05ad4ae | moritz++ | Makefile:
fix nqp un-tar-ing
17:50
ar: 7eea93b | jnthn++ | Makefile:
Use git:// for clones; for some reason, the http:// variant doesn't work out on my Linux box.
ar: 42bd9ab | jnthn++ | Makefile:
Fix PARROT_REVISION handling; add NQP_REVISION copying too.
17:50 not_gerd joined
pmichaud dalek pushing now enabled for star repo 17:51
jnthn yay
pmichaud: I'd like to seek help on updating Star in a "we build NQP" world. I suspect that the Configure refactors you did should play a part in this?
pmichaud probably (more) 17:52
17:52 rsimoes1 joined
pmichaud iirc, most of star's configure actually delegates to other configures 17:52
jnthn pmichaud: Well, it has its own gen_parrot script. 17:53
pmichaud that's left over from the days when rakudo had its own gen_parrot script :)
jnthn I'd be happy if it delegated that, but it seems that what it delegates to would want to check out.
aha :)
pmichaud you're correct that star hasn't had its configure updated the way that i updated nqp/rakudo
jnthn Well, it's the first nom-based Star. :)
pmichaud when are you wanting to have this done? 17:54
jnthn And the configure updates weren't done in master, iirc.
pmichaud I could probably re-do star's configuration tomorrow morning.
masak * *, #perl6
jnthn pmichaud: That'd be fine (more) 17:55
pmichaud anyway, the new configure scripts for nqp/nom have a "shared" configure library of sorts; it's clear that star ought to use that same library (and currently does not)
jnthn pmichaud: I want to have the Star release out this week. I'm happy enough to wait until tomorrow.
pmichaud I can do an update for tomorrow. That's a good place for me to be re-starting. 17:56
jnthn pmichaud: I don't trust myself to make a decent job of the Configure stuff, tbh. Or I suspect if I do it, you'll spot things you'd want to do differently. :)
pmichaud: So if you're up for it, I'd happily "delegate" this bit to you ;)
pmichaud okay, it's mine.
jnthn pmichaud: Means I can continue working on serialization stuff this evening. :)
pmichaud that's a much better division of labor for today/tomorrow, methinks.
jnthn wfm :) 17:57
pmichaud afk for a bit
17:57 dakkar left 18:00 cognominal_ joined
tadzik 'evening 18:02
jnthn hi, tadzik 18:03
18:03 cognominal left
masak tadzik! \o/ 18:03
tadzik \o/ 18:04
dalek : 75408b3 | moritz++ | misc/dalek-conf.json:
disable rakudo/star pulling, since we push to it
18:05
sorear TimToady: of the two tells, the second is much more problematic 18:08
TimToady I've already got a fix for both tells, but it's tangled with the \ and | changes currently :/ 18:12
the latter is also almost done, but need to add the new terms so the checker doesn't complain about missing subs 18:15
18:16 xinming left, xinming joined 18:19 fsergot joined 18:22 kmwallio joined
jnthn dinner & 18:24
dalek p/bs: 01163e3 | jnthn++ | t/serialization/01-basic.t:
Add next set of tests, currently failing, for really being able to serialize something with P6int representation.
18:25
p/bs: 2f738dc | jnthn++ | src/6model/serialization. (2 files):
Sketch out main serialization work loop.
p/bs: 188c5d1 | jnthn++ | src/6model/serialization_context. (2 files):
Quick and dirty functions for finding object and stable indexes in SCs.
p/bs: b4d65ed | jnthn++ | src/6model/serialization_context. (2 files):
Add convenience functions for getting SC handle and description.
p/bs: 3d9cc14 | jnthn++ | src/6model/serialization. (2 files):
First cut of individual object serialization processing (though no REPRs yet implement actually serializing themselves). Also add inital code for making SC dependency table entries and string heap addition.
[Coke] news.ycombinator.com/item?id=3504160 - sorear, thought you'd like the niecza comment there.
also, craigslist++ 18:27
18:28 preflex joined 18:29 MayDaniel joined 18:31 MayDaniel left 18:33 MayDaniel joined
moritz std: 1 := 2 18:34
p6eval std 40d10f7: OUTPUT«ok 00:01 109m␤»
TimToady std knows next to nothing about lvalue-ness
moritz ok
TimToady or bvalue-ness
moritz thought so
niecza: 1 := 2 18:36
p6eval niecza v13-344-gf9b5518: OUTPUT«===SORRY!===␤␤Cannot use bind operator with this LHS at /tmp/5RxjzyRKZz line 1 (EOF):␤------> 1 := 2⏏<EOL>␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 919 (die @ 2) ␤ at /ho…
18:39 daxim left
sorear [Coke]: interesting 18:40
[Coke]: what about craigslist?
doy sorear: news.perlfoundation.org/2012/01/cra...d-don.html 18:41
moritz sorear: they've donated 100k USD for p5 development
18:42 birdwind1pbird joined
sorear ah. craigslist++ indeed 18:43
18:43 kmwallio left 18:44 bkolera left 18:45 raiph left
[Coke] ONE HUNDRED KILODOLLARS! 18:45
18:47 birdwindupbird joined 18:53 MayDaniel left
cognominal_ is reading Array.pm and does not understand how the $!whence attribue is executed 18:54
sorear evil?
cognominal_ maybe scalar->whence in container.c ... 18:56
19:00 bkolera joined 19:02 raiph joined
sorear cognominal_: probably 19:04
[Coke] determines that partcl is still mostly dead. Ah well. 19:05
sorear looks for something smallish to do while TimToady++ sorts out kinks in declarator parsing 19:11
[Coke] add ObjAt?
I have no idea how small that is. ;) 19:12
(but it's blocking the borrowing of rakudo's Temporal)
cognominal_ rakudo feels like a 5 cushion billiard 19:14
19:17 kaleem left
TimToady sorear: add Sets? 19:18
19:21 fsergot left
sorear cognominal_: What is a 5 cushion billiard? 19:22
cognominal_ en.wikipedia.org/wiki/Three-cushion_billiards, only more difficult 19:25
19:25 _dbr joined 19:26 sudokode joined
cognominal_ meaning, one must go thru many files in different languages (pir, nqp, perl6) to understand the inner working. 19:26
A call ripples thru these layers of code like a billiard ball bounces on cushions. 19:27
19:27 dbr left
sorear looks for a list of the requirements for Set 19:27
TimToady just make the Set gist I posted work :) 19:28
well, it works already, but probably not as built-in
jnthn cognominal_: There's hardly any PIR in Rakudo these days.
sorear o/ jnthn
jnthn hi sorear
cognominal_: You missed C off the list of languages you maybe need to read though :) 19:29
cognominal_ at least this one is well defined :) 19:30
sorear is now trying to figure out how Rakudo's WHICH/ObjAt subsystem works
jnthn At the moment, I think that handling is entirely done in the setting. 19:31
sorear (At some point I'd like an overview of how LoL, $obj.lol, **@foo, etc work and fit together in Rakudo.)
jnthn (Me too.)
sorear: I think pmichaud++'s work on the synopsis on iterator/list stuff should help a lot. 19:32
sorear phenny: tell pmichaud At some point I'd like an overview of how LoL, $obj.lol, **@foo, etc work and fit together in Rakudo
phenny sorear: I'll pass that on when pmichaud is around.
sorear jnthn: seems ObjAt is also mentioned in BOOTSTRAP 19:34
hey, what is this "stub" declarator?
jnthn sorear: Just an NQP-specific package declarator that comes in handy with bootstrapping. 19:35
cognominal_ I don't think I am not yet proficient enough to wire in the resizable(bool|ineteger|float)array.pmc into rakudo but at least it gives me a motivation to understand the innards of rakudo. 19:36
sorear nom: class A { }; say A.new.WHICH
p6eval nom b7cce8: OUTPUT«A|-6577862525767062189␤»
jnthn sorear: I think it's need to exist will likely go away once I'm done with the current serialization work, though.
sorear nom: class A { }; say A.new.WHICH.perl
p6eval nom b7cce8: OUTPUT«ObjAt.new()␤»
cognominal_ num: my int @a; @a[666] = 42
sorear Why is nqp::where returning a negative number?
nom: class A { }; say nqp::where(A.new) 19:37
p6eval nom b7cce8: OUTPUT«Method 'gist' not found for invocant of class 'Integer'␤ in sub say at src/gen/CORE.setting:5935␤ in block <anon> at /tmp/8PScieUBRV:1␤ in <anon> at /tmp/8PScieUBRV:1␤»
cognominal_ nom: my int @a; @a[666] = 42
p6eval nom b7cce8: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class 'Integer'␤ in block <anon> at /tmp/77lBvzd0AT:1␤ in <anon> at /tmp/77lBvzd0AT:1␤»
sorear nom: class A { }; say nqp::p6box_i(nqp::where(A.new))
p6eval nom b7cce8: OUTPUT«7140166736082218007␤»
sorear nom: class A { }; say nqp::p6box_i(nqp::where(A.new))
p6eval nom b7cce8: OUTPUT«-5162438105098349581␤»
sorear Some kind of xor-masking protocol?
nom: class A { }; say nqp::p6box_i(nqp::where(A.new)).fmt('%x') 19:38
p6eval nom b7cce8: OUTPUT«4c12b9c29ccd7b7d␤»
sorear nom: class A { }; say nqp::p6box_i(nqp::where(A.new)).fmt('%x')
p6eval nom b7cce8: OUTPUT«6d2ac891d03ab96b␤»
jnthn Beats me. :)
cognominal_: That's not a simple task at all. I'm not sure if it's the right approach either.
cognominal_: It won't pack int8 properly, for example. Or some my SomeCompactStruct @foo 19:40
jnthn hides IRC and digs back into coding
19:41 pyrimidine joined 19:42 bkolera left 19:45 fsergot joined, not_gerd left
TimToady hmm, there are a bunch of tests that use a signature of (|$), and I'm wondering what that should change to... 19:47
I could allow (|) I suppose 19:48
or a proto could just assume that, maybe, if you don't give any sig 19:49
I worry that (|) will be taken as a Rorschach test... 19:53
19:54 birdwind1pbird left 19:55 colomon left
TimToady jnthn: what does (|$) actually do that leaving out the sig wouldn't do? 19:56
19:58 colomon joined
jnthn TimToady: An empty sig would mean "0 arguments" 19:58
TimToady doesn't () mean that?
jnthn TimToady: proto foo() { } and proto foo { } are currently treated the same 19:59
TimToady: As elsewhere. Modulo using placeholders.
TimToady proto foo() actually makes no sense
can't have multi without args
jnthn Well, it'd only permit you to write one candidate, yeah. :) 20:00
Well
proto method foo() { } # kinda does
20:00 bkolera joined
jnthn That one is useful in some cases too 20:00
TimToady maybe {*} acts kind of like a placeholder if there's no ()
jnthn That's not much hassle to do. 20:01
We use proto foo(|$) { * } a load in CORE.setting
Because the setting wants explicit protos. 20:02
TimToady at *best*, (|) would be call the "butt operator"
jnthn But most users don't ever bother writing a proto, they rely on generation.
TimToady *called
jnthn ...wow!
I hadn't made that, er, association. :)
TimToady Rorschach of course admits to many interpretations of bilateral symmetry 20:03
"It's...a coffee bean...yeah, that's the ticket!"
jnthn
.oO( If I thought it was an odd-looking Perl 6 signature, do I pass or fail my Rorschach test? :) )
20:06
20:06 fsergot2 joined
sorear What is the one-argument candidate for === used for? 20:08
benabik sorear: [===], I would guess 20:10
20:10 fsergot left 20:11 Radvendii joined
Radvendii o/ everyone 20:11
tadzik hey Radvendii 20:12
TimToady jnthn: you have to XOR that with whether your therapist is a Freudian
sorear Wait, wait, wait, wait 20:13
S03:4471 appears to say that the degenerate cases should be defined as multis *against the reduction operator itself* !?
TimToady nom: say [===] 42;
p6eval nom b7cce8: OUTPUT«Bool::True␤»
sorear as in, multi infix:<[+]>() { 0 } 20:14
Radvendii TimToady: what's ===?
TimToady Radvendii: sometimes we get just a little bit tired of reading out the documents to you for things you could grep 20:16
Radvendii sorry
i'm on it
colomon sorear: huh. it does seem to make sense, assuming the system can handle both a meta op and an explicitly specified op with the same name.
sorear Radvendii: look for 'Value identity' in S03 20:17
Radvendii is the documentation somewhere i can download? (because google ignores characters like =)
[Coke] github.com/perl6/specs
Radvendii vielen dank
jnthn colomon: "huh" is my reaction to. :) I'd always known it as a 0-arity candidate of the operator itself. 20:18
[Coke] Kein Problem.
colomon right, I implemented a bunch of those back in the ng days
TimToady ah well, S03 allows reduction ops to be defined either way 20:19
bbkr2 rakudo: my $x = :(Int); $x.^methods>>.say
p6eval rakudo b7cce8: OUTPUT«(signal SEGV)perl␤params␤returns␤count␤»
TimToady if it can be generated adequately from the bare op, that's fine
bbkr2 reports
TimToady if we don't really need the [op] forms, we can ignore that bit
jnthn bbkr2: Wow. :)
bbkr2: SEGVs in Rakudo are relatively rare these days :) 20:20
sorear TimToady: when generating from a bare op, what does [op] () mean?
[Coke] bbkr2++! 20:21
sorear also, I need to find a cheap way to implement Mu.WHICH 20:26
'memory address' doesn't work so well when you having a moving/compacting GC 20:27
hmm, S03 says that WHICH is a macro, not a method. How are user classes intended to provide WHICH functionality? 20:28
dalek d: b808250 | larry++ | / (2 files):
initializer and capture/parcel fixes

Various tweaks related to initializer fix. We now allow:
   my \x = 42;
   sub foo (\x)
   sub bar (|y)
   sub baz (:\z)
   proto thing (|)
   my Foo $x .= foomethod;
Removed new function from CORE.
Radvendii y'know how [||@a] is used for multidimensional arrays (NYI)
well, how do i fold over ||?
sorear you can only fold over infix operators
Radvendii || is infix, is it not?
sorear in [||@a], || is a prefix
Radvendii no no, i just have [||] in my code 20:30
sorear TimToady++ !
Radvendii but it says "multidimensional indexes [indicies] are not supported"
20:30 birdwindupbird left
sorear Radvendii: do you have [||] properly in term context? 20:30
bbkr2 Can I match array/parcel/hash against Signature? For example I received some JSON Request object and I need to check if it meets the spec defined as :(Str :$method, :@params, Int :$id) 20:31
Radvendii i have the equivalent of [||](@list)
sorear I think you need a space there
Radvendii ah
sorear std: [||](1,2,3) 20:32
p6eval std 40d10f7: OUTPUT«ok 00:01 110m␤»
sorear std: [||] (1,2,3)
p6eval std 40d10f7: OUTPUT«ok 00:01 110m␤»
sorear nom: [||](1,2,3)
p6eval nom b7cce8: ( no output )
sorear hmm
Radvendii thes space doesn't help
sorear nom: say [||](False,True,False)
p6eval nom b7cce8: OUTPUT«Bool::True␤»
sorear seems to work 20:33
nom: my @list = 0,1,0; say [||](@list)
p6eval nom b7cce8: OUTPUT«1␤»
20:33 molaf left
Radvendii nom: sub a {return [||](1,0,1)}; say a(); 20:34
p6eval nom b7cce8: OUTPUT«1␤»
sorear you should get in the habit of using spaces more often
Radvendii okay.
alright, that isn 20:35
isn't the issue, because the same error occurs when i use any() 20:36
also, why do the error messages give "near XXX" but not actually include the text which produces the error? 20:37
20:37 ksi joined 20:40 pyrimidine left
jnthn Radvendii: Sometimes Rakudo's sense of exactly where the error was isn't as accurate as it should be. 20:41
Radvendii ah 20:44
i see
jnthn Radvendii: On the todo list, along with much else. :)
Radvendii or what the error was :P
dalek p/bs: 8bd5e5b | jnthn++ | src/6model/serialization. (2 files):
Get write function table entries in place for int/num/str.
20:45
p/bs: c81280c | jnthn++ | src/6model/reprs/P6int.c:
Give P6int a serialize method.
p/bs: aff34ae | jnthn++ | src/6model/serialization.c:
Oops helps to write into the correct table.
Radvendii jnthn: yeah, no worries. just confused. 20:46
20:50 kaare_ joined 20:52 Radvendii left 20:59 jjore left 21:03 kcwu left 21:05 kaare_ left 21:09 GlitchMr left 21:13 kaare_ joined 21:15 kcwu joined 21:16 kcwu_ joined, kcwu_ left 21:17 Radvendii joined 21:18 kaare_ left
Radvendii nom: class A {method a {say "hi"} method b {a} }; A.b 21:19
p6eval nom b7cce8: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
Radvendii nom: class A {method a {say "hi"}; method b {a} }; A.b
p6eval nom b7cce8: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&a' called (line 1)␤»
Radvendii nom: class A {method a {say "hi"}; method b {self.a} }; A.b
p6eval nom b7cce8: OUTPUT«hi␤»
Radvendii nom: class A {method a {say "hi"}; method b {.a} }; A.b
p6eval nom b7cce8: OUTPUT«Method 'a' not found for invocant of class 'Any'␤ in method b at /tmp/VOhx_aRL_e:1␤ in block <anon> at /tmp/VOhx_aRL_e:1␤ in <anon> at /tmp/VOhx_aRL_e:1␤»
Radvendii so self is needed to call methods from within the class... 21:20
jnthn Yes.
21:21 kaare_ joined 21:22 kaare_ left, kaare__ joined
colomon nom: class A {method a(A:U:) {say "hi"}; method b {.a} }; a.b 21:22
21:22 kaare__ is now known as kaare_
p6eval nom b7cce8: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&a' called (line 1)␤» 21:22
colomon nom: class A {method a(A:U:) {say "hi"}; method b {.a} }; A.a
p6eval nom b7cce8: OUTPUT«hi␤»
jnthn colomon: .b is a call on $_ 21:23
21:24 Radvendii left
cognominal_ I often fall for that one too :( 21:25
nom: my Int @a = "foo" 21:30
p6eval nom b7cce8: ( no output )
cognominal_ nom: my Int @a = "foo"; say @a
p6eval nom b7cce8: OUTPUT«foo␤»
cognominal_ nom: my Int @a; @a = "foo"; say @a
p6eval nom b7cce8: OUTPUT«foo␤»
jnthn wtf, I though we were passing tests on typed arrays... 21:31
*thought
nom: my Int @a; @a[0] = 'foo'
p6eval nom b7cce8: OUTPUT«Type check failed in assignment to '$v'; expected 'Int' but got 'Str'␤ in block <anon> at /tmp/rtNhwZTdvu:1␤ in <anon> at /tmp/rtNhwZTdvu:1␤» 21:32
jnthn Ah...some crap with assignment.
er, list assignment
Or more likely Array.STORE
cognominal_ yup
jnthn Though I know Array.STORE to be problematic in multiple ways.
cognominal_ reading the code, I know how to make it fail :) 21:33
probably should be redefined in TypedArray 21:34
21:43 molaf joined 21:49 kaare_ left 21:51 _RobiX_ joined 21:53 _RobiX_ left 21:56 Radvendii joined
Radvendii o/ 21:57
22:02 cognominal joined
Radvendii nom: say ( given 5 {when 5 {3} } ); 22:04
p6eval nom b7cce8: OUTPUT«3␤»
22:04 _dbr left 22:05 cognominal_ left
dalek p/bs: 2ec73d0 | jnthn++ | src/6model/serialization. (2 files):
Start to sketch out deserialization related state and overall algorithm.
22:06
p/bs: 5bf6da5 | jnthn++ | src/6model/serialization. (2 files):
Fill out initial steps of deserialization: disecting the data into tables/sections and bounds/offset sanity checking.
p/bs: d020e73 | jnthn++ | src/ops/nqp.ops:
Fossil.
Radvendii nom: my $a = 5; given "$a" { when 5 {say "yes" } };
p6eval nom b7cce8: OUTPUT«yes␤»
cognominal nom: given "5" { say "yes" when 5 } 22:09
p6eval nom b7cce8: OUTPUT«yes␤»
benabik nom: say 5 ~~ '5' 22:10
p6eval nom b7cce8: OUTPUT«Bool::True␤»
cognominal #perl6 as progressive optimizer 22:12
Radvendii is $s special somehow? because it keeps confusing my syntax highlighter (it might just be the syntax highlighter, im just curious) 22:13
22:17 cognominal_ joined 22:20 cognominal left
Radvendii nom: say 'a' !~~ 'b' 22:22
p6eval nom b7cce8: OUTPUT«Bool::True␤»
Radvendii nom: say 'a' !~ 'b'
p6eval nom b7cce8: OUTPUT«===SORRY!===␤Unsupported use of !~ to do negated pattern matching; in Perl 6 please use !~~ at line 1, near "'b'"␤»
benabik Radvendii: $s shouldn't be special. 22:23
Radvendii: What are you using for highlighting?
Radvendii vim 7.3
why is it "!~~" as opposed to "!~"? it's not "!=="...
jnthn It can be. 22:24
Radvendii oh.
never mind then
but isnt !== the negation of ===?
jnthn != is, something like, "so we don't get lynched by the court of language expectations" or something :)
No, != and ne are the only irregular ones, I think 22:25
Everywhere else, the rule is !op
benabik vim 7.3 doesn't do anything strange with $s vs $foo with both filetype perl or filetype perl6
Radvendii oh
cool
good to know
and... != goes out of my memory!
benabik: try typing in given $s { \n when 'a' { } \n } 22:26
benabik: or role MyRole[$s,$i] {\n method a { } \n }
the role one works better than given, but still screws up later on in my code 22:27
benabik Radvendii: It seems to be confusing $s with the s/// operator. Bug in the highligher. 22:28
Radvendii That would make sense
benabik The role works better because it escapes back out to code when it sees the {
Radvendii but it doesnt entirely...
benabik But for `given $s {}` it expects `s{}{}`, I think.
Radvendii if you have a more complex thing (with method at_pos and FETCH =>, STORE =>) it screws up on the STORE => method { } 22:29
benabik: yup. I
I'll let the author know, if i can find who he is...
22:30 bkolera left
Radvendii jnthn: can you also do !eq? 22:31
jnthn nom: say "a" !eq "a"
p6eval nom b7cce8: OUTPUT«Bool::False␤»
jnthn nom: say "a" !eq "b"
p6eval nom b7cce8: OUTPUT«Bool::True␤»
jnthn Appears so :)
Radvendii sweet
sorry, should have just done that 22:32
jnthn Radvendii: It's actually parsed as '!' <infix>
Or along those lines
Radvendii so ! is a meta-op? like X or Z?
jnthn Exactly.
Radvendii cool
nom: say 'a' !!eq 'a' 22:33
p6eval nom b7cce8: OUTPUT«Bool::True␤»
Radvendii tee hee
you can double up the bangs
colomon nom: say 'a' !!!!!!!!!!!eq 'a' 22:36
p6eval nom b7cce8: OUTPUT«Bool::False␤»
Radvendii so !!!=== would be a valid operator :P
yup. as many !s as you want 22:37
nom: say <a b c> XX (1,2,3)
p6eval nom b7cce8: OUTPUT«a 1 a 2 a 3 b 1 b 2 b 3 c 1 c 2 c 3␤»
Radvendii nom: say <[<a b>],[<c d>]> XX ([1,2,3],[4,5,6],[7,8]) 22:38
p6eval nom b7cce8: OUTPUT«===SORRY!===␤Confused at line 1, near "],[<c d>]>"␤»
Radvendii nom: say [<a b>],[<c d>] XX ([1,2,3],[4,5,6],[7,8])
p6eval nom b7cce8: OUTPUT«a 1 a 2 a 3 b 1 b 2 b 3 a 4 a 5 a 6 b 4 b 5 b 6 a 7 a 8 b 7 b 8 c 1 c 2 c 3 d 1 d 2 d 3 c 4 c 5 c 6 d 4 d 5 d 6 c 7 c 8 d 7 d 8␤»
Radvendii it'll do it to a deapth of 2 22:39
22:42 slavik left
TimToady um, nom is being too accepting there with !! 22:42
std: say 'a' !!eq 'a'
p6eval std b808250: OUTPUT«===SORRY!===␤An infix may not start with !! at /tmp/HHkq_qDaBr line 1:␤------> say 'a' !!eq⏏ 'a'␤Parse failed␤FAILED 00:01 110m␤»
Radvendii awww.... 22:43
party pooper
;)
niecza: say 'a' !!eq 'a'
p6eval niecza v13-344-gf9b5518: OUTPUT«===SORRY!===␤␤An infix may not start with !! at /tmp/3Tx17OOP_7 line 1:␤------> say 'a' !!eq⏏ 'a'␤␤Parse failed␤␤»
TimToady otherwise we can't parse ??!! unambiguously
Radvendii i know, i'm kidding. there's no use for a double-negative 22:44
TimToady however, you can still do it, if you're sneaky
Radvendii nom: say 'a' x 0
p6eval nom b7cce8: OUTPUT«␤»
TimToady niecza: 'a' ![!eq]' 'a'
p6eval niecza v13-344-gf9b5518: OUTPUT«===SORRY!===␤␤Two terms in a row at /tmp/uV74ok8wmY line 1:␤------> 'a' ![!eq]' '⏏a'␤␤Parse failed␤␤»
Radvendii :P
colomon niecza: say 'a' !!eq 'a'
TimToady hmm, that should work 22:45
p6eval niecza v13-344-gf9b5518: OUTPUT«===SORRY!===␤␤An infix may not start with !! at /tmp/vwlFYWufPt line 1:␤------> say 'a' !!eq⏏ 'a'␤␤Parse failed␤␤»
Radvendii apparently, not sneaky enough
TimToady oh
niecza: 'a' ![!eq] 'a'
p6eval niecza v13-344-gf9b5518: ( no output )
TimToady niecza: say 'a' ![!eq] 'a'
p6eval niecza v13-344-gf9b5518: OUTPUT«Bool::True␤»
Radvendii oh, you had an extra '
TimToady niecza: say 'a' ![![!eq]] 'a'
p6eval niecza v13-344-gf9b5518: OUTPUT«Bool::False␤»
Radvendii still, not as spectacular as !!!!!!!!eq
im kidding, of course 22:46
TimToady we're not optimizing for spectacular, at least not in that dimension :0
niecza: say 'a' !R!R!R!R!R!eq 'a'
p6eval niecza v13-344-gf9b5518: OUTPUT«Bool::True␤»
22:46 ksi left
Radvendii niecza: say [<a b>],[<c d>] XX [1,2],[3,4] 22:47
p6eval niecza v13-344-gf9b5518: OUTPUT«a b 1 2 a b 3 4 c d 1 2 c d 3 4␤»
Radvendii double-cross still works
what's R though?
colomon reverse
TimToady reverse the arguments
no-op on eq
colomon !R!R!R!R!R!R should be called the pirate op
Radvendii nom: say 5 R- 3 22:48
p6eval nom b7cce8: OUTPUT«-2␤»
Radvendii woah
cool
colomon: agreed
TimToady see S03:3973 for all the meta operators 22:49
22:49 Fried_ joined, Fried_ left, LlamaRider joined
Radvendii can one use meta-ops with anonmyous functions? i can't think of a way to do it, because meta-ops don't allow whitespace... 22:55
o.O $a === $b should be $a = $a == $b. i guess it's not because that's not a very convenient operator to have... 22:57
22:58 Chillance joined
Radvendii nom: @foo = 1,2,3; @foo Z-= 1,2,3 22:59
p6eval nom b7cce8: OUTPUT«===SORRY!===␤Variable @foo is not predeclared at line 1, near " = 1,2,3; "␤»
Radvendii nom: my @foo = 1,2,3; @foo Z-= 1,2,3
p6eval nom b7cce8: ( no output )
Radvendii nom: my @foo = 1,2,3; say @foo Z-= 1,2,3
p6eval nom b7cce8: OUTPUT«0 0 0␤»
flussence nom: my $a = 1; my $b = 2; $a =[==] $b; say $a.perl
p6eval nom b7cce8: OUTPUT«Bool::True␤»
22:59 LlamaRider left
PerlJam Radvendii: You don't like === as value identity? 22:59
flussence that's... not quite right
Radvendii PerlJam: no no, that's what i'm saying, it makes snese
sense* 23:00
flussence nom: my $a = 1; my $b = 2; $a = [==] $a, $b; say $a.perl
p6eval nom b7cce8: OUTPUT«Bool::False␤»
flussence that is.
(and pretty awful to read)
Radvendii yeah...
nom: my $a = 1; my $b = 2; $a [==] $a, $b; say $a.perl 23:01
p6eval nom b7cce8: OUTPUT«1␤»
Radvendii nom: my $a = 1; my $b = 2; $a [==]= $a, $b; say $a.perl
p6eval nom b7cce8: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix = instead at line 1, near " $a, $b; s"␤»
flussence the [==] acts as a reduction op there
Radvendii nom: my $a = 1; my $b = 2; $a [==]= $b; say $a.perl
p6eval nom b7cce8: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix = instead at line 1, near " $b; say $"␤»
Radvendii reduction op?
oh
foldr
right
flussence that one, yeah
TimToady can't, that would be a ttiar
Radvendii ttiar? 23:02
PerlJam Radvendii: two terms in a row
TimToady std: my $a = 1; my $b = 2; $a [==]= $a, $b; say $a.perl
p6eval std b808250: OUTPUT«===SORRY!===␤Cannot make assignment out of == because chaining operators are diffy at /tmp/EvhBrn66B2 line 1:␤------> my $a = 1; my $b = 2; $a [==]=⏏ $a, $b; say $a.perl␤Check failed␤FAILED 00:01 112m␤»
Radvendii but op= is a metha-op
so $a [==]= $b should be $a = $a == $b 23:03
TimToady but that changes the type of $a
so STD won't do it
Radvendii o-oh
TimToady it's slightly biased in favor of FP
Radvendii FP?
TimToady I don't know what nom thinks it's doing with it 23:04
flussence nom: my ($a=1, $b=2); $a &[==]= $b; say $a
ominous silence...
p6eval nom b7cce8: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix [==] instead at line 1, near "= $b; say "␤»
PerlJam Radvendii: functional programming
Radvendii ah
PerlJam Radvendii: hang around long enough and you'll be speaking in tongues too
flussence nom: my ($a=1, $b=2); $a &[==]= $b; say $a # wait, did that really just take 10 seconds to run?
p6eval nom b7cce8: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix [==] instead at line 1, near "= $b; say "␤»
TimToady flussence: that makes no sense
Radvendii is that the same reason @a Z= @b does @a = @a Z @b rather than zipping with =? 23:05
dalek p/bs: a9a934e | jnthn++ | src/6model/serialization.c:
Further stubbing out of the deserialization algorithm, including allocating space for objects we're to deserialize.
p/bs: c5910a6 | jnthn++ | src/6model/serialization.c:
First cut of resolving SC dependencies.
p/bs: 25677b2 | jnthn++ | t/serialization/01-basic.t:
Fix thinko in test.
p/bs: 11488d7 | jnthn++ | src/6model/s (5 files):
Fill out common bits of object deserialization, doing STable reassociation, memory allocation, and delegating off to the REPR for deserializing the object body.
Radvendii it's kind of confusing... i dont like that meta-ops can be prefix or suffix
TimToady the meaning of the first bit takes precedence
Radvendii why?
TimToady you can always disambiguate
Radvendii oh... i guess Z[=]
benabik nom: my $a = 1; my $b = 2; $a ==== $b; say $a 23:06
TimToady [Z]= vs Z[=]
p6eval nom b7cce8: OUTPUT«Bool::False␤»
TimToady STD won't take that one either
flussence nom: my ($a=1, $b=2); $a &infix:<==>= $b; say $a
p6eval nom b7cce8: OUTPUT«Method 'STORE' not found for invocant of class 'Any'␤ in method reify at src/gen/CORE.setting:4471␤ in method reify at src/gen/CORE.setting:4376␤ in method reify at src/gen/CORE.setting:4376␤ in method gimme at src/gen/CORE.setting:4740␤ in method eager at src/ge…
TimToady std: my $a = 1; my $b = 2; $a ==== $b; say $a
p6eval std b808250: OUTPUT«===SORRY!===␤Cannot make assignment out of === because chaining operators are diffy at /tmp/BTmOK_NnJx line 1:␤------> my $a = 1; my $b = 2; $a ====⏏ $b; say $a␤Check failed␤FAILED 00:01 111m␤»
flussence whoa, what
Radvendii :P
TimToady flussence: you can't just stick a &foo in where an infix is expected
& is a noun marker 23:07
flussence
.oO( I haven't failed, I've just found 10000 ways that don't work! )
TimToady then you should have 10 light bulbs by now
PerlJam flussence: coding by brownian motion rarely works mr. edison
Radvendii you guys are silly 23:08
PerlJam flussence: although there has been a proof for perl 5 that a random bit of text is more likely to be valid perl code than not. I wonder if something similar is true for perl 6 23:09
TimToady we already know that, so you're silly for pointing it out
I sincerely doubt that proof
23:10 slavik joined
Radvendii nom: my( $a=1,$b=2,@a:=$a,$b ); @a Z[=] 4,5; say $a; 23:10
p6eval nom b7cce8: OUTPUT«===SORRY!===␤Variable $a is not predeclared at line 1, near "=1,$b=2,@a"␤»
TimToady it might possibly be true for 1 or 2 character programs, but that's about it
Radvendii nom: my( @a=1,2 ); @a Z[=] 4,5; say @a; 23:11
p6eval nom b7cce8: OUTPUT«===SORRY!===␤Variable @a is not predeclared at line 1, near "=1,2 ); @a"␤»
Radvendii nom: my @a=1,2; @a Z[=] 4,5; say @a;
p6eval nom b7cce8: OUTPUT«1 2␤»
Radvendii nom: my ($a, $b, @a)=1,2,($a,$b); @a Z[=] 4,5; say @a;
TimToady looks kinda like a bug to me
p6eval nom b7cce8: OUTPUT«1 2␤»
Radvendii TimToady: that my code doesnt do what we expect? 23:12
flussence std: my (@a = 1,2);
PerlJam TimToady: perl.plover.com/idiocy/RandProg.html :-)
p6eval std b808250: OUTPUT«===SORRY!===␤Cannot put required parameter after optional parameters at /tmp/zCaGHF33Ni line 1:␤------> my (@a = 1,2⏏);␤Check failed␤FAILED 00:01 112m␤»
Radvendii nom: my ($a, $b)=1,2;my @a:= $a,$b; @a Z[=] 4,5; say $a;
p6eval nom b7cce8: OUTPUT«1␤»
TimToady no list assignments in parameter defaults
Radvendii yeah, i figured 23:13
PerlJam TimToady: but it clearly says something different than I did, so I misspoke
flussence std: my ($a=1, $b=2); # just making sure I haven't gone insaner than usual
p6eval std b808250: OUTPUT«ok 00:01 112m␤»
Radvendii ǧis al čiuj!
see y'all 23:14
flussence that std error is a bit incomprehensible to me
23:14 Radvendii left, tokuhirom joined
TimToady it thinks @a = 1 is the first parameter, and 2 is the second parameter, because they have a comma between them, just like parameters are supposed to 23:15
defaults in signatures cannot be parsed as lists 23:16
(without parens)
2 is a perfectly value parameter, btw, though it makes little sense in a 'my' 23:17
*valid
flussence the () part after "my" behaves as a signature? 23:19
TimToady it is parsed as a signature 23:20
flussence oh, so it does. that's kinda neat. 23:21
(and makes much more sense to me now)
23:21 colomon left
dalek p/bs: f4aeff9 | jnthn++ | src/6model/serialization. (2 files):
Implement readers for native int, num and str.
23:30
p/bs: 0c824b7 | jnthn++ | src/6model/reprs/P6int.c:
Implement deserialize REPR function for P6int and...test cases pass! \o/ This means we can successfully serialize a (very simple) object with a cross-ref to an STable in another SC.
23:30 colomon joined
jnthn Tssk, wrist is sore...guess that means I wrote enough code for the day. 23:33
& 23:34
23:38 jfried is now known as jan 23:39 jan is now known as jfried 23:42 packetknife left 23:55 mtk left