pugscode.org/ | nopaste: sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by diakopter on 11 July 2007.
pugs_svnbot r17465 | sunnavy++ | added quoting tests for U+298D/U+298E and U+301D/U+301E 11:04
diff: dev.pugscode.org/changeset/17465
lambdabot Title: Changeset 17465 - Pugs - Trac
agentzh "info: 573 smartlinks found and 1 broken." cool :) 12:05
autosmoking works as well :) 12:07
clkao seen nothingmuch 12:40
buubot clkao: Seen at Sun Aug 26 06:33:55 2007: <nothingmuch> so they can comment on things I may have missed, etc
smallfoot- when is perl6 come? 13:44
ill play Duke Nukem Forever on Perl 6
on virtual reality
[particle1 smallfoot-: would you like to help? want a pugs commit bit? 13:45
nothingmuch clkao: yo
smallfoot- no 13:46
i dont even know what a puge commit bit is lol
perl6 is vaporware
[particle] pugs is an implementation of perl 6
masak smallfoot-: a pugs commit bit is access to the pugs repository
[particle] so you're wrong
masak yes, pugs runs fairly well for a piece of vaporware :) 13:47
smallfoot-: have you downloaded and tried pugs?
[particle] ?eval "hello from perl 6, smallfoot-".say; 13:48
smallfoot- i thought parrot was perl6
masak #pugs "hello from perl 6, smallfoot-"
exp_evalbot No output
masak hm
smallfoot- lol
masak smallfoot-: no, parrot will be able to run perl6
smallfoot- no output! PWN'D!
masak but parrot in itself is not perl6
smallfoot- ok
masak moritz_: what's up with exp_evalbot? :/ 13:49
smallfoot- can parrot run python?
masak smallfoot-: I know it's been a project, at least
download it and try :)
moritz_ masak: if you want output, you have to print() or say() something 15:22
#eval "evalbot demo for masak++".say 15:23
exp_evalbot kp6: OUTPUT[evalbot demo for masak++␤]
..pugs: OUTPUT[evalbot demo for masak++␤]
moritz_ re btw ;)
masak moritz_: ah, of course 15:25
thx
masak is used to removing .say calls when passing to evalbot
moritz_ unfortunately I haven't found a magical solution for that
masak moritz_: maybe just as well
it's my experience that people like to use .say :) 15:26
moritz_ like the old evalbot behaviour
s/like/likes/ 15:27
[particle] i like to use <constant>.say because it's obviously perl 6 and not perl 5 15:38
obra hello, #perl6 15:59
moritz_ hi obra ;) 16:00
sunnavy hi, obra
masak y0, obra
moritz_ sunnavy++ # adding more unicode tests
sunnavy so shy, added just two, still need more work, :-) 16:01
obra how's perl6 hackery, folks? 16:03
moritz_ kp6 is moving quite a bit these days
[particle] hey there, obra 16:03
moritz_ and nqp as well I've heard, but the nqp people mostly hang around int #parrot 16:04
I guess [particle] could tell us more ;)
[particle] yes, nqp is moving along
[particle] i'm a cross-platform perl6 hacker :) 16:04
moritz_ ;-)
"I've never seen a cross-platform installation, but many programs now support that platform..." 16:05
[particle] once nqp has working sdl bindings, i'm thinking of writing logo on parrot
obra is looking forward to the day when 6 on 6 can target both nqp and kp6
[particle] i'm hoping we have two way pugs/parrot ast transformations someday 16:06
moritz_ thinks a PIR emitter for kp6 would be a great idea for a microgrant
[particle] moritz_: i prefer transformation at the ast level. that's the logical separation from front-end and back-end 16:07
so a PAST emitter for kp6 16:08
[particle] then the generated past can use all of the parrot compiler toolchain's optimizations during compilation, without rewriting them 16:08
moritz_ so how would the PAST be passed from kp6 to parrot? 16:10
[particle] the ability for parrot to accept past directly does not yet exist 16:11
but should be easy to add 16:12
[particle] for the typical hll on parrot, the developer need only write the parser and past emitter 16:12
parrot handles the rest
...of compilation and execution.
moritz_ well, perhaps a bit of high level optimization woudn't be bad ;) 16:13
[particle] :) 16:14
pugs_svnbot r17466 | moritz++ | [p5 evalbot]: added explanation to "not output" message 16:18
diff: dev.pugscode.org/changeset/17466
lambdabot Title: Changeset 17466 - Pugs - Trac
bloonix hello 17:07
pugs_svnbot r17467 | moritz++ | [p5 evalbot] added a TODO list. If some perl 5 coders are eager to 17:20
r17467 | moritz++ | help and you don't know what they could do, they can look here ;)
diff: dev.pugscode.org/changeset/17467
lambdabot Title: Changeset 17467 - Pugs - Trac
bloonix how can it be that a hash is a Array::Const? 18:07
moritz_ #pugs constant %foo = (bar => baz); say %foo.WHAT 18:11
exp_evalbot OUTPUT[pugs: *** No such subroutine: "&baz"␤ at /tmp/kJIyB5VkQy line 1, column 25-28␤]
moritz_ #pugs constant %foo; say %foo.WHAT 18:12
exp_evalbot OUTPUT[Array::Const␤]
moritz_ it's weird but not impossible... a hash can be viewed as list of pairs
bloonix but I dont use constants 18:13
bloonix hmmm 18:14
I do: "has Hash $.foo;" and return foo in a method "return self.foo" 18:15
maybe this is the reason for the constant
yes thats the reason 18:17
CpuStats.pm:has Hash $.stats = {}; 18:18
DiskStats.pm:has Hash $.stats = {};
NetStats.pm:has Hash $.stats = {};
PgSwStats.pm:has Hash $.stats = {};
Processes.pm:has Hash $.stats = {};
ProcStats.pm:has Hash $.stats = {};
and that all hashes where I get an Array::Const :/
are
moritz_ #pugs constant %h; if %h ~~ Hash { say "hash" } else { say "not a hash" } 18:19
exp_evalbot OUTPUT[not a hash␤]
moritz_ but _that_'s wrong
at least that's what I guess 18:20
bloonix *arg* 18:23
now I am really confused
second... I write an example
pasteling "bloonix" at 87.78.213.198 pasted "#!/usr/bin/pugs class Foo; use" (33 lines, 358B) at sial.org/pbot/27121 18:31
bloonix %Hash2<foo> is a Array::Const but %Hash1 not :/
did I say that I'm confused? :) 18:32
moritz_ why don't you use a "real" hash in the class? 18:33
I'm confused as well ;)
bloonix what do you mean? %stats := self.stats ? 18:34
if I replace self.foo with %foo "return %foo" that it runs
s/that/then/
moritz_ I mean class Foo { has %foo; } 18:36
bloonix because I didnt know that this is possible :)
moment 18:37
how can I access the hash in a method?
self.foo is right?
moritz_ right 18:45
bloonix No such method in class Foo: "&foo"
moritz_ #pugs class f { has %a; }; my $o = f.new; f.foo<"bar">=baz; 18:46
exp_evalbot OUTPUT[*** No such method in class f: "&foo"␤ at /tmp/viwo5vuIP3 line 1, column 37-53␤]
moritz_ #pugs class f { has %a; }; my $o = f.new; my $h = f.a
exp_evalbot OUTPUT[*** No such method in class f: "&a"␤ at /tmp/VJ9Qzepb8l line 1, column 40 - line 2, column 1␤] 18:46
fridim %f.foo ? 18:48
moritz_ #pugs class f { has %.a; }; my $o = f.new; my $h = f.a
exp_evalbot OUTPUT[*** Class prototype occured where its instance object expected: f␤ at /tmp/6XCkddmfNE line 1, column 41 - line 2, column 1␤ /tmp/6XCkddmfNE line 1, column 41 - line 2, column 1␤]
moritz_ #pugs class f { has %.a; }; my $o = f.new; my $h = $o.a 18:49
exp_evalbot No output (you need to produce output to STDOUT)
moritz_ #pugs class f { has %.a; }; my $o = f.new; my $h = $o.a; say $h.WHAT
exp_evalbot OUTPUT[Hash::Const␤]
fridim ah
indeed
moritz_ the hash needs to declared publicly, %.hash
and the I need the object, not the class ;)
fridim and how can you have a class hash? 18:50
moritz_ with "my" instead of "has"
fridim great
moritz_ #pugs class a { my %.b; }; say a.b.WHAT 18:51
exp_evalbot OUTPUT[*** Undeclared variable: ("%b",MkPad (padToList [("$__SELF__",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb67f4a0c>, pe_flags = MkEntryFlags {ef_isContext = False}, pe_store = <ref:0xb67fd07c>})]),[PRuntime {pr_pad = MkPad (padToList [("$__SELF__",PELexical {pe_type =
..(mkType "Scalar"), pe_proto = <Scalar:0xb67f4a0c>, pe_flags =...]
moritz_ #pugs class a { my %b; }; say a.b.WHAT
exp_evalbot OUTPUT[*** No such method in class a: "&b"␤ at /tmp/9miWVn6PVs line 1, column 25 - line 2, column 1␤]
bloonix moritz_: if I replace $.foo with %.foo then %Hash2<foo> is a Hash::Const, but if I do "my %foo := self.foo; return %foo" then its a Hash and not a Hash::Const
moritz_ bloonix: that's desired because %.foo has no 'is rw' trait, e.g. it returns a read-only reference/capture... 18:52
whereas return %foo; returns a copy
I think ;)
fridim ergo sum 18:53
ajs Shouldn't simply "class A is rw { has %x }" define a public, modifiable %x with appropriate accessors? 18:54
pasteling "bloonix" at 87.78.213.198 pasted "#!/usr/bin/pugs class Foo; use" (35 lines, 402B) at sial.org/pbot/27122
moritz_ no, a "class A { has %x is rw }" 18:55
bloonix hmmm
ajs Then S12 should be updated
bloonix not "class A { has %.x is rw }" ?
ajs quoth: "Class traits are set using is: class MyStruct is rw {...}" 18:56
bloonix *arg* sry, ajs asks for %x
moritz_ bloonix: aye
ajs: but you want %x to be rw, not the object, do you?
#pugs class a {has %.b is rw;}; my $o = a.new; say a.b.WHAT; 18:57
exp_evalbot OUTPUT[*** Class prototype occured where its instance object expected: a␤ at /tmp/sU9E5drUYF line 1, column 46-54␤ /tmp/sU9E5drUYF line 1, column 46-54␤]
ajs Again quoting S12: "If you declare the class as rw, then all the class's attributes default to rw, much like a C struct."
moritz_ #pugs class a {has %.b is rw;}; my $o = a.new; say o.b.WHAT;
exp_evalbot OUTPUT[*** No such subroutine: "&o"␤ at /tmp/vL4oVMe1LV line 1, column 46-54␤]
moritz_ ajs: I didn't know that ;) 18:58
#pugs class a {has %.b}; my $o = a.new; say o.b.WHAT;
exp_evalbot OUTPUT[*** No such subroutine: "&o"␤ at /tmp/swLb3cNE4R line 1, column 39-47␤]
moritz_ now what's wrong with that? 18:58
fridim moritz_, $o
moritz_ #pugs class a {has %.b}; my $o = a.new; say $o.b.WHAT; 18:59
exp_evalbot OUTPUT[Hash␤]
moritz_ should go to bed, really ;)
#pugs class a {has %.b is rw }; my $o = a.new; say $o.b.WHAT;
exp_evalbot OUTPUT[Hash␤]
moritz_ why don't I get Const::Hash like bloonix beforeß 19:00
s/ß/?/
moritz_ is really confused now
fridim #pugs class a {my %.b is rw }; my $o = a.new; say $o.b.WHAT; 19:01
exp_evalbot OUTPUT[*** Undeclared variable: ("%b",MkPad (padToList [("$__SELF__",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb676d09c>, pe_flags = MkEntryFlags {ef_isContext = False}, pe_store = <ref:0xb676ef8c>})]),[PRuntime {pr_pad = MkPad (padToList [("$__SELF__",PELexical {pe_type =
..(mkType "Scalar"), pe_proto = <Scalar:0xb676d09c>, pe_flags =...]
fridim #pugs class a {my %b is rw }; my $o = a.new; say $o.b.WHAT;
exp_evalbot OUTPUT[*** No such method in class a: "&b"␤ at /tmp/MxecYxlndE line 1, column 44-53␤] 19:01
fridim #pugs class a {my %b is rw }; say a.b.WHAT; 19:02
exp_evalbot OUTPUT[*** No such method in class a: "&b"␤ at /tmp/jsIcn9dUiX line 1, column 29-37␤]
ajs There's no real mention of what "has $!x is rw" means, but that's essentially what you declare when you say "class A is rw { has $x }". 19:03
moritz_ #kp6 class foo { has %bar }; my $a; $a=foo.new
exp_evalbot r17466: No output (you need to produce output to STDOUT)
moritz_ #kp6 class foo { has %bar }; my $a; $a=foo.new; say $a
exp_evalbot r17466: OUTPUT[foo␤]
moritz_ #kp6 class foo { has %.bar }; my $a; $a=foo.new; say $a
exp_evalbot r17466: OUTPUT[foo␤]
moritz_ #kp6 class foo { has %.bar is rw }; my $a; $a=foo.new; say $a
exp_evalbot r17466: OUTPUT[Syntax Error␤DISPATCH: calling APPLY on invalid object:$VAR1 = {};␤␤ at lib5/KindaPerl6/Runtime/Perl5/MOP.pm line 31␤ main::DISPATCH('undef', 'APPLY') called at - line 3␤]
pasteling "bloonix" at 87.78.213.198 pasted "#!/usr/bin/pugs class Test; us" (23 lines, 327B) at sial.org/pbot/27125 20:15
bloonix I dont understand that 20:16
shouldnt that be possible?
pasteling "bloonix" at 87.78.213.198 pasted "#!/usr/bin/pugs class Test { u" (23 lines, 344B) at sial.org/pbot/27126 20:21
pugs_svnbot r17468 | fglock++ | [kp6] Array.sort 21:24
diff: dev.pugscode.org/changeset/17468
lambdabot Title: Changeset 17468 - Pugs - Trac
pasteling "rhr" at 65.94.7.35 pasted "untested auto-.perl.say for evalbot" (31 lines, 924B) at sial.org/pbot/27127 21:48
rhr I didn't want to commit that and screw up the bot, but I think it should work :)
#eval do { my $x=4; }.perl.say 21:49
exp_evalbot kp6: OUTPUT[Syntax Error␤]
..pugs: OUTPUT[\4␤]
rhr #eval { my $x=4; }().perl.say 21:50
exp_evalbot kp6: OUTPUT[Syntax Error␤]
..pugs: OUTPUT[\4␤]
rhr well, it should work for pugs, anyway...
fglock_ #kp6 ( ( do { my $x = 4 } ).perl ).say 21:55
exp_evalbot r17466: OUTPUT[4␤]
fglock_ kp6 needs precedence 21:56
pasteling "rhr" at 65.94.7.35 pasted "updated patch fglock++" (13 lines, 411B) at sial.org/pbot/27128 22:06
pasteling "rhr" at 65.94.7.35 pasted "One more time..." (13 lines, 508B) at sial.org/pbot/27129 22:12