Pugs 6.2.6 uploaded by cpan-upload.p6! | pugscode.org/ <Overview Journal Logs> | pugs.kwiki.org | paste at sial.org/pbot/perl6 Set by integral on 2 June 2005. |
|||
nothingmuch just read `char buffer[10000]=""` as a derclaration that the adjective 'buff' is applied to something of type char 10000 more, relative to "" | 11:37 | ||
functional programming is making me stupider | |||
but I *feel* like i'm actually smarter | |||
kungfuftr looks forward to marty pauleys monads talk at yapc::eu | 11:43 | ||
xerox | kungf00f, what a nickname :) | ||
kungfuftr | xerox... what an unoriginal name | 11:44 | |
=0) | |||
xerox | :( | 11:45 | |
lathos | Slowly filling up with old data: buscador.simon-cozens.org/ | 11:55 | |
QtPlatypus | When is invoke() called on a Class? | 12:05 | |
Limbic_Region | salutations all | 12:27 | |
autrijus | hey Limbic_Region. | 12:28 | |
autrijus is waiting at boarding area | |||
nothingmuch | autrijus: did you get my private messages? | 12:29 | |
Limbic_Region | have a "happy trip" | 12:31 | |
that appears to be a filipino saying | |||
autrijus | nothingmuch: yeah | 12:33 | |
Limbic_Region: thanks. I'm feeling quite trippy already | 12:34 | ||
nothingmuch | i forgot what I wrote | ||
autrijus | nothingmuch: something about brain temperature. | ||
nothingmuch | but does my deduction of what runReader initInterp interpret [] | ||
make any sense? | |||
autrijus | nothingmuch: sure. | 12:35 | |
but it has nothing to do with laziness. | |||
the monadic functions are "boxed" on top of one another | |||
so they are just functions, not evaluated values | |||
runReaderT evaluates the topmost computation | |||
which runs the inner computation to yield the value it requires | 12:36 | ||
et cetera, like russian dolls | |||
so it doesn't matter if it's lazy or strict | |||
nothingmuch | so it's an inversion of the tree | ||
the AST | |||
and the reason that the computer doesn't explode is that it's lazy? | |||
autrijus | you can say that, yes | ||
no, you can do the same in perl. | |||
or any other strict language | |||
because monadic functions are only _composed_ | 12:37 | ||
nothingmuch | so why doesn't the computer explode | ||
autrijus | because it's just packing function pointers around | ||
there's no data involved | |||
at all | |||
so it's cheap | |||
svnbot6 | r4443, autrijus++ | * hw2005.txt - very random notes jotted down during the taxi drive to airport | 12:38 | |
scook0 | nothingmuch: looks like harrorth is coming along nicely | 12:39 | |
nothingmuch | scook0: except that autrijus has melted my brain, and now i'm trying to recover | 12:40 | |
scook0 | ah well | ||
I must get around to writing some Haskell one of these days... | 12:41 | ||
autrijus | nothingmuch: that is the result of your desire to actually understand how ReaderT works :) | ||
not that it's a bad thing... but most people just learns how to use it and stop at that | |||
scook0 | deeper understanding is always nice | 12:42 | |
autrijus | I didn't fully grok it either, yet I used it for ~3 months for openafp :) | ||
and I didn't trully grok it until I defined a new monad (SIO) and a new monad transformer (EvalT) | 12:43 | ||
scook0 | oh, the irc logger seems to be back up :) | ||
nothingmuch | autrijus: i think that my problem with haskell is that I didn't understand the details completely | 12:44 | |
so I didn't know how to use them properly | |||
autrijus | brb... | ||
nothingmuch | i am considering delaying the introduction of your patch into harrorth's tutorial chronology though | ||
autrijus | nothingmuch: sure. | ||
Limbic_Region | learning Haskell to me is akin to learning an alien (as in space) language | 12:50 | |
people typically learn stuff by building a bridge by relating stuff they already know to new stuff in steps until the gap has been bridged | |||
too foreign to me for that | |||
nothingmuch | going home early... woo! | 12:57 | |
svnbot6 | r4444, Aankhen++ | * small changes to HTTP::Message. | ||
nothingmuch | lets see if I grok Reader by the end of the day | ||
12:58
theorbtw1 is now known as theorbtwo
|
|||
kungfuftr | seen castaway? | 13:04 | |
jabbot | kungfuftr: castaway was seen 2 days 21 hours 55 minutes 53 seconds ago | ||
theorbtwo | kungfuftr: Castaway is on vacation. | 13:05 | |
She's in the south of france with her family :) -- SOs not invited :(. | 13:06 | ||
kungfuftr | theorbtwo: any idea for how long? | 13:07 | |
theorbtwo | Until the 9th. Then the next day she flies to the US with me. | 13:08 | |
We're going to have a funky schedule for a while... which sadly means that we can't start coordinating the move for a bit. | 13:09 | ||
svnbot6 | r4445, autrijus++ | * Incorporate Damian's review notes to the main text. | ||
theorbtwo | .oO(That was the info you were going for, right?) |
||
13:11
batdog|gone is now known as batdog
|
|||
kungfuftr | theorbtwo: *blink* what? | 13:12 | |
theorbtwo | kungfuftr: She got offered the job. | 13:19 | |
kungfuftr | oh right... | ||
kungfuftr has been away on holiday | |||
congrats to her! | |||
autrijus | ok, boarding time. | 13:20 | |
wish me a safe flight etc :) | |||
autrijus waves & | |||
kungfuftr | autrijus: have fun! | ||
clkao | autrijus: ciao! | ||
theorbtwo | autrijus: Safe flight! Have fun! | ||
xerox | autrijus, have fun fun fun! | 13:21 | |
theorbtwo | May you make mad fat hacks together with Leo! | ||
larsen | autrijus: have a good time :) | 13:22 | |
kungfuftr | theorbtwo: you be moving as well then? | 13:25 | |
theorbtwo | Yes! | 13:26 | |
kungfuftr | theorbtwo: beer must ensue! | 13:27 | |
theorbtwo | Indeed! | ||
Me wanting to move was actually a major motivation for Jess seeking a job. | |||
Now we need to figure out what to pack, and what to get rid of, and how to make the move, and how to get me a visa, and where we're moving too, and about a million other things. | 13:28 | ||
kungfuftr | theorbtwo: british/american ? | ||
theorbtwo | She's british, I'm american, yeah. | ||
kungfuftr | stop stealing our jobs! | ||
and women! | |||
=0) | |||
theorbtwo: if you need lists of where to get flats, etc. lemme know | 13:29 | ||
theorbtwo | I probably will. | 13:30 | |
It seems a bit early for that, though, since we won't be moving until September. | |||
kungfuftr | September!? | ||
theorbtwo | There's lots of notice to give, and getting me a visa before that would be difficult, and there's this vacation. | 13:31 | |
kungfuftr | theorbtwo: have you any irish heritage? | 13:32 | |
theorbtwo | A very little, possibly... why? | ||
kungfuftr | as long as great-grandparents were irish citizens, you can become an irish citizen, which allows you to become an EU citizen and therefore work in the UK | 13:33 | |
=0) | |||
iblech | autrijus: [evalbot's quotemeta bug] I fixed it a week ago or so, but it seems that the machine running evalbot still has the old evalhelper.p5 | ||
kungfuftr | which reminds me, need to renew my irish passport | ||
theorbtwo | Hm, I wonder if I can proove that. | 13:35 | |
kungfuftr | *shrug* will look up the details | ||
theorbtwo: www.irelandemb.org/fbr.html | |||
theorbtwo | I was planning to get an unmarried partner UK visa -- I can proove I've been with Jess two years in September. | ||
Ah, needs to be a grandparent, not great-grandparent, so no can do. | 13:38 | ||
kungfuftr | theorbtwo: it's great-grandparents (actually), but there's a few restrictions | 13:39 | |
such as the grandparent would have had to have their birth recorded with the Eire authorities | 13:40 | ||
thought it could be overseas | |||
iblech | Hm... Net::IRC is broken. | 13:59 | |
svnbot6 | r4446, iblech++ | mklivecd.pl -- Added hint about stripping pugs and parrot. | ||
arcady | apparently "map @list -> { stuff }" is supposed to be written as "map @list, -> { stuff }" | 14:35 | |
somehow, I think the comma shouldn't be required there | |||
iblech | @list -> { stuff } is (correctly) parsed as sub (@list) { stuff } | 14:36 | |
So there has to be something to disambiguate | 14:37 | ||
arcady | um... that's not correct | ||
I mean @list -> $i { stuff } | |||
the args of the pointy sub appear between the -> and the { | |||
iblech | D'oh! Of course | 14:38 | |
arcady | and in "for", it needs no comma | ||
this is confusing, I think | |||
crysflame | pugs livecd? | 14:39 | |
iblech | Jep. That's because for is on statement-level (there's no corresponding &foo, only a &statement:<foo>), while map is a regular function. | ||
crysflame: Yep. Pretty minimal ATM, though. Included is Pugs, its modules, Parrot, and sh, nothing else. | 14:40 | ||
crysflame | cool | ||
torrent? | |||
arcady | I should install pugs and parrot on my zaurus... | ||
iblech | HTTP, it's only 5 MiB or so :) | ||
crysflame | heh | ||
iblech | But wait a sec, I'll upload a recent version | ||
arcady | and what is the prototype of &map ? | ||
because for can be made a function with the same prototype | 14:41 | ||
iblech | crysflame: linide.sf.net/pugs-livecd-latest.iso (version from yesterday) | ||
arcady: Yep. The difference is that map has a return value (e.g. my @foo = map ... works), while for hasn't (my @foo = for ... is illegal, even) | 14:42 | ||
crysflame | sucking sound commences | ||
arcady | yeah | ||
iblech | arcady: And because for is statement-level, it can have extra syntactic support from the grammar | ||
arcady: Like dropping the "," | |||
crysflame | would be neat to overload for to have a return value of the @foo that was passed into it | 14:43 | |
modified or not | |||
arcady | in ruby it does have a return value | ||
in fact, everything there does, or almost everything | |||
but it wouldn't be too hard to change the grammar to not require the "," on map, would it? | 14:44 | ||
crysflame | what would break if such was done? | ||
iblech | Yep. You even wouldn't have to modify the grammar, you could use a macro with an appropriate "is parsed" trait, I think | 14:45 | |
arcady | no, really, what is the prototype of map? | ||
iblech, that is modifying the grammar... | |||
iblech | According to S29: multi sub Perl6::List::map (Code $expression : *@values) returns Lazy | 14:46 | |
arcady: Yep, but much more simple -- i.e. you don't create a new grammar which inherits from the original grammar and then overload some rules | |||
arcady | I suppose | 14:47 | |
and the map prototype is not right | |||
oh wait | |||
wolverian | wow that's a bizarre signature | 14:48 | |
arcady | okay, I think that's not working very correctly | 14:49 | |
theorbtwo | So you can use a , or a : between the list and the sub... but you've got to have something? | ||
wolverian | &code.map(@foo); # er. | ||
theorbtwo | Or that, wolverian. | ||
arcady | yeah, I'm talking about the "map(*@list, &code)" one | 14:50 | |
wolverian | theorbtwo: if that's the signature, you _have_ to have the : | ||
theorbtwo: , doesn't work | |||
(I think. I'm not sure about the MMD fallback mechanisms) | 14:51 | ||
arcady: map @list: &code; you mean? | |||
map ({1}): ({1}); # I wonder which one this dispatches to... | 14:52 | ||
(Assuming the special case of (one_element) creating a List) | |||
arcady | okay, but I can say "map 1,2,3, -> $x { $x+2 }" | 14:53 | |
wolverian | hmm. that doesn't dispatch to anything, then. | ||
arcady | ?eval map 1,2,3, -> $x { $x+2 } | ||
evalbot6 | pugs: cannot cast from VList [VInt 2,VInt 3,VCode (MkCode {isMulti = False, subName = "<anon>", subType = SubPointy, subEnv = Just (MkEnv {envContext = CxtSlurpy (mkType "Any"), envLValue = False, envLexical = MkPad {"$?1":=[(<ref>,<ref>)],"%_":=[(<ref>,<ref>)]}, envGlobal = <ref>, envPackage = "main", envClasses = Node {rootLabel = (mkType "Any"), subForest = [Node {rootLabel = (mkType "Void"), subForest = [Node {rootLabel = (mkType "Object"), subForest | ||
wolverian | ?eval map 1,2,3 : -> $x { $x+2 } | ||
evalbot6 | Error: unexpected "a" or "m" expecting program Only one invocant allowed | ||
Limbic_Region | ?eval map 1,2,3 -> $x { $x 2 } | 14:54 | |
evalbot6 | Error: unexpected ">" or "-" expecting operator, ",", ":", term postfix, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
Limbic_Region | heh - my plus symbol is broke | ||
arcady | ?eval map (1,2,3), -> $a { say $a } | ||
evalbot6 | Error: No compatible subroutine found: "&say" | ||
wolverian | that's pretty nonfunctioning | ||
Limbic_Region | ?eval map 1,2,3 -> $x { $x - 2 } | ||
evalbot6 | Error: unexpected ">" or "-" expecting operator, ",", ":", term postfix, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
wolverian | who broke pugs? :) | ||
Limbic_Region | dunno | ||
arcady | you need the comma! | ||
wolverian | ?eval (1,2,3).map(-> $x { $x - 2 }) | ||
evalbot6 | (-1, 0, 1) | ||
Limbic_Region | ?eval (1,2,3).map:{ $x - 1 } | 14:55 | |
evalbot6 | Error: Undeclared variable: "$x" | ||
wolverian | ?eval (1,2,3).map:{ $^x - 1 } | ||
evalbot6 | Error: unexpected ":" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
Limbic_Region | ?eval (1,2,3).map:{ $_ - 1 } | ||
evalbot6 | (0, 1, 2) | ||
wolverian | hmm right. really broken | ||
iblech | wolverian: ?eval "^" doesn't work in the old evalbot | ||
Limbic_Region | wolverian - you need to use $_ in that last one | ||
theorbtwo | ?eval map (1,2,3), {$^x-1} | ||
wolverian | iblech: old evalbot? | ||
evalbot6 | Error: unexpected "{" expecting "::", ":", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
Limbic_Region | I think | ||
theorbtwo | ?eval map (1,2,3): {$^x-1} | ||
evalbot6 | Error: unexpected "{" expecting "::", ":", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
theorbtwo | ?eval map (1,2,3): -> {$^x-1} | 14:56 | |
evalbot6 | Error: unexpected ">" or "-" expecting "::", ":", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
Limbic_Region goes back to $wrok | |||
svnbot6 | r4447, iblech++ | Net::IRC -- Quick fix to make it work again. | ||
theorbtwo | Hm. | ||
wolverian | Limbic_Region: not in perl6. evalbot/pugs might differ | ||
iblech | wolverian: Yeah. The machine running evalbot has an outdated evalhelper.p5, causing ^ to be (incorrectly) escaped. | ||
Limbic_Region | right - I missed the ^ | ||
wolverian | iblech: ah. can it be upgraded? :) | ||
Limbic_Region: oh, okay. | |||
iblech | wolverian: Of course, I fixed this bug a week ago or so :) But I don't have access to the machine it's running on. In fact, I even don't know on what machine it runs | 14:57 | |
wolverian | iblech: okay. | 14:58 | |
nothingmuch makes a large stupid smile | |||
after about 10 sessions of 10 minutes, and one session of about an hour of thought, I think I figured out the reader monad | |||
wolverian | hmm. is there any need for a POE-style framework in perl6? | ||
nothingmuch | wolverian: yes, but It won't be like POE, i think | 14:59 | |
it will define far less than POE | |||
wolverian | right. | ||
that's what I'm thinking too. | |||
yield for =<>; # :) | 15:01 | ||
iblech | I'd like POE6 to make more use of continuations and coroutines, so I can write code like "my $input = post($wheel, "read")" -- post() should be some kind of magic sub which returns to POE's event loop and resumes execution of my sub when the event finished | ||
Right now, you have to define many callback events | 15:02 | ||
nothingmuch | =) | ||
wolverian | iblech: you mean $wheel.post("read"), right? | ||
:) | |||
anyway, that's pretty trivial really, if we have callcc | 15:03 | ||
iblech | Yeah. Or POE::Kernel.post($wheel, "read"), or whatever it'd be called :) BTW, assuming $wheel.post("read") will work, then post($wheel, "read") will work, too, thanks to MMD | ||
wolverian | I thought you'd need ($wheel : "read") | 15:04 | |
nothingmuch | how does POE actually yield, btw? | 15:05 | |
is it recursive? | |||
wolverian | POE doesn't yield. | ||
nothingmuch | doesn't it have a yield() function? | ||
wolverian | right, but that's not coroutines, if you meant that | ||
nothingmuch | if so, ignore my comments, i was under the assumption that it emulates cooperative multithreading in p5 | ||
iblech | I'm not 100% sure, but IIRC $obj.method($arg), method $obj: $arg, and method($obj, $arg) all do the same thing (the first two directly dispatch to $obj, the last one uses MMD to find the correct codevar) | 15:06 | |
wolverian | iblech: ah, okay. | ||
nothingmuch: $kernel->yield($event, @args); is just a regular call. so yes, recursive. | 15:07 | ||
(yield() is just a shorthand for post($current_session, ...) | 15:08 | ||
s,$,), | |||
nothingmuch | so yield goes to the dispatcher, and it decides which component to give time to? | ||
how does it return to the yield? does it have to let all the thins that were started in the mean while finish? | |||
wolverian | yes. | ||
Events posted with yield() must propagate through POE's FIFO before they're dispatched. This effectively yields timeslices to other sessions which have events enqueued before it. | |||
(perldoc POE::Kernel) | |||
iblech | nothingmuch: yield() returns (almost) immediately, the event queue is only processed when the current even handler returns | 15:09 | |
wolverian watches iblech and perldoc fight | |||
iblech | :D | ||
nothingmuch | i need to read it's source | ||
wolverian | "its" | ||
iblech: so it yields to other sessions? | 15:10 | ||
nothingmuch | okay okay | ||
wolverian | if there are no other sessions, the current event handler is at the top of the queue, naturally | ||
nothingmuch | iblech: so how is time sliced between sessions? | ||
iblech | wolverian: Yep, but the event "call this event in that session" is not called until it's first in POE's FIFO | 15:11 | |
wolverian | iblech: right, but the $event that you yield() isn't put to the top of the FIFO | 15:12 | |
svnbot6 | r4448, iblech++ | Added a new pugsbugs test testing for the bug which caused Net::IRC to stop | ||
r4448, iblech++ | working (t/pugsbugs/parsing_lexical_code_vars.t). | |||
wolverian | iblech: to me that seems like the FIFO must be processed first | ||
but I'm not a POE expert by any means :) | |||
iblech | nothingmuch: POE::Kernel has a runloop which calls event handlers. During the execution of an event handler, POE's runloop does (of course) not run. You can queue in a new event by calling POE::Kernel->post or POE::Kernel->yield. These put the info "call event foo in session bar" on POE's FIFO | 15:13 | |
wolverian: Yep, you're right. | |||
nothingmuch | ooh! | 15:14 | |
i get it | |||
so when the current session finishes it's call, then all the things it yielded get run fifo order | |||
iblech | wolverian: yield() and post() only push to the FIFO, they never unshift it | ||
nothingmuch | much simpler than I thought | ||
iblech | nothingmuch: Yep, exactly | ||
nothingmuch hasn't followed the reduce metaoperator on empty list thread | |||
is it going to be as flexible as foldr? | 15:15 | ||
wolverian | it's more flexible. | ||
nothingmuch | is the identity value only going to be used if there's only 1 element? | ||
wolverian | or rather - it has different semantics. | ||
nothingmuch: no. it's used whenever you provide the :initvalue adverb. | |||
(or :identvalue.) | |||
nothingmuch | when you don't provide it? | 15:16 | |
iblech | I like Juerd's explanation on [...] best -- [...] is simply a join($operator, $args) on the syntax level. So "[+] 3" means "3" and "[+] 1,2,3" means "1 + 2 + 3" | ||
wolverian | then there is no identity value | ||
and a reduce on a zero length list fails | |||
nothingmuch | okay | 15:17 | |
wolverian | iblech: at least if the operator is defined as a listop | ||
well. it's like that in any case. | |||
iblech | Yep. | ||
nothingmuch | makes sense =) | ||
theorbtwo | wolverian: You mean if it's /not/ defined as a listop. | ||
If it is defined as a listop, it'd possible be called with a zero-length list. | |||
wolverian | (it's just that whether it's a fold or a real reduce depends if the op is a listop or a binary op) | ||
theorbtwo: yes, but that's not the semantics Larry wants. | 15:18 | ||
theorbtwo | OK. | ||
wolverian | (according to the post he just sent to p6l.) | ||
theorbtwo bows to the wisdom of the Larry. | |||
wolverian | it makes sense to me. and you can always do &precircumfix:<[ ]>.=assuming(:initvalue); | 15:20 | |
Limbic_Region just finished reading it | |||
wolverian loves .= | |||
osfameron | what does .= do ? | 15:21 | |
iblech | inplace method call | ||
@foo .= bar() is equivalent to @foo = @foo.bar | |||
wolverian | foo .= bar; is the same as foo = foo.bar; | ||
just like +=, -= etc | |||
iblech | (but foo is evaluated only once) | ||
osfameron | eeek, doing that on a method is quite scary | 15:22 | |
does it work? | |||
iblech | And quite useful: @array .= sort:{...}; @array .= map:{...} etc | ||
wolverian | one has to remember that @array .= map:{ s/foo/bar/ }; is redundant, though | 15:23 | |
nothingmuch | how do you apply precircumfix ... to an op? | ||
wolverian | unless map:{ } really does copy by default | ||
iblech | @array .= uniq; $string .= lc; $num .= abs | ||
nothingmuch | &precircumfix:<[ ]>.=assuming(:initvalue).(&infix:<+>, @list)? | ||
wolverian | which is horrible efficiency-wise | ||
nothingmuch: the .= modifies the &precircumfix.<[ ]>, so all calls after that to it will use :initvalue | 15:24 | ||
nothingmuch | oh, i didn't notice! | ||
wolverian | &precircumfix:<[ ]>.=assuming(:initvalue); say [*]; # doesn't fail | ||
iblech | IIRC, in Pugs, it's readwrite | ||
nothingmuch | you are crazy | ||
osfameron | so you can assign to a sub, you don't need to bind? | ||
wolverian | hmm, good point. I have no idea. :) | ||
$foo = @bar; $foo = @baz; # doesn't modify @bar | 15:25 | ||
osfameron | otherwise .:= ? | ||
wolverian | I don't know. | ||
iblech | I think so. But binding is ok, too | ||
osfameron | the wheeled cannon operator | ||
wolverian | someone could run that by p6l :) | ||
since for normal values, assigning to the ref doesn't modify the original value | |||
does it do so for subs? | 15:26 | ||
iblech | IIRC, &foo in "my &foo" is no longer a real reference, so it'll work | ||
wolverian | is it specced? | ||
iblech | (But the $foo in "$foo = &foo" is) | 15:27 | |
Not sure | |||
But I'm pretty sure of that, and it matches the behaviour of @ and %: my @a = (...); @a = (...); # changes @a, my %a = (...); %a = (...); # changes %a, my &a = {...}; &a = {...}; # should change &a | 15:28 | ||
wolverian | good point. | ||
so &a isn't a ref at all, but a container | |||
iblech | Yep, I think so. | 15:29 | |
wolverian | that's a bit odd. then arrays can hold subs and refs. :) | ||
osfameron | ooo, lovely javascripty goodness | ||
wolverian | (which doesn't make sense since &foo isn't a vector container) | 15:30 | |
(s,vector,plural,) | |||
iblech | But, binding, especially compile-time binding is useful, too: my &infix:<plus> ::= &infix:<+> (creates the "plus" operator at compile-time) But: my &infix:<plus> = &infix:<+> will only work in eval()s | ||
I think the types will still be enforced, so @foo can only hold things which are Arrays | 15:31 | ||
Similarily for % (Hash) and & (Code) | |||
wolverian | no, I didn't mean that | ||
I meant that you can store a Sub directly into @foo then | 15:32 | ||
which would make it equivalent with a Scalar | |||
@foo.push({ ... }); # doesn't push a ref | |||
iblech | Meant that too (I think). And I think that won't work, as a Code is not an Array. So a @-container always has to point (point in the internal sense, not meant as a reference) to an Array (but of course an Array can hold Any) | 15:34 | |
wolverian | my @foo; @foo.push({...}); # now @foo holds a Code | ||
oh, can Arrays hold Any now and not just Refs? | 15:35 | ||
(or Scalars) | |||
iblech | Yeah. @foo then contains one elem, a Code reference. But @foo still isa Array. | 15:38 | |
wolverian | yes. | ||
I didn't mean that you could change that! | |||
iblech | No, I should have better said Scalar of Any or somesuch | 15:39 | |
wolverian | I just meant that it feels odd to me - as a perl5 coder - that there would be another scalar type besides ref (and scalar) that an array can hold | ||
iblech | ah :) | ||
iblech understands | |||
wolverian | :) | ||
iblech | The {...} which is pushed to @foo is a Code *reference* | ||
But the &foo in "my &foo = ..." is not, this &foo is an actual value | 15:40 | ||
wolverian | hmm. okay. | ||
that's subtly weird in its own way, too, since &foo isn't a plural container | |||
like %foo is | |||
(or @foo) | |||
iblech | Yeah, but $foo is a scalar container, too | 15:41 | |
wolverian | right, and I'm used to having only one scalar container :) | ||
(that is, scalar) | |||
(er, Scalar. or so.) | |||
iblech | :) | ||
nothingmuch thinks of writing a p5 obfu with an implementation of monads | |||
especially this scary reader monad | |||
i'll call it "Whither do notation" | 15:42 | ||
iblech | :D | ||
And you even wouldn't have to obfuscate it syntax-wise ;) | |||
theorbtwo | nothingmuch: Source filter that converts ; to >>=, and an overload that makes >>= do something funky? | 15:43 | |
nothingmuch | iblech: did you try to understand how Reader works? | ||
i think I need a metaphor for it | |||
i think i finally understood how it works | |||
theorbtwo: no, the opposite.. I'll define >>=, (non circumfix, mind you) | |||
sorry, non infix | |||
theorbtwo | Non-infix? | ||
nothingmuch | and local, and ask | ||
theorbtwo | Can perl 5 do that? | ||
nothingmuch | yes | ||
bind(sub { }, sub { }); | |||
err, sorry | 15:44 | ||
bind($result, sub { }) | |||
theorbtwo | Oh. | ||
I meant actually naming it >>=. | |||
(Bitshift right and assign.) | |||
wolverian | theorbtwo: >>= is a numeric bitshift assignment already, so you can just override it. | ||
iblech | nothingmuch: [understanding of Reader] Thanks to your conversations with autrijus, I think I got it mostly :) | ||
nothingmuch | oh no, that's too much info | ||
theorbtwo | wolverian: Yes, but that's infix; he specified non-infix. | 15:45 | |
nothingmuch | iblech: what I see it doing is the first call to >>= creates a function | ||
wolverian | oh. that won't work. :) | ||
iblech | And BTW, nothingmuch, you might want to look into examples/functional/monads.p6 | ||
nothingmuch | it contains the first doExp | ||
on the left hand, if you will, and the rest on the right side | |||
this is returned | |||
then runReader (this thing) initInterp takes the new interp | |||
and hands it to the function it got out of (this thing) | 15:46 | ||
and that function takes the interp, and passes it to the lambda that was generated on the right side of >>= | |||
iblech | Makes sense | ||
nothingmuch | that is, the doExp, and then this thing's result is unwrapped, and fed into the right side | ||
that is, the next thing in the do notation | |||
so it's just chained | 15:47 | ||
but the interesting part is how the chain starts | |||
basically | |||
op :: Reader x | |||
op | |||
generates a lambda | |||
runreader (op) value | 15:48 | ||
is a bit like saying | |||
op value | |||
if it were not in the reader monad | |||
autrijus: when you backlog, please verify | |||
iblech: monads.p6 is cool, but i grokked the IO monad a long time ago | 15:52 | ||
like, yesterday, or the day before | |||
iblech | :) | ||
nothingmuch | see chapter 4 of harrorth =) | ||
iblech | 217.12.145.3: m19s28.vlinux.de/iblech/pugs/livecd.iso is very outdated. The most recent version is at linide.sf.net/pugs-livecd-latest.iso | 15:59 | |
theorbtwo wonders if people have played with %CALLER::, and found problems with it, yet. | 16:01 | ||
ninereasons | m | 16:06 | |
^H^H^H^H | 16:07 | ||
^H | |||
^H^H^H^H^H^H^H | |||
^H^H^H^H^H | |||
^H^H^H^H^H^H^H^H^H^H^H^H | |||
^H | |||
it | |||
nothingmuch | terrorist | 16:08 | |
ninereasons | that was odd. sorry about the gibberish. | 16:10 | |
SamB | yes, quite odd. A lot of U+007Fs... | 16:35 | |
svnbot6 | r4449, ninereasons++ | motd.p6, motd-i.p6: these pointy subs now seem to require parens | 16:43 | |
Limbic_Region | there is a Code type? | 16:45 | |
where should I have read that? | |||
iblech | L<S06/"Types"> | 16:47 | |
In S06 there's a nice graph of the Code hierarchy, too | |||
Limbic_Region | well - with signature type checking raising complaints - it probably would have made some of my code a lot easier | 16:48 | |
IOW - if I have an optional parameter that is supposed to be a code reference | |||
I don't need to see if it is defined AND if it .does(CODE) | |||
btw - does Pugs do any type checking yet? I remember it didn't a while ago | 16:49 | ||
err - WRT sub signatures that is | |||
iblech | ?eval sub a(Code $x) { 42 } a(42); # Still doesn't, I think | 16:50 | |
evalbot6 | 42 | ||
iblech | Yep, not yet implemented | 16:51 | |
gaal | nothingmuch: sleepingsquirrel.org/monads/monads.html # "Monads in Perl" | ||
wolverian | I'd use &x :) | 16:52 | |
Limbic_Region | oooh - all kinds of want.method tests I think I should add | 16:53 | |
wolverian | please do! | ||
Limbic_Region++ | 16:54 | ||
Limbic_Region | going to have to wait until tonight though - just read perlmonks.org/index.pl?node_id=464022 | ||
want.count is unimplemented | |||
as apparently is want.Void | 16:55 | ||
currently providing incorrect behavior | 16:58 | ||
at least as I understand it | |||
perlbot nopaste | 16:59 | ||
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 "want should be a number not a junction" (8 lines, 106B) at sial.org/pbot/10819 | ||
gaal | L~R, if you've got tuits, tests for caller are welcome too ;-) | 17:00 | |
i however must prepare a lecture for $work tomorrow... | |||
oh! also, tests for %SIG | |||
%*SIG even. | 17:01 | ||
Limbic_Region | heh - one thing at a time | ||
gaal | :) | ||
Limbic_Region | these won't happen until tonight anyway | ||
gaal | yeah, i shouldn't really be #perl6ing, myself :) | ||
iblech | Limbic_Region: sial.org/pbot/10819 does not output junctions here | 17:02 | |
Limbic_Region | really | 17:04 | |
Limbic_Region wonders how old his Pugs is | |||
6.2.6 - so that's a good sign | |||
wolverian | neither on feather. | 17:05 | |
Limbic_Region | perhaps I should see if Jonathan has updated the binary build | ||
wolverian | returning List (Any) instead. | ||
iblech | Yep, here it outputs List (Any), too | ||
Limbic_Region uncrosses his eyes and sees that List (Any) is not any(LIST) | 17:06 | ||
ok - well it is still wrong output | |||
wolverian | where is want specced? | 17:07 | |
S06? | |||
Limbic_Region | yes | ||
although A06 goes in a bit more details | |||
wolverian | hmm. | 17:08 | |
my $foo = { want }(); gives some pugs internal things. | |||
I think. | |||
(mkType?) | |||
Limbic_Region | wolverian - I am reading the part of A06 that says "The want value can simply be used as a number:" | 17:11 | |
if want >= 2 { return ($x, $y) } # context wants >= 2 values | |||
or explicitly, want.count | |||
wolverian | right. but only in numeric context. | 17:12 | |
theorbtwo | Sadly, we don't have overridable stringification or nummification of general objects. | 17:13 | |
Limbic_Region | yeah - but it isn't in Pugs ATM | ||
wolverian | well that's why it didn't work :) | ||
wolverian wondered for a second | |||
Limbic_Region | or so I was lead to believe by that thread I referred to | ||
theorbtwo | Well, you can do it by giving it it's own class. | ||
wolverian | given want { yield when Desperate } | 17:14 | |
wolverian hums | |||
theorbtwo | But you can't implement it as a method, because doing it that way creates circular dependencies. | ||
Limbic_Region | theorbtwo - I am not at all concerned about implementation | 17:15 | |
svnbot6 | r4450, iblech++ | Added an experimental POE module (ext/POE). | ||
Limbic_Region | I read the spec, notice it missing or deficient, write the test(s) - and let someone else worry about implemenation | ||
wolverian | hmm. what kind of? | ||
integral | ooh, a POE for perl6 interesting. | ||
Limbic_Region | of course, if I ever make it past chap 4 of YAHT, I might start implementing stuff too | 17:16 | |
integral | iblech: have you talked to the perl5 POE folks about a perl6 version? | ||
mrborisguy | ?eval my @a=(0,1); if 1 == any( @a ) { say "yes" } else { say "no" } | 17:19 | |
evalbot6 | Error: No compatible subroutine found: "&say" | ||
mrborisguy | woah, didn't expect that... | 17:20 | |
?eval my @aoa=([0,1],[0,1]); if 1 == any( @aoa[0] ) { say "yes" } else { say "no" } | |||
evalbot6 | Error: No compatible subroutine found: "&say" | ||
integral | it's run in safe mode by the bot, so there's no &*SAY | ||
err, &*say | |||
wolverian | use the return value. | 17:21 | |
mrborisguy | okay, so that's not working. anyway, i have a question. the first line gives me "yes", but the second line gives me "no" | ||
wolverian | (just remove the 'say') | ||
Limbic_Region | missing semicolons | ||
mrborisguy | ?eval my @aoa=([0,1],[0,1]); my @b = @aoa[0]; if 1 == any( @b ) { "yes" } else { "no" } | 17:22 | |
evalbot6 | 'yes' | ||
mrborisguy | why can't i use any( @aoa[0] ) ? | ||
wolverian | ?eval 1 == any ([0,1],[0,1])[0] | ||
evalbot6 | (bool::false) | ||
Limbic_Region | ?eval my @a=(0,1); if 1 == any( @a ) { say "yes"; } else { say "no"; } | ||
evalbot6 | Error: No compatible subroutine found: "&say" | ||
Limbic_Region | hmmm | 17:23 | |
mrborisguy | ?eval my @a=(0,1); if 1 == any( @a ) { "yes" } else { "no" } | ||
evalbot6 | 'yes' | ||
Limbic_Region | say is unsafe | ||
wolverian | yes, we already realised that :) | ||
?eval ([0,1],[0,1])[0] | |||
evalbot6 | \(0, 1) | ||
wolverian | right, it's a ref. | ||
Limbic_Region | sorry - was thinking that it was a missing ; issue | ||
which I have seen elsewhere | |||
wasn't paying attention to your discovery | |||
wolverian | Limbic_Region: ah, okay. | ||
Limbic_Region | which makes a whole lot of sense | ||
wolverian | hmm. so how do I deref the array inline? | 17:24 | |
mrborisguy | can i make it a list somehow? i tried any( list @aoa[0] ), but that didn't seem to work either | ||
wolverian | mrborisguy: that just makes a list of one element - the arrayref | ||
mrborisguy | so i have to make a new list then? my @b = @aoa[0]; any( @b ) ? | 17:25 | |
it doesn't seem like i should have to do that | |||
wolverian | oh. * | ||
mrborisguy | is there a better way? | ||
Limbic_Region | ** | ||
wolverian | ?eval *([0,1],[0,1])[0] | ||
evalbot6 | (0, 1) | ||
wolverian | * is enough here, thanks. :) | ||
Limbic_Region was attempting to be funny | |||
wolverian | ?eval 1 == any *([0,1],[0,1])[0] | 17:26 | |
evalbot6 | (bool::false | bool::true) | ||
wolverian | there we go. | ||
mrborisguy | sweet | ||
thanks! | |||
wolverian | you're welcome! | ||
mrborisguy | ?eval my @aoa=([0,1],[0,1]); if 1 == any( *@aoa[0] ) { "yes" } else { "no" } | ||
evalbot6 | 'yes' | ||
mrborisguy | good thing i asked, i almost thought it was a bug/unimplimented | 17:27 | |
Limbic_Region | ?eval my $foo = all(1..10); $foo.pick; | 17:35 | |
evalbot6 | undef | ||
Limbic_Region | ?eval my $foo = any(1..10); $foo.pick; | ||
evalbot6 | 1 | ||
Limbic_Region | does that strike anyone else as odd? | ||
wolverian | I'm not sure. | ||
?eval (1..10).pick | |||
evalbot6 | 6 | ||
wolverian | just do that? :) | ||
iblech | integral: re. No, it's just a very, very simple experiment. I'd be happy if someone with knowledge of POE internals does a real POE port :) | 17:36 | |
mrborisguy | you would think you should be able to pick from an any or an all though... | ||
wolverian | how about none? | ||
none(1..10).pick | |||
er | |||
?eval none(1..10).pick | |||
evalbot6 | undef | ||
wolverian | that does make sense to me | ||
and rankly, so does the all() behaviour | |||
iblech nods | 17:37 | ||
mrborisguy | wouldn't that be the same as (1|2|3|4).pick ? | ||
(for the any case) | |||
wolverian | yes. | ||
mrborisguy | (and obviously out to 10 instead of 4) | ||
wolverian | (and that works.) | ||
mrborisguy | ?eval (1|2|3).pick | ||
evalbot6 | 1 | ||
mrborisguy | ?eval (1|2|3).pick | ||
evalbot6 | 3 | ||
wolverian | as you can see. :) | ||
mrborisguy | i'd say write a test then | ||
?eval (1&2&3).pick | |||
evalbot6 | undef | ||
wolverian | is .pick specced? | 17:38 | |
mrborisguy | what exactly does it mean for something to be 'specced' | ||
if it's in any(<A E S>)? | |||
wolverian | yes. | 17:39 | |
any<A E S> works too, by the way :) | |||
mrborisguy | i think i read it in there, then... that really points you in a good direction, huh? | ||
wolverian | heh. | ||
mrborisguy | really? i'll have to remember that | ||
it's just a learning day for me then! | 17:40 | ||
svnbot6 | r4451, ninereasons++ | motd: change tabs to spaces for consistency. remove artifacts of earlier experiments, and improve the perl-6ishness somewhat | ||
ninereasons | hmm. POE has landed. | 17:44 | |
wolverian | hmm? | ||
ninereasons | class MySession is POE::Session { ... } | 17:46 | |
integral | it would be interesting to implement POE::Session as a perl metaclass | 17:47 | |
ninereasons | another iblech++ useful port | 17:48 | |
wolverian | hmm. that is nice. | 17:49 | |
doesn't use continuations though :( | |||
iblech | Note though that's only a small experiment, not a full port yet | ||
ninereasons | noted :-) | ||
iblech | wolverian: Yep. I tried a bit in interactive Pugs, but there &?CALLER_CONTINUATION didn't seem to work, or at least not in the way I thought it should work | 17:50 | |
integral | there's some bugs with that :-) | ||
wolverian | iblech: right. :) | ||
Aankhen`` | iblech++ # POE | 18:12 | |
svnbot6 | r4452, Aankhen++ | * HTTP::Message -- realised that hashes can be specified in signatures. | ||
r4452, Aankhen++ | * HTTP::Message -- added C<returns Foo> wherever applicable. | |||
Juerd | iblech: Unfortunately, it's made much more complex :( | 18:14 | |
iblech: And I really don't agree that reduce with an empty list should ever be able to fail. | |||
Aankhen`` | Is there any equivalent to localtime() that I can use for now? | 18:18 | |
Juerd | Aankhen``: `date`? :) | 18:23 | |
webmind | oi | 18:24 | |
mrborisguy | eval_perl5( localtime() ) ? # without really knowing what you're looking for | ||
PerlJam | Aankhen``: you could just implement localtime() :-) | 18:25 | |
18:30
khisanth_ is now known as Khisanth
|
|||
iblech | Aankhen``: Yeah, implement it :) Adding the op is not very hard (I could guide you, I think), but I don't know about Haskell's calendar routines | 18:30 | |
Aankhen`` | The only problem is that I dunno any Haskell... | 18:33 | |
Oh, and Juerd: *** No compatible subroutine found: "&date" | 18:35 | ||
iblech | I didn't, either, before I started hacking Pugs :) Anyway, localtime() is unspecced ATM and IIRC the plan is that localtime() and gmtime() should be substituted by a clever result object from time(). | 18:36 | |
Aankhen`` | Ah. | ||
iblech | (So one can do time().hour or somesuch) | 18:37 | |
Aankhen`` | I wouldn't mind that... I just need something that'll help port Time::Local and thereby HTTP::Date, which will perhaps let HTTP::Headers work. :-) | ||
theorbtwo | haskell.org/ghc/docs/latest/html/li...lendarTime | 18:42 | |
mrborisguy | ?eval my @a = (1); sub modify( @in is copy ) { @in[ 0 ] = 7; } modify( @a ); @a; | 18:49 | |
evalbot6 | [1] | ||
mrborisguy | say my @aoa = ([1]); sub modify( @in is copy ) { @in[0][0] = 7; } modify( @aoa ); @aoa; | ||
?eval my @aoa = ([1]); sub modify( @in is copy ) { @in[0][0] = 7; } modify( @aoa ); @aoa; | |||
evalbot6 | [[7]] | ||
mrborisguy | is that what should happen? | 18:50 | |
i thought my @in was a copy, so i shouldn't be able to modify it, right? even though it's a somewhat deep modification? | |||
iblech_ | There was some discussion about that on p6l, but I don't recall the decision... | 18:52 | |
mrborisguy | oh, i'll look for it then | ||
you have a general idea of how long ago it was? | 18:54 | ||
iblech_ | Some months, I think. Try to search for Perl6::Subs and Chip | ||
18:54
iblech_ is now known as iblech
|
|||
iblech | (Chip implemented the Perl 6 sub definition syntax in Perl 5, releasing it as Perl6::Subs on CPAN. Then he asked how deep "is copy" and "is rw" are) | 18:55 | |
knewt | ok, that's more like it. the only non-localhost port i've got open on my laptop now is ssh. will feel better out at the apw now | 18:56 | |
mrborisguy | can i search on nntp somehow? groups.google.com is blocked at my work | ||
obra | nntp.x.perl.org? | 18:57 | |
mrborisguy | (www.nntp.perl.org) | ||
knewt | gmane is pretty good for most stuff | ||
mrborisguy | well, time to go play poker again | 19:10 | |
19:20
kcwu_ is now known as kcwu
|
|||
svnbot6 | r4453, iblech++ | * New pugsbugs test: t/pugsbugs/return_in_anonymous_subs.t | 19:27 | |
r4453, iblech++ | * Added note about POE in ChangeLog | |||
wilx | So...what version of hs-plugins do I neet for Pugs? | 19:33 | |
theorbtwo | wilx: A daily. | 19:37 | |
wilx | Ok. | 19:41 | |
Hmm, how healthy is gmake check of hs-plugins? | 19:53 | ||
What tests are expected to fail? | |||
theorbtwo | No idea. | 19:54 | |
fnord123 | Hey all. What is the golf part of pugs for. | 20:14 | |
theorbtwo | fnord123: Fun. | 20:15 | |
fnord123 | fun as in "what should we make G stand for?" or fun as in there is actually some golf game here that i dont see | 20:16 | |
Limbic_Region | fnord123 - the face of pugs has changed dramatically in the little over 4 months it has been around | 20:17 | |
theorbtwo | Oh, in the name? | ||
Limbic_Region | right | ||
it was a play on words | |||
hugs | |||
theorbtwo | (The haskell users' golfing system) | 20:18 | |
fnord123 | oh ok | ||
Limbic_Region | fnord123 - there are several golf examples though btw | ||
svn.openfoundry.org/pugs/examples/golf/ | |||
fnord123 | because hugs was written in scotland, i presume | ||
is perl golf some kind of 'one liner' game? | 20:20 | ||
Limbic_Region | fnord123 - golf is a game of skill and fun | ||
a problem is presented (usually with some rules and restrictions) | |||
and the contest is to solve the problem in the fewest strokes as possible | 20:21 | ||
where strokes refers to keystrokes not swings | |||
geoffb | hola | ||
Limbic_Region | salutations | ||
geoffb | Not that I'm telling anybody here anything new, but budgets can take a LOT of time to create | ||
Limbic_Region | there are many many many examples of golf around in various different languages | ||
theorbtwo | examples/golf and t/golf contain perl6 golf. | 20:23 | |
geoffb | Golf is a game that I can do decently at, but never win, because I just can't bring myself to strangle the interpreter quite that much. | ||
:-) | |||
Limbic_Region isn't a very good golfer nor is he very good an obfusication | |||
theorbtwo | Nor am I, Limbic. | 20:24 | |
geoffb | Every part of me that's into maintainable code just screams "DEAR GOD NO!!!" from every corner of my cranium. | ||
theorbtwo | Exactly, geoffb. | ||
theorbtwo needs something to hack on now. | |||
geoffb | That said, some of the winning golf entries I've seen have been beautiful in their brilliance. | ||
ninereasons | theorbtwo, actually hugs has something to do with gofer, not golfing | ||
mj41 | ?eval { 'a' !~ rx:perl5{a} } | ||
evalbot6 | bool::true | 20:25 | |
Limbic_Region | the most obfu thing I ever wrote was purely accidental | ||
perlmonks.org/index.pl?node_id=384885 | |||
mj41 | ?eval { 'a' ~~ rx:perl5{a} } | 20:26 | |
evalbot6 | MkMatch {matchOk = True, matchFrom = 0, matchTo = 1, matchStr = "a", matchSubPos = [], matchSubNamed = {}} | ||
geoffb | Trying to deeply understand the code in BASIC Computer Games and More BASIC Computer Games when I was a kid pretty much ended any desire I ever had to be obfuscated. | ||
Limbic_Region notes the time and heads homewards | 20:27 | ||
geoffb | I still don't have any idea how some of that code worked | ||
21:06
khisanth_ is now known as Khisanth
|
|||
mj41 | ?eval { sub a { say '1'; } sub a { say '2'; } a(); eval qq| sub a { say'3'; }|; a(); } | 21:24 | |
evalbot6 | Error: No compatible subroutine found: "&say" | ||
geoffb | mj41, it will automatically print whatever your code returns, but say is not allowed | 21:26 | |
mj41 | ?eval { my $s = ''; sub a { $s ~= '1'; } sub a { $s ~= '2'; } a(); eval qq| sub a { $s ~= '3'; }|; a(); $s; } | 21:27 | |
evalbot6 | \'232' | ||
mj41 | ?eval { my $_ebs = ''; sub say ( $str ) { $_ebs ~= "$str\n"; } sub print ( $str ) { $_ebs ~= $str; } sub a { say '1'; } sub a { say '2'; } a(); eval qq| sub a { say'3'; }|; a(); $_ebs; } | 21:31 | |
evalbot6 | \'2 3 2 ' | ||
mj41 | ?eval { my $_ebs = ''; sub say ( $str ) { $_ebs ~= "$str\n"; } sub print ( $str ) { $_ebs ~= $str; } sub a { say 1; } sub a { say 2; } a(); eval 'sub a { say 3;'; a(); $_ebs; } | 21:36 | |
evalbot6 | \'2 2 ' | ||
mj41 | ?eval { sub a { 4; }; a(); } | 21:37 | |
evalbot6 | 4 | ||
mj41 | ?eval { my $_ebs = ''; sub say ( $str ) { $_ebs ~= "$str\n"; } sub print ( $str ) { $_ebs ~= $str; } sub a { say '1'; } sub a { say '2'; } a(); eval qq| sub *a { say '3'; }|; a(); $_ebs; } | 21:50 | |
evalbot6 | \'2 3 2 ' | ||
mj41 | ?eval { my $_ebs = ''; sub say ( $str ) { $_ebs ~= "$str\n"; } sub print ( $str ) { $_ebs ~= $str; } sub a { say 1; } sub a { say 2; } a(); eval 'sub *a { say 3;'; a(); $_ebs; } | ||
evalbot6 | \'2 2 ' | ||
mj41 | ?eval { my $_ebs = ''; sub say ( $str ) { $_ebs ~= "$str\n"; } sub print ( $str ) { $_ebs ~= $str; } sub a { say 1; } sub a { say 2; } a(); eval 'sub *a { say 3;}'; a(); $_ebs; } | 21:51 | |
evalbot6 | \'2 3 ' | ||
mj41 | ?eval { my $_ebs = ''; sub say ( $str ) { $_ebs ~= "$str\n"; } sub print ( $str ) { $_ebs ~= $str; } sub a { say 1; } sub a { say 2; } a(); eval 'sub a { say 3; }'; a(); $_ebs; } | 21:52 | |
evalbot6 | \'2 2 ' | ||
PerlJam | Does the evalbot respond to msg? | ||
mj41 | ?eval { my $_ebs = ''; sub say ( $str ) { $_ebs ~= "$str\n"; } sub print ( $str ) { $_ebs ~= $str; } eval 'sub *a { say 3; }'; a(); $_ebs; } | 21:59 | |
evalbot6 | \'3 ' | ||
mj41 | ?eval { my $_ebs = ''; sub say ( $str ) { $_ebs ~= "$str\n"; } sub print ( $str ) { $_ebs ~= $str; } eval 'sub *a { say 3; }; a();' $_ebs; } | 22:00 | |
evalbot6 | Error: unexpected "$" expecting operator, postfix conditional, postfix loop, postfix iteration, ";" or "}" | ||
vcv-- | ?eval 1 x 'a' | ||
evalbot6 | '' | ||
vcv-- | ?eval 'a' x 5 | 22:01 | |
evalbot6 | 'aaaaa' | ||
geoffb sinks into newly purchased Aeron -- not bad . . . | 22:12 | ||
nothingmuch | darcs pull harrorth | 22:40 | |
therein is explained the wonders of the Reader monad | |||
in the chaotic chapter 6 | |||
which will be cleaned up tomorrow | 22:41 | ||
autrijus: feather.perl6.nl/~nothingmuch/harro...oc/06.kwid | |||
nothingmuch would really appreciate people who are trying haskell, but not really "getting" it to read through the harrorth tutorial, and see if it helps | 22:43 | ||
geoffb | nothingmuch, you should consider adding harrorth to READTHEM | 22:50 | |
nothingmuch | geoffb: patches welcome. I need to go sleep ;-) | 22:51 | |
actually, this isn't so much of an effort, i can do it | |||
geoffb | heh | 22:52 | |
nothingmuch | there | 22:55 | |
everyone feel free to rephrase the premise, i'm not good at that sort of stuff | 22:56 | ||
geoffb++; # thanks for the suggestion | |||
ciao! | 22:57 | ||
svnbot6 | r4454, nothingmuch++ | Harrorth in READTHEM | ||
23:02
batdog is now known as batdog|gone
23:15
misc is now known as JoeFox,
JoeFox is now known as misc
|
|||
mj41 | wiki.kn.vutbr.cz/mj/attach/pugs/http-server/ ... good night | 23:21 | |
crysflame | neat | ||
Limbic_Region | nothingmuch - will revisit harroth soonish now | 23:33 | |
Limbic_Region is off |