perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is your friend! Set by moritz_ on 4 May 2009. |
|||
skids | rakudo: not(True).perl.say; not(8).perl.say; abs(-4).perl.say | 00:04 | |
p6eval | rakudo a27bbb: OUTPUT«Bool::True8-4» | ||
00:06
nacho_ joined
|
|||
jnthn | Precedence. Sometimes it's surprises you. :-) | 00:06 | |
rakudo: (not(True)).perl.say; (not(8)).perl.say; (abs(-4)).perl.say | 00:07 | ||
p6eval | rakudo a27bbb: OUTPUT«Bool::FalseBool::False4» | ||
jnthn | Hmm. Actually I'm a tad surprised to. I wonder if Rakudo is right there. :-S | ||
If there was a space after the function name, for sure it'd be right...but without it...hmm. | 00:08 | ||
skids | S03: "In term position, any identifier followed immediately by a parenthesized expression is always parsed as a term representing a function call even if that identifier also has a prefix meaning, so you never have to worry about precedence in that case." | 00:09 | |
00:09
sri_kraih joined
|
|||
skids | S03: "not($x) + 1 # means (not $x) + 1" | 00:10 | |
jnthn | Hmm. In that case probably file rakudobug. | 00:14 | |
00:14
hercynium joined
|
|||
skids | hrm. | 00:14 | |
rakudo: (not(2) + 1).perl.say; (abs(-4) + 1).perl.say | |||
p6eval | rakudo a27bbb: OUTPUT«Bool::False3» | 00:15 | |
skids | so not works in this case but not abs... | ||
ah because they are at different levels. | 00:16 | ||
jnthn | rakudo: say abs(-5) + 7; | 00:17 | |
p6eval | rakudo a27bbb: OUTPUT«2» | ||
jnthn | rakudo: say abs(-5) + -7; | ||
p6eval | rakudo a27bbb: OUTPUT«12» | ||
jnthn | fail | ||
jnthn -> sleep | 00:22 | ||
00:29
japhb_ joined
00:31
bacek__ joined
00:46
wknight8111 joined
01:04
amoc joined
01:06
sri_kraih_ joined
|
|||
s1n | pmichaud: coming to the p6m meeting? | 01:31 | |
01:38
kimtaro joined
01:58
sri_kraih joined
02:03
LadyLunacy joined
02:06
sri_kraih__ joined
02:34
wayland76 joined
02:58
nihiliad joined
03:01
Maghnus_ joined
03:25
amoc^ joined
03:40
orafu joined
03:58
amoc joined
04:00
iblechbot joined
04:14
kate21de joined
04:17
amoc joined
04:22
betterworld joined
04:58
sri_kraih joined,
orafu joined
05:08
justatheory joined
05:27
sri_kraih_ joined
05:32
Helios joined
05:39
Helios joined,
sri_kraih__ joined
|
|||
Tene | pleasedieinafire.net:8080/ -- I threw this together in about 20 minutes while waiting for my plane. | 05:57 | |
... it should stop crashing now... hopefully. | 05:59 | ||
06:29
sri_kraih joined
|
|||
Infinoid | Tene++ | 06:55 | |
07:11
DemoFreak joined
07:27
meppl joined
07:29
sri_kraih_ joined
07:41
mberends joined
07:46
Grrrr joined
07:47
eternaleye joined,
estrabd_ joined
|
|||
pugs_svn | r26766 | azawawi++ | [S:H:P6] version 0.55 contains the latest STD and various minor fixes | 07:57 | |
mj41 | I found s1n blog post ... s1n.dyndns.org/index.php/2009/05/11/sub-method/ | 08:00 | |
moritz_ | well, if you can't wrap your head around the object model, no amount of DWIMiness will save you. | 08:02 | |
08:07
jferrero joined
08:15
jferrero joined
08:31
H1N1[S] joined
|
|||
Matt-W | Morning | 08:32 | |
patmat | hello :) | 08:33 | |
moritz_ | oh hai | ||
Matt-W | On Saturday I had an afternoon of sitting around watching other people rehearse for a concert | 08:36 | |
So I took my laptop | |||
No sooner do I fire up vim and start writing some Perl 6 than I trip over what's either a bug in Rakudo or a bug in my brain | |||
Guess what the concert venue doesn't have! | |||
mberends | a brain? | ||
Matt-W | open wifi | 08:37 | |
very frustrating | |||
mberends | of course not, concerts are hifi | ||
Matt-W | the problem is: if I declare a role with two variants of a multi method, then compose that into a class and try to override one or both of them, I get ambiguous dispatch errors between the role and the object's version of the method | ||
moritz_ | lol | ||
Matt-W | overriding multis from a base class does, however, work correctly | 08:38 | |
so is this what roles are supposed to do, or is this wrong? | |||
and I should really be looking in RT to see if this is known | |||
moritz_ | let's hilight jnthn, maybe he knows | ||
Matt-W | it feels wrong that you don't seem to be able to override multis from a role, because you can override ordinary methods | ||
I think it's seeing them as equally valid candidates instead of an override | 08:39 | ||
Although it did lead me to using a base class instead of a role. I'm not really sure yet when to use which sort of thing | |||
jnthn | morning | 08:42 | |
mberends | O AI | 08:43 | |
jnthn | H H | 08:44 | |
mberends | :) | 08:45 | |
jnthn | Role composition is flattening by definition, which means that the semantics you get are essentially as if the methods had been defined in the class itself. | ||
And what you're seeing is just the fall-out of that. | 08:46 | ||
It's an interesting edge-case though. | |||
08:49
rjc joined
|
|||
moritz_ | sombody should add jnthn's use.perl.org journal to plantetsix | 08:52 | |
jnthn | It isn't on there already? | 08:53 | |
Wow. :-) | |||
moritz_ | speaking of blogs... is there still a rakudo.org blog somewhere? and if yes, is it in use? | 08:54 | |
Matt-W | jnthn: hmm that's very surprising to me | 08:56 | |
Well, I'm kind of surprised and also not surprised | |||
moritz_ | classes and inheritance have to be good for *something* :-) | 08:57 | |
jnthn | Matt-W: I guess I can argue it both ways... | ||
Matt-W: Think it's one to hand off to the language design side and I'll get Rakudo to do what comes back. :-) | 08:58 | ||
Matt-W | jnthn: I think you may be right | ||
use TimToady; | |||
jnthn | Indeed. | 08:59 | |
Matt-W -> a meeting | |||
jnthn -> coffee machine | |||
09:00
masak joined
|
|||
mberends | good $tea-time, masak | 09:00 | |
seen Tene's blogserver? | 09:01 | ||
masak | mberends: I'm having a bit of an interesting experience recalibrating my sleep cycle... | ||
mberends: no, I still need to backlog. | |||
mberends | heh | 09:02 | |
masak | mberends: Tene msg'd me via zarah, saying that he did a blog app speed-run too. but he says 'remind me to post it somwhere', and that was 12 h ago. | 09:03 | |
masak backlogs | 09:04 | ||
mberends | refactoring HTTP::Daemon is interesting... it gets so close to the Perl 5 original that I've written to Gisle Aas, developer of libwww-perl (LWP), about making a more complete Perl 6 version of the entire suite. | ||
09:04
jferrero joined
|
|||
masak | sounds interesting indeed. | 09:05 | |
mberends | Gisle also homes at Gitorious, which had some significant functionality upgrades in the weekend, with probable consequences for a few bits of proto. | 09:06 | |
moritz_ | what's the advantage of gitorious over github? | 09:11 | |
moritz_ curious | |||
jnthn | .oO( That gitorious rhymes with glorious? ) |
09:12 | |
mberends | moritz_: nothing significant, I myself became curious after mentions by ruoso++. There are a few more such sites, it seemed a good idea to let proto work with them all. | 09:13 | |
09:13
clintongormley joined
|
|||
mberends | down the line, my expectation is that CPAN will yield to DPAN (Distributed, Decentralised) and that involves spanning may repository environments. | 09:14 | |
masak | DPAN++ | ||
moritz_ | as long as it doesn't become DarkPAN | ||
masak | what is that, by the way? | 09:15 | |
mberends | anything you make it ;) | ||
moritz_ | modules and scripts not hosted on CPAN, but floating around on the internet somewhere | ||
masak | ah. | 09:16 | |
well, technically we're already a part of that. | |||
moritz_ | because there's no cpan for Perl 6, right | ||
mberends | moritz_: yes, maintaining a catalog of what's OK (fsvo OK) is the DPAN challenge | 09:17 | |
moritz_ | I had this idea of a Perl 6 CPAN that doesn't actually host the projects by default | ||
but rather checks out remote repos, renders the docs, indexes them etc. | 09:18 | ||
mberends | like Napster? | ||
moritz_ never used napster | |||
masak | mberends: I almost don't see how a catalog squares with the D in DPAN... I think we talked about that outside the mausoleum, though. | ||
mberends denies even knowing about napster | |||
masak didn't even hear the word napster | 09:19 | ||
jnthn | Wasn't that the thing we pirated music with last millenium? | ||
mberends | it never happened | ||
masak | nope. | ||
mberends | the DPAN idea is to link to remote repos, like moritz_ says, but also to avoid hijacking, trojans etc, hence a database for package search and authentication. | 09:21 | |
masak | mberends: is the database centralized? | 09:22 | |
mberends | no, decentralized like git repos. | ||
09:22
Fuad joined
|
|||
masak | mberends: hm. I guess it's not worse than having an old mirror as the default mirror... | 09:23 | |
Fuad | Hi folks | ||
mberends imagines tying it together with SHA string and perl6 glue | |||
masak | I mean, as long as the nodes update from each other frequently, we're fine. | ||
Fuad: o/ | |||
moritz_ | what's wrong with a centralized database? | ||
(as long as there can be many of them) | 09:24 | ||
mberends | Fuad: are you chatting on company time, you bad boy? | ||
masak | moritz_: was that a joke? :) | ||
Fuad | mberends:Hey:) | ||
im at office now | |||
today i havent much work,most of them i have already done | 09:25 | ||
so decided join here | |||
moritz_ | mberends: not really | ||
Fuad | masak:howdy dude | ||
masak | Fuad: oh hai, dude. | 09:26 | |
Fuad greets moritz_ and jnthn | |||
masak | & | ||
mberends | moritz_: there does need to be some central responsibility for package approval, so that perl users know they can trust the future installer utilities. | 09:27 | |
moritz_ | mberends: agreed | ||
mberends | in addition though, peer-to-peer module publishing (semi DarkPAN) would useful to reduce bottlenecks. | 09:28 | |
09:28
wollmers joined
|
|||
moritz_ | we could add trust graphs like pgp | 09:29 | |
mberends | why is there so little Rakudo software on CPAN? | ||
moritz_: yes, i like those schemes | |||
moritz_ | however it's much more complicated than current CPAN | 09:30 | |
Matt-W | mberends: Because there's not much Rakudo software around? | 09:34 | |
moritz_ | because CPAN is perl 5 only | ||
Matt-W | That too | 09:35 | |
masak | mberends, moritz_, Matt-W: to be fair, szabgab did some experiments in putting Perl 6 software on CPAN. but I seem to recall it wasn't all that easy. | 09:45 | |
Matt-W | I think CPAN for Perl 6 does need some different assumptions | ||
masak | "every complex system that works evolved from a simple system that worked." | 09:46 | |
I'm not sure I quoted that correctly. or who said it. | 09:47 | ||
Matt-W | I'm not sure that's necessarily true in all cases | ||
But it's probably true in the best cases | |||
masak | Matt-W: it's certainly true of living organisms. | 09:56 | |
oh! now that prefix:<=> is deprecated, do things like 'my $a =42' work again? | 10:01 | ||
rakudo: my $a =42; | |||
p6eval | rakudo a27bbb: ( no output ) | ||
masak | rakudo: my $a =42; say $a; | 10:02 | |
p6eval | rakudo a27bbb: OUTPUT«42» | ||
masak | \o/ | ||
jnthn | Another nice fallout... :-) | ||
10:04
LadyLuna1y joined
|
|||
masak | I see from the backlog that you successfully submitted rakudobugs without me. :) | 10:04 | |
Matt-W | that's not a nice fallout | 10:07 | |
can't be encouraging people not to put whitespace around their infix operators | |||
masak | Matt-W: ok, sir, your task when macros and grammar mods land is obviously to create an 'überstrict' module. | 10:08 | |
jnthn | Matt-W: It's helpful for obsfucation. Duh! | 10:09 | |
;-) | |||
Matt-W | Obfuscation is not helpful though | 10:23 | |
masak: okay :) | |||
masak: Should write one that requires use of 'please' like INTERCAL, too | 10:24 | ||
jnthn | Matt-W: What, you mean www.jnthn.net/code/co06.pl has some issues? | 10:25 | |
masak | oh, definitely. | ||
jnthn: that's so... obfuscated. | 10:28 | ||
10:28
masak joined
|
|||
jnthn | masak: It actually isn't all Perl though. It contains the bytecode for a small bytecode itnerpreter, written there inside the obsfucation, and an encoded strings heap too. The bytecode in there runs on the interpreter and outputs a Christmas caro. | 10:29 | |
*carol | |||
masak | ok, wow. | 10:30 | |
Matt-W | that is | 10:31 | |
well | |||
I don't know if I should admire that you can actually do something like that, or be horrified by its sheer denseness | 10:32 | ||
Ultimately I just look at it and feel stupid | |||
jnthn | Matt-W: I try and be a little less dense in my Rakudo commits. :-) | 10:33 | |
moritz_ | having a syntax hilighter helps immensely when looking at such obfus | ||
Matt-W | I can appreciate obfus as an intellectual exercise | ||
I just don't do it :) | 10:34 | ||
moritz_ | the most interesting part seems to be the sub __ which is at the end of file | ||
Matt-W | jnthn: your rakudo commits are generally very readable :) | ||
10:37
PhatEddy joined
10:41
donaldh joined
|
|||
wollmers | std: "a" . "b"; | 10:43 | |
p6eval | std 26766: OUTPUT«##### PARSE FAILED #####Obsolete use of . to concatenate strings; in Perl 6 please use ~ instead at /tmp/EtJUuAMIPP line 1:------> "a" . "b";FAILED 00:04 35m» | ||
wollmers | std: "a"."b"; | ||
p6eval | std 26766: OUTPUT«ok 00:04 35m» | ||
wollmers | std: "a" .= "b"; | ||
p6eval | std 26766: OUTPUT«Potential difficulties: Possible obsolete use of .= as append operator; in Perl 6 please use ~= instead at /tmp/6QCU4mfZtE line 1:------> "a" .= "b";ok 00:04 36m» | ||
moritz_ | note that the alst one actually parsed, but emitted a warning | 10:44 | |
wollmers | rakudo dies on all, but 'dies_ok "a"."b"' wouldn't be a reliable test. | 10:48 | |
masak | you'd need dies_ok { "a"."b" } | ||
moritz_ | rakudo: use Test; plan 2; dies_ok { "a"."b" }; lives_ok { "a".codes } | 10:49 | |
p6eval | rakudo a27bbb: OUTPUT«1..2ok 1 - not ok 2 - # Looks like you failed 1 tests of 2» | ||
jnthn | (.codes not implemented) | 10:51 | |
wollmers | Method 'codes' not found for invocant of class 'Str' | 10:52 | |
moritz_ | rakudo: use Test; plan 2; dies_ok { "a"."b" }; lives_ok { "a"."chars" } | ||
p6eval | rakudo a27bbb: OUTPUT«1..2ok 1 - ok 2 - » | ||
moritz_ | that's what I wanted to do :-) | ||
Matt-W | Oh so you can call methods using strings | ||
moritz_ | that's a pity, because current .chars is actually doing what .codes should | ||
wollmers | Graphemes still seem to be not implemented | 10:53 | |
masak | perlmonks.org/?node_id=763217 # do contextual vars still have + as a twigil? | ||
jnthn | no, unified with globals | 10:54 | |
masak thought so | |||
sometimes the distributedness of various helpful Perl 6 documentation can be problematic. | |||
jnthn | moritz_: Really? Ouch. :-( | ||
jnthn still hasn't figured graphs into his mental model of how unicode works yet | 10:55 | ||
moritz_ | masak: already answered | ||
pugs_svn | r26767 | moritz++ | [docs] remove + twigil form Perl6::Perl5::Differences | ||
moritz_ | masak: and that doc lives in the pugs repo | ||
masak | moritz_++ | ||
moritz_: indeed. | |||
wollmers | jnthn: from my POV (point of view) it's unspecced what graphemes should be. | 10:58 | |
moritz_ | wollmers: the Unicode people have a pretty good idea about that, and Tom Christiansen quoted that in a recent mail to p5p | 10:59 | |
maybe rip that off for Perl 6 spec? | |||
jnthn | I only understand that chars and codes differ in that there exist codepoints that combine to make some characters, though I'm hazy on if that's the same concept I've heard of as "combinding characters". | ||
moritz_ should write up something about that | 11:00 | ||
wollmers | There is already a reference in Parrat to Unicode 'Grapheme Clusters' | ||
*Parrot | |||
masak switches locations | 11:01 | ||
wollmers | moritz_: what's p5p? Link? | ||
moritz_ | wollmers: perl 5 porters, the perl 5 development mailing list | 11:02 | |
www.perlfoundation.org/perl5/index....l5_porters | |||
groups.google.com/group/perl.perl5....57cb52a9d7 though it seems to be missing the first post | 11:05 | ||
wollmers | moritz_: Thx, but this is about 'width' (a Unicode property) which is different from length | 11:10 | |
moritz_ | wollmers: \X is designed to match one grapheme (though poorly implemented) | 11:12 | |
the question is if we want that same definition for Perl 6 | |||
wollmers | docs.parrot.org/parrot/latest/html/...s.pod.html -> Grapheme | 11:14 | |
11:14
frew|work joined
|
|||
moritz_ | that reads as if Parrot's Grapheme is the same as a Unicode grapheme cluster | 11:15 | |
wollmers | unicode.org/reports/tr29/#Grapheme_...Boundaries | 11:17 | |
moritz_ | and it would be *very* helpful if Perl 6 and Parrot could agree on what a Grapheme is | ||
11:20
donaldh joined
11:22
masak joined
|
|||
wollmers | moritz_: Exactly. | 11:25 | |
11:28
eternaleye joined
11:29
meehav joined,
amoc joined
11:35
LylePerl joined
11:36
kane_ joined
11:42
kane_ joined
|
|||
masak digs into P2T1A | 11:42 | ||
there are 20 items there. | 11:43 | ||
11:43
eternaleye joined
|
|||
moritz_ | and how many days to go? | 11:43 | |
masak | if I spend 10 minutes on each, I can be done in 200 minutes. | ||
moritz_: I think the 22nd was some kind of deadline. | |||
(for me, that is.) | |||
200 minutes is too long a time for a hackathonic effort, I think. | 11:44 | ||
I'll split the task in half and do one half today. | |||
it's 13:45 now. I'll keep going until 15:15, and see how far I get. will try to break off each item after 10 minutes. | 11:45 | ||
moritz_ | masak++ # micro self-management | ||
masak | :) | 11:46 | |
pugs_svn | r26768 | masak++ | [u4x] added Pair.pod | 11:51 | |
moritz_ | that was before 13:55 - first success :-) | 11:52 | |
masak | I'm ahead. | 11:53 | |
just encountered first dilemma, though. | |||
do I put .subst in Str or in Any? | |||
masak goes with Any for now | |||
moritz_ | heh, Pair.pod was cheating | 11:54 | |
masak | moritz_: I guess :) | ||
it's all I feel I need right now. | 11:55 | ||
I even listed all the methods. :) | |||
Matt-W | Oooh u4x | ||
Hmm | 11:56 | ||
I'm not sure about this Pod thing really | |||
Shouldn't u4x documentation be in a semantic format? | |||
masak | Matt-W: that's what I'm here to find out | 11:57 | |
moritz_ | Pod is supposed to be semantic | ||
at least partially | |||
though we might have to augment it with additional meta data | |||
masak | I was hoping Pod could be sufficiently semantic for my purpoises. | ||
moritz_: aye. | |||
suggestions welcome, especially hypnotic suggestions. | 11:58 | ||
Matt-W | It seems to me that if we're documenting classes and methods then we should be able to say things like =class and =method | ||
moritz_ | Matt-W: that's actually a nice idea for Pod | ||
IMHO | |||
but it might come with problems... | 11:59 | ||
moritz_ will try to think a bit more about that later today | |||
Matt-W | I've been struggling with Pod in Form | ||
It's really no better than POD | 12:00 | ||
(for documenting an API) | |||
moritz_ | that's why we had that discussion about doc strings | 12:01 | |
Matt-W | I wasn't aware of that | ||
masak | (discussion about doc strings)++ | 12:02 | |
moritz_ | www.nntp.perl.org/group/perl.perl6....31507.html | ||
Matt-W reads | 12:04 | ||
pugs_svn | r26769 | masak++ | [u4x] documentation for .subst | 12:07 | |
masak | that was a tough one. didn't get full coverage, and I'm a bit behind now. | ||
oh, feel free to fix my commits in any way you see fit. | |||
there are no pumpkins involved at this stage. | |||
Matt-W | they all got made into pies | 12:09 | |
masak | Matt-W: hah, bu tyou missed the proto pumpkin. it's right here on my desk. :) | 12:10 | |
s/bu t/but / | |||
Matt-W | I didn't say *I* did the pie-making | 12:12 | |
pugs_svn | r26770 | masak++ | [u4x] added constants True and False | 12:14 | |
12:16
payload joined
12:18
aindilis joined
|
|||
masak | slurp has a parameter $enc with default "Unicode". | 12:20 | |
did we decide to say "Unicode" rather than "UTF-8"? | |||
(the former isn't technically an encoding) | |||
pugs_svn | r26771 | masak++ | [u4x] added slurp | 12:22 | |
moritz_ | masak: see S16 or S32-IO for what "Unicode" means | 12:23 | |
masak | moritz_: I'll take that as a "yes". | ||
don't have time to check right now. :) | |||
moritz_ | (ie guessing UTF-8/UTF-16{LE,BE} based on BOM) | ||
masak | aha. | 12:24 | |
pugs_svn | r26772 | masak++ | [u4x] added length | 12:26 | |
r26773 | masak++ | [u4x] added if | 12:36 | ||
r26774 | moritz++ | [S12] there's no .values method in Junction | 12:39 | ||
r26775 | masak++ | [u4x] added subset | 12:44 | ||
r26776 | masak++ | [u4x] added continue | 12:51 | ||
masak | When is using LAST { x() } not equivalent to just putting 'x()' after a loop? | 12:55 | |
Matt-W | When you break out of a loop early and the LAST block doesn't execute? (guessing) | 12:56 | |
12:56
riffraff joined
|
|||
masak | Matt-W: I thought LAST blocks were called no matter the type of loop termination. | 12:57 | |
masak thinks of a case where putting code after a loop isn't an option | 12:58 | ||
let's see if someone else guesses it. | |||
pugs_svn | r26777 | masak++ | [u4x] added LAST | ||
jnthn | When you want to use what the loop evaluates to as the return value. | 13:00 | |
masak | oh, nice one. | ||
13:00
sylware joined
|
|||
masak | that was not the same as my (contrived) example. | 13:00 | |
Matt-W | Also, I suppose, when you want the structure of the code to show clearly that something's going to run after the loop finishes, no matter what happens | 13:01 | |
sylware | Hi, is there some doc on the C interface of embedded perl6? | ||
masak | Matt-W: aye, but then putting it afterwards is still an option. | 13:02 | |
pugs_svn | r26778 | masak++ | [u4x] added $. | ||
Matt-W | masak: yes, but LAST {} has a nice 'I'm part of the loop' feel to it | 13:03 | |
jnthn | sylware: For Rakudo, I think best is see docs for embedding Parrot. | ||
sylware: And then after that you can load perl6.pbc through the Parrot embedding API. | |||
13:04
nihiliad joined
|
|||
jnthn | And then shouldn't be too hard beyond there... Also see Inline::Rakudo on CPAN where somebody already did this, I think. | 13:04 | |
masak | Matt-W: aye, your example is good; I should add something like that to the LAST documentation of u4x. | ||
sylware | jnthn: parrot callback (from perl6 code) are easy to deal with? | ||
masak | the hard part is thinking up good examples. | ||
Matt-W | yeah good examples are really hard | 13:05 | |
my Perl 5 slides for work are full of total nonsense | |||
the object-oriented example is a monotonically-increasing counter | |||
jnthn | sylware: Not sure, I'm afraid...didn't try that. | 13:06 | |
Matt-W | which I then provided a teaser implementation of in Perl 6 which fits easily on one slide, where the Perl 5 one certainly doesn't :) | ||
jnthn | sylware: There's a good chance I or others can help if you try and run into difficulties though. | ||
sylware | jnthn: well, I do not even know where to start... | 13:07 | |
pugs_svn | r26779 | masak++ | [u4x] added the @ sigil | 13:08 | |
13:11
payload joined
|
|||
masak found moritz_++' C<^> twigil documentation | 13:12 | ||
jnthn | sylware: docs.parrot.org/parrot/latest/html/...d.pod.html | ||
pugs_svn | r26780 | masak++ | [u4x] added ^ twigil | 13:13 | |
r26780 | masak++ | | |||
r26780 | masak++ | Documentation stolen and adapted from syntactic-elements.pod by moritz++. | |||
sylware | jnthn: I'm currently reading it :) | ||
masak | I think I'll stop here. I've done 12 out of 20 items in 90 minutes. | 13:14 | |
the sprint has raised many questions that I think I'll turn to now. | |||
moritz_: I really liked the line '=for STD twigil:sym<^>' | 13:15 | ||
13:16
cognominal joined
|
|||
sylware | jnthn: ok, with parrot and perl6 code... how I would build a perl6 hash and pass it to some perl6 sub as an argument? | 13:19 | |
(from C) | |||
13:20
DietCoke joined
|
|||
masak | I think it'd be a good idea to structure the u4x docs after the STD grammatical categories: perlcabal.org/syn/S02.html#Grammati...Categories | 13:20 | |
DietCoke | news.perlfoundation.org/2009/05/200...l_6_p.html - there's a proposal for some perl6 documentation work that has no community feedback on it. | ||
sylware | jnthn: in theory, I should have a "formal" specification which maps perl6 date types to parrot data types | 13:21 | |
do you know where I can find this? | |||
jnthn | sylware: I don't think that exists. | 13:22 | |
sylware: At least, I've never seen it. | |||
sylware | jnthn: it has to exist, since that defines the mapping perl6<->parrot. | ||
jnthn | You can probably construct a Parrot Hash PMC and pass that in. | 13:23 | |
Rakudo can probably handle that OK. | |||
(And if not, it needs to learn how to, otherwse we'll have wider interop issues.) | |||
13:24
nsh joined
|
|||
sylware | jnthn: yes, but the idea is to have the full blow written specs. Because I asked for a basic example, but at the end, it may require way more complexe data type, or even fiddling with perl context for a parrot callback. | 13:25 | |
In order to build proper parrot structs to deal with perl6 code, I would need that mapping. | 13:26 | ||
I'm scared, that the answer would be, that specification is the code! | |||
jnthn | The answer is more that embedding Rakudo just hasn't been thought about that much yet. | 13:27 | |
TheActualCoke | Are we talking about HLL interop!? oooh, goodie. | ||
sylware | jnthn: hu? Is this not a base requirement?? | ||
jnthn | Yes, of course. So are many other things that haven't been worked out yet though. :-) | 13:28 | |
sylware | (aka interop with "others" inside a process) | ||
jnthn: allright | |||
jnthn | Rakudo just isn't that complete yet, and there's been relatively little demand yet on the embedding front. | ||
I think Inline::Rakudo on CPAN probably has got furthest down this road. | 13:29 | ||
13:30
donaldh left
|
|||
masak | @seen lichtkind | 13:30 | |
lambdabot | I saw lichtkind leaving #perl6 7m 13d 13h 2m 29s ago, and . | ||
TheActualCoke | and then? | 13:31 | |
sylware | jnthn: ok. Since parrot 1 is out and perl6 specs quite stable we could expect a mapping (or even an C API) very soon (cannot use duke nukem forever analogy :) ) | ||
(I understand that a C API specific for each languages supported by parrot would be the cleanest option. But waiting, a formal and updated document about that "mapping" would suffice for while | 13:33 | ||
jnthn | Depends what you mean by very soon...and also if there's someone motivated to work on this very soon. | 13:35 | |
13:35
donaldh joined
|
|||
PerlJam | sylware: whyfor do you ask? Do you have some project where you would like to mix languages in this manner? Maybe you could start on the specs. | 13:36 | |
13:36
mizioumt joined
|
|||
jnthn | Indeed, the specs will likely come as a result of someone who wants to embed helping to create them... | 13:36 | |
Or they will happen sooner if someone makes a start and then solicits input. | 13:37 | ||
PerlJam | yep. | ||
sylware | Well, the idea is to make many coders working in the same process, since they would use different languages, VMs (actually the one they like). The only requirement would be to interoperate with the other, the least common factor being C. | 13:39 | |
13:39
kimtaro joined
|
|||
TheActualCoke | sylware: C+PIR | 13:42 | |
sylware | TheActualCoke: PIR? | ||
TheActualCoke | the assembly language parrot uses. | ||
Tene | masak: bin/omgblog.pl in web | 13:44 | |
masak | Tene++ | ||
Tene | 20 minutes at the airport before my flight. I was surprised. | ||
TheActualCoke | docs.parrot.org/parrot/latest/html/...p.pod.html | ||
sylware | TheActualCoke: perl6<->PIR would be reasonable as interop with C | ||
? | |||
TheActualCoke: ok, having a look at the doc... | 13:45 | ||
masak | Tene: me too! it looks like more than 20 minutes of code. | ||
but maybe you write faster than I do. | |||
Tene | jnthn: I ran into an awkward bug last night... | ||
PerlJam | masak: It probably helps if you already have a design in your head and all writing is "only" implementation :) | 13:46 | |
Tene | although... lemme check... | ||
TheActualCoke | sylware: for the most part, though dynamic opcodes and PMCs make it possible to invoke C. | ||
masak | PerlJam: true. | ||
LolDispatch++ | |||
it makes perfect sense that a blog that uses LolDispatch is called OmgBlog :) | 13:47 | ||
sylware | TheActualCoke: actually since C is the father of All... the glue between languages and VMs, would be C. Then I looking more to a C written orchestra lead, then C calling perl6/parrot code instead of the opposit | 13:48 | |
PerlJam | masak: you wrote Tags.pm right? | 13:49 | |
masak | PerlJam: no, Tene++ did. | ||
PerlJam | ah. | ||
TheActualCoke | VMs /multiple/ ? | ||
if this not just a parrot thing, then I can't help. =-) | 13:50 | ||
PerlJam | Tene: then I've been meaning to ask you a question ... why? :-) I mean, I can think of some reasons myself, but I want "the original" reasons. | ||
Tene | PerlJam: why what? | ||
PerlJam | Tene: Why write Tags.pm? | ||
sylware | TheActualCoke: multiple, meaning parrot VMs and "others". | ||
Tene | PerlJam: because I wanted to use it. | ||
sylware | (in order to please all our coders :) ) | 13:51 | |
Tene | I'm not sure I get the question. Still waking up. :) | ||
jnthn | Tene: Bug being? (will be able to focus on Rakudo stuff in ~ 10-15 minutes) | ||
masak | Tene: speaking of Tags.pm: when I do 'say show { html }', I get '<html/>', but when I do 'say show { html {} }'. bug or feature? | ||
oops, in the latter case I get '<html'. | 13:52 | ||
TheActualCoke | sylware: ok. that document is a first pass at interoperation in a single parrot interpreter. | ||
Tene | jnthn: I used a sub trait handler to stuff a block into an array. When I then tried to return something from the block, it crashes parrot because of the signature typechecking on the end of the block. | ||
PerlJam | Tene: okay, longer story ... one of the things that bugs me about RoR is how everything is shoehorned into ruby; you want to do some javascript, write some ruby instead; you want do templating, write some ruby instead; etc. Tags.pm struck me as heading that way for perl6 as wel. | ||
Tene | masak: bug. | 13:53 | |
PerlJam | Tene: I'm just wondering why you would choose to replace html with perl | ||
masak submits it as an issue in github/web | |||
13:53
pmurias joined
|
|||
Tene | PerlJam: Because I'm much more comfortable with perl, especially for small tasks. | 13:53 | |
sylware | TheActualCoke: I see that... the thing is "that biding" document should be extended to deal also with "things" ouside a parrot VM. | 13:54 | |
TheActualCoke: but that is the start of the road | |||
(looooooong) | |||
Tene | The target audience of Tags is a small (maybe single person) team, all who use perl. It's internded to be an alternative, not a mandatory or exclusive choice. | 13:55 | |
TheActualCoke | sylware: from parrot's perspective, that's probably the embedding API. | ||
docs.parrot.org/parrot/latest/html/...g.pod.html | |||
Tene | PerlJam: Also, writing perl instead of javascript can have some significant advantages. Jifty, for example, does that, and they're able to to automatically detect capabilities of the client, and render in place with AJAX if the client supports it, or fall back to an HTTP refresh if the clien thas javascript disabled or doesn't support it. | 13:56 | |
for example. | |||
TheActualCoke | (also docs.parrot.org/parrot/latest/html/....pod.html) | ||
Tene | You can use all of the fancy javascript magic, and still be confident that your page will render in elinks, or on a mobile browser without javascript. | 13:57 | |
PerlJam | Tene: okay ... curiousity satisfied :) | ||
Tene | :) | ||
But, mostly, because I wanted to use it personally. | |||
PerlJam | Tene++ -- scratching itches :-) | 13:58 | |
Tene | Because when I'm writing a little bit of code, I'd much rather deal with perl instead of some awkward showhorned template language. | ||
When I want to iterate over some data structure to generate a list, I don't want to manually concatenate strings, or interpolate a ton of generated variables into inline text. | 13:59 | ||
ul { for 1..10 { li :id<$_> "item $_" } } | |||
sylware | TheActualCoke: yes, that's the thing for parrot. But if you add the langage semantic (for instance perl context etc...), you would need specs which define perl semantic mapping to parrot embedded interface. | ||
Tene | It's hardly appropriate for a larger situation where you need templates, etc. for most companies. | 14:00 | |
Your designer likely doesn't speak perl, but many do speak template languages. | |||
14:00
PacoLinux joined
|
|||
Tene | It's also a response to restricted, limited template languages, like django's. | 14:01 | |
Django's template language frustrates me every time I use it. | 14:02 | ||
masak | Tene: the thing that most often bites me in Tags is putting commas in the right places, like after named pairs. but I guess that's Perl 6's fault, not yours. :) | ||
Tene | ... i can stop speaking now. You said it was answered. :) | ||
14:02
nsh- joined
|
|||
Tene | yes, that bites me in several places in Perl 6. | 14:02 | |
PerlJam | me too (though I always chalked it up to how infrequently I write perl 6) | 14:03 | |
masak | for some reason, I expect named params not to need commas. | ||
I don't know why. | 14:04 | ||
Tene | well, because they look clearly delimited already | ||
moritz_ | because they're not a list, in the usual sense | ||
masak | hm. perhaps. | ||
Tene | std: foo( :a<1> :b<2> ) | 14:05 | |
p6eval | std 26780: OUTPUT«Undeclared routine: foo used at 1 ok 00:02 35m» | ||
masak | I wonder if it'd be possible to modify the Perl 6 grammar not to need commas before/after named arguments... | ||
std: sub foo() {}; foo( :a<1> :b<2> ) | |||
p6eval | std 26780: OUTPUT«ok 00:02 36m» | ||
masak | that's... odd. | ||
Tene | important to separate them from positionals, because look at: | ||
moritz_ | it might be parsed as an adverb to the <1> subscript | ||
Tene | foo(1..10 :by<2>) | ||
foo(1..10, :by<2>) | |||
moritz_ | (the second one) | ||
what Tene said | 14:06 | ||
masak | rakudo: sub foo() {}; foo( :a<1> :b<2> ) | ||
p6eval | rakudo a27bbb: OUTPUT«Statement not terminated properly at line 1, near "( :a<1> :b"current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)» | ||
masak submits rakudobug | |||
...which might as well be a STD-bug, mind you. | |||
moritz_ | masak: I don't think it's a bug | ||
masak | it's a bug somewhere. | ||
moritz_ | masak: it might just by not-yet-implemented adverbs in rakudo | ||
masak: for which we already have a ticket | |||
masak | oh. | ||
hrm. | 14:07 | ||
Tene | okay, srsly, need to get to work. | ||
masak wonders what the STD expression deparses to | |||
Tene | have fun today guys. seeya | ||
jnthn | Tene: Catch me later with a code example of the problem you ran into. | ||
masak | Tene: will you blog about your ombblog thing? | ||
14:08
ruoso joined
|
|||
jnthn | sylware: Parrot's language inter-op is more about ability to do certain operations than it is about mappings of one type to another. | 14:08 | |
Tene | masak: yes | 14:09 | |
masak | excellent. | ||
ruoso | Hello! | ||
jnthn | hi ruoso | ||
ruoso back after a long and deserved weekend | |||
jnthn | :-) | 14:10 | |
ruoso | do we have context variables already ;) ? | ||
sylware | jnthn: docs.parrot.org/parrot/latest/html/...g.pod.html missing the HLL semantics mapping | ||
to parrot embedded API | |||
pmurias | ruoso: hi | ||
Tene | jnthn: paste coming up... | ||
ruoso | hi pmurias | ||
Tene | jnthn: also, this is a very very low priority. I can work around it by using implicit return. | 14:11 | |
jnthn | Tene: Sure, but I'm interested to see what it is. | ||
sylware: What do you mean by "HLL semantics mapping"? | |||
pmurias | ruoso: p6opaque is sort of working | 14:12 | |
ruoso | cool | 14:13 | |
Tene | jnthn: gist.github.com/109986 | 14:14 | |
pmurias | ruoso: how should we deal with a test which hangs? | ||
sylware | jnthn: HLL (High Level Language) running on parrot have different semantics (i.e. perl context would not exist in other high level langage), but code from an embedded perspective would call parrot code and configure the call to fit the semantics of the called parrot HLL. | ||
Tene | jnthn: be warned that ever since we added .annotate lines to --target=pir, the PIR line number reported will be a lie. | 14:15 | |
ruoso | pmurias, what do you mean by "hangs"? | 14:16 | |
pmurias | loops infitely | ||
ruoso | well... we could have a timer when running the tests | 14:17 | |
jnthn | sylware: One of the aims of Parrot is that there's a common set of calling conventions, so you shouldn't need to "configure the call", as it were. | ||
Not quite sure what you mean by "perl context" either. | |||
Tene: thanks | |||
masak submits rakuodbug | 14:18 | ||
Tene | jnthn: he means want() | ||
14:18
kimtaro_ joined
|
|||
jnthn | Oh. There Is No want(). :-) | 14:19 | |
sylware | jnthn: for instance, I call a perl sub which behave differently in scalar context than in list context , I should from an embedded point of view be able to call that sub in the expected context. | ||
pmurias | ruoso: going through failing tests and fixing them is what i should be doing? | ||
jnthn | Well, it's probably dead anyways... | ||
ruoso | pmurias, do we have prototypehow already? | 14:20 | |
masak | sylware: we should have an FAQ for this one. :) | ||
pmurias | ruoso: yes | ||
masak | sylware: we decided to scrap want() in Perl 6 because (a) nobody knows quite how to implement it, and (b) there are other, saner means of doing it in Perl 6. | ||
pmurias | you can look at make test in re-mildew to see what's working | ||
jnthn | masak: You just put what I was going to say but better. :-) | ||
ruoso | pmurias, cool... so I think it's just making all tests to work | 14:21 | |
masak | sylware: for example, you could equip the returned value with the appropriate conversion methods to List, Item, Bool etc. | ||
jnthn | ruoso: (just making all the tests work) we're working on that issue in Rakudo too. ;-) | ||
ruoso | heh | ||
sylware | masak: well, I could? How do I know how the perl6 stuff is mapped to parrot stuff? | ||
ruoso | pmichaud, btw... were you able to make contextual variables work? | 14:22 | |
masak | sylware: that's an open-ended question. | ||
sylware: maybe read Rakudo source? | |||
sylware | :D | ||
As I said, it's exactly what I was scared of... | |||
jnthn | It's not only open ended, but we also don't actually know all of the answers yet. | 14:23 | |
sylware | It has to exists a biding document between an HLL semantics with parrot embedded API | ||
PerlJam | sylware: why scared? Until someone actually *needs* it, there's no point in speccing the thing. | ||
otherwise you spec to imagined requirements rather than actual ones. | 14:24 | ||
pmurias | sylware: parrots source is well documented | ||
sylware | That's not the issue | ||
ruoso | pmurias, I think you forgot to add prototypehow to svn | ||
jnthn | OK...Rakudo time! :-) | 14:26 | |
jnthn creates a branch so he can start breaking stuff | |||
14:26
skids joined
|
|||
pugs_svn | r26781 | pmurias++ | [re-smop] p6opaque is registered in lexical prelude | 14:26 | |
r26781 | pmurias++ | in the RI DSL the init section is after the prototypes are created | |||
PerlJam | jnthn: what, in particular, are you going to break today? | ||
pugs_svn | r26782 | pmurias++ | [re-smop] the prototype RI delegates ^!CREATE | 14:27 | |
r26783 | pmurias++ | fix bug in accessors | |||
r26784 | pmurias++ | minor cleanup | |||
jnthn | PerlJam: .wrap and .unwrap | ||
PerlJam | jnthn: cool. | ||
ruoso | pmurias, hmmm where is PrototypeHOW? | ||
pugs_svn | r26785 | pmurias++ | [re-smop] ported over PrototypeHOW, fixed some leftovers in p6opaque | ||
r26786 | pmurias++ | [re-mildew] fixed test | |||
ruoso | ah | ||
;) | |||
jnthn | PerlJam: I need to refactor how callnext etc work. | ||
pmurias | ruoso: forgot to git-svn dcommit | ||
sylware | pmurias: The issue is the existence of a "close" to formal document which maps HLL semantics to parrot embedded API. For instance, specs of perl6 semantics mapping to parrot embedded API. | 14:28 | |
jnthn | PerlJam: And get it working with the candidate-listy object case. | ||
And then re-work wrap and un-wrap to work the same way. | |||
ruoso | pmurias, hmm... pureprototypehow shouldn't be inside p6opaque module... | 14:29 | |
14:29
[particle]1 joined
|
|||
pmurias | ruoso: where should it live? | 14:29 | |
ruoso | pmurias, in the OO module | ||
sylware | pmurias: then you would have the same document for each of www.parrot.org/languages | ||
ruoso | because it doesn't really depend on the p6opaque | ||
other RI could use prototypehow | 14:30 | ||
moritz_ | rakudo: sub a($x) { say "1: $x}; &a.wrap(s{ay "2"; nextsame}); a(3) | ||
p6eval | rakudo a27bbb: OUTPUT«say requires an argument at line 1, near " \"1: $x}; "current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)» | ||
moritz_ | rakudo: sub a($x) { say "1: $x" }; &a.wrap({say "2"; nextsame}); a(3) | ||
p6eval | rakudo a27bbb: OUTPUT«2Could not find non-existent sub nextsamecurrent instr.: '_block39' pc 354 (EVAL_17:149)» | ||
moritz_ | rakudo: sub a($x) { say "1: $x" }; &a.wrap({say "2"; nextwith(4)}); a(3) | ||
p6eval | rakudo a27bbb: OUTPUT«2Could not find non-existent sub nextwithcurrent instr.: '_block39' pc 361 (EVAL_17:151)» | ||
jnthn | moritz_: Ah, it's only callsame and callwith that are done, I think. | ||
moritz_ | rakudo: sub a($x) { say "1: $x" }; &a.wrap({say "2"; callwith(4)}); a(3) | 14:31 | |
p6eval | rakudo a27bbb: OUTPUT«21: 4» | ||
moritz_ | rakudo: sub a($x) { say "1: $x" }; &a.wrap({say "2: $x"; callwith(4)}); a(3) | ||
p6eval | rakudo a27bbb: OUTPUT«Scope not found for PAST::Var '$x' in current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:105)» | ||
pmurias | sylware: i'm not a parrot guy | ||
moritz_ | rakudo: sub a($x) { say "1: $x" }; &a.wrap(-> $x {say "2: $x"; callwith(4)}); a(3) | ||
p6eval | rakudo a27bbb: OUTPUT«2: 31: 4» | ||
pmurias | and the smop embedding api is likely to be hugely different from the parrot one | ||
14:32
AzureStone joined
|
|||
jnthn | sylware: I would individual languages will end up with a "how to embed this language" document with comments specific to that language, yes. | 14:33 | |
*I would imagine... | |||
moritz_ | sylware: for more parrot guys try #parrot on irc.perl.org | ||
sylware | jnthn: yes, that is the goal | 14:34 | |
jnthn: thx | |||
14:34
rjc joined
|
|||
jnthn | sylware: However it's going to essentially be built on top of the Parrot embedding API, and I'd hope embedding different languages didn't end up looking so different. | 14:34 | |
sylware | jnthn: just a matter of semantics generalization | 14:35 | |
jnthn: we may be able to factor out some semantics mapping to parrot embedded API. | 14:36 | ||
jnthn: A HLL implementation should not be allowed to be told "ready" if such a document does not exist. | |||
sylware is being too despotic... sorry | 14:37 | ||
moritz_ | we can't tell implementations what they call themselves | ||
jnthn | sylware: Heh. Rakudo is a long way from claiming readiness for embedding. :-) | ||
moritz_ | parrot is free software | ||
jnthn | Even though it's been done to some degree... | ||
PerlJam | sylware: again, *need* must come first. It's perfectly fine for implementations to omit things that aren't needed and still be ready for general use. | 14:38 | |
jnthn | Well, depending on how you define "long" anyway. | ||
PerlJam | and "embedding" :) | 14:39 | |
jnthn | Aye. | ||
sylware | PerlJam: I defined the use case above | ||
moritz_ | and "general". and "fine". | ||
jnthn | Even when we hit a point where Rakudo in terms of implementing Perl 6 is pretty decent, there's very possibly going to be a bunch of extra tasks we need to do for improving interoperability with other languages on Parrot. | 14:40 | |
PerlJam | sylware: coming up with a use case doesn't establish need. People actually trying to do it does :) | ||
sylware | PerlJam: interop in a process with "others", with probably C glue | ||
pmurias | doing interop between parrot language via C doesn't seem a sane idea | ||
moritz_ | sanity is overrated :-) | 14:42 | |
sylware | pmurias: the other only options would need a language/VM independant middleware for that | ||
Since the father of all is C. | |||
masak | I had a thought the other day. I'm not sure a 6.0.0 release would benefit the Perl 6 community. | ||
moritz_ | keep it forever alpha? | 14:43 | |
masak | something like that. | ||
PerlJam | masak: why? | ||
ruoso | sylware, Parrot will probably interoperate languages, not runtiems | ||
it seems you're trying to interoperate runtimes | 14:44 | ||
sylware | yes. | ||
moritz_ | masak: that depends on what your goals for Perl 6 are | ||
14:44
alester joined
|
|||
ruoso | that's not the regular plan in Parrot | 14:44 | |
sylware, usually you want to reimplement the language as a parrot HL | |||
HLL | |||
masak | PerlJam: for one thing, it'd keep away two kinds of people: (1) those who complain about it taking so long to be released, (2) those who had certain expectations for the release, and might see them not coming to be. | ||
moritz_ | masak: to gain many (module) contributers, it needs some publicity | ||
sylware | Because, my pythons coders will use their VM, perl5 coders the libperl, perl6... parrot, C coders, C etc etc... | ||
masak | moritz_: we can keep releasing better and better Rakudo releases. | 14:45 | |
sylware | lua squirrel etc etc... | ||
(even java) | |||
(different java VMs) | |||
moritz_ | masak: aye, but there won't be any corporate adoptions without something declared "stable", and that's where the big bugs are | ||
pmurias | sylware: interop between parrot languages and parrot and other VM is a different thing | ||
masak | moritz_: you're probably right. | 14:46 | |
ruoso | sylware, that is the SMOP vision of interoperability, not parrots | ||
sylware | pmurias: Well I was talking about the "grand" interop in a process. | ||
ruoso: what is SMOP? | |||
PerlJam | moritz_: "big bugs?" some kind of freudian slip there? :-) | ||
moritz_ | masak: but I see your point | 14:47 | |
ruoso | smop is an alternative runtime implementation for Perl 6 | ||
moritz_ | PerlJam: :-) | ||
in Franconia we pronounce ck and g very similar | |||
ruoso | sylware, www.perlfoundation.org/perl6/index.cgi?smop | ||
moritz_ | likewise d and t | ||
PerlJam | sure. sure. I believe you ;) | ||
sylware | ruoso: so how the perl6 smop code will interoperate with perl6 parrot code? | ||
pmurias | transparently :) | 14:48 | |
ruoso | sylware, Perl 6 is a spec | ||
PerlJam | ruoso: yeah! how will it work? Tell me the future! ;) | ||
ruoso | Parrot has one Perl 6 implementation, which is rakudo | ||
SMOP has another, which is mildew | |||
Perl 6 code should be able to run in both runtimes | |||
pmichaud | Good morning, #perl6 | ||
masak | pmichaud: o/ | ||
ruoso | good morning, pmichaud | 14:49 | |
jnthn | morning, pmichaud | ||
pmichaud | (backlogging) | ||
PerlJam | greets pm | ||
ruoso | the major difference in terms of major view over things between Parrot and SMOP is that Parrot is going to interoperate languages on top of the same VM | ||
and SMOP tries to interoperate runtimes | |||
sylware | ruoso: ok then, if I want perl6 coders interoperate with other things in the same process, they will have to use the SMOP implementation | 14:50 | |
? | |||
ruoso | if you mean different runtimes, SMOP targets that | 14:51 | |
pmurias | shopping& | ||
ruoso | parrot is a VM that tries to replace the native runtime of the foreign languages | ||
which is something very common this days... | |||
i.e. ironpython... jruby... etc | 14:52 | ||
sylware | ruoso: So embeded smop maps the semantics of perl6 to a C API? | ||
ruoso | sylware, yes | ||
sylware | Has SMOP other language implementation than perl6? | ||
pmurias | sylware: smop has initial perl5 interop | 14:53 | |
sylware | SMOP seems more promising than parrot for the embedded world then. | 14:54 | |
ruoso | depends what you want to do, I guess... | 14:55 | |
sylware | ruoso: see above | ||
ruoso | SMOP won't be able to implement ACL on memory access, for instance | ||
pugs_svn | r26787 | moritz++ | [u4x] small clarification in ambient-subs.pod | ||
masak | moritz_: thanks. fwiw, I think all those files will be restructured somehow. I just have to think about it a little first. | 14:56 | |
moritz_ | masak: IMHO we need 1) files that explain syntax (including declarations, control flow etc), 2) built-ins (True, False, classes, subs) 3) glossary... | 14:58 | |
masak | aye. | ||
moritz_ | and maybe separate docs that explain concepts (like Unicode level, scoping) and tutorials | ||
pugs_svn | r26788 | pmurias++ | [re-smop] moved prototypehow to s1p-oo | ||
masak | the structure should not only be logical for humans, but easily navigable for grok, as well. | 14:59 | |
moritz_: yes, TODO has a list of such separate docs. | |||
moritz_ | that's why I proposed it that way :-) | ||
talk & | |||
pmichaud | (context variables) -- not yet, will like do that shortly. Ended up spending most of the day working on house and Mother's Day tasks. | ||
15:06
fridim joined
15:18
exodist joined
15:20
donaldh joined
|
|||
masak | mberends: I'm thinking of implementing uninstall, so we can finally remove the 'not implemented below this point' message in the README. does this sound sane?: loop through all installed projects, checking whether any of them has a deps.proto file which lists the project to be uninstalled, and if so, halt. | 15:23 | |
mberends | yes, under the current design 'uninstall' becomes rmdir. no recursion, definitely. | 15:26 | |
dependency recursion, that is | |||
masak | thing is, I don't see that dependency recursion is needed in the uninstall case. | 15:27 | |
only direct dependencies matter anyway. | |||
mberends | in Debian, auto-installed dependencies are flagged as 'able to be deleted', because nothing else needs them. That's a bit tall for us, though. | 15:29 | |
masak | aye. entia etc. | ||
"it's just a model." :) | |||
15:32
eternaleye joined
|
|||
masak | mberends: oh, it's slightly more involved than I though. | 15:33 | |
mberends: let's assume project A deps on project B. then I should be able to go './proto uninstall A B' without proto objecting. | |||
i.e. it shouldn't iterate over those installed projects passed as to be uninstalled. | 15:34 | ||
problem solved. :) | |||
mberends | :) | 15:36 | |
masak | wow, this is quickly turning into Nice Method of the Day. | 15:37 | |
mberends: by the way, I can think of one WTOP that proto fails to live up to at present: it has a lib/ with .pm modules in it, but no build system. :) | 15:43 | ||
(yes, I'm using the pumpkin) | |||
15:46
Psyche^ joined
|
|||
masak | jnthn: actually, when a one-param method is called as a one-param sub, the error issued is not very clear: "too few arguments passed (1) - 2 params expected" | 15:47 | |
jnthn | masak: The other param expected is self. | 15:48 | |
masak | I know. :) | ||
jnthn | What would be a clearer message? | ||
masak | just saying that it doesn't exactly help in clarifying the sub/method thing. | ||
a clearer message would be "did you mean to call this method with an invocant?: | |||
s/:/"/ | |||
jnthn | Hmm. Probably do-able-ish. | 15:49 | |
Though the error comes from Parrot rather than Rakudo, so hmm. | |||
Maybe in some future sig-binding refactor we can improve it though. | |||
masak | on behalf of s1n, \o/ | ||
skids | "too few arguments passed(1) - invocant and 1 other parameter expected" | 15:51 | |
masak | better, if not ideal, IMO. | 15:52 | |
15:54
simcop2387-vnc joined
|
|||
skids ponders example code in S04 "lift" section | 15:55 | ||
might be crufty | 15:56 | ||
dalek | kudo: 526bf42 | pmichaud++ | docs/spectest-progress.csv: spectest-progress.csv update: 387 files, 11180 passing, 0 failing |
15:58 | |
jnthn | If I have a branch locally, say named foo, and I want to push it onto github | 15:59 | |
Is it just git push origin branchname ? | |||
er, s/branchname/foo/ :-) | |||
or s/, say named foo,// ;-) | |||
pmichaud | git push origin foo # I think. | 16:01 | |
masak | rakudo: { say @_.perl }.(1,2,3) | ||
pmichaud | that sounds familiar to me, at any rate. | ||
p6eval | rakudo 526bf4: OUTPUT«[2, 3]» | ||
masak | could someone please clarify the above output for me? :) | 16:02 | |
jnthn | Thank it's done the right thing | ||
masak | sure, but why? | ||
pmichaud | that's a bit underspecced. But the 1 is going into $_. | ||
jnthn | masak: I was talking about my git push :-) | ||
masak | aha. | 16:03 | |
pmichaud: ok. | |||
pmichaud: feels a bit... weird. | |||
pmichaud | masak: yes, but the counter-point (last it was discussed) is that there's not really a way to make a signature that dtrt | ||
jnthn | Aye, feels weird to me too...does @_ not imply a signature? | ||
pmichaud | sure, @_ implies a signature | ||
the signature of the block ends up being -> $_, *@_ { ... } | |||
because blocks that don't have a signature end up with a $_ | 16:04 | ||
masak | I see. | ||
how would I specify a block with just -> *@_ ? | |||
masak thinks he just answered his own question | |||
pmichaud | -> *@_ { ... } | ||
jnthn | pmichaud: I can't quite tie those two together? "@_ implies a signature" but since it has a signature why is it ending up with $_ ? | ||
pmichaud | jnthn: what would you expect from: { say .perl, @_.perl; } | 16:05 | |
16:05
khatar joined
|
|||
pmichaud | there's also related discussion last Friday about when @_ makes a signature | 16:05 | |
jnthn | I kinda expected $_ would be not a parameter in that case since @_ implies a signature. | 16:06 | |
pmichaud | we've recently decided to change the spec so that @_ generates a signature only when placeholders are present (or something like that) | ||
otherwise it's basically impossible for an inner block to ever access an outer @_ | |||
jnthn | Oh, hmm. That is a problem. | ||
Yeah, I hadn't thought of that one. | |||
pmichaud | (looking up #perl6 reference) | ||
jnthn | That's very ouch. | ||
pmichaud | irclog.perlgeek.de/perl6/2009-05-06#i_1124322 | 16:08 | |
right. @_ should only generate a slurpy when placeholders are present. | 16:09 | ||
(Currently we always do it.) | |||
jnthn | OK. | ||
pmichaud | I was going to fix that on Wednesday but had to do $otherjob stuff instead. | ||
skids | Weird that's almost the same issue I was looking at in S04 lift. (cue Twilight Zone music) | ||
jnthn has first cut of callwith() working that calls up the class hierarchy. | 16:10 | ||
skids | In the S04 there are named subs expecting to put a raw type in the Sig and get the value from it in $_ | 16:11 | |
jnthn | Well, calls over a candidate list in fact. :-) | 16:12 | |
jnthn takes a break for a little bit | 16:13 | ||
16:17
iblechbot joined
16:19
VX joined
|
|||
pmichaud | also icky: { if 1 { say @_ }; say $^a; } # which block gets the @_ ? | 16:19 | |
I'm going to vote "neither" for now. | 16:20 | ||
masak | going swimming & | 16:21 | |
ruoso | pmichaud, if is not a topicalizer, is it?\ | 16:25 | |
I'd guess @_ is valid for the whole outer block | |||
pmichaud | sure, but detecting that situation is a pain. | 16:26 | |
at the time that we process { say @_ }, we don't know if any of its outer blocks have placholders yet. | |||
ruoso considers this implicit @_ to be weird anyway | 16:27 | ||
skids | S04 has "multi infix:<eq> (Whatever, Any $b) { -> $a { lift $a eq $b } }" | ||
pmichaud | that looks like a typo to me. | 16:28 | |
oh wait, it's not. | |||
But I don't see that the value is in $_ | 16:29 | ||
the Whatever argument doesn't get bound to anything. | |||
16:29
justatheory joined
|
|||
skids | That's what I thought, it looked wrong, and didn't work in rakudo either (with a normal sub name) | 16:29 | |
pmichaud | 'lift' is unimplemented in rakudo right now. | 16:30 | |
skids | Right but getting the Whatever value didn't work. | ||
pmichaud | how do you mean "getting the Whatever value didn't work"? | ||
skids | Wasn't anywhere | ||
pmichaud | It's not supposed to be. As I said, it's unbound. | ||
16:31
eternaleye joined
|
|||
skids | sub foo (Whatever, Str $a) { $_.say; @_.perl.say;} | 16:31 | |
pmichaud | in that case, $_ is uninitialized. | ||
skids | Right, why I pointed that S04 section out. | ||
ruoso | pmichaud, one other issue I'd like to do for Faz would be to have custom package_declarators and routine_declarators | ||
pmichaud | I don't understand. | ||
ruoso | is that at all possible in rakudo today? | ||
pmichaud | ruoso: not yet, alas. | ||
skids | The examples in S04 would be wrong, then, correct? | 16:32 | |
pmichaud | when we do more STD-like parsing, probably. | ||
skids: the examples in S04 are correct. What you think they do isn't. | |||
ruoso | pmichaud, and the easiest way to work around would be... to write a translator from this DSL to Perl 6? | ||
pmichaud | (unless the example you just gave is from S04) | ||
ruoso: that'd be my guess at the moment. | |||
skids | The infix:<eq> example is | ||
ruoso | pmichaud, sorrry for being such a boring guy... but do you have any idea on how far we are from having the context variables working? | 16:33 | |
pmichaud | ruoso: it's not too far, I just have to find ~2 uninterrupted hours. | 16:34 | |
ruoso | cool | ||
pmichaud | (maybe less, ~2 is a conservative estimate) | ||
ruoso waiting for that to rewrite masak's Yarn using Faz | |||
pmichaud | skids: the infix:<eq> example doesn't use $_ | 16:35 | |
skids | So it's returning a closure then? | ||
pmichaud | yes. | ||
skids | Ah, OK. I thought it was evaluating in place. | ||
pmichaud | * eq 'foo' would result in a closure. | ||
skids | BTW, other than parsing is anything blocking implementing ops in perl6? | 16:36 | |
pmichaud | parsing is the big issue. | 16:37 | |
other than that... I can't really think of anything. | |||
If we have | |||
my $x = -> { }; $x(); # what is the return value? Nil? | 16:38 | ||
[particle]1 suspects Nil | 16:41 | ||
TimToady | @tell masak no, 'augment' only requires MONKEY_PATCHING when you're modifying something global, and a sublanguage is by definition lexically scoped | 16:43 | |
lambdabot | Consider it noted. | ||
16:44
kidd joined
16:45
payload joined
16:55
abra joined
16:59
jhorwitz joined
17:04
ilogger2 joined
17:11
payload1 joined
17:13
cdarroch joined
17:18
lichtkind joined
17:20
VX joined
|
|||
justatheory | Somebody check TimToady's forhead for imprints! james-iry.blogspot.com/2009/05/brie...wrong.html | 17:23 | |
lichtkind | is there anybody who likes to be interviewed? | 17:24 | |
justatheory | lichtkind: Don't ask questions. | ||
Patterner | Can I lie? | 17:25 | |
lichtkind | justatheory: .... just do it? | ||
justatheory | /kick lichtkind | 17:26 | |
lichtkind | i dont understand | ||
justatheory | That's the spirit! | ||
justatheory is feeling punky today | |||
lichtkind | justatheory: thats fine as long you can handle the feedback | 17:27 | |
jnthn | hi lichtkind :-) | 17:33 | |
lichtkind | jnthn: hello my victim :) | ||
jnthn | oh noes...what?! | ||
lichtkind | jnthn: just some question, if you bahve i release you soon :) | 17:34 | |
jnthn: how is rakudo? | |||
Eevee | justatheory: ha, love the description of C# | ||
[particle]- | rakudo is dead. long live pugs! | ||
jnthn | OK but no questions about the incident involving the bacon and the plastic explosive... | 17:35 | |
Eevee | or C♯ | ||
justatheory | Eevee: yah | ||
lichtkind | jnthn: i don't get this joke but it makes me curious | ||
jnthn | lichtkind: Rakudo is coming along nicely. | ||
lichtkind: Don't think the next release will gain as many passing tests as the last one, but that was kinda hard to beat. :-) | 17:36 | ||
17:36
rjc joined
|
|||
lichtkind | jnthn: im finishing my tutorial now and moritz_++ had a tutorial on german leading CS magazine, there was perl 6 on the front page :) | 17:36 | |
jnthn | Yes, I saw this magazine - somebody at Vienna.pm showed me. | 17:37 | |
Exciting! | |||
lichtkind | yes | ||
17:38
mizioumt1 joined
17:43
mizioumt2 joined
|
|||
lichtkind | jnthn: do we see each other in lissabon? | 17:44 | |
jnthn | lichtkind: I'll be there. Will you? | ||
lichtkind | jnthn: i confirmed my accepted talk so i better will be there | 17:45 | |
jnthn | nice :-) | 17:46 | |
lichtkind | jnthn: its completely not about perl :) | 17:49 | |
ruoso | @tell pmurias I solved the infinite loops in the tests... I guess we are really close to have everything working... | 17:52 | |
lambdabot | Consider it noted. | ||
pugs_svn | r26789 | ruoso++ | [mildew] t/recursion.t passes... the test was wrong, actually.. | 17:54 | |
17:55
payload joined
17:56
payload1 left,
Fuad joined,
frodwith left
|
|||
pugs_svn | r26790 | wollmers++ | [t/spec] added tests | 17:57 | |
lichtkind | ruoso: ping? | ||
ruoso | lichtkind, pong! | ||
17:57
frodwith joined
17:58
mikehh joined
18:00
mizioumt1 left
18:09
LadyLuna1y joined
18:10
Fuad left
18:22
ejs joined
18:24
pyrimidine joined
18:29
japhb joined
18:35
payload1 joined,
payload left,
M_o_C joined
18:38
d joined,
d is now known as Guest8555
|
|||
skids | rakudo: my $a; my sub f () { return { $^a; "OH NOES".say } }; $a = f(); $a.perl.say; $a(1).say | 18:42 | |
p6eval | rakudo 526bf4: OUTPUT«{ ... }OH NOES1» | ||
skids | rakudo: my $a; my sub f () { { $^a; "OH NOES".say } }; $a = f(); $a.perl.say; $a(1).say | 18:43 | |
p6eval | rakudo 526bf4: OUTPUT«too few arguments passed (0) - 1 params expectedcurrent instr.: '_block27' pc 310 (EVAL_21:125)» | ||
18:45
Guest8555 is now known as H1N1[A],
H1N1[A] left
18:46
H1N1[S] joined
18:58
stepnem joined,
aindilis joined
|
|||
jnthn back from nom | 19:00 | ||
19:04
M_o_C left
|
|||
pugs_svn | r26791 | ruoso++ | [mildew] one more sanity test pass... | 19:19 | |
19:21
donaldh joined
19:23
bbkr joined
19:24
simcop2387 joined
|
|||
bbkr | hi. does rakudo has something like Test::Simple already available or do i have to write my own? | 19:24 | |
19:26
ejs left
|
|||
mberends | bbkr: the Test.pm in the Rakudo root directory is fine for most testing. | 19:26 | |
it's more than just Simple :) | 19:27 | ||
TimToady | hmm, thinking about testing syntax, without going the whole :ok<message> route, we could, with currently defined syntax, say: | ||
lambdabot | TimToady: You have 1 new message. '/msg lambdabot @messages' to read it. | ||
TimToady | OK $foo, &[==], $bar, "message"; | ||
bbkr | mberends: indeed, thanks | 19:28 | |
TimToady | @messages | ||
lambdabot | literal said 1d 8h 2m 48s ago: STD.pm line 2234 doesn't make much sense. $> == $() ? | ||
TimToady | @clear | ||
lambdabot | Messages cleared. | ||
TimToady | literal: yes, that was a copy/paste error | ||
[particle]- | TimToady: last friday, you added "+ token backslash:std<\Y> { YY };" to S02 | 19:32 | |
i expected to see backslash:sym<Y> | 19:33 | ||
am i missing something? | |||
TimToady | no | 19:37 | |
feel free to fix | |||
jnthn | Appears t\spec\S02-magicals\env.t is epic fail on Win32. :-( | 19:40 | |
19:40
mizioumt2 left
|
|||
jnthn | '.' is not recognized as an internal or external command, | 19:40 | |
bbkr | I just started to play with grammars. the following example is not working, what am i doing wrong here? ./perl6 -e 'grammar X { token TOP { .* } }; print "abc" ~~ X;' | 19:44 | |
jnthn | bbkr: That does a type check. | ||
bbkr: You probably want .parse | |||
rakudo: grammar X { token TOP { .* } }; print X.parse("abc") | 19:45 | ||
p6eval | rakudo 526bf4: OUTPUT«abc» | ||
bbkr | i'm using perlgeek.de/blog-en/perl-5-to-6/20-...r-xml.html as a tutorial. | ||
jnthn | Ah, OK. The ~~ X syntax is out of date by some months, I'm afraid. | ||
bbkr | .parse works, thanks | ||
[particle]- | .* isn't going to work well on a token, no backtracking | ||
s/on/in/ | 19:46 | ||
jnthn | moritz_: See above, maybe you'd be able to update. :-) | ||
pugs_svn | r26792 | wollmers++ | [t/spec] added tests | 19:55 | |
19:57
minazo joined
20:00
simcop2387-vnc joined
|
|||
bbkr | ok, I have my simple grammar ready. but i noticed something like that: token x { aaa { say "I captured aaa" } } is not parsing. is this correct way to execute some code on token match? | 20:02 | |
jnthn | bbkr: It's correct Perl 6, but not yet supported in Rakudo. | ||
bbkr | S05 says {} is used to execute code inside regexps | ||
ah, ok. thanks | |||
jnthn | bbkr: One possible option is to associate an actions class with the grammar. | 20:03 | |
bbkr | any example how to do that? | ||
jnthn | That is, a class whose method names match your token/rule/regex names. And then just put {*} in the regex where you want to call said method. | ||
Surely somewhere though I can't think off one off the top of my head... | |||
bbkr: ah, found one | 20:04 | ||
alledora.co.uk/wordpress/archives/2009/03/23/377 | |||
Looks like a good write-up | |||
bbkr | BTW: P6 grammar is lovely :) i wrote huge project in EYapp and it was messy when project grew up. grammars in P6 are just the solution :) | ||
jnthn | Note that it uses parsefile instead of parse, but you should be able to use .parse just fine. | 20:05 | |
bbkr | just what i needed. thanks. | ||
jnthn settles down to re-write .wrap and .unwrap | 20:09 | ||
pugs_svn | r26793 | wollmers++ | [t/spec] added grapheme tests | ||
pmichaud | jnthn: ping | 20:12 | |
20:12
bbkr left
|
|||
jnthn | pmichaud: pong | 20:13 | |
pmichaud: if it's not about wrap/unwrap, can you ask me in 10 mins? I'd really like to get this code down while it's in my head... | |||
pmichaud | it can wait | ||
jnthn | thanks | ||
pmichaud | I think I know the answer anyway. | 20:14 | |
20:16
simcop2387 left
20:19
VX left
|
|||
jnthn | pmichaud: OK, now is fine. Just wanted to write the implementation while it made sense to me. :-) | 20:20 | |
pmichaud | in actions.pm, type_declarator makes a call to '.ACCEPTS' while make_anon_subtype calls 'infix:~~'. Is there a reason for them being different? | 20:21 | |
(I think the answer is 'no') | |||
jnthn | No. | 20:22 | |
pmichaud | okay. | ||
jnthn | Probably do ACCEPTS for both. | ||
pmichaud | I've refactored them into one. | ||
jnthn | It saves a dispatch. | ||
pmichaud | Because otherwise the two are largely identical. | ||
jnthn | That's fine. :-) | ||
pmichaud | I'm doing a couple of other refactors so that I can get @_ and %_ working properly. | ||
jnthn | OK. So long as nothing breaks, it's all good. :-) | ||
pmichaud | also eliminating about 50-60 lines of code in the process. :-) | ||
jnthn | pmichaud++ | 20:24 | |
No doubt improving mantainability too. | |||
I've got some diffs in a branch but I don't think they'll conflict with anything you're touching. | 20:25 | ||
20:27
pyrimidine left
|
|||
moritz_ updates the blog | 20:27 | ||
jnthn | moritz++ | ||
20:37
lichtkind left
20:38
lichtkind joined
20:44
pyrimidine joined
20:48
jferrero joined
21:09
jaye joined
21:13
pyrimidine left
21:18
nbrown joined
21:20
fridim joined
|
|||
jnthn | Gah! 15 minutes of debugging all because I can't spell the word candidate... | 21:25 | |
pugs_svn | r26794 | moritz++ | [t/spec] unfudge a test for Rakudo | 21:26 | |
moritz_ | jnthn: that happens to me every now and then... I usually start the search function in my editor to hilight all occurences of the word, and see if it's missing one | ||
that's pretty handy in vim; just place the curser over it, and type * or # | 21:27 | ||
jnthn | moritz_: Turns out I'd copy-pasted the mis-spelling over a few files, so it was consistently mis-spelt, then when I re-wrote .wrap I managed to spell it right... | ||
moritz_ | ;-) | ||
pmichaud | in t/spec/S12-subset/subtypes.t, there's a test to verify that $_ in a block is readonly. Why is it readonly? | 21:29 | |
i.e., is it specced somewhere that it's to be readonly ? | |||
jnthn | Certainly if it was a place-holder parameter it should be. I'm not so sure that holds for $_ though. | 21:30 | |
pmichaud | normally $_ in a block is rw | ||
jnthn | Yeah. | ||
I'm leaning against the test on this one. | |||
moritz_ | unless it's bound to something non-modifiable, no? | ||
jnthn | Unless there's something more to it... | ||
moritz_ | my $x := 3; $x++ # should that die? | 21:31 | |
pmichaud | sure, but in the test case it's not listed as non-modifiable | ||
subset SoWrong of Str where { $_ = "fail" } | |||
my SoWrong $x; | |||
jnthn | Ah | ||
I'd change the test to $^epic = "fail" | |||
pmichaud | I'm happy with that. | 21:32 | |
moritz_ | +1 | ||
jnthn | oh, damm, I forgot that you can un-wrap out of order... | ||
Or at least, the test seems to think you should be able to... | |||
jnthn checks the spec | 21:33 | ||
21:35
simcop2387-vnc is now known as simcop2387
|
|||
jnthn | hmm. spec seems to suggest out-of-order unwrapping is OK. :-| | 21:37 | |
pugs_svn | r26795 | moritz++ | [docs] clean up Perl6::Perl5::Differences a bit | ||
21:39
Whiteknight joined
|
|||
pugs_svn | r26796 | pmichaud++ | [t/spec]: Change readonly test to use placeholder parameter. | 21:39 | |
meppl | good night | 21:42 | |
21:56
dduncan joined
21:58
jaye is now known as jess
22:00
dduncan left
22:07
VX joined
22:12
lichtkind_ joined
22:18
LadyLunacy joined
22:21
jferrero left
22:24
LadyLuna1y left
22:27
VX left
22:29
nsh joined
22:30
lichtkind left
22:42
nsh left
|
|||
dalek | kudo: 2b685ac | pmichaud++ | src/parser/actions.pm: Refactor subtype handling to eliminate redundant code. |
22:42 | |
kudo: 6fc9344 | pmichaud++ | src/parser/actions.pm: Refactor implicit $_ as parameter on blocks. As a bonus, such |
|||
kudo: 4e9e1e3 | pmichaud++ | src/parser/actions.pm: Refactor make_anon_subtype to re-use standard closure functions. |
|||
pmichaud | I like deleting code. :-) | ||
jnthn | How much you managed to eliminate? | 22:43 | |
pmichaud | 98 lines. | 22:44 | |
jnthn | Nice. | ||
pmichaud | and my $x = { .say }; $x.signature # now works | ||
jnthn | :-) | ||
I think I'm about there wiht my branch now. | 22:46 | ||
Running make spectest now and then provided all is passing I can merge back in. | 22:48 | ||
Basically the branch ripped out callwith and callsame, re-wrote them in terms of candidate lists, added nextwith and nextsame, then re-did .wrap and .unwrap so that they basically boil down to unshifting stuff onto and deleting stuff from a candidate list. | 22:50 | ||
However, there's plenty of magical fluff around that. | 22:51 | ||
This also means that $x.@candidates() not only works, but allows you to do callsame, callwith, nextsame and nextwith too. :-) | |||
pmichaud | \o/ | 22:54 | |
jnthn | The next refactor will hurt a little more. | 22:55 | |
In theory I need the refactors to get p6opaque in place; in reality I can cheat a bit if needed. | 22:56 | ||
pmichaud: I've been pondering the "type object methods just do an extra check on the invocant" thing. | 22:57 | ||
pmichaud: It's a neat idea in many ways, apart from... | |||
pmichaud | yes... | ||
jnthn | a) It would seem to imply ACCEPTS becomes a multi...and that everyone has to declare it multi. | ||
22:57
skids joined
|
|||
jnthn | When they override it. | 22:57 | |
pmichaud | Hmmm. I'm not so sure that's a showstopper. | 22:58 | |
jnthn | b) While it may fit into Rakudo OK, where we do have type-check-y stuff, not quite so sure how it's going to fit into P6object. | ||
pmichaud | In P6object, I don't expect anyone to be overloading ACCEPTS. | 22:59 | |
I.e., it should really act like a type-object-only method. | 23:00 | ||
jnthn | OK. | 23:01 | |
I'll have to dig back in to the p6object refactors I started and see how far I can get. | 23:02 | ||
pmichaud | Indeed, in P6object now, .ACCEPTS is only available for protoobjects (I think). | ||
jnthn | *nod* | 23:04 | |
pmichaud | From a P6object perspective, the way to test .does or .isa is by doing the equivalent of $obj.^does or $obj.^isa | 23:06 | |
23:06
jess left
|
|||
pmichaud | so I'm not sure that P6object itself needs to provide an .ACCEPTS | 23:06 | |
jnthn | Aye, we can shuffle that into Rakudo I'd guess. | ||
Unless anything else relies on it but I think not. | 23:07 | ||
pmichaud | I don't remember exactly why we stuck .ACCEPTS into P6object in the first place (but I do remember I went to move it and decided it was best not moved) | 23:08 | |
jnthn | Heh, I don't remember either. | 23:09 | |
23:10
minazo left
23:11
aindilis left
23:14
Eevee joined
23:15
aindilis joined
|
|||
jnthn | OK, so...how to merge my branch back into master... :-) | 23:16 | |
23:20
donaldh left
23:21
donaldh joined
|
|||
pmichaud | I'm guessing "git rebase origin master" and then if everything goes well "git push origin master | 23:24 | |
but that is a guess. I've only done one or two branch merges. | 23:25 | ||
time for dinner here | 23:26 | ||
bbl | |||
23:30
payload1 left
|
|||
jnthn | Figured it all out and pushed. :-) | 23:35 | |
23:39
frew|wor1 joined,
frew|wor1 is now known as frew,
dalek joined
23:48
hercynium joined
23:59
bacek__ joined
|