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 Greenn left 00:05 theorbtwo joined 00:17 theorb left 00:30 weinig left 00:36 rhizo left
obra seen fglock 00:37
buubot obra: Sorry, I haven't seen fglock
avar obra: anything we can help with? 00:44
00:48 rhizo joined 00:49 nipotaway is now known as nipotan 00:51 REPLeffect_ left 01:04 lyokato joined, audreyt_ joined 01:05 torz joined 01:06 torz left 01:21 laye joined, audreyt left 01:30 ahmadz joined 01:33 daxim_ joined 01:36 autin joined 01:38 weinig joined, autin left 01:39 weinig left, vbattsAtWork joined 01:40 weinig joined 01:47 daxim left 02:20 fax joined 02:26 lyokato left 02:41 amnesiac joined 02:52 lyokato joined
obra avar: just curious how things are going 03:33
avar obra: me and aankhen started a common lisp backend for it, progressing nicely 03:35
and it's the fastest perl 6 by far:)
produces stand-alone executables of perl 6 programs
other than that people are working on running STD and bootstrapping 03:36
obra how much of the pugs suite can the cl backend run? ;) 03:37
(that's very cool)
avar almost nothing
we're still catching up with the rest of kp6
sial.org/pbot/27744 03:38
lambdabot Title: Paste #27744 from Someone at 208.78.101.240
avar that's all for now
obra *nodnod*
avar would be more but a bunch of stuff broke
obra (how much of it does kp6 un?)
run
avar 109 tests 03:39
obra nod 03:41
most important: are you guys having fun?
avar sure
obra excellent 03:42
avar Also another thing I've been working on is packing up kp6, it already has a makefile.pl but no install support
obra Is there anything that can help you guys get more done faster?
avar once that's working and $someone writes a decent interface to it it can be packed up and shipped on cpan 03:43
more people hacking:)
obra *nod* 03:44
can you guys blog things that need doing to the pugs blog?
avar I don't know how to post there
but yeah
obra hm. anyone else here able to blog there? 03:45
obra isn't a pugs.blogs.com admin, but I'll ping audrey
failing that, your use.perl blog is a reasonable next-best place
avar yeah I've been using that 03:46
03:46 BinGOs_ joined
avar did you see my post about kp6? 03:46
obra Yes :) 03:47
ok. pinged audrey
03:49 BinGOs left
avar getting this on cpan with a decent interface and some docs is reasonably high priority for me at least, something easily installed and easily hackable by perl people would appeal more than the pugs/parrot stuff for most people 03:52
currently nobody knows about kp6:)
obra yeah. 03:54
it's also worth talking to p5p about things for 5.11 that could make kp6 better
That will help raise its profile
is there a tasklist for making kp6 cpannable? 03:55
avar I have one in my head
There's really nothing I can think of that perl can do better 03:59
common lisp is already a lot faster as a backend, so compiling that to C and packing it up in an XS module would be a lot faster than some incremental pampering blead might give us in some cases 04:00
and the stuff it's emitting is at a higher level ..
04:05 BinGOs joined, BinGOs_ left 04:06 Alias_ joined 04:10 BinGOs_ joined 04:14 BinGOs left
obra nod 04:16
04:24 Alias_ left
amnesiac omg it's avar 04:28
avar omg it's amnesiac 04:31
04:45 Jamtech joined 04:49 lyokato left 04:50 laye left 04:51 vbattsAtWork left, drupek12 left 04:59 c9s joined 05:01 Jamtech left, Jamtech joined 05:14 theorbtwo left 05:26 lyokato joined 05:34 IllvilJ1 joined 05:35 IllvilJa left 05:42 c9s left 05:59 BinGOs_ is now known as BinGOs 06:12 ahmadz left 06:15 bloonix joined 06:25 mncharity left 06:44 amnesiac left 06:47 jrockway_ joined 06:49 theorbtwo joined 06:51 Aankhen`` joined 06:52 devogon joined 06:58 jrockway left 07:00 elmex joined, audreyt_ is now known as audreyt 07:05 _chris_holden_ left 07:14 fax left 07:17 drrho joined 07:22 drrho left 07:30 zamolxes_ joined 07:31 zamolxes left 07:32 jisom joined 07:33 drrho joined 07:41 drrho left, drrho joined 07:42 drrho left 07:47 drrho joined 07:48 iblechbot joined 07:54 franck___ joined 07:56 Southen joined 07:59 masak joined
masak det finns <nowiki>, det funkar ibland 08:01
oops, wrong channel
Aankhen`` masak: Now you must pay the ultimate price. 08:02
masak Aankhen``: d'oh! 08:03
Aankhen`` Eh, win some, lose some.
Although once you pay the ultimate price you won't be winning *any*. :-D
08:31 Aankhen`` left 08:37 audreyt left, masak left 08:46 Daveman left 08:48 Daveman joined 08:57 ahmadz joined
ahmadz hi 08:57
@seen fglock
lambdabot I saw fglock leaving #perl6 18h 16m 46s ago, and .
ahmadz @seen fglock_
lambdabot I saw fglock_ leaving #perl6 14h 53m 50s ago, and .
08:57 ahmadz left 09:09 audreyt joined 09:11 hkb_aw is now known as hakobe 09:21 masak joined 09:32 fglock joined 09:38 Dopoint joined, snearch joined 09:40 rfordinal_ joined 09:44 ruoso joined 09:45 Dopoint left
fglock ahmadz: pong 09:52
lambdabot fglock: You have 1 new message. '/msg lambdabot @messages' to read it.
09:56 chris2 joined 09:57 rfordinal left 09:58 drbean left 09:59 lisppaste3 left 10:03 ruoso left 10:04 ruoso joined 10:09 lisppaste3 joined 10:20 falesca joined, drupek12 joined 10:26 rfordinal_ is now known as rfordinal 10:31 chris2 left
pugs_svnbot r18196 | fglock++ | [kp6] moving away unused visitors 10:45
diff: dev.pugscode.org/changeset/18196
lambdabot Title: Changeset 18196 - Pugs - Trac
10:48 fridim joined
pugs_svnbot r18197 | fglock++ | [kp6] moving away unused visitors 10:51
diff: dev.pugscode.org/changeset/18197
lambdabot Title: Changeset 18197 - Pugs - Trac
11:00 fridim left 11:02 lumi joined, c403876 joined 11:03 c403876 is now known as fridim
pugs_svnbot r18198 | fglock++ | [kp6] added Runtime/Perl6/Closure.pm 11:09
diff: dev.pugscode.org/changeset/18198
lambdabot Title: Changeset 18198 - Pugs - Trac
11:10 drrho left 11:17 nipotan is now known as nipotaway
pugs_svnbot r18199 | fglock++ | [kp6] Array.uniq is ordered 11:27
diff: dev.pugscode.org/changeset/18199
lambdabot Title: Changeset 18199 - Pugs - Trac
theorbtwo @tell TimToady Happy Birthday! 11:31
lambdabot Consider it noted.
masak oh! 11:35
@tell TimToady Happy Birthday! 11:36
lambdabot Consider it noted.
masak @thx bai
lambdabot you are welcome
11:39 fax joined 11:45 gaal joined 11:49 lyokato left 11:56 fridim left
pugs_svnbot r18200 | fglock++ | [kp6] Array has less Perl 5 code 11:56
diff: dev.pugscode.org/changeset/18200
lambdabot Title: Changeset 18200 - Pugs - Trac
12:10 masak left 12:12 masak joined 12:40 lichtkind_ joined 12:51 masak left 12:57 lichtkind left 13:01 chris2 joined
pugs_svnbot r18201 | fglock++ | [kp6] Prelude syntax cleanup 13:02
diff: dev.pugscode.org/changeset/18201
lambdabot Title: Changeset 18201 - Pugs - Trac
13:03 snearch left 13:06 riffraff joined 13:08 sahadev joined 13:09 jhorwitz joined 13:14 riffraff left 13:15 cmarcelo joined 13:18 c9s joined 13:24 Aankhen`` joined 13:36 arguile joined
pugs_svnbot r18202 | Aankhen++ | * [kp6-lisp] added KP6-NOT-IMPLEMENTED condition class. 13:42
diff: dev.pugscode.org/changeset/18202
lambdabot Title: Changeset 18202 - Pugs - Trac
pugs_svnbot r18203 | Aankhen++ | * [kp6-lisp] added KP6-THUNK class. 13:45
r18204 | Aankhen++ | * [kp6-lisp] added condition classes to export list.
diff: dev.pugscode.org/changeset/18204
lambdabot Title: Changeset 18204 - Pugs - Trac
avar Aankhen``: you broke stuff
13:45 daxim_ left
avar :) 13:46
Aankhen`` avar: Where?
When, rather? 13:47
avar t/01*/03-*.t 13:48
yesterday
Aankhen`` Ah, yes, I believe the commit mentioned that lots of things were b0rked.
avar (num) doesn't work for one 13:49
echo '"0" == "0"' | perl kp6-mp6-perl5.pl --lisp | sbcl
urgh 13:50
Aankhen`` I removed (num).
Oh.
I'll get to that in a sec, but did you get my message about why && and || don't work as expected? 13:51
avar both are evaluated?
Aankhen`` Yes.
avar why is that?
lisp runtime bug? 13:52
Aankhen`` Eager evaluation in Lisp.
It's basically saying (call-&& term1 term2)
Thereby evaluating term1 and term2 before calling &&.
avar wrap that stuff in a lambda? 13:53
13:53 arguile_ joined
Aankhen`` avar: Yes, but where do we decide what goes in a lambda and what's normal? 13:54
s/'s normal/ doesn't/
pugs_svnbot r18205 | Aankhen++ | * [kp6-lisp] fixed a couple of bugs in the KP6-NOT-IMPLEMENTED report.
diff: dev.pugscode.org/changeset/18205
lambdabot Title: Changeset 18205 - Pugs - Trac
Aankhen`` Should all arguments to KP6-APPLY-FUNCTION be wrapped in thunks?
avar There is no applicable method for the generic function 13:56
#<STANDARD-GENERIC-FUNCTION KP6-CL::KP6-COERCE (7)>
when called with arguments
(0 KP6-NUM).
on t/kp6/04-add.t
Aankhen`` Indeed.
You're supposed to call it with a KP6-NUM.
avar I couldn't track down where that call came from
Aankhen`` What was the code you used?
13:57 pmurias joined
pmurias hi 13:57
Aankhen`` Hi pmurias.
pmurias: Does it make sense to wrap all function arguments in thunks?
pmurias i don't think so
avar Aankhen``: t/kp6/04-add.t
Aankhen`` So how are && and || implemented in Perl 6?
pmurias &&,|| should be implemented as macros
Aankhen`` Ah. 13:58
avar same with ?? !!
pmurias yes
i think the general rule is list context is lazy, scalar eager
Aankhen`` That's what I thought, but I couldn't figure out how to do && and ||. 13:59
avar can I do my $res = if 1 { "foo" }; to get "foo" ?
Aankhen`` And I have no idea how to implement P6 macros.
I guess we could just special-case ?? !!, || and && for now, like the Perl 5 emitter does.
avar how? 14:00
turn "foo" && "bar" into sub { "foo" } && sub { "bar" } in the ast? 14:01
Aankhen`` I'm not really sure. 14:03
14:03 arguile left
avar could also wrap all arguments in lambdas ..:) 14:04
but that's eeevil
pmurias avar: isn't there an if in lisp? 14:05
avar yes 14:06
Aankhen``: use if?
Aankhen`` swats avar. 14:08
avar ?!
lambdabot Maybe you meant: . v
14:12 c403876 joined
pmurias Aankhen``: it shouldn't be too hard to implement macros 14:12
14:13 c403876 is now known as fridim
pmurias a visitor would have to check if a function call coresponds to a macro declared in that lexical scope and replace it by AST returned from the invocation of that macro 14:13
14:15 c9s left
pugs_svnbot r18206 | Aankhen++ | * [kp6-lisp] fixed PERL->CL for KP6-BIT. 14:18
diff: dev.pugscode.org/changeset/18206
lambdabot Title: Changeset 18206 - Pugs - Trac
14:18 Jamtech left 14:26 daxim joined
Aankhen`` pmurias: Wouldn't that require more P6-on-P6, in order to set up the environment correctly and all that? 14:29
I mean, you'd basically have to be able to execute the macro, which could be any arbitrary Perl 6 code. 14:31
Actually, I don't know.
avar Aankhen``: what does the last commit fix? 14:36
Aankhen`` avar: The argument is not a number thing.
avar echo '"1" == "1"' | perl kp6-mp6-perl5.pl --lisp | sbcl still broken 14:37
Aankhen`` "broken"? 14:38
avar debugger invoked on a TYPE-ERROR in thread #<THREAD "initial thread" {A6B97F1}>: 14:40
The value #<KP6-STR {A7E8751}> is not of type STRING.
hrm
(PARSE-INTEGER #<KP6-STR {A7E8751}>)
Aankhen`` My bad. 14:41
14:42 Blwood left
Aankhen`` avar: Update. 14:42
pugs_svnbot r18207 | Aankhen++ | [kp6-lisp] 14:43
r18207 | Aankhen++ | * added KP6-TRUE to export list.
r18207 | Aankhen++ | * fixed some KP6-COERCE methods.
diff: dev.pugscode.org/changeset/18207
lambdabot Title: Changeset 18207 - Pugs - Trac
pmurias Aankhen``: i think it is feasible right now
avar s/kp6-value/perl->cl/ ?
pmurias it's comparable to code in BEGIN blocks
Aankhen`` avar: Where, and why? 14:44
avar (parse-integer (perl->cl)) instead of (kp6-value)
Aankhen`` pmurias: True.
avar or will that not work?
Aankhen`` avar: I already know I've got a KP6-STR, which is why I'm using KP6-VALUE directlyā€¦ but I suppose it might be a good idea to futureproof it. 14:45
avar yeah:) 14:46
Aankhen`` svn up, BTW.
pugs_svnbot r18208 | Aankhen++ | * [kp6-lisp] use more PERL->CL in coerce.lisp
diff: dev.pugscode.org/changeset/18208
lambdabot Title: Changeset 18208 - Pugs - Trac
Aankhen`` Okay, I don't understand why KP6 chokes on this: @arguments[0].emit_lisp($intepreter) 14:47
No array indexing?
14:47 arguile_ left
avar use parens, it's a parser bug 14:48
(@arguments[0]).emit_lisp
(i think)
Aankhen`` Oh, okay.
14:49 riffraff joined 14:50 arguile_ joined 14:51 rfordinal_ joined
avar Aankhen``: that work? 14:51
14:51 hakobe is now known as hkb_zz
Aankhen`` avar: Yes, thanks a lot. I spent the last 10 minutes trying different variations, but didn't think of the parens. 14:52
14:52 Blwood joined
avar my $tmp = @arguments[0]; $tmp.emit_lisp() would work too:) 14:52
Aankhen`` Man, the debugging cycle for the emitter is slooooooooooooow. 14:53
avar true
Aankhen`` Would be nice to be able to use the CL backend, wouldn't it? <G>
GAH 14:55
One typo = three minutes of recompilation. :-(
avar I have a dual opteron, it helps 14:56
doing make kp6_mp6 ?
Aankhen`` Just `make`.
avar do kp6_mp6
Aankhen`` Okay. 14:57
FINALLY 14:58
avar: svn up.
There's no implementation of the Perl 6 metamodel in Perl 6? 15:00
pmurias Aankhen``: recompiling just EmitLisp shouldn't take that long
pugs_svnbot r18209 | Aankhen++ | * [kp6-lisp] pruned some unused code and added short-circuiting for infix:<&&>, infix:<||> and ternary:<?? !!>.
diff: dev.pugscode.org/changeset/18209
lambdabot Title: Changeset 18209 - Pugs - Trac
pmurias Aankhen``: i don't think so
Aankhen`` pmurias: I agree, it definitely shouldn't. 15:01
Ah.
15:02 barney joined
avar 03-equal.t passes all tests:) 15:02
Aankhen``++
Aankhen`` ^_^
avar is (and) a special form? 15:03
Aankhen`` Yes.
AND, OR and IF are all special forms.
avar I thought and/or might be macros:) 15:05
fax and and or are macros 15:06
Aankhen`` Oh, sorry, I got confused.
(I do that a lot, naturally.)
avar hi fax:)
fax hey :D
Aankhen`` fax: Also, what brings you here? :-)
fax avar did :p
avar I spammed him in #lisp 15:07
Aankhen`` snickers.
fax I've been reading everything about Perl 6
Aankhen`` fax: Have you seen KP6-CL, perchance?
fax *so cool*
I looked at it yeah
15:07 rfordinal left
Aankhen`` OK. 15:08
15:08 Azure-BOT is now known as jBoofy
avar MAIN> (macroexpand-1 '(and 1 2 3)) 15:08
(IF 1 (AND 2 3) NIL)
T
MAIN> (macroexpand-1 '(or 1 2 3))
(LET ((#:G2473 1))
(IF #:G2473 #:G2473 (OR 2 3)))
:)
fax: It's basically an implementation of m-expressions:) 15:09
Aankhen`` Yessir.
Er, quite far from that.
Er, nevermin.
15:09 mncharity joined
Aankhen`` Nevermind, even. 15:09
avar I wish everything was an expression in it though 15:10
Aankhen`` nods.
avar sub { '{' ~ if @_[0] { "foo" } ~ '}' }
15:14 rfordinal_ left, rfordinal_ joined
avar getting 'my %a; %a{"key"} = 1; say %a{"key"}' and 'my @a; @a[0] = 1; say @a[0]' working would make a lot more stuff pass 15:14
someone give fax a commit bit:)
Aankhen`` `my %a` probably works already. 15:17
avar yes it's the kp6-index and those it fails on.. 15:18
Aankhen`` I don't see KP6-INDEX in there anywhere. 15:19
avar I mean for the array
Aankhen`` Ah. 15:20
Tene fax: want a commit bit?
avar MAIN> (with-kp6-interpreter (|Main|) 15:21
(with-kp6-package (|Main| "GLOBAL")
(kp6-define-package-variable |Main| (kp6-generate-variable "@" "a"))
(setf (kp6-lookup (kp6-lookup (kp6-packages |Main|) "GLOBAL") (kp6-generate-variable "@" "a"))
(make-instance 'kp6-Array :value (list
(make-instance 'kp6-Str :value "foo")
(make-instance 'kp6-Str :value "foo"))))
(kp6-value (kp6-lookup (kp6-lookup (kp6-packages |Main|) "GLOBAL") (kp6-generate-variable "@" "a")))
))
(#<KP6-STR {B1A9139}> #<KP6-STR {B1A9159}>)
just needs kp6-index it semes:)
*seems
fax I would like to help.. I don't know what code to look at though
Aankhen`` Oh, I think I can get the %a thing working.
[particle] tene: can you hand bits out? if not, i can
Tene fax: if you give me a username and email address I can give you commit access 15:22
[particle] yay
fax I know a bit of lisp so maybe I can help with that part
avar yay
svn co svn.pugscode.org/pugs/v6
lambdabot Title: Revision 18209: /v6
avar v6 is enough for the stuff we're working on
but you probably want /pugs 15:23
fax I've got the whole /pugs stuff from svn
Tene fax: invite sent. check your email. 15:24
fax thank you
[particle] the invite system has been slow, it may take a few minutes. however, i wonder if the new feather will speed that up 15:25
Aankhen`` avar: my %a; %a{"key"} = 1; say %a{"key"} # works now.
[particle] (feather is a shared perl dev box)
pugs_svnbot r18210 | Aankhen++ | * [kp6-lisp] proper handling of hashes.
diff: dev.pugscode.org/changeset/18210
lambdabot Title: Changeset 18210 - Pugs - Trac
fax That has worked already 15:26
[particle] fax: traditionally, new committers add their name to AUTHORS to test their commit bit
fax seems to have worked! 15:28
pugs_svnbot r18211 | fax++ | Added to AUTHORS 15:31
diff: dev.pugscode.org/changeset/18211
lambdabot Title: Changeset 18211 - Pugs - Trac
15:35 weinig left
avar Aankhen``: got the equivalent array operation "working" 15:36
sial.org/pbot/27752 15:37
lambdabot Title: Paste #27752 from Someone at 208.78.101.240
avar Just copied the hash storage :)
but is there any need for the "Index" AST node, can't it all be lookup?
that works here in any case 15:38
I don't see why all containers can't use the same interface and just croak if they don't like the key
fax: Want an easy first task?:) 15:39
fax Yes :D
avar whee
wait a sec:)
fax I'm just reading some of the docs atm
pmurias how should i compile the .xs file? 15:40
the code xsubpp spits out 15:41
avar pmurias: sial.org/pbot/27753
lambdabot Title: Paste #27753 from Someone at 208.78.101.240
avar grep for "XS"
15:42 vbattsAtWork joined
avar that's the easy way 15:42
Aankhen`` avar: Um. Yeah. Funny how you should mention using the same interface and all that. 15:43
pugs_svnbot r18212 | Aankhen++ | [kp6-lisp]
r18212 | Aankhen++ | * moved KP6-STORE, KP6-LOOKUP and (SETF KP6-LOOKUP) into Container.lisp
r18212 | Aankhen++ | * defined container ops for KP6-ARRAY objects.
r18212 | Aankhen++ | * changed EmitLisp.pm to use KP6-LOOKUP for ::Index nodes, thereby making array access work.
diff: dev.pugscode.org/changeset/18212
lambdabot Title: Changeset 18212 - Pugs - Trac
pmurias avar: with Inline::C? ;)
avar Aankhen``: You made @a[0] = 1 work just now? 15:44
Aankhen`` :-P
15:44 kanru joined
avar pmurias: Yes, you can also spit out an .xs file and have makemaker compile it 15:44
Aankhen`` avar: I started working on it right after making %a{"foo"} work.
avar then I can't make fax fix up my crappy implementation dude:)
:)
Aankhen`` Heh, sorry. 15:45
He can fix mine instead!
He can fix all of KP6-CL!
avar :)
we're passing more tests 15:46
Aankhen`` Kewl.
pmurias avar: i don't think there's any need for an Index ast
avar yah
pmurias node
avar Just have to make it croak if you do @foo["bar"] 15:47
pmurias it and Lookup can be replaced by Call
there is a difference between $match{'1'} and $match[1]
they can't be both Lookup
avar why not? 15:48
urgh
are those even possible in p6?
I thought the lookup type was always implied by the container
pmurias maybe not with $match but with $foo
avar %match<1> and @match[0] 15:49
pmurias $match[0] is also possible 15:50
and so is $match{'1'}
avar echo 'my $c = 0; $c = $c + 1' | perl kp6-mp6-perl5.pl --lisp | sbcl 15:51
I thought that was working..
Aankhen`` pmurias: $match{'1'} and $match[1] both refer to $match, don't they? 15:52
15:53 REPLeffect_ joined
pugs_svnbot r18213 | Aankhen++ | * [kp6-lisp] added KP6-BAD-INDEX condition class. 15:53
diff: dev.pugscode.org/changeset/18213
lambdabot Title: Changeset 18213 - Pugs - Trac
pmurias Aankhen``: yes 15:54
pugs_svnbot r18214 | Aankhen++ | * [kp6-lisp] added checks for array indexes.
diff: dev.pugscode.org/changeset/18214
lambdabot Title: Changeset 18214 - Pugs - Trac
Aankhen`` pmurias: So what's wrong with using ::Lookup for both, and dying horribly if it's the wrong type of index?
avar Aankhen``: because you have to disambiguate them
Aankhen`` Whysir? 15:55
avar doable, you'd need an ast node to indicate the sort of lookup
$x<0> v.s. $x[0]
fglock backloooogging
avar which would be equivalent to just having lookup/index I guess
Aankhen`` All it needs to do is do a lookup on $x with the given index, and the lookup function will dispatch (assuming auto-dereferencing) according to the type of referenceā€¦ wouldn't it? 15:58
pmurias what if the reference supports both {} and [] 15:59
?
Aankhen`` Then it's a user-defined class with its own semantics for the lookup function? I dunno.
fglock considers implementing macros
pmurias replacing ::Lookup and ::Index with ::Call is a better choice the merging ::Lookup and ::Index into one 16:00
Aankhen`` Okay. 16:02
It'd be a call to .[] or .{} respectively?
pmurias yes
Aankhen`` Makes sense.
I'd love to see an example of a non-trivial Perl 6 macro and its use. I don't really understand how they will be written. 16:03
Particularly quasiquoting.
fglock Aankhen``: just return an AST object (except for quasiquoting, which is syntax sugar) 16:04
Aankhen`` Ohh.
So one could think of KP6 as a bunch of macros, perhaps?
At least the emitters. 16:05
fglock hmm - it depends how much of the backend maps to Perl 6 internals 16:06
Aankhen`` OK.
fglock if you understand AST processors as macros, yes
Aankhen`` Yeah, that was my understanding. 16:07
Though I guess it's not quite right in Perl 6.
fglock like, kp6 implements regexes using several different ways 16:08
runtime libs, Perl6-generating macros, ...
Aankhen`` Aye.
avar: What's next in the queue? 16:09
Proper lexical variables? :-)
avar $ echo 'my $c = 0; $c = $c + 1' | perl kp6-mp6-perl5.pl --lisp | sbcl
16:09 jisom_ joined
avar and generally running tests which haven't been compiled yet 16:10
lexicals, proper bindings?
fglock re replacing ::Lookup and ::Index with ::Call - i'm ok with that
16:11 weinig joined 16:14 jisom_ left, jisom_ joined
Aankhen`` Dinner! & 16:19
fglock ok - implementing macros 16:22
interesting 16:26
pugs_svnbot r18215 | fglock++ | [kp6] added 'macro' to grammar & AST
diff: dev.pugscode.org/changeset/18215
lambdabot Title: Changeset 18215 - Pugs - Trac
16:26 jisom left
fglock what if infix:<||> is syntax sugar to a macro of a different name 16:26
then infix<||> must be itself a macro 16:27
avar fglock: did you see how lisp does (and) and (or) ? 16:29
might give you hints for the implementation..
(macroexpand-1 '(and 1 2)) 16:30
(IF 1 (AND 2) NIL)
(macroexpand-1 '(or 1 2))
(LET ((#:G1747 1))
(IF #:G1747 #:G1747 (OR 2)))
this is one reason why everything being an expression rocks
:)( 16:31
fglock avar: i was thinking of (perl5ish) - do { if ... } 16:32
16:33 franck___ left, nipra is now known as `nipra 16:38 Jamtech joined
avar yeah that works, I just think do {} should be the default:) 16:39
I don't see any reason for having an artificial block/expression distinction
[particle] i prefer sub{}->() to do{}, as the former can be stored and reused, the latter is always immediately executed 16:40
fglock [particle]: it works like that internally 16:44
pugs_svnbot r18216 | fglock++ | [kp6-perl5] emits macros
diff: dev.pugscode.org/changeset/18216
lambdabot Title: Changeset 18216 - Pugs - Trac
avar the kp6 files are so much more complex than the mp6 ones 16:52
pugs_svnbot r18217 | Aankhen++ | * [kp6-lisp] fixed GLOBAL.lisp and coerce.lisp
diff: dev.pugscode.org/changeset/18217
lambdabot Title: Changeset 18217 - Pugs - Trac
Aankhen`` I was wonderingā€¦ AIUI, a pad is just a set of bindings. Is that correct, and does it follow that packages are also pads? 16:54
fglock Aankhen``: maybe - not sure about the formal definition (looking) 16:55
avar sh-3.1$ cat t/kp6/06-begin.t | perl kp6-mp6-perl5.pl --lisp
String found where operator expected at (eval 26) line 1, near "variable "$""
(Do you need to predeclare variable?)
String found where operator expected at (eval 26) line 1, near ""$" "lex""
(Missing operator before "lex"?)
a bunch of stuff is failing because of internal errors like that 16:56
Aankhen`` You're breaking my heart. :-(
17:03 jjore-w left
pmurias ls 17:03
Aankhen`` . .. illegal_downloads/
pmurias sorry, just something i type unconsciously 17:04
Aankhen`` Heh.
pmurias swimming&
Aankhen`` Have fun.
fglock Aankhen``: the usage of "pad" seems to be perl-specific, and related to lexical variables only 17:05
17:05 justatheory joined
Aankhen`` fglock: Ah. 17:05
17:05 blindfish joined
Aankhen`` fglock: Thanks, I appreciate the clarification! 17:05
TimToady a package is more or less a pad that is attached to a global name rather than a lexical scope 17:06
where "pad" more or less means hash of variables 17:07
Aankhen`` Oh, that's more like what I thought.
17:08 lichtkind_ left
TimToady but what fglock says is also true; pad is a P5 term, and there refers primarily to lexical scopes 17:09
Aankhen`` Okay.
TimToady I ain't picky about what gets called what, as long as we achieve clarity. 17:10
Aankhen`` I'm a pedant. :-)
TimToady I'm a descriptive linguist, not a prescriptive one. :) 17:12
pugs_svnbot r18218 | avar++ | * Cleanup
r18218 | avar++ | * tabs to spaces
diff: dev.pugscode.org/changeset/18218
lambdabot Title: Changeset 18218 - Pugs - Trac
TimToady or as is usally the case, a proscriptive one.
avar Aankhen` is a tab user in denial 17:13
TimToady *usually
Aankhen`` avar: Wait, was it all in the Perl code?
avar yes
no, some lisp earlier 17:14
Aankhen`` Dang.
If it's the Perl code, that's probably Emacs deciding the file needs Tabs.
If it's in the Lisp code, I dunno. I've never seen a hard Tab in my CL code. :-S
Okay, I'm going to rework WITH-KP6-PACKAGE a bit. 17:16
But first! Pads!
fglock Aankhen``: i'm working on pad desugaring - but this will take quite a while 17:18
Aankhen`` fglock: Implementing it myself for now will be a learning experience, I'm sure. ;-) 17:19
TimToady just translate the Haskell code to Lisp; should be trivial since they're both FP languages :P
Aankhen`` Har de har. :-P
TimToady that is, however, one of the spots where pugs is pretty solid, fwiw 17:20
avar TimToady: What do you think about making blocks return their last evaled value, e.g. my $res = if 1 { "foo" }; 17:21
like my $res = do { if 1 { "foo" } };
TimToady blocks do that already, but we distinguish statements from expressions 17:22
avar why? 17:23
TimToady so that we unambiguously know when "if" is a statement modifier
rather than a statement_control
also, a bare block at statement level is executed immediately, whereas elsewhere it's a lambda 17:24
we considered abandoning statements, but decided they were useful for a lot of practical reasons
avar other than grammar disambiguation?
TimToady so they're an important syntactic category in STD 17:25
grammar is all Perl is about, not counting the FP and OO bits. :)
anyway, Perl 5 programmers are trained in the statement/expression distinction, and that makes it pragmatically useful to have different syntax categories to hang macros on. 17:27
and as you folx figgered out earlier, pretty much all control structure is just macros
(counting most of STD.pm as macros, even if declared with token/rule) 17:28
17:28 barney left
TimToady it's also linguistically sound to distinguish sentences from noun phrases 17:29
17:29 ahmadz joined
ahmadz hi 17:29
TimToady lo
ahmadz ;-) 17:30
@seen fglock 17:31
lambdabot fglock is in #perl6. I last heard fglock speak 13m 3s ago.
fglock ahmadz: hi 17:32
ahmadz fglock: hi, how r u?
fglock ahmadz: fine, thanks 17:33
ahmadz fglock: i left a question on your messages, did u read it?
Aankhen`` Is there a way in Perl 6 to remove a lexical variable altogether?
fglock ahmadz: it depends on how much you can reuse from PIR internal libraries
Aankhen`` I'm guessing not, since I can't figure out how it would make sense.
fglock Aankhen``: not really - why?
Aankhen`` fglock: Just thinking about the operations that one could perform on a pad.
ahmadz fglock: but basically there is not of a runtime for EmitParrot like kp6-Perl5, kp6-lisp 17:34
avar TimToady: Therein lies my largest disagreement with your language philosophy:)
fglock Aankhen``: it all ends up garbage collected
TimToady what, linguistics?
fglock ahmadz: it depends, you may need a library for things like Match and Junction 17:36
avar TimToady: Not linguistics as such, but using general language concepts when other specifics apply in programming languages
TimToady the most important noun to associate with programming languages is not computers but people. :) 17:37
fglock ahmadz: but those can be written in Perl 6
avar TimToady: More clearly, in linguistics a sentence generally conveys an idea and doesn't have any specific "value", whereas most blocks of phrases (if, while, etc) are generally built up so that they're builting towards a single value
Note that I'm one of those people who rarely uses return at all:) 17:38
I also like this feature a lot in lisp and languages that have more primitive support for it like ruby, all sorts of good things follow when your control constructs are just special forms of expressions 17:39
TimToady your brain is FP oriented. but programs that model Real Life tend to be OO instead.
"fly the missile" is not a value
avar (macroexpand-1 '(and "foo" "bar")) => (IF "foo" (AND "bar") NIL) for example 17:40
No but the two are not mutually exclusive either, any OO structured program will have a lot of constructs where everything-as-expressions will make things easier
(let ((missile-type (if attacking-iran "stinger" "some other stuff")))) 17:41
17:41 marmic left 17:42 marmic joined
avar And grammar ambiguity issues aside the two can very gracefully coexists, blocks being expressions are a proper subset of blocks not usable in expression context as far as the programmer is concerned 17:42
17:44 fridim left
pugs_svnbot r18219 | Aankhen++ | * [kp6-lisp] added KP6-EXISTS method. 17:44
diff: dev.pugscode.org/changeset/18219
lambdabot Title: Changeset 18219 - Pugs - Trac
rhr what's the story on the :my $x; syntax that's been used in STD lately? 17:51
avar sial.org/pbot/27754 # to put it more clearly
lambdabot Title: Paste #27754 from Someone at 208.78.101.240
avar point being that just as constructs like !! ?? allow you to make more readable code without temporary variables languages with everything as an expression extend that logically to other constructs 17:52
meh:)
TimToady: Anyway, just consider it 17:53
If not I can always write Grammar::How::Avar::Likes::It
17:56 REPLeffect_ left 17:57 REPLeffect_ joined, REPLeffect_ is now known as REPLeffect 18:01 Psyche^ joined, Patterner left 18:02 Psyche^ is now known as Patterner, arrowax joined 18:20 rindolf joined 18:25 orevdiabl is now known as revdiablo
pugs_svnbot r18220 | fglock++ | [kp6] some BEGIN-time macro lookup 18:25
diff: dev.pugscode.org/changeset/18220
lambdabot Title: Changeset 18220 - Pugs - Trac
18:39 weinig left 18:40 weinig joined
pmurias b 18:41
18:43 fax left 18:44 weinig left
pugs_svnbot r18221 | Aankhen++ | * [kp6-lisp] first stab at proper lexicals. 18:49
diff: dev.pugscode.org/changeset/18221
lambdabot Title: Changeset 18221 - Pugs - Trac
fglock macros will take a while to implement - will need fixing some mp6/kp6 internal mismatches 18:51
18:51 IllvilJ1 left
fglock bye & 18:59
18:59 Blwood left 19:00 jrockway_ is now known as jrockway 19:09 weinig joined 19:11 REPLeffect left 19:12 REPLeffect joined 19:16 fglock left 19:18 dduncan joined
Aankhen`` Ugh. 19:20
Assignment is going to mess up everything.
Can't you guys just settle for looking up lexical variables without ever being able to assign for them?
s:2nd/for/to/
19:21 polettix joined
pmurias let's make perl6 a pure functional language ;) 19:25
awwaiid just pretend everything is in an IO monad or something 19:26
I mean... if you squint hard enough...
[particle] get glasses. 19:27
:P
Aankhen`` Hehe.
pmurias perltidy should also tidy up code passed to Inline::C ;) 19:31
(with GNU indent)
Tene Heh. 19:32
pugs_svnbot r18222 | Aankhen++ | * [kp6-lisp] some sanity in packages.lisp 19:34
diff: dev.pugscode.org/changeset/18222
lambdabot Title: Changeset 18222 - Pugs - Trac
19:34 jisom_ left
pmurias Aankhen``: recompiling EmitPerl5 makes me understand how it feels to recomile EmitLisp ;) 19:41
19:41 REPLeffect left
Aankhen`` pmurias: LOL. 19:43
pmurias: As it turns out, though, I wasn't using the right incantation. Instead of `make kp6_mp6` I was just saying `make`, which does a lot more. 19:44
19:45 blindfish left
Aankhen`` Woo hoo, got lexicals working properly! 19:45
pugs_svnbot r18223 | Aankhen++ | [kp6-lisp] 19:49
r18223 | Aankhen++ | * updated EmitLisp for pad-related stuff.
r18223 | Aankhen++ | * fixed assignment to lexical and package variables.
r18223 | Aankhen++ | * changed package variable definition not to take a value.
r18223 | Aankhen++ | * removed lots of extraneous commas.
r18223 | Aankhen++ | * added LEXICAL-VARIABLE-EXISTS and LEXICAL-VARIABLE-EXISTS/P, as well as SET-LEXICAL-VARIABLE/P.
r18223 | Aankhen++ | * added (currently unimplemented) DEFINE-OUR-VARIABLE.
diff: dev.pugscode.org/changeset/18223
lambdabot Title: Changeset 18223 - Pugs - Trac
19:53 sahadev left
Aankhen`` Actually, perhaps not quite right. 19:55
pugs_svnbot r18224 | Aankhen++ | * [kp6-lisp] lots of cleanup in {Pad,packages}.lisp 19:58
diff: dev.pugscode.org/changeset/18224
lambdabot Title: Changeset 18224 - Pugs - Trac
20:01 weinig left 20:02 cerridwen is now known as cerridwyn 20:03 rff_ joined 20:13 riffraff left 20:21 weinig joined 20:24 chris2 left, rindolf left 20:27 ahmadz left 20:31 mico joined 20:32 mico left, mico joined 20:33 mico left 20:43 jjore-w joined
Aankhen`` avar: Lisp backend is currently b0rked, though it might seem to work. I'll look into it tomorrow. 20:56
20:57 cmarcelo left, arrowax left 20:58 vbattsAtWork left
pmurias Inline::C-- 21:07
it should tell me why it can't bind a given function not silently not do anything 21:08
well it's Inline::Struct-- which sucks the most 21:14
Juerd [particle]: I don't know how Commitbit sends the email exactly, but CB itself has sped up incredibly since feather's upgrade.
[particle] Juerd: i had my suspicions that it would... good newl! 21:15
pmurias being buggy
[particle] *news
21:16 weinig left, weinig joined 21:23 weinig left
dduncan fyi, I have official access to Mac OS X Leopard seeds now ... does anyone else here have Leopard to test with, or would it be useful for me to start checking that newest Perls et al compile on it? 21:24
pmurias i'll the c rules <=> kp6 binding a last try tomorrow
g'night
21:24 pmurias left
avar dduncan: test if blead works on it 21:26
dduncan okay 21:27
specifically, I will try the 5.9.5 on CPAN first, since presumably that shouldn't have any failures at all 21:28
21:29 Aankhen`` left
dduncan on a tangent, can I just say 'make smoke' with Perl 5 itself as with Pugs, or do I have to install something special first? 21:29
like I have to install Perl 5 modules to smoke Pugs
or otherwise I'll just do 'make test' and grep for noks 21:30
avar make test
try rsync://ftp.linux.activestate.com/perl-current/ instead of the one on cpan
dduncan okay
21:32 weinig joined, rutlov joined 21:39 rutlov left 21:41 [particle1 joined, [particle1 left 21:53 iblechbot left 21:54 [particle1 joined 21:59 [particle] left, [particle1 is now known as [particle] 22:08 rff_ left 22:09 IllvilJa joined 22:10 thoughtpolice joined 22:54 Jamtech left 22:58 rfordinal_ left, rfordinal_ joined 23:01 drbean joined 23:03 jjore-w left 23:30 rfordinal_ left, rfordinal_ joined 23:39 jhorwitz left 23:46 dduncan left