pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by TimToady on 25 January 2008.
00:06 renormalist left 00:08 thestarslookdown joined 00:11 __Ace__ joined
meppl good night 00:55
00:59 meppl left
kingkongrevenge hmmm? That's weird. They must do some by country ip filtering. 01:08
doh. ignore.
01:16 devogon left 01:22 Lorn joined
cj alrighty... now to determine my username... 01:37
r14437 | cjcollier | 2006-10-21 16:36:56 -0700 (Sat, 21 Oct 2006) | 2 lines
er, password 01:38
can someone reset my password for me, or tell me where I can do so?
diakopter ch: which password 01:39
cj:
oh, ok 01:40
yes, PM the password you want
01:41 sri_work left 01:47 __Ace__ left, ruz left, ruz joined
pugs_svn r19708 | cjcollier++ | s/be/by/ 01:56
cj ooh, looks like I figured it out :)
01:57 jferrero left
cj what is this syntax? 01:58
'{ package ' ~ $.name ~ '; ' ~ Main::newline()
from svn.pugscode.org/pugs/v6/v6-KindaPe...t/Perl5.pm
lambdabot tinyurl.com/yqzgby
cj the '~' character seems to be a perl5 '.' 01:59
s/character/operator/
spinclad that it is, yes 02:04
cj so is that perl6? 02:44
02:50 Limbic_Region left
cj is there a p6 template lib yet? 02:55
sprintf'll do 03:00
i'll need a file open/read/close interface as well 03:03
diakopter cj: re kp6 IL emitter? which IL? MSIL? 03:07
cj mono 03:08
ms would be an added bonus
alright... I'll go look for those... 03:11
if the p5 code could be moved to an external template file, it would be easy to inherit from the p5 emitter class to implement other back ends 03:12
how does one get $'s class name? 03:20
you folks are always so chatty when I'm not asking questions :) 03:22
03:37 [particle] joined 03:42 BinGOs left, BinGOs joined
cj wp.colliertech.org/cj/?p=171 03:42
lambdabot Title: The Pædantic Programmer 􏿽xBB Blog Archive 􏿽xBB Lang.NET 2008
cj waits around for fglock 03:49
jrockway guesses "ref" 03:57
Auzon maybe $.class? 03:58
pugs: $.class
exp_evalbot OUTPUT[*** Undeclared variable: ("$__SELF__",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb689d68c>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xb67de8a0>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0xb689eb20>,
..pe_flags = MkEntryFlags {ef_isContext = False}, pe_st...
Auzon :P
I think that is right 03:59
pugs: $.qwetrt
exp_evalbot OUTPUT[*** Undeclared variable: ("$__SELF__",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb689d320>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xb67de688>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0xb689e7ac>,
..pe_flags = MkEntryFlags {ef_isContext = False}, pe_st...
Auzon Hm. Maybe.
03:59 [particle1 joined 04:04 BinGOs left
cj pugs: $.name 04:15
exp_evalbot OUTPUT[*** Undeclared variable: ("$__SELF__",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb6899d90>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xb68aa42c>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0xb689922c>,
..pe_flags = MkEntryFlags {ef_isContext = False}, pe_st...
Auzon cj: There's no $__SELF__ so it won't work. We need to be in an object or something to make it happen. 04:16
cj Auzon: ah. what's the minimum required to define a class? 04:25
Auzon I dunno. Let's see...
pugs: class FooBar {}
exp_evalbot RESULT[undef]
Auzon pugs: class Foo {} my $item = Foo.new(); 04:26
exp_evalbot RESULT[\Foo.new()]
Auzon pugs: class Foo {method dwim() {say $.class;}} my $item = Foo.new(); $item.dwim(); 04:27
exp_evalbot OUTPUT[*** No such method in class Foo: "&class"␤ at /tmp/eZNZ3gZhaQ line 1, column 31-38␤]
Auzon pugs: class Foo {method dwim() {say $.name;}} my $item = Foo.new(); $item.dwim();
exp_evalbot OUTPUT[*** No such method in class Foo: "&name"␤ at /tmp/PYPNrHAdsp line 1, column 31-37␤]
Auzon pugs: class Foo {method dwim() {say $.isa;}} my $item = Foo.new(); $item.dwim(); 04:28
exp_evalbot OUTPUT[*** No compatible multi variant found: "&isa"␤ at /tmp/vcuzsQofOA line 1, column 31-36␤]
Auzon pugs: class Foo {method dwim() {say $.WHAT;}} my $item = Foo.new(); $item.dwim();
exp_evalbot OUTPUT[Foo␤]
Auzon There you go. $.WHAT
spinclad pugs: class Foo {method dwim() {say $.WHAT;}} my $item = Foo.new(); $item.WHAT 04:29
exp_evalbot RESULT[::Foo]
spinclad pugs: class Foo {method dwim() {say $.WHAT;}} my $item = Foo.new(); $item.HOW
exp_evalbot RESULT[\Class.new(("attrs" => {}), ("does" => ()), ("is" => ("Object",)), ("name" => "Foo"))]
spinclad pugs: class Foo {method dwim() {say $.WHAT;}} my $item = Foo.new(); $item.HOW.name
exp_evalbot RESULT["Foo"]
Auzon Which way is "correct"? 04:30
spinclad pugs: class Foo {} my $item = Foo.new(); $item.HOW.name
exp_evalbot RESULT["Foo"]
spinclad What is one trying to do?
Auzon Ask cj
"how does one get $'s class name?" 04:31
spinclad $item.HOW.name seemed to do that
Auzon pugs: class Foo {method dwim() {say $.WHAT;}} my $item = Foo.new(); $item.WHAT 04:33
exp_evalbot RESULT[::Foo]
Auzon hm
ok
spinclad at least the .HOW part is given in the synopses; S02 and S12
04:34 thestarslookdown left
spinclad pugs: class Foo {method dwim() {say $.HOW;}} my $item = Foo.new(); $item.dwim() 04:34
exp_evalbot OUTPUT[<obj:Class>␤]
04:35 thestarslookdown joined
spinclad pugs: class Foo {method dwim() {say $.HOW.name;}} my $item = Foo.new(); $item.dwim() 04:35
exp_evalbot OUTPUT[Foo␤]
spinclad but the dwim method is extra
Auzon pugs: class Foo {} my $item = Foo.new(); say $item.WHAT 04:36
exp_evalbot OUTPUT[Foo␤]
Auzon Aha
So $item.WHAT stringifies (if that's the right term) to the class name
spinclad right 04:37
Auzon Oh. Duh, because ::Foo means Main::Foo
pugs: class Foo {} my $item = Foo.new(); $item.WHAT === Main::Foo
exp_evalbot OUTPUT[*** No such subroutine: "&Main::Foo"␤ at /tmp/Q3C18gn8PY line 1, column 37 - line 2, column 1␤]
spinclad class Foo {} my $item = Foo.new(); $item.WHAT === $Main::Foo 04:38
pugs: class Foo {} my $item = Foo.new(); $item.WHAT === $Main::Foo
exp_evalbot RESULT[Bool::False]
Auzon But I think that means: $item.WHAT === $Foo
spinclad pugs: class Foo {} my $item = Foo.new(); $item.WHAT === ::Foo
exp_evalbot RESULT[Bool::True]
spinclad pugs: class Foo {} my $item = Foo.new(); $item.WHAT === *::Foo 04:39
exp_evalbot OUTPUT[*** ␤ Unexpected ":Foo"␤ expecting term postfix or operator␤ at /tmp/Iqj3s7H1jb line 1, column 54␤]
04:39 kingkongrevenge left
spinclad ::Foo is in the root package, not Main, i think 04:40
Auzon Is the main package simply :: in Perl 6?
spinclad yes
seems so 04:41
Auzon or an empty string, I would say, cause :: is a separator
spinclad no, * is the global package; ::Foo is searching lexically outward for Foo; *::Foo looks directly in GLOBAL 04:44
S02:1639 04:45
Auzon Aha.
04:45 [particle1 left
cj so $.WHAT ? 04:45
should return ::Foo for class Foo? 04:46
Auzon Yes.
spinclad or Foo, depending i guess on whether Foo is in scope
Auzon well, you should be able to do this... 04:47
pugs: class Foo {} my $item = Foo.new(); my $second = $item.WHAT.new();
exp_evalbot RESULT[\Foo.new()]
spinclad pugs: class Foo {} my $item = Foo.new(); my $second = $item.HOW.new(); 04:48
exp_evalbot RESULT[\Foo.new()]
spinclad .HOW is the class, .WHAT is its name 04:49
pugs: class Foo {} Foo.new(); 04:51
exp_evalbot RESULT[Foo.new()]
spinclad pugs: class Foo {} my $first = Foo.new();
exp_evalbot RESULT[\Foo.new()]
spinclad i'm actually surprised that .WHAT.new() worked. 04:52
pugs: class Foo {} my $item = Foo.new(); $item.WHAT === Foo 04:53
exp_evalbot RESULT[Bool::True]
Auzon Well, if .WHAT returns the class name, it's no different from "$namething".new() if $namething is Foo
That's how I see it, at least
pugs: class Foo {} my $classname = "Foo"; "$classname".new() 04:55
exp_evalbot RESULT[Str.new()]
Auzon pugs: class Foo {} my $classname = "Foo"; $classname.new()
exp_evalbot RESULT[Str.new()]
Auzon hm
^_^'
spinclad S12:1816: WHAT is the type's prototype object, HOW is its metaclass object
pugs: class Foo {} Foo.WHAT === Foo.HOW 04:56
exp_evalbot RESULT[Bool::False]
spinclad pugs: class Foo {} my $foo = Foo.new(); $foo.WHAT === $foo.HOW
exp_evalbot RESULT[Bool::False] 04:57
Auzon pugs: class Foo {} my $classname = Foo; $classname.new()
exp_evalbot RESULT[Foo.new()]
Auzon pugs: class Foo {} my $classname = 'Foo'; '$classname'.new()
exp_evalbot RESULT[Str.new()]
spinclad pugs: class Foo {} my $foo = Foo.new(); $foo.WHAT === Foo
exp_evalbot RESULT[Bool::True]
Auzon So how can you create an object from a class depending on the string? 04:58
cj pugs: class Foo {} my $item = Foo.new(); $item.WHAT; 04:59
exp_evalbot RESULT[::Foo]
spinclad look the string up in the class's package; that gets you the class... 05:00
cj pugs: class Foo {} my $item = Foo.new(); Str.new($item.WHAT);
exp_evalbot OUTPUT[*** Must only use named arguments to new() constructor␤ Be sure to use bareword keys.␤ at /tmp/je31OguDub line 1, column 37-56␤]
Auzon pugs: class Foo {} my $classname = '::Foo'; '$classname'.new()
exp_evalbot RESULT[Str.new()]
Auzon pugs: class Foo {} my $classname = '::Foo'; ::'$classname'.new()
exp_evalbot OUTPUT[*** ␤ Unexpected "'$"␤ expecting "(", twigil or word character␤ at /tmp/loCUMcKGww line 1, column 42␤]
Auzon pugs: class Foo {} my $classname = '::Foo'; ::$classname.new()
exp_evalbot OUTPUT[*** ␤ Unexpected "$classname"␤ expecting "(", twigil or word character␤ at /tmp/VPTh5ccQDq line 1, column 42␤]
Auzon oh well 05:01
05:01 nothingmuch left
spinclad pugs: class Foo {} ::('Foo').new() 05:01
05:01 lisppaste3 left
exp_evalbot RESULT[Foo.new()] 05:01
cj pugs: class Foo {} my $item = Foo.new(); my $classname = $item.WHAT; $classname;
exp_evalbot RESULT[\::Foo]
cj pugs: class Foo {} my $item = Foo.new(); my $classname = "" ~ $item.WHAT ~ ""; $classname; 05:02
exp_evalbot RESULT[\"Foo"]
spinclad pugs: class Foo {} my $item = Foo.new(); my $classname = $item.WHAT; $classname.WHAT
exp_evalbot RESULT[::Foo]
cj aha.
pugs: class Foo {} my $item = Foo.new(); my $classname = "" ~ $item.WHAT; $classname;
exp_evalbot RESULT[\"Foo"]
cj so $classname stores a reference to a string "Foo"? 05:03
spinclad pugs: class Foo {} my $item = Foo.new(); ~$item.WHAT
exp_evalbot RESULT["Foo"]
spinclad pugs: class Foo {} my $item = Foo.new(); (~$item.WHAT).WHAT
exp_evalbot RESULT[::Str] 05:04
spinclad ~ stringifies
so yes
Auzon pugs: die 05:05
exp_evalbot OUTPUT[*** Died␤ at /tmp/CFKSI9I0jz line 1, column 1 - line 2, column 1␤]
spinclad hey!
Auzon Awfully fast for spawning an interpreter
spinclad pugs: 1
exp_evalbot RESULT[1]
Auzon I wanted to know if it was an eval or what
rakudo: class Foo {} Foo.new() 05:07
exp_evalbot OUTPUT[Statement not terminated properly at line 1, near "Foo.new()"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤called from Sub 'parrot;Perl6::Grammar;statementlist' pc 14830 (src/gen_grammar.pir:2402)␤called from Sub
..'parrot;Perl6::Grammar;statement_block' pc 12017 (src/gen_grammar.pir:1396)␤called fr...
Auzon rakudo: class Foo {} Foo.new();
exp_evalbot OUTPUT[Statement not terminated properly at line 1, near "Foo.new();"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤called from Sub 'parrot;Perl6::Grammar;statementlist' pc 14830 (src/gen_grammar.pir:2402)␤called from Sub
..'parrot;Perl6::Grammar;statement_block' pc 12017 (src/gen_grammar.pir:1396)␤called f...
Auzon rakudo: class Foo {}; Foo.new();
exp_evalbot OUTPUT[get_bool() not implemented in class 'Foo'␤current instr.: 'parrot;PCT::HLLCompiler;command_line' pc 1273 (src/PCT/HLLCompiler.pir:685)␤called from Sub 'parrot;Perl6::Compiler;main' pc 7241 (perl6.pir:155)␤]
spinclad rakudo: class Foo {}; Foo;
exp_evalbot OUTPUT[get_bool() not implemented in class ''␤current instr.: 'parrot;PCT::HLLCompiler;command_line' pc 1273 (src/PCT/HLLCompiler.pir:685)␤called from Sub 'parrot;Perl6::Compiler;main' pc 7241 (perl6.pir:155)␤]
spinclad rakudo: class Foo {}
exp_evalbot RESULT[Null PMC access in find_method()␤current instr.: '_block10' pc 19 (EVAL_10:10)␤called from Sub 'parrot;PCT::HLLCompiler;eval' pc 789 (src/PCT/HLLCompiler.pir:459)␤called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1059 (src/PCT/HLLCompiler.pir:585)␤called from Sub 05:08
..'parrot;PCT::HLLCompiler;command_line' pc 1242 (src/PCT/HLLCompiler.pir...
Auzon heh.
05:08 thestarslookdown left
Auzon pugs: class Foo {}; Foo.new.perl 05:12
exp_evalbot RESULT["Foo.new()"]
Auzon pugs: class Foo {}; Foo.new
exp_evalbot RESULT[Foo.new()]
Auzon pugs: class Foo {}; Foo.new()
exp_evalbot RESULT[Foo.new()]
05:27 lisppaste3 joined 05:39 manfred joined, jjore left
cj pugs: class Foo {} my $item = Foo.new(); $item.WHAT.perl; 05:43
exp_evalbot RESULT["::Foo"]
cj pugs: class Foo {} my $item = Foo.new(); "" ~ $item.WHAT
exp_evalbot RESULT["Foo"]
cj I think that's what I want
Auzon You can just use it in a string context 05:44
pugs: class Foo {}; my $item = Foo.new(); print $item
exp_evalbot OUTPUT[<obj:Foo>]
Auzon pugs: class Foo {}; my $item = Foo.new(); say $item
exp_evalbot OUTPUT[<obj:Foo>␤]
Auzon pugs: class Foo {}; my $item = Foo.new(); $item.WHAT
exp_evalbot RESULT[::Foo]
Auzon pugs: class Foo {}; my $item = Foo.new(); ~$item.WHAT
exp_evalbot RESULT["Foo"]
Auzon pugs: class Foo {}; my $item = Foo.new(); say $item.WHAT 05:45
exp_evalbot OUTPUT[Foo␤]
cj "" ~ $item.WHAT seems hacky...
Auzon Just use ~ $item.WHAT
It's like Perl 5's scalar
well, kind of
cj pugs: class Foo {} my $item = Foo.new(); ~ $item.WHAT 05:46
exp_evalbot RESULT["Foo"]
cj nice
Auzon pugs: ~15
exp_evalbot RESULT["15"]
Auzon pugs ~*
pugs: ~*
exp_evalbot RESULT["Inf"]
Auzon pugs: *
exp_evalbot RESULT[Inf]
TimToady that's not actually correct
Auzon Which part? 05:47
TimToady the Inf part
it should return Whatever
Auzon I suspected as much
TimToady and that is the type you match it with in a signature
Auzon pugs: +"a5"
exp_evalbot RESULT[0.0]
Auzon pugs: +"5"
exp_evalbot RESULT[5.0]
Auzon pugs: +"5".WHAT
exp_evalbot RESULT[0]
Auzon pugs: +("5").WHAT
exp_evalbot RESULT[0]
TimToady precedence 05:48
Auzon pugs: (+"5").WHAT
exp_evalbot RESULT[::Num]
Auzon There we go
cj TimToady: o/ 05:49
TimToady: I'm going to the evil empire on monday to discuss p6 on .net
TimToady I have a nephew and a son-in-law who work for them, so it's not all that bad... 05:50
what do you want to tell them about p6? 05:51
cj wp.colliertech.org/cj/?p=171 05:58
lambdabot Title: The Pædantic Programmer 􏿽xBB Blog Archive 􏿽xBB Lang.NET 2008
cj TimToady: I know it's not all bad. I have many friends who work there, and my wife worked there for over 7 years. I say "evil empire" with tongue planted firmly in cheek. 05:59
TimToady: I don't necessarily want to tell anyone anything about p6. I intend to look for support getting a CLI implementation bootstrapped. 06:00
the kp6 p5 emitter looks like it will be quite useful with small modifications.
the continuation problem is a sticky point, but it should be possible to get around it with some creative thinking :) 06:01
honestly, I don't know the p6 language well enough to talk about it at length. I just know that I like p5, and I expect a lot of folks will want to migrate. I like the C# language and the .NET infrastructure in general, so it would be nice if p6 could interoperate with little effort. 06:02
TimToady okay, well, have the appropriate amount of fun :) 06:03
me, I've been up since 5:00am, so my idea of fun involves a pillow 06:04
zzz &
06:14 DarkWolf84 left 06:28 cmarcelo left
jrockway cj: interesting blog post, also interesting to see 06:32
it seems that parrot has left a bad taste in the mouths of CLR and JVM developers wrt perl6
"they're writing their own VM, ours are *so much better*, so let's ignore perl6"
so it's good to see someone from .NET or whatever interested in perl6
very good in fact :) 06:33
06:47 PerlJam left
cj woot :) 06:51
06:54 jjore joined 06:58 drrho joined 07:05 SCalimlim left 07:07 devogon joined 07:48 iblechbot joined
cj you hear that, TimToady? I'm someone from .NET :) 07:54
08:08 iblechbot left 08:11 iblechbot joined 08:36 kst left 08:43 jferrero joined 08:45 rho joined 08:47 kst joined 08:51 BinGOs joined 09:26 kanru left 09:32 kanru joined 09:47 wtgee left 09:50 chris2 joined 10:18 BinGOs_ joined 10:31 BinGOs left 10:52 zamolxes joined 11:00 cosimo_ joined 11:08 meppuru joined, poletti joined, meppuru is now known as meppl 11:14 chris2 left 11:27 cosimo_ left 11:30 poletti left 11:32 poletti joined, BinGOs_ is now known as BinGOs 11:34 cosimo_ joined 11:52 zamolxes left 12:12 poletti left 12:23 zf8 joined 12:24 zf8 left 12:26 barney joined 12:28 njbartlett left 12:57 turrepurre left 13:26 chris2 joined 13:27 nothingmuch joined 13:45 blindfish joined 13:47 cosimo_ left 13:50 Caelum left 14:09 poletti joined 14:19 snearch joined 14:23 __Ace__ joined 14:32 thoughtpolice left 14:35 ludan joined
ludan hi 14:35
moritz_ hi ludan 14:39
14:49 zf8 joined 14:50 zf8 left 15:05 IllvilJa left 15:17 barney left 15:21 meppel-san joined 15:22 Psyche^ joined, Psyche^ is now known as Patterner 16:01 Aankhen`` joined 16:14 ludan left 16:36 sri_work joined 16:40 poletti left 16:45 Limbic_Region joined 16:46 jhorwitz joined 16:48 kanru left 16:51 Psyche^ joined 16:53 meppl left 16:57 PerlJam joined 17:07 kanru joined, Patterner left, Psyche^ is now known as Patterner 17:17 drrho left 17:23 thoughtpolice joined 17:25 IRSeekBot left 17:27 poletti joined 17:29 njbartlett joined 17:35 poletti left 17:37 poletti joined 17:39 cognominal_ left 17:43 riffraff joined 17:44 MrKrueger joined
riffraff hi 17:45
17:47 justatheory left 17:48 cognominal_ joined 18:00 poletti left 18:02 poletti joined 18:04 IRSeekBot joined 18:07 snearch left 18:08 meppel-san left 18:09 alester joined 18:22 poletti left 18:30 nothingmuch left 18:31 marmic left 18:33 nothingmuch joined 18:36 MrKrueger is now known as meppl 18:42 alester left 18:43 marmic joined 18:51 meppl left 18:52 jhorwitz left
Auzon pugs: ^Z 19:10
exp_evalbot OUTPUT[*** No such subroutine: "&Z"␤ at /tmp/n5OA2zNGde line 1, column 1 - line 2, column 1␤]
Auzon pugs: ^'z'
exp_evalbot RESULT[()]
Auzon pugs: 'a' .. ^'z'
exp_evalbot RESULT[()]
Auzon pugs: 'a' .. 'z'
exp_evalbot RESULT[("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z")]
Auzon pugs: 'A' .. 'z' 19:11
exp_evalbot RESULT[("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")]
Auzon pugs: 'a' .. 'Z'
exp_evalbot RESULT[()]
Auzon Perplexing. O.o
pugs_svn r19709 | cosimo++ | [t] fixed S29-trig/e.t syntax errors 19:15
19:37 JarJarBinks joined
cj Auzon: 'a' is asciibetically superior to 'Z' 19:41
Auzon pugs: say for ord('a'), ord('A'), ord('z'), ord('Z')
exp_evalbot OUTPUT[␤␤␤␤]
Auzon pugs: say ord('a'), ord('A'), ord('z'), ord('Z') 19:42
exp_evalbot OUTPUT[976512290␤]
19:42 poletti joined
Auzon pugs: say join "\n", ord('a'), ord('A'), ord('z'), ord('Z') 19:42
exp_evalbot OUTPUT[97␤65␤122␤90␤]
Auzon still seems odd that 'A' .. 'z' means 'A' .. 'Z'
where 'a' .. 'Z' means nothing
cj Auzon: it's likely a case-insensitive match 19:46
probably wrong
19:49 manfred left
allbery_b weren't ranges specified with some dwimmery (at least at some point) due to the memory of what e.g. EBCDIC did with the alphabet? 19:50
cj allbery_b: I hadn't heard about that. do you remember where you heard that vicious rumor? 19:51
allbery_b pugs is still doing the wrong thing but I can see that from a buggy attempt)
point being that A..Z is not contiguous in EBCDIC and there are special characters interspersed, but when someone says A..Z they probably mean only letters 19:52
cj allbery_b: have you written a test case bringing this problem to light? :) 19:54
19:54 rho left
allbery_b I'm still poking at specs to see where I encountered that (might have been an apocalypse but since determined to be a bad idea, or something) 19:55
nothing explicit as yet but look at the alpha example for endpoint * in perlcabal.org/syn/S03.html#Range_semantics 19:58
lambdabot Title: S03
20:03 alester joined
allbery_b I think that was where I got the idea of DWIMmy ranges. probably need TimToady to confirm/deny 20:07
in any case even if it's dwimmy, pugs isn't dwimming right
20:07 thoughtpolice left 20:15 ChanServ sets mode: -o TimToady 20:25 thoughtpolice joined
pugs_svn r19710 | particle++ | [fudge] added 'is_approx' and removed tabs 20:27
20:29 alester left
pugs_svn r19711 | particle++ | [rakudo] while/until statements now parse 20:30
Auzon rakudo: my $i = 0; while($i < 5) {say $i; $i++} 20:31
exp_evalbot OUTPUT[0␤1␤2␤3␤4␤]
Auzon rakudo: for (0 .. 5) {.say}
exp_evalbot OUTPUT[Missing '}' at line 1, near ".say}"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤called from Sub 'parrot;Perl6::Grammar;block' pc 13244 (src/gen_grammar.pir:1850)␤called from Sub 'parrot;Perl6::Grammar;pblock' pc 12919
..(src/gen_grammar.pir:1722)␤called from Sub 'parrot;Perl6::Grammar;for_statement...
Auzon rakudo: for (0 .. 5) {say $_}
exp_evalbot OUTPUT[0␤1␤2␤3␤4␤5␤]
moritz_ rakudo: for (0 .. 5) { $_.say } 20:32
exp_evalbot OUTPUT[Method 'say' not found for invocant of class 'Float'␤current instr.: '_block19' pc 65 (EVAL_10:33)␤called from Sub '_block10' pc 39 (EVAL_10:16)␤called from Sub 'parrot;PCT::HLLCompiler;eval' pc 789 (src/PCT/HLLCompiler.pir:459)␤called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1059
..(src/PCT/HLLCompiler.pir:585)␤called from Sub 'parr...
moritz_ rakudo: for (0 .. 5) -> $a { say $a }
exp_evalbot OUTPUT[0␤1␤2␤3␤4␤5␤]
moritz_ fascinating ;)
Auzon Are we Turing Complete yet? :P
moritz_ I guess ;) 20:33
you don't need very much for turing completeness
arrays, while and if are enough
Auzon No, you sure don't. 20:34
pugs_svn r19712 | particle++ | [rakudo] add directives to S29-num/ and convert pod to pod6
20:41 lidden joined 20:43 lidden left, lidden joined 20:46 blindfish left 20:53 cosimo_ joined 20:57 poletti left 20:59 poletti joined 21:01 Aankhen`` left 21:17 meppl joined 21:19 [particle1 joined 21:27 jjore left 21:36 [particle] left
cj pugs: class Foo::Bar {} my $item = Foo::Bar.new(); ~ $item.WHAT 21:40
exp_evalbot RESULT["Foo::Bar"]
cj yay.
that's what I was hoping you'd say.
is there something analagous to C#'s "property"? ie, an easy syntax to define set/get handler? 21:41
Auzon pugs: class Foo {has $y} my $thing = Foo.new; Foo.y = 5; say Foo.y 21:42
exp_evalbot OUTPUT[*** No such method in class Foo: "&y"␤ at /tmp/HZcELNMgUz line 1, column 41-50␤]
cj Class Foo { int i; int I { set { i = value; } get { return i } } }
something like that
21:42 cosimo_ left
moritz_ pugs: class Foo { has $.x is rw; \}; my $a = Foo.new; $a.x = 4 ; say $a.perl 21:42
exp_evalbot OUTPUT[*** ␤ Unexpected "};"␤ at /tmp/vwMm31b2mW line 1, column 29␤]
Auzon pugs: class Foo { has $.x is rw; }; my $a = Foo.new; $a.x = 4 ; say $a.perl 21:43
exp_evalbot OUTPUT[\Foo.new(("x" => 4),)␤]
moritz_ a \ too much ;)
if an object variable has the . twigil ($.scalar, @.list) it has a getter by default 21:44
and the "is rw" defines a setter
S12 is your reference 21:45
(pugs doesn't implement access control yet) 21:46
22:09 Auzon left
cj moritz_: is it possible to define ones own setter? 22:13
moritz_ cj: yes 22:14
TimToady pugs: 'A' .. '~' 22:30
exp_evalbot RESULT[("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")]
TimToady what's going on there is Z increments to AA, which is longer than the final string, so it quits
moritz_ and what should happen? 22:31
allbery_b S3 implies but doesn't explicitly say that range is dwimmy / uses magic increment 22:32
someone questioned my comment on that earlier
[14:50] <cj> allbery_b: I hadn't heard about that. do you remember where you heard that vicious rumor?
TimToady sure, it uses magic autoincrement, but it also has to decide when to quit when the final value isn't in the natural sequence that will be produced 22:33
and then it just uses overflowing the length, just like Perl 5 22:34
cj moritz_: what does that look like? Moose? 22:42
TimToady: is it broken that 'A' .. 'z' only goes from 'A' to 'Z'?
pugs: 'A' .. 'z' 22:43
exp_evalbot RESULT[("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")]
22:43 riffraff left
moritz_ cj: I don't know exactly.. you can just define a method that sets the value 22:44
cj: if you want lvalue methods, you have to mess with rw proxies (or... something else? dunno)
TimToady no, it is not broken 22:50
it quits after Z for the same reason that this does:
pugs: 'A'..'_' 22:51
exp_evalbot RESULT[("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")]
22:51 Torment joined 22:52 mugwump joined
TimToady pugs: '00'..'zz' 22:52
exp_evalbot RESULT[("00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47",
.."48", "49", "50", "51", "52", "53", "54", "55", "56...
mugwump hey quick one, what's the name of those stack-local variables?
context variables innit?
TimToady yes
lexicals in the outer dynamic scope 22:53
pugs: ('00'..'zz').elems
exp_evalbot RESULT[100]
mugwump thanks :)
pugs_svn r19713 | particle++ | [rakudo] add directives to S29-num tests 22:55
cj TimToady: hurm.. what is that reason? It's not entirely clear to me. 22:56
TimToady I already said it twice 22:58
see also the change I just checked in to S03 22:59
pugs_svn r19714 | particle++ | [rakudo] convert to pod6 and make hash init easier to parse
TimToady pugs: my $x = "Z"; $x++; say $x 23:02
exp_evalbot OUTPUT[AA␤]
moritz_ pugs: my $x = "AA"; $x--; say $x 23:03
exp_evalbot OUTPUT[-1␤]
TimToady pugs doesn't do magical decrement
please note that incrementing 'Z' does *not* produce 'a' 23:04
so 'A'..'z' can never reach 'z' 23:06
23:08 Jedai left
allbery_b I think he's asking the rationale for ranges using magic autoincrement 23:18
TimToady he's a p5 programmer; he should already be familiar with that... 23:19
23:20 BinGOs_ joined, BinGOs left 23:21 BinGOs_ is now known as BinGOs
TimToady @tell Auzon you can't say 'A' .. ^'Z'; it has to be 'A' ..^ 'Z' to keep ..^ as one token 23:30
lambdabot Consider it noted.
nothingmuch www.swa.hpi.uni-potsdam.de/s3/ 23:42
lambdabot Title: Self-sustaining Systems 2008 (HPI)
23:45 jferrero left 23:50 mncharity joined 23:56 jferrero joined