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