pugscode.org <Overview Journal Logs> | r1773/winxp: 587/4256, smoke/win2k (occasional): xrl.us/fqum (214/4453, r2198) Mac OS X (62/4459, r2116) | pugs.kwiki.org Set by theorbtwo on 21 April 2005. |
|||
00:35
nothingmuch_ is now known as nothingmuch
|
|||
nothingmuch ♥ Set::Object | 00:39 | ||
00:42
sekimura_off is now known as sekimura
|
|||
nothingmuch | *yawn* | 02:27 | |
nothingmuch goes to sleep | |||
mugwump tucks nothingmuch in | 02:33 | ||
nothingmuch changes his mind actually | |||
mugwump: Class::ISA isn't necessary in the spork fix | |||
we only need to traverse one namespace level | |||
mugwump | ok, well that makes it a lot simpler :) | 02:34 | |
nothingmuch | indeed =) | ||
otherwise i'd have used Devel::Symdump->rnew(ref $self) | |||
btw, if Spork want Spiffy and Spoon and Kwiki and whatnot | |||
why not Devel::Symdump too? | |||
mugwump | only a probably irrational tendency to see a module name like that and think "that's for development, not 'production' code" :) | 02:35 | |
nothingmuch agrees that it's wrongly named | |||
it should be Symbol::Traverse | |||
mugwump | Yes - introspection isn't development only | 02:37 | |
nothingmuch ponders writing Class::Methods::Suicidal | 02:43 | ||
methods that happen once per instance | |||
and then then call SUPER:: | |||
nothingmuch really goes to sleep | 02:55 | ||
gantrixx | so I'm just starting to fool around with Perl6 | 04:06 | |
I've downloaded and build parrot | |||
how do I get Perl6? | |||
this channel has a lot of people not talking | 04:08 | ||
mugwump | we're thinking | ||
obra | we're also sleeping | 04:09 | |
gantrixx: www.pugscode.org | |||
gantrixx | so is there a daily build I can dowload? | ||
mugwump | we're not doing binary releases of pugs yet... after 6.28, perhaps | 04:10 | |
some people are though | |||
gantrixx: you'll also need ghc 6.4 or newer | 04:11 | ||
gantrixx | ghc? | 04:12 | |
I don't even know what that is | |||
Here is my concern folks | |||
I've been using perl for a long time | |||
I love perl, but ther is a stong move toward python advocacy | 04:13 | ||
I believe that Perl6 will address all the shortcommings of perl5 and hopefully will obsolete python | |||
obra | gantrixx: perl6 is still in the early development phase. It has a way to go. | 04:14 | |
a long way, even | |||
gantrixx | I'm getting ready to start a contract with a 10 year development cycle and I have to make an arguement to the powers that be to stick with perl5/6 and not use python | ||
mugwump | gantrixx: that's a fairly long cycle :) | ||
gantrixx | DoD, c'est la vie | ||
obra | do you expect to switch languages midstream? | 04:15 | |
(perl5 to perl6) | |||
gantrixx | so they don't want to invest in a lot of perl development if in 5 years everyone is using python and perl5 is not supported | ||
yes, I do expect to start off in perl5 and then migrate to perl6 | |||
mugwump | hmm, start in ruby perhaps. | 04:16 | |
ruby -> perl 6 will be easier (IMHO) than perl 5 -> perl 6 | 04:17 | ||
Sure, Larry's doing his Perl 5 to Perl 6 converter and all, but I think it will suffer from the same problem as the shell to Perl converter | |||
gantrixx | if it can't be done in C/C++, Perl, and HTML then I don't think it needs to be done | 04:18 | |
mugwump | sure, I understand that. | ||
gantrixx | I'm tired of relearning the tools of the profession every 3 years | ||
so do I spend my time learning Perl6 or Python | 04:20 | ||
because there are a lot of the software engineers that are advocating python | |||
mugwump | That choice is a no brainer really, after all... | 04:21 | |
obra | It does have a big advantage over perl6. | ||
gantrixx | I guess they are trying to predict 5 years in the future | ||
mugwump | "Not having a choice streamlines the thought process" -- GvR | ||
obra | It exists now. | ||
gantrixx | seriously? you would choose Python over Perl6? | ||
obra | If I had to write production code in the next six months? Hell, yes. | 04:22 | |
gantrixx | that is why I'm investigating Perl6 now to see if I should stick with the Perl advocates or jump in with the Python guys | ||
obra | I'd prefer perl5, but if I was asked to pick one or the other. | ||
perl6 is a development project. Autrijus runs pugs in production. But he's special ;) | |||
gantrixx | well of course we would use Perl5 now, but 5 years from now we would be writting in Perl6 | ||
mugwump | there are lots of programming constructs that can't be expressed simply in python due to GvR's insistence not to include any higher order stuff | 04:23 | |
gantrixx | so do you think Perl6 will really be ready Q3 2005? | 04:25 | |
or is this another mozilla project? | |||
mugwump | gantrixx: have a look at the pugs codebase and examples, a serious amount of the language is already working | ||
obra | gentrixx: how much time can you volunteer to help perl6 along? | 04:30 | |
gantrixx | They will allow me to donate some of my Perl6 work on the job back to the community | 04:34 | |
"some" | |||
it is a DoD contract | |||
but if I write an snmp module that is generic, they don't mind if I donate that back to the community | |||
mugwump | the challenge will be writing the Perl 5 code in a way that can be easily ported to Perl 6 | 04:35 | |
And making sure your test suite is *comprehensive* enough to spot interpreter bugs | |||
gantrixx | well, to be honest, it isn't uncommon to completely rewrite some stuff so I'm not that worried about it | ||
what is the glasgow haskel compiler? | 04:37 | ||
stevan | gantrixx: Pugs is written in Haskell | ||
mugwump | haskell is a functional language, a dialect of ML | ||
stevan | so you need it to compile pugs | 04:38 | |
gantrixx | why not, we are short on reinvented wheels | ||
stevan | gantrixx: I think you will have a hard time future-proofing a 10 year project | 04:39 | |
mugwump | For instance, if you were to use Class::Tangram as an accessor generator package, it would be fairly trivial to mechanically convert the Class::Tangram class definitions to Perl 6 Class definitions | 04:40 | |
stevan | and I would be surprised if you didn't re-write major portions of it regardless of the language you use | ||
mugwump | (not to say that Class::Tangram is as comprehensive as Perl 6 Classes,Roles,etc) | ||
gantrixx | perl5 will be obsolete by the time this thing goes live, so the question is will Perl6 be the way to go or is it Python | ||
stevan | gantrixx: when is it going live? | 04:41 | |
perl5 will be around for many years to come | |||
perl 5.005 is still on many prod machines | |||
gantrixx | the development will be done in like 5 years or so | ||
but it doesn't actually reach full maturity for 10 years | |||
at least that is what the "plan" says | 04:42 | ||
I worked on Iridium too and in 10 years when we delivered it, it was already obsolete | |||
so the plug could be pulled, hell this will span 2 more presidential administrations | |||
stevan | gantrixx: that is a rather long schedule | ||
gantrixx | so was putting a man on the moon | 04:43 | |
it's a 10 year contract, what else can I say | |||
stevan | gantrixx: thats a good thing, I am just not used to anything that long | 04:44 | |
stevan tends to work in months or weeks | |||
gantrixx | DoD stuff is like that | ||
they will spend 5 years testing it | |||
stevan | gantrixx: I won't ask you any details,.. top secret and all | ||
gantrixx | probably part of that contract is the initial maintainance phase | ||
then they usually bid out continued maintainance | |||
it does require a clearance | 04:45 | ||
and believe it or not the DoD is very accepting of open source technology | |||
autrijus | rehi. | ||
stevan | well if you prototyped in perl5, with an eye towards perl6 ... | 04:46 | |
by the time you were ready Perl6 might be done | |||
morning autrijus :) | |||
gantrixx | I think they are tired of companies going out of business and being left with no support | ||
autrijus | I just read the backlog of yesterday :) | ||
stevan | gantrixx: it makes a lot of sense | ||
autrijus | it's curious how NathanJY happened to stop speaking altogether when I joined the channel :) | ||
gantrixx | I wish I could tell you some of the stuff that is out there and the old old unsupported technology it is built on | 04:47 | |
autrijus | stevan: btw, great work on force_todo | ||
stevan | gantrixx: my father worked for the DoD, I am familiar with how messed up in can get :) | ||
autrijus: thanks :) | |||
I actually think it is speeding things up (or maybe it is my imagination) | |||
autrijus | that may very well be the case | ||
gantrixx | it can be a mess of inefficiency and red tape, but my experience is that that is the maintainance part | ||
autrijus | since there's no extra fileread/processing for each test | 04:48 | |
gantrixx | the development part is pretty much a ball buster | ||
stevan | autrijus: yes, what bothered me was that the greatest penalty was for files which did not use it | ||
gantrixx: I can imagine, I recently read about FAA dev standards, crazy stuff | 04:49 | ||
gantrixx | oh now that is something I can talk about | ||
I've done some work for the FAA too | |||
stevan | autrijus: I am also in the process of removing the todo_* functions, and added a todo named param | ||
it should slim down Test.pm a bit more | |||
autrijus | stevan: yup, I saw that. great | ||
I'm fixing parsefails left and right | |||
stevan | autrijus++ | 04:50 | |
autrijus | but the cxt/typ patch looks like a keeper | ||
stevan | good | ||
mugwump | is that the GADT-based parser change, autrijus ? | ||
gantrixx | there are strict requirements on mission critical parts on an airplane. now adays much of "parts" are software, so the FAA requires that all code be hand reviewed by and outside group | ||
stevan | gantrixx: I have always been interested in embedded work, but my C skills are pretty sad | ||
gantrixx | so companies like Honeywell that write autopilots subcontract this obligation out a bunch of flunkies | 04:51 | |
autrijus | mugwump: no actually... it's a separation of Cxt (context) and Type from String | ||
mugwump: previously I got them all messed up. Juerd enlightened me | |||
mugwump: one good thing from this is that we cleanly support junctive types | 04:52 | ||
stevan | junctive types... mmmmm | ||
I still need to find a place to use them,... maybe somewhere in hangman, just to be gratuitous | |||
mugwump | junctive types, is that like 1`Oz|1`m|1`orange|etc ? | 04:53 | |
autrijus | mugwump: no, more like | ||
mugwump | or just junctions | ||
gantrixx | nice talking to you guys | ||
stevan | sub foo (Str|Bool $bar) | ||
autrijus | sub foo (Int|Str $a) | ||
gantrixx | I have to go | ||
autrijus | ciao gantrixx :) | ||
sub phash (*@a) returns Array&Hash { ... } | 04:54 | ||
stevan | autrijus: I didnt get that haskell book, I decided to just order Algorithms instead | ||
autrijus shudders at the thought of phash | |||
stevan: cool | |||
stevan: hm, I'm seeing | 04:55 | ||
mugwump has a little moment stomaching that concept | |||
autrijus | $ ./pugs -MTest -e 'ok(1)' | ||
ok 1 - pugs: cannot cast from VRef <Scalar::Const> to [Char] | |||
fixing | |||
stevan | autrijus: it worked for me (I think I have the latest code too) | 04:56 | |
hmm, even with this: pugs -I ext/Test/lib/ -e 'require Test; ok(1)' | 04:57 | ||
autrijus | that works for you? | ||
stevan | yes | ||
autrijus | weird. | 04:58 | |
stevan | but you know,.. I may not have the latest build | ||
either way I have to go to sleep as I am starting to see double | |||
autrijus | that's fine... I'll figure it out | ||
see you :) | |||
stevan | be back in ~8 hours :) | 04:59 | |
bsb | Is phash pronounced /fash/? If so, I'll shudder too | 05:06 | |
autrijus | bsb: it's pronounced "pseudohash" | ||
bsb | or p6opaque? | 05:07 | |
autrijus | one of the gravest peril known to camelkind | ||
bsb | I get it now, Array&Hash | ||
If I make pugs segfault, how do it tell? | 05:13 | ||
s/how/who/ | |||
autrijus | me | ||
do you have a one-line test case? | |||
bsb | pugs> ? | ||
Segmentation fault | |||
is there and out of band way to send build info and context? | 05:14 | ||
mugwump points bsb at nopaste.snit.ch:8001 | |||
autrijus | bsb: is this 6.2.0? | ||
bsb | yes | ||
autrijus | bsb: it's a known issue that has since been resolved | ||
bsb | great | 05:15 | |
obra | Hey glasser | 05:17 | |
Huskie | Hi I need some help with some parsec code | 05:18 | |
bsb | Another one: pugs> none(1).pick # returns 1 | 05:19 | |
autrijus | bsb: do you have svn installed? | 05:20 | |
Huskie | any lambda folks that could help me..thx | ||
autrijus | bsb: and may I make you a committer so you can add the failing test to t/junctions? :) | ||
Huskie: yes? | |||
Huskie | how can i paste code to show u | 05:21 | |
autrijus | perlbot: nopaste | ||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
Huskie | pasted to sial.org/pbot/9574 | 05:23 | |
my ? is how i would call my eval function on the AST | |||
bsb | yeah to svn, I'm rebuilding. Ok, I'll fix the test | 05:24 | |
autrijus | bsb: are you a committer? if not, can you give me your email addr so I can send an invitation to you? | 05:25 | |
Khisanth | given the rate of change is there actually a reason to use pugs releases instead of from SVN? :) | ||
bsb | bsb at bereft dot net | 05:26 | |
What prodecure do I follow to ensure I'm not making things worse? just make test? | |||
Huskie | autrijus, do you see my pasted code? The last line is what I would like to use but gives me an error | 05:27 | |
autrijus | bsb: you can't possibly make things worse. but yes, "make test" works; after "make install" you can also simply run pugs on selected tests | ||
Huskie: what's the error msg? | |||
Khisanth: yes, the trunk may occasionally receive huge patches that kills the tree :) | |||
Huskie | Couldn't match the rigid variable `a' against `CT' | 05:28 | |
`a' is bound by the type signature for `run' | |||
Khisanth | chainsaw patches | 05:29 | |
autrijus | Huskie: your signature should not be | 05:31 | |
Parser a | |||
it should be | |||
Parser CT | |||
Huskie: when in doubt, remove the signature and let GHC figure it out for you | |||
bsb: invitation sent. welcome barod! | 05:32 | ||
err, welcome aboard! | |||
Huskie | thanks a lot autrijus! It solves the problem. | 05:33 | |
and thanks for the inspiration with your work | |||
autrijus | no prob :) | 05:34 | |
05:58
chady_ is now known as chady
|
|||
Huskie | autrijus, any pointers on how to output code from an AST | 06:03 | |
autrijus | Huskie: depends on your target code | 06:04 | |
target language, rather | |||
Huskie | I have an idl compiler that successfully builds an AST and i need to generate stub C code from it | 06:05 | |
for ex, interface { int func(int a); } | |||
autrijus | oh. you need to write an AST reduction module | 06:06 | |
look at src/Pugs/Compile/Parrot.hs for an examples | |||
autrijus needs to run. bbiab | 06:07 | ||
Huskie | cool.. looks like i have to understand PrettyPrint | 06:08 | |
bsb | What should "(sub {3} | sub {2})()" produce in scalar context? | 06:13 | |
Warnocked on p6l... | |||
.. warnocked, everywhere .. :( | 06:19 | ||
autrijus | bsb: put it in as a test. | 06:22 | |
bsb | OK. is( (sub {3} | sub {2})(), (3|2)) and fix if the answer changes | 06:23 | |
autrijus | not sure if you can compare junctions using is | ||
probably flatten both sides using .values or something. | |||
bsb | yeah, that's what the other tests do | 06:24 | |
autrijus | add yourself to AUTHORS too, if you're not | 06:25 | |
already there | |||
* `(sub {3} | sub {2})()` implemented. | |||
enjoy. | |||
work & | |||
bsb | implemented faster than the test, ++ | 06:27 | |
06:37
castaway_ is now known as castaway
|
|||
gaal | kungfuftr: awake? | 07:04 | |
ingy | hola | 07:16 | |
ingy just finished a flippin sweet test framework module | 07:17 | ||
gaal | hey ingy | 07:18 | |
i'm cleaning up the makefile a bit | |||
i was bothered by how 'make smoke' tried building the targets again and again | |||
my findings: | |||
ingy | pause.perl.org/incoming/Test-Chunks-0.12.tar.gz | ||
gaal | 1. the smoke target depended on util/run-smoke.pl, that looks bogus to me | 07:19 | |
2. that script always runs make explicitly :) | |||
ingy | ouch | ||
do you need help or something/ | |||
gaal | 3. 'make optimized' and 'make unoptimized' are what the lovely manual call "double colon" rules, whcih basically means "always run this rule (even if its deps are fulfilled)". | 07:20 | |
www.gnu.org/software/make/manual/ht...html#SEC50 | |||
i love GNU docs. not. | |||
anyway, run-smoke should probably no longer be a script; it should be entirely a make target. rihgt? | 07:21 | ||
ingy | well I haven't looked at the Makefile in sometime | ||
gaal | question is, is there any reason for the double colons? i wonder who instated them. | ||
ingy | double colon rules are for when you want two or more rules with the same target | ||
foo :: this | |||
foo :: that | 07:22 | ||
gaal | they just waste time relinking, for me, because they also rerun the rule always. | ||
ingy | double colons are crucial | ||
gaal | well, they aren't used that way for the (un)?optimized targets. | ||
ingy | to be able to add on to rules genned by makemaker | ||
gaal | aha! | 07:23 | |
ingy | :) | ||
gaal | i knew there was a reason i was asking you :) | ||
ingy | otherwise just use single colons for non MM targets | ||
=) | |||
I need to port Test::Chunks to Perl6 | |||
gaal | okay, i'll finish fixing this up then. | 07:24 | |
other than environment, is there a way to pass an option to a rule? e.g. the smoker script used to 'make optimized' hardcodedly; i want it to choose the pugs target in a saner way. | 07:26 | ||
autrijus | gaal: "make smoke TARGET=optimized" ? | 07:53 | |
gaal | yes, that's what i ended up doing. | ||
i hope it's portable though :/ | |||
actually i was doing something slightly different; because if you do the above you can't omit the TARGET setting (i think?) | 07:55 | ||
i added an ifdef in the $pugs target to check $(PUGS_OPTIMIZE), expecting 1, 0, or no def at all; and build -O1, -O2, or nothing from it. | 07:57 | ||
r2208 - i hope i didn't break anything :) | 08:14 | ||
mj | WinXP, r2207 - 159/4468 subtests failed, 96.44% okay. | 08:17 | |
autrijus | gaal: you broken everything ;) | 08:27 | |
ifdef is a GNUism. | |||
gaal | that's too bad :) | ||
autrijus | please fix :) | ||
gaal | sorry, reverting. | 08:28 | |
autrijus | no prob | ||
gaal | is there a preferred svn command for reverting a patch? or should i just svn up -r2207 and ci the old versions? | 08:30 | |
autrijus | gah, that again | ||
src/Pugs/Eval.hs:226:48: My brain just exploded. | |||
gaal: you can apply the reverse change via svn merge | |||
gaal: but just svn up -r2207, cp somewhere, svn up, mv somewhere back, ci | |||
gaal | done as r2209. now to figure out how to do this portably. | 08:33 | |
autrijus | :) | 08:34 | |
kungfuftr | gaal: moo? | 08:43 | |
gaal | moose! | ||
kungfuftr | lo | ||
gaal | i was doing some changes to the smoke target, but they turned out to depend on non-portable features of gnu make. | 08:44 | |
that is, | |||
the way i did it depended etc. | |||
kungfuftr | ah | ||
gaal | i'm sure it can be done in an even uglier and more portable way. | ||
kungfuftr | $^O is horrible, but handy | 08:45 | |
gaal | the thing is, make smoke relinks pugs needlessly. | ||
no, the unportability was in make itself. | |||
there is one improvement i'd like y'all to try though. | |||
can you edit your Makefile.PL and change "optimized :: " to "optimized :" ? | 08:46 | ||
(remove one colon) | |||
on my systems that alone is a big win :) | |||
..after doing that rebuild the makefile and do make smoke. | |||
it shouldn't relink pugs if you alreadt had it built. | 08:47 | ||
kungfuftr | um... it'd have to be in a few hours time... have to do urgent work on search engine indexer | ||
gaal | k later. | 08:48 | |
pasteling | "bsb" at 203.214.67.82 pasted "has_ghc_package using $ENV{GHC_PKG} || $ENV{GHC}" (20 lines, 710B) at sial.org/pbot/9581 | 08:55 | |
bsb | does that patch look reasonable? | ||
I'm trying to get started here, bear with me | 08:56 | ||
autrijus | I'd suggest to use | 08:57 | |
/\bghc(?=[^\\\/]*)/ | |||
in the | 08:58 | ||
+ $ghc_pkg =~ s/^ghc/ghc-pkg/ # ghc-6.5 => ghc-pkg-6.5 | |||
line | |||
err | |||
/\bghc(?=[^\\\/]*$)/ | |||
magnetic | hi | 09:02 | |
autrijus | yo magnetic | 09:04 | |
bsb | ok. svn ci comes next, here we go | ||
autrijus | I wonder if I should spend any time replying to BrowserUK on perlmonks. | ||
gaal | autrijus, what thread? | 09:05 | |
autrijus | gaal: www.perlmonks.org/?parent=448319;node_id=3333 | ||
gaal | he's quite the intelligent/thoughtful person; in my experience discussions with him were always worthwhile. | ||
autrijus | gaal: shuffling was one of the few cases that GHC performs much much better than perl. | ||
gaal | that doesn't mean he's always right :) | 09:06 | |
nothingmuch_ | good evening | 09:07 | |
gaal | now i'm interested in how to do this efficiently in haskell myself :) | ||
so i hope you do reply :) | 09:08 | ||
autrijus | maybe you can write it as an exercise :) | 09:11 | |
gaal | :) | 09:12 | |
autrijus | I replied. | ||
gaal | autrijus++ | ||
nothingmuch_ | autrijus: some guy came in here yesterday, demanding that we switch to C and scrap parrot | 09:19 | |
maybe we can meet in the middle? | |||
we could implement with only the most monadic C like constructs, and everyone is happy | |||
09:19
nothingmuch_ is now known as nothingmuch
|
|||
autrijus | nothingmuch: the joke is no longer funny :) | 09:20 | |
nothingmuch | beh! | ||
so how is everyone? | 09:21 | ||
castaway | nm! | ||
gaal is listening to Abbey Road and pondering Autrijus' challenge. | |||
nothingmuch | si! | ||
castaway | Happy Friday! | 09:22 | |
nothingmuch | happy friday to you too! | ||
autrijus | I'm just fine :) trying to get more infinite loops fixed | ||
nothingmuch | huraah | ||
gaal | at some level, obviously we can do in-place shuffle because we operate on perl types in place. | 09:23 | |
so waht i need it sems is to wrap a haskell array in monadic.. thingie, | |||
and shuffle that. | |||
my problems are straightforward so far: | |||
1. how to wrap the arr^H^H^Hlist in a monadic thingie | 09:24 | ||
integral | an array of IORefs? | ||
castaway | :) | ||
gaal | 2. how to unwrap it afterwards | ||
1.5. how to shuffle elements in it. | |||
integral: IORef is in the language? or is that a pugsish type? | |||
integral | it's in the language | 09:25 | |
GHC also has Data.Array.IO and Data.Array.ST | |||
nothingmuch | darcs get nothingmuch.woobling.org/Algorithm-...cy-Objects | ||
gaal | trick is to do it w/o copying over the whole list. | ||
otherwise we didn't win much. | 09:26 | ||
nothingmuch | tests are not fully converted yet though | ||
autrijus | gaal: try to think it this way | ||
nothingmuch | but it may be useful for someone | ||
autrijus | gaal: you read a bunch of Bugs wBufs via readBuf | ||
gaal: you read a bunch of Bufs via readBuf | |||
each is a Ptr | |||
then you shuffle those Ptrs randomly | |||
then you print them out. | |||
the easiest way is perhaps to read the entire file into mem as a CString | 09:27 | ||
gaal | well, okay, but then i have to have had my data in a particular format, not a native @array. | ||
autrijus | gaal: uh, you are doing this in pugs? | 09:28 | |
not haskell as I thought? | |||
gaal | no, in haskell; i'm thinking of the comparison to perl that BrowserUk was making. | ||
though i guess in that case we can take the problem on his terms and indeed read the file *as* anything we like. | 09:29 | ||
autrijus | well, you can do the naive thing and see how slow it is. | ||
use getLine repeatedly until eof | |||
into IO [String] | |||
err, I mean [IO String] | |||
gaal | of course it'll be slow, that was his point, no? | ||
nothingmuch | not IO [String]? | 09:30 | |
autrijus | hrm. | 09:31 | |
okmij.org/ftp/Haskell/perfect-shuffle.txt | |||
try merging it with the most naive | 09:34 | ||
lines . getContents | |||
I think it will be sufficiently fast. | |||
just try it and see :) | |||
Juerd | GOOD MORNING EVERYONE | 09:36 | |
:) | |||
autrijus | hey Juerd-san | ||
Juerd | Hello | 09:37 | |
What is -san? | |||
castaway | Good nearly-midday Juerd | ||
autrijus | Juerd: -san is like Mr. | ||
Juerd | autrijus: In what language? | ||
In any case, hello autrijus-san :) | 09:38 | ||
castaway: That is what is so good about this morning - it's already almost over. | |||
kungfuftr | (search indexing)-- # takes too long and too many resources | 09:39 | |
09:39
joepurl_ is now known as joepurl
|
|||
castaway | Juerd, not mine Im afraid, I'm running out of time, and I actually wanted to go home early.. | 09:40 | |
Juerd | I'm going to the office late | 09:41 | |
castaway | lucky | ||
Juerd | That works much better than going home early | ||
autrijus | Juerd: in japanese :) | ||
Juerd | It's one of the benefits of not having an employer telling you the times to work | ||
autrijus: I see | 09:42 | ||
castaway | I dunno, I prefer to relax when its over and done, and not before I get started .) | 09:44 | |
Juerd | I prefer to jump right into bed after work ;) | ||
castaway | each their own :) | 09:45 | |
castaway goes back to DB grumbling | |||
Juerd | My addiction won't let me though | ||
Juerd now has domed labels with his company logo | |||
hurrah | |||
Let the name branding begin. | |||
They made the 1" x 1" ones 22mm x 22m, so those are useless. | 09:46 | ||
But the rectangular ones are just the perfect size. | |||
bsb | Reading from L<S03/"Junctive operators"/"Junctions are specifically unordered"> | ||
castaway | domed ? | 09:47 | |
Juerd | castaway: A layer of plastic, as on computer case badges | ||
It makes the labels look a little like Mac OS X aqua buttons :) | 09:48 | ||
kungfuftr | Juerd: do we get free ones? | ||
bsb | test: for all(@foo) { %got{$_}; }; | ||
Juerd | kungfuftr: What would you do with labels that have my logo on it? :) | ||
bsb: Do junctions in list context flatten, then? | 09:49 | ||
kungfuftr | Juerd: use them as rubber feet for my desktop unit | ||
=0) | |||
Juerd | Didn't you mean to say for all(@foo).values { ... }? | ||
kungfuftr: Heh, they were a bit too expensive to be used out of sight :) | |||
But they'd work well as rubber anti-slip feet. | |||
bsb | Juerd: Don't think so | ||
I'm going from L<S03/"Junctive operators"/"Junctions are specifically unordered"> | 09:50 | ||
Which seems to be saying something unusual | |||
Trying to check my reading of it | |||
gaal | autrijus, the doc you linked to still doesn't do in-place ordering, does it? if you have a list in memory it won't shuffle it in place. if you have the data on disk, you read it into a tree and extract a shuffled list, which is a copy of the data - sure you could do a list of pointers to the data, but you stil have to allocate a new list. | 09:52 | |
s/ordering/shuffling/ | |||
castaway | oh, nifty | ||
bsb | It looks like `for all(1,2) { ... }` can run the block in parallel | 09:53 | |
Juerd | bsb: Could be made to run the block in parallel. | ||
autrijus | gaal: uh, not sure what you mean. | ||
gaal: sure it doesn't do inplace ordering | |||
if you want inplace ordering, try IOArray :) | 09:54 | ||
gaal | think of it from the perl starting point. you have an @array, and you can do shiffle \@array. | ||
autrijus | IOArray of String | ||
gaal | looking up.... | ||
autrijus | sure; if you have an IOArray, you can shuffle IORef IOArray | ||
it's in Data.Array.IO | |||
gaal | Data.Graph.Inductive.Monad.IOArray ? | ||
autrijus | no, IOUArray in Data.Array.IO | 09:55 | |
IOU is extremely fast | |||
bsb | Juerd: Yes, so in the non-parallel case should `for all(1,2) { %got{$_} = 1; };` set %got{1}=1 | ||
autrijus | because it's unboxed, so is quiv. with raw C code | ||
gaal | they should have named it EFArray then. | ||
bsb | ? | ||
autrijus | gaal: heh. | ||
IO means it's in the IO monad; U means it's unboxed | |||
but STUArray is probably enough for you. | |||
STU may or may not be even faster | |||
gaal | that's for STUpendously fast (maybe) array, yes? (just checking) | 09:56 | |
autrijus | you can use Data.Array.MArray as the interface code. | 09:57 | |
no... ST means it's in the ST monad. | |||
ST monad maintains state, but does not do input/output. | |||
Juerd | bsb: I don't know how for $junc should behave. | 09:58 | |
bsb | Anyone else? for all(1,2) { %got{$_} = 1; }; | 09:59 | |
It's not clear in s03 | 10:00 | ||
gaal | I want... MArray (STUArray s) (Ptr a) (ST s) ? | ||
autrijus | gaal: something like that | 10:01 | |
gaal: instead of Ptr, use CStringLen | |||
I think a STUArray of CStringLen is probably fast enough. | 10:02 | ||
you can read the entire file as a [CStringLen], convert it to a STUArray, sort it in place, then output it | |||
s/sort/shuffle/ | 10:03 | ||
castaway waves at broquaint. | |||
autrijus | still I don't think inplace shuffling is the best way to go | ||
broquaint waves back | |||
autrijus | I think just randomising the indexes is good enough. | ||
gaal | autrijus, that depends on what you're trying to do, of course | ||
autrijus | gaal: I thought we are optimising for speed | 10:04 | |
gaal | yes-- | ||
Juerd | bsb: +all(1,2) is 1 | ||
gaal | but maybe the thingie receiving the shuffle needs an actual list and can't be changed? | ||
Juerd | Oh, no it's not. | 10:05 | |
gaal | oops, i downmoosed one of my favorite bands. yes++ then. | ||
autrijus | gaal: hm? | 10:06 | |
gaal | suppose you have some function you dontcontrol that | ||
wants an ordered list | |||
you can't change the api; you have data and you want to feed it to that function. | 10:07 | ||
autrijus | sure; so you just pass it to sort() | ||
gaal | sort? shuffle() you mean? | 10:08 | |
autrijus | I'm confused | ||
18:07 < gaal> wants an ordered list | |||
Juerd | autrijus: Why with %hash{all(4,5,6)}, is all(4,5,6) a string? | 10:09 | |
autrijus | Juerd: that is a bug. | 10:10 | |
write a test and commit it? | |||
bsb | Juerd: it seems like for handles Junctions specially in s03 | ||
gaal | i meant it expects a list where the order matters, not that it expects sorted input | ||
brb | |||
Juerd | I don't know what it should do - stringify as ~all(...) does, or use the junction, or result in all(%hash{4,5,6}) | 10:11 | |
autrijus | Juerd: I'm of the opinion that it should autothread. | ||
deref is just conceptually a method call | |||
gaal: I think I'll speak with code :) | 10:13 | ||
brb too | |||
Juerd | autrijus: What does autothread mean for a hash key? :) | 10:15 | |
autrijus | %hash.circumfix<{}>(all(4,5,6)); | 10:18 | |
same as | |||
all(%hash{4}, %hash{5}, %hash{6}) | |||
I'm pretty sure that's the way to go | |||
Juerd | Ok. | ||
autrijus | & | ||
Juerd | And how does assignment to a junction work? | ||
Since %hash{$conjunc}++ is kind of likely to be used, I think. | 10:19 | ||
Assign to each of the elements, and autothread around that again? | |||
all(%hash{4} = 1, ...) | |||
broquaint | So does %hash{4,5,6} (hash slice?) behave the same as %hash{all(4,5,6)} (junction of a hash slice?) ? | 10:22 | |
Not quite, I guess. | 10:23 | ||
nothingmuch | hola theorbtwo | 10:38 | |
theorbtwo | Hola, nothingmuch! | ||
nothingmuch | what's new? | 10:39 | |
theorbtwo | Not too much. | ||
My eyesight is starting to go bad. | |||
nothingmuch | in which sense? | ||
castaway | too much looking at computer screens .. | 10:40 | |
broquaint | Get a projector? | ||
nothingmuch | projectors are hard to read from | 10:41 | |
theorbtwo | My monitor looks very fuzzy. | ||
castaway | .. and find your glasses.. | ||
nothingmuch | theorbtwo: LCD monitors help | ||
theorbtwo hmms. | |||
nothingmuch | very sharp | ||
so you can lower brightness a bit | |||
good contrast | |||
theorbtwo | Yes, but are an expense we presently cannot afford. | ||
castaway | nothingmuch: you donating one? | ||
nothingmuch has one on his el-cheapo laptop | |||
and one on my desk at work | 10:42 | ||
also, i'd like to note that IMHO health comes before see hacking, etc ;-) | |||
theorbtwo | I haven't been doing much SEE hacking, that's mostly Jess. | ||
I should probably up my resolution and take breaks and all that jazz. | 10:43 | ||
castaway | (and thats stalling on lack of decent ways to test it atm) | ||
theorbtwo | Er, lower my resolution I mean. | ||
nothingmuch | breaks are important | ||
nothingmuch coughs | |||
castaway sighs and mutters "zealots" .. | 10:51 | ||
theorbtwo | BRB, restarting X. | 10:53 | |
Odin- | castaway: What sort? | ||
castaway | the annoying sort (daft convo about what "free" means, just because I quoted "db2 is free for personal use") | 10:54 | |
Odin- | Ah. | 10:56 | |
The sort I hang around. ;) | |||
castaway | feel free to join #eamcs :) | 10:57 | |
Odin- agrees that some people take it too far, but you can see where they're coming from, can't you? :> | 10:59 | ||
castaway | yes, and no.. to survive in this society, you need to learn to figure out people mean, without correcting them all the time.. (since 99% of the time, its actually quite clear) | 11:00 | |
being picky wont fix anything :) | |||
castaway wonders if he's given up :) | 11:01 | ||
Odin- | True. | ||
Which is what I meant by taking it too far. ;) | |||
castaway nods. | 11:02 | ||
castaway smooches theorbtwo | 11:06 | ||
theorbtwo | Miss me so soon? | 11:07 | |
castaway | yup | 11:08 | |
theorbtwo wonders what happened to his panel. | |||
castaway hasnt got it | 11:09 | ||
I paid for my muffin with the 19 5-cent pieces today, and he didnt even blink an eye, twas most disappointing.. | 11:11 | ||
(didnt count them either, though :) | |||
kungfuftr | (binary)-- # not human readable | 11:12 | |
can perl6 make binary readable please? | 11:13 | ||
=0) | |||
theorbtwo | pugs -e 'print 0b1001110' | 11:14 | |
Er, s/print/say/ | |||
kungfuftr | theorbtwo: heh, having to debug binary search index files, very fun | 11:15 | |
anywhos | 11:16 | ||
castaway | sounds like great fun | 11:17 | |
cognominal | arf, I used reply to p6l in mutt and I forget to delete the In-Reply-To and change the subjet. Not using aliases was false lazyness :( | 11:23 | |
sorry about that | |||
Juerd | cognominal: [email@hidden.address] is not that much typing. | 11:26 | |
I don't use aliases. | |||
nothingmuch_ | stevan: ping | 11:27 | |
kungfuftr | ($shit,$voodoo) := ("perl6","php"); | 11:31 | |
kungfuftr hides | |||
bah, wrong usage | 11:32 | ||
Juerd: i'm incorrect in usage... right? | |||
Juerd | Yes, Perl 6 isn't shit. | 11:33 | |
castaway | :) | ||
Juerd | Apart from that, I wouldn't know why the syntax would be wrong. | ||
kungfuftr | Juerd: swap melarky | ||
Juerd | As binding to a string literal makes sense, and probably makes it kind of like the "is const" thing. | ||
kungfuftr | $shit = "perl6"; $voodoo = "php"; ($shit,$voodoo) := ($voodoo,$shit); # more likely correct | 11:34 | |
again, could be wrong | 11:35 | ||
Juerd: wrong? | 11:36 | ||
11:36
chady is now known as chady_
|
|||
nothingmuch_ | ? | 11:36 | |
11:36
nothingmuch_ is now known as nothingmuch
|
|||
Juerd | kungfuftr: It'd be easier if you said what the hell you want it to do. | 11:38 | |
wolverian | language! | ||
kungfuftr | Juerd: it's to do with swapping the names of the variables without the copying... end result... $voodoo is perl6 and $shit is php | ||
theorbtwo | Anglais, por favor. | ||
kungfuftr | theorbtwo: voulez-vous couchez avec ta mere, ce soir? | 11:39 | |
theorbtwo | .oO(Huh?) |
||
castaway | say no :) | 11:40 | |
theorbtwo | No. | ||
castaway | I *think* "Do you want to have sexs with my mother, this evening" | 11:41 | |
kungfuftr | castaway: "will you sleep with your mother this evening?" | 11:42 | |
castaway | oh "your" .. even worse ;) | ||
kungfuftr | =0) | ||
castaway | ah well, right answer anyways.. | ||
cognominal | kungfuftr: either "voulez-vous coucher avec votre mxE8re" or "veux-tu coucher avec ta mxE8re?" | 11:43 | |
you can't mix "vous" et "ta" | |||
castaway | good point cognominal | ||
,) | 11:44 | ||
(language discussions on #gaia, btw :) | |||
kungfuftr | cognominal: you can mix them, since you might be talking to more than one person | 11:48 | |
etc. | |||
hhhmmm... though | |||
cognominal | that would be "voulez-vous coucher avec votre mxE8re" then :) | 11:51 | |
btw you are welcome on grou.ch #perlfr if you want to speak French. There is a #perlfr on freenode, but they are lamers | 11:52 | ||
nothingmuch | stevan: gong | 11:53 | |
nothingmuch wishes he'd wake up | |||
nothingmuch tries to speak french occasionally | |||
i started learning twice | 11:54 | ||
and forgot nearly all twice | |||
=( | |||
kungfuftr speaks far better french if he spends a day or so in paris, etc. | 11:56 | ||
cognominal | if you do come to visit the mongueurs... | 11:58 | |
or come to Marseille for the French Perl Workshop | 11:59 | ||
Juerd | kungfuftr: ($a, $b) := ($b, $a) swaps without copying. | 12:02 | |
kungfuftr: When there's no repetetion on the RHS, you can't speak of swapping. | |||
nothingmuch | kungfuftr: what is your opinion on that test model doc? | 12:09 | |
kungfuftr | nothingmuch: which one | 12:12 | |
nothingmuch | nothingmuch.woobling.org/test_result_model.pod | 12:13 | |
kungfuftr | Juerd: ah ha! so $voodoo would be "perl6" | ||
nothingmuch: not bad, though there should be no computated data within the model. | 12:18 | ||
theorbtwo | Hm? | 12:19 | |
How do you figure / why not? | |||
kungfuftr & # lunch! | |||
theorbtwo: ie: ratio... just give total, passed, failed, etc.... and to the computation elsewhere... would allow for weighting, etc. | 12:20 | ||
theorbtwo | If you want to compute it differently, you can compute yourself. | 12:21 | |
nothingmuch | i've thought about that long and hard | 12:22 | |
and thought that perhaps it is a good idea | |||
because the model must appear inconsistent in a simple way | |||
if it is inconsistent | |||
one could argue that a protocol with missing plan members has such cases which are failed | |||
theorbtwo | If you don't, the default is easy to use and good for most uses. | ||
nothingmuch | and a protocol could stub that | ||
i think that it's a simple concept | |||
and could be centralized into the model | |||
and the model would have the 'default' interface, which has stubs | |||
and perhaps a purer base class | |||
or a purer set of methods | |||
that don't stub | |||
but i think stubbing is very important for writing good display tools easily | |||
theorbtwo | So do I. | ||
nothingmuch | kungfuftr: you don't have to use ratio | ||
it's just that even Test::Harness gets it wrong some times | |||
these computations should be standardized | 12:23 | ||
and be put in one place | |||
and should be available by default | |||
theorbtwo | There's nothing wrong with having both an ->expected and ->unexpected method, which are defined to be the negation of each-other. There's a reason perl has both if and unless. | ||
nothingmuch | ... and that reason is readabilty | 12:25 | |
it's easier to read something that sounds more like english | |||
and there's a reason why people make fun of double negatives in english | |||
OTOH english has many logical ambiguities | |||
kungfuftr | nothingmuch: pugs.kwiki.org/?TestModel *shrug* | 12:33 | |
nothingmuch | sort of | 12:34 | |
why are you against computations, btw? | 12:35 | ||
kungfuftr | nothingmuch: blame mugwump... he enstilled a sense of pure data modelling into me | ||
nothingmuch | hmm | ||
normally I agree | 12:36 | ||
and I think that a pure data model *should* be accessible | |||
but i think that normally it shouldn't be the case | |||
kungfuftr | nothingmuch: a method to do it would be nice, but the actual data be pure? | ||
nothingmuch | yes, the underlying data is pure | ||
kungfuftr | ah... k | ||
nothingmuch | Test::Model isa Test::Model::Pure | ||
and Test::Model has data query methods that append or mark sub objects | 12:37 | ||
after taking them from the Test::Model::Pure superclass | |||
kungfuftr | yar, sounds good... encapsulation++ | ||
autrijus | rehi | 13:27 | |
Limbic_Region | lo | ||
autrijus | so I wasted some time writing shuffle.hs ;) | ||
Limbic_Region | autrijus - the last smoke Corion did showed 178 or so tests still failing - any idea what the number is now? | 13:28 | |
Additionally, did the refactor of context parsing raise any bizarre edge cases of non-dwymery? | |||
autrijus | Limbic_Region: something around that. | ||
Limbic_Region: yes, lots and lots of. | 13:29 | ||
Limbic_Region | those cases reported to p6.l ? | ||
clkao | autrijus: want to help make win32 build for beta2? | 13:30 | |
theorbtwo | Allo, autrijus! | ||
Limbic_Region was just hoping to get a summary | |||
autrijus | Limbic_Region: uh no, so far it's been cleared up by lwall and juerd | 13:31 | |
so, nothing language-shaking per se. | |||
although I did find out some weird cases with := semantics. still thinking about it | |||
theorbtwo | <autrijus> That doesn't look right. <larry> But it is! | 13:32 | |
autrijus | :D | ||
Limbic_Region | right - what I meant by cases of non-dwymery were rules that made sense at first and second glances but given situation X made no sense at all | ||
kungfuftr | autrijus: that operators/binding.t ? | 13:34 | |
autrijus | kungfuftr: yeah, it fails, I'm investigating | 13:35 | |
kungfuftr | autrijus: proabably the ($x, $y) := ($y, $x) i added | ||
Juerd | juerd.nl/filesize.png # I sometimes *love* KDE | 13:37 | |
(Not going to show you my pr0n archive, but I know now exactly which parts to clean up (hm, dubious)) | 13:38 | ||
theorbtwo | Autrijus, I'm starting to look at a more perlish (IE return whatever you want) eval_haskell, and I'm not sure how to implement it, and I'm also not sure I understand your Evallable design from meme.b9.com/cview.html?channel=hask...te=050416. | 13:39 | |
I was looking at possibly a largish valFromDynamic function, that takes a Dynamic (which is required to be a Typeable already) and makes it into a Val. | 13:41 | ||
stevan | pugscode.org <Overview Journal Logs> | r1773/winxp: 587/4256, smoke/win2k (occasional): xrl.us/fqum (214/4453, r2198) Mac OS X (160/4483, r2216) | pugs.kwiki.org | 13:41 | |
theorbtwo | pugscode.org <Overview Journal Logs> | r1773/winxp: 587/4256, smoke/win2k (occasional): xrl.us/fqum (214/4453, r2198), Mac OS X (160/4483, r2216) | pugs.kwiki.org | ||
stevan | nothingmuch: BANG!! | 13:42 | |
autrijus | theorbtwo: that looks promising enough | ||
theorbtwo: the Evalable design is orthogonal | 13:43 | ||
it's designed to make | |||
eval_haskell "'x'" | |||
eval_haskell "return 'x'" | |||
both work. | |||
by essentially adding the proper amount of lifting | |||
theorbtwo | Right. You could do that in valFromDynamic -- one is a Char, the other is an IO Char. | 13:44 | |
If you've got an IO a, then unsafePerformIO it, and get an a, and then do the normal thing on that. | |||
(Well, from a Dynamic IO a to a Dynamic a, hopefully.) | |||
(This assumes, of course, that I can figure out how to do that... I think it's dynApp, but I'm not sure, and dynApp seems to be undocumented.) | 13:45 | ||
autrijus | uh, valFromDynamic should probably not unsafePerformIO it. | ||
valFromDynamic :: Dynamic -> Eval Val | 13:46 | ||
theorbtwo | Oh, that also makes a lot of sense. | ||
autrijus | you can do typecasing based on typeOf. | ||
theorbtwo | Righ. | 13:47 | |
Right. | |||
autrijus | perl5 shuffle: | 14:15 | |
4.619u 1.010s 0:05.89 95.4% 10+79736k 0+0io 0pf+0w | |||
GHC shuffle: | |||
3.007u 0.038s 0:03.10 97.7% 323+359k 0+0io 0pf+0w | |||
autrijus proceeds to reply to BrowserUK | |||
Juerd | And pure perl 6 shuffle? :) | 14:19 | |
autrijus | I don't know :) | 14:20 | |
maybe we should compile it to parrot :) | |||
it may be even faster. | |||
Juerd | What do you think of Bool +$read|r to allow both the name 'read' and the name 'r'? | 14:21 | |
:read and :r | |||
Same thing. | |||
It doesn't play nice with precedence in the signature, but normal precedence plays no role there anyway. | |||
autrijus | I think it's a weird idea. | 14:22 | |
Limbic_Region | apparently gcc 4.0 has a brand new optimizer - wonder if that would affect the Parrot results *grin* | ||
autrijus | Bool +$read|$r maybe? | ||
I know! | |||
Juerd | autrijus: I had that before, and then I didn't like the redundant $ :) | ||
But I agree that it looks much more natural | |||
autrijus | hm | ||
what happens if the user gives both | |||
Juerd | Same thing as when the same name was used twice. | 14:23 | |
:read :read | |||
:read :r | |||
:r :read | |||
autrijus | k. | ||
Juerd | All exactly the same thing | ||
autrijus | I think the extra sigil is a win. | ||
Juerd | (And I don't know what happens then :P) | ||
autrijus: The problem with it is that aesthetically (because of precedence), I want to repeat the + too there | 14:24 | ||
And that leaves you with +$read|+$r, which is a lot of typing and linenoise | |||
And begs for +$read|?$r, which is impossible to work with :) | |||
But perhaps it's just my sense for aesthetics that needs adjustment | |||
autrijus | can you have | 14:25 | |
+$read|@r | |||
? | |||
Juerd | I'd have no idea how to interpret that | 14:31 | |
This is a good reason to either not repeat the sigil, or to enforce that it is the same | |||
s:2nd/ to// | 14:32 | ||
autrijus | gaal: perlmonks.org/?node_id=450426 | 14:34 | |
Limbic_Region | print rand 10, $/ for 1..1_000_000; # succinent | 14:41 | |
autrijus | yeah, and I could've used perl -wle or something :) | 14:44 | |
it's a bit of stretch to call the haskell version as a "port" though. | 14:45 | ||
Limbic_Region just realized who he was suggesting a shorter version too | 14:46 | ||
autrijus | because instead of sorting string refs, it sorts offsets | ||
Limbic_Region hangs his head since his golf'ing handicap is astronomical | |||
autrijus | but problem is perl5 doesn't even have that option; substr() into a multi-megabyte string is not a win | ||
theorbtwo | Hometime already, Corion? | 14:57 | |
Oh, I guess it is. | 14:58 | ||
theorbtwo doesn't have a clock on his screen at present. | |||
castaway sighs | 14:59 | ||
Corion waves from home. | 15:01 | ||
Another bad job well done. Cpansmoking can be such fon | 15:10 | ||
s!fon!fun! | |||
pugs.exe: cannot cast from VList [] to Handle -- I think I remember that bug ... It happens in t/pugsrun/02-dash-n.t and 03*.t - they both try to read from =<> | 15:11 | ||
autrijus | indeed. fixing | 15:13 | |
fixed | |||
ok, infinite loop gone. | 15:14 | ||
may I request another round of smoke? | 15:15 | ||
(r2217) | |||
Corion | Just smoked | 15:16 | |
r2216 - datenzoo.de/pugs/win2k.html | |||
autrijus | cool. then no need to | 15:17 | |
Corion | (and no infinite loop there, although abs.t still looks weird :) ) | ||
autrijus | ok. I think Pair wants to be Pair objects. | 15:21 | |
instead of VPair. | |||
sadly I need to crash now. gotta wake up real early tomorrow. :/ | 15:29 | ||
aiming for a weekend release, then | 15:30 | ||
autrijus waves & | |||
Corion | good night then :) | 15:31 | |
Yay. async() and system() now work together it seems! | 15:37 | ||
So there is little preventing me from writing a small HTTP::Proxy and testing it via subprocesses. Except that I don't have time this weekend :) | |||
nothingmuch: BTW, if a test crashes, it would be nice to have the remaining (planned) tests not as plain fails but somehow as different fails. A darker red, for example :) | 15:44 | ||
nothingmuch | Corion: that can be done | 16:02 | |
want to patch? it's a simple fix | |||
Corion | nothingmuch: No hurry - just an idea :) | ||
nothingmuch | i just can't do it right now | ||
what needs to be done to the model, to do it cleanly: | 16:03 | ||
Corion | nothingmuch: np - I won't be at home for the next few hours either | ||
nothingmuch | grep -r for 'stub' | ||
find the code that generates them | |||
and add a property | |||
Corion | I only wanted to dump the idea before I lose it again ;) | ||
nothingmuch | then make a proper method for it | ||
and a css class for the display | |||
and add knowlege about the class to Test::TAP::Model::Subtest::Visual | |||
okay | |||
Corion | bbl | 16:04 | |
kungfuftr | kungfuftr.com/pugs-smoke.html - back fer now | 16:36 | |
cognominal | Larry has answered my mail about functional extension to Perl6. I don't get these two lines about already supported/speced features | 16:53 | |
autogenerating arrays | |||
[] pattern matching arguments | |||
is the first, only our classic map and grep? | |||
where is the second specced? | 16:54 | ||
nothingmuch | autogenerating arrays: anything infinite, i think | 17:23 | |
and much more flexibly: gather { take } | |||
i think that it will pause when taking | |||
and then when a new element is needed it continues after the take() | |||
and reiterates the gather block | |||
or the nested loops inside it, more accurately | 17:24 | ||
anyone here a getopt guru? | 17:54 | ||
i need some advice | |||
cognominal | I still don't get what he means by "[] pattern matching arguments" | 18:02 | |
crysflame | context? | 18:08 | |
PerlJam | cognominal: sub foo ([$head,@tail], $second_arg) { ... } | 18:09 | |
cognominal: foo would be called as foo(@array,$blah); | |||
nothingmuch: I'm not a guru but I can play one on IRC. :-) What advice do you need? | |||
ingy | all I know is that every programmer writes their own version of getopt at some point | 18:10 | |
PerlJam | ingy: indeed. That was one of the first things I wrote in python when learning the language. | 18:11 | |
cognominal | Perl_jam: thx, this is indeed a form of pattern matching | 18:16 | |
boy, I will love Perl6 | |||
PerlJam | cognominal: You don't love it now? ;) | 18:18 | |
PerlJam notes that perl5 was released 2 years before it was stable enough to be generally useful. (give or take) I imagine that perl6 will be the same. | 18:20 | ||
nothingmuch | sorry, back | ||
sister was exploiting my licensed status | |||
PerlJam: Is there a fun module that lets me convert args to something Params::Validate might like to eat? | 18:21 | ||
basically, i want @ARGV to be treated as a positional + flag + named param list | |||
and I want to name positionals and flags myself | |||
and be able to say $config->field(); | |||
and get the CLI value | |||
castaway | GetOpt::Long ? | 18:22 | |
PerlJam | nothingmuch: Getopt::Declare perhaps? (I don't really know, but look on CPAN in the Getopt:: namespace) | ||
nothingmuch | castaway: i am sort of hoping to do it without writing code | ||
and guessed someone might have something for the job | |||
castaway | pigs may fly ;) | ||
nothingmuch | castaway: tsk tsk | ||
reminds me of yet another discordian quote: | |||
PerlJam | castaway: hey, that's not an unreasonable expectation. Almost everytime I think to do something cool, I find that someone has already done it. | ||
nothingmuch | "Eagles may soar, but cows don't get sucked into jet engines" | 18:23 | |
nothingmuch wonders what shapr is doing instead of appreciating my references | |||
nothingmuch feels guilty all of a sudden | |||
i just realized that I make about 300-400 queries a day on search.cpan.org | 18:24 | ||
i should donate something | |||
search.cpan.org/~abw/AppConfig-1.56.../Getopt.pm <-- hmm | |||
nothingmuch thinks the only sort of sportish thing he can do better than others, aside from throwing knives, is running up the stairs with coffee | 18:27 | ||
for some reason it never ever spills | |||
crysflame | nothing: fwiw, google site:search.cpan.org works | 18:29 | |
nothingmuch | crysflame: usally i type search.cpan.org/perldoc?Some::Module | 18:31 | |
i do this a lot for modules I don't have installed | |||
or for modules with long doc pages | 18:32 | ||
where the terminal doesn't give me enough perspective | |||
(no scroll bars) | |||
ingy | nothingmuch: have you seen my new baby, Test::Chunks? | 18:41 | |
nothingmuch | nope | ||
ingy is a proud mother | |||
castaway wonders whether it needs Spiffy/Spoon/IO::All ,) | 18:42 | ||
nothingmuch | hmm... looks very useful | ||
ingy | castaway: :p | 18:43 | |
nothingmuch | ingy: you're good at speccing things | ||
castaway | SCNR ;) | ||
nothingmuch | nothingmuch.woobling.org/test_result_model.pod | ||
ingy | nothingmuch: how so | ||
nothingmuch | the model isa Test::Results::Model::Pure | ||
ingy: YAML is pretty good, kwid is pretty good | |||
Kwiki is fun to work with (except in hebrew, that was a pain) | 18:44 | ||
ingy | I didn't write the YAML spec | ||
nothingmuch | (but then again, CamelCase is not possible in hebrew) | ||
nothingmuch thought ingy was part of the spec | |||
anyway, so kwid is pretty good | |||
and that's it | |||
ingy | I helped | ||
nothingmuch | but despited the fact that you suck at speccing | ||
ingy | but Oren did most of it | ||
nothingmuch | i'd like you to look at that pod ;-) | ||
s/despited/despite/; | 18:45 | ||
ingy | ok | ||
nothingmuch | is the 'all' target the default for makefiles? | 18:46 | |
i.e., is that what's implied when you run make with no args? | |||
castaway | think so | ||
ingy | nothingmuch: we should talk about this at the hackathon | ||
nothingmuch | ingy: hackathon is far away | 18:47 | |
gaal wants to do Test::Harness in p6 | |||
i said it should be split up | |||
ingy | it fits well with my sidelined babeltest framework | ||
nothingmuch | because IMHO Test::Harness sucks for reusability | ||
babeltest? | |||
ingy | it is a descendant of Ward Cunningham's fit testing | ||
a defined object model would be really useful | 18:48 | ||
a well defined one | |||
babeltest has an adhoc object model | |||
but it is a object tree based testing system | |||
nothingmuch | what is FIT? | 18:49 | |
ingy | have you ever looked at FIT? | ||
nothingmuch | no | ||
ingy | guess not | ||
nothingmuch | 10 word limit ;-) | ||
ingy | it is very cool | ||
nothingmuch | boy, you're wasteful | ||
ingy | you should check it out | ||
I have a Test::Fit on CPAN | 18:50 | ||
? | |||
nothingmuch | 40% of what FIT is by that def is 'very cool' | ||
if you consider the 10 word limit | |||
ingy | I'm not considering it though :P | ||
I never really finished Test::FIT | 18:51 | ||
nothingmuch | yeah yeah | ||
fit.c2.com/ <-- good enough start? | |||
ingy | FIT is cross language testing framework | ||
yes | |||
you can spec a project with FIT and implement in any language | |||
nothingmuch | hmm | 18:52 | |
is it sort of like a test plan | |||
and the second argument to is()? | |||
ingy | Babeltest is my fork of it | ||
you should read about it | |||
before comparing it to Test::Harness | |||
nothingmuch | okay | ||
i'll do that | |||
ingy | I actually made Test::Fit output Test::Harness output | 18:53 | |
nothingmuch | my grand scheme is that Test::Result::Model is generic enough to be useful | ||
so that most test protocols can fit into it | |||
and those that can't should easily be modded | |||
ingy | it should be programming lanuage independent | ||
nothingmuch | or are just too dumb, and that's their problem | ||
it is | |||
ingy | good | ||
nothingmuch | i'm already using Test::TAP::Model for a C++ framework | ||
with modified TAP output | |||
so the Test::Result::Model should have an interface through which it can be constructed easily | 18:54 | ||
it should know to subscribe to a standard event parser interface | |||
and then you have Test::TAP::Parser | |||
so you smudge the two together | |||
you can also subscribe to Test::TAP::Parser if you want to display running results, for example | 18:55 | ||
but the point is that after words, for aggregated display | |||
you have a very stable | |||
very standardized object model | |||
that you can feed in a cross language way to display tools | |||
if it's in p6 then theoretically through parrot this is shared | |||
ingy | I haven't looked at TAP yet | ||
nothingmuch | so reporting tools in ruby could use it | ||
ingy | do you think test chunks could benefit from TAP integration? | 18:56 | |
nothingmuch | tap is nice | ||
but i think a bit too flat | |||
base it on Test::Builder | |||
ingy | base what? | ||
Test::Chunks | 18:57 | ||
nothingmuch | yup | ||
ingy | it is already built over Test::More, so yeah | ||
cognominal | I try to compile hs-plugins and I get : ./Plugins/ParsePkgConfCabal.hs:280:49: Not in scope: `hugsOptions' | ||
nothingmuch | ah, okay | ||
so it is integrated | |||
ingy | you can use it just like test more | ||
I did one cool trick... it adds strict and warnings to your test files automatically | 18:58 | ||
stole that from Spiffy | |||
nothingmuch | source filters? aaaah! | ||
ingy | yeah, why not. just forget about it | 18:59 | |
it is truly useful | |||
nothingmuch | =) | 19:00 | |
ingy | the test suite for Test::Chunks is mighty clean | ||
nothingmuch | does it use Test::Chunks? | ||
ingy | but I got bit by not using strict | ||
theorbtwo | cognominal: Try asking in #haskell? | 19:01 | |
ingy | anyway a test model sounds lovely | ||
let me know when it gets more formal | |||
nothingmuch | i wish I had more time to code it | ||
but Test::TAP::Model is a good start | |||
what I would like to do is purify it a little | 19:02 | ||
ingy | I'll study that | ||
nothingmuch | reimplement Test::Harness::Straps so that it's not so icky to work with | ||
Juerd | www.guardian.co.uk/online/news/0,12...73,00.html | ||
This means that in reality, we're even much smarter! | |||
nothingmuch | make Test::TAP::Model not be isa Test::Harness::Straps just because that saved me some coding | ||
crysflame | nothingmuch: hmm, nice. | ||
Juerd | (Weird how it can differ 10 "iq points", as IQs are normally-distributed quotients...) | ||
nothingmuch cannot mentally perform on marijuana | 19:03 | ||
i slow down | |||
to a point where I'm too lazy to formulate sentances | |||
ingy | my idea for babeltest.org was to have a wiki where anyone can add tests to define a project. and then implementors can use the test specs against their project in their language of choice. and the community could always see what tests pass. | 19:04 | |
cognominal | Juerd: every month, psys find a new addiction to enlarge their line of business | ||
ingy | which is what fit really should have been | ||
but ward is concentrated on business not open source | 19:05 | ||
nothingmuch | ingy: this reminds me of wheat | ||
ingy | and then ward went to work for M$ and fell off the planet | ||
wheat? | 19:06 | ||
crysflame | ingy: whoah! | ||
ingy++ # community testing wiki | |||
nothingmuch | and how do you do complex tests? | ||
ingy | make them simpler ;) | ||
nothingmuch | www.wheatfarm.org/ | ||
ingy: simpler might mean rewriting | |||
i think a test with loops is better than a test that is completely imperative | 19:07 | ||
if the loops can save some writing | |||
i normally write tests with 0 control flow | |||
so that they are always the same | |||
ingy | nothingmuch: what do you think of this style of test? www.rafb.net/paste/results/eO2TDJ84.html | 19:10 | |
Juerd: are you behind www.rafb.net/paste/ ? | |||
nothingmuch | why is the second run where it is? | 19:11 | |
i don't really understand | |||
mauke | no, unless Juerd is really Jacob Cohen | ||
ingy | the 2nd run? | ||
nothingmuch | after __END__ there is the data | 19:12 | |
oh | |||
it's just text | |||
silly me | |||
ingy | just a piece of text | ||
happen to be lying around ;) | |||
nothingmuch | so how does $chunk->(decoded|encoded) know to compare? | ||
i like the fact that you don't "intelligently guess" the plan but leave it for the user | 19:13 | ||
ingy | the 'encoded' chunks are given a base64 filter | ||
nothingmuch | lets backtrack | ||
ingy | ok | ||
nothingmuch | the test is supposed to test a base64 decoder? | ||
ingy | the test is testing that the base64 filter feature of Test::Chunks works properly | 19:14 | |
nothingmuch | or is base64 encoding an integral part of Test::Chunks | ||
ah | |||
pretty | |||
ingy | you can specify any number of filters on a test chunk | ||
normalize and trim are the defaults | |||
castaway | Juerd is the tnx.nl one | 19:15 | |
ingy | er, norm and trim I think | ||
nothingmuch | ingy: sounds very useful | ||
ingy | you can turn it off with | ||
nothingmuch | ingy++ | ||
ingy | --- foo -norm base64 whatever | ||
you can concentrate on one test with the pseudochunk | 19:16 | ||
--- ONLY | |||
that's why I base my plan on chunks | |||
nothingmuch | are 'decoded' and 'encoded' arbitrary names? | ||
ingy | yes | ||
and they become methods of the Test::Chunk object | 19:17 | ||
nothingmuch | Algorithm::Dependency's test suite could use this mapping | ||
want to have a go at translating? ;-) | |||
it has a big matrix every once in a while | |||
and i'm too lazy to finish the suite for Algorithm::Dependency::Objects | |||
(nothingmuch.woobling.org/Algorithm-...y-Objects) | |||
Juerd | ingy: No, I have nothing to do with rafb.net | 19:19 | |
ingy | oh ok. it looked somewhat like a pastebot you used I thought... | ||
castaway | tnx.nl/scribble.plp ? | 19:20 | |
ingy | I found it by typing 'nopaste' in the firefox location area | ||
castaway | bookmarks++ | ||
Juerd | ingy: I own the domain pastebot.org | ||
ingy: But didn't create pastebot | |||
And don't maintain the pastebot linked to that domain. | |||
castaway | ah | ||
Juerd | tnx.nl is also mine | 19:21 | |
Which I still like a lot for its lack of length. | |||
ingy | I love typing free text as urls in firefox. it will usually dwim | ||
Juerd | Oh, I completely forgot I was going to add [AES]\d\d shortcuts. | ||
ingy: Google loves you. | |||
For Great Statistics | |||
ingy | rafb's paster lacks a couple polishing features though | 19:22 | |
at least someone loves me | |||
theorbtwo | (Crack for Statisticians!) | ||
cognominal | for my slides I want colorized perl6. I am thinking of using vim for that to generate colorized html. | 19:26 | |
do you know the correct invocation from a script? or a better way? | 19:27 | ||
Juerd | My experience is that vim's highlighting sucks for Perl 6. | 19:29 | |
castaway | highlighting perl6 sounds like a nightmare ;) | 19:31 | |
cognominal | this is not for every day use, just for generating a few slides. I will not use exotic quoting... | ||
Juerd | cognominal: It fails for more trivial stuff than that too. | 19:32 | |
You'll see | |||
cognominal | what I see so far is good enough | ||
Juerd | tnx.nl/S03 now works, btw | ||
castaway | cool | ||
cognominal | I just want to automate the generation of slides | ||
Juerd | /bind meta-- insert_text tnx.nl/ | 19:33 | |
in irssi | |||
PerlJam | castaway: hilighting perl6 will be *easy* if we have the perl6 rule engine and the grammar at our disposal. | ||
Juerd | then it's alt+- S03 | ||
castaway | hmm? | ||
where does that insert what to? | |||
Juerd | castaway: It makes alt+- a shortcut for typing tnx.nl/ | 19:34 | |
tnx.nl/http://tnx.nl/http://tnx.nl/...://tnx.nl/ :) | |||
castaway | ah, I see | ||
Juerd | So if I want to point someone to perlop, I just type alt+- perlop, resulting in tnx.nl/perlop | ||
castaway | nifty | ||
Juerd | Or for suffering from buffering, tnx.nl/sfb | ||
cognominal | I just want a quick fix, not a general solution... | ||
Juerd | Or when someone has problems with understanding Perl 6 operators and rules, tnx.nl/S03,S05 | 19:35 | |
Etcetera :) | |||
castaway | PerlJam: build those into elisp ;) | ||
sorry cog, wrong $EDITOR | |||
PerlJam | castaway: sure ... as soon as I have a parrot backend to elisp. | ||
cognominal | castaway, I would not mind an emacs solution | 19:36 | |
castaway grins at cognominal | |||
I dont have one handy tho, sorry | |||
cognominal | btw. are the synopsis on dev.perl.org up to date? or should are I trust the Perl6::Bible instead? | 19:37 | |
ingy | the bible is up to date | ||
PerlJam | cognominal: the synopses are the most up-to-date official docs by the cabal | ||
ingy | 0.15 | ||
cognominal | PerlJam: yes, but are the synopsis online on dev.perl.org up to date? | 19:38 | |
obra | c1;dev.perl.org should be current as of last night. | ||
and that should always be true. | |||
PerlJam | ingy: is the bible generated from the svn repo? | ||
obra | dev.perl.org pulls nightly from the canonical svn repo | 19:39 | |
cognominal | so why the last modified so out of date? | ||
ingy | PerlJam: yes | ||
PerlJam | ingy: excellent. | ||
cognominal | Last Modified: 9 Dec 2004 | ||
Number: 5 | |||
that convey the wrong message | 19:40 | ||
obra | cognominal: when was syn5 last updated? | ||
cognominal | obra: I don't know. my understanding was that it was recently updated | 19:41 | |
castaway | "21:38 < theorbtwo> echo foo | md5sum will sum the trailing newline that echo pugs there" :) (pugs on te brain..) | 19:42 | |
PerlJam | cognominal: it had some minor updates in Feb I think, but hasn't been changed since. | 19:45 | |
But the last major change was in Dec. | |||
obra | svn log svn.perl.org/perl6/doc/trunk/design/syn/S05.pod | 19:46 | |
there have been what appear to be typo fix class updates in feb, yeah. | |||
actually | |||
given those dates, I think that's the date it was loaded from cvs | 19:47 | ||
PerlJam | obra: still, there are no modifications since that date (that have been checked into svn) | 19:48 | |
obra | PerlJam: right | ||
cognominal: what changes did you think there were? | 19:49 | ||
cognominal | I thougt you were just talking changes, so I was alarmed to see the changed date on dev.perl.org. so my questions? | 19:50 | |
nothingmuch | oh crap: Set::Object::_(self, ...) | 21:00 | |
prepend: Usage: | |||
from the likes of: my $found ( @prospects ) { | 21:01 | ||
if ( -f $found && -x _ ) { | |||
nothingmuch pulls mugwump up by the ear | |||
what time is it there? around morning, no? | 21:02 | ||
Qiang | 5pm here. weekend starts :) | 21:10 | |
stevan | uh oh,.. someone went to sleep and broke the build :) | 21:11 | |
theorbtwo | Odd, most people do it the other way around. | 21:13 | |
stevan | hmmm I wonder if src/Pugs/Types/Object|Pair.hs are on autrijus's machine | 21:14 | |
and he forgot to svn add them | 21:15 | ||
I commented out the imports and so far it is compiling | |||
theorbtwo | It'd hardly be the first time somebody made that mistake. | ||
stevan | we shall see | ||
:) | |||
I do it all the time too :P | |||
sleep deprivation has that effect | |||
theorbtwo | I don't have that excuse, though. | 21:16 | |
stevan | theorbtwo: do you want me to make that OS 9 image? | ||
theorbtwo | Yes. | ||
Thanks. | |||
stevan | BTW _ I realized that I already threw out the jaguar images | ||
theorbtwo | Do you have rsync? | 21:17 | |
stevan | no idea | ||
never used it | |||
theorbtwo | Do "which rsync" from a command line? | 21:18 | |
stevan | got it | 21:19 | |
theorbtwo | OK, now I have to figure out how to do this. | 21:20 | |
stevan | ok | 21:21 | |
theorbtwo | Pick a username. | 21:29 | |
stevan? | |||
stevan | yup | ||
21:48
BigBear is now known as BigBear_hiding_o
|
|||
castaway hugs Limbic_Region | 21:59 | ||
theorbtwo | stevan, can you put the jaguar 1 CD in your drive, then do "sync --progress -vz --rsh='ssh -p2222' /dev/cdrom desert-island.dynodns.net:/usr/src/mac/jaguar-1.iso" please? | 22:01 | |
Er, s/sync/rsync/ | |||
Limbic_Region hugs castaway and apologizes for not reciprocating sooner | 22:03 | ||
castaway | no worries | ||
hows tricks over the pond? | 22:05 | ||
Limbic_Region | pretty good | 22:06 | |
castaway | nifyt | ||
Limbic_Region | just found out the original closing cost estimate was inflated | ||
$5200 versus $700 | |||
nothingmuch | apropos prices, castorbway: did you guys find some proper flights? | 22:07 | |
castaway | proper? | ||
no.. getting-from0a-to-b flights, yes (more or less) | |||
QMario | How do I make Perl print out random numbers in a certain range? | 22:08 | |
castaway | perl6 ? | ||
theorbtwo | (Low closing costs)++ | ||
nothingmuch | proper like not too expensive | ||
Khisanth | castaway: perl5 but since he got banned from #perl I guess he is trying here :) | 22:09 | |
castaway grins | |||
QMario | How do you know that, Khisanth? | ||
castaway | print rand(6) -> random number from 1 to 6, I think | 22:10 | |
perldoc -f rand | |||
QMario | Thank You. | ||
nothingmuch | QMario: perl -ne 'BEGIN { $/ = \1 }; $_ = unpack("L", $_); print "$_\n" if $_ > $min and $_ < $max' | ||
perl -ne /dev/random | |||
mauke | haha, nice | ||
castaway: you're wrong, btw :-) | |||
castaway | nothingmuch: in perl6 pls! | ||
nothingmuch | err, $/ = sizeOf, ofcourse | ||
Khisanth | QMario: because I was around when you decided to go preaching religion in the wrong place | 22:11 | |
nothingmuch | say rand(6); | ||
theorbtwo | From 0 to 6, including 0 but not including 6. | ||
castaway | (please dont bring it here, hatever it was) | ||
castaway was close! | |||
Limbic_Region wonders why BrowserUk made this statement www.perlmonks.org/?node_id=450588 ? | 22:14 | ||
castaway | he needs a reason? | ||
Khisanth | Limbic_Region: ask him/her! | ||
Limbic_Region | Khisanth - I was wondering if there was something obvious that I was missing | ||
that they were comparing apples and oranges or something | 22:15 | ||
that autrijus cheated | |||
dunno | |||
castaway | presumably he was thinking that haskell was inline in perl there? and not underneath | 22:16 | |
castaway shrugs | |||
QMario | How do i print random numbers as integers(whole numbers). | ||
? | |||
nothingmuch | how childish | ||
that's haskell | |||
Limbic_Region | QMario - this is NOT #perl or #perlhelp | ||
nothingmuch had much more respect for BrowserUK 5 minutes ago | |||
Limbic_Region asked the question in a /msg | 22:17 | ||
theorbtwo | QMario, it isn't perlmonks.org either. | ||
castaway | QMario: first you get a perl book .. | ||
nothingmuch | QMario: my code would do that | ||
it reads data from /dev/random | |||
QMario | Can you send it to me? | ||
nothingmuch | and then unpacks it as a long | ||
castaway | or you do perldoc -f int | ||
nothingmuch | i pasted it here | ||
perl -ne 'BEGIN { $/ = \1 }; $_ = unpack("L", $_); print "$_\n" if $_ > $min and $_ < $max' /dev/random | |||
mauke | QMario: do you know what perl6 is? | ||
nothingmuch | just set $min and $max | 22:18 | |
QMario | I don't think pastebot works for me? | ||
nothingmuch | it's not very efficient though | ||
QMario | No. | ||
That was for you ,mauke. | |||
mauke | nothingmuch: hmm, don't you need $/ = \4? | ||
Khisanth | Limbic_Region: well judging from that person's post, he doesn't seem very familiar with Haskell so ... | ||
nothingmuch | mauke: yes | ||
sorry, i mentioned that, but didn't fix this paste around | |||
anyway, it will take (4 * (2**32))/abs($max-$min)/2 bytest on average | 22:19 | ||
Limbic_Region | Khisanth - well, I am pretty oblivious myself to Haskell and only a margine more educated about Perl internals - so that's why I asked (I figured I was just being dumb) | ||
nothingmuch | depending on how fast your /dev/random is, it might take about a minute | ||
castaway | ;) | ||
nothingmuch | to read the GB or so of entropy | ||
castaway | QMario: type: perldoc -f int | ||
QMario | Okay. | ||
nothingmuch | however, if you read from /dev/urandom, it will be faster, but the numbers won't be as cool | 22:20 | |
castaway | and perldoc perlfunc, for all the other functions you may need somewhen | ||
QMario | Thank You. | ||
What is perl6 for? | 22:21 | ||
nothingmuch | like perl 5 was for system administrators | ||
stevan | QMario: to replace perl5 :) | ||
castaway | its the next version after perl5, eventually | ||
nothingmuch | perl 6 is for farmers | ||
it's got all sorts of features to simplify the language | |||
like junctions, and chaining comparisons | |||
castaway laughs | |||
QMario | So you guys are just getting ready for it? | 22:22 | |
theorbtwo | No, we're creating it. | ||
Juerd | Oh, we're ready | ||
castaway | creating it, kind of | ||
Juerd | I know I am | ||
Perl 6 will magically solve all problems in my life. | |||
Limbic_Region | Juerd - that's not true | ||
it still won't get you laid | 22:23 | ||
QMario | Have you made any useful programs so far, Juerd? | ||
Limbic_Region | :P | ||
Juerd | Limbic_Region: Then what do you think the dwim operator does? | ||
stevan | QMario: we have an implemenation of hangman | ||
Juerd | QMario: No, never. | ||
theorbtwo | It's all about the yaddayaddayadda operator. | 22:24 | |
castaway gggles | |||
theorbtwo | Every program can be written as #!/usr/bin/perl6 -e '...' | ||
Juerd | QMario: The only thing I made that's semi useful is a program that prints a line on a matrix printer every time a certain mailbox receives new mail, so the rattling of the pinwriter indicates new mail. It's somewhat more comforting than a dingdong sound or beep. | ||
castaway | ah, thats "every program" reduced o its sigle bug, right? | ||
theorbtwo | Exactly! | 22:25 | |
Limbic_Region | every program reduced to a single line containing at least 1 bug | ||
Juerd reports numerous bugs for yadayadayada and dwim(). | |||
nothingmuch replies to BrowserUK | 22:26 | ||
Juerd | A recent PM thread makes me wonder | ||
How old are you, on average? | 22:27 | ||
My average age is 10. | |||
castaway is an average of 8. | |||
nothingmuch | eh? | ||
what is 'old' in this context? | |||
castaway | (oh, actual calculation?) | ||
Juerd | nothingmuch: What's your average age? :) | ||
castaway | mental age | ||
nothingmuch | behavioral like? | ||
Juerd | sum(@ages) / +@ages | ||
And then the int of that | 22:28 | ||
Limbic_Region | Juerd - depends on if you say your average age at your first birthday is .5 or not (0 years old is valid or not) | ||
theorbtwo | Nah, she's an average of around 18, but it's on a binormal distribution. | ||
nothingmuch | Limbic_Region: in the first year of our lives i think we exist | ||
Juerd | Limbic_Region: 0 years is an age, so it counts. | ||
nothingmuch | is there some kind of reference table? | ||
i don't know what to say | |||
Limbic_Region | nothingmuch - then it is real easy | ||
Limbic_Region likes his reply in that thread better anyway | 22:29 | ||
nothingmuch | sometimes i feel like i'm 12 | ||
when i'm being annoying because i'm bored | |||
and i only realized i'm annoying because i'm bored after a while | |||
at times i feel like i'm 6, if i'm really enjoying myself on something stupid | |||
Juerd | use List::Util qw(sum); int(sum(0..$current_age)/$current_age+1) | ||
Perl 5 feels so primitive | |||
nothingmuch | at work i feel 30, because everyone else is | 22:30 | |
with friends i feel +=5 because they're pretty goofy | |||
ah | |||
castaway | Juerd: you mean p6 would DWIM on the $current_age bit? | ||
Juerd | Average age has nothing to do with feeling | ||
castaway: Haha | |||
nothingmuch | 11 | 22:31 | |
Juerd | castaway: No, get rid of List::Util and have all that built in | ||
nothingmuch | i thought that's what you guys meant | ||
castaway | ;) | ||
castaway thinks the result is as meaningless as ones actual age | |||
Limbic_Region | Juerd - no need | 22:32 | |
Juerd | castaway: Duh, it's based on that and only that :) | ||
Limbic_Region | sum of all numbers is (n^2 + n) / 2 | ||
castaway | exactly. | ||
Juerd | Limbic_Region: I'm writing it like this so that someone who skipped a certain age can more easily modify the code to match his circumstances. | 22:33 | |
I always code with maintenance in mind. | |||
Limbic_Region | or someone who is 29 multiple years in a row? | ||
;-) | |||
theorbtwo | So when you write difficult-to-maintain code it's on purpose? | ||
Juerd | Or other weird ages lists. | ||
theorbtwo: Yes. | 22:34 | ||
nothingmuch goes to make tea, and then hack some spork | |||
Juerd | I don't use complex mathematical solutions, like Limbic_Region does, just because they happen to match the current data ;) | ||
castaway wonders how to skip an ag ;) | |||
Jued++ | |||
oops +r | |||
theorbtwo | .oO(Hey Jued...) |
22:35 | |
Juerd | castaway: I hope I find out before I'm almost 30, because that's one age I'd like to skip entirely. | 22:36 | |
Limbic_Region | 25 was the big one for me | ||
Juerd | castaway: When I do find out, I'll let you know. | ||
castaway | It wasnt all that bad, iirc ;) | ||
Limbic_Region | quarter of a century | ||
castaway | BTDT | ||
Limbic_Region | 1/3 of your life | ||
Juerd | btdt? | ||
Limbic_Region: optimist ;) | |||
Limbic_Region doesn't think 30 will bother him at all | |||
castaway | only going to survive to 75, Limbic? | ||
theorbtwo | I'm going to be a quarter-century soon. | ||
castaway | Been There, Done That | ||
castaway is 31 | 22:37 | ||
Limbic_Region | castaway - more or less | ||
theorbtwo is planning on living to 120. | |||
castaway | but feel free to relate your impressions once you get there | ||
Limbic_Region | well - I plan on trading this body in so 75 is a high end estimate | 22:38 | |
theorbtwo | As in reincarnation or as in brain transplant? | 22:39 | |
Limbic_Region forgets that theorbtwo is jewish | |||
neither of those two | |||
castaway | limbic, you forumla gets me 496 !? | ||
what are the alternatives? | 22:40 | ||
Limbic_Region | castaway - that's the sum - you still need to divide by the number of elements (current age) to get the average | ||
castaway | oh, you didnae say that! | ||
16! | |||
Limbic_Region | castaway - I didn't say the n^2 + n / 2 formula was how to get average age, I said it was how to get the sum | ||
castaway cant read obviously ;) | 22:41 | ||
Juerd | re | 22:45 | |
theorbtwo | L~R, still don't know what you mean by trade it in. | ||
Juerd | 00:41 < Limbic_Region> castaway - that's the sum - you still need to divide by the number of elements (current age) to get the | 22:46 | |
average | |||
No, not current age... | |||
Current age plus one | |||
By code was wrong because it had precedence wrong. Sorry. | |||
Limbic_Region | Juerd - again, that depends on if you consider 0 a valid age | ||
Juerd | (Wow - such a simple thing and we're both getting it wrong) | ||
Limbic_Region: Unless you skipped it, it should be counted. | 22:47 | ||
Limbic_Region | in my code I caveat the 0 so I'm not wrong :P | ||
Juerd | In that case you were 1 when you were born, I think. | ||
Limbic_Region: You were wrong by saying one still needs to devide by the current age. | |||
Limbic_Region | no, it means your age doesn't begin until you reach 1 | ||
Juerd | No, I think 0 is a valid age. | ||
Limbic_Region | and that's your right | ||
Juerd | I know the first year of living has age 0 in some databases. Not NULL, but 0. | 22:48 | |
Limbic_Region | but for the purposes of my code it isn't - and I said so - so I am not wrong | ||
you may disagree with me all day long | |||
Juerd | That's another 23:10 | ||
No thanks. | |||
Limbic_Region | heh | 22:49 | |
all I mean is that given my stated assumptions the code is correct - the assumptions themselves may be invalid/incorrect, but they are in agreement with each other | |||
castaway | *g* | ||
Juerd | The code is correct, but your explanation involving the code was not. | 22:50 | |
theorbtwo shrugs. | |||
I think that 0 is a valid age. | |||
nothingmuch | the code may be correct, but argument is redundant | ||
Juerd | And I repeat that your code is only correct for objects that have never skipped an age or had a certain age twice. | ||
Although if you have the same age twice in a row, I don't know if it then counts as one. | |||
theorbtwo | If you ask someone "how old is your (son|daughter)", then you will often get ages 0 > $n >= 1. | 22:51 | |
nothingmuch | . o O ( the same age twice in arrow? ) | ||
Juerd | It certainly counts as one if I have a certain age today and the same tomorrow, but I don't know how this goes if the age of an age is more than one. | ||
theorbtwo | Counting each discrete year only once is a good estimate. | 22:52 | |
Juerd | So if your age is 10 for two years in a row, it counts twice? | ||
You know - normally, this is the area of biologists | 22:53 | ||
But we programmers are expected to know everything | |||
For otherwise we couldn't create programs except programming languages. | |||
theorbtwo | And note that I am not the same age as I was yesterday -- I am one day older. | ||
Juerd | Age, in this discussion, is strictly measured in years, rounded down. | 22:54 | |
theorbtwo | So my average age during the year from my 10th birthday to my 11th birthday is 10.5. | ||
Juerd | I should have mentioned that. | ||
castaway | depends how granular you want to go ;) | ||
ah ok | |||
Juerd | theorbtwo: Yes, but the average age in turn is int()ed, as you see in my example code. | ||
Hm, from age 9 to age 11, my average age was 10. It's 10 now too. I didn't age in 10 years! | 22:55 | ||
theorbtwo | You're only 20? | 22:56 | |
Juerd | Even though I was neither 21 nor 20 at age 10. | ||
sorje | weeeh, revision 2222 :-) | ||
Juerd | Weird. | ||
theorbtwo: 21. | |||
sorje: Congrats :) | |||
Hi, broquaint | 22:57 | ||
broquaint: What is your average age? | |||
broquaint | Hey, Juerd. | ||
I don't have an average age as such. | 22:58 | ||
Juerd | broquaint: perl -MList::Util=sum -le'my $current_age = shift; print int(sum(0..$current_age)/($current_age+1))' | ||
Oh. An interesting new possibility. | |||
broquaint: Are you skipping every single age, then? | |||
nothingmuch | Juerd: how old are you, unaveraged? | ||
Juerd | nothingmuch: Still 21, as I said and was 3 minutes ago. | 22:59 | |
Limbic_Region | Juerd - you count years how you want, I count them like the calendar 4, 3, 2, 1, -1 (there is no 0) | ||
broquaint | I try, Juerd, I try. | ||
nothingmuch | oops, sorry | ||
nothingmuch is not really into chat | |||
broquaint | Apparently that code isn't favoured by the windows command line. | ||
nothingmuch | with all this fascinating discussion going on | ||
Juerd | broquaint: Sorry - In geek channels I always assume sane shells. | ||
castaway | bro! | ||
theorbtwo | Hm, Limbic, interesting... you are -1 from birth until your first birthday? | 23:00 | |
theorbtwo thinks you are 0. | |||
If you ask a proud new parent how old their child is, they will often answer something like "8 months". | |||
Back-extrapolate. | |||
broquaint | Hey, c :) | ||
Limbic_Region wanders off | |||
Juerd | Limbic_Region: Hm - I never really gave this much thought, but this does mean the proverbial "year 0" never existed, doesn't it? | ||
theorbtwo | Between AD and BC? Nope. | 23:01 | |
Juerd read AC and DC. Hm. | |||
theorbtwo | If an event lasted from Jan 1, 1 BC to Dec 31, 2 AD, it lasted 3 years. | ||
(Approx.) | 23:02 | ||
Juerd | theorbtwo: Why the inconsistency in that, by the way? | ||
broquaint | Assumption is the mother of all fuck ups, according to the bad guy in Under Seige. | ||
Juerd | Before christ, but anno domino... | ||
(assuming that is what AD stands for) | |||
theorbtwo | Histerical Rasons. | 23:03 | |
broquaint | It would seem my average age is 11. | ||
theorbtwo | In east-asia, it's common to consider someone 1 at birth. | ||
Juerd | broquaint: You're only one year older than I am, on average :) | ||
theorbtwo: Then east-asians have a somewhat higher average age (or lower, based on equality of current ages) | |||
theorbtwo | Somebody in my HS got their driver's license after having been out of the womb only 15 years because of that. | ||
Juerd | theorbtwo: That at first read is funny for someone who lives in a country where driving age is 18 :) | 23:04 | |
theorbtwo grins. | 23:05 | ||
I'm American, and more specifically Pensylvanian. | |||
Also, I can't spell. | |||
nothingmuch | where in Penn? | 23:06 | |
theorbtwo | Lancaster -- Manheim Township. | ||
nothingmuch doesn't know it | 23:07 | ||
couldn't bother with geography when there was Sim City 2000 and the great outdoors | |||
oh well, i was young and wreckless | |||
reckless? | |||
nothingmuch used to live in Pittsburgh | |||
castaway | ooh | 23:08 | |
theorbtwo | Oh, I lived in Pittsburgh for a while as well. | ||
castaway | so did he | ||
theorbtwo | When were you there? | ||
nothingmuch has very fond memories | 23:09 | ||
93-94 | |||
theorbtwo | Oh, well before me. | ||
nothingmuch | no, sorry | ||
94-96 | |||
theorbtwo has some fond memories and some not so much. | |||
nothingmuch | 93-94 was in Princeton | ||
broquaint | Doing what? | 23:10 | |
theorbtwo | Going to Pitt. | ||
nothingmuch | mum and dad were on subsequent sabbaticals | ||
i think those were approx. their post doc years | |||
theorbtwo | Well, mostly being enrolled in Pitt and not going. | ||
broquaint | Cool. | 23:11 | |
nothingmuch has never been on the Pitt campus, even though mom tought there | |||
CMU was very nice though | |||
the robot tracks were cute | |||
i always wanted to see one in action but never got the chance | |||
Juerd | Wow, I received spam on a domain that hasn't existed for at least 2 years. | 23:20 | |
Some dns cache they use. | |||
(And perhaps I should remove that domain from my server... :)) | 23:21 | ||
broquaint | What was the average age thing about? | 23:22 | |
Juerd | Inspired by perlmonks | 23:23 | |
It was a very interesting conversation about the possibilities surrounding ages. | |||
We take too much for granted. | |||
broquaint | Of course we do, we're civilised. FSVO civilised ... | 23:24 | |
Juerd | civilised | 23:25 | |
adj 1: having a high state of culture and development both social | |||
and technological; "terrorist acts that shocked the | |||
civilized world" [syn: {civilized}] [ant: {noncivilized}] | |||
If social development is a requirement, I'm not civilised. | |||
broquaint | Although it doesn't state what civilised need be applied to .. | ||
Juerd | 2: marked by refinement in taste and manners; "cultivated | 23:26 | |
speech"; "cultured Bostonians"; "cultured tastes"; "a | |||
genteel old lady"; "polite society" [syn: {civilized}, {cultivated}, | |||
{cultured}, {genteel}, {polite}] | |||
Even more vague. | |||
nothingmuch | ingy: ping | ||
broquaint | Ah the dictionary, is there anything it won't tiptoe around? | 23:27 | |
ingy | nothingmuch: pong | 23:28 | |
nothingmuch | i want to subclass Sprok::Slides | 23:29 | |
ingy: want to SEE some spork hackings? | |||
i need a bit of hand holding | |||
and make Spork::S5 produce with class="inc" | |||
ingy | SEE is fine | 23:30 | |
location? | |||
nothingmuch | see://woobling.org | ||
Limbic_Region | nothingmuch - BrowserUk replied | ||
Juerd | Good night | 23:32 | |
zz | |||
castaway | morning juerd | ||
nothingmuch | good reply | ||
ingy: one sec, it's pointing to the ether ip | 23:33 | ||
ingy | nothingmuch: seem to be having troubles connectinf | ||
nothingmuch | i'm on the wifi | ||
try again | |||
revdiablo | Limbic_Region: heh, it seems like B-Uk's reply just changed the subject, rather than addressing the meat of the post | 23:39 | |
nothingmuch | revdiablo: but he doesn't bite | ||
he explains he prefers it | |||
instead of arguing pointlessly | |||
revdiablo | nothingmuch: *nod* but he could have at least acknowledged that his earlier assertions were wrong | 23:40 | |
theorbtwo | What is the correct device name, BTW? | ||
nothingmuch | true that | ||
theorbtwo: eh? | |||
Limbic_Region | well - his mistake was associating Haskell with a pure FP language | ||
theorbtwo | For the whole CD-ROM drive. | ||
Limbic_Region | but I for one make mistakes like that all the time | ||
theorbtwo | It is, but it redefined "pure". | 23:41 | |
Well, at least it's mostly pure. | |||
Limbic_Region | *shrug* - he should have just replied with s/Haskell/side-effect free language/g and been done with it | 23:42 | |
revdiablo | Limbic_Region: everyone makes mistakes, but some people don't ever seem to admit it. they just change the subject. :) | 23:43 | |
theorbtwo | I like his last post. | 23:45 | |
450609, that is. | 23:46 |