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