Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-04-30

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:07 araujo joined #perl6
00:16 syle joined #perl6
00:34 meppl good night
00:37 agentzh joined #perl6
00:37 meppl joined #perl6
01:09 yewenbin joined #perl6
01:20 agentzh left #perl6
01:25 mncharity ok... let's see...
01:43 [particle] joined #perl6
02:06 sunnavy_ joined #perl6
02:10 agentzh joined #perl6
02:19 syle joined #perl6
02:19 sunnavy_ joined #perl6
02:26 eternaleye_ joined #perl6
02:34 mncharity g'night &
02:34 pugs_svnbot r20332 | putter++ | [STD_red] Very slightly improved parsing of regex literals.
02:34 pugs_svnbot diff: http://dev.pugscode.org/changeset/20332
02:34 lambdabot Title: Changeset 20332 - Pugs - Trac
03:13 alester_ joined #perl6
03:31 Psyche^ joined #perl6
03:51 eternaleye joined #perl6
04:59 Psyche^ joined #perl6
05:01 iblechbot joined #perl6
05:04 Zaba joined #perl6
05:14 elmex joined #perl6
05:19 rhr joined #perl6
05:21 justatheory joined #perl6
05:21 alc joined #perl6
05:50 barney joined #perl6
06:50 bsb joined #perl6
06:51 ilogger2 joined #perl6
07:34 niraj1234 joined #perl6
07:35 niraj1234 left #perl6
07:46 Schwern joined #perl6
07:59 audreyt joined #perl6
08:07 yewenbin joined #perl6
08:15 niraj1234 joined #perl6
08:16 niraj1234 left #perl6
08:17 meppl joined #perl6
09:47 rimad joined #perl6
09:53 niraj1234 joined #perl6
09:53 ruoso joined #perl6
09:54 niraj1234 left #perl6
10:39 wknight8111 joined #perl6
11:09 jan_ joined #perl6
11:10 chris2 joined #perl6
11:14 smtms joined #perl6
11:16 ruoso nothingmuch, I think I came to a even cleaner solution to the "lax" signature matching thingy...
11:17 ruoso a pragma that redefines infix:<~~>(Object,Object)
11:17 rdice joined #perl6
11:18 agentzh left #perl6
11:18 pasteling "ruoso" at 195.23.92.2 pasted "example code for "typematch" pragma" (10 lines, 235B) at http://sial.org/pbot/30923
11:18 agentzh joined #perl6
11:21 wknight8111 joined #perl6
11:31 Chillance joined #perl6
11:38 smtms joined #perl6
11:38 zamolxes joined #perl6
12:24 nothingmuch ruoso: seems hackish to me, the scoping is not as fine grained since it's no longer nestable inside an expression
12:24 nothingmuch it could be used to change the default I suppose
12:25 nothingmuch but i think £ is useful on its own too
12:25 * ruoso trying hard to avoid additional signature features ;)
12:25 nothingmuch so implement Signature::Simple
12:25 nothingmuch and optimize to it
12:25 nothingmuch when the signature has no £ (likely 99% of the time) make it a ::Simple
12:25 nothingmuch and when it does, well... for now you just die with "TODO" ;-)
12:26 nothingmuch adding this to the context of the call makes analysing this harder too
12:27 nothingmuch you can't tell from just the foo(B.new) AST subtree what the bheavior will be
12:27 nothingmuch given the signature of B
12:27 nothingmuch you need to analyze it in the context of its entire lexical scope
12:27 nothingmuch and while this is in general well supported, it's still more work I think
12:27 nothingmuch anyway, dinner time
12:30 nothingmuch false alarm... not quite dinner yet
12:30 nothingmuch imagine you are someone writing the compile time type checker
12:30 nothingmuch instead of making this a simple, standalone body of code
12:31 nothingmuch that delegates the <<B.new>>.type to the param to check for compat
12:31 nothingmuch you now need to evaluate the compat cecking routine in an environment created during the tree traversal reaching the node
12:31 nothingmuch which is a lot more statefulness
12:31 ruoso er...
12:31 nothingmuch really dinner now
12:31 ruoso except that this pragma *can* actually be implemented
12:32 ruoso so the optimizer needs to be aware of it anyway
12:38 Zaba_ joined #perl6
12:52 syle joined #perl6
12:55 nothingmuch ruoso: why should the optimizer know about every degenerate case?
12:55 nothingmuch if the signature is finalized
12:56 pmurias joined #perl6
12:56 nothingmuch then ~~ can't be overrideen in it
12:56 nothingmuch by an external pragma
12:56 nothingmuch instead you'd have to derive your own signature
12:56 nothingmuch i don't wnat to know how slow perl 6 will be if Signature ships open,basal by default ;-)
13:00 pmurias nothingmuch: my optimistic assumption is that metaprogramming will be kept inside BEGIN blocks, thus allowing running perl6 fast
13:01 nothingmuch pmurias: sometimes you want to give up speed for conciseness though
13:02 nothingmuch if you allow to override the definition of ~~ that is cokmpiled into Sig::Param::is_compatible on a runtime basis
13:02 nothingmuch that is an exceedingly difficult optimization
13:02 nothingmuch i would say making it impossible by default will make the 99% of the time case many times faster
13:02 nothingmuch than what the 99% case can be when its still possible by default
13:03 nothingmuch i think making 99% of the code a lot faster all the time, and 1% (probably less) sometimes very slow
13:03 nothingmuch vs. 100% of the code pretty fast, with a lot more effort
13:03 nothingmuch is a more realistic target
13:04 nothingmuch at the end there are no free lunches, of course
13:04 nothingmuch the question is how to get most of the lunches to be cheap without losing your sanity ;-)
13:05 pmurias &
13:05 ruoso nothingmuch, so we need the spec to explicitly forbid that...
13:06 ruoso the matching now is specced as ~~
13:06 ruoso and ~~ can be overriden...
13:06 nothingmuch i don't think you can write a lexical pragma to modify all definitions of a core op everywhere at runtime that easily
13:06 ruoso hmm... I'm pretty sure you can
13:06 nothingmuch IIRC it was mentioned that the global namespace is closed by default
13:07 nothingmuch that doesn't mean its not reopenable
13:08 nothingmuch either way I wouldn't lose sleep over this degenerate case
13:08 nothingmuch it seems to be a lot more work than just adding £ to sigs
13:08 nothingmuch hell, you can just subclass the param
13:09 nothingmuch and install a polymorphic parameter object in the sig that overrides is_compatible
13:09 nothingmuch seems a lot easier than changing the global definition of a class that affects everything everywhere just to negotiate one dispatch lexically
13:11 integral joined #perl6
13:49 sscaffidi joined #perl6
14:02 jan_ joined #perl6
14:19 ispy_ joined #perl6
14:22 pmurias ruoso: you would have to undo all the optimalizations which depended on the way that opcode worked
14:23 smtms joined #perl6
14:24 elmex joined #perl6
14:27 ruoso pmurias, the thing is (and that's what I'm saying in a mail I've just sent to p6-lang), ~~ is not a "opcode"
14:27 ruoso it's a p6-level subroutine
14:28 ruoso and so is "isa" and "does"
14:28 ruoso and "like", when/if it is implemented
14:28 pmurias don't you just get a copy of the Prelude imported into *your* lexical scope at the start of the file
14:29 * ruoso don't follow
14:30 pmurias from what i understand you wont to redefine the definition of ~~ everywhere right?
14:31 pmurias sort of local &infix:<~~> := sub {...}?
14:33 iblechbot joined #perl6
14:34 ruoso you *might*....
14:34 pmurias s/wont/want
14:37 pmurias i'm not sure if it is possible to change (easily) the definition of for example &say globaly
14:37 TJCRI joined #perl6
14:39 ruoso I'm pretty sure it is
14:39 pmurias if only finding things in irc logs would be easier... ;)
14:41 pmurias it's not possible to add anything for sure
14:41 pmurias add to GLOBAL that is
14:44 pmurias ruoso: if it's possible then your pragma would be relativly simple to write, otherwise you would have to recompile a lot of stuff which should still be possible
14:44 ruoso the thing is that even if it is compiled, it's still "late dispatch"ed
14:45 ruoso which means that it's only resolved at call time
14:48 armagad joined #perl6
14:48 pmurias having an "early dispatch" pragma would be nice
14:56 Khisanth it would be a bit disappointing if you couldn't do that(since you could in p5)
14:59 ruoso but it's true that there might be some way of disabling that for more agressive optimization...
15:00 ruoso and even for sand-boxing, actually...
15:10 TimToady most operators are defined via Prelude, which means they're lexically scoped, and don't use the global namespace at all.
15:10 TimToady it should be easy to override your own ~~, but hard to override everyone else's
15:11 TimToady unless they agree to your dialect via declaration
15:16 pmurias Khisanth: do you have a use case for doing this at *runtime*?
15:18 ruoso TimToady, so redeclaring ~~ wouldn't affect the signature matching...
15:31 kanru joined #perl6
15:40 rindolf joined #perl6
15:44 justatheory joined #perl6
15:47 alanhaggai joined #perl6
16:05 alanhaggai joined #perl6
16:26 eternaleye joined #perl6
16:26 japhb joined #perl6
16:31 TimToady ruoso: that would depend on whether signature matching thinks it's using infix:<~~> or some underlying primitive
16:32 TimToady matching a signature against a capture is just one of the things ~~ does, so it could well be delegating that match to the underlying primitive used by ordinary sig binding
16:34 TimToady I expect this is rather orthogonal to the scope of ~~, which is intended as more of a dwim operator than a basic one
16:35 TimToady you're really talking about something more like .ACCEPTS at the lower level
16:36 TimToady in other words, it's a confusion of abstraction levels to think that overriding ~~ will change how signatures bind.
16:37 * ruoso will re-re-re-read the specs...
16:38 TimToady you can't use multiple dispatch to implement multiple dispatch...
16:39 TimToady (not that ~~ is really multi dispatch anyway, it's a reversed single dispatch)
16:39 pbuetow joined #perl6
16:45 ruoso TimToady, I was going to implement mmd using mmd, but special-casing for the known low-level types...
16:47 Zaba_ joined #perl6
16:51 ruoso in order to bootstrap
17:06 TimToady that's fine, just don't think of ~~ as the mmd operator. :)
17:18 ruoso TimToady, could you please point me to where ACCEPTS is documented?
17:23 TimToady various places in S03
17:38 ruoso TimToady, one last thing... during signature matching for mmd... does it: Capture.ACCEPTS(Signature) or Signature.ACCEPTS(Capture)?
17:40 lambdabot joined #perl6
17:45 eternaleye joined #perl6
17:45 * ruoso later &
17:46 Zaba_ joined #perl6
18:01 barney joined #perl6
18:08 TimToady @tell ruoso the signature is the pattern, so the signature accepts the capture, which means it's the operation underlying Capture ~~ Signature (note reversed args from Signature.ACCEPTS(Capture))
18:08 lambdabot Consider it noted.
18:24 jferrero joined #perl6
18:42 jhorwitz joined #perl6
18:47 Eevee joined #perl6
18:52 Auzon joined #perl6
19:36 FurnaceBoy joined #perl6
19:39 IllvilJa joined #perl6
19:48 jferrero joined #perl6
20:22 elohim2 joined #perl6
20:23 elohim2 left #perl6
20:35 eternaleye joined #perl6
20:38 Lorn joined #perl6
21:03 fridim_ joined #perl6
21:11 mncharity joined #perl6
21:13 wknight8111 joined #perl6
21:21 cj quiet in here today
21:23 Auzon Yes, very.
21:28 peepsalot joined #perl6
21:29 peepsalot joined #perl6
21:34 pugs_svnbot r20333 | clkao++ | provide OP_bind_pad.
21:34 pugs_svnbot diff: http://dev.pugscode.org/changeset/20333
21:34 lambdabot Title: Changeset 20333 - Pugs - Trac
21:40 mncharity TimToady: STD.pm seems to be missing categories  terminator  and  infix_circumfix_meta_operator .
21:46 mncharity TimToady: numbering... :)  (1) token categories  terminator  and  infix_circumfix_meta_operator  are not defined; (2) S02 and the kp6 tests suggest =begin without an ident is ok, but pod_comment requires one.
21:46 xdg joined #perl6
22:03 eternaleye joined #perl6
22:07 mncharity (3) pod_comment looks like it would accept  =begin foo\n=end foobar\n
22:08 Juerd Is there a list of things supported by Rakudo?
22:09 Juerd I really hate trial and error waay too much.
22:17 Lorn_ joined #perl6
22:36 eternaleye_ joined #perl6
22:36 cathyal joined #perl6
23:14 Limbic_Region joined #perl6
23:18 yewenbin joined #perl6
23:24 mncharity (4) when tweaking pod_comment, note the ws after =begin can eat things like =head, so  "=begin\n=head ..." behaves interestingly. :/
23:35 eternaleye joined #perl6
23:55 FurnaceBoy joined #perl6

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

Perl 6 | Reference Documentation | Rakudo