Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-06-22

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 turrepurre joined #perl6
00:21 Juerd audreyt: Can ubuntu-6.06-dvd-i386.iso be deleted?
00:27 GeJ joined #perl6
00:29 diakopter Juerd: if it can be redownloaded and if it's not mounted....?
00:35 weinigLap_ joined #perl6
00:46 diakopter invite.pugscode.org is back up... more or less.
00:53 Juerd audreyt: And ~audreyt/public_html/tmp?
01:02 nipotaway changed the nick to nipotan
01:09 ibrown joined #perl6
01:09 ibrown what's up peoples.
01:17 diakopter ibrown: you haven't yet added yourself to AUTHORS? :)
01:17 ibrown nope.
01:17 ibrown i haven't technically done anything but 1 smartlink
01:17 ibrown real work's been kicking my ass.
01:19 ibrown but i fixed my lame Net::FTP problem today, so i can get to finishing up this db work and start on http.pm
01:22 daxim joined #perl6
01:22 dolmans joined #perl6
01:24 weinigLap_ changed the nick to weinigLap
01:40 Aankhen`` ibrown: May I ask what your plans are for HTTP.pm?
01:45 ibrown haven't even had a second to think about it :(  but i'm game for talks.
01:45 ibrown you kno?
01:45 Aankhen`` Heh.
01:45 ibrown it was suggested last night, that i talk to people in perl6 about it to determine what was going on with it
01:45 ibrown b/c it needed to be done, and i said, what do you want me to dev besides smartlinks, i feel i could be used elsewhere too lol
01:46 ibrown and btw: if those smartlinks are important, i can assign the task to some people i know that aren't that technical but might be able to do it
01:46 Aankhen`` Might not be a bad idea to look at CGI.pm, and do everything in the opposite way. <G>
01:46 ibrown haha see
01:46 ibrown my biggest beef
01:46 ibrown is that perl SUCKS via http and html
01:46 Aankhen`` I'm not sure smartlinks are so *important* per se, but they're certainly *useful*.
01:46 Aankhen`` Okay, what about Perl sucks?
01:46 Aankhen`` (For HTTP and HTML.)
01:46 ibrown in my experience.
01:47 ibrown whew.
01:47 Aankhen`` Actually, as far as HTML goes, I already know the answer: it doesn't use S-expressions. :-P
01:47 ibrown S-expressions?
01:47 Aankhen`` It's a Lisp thing.
01:47 ibrown oh.
01:47 Aankhen`` Lots of parentheses. ;-)
01:47 ibrown lol
01:47 ibrown that sucks.
01:47 ibrown ok.
01:47 Aankhen`` Anyway, about the "Perl sucks" thing, I was basically just trying to probe to figure out what parts of it seem awkward to you for HTTP and HTML.
01:47 ibrown here's the biggest thing about cgi.pm that i never understood.
01:48 ibrown i'm writing a cgi module, for presenting data on the internet.
01:48 ibrown why did i always have to do the damn inital header?  why couldn't CGI do that for me.?
01:48 ibrown yeah writing the content type wasn't hard, and i could see maybe needing to change it from it's default one day
01:49 ibrown but it'd be easier to set an expression for the minor changes, and have major changes be methods, or routines, whatever, gotta understand, i've been doing the internet thing for 15+yrs, building ISPs, and scripting perl/sh
01:49 ibrown i'm not to smart other than computers and i went to no uni, so i don't know a lot of technical names for things
01:49 Aankhen`` Er, you do know about CGI.pm's `start_html()` routine, right?
01:49 ibrown yeah
01:49 ibrown but why do that?
01:49 Aankhen`` Or did you mean using start_html() vs. having it automatically print the header every time?
01:49 ibrown exactly.
01:50 Aankhen`` Ah.
01:50 ibrown there's lots of things that i don't like where it's not intuitive like that
01:50 ibrown i hate how you set diff methods for example.
01:50 Aankhen`` Well, that's probably something that ought to be in Web::Response for Perl 6.
01:50 ibrown i think they're methods, that's why i prefaced.
01:50 Aankhen`` (A default header with Content-Type: text/html.)
01:50 ibrown what's Web::Response?
01:50 ibrown i also hate how you do like the "hashes" within the methods for various things.
01:51 ibrown like.
01:51 ibrown for example.
01:51 ibrown tables.
01:51 ibrown when you do the
01:51 ibrown start_table(); method
01:51 ibrown you put all the attributes in the parens
01:51 Aankhen`` See ext/Web/lib/Web.pm for the stub (and I do mean stub) for Web::Response.
01:52 Aankhen`` It's the other part of the CGI.pm replacement.
01:52 ibrown but it's not very like iono.  should i really have to do the start_table(width=>"55",height=>"65") i mean it's not that much of a pain.
01:52 ibrown but on a different scale isn't there another way to assign those types of hash/key val attributes?
01:53 ibrown i'm probably not making much sense cause i am a little high.
01:53 ibrown but i could go on about cgi and my personal thoughts on it's failures
01:53 ibrown i use the hell out of it though
01:53 ibrown i just do it in a totally stupid way.
01:53 Aankhen`` First, you shouldn't be passing width and height anyway.  Second, that's one of the downsides of unparsed arguments in Perl 5.  In Perl 6 you could say any of: start_table(class => "info"); start_table(:class<info>); start_table(:class("info"));
01:54 Aankhen`` Third, start_table doesn't strike me as a very good idea.  HTML and XML ought to be manipulated as trees, not disjoint strings.
01:54 ibrown exactly
01:54 ibrown HTML is not a language
01:54 ibrown its a structure
01:54 Aankhen`` Yup.
01:54 ibrown like
01:54 ibrown my fav html module is
01:54 ibrown html::TreeBuilder i think
01:54 ibrown and HTML::Element
01:55 ibrown cause when i started using those for parsing data from wget'd mirror'd pages.
01:55 ibrown i saw html in a diff light
01:55 dduncan fyi, concerning HTTP.pm, I think that was intended to work more at the level of stuff like lwp, and doesn't deal with HTML
01:55 ibrown oh i know
01:55 dduncan Web.pm is more about HTML
01:55 ibrown i wasn't planning on doing anything but
01:55 ibrown http protocol specs
01:55 Aankhen`` dduncan: Yes, I know. :-0
01:55 Aankhen`` )
01:55 ibrown that was the take i was thinking regarding that
01:55 bsb joined #perl6
01:55 dduncan I was just replying to an earlier comment that mentioned CGI.pm and HTTP together
01:55 dduncan no biggie
01:56 Aankhen`` Although Web.pm ought to be more intelligent, Web-specific protocol stuff, I think.  An HTML generation module ought to obviously be under HTML::
01:56 ibrown here's the deal.  
01:56 ibrown i have what i like to call my "pretty-boys"
01:56 ibrown they're the guys i call when i want something to look pretty
01:56 dduncan though HTTP is the web protocol
01:56 dduncan its not like it is IP
01:56 ibrown i want a module for html that's essentially my "pretty-boys"
01:56 Aankhen`` dduncan: Yes, but Web.pm should incorporate all the little touches like sending a default header of text/html.
01:57 ibrown yes.
01:57 ibrown any module, that interfaces with an http server
01:57 ibrown should call http.pm
01:57 ibrown and then they should interface
01:57 dduncan well, I think we all agree that however it is broken down, Web.pm is a higher-level interface than HTTP.pm
01:57 ibrown for example.
01:57 Aankhen`` dduncan: I figure HTTP.pm handles the low-level protocol stuff. Web.pm builds on HTTP.pm to make it easier to get going immediately.
01:57 dduncan I agree
01:57 ibrown LWP.pm should call http for all communications with the http server, up until the GET/POST
01:57 Aankhen`` So, for example, `use Web;` *could* automatically parse HTTP requests and make the args available to you.
01:58 dduncan sounds good to me
01:58 Aankhen`` Hmm, actually, parsing it automatically sounds like it might be a security hole.
01:58 Aankhen`` I don't know enough about it to tell, though.  And you'd have to parse it anyway.
01:58 dduncan only if you parse it wrong
01:59 dduncan that is, ...
01:59 Aankhen`` Maybe `use Web 'request'; my $req = request();`.
01:59 dduncan the only security holes are using unvalidated data
01:59 Aankhen`` Yes.
01:59 dduncan so done properly, the peer can send you whatever, and it won't cause security problems
01:59 Aankhen`` ibrown: I'm not sure how that'd work. HTTP.pm handles the low-level representation of data in the protocol, doesn't it?
01:59 Aankhen`` dduncan: Yeah.
02:00 Aankhen`` ibrown: That is to say, LWP ought to make the connection to the server, then use HTTP.pm to generate requests and parse responses, as it does currently.
02:00 ibrown yes
02:00 ibrown aanken
02:01 ibrown web post web get
02:01 ibrown however you call classes and sub-classes ;)
02:01 Aankhen`` Basically, Web.pm is all the little niceties that let you go from zero to completed script in no time.  It's simply a less verbose way of doing things with HTTP.pm.  At least, that's what I thought it would be.  Juerd might have had a completely different idea in mind. :-)
02:02 * dduncan gotta go for a bit ... may check web log
02:02 dduncan left #perl6
02:04 ibrown why wouldn't http.pm create the socket connections and do all the session setups?
02:05 Aankhen`` It only deals with the data structures involved.
02:05 Aankhen`` Maybe it should also open the connections and so on.  I don't really know.
02:06 ibrown i guess we have to ask ourselves this question.
02:06 ibrown are we going to have like, a socket.pm.
02:06 ibrown to generate tcp/udp data transfers?
02:06 Aankhen`` I figured as much.
02:06 ibrown and then http.pm would know the http rfc compliant speak.
02:06 ibrown and just refer to socket.  
02:06 ibrown so then, the need to say, retrieve www.google.com/index.html every 20m.
02:06 ibrown because you wanna look at the img when it changes.
02:07 ibrown you'd use http.pm
02:07 ibrown cause that's just a simple get.
02:07 ibrown i would like to be like.
02:07 Aankhen`` Mmm hmm.
02:07 ibrown $index.get('domain'->'remainder of string')
02:07 ibrown or however you want to syntax it out
02:08 Aankhen`` Not sure I follow.
02:09 ibrown $index.get('www.google.com':'/index.html')
02:09 Aankhen`` Ah.
02:09 Aankhen`` But what is $index there?
02:09 ibrown the variable to store the result
02:09 Aankhen`` Oh.
02:10 ibrown my $index ;)
02:10 ibrown i don't know perl6 syntax yet
02:10 Aankhen`` Heh.
02:10 ibrown so i would just be making stuff up as i go
02:10 ibrown ;)
02:10 ibrown real job's been kicking me hard in the head past few to really get looking at it, i just found the project recently
02:11 Aankhen`` Welcome aboard.
02:11 ibrown tru
02:11 ibrown its a worthy cause.
02:11 ibrown i was starting my "Ruby" and "rails" research
02:12 ibrown stumbled on perl6, said if we can fix how perl does html i won't evar switch
02:12 Aankhen`` Hey, if HTML is all that's bothering you, there a ton of other options on CPAN.
02:12 diakopter there's more than one way perl does html
02:12 Tene ibrown: if you could write up the kind of things that you would like, and concerns that are important to you, it would be awesome.
02:13 ibrown most def tene
02:13 Tene I've done a lot of thinking about Web.pm and friends, but don't quite know where to start yet.
02:14 Tene I never really used CGI.pm
02:14 Tene Most of my web dev stuff has been mod_perl with Template Toolkit
02:14 Tene So a rather different workflow than Web.pm is for
02:18 Aankhen`` From the stubs, it seems that Web.pm is aimed at fitting the mod_perl workflow too.
02:18 Aankhen`` I dunno about different template plugins though.
02:21 Tene Well, that workflow is "get stuff from apache, do everything in Template Toolkit, then pass a formatted chunk of data back to apache"
02:21 Aankhen`` Right.  Doesn't seem like it would be difficult for Web.pm to handle that.
02:22 Tene Web.pm doesn't do much that would be relevant to that.
02:22 Aankhen`` Yup.
02:22 Aankhen`` All that it would need to do is grab the relevant information from Apache.
02:22 Tene Hmm.  I wonder if anyone has started on a mod_pugs for apache...
02:23 Tene m'eh
02:23 Aankhen`` I believe there was one, but I doubt it's very up-to-date.
02:29 ibrown this might be a stupid basic question.
02:29 ibrown but with mod_perl in it's fashion today, can you say, setup all the db handles through there, and manage the DB use of the http server through the mod_perl?  if that makes sense?
02:30 Tene ibrown: yes, you can do exactly that
02:31 ibrown that's hot
02:31 ibrown i don't do a lot of webdev.
02:31 ibrown it'll probably show. ;)
02:32 ibrown but i know communication protocols heh
02:35 justatheory joined #perl6
02:36 KDr2 joined #perl6
02:36 KDr2 hi
02:36 Tene hi!
02:36 Aankhen`` Hullo.
02:42 KDr2_ joined #perl6
02:45 KDr2 joined #perl6
02:46 weinigLap_ joined #perl6
02:56 jenkinSear left #perl6
03:09 thestarslookdown joined #perl6
03:19 Aankhen`` What does it mean to export a class method?  Is it just being able to leave off the colon in `foo $bar: $baz`?
03:20 Aankhen`` Or rather, being able to replace it with a comma.
03:29 justatheory joined #perl6
03:43 daxim_ joined #perl6
03:44 weinigLap_ changed the nick to weinigLap
03:53 sunnavy joined #perl6
03:56 justatheory joined #perl6
03:56 justatheory joined #perl6
04:20 dduncan joined #perl6
04:31 amnesiac joined #perl6
04:32 monomorph joined #perl6
04:44 diakopter TimToady: does your language talk have a publicly-available slide deck?
04:46 diotalevi joined #perl6
05:04 audreyt joined #perl6
05:09 devogon joined #perl6
05:12 vel_ joined #perl6
05:23 TimToady diakopter: not yet.  TheDamian++ was going to try to send me something this weekend since he was going to put one together anyway
05:33 TimToady Aankhen``: yes, exporting a method produces a multi that can be called with comma in place of colon.
05:33 TimToady It does not change the order of the arguments at all.
05:34 TimToady so if you want a multi variant that is in a different order that has to be declared explicitly.
05:49 devogon_ joined #perl6
05:51 gaal Is a slide deck something you would find on a kindergarten ship?
05:52 gaal above the sandbox deck, and the sleepy time hold...
05:53 gaal afk
05:57 TimToady speaking of sleepy time...
05:57 TimToady zzz &
05:57 Aankhen`` TimToady: Ah, thanks.
05:57 Aankhen`` G'night.
06:01 Jmax ja, ja, ja, ja
06:02 Jmax weisst nicht wie gut ich der bin
06:05 Jmax oh it's "wir"
06:27 diotalevi joined #perl6
06:38 vel joined #perl6
06:48 theorbtwo joined #perl6
06:53 Entonian joined #perl6
07:10 franck__ joined #perl6
07:13 iblechbot joined #perl6
07:18 vel joined #perl6
07:33 diakopter joined #perl6
07:34 bsb left #perl6
07:35 jisom joined #perl6
08:19 weinigLap joined #perl6
08:20 weinigLap joined #perl6
08:27 moritz_ good morning
08:27 moritz_ changed the nick to moritz
08:27 Alessio334443 joined #perl6
08:27 Alessio334443 left #perl6
08:32 diakopter moritz: hi
08:33 moritz hi diakopter ;)
08:34 KDr2 joined #perl6
08:35 buetow joined #perl6
08:35 Juerd Aankhen``: That description of Web fits well
08:36 Juerd Aankhen``: I was thinking that HTTP::* were just object classes, with no way to automatically create instances, where Web knows how to create those instances
08:36 Aankhen`` Juerd: Good to know I wasn't off-base then.
08:37 Aankhen`` Right.
08:37 Juerd Aankhen``: Web should detect whether mod_perl was used or CGI or FastCGI or whatever, and create the appropriate $request and $response objects to work with that.
08:37 * Aankhen`` nods.
08:37 Aankhen`` What about what ibrown said regarding the actual connections and so on?
08:37 Aankhen`` Does that fall under the purview of an HTTP.pm module?
08:37 Juerd Aankhen``: Haven't read that. Your line matched /Juerd/ :)
08:37 Aankhen`` Hehe.
08:37 Juerd Could you summarize?
08:38 Aankhen`` Er, let's see.
08:38 dduncan left #perl6
08:39 Aankhen`` I think it boiled down to having a generic Socket.pm module; then HTTP.pm would be a module that specifically spoke the HTTP protocol, and could create HTTP connections and conduct conversations in the protocol.
08:39 moritz do we want to implement full HTTP server/client in HTTP.pm?
08:39 Aankhen`` On the one hand, I thought HTTP.pm was only for representing the data structures involved.  On the other hand, it *is* HTTP.pm, so maybe some expectations come with that name.  I dunno.
08:40 Juerd The Web toolkit needs two things: Web server tools (like CGI), and Web client tools (like LWP). There's a great overlap, but the former is more important IMO.
08:40 Aankhen`` Certainly.
08:40 moritz Aankhen``: we could have HTTP.pm hold the data structures, and HTTP::{Client,Server} do the actual work
08:40 Juerd The web server tools don't need actual protocol implementation, it can ride on top of CGI etc.
08:41 Aankhen`` moritz: That was my initial response too, only not quite so well-phrased.
08:41 Juerd moritz: I was thinking of HTTP::Request objects that can be "done"
08:41 Juerd Consider a CGI script. You have this automatically generated $request object.
08:41 daxim_ what is "done"?
08:41 Juerd If you want to re-execute the request, you should be able to do that with not much more than $request.do() or $request.execute()
08:42 Aankhen`` daxim_: I guess the HTTP::Request object represents a *potential* request, which can be executed.
08:42 Juerd "do" is confusing because of roles.
08:42 Juerd Aankhen``: Potential and/or current and/or past.
08:42 Aankhen`` Right, sorry.
08:42 * Aankhen`` is a little sleepy.
08:42 Juerd Aankhen``: The query string of the CGI script's request should be accessible through $request.query
08:43 Aankhen`` Are POST parameters accessed separately?
08:43 Juerd And form elements through $request.get<foo> and $request.post<foo> (alternatively, because get and post are verbs, $request.query<foo> and $request.body<foo>)
08:43 Aankhen`` Ah.
08:43 Juerd I sure hope so!
08:43 Aankhen`` Hehe.
08:44 Aankhen`` Hmm, let me see if I understand.
08:44 Juerd CGI.pm made the Perl world think weird things about get versus post, when they're combined.
08:44 Aankhen`` Oh.
08:44 Aankhen`` The query string is the raw string, .get and .post are the variables… right.
08:44 Aankhen`` s/variables/parameters/
08:44 Juerd There could be $request.fields<> that picks .post{$key} // .get{$key}
08:45 Juerd Yes, but it isn't necessary
08:45 Juerd Someone complained that .get and .post are verbs and should *do* something. I tend to agree.
08:45 Juerd But the design has .query and .body of course, the actual strings in which the rest is encoded
08:45 Juerd Those strings don't have to be raw. They can be objects that stringify to the raw string, but also allow hash-like access.
08:45 Aankhen`` Yeh.
08:46 Juerd They could start out as raw strings, and be upgraded by assigning roles to them.
08:46 Juerd And if at all possible, .body should be lazy
08:46 franck__ joined #perl6
08:47 Juerd $request.body does MIME::MultiPart if $request.header<Content-Type> ~~ /multipart/;
08:48 Aankhen`` That's another thing.  The stubs you posted have a lot of `does Foo`.  Shouldn't that be a runtime thing, e.g. my $args = HTTP::Argument.new() but HTTP::Argument::Upload
08:49 Juerd $request.body<filearg> does Web::FileUpload if $request.body<filearg>.header<Content-Disposition> ~~ /filename/;
08:49 Aankhen`` Since otherwise every HTTP::Argument object also does HTTP::Argument::Upload.
08:49 Juerd To be honest, I have no idea :)
08:49 Aankhen`` Good to know. ;-)
08:50 Juerd So far there's just the synopses, which aren't enough for me to really know the language yet.
08:50 Aankhen`` I guess so.
08:50 Juerd For example, I have no idea how to actually give an object a hash-like interface
08:50 Juerd But I'm determined that it should be used, a lot.
08:51 Aankhen`` I used to know, but I've forgotten.
08:51 Aankhen`` does Hash; # I know this does some of it automatically, just can't remember whether there was more needed
08:51 Juerd Because .param(), a method, just isn't Perlish, and makes every module implement its own interface w.r.t. gettinga list of all the keys, etc.
08:51 Aankhen`` Aye.
08:51 Juerd While Perl already has wonderful standard interfaces for that
08:52 Juerd .keys, .values, .kv, .<>
08:52 Juerd A shame not to use it.
08:52 Juerd And raw strings that represent structured data are useful too, especially if you can access both.
08:52 Aankhen`` Great, can't find the does Hash bit in the synopses.
08:53 Juerd $req.query ~= "&foo=bar";
08:53 Juerd push $req.query<foo>, "bar";
08:53 Juerd Where $req.query<foo> is a string/array-hybrid, of course.
08:54 Aankhen`` Ah, here we go.
08:54 Aankhen`` S13/"Type Casting"
08:54 Aankhen`` A class may define methods that allow it to respond as if it were a routine, array, or hash. The long forms are as follows:
08:55 Aankhen`` [...]
08:55 Aankhen`` Those are a bit unwieldy, so you may also use these short forms:
08:55 Aankhen`` method %.{ *@@slice } {...}
08:55 * Juerd barfs
08:55 Juerd Whoa.
08:55 Aankhen`` Hey, use the long version if you like.
08:55 Aankhen`` method postcircumfix:<{ }> (*@@slice) {...}
08:55 thoughtpolice joined #perl6
08:55 Juerd Compare that to Ruby's: def foo[]
08:55 Aankhen`` Does Ruby include multidimensional arrays and hashes?
08:56 Aankhen`` And what is `foo` there?  The class name?
08:56 Tene Juerd: the synopsis is referring to defining {}, not foo{}
08:56 Juerd No. Personally, I don't care about those at all. I think they make the language overly complex while nested data structures work very well in common circumstances.
08:57 Juerd Tene: Still, though, a somewhat nicer syntax might be... somewhat nicer.
08:57 Aankhen`` Personally, I like the notion of multidimensional arrays and hashes… remains to be seen whether I'll actually use them. :-)
08:58 Tene Juerd: method %.{} {...}
08:58 Aankhen`` Tene: Er, what's the distinction? I think I missed something. :-S
08:58 Juerd method % { ... }
08:59 Juerd method @ { ... }
08:59 Tene Juerd: ruby puts block parameters inside the block.
08:59 Juerd method = { ... }
08:59 Tene Perl doesn't.
08:59 Tene (Although with placeholder vars, it might...)
08:59 Juerd Tene: *@@ really hurts IMO
08:59 Aankhen`` Tene: You could use placeholders. :-)
08:59 Juerd No matter how logical *@@ may be
08:59 Tene Hmm.  I don't remember what the * means there. Aankhen``?
09:00 Juerd Tene: Slurp
09:00 Tene Ahh, right.
09:00 Aankhen`` See, I love Lisp.
09:00 Aankhen`` (defun $#@! () 1)
09:00 Aankhen`` ($#@!) => 1
09:00 Juerd But there's only one signature that makes sense for .{} -- instead of copy/pasting it around all the time, it could just be the one and only possibility and thus default...
09:00 * Tene nods.
09:01 Tene Although you *could* do multiple dispatch on it
09:01 Tene multi method @ (Even $n) {...}
09:01 Tene multi method @ (Odd $n) {...}
09:02 Juerd I guess
09:02 BooK joined #perl6
09:02 Juerd Still that looks better that @.{ Even $n }
09:03 Juerd I want Perlish interfaces to be the standard thing. If it's ugly or hard, I'm afraid people will write method param { ... } instead.
09:03 Aankhen`` 'S true.
09:03 * Juerd admits he doesn't understand slices.
09:04 Juerd I don't even know how to iterate over a real multidimensional array.
09:05 * Juerd wouldn't mind at all if slices didn't make it to 6.0.0
09:05 Juerd They really feel like a second system symptom...
09:06 moritz they feel like the price we have to pay for all the list magic we use elsewhere
09:06 moritz waterbed theory and all
09:06 Juerd I question that...
09:06 moritz Juerd: maybe there _is_ a better way around...
09:06 moritz Juerd: but we have to find that
09:07 Juerd What kind of magic used elsewhere requires a slice data type?
09:07 Juerd Or requires multidimensional structures?
09:07 moritz I'm speaking of magic like autoflatting zip operator
09:08 Juerd That's reversed logic, I think.
09:08 Aankhen`` I can't figure out the autoflattening stuff myself.
09:08 Juerd I think autoflatting zip is required because we have these slices :)
09:08 moritz no, it's not
09:08 Juerd Oh
09:09 moritz if you want to be able to do some for (@a Z @b) -> $a, $b...
09:09 moritz @a Z @b has to be flattened
09:09 lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . v
09:09 moritz and if you "magically" omit the Z, that's still the same
09:10 moritz otherwise you'd have to invent at for (@a Z @b) -> [$a, $b] syntax
09:10 moritz which really sucks
09:11 Juerd I still don't see what was wrong with the ¥-era zipping
09:12 Juerd Where LIST ¥ LIST yielded elA1, elB1, elA2, elB2, ... and for loops just took N elements at a time, where N is the number of arguments to its block.
09:14 moritz it's just a workaroudn for the zip problem, not a solution to the generall flattening vs non-flattening problem
09:14 moritz and having two different ops to produce these two cases feels clumsy as well
09:17 isaacd joined #perl6
09:19 moritz Aankhen``: re default Content-Type text/html: it encourages people not to specify a charset...
09:20 Aankhen`` moritz: The charset defaults to UTF-8.
09:20 moritz Aankhen``: maybe we should also default to UTF-8, because perl 6 has so cool unicode handling?
09:20 Aankhen`` (According to the stubs.)
09:20 moritz Aankhen``: ah, you were faster ;)
09:20 Aankhen`` So Content-Type: text/html; is actually an abbreviated version of it.  The actual header would be: Content-Type: text/html; charset=utf-8
09:20 moritz and I think the interface for content-Type and charset should be separate
09:21 moritz they are a common http header line, but sometimes you want to modify them separately
09:21 Aankhen`` They are separate.
09:21 franck___ joined #perl6
09:21 Aankhen`` (Separate properties of the response.)
09:22 moritz ok
09:23 * Aankhen`` heads for lolsleep.
09:24 moritz sleep well ;)
09:39 diakopter Juerd: you around?
09:40 Juerd I am
09:42 diakopter got trac running in mod_python... two little apache config "issues" remain.
09:43 * diakopter waits for Juerd to discover the issues
09:44 Juerd Tell me more please :)
09:44 Juerd Wow, dev.pugscode.org loads in "just" 1.5 seconds
09:44 Juerd Hm, is that singular or plural, 1.5?
09:45 diakopter plural, I've always heard
09:46 diakopter trac returns a Location: :9999/ header upon successful login, and in fact the succesful authenticator is "logged in" if he browses to the :9999/ url
09:48 polettix joined #perl6
09:48 diakopter of course, http://dev.pugscode.org/ merely redirecting to http://dev.pugscode.org:9999/ would solve that problem.
09:48 lambdabot Title: Pugs - Trac
09:49 diakopter but that's definitely not the elegant solution?  I mean, we *want* this to run through the port 80 reverse proxy.... right?
09:51 Juerd I don't really know why the proxy was used in the first place
09:51 Juerd I haven't installed any of this
09:51 diakopter oh, I see the problem
09:51 Juerd I think redirecting is a good solution if that fixes problems. It's less elegant, but I think productivity is more important :)
09:52 diakopter default-handler is dav probably...
09:52 diakopter wait, that's for another problem I haven't mentioned to you yet
09:53 rho joined #perl6
09:56 diakopter hm; um; hang on
10:02 diakopter actually, I don't see why apache (1.3) couldn't be shut off and all of this could be run through 2.2....
10:03 moritz which parts run through 1.3 atm?
10:03 franck__ joined #perl6
10:05 diakopter everything, in a manner of speaking... perlcabal.org, trac, svn, some reverse proxies, some redirected virtual hosts...
10:06 Juerd diakopter: Because I don't have the tuits, and others haven't offered to do it :)
10:06 diakopter I mean, trac and svn are reverse proxied to 2.2...
10:06 Juerd There's nothing on feather that couldn't run on 2 AFAIK
10:07 diakopter and invite.p is reverse proxied to jifty:6666 (which needs a runit or daemontools service dir, imho)
10:08 ofer joined #perl6
10:38 mico joined #perl6
11:15 vel joined #perl6
11:18 wolverian joined #perl6
11:22 crashmatrix joined #perl6
11:23 diakopter Juerd: ping
11:27 franck___ joined #perl6
11:27 diakopter joined #perl6
11:29 Juerd diakopter: pong
11:31 diakopter I think I got everything transferred...
11:32 diakopter to 2.2
11:36 fglock joined #perl6
11:39 Juerd diakopter: Great
11:44 nipotan changed the nick to nipotaway
11:48 agentzh joined #perl6
11:50 agentzh ibrown: using Test.pm instead of printing TAP yourself will help smartlinks.pl to mark the tests with  �� and �� using the smoke data :)
11:50 lambdabot agentzh: You have 1 new message. '/msg lambdabot @messages' to read it.
11:50 agentzh @messages
11:50 lambdabot Aankhen`` said 1d 15h 20m 43s ago: I didn't fix it… I couldn't even reproduce it. :-S
11:51 agentzh Aankhen``: :)
11:53 moritz agentzh: I hope it pleases you to learn that I implemented paged results to the irclog search
11:53 agentzh yes, I saw that but forgot to mention. moritz++
11:54 agentzh and i love the new font too
11:54 moritz tomorrow I'm moving roughly 2000km, so no time for hacking
11:54 moritz that was Aankhen``++ ;-)
11:54 agentzh wow
11:54 agentzh 2000km !?
11:55 agentzh on foot?
11:55 agentzh by bike?
11:55 moritz agentzh: I'm currently in Edinburgh, Scotland for studying, and I'll move back home to germany this weekend
11:55 moritz on sunday actually
11:55 moritz agentzh: no, air plane ;)
11:56 agentzh one of my classmates will go to that university for studying soon :)
11:56 agentzh sadly he is a Java/Python guy ;)
11:56 moritz agentzh: which university? there are 4 in edinburgh ;)
11:57 agentzh Edinburgh University...it seems
11:57 moritz lucky guy ;)
11:58 agentzh indeed :)
11:58 moritz heriot watt just plain sucks
11:59 agentzh ah
11:59 moritz but I could buy a master degree there - for 40 Pound ;)
11:59 agentzh heh
12:00 agentzh it seems that i will only get a B.S. degree in my life ;)
12:00 agentzh not sure if i'll get a chance to continue my studying.
12:00 moritz :(
12:01 moritz why? money?
12:01 agentzh no, just got bored ;)
12:03 moritz what are you studying btw? CS?
12:03 diakopter and now commitbit works again, too.
12:03 agentzh yup
12:03 diakopter silly debian
12:04 moritz silly usage of unstable on a "production" server ;)
12:05 mico joined #perl6
12:06 agentzh the "feather puzzle" has now finally been worked out?
12:06 moritz agentzh: yes, it was a half damaged RAM component
12:06 agentzh wow, that's very interesting
12:07 moritz agentzh: which didn't give wrong results, but slowed down everything
12:07 agentzh heh
12:07 moritz agentzh: Juerd discovered that is was steaming hot iirc ;)
12:08 agentzh that's a wonderful news
12:08 * agentzh tries to login to feather again.
12:09 moritz commitbit now respons within a few seconds, not within a few dozens of minutes ;)
12:09 agentzh yay!
12:09 agentzh and i'd expect autosmoking to complete within 1 hour .oO(it used to be 288 min)
12:13 daxim_ ah, so that's why brian d foy thought pugs would need a few days worth of compilation
12:13 agentzh lol
12:16 agentzh feather is not as fast as my core2duo machine, or 6-min-smoking-cycle will allow per-commit-smoking.
12:17 daxim_ even on my 9 year old pentium3 it always finished under two hours
12:17 agentzh 9 years old? wow.
12:19 * agentzh has been considering to throw away his 8 years old machine.
12:20 agentzh testgraph.pl failed to convert smoke.yml to HTML in the last autosmoke.
12:21 agentzh "Could not convert .yml to testgraph:  at util/run-smoke.pl line 94."
12:22 diakopter I think you can blame me for that.  upgraded YAML::Syck... you might start looking there...
12:22 agentzh but the problem seems to be transient.
12:22 diakopter oh
12:22 agentzh diakopter: ah, okay
12:23 agentzh that explains the problem :)
12:24 moritz and I thougth the problem could be _solved_ by upgrading YAML::Syck ;)
12:24 agentzh now calling "util/testgraph.pl smoke.yml smoke.html
12:25 agentzh manually works without any problems
12:28 diakopter manually as what user with what env
12:29 agentzh i believe at least PATH is almost the same :)
12:30 agentzh the perl is the same perl...
12:31 moritz agentzh: try a make realclean
12:31 agentzh there has been a long long debate regarding perldoc on p6l...
12:31 moritz agentzh: it helps often ;)
12:32 agentzh moritz: will do if i get a second failure cron report... :)
12:32 diakopter agentzh: what time did it fail last night
12:32 agentzh diakopter: let me see...
12:32 diakopter I might have been, ah, brazenly 'killall perl' at the time or something.
12:32 agentzh 20 Jun 2007 22:32:07 +0200
12:33 agentzh yes, it seems like that...
12:33 diakopter or, better, in the middle of upgrading stuff.
12:34 agentzh heh, i'll ignore it for now.
12:34 diakopter apt-get upgrade says everything's the latest.  in sid.
12:34 agentzh feather is now suitable for real-world development.
12:35 agentzh feather++
12:37 agentzh i've just completed the last school assignment today and i'm now merely waiting for graduation. hopefully i'll go back to pugs hacking pretty soon :)
12:44 agentzh &
12:44 agentzh left #perl6
12:49 iblechbot joined #perl6
13:01 Loro_ joined #perl6
13:05 arec joined #perl6
13:07 arec joined #perl6
13:09 arec #login
13:10 arec joined #perl6
13:11 isaacd_ joined #perl6
13:13 kanru joined #perl6
13:18 mico left #perl6
13:19 mico joined #perl6
13:20 jefflee joined #perl6
13:24 cognominal_ joined #perl6
13:55 arec joined #perl6
14:11 penk joined #perl6
14:24 [particle] joined #perl6
14:32 ruoso joined #perl6
14:51 rfordinal_athome joined #perl6
14:55 obvio171 joined #perl6
14:57 rfordinal_athome joined #perl6
15:18 rindolf joined #perl6
15:18 theorbtwo joined #perl6
15:43 diakopter changed the nick to diakopter_afk
15:52 franck__ joined #perl6
15:53 barney joined #perl6
15:54 * moritz mooses idly
16:05 * TimToady squirrels backwards
16:05 moritz squirrels taste good ;)
16:09 statico (dramatic squirrel)++
16:20 Entonian joined #perl6
16:25 xinming joined #perl6
16:29 weinigLap joined #perl6
16:38 mico joined #perl6
16:51 justatheory joined #perl6
16:58 pmurias joined #perl6
16:58 justatheory joined #perl6
16:59 pmurias hi
16:59 Tene Hi!
17:00 moritz hi Tene ;)
17:00 pmurias moritz: ever eaten squirrels?
17:00 Tene hi moritz
17:00 moritz pmurias: no, I was just joking ;)
17:00 pmurias ;)
17:01 ruoso joined #perl6
17:01 GabrielVieira joined #perl6
17:07 ruoso joined #perl6
17:08 justatheory_ joined #perl6
17:13 weinigLap joined #perl6
17:21 Psyche^ joined #perl6
17:26 r0bby joined #perl6
17:27 Psyche^ changed the nick to Patterner
17:30 ashleyb joined #perl6
17:32 vel joined #perl6
17:34 drupek12 joined #perl6
17:38 rindolf Hi all.
17:38 moritz hi rindolf ;)
17:38 rindolf moritz: ahoy!
17:38 rindolf moritz: what's up?
17:39 justatheory joined #perl6
17:41 moritz rindolf: random hacking, and preparing to move back to good ol' Germany
17:41 rindolf moritz: I see.
17:41 rindolf moritz: where are you located now?
17:41 moritz rindolf: Edinburgh, Scotland
17:41 rindolf moritz: I see.
17:41 franck___ joined #perl6
17:52 fglock pmurias: ping
17:54 mncharity hi fglock
17:55 fglock mncharity: how are you doing?
17:55 mncharity if some time you would like to take a pass through the yet_another...whatever it was called, regexp engine, explaining/documenting and cleaning, just let me know.  maybe we could find a collaborative editing website to work on the file simultaneously.
17:56 mncharity ok.  still doing doing jobsearch avoidance.  mostly banging on olpc.
17:56 Tene 'gobby' is a gtk-based multi-user editor.
17:56 fglock mncharity: I've got some new ideas for p6regex-in-p5regex
17:56 * mncharity looks
17:57 Tene cross-platform, connects over the internet, etc.
17:57 Tene it's not vim, though. ;)
17:57 [particle] also see writewith.com
17:57 fglock mncharity: I'm about to change jobs
17:59 moritz fglock: do you already have a new one?
17:59 moritz fglock: or the prospect at least?
17:59 fglock yes, I'm taking care of the visa
18:00 mncharity http://gobby.0x539.de/trac/   neat.  that could be fun.
18:00 lambdabot Title: obby - Trac
18:00 mncharity http://gobby.0x539.de/trac/wiki/Screenshots
18:00 lambdabot Title: Screenshots - obby - Trac
18:01 mncharity Tene: nor emacs :)
18:01 fglock mncharity: I'm working out a plan for kp6; I'd like to discuss some ideas on that too
18:01 mncharity fglock: I'd like that
18:02 mncharity re writewith.com, looking...
18:03 fglock cool - I'll start the gobby download and get a coffee
18:07 pmurias fglock: pong
18:07 buetow joined #perl6
18:07 mncharity fglock: oh, I'm not sure I can do it today (though I too will start a download).  have to head out in ~2 hrs, and lots to do before.  um, maybe...
18:08 mncharity this weekend may be a no-sleep all-nighter before deadline special.  if not, this weekend.  else, early next week?
18:08 jisom joined #perl6
18:08 fglock mncharity: sure, that's ok
18:09 fglock pmurias: I did a lot of cleaning on the visitors and kp6-perl5
18:10 fglock mismatched accessors are more likely to warn now
18:10 mncharity re writewith.com, looks interesting.  though much less realtime than gooby.  send email invite?  each day to read my email, it takes assorted filters do deal with 10^4 spams.  very not realtime. :/
18:11 mncharity great for business though
18:12 [particle] i haven't tried realtime collaborative editing with writewith, but yeah, great for business
18:14 vel joined #perl6
18:14 pmurias fglock: you might want to look at Lexical::Persistense
18:15 fglock I've got gobby
18:15 fglock pmurias: looking
18:15 pmurias saw it while reading the Writing a perl REPL atricle
18:16 mncharity re gobby, fedora has an rpm :)
18:16 Tene it's in yum, too
18:16 pmurias and portage
18:16 REPLeffect joined #perl6
18:17 mncharity :)
18:17 theorbtwo ...and debian.
18:18 fglock pmurias: it looks like an implementation of state variables; I think recursive calls would share the variables
18:26 mncharity could someone not behind a firewall start a test gobby session?
18:26 mncharity i'd like to try joining...
18:26 fglock Lexical::Persistence is much more complex than Pad.pm, and seems to do less :(
18:27 fglock mncharity: audreyt used to start gobby in feather, but I don't know how to do that
18:27 Tene fglock: ssh -Y feather gobby
18:28 * mncharity notes that you really have to trust feather security to -Y it...
18:28 mncharity or not care
18:29 Tene I was more presuming the latter.
18:29 Tene (you could always run it in Xnest ;) )
18:30 mncharity re Xnest, oh, that's very neat.  thanks for the pointer. :)
18:32 mncharity fglock: so where is the new job?
18:32 mncharity (/me lacks feather account)
18:33 Tene But, yes, mncharity is right, -Y is a security issue.  -X might be more appropriate.
18:33 fglock mncharity: in Lisbon
18:33 Tene And, even then, there are potential security issues.
18:33 isaacd__ joined #perl6
18:34 * Tene refers to 'ForwardX11' in ssh_config(5)
18:35 moritz fglock: quite a distance ;)
18:37 [particle1 joined #perl6
18:39 fglock moritz: I enjoy travelling
18:39 mncharity re X, really want a display-free server mode.  picture feather costing a continuous full-pugs-tree editing jam :)
18:39 [particle2 joined #perl6
18:39 mncharity re Lisbon, oo, pretty
18:42 pmurias sobby is the standalone gobby server
18:45 weinigLap joined #perl6
18:47 pmurias mncharity: there is now an obby session on port 6552 on feather (getting a newer gobby on my box to test it)
18:49 mncharity re sobby, so the remaining issure would be svn integration.  ie, updating an obby session from the repo, and choosing sets of changes to commit.
18:49 mncharity re session, oh, great, trying...
18:58 mncharity ok, so it's 6522 on feather.perl6.nl
18:59 mncharity anyone else care to join to play for a moment?
19:00 moritz wait a second, I'll install gobby
19:00 moritz s/a second/five minutes/ # very slow network :(
19:03 dduncan joined #perl6
19:03 mncharity ;)
19:03 mncharity it seems happy with Test.pm
19:04 mncharity what is some really groddy challenge for editors p6 file?
19:06 pmurias mncharity: damned gnutls reports compile time error here
19:06 Limbic_Region joined #perl6
19:06 mncharity :(
19:07 pmurias trying the keyword'ed version
19:07 moritz how do I start a network session?
19:08 fglock I get "protocol version mismatch"
19:08 pmurias what's your gobby version
19:08 pmurias ?
19:08 moritz ok, I joined, and opened Test.pm
19:08 fglock 0.3.0
19:09 * mncharity recalls something about the protocol version n not being compatible with the version n-1
19:09 moritz 0.4.1-2 works for me
19:09 moritz that's the one in debian etch
19:09 fglock anyone working on a mac?
19:12 pmichaud ?eval my $a = '!'; say ++$a;
19:12 fglock upgrading...
19:12 pmichaud ah
19:12 [particle2 pmichaud: try run.pugscode.org
19:13 [particle2 unless that's out too
19:13 [particle2 changed the nick to [particle]
19:13 pmichaud it's running
19:13 justatheory joined #perl6
19:15 pmichaud okay, that helped.  Thanks.
19:16 mncharity moritz: thanks, that was fun
19:17 moritz mncharity: yw
19:17 mncharity summary: syntax highlighting was fine.  couple of second latency on letter hits.  letter rather than line based edits.
19:18 mncharity desire for emacs/vim backends
19:18 mncharity pmurias: what did it take to start it sobby on feather?
19:21 mncharity yipes, later &
19:21 mncharity thanks everyone, it was fun! :)
19:21 pmurias sobby
19:22 pmurias a simple command
19:22 rfordinal_mobile joined #perl6
19:24 shay_ joined #perl6
19:24 pmurias should i run it in the background?
19:24 shay_ changed the nick to shay|p6devel
19:24 shay|p6devel this sparc64 is ready for perl6 development :)
19:25 pmurias maybe this would be a waste of resources as it can be started on demand
19:39 diakopter_afk changed the nick to diakopter
19:41 prism joined #perl6
19:49 diakopter changed the nick to diakopter_afk
19:54 Limbic_Region anyone know where I can get a good tutorial on SML for extreme beginners that is free?
19:55 diakopter_afk changed the nick to diakopter
19:56 diakopter LR: http://www.cs.cmu.edu/~rwh/smlbook/online.pdf
19:57 diakopter or did you mean a different SML?
19:57 msphix joined #perl6
19:58 xinming joined #perl6
20:03 rfordinal_mobile joined #perl6
20:06 Limbic_Region no, that SML diakopter though I am not sure that is geared towards extreme programmers
20:06 Limbic_Region I will have a look though
20:06 Limbic_Region s/programmers/beginners/
20:07 moritz at first look it's a bit like OO-Haskell ;)
20:08 Limbic_Region well, the reality of the matter is I want to learn Alice
20:08 Limbic_Region Alice is based on SML with lots of extra doodads and whizbangs
20:08 Limbic_Region unfortunately, Alice doesn't provide a beginner's guide (that I can find) - it assumes knowledge of SML
20:10 ibrown what's good people?
20:12 Limbic_Region google beginner guide programming ML
20:12 Limbic_Region look at the very first hit
20:12 * Limbic_Region really laughed
20:14 moritz that hurts ;)
20:22 ibrown ugh why do people use benchmark comparisons against programming languages to prove their point?  isn't that a little, un-realistic?
20:24 Patterner That's because I use assembly and therefore win every time.
20:24 ibrown lol
20:25 ibrown humor
20:25 Patterner Well, it's either laugh or cry...
20:25 Patterner And I prefer to laugh.
20:26 ibrown i've always ran away from ASM.  except basic concepts heh.  
20:26 moritz I use assembler rather often; I don't write it myself though ;)
20:26 moritz that's what compilers are there for ;)
20:27 ibrown touchee
20:32 weinigLap_ joined #perl6
20:34 weinigLap joined #perl6
20:35 Aankhen`` ,697So everybody reading this is now condemned to write an OO Perl 6 module,
20:35 Aankhen`` ,697and document it with Pod 6 ;-)
20:35 Aankhen`` Argh.
20:35 moritz ;)
20:35 Aankhen`` Stupid retarded paste mechanism.
20:36 Limbic_Region Aankhen`` - I wrote a Perl 6 OO module before pugs supported OO but it is documented with POD
20:36 moritz Aankhen``: time enough to summon an op and make him/her kick you ;)
20:36 Aankhen`` Heh.
20:36 Aankhen`` Let's try that again.
20:36 Aankhen`` What I was trying to say is:
20:36 Aankhen`` ,697So everybody reading this is now condemned to write an OO Perl 6 module,
20:36 Aankhen`` ,697and document it with Pod 6 ;-)
20:36 Aankhen`` NO
20:36 moritz *LOL*
20:36 Aankhen`` WHO TOLD THIS BLOODY PIECE OF JUNK TO REPLACE MY TEXT WITH THE CLIPBOARD CONTENTS
20:37 * moritz did
20:37 Aankhen`` moritz++ # "So everybody reading this is now condemned to write an OO Perl 6 module, and document it with Pod 6 ;-)"
20:37 Aankhen`` I win.
20:37 Aankhen`` Sort of. :-|
20:37 moritz Aankhen``: now I got you to quote me three times instead of only once as intended by you ;)
20:38 Aankhen`` Hehe.
20:38 moritz maybe I should have said "sentenced" instead of "condemned"
20:38 moritz but I couldn't remember that word
20:38 Aankhen`` Nah, it's more humourous like this.
20:39 Aankhen`` Anyway.  I think what you said in your mail is extremely true.
20:39 Aankhen`` Some people appear to be arguing against Pod without even understanding most of it.
20:40 Juerd mncharity: If you want a feather account, mail a request to juerd@feather.perl6.nl including your real name and preferred login name.
20:42 devogon joined #perl6
20:48 rhr trac is acting funny, http://dev.pugscode.org/log goes to the wiki, but http://dev.pugscode.org/anyrandomtext/log goes to the revision log
20:48 lambdabot Title: Pugs - Trac
20:50 moritz nice one ;)
20:50 moritz that _might_ have to do with the apache 1.3->2.2 transition
20:53 ibrown what's the biggest supported alternative to POD right now?
20:53 pmichaud is there a way to get email notifications of commits to the pugs repo?
20:53 moritz I no of none
20:53 moritz but there is an RSS feed in trac IIRC
20:53 moritz and there is a RSS2Mail perl script somewhere
20:54 pmichaud hmmm, the links from www.pugscode.org to RSS feeds don't seem to work
20:54 pmichaud at least, they don't give me something that looks like an RSS feed.
20:54 pmichaud Oh well, I'll explore later.  Thanks.  :-)
20:55 pmichaud afk # food
20:55 moritz pmichaud: that's probably related to the trac issue rhr++ just reported
21:05 gene9 joined #perl6
21:18 weinigLap joined #perl6
21:18 avar joined #perl6
21:25 drupek12 joined #perl6
21:44 ibrown you know.  sometimes i'm a friggin moron.
21:51 buetow joined #perl6
22:02 [particle1 joined #perl6
22:03 REPLeffect joined #perl6
22:15 weinigLap_ joined #perl6
22:26 buubot joined #perl6
22:33 buubot joined #perl6
22:40 octagon joined #perl6
22:56 buubot2 joined #perl6
22:57 buubot joined #perl6
22:59 octagon left #perl6
23:03 REPLeffect joined #perl6
23:15 xinming_ joined #perl6
23:20 prism joined #perl6
23:21 REPLeffect joined #perl6
23:22 REPLeffect joined #perl6
23:22 prism joined #perl6
23:23 REPLeffect joined #perl6
23:31 REPLeffect joined #perl6
23:38 moritz ?eval <cheap fast right>.pick(2)
23:38 moritz ERRNOEVALBOT
23:38 Tene no evalbot :(
23:41 p6evalbot joined #perl6
23:41 * Tene runs an evalbot on his laptop.
23:44 ibrown heh
23:44 Tene ?eval <cheap fast right>.pick(2)
23:44 p6evalbot ("fast", "cheap")
23:44 ibrown that's weird.
23:44 moritz ?eval <cheap fast right>.pick(2)
23:45 p6evalbot ("fast", "cheap")
23:45 moritz ?eval <cheap fast right>.pick(2)
23:45 p6evalbot ("fast", "cheap")
23:45 moritz ?eval <cheap fast right>.pick(2)
23:45 p6evalbot ("right", "cheap")
23:45 ibrown interesting.
23:45 Tene ibrown: what's weird about it?
23:45 ibrown the order it printed the words in the first example.
23:45 Tene ibrown: what's weird about that?
23:46 ibrown well.  it poses the question inside my head of A: why'd it pick fast first, then cheap?  when fast was the 2nd element, and cheap was first, then i wondered why fast was always before cheap.
23:46 moritz ?eval ('a' .. 'f').pick(*)
23:46 p6evalbot ("b", "a", "e", "d", "c", "f")
23:47 moritz ?eval ('a' .. 'f').pick(*)
23:47 p6evalbot ("f", "c", "b", "e", "d", "a")
23:47 moritz ?eval ('a' .. 'f').pick(*)
23:47 p6evalbot ("a", "b", "d", "f", "c", "e")
23:47 moritz ibrown: pure coincidence
23:47 ibrown ?eval ('a'...'z').pick(2)
23:47 p6evalbot Error: ␤Unexpected "'"␤expecting operator or ")"
23:47 ibrown oh my bad
23:47 Tene too many .s
23:47 ibrown ?eval ('a' .. 'z').pick(2)
23:47 p6evalbot ("p", "l")
23:47 ibrown ?eval ('a' .. 'z').pick(2)
23:47 p6evalbot ("c", "e")
23:47 ibrown ?eval ('a' .. 'z').pick(2)
23:47 p6evalbot ("w", "u")
23:47 ibrown awesome
23:48 ibrown kinda what i had figured.
23:48 ibrown the reason it was sticking out, was because most likely i guess, the list had 3 vars to choose from heh.
23:48 ibrown and coincedence
23:48 Tene *nodnod*
23:48 ibrown so. question tene.
23:48 ibrown practical non-web example of using .pick
23:49 moritz writing contracts ;)
23:49 moritz <fast cheap right>.pick(2) # didn't I tell you?
23:49 ibrown hahaha
23:50 Tene ibrown: @cards[(1..52).pick(*)]
23:51 ibrown tru for dealing cards, rolling dice
23:51 Tene Any place where you want a random item from a set
23:51 moritz which is the same as 'use List::Util qw(shuffle); @cards = shuffle @cards;' in p5
23:52 ibrown i haven't ran across the need to ever do that in a script heh.  is that odd?
23:53 * moritz has
23:53 ibrown except web ;)  figured it might have been one of those things i was like, missing out on
23:54 ibrown for example: i learned today....
23:54 ibrown that in p5... you can create a scope w/out the requirement of a conditional
23:54 ibrown or routine.
23:54 ibrown never knew that.....
23:54 moritz most languages allow that
23:54 ibrown aye
23:54 moritz even c (C99 at least... )
23:54 ibrown cause i knew for example c could do that
23:55 ibrown and i never really thought, i guess abt using that in C.
23:55 ibrown so for example: my file slurp would be too many lines... i just needed a scope and local
23:55 moritz you can generally assume that perl can do everything that C can ;)
23:55 ibrown i guess that's what i get for looking stuff up on the intarnet, and not RTFM so much
23:56 ibrown i'm no good at condensing my code to fewer lines.
23:56 moritz use File::Slurp; # there's a module for every task ;)
23:56 moritz anyway, I'm off to bed ;)
23:56 ibrown tru.  but local $/ is just as easy... nite mang.

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo