Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-12-21

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 Schwern So now every \W has to be backwhacked?
00:00 Juerd_ However, for *strings* this is more trouble than good
00:00 Schwern Dear lord!
00:00 Juerd_ Well, in regexes they do!
00:00 Schwern Regexes are a programming language
00:00 Juerd_ But not in normal double quoting
00:00 Schwern Text is text.
00:00 Juerd_ Well, that's the thing with { ... }
00:00 Schwern Right.
00:00 Juerd_ They break the boundary between programming and text
00:00 Schwern Interpolation does that, so you have to do it with a minimum impact.
00:01 Schwern Which is why I like ${}
00:01 Schwern We already know the sigils are tricky
00:01 Juerd_ I find ${} ugly, but would go for it if I found { } a problem.
00:01 Schwern Keeps it down to just one thing to remember:  Sigils.
00:01 Juerd_ Thing is, I don't :)
00:01 Juerd_ Simply because I don't think @ is a problem either
00:01 Juerd_ (In Perl 5)
00:02 Schwern Oh
00:02 Juerd_ Yes, certainly the character is used much.
00:02 Juerd_ But I don't see any problem there. We can cope with it.
00:02 Schwern Ahh, "cope".  We're just used to it.
00:02 Juerd_ We can get used to {}
00:02 Juerd_ Just like we'll have to get used to a lot of things in Perl 6
00:02 Schwern I hate it, though it is at least (usually) easy to discover and recover from.
00:02 Schwern We don't *have* to get used to it
00:02 Juerd_ In fact, we'll have to get used to % interpolating too.
00:03 Schwern That's ok, it's a sigil.
00:03 Juerd_ {} is the closure sigil? :)
00:03 Juerd_ What makes a sigil a sigil?
00:03 Juerd_ It's a character that tells us that whatever is after it, is not literal.
00:03 Juerd_ We just happen to have used a rather limited interpretation of that so far :)
00:04 Schwern Good.
00:04 Juerd_ I do understand your point
00:04 Schwern Adding in balanced characters will muddy things too much
00:04 Juerd_ Perhaps
00:04 Juerd_ But okay, let's assume for now that I do think {} needs to go.
00:05 Juerd_ You suggested ${} and @{}
00:05 theorb joined #perl6
00:05 Juerd_ But what would be the relevant difference? I'm inclined to say &{} is more appropriate, the & already being associated with closures
00:06 Juerd_ Context?
00:07 Juerd_ (/me thinks it's scary to associate $ and @ with item and list context. item != scalar, list != array)
00:07 Juerd_ (Though 90% of all programmers will never understand that anyway :(  )
00:09 Juerd_ Heh, did my connection problems migrate to your irc? :)
00:11 Schwern Context.
00:12 Schwern But like I said, I haven't looked into contextual changes in Perl 6
00:12 justatheory joined #perl6
00:12 Schwern &{} already has a meaning
00:13 Schwern I do find it odd that "${var}" doesn't work.
00:13 Schwern Though I don't mind.
00:13 Schwern I guess the thinking is that "{$var}" replaces it
00:13 Schwern It's odd that &{foo} still means { foo }
00:13 Schwern Oh, it doesn't
00:14 Schwern It's just '&'.foo()
00:14 Schwern I don't like &{} because I believe the & sigil has been eliminated from Perl 6 if I'm not mistaken.
00:14 Alias_ joined #perl6
00:15 Schwern Oh, ewww, it hasn't.
00:15 Schwern die die die die
00:16 Schwern Oh, it means something useful now.  Good.
00:17 Juerd_ Schwern: ${var} would be weird, given that the $ is now part of the name.
00:17 Schwern Umm... I'd be ok with &{}.  I just have bad feelings about & because in Perl 5 its use is almost always a mistake.
00:17 Schwern Juerd:  Good point.
00:17 Juerd_ Schwern: Though $Foo::bar already breaks that logic :(
00:18 Alias_ "It's the only example that SD Times can find of an old version of a programming language being modernized purely for nostalgia’s sake."
00:18 Alias_ Schwern: Cute :)
00:18 Juerd_ Should be made Foo::$bar
00:19 Schwern Juerd:  That's an interesting point.
00:19 Schwern Might be worth making.
00:19 Juerd_ Well, you can already write Foo::<$bar>
00:20 Juerd_ There may be a good reason for using that instead of Foo::$bar. I just don't see it.
01:00 Southen_ joined #perl6
01:38 Caelum joined #perl6
02:03 luqui joined #perl6
02:33 aindilis joined #perl6
02:37 Auzon joined #perl6
03:13 zakame__ joined #perl6
03:22 pugs_svn r19231 | rhr++ | [Unicode.pm] initial commit
03:22 pugs_svn r19231 | rhr++ | start off with a data structure for prop lookups
03:22 pugs_svn r19231 | rhr++ | untested, needs multislice+Range support
03:52 AzureBOT_ joined #perl6
04:10 jjore-m joined #perl6
04:16 * mncharity wonders if multi-methods (plus types, which they need) might be the heart of p6.  ie, if package variables are accessed by the multimethod CANDO, perhaps lexical variables could also be so accessed.  making namespaces simply a multimethod call convention.  ?
04:17 mncharity /me looks for a "core" of p6, for a language kernel + onion layers language description
04:19 thestarslookdown joined #perl6
04:21 zakame joined #perl6
04:25 sunnavy joined #perl6
04:32 Alias_ joined #perl6
04:36 lyokato joined #perl6
04:41 justatheory joined #perl6
05:03 xinming joined #perl6
05:22 kanru joined #perl6
05:24 lyokato joined #perl6
05:25 TimToady joined #perl6
05:38 cnhackTNT joined #perl6
05:41 alc joined #perl6
05:52 Tene joined #perl6
06:18 amnesiac joined #perl6
06:26 devogon joined #perl6
06:33 cognominal_ joined #perl6
06:41 Ashizawa joined #perl6
07:11 penk joined #perl6
07:44 pro21ms4 joined #perl6
07:46 drrho joined #perl6
08:04 Psyche^ joined #perl6
08:04 iblechbot joined #perl6
08:12 pen1 joined #perl6
08:14 theorbtwo joined #perl6
08:20 zakame joined #perl6
08:28 jisom joined #perl6
08:31 franck___ joined #perl6
09:07 BinGOs joined #perl6
09:21 penk joined #perl6
09:44 hanekomu joined #perl6
09:57 penk left #perl6
10:37 zakame joined #perl6
10:49 cognominal_ joined #perl6
11:02 luqui joined #perl6
11:12 ebassi joined #perl6
11:12 fglock joined #perl6
11:25 pmurias joined #perl6
11:50 jisom joined #perl6
12:02 drrho joined #perl6
12:17 ferreira joined #perl6
12:46 pugs_svn r19232 | fglock++ | [misc] added a search plugin for the Perl 6 specification
12:46 pugs_svn r19232 | fglock++ | - uses Google, tested in Firefox only
12:49 fglock joined #perl6
12:57 IllvilJa joined #perl6
13:29 pmurias fglock: how do i install the search plugin in firefox?
13:42 rindolf joined #perl6
13:44 xinming_ joined #perl6
13:49 cmarcelo joined #perl6
13:56 fglock pmurias: you can just copy it to searchplugins/ inside the Firefox profile directory
13:58 fglock (the standard way would be to click on a web page that had some javascript)
14:08 mtve joined #perl6
14:09 pmurias fglock: the google interface is in Portuguese
14:09 fglock TimToady: it's not clear to me that BEGIN block side-effects should remain until runtime
14:10 fglock pmurias: oops - fixing :)
14:10 pmurias it would be nice to search the smartlinked version
14:10 turrepurre joined #perl6
14:10 mtve joined #perl6
14:11 pugs_svn r19233 | fglock++ | [misc - searchplugin] no default search language
14:11 fglock pmurias: you can fix it, it's just xml
14:13 fglock TimToady: discarding side-effects would make compilation much simpler
14:18 pmurias fglock: what would be the use of a side-effect free begin?
14:18 pmurias s/begin/BEGIN/
14:19 fglock say "compilation date: ", BEGIN { Datetime.new() }
14:20 ispy_ joined #perl6
14:20 fglock it can also set global variables
14:21 fglock but in order to have those values at runtime, you would need explicit runtime assignment
14:22 fglock $date_compiled = BEGIN { $X::date_compiled }
14:22 jhorwitz joined #perl6
14:22 pmurias i see
14:23 pmurias $date_compiled ::= BEGIN {$X::date_compiled} could also be used?
14:27 fglock I think you need:  $X::date_compiled ::= $X::date_compiled
14:27 fglock which is funny
14:28 fglock this would compile to $X::date_compiled := DateTime.new( ... )
14:29 fglock or, maybe ::= would just not work
14:30 fglock because it actually means:  BEGIN { $date_compiled := BEGIN {$X::date_compiled} }
14:31 fglock this is pointless without side-effects
14:39 pmurias fglock: found a case where side effects would be helpfull
14:39 jiing joined #perl6
14:39 pmurias what if i wanted to add a bunch of methods to a class
14:41 fglock yes, that's what I mostly use BEGIN for, in perl5
14:42 fglock but you can do that with INIT
14:42 pmurias or Foo.HOW.add_role(BEGIN {})
14:43 pmurias fglock: you can close the class if you use INIT
14:43 pmurias s/can/can't/
14:44 pmurias i suppose it's important to do metaprogramming at compile time as it allows more optimalisation
14:47 fglock the problem is, pugs and kp6 implement extra things that are not in the specification, while "perl6" implements less than what seems to be specified
14:47 fglock I need to know what's actually specified
14:49 fglock specifically, I want to drop the extra stuff in kp6, in order to make it more easily portable
15:09 fglock joined #perl6
15:12 Psyche^ joined #perl6
15:26 pro21ms4 joined #perl6
15:53 barney joined #perl6
15:56 gene9 joined #perl6
16:05 amnesiac joined #perl6
16:09 sahadev joined #perl6
16:19 kyrbe joined #perl6
16:19 kyrbe left #perl6
16:24 pugs_svn r19234 | rhr++ | [Unicode.pm] misc fixes and cleanups in Utable
16:25 pbuetow joined #perl6
16:31 Psyche^ joined #perl6
16:50 jjore-m joined #perl6
16:51 agjal joined #perl6
16:55 manne joined #perl6
16:56 pbuetow joined #perl6
16:56 TimToady It's not really a matter of BEGIN having side effects--BEGIN blocks, at least those in "void" context, can *only* work by having side effects
16:57 TimToady think of it rather like this
16:57 TimToady BEGIN blocks can set the value of any variables that would be in scope
16:58 TimToady at the end of a scope, an implicit INIT is generated that takes a snapshot of all variables in that scope
16:58 TimToady and at run time those variables all start out with the value they had at the end of compilation
16:59 TimToady it's more of a smalltalky "save/restore the workspace" idea
16:59 jjore-m Mmm, smalltalk.
16:59 TimToady but basically, I think pugs has the right model here already
17:00 fglock TimToady: thanks for the explanation, I needed to confirm that
17:00 TimToady no problem; sorry it makes more work, but it's one of those things that we take on ourselves vicariously on behalf of the user
17:02 TimToady and maybe down the road there's even a way of checkpoint/restore a running Perl program based on a similar mechanism, but for sure that's not 6.0.0
17:02 fglock kp6 is doing the right thing, I was wondering about perl6-parrot
17:03 sanfd joined #perl6
17:04 TimToady I doubt they've thought about it that deeply yet, so I don't know how much support the vm is going to give you.
17:04 TimToady but if you discover ways that parrot doesn't support perl6 properly, I'm sure the parrotfolk will be interesting in thinking about it
17:05 * [particle] eschews thinking
17:05 fglock they are thinking about it :)
17:06 TimToady yes, I know. :)
17:06 pbuetow joined #perl6
17:07 * jjore-m kind of hopes one of the perl 6s gets to the point where he can do the smalltalk thing of editing a running program sanely. that's sweet!
17:08 pbuetow joined #perl6
17:10 fglock jjore-m: I think even perl5 can do that, if you add an editor to it
17:11 fglock that's how kp6 builds the compile-time classes and objects, in a sense
17:14 pbuetow joined #perl6
17:14 fglock hmm - it doesn't seem to work in pugs
17:14 fglock pugs:  sub x { 123 }; say x; eval "sub x {456 }"; say x;
17:14 exp_evalbot OUTPUT[123␤123␤]
17:14 [particle] can you have optional or required slurpy param? e.g. *%opt? (probably default) or *%req!
17:15 fglock it does work in perl5
17:15 fglock [particle]: I think slurpy assumes "zero or more" (optional)
17:16 [particle] yes, assumes, but can it be specified as required (one or more)
17:16 [particle] probably not, and std doesn't seem to allow it, just thinking about corners as i implement it
17:17 fglock I know that feeling  # corner cases
17:20 TimToady slurpy % and @ are both 0 or more
17:20 TimToady slurpy $ is exactly 1, whereas $ @ is 1 or more
17:21 TimToady since the intend is primarily to pull the head off a list
17:21 TimToady *intent
17:21 TimToady and the assumption is there is another multi sig that matches ()
17:22 TimToady so $ is essentially just the "1" of "1 or more" for @, but it doesn't have any relationship to %
17:26 takanori_ joined #perl6
17:28 [particle] then there's no similar construct to use for % to get the same semantics as $ @ ?
17:28 pugs_svn r19235 | fglock++ | [t] added a test case for eval() overwriting a subroutine
17:28 justatheory joined #perl6
17:29 TimToady I don't see a use case
17:30 TimToady the point of @ is orderedness and % is not ordered
17:30 [particle] true.
17:30 TimToady if you really need to do ordered named args, you have to do your own @ processing to find them
17:31 [particle] i was under the impression that you could write a perl 6 program using only the $ sigil, and avoiding @ and %. seems that's not true
17:31 TimToady it's only an approximation
17:32 TimToady and we don't have to bend over backwards to make it easy for the people who want "use sigilless"  :)
17:33 TimToady basically, in declarative/lvalue syntax, the sigils are quite important
17:33 TimToady $foo= gives scalar context and parsing @foo= gives list
17:35 [particle] i suppose one could alias the parameter
17:35 TimToady eek, Highlanders!!!
17:37 [particle] btw pmichaud and i noticed that ::() doesn't seem to be in std
17:38 TimToady see line 2266
17:38 TimToady <sigil> matches ::
17:38 TimToady sym:<$( )> is just the name of the rule
17:38 TimToady but there's nothing says a rule has to match its name always
17:38 ruz joined #perl6
17:38 [particle] ah, so it does
17:39 [particle] i was looking in token variable
17:39 [particle] ::{ } ::< > etc
17:40 TimToady those are just identifier mods
17:40 TimToady not contextualizers
17:41 TimToady or think of them as subscripts into a symbol table hash
17:43 lorn joined #perl6
17:43 [particle] jhorwitz needs ::() for mod_perl6 to do ::($module)::handler();
17:43 [particle] or Foo::("bar")::baz
17:58 TJCRI joined #perl6
17:58 chacha_chaudhry joined #perl6
18:02 TimToady hmm, yes, that does seem to be missing
18:15 Psyche^ joined #perl6
18:18 ferreira TimToady: In S03, on the cross operator, you say: "On the other hand, if any of the lists is empty, you will end up with a null list." null list = empty list?
18:18 hanekomu joined #perl6
18:25 pbuetow joined #perl6
18:26 ywpg joined #perl6
18:26 ywpg left #perl6
18:33 TimToady ferreira: yes
18:34 TimToady I generally use null and empty interchangeably; if I mean undefined I say that  :)
18:35 TimToady a null string is just a string with 0 characters
18:37 ferreira ok. Another question of terminology: circumfix '[ ]' is the reduce meta-operator, while [*] is a reduce operator by itself (that is, an actual application of the meta-operator to '*') ? that's it?
18:41 PerlJam ferreira: awkward, but yes.
18:41 pugs_svn r19236 | lwall++ | [STD] name token didn't handle ::() forms; noted by jhorwitz++ and [particle]++
18:44 TimToady the metaoperator is not a true circumfix
18:45 TimToady its official syntax category is prefix_circumfix_meta_operator
18:46 TimToady (a real circumfix has an expression in the middle)
18:46 TimToady for the same reason, quotes are not really circumfixes
18:48 TimToady and the place in the spec that mentions circumfix:<❰ ❱> is probably wrong.
18:49 TimToady should probably be just macro term:<❰ ❱> instead
18:49 TimToady afk &
19:10 chris2 joined #perl6
19:16 chacha_c` joined #perl6
19:50 penk joined #perl6
20:13 ispy_ joined #perl6
20:15 araujo joined #perl6
20:17 penk joined #perl6
20:58 pugs_svn r19237 | rhr++ | [Unicode.pm] declare some data structures etc.
21:26 Limbic_Region joined #perl6
21:32 jjore-w joined #perl6
21:50 agjal joined #perl6
21:58 jisom joined #perl6
22:12 [particle1 joined #perl6
22:30 sverrej joined #perl6
22:34 justatheory joined #perl6
22:35 pugs_svn r19238 | rhr++ | [Unicode.pm] declarations for most raw UCD data
22:35 pugs_svn r19238 | rhr++ | Utable value fixes
22:37 agjal joined #perl6
22:41 sahadev left #perl6
23:09 polettix joined #perl6
23:19 justatheory_ joined #perl6
23:20 justatheory_ joined #perl6
23:24 dj_goku joined #perl6
23:33 justatheory_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo