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