Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-10-08

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:03 justatheory joined #perl6
00:05 theorbtwo joined #perl6
00:43 dduncan joined #perl6
01:04 weinig_ joined #perl6
01:04 weinig joined #perl6
01:15 vbattsAtWork joined #perl6
01:18 cognominal_ joined #perl6
01:42 laye joined #perl6
02:06 jisom joined #perl6
03:52 idiotmax joined #perl6
04:06 Schwern joined #perl6
04:18 jeremyb_ joined #perl6
04:19 jeremyb_ is perl 6 ever going to happen?
04:19 * jeremyb_ hides
04:19 allbery_b we killed larry and ate him, so no :)
04:19 * jeremyb_ didn't know this channel existed
04:19 jeremyb_ hehe
04:19 * jeremyb_ waves to agentzh
04:23 Tene jeremyb_: it already does, for some definitions of "happen"
04:23 Tene I've used it for a few personal and work projects.
04:23 * jeremyb_ actually doesn't use perl much and was just kidding
04:24 * jeremyb_ has heard good things about 6 but doesn't remember what
04:25 jeremyb_ Tene: using the haskell implementation?
04:25 Tene jeremyb_: haskell and parrot
04:26 Tene I've used both.
04:26 jeremyb_ ewwww, darcs
04:27 Tene Who uses darcs?
04:27 jeremyb_ pugscode.org
04:28 Tene Oh, I've never looked at the darcs mirror 'cos I've never been interested in darcs.
04:28 Tene I've been tracking pugs through git-svn
04:28 * jeremyb_ has had good experiences with git-svn
04:28 * jeremyb_ wonders who Alex is
04:33 jeremyb_ < sproingie> i think perl6 killed off tie... at least i hope it did
04:37 platypus Isn't there now a lisp implementation?
04:37 Tene platypus: yes, kp6 has a lisp backend now
04:37 jeremyb_ implementation or flavor/variant?
04:38 Tene It's been developed over the past couple of weeks or so (I think) and is now about up to the level of the perl5 backend.
04:38 Tene I know that it runs at least on sbcl
04:38 Tene I'm not lispy enough to know if it also runs on others or not.
04:51 drbean joined #perl6
04:59 drbean joined #perl6
05:03 agentzh jeremyb_: wow...you're also in #perl6! *impressed*
05:09 jeremyb_ agentzh: i followed you here
05:09 jeremyb_ i didn't know it existed
05:10 jeremyb_ :)
05:11 agentzh jeremyb_: wow
05:19 japhb_ joined #perl6
05:20 araujo joined #perl6
05:21 dduncan joined #perl6
05:38 masak joined #perl6
05:41 wilx joined #perl6
05:42 rfordinal joined #perl6
05:52 devogon joined #perl6
06:09 iblechbot joined #perl6
06:17 bloonix joined #perl6
06:17 bloonix good morning
06:24 zamolxes joined #perl6
06:49 elmex joined #perl6
06:59 moritz_ good localtime() everybody ;)
07:01 cerridwen hehe
07:01 cerridwen :)
07:05 masak g'localtime(), moritz_
07:15 agentzh hi, a p5 question: how to release a very p5 hash immediately? p5's GC is very slow for a hash as big as several GB.
07:15 agentzh *very big
07:16 agentzh sorry if it's a bit OT :P
07:16 jql p5 gc doesn't do anything at all after undef %hash;
07:16 jql there's no compacting/copying gc to trigger
07:16 jql it immediately frees, and that's it. :(
07:17 agentzh jql: thanks :)
07:17 agentzh jql: trying now
07:27 Aankhen`` joined #perl6
07:35 Aankhen`` Tene: Re: the Lisp backend for KP6, it's not really up to the level of the Perl 5 backend yet since it doesn't support objects, for one.
07:36 Aankhen`` As far as implementations go, it doesn't use anything SBCL-specific, so in theory it ought to work on any conforming implementation.
07:37 drrho joined #perl6
07:45 agentzh Aankhen``: how about the list-backend's performance?
07:46 agentzh jql: it doesn't work for us. undef %hash still takes 20 min to complete, it seems.
07:46 jql wow, that's an impressive hash you have
07:47 Aankhen`` agentzh: I'm not really sure, never bothered to measure it. The only metric I have is from a while back, when avar measured a compiled test performance and found it only slightly slower than the equivalent Perl 5 code.
07:48 Aankhen`` s/test/test's/
07:48 agentzh Aankhen``: okay :)
07:49 Aankhen`` That was before support for a lot of things was added though, including formal sub arguments, all of which does inevitably add overhead.
07:49 agentzh *nod*
07:49 Aankhen`` Still, I'd expect it to be pretty durned fast once compiled.
07:49 agentzh heh
07:49 Aankhen`` The best part is, so far I've just been focusing on clarity.
07:49 Aankhen`` Nothing about KP6-CL takes performance into account.
07:50 agentzh fair enough :)
07:51 Aankhen`` Oh yeah, it's also missing a lot of control structures, since I wasn't very interested in them and no one (except fax) was either. :-P
07:51 * Aankhen`` decides to go for the low-hanging fruit.
07:52 Aankhen`` s/no one/no one else/
07:53 agentzh hehe
07:54 Aankhen`` Argh, I need to fix the ::Lookup/::Index thing first.
07:54 agentzh Aankhen``++
07:55 Aankhen`` What brought that on?
07:55 agentzh i hope i am able to hack on kp6 as well :P
07:55 Aankhen`` Ah, kewl.
07:55 agentzh $work forces me to do XUL hacking :)
07:55 Aankhen`` agentzh++ # it's the thought that counts!
07:56 agentzh hehe
07:56 moritz_ did anybody adopt Pugs::Compiler::Rule to the new regex syntax?
07:56 Aankhen`` Right, I'm going to finish my daily reading then I'll do the fixing.
07:56 agentzh moritz_: that would be sweet :)
07:56 moritz_ .oO( today my new laptop should arrive)
07:57 franck___ joined #perl6
07:58 agentzh .oO( my $boss promises to bring me a new laptop as well )
07:59 moritz_ .oO( I should get myself such a $boss ;)
08:02 Aankhen`` moritz_: What're the specs?
08:03 moritz_ Aankhen``: which specs?
08:03 Aankhen`` Of the new laptop
08:04 moritz_ Aankhen``: intel dual core 2 for mobile (2x1.66 GHz), 3GB ram, 200something GB hard disk, 1280x800 wide screen display
08:04 Aankhen`` Sweet.
08:04 Aankhen`` Mine is the same except it has 2 GB of RAM.
08:04 moritz_ it's a fujitsu siemens, and I hope it will work under debian ;)
08:05 Aankhen`` Heh.
08:05 Aankhen`` Mine's a Sony VAIO running Vista. :-)
08:05 moritz_ mine will be delivered with Vista, but that's not going to last ;)
08:05 * Aankhen`` grins.
08:06 Aankhen`` Does removing Vista void the warranty?
08:06 moritz_ if so I'll sue them
08:06 Aankhen`` Good luck.
08:06 moritz_ Germany has pretty good laws for customer protection
08:07 Aankhen`` Ah.
08:07 moritz_ and the EU is trying to break the $MS monopoly (with not much success, but at least they try)
08:08 Aankhen`` I know.
08:08 moritz_ and they fined $MS 0.5Bn € ;)
08:08 Aankhen`` They were barking up the wrong tree with regards to the search thing, though.
08:09 Patterner They should fine people who buy MS programs.
08:09 Aankhen`` Funny. :-P
08:15 dduncan left #perl6
08:17 gorax joined #perl6
08:22 pugs_svnbot r18311 | Aankhen++ | * [kp6-lisp] handle ::Index/::Lookup -> ::Call conversion.
08:22 pugs_svnbot diff: http://dev.pugscode.org/changeset/18311
08:22 lambdabot Title: Changeset 18311 - Pugs - Trac
08:31 pugs_svnbot r18312 | Aankhen++ | * [kp6-lisp] changed package name to KP6-LISP from KP6-CL.
08:31 pugs_svnbot diff: http://dev.pugscode.org/changeset/18312
08:31 lambdabot Title: Changeset 18312 - Pugs - Trac
08:40 gorax hi
08:42 agentzh hey, gorax
08:43 * Aankhen`` waves at gorax.
08:44 gorax i'm new to perl5 and perl6 also
08:45 Aankhen`` Welcome aboard. :-)
08:45 gorax thanks
08:46 gorax Hope to learn something, here and there ;-)
08:47 ruoso joined #perl6
08:51 Aankhen`` gorax: This is usually an interesting channel to hang out in for that sort of stuff.
08:52 * Aankhen`` wonders whether it would be a Bad Thing (tm) to conditionally add to script/kp6's output if --lisp was provided.
08:52 pugs_svnbot r18313 | Aankhen++ | [kp6-lisp]
08:52 pugs_svnbot r18313 | Aankhen++ | * only load Runtime.lisp if it isn't loaded already.
08:52 pugs_svnbot r18313 | Aankhen++ | * created a new KP6-LISP-USER package.
08:52 pugs_svnbot r18313 | Aankhen++ | * instead of creating a new package with a MAIN function in the generated code, simply switch to the KP6-LISP-USER package and use the KP6-ADD-PROGRAM macro, then call MAIN (provided by KP6-LISP-USER) at the end.
08:52 pugs_svnbot diff: http://dev.pugscode.org/changeset/18313
08:52 lambdabot Title: Changeset 18313 - Pugs - Trac
08:53 Aankhen`` (i.e. independently of the AST transformations.)
08:53 avar Aankhen``: add what?
08:53 drbean left #perl6
08:55 Aankhen`` avar: Building on the last commit, I'm trying to make it so we can process Lisp files in batches.  Then the visitor would simply emit the ADD-PROGRAM bit, while script/kp6 would prefix it with (load "Runtime.lisp") and call MAIN at the end.
08:56 drbean joined #perl6
08:56 Aankhen`` avar: Any thoughts?
08:59 * Aankhen`` slaps Bonnie the Shark around a bit with avar!
09:00 Aankhen`` Don't leave me in suspense here.
09:01 drrho left #perl6
09:01 Aankhen`` Ah well, I'm going to go shower and do some other stuff.
09:01 Aankhen`` BBL.
09:15 cognominal_ joined #perl6
10:14 fglock joined #perl6
10:48 lichtkind joined #perl6
10:50 weinig joined #perl6
10:55 iblechbot joined #perl6
11:21 devogon joined #perl6
11:40 polettix joined #perl6
12:23 cmarcelo joined #perl6
12:37 andara joined #perl6
13:10 Lunchy joined #perl6
13:39 TJCRI joined #perl6
14:02 blindfish joined #perl6
14:09 rindolf joined #perl6
14:21 pugs_svnbot r18314 | avar++ | * Replace tabs with spaces
14:21 pugs_svnbot r18314 | avar++ | * Add a newline to the generated program
14:21 pugs_svnbot diff: http://dev.pugscode.org/changeset/18314
14:21 lambdabot Title: Changeset 18314 - Pugs - Trac
14:25 cognominal_ joined #perl6
14:39 avar Aankhen``-- # EVIL TABBING
14:39 avar (setq default-tab-width 4)
14:39 avar (setq tab-width 4
14:39 avar indent-tabs-mode nil)
14:40 avar (setq-default indent-tabs-mode nil)
14:40 masak full ACK
14:40 masak tab key good, tab char bad
14:42 avar ACK ACK ACK ACK AAACK AAACK AKC
14:43 masak the general principle being, I think, that when two characters look the same (like space and tab), or almost the same (like 'l' and '1'), strive towards using only the more common one
14:45 avar I don't mind using tabs when they carry some semantic meaning like in a csv file, they don't when you indent stuff. In most grammars anyway
14:47 masak true
14:48 masak I agree about the csv case, I think
14:48 masak as long as only tabs are used, and not some kind of tab/space mix presupposing 8 spaces per tab or whatever
14:49 * masak cannot count the number of botched .doc files he has received via email that make a thousand assumptions about default fonts, tab stops and page breaks
14:55 jrockway avar: while we're on the subject of indenting in emacs
14:56 jrockway do you know how to get cperl to indent Bla->foo(\nbar => baz\n); such that bar is indented 4 spaces from the start of the expression (instead of directly below the paren)
14:57 `nipra joined #perl6
14:57 weinig joined #perl6
14:59 chris2 joined #perl6
15:00 * [particle1 idly wonders whether l or 1 is more common...
15:06 avar jrockway: (setq cperl-indent-parens-as-block t)
15:07 jrockway avar: that's set and it's not doing what i want :(
15:07 jrockway FWIW, i'm not sure i can find an algorithm for doing that
15:07 jrockway the number of spaces varies based on my mood
15:09 avar if I run emacs -q C-x C-b foo.pl M-x cperl-mode (setq cperl-indent-parens-as-block t) C-x C-e RET Foo->new( RET TAB it indents it with two spaces
15:09 avar so maybe some other setting is screwing it up?
15:09 jrockway possible
15:10 avar try that anyway
15:10 jrockway whoa, it works
15:10 jrockway my .emacs must be b0rken
15:10 jrockway avar++
15:11 masak particle1: in variables, probably l
15:12 jrockway aha, i figured it out
15:12 jrockway i spelled parens wrong
15:12 jrockway jrockway--
15:12 jrockway thanks for the informative error message, emacs
15:12 jrockway oh wait, there was none
15:12 iblechbot joined #perl6
15:13 cognominal__ joined #perl6
15:14 masak particle1: in your nick, they're just as common :)
15:14 avar r18305 | pmurias | 2007-10-07 09:15:39 +0000 (Sun, 07 Oct 2007) | 1 line
15:14 avar [kp6] fixed 39-junction.t,removed t/{01-sanity-modified,mp6}
15:15 avar @tell pmurias "[kp6] fixed 39-junction.t,removed t/{01-sanity-modified,mp6}" - why remove sanity tests?
15:15 lambdabot Consider it noted.
15:19 pmurias joined #perl6
15:19 pmurias avar: ping
15:19 lambdabot pmurias: You have 1 new message. '/msg lambdabot @messages' to read it.
15:20 avar pmurias: !
15:20 pmurias avar: hi
15:21 pmurias i removed 01-sanity-modified because the modifications are no longer nessasary
15:21 pmurias kp6 can use sanity tests directly from the pugs test suit
15:22 pmurias the tests to be run are mentioned in TESTS
15:23 avar TESTS only imports 7/17 of them, 02-counter was modified to run on kp6 and there was another one that did && and ||
15:25 pmurias the 7 which TESTS imports are the ones which work
15:28 avar Yes and some of the other 10 were modified to work in 01-sanity-modified
15:28 avar it's not a big deal anyway, I just missed a test for some of that stuff
15:29 pmurias avar: it don't think i montified anything else than counter
15:29 pmurias 03-equal does && and || and it's in TESTS
15:30 pmurias avar: if you want any of the other tests you can add some of them back
15:30 avar ah right, nm
15:30 Aankhen`` avar: u sux
15:30 Aankhen`` Thanks for the variable settings, though.  Hopefully they should help.
15:31 pmurias i removed them as i saw compile tests use them
15:31 pmurias and mp6 of which some is speced not to work
15:32 avar Aankhen``: can you compile the tests currently?
15:32 pmurias avar: compile_tests should copy/use tests from TESTS
15:32 Aankhen`` avar: No idea.
15:33 avar Aankhen``: don't you ever try?
15:33 Aankhen`` I never compile them, I just run individual tests.
15:33 Aankhen`` Compiling them doesn't work properly for me.
15:33 avar what happens?
15:34 Aankhen`` I don't remember now.  A lot of errors.
15:34 avar when you compile or run them?
15:34 Aankhen`` Compile.
15:34 avar yes that's normal
15:35 avar could you try compiling them and see if it works? Running them doesn't work for me ATM
15:35 vbattsAtWork joined #perl6
15:36 Aankhen`` What was the incantation again?  Just run the Perl script?
15:36 pugs_svnbot r18315 | Aankhen++ | [kp6-lisp]
15:36 pugs_svnbot r18315 | Aankhen++ | * pruned a lot of dead code from EmitLisp.pm
15:36 pugs_svnbot r18315 | Aankhen++ | * fixed EmitLisp.pm to consistently handle unimplemented features.
15:36 pugs_svnbot r18315 | Aankhen++ | * regenerated EmitLisp.pm
15:36 pugs_svnbot diff: http://dev.pugscode.org/changeset/18315
15:36 lambdabot Title: Changeset 18315 - Pugs - Trac
15:36 avar Aankhen``: yes
15:38 Aankhen`` Okay, some of it is test errors, other errors appear to involve trying to run generated Lisp code as Perl code…
15:39 avar you do prove -r t-lisp-exe
15:39 Aankhen`` Hmm.  I just ran the Perl script and I'm getting all these errors.
15:39 Aankhen`` perl compile_tests_kp6_mp6-lisp.pl
15:40 avar yes errors are normal, we don't run everything in t/ yet
15:43 Aankhen`` That's fine, but why's it trying to run generated Lisp code as Perl code
15:43 Aankhen`` ?
15:44 arrowax joined #perl6
15:47 avar when is it doing that?
15:47 Aankhen`` Pretty randomly.
15:47 Aankhen`` Maybe it's the expansion of BEGIN or something.
15:47 avar sh-3.1$ perl t-lisp-exe/01-sanity/01-tap.t
15:47 avar unhandled UNDEFINED-FUNCTION in thread #<SB-THREAD:THREAD "initial thread" {B5B7989}>:
15:47 Aankhen`` s/expansion/transformation/
15:47 avar The function MAIN::MAIN is undefined.
15:48 Aankhen`` Yeah, I'm seeing a lot of those too.
15:48 Aankhen`` I think it isn't recompiling everything properly.
15:48 avar what isn't?
15:48 avar (eval-when (:compile-toplevel :load-toplevel :execute)
15:48 avar (when (null (find-package 'kp6-lisp))
15:48 avar (load "lib/KindaPerl6/Runtime/Lisp/Runtime.lisp")))
15:48 Aankhen`` Anything!
15:48 avar maybe this is causing trouble?
15:49 Aankhen`` It shouldn't be trying to call MAIN::MAIN.
15:49 Aankhen`` Nope, that works fine for me.
15:49 avar when does it work fine for you? when you create executables with sbcl? because that's the issue with the tests
15:49 Aankhen`` Oh, wait.
15:49 Aankhen`` The test script always tries to call MAIN::MAIN?
15:49 avar I can run it fine as -lisp | sbcl
15:49 Aankhen`` That'd be it.
15:49 avar oh yeah
15:50 * avar changes it
15:50 Aankhen`` Sorry, I forgot about that. :-)
15:50 Aankhen`` It'd be KP6-LISP-USER::MAIN now.
15:51 avar terririst
15:52 Aankhen`` Hmm, I'm going to make it handle errors in a more Perl-ish way.
15:52 Aankhen`` Oh, does perl (5) exit with a particular status code whatever error it encounters
15:52 Aankhen`` ?
15:53 avar perldoc perlrun I suppose
15:53 Aankhen`` h8
15:53 avar but die et al modify the unix ret code, yes
15:54 Aankhen`` Unless I'm missing it, perlrun doesn't seem to mention status codes.
15:55 Aankhen`` Exit codes, rather.
15:55 Aankhen`` Okay, I'll just ignore that for now and always use 1 for a fatal error.
15:55 avar it was just a guess
15:55 avar I don't think this is specced for p6 in any case
16:02 pmurias compile_tests work fine here
16:03 pmurias tests 1-4 11-13 28 55 compile here
16:03 avar I don't see how it can work
16:04 drbean_ joined #perl6
16:04 pugs_svnbot r18316 | avar++ | * kp6-lisp-user::main not Main::Main
16:04 pugs_svnbot diff: http://dev.pugscode.org/changeset/18316
16:04 lambdabot Title: Changeset 18316 - Pugs - Trac
16:04 avar works now though
16:06 pmurias avar: i have an older revision ;)
16:15 barney joined #perl6
16:28 pmurias it work now on HEAD
16:28 pmurias *works
16:36 weinig joined #perl6
16:42 jjore-w joined #perl6
16:46 pugs_svnbot r18317 | Aankhen++ | [kp6-lisp]
16:46 pugs_svnbot r18317 | Aankhen++ | * graceful exits, both fatal and normal.
16:46 pugs_svnbot r18317 | Aankhen++ | * WITH-KP6-INTERPRETER no longer creates and initializes a KP6-INTERPRETER object; it only establishes stub functions.
16:46 pugs_svnbot r18317 | Aankhen++ | * added compat/ for implementation-specific functionality, only including at present exiting.
16:46 pugs_svnbot r18317 | Aankhen++ | * KP6-ADD-PROGRAM creates a single-argument function and wraps the contents in WITH-KP6-INTERPRETER.
16:46 pugs_svnbot r18317 | Aankhen++ | * MAIN creates and initializes a new interpreter.
16:46 pugs_svnbot r18317 | Aankhen++ | * MAIN exits gracefully both under fatal and normal conditions.
16:46 pugs_svnbot r18317 | Aankhen++ | * fixed indentation in Runtime.lisp
16:46 pugs_svnbot r18317 | Aankhen++ | * removed unnecessary &rest argument from WITH-KP6-INTERPRETER.
16:46 pugs_svnbot diff: http://dev.pugscode.org/changeset/18317
16:46 lambdabot Title: Changeset 18317 - Pugs - Trac
16:50 prefiks joined #perl6
16:50 polettix joined #perl6
16:56 avar Aankhen``: did you try the emacs indenting settings I pasted?
17:02 Aankhen`` avar: Yes.
17:02 avar it worked?
17:02 Aankhen`` Am I still creating hard Tabs?
17:03 avar I didn't check
17:04 Aankhen`` Ah.
17:04 Aankhen`` Oh, wait, I did check when I was editing that Perl code, and I don't think I was creaing hard Tabs.
17:05 justatheory joined #perl6
17:06 avar have you been modeling the lisp stuff after the perl implementation or doing things differently?
17:06 avar everything in the p5 one works on ::DISPATCH, wondering if we have an equivalent
17:06 avar 1337.true => ::DISPATCH( ::DISPATCH( $::Int, 'new', 1337 ), 'true', )
17:06 pugs_svnbot r18318 | ruoso++ | [yap6] yes... it is another prospective perl 6 implementation, but now, a simple C runtime, hopefully a target for kp6
17:06 pugs_svnbot diff: http://dev.pugscode.org/changeset/18318
17:06 lambdabot Title: Changeset 18318 - Pugs - Trac
17:07 ruoso fglock, there it is
17:08 moritz_ ruoso: is the intention to built something like nqp, but on C?
17:08 ruoso moritz_, hmm... no...
17:08 moritz_ i.e. fast, but not a full implementation?
17:08 moritz_ ok
17:08 ruoso to build something like kp6
17:09 ruoso but targetting that runtime
17:09 ruoso actually
17:09 ruoso a runtime for kp6
17:09 Aankhen`` avar: I don't think we do.
17:09 Aankhen`` avar: I haven't been modelling it after the Perl implementation.
17:09 ruoso moritz_, the idea is to provide the minimal runtime for a MOP implementation
17:09 ruoso that would support real p6 in the future
17:10 ruoso moritz_, but I don't plan that to be complete as a start
17:10 ruoso I mean
17:10 ruoso it can have partial releases
17:10 ruoso supporting only part of the specs
17:10 ruoso but the real target is a real implementation
17:11 moritz_ ok
17:11 avar Aankhen``: Basically we're missing the whole MOP.pm stuff
17:11 pmurias ruoso: you decided against using Parrot's guts?
17:11 ruoso pmurias, too complex to begin
17:11 ruoso heh
17:12 ruoso I couldn't figure out where to start from
17:12 ruoso it'll be much simpler than parrot
17:12 avar sub ::DISPATCH {
17:12 avar my $invocant = shift;
17:12 avar unless ($invocant->{_dispatch}) {
17:12 avar confess "DISPATCH: calling @_ on invalid object:",Dumper($invocant),"\n"
17:12 avar }
17:12 avar $invocant->{_dispatch}($invocant,@_);
17:12 avar }
17:12 ruoso and, of course, much less usefull, when parrot is ready
17:13 avar hrm
17:13 avar Aankhen``: look at stuff like:
17:13 avar my $meta_Value = ::DISPATCH( $::Class, 'new', "Value");
17:13 avar $::Value = $meta_Value->PROTOTYPE();
17:13 avar $meta_Value->add_method( 'WHICH', :
17:14 ruoso home &
17:14 avar Aankhen``: and make_class which is the parent..
17:14 avar uh, wrapper for doing that
17:15 avar we could piggy-back on CLOS for a lot of this, like the %dispatch member always being a lambda
17:16 avar we have some of this, like routines for checking whether an int is true, but how we're doing it is the problem
17:16 avar (kp6-true isn't really "dispatched" it just checks the value member..
17:17 jhorwitz joined #perl6
17:17 Aankhen`` Yes, currently everything's hard-coded rather than being objects.
17:17 xdg joined #perl6
17:19 avar we have ::DISPATCH((make-instance 'kp6-Int :value 1337), 'true')
17:20 avar which could be (kp6-dispatch (make-instance 'kp6-Int :value' 1337) "true")
17:20 avar ::DISPATCH is just $invocant->{_dispatch}($invocant,@_);
17:20 avar $meta_Int->add_method( 'true',
17:20 avar ::DISPATCH( $::Method, 'new',  sub { $::Bit->new( $_[0]{_value} == 0 ? 0 : 1 ) } ) );
17:25 Psyche^ joined #perl6
17:26 avar (kp6-dispatch (kp6-dispatch (make-instance 'kp6-Int :value 1337) "true") "say")
17:27 avar why are C<say "foo"> and C<"foo".say> different in the AST?
17:28 Aankhen`` One is a function application, the other is a method call?
17:28 avar I mean how is it different as far s the language is concerned
17:29 avar if I rewrote everything to use method calls what would break
17:29 Aankhen`` The former is an indirect object call.
17:29 Aankhen`` (AFAIK.)
17:29 Aankhen`` Or perhaps "foo".say simply calls say "foo" under the cover.
17:29 Aankhen`` What are you planning to rewrite to use method calls?
17:30 avar just wondering why they have to be different
17:31 Aankhen`` Actually, I'm not sure what the .say method is.
17:33 Aankhen`` I'll probably find out soon enough though.  Objects are next on my list.
17:36 Aankhen`` Lotsa failures (kp6-lisp).
17:36 pasteling "Aankhen" at 122.163.34.251 pasted "$ time prove -r t-lisp-exe/ t-" (112 lines, 7.7K) at http://sial.org/pbot/27945
17:38 avar 5m? are the failing tests taking so long?
17:39 prefiks joined #perl6
17:42 pugs_svnbot r18319 | Aankhen++ | [kp6-lisp]
17:42 pugs_svnbot r18319 | Aankhen++ | * use `rm -f` and `rm -rf` when removing t-lisp-exe/ in compile_tests_kp6_mp6-lisp.pl
17:42 pugs_svnbot r18319 | Aankhen++ | * added --no-autoexecute command line option to script/kp6, currently only used by the Lisp backend to avoid executing tests when we're supposed to be compiling executables.
17:42 pugs_svnbot r18319 | Aankhen++ | * pass --no-inform and --no-print to SBCL when compiling tests.
17:42 pugs_svnbot r18319 | Aankhen++ | * muffle warnings in SBCL when compiling tests.
17:42 pugs_svnbot diff: http://dev.pugscode.org/changeset/18319
17:42 lambdabot Title: Changeset 18319 - Pugs - Trac
17:49 Aankhen`` Why is ::Module commented out in Ast.pm?
17:49 avar Aankhen``: I think we can definetely piggy-back on CLOS
17:49 avar if it's the 'use Foo' thing then probably because it broke everything
17:50 Aankhen`` `class Module { ... }` is commented out.
17:50 Aankhen`` And I don't think we can piggy-back on CLOS.
17:51 avar why?
17:51 avar You don't have to use all of clos..
17:51 Aankhen`` Uh.
17:51 Aankhen`` We're going to be using CLOS the same way we're using it right now, if that's what you meant.
17:51 Aankhen`` In the end it's going to be CLOS objects.
17:52 avar I was just thinking of using generics to handle dispatch instead of something custom, mainly
17:52 Aankhen`` But, for example, we're not going to create a new CLOS class for each Perl 6 class, or use generic functions.
17:54 avar well we'll see
17:57 pmurias Aankhen``: ::Module is comented out because it was replaced by CompUnit
17:57 Aankhen`` pmurias: Ah.
17:57 Aankhen`` So ::CompUnit should be generating a new package?
17:57 Aankhen`` (Assuming it doesn't exist already.)
17:57 pmurias yes
17:58 pmurias well a new module, or class or role
18:00 Aankhen`` Okay.
18:10 rindolf joined #perl6
18:15 pugs_svnbot r18320 | Aankhen++ | [kp6-lisp]
18:15 pugs_svnbot r18320 | Aankhen++ | * ::CompUnit creates a new package as appropriate using KP6-ENSURE-PACKAGE.
18:15 pugs_svnbot r18320 | Aankhen++ | * KP6-ADD-PROGRAM should take &BODY BODY rather than a single PROGRAM form.
18:15 pugs_svnbot r18320 | Aankhen++ | * KP6-LISP-USER::MAIN now takes INTERPRETER and STANDALONE keyword arguments.
18:15 pugs_svnbot r18320 | Aankhen++ |     * INTERPRETER indicates the KP6-INTERPRETER object to use, defaulting to a fresh instance of KP6-INTERPRETER.
18:15 pugs_svnbot r18320 | Aankhen++ |     * STANDALONE indicates whether the function should take over responsibility for errors and the normal end of the program.
18:15 pugs_svnbot r18320 | Aankhen++ | * regenerated EmitLisp.pm
18:15 pugs_svnbot diff: http://dev.pugscode.org/changeset/18320
18:15 lambdabot Title: Changeset 18320 - Pugs - Trac
18:18 rindolf perlbot: karma Aankhen
18:18 perlbot Karma for Aankhen: 279
18:18 pugs_svnbot r18321 | Aankhen++ | * set svn:ignore on v6/v6-KindaPerl6/.
18:18 pugs_svnbot r18322 | fglock++ | [kp6] a working prototype of gather/take in Perl 5 (with laziness, dynamic scope)
18:18 pugs_svnbot r18322 | fglock++ | - uses Coro.pm; doesn't depend on PadWalker; no threads.
18:18 pugs_svnbot diff: http://dev.pugscode.org/changeset/18322
18:18 lambdabot Title: Changeset 18322 - Pugs - Trac
18:20 jisom joined #perl6
18:29 Torment joined #perl6
18:41 Neotrix_ joined #perl6
18:43 Notrix joined #perl6
19:30 kyrbe joined #perl6
19:30 kyrbe left #perl6
19:31 Kattana joined #perl6
19:33 TimToady avar: I think I want to play with TRE for my lexer engine for STD
19:33 [particle] TRE?
19:34 TimToady http://laurikari.net/tre//
19:34 lambdabot Title: TRE home page
19:34 TimToady there are Perl and Haskell bindings
19:35 TimToady so either I need to "use v5" to get the re::engine bindings, or get someone to hook up the Haskell bindings to pugs
19:36 avar note that re::engine only works on 5.10
19:36 avar tre is posix compatable so any posix regex binding will do
19:36 TimToady well, I've got 5.9.mumble installed
19:36 avar yeah 5.9.5/5.10
19:36 TimToady but tre does tagged transitions efficiently, I think
19:37 TimToady so I can pull out longest tokens that include subrule matches
19:38 TimToady but when I cpanp install it, it tells me that cpans's re is out of date :(
19:39 avar can you paste the error?
19:39 TimToady [ERROR] The core Perl 5.009005 module 're' (0.08) is more recent than the latest release on CPAN (0.05). Aborting install.
19:44 TimToady though for the STD prototype, I'd probably just as soon use the Haskell version if it were hooked up, since I'm targeting pugs right now.
19:44 TimToady but every time I argue with ghc I lose... :/
19:49 avar that's cpanp -i re::engine::TRE ?
19:50 TimToady no -, but yes
19:51 TimToady cpanp running under 5.9.5
19:53 dduncan joined #perl6
19:57 avar use -f ?
20:01 TimToady doesn't understand -f
20:02 TimToady trying with cpan instead
20:04 TimToady bleh, TRE.xs: In function ‘TRE_comp’:
20:04 TimToady TRE.xs:26: error: ‘RXf_SPLIT’ undeclared (first use in this function)
20:05 TimToady is 5.9.5 not sufficiently 5.10ish?
20:05 avar yes, your 5.9.5 just isn't recent enough, there were a lot of changes while it was called .5, you need to upgrade
20:06 TimToady thanks
20:06 jferrero joined #perl6
20:06 avar anyway I still don't quite see the point to be honest:) But then again I haven't studied tre so closely
20:07 avar but I think you mainly win on patterns not going exponential and not crapping out on some pathological patterns
20:08 TimToady the crucial part is knowing which part of the pattern matched
20:10 pasteling "TimToady" at 71.139.11.229 pasted "sample lexer for expect_term" (923 lines, 27.4K) at http://sial.org/pbot/27951
20:10 TimToady I need to be able to run the pattern above and know which STD rules were traversed to get there
20:11 TimToady I think TRE will give me that
20:12 avar I didn't see anything like that in its manual, it has an interface for that?
20:12 TimToady it does substr captures
20:13 TimToady as described in this paper by the same person: http://laurikari.net/ville/spire2000-tnfa.ps
20:14 avar I don't think that's in the re::engine::TRE interface though
20:14 TimToady if you can pull out $1, $2, as documented, it can
20:15 TimToady asssuming you haven't put a hard-coded limit in
20:16 avar that's to get the parts of the string that were matched, but as I understand it you want to know the parts of the regex that were matched to get there right?
20:16 TimToady see example--as long as all the parens get their own number, I can derive that
20:16 avar ah
20:17 TimToady also asssuming that the -> foo notation turns into ()
20:19 TimToady in the long run I'd like to rewrite TRE or something like it in Perl 6
20:20 TimToady because it's almost exactly what I was thinking of with the revisions of S05 to define longest token matching
20:21 TimToady if we integrate it well, nobody ever has to write their own lexer again.
20:21 TimToady that's the goal of all this autolex stuff I've been working on
20:26 rlb3_work joined #perl6
20:45 jferrero joined #perl6
21:10 PerlJam TimToady++.  You know, you're a little bit like Robin Hood.  You're always stealing good ideas for the benefit of all us poor programmers  ;)
21:10 PerlJam s/ideas/ideas and implementations/ probably
22:04 pugs_svnbot r18323 | avar++ | Don't C<use Exporter 'import'> which breaks 5.6 compatability (see
22:04 pugs_svnbot r18323 | avar++ | http://www.nntp.perl.org/group/perl.​cpan.testers/2007/10/msg667354.html)
22:04 pugs_svnbot r18324 | avar++ | Don't C<use Exporter 'import'> which breaks 5.6 compatability (see
22:04 pugs_svnbot r18324 | avar++ | http://www.nntp.perl.org/group/perl.​cpan.testers/2007/10/msg667354.html)
22:04 pugs_svnbot diff: http://dev.pugscode.org/changeset/18324
22:04 lambdabot Title: Changeset 18324 - Pugs - Trac
22:04 lambdabot Title: UNKNOWN KindaPerl6-0.001 i686-linux-64int 2.6.16-2-k7 - nntp.perl.org, http://tinyurl.com/27o5yq
22:04 lambdabot Title: UNKNOWN KindaPerl6-0.001 i686-linux-64int 2.6.16-2-k7 - nntp.perl.org, http://tinyurl.com/27o5yq
22:13 xinming joined #perl6
22:18 xinming joined #perl6
22:56 dduncan joined #perl6
23:02 japhb joined #perl6
23:11 polettix joined #perl6
23:17 pugs_svnbot r18325 | avar++ | [kp6-lisp] prefix:<~>
23:17 pugs_svnbot diff: http://dev.pugscode.org/changeset/18325
23:17 lambdabot Title: Changeset 18325 - Pugs - Trac
23:47 pugs_svnbot r18326 | avar++ | [kp6-lisp] fail verbosely on test failures, now it's easy to know what
23:47 pugs_svnbot r18326 | avar++ | went wrong and what our status is
23:47 pugs_svnbot diff: http://dev.pugscode.org/changeset/18326
23:47 lambdabot Title: Changeset 18326 - Pugs - Trac

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

Perl 6 | Reference Documentation | Rakudo