Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-09-22

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:01 cognominal_ joined #perl6
00:03 avar class Do {
00:03 avar # Everything's an expression in lisp so do {} is implicit:)
00:03 avar method emit_lisp {
00:03 avar $.block.emit_lisp ~ Main::newline();
00:03 avar :)
00:14 avar @tell fglock say "hello" now works under --lisp but could you please check out the fixme comment in EmitLisp.pm? We probably have to change the lisp runtime..
00:24 thoughtpolice joined #perl6
00:30 TimToady avar: note that lambdabot is down currently
00:31 avar urgh
00:36 fglock joined #perl6
00:36 fglock avar: ok
00:37 thoughtpolice i have a lambdabot build i could get here if people want it that much
00:37 thoughtpolice everything works fine as far as I know
00:44 avar 1;5F
00:44 avar < avar> @tell fglock say "hello" now works under
00:44 avar --lisp but could you please check out the
00:44 avar fixme comment in EmitLisp.pm? We probably
00:44 avar have to change the lisp runtime..
00:44 avar fglock: EEK
00:45 fglock avar: looking
00:46 avar compare the code you get with --lisp with that my $op line and the one without it
00:46 avar sucy runtime I guess
00:47 avar :)
00:50 fglock one sec
00:51 fglock with current version, i get: EVAL: undefined function KP6-APPLY
00:53 fglock now recompiling the other version...
00:57 fglock hmm - i don't see much difference
00:59 fglock kp6-APPLY vs kp6-apply-function?
00:59 avar did you svk pull the lisp files?
01:00 avar oh
01:00 avar remake the compiler, I think I forgot to commit that
01:01 avar or rather there were so many lib-* changes and I wasn't sure if I screwed up something there..
01:02 fglock brb
01:03 vel joined #perl6
01:04 daxim joined #perl6
01:10 fglock b
01:10 fglock new year party here
01:13 fglock later &
01:15 sorear-lambdabot joined #perl6
01:25 hoelzro left #perl6
01:27 cognominal_ joined #perl6
01:32 daxim_ joined #perl6
02:18 ryporter joined #perl6
02:45 c9s joined #perl6
02:45 Fhoxh joined #perl6
02:46 Fhoxh Does anyone happen to know if Pugs has a concept similar to "patch/patchlevel" in perl5?
02:49 TimToady pugs: say $*PUGS_VERSION
02:49 exp_evalbot OUTPUT[Perl6 User's Golfing System, version 6.2.13, October 17, 2006 (r17871)␤]
02:49 TimToady it's at patchlevel 17871  :)
02:49 Fhoxh Thanks Larry =)
02:49 TimToady which happens to be the svn revision number
02:49 * Fhoxh nods
02:49 TimToady amazing coincidence, that...
03:05 elmex joined #perl6
03:49 bp[0] joined #perl6
03:50 bp[0] left #perl6
03:54 amnesiac joined #perl6
04:12 Ashizawa joined #perl6
04:13 justatheory joined #perl6
04:19 vel joined #perl6
04:22 Psyche^ joined #perl6
04:33 justatheory joined #perl6
04:52 f0rth_ joined #perl6
05:01 justatheory joined #perl6
05:30 lambdabot joined #perl6
06:20 devogon joined #perl6
06:24 buubot joined #perl6
07:25 cognominal_ joined #perl6
07:36 Aankhen`` joined #perl6
07:44 dduncan joined #perl6
07:48 jisom joined #perl6
07:51 jasonmay joined #perl6
07:56 jasonmay joined #perl6
08:02 iblechbot joined #perl6
08:08 cognominal_ joined #perl6
08:16 elmex joined #perl6
08:41 ahmadz kp6: say "Hello world";
08:41 exp_evalbot r18093: OUTPUT[Hello world␤]
09:02 moritz_ TimToady++ # easy coercion
09:02 lambdabot moritz_: You have 1 new message. '/msg lambdabot @messages' to read it.
09:03 moritz_ @massages
09:03 lambdabot ahmadz said 3d 15h 16m 46s ago: "I added more debugging aids to runpugs on http://feather.perl6.nl:8096/runpugs/). Please send me the whole status line so i can debug.
09:03 Aankhen`` svnbot is still offline?
09:03 moritz_ seems like, yes
09:03 ahmadz moritz: hmmm that's a rather old message
09:05 elmex joined #perl6
09:05 moritz_ ahmadz: I know... the problem is fixed ;)
09:06 moritz_ pugs: say $*PUGS_VERSION
09:06 exp_evalbot OUTPUT[Perl6 User's Golfing System, version 6.2.13, October 17, 2006 (r18093)␤]
09:06 moritz_ why isn't that written as $?PUGS_VERSION? it's known at compile time ;)
09:15 iblechbot joined #perl6
09:28 blindfish joined #perl6
09:29 Blwood joined #perl6
09:29 dduncan left #perl6
09:37 ahmadz For all the all-new with :tutorial,:next and :back ;-), please check http://feather.perl6.nl:8096/runpugs/
09:37 lambdabot Title: Run Perl 6 Now -- in your browser!
09:47 moritz_ ahmadz: that's cool... maybe you could also provide a :next button (for those who are lazy ;)
09:48 ahmadz moritz: ok will do ;-)
09:49 moritz_ ahmadz: btw I hope you know that all of my feature requests are just ideas - I won't use runpugs very much since I have a local copy ;)
09:49 ahmadz_ joined #perl6
09:50 ahmadz moritz: now we should be >= try ruby in your browser ;-)
09:51 ahmadz moritz: we support full terminal emulation, they dont ;-)
09:51 b00t joined #perl6
09:51 moritz_ ;)
09:53 ahmadz moritz: we have a camel and a moose in the background, they dont ;-)
09:54 ahmadz moritz: btw, for :next, you can use UP and then enter...
09:55 * ahmadz thinks about :show examples/name-of-examples.pl
10:05 drrho joined #perl6
10:10 chris2 joined #perl6
10:21 riffraff joined #perl6
10:22 riffraff hi
10:23 moritz_ hi
10:23 ahmadz hi ;-)
10:30 kanru joined #perl6
10:34 drupek1245 joined #perl6
10:38 c9s joined #perl6
10:43 wolv joined #perl6
10:43 wolverian I have to stop doing that
11:04 moritz_ wolverian: doing what?
11:07 wolverian pressing up and forgetting I last typed 'screen irssi', not 'screen -r' :)
11:22 * avar eats Aankhen``
11:40 blindfish joined #perl6
12:34 blindfish joined #perl6
12:52 penk joined #perl6
13:00 Blwood joined #perl6
13:15 ahmadz feather dns is down again?
13:18 ahmadz @tell juerd "feather hostname could not be resolved (sat 1:17 PM utc)"
13:18 lambdabot Consider it noted.
13:22 ahmadz ahmadz &
13:34 ahmadz_ joined #perl6
13:35 dalek joined #perl6
14:00 d4l3k_ joined #perl6
14:30 hoelzro joined #perl6
14:31 jhorwitz joined #perl6
14:38 itz2 joined #perl6
14:44 xinming joined #perl6
14:52 elmex joined #perl6
15:02 itz2 left #perl6
16:19 allbery_b joined #perl6
16:34 weinig joined #perl6
16:37 DarkWolf84 joined #perl6
16:40 platypus joined #perl6
16:44 wolverian joined #perl6
16:45 wolverian is feather having network problems, or just my irssi?
16:47 vel joined #perl6
16:47 TimToady I just did an svn up
16:47 TimToady (successfully)
16:49 ahmadz joined #perl6
16:51 amnesiac joined #perl6
17:01 Lunchy joined #perl6
17:01 snearch joined #perl6
17:12 ahmadz_ joined #perl6
17:36 riffraff joined #perl6
17:53 MU9214 joined #perl6
17:54 Psyche^ joined #perl6
17:54 cognominal_ joined #perl6
17:57 MU9214 ?eval say "hello!"
17:57 MU9214 or not
17:58 Tene pugs: say "Hello!"
17:58 exp_evalbot OUTPUT[Hello!␤]
17:58 ahmadz_ kp6: say "Hello!"
17:58 exp_evalbot r18098: OUTPUT[Hello!␤]
17:58 MU9214 pugs: print "test';
17:58 exp_evalbot OUTPUT[*** ␤    Unexpected end of input␤    expecting block, "\\", variable name or "\""␤    at /tmp/je9XWniJuV line 2, column 1␤]
17:58 MU9214 no print ?
17:59 ahmadz_ pugs: print "test";
17:59 exp_evalbot OUTPUT[test]
18:04 jisom joined #perl6
18:06 TimToady MU9214: you mixed up " with ' there
18:06 TimToady pugs: print "test"
18:06 exp_evalbot OUTPUT[test]
18:12 MU9214 pugs: print "blahblah"
18:12 exp_evalbot OUTPUT[blahblah]
18:13 Aankhen`` avar: Kindly refrain from eating me, kthx.
18:14 avar ARR
18:16 MU9214 if i install pugs here: http://search.cpan.org/~audreyt/Perl6-Pugs-6.2.13/lib/Perl6/Pugs.pm   can I use cpan? If so, and it installs, how do I use it, as opposed to perl 5?  use Pugs;  ?
18:16 lambdabot Title: Perl6::Pugs - A Perl 6 Implementation - search.cpan.org, http://tinyurl.com/t55p4
18:16 MU9214 i just want to try pugs..
18:16 lichtkind joined #perl6
18:17 MU9214 ??
18:17 Aankhen`` avar: Haven't done anything?
18:18 TimToady MU9214: if you want to play with pugs heavily, the best thing to do is to install the current svn version
18:19 TimToady (the CPAN version is nearly a year old)
18:19 TimToady or you can try the runpugs webpage
18:19 MU9214 how do i do that?
18:19 MU9214 runpugs wasnt working... for me, anyawy.
18:19 hoelzro joined #perl6
18:20 TimToady they've been "upgrading" it lately, so maybe it's busted
18:20 xinming MU9214: Just do checkout from pugs repository, and try to compile.
18:21 xinming MU9214: It's not that hard.
18:22 avar Aankhen``: nah
18:23 avar Aankhen``: I shouted at fglock though
18:23 avar Aankhen``: I think you have to rewrite your lisp thingy to play nice with the emitter
18:23 avar Aankhen``: Do you understand how it's supposed to work, approximately?
18:24 TimToady MU9214: looks like the development version is at http://feather.perl6.nl:8080/runpugs/
18:24 lambdabot Title: Run Perl 6 Now -- in your browser!
18:25 ahmadz_ yup runpugs dev is there... and working with tutorial mode ;-)
18:26 TimToady the run.pugscode.org page doesn't have an obvious link to actually run the page.  I had to go through the "no javascript" link to actually find the page
18:26 MU9214 is this ok to follow:  http://debcentral.org/modules/news/article.php?storyid=489
18:26 lambdabot Title: DebCentral - perl6 howto in ubuntu dapper - Tutorials - News
18:27 ahmadz_ The dev version is at http://feather.perl6.nl:8096/runpugs
18:27 lambdabot Title: Run Perl 6 Now -- in your browser!
18:28 TimToady MU9214: that looks quite ancient, and mixes up the pugs install with the parrot install
18:28 MU9214 i need a guide though...
18:28 MU9214 or someone here to walk me through it
18:29 MU9214 will somone here walk me through it?
18:29 TimToady http://www.perlfoundation.org/perl6/index.cgi?download_perl_6
18:29 lambdabot Title: Download Perl 6 / Perl 6
18:30 avar Aankhen``: ?
18:31 MU9214 dont i need parrot too though, to use perl 6?
18:31 hoelzro nope
18:31 hoelzro pugs is the most complete implementation as of now
18:31 hoelzro unless someone was working REALLY hard last night =P
18:31 MU9214 now how do I use perl6, or perl, because if I use perl file.pl   it will be perl5, right?
18:32 MU9214 so is it pugs .pl?
18:32 hoelzro sure
18:32 MU9214 whoops. i mean  'pugs file.pl'
18:32 xinming MU9214: yes.
18:32 MU9214 that will work?
18:32 MU9214 k
18:33 MU9214 $PAGER ./INSTALL
18:33 MU9214 -bash: ./INSTALL: Permission denied
18:33 MU9214 ...
18:33 xinming MU9214: perl Makefile.PL
18:33 xinming less ./INSTALL
18:33 ahmadz_ MU9214: You can experiment pugs on runpugs dev version ( http://feather.perl6.nl:8096/runpugs )
18:33 lambdabot Title: Run Perl 6 Now -- in your browser!
18:33 hoelzro MU9214:  you need to define PAGER
18:33 hoelzro or just run less/more/a text editor
18:34 MU9214 *** Cannot find a runnable 'ghc' from path.
18:34 MU9214 so i need to apt-get ghc
18:34 hoelzro yup
18:34 xinming MU9214: INSTALL file is just instructions for reading how to compile pugs.
18:34 TimToady be sure it's at least version 6.6.1
18:35 hoelzro MU9214: what distro are you using?
18:35 MU9214 hoelzro: ubuntu
18:35 MU9214 xinming: ohh i get it
18:35 * MU9214 feeld stupid
18:35 MU9214 feels*
18:35 hoelzro I'm pretty sure ghc in ubuntu is 6.6.1
18:35 MU9214 i'm on 7.x  whatever x is.   7.04 i think
18:36 xinming MU9214: No hurry, Just learn. :-)
18:36 TimToady and the moment you want to fix something, someone here will give you a commit bit :)
18:37 MU9214 *** Cannot find GHC 6.6.1 or above from path (we have 6.6).
18:37 MU9214 I JUST INSTALLED GHC USING APT GET!!!
18:37 MU9214 *** Please install a newer version from http://haskell.org/ghc/.
18:37 lambdabot Title: The Glasgow Haskell Compiler
18:37 MU9214 how do I do that?
18:38 hoelzro I think there's a DEB on the ghc site
18:38 hoelzro lemme check
18:38 xinming MU9214: show us the output of 'ghc -v'
18:38 MU9214 Glasgow Haskell Compiler, Version 6.6, for Haskell 98, compiled by GHC version 6.6
18:38 MU9214 is the first line
18:39 hoelzro MU9214: I think you'll have to install it from source
18:39 xinming hmm, It seems, It's not the one named 6.6.1 :-)
18:39 xinming MU9214: you have to compile it from source.
18:39 TimToady don't think so
18:40 MU9214 TimToady: ?
18:40 hoelzro what features of 6.6.1 does pugs use, anyway?
18:40 xinming MU9214: It'll take some time... :-)
18:40 hoelzro MU9214: what's your system like?
18:40 Limbic_Region joined #perl6
18:40 xinming hoelzro: Don't know. But as my ghc is 6.6.1
18:40 TimToady you can probably just install http://haskell.org/ghc/dist/6.6.1/ghc-6.6.1-i386-unknown-linux.tar.bz2
18:40 lambdabot http://tinyurl.com/2bxe87
18:40 hoelzro GHC 6.6.1 takes me about 30 mins to compile on my AMD 64 dual core 2.6
18:40 MU9214 how do I untar  tar.bz2    i know tar.gz is    tar -zxvf file.tar.gz
18:41 hoelzro MU9214: -j is the flag
18:41 TimToady or use bunzip2
18:41 xinming MU9214: tar -jxvf file.tar.bz
18:41 MU9214 hoelzro: its an old pentium 2 lc3 HP netserve
18:41 MU9214 400mhz...
18:41 MU9214 but pretty fast, b/c it has no gui. just text (ubuntu server edition)
18:41 xinming MU9214: I'd suggest you not try to compile ghc really.
18:41 TimToady how much memory?
18:41 xinming how much ram?
18:42 MU9214 195mb
18:42 xinming I'd suggest with at least 512. otherwise, the compiling process will make your system unusable...
18:42 MU9214 yeah its old
18:42 hoelzro yeah, binary distribution would be ideal.
18:42 MU9214 binary distribution?
18:42 xinming MU9214: Are you familiar with debian?
18:42 hoelzro TimToady: you can probably just install http://haskell.org/ghc/dist/6.6.1/ghc-6.6.1-i386-unknown-linux.tar.bz2
18:42 lambdabot http://tinyurl.com/2bxe87
18:42 MU9214 xinming: no
18:43 TimToady but compiling pugs will also chew up a lot of memory
18:43 xinming MU9214: I think debian has 6.6.1 version of ghc. not sure, as I do compile it myself.
18:43 TimToady even if you have binary ghc already
18:43 MU9214 so pretty much i should live with perl 5, and just play with pugs on the site?
18:43 xinming IIRC, compiling for GHC, the mem usage is more terrible than pugs.
18:43 MU9214 is that what you guys are saying?
18:44 Limbic_Region MU9214 - you might be able to get a binary distribution of both pugs and GHC
18:44 hoelzro MU9214: just curious, what do you plan on doing with Perl 6?
18:44 devogon joined #perl6
18:44 xinming MU9214: For now, I think so. But you can try other distribution.
18:44 Limbic_Region depends on how current you want to be and what platform you have
18:44 MU9214 hoelzro: just playing with it. nothing special.
18:44 hoelzro MU9214: there's a pre-compiled version of 6.6.1
18:44 MU9214 hoelzro: ?
18:44 hoelzro MU9214: good enough for me =D
18:44 hoelzro MU9214: http://www.haskell.org/ghc/dist/6.6.1/ghc-6.6.1-i386-unknown-linux.tar.bz2
18:44 MU9214 hoelzro: that will work without needing ghc6.6.1 ?
18:44 lambdabot http://tinyurl.com/3auyf3
18:44 xinming MU9214: BTW, you can try that first really.
18:44 MU9214 oh wait..
18:44 MU9214 \lol
18:45 xinming MU9214: But also prepared for some time to wait for the compiling process on your machine.
18:45 MU9214 will the machine still be unusable like you were saying?
18:46 MU9214 (although as long as still apache works, i'm fine)
18:46 TimToady it'll be unusable while you're compiling Parser.hs  :)
18:46 xinming MU9214: on my 2500+ (1G ram) machine, It might take an hour to compile pugs.
18:46 MU9214 xinming: does it slow the machine down a lot after it's compiled? or is it just the comiling I'm worried about?
18:47 xinming MU9214: the problem is that your ram is too small, and then, Linux system will doing swap heavily.
18:47 MU9214 compiling*
18:47 TimToady it's quite likely to thrash while compiling some of the larger .hs files
18:47 xinming MU9214: when It's compiling, It will slow down, after It's finished. It's all ok.
18:48 xinming MU9214: BTW, I think you can consider It's a stress test for your desktop. ;-)
18:48 MU9214 maybe I'll just stick with perl 5, and play with pugs online..    but when pugs is done, and not in development, will it be easier to install (and not take as  long?)
18:48 hoelzro MU9214: probably
18:48 hoelzro but pugs development has slowed down a lot
18:48 MU9214 k...
18:48 TimToady kb6 and parrot are moving faster at the moment
18:48 TimToady kp6 rather
18:49 TimToady my keypoarp is pyslexic
18:49 xinming TimToady: BTW, what distribtution you use? :-)
18:49 TimToady fedora
18:50 MU9214 hmm..  apt-get install pugs pugs-doc    seems to be working... I'll see.....
18:50 MU9214 (found that online)
18:50 TimToady might be pretty ancient
18:51 MU9214 6.2.13
18:51 TimToady what revision?
18:51 MU9214 doesnt say
18:51 MU9214 how do i find out?
18:51 xinming MU9214: You have to install it first
18:51 xinming and then, run pugs, It will show the revision.
18:52 MU9214 it installed (in apt-get)
18:52 xinming MU9214: try pugs
18:52 xinming pugs
18:52 MU9214 Version: 6.2.13
18:52 MU9214 Copyright 2005-2006, The Pugs Contributors
18:52 TimToady I'm not sure bare 6.2.13 shows the revision number.  If not, it's almost a year old.
18:52 xinming Oh... then, I think yes, It's pretty old.
18:53 xinming MU9214: TimToady is right. Just look at the (C). ;-)
18:53 TimToady we were about to roll a new version when audreyt got very sick
18:53 MU9214 can I upgrade it (without going through all the compile stuff? now that its installed trough apt-get)
18:53 xinming TimToady: what happened to audreyt? *_*
18:53 xinming MU9214: No, You can't, You have to compile it yourself
18:53 MU9214 I DONT WANT TO!! lolo
18:54 TimToady she got hepatitis
18:54 xinming MU9214: Then. prey and wait for *perl 6* ;-)
18:54 MU9214 can't someone update the apt-get one?
18:54 MU9214 so i can use that?
18:54 hoelzro it requires ghc-6.6.1 =P
18:55 MU9214 .......
18:55 MU9214 this sucks.
18:55 MU9214 lol
18:55 hoelzro well
18:55 TimToady you could get an account on feather and run it there
18:55 hoelzro you could submit a ghc-6.6.1 package to the ubuntu team
18:55 MU9214 hoelzro: dont know how
18:56 MU9214 just download it, and submit it to them?
18:56 hoelzro now'd be a good time to learn =D
18:56 hoelzro learn how to make a .deb
18:56 hoelzro compile ghc-6.6.1 and make a .deb from it
18:56 hoelzro and go through the proper channels with the Ubuntu team to submit it
18:56 MU9214 i dont want to compile it though. you guys said the comliling takes an hour.
18:57 rindolf joined #perl6
18:57 hoelzro you can compile while you sleep =D
18:57 xinming MU9214: But you don't need to sit at the computer while it's compiling.
18:57 MU9214 but how about the ram (you said it would be bad)
18:57 hoelzro it'll just take longer
18:58 hoelzro or, if you can access a more powerful machine
18:59 MU9214 grr how do you exit pugs?
18:59 hoelzro :q
19:01 TimToady or ^D
19:01 toshinori joined #perl6
19:11 MU9214 is this possibly 6.6.1?  libghc6-gtk-dev
19:11 MU9214 b/c I'm installing it with apt-get.
19:11 MU9214 lol
19:14 hoelzro MU9214: http://packages.ubuntu.com/gutsy/devel/ghc6
19:14 lambdabot Title: Ubuntu -- ghc6
19:15 MU9214 oh apt-get install ghc6  . then I can compile pugs.
19:15 hoelzro yup
19:15 MU9214 how long will PUGS take to compile? Another hour?
19:15 hoelzro not sure, but make sure you do "make soon"
19:16 hoelzro that'll help
19:16 MU9214 k
19:16 MU9214 keeps getting stuck on       building GHCi library /usr/lib/haskell-packages/ghc6/lib/gtk-0.9.10.5/HSgtk.o...
19:16 MU9214 on apt-get
19:16 MU9214 or is that the part the takes an hour?
19:17 hoelzro nope, just compilation
19:17 MU9214 i'm not the only one with the problem:    http://www.mail-archive.com/haskell-cafe@haskell.org/msg29440.html
19:18 lambdabot Title: Re: [Haskell-cafe] gtk library installation from ubuntu repository, http://tinyurl.com/2y255f
19:19 hoelzro MU9214: I just compiled pugs from scratch;  took me 2.5 minutes
19:19 hoelzro but that's my machine
19:20 MU9214 ...   ok, I'm gonna compile the ghc from scratch i guess too, but i hope it doesn't ruin my machine  or anything (or cause a reboot.. I'm trying to brag about my 17 day uptime lol)
19:22 MU9214 after I untar it what do I do,   ./configure   ?
19:22 TimToady I think you're just about to the point of bragging about a 17 day compile time...
19:22 MU9214 for ghc
19:22 hoelzro MU9214: just read the README
19:23 MU9214 TimToady: *sigh* your making me not want to do it again.
19:23 MU9214 whats the difference between the pugs I got through apt-get and the new one?
19:23 TimToady I used to dream that our old black-and-white TV magically turned into a color TV.  But that never happened in real life...
19:23 hoelzro the new pugs will be up-to-date
19:24 MU9214 hoelzro: but it will function the same, right?
19:24 hoelzro MU9214: better
19:24 hoelzro MU9214: we hope =D
19:24 MU9214 just to play around, it will be fine (what i have)
19:24 MU9214 right`/
19:24 MU9214 ?
19:24 hoelzro probably
19:24 MU9214 k...
19:24 Limbic_Region I used to dream that the C64 my sister abandoned might work until I got so frustrated I stabbed it repeatedly with a flat head screw driver
19:25 MU9214 for pugs, what do i use   #!/usr/bin/pugs  instead of /usr/bin/perl  ?
19:26 hoelzro sure
19:26 MU9214 why does pugs take so long to print something?
19:26 hoelzro pugs is kinda slow =(
19:26 hoelzro about 100x slower than perl 5
19:27 hoelzro optimization and speed aren't our priority right now
19:27 MU9214 will that be fixed in the off. release?
19:27 hoelzro I should think so
19:28 MU9214 pugs took 4 seconds to print 2 lines..
19:28 MU9214 sounds like I'm not missing out on much
19:28 hoelzro we're trying to flesh out the feature set before we make it fast
19:30 hoelzro plus, I don't know much about optimization...*yet*
19:33 TimToady most of that is startup time having to do with reading in the Prelude
19:33 TimToady (currently stored as yaml)
19:33 TimToady when we get the Prelude compiled straight to Haskell pugs will start much faster
19:35 TimToady of course, it starts much faster on a much faster machine as well... :)
19:37 jisom_ joined #perl6
19:43 Aankhen`` avar: Sorry, was off. :-)
19:44 Aankhen`` avar: I have an extremely basic understanding of the general structure.
19:44 Aankhen`` I don't really get the specifics though.
19:54 justatheory joined #perl6
20:02 hoelzro left #perl6
20:12 avar Aankhen``: foo
20:13 avar Aankhen``: search for "Code_say" in the old emitter and comment out the fixme stuff..
20:14 avar (defun is-kp6-code (object)
20:14 avar (typep object 'kp6-Code))
20:14 avar Aankhen``: wth?:)
20:15 avar w 6
20:16 avar Aankhen``: Where does this global say stuff come from?!
20:16 avar ;/
20:16 avar (kp6-apply-function (kp6-lookup '(kp6-lookup 'kp6-Hash_KP6 (make-instance 'kp6-Str :value "GLOBAL")
20:16 avar )
20:16 avar (make-instance 'kp6-Str :value "Code_say")
20:16 avar )
20:16 avar (mapcar #'cl->perl (list (make-instance 'kp6-Str :value "foo")
20:16 avar )))
20:17 avar Aankhen``: So... for this to work we have to have package hashes a base hash with GLOBAL in it, and Code_say as a member of that
20:19 avar (kp6-apply-function "Code_say" (mapcar #'cl->perl (list (make-instance 'kp6-Str :value "foo")
20:19 avar (make-instance 'kp6-Str :value "bar")
20:19 avar )))
20:19 avar this is the current stuff...
20:20 avar I guess we have this mostly..
20:23 Aankhen`` <avar> Aankhen``: wth?:) # clarity and convenience :-)
20:24 Aankhen`` <avar> Aankhen``: Where does this global say stuff come from?! # er, what?  Are you talking about the calls to DEFINE-KP6-FUNCTION in GLOBAL.lisp?
20:24 avar Aankhen``: So, the kp6-find-function and kp6-find-package stuff needs to be reworked to fit that workflow
20:24 Aankhen`` That workflow is messed up in its translation to Lisp…
20:24 avar i.e. "I'm looking up the global package" and then "I'm looking up the say member in that package" and then "dispatch to that"
20:24 Aankhen`` That's fine.
20:24 avar not really, just lookup, lookup and funcall
20:25 Aankhen`` The specifics are a problem.
20:25 Aankhen`` '(kp6-lookup 'kp6-Hash_KP6 (make-instance 'kp6-Str :value "GLOBAL")
20:25 Aankhen`` That makes no sense.
20:25 Aankhen`` You're trying to run KP6-LOOKUP on that value, which is a quoted call to KP6-LOOKUP with a first argument that's *almost* a class name.
20:26 Aankhen`` I'm not sure how to fix it, is all.
20:26 avar I guess that can be chanded
20:26 avar *changed
20:26 Aankhen`` I guess I'd better look at EmitLisp.pm
20:27 avar method emit_lisp {
20:27 avar '(kp6-lookup \'' ~ $.obj.emit_lisp ~ ' ' ~ $.index.emit_lisp ~ ')' ~ Main::newline()
20:27 Aankhen`` Bleh, VM is loading.  Bloody diskc checks.
20:27 avar }
20:27 Aankhen`` s/diskc/disk/
20:27 avar aa/w 8
20:27 theorbtwo joined #perl6
20:34 Aankhen`` avar: Okay, here's a problem.  I don't understand how in some places the emitter returns Perl 5 code and in others Lisp code.
20:34 Aankhen`` In the same method, at that.
20:34 avar (kp6-apply-function kp6-GLOBAL::kp6-Code_say (mapcar #'cl->perl (list (make-instance 'kp6-Str :value "foo")
20:35 Aankhen`` I thought we weren't going to use CL namespaces?
20:35 avar That's what I get if I just C<return $node> from Namespace.pm
20:35 Aankhen`` Ah.
20:35 avar Well they always map to a native hash
20:35 avar So it can just be a HoH
20:36 Aankhen`` What can be an HoH?
20:36 avar obj => ::Var(
20:36 avar namespace => [],
20:36 avar name      => 'KP6',
20:36 avar we can implement namespaces as a lisp hash of hashes
20:36 Aankhen`` Yes, that's pretty much what I have already.
20:37 Aankhen`` I was asking because of this: kp6-GLOBAL::kp6-Code_say
20:37 avar yes, it's just the specifics that have to me changed
20:37 Aankhen`` Okay.
20:37 Aankhen`` Do you have enough KP6-fu to change them?
20:37 avar return ::Lookup(
20:37 avar obj => ::Lookup(
20:37 avar obj => ::Var(
20:37 avar namespace => [],
20:37 avar name      => 'KP6',
20:37 dduncan joined #perl6
20:37 avar twigil    => '',
20:37 avar sigil     => '%',
20:37 avar ),
20:37 avar index => ::Val::Buf( buf => ($node.namespace).join('::'), ),
20:37 avar ),
20:37 avar index => ::Val::Buf( buf => ($table{$node.sigil} ~ $node.name), ),
20:37 avar );
20:37 avar This is the AST currently being made for the troublesome stuff
20:37 Aankhen`` I see.
20:38 avar i.e.:
20:38 avar (kp6-lookup (kp6-lookup kp6-Hash_KP6 (make-instance 'kp6-Str :value "GLOBAL")
20:38 avar )
20:38 avar (make-instance 'kp6-Str :value "Code_say")
20:38 Aankhen`` Right.
20:38 Aankhen`` I'll get at it.
20:38 Aankhen`` Wait, is a Lookup only a namespace lookup or a generic hash lookup?
20:39 avar It's a namespace lookup
20:39 Aankhen`` Okay.
20:39 avar at least the node is only made in Namespace.pm
20:41 Aankhen`` Where does $.obj in the emit_lisp method for Lookup come from?
20:41 Aankhen`` Rather, I know that it's a class attribute, but what object is it?
20:42 avar I don't know
20:43 avar Isn't $.foo what you need C<has $.foo> for?
20:43 Aankhen`` Yup.
20:43 avar elsif ( $lisp ) {
20:43 avar push @visitor_sequence, qw( Global Namespace EmitLisp )
20:43 avar unless @visitor_sequence && $visitor_sequence[-1] eq 'EmitLisp';
20:43 avar }
20:44 avar We could of course also just change the AST:)
20:44 avar but I think doing it this way would be good For The Future (TM)
20:44 Aankhen`` Sorry man, you've lost me. :-(
20:45 avar nm
20:45 avar $.obj comes from the ::Lookup call, see above
20:45 Aankhen`` Hmm.
20:45 Aankhen`` Ah, ::Var.
20:46 avar So to emit 'kp6-Hash_KP6 (quote in front) we'd have to check if $.obj is a Var or Lookup
20:47 avar I was trying to figure out how to do that yesterday which resulted in TimToady going off on a tangent:)
20:48 Aankhen`` We don't want 'kp6-Hash_KP6 to be emitted, do we?
20:49 avar We want something which is the global root hash to be emitted
20:49 avar whatever that is
20:50 Aankhen`` svn up, run echo 'say [ 1, 2 ]' | perl kp6-mp6-perl5.pl --lisp > t.out
20:50 Aankhen`` And see what happens when you LOAD t.out.
20:50 avar We can hack it in class Var until fglocks shows us a better way to do it,
20:51 MU9214 left #perl6
20:52 avar EVAL: undefined function KP6-FIND-PACKAGE ?
20:52 avar needs to be in the export list, is that what you wanted to show me?:)
20:53 Aankhen`` That's weird, it worked here.
20:53 Aankhen`` You have local changes?
20:53 PerlJam joined #perl6
20:54 avar --- lib/KindaPerl6/Runtime/Lisp/defpackage.lisp (revision 65167)
20:54 avar +++ lib/KindaPerl6/Runtime/Lisp/defpackage.lisp (local)
20:54 avar @@ -24,4 +24,6 @@
20:54 avar ; foreign.lisp
20:54 avar #:cl->perl
20:54 avar +
20:54 avar +   #:kp6-find-package
20:54 avar ))
20:54 avar it just needs that
20:54 avar maybe your implementation is more slutty about that?
20:54 avar Anyway, now I get *** - EVAL: variable KP6-HASH_KP6 has no value
20:55 avar which is of course easily fixed
20:56 PerlJam I haven't kept up with kp6.  What's the lisp for?  Is that just a backend?
20:56 avar Yes
20:57 PerlJam ah, cool.
20:57 avar We already have hello world compiling to machine code via sbcl:)
20:57 Aankhen`` avar: I have no idea why the output is so different for you. :-S Pastebin t.out?
20:57 avar http://sial.org/pbot/27656
20:57 lambdabot Title: Paste #27656 from Someone at 208.78.101.240
20:58 Aankhen`` t.out, not the output of LOADing it.
20:58 avar http://sial.org/pbot/27657
20:58 lambdabot Title: Paste #27657 from Someone at 208.78.101.240
20:58 pasteling "Aankhen" at 122.163.34.13 pasted "t.out" (12 lines, 437B) at http://sial.org/pbot/27658
20:58 Aankhen`` There's mine for comparison.
20:59 avar oh
20:59 Aankhen`` Okay, you cannot have the same code as mine.
20:59 Aankhen`` Did it merge changes?
20:59 avar yes crap
20:59 Aankhen`` Heh.
20:59 avar # XXX: FIXME: ARGH: The AST or the Lisp runtime (probably the
20:59 avar # latter) needs to be fixed up. This is a shameless hack to
20:59 avar # make C<say "hello world"> work.
20:59 avar #my $op := '"Code_say"';
20:59 avar my $op := $.code.emit_lisp;
20:59 avar your class Apply should look like this
20:59 avar I commited the evil hack so hello world would work
21:00 Aankhen`` Ah, yes.
21:00 * Aankhen`` hax.
21:02 Aankhen`` Okay, my output just got messed up.  Hrm.
21:04 MU9214 joined #perl6
21:05 Aankhen`` It does a double lookup for some reason.
21:05 Aankhen`` And with the wrong stuff.
21:05 avar you mean in GLOBAL and Code_Say?
21:05 Aankhen`` (kp6-find-package (kp6-find-package kp6-Hash_KP6 (make-instance 'kp6-Str :value "GLOBAL")
21:06 avar followed by (make-instance 'kp6-Str "Code_say") ....
21:06 Aankhen`` Yeah.
21:06 avar it's looking up the GLOBAL hash and then the Code_say object in that
21:06 Aankhen`` Ohh, right.
21:07 Aankhen`` Let's see, hrm.
21:07 avar $kp6_hash_KP6->{GLOBAL}->{Code_say}->("hello world")
21:07 Aankhen`` How would I tell whether $.obj is looking up a function or a package?
21:07 Aankhen`` No, that doesn't make sense.  Let me think about it a bit.
21:08 avar It's either looking up a variable (kp6-Hash_KP6) or a hash element
21:08 avar which can be GLOBAL or Code_say in this case
21:09 avar And I can change the variable part to be a function call or whatever by changing Namespace.pm
21:09 Aankhen`` Wait, KP6 is handling the namespace-as-hash thing?
21:10 avar Yes, that's what the Namespace.pm visitor does
21:10 avar It basically explodes Foo::Bar::Zar into $global->{FOO}{BAR}{ZAR}
21:10 Aankhen`` Ahh.
21:11 avar This is basically implementing Perl 6 globs, whatever those are called now
21:12 Aankhen`` The ::Lookup isn't being passed a proper ::Index object for some reason.
21:13 avar index => ::Val::Buf( buf => ($node.namespace).join('::'), ),
21:14 Aankhen`` Goddangit, gimme a proper ::Index.
21:14 Aankhen`` :-P
21:18 avar I need an obj and index argument for that, currently it's only being passed a string
21:18 avar what do you actually need?
21:19 Aankhen`` "Code_say" instead of (make-instance 'kp6-Str :value "Code_say"), and same for "GLOBAL".
21:20 avar Why not just (kp6-value) on it in a generic function that does perl->cl ?
21:21 Blwood joined #perl6
21:21 Aankhen`` I guess.  Just seems stupid to say (kp6-value (make-instance ... :value "foo")) to get "foo".
21:22 avar I guess
21:23 avar But I think it's better for now to make these wasteful objects everywhere in the name of simplicity
21:23 avar A lot of this can be optimized later
21:23 avar But we can do it if you want, just have to implement a new visitor instead of Val::Buf
21:24 Aankhen`` S'okay, simplicity is good.
21:25 Aankhen`` I followed my train of thought about ::Index and realized it ended at a non-existent station.
21:26 avar package Lookup;
21:26 avar sub new { shift; bless { @_ }, "Lookup" }
21:26 avar sub emit_lisp { my $self = shift; my $List__ = \@_; do { [] }; ('(kp6-find-package ' . ($self->{obj}->emit_lisp()
21:26 avar that's how the $.whatever are implemented FYI:)
21:28 BinGOs joined #perl6
21:31 Aankhen`` Right, time for sleep.  I'll catch you tomorrow.
21:31 avar oh noes
21:43 MU9214 eval: print "test"
21:43 buubot MU9214:  test1
21:43 MU9214 test1  ?
21:43 MU9214 ok, buubot sucks.. lol
22:06 IllvilJa joined #perl6
22:24 dduncan ?eval my $x = 3; say $x.WHERE;
22:24 dduncan eval: my $x = 3; say $x.WHERE;
22:24 buubot dduncan:  ''ERROR: 32646: Can't call method "say" without a package or object reference at (eval 213) line 1.
22:25 dduncan anyway, it seems that .WHERE isn't implemented by Pugs yet
22:25 dduncan what's the best currently working Pugs analogy for Perl 5's refaddr()?
22:26 dduncan or alternately I should ask the real problem ...
22:26 dduncan I have a parent object which has child objects, each having refs to the other
22:27 dduncan I would like the parent's ref to children to be weak, so if external holdings of the child go away, so does the child, and then the object would be auto-removed from the parent's list of children
22:27 dduncan I was currently trying to have a Perl-5 like Hash of key=obj-address, val=obj, and then the child's DESTROY would delete that item
22:27 dduncan for itself
22:29 dduncan generally speaking, what is the elegant Perl 6 solution for a weak-referenced collection of objects that auto-removes dead wood?
22:30 dduncan for reference, see the checked-in ext/Muldis-DB/lib/Muldis/DB/Engine/Example.pm ... and the ::DBMS and ::Var classes
22:30 dduncan I've already coded something Perl-5 like that should illustrate the behaviour I want
22:44 hoelzro joined #perl6
22:58 vel joined #perl6
23:00 * dduncan back later
23:27 hoelzro left #perl6
23:43 BinGOs joined #perl6

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

Perl 6 | Reference Documentation | Rakudo