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