perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | ~290 days 'til Xmas Set by mncharity on 6 March 2009. |
|||
pmichaud | I've noticed that. | 00:00 | |
actually, I think I'm just exceptionally good at guessing where the spec is likely to change before I work on a feature :-) | |||
TimToady | it's a useful skill, fershure--wish I had it... :) | 00:03 | |
pugs_svn | r25813 | moritz++ | [irclog] revert broken .htaccess changes | 00:04 | |
TimToady | bbl & | 00:09 | |
00:23
tarbo2_ joined
00:24
ujwalic joined
00:25
cspencer left
00:26
ujwalic left
00:43
frioux joined
00:59
yary joined
01:01
Kimtaro left
01:02
ruoso joined
|
|||
yary | Hi all, I posted a question about arity to perl.perl6.users a couple days ago, and it hasn't shown up yet. So- | 01:03 | |
ruoso | Hello! | ||
yary | 1, is there something I need to know about posting to that usenet group | 01:04 | |
2, here's the Q- | |||
If I make a sub "sub my_arg_example ($a, $b?, $c?) { say $a, $b, $c; }" | |||
how do I ask it for the number of optional arguments? | 01:05 | ||
01:12
Whiteknight left
|
|||
yary | Need to go, will check for any answer on the logs later | 01:20 | |
diakopter | yary: I'm sure someone will address it, at some point... | ||
:) | 01:21 | ||
yary | thanks, no prob, I appreciate all the volunteers and am not in hurry | ||
01:21
yary left
|
|||
wayland76 | As far as the usenet group goes, I'd never heard of it until you mentioned it, and I've been around here a few weeks | 01:21 | |
01:24
nihiliad left
|
|||
wayland76 | rakudo: sub my_arg_example ($a, $b?, $c?) { say $a, $b, $c; say +self.signature.params } | 01:29 | |
p6eval | rakudo 087e29: RESULTĀ«{ ... }Ā» | ||
wayland76 | rakudo: sub my_arg_example ($a, $b?, $c?) { say $a, $b, $c; say $?ROUTINE.signature.params } my_arg_example(1, 2, 3) | 01:30 | |
01:30
eternaleye joined
|
|||
p6eval | rakudo 087e29: OUTPUTĀ«Statement not terminated properly at line 1, near "my_arg_exa"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤Ā» | 01:30 | |
wayland76 | rakudo: sub my_arg_example ($a, $b?, $c?) { say $a, $b, $c; say $?ROUTINE.signature.params }; my_arg_example(1, 2, 3); | ||
p6eval | rakudo 087e29: OUTPUTĀ«Scope not found for PAST::Var '$?ROUTINE' in my_arg_exampleā¤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)ā¤Ā» | 01:31 | |
wayland76 | Is that a bug? | ||
Anyway, to answer yary's question, I think it's probably $?ROUTINE.signature.params - $?ROUTINE.arity | 01:32 | ||
ruoso | wayland76, isn't it &?ROUTINE? | ||
wayland76 | rakudo: sub my_arg_example ($a, $b?, $c?) { say $a, $b, $c; say &?ROUTINE.signature.params - &?ROUTINE.arity }; my_arg_example(1, 2, 3); | 01:33 | |
You're right ruoso | |||
p6eval | rakudo 087e29: OUTPUTĀ«123ā¤Null PMC access in find_method()ā¤current instr.: 'my_arg_example' pc 184 (EVAL_17:86)ā¤Ā» | ||
wayland76 | So let me correct that to &?ROUTINE.signature.params - &?ROUTINE.arity | ||
But my question is, does he want the number of optional args the routine takes, or the number that have actually been passed? | 01:34 | ||
ruoso | hmmm... I'm not sure asking how many were actually passed is that easy after the bind | ||
01:35
Kimtaro joined
|
|||
wayland76 | yary: ruoso usually knows what he's talking about | 01:40 | |
(more so than me, anyway :) ) | |||
01:47
frioux left,
frioux joined
|
|||
pmichaud | afaik, &?ROUTINE isn't implemented in rakudo yet. | 01:49 | |
but the other answer is that it's probably &?ROUTINE.count - &?ROUTINE.arity | 01:50 | ||
ruoso | pmichaud, about different arity in multis for reduce... I was thinking that using ~~ is not a good idea, because that happens inside postcircumfix:<( )> | 01:51 | |
maybe that should be yet another argument to postcircumfix:<( )> itself | |||
(SMOP already declares :$cc in that signature) | |||
(as in "current-continuation") | 01:52 | ||
diakopter | &?ROUTINE is both the routine model and the invocation, an instance of the model? | ||
ruoso | yes, &?ROUTINE is specific to that invocation | 01:53 | |
isn't it? | |||
I think it is... but I might be wrong... | |||
diakopter warns you not to look at me :P | |||
(for the answer) | |||
lol | |||
frioux | is foo bar: syntactically the same as bar.foo? | 01:56 | |
or have I been reading things on the mailing list wrong | 01:57 | ||
diakopter | I think you mean to say semantically | ||
frioux | sure | 01:58 | |
but isn't Str.chop semantically the same as chop(Str)? | |||
but that just happens to be because of the is export | |||
vs foo bar: which would always be the same as bar.foo | |||
ruoso | frioux, yes... the ":" marks it as an indirect syntax | 02:00 | |
std: my $foo; $foo.bar: ; | |||
p6eval | std 25813: OUTPUTĀ«ok 00:02 35mā¤Ā» | ||
ruoso | ops | ||
std: my $foo; bar $foo: ; | 02:01 | ||
p6eval | std 25813: OUTPUTĀ«ok 00:02 36mā¤Ā» | ||
frioux | another question: is 'is export' supposed to automatically export the method? | 02:05 | |
I only ask because of the sub split ... in Any-str.pm | 02:06 | ||
ruoso | frioux, yes... that's what "is export" is about | 02:12 | |
but sometimes the method has a different signature than the sub | |||
then you need two declarations | |||
split is one of them | 02:13 | ||
frioux | ah, ok, understood | 02:15 | |
02:15
alester joined,
AzureStone left
|
|||
frioux | I thought that's what is export was for, but I wasn't sure why they also declared split | 02:15 | |
thanks ruoso | |||
diakopter | where can I read about bvalues | 02:18 | |
erm | 02:19 | ||
s1n | frioux: are you the same as frooh? | 02:20 | |
frioux | s1n: yeah | ||
one's home, one's work | |||
diakopter searched irclog for bvalue and reads | 02:21 | ||
s1n | frioux: okay, so when are we having the first p6m meeting? | 02:22 | |
frioux | as soon as you are ready! | 02:23 | |
diakopter | ruoso: 'bvalue' is short for 'bound value' or 'binding value' or ...? | ||
frioux | I figure april would be fine, but we should probably fine more people than the three of us (that includes pmichaud) | ||
find* | |||
s1n | well, i'll be crazy busy for the next month, 1 meeting is fine, but i don't really want to stretch myself too thin | 02:24 | |
frioux | of course | ||
you're in grad school after all | |||
s1n | i have 3 assignments and 2 tests in the next 6 weeks | ||
frioux | you took it further than the rest of us :-) | ||
s1n | so this weekend i might have some time | 02:25 | |
frioux | well, I would figure that meeting more than once a month might be overkill anyway. | ||
s1n | true | ||
frioux | I have company this weekend, but *generally* I am free on saturdays, so normally that would have worked | ||
s1n | okay, i would say next week(days) after tuesday is the last i can ensure any block of time | 02:26 | |
frioux | so you are saying the coming monday or tuesday is ok before you are bombarded? | 02:27 | |
s1n | no, i'm bombarded with work until tuesday | 02:28 | |
assignment due | |||
02:28
shinobi-cl joined
|
|||
frioux | got it | 02:28 | |
would you prefer wed, thurs, or next sat? | |||
I bet I could get some coworkers to come too btw | 02:29 | ||
at the very least my roommate | |||
shinobi-cl | rakudo: class A { method BUILD {say 'Constructor'} }; my A $Class; | ||
p6eval | rakudo 087e29: RESULTĀ«AĀ» | ||
shinobi-cl | lol | ||
what im thinking .. | |||
02:30
shinobi-cl left
|
|||
frioux somehow crashed a single window of firefox, but not the whole browser | 02:30 | ||
s1n | frioux: i would say thursday, i'm going to be in the library from sat through wednesday | ||
frioux | alrighty | ||
diakopter starts at S01:1. again. | 02:31 | ||
02:31
nihiliad joined
|
|||
frioux | we should find out who all wants to come, and then based on that decide on something like a Barnes and Noble to meet at | 02:31 | |
02:31
shinobi-cl joined
|
|||
frioux | if it's just you and me and people frm our area there is probably one on 75 in allen or something | 02:32 | |
s1n | pmichaud and i have been meeting at the market street in allen because of the free wifi and coffee (not free) :) | ||
ruoso | diakopter, "bindable value" | 02:33 | |
there isn't much beyond SMOP sources and IRC logs | |||
frioux | I'm down with that. | ||
ruoso | I don't think rakudo has anything similar to that | ||
frioux | how about a time? | ||
s1n | 7pm? | 02:34 | |
frioux | sure | ||
are you on email? | |||
s1n | yeah | ||
frioux | you wanna msg it to me? | ||
or if you don't care about spam just say it | |||
s1n | sent | 02:35 | |
any news on the p6m domain? we have space ready to go on dallas.p6m.org? | |||
frioux | we apparently have it | ||
I checked, and it's gotten but it's bare (godaddy bare that is) | |||
ruoso | diakopter, but in summary, it's a proxy for the actual value that remembers where the value comes from... so you can use it as if it was the actual value, but you can also bind something to it, and that will update the place where this value came from | 02:36 | |
it also represents a lazy lookup of the actual value | |||
diakopter | ruoso: ok, so essentially a lazy fetch | ||
ruoso | which is essential so that %a<b><c><d><e><f> doesn't autovivify | 02:37 | |
s1n | pmichaud: is the hosting space you mentioned the same as rakudo.org? | ||
diakopter | ruoso: is the lookup done by symbol at runtime or can the compiler bind it deterministically always? | 02:38 | |
02:38
dukeleto joined
|
|||
ruoso | diakopter, when you have plain variable lookups, yeah.. it can be done... | 02:38 | |
but %a<b><c><d> := 1 | 02:39 | ||
is a different scenario | |||
and that's completely runtime | |||
diakopter | ok, so all the symbols must be persisted for the life of their scope if a usage like that exists? | ||
ruoso | I don't follow | 02:40 | |
diakopter | hrm. /me retracts the question; strike from record. | 02:41 | |
:) | |||
02:43
Limbic_Region left
|
|||
diakopter | does each "{ use v5; ... }" block have its own __DATA__ and everything? can a "use v6;" block inside a "use v5;" block interact with the scope of a "use v6;" block that surrounds the "use v5;" block? | 02:44 | |
frioux | phone& | 02:45 | |
ruoso | diakopter, that's pretty much undefined behavior yet | ||
diakopter | it smells a tad undefinable | ||
ruoso | for all implementors, it does | 02:46 | |
I think it will heavily depend on implementation | |||
shinobi-cl | rakudo: class A { submethod BUILD { say 'constructor' } }; my $something = A.new; | ||
p6eval | rakudo 087e29: OUTPUTĀ«too many arguments passed (3) - 1 params expectedā¤current instr.: 'parrot;A;BUILD' pc 136 (EVAL_20:64)ā¤Ā» | ||
shinobi-cl | rakudo: class A { submethod BUILD { say 'constructor'; } }; my $something = A.new; | 02:48 | |
p6eval | rakudo 087e29: OUTPUTĀ«too many arguments passed (3) - 1 params expectedā¤current instr.: 'parrot;A;BUILD' pc 136 (EVAL_20:64)ā¤Ā» | ||
diakopter | ruoso: it seems to me that it would need to be all-or-nothing either way (in order to get all the compiler/interpreter/runtime phases/models to match up in the least...): either the perl5 runtime (embedded, concurrent, whatever) is able to access absolutely everything in the perl6 runtime (so essentially the perl6 implementation *is* in/beside the perl5 engine), *or* the perl6 runtime fully re-implements perl5 so that its Perl 5 is slightly-diet (less su | 02:51 | |
argh; truncated again, didn't it | 02:52 | ||
.. its Perl 5 is slightly-diet (less sugary) Perl 6... | |||
dietperl | 02:53 | ||
ruoso | well, I think for Inline code there isn't much a reason for not implementing a specific parser | ||
but my plan for SMOP do include merging it inside p5 | |||
diakopter | that was my understanding | 02:54 | |
(albeit rudimentary) | |||
(my understanding, that is) | |||
02:55
alc joined
|
|||
shinobi-cl | i dont get it.... what im doing wrong? | 02:55 | |
frioux | what exactly does $foo ~~ Whatever mean? | 02:56 | |
rakudo: 0 ~~ Whatever | 03:00 | ||
rakudo: '' ~~ Whatever | |||
rakudo: 'frew' ~~ Whatever | |||
p6eval | rakudo 087e29: RESULTĀ«0Ā» | 03:01 | |
frioux | rakudo: nudef ~~ Whatever | ||
rakudo: undef ~~ Whatever | |||
p6eval | rakudo 087e29: OUTPUTĀ«Could not find non-existent sub nudefā¤current instr.: '_block14' pc 79 (EVAL_16:41)ā¤Ā» | ||
rakudo 087e29: RESULTĀ«0Ā» | |||
frioux | rakudo: (undef ~~ Whatever).perl | ||
p6eval | rakudo 087e29: RESULTĀ«"0"Ā» | ||
frioux | rakudo: ([] ~~ Whatever).perl | 03:02 | |
p6eval | rakudo 087e29: RESULTĀ«"0"Ā» | ||
frioux | rakudo: ('frew') ~~ Whatever | ||
diakopter | ruoso: I guess I'm more than a tiny bit worried/curious that nested-Perl 5 requirement will go away... are there tests for it in t/spec ? (no) | ||
p6eval | rakudo 087e29: RESULTĀ«0Ā» | ||
frioux | rakudo: ('frew',1) ~~ Whatever | ||
p6eval | rakudo 087e29: RESULTĀ«0Ā» | ||
ruoso | diakopter, I don't think It'll go away... I just think it will be very implementation-specific | ||
frioux | rakudo: my $f; $f ~~ Whatever | 03:03 | |
p6eval | rakudo 087e29: RESULTĀ«0Ā» | ||
frioux | how is that ever true? | ||
diakopter | ruoso: I mean, it would have to be more further specified which v5? 5.000 by default? | ||
frioux | rakudo: sub foo($bar = *) { $bar ~~ Whatever; }; foo() | 03:04 | |
p6eval | rakudo 087e29: RESULTĀ«1Ā» | ||
frioux | rakudo: sub foo($bar = *) { $bar ~~ Whatever; }; foo(1) | ||
p6eval | rakudo 087e29: RESULTĀ«0Ā» | ||
frioux | weird. | ||
03:04
shinobi-cl left
|
|||
ruoso | diakopter, I'd argue "the version of p5 installed"... but that wouldn't make sense for parrot | 03:04 | |
frioux | rakudo: sub foo($bar = *) { $bar ~~ Whatever; }; foo(1,1) | ||
p6eval | rakudo 087e29: OUTPUTĀ«too many arguments passed (2) - at most 1 params expectedā¤current instr.: 'foo' pc 84 (EVAL_17:50)ā¤Ā» | ||
diakopter | ruoso: ... nor any implementation I can imagine that would be embedding a parser... is it { use v5 "for the sake of easy copy-paste"; } or { use v5 "for the sake of something_else I can't think of"; } | 03:06 | |
I mean, if it's just Inline for the sake of doing interesting FFI or some kind of speedup, then some other API (or syntax, or something) should make that easier... but if it's just Inline for easy copy-paste, then.... I don't see the point. I'm sure this is an ignorant question. | 03:08 | ||
frioux | why do all the methods in Any-str.pm in the setting have mutli? | 03:11 | |
just in case or something? | |||
diakopter | I mean, I can imagine the billions of lines of Perl 5 code out there in .pl and .pm files and inside database records and inside code generators written in Perl or other languages, and someone needs to do some modification, and decides to use Perl 6, so they create a fancy shmancy Perl 6 wrapper/interface to the existing code... I guess I'm having a hard time imagining a good use case for Inline::Perlv5PointWhatever. I'm not saying there isn't one, I ju | 03:12 | |
Inline::Perlv5PointWhatever. I'm not saying there isn't one, I just don't see it at the moment | 03:13 | ||
but if we're saying that { use v5; } exists to allow writing *new* code in Perl 5 for a Perl 6 implementation, then I again don't see the point... because why would one do that? Okay, if something is going to be easier/faster/neater/smokier/greener to write in Perl 5 over Perl 6, then doesn't that mean the redesign wasn't worth it? | 03:17 | ||
03:17
ihrd joined
|
|||
ihrd | rakudo: ::?CLASS | 03:17 | |
diakopter | or could it just mean that someone is having difficulty switching their mind from Perl 5 mode for the time being and doesn't want to look up the Perl 6 way of doing it for a minute/while... | ||
p6eval | rakudo 087e29: OUTPUTĀ«ResizablePMCArray: Can't pop from an empty array!ā¤current instr.: 'parrot;Perl6;Grammar;Actions;typename' pc -3011976 ((unknown file):-1)ā¤Ā» | ||
ruoso | diakopter, I think it's more of an exercise of being able to inline whatever code | 03:18 | |
not just Perl 6 | |||
Perl 5 | |||
but maybe Python | |||
Java | |||
or whatever | |||
diakopter | that line of reasoning argues for the need-to-embed-desugarers-for-all-those-languages-to-Perl-6 eventuality | 03:19 | |
ruoso | it might make sense because a language might require a type hierarchy that is diverse from Perl 6 | ||
so writing a small snippet in other language is easier than doing all the conversions | |||
that applies very well to Java | 03:20 | ||
and might apply to p5 | |||
diakopter | ok, but that use case implies that the Java->Perl6 desugarer would need to re-implement the JVM type system in the desugaring process | ||
ruoso | yes | 03:21 | |
but that's not a big deal, | |||
since most of the Java core classes are written in java | |||
see GNU Classpath | |||
diakopter | seems to me it'd be a big deal | ||
I mean, being able to switch syntaxes is one thing.. but semantics? down to the thousands of backwards-compatible corner cases of a foreign language? | 03:22 | ||
yes, I can see how switching out parsers could be done reliably | 03:23 | ||
but not reimplementing or generating all the glue interfaces | 03:24 | ||
ruoso | it's unexplored territory actually | 03:25 | |
it needs to be stressed out at some point | |||
diakopter | my thought is that *to do it right*, you'd need a language/interpreter system that literally is not "optimized" at all. all is malleable/hookable at runtime, all the abstractions are hierarchical, and the entire language system is generalized enough to encompass all other languages' semantics. in the ideal case. of course, it's not an unapproachable ideal. That is, the direction toward that ideal is decently sketched. | 03:26 | |
other languages' semantics. in the ideal case. of course, it's not an unapproachable ideal. That is, the direction toward that ideal is | 03:27 | ||
decently sketched. | |||
I need to press Enter more often | |||
or less often, I guess :) | |||
diakopter sighs and goes back to throwing rocks from a glass house built on sand. | 03:29 | ||
ruoso | diakopter, there is a barrier in Perl 6 that not many other languages support | ||
actually, I'm not aware of any | |||
which is that the object internal repesentation is not assumed | |||
that provides an incredibly high level of interoperation | 03:30 | ||
diakopter | reword/restate plz? | ||
ruoso | in theory, | ||
you can define a class in Perl 6 | |||
a full-blown hierarchy | |||
and say | |||
MyClass.bless(Glib.CREATE) | |||
and you'll have a Glib object that works with your class | 03:31 | ||
meppl | good night | ||
diakopter | meppl: g'night | ||
meppl | ;) | ||
diakopter | ruoso: trying to understanding how your example congeals | 03:33 | |
trying to understand | |||
frioux | like blood? | ||
diakopter | coalesces. | ||
frioux | I like congeal better...it's more visceral :-) | ||
skids moans | 03:34 | ||
frioux | ? | ||
03:34
meppl left
|
|||
ruoso | In Java, for instance, both Class and Object have their internal structure assumed | 03:34 | |
wayland76 | Maybe he doesn't like thinking about congealing blood | ||
skids | That was a particularly bad pun, is all. | ||
ruoso | so the Java language can't really work with foreign objects | ||
frioux | hahaha, that's not hard | ||
wayland76 | pun? | ||
I missed it | 03:35 | ||
frioux | congeal, visceral | ||
skids | visceral, viscous? well, I guess I hallucinated it. | ||
frioux | not really a pun, but kinda related | ||
hahaha | |||
nice | |||
ruoso | in Perl 6 you have: "The representation", "the Metaclass" and the "class" | ||
wayland76 | *now* it's funny :) | ||
ruoso | all that to deifine the object | ||
diakopter | alright, the context (a type system unto itself) defines the representations, right? | 03:36 | |
wayland76 | ruoso: We are listening; thanks :) | ||
ruoso | diakopter, Perl 6 uses p6opaque by default | ||
Perl 5 would use a SV* of some sort | |||
Java would use java object | 03:37 | ||
and so on | |||
and as long as we get the APIs right | |||
you can interoperate them | |||
diakopter | right, even with "out " parameters and concurrency and shared memory and such, if it's done right. | 03:38 | |
as long all the necessarily permuted type converters are defined/generated. | |||
ruoso | exactly | ||
the point of embedding a different language | |||
would be to require less conversions | 03:39 | ||
because you would have a single entry point and a single output | |||
instead of trying to convert arguments and return values for each individual call | |||
diakopter | hrm. | 03:41 | |
so the Inline block has access to its sibling lexicals through what symbols? | |||
diakopter thinks again about MyClass.bless(Glib.CREATE) | 03:43 | ||
ruoso | well... in theory, the compiler has to detect that the symbol being used is declared outside the scope | 03:44 | |
which means that that value have to be interfaced | |||
diakopter follows you so far | |||
ruoso | and provide an inner version of that symbol already type-mapped | 03:45 | |
diakopter | ... which implies that the Inline block can't be "compiled" until runtime, unless you set up universal runtime converters | ||
casters | |||
for non-dynamic type systems | 03:46 | ||
I guess kinda like a bvalue, but importingtype-shifting. | |||
well, it definitely can't be type-checked in the traditional pre-runtime sense. | 03:47 | ||
ruoso | but that's what a dynamic language is about, isn't it? | 03:48 | |
making all that checkings as late as possible | |||
at least one thing we can be sure.... | |||
diakopter | although, frankly, I haven't seen very much (any) Perl 6 code (or chatter) that employs such dynamism... it seems that optional typing lends itself to typed objects staying that type for life, but non typed objects remaining... untyped. | 03:49 | |
ruoso | diakopter, think about runtime mixins | ||
that's life-changing | |||
diakopter | ... aside from trivial context-inference and language-defined representations | 03:50 | |
diakopter thinks about runtime mixins, and expects my life to be changed. | 03:51 | ||
;) | |||
sure, that "just" necessitates "type" (mmd decisions) recalculated at each change..... but the primitive types of the various languages should be able to be interfaced somewhat trivially. I mean, you can always intercept *every* method invocation in your hosted runtime :P | 03:53 | ||
(isn't that what you'd have to do?) | 03:55 | ||
ruoso | not really | 03:56 | |
in the case of SMOP and P5 integration | |||
the idea is making the invocation completely delegated | |||
to wherever the object came from | |||
no need to have a SV* with the pointer address stored as an int | 03:57 | ||
diakopter | hm. | 03:58 | |
ruoso | I need a modified p5 to do that | ||
but it's not a huge modification | 03:59 | ||
I just need to add a new member on top of SV | |||
I presume the same could be done with python (at least the stackless version) | |||
and probably smalltalk | 04:00 | ||
diakopter | the CLR gets something comparable with .net4 - a special delegate type whose constructor is lazy/calledback, even outside the managed env | 04:01 | |
so you really could write your program inside-out/backwards. | 04:02 | ||
ruoso | except that in SMOP it's not specific to constructors | 04:03 | |
it applies to absolutely any method call | |||
diakopter | right, but also re-entrant, so the constructor *is* the type manager. | 04:04 | |
since it can declare all its members as callbacks to its own continuation | |||
ruoso | well... it can do whatever it wants... | ||
diakopter | right, that's what I'm saying, *I think* | ||
lol | |||
^!bed | 04:05 | ||
ruoso | btw | 04:06 | |
diakopter, that syntax in SMOP means a call supposed to be intercepted by the representation | |||
;) | |||
diakopter | yah | 04:07 | |
tycho's object/actor system hooks the object/invocation system analogously. | 04:09 | ||
I'm finding I prefer APIs over syntax. | 04:11 | ||
is that bad? | 04:14 | ||
PerlJam | diakopter: what's the difference? | 04:15 | |
diakopter | to me, some languages have syntax for things that can be expressed in an API that implements the "language feature" (the syntax) using other more-primitive parts of the language... in other words, the syntax can be desugared to a subset of the same language. so, the syntax isn't really an intrinsic part of the language; it's an extension of some smaller version of the language. | 04:18 | |
... reducing that logic further leads to the idea of finding the smallest subset of a language that can't be refactored into itself | 04:19 | ||
into an implementation on itself, I mean | |||
wayland76 | diakopter: It means you're becoming a Python programmer | 04:20 | |
diakopter | the portion of the language requiring bootstrapping | ||
oh? | |||
diakopter muses | |||
wayland76 | no, wait, I'm wrong | ||
en.wikipedia.org/wiki/One_instructi...t_computer | 04:21 | ||
diakopter | but it also implies that a decent way to bootstrap a language might be to work "backwards" from the sugary tips | 04:22 | |
s/implies/suggests/ | |||
wayland76 | But seriously, it does sound like a Python or PHP sort of thing to do (doing most things via API) | ||
Now, have I missed something? I don't want to stop your musing, in case it's useful :) | 04:23 | ||
diakopter | to clarify, I'm finding I like the wordiness of APIs because they're clearer to me (and newcomers) than syntax. I mean, golfing is fun to study and play, but I don't think I'm in the minority of developers when I say that it's much easier [for others (and self!)] to comprehend/maintain/support code that isn't golfed (golfable?). | 04:26 | |
I mean, of course it's more fun for those who equate fun with challenging. | |||
wayland76 | Well, that's true | 04:27 | |
There are a number of factors involved here | |||
The first is, if you have mostly not-so-bright developers, then yes, you're better off with a more B&D language like Python or Java | |||
diakopter | ruoso: ^!bed ended up being a trampoline :P | ||
it doesn't have to be not-so-bright... just not-as-bright-as-golfers | 04:28 | ||
wayland76 | There are a number of advantages to Perl, though, that can be beneficial if your people can handle them | ||
diakopter | afk :D will comment l8r | 04:29 | |
frioux | speaking of, what do you guys think about using advanced techniques with "not-so-bright" devs? | ||
for example, before I came to my current job they never used map | |||
wayland76 | One example is that it teaches you new programming methods. For example, after I learned Perl, I started doing a lot more with hashes of subs. | 04:30 | |
Which can sometimes eliminate redundant code that would be hard to remove otherwise | |||
(without creating a separate class for each) | |||
I also made myself learn regex, and the benefits paid off | 04:31 | ||
frioux | hurray for anonymous subroutines :-) | ||
s1n | i am of the opinion that new neural pathways must always be forged and the search for a better way to do things must never end. if it does, you have resigned yourself to a long wait to retirement and will make coworkers miserable for having to review your code | ||
that's not positive, but i loathe people who "do it for the money" | |||
wayland76 | I like Perl because, while I like the control-freakness of other languages, they don't do things the way *I* like, whereas perl lets me :) | ||
frioux | s1n: haha, but it's not (in my experience) hard to win over the people who do it for something other than the love of coding/learning | 04:32 | |
wayland76 | s1n: agreed, with the exception that I wouldn't use the label "do it for the money" | ||
s1n | i've worked with both kinds, and generally, the aforementioned group is the type to refuse to learn basic things like map | 04:33 | |
that to me is unacceptable | |||
wayland76 | map isn't an advanced technique :) | ||
frioux | wayland76: for people who are used to c it is | ||
s1n | wayland76: that was a shorthand, i was referring to people who treat it like a 9-to-5 and don't care how or what they do | ||
wayland76 | frioux: It depends to me how readable it is. For example, if you're using things that others may not be familiar with, put in as many parens as needed to make things clear :) | 04:34 | |
frioux | wayland76: agreed. I have just been mulling over it for a while | ||
s1n | i will forgoe readability at the cost of greater flexibility any day of the week | ||
i have no sympathy for coworkers who dislike code "because it's hard" | |||
frioux | because when a co-worker came to me a month after I wrote a hash of subroutines and asked what the deal was I started to wonder if it was a bad idea or not | ||
PerlJam | wayland76: the really big thing about perl is that it doesn't constrain you to doing things in whatever ways the language designer decided things should be it done. It let's you tailor your solution to the actual problem by whatever means are useful. | 04:35 | |
Java is a good example of a language that constrains you to think about and solve problems in a particular way rather than in the "natural language" of the problem you're trying to solve. | |||
wayland76 | PerlJam: That's right, but I think we should apply our own constraints | 04:36 | |
PerlJam | (python is another weaker example) | ||
wayland76 | Btw, you may all be interested in www.perl.com/doc/FMTEYEWTK/sort.html | ||
PerlJam | tchrist still lives! | ||
wayland76 | (Tom and Randal were big in the Perl community in the early years) | ||
s1n | frioux: a similar story: i was given grief before because i made use of coderefs for parameters because it "could be hard to read and understand", i drew the line there and said "then pick up a book" | 04:37 | |
wayland76 | Anyway, diakopter, does this help? | ||
frioux | s1n: I just told my co-workers that I assumed that they are smart and can figure it out :-) | ||
PerlJam | wayland76: did you just relegate them to a footnote? :-) | ||
s1n | frioux: my typical response: link to perldoc :) | ||
frioux | well, they know how to look it up on perldoc | 04:38 | |
they are willing to learn | |||
they just care about somethings more than coding | |||
see, I am learning and writing perl6 | |||
they are reading about politics, playing video games, and raising children | |||
s1n | blah | ||
frioux | I won't criticise them for their choices, but I won't coddle them for them either | 04:39 | |
the latter them being the choices | |||
wayland76 | PerlJam: Sort of, just in case anyone here is too perl-young to remember them :) | ||
PerlJam | Randal still does IRC you know. | ||
Though he's on #git and #seaside (I think) these days rather than #perl | 04:40 | ||
s1n | the mind is a terrible thing to waste, but that's coming from a 3rd year so i spend all day long learning basically :) | ||
frioux | haha, yeah | ||
wayland76 | Well, Tom is still on p6l, and chipped in on a big Unicode argument a couple of months back | 04:41 | |
And his name is on the front of Programming Perl too :) | |||
frioux looks forward to Programming Perl 6 | |||
PerlJam | yeah, he rarely participates though. I guess he's tired of emitting all of that prose ;) | ||
s1n | wayland76: and about 2 dozen of some highly critical modules | ||
frioux | is Damian still around? | 04:42 | |
I read that he does stuff but all Ive seen is the latest OSCON | |||
wayland76 | They're still around, but I remember when the only big names were Larry, Tom, and Randal | ||
s1n | frioux: he did oscon 2008 | 04:43 | |
frioux | s1n: yeah, but he hardly spoke of perl6 | ||
which is cool | |||
but still | |||
PerlJam | wayland76: you must be an oldster. | ||
wayland76 | I haven't seen Damian recently, but Larry says that he's still responsible for the POD spec | ||
Not that old. 32 :) | |||
But I was on clpm when I was 19 | |||
s1n | frioux: the tiny perl6 book oreilly made talks about how p6 is a shift from the old gaurde to the new, those guys were the old | 04:44 | |
PerlJam | cool. | ||
frioux | I never saw that book | ||
I thought it was too soon to make a book | |||
so I didn't buy it | |||
wayland76 | is that perl6 and parrot? | ||
s1n | they made one like 2 years ago lol | ||
frioux | exactly | ||
PerlJam | wayland76: I've been programming in perl since 1992 or so. I'm an oldster (but not that old!) :) | ||
s1n | it talks about PASM and some PIR, pretty dated now | 04:45 | |
wayland76 | I didn't get on the 'Net until '95 | ||
PerlJam | s1n: It's still a fairly good reference on some parrot things. | ||
s1n | first half was about new culture/development and new changes from p5 | ||
PerlJam | s1n: most of the ops haven't changed for instance. | ||
s1n | PerlJam: yes, i agree, i used it several times | ||
wayland76 | But at that point, I already knew BASIC, Pascal, x86 ASM, and a tiny bit of FORTRAN | ||
PerlJam | (assuming you're talking about "Perl 6 and Parrot Essentials" | ||
) | |||
s1n | PerlJam: yes, i am | 04:46 | |
PerlJam | and not the older, more outdated book :) | ||
s1n | i bought the first edition immediately, never got the second, waiting for a third :) | ||
wayland76 | I'm waiting for Parrot not to be essential :) | ||
s1n | wayland76: that's not nice | ||
don't bite the hand that feeds you :) | |||
besides, PIR isn't that bad | 04:47 | ||
wayland76 | Well, you know what I mean -- I'm waiting for it to just work, so I don't need to know about it, except in a "I use Linux" sort of way :) | ||
frioux | wayland76: agreed | ||
I love the idea of parrot | |||
wayland76 | (and I've had a kernel patch accepted :) ) | ||
frioux | but I hate having error messages from it :-) | 04:48 | |
PerlJam | s1n: I always describe PIR as the "perl of assembly languages" :) | ||
s1n | PerlJam: that's not bad, but it's only barely an assembly language | ||
i've done assembly work before and it provides _lots_ of shortcuts and shorthands that you rarely get in languages like MIPS assembler | 04:49 | ||
wayland76 | Parrot VM: PANIC: Out of mem! | ||
s1n | wayland76: poor error messages does not constitude poor product quality | ||
frioux | I didn't say it was bad code | ||
wayland76 | That's what I get for modifying code I don't understand :) | ||
frioux | I just don't *like* the error messages | ||
vs perl 5 | 04:50 | ||
nice, palateable, helpful errors :-) | |||
s1n | frioux: and how long as perl5 had to evolve? | ||
frioux | haha, point taken | ||
s1n | give parrot time and patience, it will shine | ||
frioux | Oh I am sure it will | ||
I hope that all the other langs start using it too | |||
PerlJam | frioux: you know ... TimToady has been putting some really good error messages and such in STD.pm. I was contemplating adding them to rakudo the other day (I just have to find time) | 04:51 | |
frioux | wouldn't it be great if the ruby guys just gave up on all their speed and memory issues because of their weird impl and used parrot? | ||
s1n | an avalanche is often started by the shifting of a single snowflake :) | ||
frioux | PerlJam: I know, I saw that, and I have had good experience with some of the errors in perl 6 | ||
but when it gets to parrot I just know that something is wrong | |||
PerlJam | frioux: experience will teach you what's wrong :) | 04:52 | |
frioux | I'm sure it will :-) | ||
at work I do a ton of javascript and the errors there are useless | |||
so I know what it's like | |||
and you get used to it | |||
PerlJam | experience and stack traces anyway :) | ||
frioux | but you never like it | ||
right | |||
wayland76 | Btw, as far as shifting error messages to rakudo, it's my impression from the ROADMAP that the possibility of using STD itself isn't too far away | 04:53 | |
frioux | that would be awesome | ||
wayland76 | github.com/rakudo/rakudo/blob/ea328...cs/ROADMAP | 04:54 | |
Actually, maybe I'm wrong | |||
But it seems like once they get M1 done, it'll be a lot closer | |||
frioux | btw, our on a class method just means not a private method, right? | 04:55 | |
in other words a public method | 04:56 | ||
s1n | frioux: isn't adding our to a method redundant? ! turns it private, otherwise it's public right? | ||
TimToady | our on a method now aliases it into the current package, my into the current lexical scope | ||
otherwise no alias is made | 04:57 | ||
and only the metaobject knows the method | |||
wayland76 | sort of like "is export to package"? | ||
frioux | and the package just happens to be the class? | ||
TimToady | yes, only your own package | ||
yes | |||
frioux | gnarly. | ||
TimToady | a class is a module is a package | ||
frioux | right | ||
TimToady | except for the meta bits :) | 04:58 | |
wayland76 | Oh :) | ||
That answers my next question :) | |||
frioux | lame. I just got logged out of my blog because it's midnight | ||
s1n | TimToady: i thought my was replaced with ! | ||
TimToady | for declaring private methods, yes | ||
PerlJam | TimToady: and what does package Foo; class Bar { our method baz { ... } } # do ? :-) | 04:59 | |
TimToady | if you say my method foo you've got a normal method with a lexcial alias of &foo that can be called as a sub | ||
s1n | is a normal method public? | ||
TimToady | create a &Foo::Bar::baz subroutine | ||
along with a method in the Bar class metaobject | 05:00 | ||
yes, public | |||
wayland76 | s1n: I'm not sure whether you've gotten TimToady's careful distinction between public/private vs. export & scope | ||
(maybe not scope) | |||
(something, anyway :) ) | |||
s1n | i probably haven't | 05:01 | |
frioux | TimToady: do you know where you said that thing about the STAR language which would just DWIM? | ||
TimToady | yes, has one verb * that does exactly what you want | ||
I think I got the language from Hofstadter | |||
PerlJam | Hofstadter++ | 05:02 | |
frioux | interesing; which book? I didn't think it was in GED | ||
TimToady | but we only use * for nouns in Perl 6 :) | ||
frioux | either way, it's clearly the inspiration | ||
wayland76 | I haven't read it, but I have it near my bed | ||
TimToady | seems to me it was GEB | ||
frioux | maybe I should read it again. | ||
it's been 4 years | |||
wayland76 | I heard a similar idea in my first year linguistics class | 05:03 | |
TimToady | it's been a lot longer for me :) | ||
frioux | haha | ||
TimToady | well, degenerate cases are always somewhat enlightening | ||
though not always useful | |||
I'm reminded of the cartoon | |||
Gigantor | |||
frioux | never heard of it. | 05:04 | |
TimToady | where the controller had maybe two buttons on it | ||
wayland76 | "No, no, you're saying it in the nominative case. You need to use the degenerative case" | ||
:) | |||
TimToady | but they always did just what the hero wanted | ||
frioux | ah, got it | ||
TimToady | Gigantor being the robot that obeyed the buttons | ||
frioux | right | ||
TimToady | one button must have meant "warmer" and the other one "colder" :) | 05:05 | |
frioux | TimToady: can you explain how * is related to Whatever? | ||
TimToady | Whatever is the *type* of * | ||
frioux | I was looking at some code today and it was....strange | ||
05:05
awarefish joined
|
|||
TimToady | so ~~ Whatever will almost always be false | 05:05 | |
since most types don't *do* Whatever | |||
frioux | ahhhhh | ||
that explains it | 05:06 | ||
TimToady | however any multi can write some cases in terms of type Whatever | ||
and * produces the Whatever value that lands on that multi case | |||
so ~~ * matches anything | |||
wayland76 | I'm not sure we should be allowed to do that to English :) | ||
TimToady | but the multi is written sub foo (Whatever, Whatever), not (*,*) | ||
since it's matching the type | 05:07 | ||
frioux | interesting | ||
what abut sub ($foo = *) ? | |||
that's slightly different right? | |||
TimToady | that would just default $foo to * | ||
which can be a bit of a problem if you are not expecting to get dwimmery back from the sub | 05:08 | ||
frioux | rakudo: sub foo($bar = *) { $bar ~~ Whatever; }; foo() | ||
p6eval | rakudo 087e29: RESULTĀ«1Ā» | ||
frioux | rakudo: sub foo($bar = *) { $bar ~~ Whatever; }; foo(2) | ||
p6eval | rakudo 087e29: RESULTĀ«0Ā» | ||
TimToady | it's really a type of currying, so * + 1 ends up returning a closure | ||
which is a kind of type failure if you were expecting a Num, say.... | |||
frioux | interesting | 05:09 | |
TimToady | so generally you don't want to use * at too many removes from the dwimmery | ||
or it gets confusing | |||
frioux | haha, well ONE confused me | ||
but i figured it out | |||
TimToady | like feeding junctions to things that don't expect them | ||
frioux | also: gather and take are awesome, so thanks for that | 05:10 | |
TimToady | it might work, but you might have trouble explaining why.. | ||
you're welcome, was partly TheDamian's doing as well, iirc | |||
frioux | well, it's surprising that it wasn't already something you could do simply | 05:11 | |
TimToady | but it's a nice decoupling of co-routines from the sub call apparatus | ||
frioux | yeah | ||
TimToady | to the extend that I'm not sure P6 even needs official co-routines | ||
05:11
alc left
|
|||
TimToady | in fact, as soon as you have gather/take it seems like coro is a highly artificial restriction | 05:12 | |
but having lazy lists as an abstraction separate from co-routines and iterators helps a lot with that too | 05:13 | ||
05:14
ruoso left
|
|||
TimToady | remains to be seen whether we can get the p5 thinkers into that mindset, but lists seemed like the natural place to introduce laziness | 05:14 | |
frioux | well, I'd love to talk and listen more, but it's midnight here | ||
night all! | 05:15 | ||
TimToady | g'night | ||
they're dropping like flies in Texas, I guess... :) | |||
PerlJam | I'm still up! | ||
TimToady | I should know where you're located...Chicago? | 05:16 | |
PerlJam | Corpus Christi Texas :) | ||
TimToady | ah, well, at least it's not planet Houston | ||
I've been as close as San Antonio, I guess | 05:19 | ||
s1n | way too lay for those of us with a $DAYJOB :) | 05:21 | |
TimToady: btw, i grew up in austin, went to school in san antonio, and now live in dallas :) | |||
TimToady | well, Dallas, that's almost the middle of the country. :) | 05:22 | |
give or take a couple states | |||
s1n | not my favorite town | ||
bacek_ suspects that TimToady is XKCD author. | |||
s1n | another one bites the dust | 05:23 | |
bed& | |||
TimToady | if I were XKCD author I'd have known that you can end a Perl program with a right parenthesis | ||
bacek_ | Typos, just for conspiracy reasons :) | 05:24 | |
TimToady | 'sides, I take my theism seriously :) | ||
I doubt M. Munroe teaches sunday school... | 05:25 | ||
or plays drums in his church's worship band... | 05:26 | ||
bacek_ have no idea who are M. Munroe... | 05:27 | ||
05:28
justatheory left
05:37
ilogger2_ joined
|
|||
araujo | PerlJam, well, that depends, it could also be harder | 05:37 | |
:P | |||
wayland76 | News Flash: Sociologists have discovered that all wars are caused by Yak beards! | ||
pmichaud | will there be any need for "yacc"s after Perl 6? ;-) | 05:38 | |
wayland76 | Strangely enough, the only tool that will shave all yaks, and keep them shaven, is Perl 6, a programming language that has been years in the making | ||
TimToady | I rather suspect there's an endless feed of yaks available, if we want them | 05:39 | |
05:39
kate21de joined
|
|||
TimToady | and there will still be the problem of getting someone to pay us to shave them | 05:39 | |
PerlJam | That rather sounds like O.S.Card's "ansible" where if you imagine it to be, it is. | ||
(assuming I remember the Ender books well enough) | 05:40 | ||
wayland76 | Hmm. I imagine there's no ansible :) | ||
TimToady | my wife knows Scott Card, maybe we can get one from him | ||
wayland76 | Ah, to be a celebrity :) | ||
TimToady | actually, only has to do with her writing, not me being a celebrity, or him... :) | 05:41 | |
wayland76 | ok | ||
TimToady | she wrote fiction reviews for a rag he was editing at one point | ||
wayland76 | Well, I guess I'll give up my plans to be a Perl celebrity then :) | ||
TimToady | I do believe, like Card, that living one's life is a kind of sacrament | 05:43 | |
PerlJam | okay, it is now my bed time. Good night from the body of christ :) | 05:46 | |
PerlJam sleep & | |||
TimToady | heh | ||
night | |||
wayland76 | 'night | ||
pmichaud | PerlJam: you're in CRP itself, not annaville or calallen or somewhere bizarre like that? ;-) | ||
PerlJam | pm: Calallen is within the city limits. | ||
:) | |||
pmichaud | that's what all of the people who live there say, yes. :-) | ||
PerlJam sleep for real this time & | 05:47 | ||
05:59
ejs joined,
WootKit joined
|
|||
wayland76 | We have a FSNode type that does a portable path, with the path separators as / or \ or whatever, depending on the platform | 06:02 | |
Should we have a MultiPath type that will stringify multiple paths correctly, and join them with the environment variable separator? | 06:03 | ||
ie. /path/one:/path/two on Unix, and C:\path\one;C:\path\two on Windows? | 06:04 | ||
Or is that something for a library? | |||
06:15
awarefish joined
07:28
DemoFreak joined
|
|||
Matt-W | rakudo: my $str = "abc"; say $str.index('b'); | 07:32 | |
p6eval | rakudo 087e29: OUTPUTĀ«1ā¤Ā» | ||
Matt-W | rakudo: my $str = "abc"; say $str.index('f'); | ||
p6eval | rakudo 087e29: OUTPUTĀ«Use of uninitialized valueā¤ā¤Ā» | ||
08:09
Kimtaro_ joined
08:10
masak joined
|
|||
mikehh | rakudo (087e299) on parrot r37373 builds make test PASS make spectest FAIL Kubuntu Intrepid i386 | 08:11 | |
masak | nice. | ||
lambdabot | masak: You have 1 new message. '/msg lambdabot @messages' to read it. | ||
masak | @massage | 08:12 | |
lambdabot | wayland76 said 3d 10h 14m 59s ago: in regards to CPAN6, see cpan6.org/ and S22 :) | ||
moritz_ | mikehh: what exactly fails? | ||
masak | @clear | ||
lambdabot | Messages cleared. | ||
mikehh | t/spec/S02-literals/sub-calls.rakudo TODO passed: 16 | ||
moritz_ | that's not a FAIL | ||
mikehh | t/spec/S12-methods/instance.rakudo Parse errors: Bad plan. You planned 26 tests but ran 24. | 08:13 | |
thats why I get a FAIL | |||
moritz_ | that file was changed in r25813.. | 08:14 | |
mikehh | Failed 1/317 test programs. 0/9406 subtests failed - so not really a FAIL just bad test plan | ||
moritz_ | no, changed in r25809... | 08:15 | |
aye. TimToady removed 4 tests and decreased the plan by 2 | 08:16 | ||
pugs_svn | r25814 | moritz++ | [t/spec] fix plan in instance.t | ||
moritz_ | mikehh: thanks for notifying me | ||
08:18
finanalyst joined
|
|||
mikehh | I've been building parrot a few times a day and try to build rakudo against it when I do - even if the tests take half-an-hour :-} | 08:19 | |
szabgab | rakudo: my @x = (1, 2); say "@x = {@x.perl}" | ||
p6eval | rakudo 087e29: OUTPUTĀ«@x = [1, 2]ā¤Ā» | ||
szabgab | is there a way to reduce that further so I won't even have to write @x twice ? | 08:20 | |
08:20
ilogger2 joined
|
|||
masak | szabgab: put it in a sub. | 08:20 | |
szabgab | rakudo: my @x = (1, 2); say "@x = {@x.perl . @x.NAME}" | 08:21 | |
masak | szabgab: also, consider escaping the first @x, for future's sake. | ||
p6eval | rakudo 087e29: OUTPUTĀ«Statement not terminated properly at line 1, near ". @x.NAME}"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤Ā» | ||
masak | szabgab: ~ is concatenation nowadays. | ||
wayland76 | rakudo: my @x = (1, 2); say "@x = {@x.perl ~ @x.NAME}" | ||
p6eval | rakudo 087e29: OUTPUTĀ«Method 'NAME' not found for invocant of class 'Perl6Array'ā¤current instr.: 'parrot;P6metaclass;dispatch' pc 320 (src/classes/ClassHOW.pir:161)ā¤Ā» | ||
masak | oh, and NAME is not implemented yet. :) | ||
wayland76 | rakudo: my @x = (1, 2); say "@x = {@x.perl ~ @x.WHAT}" | ||
szabgab | masak, escaping ? oh please no, don't tell me I can't rely on @x not being interpolated | ||
p6eval | rakudo 087e29: OUTPUTĀ«@x = [1, 2]Arrayā¤Ā» | ||
masak | szabgab: sorry, my bad. | 08:22 | |
szabgab: it won't be. | |||
szabgab: not unless you write @x[] | |||
moritz_ | aye | ||
szabgab | ah | 08:23 | |
08:23
lambdabot joined
|
|||
szabgab | masak, so how would you get back the name of the original variable from a sub ? | 08:23 | |
wayland76 | phew :) | ||
rakudo: my @x = (1, 2); say "@x = {@x.perl ~ @x.name()}" | 08:24 | ||
p6eval | rakudo 087e29: OUTPUTĀ«Method 'name' not found for invocant of class 'Perl6Array'ā¤current instr.: 'parrot;P6metaclass;dispatch' pc 320 (src/classes/ClassHOW.pir:161)ā¤Ā» | ||
szabgab | WHAT only gives the type | ||
08:24
ujwalic joined
|
|||
szabgab | maybe we can have another method , eg @x.superl that will do that ? | 08:25 | |
moritz_ | rakudo: my @x = <3 4 5>; my $s = \(@x); say $s.perl | ||
p6eval | rakudo 087e29: OUTPUTĀ«["3", "4", "5"]ā¤Ā» | ||
moritz_ | rakudo: my @x = <3 4 5>; my $s = :(@x); say $s.perl | 08:26 | |
p6eval | rakudo 087e29: OUTPUTĀ«too few arguments passed (0) - 1 params expectedā¤current instr.: '_block14' pc 40 (EVAL_17:28)ā¤Ā» | ||
masak | szabgab: there's .VAR, but I'm not sure it does what you want either. | 08:27 | |
lambdabot | masak: You have 1 new message. '/msg lambdabot @messages' to read it. | ||
wayland76 | I can't find anything for getting the name | ||
masak | lambdabot: you're getting annoying now. | ||
@clear | |||
lambdabot | Messages cleared. | ||
szabgab | rakudo: my @x = (1, 2); say "@x = {@x.perl . @x.VAR}" | 08:28 | |
p6eval | rakudo 087e29: OUTPUTĀ«Statement not terminated properly at line 1, near ". @x.VAR}\""ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤Ā» | ||
szabgab | rakudo: my @x = (1, 2); say "@x = [@x.VAR}" | ||
p6eval | rakudo 087e29: OUTPUTĀ«@x = [@x.VAR}ā¤Ā» | ||
szabgab | rakudo: my @x = (1, 2); say "@x = {@x.VAR}" | ||
p6eval | rakudo 087e29: OUTPUTĀ«@x = 1 2ā¤Ā» | ||
szabgab needs coffein | |||
08:29
Tene joined
|
|||
wayland76 | Is that a coffin for French vampires? :) | 08:29 | |
(Yes, I know you meant caffeine) | |||
masak | language is hard, let's go shopping! | 08:30 | |
wayland76 | I remember there were some GI Joe dolls that apparently had that installed in their voiceboxes by accident | ||
szabgab | rakudo: sub coffin(@a){say @a.VAR}; my @x = (1, 2); coffin(@x) | 08:31 | |
wayland76 | Although the Barbies with macho voices were probably funnier :) | ||
08:31
renormalist joined
|
|||
p6eval | rakudo 087e29: OUTPUTĀ«12ā¤Ā» | 08:31 | |
masak | hasta la vista, Barbie! | ||
szabgab | wayland76, I was using Hungarian notation | 08:32 | |
actually that would be koffein I think | |||
wayland76 | And here was me thinking it was really just a typo :) | ||
08:33
jferrero joined
|
|||
mikehh | moritz_: that test passes now | 08:36 | |
Matt-W | Morning | 08:59 | |
masak lifts hat at Matt-W | 09:00 | ||
Matt-W | This morning's Form.pm progress report: I crashed Rakudo | 09:01 | |
masak | yay! | ||
that's the spirit. | |||
Matt-W | heh | 09:02 | |
but it's okay | |||
masak considers giving Matt-W a badge saying "I crash Rakudo today, so it won't crash for you tomorrow" | |||
Matt-W | I created RT #63826 | ||
masak | Matt-W++ | ||
Matt-W | lol isn't that your job? | ||
masak | I'm willing to share the burden. | 09:03 | |
or rather, I'm happy when others help parallelize the crashing. | |||
excellent bug report. short and to the point. | 09:04 | ||
09:04
sri_kraih_ joined
|
|||
Matt-W | it was nice and easy | 09:06 | |
I was delighted when it was reproducible with such a small test case | 09:07 | ||
masak | that's often the case. | 09:08 | |
I've been toying with the idea of reducing failures to minimal test cases with the help of Monte Carlo Markov Chain techniques. | |||
Matt-W | sounds like the kind of thing you could write a paper on | 09:09 | |
masak | now there's an idea. | ||
moritz_ | it took me ages to reduce RT #63596 to a small test case | ||
masak | moritz_: aye, looks involved. | 09:10 | |
I remember #62828 with fondness. | 09:11 | ||
moritz_ | and the 'my' was actually not intentional, so you can imagine how bad I felt after spending 20 minutes on isolating it :/ | ||
masak | the one thing you want cloned objects _not_ to do is change along with the originals! | 09:12 | |
moritz_: a good Perl 6 linter would catch that extra 'my'. | |||
moritz_ | masak: I look forward to it :-) | 09:15 | |
masak | moritz_: I'd tell you more, but I would have to kill you. ;) | 09:16 | |
let's just say I have more secret projects now than I'd like. | 09:17 | ||
Matt-W | I've started thinking about how to do word wrapping | 09:23 | |
moritz_ | masak: being killed doesn't exactly sound like -Ofun to me :-) | ||
Matt-W | Even pulling as many whole words off the front of a string as will fit into a given number of characters is potentially fraught with difficulty :( | 09:24 | |
Text is hard | |||
masak | moritz_: I think some AI database somewhere has a triplet saying "Dying is disadvantageous." I've always liked that phrasing. | ||
wayland76 | Have to port Text::Autoformat first :) | ||
Matt-W | wayland76: maybe | 09:25 | |
Certainly some of this background stuff could credibly go into another module | |||
masak | wayland76: I find that modules tend to bud off from other modules when the need arises. at least with my projects. | ||
I factor things out when two projects need the same code. | 09:26 | ||
and proto takes care of my build dependencies nowadays. | |||
Matt-W | I need a proper makefile.pl as well | 09:27 | |
at some point | |||
Matt-W grumbles about build systems | |||
masak | Matt-W: oh, it's no biggie. just let yourself be inspired by November or Druid. | 09:28 | |
wayland76 | Don't you have to write some code after? :) | ||
Matt-W | I looked at both of them | ||
neither seem to be appropriate | |||
masak | Matt-W: oh? please elaborate. | 09:29 | |
Matt-W | well I couldn't see anything that kicks off the test harness | ||
masak | no? | ||
masak gets link | |||
Matt-W | and it all seems to be assuming you have a parrot/languages/rakudo | ||
masak | Matt-W: aye. | ||
Matt-W | which I don't | 09:30 | |
I have a rakudo/parrot | |||
masak | oh. | ||
I see now. | |||
yes, that might actually be a problem. | |||
we need to standardize on something that allows both. | |||
please let's keep in touch about this. :) | |||
Matt-W | yes | 09:31 | |
but I got the implication there was stuff about test suites in it | |||
masak | as we speak, I'm reconfiguring proto to install Rakudo Vienna with Parrot in it by default. | ||
Matt-W | and I didn't see that | ||
masak | Matt-W: hold on. | ||
Matt-W thinks about work for a bit | |||
masak | Matt-W: github.com/viklund/november/blob/5d...ile.in#L24 | 09:32 | |
Matt-W | oh no I have a meeting in 28 minutes!!! | ||
prove? | |||
and I'm sure that bit wasn't there earlier | |||
Matt-W cleans his glasses | 09:33 | ||
masak | Matt-W: there's Makefile.PL and there's Makefile.in | ||
Matt-W | yes | ||
I see you compile everything to PIR | |||
masak | natuarlly. | ||
Matt-W | bet that speeds up test invocations | 09:34 | |
masak | s/ar/ra/ | ||
Matt-W: it does, and startup times too. | |||
Matt-W | so what's prove? | ||
masak | Matt-W: it's a Perl tool for running test suites. | ||
we just hijack it for Perl 6 tests. | 09:35 | ||
Matt-W | because the output format is the same | ||
right | |||
masak | search.cpan.org/dist/Test-Harness/bin/prove | ||
Matt-W | I'll go for that then | ||
I need to reorganise my tests a bit | |||
need one set for testing the data structures used for parsed fields | |||
moritz_ | newer prove's have the --perl option | ||
masak | Matt-W: I hope we'll be able to reach a consensus about this such that proto can install Form and run the tests on it. | 09:36 | |
Matt-W | oh yes I'm sure we will | ||
masak | great. | ||
Matt-W | the only reason my system is as it is at the moment is that I just threw it together to get something I could use | ||
and it's not great in any way at all | |||
but I wanted to write some code, not scream at make | |||
masak | aye. | ||
it'll get easier with time, as we get the tools. | 09:37 | ||
Matt-W | but we are going to need a Makefile.PL that can handle parrot-in-rakudo | ||
although does it really need to care | |||
it just needs to know where the perl6 fakecutable is | |||
masak | well, it needs to find Rakudo :) | ||
aye. | |||
Matt-W | so it doesn't need to know where parrot is | ||
masak | yes, if PARROT_DIR is set but RAKUDO_DIR isn't. | 09:38 | |
I sense there's a kind of fallback order here. | |||
Matt-W | unless there's some preference for using perl6.pbc over perl6 | ||
mmm | |||
what about if rakudo is in PATH | |||
masak | Matt-W: that should probably also be a fallback. | ||
the .pbc thing, that is. | |||
Matt-W: if Rakudo is in PATH, we still won't find Test.pm | 09:39 | ||
Matt-W | true | ||
masak | I think RAKUDO_DIR is sort of a minimal requirement. | ||
Matt-W | although really Test.pm should be findable through some sort of standard Perl 6 library location thingy | ||
:P | 09:40 | ||
masak | PERL6LIB, yes. | ||
but in order to set that automatically, we need RAKUDO_DIR | |||
Matt-W | mmm | ||
masak | or PARROT_DIR, and a heuristic for getting the Rakudo dir from that. | ||
Matt-W | if no RAKUDO_DIR, look in PARROT_DIR/languages/rakudo | 09:41 | |
if no PARROT_DIR either, erase the hard drive | |||
oh no, the other thing | |||
oh yes | |||
complain | |||
masak | right. | ||
Matt-W | no problem | ||
I can produce one for form that does that this evening | 09:42 | ||
for once I have no concerts or music lessons or aikido classes to go to tonight | |||
masak | cool. | ||
I'll see if I get the proto change in by then. | |||
Matt-W | :) | ||
I do intend Form to be proto-compatible fairly soon | |||
masak | it's about time it started targeting Parrot-in-Rakudo-Vienna. | ||
Matt-W | even though it won't be usable for some time | ||
Matt-W likes Configure.pl --gen-parrot | 09:43 | ||
takes the effort out of it | |||
masak | I'm not sure I can call any of my projects "usable" yet. :) | ||
perhaps Druid. | |||
Matt-W | although I'd like to be able to give -j2 to its make invocation | ||
heh | 09:44 | ||
well the plan is to get Form usable for basic things reasonably soon | |||
the text wrapping algorithm is the major difficulty right now | |||
masak | just keep it simple. | 09:45 | |
Matt-W | can always making it more elaborate later if necessary | ||
masak | aye. | ||
Matt-W | patches always welcome... | ||
:P | |||
masak | heh | 09:46 | |
Matt-W | I've got almost everything I need to find the last word break in the string and split there | ||
what I need is to deal with the case where there are no suitable breaks within the size of the field | 09:47 | ||
Matt-W suddenly realises he could do a much better job of this with a nice Perl 6 rule | 09:48 | ||
masak | rules rule. | 09:49 | |
Matt-W | oh yes | 09:51 | |
according to S05, << is a left word boundary, and >> is a right word boundary | |||
exactly what I need | |||
Matt-W sends himself an email to remind himself to do that | 09:52 | ||
I suppose I should be thinking about what to say in this meeting now | 09:53 | ||
See you later | 09:54 | ||
<- boring meeting & | |||
masak | Matt-W: \o | 09:56 | |
masak notices that he has started assuming dashes-in-var-names in Perl 5 | 09:57 | ||
moritz_ | hey, let's write a patch to allow that | 09:59 | |
moritz_ can imagine the outcries from #p5p | |||
I did a quick codesearch with google | 10:01 | ||
it wouldn't break compatilbility in normal code, since nearly nobody uses $var-subcall without spaces | |||
but in interpolation it's quite frequent | |||
=> no easy way to introduce that in perl 5. | 10:02 | ||
10:03
mberends joined
|
|||
masak | mberends: greetings. | 10:04 | |
mberends: I've finally started the review of the Pod suite. | 10:05 | ||
pmichaud++ expressed interest in seeing such a blog entry, so I got motivated to start it. | |||
mberends | masak: greetings. last night I confirmed all my bookings for Nordic Perl Workshop | ||
masak | mberends: excellent. | ||
I should do the same. :) | |||
mberends | all: I have booked a room at the Anker with 2 single beds (marginal extra cost), in case someone would like to share | 10:06 | |
masak | hm, sounds like a plan. how do I go about doing that? | 10:07 | |
wayland76 | perl5: $variable-14 | ||
:) | |||
moritz_ | notice that \w-\d isn't allowed in perl 6 variables either | 10:08 | |
mberends | ( afk $class ) | 10:09 | |
wayland76 | moritz_: That would solve it :) | 10:11 | |
moritz_ | wayland76: that solves it. | 10:13 | |
masak watches proto successfully download and build Rakudo Vienna | 10:15 | ||
10:18
shinobi-cl joined
|
|||
masak | here's how it looks: gist.github.com/78515 | 10:20 | |
moritz_ | that looks like a nice interface :-) | 10:21 | |
masak | we aim hard to please. :) | ||
moritz_ | I know some software that's written from psychologists for psychologists. Most of the target audience is pretty computer illiterate... | 10:22 | |
masak | next up, I think, will be progress bar dots showing how a download/build progresses. | ||
moritz_ | so all of the more frequent error messages are really soft formulated, with lots of "... but it's not so bad, we can fix it for you" and so on :-) | 10:23 | |
masak | moritz_: I think that might be a good idea in many cases. | ||
jnthn | good morning, all | ||
Rakudo day is here. | |||
masak | jnthn: good morning! Rakudo day! :) | 10:24 | |
moritz_ | YaY! | ||
10:26
shinobi-cl left
|
|||
masak | jnthn: what's planned for today? | 10:26 | |
jnthn | masak: pmichaud assigned me a flurry to tickets yesterday, which I plan to look through. | 10:27 | |
Also, he wanted me to do a small refactor on dispatchy stuff. | |||
I'm open to suggestions if you have any tickets that especially matter to you, though. | |||
moritz_ would very much like to see make() work in action methods | 10:28 | ||
but I guess that's a pmichaud topic | |||
jnthn | I thought we already did have an implementation of make? | ||
Though I may be mistaking a patch sent in for a patch applied.. | 10:29 | ||
masak | jnthn: I don't have anything critical that needs fixing right now. | 10:30 | |
10:30
rgs joined
|
|||
jnthn | masak: OK, cool. | 10:30 | |
masak | jnthn: but I did have two tickets that sort of resurfaced in my mind lately. will dig them out, and maybe we can at least talk about them. :) | ||
jnthn | OK, sounds good. | ||
jnthn tries to figure out how to make RT tell him what tickets are assigned to him, and realizes he needs coffee before much else... | 10:31 | ||
moritz_ | rakudo: grammar A { token TOP { . {*} } }; class AA { method TOP(*@a) { make 3; } }; A.parse('f', :action(AA.new)); | 10:33 | |
p6eval | rakudo 087e29: OUTPUTĀ«Method 'result_object' not found for invocant of class 'Failure'ā¤current instr.: 'make' pc 19145 (src/builtins/match.pir:39)ā¤Ā» | ||
moritz_ | jnthn: that's what I meant | ||
jnthn: the starting page ("RT at a glance") shows you the top 10 priority tickets assigned to you | 10:34 | ||
rgs has a quick question | |||
(hi there) | |||
moritz_ | hi rgs | ||
rgs | does/should undef ~~ 0 and undef ~~ "" match ? | ||
masak doesn't think so | |||
moritz_ thinks so | |||
masak | :) | ||
oh wait. | |||
moritz_ | rakudo: say undef ~~ 0 | ||
p6eval | rakudo 087e29: OUTPUTĀ«Use of uninitialized valueā¤1ā¤Ā» | ||
moritz_ | rakudo: say undef ~~ '' | 10:35 | |
p6eval | rakudo 087e29: OUTPUTĀ«Use of uninitialized valueā¤1ā¤Ā» | ||
moritz_ | so yes, both match | ||
rgs | ok, good | ||
masak | I've changed my mind. they should match. :P | ||
rgs | rakudo: say 0 ~~ undef | ||
moritz_ | rgs: the type of the RHS determines the comparison | ||
p6eval | rakudo 087e29: OUTPUTĀ«0ā¤Ā» | ||
rgs | moritz_: will do the same in P5 then. | ||
moritz_ | rgs++ | ||
masak | jnthn: the tickets are #60142 and #62730. incidentally, both have their roots in Parrot, I think. | ||
moritz_ | and ~~ undef is a negated test for definedness | 10:36 | |
jnthn | rgs: To quote the spec: Any Str string equality ~$_ eq X | 10:37 | |
What that's saying is that you co-erce the LHS to a string. | |||
Well, stringify it... | |||
And ~undef is "" | |||
And similar for the number case. | 10:38 | ||
I'd imagine an implementation can follow pretty directly from that definition, but then I don't know Perl 5 guts. ;-) | |||
moritz_ | actuall ~undef is ('' but Warning) :-) | ||
jnthn | moritz_: By Rakudo, or by spec? | 10:39 | |
moritz_ | jnthn: that wasn't entirely serious | ||
jnthn | Ah, OK. | ||
I was hoping you would point at the appropriate bit of the spec. :-P | |||
moritz_ | anyway, perl 5 has dualvars | ||
that's going to be ugly | |||
what kind of comparison will $stuff ~~ dualvar(3, 'b') do? | 10:40 | ||
rgs | in Perl 5 ? | 10:41 | |
moritz_ | rgs: yes | ||
in Perl 6 there are only junctions, and they have explicit comparison semantics | |||
rgs | numerical values have precedence | ||
moritz_ | ah, simple as that :-) | 10:42 | |
rgs | in guts terms, it will test for IOK / NOK first. | ||
wayland76 | I have a message for those who weren't sure about detecting different distros: linuxmafia.com/faq/Admin/release-files.html | ||
jnthn | masak: About 60142 | 10:44 | |
I think it's a Parrot bug. Allison IIRC did disagree with me. :-| | 10:45 | ||
10:45
AzureStone joined
|
|||
masak | jnthn: interesting. | 10:46 | |
as long as it gets fixed, you may disagree as much as you want about the cause... :) | |||
jnthn | masak: I'm trying to find the related ticket in Parrot... | 10:47 | |
Gah, can't. Hmm | 10:49 | ||
mberends | masak: Nice proto gist. Pegging a parrot svn revision is easy, but how to specify a particular (known good) Rakudo revision? | 10:50 | |
masak | mberends: during which stage? I'm not sure I understand the question. | 10:51 | |
jnthn | rt.perl.org/rt3/Ticket/Display.html?id=61224 | ||
masak | mberends: you mean in config.proto? I suppose by a sufficient amount of SHA1 hex digits. | 10:53 | |
mberends | when proto fetches the Vienna Rakudo, how to tell git to clone a specific rakudo version. | ||
masak | mberends: oh. it downloads the tarball. | ||
mberends | yes, the SHA1 is so bulky and not serial /sequential | ||
masak | I have a working patch here in a local branch. | ||
about to push now. | |||
mberends | ok | ||
cannot pull, sorry. $work has only mibbit this week. | 10:54 | ||
masak | no prob. | 10:55 | |
mberends: I hope to be able to finish the review of Pod during the weekend. I expect to fork you and send a lot of pull requests. | |||
mberends | ok, thanks. Would you like to share my Best Western hotel room 15-19 April? | 10:56 | |
masak | mberends: aye, gladly. how do I do that? should I contact the hotel? | 10:57 | |
jnthn | "I expect to fork you"..."would you like to share my hotel room"... | ||
<ducks> | |||
mberends | I booked a room with 2 single beds. You just have to wait until I check in, about 22:00 on 15 April. | 10:59 | |
11:00
pnu joined
|
|||
mberends | lunch & | 11:00 | |
masak | jnthn: *lol* | 11:01 | |
pnu | i've trouble building a fresh rakudo checkout on rhel5, any advice..? Building parrot (during perl Configure.pl --gen-parrot) seg-faults with Perl6Grammar.pir. | ||
masak | mberends: oh, so basically, everythings fixed, and we just split the cost of the room? | 11:02 | |
pnu: could you nopaste the make output? | |||
11:04
ruoso joined
|
|||
pnu | masak: here nopaste.snit.ch/15874 | 11:05 | |
moritz_ | that looks a lot like older parrot on amd64 with --optimize | 11:07 | |
lunch & | |||
masak | moritz_: that's just uncanny. | ||
how do you know those things? :) | |||
pnu | moritz_: Linux version 2.6.18-128.1.1.el5 (mockbuild@hs20-bc1-5.build.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) #1 SMP Mon Jan 26 13:59:00 EST 2009 | 11:08 | |
s1n | if it's amd64, why is it using "-march=i386" | 11:09 | |
ruoso | Hello! | ||
masak | ruoso: oh hai | 11:10 | |
wayland76 | ruoso: Was it you that was saying it'd be difficult to detect distros reliably? | 11:11 | |
ruoso | yes | ||
s1n | wayland76: if ruoso didn't say that, i raised that question in my response to a commit you made | ||
pnu | is there anything i can do to help with this..? | 11:12 | |
ruoso | wayland76, and also, the "distro" concept only makes sense in the Linux world | 11:13 | |
s1n | wayland76: that's why i recommend changing $*DISTRO back to OS (iirc that's how it's referred to in p6) | 11:14 | |
pugs_svn | r25815 | masak++ | [u4x/README] fixed typo | 11:15 | |
11:19
bacek joined
|
|||
ruoso | s1n, better than OS, ARCH | 11:20 | |
wayland76 | ruoso: Not sure I agree. I'd argue that the term "Operating System" is too ill-defined to be useful, and that just because Windows is the name of both a kernel and a distro is no reason to lose the distinction | ||
ruoso | OS is just a part of the ARCH information | ||
pnu | masak: oh i noticed this during parrot configure initialization: Determine JIT capability...p = 0x9323000 PAGE_SIZE = 4096 (0x1000) ... failure: Permission denied -- and thats selinux. Now it works. | ||
sorry for not disabling that awful thing (selinux), should've known that. | |||
ruoso | wayland76, The term DISTRO doesn't make sense in other operating systems as well | 11:21 | |
it actually only makes sense in Linux, basically | |||
wayland76 | Not BSD? | ||
I'd argue that the term "OS" doesn't make sense for Linux :) | 11:22 | ||
s1n | i'd argue otherwise | ||
unless you are in the "GNU/Linux" camp | |||
11:22
jferrero left
|
|||
s1n | and arch is useful, but does not imply OS | 11:23 | |
ruoso | wayland76, the term "OS" in linux *usually* means linux-gnu | ||
wayland76 | Well, I think the GNU/Linux people have a point; Linux is the kernel along | ||
ruoso | s1n, the OS information is part of the arch infromation | ||
s1n | ruoso: tell me what i'm running here then: Linux citadel 2.6.28 #3 SMP Fri Jan 16 22:13:42 CST 2009 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ AuthenticAMD GNU/Linux | ||
that's my actual uname information | 11:24 | ||
11:24
ejs joined
|
|||
ruoso | s1n, x86_64-linux-gnu | 11:24 | |
s1n | ruoso: that's not my os | ||
11:24
WootKit joined
|
|||
ruoso | exactly | 11:24 | |
s1n | or my distro | ||
ruoso | that's your ARCH | ||
s1n | so while that is useful, but it's not the os/distro | ||
ruoso | it contains both the CPU and the OS | ||
distro simply doesn't make sense outside of linux, so I don't think it's worth being spec | 11:25 | ||
11:25
WootKit left
|
|||
s1n | ruoso: my os is not "linux-gnu", sorry, that's completely worthless in linux | 11:25 | |
ruoso | s1n, er... worthless in what sense? | ||
that's what gcc uses | |||
for instance | |||
that's what binutils use | |||
s1n | doesn't mean anything to an application developer needing to know if you're redhat or opensuse | 11:26 | |
ruoso | s1n, that developer needs a library | ||
which is Linux-specific | |||
s1n | that developer is wanting that from $*DISTRO or $*OS | ||
i'm not saying arch isn't useful, but sometimes we need to go beyond that | 11:27 | ||
ruoso | s1n, do you actually realize how hard it is to figure out that? | ||
in a portable manner | |||
s1n | ruoso: yes, i do realize that | ||
ruoso | ok.. my point is... take that to a library | ||
wayland76 | I don't. See linuxmafia.com/faq/Admin/release-files.html | ||
ruoso | no reason to be part of the CORE | ||
wayland76 | ruoso may well be right about this not being part of the core though | 11:28 | |
s1n | ruoso: i might agree with that | ||
but i definitely don't like having $*DISTRO over $*OS | |||
ruoso | that's not what I meant | ||
I meant ARCH over OS | |||
11:28
WootKit joined
|
|||
ruoso | because ARCH *includes* OS information | 11:28 | |
wayland76 | Not as currently specced :) | 11:29 | |
s1n | ruoso: i'll take arch, but it doesn't include OS | ||
ruoso | s1n, "redhat" is not OS | ||
"linux-gnu" is | |||
s1n | nope | ||
ruoso | "linux-uclibc" is | ||
s1n | RedHat Linux | ||
ruoso | s1n, er... do you understand what the "linux-gnu" means in the arch triplet? | 11:30 | |
s1n | don't sully the good name of Linux by tacking on RMS's "GNU" | ||
wayland76 | ruoso: I think s1n just made my point about OS being too ill-defined :) | ||
ruoso | s1n, it's not about that | ||
it's about using the GNU Libc | |||
which redhat does | |||
s1n | ruoso: yes, i do understand that it's a flavor of the linux kernel, so what | ||
ruoso | IT'S NOT | ||
you have two things | |||
one is the kernel | 11:31 | ||
other is the userlevel library | |||
wayland76 | s1n: libc is a library that contains the basic C functions. It is *not* supplied as part of the kernel | ||
s1n | if you're referring to what gcc reports, sure | ||
wayland76 | ruoso: is it only libc, or some others? | ||
s1n | i have only ever talked about uname example | ||
ruoso | libc is the thing that defines the arch, yes | ||
s1n, that's because you're not hearing what I'm saying | |||
s1n | when i build a gentoo system, i can really mess things up, here's how: | 11:32 | |
i can use the binary linux kernel, build libc for say amd64 | |||
ruoso | *sigh* | 11:33 | |
s1n | then i can really dork it up by building a i386 kernel | ||
the more interesting case is the opposite | |||
ruoso | that's the CPU | ||
s1n | running the kernel built for amd64 with libc built for 386 | ||
wayland76 | Lets try this. (linux = kernel) (gnu = libc) kernel is pretty useless without libc. What do you call it when you use both these basic components? | ||
ruoso | that's the CPU | ||
the ARCH is CPU-PLATFORM-OS | |||
where PLATFORM is usually implied as "pc" | |||
s1n | i guess you've never built both 386 and amd64 libc's | 11:34 | |
ruoso | *sigh* | ||
you're simply not getting the point | |||
s1n | i am, you aren't | ||
i can have both | |||
11:34
WootKit left
|
|||
wayland76 | I think you're both not getting each other's points | 11:34 | |
ruoso | we are not arguing about CPU | ||
s1n | libc built for multiple platforms, which platform am i then? | ||
ruoso | s1n, at the platform your current binary is linked to | 11:35 | |
it cannot be linked to both libcs at the same time | |||
s1n | i have to go to work now though, continue without me | ||
wayland76 | ruoso: Does my point about certain words not being well-agreed-upon ring true :) | 11:37 | |
ruoso | s1n, was simply not reading anything I was writing | 11:38 | |
wayland76 | Having said that, I think s1n may have a better grip on things than Wikipedia :) | ||
ruoso: I think he was, just not carefully. I was arguing on both sides depending on the mood of the moment :) | |||
Anyway, there's a thunderstorm here, so I'm going to shut down my computers | 11:39 | ||
s1n | parting words, arch is useful only to the point of knowing what it was built against, not what the system truly is, which would be a nightmare to identify, talk amongst yourselves :) | 11:44 | |
11:44
ujwalic_ joined
|
|||
ruoso | s1n, you're still seeing DISTRO as OS... but these are different things | 11:45 | |
"RedHat" is not "OS" | |||
jnthn | .oO( Some discussions make the Win32 world seem oh so nice and easy. ) |
11:46 | |
;-) | |||
Does Perl 6 core really want to have to care about identifying distro? | 11:47 | ||
ruoso | I think it doesn't | ||
jnthn | IMO, that's something for a 6PAN module. | ||
ruoso | that's my point about DISTRO | ||
jnthn | As a Perl 6 implementer, keeping up with distro detection is *not* something I want to have to care about. | ||
Not to mention the cases where you'd need that level of info feel to me few and far between. | 11:48 | ||
ruoso | my point is: the only thing you can really know is the arch triplet | ||
so I argue for using $?ARCH, $?XARCH and $*ARCH | 11:50 | ||
rgs | xarch ? | ||
ruoso | cross compilation | 11:51 | |
$?ARCH is the target arch | |||
$?XARCH is the host arch | 11:52 | ||
$*ARCH is the current arch | |||
rgs | good | ||
11:55
ujwalic left
11:58
ejs left
|
|||
pnu | i'm sorry this is such an open topic, but what's a good stating point if i want to contribute to rakudo project..? I'm experienced with perl but don't have clue about parrot etc. I read somewhere that some perl6 features could be implemented to rakudo in perl6 already? | 12:00 | |
moritz_ | pnu: they can. See rakudo.org/2009/02/rakudo-built-ins...be-wr.html for example | 12:02 | |
pnu: also read rakudo.org/developers-guide | 12:03 | ||
12:04
kanru joined
|
|||
pnu | moritz_: yes, that was it.. ok, thanks. | 12:05 | |
pugs_svn | r25816 | jnthn++ | [t/spec] Tests for using roles as type constraints. | 12:08 | |
ruoso | std: sub foo(1,2,3) {...} | 12:11 | |
p6eval | std 25816: OUTPUTĀ«ok 00:02 35mā¤Ā» | ||
dalek | kudo: 88b6c25 | jnthn++ | src/classes/Role.pir: Various fixes to using roles as type constraints. Resolves at least RT#62966. |
||
ruoso | rakudo: multi foo(1) { say 1 }; multi foo(2) { say 2 }; foo(1); foo(2); foo(3); | 12:12 | |
p6eval | rakudo 087e29: OUTPUTĀ«Malformed routine definition at line 1, near "foo(1) { s"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤Ā» | ||
jnthn | Heh | ||
ruoso | jnthn, is that already known? | ||
masak | ruoso: can I submit a rakudobug on that? | ||
jnthn | I didn't even know that was valid syntax... :-P | ||
moritz_ | rakudo: multi foo($ where 1) { 1 }, multi foo($ where 2) { 2 }; foo($_) for 1..3 | ||
p6eval | rakudo 087e29: OUTPUTĀ«No applicable candidates found to dispatch to for 'foo'ā¤current instr.: '_block53' pc 602 (EVAL_20:231)ā¤Ā» | 12:13 | |
moritz_ | rakudo: multi foo($ where 1) { 1 }, multi foo($ where 2) { 2 }; foo($_) for 1..2 | ||
p6eval | rakudo 087e29: RESULTĀ«Method 'HOW' not found for invocant of class 'Iterator'ā¤current instr.: '_block14' pc 77 (EVAL_20:44)ā¤Ā» | ||
moritz_ | rakudo: multi foo($ where 1) { 1 }, multi foo($ where 2) { 2 }; say foo($_) for 1..2 | ||
p6eval | rakudo 087e29: OUTPUTĀ«1ā¤2ā¤Ā» | ||
moritz_ | std: multi foo(1) { 1 }; | ||
masak | NoirSoldats: what does the comma do? | ||
p6eval | std 25816: OUTPUTĀ«ok 00:02 35mā¤Ā» | ||
masak | oops. | ||
moritz_: what does the comma do? | |||
moritz_ | which comma? | 12:14 | |
jnthn | Why on earth does the comma work?! | ||
moritz_ | ah | ||
masak | moritz_: the one between your subs. | ||
moritz_ | I meant to use a ; | ||
ruoso | std: multi foo($ where 1) { 1 }, multi foo($ where 2) { 2 }; say foo($_) for 1..2 | ||
moritz_ | because it's a statement list in void context? | ||
masak | ok, how many rakudobugs does this amount to? :) | ||
p6eval | std 25816: OUTPUTĀ«ok 00:03 38mā¤Ā» | ||
moritz_ | masak: -1 | ||
pnu | moritz_: oh, this is great! is it planned to implement all in classes/*.pir finally? | ||
moritz_ | pnu: most, probably not all | ||
masak | surely one for the sub foo(1) { ... } case, no? | 12:15 | |
jnthn | pnu: Maybe not *all*, but...what moritz_ said. | ||
ruoso | masak, I guess so... | ||
masak submits | |||
jnthn | Does the spec say you can do that? | ||
moritz_ | dunno | ||
masak | screw the spec! STD says it's ok. :) | ||
moritz_ | never seen that syntax | ||
pnu | ok, but at least a prototype for testing the specs and then maybe port to pir.. is a good practice? | 12:16 | |
ruoso | jnthn, well, it's a fantastic syntax... | ||
moritz_ | what do you want to port to pir? | ||
ruoso | much better than "$ where 1" | ||
moritz_ | ruoso: it's a lot like haskellian pattern matching | ||
masak | jnthn: I remember requesting that syntax on NPW2008. :) | ||
pnu | moritz_: an imaginary method i implement in settings some day.. :-) | ||
ruoso | specially for the multi-reduce web.pm dispatcher | 12:17 | |
masak | indeed. | ||
moritz_ | pnu: if you implement it in the setting, no need to backport it to pir. that's what compilers are there for :-) | ||
masak | boy, do I have something to write about on Sunday! :) | ||
"we introduced new syntax in Perl 6 so that we could write a nicer dispatcher" | 12:18 | ||
jnthn | I agree it's nice syntax, just wondered ifit's spec'd. | ||
ruoso | implement it, we push it in later ;) | ||
masak | agreed. :) | ||
jnthn | Will look at STD.pm and see what it parses it as, anyway... | ||
pnu | moritz_: ok :-) and after recompiling rakudo, things written in setting start to work? (ok, maybe i'll stop asking and just try it my self..) | ||
jnthn | I'm a little surprised it does, but in theory it's easy to get Rakudo to handle it. | ||
pnu: Yes. | |||
moritz_ | pnu: if you did right, it works :-) | 12:19 | |
pmichaud | good morning, #perl6 | ||
jnthn | morning, pmichaud | ||
moritz_ | good morning rakudo hacker No. 1 :-) | ||
masak | morning, pmichaud | ||
jnthn | Damm, pm is awake and I only fixed one bug so far! | ||
pnu | jnthn: this is wonderful! :) | ||
moritz_ | I must be sick. Yesterday night I dreamed that TPF missed the application deadline for gsoc :) | 12:20 | |
ruoso | pmichaud, jnthn, does rakudo provide a way to programatically define a new multi and add the variants? | ||
jnthn | pmichaud: Will do the dispatch refactor soon, just hunting through RT for any related tickets to the fix I just did on roles as type checks... | ||
ruoso: Well, I guess you can eval it... | |||
ruoso | meh | 12:21 | |
pmichaud | jnthn: no problem | ||
jnthn | ruoso: Of course we do have ways under the hood, for sure... | ||
ruoso | let me explain | ||
jnthn | But nothing exposed AFAIK. | ||
ruoso | in the web.pm multi dispatcher thing | ||
there's no reason to expose the multi in any namespace | 12:22 | ||
it's probably better to just hold it into a variable | |||
so @url-parts.reduce: &multi; later | |||
and as we're probably having a sub-grammar to declare that | 12:23 | ||
it sounds like a requirement to be able to define a new multi object and add the variants when parsing that sub-grammar | |||
jnthn | One related question I had on all of this is | 12:24 | |
multi foo() { }; foo.WHAT.say # what do we get? | |||
Multi? or Sub? | |||
ruoso | you mean &foo.WHAT | ||
jnthn | Yes | ||
ruoso | I'd guess Multi | 12:25 | |
masak | Multi sounds a bit saner. | ||
jnthn | Good. :-) | ||
Well in that case | |||
my $x = Multi.new; push $x, sub ($x, $y) { ; # after declaring a proto-object creation for Perl6MutliSub PMC may just work off the bat. | |||
emm, missing a } | |||
ruoso | Cool... | 12:26 | |
jnthn | Since that's essentially all we do internally. | ||
In a related question | |||
Do we not define .signature on Multi? | |||
But rather you ahve to iterate .candidates ? | |||
ruoso | jnthn, I don't think s | ||
jnthn | OK, good. | ||
masak | rakudo: Multi.new | 12:27 | |
p6eval | rakudo 88b6c2: OUTPUTĀ«Could not find non-existent sub Multiā¤current instr.: '_block14' pc 53 (EVAL_16:38)ā¤Ā» | ||
ruoso | maybe .signature returns a Junction of the signature | ||
of each candidate | |||
jnthn | I thought about that and then thought...hmm...do we really want to do that... | ||
:-) | |||
But yes, it was my obvious answer for if we're going to have signature. | |||
masak | why is a junction preferable to a simple list? | ||
ruoso | jnthn, we still need to deal with varying arity in the multi for reduce | ||
masak, because it preserves the API | 12:28 | ||
masak | and, would it be a conjunction or a disjunction? :) | ||
jnthn | disjunction is probably more useful. | ||
moritz_ | a weirdjunction | ||
ruoso | you usually need to know if at least one of them match | ||
masak | right. | ||
disjunction, then. | |||
12:28
rmt_ joined
|
|||
jnthn | e.g. you can check if it's possible to bind a capture to any of the signatures - at least in principle...though of course that's not the way a multi-dispatch actually does it internally. | 12:28 | |
I guess .arity is then a junction of all the possible arities.... | 12:29 | ||
Not sure how that plays with .reduce though! | |||
moritz_ | well | ||
if you look at how it's implemented atm | |||
ruoso | jnthn, we need a way to say "do a partial match and tell me how many items you consumed" | 12:31 | |
so @foo.reduce: &multi; works as expected | |||
I was thinking that could be a named parameter to .postcircumfix:<( )> | 12:32 | ||
jnthn | That feels...odd. | 12:33 | |
12:33
DemoFreak joined
|
|||
moritz_ | since it can have named parameters themselves | 12:34 | |
ruoso | moritz_, the signature for .postcircumfix:<( )> is already ($capture), not (|$capture) | ||
SMOP already takes advantage of that to receive :$cc | |||
method postcircumfix:<( )> ($capture, :$partial-sig-match ) { ... } | 12:38 | ||
where we could assume that passing that argument would require you to declare | 12:39 | ||
my $partial-sig-match-count is context<rw>; | |||
12:40
finanalyst joined
|
|||
ruoso | that... or we need "RWIterator ~~ Signature" | 12:40 | |
hmm | |||
actually... that doesn't solve much... we need the signatures to be evaluated inside the multi | 12:41 | ||
maybe... | |||
when passing :partial-sig-match, it would expect the capture to be a RWIterator | 12:42 | ||
and pushback items when necessary | |||
so you can send the iterator to the next invocation... | |||
jnthn | Sounds a tad messy. | 12:43 | |
ruoso | but I think the RWIterator is the way to go | ||
12:44
renormalist left
|
|||
ruoso | we just need a good way to tell the Callable that | 12:44 | |
ruoso goes to sketch something about RWIterator in S07 | 12:46 | ||
masak | ruoso: excuse me, but what's an RWIterator? | 12:49 | |
ruoso | Read-Write Iterator | ||
masak | I guessed that. what is it that can be read and written? | 12:50 | |
ruoso | ok... we might need to qualify the name a bit more | 12:52 | |
jnthn | OK, now in my local rakudo | ||
> multi foo() { 1 } | |||
> say &foo.WHAT | |||
Multi | |||
> &foo.push(sub ($x) { 2 }) | |||
> say foo(); say foo(42); | |||
1 | |||
lambdabot | <no location info>: parse error on input `1' | ||
Not in scope: `say' precedence parsing error | |||
cannot mix `(&)' [... | |||
<no location info>: parse error on input `;' | |||
<no location info>: parse error on input `&' | |||
jnthn | 2 | ||
Matt-W | moritz_: not read all the backlog, but make operates on the current $/, so you have to call the parameter for your action methods $/, then it works nicely. This may not be ideal, but that's how it goes at the moment... | ||
jnthn | ...thanks, lambdabot... | ||
Matt-W | moritz_: see Form.pm for example | ||
jnthn | ruoso: Does that look like what you wre thinking? | ||
ruoso | masak, maybe we need to name it Iterator::PushBack for that specific meaning | ||
masak | jnthn: cool! | 12:53 | |
ruoso: I'm still not sure what it is you're building. | |||
ruoso: an iterator that can... what? | |||
ruoso | jnthn, yes... just missing Multi.new | ||
masak, that you can consume the value, see it doesn't fit and push it back to the iterator | |||
so it can be consumed again | 12:54 | ||
masak | ruoso: like a sort of peek() function? | ||
ruoso | peek? | ||
rgs | poke | 12:55 | |
moritz_ | Matt-W: repo URL? | ||
man, github is slower than perlmonks right now | 12:56 | ||
masak | moritz_: github.com/mattw/form/ | ||
ruoso | masak, rgs, yeah.. something like that | ||
Matt-W | masak++ | 12:57 | |
moritz_ | Matt-W: thanks | ||
Matt-W | remembering my url before I do | ||
masak | moritz_: np. :) | ||
12:57
ejs joined
|
|||
moritz_ | ah, masak++ is was | 12:57 | |
well, still Matt-W++ for writing the code :-) | |||
masak | Matt-W: not so much remembering as using the Firefox awesomebar. | 12:58 | |
Matt-W | pmichaud++ for telling me how to make it work | ||
masak: shush or you'll ruin it | |||
masak | pmichaud++ for teaching me the original trick. | ||
jnthn | Gah. Rakudo's Perl6MultiSub inherits from Parrot#s MultiSub which thanks to history rather than sanity inherits from ResizablePMCArray...which makes Rakudo thing it's doing an array assignment. Damm! | 13:00 | |
Matt-W | argh | 13:01 | |
masak | perhaps time to abandon history for sanity? :) | 13:02 | |
that's what we tend to do in Perl 6. | |||
Matt-W | I'm failing to see why MultiSub isa ResizablePMCArray | 13:03 | |
it doesn't seem like that's what inheritance is supposed to be for :) | |||
moritz_ remebers a great lord-of-the-rings (the movie) quote that can be adopted here :-) | |||
jnthn | > my $x = Multi.new; $x.push(sub { say 1 }); $x.push(sub ($a) { say 2 }); $x(); $x(42); | 13:04 | |
lambdabot | <no location info>: parse error on input `=' | ||
jnthn | 1 | ||
2 | |||
masak | moritz_: "Fly, you fools!"? :) | ||
jnthn | ruoso, masak: Look good for your dispatcher? :-) | ||
moritz_ | Gandalf to Saruman as he discovers the latter's treason: `tell me, "friend": when did Saruman the wise reason for madness' | ||
masak | jnthn: indeed. | 13:05 | |
pugs_svn | r25817 | ruoso++ | [spec] Add Iterator::PushBack to S07 | ||
moritz_ | with s/reason/history/ | ||
jnthn | masak: It also fixes | ||
moritz_ | s/madness/sanity/ | ||
ruoso | jnthn, looks perfect :) | ||
jnthn | rakudo: multi foo { }; say &foo.WHAT | ||
p6eval | rakudo 88b6c2: OUTPUTĀ«Null PMC access in find_method()ā¤current instr.: '_block14' pc 79 (EVAL_17:43)ā¤Ā» | ||
moritz_ | what follows was cool but slightly ridiculous fight :-) | ||
jnthn | Which in my local now says Multi | ||
masak | moritz_: agreed. | ||
moritz_ | cool | ||
jnthn++ | |||
masak | jnthn++ | ||
jnthn | ruoso++ for badgering me into it ;-) | 13:06 | |
ruoso | now we just need to be able to use multis with different arity in @foo.reduce | ||
ruoso points to his last commit in S07 and asks for evaluation | |||
13:09
ejs left
|
|||
jnthn | > for &foo.candidates { .signature.perl.say } | 13:09 | |
:() | |||
:(Any $x) | |||
lambdabot | <no location info>: parse error on input `.' | ||
13:09
ejs joined
|
|||
masak | now we just need to make it seem like this was in the spec the whole time. :P | 13:09 | |
jnthn | ftw | ||
masak: Hey, I have a commit bit to the spec ;-) | |||
masak | jnthn: hey, me too! :) | 13:10 | |
this is too easy. :P | |||
jnthn | Forgiveness. Permission. | ||
;-) | |||
ruoso | hmmm... | ||
maybe it can simply be a different method of Callable | 13:11 | ||
masak | jnthn: if you don't put it in today, I will tomorrow. | ||
ruoso | that receives an Iterator::PushBack | ||
moritz_ | if it's a multi, * would be the better signature to return | ||
"signature" that is :-) | |||
jnthn | moritz_: How so? | ||
ruoso | hmm... so it can DWIM when you $capture ~~ $signature | 13:12 | |
jnthn | moritz_: Note there that I am iterating over the candidates and printing the .perl of their signatures | ||
moritz_ | it's a placeholder for whatever | ||
jnthn: ah | |||
jnthn: I got that wrong then | |||
ruoso | $multi.signature could return a closure | ||
jnthn | moritz_: I'm more inclined to have a junction of all possible signatures though... | ||
A closure? | |||
ruoso | so you can still do $capture ~~ $signature | ||
moritz_ | a junction would be nice | ||
ruoso | but it would then be handled by code that belongs to Multi | 13:13 | |
jnthn | ruoso: You could still do that with a junction. | ||
moritz_ | because it reflects the unorderedness | ||
jnthn | moritz_: Right. | ||
ruoso | jnthn, the junction is external to the Multi | ||
jnthn | ruoso: So? | ||
So is the signature ;-) | |||
ruoso | if you have more than one match, the Multi might want to choose the candidate | ||
jnthn | ruoso: Please let's not confuse "is there any signature that could possibly match" with "is a dispatch possible?" | 13:14 | |
Those are two completely separate questions. | |||
ruoso | ok... | ||
jnthn | But this confusion is why I'm kinda half-hearted about putting .signature on Multi. | 13:15 | |
ruoso | my question really is "is a dispatch possible? and how many arguments that represent?| | ||
jnthn | At all. | ||
Because people may confuse the two as well. | |||
13:15
ejs left
|
|||
ruoso | but I think a different invoke method for this would be ok | 13:15 | |
.partial-invoke($iterator) | 13:16 | ||
vs .invoke($capture) | |||
jnthn | And $capture ~~ any(&foo.candidates).signature isn't so hard | ||
And makes more explicit what is going on... | |||
moritz_ | ruoso: you are aware that it might need disambiguation? | ||
if I have two multis, with ($, $) and ($, $, $) and do a partial application against a list, both match if it's long enough | 13:17 | ||
ruoso | that's precisely the reason I want it to be internal to the Multi | ||
moritz_ | I think the real problem is that there's no all-that-dwimmy disambituion rule | 13:18 | |
not that if we had one it would be hard to implement | |||
jnthn | ruoso: Are we sure that we're not trying to make some very general-purpose mechanism when we could just make .reduce handle this? | ||
ruoso | jnthn, map for and friends also need it | ||
it is general-purpose indeed | 13:19 | ||
masak | ruoso: commit looks good. | ||
ruoso | &multi.invoke-iterating($iterator) | 13:20 | |
jnthn | ruoso: Do you think making it possible to &multi.push blows away our "we know the set of multi-variatns in a given scope" thingy? | ||
ruoso | jnthn, I don't think so | 13:21 | |
you might need to "close" some multi objects at some point | |||
jnthn | Thing is, the set of multis can change now at runtime... | ||
ruoso | and it is erroneous to do that on multis aliased to lexical scopes | ||
jnthn | And for sure, Rakudo is clearing it's multi-cache so it ain't going to get weird... | ||
ruoso: Meaning? | 13:22 | ||
ruoso | jnthn, you don't need to worry much if the user does it... changing a multi that is aliased to a lexical scope is defined to be undefined behavior, iirc | 13:23 | |
jnthn | Ah, OK. | ||
The "If you try and screw with it, it might screw you." principle. :-) | |||
13:24
ejs joined
|
|||
jnthn | ejs: In Odessa? | 13:25 | |
jnthn was there like, recently... | 13:26 | ||
13:27
wayland76 joined
13:28
yves joined
|
|||
ruoso | jnthn, so... what do you think about the .invoke-iterating($iterator) thing? | 13:31 | |
do you think it is possible? | |||
13:32
skids joined
|
|||
jnthn | ruoso: Let me read your S07 tweaks in detail...just sorting this patch out... | 13:33 | |
ruoso EOUTOFCOFEE | 13:35 | ||
jnthn | ruoso: So what exactly are you proposing? That we invoke instead of with argumetns with an itereator, and it picks the candidate wanting the most args (up to the limit of those available in the iterator), grabs as many values from the iterator as are needed and then does the call with those? | 13:38 | |
ruoso | In general, yes... | 13:39 | |
but I think it's up to the Multi to decide if it does LTM or not | 13:40 | ||
because the topological sort still needs to be taken into account | |||
jnthn | Hmm | 13:41 | |
ruoso | I think LTM might be an implicit disambiguator | 13:42 | |
jnthn | It sounds like a "can we match with the maximum arity? no, then let's try the next one down", etc. | ||
ruoso | that's why it needs to be internal to the multi... | 13:43 | |
so that decision is not very hard to make later | |||
dalek | kudo: 76b2652 | jnthn++ | (3 files): A bunch of multi-related changes. Perl6MultiSub is now mapped to Multi, so .WHAT works (spectest added, needs to make it into the specification but seems to have consensus on #perl6). Also defined .candidates, which has similar consensus, and .push which allows constructing a multi on-the-fly. |
||
jnthn | Well, a first cut could try with the max arity, and if it got a failed to call exception, retry with one less... | ||
And that can be done external to the multi, though less efficiently... | 13:44 | ||
ruoso | and more static as well | ||
doing it inside the multi allows each multi to override that behavior | |||
which seems like a good plan if we're not sure which is the best way to do it | |||
jnthn | I still worry we might be making reduce too magical and it may be better for the dispatcher to specify its own that gets the semantics it wants. | 13:47 | |
(It's own reduce-ish algorithm, that is...) | |||
OTOH, I can see an argument for making things like reduce handle multis sensibly somehow... | |||
ruoso | jnthn, on the contrary... reduce will simply call .invoke-iterating() | 13:48 | |
and that's not specific for multis | |||
because there are optional arguments | |||
so .invoke-iterating() is valid for only subs as well | 13:49 | ||
jnthn | hmmm | 13:50 | |
I think I'd rather delegate this one up to TimToady. | |||
This is more a language design issue than an implementation one. | |||
wayland76 | ruoso++ for pushback :) | ||
(err, Iterator::Pushback) | 13:51 | ||
jnthn | I'm more worried about making reduce odder from a user perspective rather than a guts one. | ||
13:51
bacek left
|
|||
ruoso | jnthn, in what sense? | 13:52 | |
jnthn | As in, is this going to do what people expect? Or are their expectaions on the dis-ambiguation too varied? | 13:53 | |
There's a time to not be too clever. But that's why I really want to hear input from @Larry on this. | |||
ruoso | jnthn, honestly, I think reduce with varying-arity is something that is going to be used by people that have read the manuals... it's not something a begginer will bump into | 13:54 | |
jnthn | Aye, true. | 13:55 | |
I'm not against it, just think it needs a wider sanity check. | |||
ruoso | sure... my concern is wether this is actually do-able in rakudo in the short-term | ||
since Web.pm is likely to require it | 13:56 | ||
jnthn | As a separate method, probably. | ||
Well, Web.pm could write it's own reduce-ish thingy too. ;-) | |||
The introspection is all there. | |||
but yes, having the dispatcher expressed as one line of Perl 6 is neat. ;-) | |||
ruoso | but the point of using reduce and multi is precisely to use the Perl 6 core features... | ||
otherwise we would go with the grammar idea | 13:57 | ||
jnthn | I don't know that it's all that hard to do in Rakudo. | ||
Unless you need the pushback iterator stuff too... | 13:58 | ||
ruoso | I don't think you can implement it without the pushback iterator | ||
otherwise you wouldn't have how to "undo" the item you consumed but didn't match | |||
jnthn | is invoke-iterating expected to work its way through the whole iterator? | 13:59 | |
ruoso | no | ||
jnthn | oh | ||
ruoso | just that iteration | ||
jnthn | Just do one? | 14:00 | |
OK. | |||
ruoso | it's one invocation | ||
jnthn | Aha. | ||
Now I see the need for the pushback then... | |||
ruoso | specially because reduce needs to do an extra push back | ||
with the value of the last invocation | |||
(which means this iterator needs to be writeable as well, not just pushback-able) | 14:01 | ||
jnthn | Hmm | ||
again, probably not too hard to do, but I don't want to spend too much tuits on this until there's wide consensus that it's The Way To Go. | |||
It's not all that hard, but it's not a 30 minutes hack either. | 14:02 | ||
ruoso | now it's time for the all mighty TimToady to throw a hammer | ||
;) | |||
jnthn | Right. | 14:03 | |
I'd like to hear more generally thoughts from TimToady on S07. Like, is it generally the way to go, etc. | |||
ruoso | yeah... S07 needs more input... it's basically a copy of my thoughts yet... | 14:04 | |
pugs_svn | r25818 | jnthn++ | [t/spec] Test for .WHAT on a multi. | 14:06 | |
14:07
[particle]1 joined
|
|||
ruoso | what would be a good name for an iterator that can unshift values? | 14:07 | |
it would be interesting for it to be a specific role, because implementing only "unshift" is much easier than any other write operation | 14:08 | ||
it kinda works as pushback, but it doesn't require the value to have been consumed from this iterator earlier | 14:09 | ||
that's why it needs to be different than PushBack | |||
Iterator::Unshift? | 14:10 | ||
jnthn | is pushback expected to keep track of previous values it provided? | ||
so it knows that something used to be part of the iterator? | |||
ruoso | not really... it's "free" to refuse values that were not consumed from it | ||
but that's not a requirement | |||
it usually would mean that this iterator is backed by a immutable list | 14:11 | ||
while Iterator::Unshift would mean that either the original list is mutable, or that the object provide a local stack | 14:12 | ||
jnthn | ah, OK | 14:13 | |
14:13
hanekomu joined
|
|||
jnthn | I was expecting pushback would have a local stack. | 14:13 | |
ruoso | jnthn, my idea of having two roles was to somehow say "expect to fail" or "expect to suceed" | ||
(for values not coming in the correct order from this same iterator, that is) | 14:14 | ||
14:15
ejs left
|
|||
pugs_svn | r25819 | ruoso++ | [spec] Add Iterator::Unshift to S07 | 14:22 | |
frioux | rakudo: 'frew'.split('',2) | ||
p6eval | rakudo 76b265: RESULTĀ«["f", "r", "e", "w"]Ā» | ||
moritz_ | that's wrong. | 14:23 | |
frioux | yeah | ||
it only does it for '' | |||
moritz_ | I know | ||
because I special-cased it | |||
frioux | ah | ||
haha, ok | 14:24 | ||
well, I have to go to work | |||
I just wanted to make sure I understood | |||
14:27
nihiliad joined
14:31
hercynium joined
|
|||
skids | ruoso: "percolate"? or maybe "excrete" or "exude"? | 14:31 | |
ruoso | hm? | ||
skids | You were looking for a name... | 14:32 | |
ruoso | ah... I assumed Iterator::Unshift for now | ||
jnthn | ...excrete? | ||
That sounds crap. | 14:33 | ||
;-) | |||
skids | Yeah it was for humor. | ||
:-) | |||
Actually keeping things using the same old vocabulary is probably good, as long as the meaning is consistent. | |||
Though now I really, really want to write some sort of filter for something and call it "percolator" just for the sake of it. | 14:34 | ||
moritz_ | rakudo: say "foo".substr(Inf) | 14:36 | |
p6eval | rakudo 76b265: OUTPUTĀ«Cannot take substr outside stringā¤ā¤Ā» | ||
[particle]1 | rakudo: <foo>.substr(*).say | 14:39 | |
p6eval | rakudo 76b265: OUTPUTĀ«Use of uninitialized valueā¤fooā¤Ā» | ||
[particle]1 | rakudo: 'foo'.substr(*).say | ||
p6eval | rakudo 76b265: OUTPUTĀ«Use of uninitialized valueā¤fooā¤Ā» | ||
14:42
ejs joined
14:44
ejs left
14:47
skids left,
[particle]2 joined
14:57
hanekomu left
|
|||
jnthn | Phew. The refactor pmichaud wanted has apparently been easy... | 14:58 | |
14:59
dollardumb joined
|
|||
dollardumb | anyone using the ilbot here? | 15:00 | |
gotta question on an unblessed reference | |||
and AUTOLOAD for that matter | |||
15:05
[particle]1 left
|
|||
frioux_ | moritz_: so why did you special case the '' split? | 15:07 | |
just curious | |||
dollardumb | moritz_ can I ask a question on ilbot install/config? | ||
dalek | kudo: 4be7d28 | pmichaud++ | docs/spectest-progress.csv: spectest-progress.csv update: 317 files, 7160 passing, 4 failing S06-multi/syntax.t aborted 1 test(s) S12-role/basic.t 27 - attributes typed as roles initialized OK S12-role/basic.t 28 - typed attribute accepts things it should S12-role/basic.t 29 - typed attribute accepts things it should |
15:14 | |
kudo: f6449a4 | jnthn++ | src/ (2 files): Minor refactor of method dispatch so we can better handle foreign objects from outside Rakudo, as suggested by pmichaud++. |
|||
kudo: 7abaea2 | pmichaud++ | src/ (2 files): Merge branch 'master' of [email@hidden.address] |
15:15 | ||
15:15
justatheory joined
|
|||
jnthn | pmichaud: Huh? Weird results... | 15:18 | |
pmichaud: It did get the spectests at the right period of time rather than latest spectests against old Rakudo? | 15:19 | ||
15:19
frioux joined
|
|||
pmichaud | jnthn: my script grabs rakudo and tests as of 00:00 CDT, yes. | 15:19 | |
so the report is (or should be) the state of rakudo as of 00:00 CDT today. | 15:20 | ||
jnthn | pmichaud: OK, but those tests it failed I added earlier today | ||
e.g. after 00:00 CDT... | |||
pmichaud | I'll double-check it. | ||
my script thinks it was r25813 | 15:21 | ||
15:22
mberends left
|
|||
pmichaud | maybe I invoked the script wrong earlier. | 15:22 | |
jnthn | ok, no big deal...guess if it does it again we can look deeper | 15:23 | |
Those are certainly tests I have added today though. | |||
pmichaud: Did the dispatch refactor. | |||
pmichaud | jnthn: yes, I saw that. Looks good. | 15:24 | |
jnthn | OK, good. :-) | ||
pmichaud | I was also wondering if HOW.dispatch might want some refactoring at some point, to separate out "find the candidates" from "make the call" | ||
you might also review the irc logs w.r.t. the handling of BUILD() | 15:25 | ||
TimToady made quite a few comments on it late yesterday, I think. | |||
jnthn | Ah, OK. | ||
pmichaud | effectively, though, BUILD is handled like a sub dispatch instead of a method dispatch. | ||
jnthn | OK, not sure what the upshot of that is, will find and read... | 15:26 | |
Just testing a multi dispatch fix atm. | |||
Edge case... | 15:27 | ||
pmichaud: How would you feel about being able to pass to P6Object's .register a named parameter saying "when you make the proto, use the copy opcode to assign it to this PMC, then install that in the namespace etc" | 15:28 | ||
The rationale is | |||
class A { has A $!x } | |||
We don't make the proto for A until after we add the attribute | 15:29 | ||
15:29
finanalyst left
|
|||
jnthn | So it'd be nice to have some PMC in the namespace as A | 15:29 | |
pmichaud | I had been thinking that P6object should support incomplete protos. | ||
jnthn | And the proto is copy'd onto it. | ||
And it Just Works (I think...) | 15:30 | ||
Something like this or a different mechanism? | |||
pmichaud | it doesn't feel quite right to me. | ||
jnthn | OK | 15:31 | |
Then we need something that effectively does a similar thing but does feel right. ;-) | |||
pmichaud | the way I had been thinking of going with p6object was to do basically what rakudo is doing now (more) | ||
i.e., one can register a protoobject, but it's not actually tied to a class until we close the composition (or do an operation that requires the composition be closed) | 15:32 | ||
jnthn | Something like that could work. | ||
pmichaud | so, we do (1) create protoobject, (2) add attributes, methods, etc, (3) close composition | ||
and keep the same protoobject throughout. | 15:33 | ||
jnthn | *nod* | ||
pmichaud | then rakudo can use protoobjects instead of metaclass | ||
jnthn | Something along those lines sound doable. | ||
15:33
Psyche^ joined
|
|||
pmichaud | because protoobjects can represent a class in a partial state of composition. | 15:33 | |
thinking about it more... | 15:34 | ||
ultimately I think what I just described ends up doing what you described, though. | |||
because we have to replace our partial protoobject with another one that is an instance of the newly-composed class | 15:35 | ||
and to do that we have to do a copy | |||
(or a reference or something like that) | |||
jnthn | Right. | 15:37 | |
pmichaud | how hard would it be to get the type to be attached after the class is finished composing? | ||
jnthn | I was thinking your idea sounded more like a nice abstraction. | ||
interface | |||
But would boil down to the same... | |||
Hmm | |||
It'd be a pain... | |||
Not really hard. | |||
Just messier. | 15:38 | ||
pmichaud | oh. | ||
there's another big piece | |||
(before we head too far down this path) | |||
TimToady has significantly refactored block parsing in STD.pm | |||
STD.pm now tries to do a lot of what I had been doing with $?BLOCK_OPEN | 15:39 | ||
jnthn | That suggests you got it right. :-) | ||
pmichaud | yes, what STD.pm has now is a lot more of what I had wished to see earlier. | ||
but, that's a fairly significant refactor, and I'd prefer to do that after 1.0 | 15:40 | ||
(after Parrot 1.0) | |||
i.e., not while I'm traveling about. | |||
so.... | |||
I'm fine with your proposal. | |||
i.e., adding a option or other interface to .register that says "use this PMC as the protoobject container" | 15:41 | ||
jnthn | The extra parameter to...right. | ||
pmichaud | we can deprecate it later, I don't expect it to get used much outside of rakudo just yet anyway. | ||
jnthn | Whee. Looks like I got the MMD fix right... | ||
Well, how soon do you plan to do your set of changes? | |||
It's not a super-urgent bug... | |||
15:42
Psyche^ is now known as Patterner
|
|||
pugs_svn | r25820 | jnthn++ | [t/spec] Add a couple of tests for MMD to make sure it enforces contraints properly when there's a single candidate with one on. | 15:44 | |
jnthn | moritz_: On ticket here is waiting for tests, if you get chance - I keep opening it each week to fix and then realize...just needs tests. ;-) rt.perl.org/rt3/Ticket/Display.html?id=62162 | 15:47 | |
*one | |||
dalek | kudo: cdd3e7d | jnthn++ | src/pmc/perl6multisub.pmc: The multi-dispatcher had an off-by-one that caused it not to enforce contraints if there was no tie-breaking needed. The rest of the patch makes sure we don't put stuff in the MMD cache that we should not (if there's a constraint, we can't use the nominal-type-based cache). Resolves RT#63812. |
||
kudo: e8a8fb6 | jnthn++ | docs/spectest-progress.csv: Merge branch 'master' of [email@hidden.address] |
|||
pmichaud | my set of changes to the block stuff will probably be late next week; i.e., around the 20th-23rd | ||
pmichaud | I'm okay with letting has A $!x; wait until then. | 15:48 | |
i.e., you can decide if you want to add the option to p6object or wait until the block refactors occur | |||
jnthn | OK, then in that case I'm not inclined to spend time on a temporary fix that will last a couple of weeks. | ||
pmichaud | with the block refactors it may happen that we end up getting protoobjects immediately after the "class A ..." part -- before we parse the block. | 15:49 | |
jnthn | That people aren't clammering to get fixed. | ||
If people were lining up to do that I'd do it, but they ain't. So it can wait to be done properly. :-) | |||
15:51
Tene_ joined
|
|||
pmichaud | my re-run of the spectests for 00:00 CDT came up with the same results -- investigating further. | 15:51 | |
jnthn | Task for anyone with tuits and some Perl6-fu: review rt.perl.org/rt3/Ticket/Display.html?id=63780 and see if it can be narrowed down to a small test case, if indeed it is a bug. | 15:54 | |
15:54
ujwalic_ left
|
|||
pmichaud | oh, I know the problem for 63780 | 15:57 | |
the array is getting a reference to the original instead of a clone | |||
it might have to do with our ObjectRef semantics | |||
i.e., we may be checking for ObjectRef when we need to be checking for Perl6Scalar | 15:58 | ||
jnthn | Ah | ||
I've fixed a few things like that before now. :-/ | |||
16:00
[particle]2 left
|
|||
jnthn | oh ouch :-| | 16:01 | |
my %h = a => any(3, 4); for %h.kv -> $k, $v { say "$k: {$v.WHAT}" }; | |||
16:02
Tene left
|
|||
jnthn | Here, the value auto-threads correct... | 16:02 | |
But we detect the need to do so inside signature bind | |||
And I was using 'return' to then hand back the formed results junction | |||
Which was fine for auto-threading routines... | |||
But not blocks. | 16:03 | ||
jnthn ponders how to return from a level below... | |||
ruoso | lift leave; | 16:04 | |
:) | |||
pmichaud | okay, I found the issue with the incorrect test reports. | ||
jnthn | ruoso: lift? | ||
ruoso | it's the new prefix | 16:05 | |
"run this code as if it was in the CALLER"... oh... right... it doesn't work for that specific case | |||
pmichaud | jnthn: 'return' and not '.return' ? | ||
jnthn | pmichaud: I don't want to return from signature_bind, I want to return from the thingy that called it. | ||
I'd overlooked that blocks that werne't routines got signautures too... | 16:06 | ||
pmichaud | wait... signature_bind is handling junction autothreading? | 16:07 | |
jnthn | yes and no | ||
pmichaud | shouldn't the dispatcher be doing that? | ||
ruoso | pmichaud, but what if the Signature expects Junction? | 16:08 | |
pmichaud | the dispatcher autothreads when we have arguments that don't match any of the available signatures (and at least one argument is a Junction) | ||
if a Signature expects Junction, then the dispatcher uses it. | 16:09 | ||
jnthn | It's along the lines of, try the call, if the signature fails to bind, then see if it's failed due to a junctional argument, and if so delegate to the junction dispatcher. | ||
For multis it's a bit different | |||
We cache the junction dispatcher in the table. | |||
*in the cache | |||
pmichaud | either way I think the dispatcher should be handling autothreading, not the signature bind. | 16:10 | |
jnthn | What dispatcher? | ||
pmichaud | whichever one is being called upon to do a dispatch :-) | ||
you're referring to the case of a non-multi sub? | 16:11 | ||
jnthn | Yes | 16:12 | |
It's a neat and tidy implementaiton, this one issue non-withstanding. | |||
pmichaud | I've been thinking that we might have to do sub-dispatch in the way we're currently handling method dispatch (after your changes this morning) | ||
put another way -- Parrot's dispatch is insufficient for our needs. | |||
jnthn | I'm not convinced. | 16:13 | |
In fact, the way I have implemented this seems to me in line with a way S06 explicitly declares as a valid approach. | |||
See under Implementation note on autothreading of only subs | |||
Of note | |||
So it is also possible to implement autothreading | |||
of only subs based on failover from the binding failure. | |||
pmichaud | yes, but there I think it's the dispatcher that notices the failover, not the sub itself. | 16:14 | |
jnthn | That's all well and good part from in Rakudo we're already *inside* the sub by the point we try binding | 16:15 | |
*apart | |||
pmichaud | right, the binding fails, that causes an exception, the dispatcher catches the exception and says "oh, maybe I need a Junction dispatch" | ||
jnthn | I prefer the current approach. Doesn't involve throwing exceptions for one. | 16:16 | |
16:16
pguillaum joined,
pguillaum left,
pguillaum joined
|
|||
jnthn | Also note that if you add another dispatcher then you have to use it for things as simple as for @foo -> $x { } | 16:17 | |
pmichaud | yes, I know that. | ||
jnthn | Not just for subroutine calls. | ||
Which feels very messy to me. | |||
If you have other use cases for having a separate sub dispatcher, I'm willing to be won over. But if this is the only one, I much prefer the current approach. | |||
pmichaud | to me for @foo -> $x { ... } does involve a subroutine call -- or at least a block invocation (which in Parrot is a sub call) | 16:18 | |
16:18
pguillaum left
|
|||
jnthn | For me too. | 16:18 | |
I just don't see that we need another !dispatch_sub layer. | 16:19 | ||
pmichaud | also note that in this case you *still* have an exception taking place -- it's just a return exception instead of a binding failure | ||
jnthn | Actually the return exception is a mistake, it turns out... | ||
pmichaud | right, but you're not going to be able to avoid the exception. | ||
either that or we start creating and passing continuations around. | 16:20 | ||
jnthn | It did occur to me that in theory we "just" need to get an invoke our caller's ret cont. | ||
pmichaud | the other option is to check the signature bind return | 16:21 | |
(which I don't think we do now) | |||
but that seems messy also. | |||
jnthn | Ah, hmm | 16:22 | |
yes | |||
pmichaud | I'd rather do an exception, I think. | ||
we're going to have to have the ability to force .leave on a block anyway. | |||
that sounds like an exception. | 16:23 | ||
or a method on a block that finds the block's return continuation and invokes it | |||
*that* sounds clean. | |||
jnthn | That sounds like what .leave would do | 16:24 | |
pmichaud | then signature bind just does CALLER.leave( junction_result ) | ||
jnthn | Right | ||
We need to implemented CALLER and leave anyway | |||
pmichaud | I'd be fine with a .leave implementation for blocks. | ||
CALLER we can get from within signature bind via getinterp | |||
that sounds like fun, actually. | 16:25 | ||
I'm afraid I have to go now -- have to help get things ready for airport. | |||
(and we leave in 35 mins) | |||
I'd go for the .leave approach. I think we'll get some big wins that way. | |||
jnthn: you're correct, my script was using the wrong test suite. it would reset the suite to 00:00 CDT, and then a later step would inadvertently do an update to head | 16:27 | ||
jnthn | pmichaud: Ah, OK. :-) | ||
I'll look at .leave | |||
pmichaud | if PIR makes it possible to get at a Sub's return continuation, it shouldn't be too difficult. | 16:28 | |
jnthn | Have a good flight and break. | ||
Yes, not sure if it does...well, we'll see ;_) | |||
pmichaud | I should be around again tonight and during the week, checking email at least. | ||
I still have a number of parrot-related things to finish up over the weekend. | |||
fortunately the first few days aren't loaded with activities. | 16:29 | ||
jnthn | OK, sounds good. | ||
TimToady | peddle hard | 16:32 | |
dalek | kudo: 3797055 | pmichaud++ | docs/spectest-progress.csv: spectest-progress.csv correction: 317 files, 7152 passing, 2 failing S12-methods/instance.rakudo aborted 2 test(s) |
16:33 | |
jnthn looks at specs for .leave | 16:34 | ||
oh hey, it works :-D | 16:40 | ||
(not .leave, but the underlying Parrot thingy) | 16:41 | ||
...well, nearly... | 16:45 | ||
16:47
dollardumb left
|
|||
ruoso | TimToady, had you notice the new proposal on the partial match in reduce? | 17:01 | |
TimToady | still waiting for the blood to hit my coffeestream | 17:02 | |
diakopter | brain.splash() | 17:06 | |
TimToady | and the backlog today is monumental | 17:09 | |
17:11
M_o_C joined
|
|||
ruoso | in summary: the idea is to use a different invocation method. .invoke-iterating($iterator) that would receive a Iterator::PushBack | 17:11 | |
instead of using plain .invoke | |||
that way, it would consume the values, returning what it didn't use | |||
and then invoke | 17:12 | ||
s/returning/pushing-back/ | |||
17:14
mberends joined
17:17
c9s joined
17:22
c9s left,
c9s joined
17:25
barney joined,
ejs joined
17:26
ejs left,
rindolf joined
17:35
mberends left
17:47
hercynium left
18:08
masak joined
|
|||
TimToady | ruoso: the actual name of Iterator::Unshift is probably just Array :) | 18:23 | |
Matt-W | what's the string repetition operator in Perl 6? Is it still x? | ||
TimToady | presuming we give Array an Iterator role | 18:24 | |
jnthn | Matt-W: x for string rep | ||
TimToady | yes | ||
jnthn | xx for array rep | ||
Matt-W | thanks | ||
Tene_ | TimToady: does CONTROL{} catch leave() ? | ||
jnthn | Otherwise worded as, is leave a control exception? | ||
TimToady | offhand, I'd say it seems more like a primitive for unwinding the stack *after* the exceptions have figgered things out | 18:25 | |
gotta have some primitives somewhere... | 18:26 | ||
and it would be nice if they were exposed in Perl 6 to the extent they can be cross-platform | |||
Tene_ | huh. | ||
TimToady | and I suspect leave can do that | 18:27 | |
Tene_ | "exposed ... cross-platform" ? | ||
jnthn | TimToady: Such that if a block had a "return continuation" in a given implementation, which left the block when invoked, it would be plausible that calling that is the right thing? | ||
(I know it won't be a way for implementations without continuations.) | |||
TimToady | yes, provided you made sure all the exit hooks get run | ||
jnthn | And the exit hooks of all enclosing blocks? | 18:28 | |
TimToady | unwinding the stack involves executing LEAVE blocks and such | ||
jnthn | Ah, OK. | ||
18:28
simcop2387-vnc joined
18:29
simcop2387-vnc left
|
|||
TimToady | that has to be done synchronously; can't leave it up to GC | 18:29 | |
jnthn | Hmm | ||
OK | |||
TimToady | since leave blocks are our replacement for timely destruction | ||
jnthn | So leave needs to make sure all those are invoked down to the block that's being left. | ||
TimToady | leave and variants | ||
jnthn | ok | ||
TimToady | basically, dynamic scopes have to be destroyed explicitly | 18:30 | |
TimToady is trying hard not to think about continuations right about now | 18:31 | ||
jnthn | in | ||
&foo.leave: 1,2,3; # Return from innermost surrounding call to &foo | |||
call implies to me dynamic scope and innermost surrounding implies to me lexical. | 18:32 | ||
18:32
Southen joined
|
|||
jnthn | Are we looking for a foo up the static or dynamic chain? | 18:32 | |
TimToady | you're searching the dynamic context for a particular lexical context | ||
xkcd.com logo | |||
Tene_ | eh? | 18:33 | |
imgs.xkcd.com/static/xkcdLogo.png ? | |||
TimToady | what, I didn't type that... o_O | 18:34 | |
I guess it was a past | |||
*paste | |||
Tene_ | you totally did. I watched you type it. | 18:35 | |
TimToady | though I don't know it got copied in the first place... | ||
*know how | 18:36 | ||
jnthn | Tene: OK, so if we are going to walk up the chain until we find the sub we're looking for, calling the various LEAVE etc on the way, then I guess we'd be then able to call the ret cont. Which brings me back to square one wiht the problem I was describing on #parrot... | ||
18:37
Southen_ left
|
|||
TimToady | it's possible that leave isn't so primitive after all, of course | 18:38 | |
jnthn | True. | ||
TimToady | but I think searching for the scope to leave is probably a separate pass from unwinding | 18:39 | |
and it's the unwinding that actually runs the blocks | |||
jnthn | That makes sense. | ||
TimToady | in the case of normal exceptions, it's the exception handlers that, among themselves, decide how much to unwind | 18:40 | |
in the case of something like LABEL.next, we have a lexically scoped symbol that just needs to be located in the dynamic context | |||
probably context() with a smartmatched arg | |||
and that then decided where to unwind, without any exception handling at all | 18:41 | ||
though it can be done with control exceptions too | |||
but an NEXT block isn't run by a control exception, but by the unwinding, since it's a LEAVE variant | 18:42 | ||
I suppose maximum flexibility does the context search using control exceptions, not context() | 18:43 | ||
but context() will probably be faster, if we can optimize to it | |||
kinda stupid to use a control exception to exit your own block, for instance | 18:44 | ||
when you know everything that's in it | |||
18:44
skids joined
|
|||
TimToady | I guess the dynamic scope could register whether it wants to intercept control exceptions of various sorts | 18:44 | |
and just use context() search out to wherever they were registered, then throw | 18:45 | ||
on the gripping hand, maybe context() is doing its searching with a control exception :) | 18:46 | ||
well, it's chortles all the way down... | 18:47 | ||
jnthn sudders | |||
masak udders | |||
jnthn | *shudders... :-P | 18:48 | |
19:06
kst joined
19:07
kst left
19:10
kst joined
|
|||
jnthn | OK, dinner time. Back later | 19:16 | |
19:16
barney left
|
|||
mikehh | rakudo (3797055) on parrot r37384 builds make test make spectest PASS - t/spec/S02-literals/sub-calls.rakudo: TODO passed 16. | 19:20 | |
thats on Kubuntu Intrepid i386 | |||
19:22
rindolf left
19:26
masak left
|
|||
ruoso | TimToady, Iterator::Unshift can't pop, for instance... nor it provides .[]... | 19:53 | |
I'd guess Array does Iterator::Unshift... | 19:54 | ||
so you can use it wherever you would use an Iterator::Unshift | |||
but my concern is the opposite... | |||
I'd like to make sure you can implement the minimal API to get some functionality | |||
that's actually the same reasoning behind splitting IO into several roles | 19:56 | ||
so you can make a contract of using just a specific subset of API | 19:58 | ||
TimToady, in the specific case of .invoke-iterating and reduce, this iterator object would be a proxy to the actual capture that would consume the values from the immutable (which means only keeping a pointer) and also keeping a stack to receive the pushbacks and the result of each iteration via unshift... So it doesn't need to implement the whole Array API... just Iterator, Iterator::PushBack and Iterator::Unshift | 20:04 | ||
in the case of map and grep, it only needs to implement Iterator and Iterator::PushBack | 20:06 | ||
since it doesn't need to inject the result of the previous invocation in the parameters | |||
20:17
donaldh joined
20:29
mberends joined
|
|||
TimToady | I don't see a need to separate PushBack and Unshift, offhand | 20:29 | |
ruoso | I'm also quite unsure about that | 20:31 | |
but my idea was to provide room for optimization | |||
since pushback places a teoretical restriction on how it is used | |||
so an Iterator::PushBack that is backed by an immutable list can simply contain a pointer to the current position | 20:32 | ||
and it would check if the object being pushed back matches to the one in that list | 20:33 | ||
ruoso just came to an interesting realization... SMOP objects can be binary-interoperable even if there are no common libraries being linked... | 20:35 | ||
frioux | do you guys think it would be possible with perl6 to have some kind of lazily interpolated strings? | 20:43 | |
so like, DBI could autoescape "SELECT foo WHERE foo = $bar" | 20:44 | ||
because that could be really cool | |||
ruoso | frioux, that requirement is void if you use placeholders (which is something you should) | ||
frioux | ruoso: oh of course | ||
not using placeholders is ridiculous | 20:45 | ||
but I am just thinking that it would be really cool if we could make the interface a little nicer | |||
jnthn back from the food | |||
frioux | kindav an autoplaceholder thing | 20:46 | |
ruoso decommute & | |||
frioux | but maybe that's just too weird | ||
20:46
ruoso left
20:52
yary joined
|
|||
yary | Hello all again! | 20:53 | |
Thanks to wayland76 and ruoso for answering my Qs off-line | |||
Re: wayland76 "As far as the usenet group goes, I'd never heard of it until you mentioned it..." | 20:54 | ||
they are referred to on www.perlfoundation.org/perl6/index....c_archives | |||
and the one I had tried posting to is at groups.google.com/group/perl.perl6.users/topics | 20:55 | ||
I'm a bit more comfortable with newsgroups- for one thing I'm often interrupted- like now, I have to leave again for a bit! | 20:56 | ||
skids | frioux: you could write a Str is enhanced module that checks for tags in a caller's package, but the challenge would be getting people to use it :-) | 21:05 | |
(The extra poorness of that idea is now just dawning on me) | 21:07 | ||
So if I read this right, "let $a = x" is (let $a) = x, because it's a named unary. OK now I'm much less confused. | 21:08 | ||
frioux | hahaha | 21:12 | |
wayland76 | yary: I'd recommend the mailing list perl6-users mentioned at dev.perl.org/perl6/lists/ | 21:15 | |
Actually, it's likely this links to the mailing list | |||
21:30
Limbic_Region joined
|
|||
yary | If you try to subscribe and post to the list via the google groups page, it says your post succeeds, but it seems to go nowhere | 21:30 | |
frioux | yary: it takes a little while for your first post to go through | 21:33 | |
yary | I will subscribe to the perl6.users mailing list the normal way, but I found the google groups interface first, and I may not be the first. | 21:34 | |
frioux: my post was 3-4 days ago and another persons post came in & worked after my attempt | |||
frioux | 3-4 days is much longer than it should be | ||
it should be like, 1-2 hours | |||
although, I subscribed the normal way too, not the google groups way | 21:35 | ||
so maybe there is some problem there | |||
yary | My specific old post is not an issue now, as I have answers through here... just the larger issue of a post going missing, could dissuade a casual questioner. | 21:36 | |
frioux | right, agreed | ||
21:39
moritz_ left,
moritz__ joined
|
|||
yary | I see there's now a note about google groups on the www.perlfoundation.org/perl6/index....c_archives page, good job! (or was it always there and I missed it? ah well.) | 21:43 | |
21:46
hercynium joined,
nihiliad left,
nihiliad joined
21:54
donaldh left
21:57
meppl joined
22:00
pmurias_ joined
22:03
sri_kraih_ left
|
|||
yary | Encountering error when rebuilding a fresh checkout of rakudo ( to try out the fix for "Null PMC access in &f.signature.params") | 22:06 | |
Null PMC access in get_pmc_keyed_str() | |||
gmake: *** [runtime/parrot/include/parrotlib.pbc] Error 1 | 22:07 | ||
^ that's the output from "perl Configure.pl --gen-parrot" | |||
22:11
M_o_C left
22:26
skids left
22:27
ruoso joined
|
|||
wayland76 reboots to debug xorg some more | 22:47 | ||
22:47
wayland76 left,
Kimtaro joined
|
|||
dalek | kudo: 519b873 | jnthn++ | src/ (2 files): Avoid using a null PMC in param describing data structure, and use an undef instead; it only invites null PMC exceptions (as in RT#63570). |
22:51 | |
kudo: 41267fd | jnthn++ | docs/spectest-progress.csv: Merge branch 'master' of [email@hidden.address] |
|||
23:14
wayland76 joined
23:30
krunen_ joined
23:31
Limbic_Region left,
skids joined
|
|||
jnthn | ok, I have a working bunch of patches to make outer lexicals visible inside of an eval. | 23:32 | |
But it involves a Parrot addition and a fix to set_outer that I need to write tests for, plus need to smoke Parrot and Rakudo with it, and I'm knackered... | 23:33 | ||
So, will put it all in tomorrow. | |||
23:43
araujo joined
23:45
yary left
|