Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-09-27

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

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

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

Perl 6 | Reference Documentation | Rakudo