Pugs t-shirts www.cafepress.com/pugscode | Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net
Set by stevan on 15 August 2005.
mikfire Stupid beginner question. Is there somewhere I can get a list of the features pugs has implemented? 00:34
revdiablo maybe the test suite? that's getting kind of big these days, though... 00:35
mikfire And I have found some things done that the test code doesn't test yet.
Speaking of which. Where is the best place to submit patches for test code? 00:37
revdiablo ask for commit access 00:38
theorbtwo mik: Want a committer bit? 00:55
revdiablo mikfire: of course, I failed to mention, one of us can commit it for you if you don't want to do it yourself 00:56
mikfire Thinking about it.
I need to understand more of what is expected to work.
revdiablo paste your patch to: sial.org/pbot/perl6 00:57
theorbtwo What do you think isn't covered in the test suite?
?eval '42' ~~ "forty-two"
evalbot6 bool::false
theorbtwo (Useful for discussing such things.) 00:58
mikfire I have have toying with the type system today.
excuse me -- the wife calls
revdiablo oh lord, my working copy is 600 revisions out of date
theorbtwo G'night, all. 01:02
revdiablo ciao theorbtwo 01:03
sili_ which doc covers references? 01:28
buu ?eval my $x = 32; my $y = \$x; say $x 01:43
evalbot6 32 bool::true
buu Weirdness.
sili_ sigh. 01:44
someone needs to start writing spiffy docs.
buu ?eval my $x = 32; my $y = \$x; say ref $x 01:45
evalbot6 Int bool::true
buu ?eval my $x = 32; my $y = \$x; say $y 01:46
evalbot6 32 bool::true
buu ?eval my $x = 32; my $y = \$x; say ref $y
evalbot6 Int bool::true
gantrixx in pugs, does the object stuff work? 01:57
is anyone here? 02:03
mugwump hello. there has been some level of OO support since about 6.2.5 IIRC 02:06
gantrixx I guess I'm just using the wrong syntax or something 02:07
I'm following the examples in the Oreily book
mugwump Which book?
Perl 6 Essentials?
gantrixx perl6 and parrot 02:08
let me ask do I still need "return 1;" at the end of packages?
mugwump no
gantrixx well it's a very simple object 02:10
mugwump jabbot: nopaste?
jabbot mugwump: nopaste is irc.csie.org:8888/
mugwump compiles ghc-6.4 for amd64 02:11
gantrixx ok, I pasted it
irc.csie.org:8888/130 02:12
mugwump oh, blast, the bot isn't in this channel ... you'll have to paste the URL in here
ok, Class is not capitalised
sili_ anyone feel like explaining pir?
gantrixx oh my god
thanks
mugwump I'm not sure if the unboxed type "int" works yet - better to use the boxed type "Int"
sili_ so pir is just a higher level representation of pasm? 02:16
as in, we could do without it, but would rather not?
mugwump sili_: trawl through autrijus' journal, it explains the PIL / PIR / IMC / pasm stream 02:17
sili_ okies.
mugwump use.perl.org/~autrijus/journal/ 02:18
gantrixx mugwump, did I define the object correctly?
mugwump sing out if you can't find the relevant entry
gantrixx: yup, looked fine otherwise. does it work? I've not been up with the current state of pugs for a while
gantrixx no, it doesn't seem to work 02:19
and I thought I could take out the "return 1" at the end
mugwump ok, perhaps try running the test cases in t/oo in the pugs dist, see how many work. Perhaps it is in a transitional state. You might be better off with a release version... 02:20
sili_ mugwump: does he do this in a single post or over several? 02:21
mugwump use.perl.org/~autrijus/journal/23928, use.perl.org/~autrijus/journal/25203, possibly others 02:25
pugscode.org/images/simple-compilation.png # that's what I was looking for! 02:26
sili_ thanks. 02:27
mugwump Hmm, then PIR gets compiled to IMC, which gets compiled to PASM... but I'm very sketchy on the details myself
sili_ so much learning
i almost wish i had gone to school and taken a class or something.
mugwump just try to remember the eagerness you had to learn at that age ... 02:30
"Everyone is born a genius, but the process of living de-geniuses them." -- Richard Buckminster Fuller
sili_ any idea what this imc stuff does? 02:31
meppl gute nacht - good night 02:32
mugwump it is a "high level" parrot language
sili_ i thought that's what pir was for?
dudley sili_: imc == pir
mugwump oh, silly me
sili_ tricky hobitses.
dudley: what's it stand for?
dudley Parrot Intermediate Representation, IIRC 02:33
sili_ imc*
mugwump like I said, I'm sketchy on the details ;)
sili_ what does imc stand for?
dudley InterMediate Code?
sili_ i guess the world may never know.
mugwump I forgot that IMC was renamed to PIR 02:36
search.cpan.org/~ltoetsch/parrot-0...._and_IMCC? 02:47
gantrixx what does "plan 9" mean? 02:51
what does the keyword "plan" do? 02:52
why do tall the examples end with .t?
dudley plan 9 tells the test harness to expect to run 9 tests, that way if a different number of tests are run, the harness knows something went wrong. 02:55
oh, and .t is the canonical suffix for perl test files. 02:56
gantrixx oh, thanks
dudley np ;)
gantrixx and perl test files are real perl code?
svnbot6 r6349 | fglock++ | * perl5/ Hash - new Perl5 class
r6349 | fglock++ | "Perl6::Container::Hash::Object"
r6349 | fglock++ | implements a hash in which the keys can be objects
dudley gantrixx: yes, they are. 02:57
gantrixx sorry to ask stupid questions 02:58
it seems hard to find examples that I can understand
dudley there are no stupid questions :)
gantrixx is the package keyword still used?
or is it "module" that we us now?
basically, I just want a good example of how to declare a object in module and how to call it 02:59
dudley package is still around, but if the interpreter sees package at the top of a file, it assumes that it's perl 5 code, whereas "module" or "class" means perl 6 03:00
gantrixx hmmmmm....that isn't in my book
dudley I would assume your book is pretty far out of date, but I haven't read any. 03:02
Read the Apocalypses, then the Synopses to get a better idea. But even those are out of date in a lot of places... 03:03
sili_ the docs could be a bit better. 03:05
gantrixx what does "use v6" mean? 03:06
dudley sili_: Agreed. Most of the people who have the knowledge to update the docs are busy designing the language and putting food on the table though.
gantrixx: That's the way (currently) to disambiguate between perl5 and perl6 code. 03:07
sili_ ugh.
dudley the module/class thing isn't implemented as far as I know.
gantrixx what do you mean by that?
I'm trying to define a simple object in a module than use it in my main code 03:08
will I be able to do that?
sili_ not yet.
gantrixx ok, so if I define the object in the main, I can do that right?
dudley I meant the interpreter deciding between perl5 and 6 by the "module" and "class" keywords
gantrixx: sure. 03:09
QtPlatypus gantrixx: Yes
gantrixx could I paste an error to you?
the error message is confusing
QtPlatypus How big is the error?
gantrixx 5 lines 03:10
QtPlatypus Use the pastling, its in the topic
gantrixx irc.csie.org:8888/131 03:11
I'm setting the attribute incorrectly? 03:13
or the object didn't get instantiated?
sili_ dudley: wouldn't the documentation be better served with a wiki of some sort?
gantrixx Is the new() method inherint in the object?
QtPlatypus, did you see what I pasted? 03:19
dudley sili_: Possibly, but in pugs, committer bits are handed out liberally enough that the whole project is wikiish 03:20
sili_ hmmmmm
dudley so if you want to write some docs, ask for a committer bit and check them in :)
sili_ i'd like to, but i'm retarded 03:21
i haven't figured anything out yet.
dudley gantrixx: I don't think you need to declare $card.name as "my"
buu Pain
And agony
sili_ yes. 03:22
@array.postcircumfix:<[ ]>( <== @x, @y ); #omgwtf
gantrixx dudley, I still get the same error regardless
dudley oh, wait. attributes are read-only by default. try "has $.name is rw;" 03:25
mugwump sili_: you don't like that syntax?! :)
sili_ mugwump: it's not the syntax, it's that i have no idea what it's doing
dudley perl6's line noise is much prettier than perl5's :)
mugwump ok, well the .postcircumfix:<[ ]> refers to a method 03:26
you normally call it with @array[]
gantrixx dudley, still get the same error
mugwump it's a _post-circumfix_ operator, ie it appears after (post), and is circumfix (surrounds its operands)
gantrixx mugwump, are you talking to me? 03:27
sili_ me
what is dims 03:30
mm dimensions.
mugwump I don't understand the arrows part, I'll admit :)
dudley gantrixx: I don't have a built Pugs right now, or I'd be slightly more helpful. 03:31
try it without the package qualifier
gantrixx no problem, I'll be back in a bit, I'm going to switch to my other computer
dudley i.e. "class Card" instead of "Card::Card" 03:32
mugwump ah, I love being on a network fast enough to run wget -O - url | cdrecord - 03:33
dudley aren't attributes supposed to default to read-only? 03:46
:todo<feature> 03:48
I understand, now.
gantrixx: if you happen to backlog, here's how to do what you were trying to do. 03:51
pasteling "dudley" at 70.179.213.96 pasted "gantrixx's problem" (16 lines, 198B) at sial.org/pbot/12582
sili_ i need to upgrade pugs 03:52
dudley Goodnight , everyone. 03:55
sleep &
putter sili_: there is a wiki pugs.kwiki.org/ . One useful page to create might be a BeginnersQuestions page. Fill it up with questions as you encounter them, and then you and others can fill in answers. That way, beginner number n+1 can benefit from the n people who have been there before her. 03:58
gantrixx for some reason, it takes a really long time to build Pugs on my main machine 04:00
my laptop has a slower processor, but is faster
putter my $card = Card.new(:name("J") :suit("c")) also works.
gantrixx thanks putter, I'll try that as soon as I update my pugs 04:01
sili_ ah. 04:02
gantrixx pugs uses parrot? 04:06
I'm just really surprised how long, make and make test takes on my desktop machine vs my laptop 04:09
luqui autrijus, poke 04:19
putter gantrixx: pugs uses parrot's PGE for perl6 style rules (p5 style, eg, rx:perl5/foo/ is done internally using PCRE). It can also use parrot/PIR as a backend, but that's not working at the moment until the parrot leo-ctx5 branch is merged with the parrot trunk. 04:24
parrot/PGE can be used either externally (pugs just calls parrot), or embedded. with the choice made at config/compile time. 04:25
gantrixx uh, ok 04:26
putter the STATUS file might be of interest. 04:28
good night all. & 04:40
svnbot6 r6350 | putter++ | PIL-Run - added kludged macro support. Thus && and || seem to work. t/01-sanity/03-equal.t passes. But not with the current Perl6/Container/Scalar.pm r6349 (r6331 worked with minimal syntax error fixes).
autrijus luqui: peek 05:45
xinming ?eval given "1" { when 1 { 'number'.say }; when "1" { 'string'.say } }; 06:18
evalbot6 number bool::true
xinming hm, so anyone here would tell me how can I get the "right" result?
QtPlatypus I don't think pugs at the moment diffrentates between Str's and Ints 06:23
?eval ref(1)
evalbot6 ::Int
QtPlatypus ?eval ref("1")
evalbot6 ::Str
QtPlatypus ?eval given ref("1") { when "::Int" { 'number'.say }; when "::Str" {'string'.say}}; 06:24
evalbot6 undef
xinming "will do" trait will be used as a subroutine call hook, hmm, when, will it be called?
before the function call?
QtPlatypus ?eval given ref("1") { when ::Int { 'number'.say }; when ::Str {'string'.say}};
evalbot6 undef
luqui xinming: it is the function call 06:25
QtPlatypus wonders why that doesn't work.
luqui sub foo () { blah } is short for sub foo() will do {blah}
(except that you have to have some block on the sub, so maybe it's sub foo() will do {blah} {...})
anyway, nobody will ever write that, so that's just how we refer to the codeblock that is the body of the subroutine
xinming given {ref("1")} { when ::Int { 'number'.say }; when ::Str {'string'.say}}; 06:26
?eval given {ref("1")} { when ::Int { 'number'.say }; when ::Str {'string'.say}};
evalbot6 undef
luqui ?eval given "1" { when ::Int { 'number'.say }; when ::Str { 'string'.say } }
evalbot6 string bool::true
luqui types in smart match check whether the left side is an instance 06:27
(technically it checks "does", so maybe it ought to work)
?eval ::Int.does(::Object)
evalbot6 bool::true
luqui ?eval ::Object.does(::Int) 06:28
evalbot6 bool::false
luqui okay, so that ought to work
unless ref returns a string, not a type
ref(ref("1")) 06:29
?eval ref(ref("1"))
evalbot6 ::Type
luqui hmm
xinming ?eval sub foo will do { 'will do part'.say } { 'function main part'.say };
evalbot6 Error: unexpected "w" expecting bare trait, subroutine parameters, trait or block
luqui I'm not sure "will" is supported
xinming ?eval sub foo will do { 'will do part'.say } { 'function main part'.say }; &foo();
evalbot6 Error: unexpected "w" expecting bare trait, subroutine parameters, trait or block
luqui ?eval my $x will begin(4) 06:30
evalbot6 Error: unexpected "w" expecting trait, "=", ".=", ":=", "::=", ";" or end of input
luqui er,
xinming luqui: So, Which message will printed first?
will do part. or function main part?
luqui xinming, one of those will override the other
hopefully with a warning
the default block *is* the "will do" block
?eval my $x will begin { 4 } 06:31
evalbot6 Error: unexpected "w" expecting trait, "=", ".=", ":=", "::=", ";" or end of input
xinming Oh,Ok, So, the will do block will override the "main part" and "main part" won't be executed. right?
luqui it looks like traits are hard-coded in the parser
something like that
or the other way around
or die and carp that it was defined twice
probably that one
?eval "1".does(::Int) 06:32
evalbot6 bool::false
luqui ?eval "1".does(::Str) 06:33
evalbot6 bool::true
xinming 1.does(::Int)
?eval 1.does(::Int)
evalbot6 bool::true
luqui ?eval "1" ~~ ::Str
evalbot6 bool::true
luqui ?eval ::Int ~~ ::Object
evalbot6 bool::true
luqui okay, so "when" is broken, it seems
xinming ?eval my $a; $a//0??true(1)::not(1); 06:39
evalbot6 bool::false
xinming hmm, It seems, evalbot can do the things better than our parser. :-)
luqui uh, what?
luqui is still compiling the latest pugs 06:40
xinming ?eval my $a; $a//1??true(1)::not(1);
evalbot6 bool::true
xinming my example. the "latest pugs doesn't give the right answer.
luqui what does it give? 06:41
xinming pugs> my $a; $a//0??true(1)::not(1); 06:42
undef
pugs> my $a; $a//1??true(1)::not(1);
undef
luqui hmm
luqui experiments with this (upon completion of pugs compile :-( ) 06:44
xinming $x ~~ .does(Storeable) # okay 06:45
.does(Storeable) ~~ $x # not okay--gets wrong $_ on left
{ .does(Storeable) } ~~ $x # okay--closure binds its $_ to $x
luqui: Could you please explain the example above for me?
luqui hmm...
it seems that ~~ is no longer symmetric
(I think I remember Larry saying that)
ods15 looks around for nothingmuch 06:46
luqui okay, so in general, A ~~ B makes A the topic for the evaluation of B
wait
no
okay I can't explain it
ods15 wtf is ~~
xinming :-)
luqui what I can do is complain to p6l about it
ods15 not not?
luqui ods15: smart match
it's the new =~, but it does a lot more 06:47
ods15 heh
luqui "give me two things, and I'll tell you whether they like each other"
ods15 by what
luqui xinming, where did you see that example
ods15 soundex, one is in each other, what
luqui according to their type
just "do the right thing" 06:48
xinming luqui: I will leave the question to eval bot. :-)
luqui: in S04
luqui we're trying to cram all the dwimmyness into that operator
so $x ~~ /foo/ tests whether $x matches the pattern
$x ~~ Int tests whether $x is an Int
etc.
ods15 ay 06:49
luqui the table of all the dwimmyness is in S04 I think
geez, pugs is still compiling!
ohhh... do not compile pugs on a machine with 128M of memory, duh! 06:50
xinming luqui: no, In fact, 256M mem machine should avoid this too. ;-) 06:51
I got 512M mem, And Still swapping heavily.
luqui yikes
optimized?
luqui switches to feather 06:52
xinming luqui: do you mean, I have to remeber the table in S04 which is relating the ~~? 06:53
luqui hopefully not. we've tried to define it so that it just does what you want 06:54
but that's why there are alternatives to everything in smart match
so that if you want to be precise (or you can't remember the table), you can use those
xinming luqui: Hmm, In fact, I wonder why... .does(Storeable) ~~ $x 06:57
.does(Storeable) ~~ $x # not okay--gets wrong $_ on left
luqui that's what I'm going to complain about 06:58
not that, but the other one
$x ~~ .does(Storeable) # gets the right $_
where "the right" means "$x"
which I think is wrong
ods15 ?eval 5 ~~ Int 06:59
evalbot6 bool::true
ods15 ?eval "bla" ~~ Int
evalbot6 bool::false
ods15 ?eval 5 ~~ String
luqui .does(Storeable) ought to mean $_.does(Storeable) for the block-lexical $_
evalbot6 Error: No compatible subroutine found: "&String"
jql anyways, isn't $x ~~ Storable a .does test these days?
luqui and that oughtn't change
(you have to write ::String, it seems)
ods15 what should i be using
?eval 5 ~~ ::String
evalbot6 bool::false
luqui (but that is a bug in pugs)
ods15 ?eval "5" ~~ ::String
evalbot6 bool::false
luqui uh
ods15 ?eval "5a" ~~ ::String
luqui woah
evalbot6 bool::false
luqui oh
::Str
right
ods15 ?eval "hello?" ~~ ::Str
evalbot6 bool::true
ods15 ?eval "5" ~~ ::Str 07:00
evalbot6 bool::true
luqui you can probably leave off the :: then
ods15 ?eval 5 ~~ Str
evalbot6 bool::false
ods15 ?eval "5" ~~ Str
evalbot6 bool::true
ods15 whatever
jql ?eval 5 ~~ Num
evalbot6 bool::true
xinming ?eval Num ~~ 5; 07:01
evalbot6 bool::false
luqui yeah, unfortunately, for a symmetric operator, the semantics are not symmetrical
xinming ?eval ::Str ~~ "ha" ;
ods15 ?eval Num ~~ Type
evalbot6 bool::false
jql ?eval Num !~ 5
xinming ...
evalbot6 bool::true
jql ?eval 5 ~~ Str|Num 07:02
evalbot6 bool::false
jql was curious... didn't think so
luqui ?eval 5 ~~ (Str (+) Num)
evalbot6 Error: unexpected "(" expecting letter or digit, ":", term postfix, operator or ")"
luqui okay, not implemented 07:03
ods15 ?eval 5 ~~ (Str|Num)
evalbot6 bool::false
ods15 yawn
luqui that really ought to work
xinming is still in confusion. T_T
ods15 i'm hating perl6 more and more :)
luqui don't mind the current ~~
I've seen several cases here that are wrong
ods15: are you from perl or haskell? 07:04
jql my font is missing (+). I have ā‰ˆ tho
jql sighs 07:05
luqui how can your font be missing (+)
it's three ascii characters
jql the unicodian version
ods15 luqui: C
luqui oh, well it's not latin-1
so (+) ought to be the culturally standard version
or something
jql I have some of unicode installed, but that's ā‰  all 07:06
luqui I don't hack culture, that's larry's job
ods15: you didn't use perl 5 before perl 6?
ods15 i have
Supaplex self.sleep(lots)
nite. :-D 07:07
xinming Supaplex: nite
luqui xinming, about your bug: "my $a; $a//0??true(1)::not(1);" 07:08
leave off the semicolon at the end
pugs seems to think that that means you want undef to be retured
returned
xinming my $a; $a//0??true(1)::not(1) 07:10
my $a; $a//1??true(1)::not(1)
luqui right, in the pugs interactive environment, those should do the right thing 07:11
xinming yeap, I got it
luqui ?eval ref("1") 07:12
evalbot6 ::Str
luqui ?eval Str
evalbot6 \Class.new(('name' => 'Str'), ('traits' => ('Scalar')));
luqui those two really ought to be the same thing
jql interesting
luqui ?eval ::Str
evalbot6 \Class.new(('name' => 'Str'), ('traits' => ('Scalar')));
jql eval "1".class 07:13
?eval "1".class
evalbot6 Error: No compatible subroutine found: "&class"
jql shrugs impotently
xinming is there any difference between .pair and .kv ? or they are the same with the different name 07:22
luqui .pair?
?eval {a => 1, b => 2}.pair 07:23
evalbot6 (('a 1' => ('b', 2)))
luqui uh, what the heck?
?eval {a => 1, b => 2}.kv
evalbot6 ('a', 1, 'b', 2)
luqui well there is clearly a difference
?eval pair 1, 2
evalbot6 (('1' => 2))
luqui ?eval pair 1, 2, 3, 4 07:24
evalbot6 (('1' => 2), ('3' => 4))
xinming It seems that pugs is doing wrong thing here.
?eval {a => 1, b => 2}.pair
luqui it looks like pair is almost the opposite of kv
evalbot6 (('a 1' => ('b', 2)))
luqui pair {a => 1}
?eval pair {a => 1}
evalbot6 (('a 1' => undef))
xinming hmm...
:-)
luqui yeah, it shouldn't listify the hash
other than that it looks right 07:25
xinming ?eval {a => 1, b => 2}.kv
?eval {a => 1, b => 2}.kv
evalbot6 ('a', 1, 'b', 2)
xinming ?eval each {a => 1, b => 2}
evalbot6 Error: No compatible subroutine found: "&each"
Khisanth ?eval { a => 1, b => 2, c => 3 }.pair
evalbot6 (('a 1' => ('b', 2)), ('c 3' => undef))
luqui yeah, I know what it's doing
xinming how to return "a" pair instead of all kv? 07:26
luqui what do you mean?
which one?
you mean like each in perl 5?
Khisanth why is it concatenating the key with the value?
luqui because that's how you stringify pairs 07:27
but it's a bug
xinming luqui: yeap, each, 07:28
luqui doesn't exist in perl 6
Khisanth ?eval { a => 1, b => 2, c => 3 }.perl
evalbot6 '{(\'a\' => 1), (\'b\' => 2), (\'c\' => 3)}'
xinming hmm, In fact, I know in for statement. you can use for ( %hash.kv ) -> $key, $value { }
luqui right
that's why each is going away: because we have a new, better idiom for that 07:29
xinming but How to use this in "normal" state?
luqui example please
xinming ?eval { a => 1, b => 2, c => 3 }.kv[0]; 07:30
evalbot6 \'a'
xinming ?eval { a => 1, b => 2, c => 3 }.kv[0]
evalbot6 \'a'
luqui uh.. huh?
and? 07:31
xinming ?eval { a => 1, b => 2, c => 3 }.kv[0,1];
evalbot6 ['a', 1]
xinming ?eval { a => 1, b => 2, c => 3 }.kv[0,1].perl;
evalbot6 '[\'a\', 1]'
xinming It returns a anonymous hash, I with it to be return as a "pair".
just like we created using { 'a' => 1 } 07:32
luqui you want the first pair in the hash?
?eval { a => 1, b => 2, c => 3 }.pairs
evalbot6 (\('a', 1), \('b', 2), \('c', 3))
luqui hmm
xinming ?eval { a => 1, b => 2, c => 3 }.pairs[1] 07:33
evalbot6 ['b', 2]
luqui ?eval a => 1
evalbot6 ('a' => 1)
luqui weird
xinming ?eval { a => 1, b => 2, c => 3 }.pairs[0]
evalbot6 ['a', 1]
xinming still anonymous hask.
s/hask/hash.
luqui anonymous array, rather
xinming oops.
luqui and I believe that is a bug
xinming sorry.
luqui looking into it
?eval <a b c>.pairs 07:36
evalbot6 ((0 => 'a'), (1 => 'b'), (2 => 'c'))
luqui it appears that it's only broken in the hash form 07:37
xinming ?eval {a b c}.pairs 07:38
evalbot6 pugs: out of memory (requested 1048576 bytes)
luqui syntax error
xinming ...
pugs: out of memory (requested 1048576 bytes)
luqui: It's a bug, 07:39
luqui no kidding
?eval {a b c} 07:40
evalbot6 Error: No compatible subroutine found: "&a"
luqui weird
xinming luqui: open a new terminal, And run pugs. try this line. {a b c}.pairs :-) 07:42
luqui: You will know why I say It's a bug.
luqui I did
and I see that
and I said "weird" 07:43
xinming If you don't get much mem, please close it as soon as possible.
luqui I'll leave that to the gurus: that one seems over my head
xinming may be not to write a test for this bug. :-) 07:44
luqui write p6c about it 07:46
xinming luqui: hmm, Ok, I will do.
?eval { a b } 07:52
evalbot6 Error: No compatible subroutine found: "&a"
xinming ?eval { a } 07:53
evalbot6 Error: No compatible subroutine found: "&a"
scook0 ?eval (hash {a b c}).pairs 07:55
evalbot6 (\('<SubBlock(<anon>)>', undef))
scook0 ?eval (sub {a b c}).pairs 07:56
evalbot6 pugs: out of memory (requested 1048576 bytes)
luqui ?eval hash(a b c).pairs 07:58
evalbot6 Error: No compatible subroutine found: "&a"
luqui welp, I can't seem to find the .pairs bug
no, wait, I can find it 07:59
I just can't fix it
now that I know haskell pretty well, I guess I should start trying to learn pugs
which is about as much like haskell as the perl 5 implementation is like C
castaway_ ;)
08:00 castaway_ is now known as castaway
xinming luqui: hmm, I know I am good at neither haskell pugs nor perl 5. :-) 08:00
?eval { "a" => 1 }; 08:01
evalbot6 {('a' => 1)}
xinming ?eval { a => 1 };
evalbot6 {('a' => 1)}
xinming ?eval { a => 1 b };
evalbot6 Error: unexpected "b" expecting operator, term postfix, postfix conditional, postfix loop, postfix iteration, ";" or "}"
xinming ?eval { a => 1, b };
evalbot6 Error: No compatible subroutine found: "&b"
xinming ?eval { a b c }; 08:02
evalbot6 Error: No compatible subroutine found: "&a"
xinming ?eval { a b c }.pair;
evalbot6 (('<SubBlock(<anon>)>' => undef))
luqui ?eval { x }.pairs
evalbot6 pugs: out of memory (requested 1048576 bytes)
luqui aha
?eval sub { 1 }.pairs
evalbot6 pugs: out of memory (requested 1048576 bytes)
luqui Code.pairs breaks 08:03
xinming hmm, so, need to check before call method pairs, right?
luqui well, pairs ought to check for you 08:04
xinming luqui: I think What I mean is change the source in pugs. before it call pairs. 08:05
luqui pairsFromVal and pairsFromRef are calling each other recursively 08:10
xinming Use variable to get at the container of a scalar variable. 08:11
if variable($scalar).constant {...}
hmm, what does this mean please?
luqui a scalar variable automatically returns its value
whereas with an array, you have to fetch: @a[2] 08:12
so you use variable($foo) if you want to get at the scalar, not its value
that is, you can never change a value
but you can change a variable
xinming luqui: hmm, do you mean type?
luqui no
xinming get at the scalar
I don't understand this sentence. :-S 08:13
luqui when you say $scalar.constant, you're asking whether the value that the scalar holds is constant
which is meaningless
you want to know whether the scalar container is constant
so you say variable($scalar).constant
uh...
it is related to type
when you say "my Num $x" 08:14
you're saying that $x can only hold Nums
so when you say $x = 4
the type of the value that $x is holding is Int
but the type the container can accept is still Num
(you could say $x = 4.5 later)
xinming hmm, scalar container is also a scalar...
luqui: Ok, I think I know.
luqui it is a reference
the vocabulary is a bit jumbled and ambiguous
we're calling things like 1, "Foo", and [1,2,3] "Items" 08:15
whereas we say "Scalar" when we mean a scalar container
so a Scalar holds an Item
xinming perl 6 might be the harder language to learn than perl 5 does. ;-) 08:16
luqui it will definitely be harder to learn as a whole
we're trying to make it easy to learn the part you need though
xinming hmm, I will still considering this. thanks for your explaination.
luqui sure. wish I could say it more clearly
xinming will perl 6 running in "strict" and "strict" mode by default? 08:19
luqui yeah
xinming, your { a b c }.pairs bug is fixed 08:20
r6351
svnbot6 r6351 | luqui++ | r200@feather: fibonaci | 2005-08-19 10:18:41 +0200 08:21
r6351 | luqui++ | Fixed the infinite loop on sub { 1 }.pairs. I did it by removing the IScalar
r6351 | luqui++ | case on pairsFromRef, so that might have broken something. But that case seemed
r6351 | luqui++ | to violate the new zer deref semantics.
xinming luqui: So, The variable function is a bit like, get_container( $variable ), right? 08:23
luqui yeah
in fact, it's a lot like tied() in perl 5
except it doesn't return undef if the variable isn't tied 08:24
do you use svk xinming?
xinming hmm, then, will the tied function moved to variable()? 08:25
luqui I think so
tied() is not a very descriptive name these days
xinming I use svn. :-) I am stilll a new bie with computing. ;-) 08:26
I see the uniformness in perl 6, 08:27
luqui thanks... we're still working on that 08:28
xinming It seems that larry is the person who wish to "rule" the world. 08:29
luqui he said he was a megalomaniac 08:30
heh
xinming I ever used perl 5, and found amazing. Now, after read most of the synopsis, I found there is still many improvements in perl 5
though there is a bit pain to switch perl 6 from perl 5. :-) 08:31
luqui it's pretty much a different language
xinming hyper operator those things might never be seen in the other language. 08:32
luqui no, hyper operators are common practice in APL :-)
xinming luqui: I know that, most aspect of perl 5 has gone.
what APL mean please?
luqui it's an obscure language from the 70s
svnbot6 r6352 | luqui++ | r202@feather: fibonaci | 2005-08-19 10:27:28 +0200 08:33
r6352 | luqui++ | Removed Debug.Trace that I used temporarily.
luqui it didn't think ASCII was good enough, so it invented its own keyboard for programming in it
xinming ...
luqui: I don't think ASCII is good either. And even the keyboard layout... I don't like it either. 08:35
luqui oh darn, my { a b c }.pairs fix broke some stuff :-( 08:36
xinming ?eval :a:b:c(1); 08:39
evalbot6 Error: unexpected ":" expecting word character, "(", "[", "<<", "<", "\171", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
xinming ?eval :a:b:c(1)
evalbot6 Error: unexpected ":" expecting word character, "(", "[", "<<", "<", "\171", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
xinming will this be valid in perl 6?
:a:b:c(1)
scook0 xinming: what are you expecting it to do? 08:40
xinming hold on.
luqui ?eval :a :b :c
evalbot6 Error: unexpected ":" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
luqui ?eval say :a :b :c
xinming scook0: hmm, for generate 3 pairs with the value 1;
evalbot6 bool::true
luqui ?eval my @pairs = :a :b :c; say @pairs 08:41
evalbot6 Error: unexpected ":" expecting term postfix, operator, ";" or end of input
luqui ?eval my @pairs = :a(1) :b(1) :c(1); say @pairs
evalbot6 Error: unexpected ":" expecting term postfix, operator, ";" or end of input
luqui you're allowed to omit the comma between those sorts of pairs
?eval my @pairs = :a(1), :b(1), :c(1); say @pairs
evalbot6 a1b1c1 bool::true
luqui but it appears to be unimplemented
scook0 ?eval sub report(*%_) { say %_}; report :a:b:c(1)
evalbot6 a1b1c1 bool::true
xinming The innermost block matching the selection criteria will be exited. The return value, if any, must be passed as a list. To return pairs as part of the value, you can use a pipe:
leave <== :foo:bar:baz(1) if $leaving;
luqui ?eval id 1 08:42
evalbot6 undef
xinming scook0: see the example
scook0: written in S04
luqui ahh
don't think that :foo:bar:baz(2) gives :foo(2) :bar(2) :baz(2) 08:43
it gives :foo(1):bar(1):baz(2)
xinming luqui: what it will give?
hmm...
luqui since :foo is equivalent to :foo(1)
though maybe that's bool::true these days 08:44
xinming ?eval :b:c:d
evalbot6 Error: unexpected ":" expecting word character, "(", "[", "<<", "<", "\171", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
luqui we're pretty inconsistent on that one
?eval :b
evalbot6 ('b' => 1)
xinming luqui: thanks. :-)
scook0 I suppose the true/false '1'/'' thing is tricky because of all the history and culture 08:45
luqui yeah 08:46
xinming luqui: could you pleaes give me a example of "Delegation" 08:47
luqui from eg. S12?
xinming luqui: yeap
luqui hmmm... I'm not used to programming with it
let's see, where would you want to send some methods to one object, and other methods to another 08:48
scook0 the concept is simple though
luqui scook0, why don't you explain
scook0 :)
oh, explaining is harder... :) let me think 08:49
xinming scook0: too simple so that you don't with to explain. T_T
scook0 it mostly just saves you from having to type
xinming scook0: you can say that why this concept comes out first. ;-)
scook0 method foo (*@_, *%_) { $.member.foo(*@_, *%_) } 08:50
all over the place
if I want my class to have some method
but all I would be doing is forwarding that method to one of my members 08:51
then I can just delegate it
rather than writing a wrapper method explicitly
(for my next trick, I will also claim that monads are simple ^_^) 08:52
xinming scook0: Is there any code example. :-) 08:54
luqui you could scrape CPAN for Class::Delegation
xinming luqui: thanks 08:55
luqui ?eval my $x = { 1 }; $x.pairs 09:01
evalbot6 Error: Not a keyed reference: <Scalar>
luqui oh boy, it recompiled
?eval my $x = { a => 1 }; $x.pairs 09:03
evalbot6 Error: Not a keyed reference: <Scalar>
luqui ?eval my $x = hash( a => 1 ); $x.pairs 09:04
evalbot6 Error: Not a keyed reference: <Scalar>
xinming luqui: recompiled with wrong code. :-) 09:08
luqui working on fixing that
okay, it's actually fixed now :-) 09:26
xinming hmm... I am actually confused by delegation now. :-S
luqui it's okay. it's one of those things that you don't really have to learn 09:27
like everything else in perl 6 :-)
xinming luqui: Hmm, In fact, Perl 6 will be make delegation as a "feature", I think This is useful... and has it's advance. So I wish to learn it. 09:28
hm, I just wish to know, why It's needed, rather than how to use it.
read the example in Class::Delegation But not help much
luqui has never used it, so he wouldn't know 09:29
svnbot6 r6353 | luqui++ | r204@feather: fibonaci | 2005-08-19 11:24:40 +0200 09:35
r6353 | luqui++ | Okay, actually fixed the sub {1}.pairs bug this time... I hope.
r6354 | qtplatypus++ | Documentation for Draft GC API, usial svn props.
QtPlatypus ?eval sub test(*@_) {say @_};test(a => "a",b => "b") 09:37
evalbot6 bool::true
QtPlatypus ?eval sub test(*@_) {[~] @_};test(a => "a",b => "b")
evalbot6 undef
QtPlatypus will have to write a test for that. 09:39
luqui doesn't understand that one 09:44
?eval sub test(*@_) { say +@_ }; test(a => "a", b => "b")
evalbot6 0 bool::true
luqui ahh
QtPlatypus It should be 4
luqui it should be 2
QtPlatypus One of each pair? 09:45
luqui yeah
QtPlatypus ?eval (a => "a",b => "b")
evalbot6 (('a' => 'a'), ('b' => 'b'))
QtPlatypus ?eval +(a => "a",b => "b")
evalbot6 2
QtPlatypus Ok.
That makes sence.
scook0 currently the binding code assumes all pairs are named arguments 09:46
and any leftover ones get put in the slurpy hash
luqui which they should... if it is declared
scook0 (they never get anywhere near the slurpy array)
QtPlatypus But the slurpy array should slurp them up if its there.
luqui on the other hand, there have been complaints that pairs are too special, which makes them awkward to work with
so maybe we should make them more special, so that people understand that they're not supposed to "work with" them 09:47
that is, separate the distinction between a hash pair and a named argument pair
scook0 also, if there isn't a slurpy hash, then currently (in Pugs) they just get dropped
luqui Hmm, would it irritate anyone here to separate those? 09:48
scook0 hmm 09:49
luqui foo(a => "b", :c("d")) # gets a Pair (a => b) and puts "d" into the argument $c
QtPlatypus Yes.
luqui how come?
QtPlatypus because 09:50
luqui (maybe that's not the right separation, I'm just idea fishing right now)
QtPlatypus there the same thing.
scook0 you'd still need some way to splat normal-pairs in as named args, of course
luqui do you follow p6l?
yeah, like, oh, say, a named() function
QtPlatypus And if I ever wish to send in a pair into a function I'll not be able to to day.
do that. 09:51
luqui hmm?
that sentence didn't parse at the end
QtPlatypus Sorry. I'll rewrite.
If I understand your stament, it will be impossable to write a function that takes pairs as an argument without them being a named argument pair. 09:52
scook0 actually, the normal-pairs/special-pairs distinction is reminding me of the sets/junctions thing
luqui you can, but the distinction is made on the caller side 09:53
a => b # passes a pair in a positional
:a(b) # passes a pair as named
so :a(b) would be short for named(a => b) or something like that
QtPlatypus What would %hash=(:a(b),:b(c)) # Mean? 09:54
luqui I was thinking about that, and we could go either way 09:55
we face a cognitive problem if we make it DTRT
scook0 it depends whether you want to blur the distinction outside of calls
or force people to write it the 'correct' way
luqui (so :a(b) is just a pair unless I'm using it in a sub call? wtf?)
yeah, or we can make that form strictly for named arguments 09:56
and I think it's an important decision, but I don't know the right answer
scook0 I wonder whether we should generalise the concept of 'magically-behaving-values'
luqui TIMTOWTDI says we should DTRT (IMHO :-)
scook0 i.e. junctions...adverbial-pairs...(what else?)
luqui those are the two at the top of my list :-) 09:57
QtPlatypus thinks that the :a(a) form is too usefull to not have it as a pair creator.
luqui okay, that's a fair stance
it seems more perlish to do it that way, too 09:58
scook0 QtPlatypus: what sort of things did you have in mind?
maybe we need to introduce a /new/ magical-pair syntax (shudder)
luqui somehow I doubt that
scook0 :) 09:59
luqui I'm just wondering about this one:
my $x = named(a => 1)
is named the magical thing, that demagicalizes itself once it's not in a call?
QtPlatypus Could it be a trait? my $x = (a => 1) but named 10:00
luqui that'd be a role, but maybe that's doable
scook0 that's an interesting idea
luqui what I'd really like, though, is to make named-argument passing visible exactly where the call is
that is: foo($x, $y, $z) # no named arguments, for sure! 10:01
no matter what is in $x, $y, and $z
QtPlatypus Sure, but what if you wish to create a set of possisional arguments. 10:02
luqui for example?
xinming hmm, for better understanding of delegation, So could anyone rewrite the example in Class::Delegation ? 10:03
scook0 luqui: I shudder to think of what might happen if $z contained a junction of (pair|non-pair)
(that is, if named-args could be invisible)
xinming the example after "The problem(s) with attribute-based hierarchies" 10:04
luqui well, first of all, it would thread into two calls
yeah, here's a pathological example:
sub (?$x, ?$y) { say "$x $y" }
QtPlatypus For example trans is defined as taking pairs/possisionals, if you wish to preroll the translation table.
luqui my $z = (x => 1) | 2 10:05
scook0 xinming: you mean rewrite in Perl6?
xinming using perl 6 syntax.
scook0: yes,
luqui foo(3, $z) # "1 " | "3 2"
yikes
scook0 I suppose: 10:06
has $:left_front_wheel handles <steer drive brake>
luqui QtPlatypus: why couldn't you use *%_ for that?
scook0 has $:left_rear_wheel handles 'brake' 10:07
etc
QtPlatypus I suppose in thaqt case *%_ is the best. 10:08
scook0 then when somebody does $mycar.brake
it should automatically call $:left_front_wheel.brake and $left_rear_wheel.brake
without you having to write a brake method for Car
xinming :-) Now~~~, I know~~~ 10:09
QtPlatypus And the car makes a hard left turn.
xinming .. 10:10
scook0 QtPlatypus: :)
xinming so, the exactly should be...
has $:left_front_wheel handles <steer drive brake> = Wheel.new; 10:11
right?
the grammar for delegation is hard to understand first.
thanks
GeJ Will the Class::Delegation ``concepts'' be included in Perl6' syntax one way or another, or will a module be needed? 10:12
xinming GeJ: I don't think the module is needed, In fact, It's a feature in perl 6 10:13
scook0 GeJ: what do you mean by 'concepts'?
GeJ Well, if I get it correctly, Class::Delegation is syntactic sugar to proxify method call from the called object to delegated objects or other methods. 10:16
scook0 well, S12 isn't clear about delegating to other methods 10:17
but afaict, delegating methods to members should be built-in (no modules needed) 10:18
unless somebody decides to take it out
but even then, a module-based solution look much more integrated than in p5 10:19
GeJ While, it saves a few lines of code, I'm not sure to see the practical point. Dispatching a method call to another method is probably a bad interface design and/or a violation of the Liskov Substitution principle
scook0 GeJ: I'm not sure how it would violate LSP 10:21
unless the delegated method fails to uphold the contract that you're supposed to be implementing
wolverian S12 has a bit about delegation to methods 10:22
scook0 wolverian: aye, but I'm not sure whether it talks about one method name to another, or delegating to the /result/ of a method call 10:23
wolverian the latter. 10:24
but I think you can do it with an anonymous role:
scook0 that was my suspicion
GeJ scook0: Let's assume that (sorry, I'll use Perl5 syntax as I'm not familiar with Perl6' one yet), $obj->my_first_method() is 'redirected' to $obj->my_other_method(). In this case $obj must be a child class of something else otherwise I don't see the point in doing the same thing twice (DRY principle)
wolverian oh, well, maybe not. 10:25
GeJ If so, I assume that $obj's parent class has two distinct methods (my_first_method and my_other_method) that do two different things
having $obj merging the two methods into one is a LSP violation, isn't it? 10:26
xinming GeJ: The problem is caused by inheritance... hmm, Just read the doc in Class::Delegation
scook0 GeJ: I agree that that situation would be an unwise use of delegation
but there are other situations where it is useful 10:27
wolverian hmm. do we have anonymous methods?
scook0 wolverian: pretty sure we do
wolverian very well, then: method foo handles<bar> { method { ...actual code... } } 10:28
GeJ scook0: do you have an example in mind, because right now, all I'm thinking about is the one I gave.
wolverian of course, you can also just wrap &bar and not call() it
scook0 GeJ: not off the top of my head, but try looking at the docs for (cpan) Class::Delegation 10:29
wolverian &bar.wrap:{ &foo.goto } # or so
GeJ scook0: oki, I will. :)
xinming scook0: by the way, how do we get the attribute name in delegation class? $?CALLER?
has $:tail handles 'wag'; method wag (*@args is context(Lazy)) { $:tail.wag(*@args) }
scook0 xinming: you mean the method name that was originally used? 10:30
xinming hmm, This is example from S12, But how about other attributes handles 'was' ?
scook0 not sure if $?CALLER would work
xinming s/was/wag/ 10:31
scook0 it depends whether the wrapper method makes itself invisible to $?CALLER
luqui my named arguments proposal is in p6l
xinming seen autrijus 10:32
jabbot xinming: autrijus was seen 4 hours 47 minutes 8 seconds ago
scook0 luqui: using special-forms rather than magical-values is interesting 10:33
less possibility for accidental weirdness
luqui exactly
that's the point behind default semantics for junctions, too 10:34
scook0 it might make propeller-headed things slightly harder
but it's ok as long as they're possible
luqui that is, instead of "if $x == 1 | 2 | 3 {...}" creating a magical value and threading it over an operator
it is just taken as a special form for "if $x == 1 || $x == 2 || $x == 3"
and $x = 1 | 2 | 3 is illegal 10:35
unless "use junctions" is on or $x is declared as a Junction
scook0 so people can get the basic benefits of junctions
luqui without having to think about them before they understand 10:36
scook0 without suddenly having no idea what their code means in the presence of unexpected junctions
QtPlatypus luqui: By special form you mean "short cut for"?
luqui yeah 10:37
QtPlatypus normally thinks of special forms as things you can't evaluate by subsitution.
luqui for exampe?
luqui likes examples, clearly :-)
xinming subtype EvenNum of Num where { $^n % 2 == 0 }; my EvenNum $n; $n = 3; Will this be an warning or an error? 10:39
luqui error
scook0 otherwise what's the point?
QtPlatypus With a normal (non special form), you can evaluate by replacing the function with its return values untill the return values.
xinming luqui: is your answer for me please? 10:40
luqui xinming, yes
can you show me an example of a special form?
QtPlatypus For example if
luqui "if"? 10:41
if boolean_expression(), &code; # ?
that's just a regular function
scook0 'if' might be a bad example 10:42
QtPlatypus Depends on your langague.
broquaint ?evalbot6 our $foo; sub f { temp
QtPlatypus Ok, conditional and.
luqui ?eval 42 10:43
evalbot6 42
luqui QtPlatypus, ahh
gotcha
broquaint ?eval our $foo; sub f { temp $foo = 'new value'; say $foo } $foo = 'old value'; say $foo; f; say $foo
evalbot6 old value new value new value bool::true
luqui well, we're just calling those "thunk expressions", and there's no reason why you can't write your own these days
but I see your point
broquaint Why isn't $foo being dynamically scoped with that temp()? 10:44
QtPlatypus With something normal like "+" it doesn't mattor if you evaluate both of the sides untill you get a solution. But it you do the same thing with and you may end up triggering side effects.
luqui broquaint, bug
broquaint Ah, thought it might be :/
Thanks, luqui.
luqui let's see if it's tested yet
broquaint I don't believe it is.
QtPlatypus luqui: As long as you have lambda (in perl6 terms sub) you can define most of your specal forms in terms of that. 10:45
broquaint It looks like it's tested for lexicals but not package vars.
luqui mind writing a test? 10:46
broquaint Will do :)
pdcawley_ Is &?CALLER_CONTINUATION working yet?
luqui dunnos 10:47
pdcawley_ grins, sorry, it's just an intermittent question I ask. 10:48
QtPlatypus pdcawley_: You wish to compleat your puzzel solver? 10:49
pdcawley_ Yeah.
And make it a little less pessimal.
QtPlatypus Do we have raw bitstrings yet?
pdcawley_ reboots, laptop playing up.
broquaint What is it to commit? svk submit t/var/temp.t # ? 10:50
integral pdcawley_: if t/unspecced/cont.t works, then yes 10:51
theorbtw1 ?eval &?CALLER_CONTINUATION
evalbot6 Error: Undeclared variable: "&?CALLER_CONTINUATION"
QtPlatypus snv add t/var/temp.t
svn i mean
and then svn ci
theorbtw1 I think that's a "no", pdcawley.
integral ?eval sub f() { &?CALLER_CONTINUATION } f()
evalbot6 \sub {...}
theorbtw1 Oh, right.
broquaint Thanks, QtPlatypus :)
10:51 theorbtw1 is now known as theorbtwo
pdcawley_ ?eval sub f() { &?CALLER_CONTINUATION } f().("Bibble!") 10:51
evalbot6 'Bibble!'
integral the bug is deep in the old evaluator
pdcawley_ Yeah, so I gathered. 10:52
integral hmm, maybe it works with JS since that uses CPS
pdcawley_ Possibly -- the old evaluator could only do escape continuation couldn't it?
Fecking laptop, won't even reboot cleanly... 10:53
theorbtwo wonders... how usable is the output of the JS backend?
pdcawley_ hits the power switch and has done with it.
theorbtwo Could I start programming my google maps hacks in p6?
broquaint Yes, theorbtwo, do it! 10:54
luqui is excited about using Flash as a perl 6 graphics environment
broquaint How's that, luqui? My mind is boggling over here. 10:55
integral ?eval sub h($c) { $c.(5) } sub g($c) { h($c) } sub f() { h(&?CALLER_CONTINUATION) } f()
evalbot6 5
xinming my $ref; $ref = { $ref }; 10:56
luqui broquaint, JS == ActionScript
xinming what's this example should do?
broquaint I thought ActionScript was a horribly limited version of JS, or was that back in the bad old days? 10:57
luqui rather, JS (<=) ActionScript
xinming hmm, also call the sub ref
$ref();
luqui yeah, that used to be the case, but in Flash MX it's fully compatible
scook0 xinming: infinite recursion, I imagine
broquaint Most nifty.
theorbtwo ?eval my $ref; $ref = { $ref };
evalbot6 \sub {...}
svnbot6 r6355 | broquaint++ | * Added temp() test for package vars (which isn't work atm due to a bug).
r6356 | broquaint++ | * Forgot to update the test number from previous commit :/
theorbtwo ?eval my $ref; $ref = { $ref }; $ref.();
evalbot6 \sub {...}
theorbtwo Right, though so. Creates a sub that, when called, returns itself.
scook0 oh, sorry 10:58
theorbtwo Try my $ref; $ref = { $ref.() }; $ref.(); on a local copy, though.
I think evalbot is supposed to have inf-loop protection, but I'd rather not test it. 10:59
luqui you don't have to declare separately anymore
autrijus luqui: I like your proposal.
luqui thanks
autrijus the pair treatment is the single one I was unhappy from the hackathon
luqui you mean the named arguments one, or the insane one?
autrijus but I can't find a counterproposalthat would do what larry wanted.
scook0 theorbtwo: I think it just aborts if you take too much time/memory
autrijus the named arg one.
luqui ahh
autrijus I ignored the insane one. 11:00
it's clearly insane.
luqui everybody did
good for them
clkao ?
autrijus: don't ignore yourself!
broquaint Anyone want to take a stab at making the parser from HOP work? I've already converted it to p6 but am coming up against invisible and probably scary bugs :/
autrijus clkao: why, I did much good despite myself
broquaint: ooh, check it in somewhere? 11:01
clkao 18:57 < autrijus> I ignored the insane one.
luqui HOP?
autrijus clkao: yeah, I mean I did much good while ignoring myself
autrijus finally finished /sbin/dump and dd sessions
everything backed up
clkao oh well
broquaint Higher Order Perl.
luqui ahh 11:02
obra yay, autrijus
luqui wants that book
autrijus I wonder if I should take this chance to set up dual booting OSX :)
luqui wait--
broquaint Anywhere in particular, autrijus? It's only the Stream/Parser/Lexer modules and expr-parser.pl at the moment.
luqui --n/m
theorbtwo autrijus: AFAIK, the state of the art with OSX/x86 requires that it take up a whole HDD, so you probably can't do that with a laptop. 11:03
luqui autrijus, have you figured out/found a way to solve those type equations?
QtPlatypus whants that as well.
luqui is completely stumped 11:04
autrijus theorbtwo: if so, a certain friend of mine noted something that is apparently beyond the state of art :)
theorbtwo Oh. 11:05
autrijus broquaint: examples/algorithms/ ? a new examples/ dir?
theorbtwo Nevermind, then.
xinming in perl 5, $x = \$x might cause memory leak, how about perl 6? 11:06
QtPlatypus xinming: Nope
luqui xinming, depends on the backend
broquaint I'll check it into examples/hop6/ for now, autrijus. 11:07
autrijus luqui: what type equations?
QtPlatypus The standard backend will do proper GCing though.
luqui Int.does(::T); ::T.does(Str); 11:08
that make type inferencing work
autrijus luqui: why not have Int unify with ::T
namely, Int.does(Str) 11:09
luqui It's more complicated than that
autrijus ok..?
luqui Int.does(::T); Str.does(::T); ::T.does(Num); # failure
autrijus why does it need to fail?
luqui after the second "step" (if that's the approach), ::T is Int (+) Str
because Str doesn't do Num 11:10
and ::T says it can accept Strs
autrijus and what do you want ::T to be? 11:11
luqui in the failure case?
autrijus yeah
luqui failure :-)
impossible to solve, that's why it failed
at first it seems like a logic programming problem, but it's really not 11:12
autrijus it's not. have you read the H-W algorithms?
er, H-M
luqui nope
autrijus please do.
luqui give me more letters
autrijus can't really talk about type inferencing without that :)
Hindley Milner
luqui okay, that's what I was looking for 11:13
mmm... literature
autrijus after that, Pierce and Turner's Local Type Inference.
after that, the Colored variant.
then it'll be much clearer :)
luqui gets out his text editor
autrijus (GHC uses all those techniques)
luqui Perl 6's inference is a bit different from haskell's, but I'm sure the algorithms will only need slight modifications 11:14
autrijus the colored variant is specifically designed to handle subtypes
as well as generics
luqui schweet
autrijus Scala uses it too, and Scala's type system is remarkably similiar to p6. 11:15
luqui begins reading
autrijus push for Devel::TypeCheck's release -- it implements H-M
for p5
so that may give you something to play with 11:16
scook0 autrijus: roughly speaking, how much of the current code is PIL2 intended to make obsolete? 11:21
svnbot6 r6357 | broquaint++ | * Initial commit of the p6-ified parser from MJD's seminal Higher Order Perl.
r6357 | broquaint++ | * NB - It doesn't work at the moment due to invisible grue-like bugs.
r6358 | broquaint++ | * This is needed if the HOP code is to be used (I think).
autrijus scook0: roughly speaking, all the Compile.hs code and Codegen.hs code.
scook0: AST.Internals needs to be retrofitted
everything else will probably stay, maybe refactored a bit.
scook0 autrijus: I see, thanks
autrijus dinner & 11:24
11:26 ods15_ is now known as ods15
svnbot6 r6359 | scook0++ | * Some docs for Lexer.hs and Parser/Types.hs 11:38
r6359 | scook0++ | * Tweak DrIFT/Binary.hs so it doesn't confuse poor Haddock
tewk var key = pair.key.toNative(); 11:53
if(!this.entries[key]) this.num_of_entries++;
this.entries[key] = pair;
sorry bad paste
[1]equinox hi 12:05
Limbic_Region salutations
[1]equinox has anybody tried to make an exe from a perl6 scripts?
Limbic_Region yes
though not recently 12:06
[1]equinox and how does its speed compare with perl?
Limbic_Region that's a loaded question
[1]equinox what do you mean by loaded?
Limbic_Region I mean that the resulting .exe isn't the same thing as what will be native executables 12:07
it is more like proof of concept
so one shouldn't be looking at speed at that point
p6 is still very much in development 12:08
[1]equinox don't worry
Limbic_Region if you want to do speed comparisons - you should be comparing parrot and p5
[1]equinox I am still interested
I know it is not finished
and what about that speed comparison? 12:09
Limbic_Region not even sure if it works currently
[1]equinox I won't make a touch and eternal and diminishing judgement
Limbic_Region I am actually busy with $work 12:12
12:12 ods15_ is now known as ods15
QtPlatypus pugs running on its standard runtime is slower the p5 but catching up. 12:13
pugs running using the parrot back end is faster the the standard backend.
parrot in some sitatations is faster then p5 and in other situations slower. 12:14
At the moment pugs isn't realy optimized for speed rather then actually solving the problems.
In time I expect the mature end point of p6 to run the pants of p5. 12:15
Everything I have said may be inaccurate. 12:16
[1]equinox: Does that answer your question?
[1]equinox yes, partly 12:17
Do you know any quantitative data? 12:18
acme__ try it for yourself ;-)
[1]equinox There is some difficulties
acme__ notes that premature optimisation is the root of all evil
[1]equinox I don't have the most recent binaries
let us be careful with religion. 12:19
QtPlatypus nods to acme__
[1]equinox does anyone know a source where I can download it?
QtPlatypus dev.perl.org/perl6/
[1]equinox not source 12:20
binary
typo
QtPlatypus It gives you insructios on where you can download both parrot and pugs.
[1]equinox the binary I found not recent enough.
It was compiled on Aug 10.
do you know how to set the location of libs in PUGS? 12:22
QtPlatypus use libs "blah"; 12:23
Like in perl5
[1]equinox ok 12:29
broquaint q
[1]equinox PERL6LIB should work, should not it?
castaway broquaint!
QtPlatypus broquaint: Yes broquaint ? 12:30
[1]equinox: I don't know eather way.
broquaint Nothing, QtPlatypus, am getting lost in irssi :/
QtPlatypus Test it and see.
broquaint Hey, castaway, how goes it?
QtPlatypus N/P
[1]equinox it does not
castaway we moving next week! 12:31
s/we/we're/
[1]equinox sorry, it does work
broquaint Wow! Congrats! :)
castaway bounces. 12:32
broquaint We are you moving to?
castaway Abingdon 12:33
(Oxon)
[1]equinox I could be moving to Mars
you could be moving to Mars
broquaint Nice one, c :)
[1]equinox where is that? 12:34
broquaint Oxfordshire, England, dear chap.
[1]equinox ok, tell me where is Szalkszentmōæ½xE1rton 12:35
castaway not a clue 12:36
castaway puts the group Camel back on the shelf ..,)
[1]equinox ok 12:37
it is not a sine
broquaint I'm guessing somewherein Hungary, [1]equinox.
[1]equinox what help did you make use of? 12:38
correct, broquaint
broquaint Teh Google of course :) 12:39
[1]equinox well, you can use the web efficiently 12:40
QtPlatypus asks if Oxford is in Oxfordshire
castaway usually, yes 12:42
broquaint It is indeed, QtPlatypus. As Cambridge is in Cambridgeshire. The naming of some English counties isn't terribly imaginitive.
castaway *g*
Theres no Wilts in Wiltshire tho!
QtPlatypus Are there pigs in Devonshire? 12:43
castaway quite likely
pjcj the hogs are in Hampshire 12:46
[1]equinox is there File::Copy in perl6? 12:47
castaway theres a perl6? 12:48
QtPlatypus There is a Perl6 but there isn't a perl6.
broquaint Nope, [1]equinox. Although you could possibly just: use perl5:File::Copy; # Assuming that's the correct syntax.
[1]equinox or is copy part of Perl6? 12:49
broquaint Probably not, [1]equinox. It could possibly be in a File:: type module though. 12:50
QtPlatypus mmms to himself sub cp ($sce,$des) { open "<$sce" ==> open ">$des" } 12:51
Would that work?
Actually
I can't see why it wouldn't. 12:53
QtPlatypus mmms to himself sub cp (Str $sce,Str $des) { open("<$sce") <== open(">$des") }
Or are we using :r and :w now?
sub cp (Str $sce,Str $des) { open($sce,:r) ==> open($des,:w) } 12:54
[1]equinox have you ever got this? 12:58
pugs: user error (Cannot evaluate in Ghc)
QtPlatypus Nope.
Pugs doesn't seem to know about ==> 12:59
[1]equinox D:\extracted\pugs>pugs -BGhc D:\extracted\pugs\examples\functional\member.p6 13:00
pugs: Internal error:
Unrecognized construct: App (Var "&member") Nothing [Pos (MkPos "D:\\extract
ed\\pugs\\examples\\functional\\member.p6" 5 12 5 17) (Val (VStr "foo")),Pos (Mk
Pos "D:\\extracted\\pugs\\examples\\functional\\member.p6" 5 19 5 20) (Val (VInt
1)),Pos (MkPos "D:\\extracted\\pugs\\examples\\functional\\member.p6" 5 22 5 27
) (Val (VStr "foo")),Pos (MkPos "D:\\extracted\\pugs\\examples\\functional\\memb
er.p6" 5 29 5 30) (Val (VInt 3)),Pos (MkPos "D:\\extracted\\pugs\\examples\\func
tional\\member.p6" 5 32 5 33) (Val (VInt 4)),Pos (MkPos "D:\\extracted\\pugs\\ex
amples\\functional\\member.p6" 5 35 5 40) (Val (VStr "bar"))]
pugs has a lot to develop
QtPlatypus Looks like the GHC backend doesn't understand that code. Use another backemd 13:01
end
[1]equinox are pir and parrot the same? 13:03
broquaint Parrot is the virtual machine and PIR is its language (or at least, the language which compilers for Parrot should target). 13:07
[1]equinox ok 13:12
tewk So I'm trying to understand the directory structure of pugs/perl5 org.perl6.metamodel looks to be an old java implementation, is it used for reference. 13:18
Limbic_Region [1]equinox ping 14:22
You are interested in a windows binary?
I believe there are links to binary builds from the pugs homepage at pugscode.org 14:23
but if not, Jonathan does *mostly* daily binary builds of pugs and parrot on windows at www.jwcs.net/~jonathan/perl6/
emailing him that it is out of date usually gets it updated though, hence the *mostly* 14:24
fglock autrijus: ping 14:27
Limbic_Region seconds that 14:28
autrijus ping
Limbic_Region hesitates to point out a problem as it will likely involve being volunteered to provide the solution 14:29
fglock Are traits applied to a Container's cell?
Limbic_Region: most likely :)
dudley tewk: the org.perl6.metamodel as it is now is not used for anything 14:30
Limbic_Region fglock - well, the fix is easy provided that there is a p6 version of File::Find 14:31
but I am still keeping my mouth shut about the problem for now ;-)
geoffb ping 14:36
fglock googles for instance traits 14:42
stef_ I have not followed recent events, is pge supported in the main trunk? 14:57
broquaint If you have parrot, yes. 14:59
stef_ the current parrot trunk, I meant.... 15:00
I think it was separate 15:01
Limbic_Region Ok - I am going to problem report and run so as to avoid getting volunteered to fix 15:05
with the ever changing specifications - there is a fair amount of code in the examples directory that no longer works
if we care that the code is broken we don't have to do anything but ... 15:06
Limbic_Region ducks
Limbic_Region runs
Limbic_Region finds cover
broquaint BOOOOOOOOOOOOOM!!!!!!!!!!
xinming ?eval 3+5 15:08
evalbot6 8
xinming hmm... whose bot is this by the way? 15:09
Limbic_Region evalbot is in the examples directory
theorbtwo ?eval $ref = {$ref.()}; $ref() 15:10
evalbot6 Error: Undeclared variable: "$ref"
theorbtwo ?eval my $ref = {$ref.()}; $ref()
evalbot6 (no output)
theorbtwo Not bad.
tewk dudley: Thanks, I figured that, what was it in it's prior life, a pugs backend in java? Who wrote it? 15:19
xinming ?hi 15:20
fglock xinming: hi 15:24
tewk Ooh: I just found search.cpan.org/dist/Perl6-Pugs/lib...s/hack.pod 15:25
integral svn.openfoundry.org/pugs/lib/pugs/hack.pod # the master copy 15:26
kolibrie stevan: I'm setting up WWW::Kontent, and get this error:
pugs: *** No compatible subroutine found: "&File::Spec::path"
at /usr/local/share/perl6/FindBin.pm line 36, column 17-36
/usr/local/share/perl6/FindBin.pm line 68, column 9-16
do I need to switch it to File::Spec::Unix? 15:27
kolibrie wonders why the magic at the top of File::Spec isn't working for him
dudley tewk: stevan wrote the hard parts (MetaClass.java) a long time ago and I picked it up a while back and ported the rest from the javascript metamodel
it was never really meant to be anything other than an exercise in learning the metamodel, at least for me. 15:28
tewk Nice 15:29
dudley occasionally I get the perverse urge to code in java, but usually I just lay down for a while and it goes away :)
xinming is eval bot here the same as the bot in example/network/evalbot/ 15:31
fglock: hi
integral should be xinming 15:32
xinming *** Warning: Unknown modifier :Perl5 will probably be ignored. 15:33
integral: And then, the bot exited.
fglock xinming: maybe you don't have Pugs compiled with Perl5 support 15:34
xinming fglock: How to do that please? 15:35
integral export PUGS_EMBED=perl5
xinming integral: thanks 15:36
kolibrie xinming: you may or may not want to embed parrot, too 15:37
xinming pugs and emacs 22 are all on the way to destination... feeling really fine these days. :-) 15:38
nothingmuch do you have to say 'new Dog:;' for indirect syntax?
integral examples/inf_lazy_list.p6 is one of the broken scripts ā€” anyone grok the problem with `list .= map:{ by_n $_ };`
Limbic_Region examples/nested_loops/coroutine.p6 is another of the broken examples fwiw 15:42
integral is going through and making a list - already fixed pipe_open.p6 (err, but that was trivial) 15:43
ods15 nothingmuch: you asked me about avi-fix a few days ago... 15:47
nothingmuch ods15: i deleted that already, so too late... but i still want to know =)
ods15 in case you still need it for something, use the CVS version, cause it's like 100000 times faster
nothingmuch (that == movie, not avi-fix)
i'll keep that in mind
ods15 turns out the bottleneck wasn't hd or cpu, it was an insane amount of printfs
a printf for EVERY invalid byte 15:48
i fixed it cvs..
nothingmuch oi
xinming nothingmuch: If there is no arguments, you don't need to use ':'
nothingmuch ods15++
xinming: isn't that ambiguous?
ods15 ods16 is not me
use ods++.'15' 15:49
nothingmuch ods15: you C head don't have magical ++
ods15 the 15 is constant
xinming nothingmuch: why will you think so? I don't think It is ambiguous. :-)
coral inconstant ods
nothingmuch if it were "ods15"++ in perl, then it would be problem, but since 'ods15' is a symbol, that represents you, and your karma, it can be used in the expression <symbol><postfix operator working on value stored in container represented in symbol> 15:50
fairy nuff?
ods15 oh, ok 15:51
btw do you actually have a karma bot here?
nothingmuch i think perlbot's karma was reset when, due to this channel, it reached the 1000s 15:52
and since it has been ignoring #perl6
but jabbot should keep track
jabbot: karma ods16
jabbot nothingmuch: ods16 has neutral karma
nothingmuch jabbot: karma ods15
jabbot nothingmuch: ods15 has neutral karma
nothingmuch uh, guess not
jabbot: karma autrijus
jabbot nothingmuch: autrijus has karma of 574
QtPlatypus jabbot: karam qtplatypus
jabbot QtPlatypus: Tell me more about that.
QtPlatypus jabbot: karma qtplatypus
jabbot QtPlatypus: qtplatypus has neutral karma
dudley jabbot: karma dudley 15:53
jabbot dudley: dudley has neutral karma
svnbot6 r6360 | fglock++ | * perl5/ Scalar - added a test for 'traits'
r6361 | bsmith++ | * Fixed old syntax in examples/nested_loops/coroutine.p6 and examples/nested_loops/recursive.p6.
r6361 | bsmith++ | * Changed pipeopen to Pipe::open in examples/pipe_open.p6.
ods15 jabbot: hello
jabbot ods15: Hi. What seems to be your problem?
ods15 jabbot: dumb bot is <reply>stupid human
jabbot ods15: 喔
ods15 wtf?
jabbot: dumb bot
jabbot ods15: I'm not sure I understand you fully.
ods15 damn
nothingmuch jabbot: it's not a purl
jabbot nothingmuch: Please go on.
ods15 ok it's obiously not a (good ole) infobot 15:54
nothingmuch ugh... damnit. Now *I'm* getting confused
theorbtwo jabbot: karma theorbtwo
jabbot theorbtwo: theorbtwo has karma of 43
xinming jabbot: version 15:55
jabbot xinming: Tell me more about that.
xinming jabbot: about version
jabbot xinming: Please go on.
xinming jabbot: about your version
jabbot xinming: Why are you concerned over my version?
xinming hmmm..
bbl, 15:56
nothingmuch xinming: jabbot is run by gugod, it's author, and I suspect that it's the head revision or his working copy because fixes take around 3 minutes to get merged... See also: jabbot.blogspot.com/
oops
stevan kolibrie: ping 15:57
kolibrie: the File::Spec voodoo is evil, I am not suprised it is causing issues
however I thought autrijus had fixed it
stevan would try to fix it, but has too much $work at the moment 15:58
fglock stevan: can I create anonymous classes using MetaModel-1? (see perl5/Perl6-Container/t/trait.t)
stevan fglock: no, not with 1.0
you will be able to with 2.0
fglock Is it correct to use anon classes to implement traits? 15:59
stevan fglock: 1.0 is too tied to the perl5 package system
fglock: I never really "got" traits fully 16:00
they seemed like roles to be applied at compile time which could cause everything to explode if you looked at them wrong
fglock exactly
stevan ah, so my understanding was correct :)
kolibrie stevan: I tried the same syntax in a test script, and it worked 16:01
fglock I'm using anon classes to apply roles to instances
kolibrie stevan: so I don't know what's up
stevan kolibrie: it is evil voodoo,... all results are undefined :)
fglock: ah, I see what you are doing 16:02
the equivalent perl 6 would be something like my $x does MyRole; 16:03
correct?
fglock 'my $x is TieableScalar' for example 16:04
stevan yes, the anon class approach is what I remember from the hackathon
as opposed to some type of reblessing 16:05
revdiablo: reblessing - I was actually suprised to find that CLOS supports something similar, I thought that was purely a Perl 5 OO "feature"
darn autocompletion, that was not meant for revdiablo :) 16:06
kolibrie stevan: ah ha! my installed version of FindBin.pm is out-of-date 16:07
fglock the problem I see is, 'my $x is TiedThing; my $y; $y ;= $x; $y.untie ' would fail, because $y doesn't do 'untie' - it is a normal scalar. But it is not a big problem.
stevan kolibrie: see, the voodoo will even revert versions :)
fglock oops - ;= should be :=
stevan fglock: why is $y a normal scalar? shouldn't $y := $x alias $x to $y? 16:08
?eval my $x; my $y; $y := $x; $x =:= $y;
evalbot6 bool::true
fglock no, it alias only the 'cells' that hold the value.
stevan ah 16:09
that seems counterintuitive to me
fglock unless traits apply to the cell.
?
stevan does not fully grok the whole container model yet 16:10
stevan really wishes he didnt have to $work, and could just code Pugs :)
fglock 'tieable' is a cell thing. But methods are a 'Container' thing. So a non-tieable container may have a tieable cell, which is strange. 16:12
stevan yes, very
fglock stevan: is it possible that 'does' clobbers 'is' methods? It looks like a method disappeared... 16:17
(doing more tests) 16:22
stevan: I found the problem - private methods disappear when you create the anonymous class (which is corect) 16:28
svnbot6 r6362 | fglock++ | * perl5/ Scalar - scalars bound to tieable scalars are tieable too 16:46
r6363 | fglock++ | * perl5/ Scalar traits. 16:56
r6363 | fglock++ | - Removed methods: .set_tieable(), .access()
r6363 | fglock++ | These functions will be provided by traits. See t/trait.t.
r6363 | fglock++ | - Methods .tieable, .tie, .untie were kept, in order to keep
r6363 | fglock++ | bound scalars tieable.
r6363 | fglock++ | - ._cell was promoted to public method, in order to keep .bind
r6363 | fglock++ | working after a trait is applied.
dudley fglock: re tieable containers, if tieable is a property of a cell, then the definition of a tieable container would be "a container which has a tieable cell", right? So you can't have a nontieable container with a tieable cell. 17:02
or am I missing something (likely)?
fglock dudley: I already fixed that - I made all Scalars have the methods, but they will only work if the cell is tieable. 17:04
now I'm trying to make 'is readonly' work 17:07
dudley I wasn't really talking about the implementation, just the container model. I'm still trying to wrap my head around it. :)
fglock ok - the problem is (was) that you can't tie a container if you don't have the 'tie' method. Whatever the cell is. 17:08
svnbot6 r6364 | fglock++ | * perl5/ Scalar - Added roles (traits) - tieable, readonly 17:22
Limbic_Region integral ping 17:23
anyone know why rt.openfoundry.org/Foundry/Project/.../pugs/log/ stops at rev 6317? 17:24
integral Limbic_Region: pong 17:26
Limbic_Region did you attempt to fix examples/nested_loops/coroutine.p6 or was that someone else? 17:27
I can't tell because the recent commits page is b0rk
integral Limbic_Region: yes, I think I was
Limbic_Region ok - well while the stderr error is fixed, it still doesn't produce the correct results 17:28
integral but I just fixed it for syntax, I have no idea what it should do :-/
Limbic_Region IIRC, every single piece of code in that directory should yield the same output
though formatting/spacing/etc may have subtle differences 17:29
integral hmm
Limbic_Region yep
integral ah, I see what iterative.p6 is doing now
Limbic_Region more or less it should produce the same output as iteratative.p6
which is the one I wrote 17:30
integral ok, got it fixed, basically changed yield undef to yield, and @next to $next. 17:32
Limbic_Region great 17:35
svnbot6 r6365 | bsmith++ | At Limbic_Region's suggestion fixed examples/nested_loops/coroutine.p6. 17:38
nothingmuch has the kevin tew guy gotten a commit bit yet? 17:48
ah yes 17:50
Limbic_Region nothinmuch - you can't check yourself?
I see you as a meta commiter too
nothingmuch yes, i can
i was beying lazy 17:51
Limbic_Region oh
well, I was having trouble with the new interface
I liked the members listed vertically - was easier finding someone 17:52
autrijus whew. finally dd'ed all my data from the broken hard disk to the new 80gb one 17:59
autrijus sleeps &
nothingmuch ciao
svnbot6 r6366 | fglock++ | * perl5/ Scalar - updated 'readonly' trait 18:05
Limbic_Region grats and sleep well autrijus 18:06
nothingmuch is there any work towards a PIL optimizer? 18:45
kolibrie my $work has some old G3s (1996, beige boxes). Is it worth my time to salvage one, or should I treat them as obsolete and utterly worthless? 19:02
nothingmuch kolibrie: i would keep one as a linuxppc mailserver type thing 19:08
debian works reasonably well on old hardware (not too old though)
disks are cheap (These are post scsi)
fglock kolibrie: I use old computers as terminals. I even have some Sparc5.
I use debian too
PerlJam kolibrie: I have an old G3 at home running OSX 10.1 (I think). It wasn't difficult or a problem at all and it makes a nice (albeit slow) computer to use sometimes (like when testing whether or how things compile on a Mac) 19:19
kolibrie so an old G3 might be useful, and can probably run OSX ok 19:23
thank you all for insights: nothingmuch, fglock, PerlJam
fglock, nothingmuch: I use debian for all my computers so far, but they are all x86 right now 19:26
kolibrie wants a cell processor desktop
fglock is $x := %hash valid? What happens if 'undefine $x' ? 19:35
nothingmuch kolibrie: opendarwin.org/projects/XPostFacto/ 19:37
kolibrie nothingmuch: so, that is an OSX replacement, or something to help OSX get installed? 19:39
nothingmuch it helps get osx installed
kolibrie ok
of course, debian is less expensive
theorbtwo I haven't managed to get my old G3 to run OSX (or anything else). 19:57
Of course, I got it as just a mobo, which may have been a mistake.
svnbot6 r6367 | fglock++ | * perl5/ boxed 'Hash' works 20:14
ods15 CapoeiraA: do i know you 20:43
kolibrie can anyone think of a better name for Class::Inflate? (still perl5) 20:45
fglock what's Class::Inflate? 20:47
kolibrie well, that's the question, does the name describe what it does 20:48
so what do you think it does?
fglock creates a text version of the class?
kolibrie bummer, you didn't getit 20:49
it allows an object to describe how it relates to a database, so that the object can then be "inflated" from values in the database 20:50
fglock try the module-authors list - always have discussions on module names an APIs 20:51
kolibrie ok
svnbot6 r6368 | fglock++ | * perl5/ TODO update 20:54
putter xinming: fglock, integral: "Warning: Unknown modifier :Perl5 will probably be ignored." was a bug, an incorrect warning. :perl5 :Perl5 and :P5 work to trigger the use of PCRE (compiled into pugs), rather than PGE (compiled into parrot, and thereby optionally into pugs). perl, the perl5 executable, which can be embedded with PUGS_EMBED, is not involved at all. Bug patch in progress. 21:00
& 21:04
svnbot6 r6369 | putter++ | Prelude.pm: Removed incorrect warning about :Perl5 being an unknown regex modifier. Added warning about :p5. xinming++ 21:08
gantrixx I have a syntax problem, could someone help me? 21:16
I'd like to paste some code and the error I get
integral ah, I was thinking of use'ing perl5 modules, not regexps 21:29
[1]equinox do you know a tool for patching? 21:30
21:40 Maddingue__ is now known as Maddingue
xinming ?eval my $a; my $a; 21:47
evalbot6 undef
xinming hmm, In S04, It says:" (It's illegal to declare $x twice in the same scope.) " 21:51
Is this a "bug" in pugs?
gantrixx is it possible to assign to use something other than $_ in a for loop for the current value of the iterator? 22:01
xinming gantrixx: do you mean for @ary -> $item { bla; bla; }; ? 22:02
?eval for (1, 2, 3) -> $item { $item.say }
evalbot6 1 2 3 undef
gantrixx I think I might mean that 22:04
svnbot6 r6370 | yiyihu++ | add test for declaring my() variable twice in the same scope.
gantrixx is that the same as foreach $item in @array { bla; bla; }
xinming ?eval foreach (1, 2, 3) -> $item { $item.say } 22:05
evalbot6 Error: unexpected ">" or "-" expecting operator, ":", ",", term postfix, postfix conditional, postfix loop, postfix iteration, ";" or end of input
xinming hmm, Maybe foreach is obselete in perl 6
no need to use that. Because the list is lazy by default.
gantrixx I sort of liked the foreach statement
sort of like natural english 22:06
xinming read S04
foreach doesn't exist in perl 6 22:07
gantrixx I can't find anything in the Auodad book on pushing and popping onto arrays 22:18
is it as simple as @array.push("red"); ? 22:19
theorbtwo xinming, it's "for", not "foreach".
And that's only listy for -- C-like for is now spelt "loop".
theorbtwo declares it time for bed. 22:21
xinming theorbtwo: *** No compatible subroutine found: "&splitpath" 22:25
theorbtwo: I am trying to run evalbot, what caused this please?
hmm, I think I should ask, where to find the function splitpath? 22:30
23:00 xinming is now known as help
gulugulu hi yall 23:00
23:00 help is now known as xinming
xinming gulugulu: hi. 23:00
try_evalbot< ?eval 3+5 23:07
?eval 3+5
gantrixx ok, so if I have an object that has @.array is rw as an attributed, if I want to push an object onto that attribute, I would just do a push @.array, $obj ? 23:31
buu gantrixx: God I hope not. 23:40
nothingmuch buu: sucks for you 23:41
ciao people 23:42
putter nothingmuch: still no p6 rules testing on the smoke... 23:59