Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-04-24

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:48 felipe joined #perl6
01:21 ujwalic joined #perl6
01:39 ting joined #perl6
01:59 Auzon joined #perl6
02:07 Zaba joined #perl6
02:52 Zaba_ joined #perl6
02:56 drfaustus joined #perl6
03:01 agentzh joined #perl6
03:54 Zaba joined #perl6
04:32 yewenbin joined #perl6
04:45 Zaba_ joined #perl6
04:53 Psyche^ joined #perl6
05:02 ransom joined #perl6
05:26 peepsalot left #perl6
06:11 simcop2387 joined #perl6
06:11 peepsalot joined #perl6
06:23 Lorn joined #perl6
07:30 Lorn joined #perl6
07:32 Aankhen`` joined #perl6
07:37 iblechbot joined #perl6
07:45 elmex joined #perl6
07:52 masak joined #perl6
07:55 Psyche^ joined #perl6
08:14 masak` joined #perl6
08:31 Zaba joined #perl6
08:39 meppl joined #perl6
08:39 IllvilJa joined #perl6
09:04 DarkWolf84 joined #perl6
09:14 Zaba_ joined #perl6
09:18 weirdo joined #perl6
09:19 weirdo hi
09:19 weirdo what is the rationale for the presence of sigils in perl6?
09:19 masak weirdo: same as in perl5 I guess
09:20 masak they form little namespaces in themselves
09:20 masak marking "scalar", "array" and "hash" because these properties are deemed worthy of marking
09:21 weirdo i found typing "push @{$foo->{bar}}" particularly tiring. don't such cases overweight the benefit of having syntactic sugar for symbol cells?
09:24 xinming weirdo: In perl 6, an [] auto deferences depending on the context, so, IMO, $foo.bar.push() is enough in perl 6. ;-)
09:25 wolverian $foo<bar>.push
09:25 xinming weirdo: every thing in perl 6 is an object, and for array and hash, they are automatically deferences.
09:26 xinming wolverian: ;-) there should be an accessor. :-D
09:26 wolverian hashes are not illegal... even in perl 6 :)
09:26 weirdo any progress on macro specification?
09:26 wolverian (but hash is!)
09:26 xinming weirdo: wolverian is right.
09:27 wolverian weirdo, the spec has some things on macros.
09:27 weirdo can an equivalent of a PROG2 lisp macro be easily defined?
09:27 wolverian http://perlcabal.org/syn/S06.html#Macros
09:27 lambdabot Title: S06
09:28 xinming weirdo: read the synopsis, and you will see the what language features after 20 years we still use. :-)
09:29 weirdo do i see correctly, the spec defined macros as text to be parsed with regexes?
09:30 wolverian macros may return strings as code or syntax trees.
09:30 weirdo can macros accept syntax trees as argument?
09:30 weirdo s/arguments
09:32 wolverian the spec seems to indicate so.
09:33 wolverian I'm  very unfamiliar with lisp macros, so I can't really say any better, sorry.
09:33 wolverian I suppose I'm equally unfamiliar with perl 6 macros. :)
09:34 wolverian but, yes, the arguments are ASTs, afaik.
09:35 weirdo IMO perl could win really big with adequate macros
09:35 wolverian well, if you don't think the macros in the spec are adequate enough, please suggest improvements (here or on perl6-language)
09:35 wolverian if, on the other hand, you think the spec is simply unclear, do the same. :)
09:37 weirdo i haven't yet researched the matter, but i don't understand why macros aren't simple nested arrayrefs
09:38 wolverian probably because perl 6's syntax isn't sexprs?
09:39 weirdo the main question is whether non-trivial cases can be expressed as perl macros, but i yet have to get a recent pugs trunk to check them out :-)
09:40 weirdo if a DESTRUCTURING-BIND common-lisp macro could be expressed in a not-so-hairy way, they would be really adequate :-)
09:40 wolverian I don't know if pugs has macros at all..
09:40 weirdo is there any implementation that does?
09:40 wolverian I don't think so
09:40 wolverian (if pugs doesn't have them)
09:40 wolverian pugs: macro foo { 'bar' }
09:40 exp_evalbot RESULT[\macro :(@_) "$_" := "Scalar" #<Scalar:0xb71c8b04>␤            "@_" := "Array" #<Array:0xb71c76fc>␤            "&?ROUTINE" := "Sub" #<Sub:0xb6604cec>␤            "&?BLOCK" := "Sub" #<Sub:0xb6604cec> {"&foo" := "Sub" #<Sub:0xb7a18830>, "$_" := "Scalar" #<Scalar:0xb7170ce8>␤
09:41 exp_evalbot ..                                               ...
09:41 wolverian hmm, I guess pugs does have them in some form
09:41 wolverian rakudo: macro foo { 'bar' }
09:41 exp_evalbot OUTPUT[Null PMC access in invoke()␤current instr.: '_block10' pc 28 (EVAL_11:14)␤called from Sub 'parrot;PCT::HLLCompiler;eval' pc 785 (src/PCT/HLLCompiler.pir:458)␤called from Sub 'parrot;PCT::HLLCompiler;evalfiles' pc 1067 (src/PCT/HLLCompiler.pir:587)␤called from Sub
09:41 exp_evalbot ..'parrot;PCT::HLLCompiler;command_line' pc 1246 (src/PCT/HLLCompiler.pir:676)...
09:41 wolverian rakudo doesn't :)
09:43 wolverian I have no idea what destructuring-bind does, even after reading the lisp spec :)
09:43 weirdo destructuring-bind binds variables to contents of an expression returning a list
09:44 weirdo perl5 only allows shallow destructuring, i.e. my ($foo, $bar, @baz) = (1 .. 42)
09:45 weirdo d-bind allows recursive destructuring, i.e. (destructuring-bind (foo (bar baz &key test on-error)) ...)
09:46 wolverian I think you can do arbitrary destructuring (extraction / pattern matching in haskell parlance) in any signature context
09:46 wolverian see e.g. http://perlcabal.org/syn/S06.html#Unpacking_array_parameters and the sections following it in subroutine argument context
09:46 lambdabot Title: S06
09:47 weirdo i'm not interested in destructuring in particular :) i've only arbitrarily appointed destructuring as a test of a macro facility's capabilities
09:48 wolverian ah.
09:48 wolverian well, I don't see why not, as long as your argument grammar specification is loose enough..
09:49 weirdo well, that's the problem with algol-ish syntax :/
09:49 weirdo
09:50 wolverian the grammar is available to the user, so perhaps it's not a problem.
09:55 wknight8111 joined #perl6
10:31 yewenbin joined #perl6
10:41 Aankhen`` joined #perl6
10:50 Zaba joined #perl6
10:52 ruoso joined #perl6
11:12 xinming_ joined #perl6
11:51 wknight8111 joined #perl6
12:02 sscaffidi_ joined #perl6
12:16 Zaba_ joined #perl6
12:18 stevan_ joined #perl6
12:22 stevan_ joined #perl6
12:22 BinGOs a/win 33
12:22 BinGOs bugger
12:32 cognominal_ screen misshap?
12:37 iblechbot joined #perl6
13:12 Zaba_ joined #perl6
13:20 cmarcelo joined #perl6
13:20 pmurias joined #perl6
13:24 pmurias weirdo: the macros should be powerfull enough to compile passed code and load it through NCI
13:26 pmurias allowing a lispish destructuring bind
13:26 pmurias say "this is perl"; (destructuring-bind ((a &optional (b 'bee)) one two three)
13:26 pmurias `((alpha) ,@(iota 3))
13:26 pmurias ;say "this is still perl"
13:27 pmurias should be possible also
13:37 weirdo don't mind the parens :)
13:37 weirdo i mean, it doesn't actually have lisp syntax
13:38 yves joined #perl6
13:39 weirdo something along the lines of destructuring-bind ($a, $b, ($c, $d, @f)) { ... } perfectly demonstrates expressibility of a macro facility :)
13:45 peepsalot joined #perl6
13:52 penk joined #perl6
13:57 TJCRI joined #perl6
14:03 rdice joined #perl6
14:12 chris2 joined #perl6
14:28 kcwu joined #perl6
14:30 alanhaggai joined #perl6
14:33 Auzon joined #perl6
14:40 DarkWolf84 joined #perl6
14:45 yewenbin joined #perl6
14:47 yewenbin joined #perl6
14:48 rindolf joined #perl6
14:48 peepsalot left #perl6
14:58 pmurias weirdo: macros don't modifify the way stuff is parsed by default, unless you use 'is parsed' which lets you embed anything you wish
14:58 yewenbin` joined #perl6
15:50 neenaoffline joined #perl6
17:12 Auzon joined #perl6
17:18 justatheory joined #perl6
17:33 rindolf joined #perl6
17:44 aindilis joined #perl6
17:46 Lorn joined #perl6
17:54 smtms joined #perl6
18:01 Lorn_ joined #perl6
18:13 Southen_ joined #perl6
18:13 meppl joined #perl6
18:29 Lorn joined #perl6
18:32 mofino joined #perl6
18:41 Lorn_ joined #perl6
19:03 meppl joined #perl6
19:12 Auzon joined #perl6
19:17 mofino joined #perl6
19:20 araujo joined #perl6
19:38 Zaba_ joined #perl6
19:46 r0bby joined #perl6
20:04 Zaba joined #perl6
20:32 wknight8111 joined #perl6
20:47 justatheory joined #perl6
21:29 mj41_ joined #perl6
22:24 renormalist joined #perl6
22:31 [particle] joined #perl6
22:33 jiing joined #perl6
22:39 meppl joined #perl6
22:39 Limbic_Region joined #perl6
22:43 ruoso joined #perl6
22:52 FurnaceBoy joined #perl6
22:59 [particle] joined #perl6
23:47 Auzon joined #perl6

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

Perl 6 | Reference Documentation | Rakudo