pugscode.org <Overview Journal Logs> | smoke/win2k (occasional): xrl.us/fqum (867/3781, r2479), Mac OS X (62/4506, r2362), Linux (164/4642, 2484) | pugs.kwiki.org Set by obra on 29 April 2005. |
|||
Shillo just updated. rev 2500, nice, round number. :) Hmm, so far new breakage in math/int and io_in_for_loops | 00:00 | ||
Juerd | theorb: Doesn't COMMITTER include all necessary bits, such as IMPATIENCE and LAZINESS and HUBRIS and CLUE? | ||
Limbic_Region is running make test on 2500 now | |||
Shillo | And all t/data_types | ||
Shillo still has flaky hardware. So this could really be bad compile. | 00:01 | ||
Limbic_Region had a fair amount more failures than usual | 00:03 | ||
(3 subtests UNEXPECTEDLY SUCCEEDED), 33 subtests skipped. | |||
theorb | Autrijus said when he gave me a metacommitter bit that I should give anybody who demonstrated a willingness to produce patches a committer bit. | ||
Limbic_Region | Failed 38/234 test scripts, 83.76% okay. 153/4668 subtests failed, 96.72% okay. | ||
theorb | Schwern recently made todo be ignored except in release builds. | 00:04 | |
Limbic_Region | yeah | 00:05 | |
I saw that | |||
Shillo | (3 subtests UNEXPECTEDLY SUCCEEDED), 15 subtests skipped. | 00:06 | |
Failed 45/234 test scripts, 80.77% okay. 145/3667 subtests failed, 96.05% okay. | |||
Lots of scripts died on me, though. | |||
theorb | Hm, that's not good. | ||
Shillo | t/syntax/single_quoted_strings...............dubious | 00:07 | |
Test returned status 0 (wstat 11, 0xb) | |||
Same for multi_sub, | |||
And 09-dash-uppercase-c | |||
*sigh* This kinda sucks. I need a new CPU before I can tell for sure that these really failed. | 00:08 | ||
Shillo essentially doesn't trust his build of ghc, in the first place. | |||
theorb | Oh, wstat 11... that'd be segfault, I think, which seems unlikely. | 00:09 | |
Shillo | *** Error: Cannot cast into Hash: VRef <Array>: NonTerm (MkPos "t/subroutines/sub_return_values.t" 209 4 209 29) at t/subroutines/sub_return_values.t line 209, column 1-63 | ||
theorb | Works for me, shillo. | 00:10 | |
Shillo | Can I rerun an individual test? | 00:11 | |
theorb | The easy way is PERL6LIB=./blib6/lib ./pugs t/subroutines/sub_return_values.t | ||
Shillo actually tries rebuild/retest | 00:12 | ||
Just to see exactly how nondeterministic this is. | |||
Computer shops open in 7 hours... ;) | |||
(2 am here) | |||
Limbic_Region prefers to copy Test.pm to . | |||
but different strokes for different folks | |||
Limbic_Region is trying to verify a bug ATM | 00:13 | ||
theorb | On a saturday morning, Shillo? | ||
Shillo nods. | |||
My favorite time for the component raids. :) | 00:14 | ||
But I prolly won't, to be honest. | |||
Because I still have this annoying problem of not wanting to move to Athlon 64 just yet. | |||
Limbic_Region | ahhh - I did find a bug | ||
Shillo | And if I buy a new Athlon XP just now, well... | 00:15 | |
Limbic_Region: about sub_return_values.t ? | |||
Limbic_Region | no | ||
Shillo | Oh. | ||
theorb | Oh, you think your CPU is toasted? | ||
Limbic_Region needs to figure out how to fix it though | 00:16 | ||
his bug that is | |||
Shillo | theorb: I -know-. :) | 00:17 | |
theorb: Once its temp reaches 60, it goes x-eyed. | |||
(Celsius) | |||
theorb | Ah. | 00:18 | |
Stick more fans on the case, so it doesn't do that? | |||
Shillo | theorb: Won't help much, it's 20-30 degrees above ambient. | 00:19 | |
Shillo has the vintage. Palomino, the room-heater. | |||
theorb | Ah. | ||
Limbic_Region | ok - bugs fixed now I just need to remember how to check something in | 00:20 | |
theorb | svn ci | 00:22 | |
Limbic_Region | theorb - I remember that part | ||
I just don't remember how to mark it as being needed | |||
svn save <file? | |||
theorb | Unless it's a new file, you don't need to. | ||
Limbic_Region | svn save <file> | ||
ahhh | |||
theorb | If it is, svn add filename | ||
Limbic_Region | gotcha | ||
so it will just magically no what file I modified? | 00:23 | ||
Shillo | But do svn up, make sure it still builds if it pulled some other changes, then svn diff, and review to make sure you don't commit more than you wanted. | ||
Limbic_Region | Shillo - I just modified a test | ||
ok - committed | 00:25 | ||
and I am off | |||
TTFN all - have a great weekend | |||
Shillo | sub_return_values still fails the same way. | 00:27 | |
Failed 45/234 test scripts, 80.77% okay. 154/4603 subtests failed, 96.65% okay. | 00:28 | ||
Fewer segfaults, in different places. Well, got my answer. Can't use the machine for testing, really. | |||
jabbot | pugs - 2501 - Fixed broken test in t/statements/next.t | 00:31 | |
Shillo | Later, all. | 00:48 | |
theorb_ | OK, time for sleep. | 02:02 | |
jabbot | pugs - 2502 - More type signatures on top-levels. | 02:11 | |
autrijus | theorbtwo forgot to check in util/munge_haddock.pl :-/ | 06:10 | |
jabbot | pugs - 2503 - * repair mandel.p6 compilation to parrot | 06:21 | |
gaal | good morrow. | 06:26 | |
autrijus | hey gaal. | 06:31 | |
gaal | hey. i saw you committed some fixes for position - some things were is different places from where i was hacking | 06:35 | |
autrijus | yeah | 06:36 | |
position annotation is now just like context annotation | |||
gaal | i couldn't make sense of that unfortunately ;-) | ||
autrijus | instead of tackled on the statement structure | ||
and statement is just a simple linked list | |||
so where we had | 06:37 | ||
Statements [(Exp1, Pos1), (Exp2, Pos2), (Exp3, Pos3)] | |||
we now have | |||
Stmts (Pos Pos1 Exp1) (Stmts (Pos Pos2 Exp2) (Pos Pos3 Exp3)) | 06:38 | ||
and now all tokens can have their own positions | |||
including Syn and App | |||
and the position is now a range instead of just the beginning pos | |||
see the data definition for Pos | |||
gaal | hmm, that also makes possible that idea i had about annotating literal whitespace, no? | 06:40 | |
(for making mad Eclipse-like IDEs) | |||
autrijus | sure | ||
you can annotate a Noop with Pos | 06:41 | ||
for example | |||
or add Syn "#" | |||
for comments | |||
gaal | looking at data Exp now.. Syn stands for syntax? | ||
autrijus | yeah | 06:42 | |
please add comments | |||
and check them in:) | |||
gaal | application / syntax / context / position / lexical pad / symbol / statements / primitive / value / variable / parentheses / non term? :) | 06:43 | |
autrijus | yeah :) | 06:44 | |
non term == parse error | |||
Parens is currently not used in normal parsing | |||
otherwise all correct | |||
gaal | what does Syntax mean then? how is it an *object* in the AST? | ||
autrijus | Syn means something that can not be expressed as an App | 06:45 | |
like | |||
gaal | oh, like a block or a sub? | ||
autrijus | Syn "block" [...block body...] | ||
Syn "=" [lhs, rhs] | |||
gaal | gotcha :) | ||
autrijus | basically, anything that involves non-normal reduction order | ||
i.e. anything call-by-name | |||
or stranger than that | |||
gaal | so eg, it can represent a class definition, where traits can come in the signature or in the body? | 06:47 | |
autrijus | aye | ||
gaal | Is App the whole applicaiton, or a current compilation unit? | 06:48 | |
(does it matter?) | |||
autrijus | App is just a function application. | 06:49 | |
:D | |||
gaal | ah, so what represents the top level? | ||
autrijus | function($invocant: $argument) | ||
there's no toplevel marker | 06:50 | ||
a toplevel is just an Exp like anything | |||
gaal | like not having volume letters. good! :) | ||
autrijus | yeah :) | ||
good analogy, that | |||
gaal | this is futurish, but how can a parser deal forgivingly with errors? again using the Eclipse example, when it encounters a NonTerm, it often (not always) can skip ahead until it manages to synchronize and keep parsing successfully, only marking eg one or two lines as errors. | 06:55 | |
i mean, code is not generallt self-synchronizing like utf-8 is | |||
autrijus | I have no idea. | 06:58 | |
maybe instead of parsefail | 06:59 | ||
we always return NonTerm | |||
then the upper parsing unit can carry on. | |||
so e.g. | |||
print((3 +), 5) | |||
will be | |||
App "&print" [] [NonTerm (...failure...), Val (VInt 5))] | |||
that will let us report on multiple syntax errors too | 07:00 | ||
which may or may not be a win | |||
(I think it's a win) | |||
woot, I think I just accidentally speeded up pugs again. | |||
gaal | ...since so often it's the first that causes the later? *nod* | ||
lol | |||
you keep saying that :) | |||
autrijus | it's not like I can help it :) | 07:01 | |
commit your comments | |||
so I can merge? | |||
gaal | one sec | ||
(beh, got into a conflict, sec) | 07:04 | ||
r2504 | 07:09 | ||
jabbot | pugs - 2504 - Add comment explaining Exp data types | 07:11 | |
autrijus | ok, I'm committing mine | 07:12 | |
done as r2508 | 07:16 | ||
I wonder if it actually makes things faster. | |||
gaal | if smoke works, we'll find out soon :) | 07:17 | |
r2496 - 221 sec on my box | |||
assuming no significant changes in thests, etc... | 07:18 | ||
perhaps we need a more stable benchmark, if anyone's interested in writing one. | 07:19 | ||
autrijus | I usually just use mandelbrot | 07:21 | |
but it's not typical | |||
jabbot | pugs - 2505 - * "make optimised" is now OK too | ||
pugs - 2506 - * $_ defaulting now uses the lexical $_ | |||
pugs - 2507 - * `for @a { ... }` is now always parsed | |||
pugs - 2508 - * Add strictness to core monad and objec | |||
gaal | i guess smoke isn't typical either, because it heavily biases compilation and other startups. | 07:22 | |
uh, tests are b0rken :( | |||
oh, no it may be my tree is diryt, sec | 07:23 | ||
autrijus | hey | 07:24 | |
skew | hi | ||
gaal | yeah, false alarm, i had leftover hacks in Lexer.hs | ||
autrijus | skew: so "make smoke" dies? | ||
skew | okay, so I've got Test::TAP::Model installed, but make smoke can't find it | ||
gaal | do you have several perl5s on your system? | 07:25 | |
skew | and I know absolutely nothing about perl or pugs | ||
autrijus | you need to run "Makefile.PL" | ||
using the perl that you installed T::T::M with. | |||
skew | I got that far | ||
autrijus | then "make smoke" | ||
skew | I'll look for spare copies of perl | ||
obra | how goes? | ||
mischan, | |||
skew | how would I check if some perl interpreter can see T:T:M? | 07:26 | |
I typed perl, now I've got blank space | |||
gaal | skew: perl -MTest::TAP::Model -e1 | 07:27 | |
skew | If you all haven't guessed, I'm coming from Haskell-land. | ||
gaal | you should get back to the shell w/o an error message. | ||
skew | okay, that works | ||
does Makefile.PL remember which perl it was run with somehow? | 07:28 | ||
gaal | yes: it generates a Makefile (no .PL) that's keyed to it. | ||
skew | everything seems to refer to 5.8.6 | ||
which is the perl that just found T:T:M, according to your test | |||
gaal | we use perl 5.x in building pugs | 07:29 | |
that's all ok | |||
skew | progress - now it's Test::TAP::HTMLMatrix. Okay, I know how to fetch stuff from CPAN | ||
gaal | that one has a few dependencies - use CPAN's dep feature to help you with that. | 07:30 | |
skew, what OS are you on? | |||
Corion | Good morning - yesterdays backlog shows what I think is the cause for the scoping error with $_ in $_="Goodbye"; for "Hello" { say }; say; - but I won't be online for the next 8 hours and didn't find out how to remove the problem :) | 07:31 | |
skew | what's the option for the? force would be useful too. The manpage doesn't mention much | ||
Well, I hit y enough times that it's grabbed everything | |||
hey, looks like it's making smoke | |||
oops, YAML.pm | 07:32 | ||
is there any way to get all the stuff I need at once? | |||
gaal | that also works :) how you get the CPAN shell to d/l things automatically for you depends on whether you're using the regular one or CPANPLUS. | ||
skew | I think I've just got the plain one | ||
gaal | that's an excellent question, skew :) one hopes we'll get this right in perl6-land. | 07:33 | |
skew | Will I hit new dependencies halfway through a smoke run? | ||
gaal | forum2.org/gaal/pugs/smoke-cygwin.html # looks like a 2.7% speedup from r2496. ignore the errors on line_basic.t | 07:34 | |
skew | why does smoke rebuild the interpreter each run? | 07:35 | |
gaal | skew, realistically no. theoretically in a perl5 project you might have, but here once smoke runs it's all perl6 | ||
because there's no good way to zero the interpreter state | 07:36 | ||
skew | especially when it seems to be trying to use one frmo /usr/bin | ||
gaal | really? that certainly shouldn't happen! | ||
skew | well, was spewing out errors about not being able to exec /usr/bin/pugs | 07:37 | |
t/data_types/catch_type_cast_mismatch.t | |||
Can't exec /usr/bin/pugs at t/data_types/catch_type_cast_mismatch.t line 1. | |||
gaal | how did you invoke this, 'make smoke' ? | ||
skew | tyes | ||
gaal | ok, i'll investigate this, but let's try something in the meanwhile: | 07:38 | |
set HARNESS_PERL to ./pugs | 07:39 | ||
and PERL6LIB to ext/Test/lib | |||
(in your environment) | |||
then run 'perl util/yaml_harness.pl' | |||
what OS are you using? | 07:40 | ||
skew | linux | 07:41 | |
gentoo | |||
it installed 5.8.6, I've been grabbing packages with cpan, though | |||
autrijus | I know why | ||
gaal | this is very weird, because 'run-smoke.pl' sets the env for you. | ||
jabbot | pugs - 2509 - * check for all prereq modules at once, | ||
gaal | why? :) | 07:42 | |
autrijus | gaal: system("perl") | 07:43 | |
skew: fixed | |||
r2510 | |||
gaal | autrijus, but the environment is set before system | 07:44 | |
autrijus | gaal: it's the wrong perl. | ||
say, ancient perl | |||
gaal | oh, you think it should be $^X? | ||
autrijus | sure. | ||
gaal | gotcha. | ||
ideally, Makefile's $(PERL) | 07:45 | ||
autrijus | gaal: hm, 2.7% isn't that bad. | ||
...and I also did the same for Parser.hs | |||
so maybe another 2.7%. | |||
gaal: it is makefile's $(PERL) | |||
castaway gives skew a "g-cpan.pl" | |||
autrijus | because run-smoke is invoked with that | ||
gaal | 2.7% isn't bad at all! | ||
castaway | (for gentoo) | 07:46 | |
gaal | especially not after 11%, and 30%, and 50% :) | ||
autrijus | I think we should benchmark mandel on this run and on pugs 6.2.1 | ||
gaal d/ls ye ancient pugs | 07:47 | ||
autrijus | ancient... of less than one week ago | ||
gaal | 'swhat i'm sayin' | 07:48 | |
skew | what is giving that 2.7? | ||
autrijus | skew: r2512 should do it | 07:49 | |
skew: | |||
data SIO a = MkSTM !(STM a) | MkIO !(IO a) | MkSIO !a | |||
and | |||
IScalar :: ScalarClass a => !a -> IVar VScalar | |||
the two ! there. | |||
skew | do these patchs have descriptions anywhere? | ||
autrijus | skew: sadly not if you are using darcs. | 07:50 | |
I'll make them carry descriptions when I find tuits | |||
if you are willing to use svn or svk, though | |||
svn.openfoundry.org/pugs | |||
has descriptions | |||
(our main repo) | |||
simply "svn co svn.openfoundry.org/pugs" will do. | |||
I apologize for this inconvenience :-/ | 07:51 | ||
jabbot | pugs - 2510 - * make run-smoke run using the configure | ||
pugs - 2511 - * more unboxing and explicit data struct | |||
pugs - 2512 - * oops. | |||
skew | The most recent patch I see is r5186 | 07:52 | |
gaal | skew, by 5186 we'll be solving the halting problem. | 07:53 | |
autrijus | gaal: heh | ||
r5186 (orig r2604): autrijus | 2005-04-30 15:49:38 +0800 | |||
yeah, and the numbers are out of sync. | |||
skew | Sat Apr 30 00:46:07 PDT 2005 [email@hidden.address] | ||
* r5184 | |||
autrijus | gah. I think I need to fix | ||
skew | well, as long as I have the patch that fixes smoke so it will actually test my changes | 07:55 | |
is that 2.7% from running around unboxing things? | |||
autrijus | ok, fixed. | ||
skew: yes. | |||
we've already unboxed most of our data structure | |||
skew | that's what I was going to try | ||
autrijus | which brought 30% before | ||
the 2.7% is just even more strictness on two places | 07:56 | ||
skew | unpack or use unboxed stuff like INt#? | ||
autrijus | btw, sync.pl fixed | ||
not explicit unboxing | |||
just -funbox-strict-fields | |||
skew | what does "sync.pl fixed" mean? | ||
maybe I'll find something for SPECIALIZE ... | 07:57 | ||
autrijus | skew: sync.pl is the thing that syncs svn to darcs | ||
skew | oh, okay | ||
autrijus | so if you pull now | 07:58 | |
it should say r2605 | |||
try it? | |||
skew | no changes left to pull | ||
autrijus | weird. what's your last change? | ||
skew | "r5186" | 07:59 | |
autrijus | k sec | ||
oh btw, what is your real name that I can add to AUTHORS? | 08:01 | ||
skew | that's a bit premature :) | ||
autrijus | no, you already helped a lot on the SIO monad :) | ||
jabbot | pugs - 2513 - * double oops. | ||
autrijus | "Brandon Michael Moore" ? | 08:02 | |
skew | yep | ||
that's me | |||
hey, I'm getting something that syas "tagged snapshot" | |||
autrijus | yeah, now pull again... it should say r2514 | ||
skew | it still says "No remote changes" | 08:03 | |
whatever, as long as I've got your patch | |||
autrijus | uh, lag? | ||
try again :) | |||
please :) | |||
skew | okay, r2514 now | ||
autrijus | yay. | ||
skew++ | |||
skew | is there collected profiling data anywhere? | 08:04 | |
gaal | mandel benchmark between Pugs 6.2.1 and r2513 show a 37.55% speedup. | ||
autrijus | no... you can do "make clean; perl Makefile.PL; make profiled" | ||
to get a profiled pugs | |||
skew | then I suppose I need to run it on tests myself to pass profiling flags and do something sensible with the profiling output? | 08:05 | |
autrijus | sure. you can do this one-liner | ||
(after building a profiled pugs) | |||
skew | make smoke would probably be way too slow with the profiled version anyway | ||
autrijus | find t -type f | xargs ./pugs -e 'require $_ for @ARGS' | ||
that will run all tests in one run | |||
giving you the profiled output | |||
hm, or not | 08:06 | ||
skew | I'm just trying to figure out where to go to look for performance | ||
you need to pass some +RTS options to get it to actually do any profiling | |||
and it's been too long since I last read the user's guide, so I don't know where the output goes | 08:07 | ||
gaal | (from 2m26.750s real to 2m26.750s) | ||
autrijus | find t -type f | grep -v Dialect | grep t$ | xargs ./pugs -e 'require $_ for @ARGS' | ||
right | 08:08 | ||
find t -type f | grep -v Dialect | grep t$ | xargs ./pugs -e 'require $_ for @ARGS' +RTS -p | |||
skew | gaal: that doesn't seem so impressive | ||
autrijus | that's it. | ||
gaal: that looks like the same | |||
gaal | and grep -v Disabled also | ||
autrijus | find t -type f | grep -v D | grep t$ | xargs ./pugs -e 'require $_ for @ARGS' +RTS -p | ||
skew | I can think of some interesting things to do with all that data | ||
gaal | autrijus, looks like the same as what? | ||
skew | (from 2m26.750s real to 2m26.750s) | 08:09 | |
gaal | oh | ||
sorry :) | |||
to 1m31.637s that is. | |||
i had an, er, paste malfunction. | 08:10 | ||
that sounds like 30% + 11% + 2.7% plus change. | 08:11 | ||
jabbot | pugs - 2514 - * add skew to authors | ||
skew | that's a bit more impressive | 08:12 | |
gaal forages | |||
autrijus | r2515 has "make pugs.prof" | ||
skew | is the plan to eventually port pugs to C by optimizing untill it's just a mass of Ptr and MutableByteArray#? | ||
autrijus | need to run "make clean; perl Makefile.PL" for that to work | ||
skew: no, not really :) | 08:14 | ||
skew: a fast interpreter is nice | |||
but pugs is a compiler too. | |||
skew | autrijus: one problem with that xargs line is that it continually overwrites pugs.prof | ||
autrijus | so it doesn't quite matter :) | ||
skew: huh? it only runs pugs once | |||
skew | does it? | ||
oh, you run it with lots of options | 08:15 | ||
Okay, I misread it, and thought I should check where the output went before I sat through a smoke run | |||
gaal | well, it does potentially run it several times... | 08:16 | |
if there are lots of tests. | |||
skew | that would be bad | ||
gaal | that would be xargs | ||
autrijus | fixes welcome. | 08:17 | |
pjcj | autrijus: you mentioned a while back that you had some thoughts on how to introduce code coverage collection without impacting performance when it is not needed - how is Eval.hs looking in that regard now? | ||
autrijus | (not terribly worred now) | ||
pjcj: yes, yesterday's rewrite adds the instrumentation framework | |||
pjcj: now we have the info on what line/column ranges have been executed. | |||
I gather that's part of what you want? | 08:18 | ||
pjcj | excellent, I wondered whether that was the case | ||
autrijus | as we can reasonably think that two tokens sharing the same line/column range are in fact the same | ||
so that should be a pretty good start for a coverage tool | |||
pjcj | right - I'll have a poke around | 08:19 | |
any pointers on where to start? | |||
the other thing that's needed is some info about all the constructs in the program - an AST dump or something | 08:20 | ||
is anything like that already in place | |||
autrijus | sure | ||
pugs -CPugs -e'say 1' | |||
will give you a dump.ast | 08:21 | ||
that contains two parts, glob and ast | |||
glob is the global pad when the parsing starts | |||
ast is the ast to run from that point on | |||
jabbot | pugs - 2515 - * fix testgraph; add "make pugs.prof" | ||
pugs - 2516 - * finish "make pugs.prof" support. | |||
pugs - 2517 - * four unexpected successes | |||
pjcj | ok - looks like we are in better shape than last time I looked ;-) | 08:22 | |
autrijus++ # I need another reason? | |||
autrijus | so look at Eval.hs line 245 | 08:23 | |
you can see reduction rule for Pos | |||
there you can record that the Pos has been executed | |||
by writing into some magical global var | |||
or using the envDebug stash | |||
or something. | |||
if you need more instrumentation | |||
pjcj | what is a Pos -- position? | 08:24 | |
autrijus | it's a range | ||
AST.hs line 539 | |||
if you need more instrumentation | |||
just add them to Pos structure | |||
but I think the range is sufficient for now | |||
the "exp" in Eval line 245 | |||
is the expression that is about to be run | |||
"pos" is its source range | 08:25 | ||
pjcj | great - that looks as though I should have enough information floating around | ||
it's a shame there doesn't seem to be any easy way of covering the haskell source code though | 08:26 | ||
and somewhat surprising | 08:27 | ||
autrijus | no, it's because Pugs is too cutting edge :) | 08:28 | |
pjcj | I think it's a wonderful project in that respect :-) | 08:29 | |
autrijus | :) | 08:31 | |
I think Pugs has used all major new subsystems GHC 6.4 brings | |||
jabbot | pugs - 2518 - * oops, forgot to add pugs.prof line | ||
skew | oh, of course you're using STM if you need to fuse it into SIO. Did it solve any interesting concurrency problems? | 08:38 | |
autrijus | skew: yes. have you read my journal? | ||
pugscode.org, the "Journal" link on the left | |||
skew | do I need to rebuild again with this 2518? | ||
autrijus | skew: no, just perl Makefile.PL ; make pugs.prof | ||
is enough | |||
(well, that is a rebuild. never mind me) | 08:39 | ||
it's GHC will skip all the files if you have already built things | |||
skew | I just finshed rebuilding under r2517 | ||
autrijus | using "make profiled"? | ||
skew | I'll never get around to actually profiling if I have to keep rebuilding | ||
no, make pugs.prof seemed to build something | 08:40 | ||
autrijus | yeah. give me a sec | ||
ok, I think you'll be fine | |||
skew | the pugs I've got now is built with profiling | ||
autrijus | under r2518, "perl Makefile.PL ; make pugs.prof" should just take a second | ||
it's just fixing one line in Makefile | 08:41 | ||
and it will run the profiled test run | |||
I think. | |||
at least it does it here | |||
also, the profiled pugs is not built with -O | |||
skew | linking pugs each time through takes my system a while | ||
autrijus | as regular "make smoke" pugs is | ||
oh. in that case you can just run this by hand | 08:42 | ||
find t -type f | grep -v D | grep -v R | xargs ./pugs -e 'require() for @ARGS' | |||
skew | too late - it's not that long | ||
autrijus | : | ||
:p | |||
skew | that saves profiling output? | 08:43 | |
autrijus | hm it didn't | ||
weird. give me a sec, sorry | |||
skew | +RTS -p -RTS | ||
I remember, I wanted to try sticking INLINE on some of the monad methods | 08:44 | ||
autrijus | in that case, if full run is taking too long | 08:46 | |
you can always just do | |||
./pugs examples/mandel.p6 +RTS -p | |||
mandelbrot being the canonical benchmarker | |||
skew | is that a good benchmark? | ||
autrijus | it's the one I use mostly | 08:47 | |
so yeah | |||
gaal | autrijus, find | .... | ./pugs -e '$*IN is chomped; require for =$*IN' # except that 'is chomped' doesn't work yet | 08:48 | |
skew | well, I don't know what an async or a pad is | ||
autrijus | gaal: anyawy, the full time is | 08:49 | |
find t -type f | grep -v D | grep -v R | grep -v pugsrun | xargs ./pugs +RTS -p -RTS -e 'my sub exit {}; require() for \@ARGS' | |||
skew: async{} is forkIO | |||
skew: the pad is the lexical pad. | |||
gaal | i just checked the GNU xargs sources - on some systems the limit is as low as 470 - much too short for our tests | ||
autrijus | i.e. the visible things from your current let-binding | ||
gaal: fixes to Makefile.PL welcome. | 08:50 | ||
gaal | (however, "some systems" == "SYSV", so maybe this is not a practical limit) | ||
skew | and these are mutable structures that are now safe to use because of STM? | ||
autrijus | skew: yeah. basically | ||
async { atomic { $x = $y * 10; $y = $x * 10 } }; | |||
skew | there was no locking before? | ||
autrijus | there was no lock(), no. | 08:51 | |
skew | hash tables I can see | ||
autrijus | we can put them in now using TMVar. | ||
skew | okay, I've got a pugs.prof now | ||
jabbot | pugs - 2519 - * add the RTS options. | ||
autrijus | skew: yeah, and it is not terribly useful | 08:52 | |
most time are spent on the parser :-/ | |||
the tests themselves are all short | 08:53 | ||
gaal | beh, isn't there some global .clone method? not being able to require($_.chomp) for =$*IN because stdin is r/o is annoying | ||
autrijus | for =$*IN -> $x is copy { } | ||
I need to run for food. | 08:54 | ||
be back later | |||
skew: Pugs.Context.findList takes a whooping 6% | 09:02 | ||
and it's wrong as well because it only handles single inheritance | |||
I'd be very grateful if you (or other people) can refactor it into Data.Graph.Inductive | |||
& | 09:03 | ||
skew | mandel.p6 seems to give more reasonable results. Heavy on Pugs.Prim.op2 like I would expect, then fairly generic sounding stuff | 09:12 | |
(that is, I expected mandel to be pretty heavy on math and op2 sounds like the bit that does the math) | |||
gaal | does pugs.prof work for you guys? i get a coredump. | 09:21 | |
well, a segfault. | |||
well, a gpf. | |||
this is cygwin :) | |||
skew | works for me | ||
gaal | did you have to install anything special? or just a usual ghc 6.4? | 09:22 | |
skew | yeah | ||
see if profiling works at all with cygwin | |||
gaal | what should i try? (i'm new to haskell) | ||
skew | wait, pugs.prof is supposed to do the tests on it's own. Building the profiling version and running it with pugs +RTS -p -RTS worked | 09:23 | |
gaal | doesn't work for me. | 09:24 | |
skew | just barely saved my pugs.prof from mandel.p6. make pugs.prof seems to be working | ||
gaal | i'll try this on linux then. will take a while. | ||
skew | make some little Haskell program, toss in the -prof option when you compile it, then run it with +RTS -p | 09:25 | |
see if it gives you a <progname>.prof (good) or a segfault (bad) | |||
enough of a beginner that "make a little Haskell program" is an issue? | |||
gaal | no, i can do that. :) | 09:26 | |
skew | how long have you been learning, and what can you do? | ||
gaal | i can add trivial Prims. i still fear monads. | 09:27 | |
but recursion and e.g. fold are ok. | 09:28 | ||
skew | From visitors to #haskell I get the impression that some people take a long time to learn monads, I'm wondering if the story is different around pugs with more experienced perl programmers and less first-year students | ||
gaal | how long is harder to answer :) | ||
urp? on linux, | 09:29 | ||
Chasing modules from: src/Main.hs | |||
Could not find module `Data.Map': | |||
skew | do you have ghc 6.4? | ||
gaal | yes. | ||
skew | hmm | ||
is this building pugs? | |||
gaal | yes, i wanted to do that in the bg while trying profiling on cygwin. | 09:30 | |
oh wait, my tree was dirty. | |||
but no, that doesn't fix it. | 09:31 | ||
skew | is there any file that describes which modules do what? | 09:32 | |
gaal | not that i know. there's been work in the past few days to haddock things. | 09:33 | |
skew | well, the pugs work just claimed a second screen for browsing the tree then | ||
gaal | be | 09:35 | |
*brb | |||
skew | is there any pattern about which functions have type signatures? | 09:36 | |
gaal | i don't think so -- i see no reason not to include them | 09:41 | |
except where the author thought they're too trivial. | |||
skew | okay. doBoolIO took about 15% of the profiled run of the tests and didn't have a signature | ||
gaal | but i don't have much to say about style in a language i don't know :) | ||
does having a signature have any semantic difference? | 09:42 | ||
i thought it was mostly a documentation hint. | |||
skew | sticking on a signature with the same type that would be inferred doesn't | ||
but some things the type checker is not smart enough to figure out without a hit (that pesky halting problem, you know) | 09:43 | ||
gaal | yeah | ||
but has this anytrhing to do with profiling? | |||
skew | also, you can give it a more restrive type than would be otherwise inferred | 09:44 | |
gaal | i'd think signatures had only compile time effect? | ||
yes, i see that. | |||
aha! on my cygwin, any profiling fails. | 09:45 | ||
skew | relevant to profiling, if a function ends up polymorphic with a class constraint it is Bad for performance | ||
gaal | "my cygwin" is really ghg-mingw | ||
skew | rule one of optimization is to find and squish laziness and polymorphism | 09:47 | |
gaal | skew, so could we benefit from narrowing doBoolIO to (possibly several) more tightly typed functions? | ||
skew | I think it already gets a specific type | ||
but that findList autrijus mentioned is polymorphic in Eq, and only used at one type! | |||
do you know how the typeclass stuff works at runtime? | 09:48 | ||
for that matter, does autrijus? | |||
gaal | sorry, no. | ||
beh, on linux 'make optimized' works but regular 'make' breaks. | 09:49 | ||
skew | if you have a type like (Eq a) => a -> [a] -> Bool, then internally it takes an extra argument, a record full of the methods for an Eq instance, and uses functions from that record every time it sees a method from Eq | ||
gaal | ...and the prof target is broken as well | ||
skew | at every call, the compiler passes along the right record for whatever type a is is that that call uses | 09:50 | |
gaal | sounds like virtual method calls :) | ||
eg c++ vtable hack | |||
ok | |||
skew | pretty close, except usually (C++ template magic aside) the language can't go out and automatically define a new subclass for your problem | 09:51 | |
but anyway, if the compiler has a specific type, then it can call those methods directly, and more than that it can inline them and apply all sorts of crazy GHC optimizations to them | |||
actually, typeclasses are more like delegation and the coding style in an untyped language | 09:52 | ||
they just formalize "anything that has method X" | 09:53 | ||
gaal | okay, i made ghci and did :t doBoolIO, and got something extremely hairy | ||
skew | you did? | 09:54 | |
I expected something like a -> (a -> Eval Bool) -> IO Bool? | |||
could you past it in for me? | |||
pasteling | "gaal" at 192.115.25.249 pasted "something extremely hairy" (10 lines, 370B) at sial.org/pbot/9782 | ||
skew | Okay, it's not as bad as 10 lines sounds | 09:55 | |
gaal | one of the things that haskell and perl have in common is that 10 lines can be a lot of hariness. :) | ||
skew | I wonder how many instances of Value there are running around | ||
gaal | i wish i knew more haskell to be able to answer that. | 09:56 | |
skew | I'd put my money on Haskell for sheer mind bending. I should look over the IOHCC winners and see if there was any sophisticated entries, or it was mostly just ugly syntax | ||
autrijus | yo. | 09:58 | |
skew | hi | ||
autrijus | gaal, skew: please feel free to commit more type signatures. | ||
skew: committing via darcs is currently broken, but you can send patches, or (again) if you are willing to suffer svn, I can give you committer right there | |||
skew: and no, I had no idea that typeclasses are vtabled at compile time. | 09:59 | ||
and yes, there are lots and lots of Value instances, so we can't do without that | |||
skew | I think I've got a copy around. I can figure out how to use it | ||
that's not the only way to solve the problem | |||
gaal | skew, the classic perl one-liner nuke isn't even very obfuscated: | 10:00 | |
perl -wle '(1 x $_) !~ /^(11+)\1+$/ && print while ++ $_' | |||
skew | hmm, mabye it is | ||
autrijus | I'm fixing Context.hs to say Type instead of Eq a => a | ||
skew | is most of Pugs polymorphic ic Value? | ||
autrijus: hold off on that for a bit | |||
I'm trying something a bit different | |||
autrijus | skew: yes, most of the primitives are based on fromVal | 10:03 | |
which pulls out a polymorphic Value from a Val | |||
pasteling | "gaal" at 192.115.25.249 pasted "xargs elimination" (16 lines, 781B) at sial.org/pbot/9783 | ||
autrijus | skew: too late, I've already checked in Context.hs | 10:04 | |
skew | there is a SPECIALIZE pragma which should be as good for some of the stuff in Context | ||
gaal | autrijus, or someone, mind trying this patch? i do't have a system to test it on myself. | ||
autrijus | skew: the real problem is Context.hs wants a rewrite using Graph. | ||
skew: Tree is wrong -- Perl 6 need multiple inheritance | |||
gaal | (autrijus, plain "make" is broken on linux) | ||
autrijus | gaal: broken how | 10:05 | |
gaal | LD_RUN_PATH="" cc -shared -L/usr/local/lib Pugs.o -o /home/roo/src/pugs/blib/arch/auto/Perl6/Pugs/Pugs.so | ||
cc: Pugs.o: No such file or directory | |||
cc: no input files | |||
make: *** [/home/roo/src/pugs/blib/arch/auto/Perl6/Pugs/Pugs.so] Error 1 | |||
but make optimized does work. | |||
skew | wait, does make install install under the name perl? | 10:06 | |
gaal | skew, it should not! | ||
as /usr/bin/pugs | 10:07 | ||
autrijus | gaal: it needs to say =$*IN | ||
skew | oh, it was a message from ghc-pkg about plugins | ||
autrijus | gaal: checked in | ||
gaal | er, yes, thanks :) | ||
skew | I thought for a moment it was pugs complaining | 10:08 | |
autrijus | gaal: that is very wrong. your tree is clean? is this perl 5.8.1+? | ||
you have a sane makemaker? | |||
skew | make seems to be working just fine here | ||
gaal | 5.8.4, i'll make reallyreallyclean again. | ||
autrijus | ditto here | ||
gaal | hey, how come rm -rf * ; svn up does something? :) does * not glob .svn? | 10:09 | |
hmm, the real clean make helped. | 10:10 | ||
skew | SPECIALIZE tells GHC to generate an optimized version for the types you specify, and use that wherever it can | 10:11 | |
jabbot | pugs - 2520 - * add some signatures to Context.hs upon | ||
pugs - 2521 - * remove xargs from "make pugs.prof" fro | |||
skew | do the signatures help performance any? | 10:12 | |
autrijus | dunno, haven't tested. I'm working on $work now | 10:13 | |
skew: I don't think we want SPECIALIZE for things that are monommorphic anyway. | 10:14 | ||
it can help for the functions that has (Value a) polymorphism. | |||
skew | if there are few enough instances that it's workable to specialize everything for all of them | 10:15 | |
actually, I don't think it helps at all if you are using fromVal all over the place | |||
because then it doesn't know at compile time what type it's getting so it has to use the dictionary packed up in the Val | |||
autrijus | right. | 10:16 | |
skew | Hopefully jhc makes all these worries obsolete | ||
do you ever use code at some particular known Value insatnce? | 10:17 | ||
that's the only way SPECIALIZE would help | |||
I think | |||
autrijus | well, yes I do | 10:19 | |
all the stuff in Prim.hs | |||
skew | Hey, I think UNPACK is different from ! and -funbox-strict-fields | ||
autrijus | how so? | ||
GHC manual says they are the same | |||
skew | are they? | ||
autrijus | yeah. | ||
"See also the -funbox-strict-fields flag, which essentially has the effect of adding {-# UNPACK #-} to every strict constructor field." | |||
in 7.9, Pragmas | |||
skew | okay | 10:20 | |
so there's not another howevermany percent sitting there :( | |||
autrijus | nope :) | ||
personally I'm already quite happy with how fast Pugs is. | |||
skew | I guess unboxed values would have to be stuck right into the constructor | ||
autrijus | i.e. works for my production needs already | ||
skew | that's nice. | ||
How much slower than perl5 is it? | 10:21 | ||
autrijus | the operator dispatch was ~100 times slower | ||
skew | I heard two orders of magnitude more instructions per op, but that was a while ago | ||
autrijus | since we only improved to 5x speed or so | ||
I'd say still much slower. | |||
skew | how does that op stuff work? | 10:22 | |
autrijus | and I'm happy really, because to get any faster | ||
I'll use the parrot and/or ghc compiler backend | |||
that is | |||
pugscc --runparrot examples/mandel.p6 | |||
which is already _faster_ than peerl 5. | |||
all the op stuff is in Prim.hs | |||
and the dispatching happens on Eval.hs | 10:23 | ||
skew | I hope the string matching only happens once | ||
I mean op2 and such | |||
autrijus | yeah. | ||
I have no idea | |||
skew | make pugs.prof now fails in linking for me | 10:25 | |
why should findList be happening a lot anyway? | 10:27 | ||
autrijus | because it is used to do subtype matching | 10:29 | |
via isaType | |||
i.e. a Int is a Rat | |||
a Rat is a Num | |||
and so on and so forth | |||
many op dispatch needs to perform typecasing to determine which MMD instance to dispatch into | 10:30 | ||
see the large tree at end of Context.hs | |||
skew | does mandel.p6 have to be written that strangely? I thought I could just find a line number somewhere and tweak that to make it only draw half the thing | 10:33 | |
where did you get the C anyway? The IOCCC? | 10:35 | ||
autrijus | skew: line 36 | 10:36 | |
make it > 0 | |||
I committed the change | |||
skew | I changed y=30 to y=10 | ||
autrijus | skew: I have no idea. it's from parrot tree | ||
skew | it seems to be drawing the bottom third now | ||
you guys know those are examples of bad C style right? Even if it is more readable than the perl ... | 10:37 | ||
though some of the blame definitely goes to the default color my editor gives those $ variables | |||
gaal | skew: "This is badly hacked to get Parrot compiler going" | 10:38 | |
skew | yeah, that's what I was asking about | ||
autrijus | right, except I think we can unhack it now | ||
because our parrot compiler is much better now | 10:39 | ||
but it will probably need to remain in the ugly C-based style | |||
just to get things fairly benchmarked | |||
(against pasm, p5, C, etc) | |||
woot, I've sent Pugs's Haskell Community Report. | |||
# autrijus.org/hca2005may-pugs.txt | 10:41 | ||
jabbot | pugs - 2522 - * only draw mandelbrot once | ||
autrijus | bbl. :) & | 10:44 | |
skew | single character $ variables are pretty unreadable in a light blue color where my eyes blur everything into an S-shaped blob with something sticking off to the right | ||
what did that patch change? | 10:47 | ||
gaal | skew, what editor /font/colorscheme do you use? | ||
skew | vim, with one of the stock colorschemes (I've forgotten which) modified not to show some important Haskell construct in a similarly unreadable color | 10:48 | |
gaal | fwiw, i like the koehler colorscheme in vim | 10:49 | |
skew | though the unreadability might have been an artifact of coding in daylight hours | ||
gaal | not used to that, eh? :) | 10:50 | |
skew | no, I was doing that way back when I made the colorscheme | ||
evening, with green instead of bright yellow | 10:51 | ||
gaal | and what font? i use MS Courier New, though i am looking to change it. (But I require unicode, so it isn't easy to find something) | 10:53 | |
need to try dejavu.sourceforge.net/wiki/index.php/Main_Page | 10:54 | ||
skew | whatever my terminal is using | ||
gaal | if you say your $s blur a lot, maybe a different font can help. | ||
skew | it's fine with something like koehler | 10:55 | |
some colors are just harder to resolve | |||
I think it's time to stop letting new patches interfere with my work | 10:57 | ||
I'm going the make my copy of pugs run my copy of mandel.p6 blazingly fast, and you want to make changes you can optimize them yourself :) | 11:00 | ||
I wonder how much I would disturb the timing if I learned Ruby on Rails at the same time | 11:04 | ||
I can always just chat on IRC while stuff builds and times, I guess :) | |||
I have a friend with many neat ideas for things to write, but he's too caught up in coding them all up to discover for himself that there are better languages than C# and ASP.NET out there | 11:06 | ||
I figure if I can reimplement a fair chunk of one of his web things with an order of magnitude less code that might get his attention | 11:07 | ||
gaal | avoid html as much as possible if you want to manage that :) | 11:08 | |
skew | I think not counting HTML is pretty fair | 11:09 | |
gaal | hey, avoid *http* as long as possible :) | ||
castaway | skew, heh, poor guy | 11:12 | |
skew | what compiler backends are there? | 11:13 | |
never mind, I found the pugscc script | 11:14 | ||
maybe interning strings could help | 11:16 | ||
== on [Char] can be a bit slow | 11:17 | ||
how much value is there in making pugs fast? | 11:24 | ||
gaal values fast | 11:25 | ||
as long as it doesn't obfuscate the code so much it's too hard to maintain | |||
skew | okay | ||
gaal | hey, i'm just another perl6 hacker though :) | 11:26 | |
skew | actually, a lot of the complexity I'm contemplating would be hidden from most of the code | 11:28 | |
wow, runparrot is a *lot* faster than the interpreter | |||
more than 60x faster | 11:30 | ||
gaal | skew: www.mail-archive.com/perl6-compiler...00417.html but i guess you figured all that out by now. | 11:32 | |
it isn't so surprising that the compiled versions run faster than interpreted code, is it? | 11:33 | ||
skew | of course, the C cde is 100x faster yet | ||
pjcj | is that with an optimised parrot build? | 11:35 | |
gaal | and hand tuned assembly might be faster still, but at some level it stops mattering :) | 11:36 | |
pjcj | IIRC the default is unoptimised | ||
skew | wait, I was looking at real time. The C is 300x faster | 11:38 | |
I doubt there's more than about 10x to gain with clever assembly | |||
pjcj | in the end, real time is all that matters though, right? | 11:39 | |
skew | isn't it wonderful programs can be 1000x suboptimal and still fast enough for all practical purposes | 11:40 | |
well, the real time for C is dominated by output | |||
gaal | it's especially possible if it takes 1000x less time to code them :) | ||
skew | I just realized I've been timing the unoptomzied pugs | 11:43 | |
I wonder if anyone has tried to build pugs with jhc? | 11:44 | ||
gaal | does it have all the newest ghc extensions? | 11:45 | |
skew | heh | ||
no | |||
It's something somebody wrote themselves to learn Haskell and try out some ideas | 11:46 | ||
gaal | sounds familiar :) | ||
skew | it has an interesting implementation of type classes that might help pugs a lot | 11:47 | |
it doesn't do much optimization yet, though | |||
actually, the extensions might not be that much work | 11:48 | ||
STM is just an issue of the runtime and you can take that from GHC | |||
as for the fancy types, the internals are already geared up for dependent types | 11:49 | ||
It's mostly an issue of parsing, typechecking, not having any optimizations, and already taking a gig of ram to compile hello world | |||
gaal cheerfully has a gig of ram on his main box :) | 11:50 | ||
skew | implementing separate compilation should help bring that down | ||
also it's a bit odd in that fancier optimizations improve compiler performance | |||
gaal | "separate compilation" == compiling separate units then linking them? | ||
skew | because a simple program is sent to the bits that are really slow | 11:51 | |
though I think John just found a paper about how to do it in linear time instead of exponential or so | |||
gaal: was | |||
yes | |||
theorbtwo | john == the jhc guy? | ||
skew | basically, all the function pointers and typeclasses and stuff are inlined together into case statements | 11:52 | |
yes | |||
JohnMeacham, sometimes on #haskell | |||
gaal | brb | ||
skew | something like that anyway | ||
If I understood him right, higher order functions from the library need to be recompiled against the code in your program that calls them | 11:53 | ||
but apparently there is some way to save lots of info to make this fast | |||
after all, the linker still has to copy over the library definitions under GHC | |||
anyway, typeclass stuff compiles to functions that take a representation of the type they are being applied to, and pattern match on that | 11:56 | ||
so with something like unpacking Val it can theoretically do a single case, then go to code for dealing with that particular type | |||
gaal | skew, can you help with a parsec Q? | 12:05 | |
skew | sure | ||
gaal | inside a rule, i'm trying to get and optinal next bit of data. | 12:06 | |
skew | that should be easy | ||
gaal | what does this do when it fails? | 12:07 | |
lineNum <- try $ many1 digit | |||
skew | fails and tries the alternative | ||
except writing it like that it seems you're in the middle of a do block | |||
gaal | lineNum <- try $ do { many1 digit } <|> return () | 12:08 | |
skew | try is a mark for backtracking | ||
gaal | ? | ||
skew | oh, that's just precedence error | ||
try (many1 digit) <|> return () is the right idea | |||
except use Maybe instead of trying to return either a number or unit | 12:09 | ||
gaal | and then lineNum will be null when the lookahead failed? | ||
skew | no, then ghc will tell you that numbers and () are a very different type | ||
gaal | oh: how? | ||
skew | well, there should be a function called option somewhere that already does all that | ||
gaal | can't blame it :) | ||
skew | do you understand the LL parsing stuff? | 12:10 | |
gaal | nope, no theoretical background :( | ||
skew | basically, at any choice Parsec goes with the first parser that is willing to take the next character of input | ||
gaal | yes, which is why i mustn't consume things in the first parser if i want to try the second | 12:11 | |
skew | so if the second character gives a parse error, that's too bad because it's already chosen that alternative | ||
try changes it so it will try the next if there's ever a parse error | |||
really it's more like a parser uses lazy evaluation to return DontMatch or StartedParsing <thunk> right away | 12:12 | ||
then the inside evaluates to either Fail <reason> or Success <value> (in some Either lookalike type) | 12:15 | ||
gaal | i unfortunately only have a wisp of your gist :) | 12:16 | |
skew | 1) by default, once a parser takes a character you're committed 2) try changes that so if it ever fails you will go to the next alternative 3) the implementation is really elegant and uses neat Haskell-stuff | 12:17 | |
gaal | :) | 12:18 | |
why does this parsefail on "="? | |||
lineNum = option (-1) (do { n <- many1 digits ; return read n }) | |||
skew | oh, and 4) There's probably already a combinator to do whatever you want in the library | ||
I don't think "=" is a digit | |||
oh, ghc doesn't like it. Are you in a do block? | 12:19 | ||
gaal | ...and is there a way to use that... combinator to evaluate to either Nothing or Just someNumber? | ||
skew | it's var <- code to run monad stuff, or let var = expr to name something | ||
gaal | let's see... | ||
skew | sure, just use Nothing as the default and wrap your answer in Just. | 12:20 | |
or, make your own option | |||
gaal | i am in a do, and this fails: lineNum <- option Nothing (do { n <- many1 digit ; return $ Just (read n) }) | 12:21 | |
i can't return a Maybe? | 12:22 | ||
skew | that should work | 12:23 | |
gaal | ah, it was getting confued because i hadn't changed my next line to use a Maybe | ||
skew | I got my two monitors from people moving away for about $150 total, and got the third from the CS department's abandoned stuff pile | 12:25 | |
gaal | are they all connected to one computer? | 12:26 | |
skew | yes | ||
though I was explaining to tuomov on #haskell what great use I'm making of ion | |||
theorbtwo wants one of those. | |||
(A CS department's abandoned stuff pile, that is.) | 12:27 | ||
gaal | ion kinda disagrees with the many screens philosophy :) | ||
skew | how so? | ||
I thought the idea was to efficiently use all your space | |||
gaal | ion is the maximized window wm, no? | ||
skew | I go for tiling | 12:28 | |
to me it's about efficient use of screen real-estate and making it easy to get around with keys | |||
there's nothing wrong with having more real-estate to use efficiently | 12:29 | ||
gaal | my eyes, not being what they used to, really appreciate maximized xterms | ||
yay! i another test passes. | |||
skew++; # help with parsec | |||
okay, this must be utterly trivial, but how do i implement followedBy? | 12:39 | ||
ie, i want to assert that the next character isSpace | 12:40 | ||
but not consume it. | |||
it it just "try isSpace"? | |||
skew | no, that will consume it | ||
gaal | really? i thought the whole idea with try is that it doesn't consume? | 12:41 | |
man, this is so much easier with regexps :) | |||
skew | no, the idea with try is that it can still backtrack and try another alternative even if it does fail | ||
gaal | hmmm. | 12:42 | |
skew | how about lookahead? | 12:54 | |
gaal | not mentioned in www.cs.uu.nl/~daan/download/parsec/parsec.html | 12:55 | |
maybe l'm looking at an old doc? | |||
skew | it's documented with the rest of the libraries now | ||
gaal | oh | 12:56 | |
skew | there are no descriptions for many functions, but they are listed | ||
gaal | not mentiond here either: haskell.org/ghc/docs/latest/html/li...dex-L.html | 12:57 | |
nothingmuch | ingy: ping | 13:03 | |
gaal: is thirst in hebrew a male noun? | 13:07 | ||
the page has 'zama kitsoni' | |||
and i don't know if it should be kitsonit | |||
gaal | yes. | ||
nothingmuch | i'm 90% sure | ||
yes male or yes female? | |||
gaal | yes SIR! | ||
yes masculine. | |||
nothingmuch | okay, so when you say 'zama kizonit' it's because you really mean 'thushat zama kizonit'? | 13:08 | |
skew | Text.ParserCombinators.Parsec.Combinator.lookAhead | ||
gaal | nm: i guess. | ||
nothingmuch | grazie seƱor | ||
gaal | thanks, skew! | 13:09 | |
i can't believe how long it's taking me to do /("?)(.*)\1/ :) | 13:10 | ||
xerox | Is it missing a '/' ? | 13:11 | |
gaal | no :) | ||
xerox | Oh, what does it mean? | ||
gaal | it matches a sometihng optionally surrounded by quotes | 13:12 | |
and the interesting something goes to $2. | |||
skew | how about between (char '"') (char '"') (many anyToken) <|> (many anyToken)? | ||
xerox | Oh yes! :_) | ||
gaal | :) | ||
complications: there may be trailing whitespace, which i want to ignore; | 13:13 | ||
skew | porting regular expressions is going to give you very strange parsers | ||
gaal | and i certainly don't wan tto consume the newline that may be there. | ||
skew: i'm doing #line, which is one of three things: | |||
skew | oh, anyChar should be what you want in the middle then | 13:14 | |
gaal | #line NUM -> setPosion pos { sourceLine = NUM } (basically) | ||
#line NUM "FILE NAME" -> setPosition pos{ souceLine = NUM, sourceFile = FILE NAME} | 13:15 | ||
skew | if this is using Token, then just stick lexeme around anything you want to each trailing whitespace | ||
gaal | and this has to have a VERY SOFT failure mode, because if this fails, eg | ||
#line oh no that's not what i meant | |||
or | |||
#line 123fooled you! | |||
then this falls back on a comment :) | |||
skew | you mean you want it to be very strict? | 13:16 | |
gaal | let say, | ||
using Java terminology, :) | |||
skew | sounds like you want it to be very picky about what it recognizes, and use try to fall over the comment | 13:17 | |
gaal | i want to surround the whole rule with a try { } catch { treat this line as comment } | ||
skew | that would be <|> | ||
gaal | but that means i really muistn't consume things until the last moment. | ||
skew | I think maybe you have used regular expressions when you should have used a real parser too many times | ||
gaal | don't you mean Real Parser? :-p | 13:18 | |
skew | why were you even trying to parse something that optionally had quotes around it? | ||
gaal: nah, that's probably writing the state transition table by hand | |||
gaal | well, we're all learning here :) how would you suggest this should be done? | 13:19 | |
skew | do { string "#line"; whitespace; many1 digit; option (return 'q') (between (char '"') (char '"') (many anyChar)); whitespace } | 13:21 | |
see if that parses what you want | |||
do you know if you are using Token? | |||
Where does the parser live? | |||
gaal | wait, first of all the quotes are optional | ||
skew | are spaces allowed in the filename then? | 13:22 | |
gaal | and whitespace, doesn't that include \n? | ||
spaces are allowed if you use quotes :) | |||
skew | maybe I mean spaces | ||
gaal | the code is in Pugs/Lexer.hs | ||
oneLineComment | 13:23 | ||
which i think is on the style of oneEyedPirate | |||
(arrr) | |||
hey, aren't matches greedy? | 13:25 | ||
oh, scratch that, you were anho | 13:26 | ||
anchoring against quotes. | |||
skew | I don't know if that works | ||
gaal | the versiony you have in your source tree didn't go very far | 13:27 | |
i've hacked it a bit since. | |||
skew | oh, I'm thinking of the UU combinators, which do have a non-greedy many | ||
gaal | well, worst case, we can try against your rule | 13:28 | |
and if it failes, try against a rule with a single unquoted token | |||
and if it fails, try against #line NUM which deals with a comment fallback internalky. | 13:29 | ||
skew | I would just replace anyChar with something a bit more specific | ||
if escapes are allowed in the filename you could parse it as a string | |||
gaal | i guess they have to be | 13:30 | |
otherwise you won't be able to say | |||
skew | don't try to do everything in a single expression | ||
gaal | #line 123 "file\nwith\nan EXCEPTIONALLY sneaky name" | ||
key, it's not me | 13:31 | ||
s/k/h/ | |||
it's the semantics defined by p5 | |||
skew | if it's getting too complicated, start a new definition for quotedFilename, or whatever | ||
gaal | where, of course, this is implemented in c | ||
well, that's where i get confused about not consuming input when i fail. | |||
skew | test little bits of the parser separately | 13:32 | |
write more complete parsers that refer to the little ones | |||
the magic word is compositionality | |||
stevan | is openfoundry.org down? | 13:36 | |
theorbtwo | I just checked in the missing util/munge_haddock.pl a moment ago. | 13:37 | |
(I really need to be more careful...) | |||
stevan | hm, I cant seem to connect to it | ||
oh well | |||
gaal | i've had problems this morning, stevan, but it works now | ||
stevan | hmm, this happened once before, it was an DNS issue,... which would explain why it works for you guys and not for me | 13:40 | |
oh well I was going to just mess around with test.pm anyway | |||
anyone have any opinions on the :todo<bug> :todo<feature> idea? | |||
bugs would fail unless PUGS_RELEASE was on | 13:41 | ||
jabbot | pugs - 2523 - Whoops, add missing munge_haddock.pl! | ||
stevan | and features would just show TODO (like regular) | 13:42 | |
(at least this is how my caffine deprived brain is viewing it right now) | |||
gaal | stevan, i never really understood the aim of release-time TODO and what the solutions were trying to achieve. maybe a rationale-type doc can help? | 13:43 | |
stevan | gaal: the whole idea is quite simple | 13:44 | |
to avoid bug reports for problems we know about :) | |||
its bad QA practice (which is why Schwern was so offended by it), but it is practical given the release schedule | 13:45 | ||
and the fact that even if we explained that, people done read, so there will still be a glut of bug reports | |||
gaal | okay; what's wrong with making sure the candidate has all fixable bugs accounted for and then | 13:46 | |
make test | force_todoer > force_todo_list | |||
? | |||
stevan | a force_todoer script would be just about impossible to write | 13:47 | |
well actually maybe it wouldnt | |||
gaal | why? the release manager looks at the last smoke, decides it's as good as it's going to be, and registers those tests as force_todo | 13:48 | |
(modulo parsefauils, of course) | |||
stevan | so you are basically saying, when we decide to release | 13:49 | |
we gather all the failures (through some means) | |||
and then just force_todo them | |||
gaal | presumably those failures are exactly those we "know about" and dont' want bug reports on, no?> | ||
stevan | yes | ||
I mean this is pretty much what happens now | 13:50 | ||
just manually | |||
gaal | there's a minor issue of platform dependent bugs | ||
the yaml output contains all failing tests in easy-to-use form | |||
stevan | hmmm | 13:51 | |
gaal | so what are the shortcomings of this approach? | ||
stevan | nothing | ||
it is an automation of what we are doing manually right now | |||
gaal | but you mentioned todo<bug> and todo<feature> | 13:52 | |
what are those? | |||
stevan | there are really two levels of TODO | ||
gaal | known bug and futures? | ||
stevan | the stuff in t/oo is :todo<feature> since they are no where near done | 13:53 | |
gaal | ("futures" eq "features to be implemented in the future" :) | ||
stevan | yes | ||
:todo<bug> is someting which should be implemented, but is not (for whatever reason) | |||
like 'for @list &sub' | |||
gaal | and todo<bug>s are not bugs, they're you-know-what :) | ||
all right; this obviously needs human interaction. | 13:54 | ||
stevan | yes | ||
yeah I am not sure <bug> is a good name | |||
gaal | okay, so i do see a possible problem | ||
we want to have the test results not say things are okay, but rather "it's okay, i knwo this doesn't work." | 13:55 | ||
but that's just a display issue in the test harness | |||
and the user doesn't care if it's because of a known bug or a missing feauture | |||
have we forked off test::harness already? or is ours a pristine copy of something on cpan? | 13:57 | ||
stevan | it is still a pristine copy | ||
gaal | well, maybe it's time to change that. because the problem isn't in Test.pm, i think, but rather in the harness. | 13:58 | |
stevan | yeah I think you are right | ||
the test harness should be able to report number of TODOs like it does number of SKIPS | |||
gaal | we have our copy anyway, might as well moose it up. | ||
stevan | at a minimum | ||
well is this a TAP issue? or a Test::Harness issue? | 13:59 | ||
gaal | alternatively, we *could* cheat and overwrite the make test target to run the yaml harness ;-) | ||
but not really, because we don't want to bundle yaml.pm too | |||
stevan | :) | ||
gaal | TAP does say something is TODO | ||
nothingmuch notices buzzwords and decides to join i | 14:00 | ||
n | |||
gaal | but it doesn't differentiate <bug> vs. <feature> | ||
stevan looks at the TAP doc | |||
gaal really must grab a bite | |||
scook0 finally manages to build all the haddocked documentation -- thanks, theorbtwo! | |||
stevan | gaal: I wonder if in TAP we can just add support for reporting TODOs | ||
gaal | we can do it as an undocumented extension | ||
stevan | and then in the yaml harness we can get more detailed/pugs specific | 14:01 | |
gaal | TAP doesn't *report* anything | ||
but it does say a test is TODO | |||
stevan | gaal: true | ||
gaal | it's the harness that decides to interpret not ok # TODO as "ok" | ||
stevan | ok, so we patch Test::Harness | ||
gaal | which is why | ||
exactly | |||
stevan | I guess what I am saying though is this | ||
reportnig TODOs is useful for others | 14:02 | ||
the different type of TODOs are only useful to us | |||
so if Test::Harness reports TODOs | |||
that will be good enough for us | |||
and then the YAML harness can differentiate | |||
since that is what we all use for development anyway | |||
gaal | okay, so if i understand correctly, this is just a small display change in Test::Harness. | 14:03 | |
stevan | yes | ||
which I am sure the perl-qa folk would like and apply | |||
nothingmuch | see actual_ok | 14:04 | |
in TAP::Model | |||
gaal | and this is orthogonal to our force_todoings. | ||
stevan | gaal: yes | ||
gaal | actual_ok == false for not_ok # TODO, right nm? | ||
nothingmuch | yep | ||
stevan | Schwern's issue with our force_todo policy is that no one knows there are errors | 14:05 | |
gaal | that's entirely our problem | ||
nothingmuch | actual_uk is really just the 'ok' or 'not ok' with no meaning | ||
gaal | by which i mean | ||
not a T:H issue | |||
stevan | IMO if we show our TODOs then we are still being honest, but avoiding uneeded bug reports | ||
gaal | okay, let's hack this then. | 14:06 | |
stevan | gaal: ok I am lookin at T::H::run_all_tests | ||
gaal | stevan, mind if i disappear for a few miunutes? i really have to make myself a sandwich. | 14:07 | |
stevan | gaal: go ahead, i will mess around with this | ||
gaal | beb & | 14:08 | |
s/e/r/ | |||
rehi | 14:18 | ||
stevan | gaal: | 14:21 | |
this is pretty simple :) | |||
I think i have it already | |||
gaal | good :) | ||
stevan | basically it now outputs like this | ||
t/builtins/arrays/end....ok | |||
1/16 skipped: just skippin, 2/16 TODO test(s), 1/16 unexpectedly succeeded | |||
All tests successful (1 subtest UNEXPECTEDLY SUCCEEDED) (2 subtests TODO), 1 subtest skipped. | |||
I added a skip and an unexpected succeedd | 14:22 | ||
gaal | woot | ||
stevan | just to see how itall looked | ||
but it basically just reports TODOs much like it reports SKIPS | |||
:) | |||
autrijus | yo. | 14:24 | |
shapr | y0 | ||
stevan | hey | ||
autrijus | stevan: you can start doing changelogs :) | ||
stevan | autrijus: sure thing boss :) | ||
autrijus | release eta less than 30 hours from now | ||
gaal | yay! release soon? | 14:25 | |
autrijus | no other major changes planned | ||
stevan: thanks! | |||
gaal: sure... it's weekend again | |||
stevan | autrijus: I am not having luck connecting to openfoundry though | ||
gaal | stevan: i'm your backup man, yo | ||
stevan | gaal: :) | ||
autrijus | stevan: hm worksforme | ||
stevan: is it dns? | |||
stevan | autrijus: I think so | ||
autrijus | try switch relocate to openfoundry.dyndns.org | ||
stevan | it will probably work soon, gaal has similar issues earlier | ||
theorbtwo | autrijus: sorry I've been a bit sloppy on my checkins of late -- I shall endevor to do better. | 14:26 | |
stevan | ok | ||
autrijus | svn switch --relocate | ||
theorbtwo: that's just fine, I do that all the time | |||
:) | |||
theorbtwo: think you can make "make haddock" work on 6.2.2? | |||
(pugs 6.2.2 that is) | |||
stevan | openfoundry.dyndns.org works :) thanks | 14:27 | |
autrijus | np | ||
gaal | oh crap, stevan i just noticed what day it is tomorrow and i may not be available as much as i'd like. | 14:28 | |
theorbtwo | Ooof, makefile hacking. | 14:29 | |
stevan | gaal: you going "up the river" as they say? | ||
Odin- | May day? | ||
theorbtwo | find src -name \*.hs|perl -pe 's/hs$/hpp/'|xargs make && haddock -h -o docs/haddock/ `find src -name \*.hpp` is what it should do. | 14:30 | |
stevan | autrijus: we are hacking Test::Harness to show TODOs | ||
t/builtins/arrays/end....ok | |||
1/14 TODO test | |||
autrijus | stevan: right, I saw that. wunderbar | ||
stevan | as an alternative to making everything die | ||
gaal | stevan, heh, no, though that might still happen :/ | 14:31 | |
stevan | I am going to submit the patch to the perl-qa folks | ||
gaal: passover related then? | |||
gaal | nah. | 14:32 | |
theorbtwo | Doesn't passover end today and not tomorrow in Israel? | 14:38 | |
gaal isn't the expert | |||
nothingmuch | it's ending! woohoo! | ||
i just finished the pitas today | |||
gaal | tomorrow is a work day, but some people have some more celebrations | ||
nothingmuch | but i have some regular bread | ||
nothingmuch survived yet another year | |||
shapr | yay | 14:39 | |
theorbtwo doesn't keep pasah dicha any more. | |||
gaal | oh, between isn't greedy? oooof. | 14:41 | |
theorbtwo | "between isn't greedy"? | ||
autrijus | gaal: why, it is | 14:42 | |
gaal | theorbtwo: parsec's between | ||
autrijus | open; x <- p; close | ||
gaal | oh! good. :) | ||
autrijus | it looks greedy to me | ||
theorbtwo | Ah. | ||
autrijus | i.e. if "p" here is "many1 anyChar" | 14:43 | |
theorbtwo | BTW: I only know because I checked wikipedia. | ||
autrijus | then between will always fail | ||
so it's not only greedy, it's committed | |||
(i.e. not back tracking) | |||
gaal | er, does that mean i can't use it with <|> ? | 14:44 | |
autrijus | hm? | ||
sure can | |||
as long as your "p" does not always match "close" | |||
stevan | cool, petdance is going to take the Test::Harness patch :) | 14:52 | |
gaal | yay! | ||
stevan | I just sent him a patch for Test::Memory::Cycle this morning too :) | ||
shapr | Oh hey, I advertised pugs a bit at the end of a monads overview I posted on the pragmatic programmers yahoo mailing list - article.gmane.org/gmane.comp.progra...-year/3286 | 14:57 | |
autrijus | nice. shapr++ | ||
instead of "container" I'd say "action" | 14:58 | ||
but I realise monad has this dual nature :) | 14:59 | ||
shapr | Yes, I know it's a 'lie for teaching' but I don't know how to describe it as both without overwhelming the listener. | ||
autrijus | "how to turn a value into an action", and "how to combine two actions together" | 15:00 | |
shapr | Hm, I'll try that on the next few people who ask for a monads tutorial on #haskell. | ||
The containers comparison seems easier for those used to objects. | |||
autrijus | yeah but IO is a more interesting monad than State. :) | 15:01 | |
I've run into people who thought State is all there is about monads | |||
shapr | Yeah, that's surprisingly common. | ||
autrijus | and came away thinking that trivial things in other languages takes lots of time in haskell. | ||
jabbot | pugs - 2524 - * same-named variables declared in inner | ||
autrijus | for me, (ReaderT IO a) is the canonical example when I talk about monad and transformers. | 15:02 | |
it has a certain elegance. :) | |||
shapr | I try to start with the Maybe monad because I think everyone has wished to abstract a huge stack of if-then-else. | ||
autrijus | er, no, people usually just use block exit. | ||
aka return() | |||
shapr | Hm, I hadn't thought of that. | 15:03 | |
autrijus | because most languages actually have ContT built in (but without callCC exposed) | ||
shapr | Maybe I'm pickier with my control flow. | ||
In that case, I really need to rethink my monads tutorial. | |||
autrijus | well, there will be people who think more like you, I'm sure. :) | 15:04 | |
we need all sorts of tutorials. | |||
shapr | I'm not convinced, most people seem instantly confused when I describe my thinking. | ||
autrijus | strangely it hadn't happened to me :) | 15:05 | |
shapr | You're not most people ;-) | ||
autrijus | ...but all people are not most people... | ||
shapr | excellent point | ||
I truly hope I can end up hanging out with you for a few days in person at some point. | 15:06 | ||
I think I will learn a lot. | |||
autrijus | ICFP, likely. | ||
shapr | I'm not coming this year, sadly. | ||
autrijus | I'll submit to Haskell workshop. | ||
oh. then Euro OSCON? | |||
shapr | Oh good idea! | ||
shapr googles to check dates | |||
autrijus | Euro OSCON could be expensive though, so make sure you get a talk accepted :) | ||
shapr | ICFP is also expensive, I might go if it were cheaper. | 15:07 | |
I had *lots* of fun at ICFP2003. | |||
autrijus | brb | 15:08 | |
shapr | Various real life difficulties have encouraged me to cut back on my output and take some time to search for balance, center, whatever you call it. | 15:09 | |
Will you be giving a Perl talk at EOSCON? | |||
autrijus | yeah. | 15:10 | |
likely a 3hr tutorial about Pugs | |||
at least. | |||
shapr | Spiffy. I could give a talk on QuickCheck and ports. | ||
stevan | autrijus: do you mind if I remove the PUG_RELEASE stuff? since TODOs are now reported? | ||
gaal | why is the inferred type of fileName () ? | ||
fileName <- choice | |||
[ do { (between (char '"') (char '"') (many anyChar)) ; trailingWhiteSpace } | |||
, do { many1 anyChar ; trailingWhiteSpace } | |||
] | |||
autrijus | tentatively named "Perl 6 Bootstrap Camp" | ||
stevan: sure, go ahead | |||
shapr | gaal: you haven't returned fileName | 15:11 | |
gaal | ah! | ||
silly me :) | |||
jabbot | pugs - 2525 - adding some more tests for end.t | 15:12 | |
webmind wishes perl6 was here | |||
shapr | It is here! | ||
webmind | not at the speed I like for production | 15:14 | |
webmind could code his product in perl6 | 15:15 | ||
but it won't be fast | |||
stevan | webmind: you could,.. at rate we are going, it will be fast enough | ||
webmind | what rate ? | ||
shapr | Yeah, did you see autrijus journal from yesterday? | ||
stevan | rate of development | ||
webmind | yeah | ||
how fast is it ? | |||
autrijus | webmind: actually, if you have your application coded | ||
in pugs interpreter mode | 15:16 | ||
stevan | webmind: this week alone has seen 50%+ speed increase | ||
webmind | nice | ||
autrijus | chances are that we will help tailoring Parrot backend for you | ||
to support the constructs you use | |||
then it is guaranteed to be faster than perl 5. | |||
webmind | hm | ||
how do you mean? | |||
stevan | there is a feature for tests policy here | 15:17 | |
autrijus | webmind: pugscc --parrot | ||
stevan | you want a feature,.. write a test | ||
autrijus | it generates parrot assembly code | ||
that is very very fast. | |||
webmind | hmmm | ||
autrijus | almost guaranteed to be faster than perl5. | ||
webmind | ok | ||
autrijus | so you can use the interpreter mode to test corectness | ||
webmind | so how would that work with the perl6 modules I'm using now ? | ||
er | |||
perl5 modules | 15:18 | ||
autrijus | you can load them via ponie | ||
talk to Nicholas on irc.perl.org #parrot for how | |||
or, to test them with interpreter, you can use eval_perl5() support in pugs | |||
(which needs some work, so tests welcome) | |||
webmind | hm | ||
gaal | webmind: or port the interesting ones to p6 :) | 15:19 | |
autrijus | that too. | ||
webmind | gaal, that's a bit ovwer my head | ||
over | |||
:) | 15:20 | ||
shapr | Might not be, you never know until you try. | ||
stevan | webmind: what is your application? | ||
gaal | webmind, it's a great way to learn perl6 | ||
because they already run | |||
webmind | stevan, making a decent photo album | ||
flexible, yet not too loaded | 15:21 | ||
gaal, uhuh | |||
I know it would | |||
be | |||
gaal | well, if you have to do lots of fancy image manipulation | ||
then the task sure ain't trivial | |||
autrijus | you can always call out to C libraries | ||
gaal | and you may need to embed c | ||
autrijus | actually I'm thinking about linking in libtap :) | ||
(probably not) | |||
webmind | not really.. it's more having a good way to order your pictures, and having flexible interface | 15:22 | |
which it is.. | |||
stevan | webmind: well we alreayd have CGI.pm, and File::Spec, that should be a good start | ||
webmind | ah no | ||
stevan | :P | ||
webmind | I'm using the tempplate toolkit | ||
-p | |||
stevan | ah | ||
gaal | that would be nice to have in p6 :) | 15:23 | |
autrijus | hm, I wonder if Test.TAP will make a good haskell library | ||
gaal: indeed :) | |||
webmind | template toolkit and Image::MetaData::JPEG are the main modules I'm using | ||
gaal | autrijus, for haskell itself, or for pugs? | ||
webmind | gaal, yes | ||
Image::MetaData::JPEG is still experimental though | |||
autrijus | gaal: for haskell itself, _and_ for pugs | ||
shapr | Oh hey, I need to hook up with Alias again next time he's online and ask him for more HaskellDemo suggestions. | ||
gaal | my OR was not exclusiuve ;-) | 15:24 | |
autrijus | as nice as quickcheck is, sometimes you want simple harnesses | ||
oh. :) | |||
gaal | although ", or" is often parsed as XOR in english, isn't it. | ||
shapr | Yes, I think so. | ||
autrijus | $ perl -e 'undef = 3' | 15:25 | |
Modification of a read-only value attempted at -e line 1. | |||
$ perl -e '(undef) = 3' | |||
# ok | |||
sigh. | |||
I wonder if perl 6 is going to keep this behaviour ;) | |||
gaal | what got assigned as 4 :) | ||
err, | |||
4-- | |||
ahem. :) | |||
autrijus | :) | ||
gaal | oh, it's there so you can do | 15:26 | |
(undef, $x) = something() | |||
autrijus | yeah. | ||
stevan | autrijus: I see the (undef) = 3 being somewhat similar to the _ in some functional langauges (Erlang is where I know it from) | 15:27 | |
autrijus | right. | ||
it's just overloading what undef stands for. | |||
stevan | although I would prefer something more like _ | ||
autrijus | yeah. | ||
stevan | but _ is already taken | ||
autrijus | is it? | ||
stevan | $_, @_, etc | ||
and _ is the filehandle right? | |||
-e _ | |||
gaal | before i knew about this syntax, i'd spell that as ($junk, $x) = ... | ||
stevan | gaal: me too :) | ||
gaal | _ is an annoying keyword in p5. it's always in main:: | 15:28 | |
autrijus, i think i send you a patch to gettext ages ago about that :) | |||
autrijus | that may be the case :) | ||
gaal | defininf sub _ { } doesn't look like it works | ||
although it really sorta does. | 15:29 | ||
stevan | gaal: this works perl -e 'sub _ { print "hey" }; _();' | ||
gaal | stevan, try doing that in package Moose. | 15:30 | |
stevan | ah | 15:31 | |
I see | |||
gaal | what do you know, it works. maybe in older perls it didn't? | ||
stevan | it just died in 5.8.6 for me | 15:32 | |
gaal | ahhh, right, i remember the problem. | ||
perl -le 'package Moose; sub _ { print "hey" } package Elk; _()' | |||
and anyway, now filiesh _ is screwed for life. :) | |||
i think when i first encountered this problem i had to trace perl to figure it out | 15:33 | ||
anyway: what's ambiguous about the read here? | 15:34 | ||
lineNum <- option Nothing (do { n <- many1 digit ; return $ Just (read n) }) | |||
....and is there a prettier way of saying this? | 15:35 | ||
stevan | ok the patched Test::Harness and the Test.pm with PUGS_RELEASE taken out are commited | 15:36 | |
gaal | yay. stevan, want me to write an extract_todo tool? | ||
stevan | I will mess around with the :todo<bug> :todo<feature> stuff after this release | ||
gaal: what would it do? | |||
autrijus | gaal: you can use the "integer" builtin | 15:37 | |
gaal | remember we said we wanted make test | force_todos > todos | ||
autrijus | or "decimal" | ||
I think "decimal" is what you want | |||
gaal | autrijus; okay, but still what's wrong with what i tried? | 15:38 | |
autrijus | gaal: nothing, it's just you have to annotate | ||
(read n :: VInt) | |||
stevan | gaal: let me work out the :todo<attr> thing first | ||
autrijus | gaal: since you had not used lineNum anywhere | ||
once you have | |||
then that is unneccessayr | |||
as it will know the type | |||
gaal | ah, i see! | ||
autrijus | actually, :: Int is right | ||
VInt is not it | |||
gaal | thanks :) | ||
autrijus | the joy of inferencing :) | 15:39 | |
gaal | i suspected something like that was happening because that very same line worked until i commented out something later | ||
stevan | I am off to do my weekend errands, bye all | 15:40 | |
autrijus: I will get that changelog to you later this evening (6-8 hours) | |||
theorbtwo is back. | |||
castaway is forward | |||
gaal | bye, stevan! | 15:41 | |
gaal is ever sideways | |||
theorbtwo | BTW, I'm going through and adding explicit signatures, since haddock documents signatures, and not so much the actual functions/instances. | 15:43 | |
autrijus | stevan: cool | 15:44 | |
theorbtwo: yes, please go ahead | |||
as complete as possible -- ghci is your friend | |||
but please drop module name prefixes. | |||
i.e. not Pugs.AST.Exp | |||
and if you see room of narrowing | 15:45 | ||
like | |||
(Eq a) => [a] -> a | |||
where it is only used for Val or Exp or Type | |||
then please narrow it | |||
it will buy us much performance according to skew. | |||
(and is more readable anyway) | |||
theorbtwo | Can't use ghci. Have been using ghc --show-iface=src/Pugs/foo.hi some, but that doesn't list everything (presumably it only lists exported functions when there is an explicit export list). | 15:46 | |
Will keep the narrowing advice in mind. | |||
Have mostly been using error messages. | |||
autrijus | k. | ||
"make ghci" | 15:47 | ||
and then | |||
:m Pugs.Prim | |||
:t foo | |||
has worked for me | |||
gaal | is what :t does a callable funciton? | 15:48 | |
if so we can dump this for theorbtwo pretty easy | |||
autrijus | I don't know, I think hsplugins may have access for it | ||
gaal | find -name \*.hs| xargs perl -le 'print $1 if /^(\S+) =/ | 15:49 | |
but don't tell skew i used a regexp for that ;) | |||
theorbtwo | GHCi runtime linker: fatal error: I found a duplicate definition for symbol blkcmp | 15:50 | |
autrijus | seen corion | 15:51 | |
jabbot | autrijus: I havn't seen corion , autrijus | ||
autrijus | hm. I was about to ask whether he can write to p6l for me | ||
or rather, for himself | |||
castaway | he's awake on PM, autrijus | ||
autrijus | Corion reported that <code>for @array { say }</code> broke, because <code>$_</code> is not the implicit argument in the inner block -- <code>@_</code> is. I have special-cased to turn the block used in <code>for</code> to default to <code>$_</code> for now, pending further clarification. | ||
gaal | to2, rm src/UnicodeC.o | ||
castaway | shall I poke him? | ||
autrijus | castaway: or you can write p6l :) | ||
castaway | meee? | ||
autrijus | sure, you! | ||
castaway hides. | |||
autrijus | the problem needing clarification is a simple one :) | 15:52 | |
castaway | last I read, it should topicalise to $_ | ||
castaway looks where that was | |||
autrijus | pjcj: paul at pjcj dot net? | 15:57 | |
invitation sent :) | |||
theorbtwo | Don't forget to add yourself to AUTHORS. | 15:58 | |
castaway | S06, under Switch Statements .. ? | ||
".. any block that sets $_, including a for loop" | 16:00 | ||
gaal | autrijus, sorry for not just understanding this parsec thing already :), but: in oneLineComment, if somewhere i evaluate skipToLineEnd, that consumes the input and quits the parser successfully, right? | ||
...but not if i'm in a nested do | 16:01 | ||
...in that case i have to return skpToLineEnd, yes? | |||
autrijus | return skipToLineEnd? | 16:02 | |
gaal | or maybe | ||
skipToLineEnd | |||
return () | |||
? | |||
the number of returns must match the number of dos? | 16:03 | ||
autrijus | well | ||
if you say | |||
skipToLineEnd | |||
it is the same as | 16:04 | ||
foo <- skipToLineEnd | |||
return foo | |||
if you want to do something but ignore what it captured | |||
you do | |||
thatSomething | |||
return () | |||
read existing Parser.hs code for enlightenment (or more confusion) :) | |||
I need to sleep. | |||
theorbtwo | G'night, autrijus. | 16:05 | |
gaal | i'm of the 'be confused until you're enlightened' school. | ||
castaway | night autrijus :) | ||
gaal | i just hope my eventual enlightenment matches my current confusion :) | 16:06 | |
autrijus | 'nite! | ||
gaal | night. | ||
autrijus | gaal: I'll pray for your nirvana :) | ||
gaal | thank you! | ||
TheHunter | hi, what's the easiest way to get this Test::TAP::Model required for pugs' make smoke installed under debian? | 16:07 | |
theorbtwo | Easiest? sudo cpan Test::TAP::Model | 16:08 | |
gaal | TheHunter: do you have cpan? | ||
TheHunter | no. | ||
castaway | you do, unless you have a perl older than 5.6.0 | ||
(or possibly older) | |||
TheHunter | oh, it's v5.8.4 | 16:09 | |
gaal | actually the one with all the deps is Test::TAP::HTMLMatrix | ||
so do what theorbtwo said but with that module instead. | |||
castaway | then just type "cpan" on in a dos prompt | ||
gaal takes a break & | |||
castaway | umm.. s/dos prompt/terminal/ sorry | ||
theorbtwo | Best? apt-get install dh-make debhelper; mkdir dh-make; cd dh-make; dh-make --cpan Test::TAP::Model; cd Test-Tap-Model-<tab>; sudo debuild; cd ..; sudo dpkg --install ./libtest-tap-model-perl<tab> | 16:10 | |
(Or something a lot like that.) | |||
TheHunter | ok, thanks. | ||
shapr | castaway said dos prompt! <insert beavis/butthead 'uhuhu' quote> | 16:13 | |
castaway | someone on another channel was looking for windows info, honest! | ||
shapr grins | |||
castaway ruffles shapr, long time no see | 16:14 | ||
shapr | Hiya castaway! How's the island? | ||
Work is getting in the way of my free time. | |||
castaway | bah, work | ||
tis purty good tanks | 16:15 | ||
TheHunter | ok, the best way is too painful. I'm gonna have to live with /usr/local being messed up by some perl stuff. | 16:21 | |
castaway | then just to cpan <RET> install Test::TAP::Model | 16:22 | |
theorbtwo | Hint: When it asks you if you want to do manual configuration, "no" is an acceptable answer, and it'll try to autoconfigure. | 16:23 | |
TheHunter | oh, for the love of god. "make test had returned bad status, won't install without force" | ||
using force acceptable | 16:24 | ||
theorbtwo | Yep. | ||
shapr gets the hammer | |||
TheHunter | oki. | ||
castaway | hammer? | ||
shapr | Use enough force Luke! | 16:25 | |
TheHunter | ok, thanks all. | 16:26 | |
putter | With a few-minutes-old pugs, my make test is massively failing with "strange object 68" "Please report this as a bug to [email@hidden.address] Is this a known problem? x86_64. | 16:58 | |
shapr | There are a few known GHC on x86_64 bugs, but I don't know if this is one of them. | 16:59 | |
putter | tnx. checking... | 17:00 | |
theorbtwo | Uff. Suddenly, for no reason I can see, util/munge_haddock.pl (with an argument!) is now hanging until I hit C-d. | 17:05 | |
ingy | nothingmuch, gaal: ping | 17:15 | |
nothingmuch | ingy: pong | ||
i was wondering if there was a kwid impl that can do full kwid->html | 17:16 | ||
but then i figured out Kwiki::Formatter->new->text_to_html($foo) was good enough for me | |||
ingy | nothingmuch: working on it | ||
nothingmuch: meet obk | 17:17 | ||
obk waves | |||
ingy | obk: this is nothingmuch | ||
nothingmuch | hola obk | ||
obk | Hi | ||
nothingmuch | too many of us here | ||
ingy | I think you guys are countrymen | ||
nothingmuch | israeli imperialism ;-) | ||
see also gaal, lightstep, lumi, roie_m | 17:18 | ||
obk | Brian thinks we know each other | ||
ingy | obk wrote the YAML spec | ||
obk | True, Israel is about the size of Seattle, but still :-) | ||
nothingmuch | well, supposedly everyone knows everyone in israel, but we know that isn't really true ;-) | ||
obk | I hear you are doing a great job on the Perl6 interpreter | ||
ingy | but you guys all look the same ;) | ||
nothingmuch | gah, fscking petal... why won't it reencode the entities it decodes | 17:19 | |
obk | Ingy, I don't look Israeli - if there is such a thing | ||
ingy | I am trying to persuade obk to open up his great work on the YAML parser, ala pugs style | ||
obk promises to open it up next weekend | |||
nothingmuch | does that mean it'll be in haskell or p6? | ||
obk | Nope. Straight ANSI C. | 17:20 | |
nothingmuch | ah | ||
ingy | his impl is in C | ||
autrijus wants to do a haskell version | |||
but autrijus wants to do too many things :) | |||
nothingmuch | yeah, /me always does that too | ||
so you mean the develpment model? | |||
ingy | aye | ||
nothingmuch | sure, i'm going to learn svk | ||
and hack on pugs | 17:21 | ||
and whatever | |||
obk | I'm certain it would be easier to write it in a functional language. I wrote a complete programming parser/lexer in a few 100 lines of dfcp... | ||
ingy | oren's work is quite amazing from what I've seen | ||
nothingmuch | at least i learned about catalyst this weekend | ||
obk | Its actually a horrible object-like framework - with coroutines - on top of ANSI C. Yuck. | ||
nothingmuch | obk: what are you using now? | ||
YACC? | |||
obk | Nope, Yacc is useless for a streaming parser. | ||
In fact, it pisses me to no end there's no common streaming parser generator out there. | 17:22 | ||
nothingmuch doesn't know either =P | |||
don't know YACC, that is | |||
ingy | autrijus: ping | ||
obk | The difference is between "getNextToken" and "parse(tokenCallback)" | ||
ingy | is she asleep yet? | 17:23 | |
obk | I ended up writing a framework for a getNextToken parser myself, and I'm now applying it. | ||
I don't know whether the Haskell compiler knows how to do this sort of thing automatically - thread-less producer/consumer? | 17:24 | ||
nothingmuch | god damnit, i think i've read about 2000 lines of code this weekend | ||
sick and tired | |||
ingy | autrijus: if you are around you should meld minds with obk for a few minutes | ||
obk | Ah, reading other people's code is the best way to get sick and tired... | ||
nothingmuch | at least search.cpan gives you a recursive grep | ||
ooh, i think i can hack this in | 17:27 | ||
nothingmuch hopes no one will ever read the source code to the beyahad website | |||
castaway | ingy, he went to bed a while back | 17:29 | |
ingy | castaway: ok | ||
nothingmuch | obk: want to be the first person to see it that actually reads hebrew, apart from family and my boss? | ||
boss being friend who needed this website | |||
woobling.org:81/ | 17:30 | ||
obk is looking | |||
nothingmuch | brb, i'm going to shoot it | 17:31 | |
obk | What do you mean, "read Hebrew"? It seems like a normal web site. What am I missing? | ||
nothingmuch | see if it will encode now | ||
most people i showed this too are english speakers =) | |||
obk | It does display in Hebrew in firefox under Gentoo... | ||
Ah. | 17:32 | ||
nothingmuch | it better... i worked hard getting catalyst to pipe out utf8 | ||
theorbtwo | "The connection was refused when attempting to contact woobling.org:81." | ||
obk | nothingmuch turned it off | ||
nothingmuch | ok, up once more | 17:33 | |
nothingmuch bitches and cries | |||
theorbtwo | Looks nifty. | 17:34 | |
nothingmuch | grazie, theorbtwo | ||
obk | What is character 0u0097? It doesn't exist in my Hebrew font. | ||
nothingmuch | probably mdash | ||
or copy | |||
i'm trying to get Petal to re-encode the entities it so graciously expanded for me | 17:35 | ||
theorbtwo | Hm, my copy of unicode says that 0x97 is nonexistant. | ||
obk | Mope, it seems to be some sort of control character. I got it in woobling.org:81/page/%D7%A7%D7%91%D...7%99%D7%AA | 17:36 | |
theorbtwo | Em dash is U+2014 | ||
crysflame | aiee | ||
obk | It appears right after "autonomy" in the first sentence of the second subject. | ||
theorbtwo | I see the box-with-0097 in my firefox. | ||
My, that's a really obnixious-looking URL. | 17:37 | ||
obk | Hebrew encoded as UTF-8 and then escaped using URL %xx. As ugly as it gets... | ||
BTW, does anyone know if there's a way (a font name or something) to force the display of arbitrary characters as these numeric-value unicode boxes? It is useful for my debugging of YAML parsing errors. | 17:38 | ||
nothingmuch | obk: yeah, i'll make the URLs bilingual eventually | ||
obk: that's an mdash | 17:39 | ||
theorbtwo | Hm, should work to set it to show in a font that doesn't include non-ascii chars. | ||
nothingmuch | theorbtwo: i'm trying to fix that right now by making MkDoc::XML::Encode use a better hash | ||
theorbtwo | www-950.ibm.com/software/globalizat...ch&us= lists 0x97 as "control". | 17:40 | |
nothingmuch | and not do only 'amp', 'lt', 'gt' and that other thing | ||
hah | |||
Corion | nothingmuch: You did stuff in Catalyst, right? Is there a guided tour of Catalyst somewhere? I feel/fear that mostly, Catalyst creates a lot of scripts for you once, and if you change stuff, you have to recreate. Where do I look/start? | ||
theorbtwo | I think you got snookered by a Microsoft perversion of a standard charset. | ||
nothingmuch | then no wonder it's broken | ||
Corion: look at ::Tutorial briefly | 17:41 | ||
then ::Intro briefly | |||
generate, and look at all the .pm files | |||
they're simple | |||
Corion | willdo :) | ||
nothingmuch | then read through ::Intro more carefully | ||
it's very streight forward | |||
Maypole was a heap, but this is very simple stuff | |||
Corion | nothingmuch: I didn't find Maypole hard. In the end, I mean. But I want-need to implement some good browser for a dataset, and it screams for a webapp (import/export/transport browsing) | 17:43 | |
nothingmuch | it's easy | ||
Corion | ... that is, import/transport/export of data between programs | ||
nothingmuch: I'll look into it | |||
nothingmuch | but when i tried it was unfun to hack | ||
catalyst's code is much more streight-forward | |||
at least that's what maypole was when I tried it | 17:44 | ||
damnit! why is it being loaded after me | 17:45 | ||
nothingmuch sighs | 17:47 | ||
nothingmuch types 'sudo gvim /usr/local/lib/perl/site_porl/...' for the 100th or so today | 17:49 | ||
mauke | hoho, porl | ||
theorbtwo | It might work better if you s/porl/perl/. | ||
nothingmuch | oh! MKDoc not MkDoc | ||
i hate case insensitive FSs | 17:50 | ||
theorbtwo: try p<tab> | |||
obk | Well, got to go... Keep up the good work. | ||
nothingmuch | ciao | ||
putter | is there an easy way to disable gc? | 17:59 | |
elmex | ? | 18:00 | |
putter | sigh. regret to inform that 6.4 is no longer sufficient to run pugs on x86_64. | 18:03 | |
elmex | can't connect to svn.openfoundry.org ?! | ||
putter | allegedly a compacting gc bug, fixed in HEAD and eventually in 6.4.1. | 18:04 | |
make optimized is also failing (differently?). | 18:05 | ||
elmex | has the svn rep of pugs moved? | ||
svn: PROPFIND of '/pugs': could not connect to server (svn.openfoundry.org) | |||
theorbtwo | I got that a minute ago, apparently people have been having problems all day. | 18:06 | |
Somebody had a svn switch command, which I was going to find and then got distracted (thanks). | |||
Corion | I have that problem too, but kept silent about it :) No pugs hacking this weekend. Or so I think ;) | 18:07 | |
svn switch | |||
or something. The backlog has it. | |||
Or svn relocate | |||
I don't know | |||
elmex | hmm...i tested pugs the day before yesterday... and somehow experienced not that much speed ... | ||
castaway | openfoundry.dyndns.org | 18:08 | |
svn switch --relocate | |||
elmex | ./pugs -e 'my ($i, $a); loop ($i = 0; $i < 10000; $i++) { $a += 3 } say $a' takes 5.4 seconds for me... | ||
putter | aside from make, make optimized, and make profiled, is there any other pugs variant I can try to hopefullly sidestep the gc problem? | 18:11 | |
(clarification: I haven't actually tried profiled yet) | 18:12 | ||
theorbtwo | svn: PROPFIND of '/pugs': could not connect to server (openfoundry.dyndns.org) | ||
There goes that idea. | |||
shapr | You could try the darcs repo. | 18:13 | |
theorbtwo | Is it bidirectional? | ||
I have stuff I want to check in. | |||
shapr | It depends. | 18:14 | |
You can send patches by email just fine. | |||
Also, if your repo is http accessible, other people can just update from your repo as well to get patches. | |||
And you can do the same from theirs, so darcs doesn't really need a server at all. | |||
I don't think autrijus has set up the darcs repo to put patches back into svn, but it will let you work with the pugs sources in a source control system and share patches with others. | 18:15 | ||
Does that answer your question sufficiently? Or did I leave out some useful details? | 18:17 | ||
castaway | ooh, Episode IV | 18:18 | |
elmex | btw: a small quest what does this mean in perl6: | 18:27 | |
sub { my $fo = open ... or die ...; print $fo "blubb\n"; } - does it mean: write "blubb\n" to a file and close it, OR does it mean: write "blubb\n" to a file and forget the filehandle and leak it? | 18:28 | ||
theorbtwo | elmex: Write "blubb\n" to a file and close it... when we get around to it. | 18:35 | |
(Except that's say $foo: "blubb", or $foo.say("blubb").) | 18:36 | ||
elmex | theorbtwo: well... perl6 doesn't gurantee timely destruction | ||
theorbtwo | Right. | 18:37 | |
elmex | and now imagine i call that sub 40000 times | ||
and the gc doesn't run | |||
becaus i give it 10000 mb ram | |||
or maybe just 30mb | |||
=> no memleak, but my progam will run out of filehandles | |||
theorbtwo | It'll probably do a gc run when it runs out of filehandles. | 18:38 | |
elmex | what do filehandles have to do with memory? i thoguht a GC is there for memory | ||
castaway | anything thats garbage .. | 18:39 | |
theorbtwo | Exactly. | ||
If doing a gc run will sometimes free up filehandles, then doing it when we're out of filehandles seems smart. | |||
elmex | theorbtwo: then imagine i do open database-handles or other kinds of handles | 18:40 | |
maybe a user defined handle type :) | |||
theorbtwo | Opening and closing things over and over is always a poor programming pratice. | 18:41 | |
Now there's just another reason it's bad. | |||
elmex | theorbtwo: well, it's not _this_ particular example | 18:42 | |
theorbtwo: what about modules i use? if they do stuff with handles? | |||
theorbtwo | Use the source, luke. | ||
castaway | how many is it likely to have that you run out? | ||
elmex | theorbtwo: i do have to know the source of all modules i use? | 18:43 | |
theorbtwo | The untimely distruction the pugs people were talking about was possibly a few ms late under normal conditions. | ||
castaway | or at least what they do | ||
revdiablo | so, relying on destruction for closing filehandles might not be the best practice | ||
s/file// | |||
elmex | castaway: that wont matter. imagine a deamon that has enough ram, so that the GC won't have to run often... will it crash because the handles run out after 10 days where no GC ran? | 18:44 | |
revdiablo: so, it's a bug | |||
revdiablo: it will invite perl5 programmers to do that bug. and it's hard to find. and it's not do-what-i-mean | |||
revdiablo imagines elmex has been waiting to say that for 10 minutes | |||
elmex | i havent | 18:45 | |
theorbtwo | It's a sad trade-off. | ||
elmex | it's not DWIM | 18:46 | |
propably ther will be: | |||
sub { auto $foo = open .. } | |||
castaway | opening a handle and not closing it, but waiting for it to magically vanish, is DWIM ? | ||
theorbtwo | Yep, it is, castaway. | ||
elmex | castaway: in perl5 it's gurateed, YES | ||
castaway | ah, nevermind me then | 18:47 | |
elmex | and a gc run for filehandles: how does the GC determine that there are too many open filehandles? | ||
castaway | then I suspect it'll work here eventually ,) | ||
elmex | anyway, it's a tradeoff | ||
theorbtwo | The way that perl5's GC works has the nice property of timely distruction. | ||
It has lots of not-nice properties too. | |||
elmex | theorbtwo: perl5 uses refcounting | 18:48 | |
theorbtwo | Correct, elemenx. | ||
elmex | circular ref's leak | ||
theorbtwo | It's slow. | ||
Circual refs leak. | |||
It's very error-prone. | |||
elmex | so parrot/perl6 will be fast and circ refs won't leak | 18:49 | |
theorbtwo | It's very infectious -- it makes it very difficult to write XS code, because all code that touches anything perlish has to know about the refcounting. | ||
elmex | well, thats indeed a feature | ||
but the tradeoff is timely destruction | |||
theorbtwo | Correct. | ||
But untimely normally isn't that slow. | 18:50 | ||
elmex | of course | ||
perl6 will be rockfast | |||
theorbtwo | Laggy, I should say, not slow. | ||
elmex | but... well :) poor perl5 programmer that 'updates' his perl to perl6 will probably run into leaking handles if he forgets some { auto $fo = ... } idiom or something like that... | 18:51 | |
in end effect: manual resource management | 18:52 | ||
like java :) | |||
(but with nicer syntax) | |||
theorbtwo | Not really, no. | ||
shapr | I think I'll enjoy using Perl6. | 18:53 | |
theorbtwo | Like I said, untimely distruction will not be all that untimely, unless you mess with the gc parameters by hand, in which case you deserve what you get. | ||
elmex | well, but a GC doesn't gurantee it will run in the next 10 days if there is enough RAM... or does it also have to know how many mysql handles there are? well... | 18:54 | |
shapr: i probably will enjoy it too :) | |||
shapr: there are a lot of cool features | |||
shapr: and it' will probably be quite fast | |||
shapr | Though I sort of feel sorry for my future coworkers. If they don't understand Haskell and Perl, they'll be in for a bit of reading. | 18:55 | |
elmex | :) | ||
*g* | |||
theorbtwo | elmex: Perhaps DBI will be smart enough to start a GC run if it appears that it's out of handles. | ||
elmex | theorbtwo: so DBI will be fast but not leaky | ||
err... s/fast/slow/ | |||
theorbtwo | The idea is that a single gc run should be fast, so you won't notice it. | ||
Nope, elmex. | |||
A GC run can be very fast, if you have a very fast GC. | 18:56 | ||
elmex | theorbtwo: how will that be gurateed for 100000 objects? ;) | ||
theorbtwo | elmex: 100k objects ain't nothin'. The Parrot people had problems at that load, and fixed them, years ago. | 18:57 | |
Now it gets a bit slow when there's more then a few hundred million living objects. | |||
elmex | interesting | ||
well, i'm not shure DBI will know whether it runs out of handles... but holding open 100 mysql connections until I run out of them (not caring about other processes or users).. isn't smart | 18:59 | ||
all that there is to do: the module programmers will have to care about it | |||
chromatic | Who's coding today? I have a laundry list. | 19:01 | |
castaway | nobody, svn is playing up again | ||
castaway points at shapr anyway | |||
shapr | wha? | ||
chromatic | Seems okay for me at rev #2622. | ||
shapr | What did I do? | ||
castaway | I'm nominating you. | 19:02 | |
shapr | I'm busy organizing the second issue of The Monad.Reader | ||
elmex | theorbtwo: i also don't really belive that the GC can really be that fast... java GC takes 4+ seconds when taking up 250Mb ram here ... | ||
shapr escapes! | |||
castaway | nooo | ||
elmex | theorbtwo: but parrot is free surprise me there in the real perl6 world when it's done :) | 19:03 | |
chromatic | I have here a (theoretically) working port of Test::Builder to Perl 6. | 19:04 | |
It awaits some review from the rest of @Larry for a few syntax and implementation issues of which I remain blissfully confused. | |||
However, I have a list of all of the features of Perl 6 it needs. | |||
castaway | :) | ||
theorbtwo | Theoretically valid p6 (you think), but not working in parrot, you mean? | ||
castaway | add them to the todo tests ? | 19:05 | |
chromatic | I'm not sure how to answer that. It's Perl 6 code, not Parrot code, so no, but it requires nothing from Parrot that's not already there (or emulable). | ||
theorbtwo | Err. | 19:06 | |
but not working in pugs, you mean. | |||
chromatic | Right, I believe so. | ||
theorbtwo is actually surprised to learn that 'chromatic' !~ @larry. | 19:07 | ||
chromatic | Technically, I am: dev.perl.org/perl6/people.html | ||
castaway | ooh, secretary, highly technical job that | 19:08 | |
chromatic | It means that I type faster than anyone else. | ||
castaway | heh | ||
theorbtwo wonders if the secretary is responsible for the index. | 19:09 | ||
chromatic | No. That's why I suggested "amanuensis". | ||
nothingmuch | mofo! | 19:10 | |
nothingmuch hates HTML, and XML, and templating! | |||
*whine* *bitch* *cry* *blame parents* | |||
chromatic | Anyway. | ||
castaway ruffles nothingmuch | 19:11 | ||
chromatic | If I were to name the features I needed, are there people who could say "We have that!" or "Write a test in the file named _____.t"? | ||
autrijus | 03:04 < chromatic> However, I have a list of all of the features of Perl 6 it | ||
needs | |||
castaway | good timing autrijus | ||
autrijus | show me the list so I can sleep? :) | ||
castaway | *g* | ||
chromatic | Line at a time in the window so it shows up in the log or uploaded somewhere? | 19:12 | |
autrijus | er, nopaste. | ||
castaway wonders how long | |||
autrijus | or uploaded somewher. | ||
but best, mail to p6c/p6l | |||
chromatic | 32 lines | ||
autrijus | perlbot: nopaste | ||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
pasteling | "chromatic" at 63.105.17.30 pasted "Perl 6 Features Needed for the Test::Builder Port" (32 lines, 940B) at sial.org/pbot/9786 | 19:13 | |
elmex | chromatic: ah, you've wrote a mail about finalization. do you think that finalizers, that run very late (probably after you run out of filehandles), are of much use? | 19:14 | |
autrijus | oh, chromatic , as you are here, a quick question | ||
for @array -> { $_++ } | |||
is it legal? | |||
chromatic | elmex: it depends | ||
autrijus | is $_ somehow special that it has a "is rw" tackled on? | ||
nothingmuch | theorbtwo: can you please try that URL again, and tell me if the mdash displays properly? | ||
chromatic | autrijus, I'm not sure. I *think* so, but I'm not sure. | ||
nothingmuch | then maybe i can forgive myself for what I did to get that working | 19:15 | |
elmex | chromatic: you have to make shure that your finalizers, who close filehandles, run before you run out of filehandles. and not when the gc decides that it runs out of mem | ||
chromatic | elmex, that's why I think it's important to make a clear distinction between finalization and destruction. | ||
castaway | we dont have classes yet, do we? | 19:16 | |
chromatic | Finalization is for clearing up used resources, such as filehandles, database connections, sockets, and unmanaged memory. Destruction is for cleaning up managed memory. | ||
autrijus | ok, let me shorten that list to things that Pugs doesn't yet have. | ||
castaway | autrijus: didnt I answer that yesterday/earlier ? | ||
chromatic | That's a little complicated when you finalize something that you're holding onto elsewhere, but that's a problem with destruction anyway. | ||
autrijus | castaway: yes you did | ||
castaway | (yes it defaults to rw) | ||
theorbtwo | nm, I still see the 0x97 box. | ||
Even after a force RW. | |||
autrijus | what is "hash key setting" | 19:17 | |
nothingmuch | in that case I think your font doesn't have '—' and i should change from it | ||
chromatic | $status{"skip"} = 1; | ||
elmex | chromatic: i think, to have some kind of mostly-timely destruction, you need something like: { auto $fh = open "foo.txt" or die; ... print $fh; } - note that a my $fh will be collected on next gc run. => either on scope-exit a run or when you run outof mem.. if you do scope-exit collection, you have to have a fsckin fast gc | ||
autrijus | oh. sure. | ||
P5-style global substitution with negative-width lookahead | |||
if you can settle for rx:P5// | 19:18 | ||
then we are all set | |||
chromatic | $line ~~ s:perl5:g{\n(?!#)}{\n#}; | ||
autrijus | cool. | ||
theorbtwo | That's not suprising; like I said, it's not actually in latin-1 or unicode, just in MS's perversions thereof. | ||
nothingmuch | oh, didn't know that | ||
i think i missed that part in chat | |||
chromatic | elmex, I think people want timely *finalization*, not timely destruction. | ||
nothingmuch | got any reccomendation? | ||
autrijus | ok, 8 things. | 19:19 | |
object attributes of Bool, Int, Str | |||
private class attributes marked "is rw" | |||
invocantless attribute access in methods | |||
empty classes | |||
class inheritance | |||
method redispatch through *WALK to supermethod | |||
submethod allowed | |||
delegation of methods to objects stored in object attributes | |||
nothingmuch | — ? | ||
theorbtwo | www-950.ibm.com/software/globalizat...o/unicode, search for "m dash" at the bottom under "name". | ||
autrijus | other things are either already there or trivially true after the 8 things are implemented. | ||
that doesn't sound so bad. | |||
theorbtwo | U+2041. | ||
chromatic | It's not particularly complicated code. | ||
autrijus | now if we can compile that to parrot. | ||
elmex | chromatic: well, yes, of course. but how do you do timely finalization? if you want to do it with a GC it hast to be fast. if you use some kind of syntactic sugar like 'auto' it's kind of manual resource management | ||
autrijus | I think from the list that it's quite doable too. | 19:20 | |
chromatic | I could probably rewrite parts of it in IMCC, but I don't know how that translates to Parrot AST. | ||
autrijus | I thought the point of parrot ast | ||
is that you don't have to know that. | |||
you can drop to imcc level at any time | |||
chromatic | elmex, it's an end-of-scope action. In theory all it has to do is register the auto-finalize stuff with that hook which can be very fast. | 19:21 | |
autrijus | but, hey, if you can translate it to IMCC, that's wonderful | ||
chromatic | It doesn't have to mark and sweep the world or scan the current generation. | ||
autrijus | because my IMC generator monad will just use what your translation offers. | ||
when th^W^Wif that works, then the Pugs AST _is_ Parrot AST. | |||
chromatic | autrijus, the advantages of IMCC are that it works and it has documentation. | 19:22 | |
autrijus | sigh, laggy connection | ||
elmex | chromatic: yes, i hope that will work if i do { my $fh = open ... } ... objects need a special tag... and there needs to be a system for that... | ||
autrijus | chromatic: as compared to Perl6? :) | ||
nothingmuch | try again? | ||
chromatic | Let me rephrase that then. The advantages of IMCC is that I already know how to write it or, at worst, read the code. | ||
s/is/are/ | |||
autrijus | hm. and you can't do that for perl 6? | 19:23 | |
I'm puzzled :) | |||
chromatic | See, now you're just picking on me. | 19:24 | |
Where's the respect for your elders? | |||
autrijus pouts. I'm genuinely curious. :) | |||
Corion | . o O ( Pugs didn't get started out of respect :) ) | ||
autrijus | but, in all seriousness. I'd love to see your code, and if you can translate whatever part of it to IMCC | 19:25 | |
then I'll make sure that Pugs can compile those parts to equivalent IMCC. | |||
how about that. :) | |||
chromatic | Sure, that's pretty easy. | ||
autrijus | woot. | ||
chromatic | I've asked Damian and Luke to review the code to pick up any changes I've missed and I'll send it in as soon as they do. | 19:26 | |
autrijus | oh btw. | ||
my $foo = { say $_ }; | |||
what is signature of $foo? | 19:27 | ||
*$_ or $_ ? | |||
or neither? both? | |||
chromatic | $_. | 19:28 | |
It doesn't splat. | |||
It only takes the first argument. | |||
autrijus | so | ||
$foo(1, 2) | |||
is fatal? | |||
chromatic | It depends on how strict signature checking is. | 19:29 | |
autrijus | because that's what happens when you have a nonsplatty scalar. | ||
"Too many arguments" as defined in S06 | |||
chromatic | There might be a restrictive pragma in effect. | ||
autrijus | ok. but I'll make it nonsplatty. thanks! | ||
chromatic | Anytime! | ||
autrijus | oh, a related question | 19:30 | |
chromatic | Go ahead. | ||
autrijus | sub { say "123" } | ||
it has a *@_ signature? | 19:31 | ||
sub { say } | |||
what about this? | |||
chromatic | I don't know about the first one, but I guess that the second has *@_, or at least propagates the signature of say(). | 19:32 | |
That's just a guess, not a Mosaic ruling. | |||
autrijus | sub { say; say; say } | ||
I don't think that propagates anything, does it? | |||
so, in this | |||
for 1..10 -> { say } | |||
does the pointy there also have *@_? | 19:33 | ||
and how does say pick up @_[0] as $_? | |||
chromatic | Good question. | ||
autrijus | is for() explicitly topicalizing? | ||
but if it is merely a statement:<for>, how does it do that? | |||
chromatic | In the absence of placeholders, how do you know the count? | ||
autrijus | right. | ||
chromatic | I can only agree that that's the question! :) | ||
autrijus | my current heuristic is that signatureness closures, when used in "fo" | 19:34 | |
"for" | |||
assumes a ($_) | |||
since that is what most people expect. | |||
chromatic | That seems reasonable in the absence of any other ruling. | ||
autrijus | can you check it for me, or should we bring it to p6l? | ||
for 1..10 -> () { say "you won't see this" } # and this infinite loops... right? | |||
chromatic | I expect not, but I don't know. | 19:35 | |
theorbtwo | I don't understand why that'd inf-loop. | ||
chromatic | I expect for to consume the looping, not the arguments. | ||
autrijus | hm? | 19:36 | |
theorbtwo | Oh -- each time through the loop, it eats 0 arguments, until 0 are left of the original 10. | ||
autrijus | for 1..10 -> ($x, $y) { ... } # this loops 5 times. | ||
and 10 / 0 is ... Inf | |||
theorbtwo | Right, was being momentarally stupid. | ||
chromatic | It takes no parameters, not zero parameters. | ||
It's one of those "this is important to math" differences, I guess. | 19:37 | ||
autrijus | not understanding | ||
castaway | 10 / undef ? | ||
chromatic | If there are multiple parameters, it does eat up multiple values. | ||
If there are no parameters, it eats up one value per iteration, but you can't access them by name. | 19:38 | ||
Eating up multiple parameters is a special case, like multiplayer Pac-Man. | |||
castaway | and default is 1 ? | ||
chromatic | Yes. | ||
theorbtwo | If there's no explicit signature, it eats one parameter (into $_). | ||
castaway | makes some sense | ||
theorbtwo | But there is an explicit signature. | ||
chromatic | So no parameter. | ||
Inside the block. | |||
autrijus | ok. | 19:39 | |
autrijus slaps a (min 1) somewhere | |||
theorbtwo | Making it an error? | ||
chromatic | Think of a number, any ten numbers, but don't tell me what they are! | ||
castaway | ,) | ||
gaal | other oprions are run never or raise compile time error? | ||
chromatic | I don't know about the error. I could argue either way. | 19:40 | |
theorbtwo | Oh. So it takes one parameter, and throws it away? | ||
chromatic | theorbtwo, yes, though I might say it throws away a potential parameter before it even thinks about taking it. | ||
It steadfastly refuses to take a parameter. | |||
gaal | if we take the run never option it might be useful as a quick way to comment out a block. | ||
autrijus | I'll do the "min 1" ;) | ||
someone write a test? | 19:41 | ||
castaway | stubborn thing ,) | ||
gaal | cygterm + home.tiscali.de/emilio.lopes/screen/screen.html == almost non sucky windows system! | 19:43 | |
Corion | gaal: Why would anybody want to do that? :-) | 19:44 | |
gaal | because the windows terminal sucks rotting wooden donkey arse. | 19:45 | |
theorbtwo | At some point, you get to the point of "just run linux already, you silly idiot". | ||
Corion | gaal: I'm quite content with it... | ||
theorbtwo: But then you lose the hardware, printing, gaming and about everything else :-) | |||
gaal | theorbtwo, you don't understand | ||
i already do run linux | |||
nothingmuch | Corion: i remember you wanted something like google complete | ||
Catalyst does that | |||
gaal | on the other machine. | ||
nothingmuch | one second, i'll show you | 19:46 | |
gaal | but the other machine is slow :) | ||
Corion | Am I doing something wrong, or is my network connection broken? "svn switch --relocate svn.openfoundry.org openfoundry.dyndns.org" gives me no love | ||
nothingmuch: I know (S)ajax | |||
theorbtwo | Gives me no love either, Corion. | ||
nothingmuch | it's trĆ©Ā“sĀ“Ā“coĆ³Ā“l | ||
Corion | theorbtwo: Ah :) | ||
gaal | Corion, svn has been acting up since ~12 hours ago. | ||
on and off. | |||
Corion | theorbtwo: But that would be bad anyway, 'cause you got your love at home ;) | ||
gaal | ah, you know that. | 19:47 | |
theorbtwo | Oy. | ||
theorbtwo plays with his ƧƓmĆ¾Ć¶ĆĆ© kĆØĆæ. | 19:48 | ||
shapr | w00 | ||
castaway | ,) | ||
theorbtwo | BTW, X is stupid -- compose,i,j does not give Ćæ. | ||
shapr | Shouldn't it give the Dutch connected ij ? | 19:50 | |
Oh wait, y uml is the same thing, right? | |||
Yeah, I remember, y uml was a mistaken form of the Dutch ij. | |||
autrijus | really zzz & | 19:56 | |
castaway | sleep well, autrijus | ||
theorbtwo | Sleep well, Autrijus-San. | ||
(Or is that s/San/san/?) | |||
Corion | -sama :)) | 19:59 | |
ingy | Perl6-Bible-0.16.tar.gz on cpan now | 20:40 | |
obra | hey ingy | 20:46 | |
ingy | yes? | ||
obra | how goes? | 20:47 | |
that was a hello, not a "and I need..." | |||
ingy | it all goes | ||
obra | ;) | ||
ingy | oh | ||
hey there obra ;) | |||
I'm doing good | 20:48 | ||
out with the old in with the, well, older actually. you know | |||
is the pugs repos down again? | 20:49 | ||
mauke | does anyone here know of a binary distribution of ghc 6.4 for x86 linux that doesn't require glibc 2.3? | 20:50 | |
castaway | It::All::Goes ? | 20:56 | |
ingy | castaway: that sounds like a cool nnew project | 20:58 | |
don't tempt me | |||
I just released a new Test::Chunks | |||
It is getting very cool | 20:59 | ||
Can't wait to port to Perl6 | |||
need classes first... | |||
hmm. | |||
I should just preport it | |||
wolverian | I have been putting off coding things, waiting for pugs to get OO | 21:00 | |
not a very productive attitude, I guess | |||
ingy | wolverian: yeah | ||
wolverian | you too? :) | ||
ingy | I don't write anything but 1-liners that aren't OO these days | ||
and i don't write OO that isn't Spiffy | 21:01 | ||
of course Perl6 is already Spiffy | |||
shapr | I'm tempted to ask how you define OO... | ||
ingy | built right in | ||
shapr | But I should probably write worky code instead. | ||
ingy | shapr: ask away | ||
shapr | No, I am afraid :-) | ||
ingy | what is your concern? | ||
haha | |||
shapr | I will never get my work done if I start an interesting conversation! | ||
autrijus | hm. I notice that tpe.freepan.org is never down when svn.openfoundry.org goes down on weekends | 22:11 | |
despite them being in the same building. | |||
autrijus seriously considers switching over to freepan | |||
Limbic_Region | autrijus are you still up or have you slept already? | 22:12 | |
autrijus | I have slept for... I think 40 minutes | 22:13 | |
I feel refreshed! | |||
Limbic_Region | my wife would kill me | ||
jhorwitz is jealous -- needs 8 hours to feel refreshed. | 22:14 | ||
autrijus | eh? | ||
castaway | werent you in bed? ;) | ||
Limbic_Region | just that between work and playing on the computer when I get home - "bed time" is her time | ||
she would be just a tad bit upset if I got up after only 40 minutes | 22:15 | ||
autrijus | ah. | 22:16 | |
Limbic_Region | autrijus - the failing last.t test is due to last inside a nested loop exiting from all levels - not that I know the first thing about Haskell, but if I were going to start looking where would I start? | ||
autrijus | Limbic_Region: hm. enterLoop in Monads.hs defines it | 22:17 | |
I wonder if it's broken always or just recently | |||
Limbic_Region | AFAIK, there was no test testing it | 22:18 | |
until I added one | |||
autrijus | confirmed as broken | 22:19 | |
likely because the outer last is seen | |||
Limbic_Region | well if you know how to fix it without much thought be my guest | 22:20 | |
Limbic_Region will try and add more tests and find another bug | |||
;-) | |||
autrijus | fixed. | 22:21 | |
castaway | heh | 22:22 | |
Limbic_Region | my idea to learn p6 better and spread advocacy is start answering questions at the Monastery with a p5 and p6 answer | 22:24 | |
much like Randal did in the early days of Perl | |||
and when applicable, add the solution in examples | |||
but - I really do have a lot to learn about p6 and everything about Haskel | |||
is there any alarm() and sig handling in Pugs yet? | 22:34 | ||
theorbtwo | Yes. | 22:36 | |
Even with subsecond resolution and working on win32, IIRC. | |||
(It starts a second thread, which sleeps and kills the master thread... again, IIRC.) | |||
Limbic_Region | hmmm | ||
autrijus | so the problem is quite insidious | 22:42 | |
for 1..10 { for 1..20 { last } } | 22:43 | ||
the problem is that a closure is defined to capture the lexical pad upon its creation | |||
so the { last } closure captures the &last of the outer loop | |||
and because pad restoration happens _after_ enterLoop introduces the inner &last | 22:44 | ||
the outer one is restored as the binding to use. | |||
the moral is that &last should probably not be implemented as a lexical sub. | 22:45 | ||
Limbic_Region | autrijus - so probably even worse of a problem when last <label> is supported? | 22:46 | |
autrijus | yeah. the proper fix is to switch to use VControl. | 22:47 | |
(as is intended) | |||
Limbic_Region | same deal with next then | ||
autrijus | right. | ||
Limbic_Region | well, and redo for that matter | 22:48 | |
Limbic_Region has only ever found a use for redo like twice | |||
theorbtwo | Should VError and VControl be that different? | 22:49 | |
autrijus | theorbtwo: I think so; S06 (or S04)? makes it clea | 22:50 | |
clear | |||
that control exceptions and error exceptions are different | |||
theorbtwo | I thought control exceptions were a subtype of error exceptions, with just slightly different semantics... but it's been a while. | 22:51 | |
Huh? op2DefinedOr = undefined ? | 22:53 | ||
nothingmuch | beh | 22:54 | |
autrijus | ok, I have a | ||
genSymCC "&next" $ \sym -> do | |||
now. | |||
it will do for now. | |||
nothingmuch finally goes to try and do wrap | |||
Limbic_Region | 3 arg open isn't in Pugs right? I am looking at tests/examples and not seeing it | 22:55 | |
autrijus | yup | 22:56 | |
nothingmuch | what's the temp hostname for OF again? | ||
Limbic_Region | and "is chomped" is still todo | ||
hmmm | |||
I guess I will just answer the question as though those features were available today ;-) | 22:57 | ||
Limbic_Region notes the time and heads off to watch some TV | 23:00 | ||
TTFN all | |||
castaway | openfoundry.dyndns.org (in theory) | ||
theorbtwo | Last I tried neither worked. | 23:01 | |
autrijus | that is right. | ||
another 24 hours downtime. | |||
I think I'll switch to freepan.org ;) | |||
ingy, gugod: around? | |||
Darren_Duncan | are you talking about the non-working subversion server? | 23:02 | |
autrijus | Darren_Duncan: yes. | ||
it seems that they periodically has problems on weekends. | |||
Darren_Duncan | right, that's mainly what I came here to mention | ||
nothingmuch mutters something about distributed VCS | |||
castaway thinks she'll switch to the bedroom.. | 23:03 | ||
g'night | |||
Darren_Duncan | also, for those not in the know, the Ars Mac OS X 10.4 review by John Siracusa is already out | ||
at arstechnica.com/reviews/os/macosx-10.4.ars | |||
theorbtwo thinks he'll follow castaway. | |||
Darren_Duncan | these are always excellent, and this year's is several weeks early | ||
as soon as I get my copy I'll be able to test Pugs on it, in a couple weeks | 23:04 | ||
specifically, whenever the ADC people send it out to non-seed-getting people | 23:05 | ||
autrijus | oh. I accidentally implemented next and redo. | ||
theorbtwo | Accidentally? | ||
Darren_Duncan | how unfortunate | ||
autrijus | yeah. was just debugging the last() problem | ||
Darren_Duncan | how long until you can recover? | 23:06 | |
autrijus | and refactoring things | ||
Darren_Duncan: I have no idea :-/ | |||
theorbtwo | They just kind of slipped out of your fingers... you tried to hold them back, but they were gresey little bugguers... | ||
autrijus | exactly | ||
Darren_Duncan | those are a good compliment to last | 23:07 | |
jhorwitz | autrijus: mod_pugs lives. crippled, but alive. | 23:10 | |
autrijus | jhorwitz: oh. wow. wow. | 23:11 | |
Wow. | |||
url? | |||
jhorwitz | autocompiles to IMC, but runs in a PHP-style mode until we have objects to use the apache API | 23:12 | |
autrijus | fantastic. | ||
if you can write pseudocode with objects | |||
theorbtwo | PHP-style mode ? | ||
autrijus | then I'll make that happen. | ||
jhorwitz | theorbtwo: content only -- can't use the apache API | ||
autrijus: need to put on a public server, then will post the url | 23:13 | ||
theorbtwo | Woo, Pugs.Prims now has 100% top-level signature coverage. | 23:14 | |
autrijus | woo indeed | ||
say, we all have freepan committership here, right? | |||
Juerd | jhorwitz: Just please don't make the mod_perl mistake again. | ||
autrijus | Juerd: what would that mistake be? | ||
jhorwitz | Juerd: which one? ;-) | ||
Juerd | jhorwitz: Which is to make the content system and the powerful does-everything system the same thing. | ||
mod_perl will never be as popular as php | 23:15 | ||
autrijus | ok, next/last/redo is consistently available. | ||
Juerd | *because* it is powerful. | ||
It's hard to do simple things with mod_perl | |||
theorbtwo | Well, because it's hard to make it safe for multiuser systems without per-users apacheds. | 23:16 | |
Juerd | And people don't trust it because they think it's insecure. | ||
jhorwitz | Juerd: mod_parrot is meant to be a framework for writing the higher level modules | ||
Juerd | theorbtwo: PHP has exactly the same problem and got popular regardless. | ||
jhorwitz: There must be two mod_thingies, im{not at all}ho | |||
jhorwitz | ? | 23:17 | |
Juerd | jhorwitz: One light weight and fast, php-ish | ||
jhorwitz: One to write plugins for apache | |||
theorbtwo | I'm going to go go to bed, but I'll try to check in from there. | ||
autrijus is migrating full history to freepan | |||
Juerd | The first should specifically be webserver independent | ||
The other can be apache specific | |||
autrijus | pugs, that is | ||
Juerd | And the full blown, hard to grok thing should NOT be a dependency of the other | ||
Only then can Perl ever reach PHP's ease of use. | |||
autrijus | the first one is spelled SpeedyCGI | ||
or FastCGI | 23:18 | ||
etc? | |||
Juerd | You have to approach it from a sysadmin's point of view as well as a programmer's point of view | ||
theorbtwo | & | ||
jhorwitz | Juerd: i *am* a sysadmin. :) | ||
Juerd | autrijus: No, all too much setup and things to be careful with. | ||
autrijus: The thing that sucks most about PHP is its language. | 23:19 | ||
autrijus | oh. I see what you mean. | ||
Juerd | autrijus: The way it's installed in apache is very friendly. | ||
autrijus ponders mod_mason | |||
or mod_catalyst | |||
Juerd | autrijus: Perl 5 can't do it correctly because interpreters are very heavy and resetting them takes a lot of time. | ||
autrijus | Juerd: yeah, already grokked. | 23:20 | |
Juerd | autrijus: Which means forking and then exiting after a single request is faster even :| | ||
It takes practically no time to set up a PHP interpreter | 23:21 | ||
It doesn't have a big bunch of states to be set to initial values | |||
And PHP is internally more modular in these areas | 23:22 | ||
autrijus | *nod* | ||
theorb | Hmm, is password-changing implemented on freepan yet? | 23:23 | |
autrijus | I thought the idea is for you to commit your password as a special prop | ||
no idea if it's implemented or not. | |||
but I figure the only way to raise peer pressure is to use it :) | |||
(still migrating) | 23:24 | ||
jhorwitz: I want to see mod_pugs :) | 23:25 | ||
Juerd | "Only Python modules under a proprietary licence are allowed. GPL and BSD licences are particularly forbidden." | ||
HAHA | |||
theorb | wiki.freepan.org/index.pl?Changing...anPassword suggests you email ingy a md5 hash of your username and pass. | ||
jhorwitz moving bits as fast as he can... | 23:26 | ||
autrijus | theorb: I've changed my password already this way, I think | ||
still on r174. | 23:27 | ||
nothingmuch | arstechnica.com/reviews/os/macosx-10.4.ars/5 <-- is anyone grokking from this that say, postfix will be launched automatically when someone tries to talk to port 25? | 23:29 | |
theorb | Hm, what you just described is inetd -- been around halfway to forever. | 23:30 | |
Trades having to keep daemons running vs slow response time. | |||
nothingmuch | right, but not exactly | ||
delay packet, raise postfix, reroute packet | 23:31 | ||
then kill it after a while | |||
maybe | |||
theorb | Ah. | ||
Interesting idea. | |||
Not sure it sounds worth the effort. | |||
nothingmuch | but i'm not exactly sure what that is saying | ||
and then fullfill deps by delaying dependant processes | |||
by 'figure out dependencies automatically' i thought it would just try to start everything | |||
but i have no clue | 23:32 | ||
theorb | Write your daemon well, start it on boot, let it swap out if it wants to be. | ||
jhorwitz | autrijus: did you want to see code or a demo? | 23:35 | |
autrijus | jhorwitz: both. | ||
code, preferably | 23:36 | ||
but demo is cool too | |||
jhorwitz | autrijus: that's what i was afraid of. :) parrot on my public server is WAY out of date, so demo will be a while. code is simple enough to paste. | ||
perlbot: nopaste? | 23:37 | ||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
theorb | Blasted flakey network. | 23:39 | |
autrijus | hmm, corion's trick broke. | 23:40 | |
he used | |||
pasteling | "jhorwitz" at 68.236.4.147 pasted "a *very* simple pugs layer for mod_parrot" (57 lines, 1K) at sial.org/pbot/9794 | ||
autrijus | map { $_.values } map { $_.values } (any(...) ~ any(...)) | ||
that is patent nonsense. :-/ | |||
and it's all my fault for letting it work before | |||
I've now changed it to say | |||
map -> Junction $_ { $_.values } | |||
instead. | |||
jhorwitz: wow. | 23:41 | ||
jhorwitz | autrijus: simple, eh? | ||
autrijus | so when I declare pugs to be just another compiler object inside parrot | 23:42 | |
like Tcl now does | |||
you can cut the spawnw | |||
jhorwitz | exactly. | ||
autrijus | and directly feed code in, right? | ||
nice. | |||
jhorwitz++ | |||
jhorwitz | actually, if that happens, you can write this layer in pugs | ||
autrijus | that's riight. | ||
jhorwitz | mod_pugs without a line of C | 23:43 | |
autrijus | this was your original idea all along, isn't it. | ||
jhorwitz nods | |||
autrijus | jhorwitz++ | ||
you'll of course post this to both p6c and p6i, right? :) | 23:44 | ||
jhorwitz | once i commit the changes and have a demo | ||
theorb | Hm, does this mean that we'll get eval_tcl for free, along with eval_imc ? | 23:46 | |
autrijus | theorb: aye. | ||
and eval_commonlisp | |||
and eval_python | |||
et cetera. | |||
as was the plan all along. | |||
plan 1..Inf | 23:47 | ||
ok 1 | |||
ok 2 | |||
... | |||
theorb laughs evily. | |||
Forget about editors with embedded languages. | 23:48 | ||
Our langauge can embed yi /and/ emacs! | |||
At the same time! | |||
theorb wonders if oneLineComment should be renamed, since it also parses things that look vaugely like comments, but aren't. | 23:50 | ||
autrijus | jhorwitz: so, what does the handler in p6 look like | 23:51 | |
jhorwitz | autrijus: since we have no objects, mod_pugs just spits out whatever the handler returns | 23:52 | |
sub handler { return "Hello, world! | |||
";} | |||
autrijus: you mentioned pseudocode -- i need to call methods on the PMC argument passed to the pugs handler | 23:53 | ||
it's completely opaque | |||
autrijus | that is fine. we actually have opaque objects. | 23:54 | |
jhorwitz | then i guess method calls really won't be that hard to implement. :) | 23:56 | |
autrijus | the problem is what to dispatch to. | ||
do I just emit code that calls the method back? | 23:57 | ||
i.e. if you call with an argument $foo and then invoke $foo.bar() | 23:58 | ||
jhorwitz | $r.puts("hello") would roughly translate to mypmc.'puts'("hello") | ||
autrijus | ok. | ||
jhorwitz | assuming mypmc was passed in as $r |