'-Ofun: xrl.us/hxhk | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6' Set by rafl_ on 5 November 2005. |
|||
theorbtwo | G'night, laz. | 00:00 | |
liz. | |||
liz6 | g'night theorbthree ;-) | ||
leo | and four me g.night 2 | 00:01 | |
svnbot6 | r7912 | stevan++ | Perl6::ObjectSpace - | 00:16 | |
r7912 | stevan++ | * all methods in Bootstrap now have a checked return type :) | |||
01:17
Lopo_ is now known as Lopo
|
|||
gaal | dduncan: I won't have time to hack .hs myself in the coming week or so, so by all means go for it if you want. | 05:16 | |
rafl: does what work for me? | 05:17 | ||
rafl | gaal: pge support. You said it doesn't work on feather. | ||
gaal | SamB: er, of course. Did I imply that you can somewhere? :) The sourcy macos package "uses a binary bootstrap compiler" | 05:18 | |
rafl: sec. | |||
rafl | Does someone know under what license autrijus talks are? I want to give a Perl 6/Pugs talk on friday and would like to steal excessive from him.. :-) | 05:19 | |
pasteling | "gaal" at 192.115.25.249 pasted "pge not working" (3 lines, 143B) at sial.org/pbot/14193 | ||
rafl | Try to use /usr/bin/pugs? | 05:20 | |
gaal | long as the flight from .ch to .hk may be, i'm pretty sure he'll be landing by then :) | 05:21 | |
pasteling | "gaal" at 192.115.25.249 pasted "no go with system pugs either" (4 lines, 264B) at sial.org/pbot/14194 | 05:22 | |
rafl | Hm. The system pugs error confueses me. | ||
Doesn't it work on feather only? | 05:23 | ||
Read as: Is there someone who has this running? | |||
gaal | rafl: let me test on my colinux | 05:24 | |
but wait, are you doing parrot now too? wow | |||
rafl | Noone else wants to, as it seems. | 05:25 | |
There has been a request for a Debian package for months and no one felt responsible, so I did. | |||
gaal | i think there's at least one other way to put that, but rafl++ nonetheless :) | 05:26 | |
rafl | What's the other way? :-) | ||
gaal | so i should just dpkg -i everything from ~rafl/public_html/debian/ ? | ||
rafl | gaal: Not libghc6-* -- it's broken from SVN currently. | 05:27 | |
gaal | s/responsible/capable/, for one. or knowledgeful of debian. or temporally able. | 05:28 | |
ok | |||
rafl | Well. It's not that much work currently. One release a month isn't that much. | 05:29 | |
gaal | isn't it kind of an asymptotic thing? huge inital overhead, gets easier the more frequent releases are? | 05:30 | |
rafl | If you packaged it once you'll only need to bump up versions in some places and everything works again. Nothing that you need really deep Debian knowledge for. | ||
The initial overhead wasn't that huge. I thought that first so I hestiated to do a parrot package for some weeks. I also started to do it in a branch so I could not break anything because I thought there were some major changes to the build system needed. | 05:31 | ||
But in fact it was done in only some hours and I merged the branch directly back some hours after creating it. :-) | |||
gaal | i meant the whole debian gig. | 05:32 | |
rafl | I don't get you then. | ||
gaal | part of the overhead is learning debian packaging, getting to know/be known by the other debian people. | 05:33 | |
if i had to package something once a year in debian, that once a year would be very hard | |||
if i did it every week, it'd be crazy at first but then sorta ease out. no? | 05:34 | ||
rafl | I guess that's right. | ||
gaal | fwiw: on my test machine, PGE fails in the same way it did with eric's autobuild | 05:35 | |
not in the way /usr/bin/pugs failed on feather. | |||
rafl | It usually takes me less around 5 minutes to make a Debian package of an average cpan module now. When I started it took hours and others still had to complain about it.. | ||
gaal: I've no idea then. | |||
gaal | in any case i doubt the problem is in the package itself. | ||
rafl | The problem with /usr/bin/pugs on feather maybe is. I'm not sure though. | 05:36 | |
buu | ?eval { 1 } | 10:19 | |
evalbot_7912 | 1 | ||
buu | ?eval { 1 }->() | ||
evalbot_7912 | Error: unexpected ">" or "-" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
buu | ?eval sub { 1 } | ||
evalbot_7912 | sub {...} | ||
buu | ?eval x => {1} | 10:21 | |
evalbot_7912 | ("x" => sub {...}) | ||
azuroth | ?eval { 1 }.() | 10:25 | |
evalbot_7912 | 1 | ||
azuroth | ?eval -> $a { $a }.(5) | ||
evalbot_7912 | \5 | ||
azuroth | slash five, eh? | ||
theorbtwo | azuroth: evalbot, for reasons that I've never quite understood, often gives one level of enreferencing beyond what you'd expect to see. | 10:28 | |
azuroth | ahh | 10:29 | |
I don't think I've noticed before | |||
buu | eval: 1 | 10:31 | |
buubot | buu: Return: 1 | ||
love_ANGEL | selam k0131zlar benimle tan0131015fmak isteyen varm0131yd0131 | 11:02 | |
? | |||
alo kimse yokmu dur | 11:03 | ||
be | |||
sizi bekliyorum ama ben | |||
? | |||
azuroth | saluttt les pdddd, love angel! | 11:04 | |
azuroth wonders whether "for @foo -> $x, $y, $x" is a mistake in the quickref | |||
11:07
nnunley_ is now known as nnunley
|
|||
azuroth | I'm going to assume it is, and change the last x to z. take that! | 11:10 | |
theorbtwo | Looks like a typo to me. | ||
svnbot6 | r7913 | azuroth++ | Changed quickref's control so that | 11:17 | |
r7913 | azuroth++ | for @foo -> $x, $y, $x | |||
r7913 | azuroth++ | is now | |||
r7913 | azuroth++ | for @foo -> $x, $y, $z | |||
azuroth | "the list ctoring comma operator supplies this list context: sub *infix:<*> (*@things) { ... }" - should that be *infix:<,> ? | 12:25 | |
theorbtwo | Quite likely. prefix:<*> also makes some sense, but not much. | 12:26 | |
azuroth | I also noticed it didn't mention * providing list context (but did mention ~, +, and ?) and thought that was a bit peculiar | 12:27 | |
rafl | Well, $x, $y, $x could also be useful. Even if there could be a better way like @foo -> undef, $y, $x or @foo -> _, $y, $x | 12:29 | |
azuroth | I think it actually assigned x to the first value it saw. but yeah, it _could_ be useful | 12:30 | |
it's a peculiar and confusing case for being in the quickref though, in my opinion | |||
rafl | Indeed. | 12:31 | |
theorbtwo | I don't think we want obfu cases in our quickref. | ||
rafl | Don't we? Ooo :-( | 12:32 | |
theorbtwo | Putting "_ = foo() # Explicitly ignore the return of foo." in might be useful. | ||
rafl | Is _ really perl 6? Where is it described? | 12:34 | |
theorbtwo | Donno; just seen it alluded to on the chan. | ||
rafl | But I thing _ = foo() is ugly. foo() in void context does the same. | 12:35 | |
Well, I think the _ is stolen from haskell. | |||
theorbtwo | But it's a simple example. | ||
(_, $x, $y) = foo() would be an actually useful one. | |||
rafl | I think undef is Perl 6's _ | 12:36 | |
Just like in Perl 5. | |||
azuroth | good night, everyone | 12:43 | |
liz6 | night, azuroth! | 12:44 | |
gaal | liz6: hi | 12:45 | |
liz6 | gaal: hi! | ||
gaal | thanks for the notes. :) | 12:46 | |
what did you mean by best practices in regard to the function call examples? | |||
theorbtwo | Hi, liz. | 12:47 | |
And gaal. | |||
gaal | hey :) | ||
liz6 | foo( $a ) as opposed to foo ($a) ? | ||
gaal | is that in PBP? I don't like it. | 12:48 | |
liz6 | I think it is... | ||
someone pls correct me if I'm wrong... ;-) | |||
theorbtwo | I wouldn't put a space between the name and the beginning of the arg list, because you shouldn't try to call perl 6 subs that way. | 12:49 | |
xinming | liz6: foo( $a ) = foo $a; but != foo ( $a ); | ||
foo ($a) is become a bit like, foo list( $a ); | 12:50 | ||
liz6 | that's why I put a question mark in my comments... | ||
so, please treat it as a slippo of my fingers.. | |||
wolverian | rafl, tentatively, ? (I think) and ! mean optional and required params that are ignored, in signature lists. | 13:23 | |
rafl, the same could apply to any binding. | |||
gaal | sorry, was whisked away by $work | 13:48 | |
I think I've settled on `sub foo (args)` in signatures and `foo(args)` in calls. `( args )` looks weird to my eyes. | 13:49 | ||
theorbtwo | To mine too, gaal. | 13:50 | |
gaal | though in Perl 5 I often said things like for (@{ $listref }) { ... } | ||
theorbtwo | OTOH, I don't like that calling a sub like you write the signature will silently do the wrong thing in many cases. | ||
gaal | significant whitespace is teh weird, yeah. can't say it isn't useful at times, though! | 13:54 | |
rafl | autrijus: ping | 13:58 | |
Limbic_Region | salutations all | 14:04 | |
kolibrie | good morning, Limbic_Region | 14:05 | |
liz6 | rafl: I think autri is en route from helsinki to taipei right now... | 14:06 | |
rafl | liz6: Ah, OK. ETA? | ||
liz6 | not sure: I wouldn't expect anything from autri in the next 24 hours... | 14:07 | |
Limbic_Region wouldn't bet on that | |||
liz6 | ;-) | ||
seen autrijus | |||
jabbot | liz6: autrijus was seen 23 hours 50 minutes 40 seconds ago | ||
liz6 | L~R: I guess that would be a record, no? 48 hours? ;-) | 14:08 | |
Limbic_Region | liz6 - there have been times where he wasn't around in IRC but was still checking in to svn | 14:09 | |
meant to ask you about your coroutine specs | |||
if I create a coroutine and have a yield in the body of the loop, does the coroutine work like a full-body continuation? | |||
and not like a p5 fancy goto? | 14:10 | ||
liz6 | it's my understanding that execution will continue after the yield() at the next invocation | ||
Limbic_Region | IOW - can I resume inside a loop requiring initialization where in p5 (simulating coroutines with fancy goto tricks) you could not | ||
liz6 | regardless of where that is... | ||
Limbic_Region | ok - cool | 14:11 | |
liz6 off to do some shopping and then back to $work | |||
robkinyon | What's the difference between Ruby's coros and what is planned for P6? | 14:59 | |
Limbic_Region | read S17 | ||
robkinyon | thx | ||
Limbic_Region | rather - read S17 that's in the Pugs repository | ||
keeping in mind it was specced by liz and autrijus (with some influence by wendy) | 15:00 | ||
IOW - it is a draft that @larry needs to stamp | |||
robkinyon | wendy? | ||
liz6 | my spouse... | 15:01 | |
r0nny | yo | 15:02 | |
Limbic_Region | in any case, Parrot has got the goods - the decision on the p6 side is how much/little to use | 15:03 | |
and how to handle things like parameters | |||
which can go several different ways with strong supporting arguments for each | |||
robkinyon | liz6: Oh - I didn't know you were married. :-) | 15:04 | |
limbic_region: Hmmm ... I'm liking Ruby's coros a lot | |||
Limbic_Region | robkinyon - I am Ruby ignorant, mind giving me an example? | 15:05 | |
svnbot6 | r7914 | iblech++ | docs/quickref/data: Fixed somewhat critical typo, spotted by azuroth++. | ||
robkinyon | one sec | ||
Limbic_Region | and have you read Dan's "What the heck is a coroutine" blog? | ||
robkinyon | LR: Yeah, I've read it | ||
i need to reread it after having learned Ruby, though | 15:06 | ||
Limbic_Region | www.sidhe.org/~dan/blog/archives/000178.html | ||
robkinyon | my eyes glazed a bit cause i didn't have any experience. :-) | ||
Limbic_Region | yeah - fortunately for me, I was in #parrot at the time and got some real time explanations | ||
understanding how continuations and coroutines differed really solidified things for me | 15:07 | ||
but I would be happy to see how coroutines work in Ruby | |||
unfortunately - all implementations of coroutines that I know about are still just emulations of Knuth's original brain child | |||
lisppaste3 | robkinyon pasted "Ruby coros" at paste.lisp.org/display/13367 | 15:08 | |
robkinyon | That's from my port of Tree.pm to Ruby - it gives traverse() both implements and uses coros | ||
Limbic_Region | the case statement isn't required though right | 15:09 | |
robkinyon | I use the case statement to determine which traversal method I'm supposed to do | ||
Limbic_Region | the yields could just as easily have been outside? | ||
robkinyon | yeah | ||
Limbic_Region | I don't see anything there that would lead me to believe there will be undesireable differences | 15:10 | |
robkinyon | well, you mentioned a number of different WTDI | 15:11 | |
Limbic_Region | 1 thing you have there is just what I was confirming with liz - that coroutines can yield and resume inside a construct requring initialization | ||
robkinyon | "construct requiring initialization"? | ||
Limbic_Region | in p5 speak, gotos can't jump inside a loop or a subroutine | ||
robkinyon | ah | ||
gotos can't enter a scope? | 15:12 | ||
Limbic_Region | they can as long as initialization isn't required | ||
liz6 | from Dan's blog: | ||
"One thing to remember is that you can yield out of a coroutine no matter how deeply you're into it. Our examples are really simple, but you could be nested ten or twenty levels of scope deep in a coroutine and still yield out--when you re-invoke the coroutine you'll be dropped back where you were, ten or twenty levels deep, with all your lexicals put back in place." | |||
robkinyon | That's how Ruby's coros work | ||
plus, you can pass in a Proc object that has a completely different scope and yield to it | 15:13 | ||
Limbic_Region | in any even robkinyon, that's not the issue with different WTDI | ||
robkinyon | (which is important) | ||
Limbic_Region | the issue is with parameters | ||
robkinyon | ok ... ? | ||
Limbic_Region | let me nopaste | ||
robkinyon | k | ||
Limbic_Region | perlbot nopaste | ||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
pasteling | "Limbic_Region" at 129.33.119.12 pasted "coroutines and parameter binding" (24 lines, 356B) at sial.org/pbot/14202 | 15:16 | |
Limbic_Region | sorry - was filling in commentary | ||
robkinyon | huh | 15:17 | |
Limbic_Region | what huh? | ||
robkinyon | lemme see what ruby does | 15:18 | |
ok - ruby has a strict type signature | |||
so, "def foo ( a )" requires that there's a parameter every time | 15:19 | ||
Also, yield will only yield to the associated block | |||
So, you cannot yield to your caller - you only yield to the coro that you've been handed to | |||
Limbic_Region | hmmm - not sure I understand that last statement, but before you explain | 15:20 | |
does changing the parameter affect how that parameter is bound | 15:21 | ||
for instance - does calling foo(3) where the yield is returning the parameter change | |||
if you subsequently invoke with foo(5) | |||
? | |||
robkinyon | yield doesn't yield to the caller | 15:22 | |
it yields to the associated Proc object | |||
Limbic_Region | *shrug* - I guess I need to understand Ruby to understand that distinction | ||
robkinyon | So, if you had "def foo ( a ) yield a", you would call it as "foo(3) { |x| print a }" | ||
You associate a block with the method that has a yield in it | 15:23 | ||
Limbic_Region | oh, I get it | ||
hmmm | |||
robkinyon | the caller isn't involved, save to potentially provide scope to the associated block | ||
Limbic_Region | would definately have to defer you to liz, autrijus, etc on that one | ||
robkinyon | heh | ||
I like ruby's coros | |||
they're very neat and clean | |||
Limbic_Region | while I can conceptually understand it - I have no idea about Parrot's implementation and therefore Perl6's ability to bend that implementation to your will ;-) | 15:24 | |
robkinyon | hmm | ||
coros, as I think you're understanding them, allow the function to yield to the caller, then resume functioning where the yield occurred the next time it's called? | 15:25 | ||
Limbic_Region | yes | ||
where as a continuation can be resumed anywhere | |||
robkinyon | ok - in ruby, coros are primarily used to implement iterators | ||
SamB | Limbic_Region: Parrot is a VM -- what difference does the implementation make? | ||
robkinyon | for example, foo.each { |x| ... } | ||
Limbic_Region | SamB - a matter of emulation (or how much work it takes to get the job done) | 15:26 | |
SamB - in p5, you can simulate coroutines - but only to a certain extent | |||
robkinyon | LR: You could implement them fully, but you would have to maintain all the state yourself within the coro | ||
Limbic_Region | for instance - goto's can't jump inside constructs requiring inialization | ||
robkinyon | You'd practically have to implement a VM within each coro | ||
SamB | Limbic_Region: maybe you meant Parrot's specification? | 15:27 | |
robkinyon | you'd have to unroll everything. :-) | ||
Limbic_Region | SamB - right | ||
thanks for clarification | |||
liz6 | isn't that what continuattions are about? | ||
Limbic_Region | yes liz6 | ||
but to make robkinyon's Ruby syntax work in perl6 likely requires some manipulation | 15:28 | ||
and I don't know how much or where to start | |||
liz6 | ah, ok, in that sense... | ||
Limbic_Region | which is why I deferred | ||
SamB | now if we were talking about, say, Python's VM, it would be "implementation", because there is no spec for that. | ||
Limbic_Region | and you would definately know | ||
so WRT my earlier statement, I should have said spec and subsequent implementation of that spec (as there are no guarantees the implemenation matches the documentation) | 15:29 | ||
robkinyon | well, it actually doesn't take much | ||
Limbic_Region wanders off for a sec | |||
robkinyon | In essence, Ruby's coros are more syntactical sugar for P5's & prototype that happens to be at the end instead of the beginning | 15:30 | |
And, you get a keyword for calling that subref called "yield [ARGS]" instead of doing $subref->([ARGS]) yourself. | 15:31 | ||
Look at www.perlmonks.org/?node_id=506753 for a few different implementations of Ruby's Array.partition() in Perl | |||
In Ruby, the block is at the end where it's in the beginning in Perl5 | 15:32 | ||
You could easily do this in P6 with a method signature | |||
Limbic_Region | liz6 - has S17 been handed off to @larry for their perusal? | ||
robkinyon | The only thing in Ruby is that you don't have to know about the block - it's just there for you unless you need to pass it along, as I did in my nopaste | 15:33 | |
Limbic_Region | if so, perhaps robkinyon wants to post a question to p6.l as food for thought when they are considering it | ||
liz6 | L~R: nope, still working on it, while $work is piling up... | ||
;-( | 15:34 | ||
Limbic_Region | oh, well then I will shut up and let you get back to it | ||
liz6 | suggestions / patches welcome! | ||
robkinyon | I'll wait until it's posted to ask my question | ||
kolibrie just saved several minutes by using pugs to do some number crunching on a YAML file | 15:38 | ||
(pugs)++ (Perl 6)++ | |||
r0nny | (black perlvodoo)++ ;P | ||
dada | <<pugs perl6>>^++ | 15:40 | |
?eval <<pugs perl6>> | 15:41 | ||
evalbot_7914 | ("pugs", "perl6") | ||
dada | ?eval my $x = 1; my $y = 2; ($x, $y)^++ | ||
evalbot_7914 | Error: unexpected end of input expecting term | ||
dada | oops | ||
my perl6 is rusty already | 15:42 | ||
robkinyon | ?eval <<pugs perl6>>^++ | ||
evalbot_7914 | Error: unexpected end of input expecting term | ||
robkinyon | ?eval <<pugs perl6>>^++; | ||
evalbot_7914 | Error: unexpected ";" expecting term | ||
robkinyon | ?eval <<pugs perl6>>^+ 1 | 15:43 | |
evalbot_7914 | 1 | ||
robkinyon | ?eval <<pugs perl6>> ^+ 1 | ||
evalbot_7914 | 1 | ||
dada | ?eval <<1 2>> ^+ 1 | ||
evalbot_7914 | 1 | ||
dada | ?eval my @a = (1,2); @a^++; @a; | ||
evalbot_7914 | Error: unexpected ";" expecting term | ||
dada | ?eval my @a = (1,2); @a^+=1; @a; | 15:44 | |
evalbot_7914 | Error: unexpected "=" expecting "0", digit or fraction | ||
dada | ?eval my @a = (1,2); @a>>+=1; @a; | ||
evalbot_7914 | Error: unexpected ">" expecting word character, "::", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
dada | don't remember | ||
?eval (1,2)>>+<<(2,3) | 15:45 | ||
evalbot_7914 | (3, 5) | ||
dada | ?eval (1,2)>>+1 | ||
evalbot_7914 | Error: unexpected ">" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
dada | ?eval (1,2)>>+ 1 | ||
evalbot_7914 | Error: unexpected ">" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
dada | isn't this a bug? | 15:46 | |
?eval (1,2)>>+<<1 | |||
evalbot_7914 | (2, 3) | ||
dada | ?eval (1,2)>>++<< | ||
evalbot_7914 | Error: unexpected "<" or ">" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
dada | ?eval <<pugs perl6>> >>+<< <<perl6 pugs>> | 15:48 | |
evalbot_7914 | (0.0, 0.0) | ||
dada | ?eval <<pugs perl6>>>>+<<<<perl6 pugs>> | ||
evalbot_7914 | Error: unexpected "<" or ">" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
dada | heh | ||
?eval <<1 2>> >>+<< <<2 3>> | 15:52 | ||
evalbot_7914 | (3.0, 5.0) | ||
Limbic_Region | ?eval (1, 2) >>+<< (2, 3) | 15:56 | |
evalbot_7914 | (3, 5) | ||
Limbic_Region | ?eval(1, 2, 3) >>+<< (4, 2) | 15:59 | |
evalbot_7914 | (5, 4, 3) | ||
dada | ?eval <<j p 6>> >>~<< <<a h>> | 16:03 | |
evalbot_7914 | ("ja", "ph", "6") | ||
dada | ?eval [~] <<j p 6>> >>~<< <<a h>> | ||
evalbot_7914 | "japh6" | ||
dada | yippee!! :-) | ||
robkinyon | ?eval <<pugs perl6>> >>++ | ||
evalbot_7914 | Error: Can't modify constant item: VStr "pugs" | ||
theorbtwo | Hm, [~] <<j p 6>>Ā»~Ā«<<a h>> | ||
robkinyon | ?eval <"pugs" "perl6"> >>++ | ||
evalbot_7914 | Error: Can't modify constant item: VStr "\"pugs\"" | ||
theorbtwo | ?eval [~] <<j p 6>>Ā»~Ā«<<a h>> | 16:04 | |
evalbot_7914 | Error: unexpected "\\" expecting term postfix, operator, ":", ",", postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
robkinyon | ?eval <$x="pugs" $y="perl6"> >>++ | ||
evalbot_7914 | Error: Can't modify constant item: VStr "$x=\"pugs\"" | ||
robkinyon | ?eval $x='pugs';$y='perl6';<$x $y> >>++ | ||
evalbot_7914 | Error: Undeclared variable: "$x" | ||
robkinyon | ?eval my$x='pugs';my$y='perl6';<$x $y> >>++ | ||
evalbot_7914 | Error: Can't modify constant item: VStr "$x" | ||
robkinyon | Gack! | ||
?eval my$x='pugs';my$y='perl6';($x $y) >>++ | |||
evalbot_7914 | Error: unexpected "$" expecting operator or ")" | ||
robkinyon | ?eval my$x='pugs';my$y='perl6';($x, $y) >>++ | ||
evalbot_7914 | Error: Can't modify constant item: VStr "pugs" | ||
robkinyon | ?eval my$x="pugs";my$y="perl6";($x, $y) >>++ | 16:05 | |
evalbot_7914 | Error: Can't modify constant item: VStr "pugs" | ||
dada | it doesn't do ++ on strings yet, maybe | ||
robkinyon | feh | ||
dada | ?eval my $x=1; my $y = 2; ($x, $y) >>++ | ||
evalbot_7914 | Error: Can't modify constant item: VInt 1 | ||
dada | no, it's something deeper | ||
?eval my $x=1; my $y = 2; ($x, $y) >>+<< 1 | |||
evalbot_7914 | (2, 3) | ||
dada | ?eval my $x=1; my $y = 2; ($x++, $y++) | 16:06 | |
evalbot_7914 | (1, 2) | ||
dada | that's unorthogonal | ||
robkinyon | ?eval my $x=1; my $y=2;(++$x, ++$y) | 16:07 | |
evalbot_7914 | (2, 3) | ||
robkinyon | ?eval (2,3) >>++ | ||
evalbot_7914 | Error: Can't modify constant item: VInt 2 | ||
dada | ?eval 2++ | ||
evalbot_7914 | Error: Can't modify constant item: VInt 2 | ||
robkinyon | yeah | ||
dada | that's orthogonal | ||
robkinyon | LOL | ||
it's orthogonal to itself, but doesn't look very spec-ish | 16:09 | ||
dada | no no | ||
it's unorthogonal | |||
theorbtwo | my $x=1; my $y = 2; ($x, $y) >>++ not working doesn't make sense to me. The rest do. | 16:10 | |
?eval my $x=1; my $y = 2; ($x, $y)>>++ | |||
evalbot_7914 | Error: Can't modify constant item: VInt 1 | ||
theorbtwo | Just making sure. | ||
dada | you can't do 2++ and you can't do (2,3) >>++ | ||
but you can do ($x++, $y++) and you can't do ($x, $y) >>++ | |||
that's unorthogonal | |||
robkinyon | or, rather ++$x,++$Y | 16:11 | |
dada | well, the result doesn't matter | ||
the fact is that ($x, $y) >>++ should be perfectly equivalent to ($x++, $y++) | |||
PerlJam | dada: depends on if () created a tuple (ala python) or not. | ||
if ($x,$y) is a tuple, then it's immutable. | |||
no lvalue there, only rvalue | 16:12 | ||
dada | nope | ||
?eval my($x, $y) = (2,3); ($x, $y) | |||
evalbot_7914 | (\2, \3) | ||
dada | ouch | ||
?eval my $x = 2; $x | 16:13 | ||
evalbot_7914 | \2 | ||
dada | you see? it's orthogonal | ||
no tuple here | |||
theorbtwo | dada: I think you are using orthogonal in non-useful ways. | 16:14 | |
The problem is that the ($a,$b) that >>++ is trying to apply to needs to work somewhat differently from a random list-forming ($a, $b). | |||
It needs to act as the argument list to >>++, and get bound with :is rw, instead of :is copy or :is ro. | 16:15 | ||
dada | mmm | ||
?eval my @a = (1,2); @a >>++; @a | |||
evalbot_7914 | Error: Can't modify constant item: VInt 1 | ||
theorbtwo | OK. | ||
Now I don't know WTF is going on. | |||
dada | it's the same, I guess | ||
?eval my @a = (1,2); @a++; @a | 16:16 | ||
evalbot_7914 | [3,] | ||
dada | !!! | ||
theorbtwo | @a is taken in scalar context, get 2, ++ that, assign it back to @a. | ||
dada | yes, right | 16:17 | |
theorbtwo | ?eval my @a = (1,1); @a++; @a | ||
evalbot_7914 | [3,] | ||
dada | ?eval my @a = (1,2,3,4); @a++; @a | ||
evalbot_7914 | [5,] | ||
dada | ok | ||
theorbtwo | I'm not real sure that's what it should do, but I can't think of anything saner for it to do. | 16:18 | |
broquaint | It should die. Loudly. | ||
dada | 1; | 16:19 | |
theorbtwo | "Die loudly" seems like a fairly good option, but how does it do that without making +@a or @a=3 not DTRT? | ||
dada | mmm | 16:20 | |
@a=3 ? | |||
broquaint | Surely it would just be: method postfix:<++>() { die "Don't do that" }, or am I missing something? | ||
dada | shouldn't that be interpreted as @a=(3) ? | ||
?eval @a = 3; @a | 16:21 | ||
evalbot_7914 | Error: Undeclared variable: "@a" | ||
dada | ?eval my @a = 3; @a | ||
evalbot_7914 | [3,] | ||
dada | ?eval my @a = (3); @a | ||
evalbot_7914 | [3,] | ||
dada | it's a different thing | ||
err, no, wait, it's not that different | |||
broquaint | Calling a scalar mutator on an array shouldn't work (unless it's overloaded, of course). | 16:22 | |
dada | ?eval my @a = (42, 43, 44); @a += 1; @a | 16:23 | |
evalbot_7914 | [4.0,] | ||
broquaint | Odd that it converted to a float. | 16:24 | |
dada | ?eval +"1" | ||
evalbot_7914 | 1.0 | ||
broquaint | Wacky. | 16:25 | |
dada | numification works with floats, it seems | ||
anyway, the >>++ problem croaking about constant items is a bug, IMHO | |||
broquaint | Yeah, I thought I'd marked that up in a test before. Maybe I never got around to it. | 16:26 | |
Or figured it'd be fixed RSN. | |||
eric256 tries feathers web chat...this is cool | |||
?eval (+"1").ref | 16:27 | ||
evalbot_7914 | ::Num | ||
dada | ?eval (1).ref | ||
evalbot_7914 | ::Int | ||
dada | ?eval (+"1.2").ref | ||
evalbot_7914 | ::Num | ||
theorbtwo | (+1.ref) | ||
broquaint | ?eval 0.1.ref | ||
evalbot_7914 | ::Rat | ||
theorbtwo | ?eval (+1.ref) | ||
evalbot_7914 | Error: cannot cast from VType (mkType "Int") to Double (VNum) | ||
theorbtwo | ?eval (+1).ref | 16:28 | |
evalbot_7914 | ::Int | ||
dada | ?eval (1.2).ref | ||
evalbot_7914 | ::Rat | ||
dada | mmm? | ||
?eval +(1.2).ref | |||
evalbot_7914 | Error: cannot cast from VType (mkType "Rat") to Double (VNum) | ||
theorbtwo | Whew. If the + operator changed the type on things that were already numeric, then I'd be worried. | ||
eric256 | pugs has a couple fo number types ;) | ||
theorbtwo | Int for integers, Num for floats, Rat for rationals. | 16:29 | |
dada | ?eval (+(1.2)).ref | ||
evalbot_7914 | ::Rat | ||
dada | ?eval my $x = 1.2; $x.ref | ||
evalbot_7914 | ::Rat | ||
theorbtwo | ?eval (1/3.14).ref | ||
evalbot_7914 | ::Rat | ||
Limbic_Region would still love to have a B&D way of declaring non-mutable datatypes that would blow up with prejudice at compile time if anything tries to cast them otherwise | |||
theorbtwo | Odd; I expected that to be a Num. | ||
broquaint | use SML; | 16:30 | |
Limbic_Region | ;-) | ||
broquaint | Or perhaps some fancy perl6 way: use lang :SML; # Mmm, non-backward-compatible. | 16:31 | |
theorbtwo | use SML sounds right to me... not that I know what SML is... | ||
Limbic_Region | 99% of the time, I am not going to care that I have lost a few optimization possibilities to have flexibility in my programs | ||
actually - it is probably closer to 99.95% | 16:32 | ||
broquaint | Standard ML, the language MJD bangs on about in his Strong Typing article. | ||
dada | perl6 -pedantic -wall | ||
svnbot6 | r7915 | kane++ | r123@coke: kane | 2005-11-09 17:39:55 +0100 | 16:41 | |
r7915 | kane++ | * update S22 with kane's work in progress.. starting small with metadata -> package creation | |||
r7915 | kane++ | * describe what we have and where we should go | |||
r7915 | kane++ | * note the p4 prototype2 dir where live code can be found | |||
r7915 | kane++ | * move all previous notes to the header: | |||
r7915 | kane++ | =head1 Past Rantings/Notes/Etc | |||
r0nny | yo | 16:45 | |
xinming | hmm, who wrote the cperl-mode.el for Emacs please? | ||
Limbic_Region | xinming - if it is in the Pugs repository - use blame | 16:46 | |
theorbtwo | Limbic, cperl-mode is for perl 5 code. | 16:47 | |
I seem to recall it being updated by somebody on p5p lately, though. | 16:48 | ||
autrijus | it's since adopted p6-fu | 16:49 | |
Limbic_Region | ok - but it appears that renormalist is responsible for putting it in the Pugs repository | ||
autrijus | using a (defun cperl-looks-like-perl6) | ||
Limbic_Region wins the bet | |||
hey autrijus | |||
autrijus | greetings. just back to .tw and the net | ||
Limbic_Region | right - liz6 suggested another 24 hours, I said don't bet on it | 16:50 | |
autrijus | finished the book jhi gave me during the plane trip | ||
Limbic_Region | xinming - Steffen "renormalist" Schwigon (SCHWIGON) is the one that apparently put the file in the Pugs repository | ||
autrijus | "Unicode Demystified" - a mere 900 pages | ||
my eyes hurt ;) | |||
theorbtwo | 900! | ||
theorbtwo didn't know Unicode was that Mysterous in the first place. | 16:51 | ||
PerlJam | theorbtwo: depends on which end you're looking at it from. | ||
autrijus | I learned all about Hangul layout, Arabic shaping, BiDi and vertical, Han character composition forms, diacritical stacks, etc. | ||
xinming | Limbic_Region: hmm, thanks, But It seems, the file has problem working with cvs version of Emacs. | ||
Limbic_Region: there will be a message while loading the file. :-/ | 16:52 | ||
Limbic_Region | *shrug*, I use a real editor - vi | 16:53 | |
Limbic_Region ducks | |||
eric256 pictures purl six written vertiacly. hmmm | |||
Limbic_Region | autrijus - I speak a bit of Hangul | ||
autrijus wonders who to charge with maintaining S15 | |||
(Unicode) | |||
Limbic_Region | it is one of the most scientific written languages ever created | ||
xinming | by the way, anyone here knows why .p6 is chosen instead of .pl6 as extension.? it seems that .pl6 be more suitable. | 16:54 | |
autrijus | Limbic_Region: ooh, cool. yeah, it's very computational | ||
PerlJam | autrijus: clearly you are the best choice! ;-) | ||
Limbic_Region | which happened only about 500 years ago | ||
PerlJam | xinming: no way! | ||
autrijus | PerlJam: clearly I'm not ;) dan kogai maybe | ||
xinming | PerlJam: Why? | ||
Limbic_Region | the spoken language (much older) was previously written in chinese and only the very affluent could read/write | ||
PerlJam | autrijus: oh, Dan would be an excellent choice. | ||
eric256 | xinming: .pl, .pm, .p6 (all two letters. don't break the pattern!) | ||
autrijus | xinming: I think extensions are somewhat bogus, and you can certainly call perl6 programs .pl | 16:55 | |
theorbtwo | Yeah, so far I've simply gotten away with ignoring non-latin-based languages, and ignoring the actually putting characters on the screen bit. (The former being hard since I don't know any, and the later being somebody else's problem.) | ||
Limbic_Region | then came the 3rd king (his older two brothers abdicated so he could take the thrown) got all the countries bad @$$ linguists/scientists together to create a written language accessible to everyone | ||
xinming | eric256: well, this makes sense. :-) | ||
PerlJam | xinming: .pl6 is aesthetically displeasing for a variety of reasons | ||
xinming: besides .pl has a troubled history | 16:56 | ||
theorbtwo | So: Unicode isn't mysterious if you ignore the hard parts. | ||
eric256 | although if we use pl6 we could rename the languag plsix pronounced pel-ix ;) | 16:57 | |
PerlJam | eric256: plsix == please icks | 16:58 | |
Limbic_Region plans on compiling all of his p6 programs to byte code so the .pbc extension makes sense ;-) | 16:59 | ||
autrijus | Limbic_Region: as soon as lexpad is there we can have -CPIR.PBC :) | 17:00 | |
xinming | autrijus: hmm, I know, on Os which determines the file is executable is by an attribute. But On Os which isn't, the extension is used. that's why I think .pl and .pl6 is better, as some program will generate .p1 .p2 .p3 for packages(though there isn't one), hmm, IIRC, winrar use this scheme if you compress a large file and divide them into small part. | ||
autrijus | or should it be -CParrot.PBC | ||
xinming: I don't think winrar uses .p1 etc... or I might be wrong | |||
LimbicRegion | grrr - I hate when that happens | 17:01 | |
theorbtwo | No, it uses r?? -- rar and r00, r01... | ||
xinming | autrijus: winrar don't use .p1 or .p2. It use r01 r02 r03... | ||
autrijus | right | ||
LimbicRegion | autrijus - jhorwitz showed up in #parrot today asking about the state of Pugs/Parrot interopability (specifically with objects) | 17:02 | |
I mentioned the "awaiting lex implementation" | |||
and pointed him to your "day before parrot release" journal entry | |||
xinming | hmm, why choose p6, In my opinion, It might be for the compiled byte-code. | ||
autrijus | the bytecode would be .pbc for the parrot runtime | ||
LimbicRegion: oh nice | 17:03 | ||
PerlJam | xinming: Are .pl and .pl6 files for Perl Libraries and Perl 6 Libraries respectively? | ||
Limbic_Region was only joking about compiling everything to bytecode though | |||
PerlJam | xinming: and what about .plx files? | 17:04 | |
xinming | PerlJam: .pl is stand for the "current" version of perl(maybe perl 5, maybe perl 6), and .pl6 for specified version of perl, for perl 6 | ||
PerlJam | the trouble with having a good memory is that you don't forget stuff ;) | ||
Limbic_Region | PerlJam - the problem with having a good memory with bad recall is that you feel even more stupid that you hadn't forgot something but needed someone else point it out to you | 17:05 | |
geoffb | [OT] Anyone happen to know a decent free tool that can easily diagram relationships in a SQL DB? $client is allergic to ASCII art, I'm allergic to MS Access, and the sooner this gets dealt with, the sooner I can be a Perl 6 Playa again . . . :-) | 17:06 | |
xinming | PerlJam: It doesn't conflict with .pl? scheme. :-) | ||
Limbic_Region wonders if there is a test that can actually measure memory without the limitations of recall | |||
geoffb - you lost me at "free" | 17:07 | ||
geoffb | sigh | ||
Time to relearn PIC . . . . | |||
theorbtwo | You could try dia, I hear good things about it. | ||
Of course, that'd be nonautomated. | |||
autrijus | geoffb: SQL::Translator::Producer::GraphViz | 17:08 | |
Limbic_Region | geoffb - www.databaseanswers.com/modelling_tools.htm | ||
autrijus | (iirc.) | ||
Limbic_Region | google is your friend | ||
geoffb | theorbtwo, no problem, it's only 10 tables, half of which are just audit versions of the other half, with absolutely trivial relationships . . . but $client just hates doing things the easy way . . . | 17:09 | |
Limbic_Region, point taken | |||
autrijus, hmmm, thanks for the idea | |||
Limbic_Region didn't realize there were so many free options out there | |||
Limbic_Region wonders if he should have fought the purchase of Erwin a little harder now | 17:10 | ||
Limbic_Region wanders off for lunch | |||
stevan | hullo autrijus :) | 17:12 | |
autrijus | greetings stevan | 17:14 | |
robkinyon | autrijus: I have a question re: single-pass interpreters (like Ruby/Perl5), if you don't mind | 17:21 | |
autrijus | sure | ||
robkinyon | I was looking at Ruby's source to see if I could add in user-defined lexically-scoped syntax | 17:22 | |
The way it's written, the keyword and ops lists are both static and the lexer is hard-coded | |||
PerlJam | perl5 is single pass? I've always thought of it more like a 2-steps-forward-one-step-back kind of compiler :) | ||
robkinyon | Shouldn't it be possible to have a table of funcps that respond to the longest-match lexeme, with context thrown in there for good measure, calling the top funcp on the stack (to provide user-defined capabilities) ? | 17:23 | |
eric256 | perljam...i think i heard its a two pass, but the second pass progrresses right behind the first pass. that ameka any sense? ;) | ||
robkinyon | And, that, in theory, shouldn't be too much slower than the current switch table | ||
autrijus | robkinyon: I think you just described perl6 macros. | 17:24 | |
robkinyon | Oh | ||
:-) | |||
In theory, that's not too hard to implement (assuming a strong graps of C which I had and lost) | |||
PerlJam gives robkinyon a strong graps so that he can apply it to C | 17:25 | ||
robkinyon | The only part I'm finding problematic in my mental model is how to determine which lexemes are legal where. For example, within the condition of an if-statement, certain things are legal that aren't legal outside it, and vice-versa | 17:26 | |
So, one would associate a lexeme within a given context to a given funcp ... ? | |||
Or, am I off base? | 17:27 | ||
autrijus | robkinyon: yes. the context is called grammatical category | ||
robkinyon | ahhh | ||
autrijus | the lexeme is parsed using "is parsed" specification | ||
robkinyon wasn't lucky enough to take compiler theory in college | |||
autrijus | the funcp is the macro | ||
robkinyon | "is parsed" specification? | 17:28 | |
autrijus | and it's not comp theory, it's perl6 :) | ||
robkinyon | heh | ||
hmm | |||
autrijus | for some bit about macros, see S06 (and A06 for fun) | 17:29 | |
for grammatical categories, see S12 | |||
robkinyon | I was thinking about hacking this into the Ruby executable | ||
seeing as ruby's codebase is significantly easier to work with than Perl's | |||
autrijus | I'm not too sure about that :) | 17:30 | |
you may have better luck with yc/yarv... maybe | |||
robkinyon | yc/yarv? | ||
autrijus | the nextgen ruby runtime | ||
yarv is ruby's parrot | |||
see this www.atdot.net/yc/compile | 17:31 | ||
also www.atdot.net/yarv/ | |||
stevan | YARV++ | ||
robkinyon | I want to avoid working with Parrot until I see Parrot actually implement a full range of stuff | ||
Plus, I like how everything in Ruby is an object, including the runtime | |||
stevan | robkinyon: not parrot,.. its an unrelated project | ||
robkinyon | Oh - so ruby won't be targeting parrot? | 17:32 | |
stevan | robkinyon: who knows,. but that is not what YARV is :) | ||
robkinyon: see the inst table www.atdot.net/yarv/insnstbl.html | |||
the first 50 are all you really need,..everything after that is an optimization | 17:33 | ||
#26 newrange | |||
autrijus: speaking of bad-ass language runtimes :) | |||
autrijus: any more thoughts/work on the sendmsg stuff? | 17:34 | ||
autrijus | stevan: you saw that I'm converting the entire PIL special forms into sendmsgs | ||
stevan | autrijus: no I didnt,.. where? | 17:35 | |
autrijus | next step is introduce Arglist and Siglist objs | ||
to replace even more special forms | |||
stevan | nice | ||
did you see I added a closure::signature last night | |||
autrijus | stevan: see use.perl.org/~autrijus/journal/27490 on Apply, Bind and Assign | ||
yeah I saw that | |||
stevan | so that is supports return type checking :) | ||
theorbtwo | Oh, speaking of, did you see... | 17:36 | |
autrijus | very nice | ||
theorbtwo | ?eval my ($a, $b) = (1,2); ($a, $b)>>++; | ||
evalbot_7915 | Error: Can't modify constant item: VInt 1 | ||
rafl | autrijus: I want to give a talk about perl6/pugs on friday. I'd like to steak something from your pugs talks. How are they licensed? Am I allowed to steal? | ||
theorbtwo | AFAICS, that's getting treated as j-random-list, and not like an arglist. | 17:37 | |
autrijus | rafl: I hereby release it in the Microsoft Permissive License ;) | ||
rafl: or SQLite "license", or CC-by-2.0, or BSD3, or whatever | 17:38 | ||
rafl | autrijus: I interpret that as a "Yes" :-) | ||
autrijus | that interpretation would be correct. | ||
sili | charge royalties | ||
rafl | autrijus: I'm also happy to hear your Pugs and Haskell talks in march :-) | 17:40 | |
robkinyon | autrijus: Thanks | 17:41 | |
autrijus | rafl: :D | 17:42 | |
rafl | I'm still in doubt about the visual basic talk, though. | 17:45 | |
autrijus: Hey! Stop making new talks or updating them.. I get a mail every time! ;-) | 17:47 | ||
autrijus | couldn't quite bring myself to journal... tomorrow then | 18:00 | |
good night folks :) & | |||
geoffb | good night, autrijus | ||
Simonff | Hi - can anyone help me with a Pugs compilation error? | 18:09 | |
geoffb | Simonff, nopaste it | ||
Simonff | geoffb: www.rafb.net/paste/results/IY7AkL50.html | 18:10 | |
geoffb | Hmmm, someone got this a day or two ago . . . I don't recall the answer, but it should be in the IRC logs (see pugscode.org -> IRC logs in the left menu) | 18:11 | |
Simonff | That was me, on Sunday. I was told to try the SVN version, but the problem persists. | 18:14 | |
geoffb | oh. | ||
sorry about that | |||
Simonff | np :) | ||
svnbot6 | r7916 | asavige++ | added golfex.t misc golf examples | 18:30 | |
r7917 | asavige++ | fixed comments in golfex.t | 18:48 | ||
robkinyon | In #ruby-lang, someone just asked "How do I write a function that accepts a single array containing two numbers?" | 19:10 | |
I'm curious - what would the P6 signature for that look like? | |||
iblech | robkinyon: my sub foo ([$first_elem, $second_elem]) {...} IIRC | 19:12 | |
(Which will, of course, work with both foo @array and foo $arrayref) | |||
robkinyon | my sub foo ([Int $width, Int $height]) { ... } ? | 19:13 | |
iblech | Yep. | ||
see dev.perl.org/perl6/doc/design/syn/S06.html, "Unpacking array parameters" | |||
robkinyon | What about: my sub foo ([Int $width, Int $height], $other_param) { ... } ? | 19:14 | |
iblech | Works too | ||
robkinyon | when is this going to be released again? | ||
iblech | You can even say things like ([Int $width, Int $height = $default_height, Int ?$optional_depth]) | ||
theorbtwo | When it's ready. | ||
iblech | :) | ||
robkinyon | theorbtwo: *sighs* | 19:15 | |
nothingmuch | if it's an array taking two params it might as well be a tuple | 19:28 | |
cognominal_ | this is a form pattern matching (in the haskell sens). I wonder why perl6 does not go the whole way and does not explicitely support algebraic types | 19:59 | |
s/form/form of/ | |||
robkinyon | Question: Will there be an analog to Ruby's :foo? | 20:04 | |
That creates a singleton symbol called :foo that can be used everywhere | |||
21:05
spinclad_ is now known as spinclad
|
|||
mugwump | ?eval "RT"++ | 21:53 | |
evalbot_7917 | Error: Can't modify constant item: VStr "RT" | ||
mugwump | :) | ||
?eval ($x="RT")++ | |||
evalbot_7917 | Error: Undeclared variable: "$x" | ||
mugwump | ?eval (mr $x="RT")++ | ||
evalbot_7917 | Error: No compatible subroutine found: "&mr" | ||
mugwump | ?eval (my $x="RT")++ | ||
evalbot_7917 | Error: No compatible subroutine found: "&my" | ||
mugwump | ?eval my $x ="RT"; $x++ | ||
evalbot_7917 | "RT" | ||
mugwump | There you go, obra - RT++ is still RT | 21:54 | |
obra | :) | 21:55 | |
coral | interesting. it's ok to modify an instance of a constant but not the constant itself? | 22:05 | |
cognominal_ | ?eval say (0..)[0] | 22:36 | |
evalbot_7917 | Error: unexpected "(" expecting block construct, ":", term, term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
obra | seen autrijus | ||
jabbot | obra: autrijus was seen 4 hours 36 minutes 10 seconds ago | ||
cognominal_ | ?eval say (qw(a) )[0] | ||
evalbot_7917 | Error: unexpected "(" expecting block construct, ":", operator, ")", term postfix, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
cognominal_ | say qw(a) | ||
?eval say qw(a) | 22:37 | ||
evalbot_7917 | a bool::true | ||
wolverian | ?eval say (0...)[0] | ||
evalbot_7917 | 0 bool::true | ||
wolverian | cognominal_, you missed one . | ||
cognominal_ | thx | ||
sub take(Int $n, Code &f) { (1..$n).map:{ f() } } | 22:38 | ||
my $compteur = coro { for 1... -> $i { yield $i; } }; | |||
my @a; | |||
say ( @a = take 10, $compteur ) while @a[0] <20; | |||
apparently 1.. is not lazy because it loops without returning anything | 22:39 | ||
if I give an finitie integer as upper bound everything is fine | 22:40 | ||
eric256 | opps...don't hit F5 in the web based IRC chat ;) | 23:06 | |
cognominal_ | encore une de ces conneries de la nasa pour eviter une collision d'un asteroid avec la terre sur /. | 23:34 | |
ils doivent vraiment avoir du mal a justifier leur budget. | 23:35 | ||
buu | ?eval say +(0..)[2] | 23:49 | |
evalbot_7917 | Error: unexpected ")" expecting term | ||
buu | Eh? | ||
?eval say (0..) | 23:50 | ||
evalbot_7917 | Error: unexpected "(" expecting block construct, ":", term, term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
buu | ?eval my @x = (0..); say @x | ||
evalbot_7917 | Error: unexpected ")" expecting term | ||
buu | Wtf? | ||
?eval my @x = 0..; say @x | |||
evalbot_7917 | Error: unexpected ";" expecting term | ||
wolverian | ... | ||
not .. | |||
buu | ?eval my @x = 0...; say @x | ||
evalbot_7917 | pugs: out of memory (requested 1048576 bytes) | ||
buu | heh | ||
So much for 'lazy' | |||
?eval say (0...)[0] | 23:51 | ||
evalbot_7917 | 0 bool::true | ||
buu | ?eval say (0...)[3] | ||
evalbot_7917 | 3 bool::true | ||
buu | ?eval say (0...)[180] | ||
evalbot_7917 | 180 bool::true | ||
buu | Interesting. | ||
sili | eh? what is that? | 23:57 | |
infinity? | |||
mugwump | ?eval say (0...)[-1] | 23:58 | |
evalbot_7917 | pugs: out of memory (requested 1048576 bytes) | ||
sili | i think that means yes. | ||
mugwump | should be inf! :) |