Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-02-19

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 Alias_ ah, right
00:00 beppu kinda different from typical unix, but it works for perl.
00:00 Alias_ right
00:00 beppu ...so you solved these problems fairly recently, then.
00:01 Alias_ When audreyt stayed with me for the week in December
00:01 Alias_ She knew how, and I like making things simple
00:02 Alias_ File::HomeDir and File::UserConfig are as a result of a grant to do a desktop application
00:02 beppu I'll try it out for the app I'm writing.
00:02 Alias_ let me know how it goes
00:02 Alias_ Sorry I don't have system etc and htdocs, or web cache, or data cache yet :)
00:02 Alias_ But I have some ideas
00:02 beppu Sometimes (in my unix-centric world) I forget about other operating systems...  but this scheme seems like it'll work portably.
00:03 Alias_ The problem is that if you just go implement it, you have "where Alias things cache should go", not necesarily where it actually should go
00:03 Alias_ So it's high risk to just start coding without lots of research and confirmation
00:03 Alias_ s/things/thinks/
00:04 Alias_ A Perl /var/cache might be ok though
00:04 Alias_ oh, also we have a standard /tmp
00:04 Alias_ :)
00:04 Alias_ So that's tmp, bin, lib, share, and user
00:10 binary42 joined perl6
00:27 Nouk joined perl6
00:44 hcarty joined perl6
00:45 sapper joined perl6
00:46 hcarty left perl6
01:09 avarab joined perl6
01:18 avar joined perl6
01:21 drbean left perl6
01:29 drbean joined perl6
01:40 drbean left perl6
02:20 avar joined perl6
02:39 jeh_ joined perl6
03:01 stennie joined perl6
03:11 Cryptic_K joined perl6
03:36 Nouk joined perl6
04:06 scook0_ joined perl6
04:09 Khisanth joined perl6
04:31 ayrnieu joined perl6
05:00 phredmoyer joined perl6
05:00 phredmoyer left perl6
05:20 xinming joined perl6
05:50 Cryptic_K joined perl6
07:15 drbean joined perl6
07:19 iblechbot joined perl6
07:30 Cryptic_K joined perl6
07:59 pdcawley joined perl6
08:13 phredmoyer joined perl6
09:02 K_ joined perl6
09:22 larsen joined perl6
09:44 marmic joined perl6
09:56 azuroth joined perl6
10:17 svnbot6 r9056 | audreyt++ | * DrIFT.RuleYAML - add diagnostics messages when loading
10:17 svnbot6 r9056 | audreyt++ |   of YAML structures failed.
10:20 svnbot6 r9057 | audreyt++ | * re-drift the four source files.
10:20 svnbot6 r9057 | audreyt++ | * (previous commit also unbroke "make profiled".)
10:24 chris2 joined perl6
10:32 bernhard joined perl6
10:41 bsb joined perl6
10:46 Nouk joined perl6
10:57 iblechbot joined perl6
11:01 ghenry joined perl6
11:30 azuroth I did some of my C++ homework in haskell. teacher didn't like that :-(
11:33 Kattana and this surprises you?
11:36 drbean joined perl6
11:46 drbean left perl6
11:48 drbean joined perl6
11:56 svnbot6 r9058 | gaal++ | * Fixed remaining kinks in precompiled Prelude loading.
11:56 svnbot6 r9058 | gaal++ |   Ladies and gentlemen, it works! and it's fast!
12:02 gaal time ./pugs -CParse-YAML -e 'our $*str = "hello"' > h.yml
12:02 gaal 0.040u 0.110s 0:00.14 107.1%    0+0k 0+0io 0pf+0w
12:02 gaal time ./pugs -e ' Pugs::Internals::eval_p6y("h.yml"); say $*str'
12:02 gaal hello
12:02 gaal 0.470u 1.120s 0:01.59 100.0%    0+0k 0+0io 0pf+0w
12:02 gaal and, for simple one-liners:
12:03 gaal time ./pugs -e 'say "hello, fast world!"'
12:03 gaal hello, fast world!
12:03 gaal 0.460u 1.070s 0:01.58 96.8%     0+0k 0+0io 0pf+0w
12:03 gaal ... and this is on a mostly unoptimized pugs :-)
12:13 audreyt gaal++ gaal++ gaal++
12:14 joepurl joined perl6
12:15 clkao (!)
12:16 Juerd gaal: Hey, that's weird, in your character set, numbers turn out much lower! :)
12:16 Juerd gaal++
12:16 Juerd Any figures yet on how much this saves a smoke?
12:19 audreyt well, it saves compilation time mostly
12:19 audreyt the runtime doesn't get faster Ithink
12:20 gaal Juerd: not yet. but one significant benefit is that people with low RAM can still build a useful pugs
12:20 gaal that doesn't take 35 seconds to say hello world.
12:21 gaal the new system makes loadtime a little slower, in fact, but as audrey points out, we can now cleanly also precomplile Test.pm
12:21 gaal so it should pay off nicely.
12:21 Juerd audreyt: Oh, I misunderstood the figures then. I thought startup time was decreased.
12:22 gaal also also, audrey has been profiling and speeding up -CPugs
12:22 Juerd Ah
12:22 gaal Juerd: one thing that's massively easier now is, uh, separate compilation of arbitrary code
12:23 gaal ./pugs -CParse-YAML -e your-code > a-dump.yml
12:23 gaal and load it with a new prim
12:23 gaal and we've been thinking of design for module bytecode
12:25 gaal there are a few very good ideas to steal from python, for example, precompile any module you encounter, if you have write permissions to the directory it is in
12:28 gaal they also have a very good design for the bytecode format we can plag^H^H^H^Hstudy and learn from
12:29 gaal so this means that when you install a module from CPAN, pugs can not only throw .p6 files in your install site, but also precompiled .p6c (or whatever we name them)
12:36 pdcawley joined perl6
12:37 audreyt maybe .p6c for precompiled unoptimised, .p6o for precompiled optimised (closed-finalized with "use optimize")
12:40 gaal okay, some more data points. on a modest machine (p3 1.2GHz, 256MB):
12:40 gaal clean build, unoptimized: about 13 minutes
12:40 gaal (this includes the JS prelude precompilation, which was optional, and took about 2 min)
12:41 gaal ./pugs -e 'say "hello world"' took 8 seconds to run
12:41 gaal which is eminently usable
12:41 svnbot6 r9059 | audreyt++ | * -CPugs: Massively speeded up compilation speed and loading speed.
12:41 gaal much better than the 35-odd seconds that it used to take.
12:41 pdcawley Cool!
12:42 pdcawley What's that done for the speed of running the full test suite?
12:42 gaal and, of course, memory consumption was reasonable
12:42 gaal pdcawley: we need to benchmark. at first instance, it will slow it down
12:43 pdcawley ? what? More stuff happens at runtime now or something?
12:43 gaal as the backlog explains, loading is now done from yaml, which is fast, but at runtime is a little slower than the old -CParse mechanism
12:43 Juerd A psychological trick to pull is to include this precompilation in the "make" phase, which makes the "make test" phase benchmarkable between the first and second time.
12:43 gaal however, we can now easily and cheaply precompile Test.pm
12:43 lypanov pugs is slow anyways, devel speed is way more important :)
12:43 Juerd And make it look like it's fast ;)
12:43 gaal so it will pay off
12:44 gaal additionally, audrey has just checked in a speedup to -CPugs :)
12:44 pdcawley Right, 'cos you're no longer having to compile Test.pm for every test.
12:44 gaal yes, so that's like $dot_t times the parse hit for Test.pm
12:44 pdcawley $dot_t ?
12:45 gaal find t ext -type f | wc -l    :-)
12:45 pdcawley Should make chromatic a little less unhappy...
12:45 gaal so, to summarize the prehackathon:
12:46 gaal even if we revert to the old precompilation strategy of -CParse, we will have gained two things:
12:47 gaal 1. knowledge about separate compilation with YAML
12:47 Juerd How fast is pugs at skipping POD?
12:47 gaal 2. -CPugs itself is now faster, thanks for our (audrey's) profiling work
12:47 Juerd And if not fast, then: does pugs support __END__ yet?
12:47 integral are there lots of other places in pugs that could benefit from FPS?
12:47 gaal Juerd: benchmarks welcome :)
12:48 Juerd gaal: I understand. Will have to compile first
12:48 pdcawley FPS?
12:48 integral Like, should VStr be changed to a FPS?
12:48 integral pdcawley: Data.FastPackedString
12:48 pdcawley Haskell datatype?
12:48 Juerd 13:59 < gaal> 2. -CPugs itself is now faster, thanks for our (audrey's) profiling work
12:48 gaal integral: the parser could profoundly benefit from it, as will pugs in general, but that would probably mean switching away from Parsec, as it's just too closely coupled to haskell SlowStrings.
12:48 Juerd Any figure? (%?)
12:49 integral gaal: that's because Parsec will work with parsing any list type?
12:49 audreyt Juerd: let me finish the FPSization
12:49 audreyt and I'll give you bench numbers
12:49 Juerd audreyt: Oh, didn't know you were already even more steps ahead. Don't let me distract you :)
12:49 gaal integral: yes
12:50 Juerd (Should have guessed, or at least assumed :P)
12:50 gaal Juerd: of course, we're going off to meet Larry in half an hour, so there are portions of the world to take over by then ;)
12:51 Juerd Oh, interesting :)
12:51 Juerd This is interesting too:
12:52 Juerd Writing Makefile for WTemplate
12:52 Juerd Writing Makefile for Perl6::Pugs
12:52 Juerd Segmentation fault
12:52 Juerd But it's DProf that causes this
12:52 Juerd So no worries
12:53 bsb Re: borrowing from python, it seems like their header could've been better planned
12:53 bsb http://mail.python.org/pipermail​/python-dev/2000-May/004271.html
12:54 gaal ooh, we were looking at the header and were thinking it was pretty good. /me looks
12:54 bsb An offset to the code could have allowed future room to grow
12:54 integral it needs to be a binary header?   It can't just look like a normal perl file but with a 'use MagicPseudoSourceFilter 0.45'?
12:55 bsb If these file are to be binary then http://www.w3.org/TR/PNG-Rationale.html#R.PNG-file-signature is a good reference
12:56 gaal cool (the \r\n trick is really neat)
12:56 bsb for sure
12:57 * gaal always says #!/usr/bin/perl -w on the hashbang as a newlinality shield
12:58 bsb eh?
12:58 gaal separate but similar issue:
12:58 gaal perl5 is clever enough not to care about newline types
12:58 gaal but the if the kernel doesn't find an interpreter called "perl\r", it barfs
12:59 gaal with the infuriatingly misleading error message about file not found
12:59 bsb I once had trouble with -F on the #! line, adding -w fixed it :)
12:59 integral hmm, empty almost needs a typeclass
13:00 integral oh, mempty, duh
13:00 gaal integral: what's mempty?
13:00 integral unit of the Monoid class
13:01 KingDiamond joined perl6
13:02 gaal integral: that's still audrey stuff as far as my brain's concerned :)
13:03 * gaal 's brain has made many protests since Tuesday, not all of them successful
13:15 xinming joined perl6
13:27 integral hmm, is drift slow on Pugs.AST.Internals for everyone?
13:32 feng joined perl6
14:16 avar joined perl6
14:41 stennie_ joined perl6
14:46 nnunley_ joined perl6
14:49 nnunley_ is now known as nnunley
15:02 Maddingue joined perl6
15:18 blm_ joined perl6
15:20 drbean left perl6
15:30 elmex joined perl6
16:08 Juerd 14:09  * gaal always says #!/usr/bin/perl -w on the hashbang as a newlinality shield
16:08 Juerd Ah, smart!
16:08 Juerd Thanks for the trick :)
16:11 Juerd Re byte headers: After the magic bit, I think things are better off as a hash-like structure, rather than a positional list of metadata, for scalability
16:14 Juerd And maybe it'd be nice even to store the code length as well as the bytecode data, so we can have multiple files encoded in a single file, or interesting stuff like DATA sections
16:14 integral maybe we should just use something compatible with PBC's?
16:14 Juerd What be PBC?
16:14 Juerd Parrot BC?
16:14 integral parrot bytecode container, or something
16:14 Juerd I don't know the format
16:15 integral it's yet another executable file format with multiple sections and so on.
16:15 Juerd Is it neat and scalable?
16:15 Juerd And does it have enough offsets or size indicators to be parsed without too much pain? :P
16:15 integral Probably not,  but afaik you can invent new section types for it (like Jonathan did for debugging)
16:15 integral hope so.   Remember the parrot folks are having to use C to do their parsing after all
16:17 Juerd Yes, but parsing for one purpose may be easy while parsing for another may be hard.
16:17 Juerd If you're writing an analysis tool, and you need it to be fast, so you skip the common libraries and stuff, you don't want to have to parse everything to get to the end.
16:18 integral http://www.parrotcode.org/docs/parrotbyte.html # They actually have docs!  yay!
16:18 rantanplan_ joined perl6
16:18 Juerd Say you have N/a* chunks of data as a header, and then a body that's more interesting. Then N/(N/a*) is nicer, because it lets you skip the header chunks entirely.
16:18 Juerd Huh, Parrot with documentation? Are you sure it's the same Parrot? ;)
16:19 integral don't worry, I'm sure it'll turn out to be unimplemented,  or incorrect :)
16:20 Juerd Hm, no magic?
16:20 integral 16 bytes in
16:20 Juerd But...
16:20 * Juerd sighs
16:20 Juerd Okay.
16:20 Juerd Heh, magic is native even.
16:21 Juerd That's not a useful magic for file(1)-like utilities, and the many libraries that do the same kind of thing.
16:21 integral oh dear.
16:21 Juerd We're not going to fully depend on .foo extensions, I hope.
16:21 integral I thought the parrot designers had all been unixy enough to spot things like that :-/
16:21 Juerd It's nice to have them, and even to require them, but when I loose the extension, I still want to be able to tell what the hell to parse the file with :)
16:22 Juerd I hope this is an unrelated kind of magic, because a highly variable magic part is useless for the kind I'm talking about...
16:23 Juerd I say let's steal PNG's magic ;)
16:23 Juerd But slightly different
16:23 Juerd To avoid endless images of talking birds. :)
16:28 chris2 joined perl6
16:41 vel joined perl6
17:10 blm_ is now known as blm
17:19 justatheory joined perl6
17:20 nothingmuch joined perl6
17:41 arcady joined perl6
17:43 vel joined perl6
18:19 xinming joined perl6
18:22 marmic joined perl6
18:32 DesreveR is now known as r0nny
18:58 justatheory joined perl6
18:59 justatheory joined perl6
19:21 Limbic_Region joined perl6
19:46 buu joined perl6
19:46 nothingmuch audreyt: ping
19:46 nothingmuch gaal: ping
19:56 dduncan joined perl6
19:56 buu joined perl6
20:14 pdcawley joined perl6
20:30 justatheory joined perl6
20:32 orafu joined perl6
20:35 SamB joined perl6
20:38 zackmadrid joined perl6
20:41 zackmadrid left perl6
20:43 gaal pong
20:43 gaal nothingmuch: hello! :)
20:43 justatheory joined perl6
20:47 nothingmuch gaal: hola
20:47 svnbot6 r9060 | audreyt++ | * test for the bug where lexically-imported functions
20:47 svnbot6 r9060 | audreyt++ |   will incorrectly get rebound when the containing function
20:47 svnbot6 r9060 | audreyt++ |   gets reentered.
20:50 svnbot6 r9061 | audreyt++ | * the (massively undocumented) Pugs::Internals::eval_p6y($file)
20:50 svnbot6 r9061 | audreyt++ |   function now incoporates global bindings in the source yaml file.
20:53 svnbot6 r9062 | audreyt++ | * DrIFT.RuleYAML: Introduces the "YAML_Pos" drift rule,
20:53 svnbot6 r9062 | audreyt++ |   to save the resulting .yml file's size by discarding
20:53 svnbot6 r9062 | audreyt++ |   label names from Haskell record types and treat them
20:53 svnbot6 r9062 | audreyt++ |   as positionals.
20:56 svnbot6 r9063 | audreyt++ | * Data.Yaml.Syck: trivial code cleanup of s/toEnum . fromEnum/fromIntegral/
20:57 * nothingmuch goes to bed
20:57 svnbot6 r9064 | audreyt++ | * Pugs.Compile.Pugs: -CPugs now uses FastPackedString;
20:57 svnbot6 r9064 | audreyt++ |   the generated code is also much more compact (but we are
20:57 svnbot6 r9064 | audreyt++ |   not using it for Prelude anymore.)
20:57 nothingmuch see you all tomorrow at the post-pre-hackathon
20:57 audreyt see ya nothingmuch
21:00 svnbot6 r9065 | audreyt++ | * When prelude loading failed due to (trapped) errors, make
21:00 svnbot6 r9065 | audreyt++ |   it clear that we are reloading it again from parsed source code.
21:09 bsb joined perl6
21:19 orafu joined perl6
21:32 bsb joined perl6
21:36 svnbot6 r9066 | audreyt++ | * PreludePC.hs - actually load global bindings from Prelude.
21:36 svnbot6 r9066 | audreyt++ |   there are some remaining problems -- e.g. sprintf() complains
21:36 svnbot6 r9066 | audreyt++ |   about arity errors -- to be investigated tomorrow.
21:39 DesreveR joined perl6
21:45 integral audreyt++ # pugs feels much faster now
21:46 vel joined perl6
21:52 svnbot6 r9067 | audreyt++ | * PreludePC - use modifyTVar to union the glob pad on the
21:52 svnbot6 r9067 | audreyt++ |   correct order (newest first).  Somehow &*eval is still
21:52 svnbot6 r9067 | audreyt++ |   broken. :-/
21:53 audreyt integral: &*eval is somehow broken though. (as is &*sprintf, or any code binding with arity>1)
21:53 audreyt gaal and I may look into this tomorrow -- but it's midnight and I should sleep now
21:54 audreyt &
22:09 nnunley_ joined perl6
22:12 bsb joined perl6
22:32 beppu joined perl6
23:06 larsen joined perl6
23:15 K_ joined perl6
23:21 K_ joined perl6
23:26 K_ joined perl6
23:27 integral hmm, just discovered that FastPackedStrings are 8-bit only :-/
23:27 kane_ joined perl6
23:40 drbean joined perl6
23:40 kane_ joined perl6
23:41 Juerd integral: If you strictly encode the same, that shouldn't matter much
23:42 Juerd Fortunately, utf8 is octet aligned :)
23:53 DesreveR is now known as r0nny

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

Perl 6 | Reference Documentation | Rakudo