6.2.3 is airborne! | pugscode.org <Overview Journal Logs> | pugs.kwiki.org Set by autrijus on 12 May 2005. |
|||
svnbot6 | r3422, putter++ | Tweaked and unDisabled two t/rules/from_perl6_rules/ files. | 00:00 | |
r3423, mugwump++ | It's the Unicode ââ£â®âââªâ«â®â¼ | 00:06 | ||
putter | mugwump: dont forget generalized union/intersection! :) | 00:15 | |
mugwump: ping? | 00:20 | ||
has anyone seen anything on, i'm not sure what to call it, "anti duck typing"? "aggressive multimethods"? eg, "I, a user, don't care if class C has method m. I "use Picky;", and if the picky folks havent approved C's m, I don't even want to be able to see it.". ? | 00:47 | ||
sproingie | eh? | ||
generic functions? | |||
got a usage example? could probably tell you the jargon. | 00:48 | ||
putter | the idea is to completely control what a method name means in a lexical context. which means hiding any external multimethods, "unapproved" object methods, etc. | 00:57 | |
sproingie | so it would actually dynamically hide methods from another class. well that certainly has little precedent, so it doesnt have a name, i'd imagine | 00:58 | |
but any reasonably reflective metamodel or generics system could do it | |||
with perl5 you could use Hook::LexWrap to override C's methods | 00:59 | ||
meppl | gute nacht | 01:01 | |
good night | |||
putter | the motivation is that as folks move to p6 and do a _lot_ more "domain specific language"-style programming, CPAN'ish classes crashing the party with their own little method-api-languages are going to stick out like a sore thumb. | 01:02 | |
meppl: 'night | 01:03 | ||
meppl | ;) | 01:04 | |
putter | controling ones own naming means being able to frob everyone elses, even objects which are just wandering through. | ||
use RubyMethodApisForAllCoreObjects; ;) | 01:07 | ||
sproingie | there's always going to be a clash of cultures insofar as modules go | 01:08 | |
this is the story with CPAN now | |||
i think you'd probably want a module that adapted another, not mutated it | 01:10 | ||
modules that pollute global namespace will be unpopular just as they always are | |||
mugwump | use Set-(Any)-cpan:FOO; | 01:13 | |
putter | mugwump: huh? | 01:14 | |
mugwump | don't like namespace pollution? set your perl to use a different default module namespace (the cpan:FOO bit) | 01:15 | |
putter: what did you mean by "generalised union/intersection", putter ? | 01:16 | ||
s/,.* // | |||
putter | eg, 22C2 | 01:18 | |
mugwump | n-ary intersection? | ||
putter | intersection over a set of sets | 01:19 | |
mugwump | well, for a start, because I don't have a non-unicode-operator implementation :) | ||
putter | (it was mainly just an excuse to throw in more unicode...;) | ||
mugwump | true | ||
I mean, ⊨ | 01:20 | ||
sproingie | intersection over a set of sets would be a reduction | ||
dont know what the math notation for reduce is, if there is one | |||
mugwump | would it? sounds sufficiently vague to mean just about anything to me ;) | ||
sproingie eyes his irc program. no unicode support, and it's a windows app? bah | |||
putter | re, namespace, say I want to do some set algebra, but I want all my ops to be lazy. you provide a lazy union, but your "union" method isnt. I would like to "use Notation::Set::AllLazy;" and be able to use your implementation, without directly using your names. | 01:22 | |
Someone other than me can keep track of all the implementations and the characteristics of their assorted methods. | 01:23 | ||
sproingie | sounds like a classic problem of writing an adaptor | 01:24 | |
putter | I can simply say "In this block of code, I want to use this method language/vocabulary, with these implied semantics, so "use" it." | 01:25 | |
sproingie | that'd be a pragmatic module, most of those have lexical effect | 01:26 | |
s/effect/extent/ | |||
putter | re adaptor, but the combinatorics are all wrong. the space is too highly dimensional. so you would have to use adaptor generators, which can be handed around indistinguishably from their wrappees... not going to happen. | 01:27 | |
{ use Way1; ... { use Way2; ... } ...} adaptor classes arent going to do it. | 01:28 | ||
pragmatics are closer... | |||
mugwump | How is that different from a Role? | 01:30 | |
putter | sproingie: sorry, but yes. adapters _do_ address the same problem. their just so... not good enough. ;) (see previous assorted exclamations of "software sucks";) | ||
roles are still under the control of the class creator. the idea is the class user should be able to muck with how the class appears to her. | 01:31 | ||
loosens the tie between "they created an implementation" and "they created an api". | 01:32 | ||
mugwump | ok, I understand, I think | 01:33 | |
What you want to be able to do, is compare Roles based on their definitions and not on their 'is-ness' | |||
so, you could define a role, and so long as the thing that implements it is a superset of the role in all regards, then it can be used | 01:34 | ||
but if they break the interface it won't work | |||
putter reads the paragraph again... | 01:35 | ||
mugwump | like, a version of .does() that performs a deep method signature check, not just checking that the role is linked | ||
putter | signature checks cant do semantics. as a silly example, one might "use OnlySeeO(n^2)AndBetterMethods;"... | 01:38 | |
In an extreme case, some object's class has methods m and n, but in some section of code, I want m to mean n and visa versa. | 01:39 | ||
what triggered all this musing was looking at Set.pm, and thinking, here we go again, short human-friendly method names, hello years of pain. | 01:43 | ||
;) | |||
sproingie | different people will write different interfaces. and since most perl6 modules won't use generics, you won't get much chance to override them seamlessly | 01:44 | |
best you can do is rewrite or adapt, for the most part. i think a general case solution would be something of a software engineering silver bullet | 01:45 | ||
putter | mugwump: no criticism of Set.pm intended. its nifty. my reaction was just "here is something nifty and... pure/non-hairy/simple, and even here we are still going to get burned". | 01:49 | |
sproingie: might be sufficent to have "undef &foo;" and a multi sub foo() is run_in_preference_to_object_methods. | 01:51 | ||
anyway, back to work. | 01:53 | ||
mugwump: thanks for the module namespace pointer... | 01:54 | ||
to rephrase an old objection to smalltalk, "+ is not a method, and if some object thinks it is, I wish to be able to successfully disagree in my own code" ;) | 01:56 | ||
'night folks | 01:57 | ||
taki | hi all | ||
what mean /i in this syntax ([0-9a-f:]+)/i) | |||
02:00
sbkhh is now known as Odin-
|
|||
robkinyon | hello? | 02:45 | |
robkinyon has a new chat client ... | |||
svnbot6 | r3424, mugwump++ | Add shiny junction-based Set implementation | 02:50 | |
putter | just for closure, I mention that having groveled over S12, it looks like the games described are already possible. ;) | 02:51 | |
mmm, new Set... | |||
stevan | mugwump++ # Junction based Set is verrrrry cool | 03:08 | |
mugwump | glad you like it. all that hash key nonsense goes away too | 03:10 | |
stevan | very nice | 03:23 | |
svnbot6 | r3425, putter++ | Fixed typo in trig.t. | ||
mugwump | It's a shame that you can't remove items from a junction easily | 03:24 | |
eg, that remove could be something like; | |||
$:members = $:members & none($to_remove); | 03:25 | ||
but it doesn't work like that :) | |||
stevan | that would be nice | ||
svnbot6 | r3426, mugwump++ | !($x =:= any(@x)) â ($x =:= none(@x)) | 03:33 | |
stevan | mugwump: I followed your advice on the eval-into-pugs-object-space | 04:02 | |
svnbot6 | r3427, Stevan++ | Perl::MetaModel - experimental version of compile() to complile classes to the Pugs object space; compiled classes support meta() and (my version of) isa(); more to come tomorrow,... must,.. get... sleep :) | ||
mugwump | choice | ||
stevan | I am too sleepy to do it right, but that is a proof of concept for now :) | ||
I think I will create a Perl::Meta::Complier tomorrow which does it better | 04:03 | ||
(and I think the meta() and isa() functions are not correct per-S12 either) | 04:04 | ||
but I need sleep, so it will have to wait another ~8 hours | |||
mugwump | My gut feeling is that the introspection stuff in S12 is only very lightly considered | 04:05 | |
stevan | Smalltalk Metaclass model ++ | ||
mugwump: yes, I reviewed it earlier and felt the same way | |||
autrijus thinks our docs/ should eventually be added onto the end of S12 | |||
not yet of course | 04:06 | ||
anyway must sleep | |||
mugwump | 'night! | ||
stevan | adios & | ||
svnbot6 | r3428, putter++ | Added atan(_) and fixed broken atan(_,_) tests. | 04:30 | |
eric256 | did the journal just die? | 04:31 | |
svnbot6 | r3429, putter++ | Fixed typo in Perl-MetaModel/README. | 04:38 | |
eric256 is in love with making his own operators... ;) | 04:42 | ||
anyone know of a precompiled parrot for windows? or where i should look? | 05:10 | ||
google to the rescue | 05:13 | ||
hmm or not. only one i found is too old.../me continues the search.....seems kinda sleepy around here | 05:15 | ||
f0rth | I've searched but found nothing | 05:16 | |
svnbot6 | r3430, eric256++ | Added examples of overloading. Should be fleshed out a bit but it's a start. | ||
eric256 | www.jwcs.net/~jonathan/perl6/ <-- apears to work. but i'm still downloading | ||
ack.. somewhere i stopped reading and downloaded pugs. lol. | 05:17 | ||
f0rth | :p | 05:18 | |
mugwump | what does the .perl method do? | 05:21 | |
eric256 | looks like i'm out of luck for now. and i was just hoping to be able to split a string. ;) | 05:22 | |
officialy? i dunno. but it returns a fairly intuitive representation of the data. it is entirely possible that i shouldn't be using it though | |||
mugwump | oh, right. probably a pugs-specific hack | 05:24 | |
castaway_ | .perl does a data-dumper like dump.. I think its p6 | 05:25 | |
05:25
castaway_ is now known as castaway
|
|||
eric256 | dev.perl.org/perl6/doc/design/syn/S02.html | 05:26 | |
mugwump | I stand corrected. | ||
cool | |||
eric256 | i'm learning to use google to search the online documents | 05:27 | |
isn't % mod? | 05:45 | ||
mugwump | sure | 05:46 | |
or symmetric difference on Sets :) | |||
( $s1 \ $s2 ) U ( $s2 \ $s1 ) | |||
eric256 | any ideas why my $t = $M % $N; causes a sub to fail to compile | 05:47 | |
lol nevermind. i overroad % in postfix...i think that messed up the infix version. going to test | |||
hmm. i would have thought you could have an operator mean one thing in infix and another in postfix... | 05:50 | ||
svnbot6 | r3431, eric256++ | Some minor additions | 06:16 | |
obra | hm. That commit message could be better :/ | 06:19 | |
svnbot6 | r3432, mugwump++ | Express some core Perl entities as Perl code; this should be instructive/educational in developing the MetaModel. Rough, rough sketches.. | 06:22 | |
brentdax | And *that* is why you don't put "disconnect" right under "part", and why you put an "are you sure?" prompt on said "disconnect" command. | 06:26 | |
svnbot6 | r3433, scook0++ | Really flaky hack for munge_haddock.pl that lets Haddock | 07:00 | |
r3433, scook0++ | document all the private functions. | |||
autrijus | rehi! | 07:02 | |
<- reading Ecma-335 spec about CIL | |||
theorbtwo | Morning, autrijus. | ||
autrijus ponders Pugs.Compile.CIL just for fun. | |||
theorbtwo | You have a very strange definition of fun, autrijus. | 07:05 | |
CIL is the .NET VM, right? | 07:06 | ||
castaway | Do .JVM while you're at it? ;) | ||
autrijus | well, seeing how the codegen is already there in Modrian and Haskell for .NET | ||
nothingmuch | morning | 07:09 | |
scook0 | theorbtwo: you wrote munge_haddock.pl, right? | ||
theorbtwo | Yeah. | 07:10 | |
scook0 | I changed it so that it also nukes long-style module declarations | ||
theorbtwo | I took a quick look at that. | 07:11 | |
Looks sane. | |||
scook0 | It /barely/ works, but I think it's good enough for now | ||
(my 2nd ever Perl5 program :-) | 07:12 | ||
theorbtwo | I'm not 100% with it at present. | ||
scook0 | Are you aware of the problem that explicit module export declarations cause? | ||
Normally, if you just write "module Foo where", all functions in the module are considered public | 07:13 | ||
theorbtwo | The haddocks only show the exported stuff, since that's what the haddock author thinks they're for. | ||
scook0 | which is not what we want, right? | ||
Because we're using it for internal documentation, not library documentation | 07:14 | ||
nothingmuch | autrijus: batch pingback | ||
theorbtwo | Exactly. | ||
scook0 | so what my code does is: | ||
first, it scans through until it finds the module declaration | |||
it extracts the actual module name | 07:15 | ||
autrijus | nothingmuch: yes? | ||
bah. Mondrian doesn't seem to run on Mono | |||
scook0 | and prints out "module Foo.Bar where" | ||
nothingmuch | tell me when you feel like continuing the internals chat | ||
autrijus | and the rotor license is not acceptable | ||
autrijus suspends thinking about Pugs.Compile.CIL | |||
scook0 | then it chucks away lines until it hits /where$/, which marks the end of the old declaration | 07:16 | |
theorbtwo | Works for me. | ||
scook0 | I just thought somebody other than myself should know about it, in case it breaks | ||
theorbtwo nods. | |||
I only see what looks like odd corner-cases where it'll break badly, though. | 07:17 | ||
(Modules trying to export functions named where, or people using really strange formatting.) | |||
scook0 | I had to keep tweaking it until it worked with all our existing source | ||
Yeah, that's why it's so flaky | 07:18 | ||
But hopefully nobody will be silly enough to trigger them... | |||
autrijus | nothingmuch: I need to run for $work. will ping you when I get next round of tuir | 07:25 | |
tuit, even | |||
& | |||
svnbot6 | r3434, autrijus++ | * Upgrade to Syck 0.55 from «why the lucky stiff». | ||
nothingmuch | ciao | ||
autrijus | btw, I like how www.mono-project.com/Main_Page is organised. | 07:27 | |
brentdax | MediaWiki...heh, funny ow the same things pop up everywhere. | ||
autrijus | it looks professional without much customisation | ||
well, you can't do much customisation with it anyway. | 07:28 | ||
;) | |||
brentdax | Munging MediaWiki has convinced me that PHP is evil, incidentally. And that I'd like to write something nice in Perl 6 so I don't have to use it anymore. | 07:29 | |
autrijus | port Kwiki to Perl6? :) | 07:30 | |
Perl6: Spiffier than Spiffy! | |||
probably just need to port Spoon to Perl6 | |||
brentdax | The problem with Kwiki is that it suffers from Ugly Wiki Syndrome. | ||
autrijus | everything else would follow | ||
svk.elixus.org is ugly? :) | |||
brentdax | Symptom: it doesn't pretend to not be a wiki. | ||
autrijus | it's not exactly beautiful, but seems workable | 07:31 | |
a Mediawiki skin would be useful as well. | |||
brentdax | Oh, yes, it's workable. You just wouldn't want to make Wikipedia in it. | ||
autrijus | sure. | ||
brentdax | I found out that Mom has used Wikipedia to research her books. She didn't even realize it was maintained by the general public. | ||
(She writes historical novels set in England.) | 07:32 | ||
autrijus | nice! | ||
castaway | then write a Kwiki::Theme module or something (assuming there arent any already. ,) | 07:33 | |
brentdax | But when you look at even the SVK site, there are a lot of awkward things about it. Like camel-case links, for example, although that's not the only one. | ||
autrijus | verily, verily. | ||
really & | 07:34 | ||
brentdax | Heh, kay. | ||
theorbtwo | G'work. | ||
b6s | 15:41 <@mjhsieh> b6s: /join #pugs /me crys WE NEED Net::Socket, PLEASE!! | ||
b6s flee | |||
brentdax | Is there any sort of file I/O in Pugs, or have you guys been waiting till you have some idea what it'll look like? | 07:35 | |
castaway | right, but Kwiki doesnt insist on CamelCase links at all.. (tho it would be nice to be able to turn them off completely) | ||
castaway runs off to $work | 07:40 | ||
Aankhen`` | PHP is a language with a serious identity crisis. | 07:41 | |
brentdax | How so? | ||
Aankhen`` | It desperately tries to be Perl and not be Perl at the same time. | ||
brentdax | lol | ||
Aankhen`` | I really dislike it. :-) | 07:42 | |
brentdax | I don't blame you. | ||
When I start working in it, I start thinking like it's Perl, but it's not, so I make lots of little mistakes and write myself into algorithmic corners. | 07:43 | ||
Aankhen`` | Heh. | ||
The PHP community is bloody great. | |||
brentdax | Like...the only way to make an anonymous function is by passing a string with your code to create_function. But that's really equivalent to an eval(), and has a runtime penalty. | ||
Aankhen`` | If you ask someone for help with Perl, they'll help you find a place to learn to do it. | ||
If you ask someone for help with PHP, they'll give code to copy and paste, and you'll be right where you were before you asked. | 07:44 | ||
brentdax | Heh. | ||
Aankhen`` | I guess people might like the PHP approach since it means less work for them. | 07:45 | |
I like the Perl approach since I want to keep improving as a programmer. | |||
brentdax | Well, only theoretically. In the long run it's not very nice. | ||
Aankhen`` | Indeed. | ||
It's a very short term view of the situation. | |||
The most messed up thing I ever heard of was an IRC bot for an MMORPG I play -- it was a real heavy-duty bot, with lots of nifty features -- which numbered thousands of lines of... wait for it... PHP. | 07:47 | ||
brentdax | Ouch. | 07:48 | |
Another channel I hang out in has a guy who's trying to write a PHP bot. I keep thinking "if you like pain that much, why not just use INTERCAL?" | 07:49 | ||
Aankhen`` | Websites written in PHP are usually laughable. Command-line PHP is definitely a case of a square peg in a round hole. PHP and IRC feels like the spawn of... | ||
:-) | |||
ROTFL. | |||
People just seem to think that PHP is the solution to everything. | 07:50 | ||
SM_ax | while it is solution to nothing? :) | ||
Aankhen`` | Well, that's my opinion. :-) | ||
brentdax | One thing I think is interesting about Perl 6 is that if you can convince Perl that your entire code file is a giant literal string, it has much of the inside-outness of PHP. | ||
Aankhen`` | But I suppose "if it works for you" applies there. | 07:51 | |
brentdax >> Inside-outness? | |||
brentdax | ``<html>{ 1+1 }</html>``, instead of ``print "<html>", 1+1, "</html>"``. | 07:52 | |
Aankhen`` | Ahh. | ||
SM_ax | Hmm, I've never seen a good PHP code or a good piece of software in PHP | ||
Aankhen`` | SM_ax >> One good PHP app is vBulletin. | ||
WordPress is another. | |||
(I don't like the language, but I'm not biased against the apps) | |||
brentdax | PHP's strength, I think, is that it makes it *really* easy to start small and grow from there. | 07:53 | |
Aankhen`` | Yes. | ||
But the problem is that it encourages many bad practices. | |||
And that whole magic quotes thing... *shudders* | |||
brentdax | (Granted, once you've grown it falls on its face, but by then you're stuck.) | ||
SM_ax | brentdax, for some people it is weakness :) | ||
brentdax | Dear God, yes. That's the most hackish thing I've seen in a language in a long time. | ||
Aankhen`` | Heh, in PHP you have to STAY small. | ||
brentdax | MediaWiki's pretty big... | 07:54 | |
Aankhen`` | Otherwise you just end up with a ton of spaghetti code. | ||
I've seen quite a few large PHP projects. | |||
Uuuugly. | |||
"Code is poetry" just doesn't apply. :-( | 07:55 | ||
brentdax | 55.5kloc in includes/, which is most of the code. It's not too hard to find the section of the code you need to mess with. | ||
Aankhen`` | Hrm, I haven't seen the code for MediaWiki. | ||
The greatest thing about Perl 6, IMHO, is pattern matching. | 07:56 | ||
brentdax | Yes. I actually mentioned that on wikitech-l, that when PHP-on-Parrot and Perl 6 are available, we can replace the creaky multi-pass substitution "parser" they currently have. (Heck, Perl 6 isn't even really necessary for that, as long as there's a library for PGE access.) | 07:57 | |
Aankhen`` | Yeah. | ||
PGE as a library would be so amazing. | |||
Heh... PCRE seems so outdated compared to PGE. | 07:58 | ||
Um. | |||
Compared to Perl 6's pattern matching, rather. | |||
brentdax | Heh. | ||
That's one of those parts of Perl 6 that I wanted *now* when I read about it. | |||
Aankhen`` | Me too! | ||
Blasted Micro$haft Winduhs won't let me link Parrot into Pugs. >_> | |||
No pattern matching for me. >_< | 07:59 | ||
brentdax | Ack. | ||
Windoze-- | |||
Aankhen`` | (--Windoze)-- | ||
brentdax | Windoze -= Inf; | ||
Aankhen`` | Windows == -Inf; | ||
brentdax | And maybe when Ruby-on-Parrot's available, we can steal Rails. And there will be much rejoicing. | 08:01 | |
Aankhen`` | Hehe. | ||
Parrot++ | |||
PGE++ | |||
brentdax | Parrot'll be great because it'll let me use all those other languages without having to actually *write* in them. | 08:02 | |
Aankhen`` | I'm not such a great fan of Ruby-on-Rails, though, after I read their solution to the whole non-idempotent GET links thing. | ||
Indeed. | |||
brentdax | (Of course, with the Rubyometer continually rising, we might as well be writing in Ruby.) | ||
What's that? | |||
Aankhen`` | The solution? | 08:03 | |
brentdax | Yes. | ||
Aankhen`` | One sec. | ||
I'll have to dig up the link. | |||
wolverian | besides, we have Catalyst on CPAN. | 08:04 | |
why need Rails? :) | |||
brentdax | ...why don't people tell me about these things? | 08:05 | |
Aankhen`` | brentdax >> community.moertel.com/ss/space/star...05-05-08/1 | ||
wolverian | I discovered Catalyst only a while ago, too. | ||
it is quite nice. | |||
Aankhen`` | In principle, it was a good solution, but now you're going to have most Rails users putting forms within forms within forms within forms. | ||
brentdax | Oh, God, it's the GWA thing. | 08:06 | |
Aankhen`` | Yeah. | ||
brentdax | I wnated to kick *so* many faces in when people started complaining about that. | ||
wolverian | Aankhen``: there is no other solution to it. | ||
Aankhen`` | Yep. | ||
wolverian >> I know, they did the best they could. | 08:07 | ||
I just wasn't particularly happy with it. :-P~~~ | |||
wolverian | why not? | ||
Aankhen`` | The whole idea of creating another form to put the button within... | 08:08 | |
So if you have: <form>...(button code goes here)...</form>, you end up with: <form>...<form>...</form>...</form> | 08:09 | ||
wolverian | is there another way to do it? | ||
Aankhen`` | No, like I said, they did the best they could. | ||
The only other way would be to educate all their users. | |||
Aankhen`` sniggers. | |||
wolverian | ..and they would have to do the exact same thing. | ||
Aankhen`` | Bleh, Pugs still refuses to link with Parrot. | 08:10 | |
:-( | |||
brentdax | What does it do? | 08:12 | |
pasteling | "Aankhen``" at 203.101.19.91 pasted "Compiling Pugs with PUGS_EMBED=parrot fails" (30 lines, 1.1K) at sial.org/pbot/10245 | 08:14 | |
Aankhen`` | autrijus told me to use MSYS. | ||
I don't understand it very well though. | |||
brentdax | Looks pretty nasty... | 08:15 | |
Aankhen`` | I did download MinGW... all those files being looked for do exist, with the name libfoo.a, for example, libole32.a | ||
Is <ws> = \s* or \s+? | 08:35 | ||
brentdax | It Depends. | 08:36 | |
<ws> is the same as the whitespace in a :w rule. | |||
Aankhen`` | On what? | ||
Ah. | |||
brentdax | (iirc) | ||
Aankhen`` | Oh well, \s* does just fine. | ||
brentdax | Yeah, S5: / <?ws> / # match whitespace by :w rules | 08:38 | |
Aankhen`` | OK, thanks. | ||
autrijus | brentdax: re: | 08:43 | |
"Is there any sort of file I/O in Pugs, or have you guys been waiting till you have some idea what it'll look like?" | |||
we have open(), accept(), listen(), say, flush, etc | |||
all sorts of things you can reasonably expect :) | |||
there's plans for piped open and io() as well. | |||
$work & | |||
brentdax | Alright, good, thanks. | ||
Aankhen`` | If a rule in a grammar invokes another rule, does the rule being invoked have to be defined before it? | 08:46 | |
brentdax | Presumably mutually recursive rules are legal... | 08:47 | |
Aankhen`` | Okay. | ||
Is there any list of builtin rules, like <alpha>? | 08:54 | ||
10:54
Aankh|Clone is now known as Aankhen``
|
|||
svnbot6 | r3435, iblech++ | * Usual svn properties and EOL at EOF. | 11:25 | |
r3435, iblech++ | * Updated svnlog2graph.pl's scaling as we're close to r3500. :) | |||
scook0 returns | 11:27 | ||
11:44
chady is now known as chady_
|
|||
castaway ruffles Limbic | 12:00 | ||
Limbic_Region is in the middle of his morning ritual of catching up on the news castaway | |||
Limbic_Region hugs castaway anyway then wanders back off | |||
castaway | :) | 12:01 | |
autrijus | greetings! | 12:09 | |
autrijus is off-$work | |||
castaway | grats :) | 12:10 | |
plus6 right? 8pm? | 12:11 | ||
autrijus | yup | ||
I like at least using some Perl 5 at work... it keeps me in perspective :) | |||
castaway | indeed | 12:12 | |
castaway wonders which new shiny functionality we're going to get tonight | 12:13 | ||
autrijus | it's the second half of the week | ||
so it's likely I'll move into bugfixing. | |||
castaway | mm, makes sense ,) | ||
autrijus | cleaning the smoke stack, so to speak | 12:14 | |
castaway | *g* | ||
Limbic_Region | yeah, it is a never ending cycle - bufixes lead to refactoring, refactoring lead to neat new ideas, neat new ideas lead to more bugs | 12:16 | |
autrijus | o/~ and it moves us all / through despair and hope / through faith and love o/~ | 12:17 | |
castaway tosses theorbtwo.perlmonk.org/kwiki/index.cgi?VBFAQ at Limbic :) | |||
Limbic_Region | castaway - I haven't gotten to the Yahoo Mail section of my morning routine | 12:18 | |
I am going to see what I can do about devoting a couple of hours a week to the project though | |||
castaway | *g* Ok | ||
cool | |||
well the link wasnt in the mail anyways, since I just created it today | 12:19 | ||
castaway pokes bro. | 12:52 | ||
Limbic_Region | castaway - almost (but not quite) finished with my morning routine | 12:55 | |
svnbot6 | r3436, iblech++ | Added (OO) Net::IRC::JoinOnInvite and Net::IRC::SeenExt roles. | ||
Limbic_Region | can I /msg you some initial thoughts? | ||
castaway | sure, go ahead | 12:57 | |
stevan | morning all :) | 13:07 | |
svnbot6 | r3437, autrijus++ | * remove primitive infix operators from being inserted into the | ||
r3437, autrijus++ | user-defined level of the precedence table; previously it was | |||
r3437, autrijus++ | breaking "or" and "and". | |||
Limbic_Region | salutations stevan | 13:10 | |
stevan | morning Limbic_Region | ||
Limbic_Region | autrijus - I often see PAR questions go unanswered (or at least not answered well) at the Monastery - any general advice since I know nothing about PAR? | 13:14 | |
he did say he was off $work right? | 13:15 | ||
castaway | he did | ||
hmm, I got advised to ask the mailing list, who then told me to search the list archives.. | |||
(but I havent gotten around to it yet) | 13:16 | ||
Limbic_Region | *shrug* - I just don't like to see good questions go unanswered | 13:17 | |
castaway | yeah me either.. I guess there are not too many PAR experts lurking in the monaster | 13:21 | |
yeah me either.. I guess there are not too many PAR experts lurking in the monaster | 13:23 | ||
bingbong, Odin | 13:25 | ||
Limbic_Region | Is there a Dumper yet for Pugs? | 13:26 | |
castaway | .perl ? | ||
$mydatathingy.perl gives you a data::dumperish output, iirc | 13:27 | ||
Limbic_Region | ok - good enough for me | ||
castaway | (duh, if I want to get mail today, I should probably restart fetchmail..) | 13:32 | |
Limbic_Region | I think I just found a bug | 13:35 | |
castaway | grats :) | ||
Limbic_Region | my %hash = map -> $_ { $_ => undef } 1..10; # works as expected | 13:36 | |
my %hash = map { $_ => undef } 1..10; # doesn't work at all | |||
I thought -> $_ was assumed if not explicitly stated? | |||
castaway too | |||
Limbic_Region | anyone else around to confirm/deny? | 13:37 | |
castaway | Mine takes too long to build.. I could try lilith.. :) | ||
scook0 | pugs: cannot cast from VList [VInt 1,VInt 2,VInt 3,VInt 4,VInt 5,VInt 6,VInt 7,VInt 8,VInt 9,VInt 10] to Pugs.AST.Internals.VCode | 13:38 | |
Limbic_Region | scook0 - I know that's what it says when it breaks | ||
I am asking if breaking is proper behavior or not | |||
IOW - does map require -> $var | |||
castaway | Limbic, I get: pugs: cannot cast from VList [VInt 1,VInt 2,VInt 3,VInt 4,VInt 5,VInt 6,VInt 7,VInt 8,VInt 9,VInt 10] to Pugs.AST.Internals.VCode | ||
ah, hmm | 13:39 | ||
castaway dives for the docs | |||
Limbic_Region is going to go find out if this copy of HOP he loaned out is available to be borrowed back | |||
if you find that it is optional ($_ is assumed) - let me know and I will write a test for it | |||
scook0 | IIRC, {...} is just a special notation for ->{...} | ||
castaway | hmm, no map in S04 | 13:40 | |
scook0 | I think { $_ ... } means { $^_ ... } which means -> $_ { $_ ... } | 13:41 | |
castaway | A bare closure without placeholder arguments that uses $_ (either explicitly or implicitly) is treated as though $_ were a placeholder argument: | ||
$func = { print if $_ }; | |||
$func("printme"); | |||
broquaint | I thought map need to be called with a colon if you wanted to use a bare closure (at this stage) i.e map:{ ... } LIST; | ||
scook0 | Seems to me like it's just a pugs bug, not deliberate behaviour | ||
Limbic_Region | broquaint - you very well may be right | 13:42 | |
castaway | That implies to me (from S04) that it should work as Limbic expects.. | ||
Limbic_Region | I haven't assimilated enough to know for sure yet | ||
scook0 | that might explain why it's expecting 1..10 to be a VCode | ||
broquaint | I think it should work as L~R expects, but I don't know if Pugs supports that style yet. | ||
Limbic_Region | well - it is broken either way | ||
so it is a bug | |||
just not sure how to test yet | 13:43 | ||
scook0 | Maybe it thinks { $_ => undef } is a hash that it's mapping over, so it assumes that 1..10 must be the mapping function | ||
Limbic_Region | depending on which way is right | ||
castaway | I dont recall seeing "map" mentioned in any of the synopses yet | ||
broquaint | { $_ => whatever } hashifies IIRC | ||
Limbic_Region | my %hash = map:{$_ => undef} 1..10; | ||
castaway | hmm, yes.. somewhere mentions that => implies hashiness.. | 13:44 | |
Limbic_Region | actually, IIRC what it says is | ||
scook0 | my %hash = map { $_ => undef; } 1..10 | ||
Limbic_Region | {} is always a block | ||
scook0 | works fine | ||
Limbic_Region | unless | ||
castaway | A bare closure without placeholder arguments that uses $_ (either explicitly or implicitly) is treated as though $_ were a placeholder argument: | ||
$func = { print if $_ }; | |||
$func("printme"); | |||
Limbic_Region | it looks very much like a hash | ||
castaway | oops | ||
On the other hand, anywhere a term is expected, a block is taken to be a closure definition (an anonymous subroutine). If the closure appears to delimit nothing but a comma-separated list starting with a pair (counting a single pair as a list of one element), the closure will be immediately executed as a hash composer. | |||
$hashref = { "a" => 1 }; | |||
(that one) | |||
broquaint | dev.perl.org/perl6/doc/design/apo/A..._operators | 13:45 | |
castaway | (which is further down in S04) | ||
Limbic_Region | someone confident they know the right behavior and is willing to write a test it would be greatly appreciated | ||
personally, I am just going to wait until after I finish this project | 13:46 | ||
broquaint | If I write the tests will someone commit them? | ||
Limbic_Region | I am sure to find more bugs/questions | ||
broquaint - yes - lots of people will be willing to commit them | |||
castaway | I'm guessing that the second statement narrows the first one, so its not a bug | ||
Limbic_Region | but becareful - it may land you a commit bit | ||
castaway | ,) | ||
broquaint | Good point, L~R :) | 13:47 | |
broquaint discovers a bug in his first line of code :/ | |||
Or is it? pugs -e "say (map {; $_=>1} qw/a b c /).perl" | 13:48 | ||
castaway | Im not sure pugs takes over the {; .. idiom | ||
I think you want a : (somwhere) | |||
broquaint | I think autrijius said it did ... | ||
Yeah, it does. | 13:49 | ||
castaway | ok, I stand corrected | ||
scook0 | well, I must be off | ||
bye all | |||
broquaint | It seems that () inserts references to keys in that example. Which doesn't seem right. | 13:50 | |
nothingmuch | how easily could the schwartzian transform be done by hacking itypes? what I mean: | ||
my @array := map { ... } @original; | 13:51 | ||
broquaint | What does the 'I' stand for in ITypes? | ||
nothingmuch | bind_indices(@array, @orig); | ||
@array.=sort; | |||
# @orig sorted as well, due to element relocation being carried over to @orig | |||
except that it's not a schwartzian transform anymore | 13:52 | ||
partial binding of the container meta object | |||
phooey | |||
Limbic_Region | hmmm - found my second piece of strange behavior already | 13:55 | |
likely this is just an unimplemented feature | |||
broquaint | How does one test a parsefail? | ||
Limbic_Region | sub foo (Int $bar is copy, @list is copy) { ... } foo( 'hello', 1..10); | 13:56 | |
nothingmuch | broquaint: if it dies in an string eval too, then comment it out | ||
and put a fail("FIXME: parse fail"); right before it | |||
Limbic_Region | notice the 'hello' is not of type Int | ||
but it works just fine | |||
when it shouldn't | |||
nothingmuch | Limbic_Region: is this happenning because of is copy? | ||
broquaint | Thanks, nothingmuch. | ||
nothingmuch | i can promise to look at it when I get home | ||
but I doubt I can solve it | 13:57 | ||
broquaint decides to recompile Pugs before writing any tests ... | |||
Limbic_Region | I don't think so nothingmuch | ||
in fact - I know it isn't | 13:58 | ||
try the following | |||
nothingmuch | i can't try now | ||
got to hack C++ | |||
if i start with pugs i'll get distracted | |||
broquaint | Poor, poor, nothingmuch ... | ||
nothingmuch | because I don't really feel like doing the C++ | ||
Limbic_Region | pugs -e "sub foo (Int $bar) { say $bar; } foo( 'hello' );" | ||
iblech | I actually think Pugs' behaviour is correct -- the Str is automatically morphed into an Int | ||
(Which happens to be 0, in this case) | |||
Limbic_Region | no | 13:59 | |
that's not what it does | |||
nothingmuch | i think it's bad for it to do that even if it did | ||
oh my! | |||
"hello" + 1 should not work | |||
Limbic_Region | I would be fine if that is what it did iblech | ||
but it doesn't | |||
it says hello | |||
nothingmuch | but see autrijus's thread on '1.28' * '2.56' | ||
iblech | Limbic_Region: oh... | ||
nothingmuch | i sort of know my way around bindparams, i'll try to look at it when I get back, Limbic_Region | 14:00 | |
Limbic_Region | so I am just keeping track of oddities I encounter | ||
will report them as I encounter them | |||
nothingmuch | test test test! | ||
Limbic_Region | but I don't intend to personally take action until I am finished | ||
nothingmuch | this info tends to get forgotten | ||
Limbic_Region | anyone along the way is happy to add tests | ||
nothingmuch - see what I just wrote | |||
nothingmuch | are you writing this stuff down? | ||
Limbic_Region | yep | 14:01 | |
little notepad next to me | |||
do it everytime I code p6 | |||
nothingmuch | okay, so when I get back if you haven't already tested, I'll ask you to show me a list of bugs | ||
Limbic_Region | it is so new to me, I need to remind myself of things | ||
k | |||
nothingmuch | back to work now | ||
PerlJam | Limbic_Region: Isn't that a policy decision? Sometimes you want strict type checking, sometimes you want autoconversion, and sometimes you just want what you want no matte what you wrote (the behavior you're seeing now) | ||
Limbic_Region | PerlJam - I think when you want it to "just work" you don't explicitly define the type | 14:03 | |
I think if you explicity define the type you want some kind of checking | |||
I am pretty sure it was initially a difference between Int and INT and int | |||
PerlJam | Limbic_Region: yeah, I agree. I'm just being devil's advocate for a minute :) | ||
Limbic_Region | where 1 would convert for you but not remember (cache) | 14:04 | |
and 1 wouldn't convert at all | |||
let me try the other two variants to see if either does what I want | |||
nothingmuch | Int is an object, int is autoboxed | ||
Limbic_Region | INT works | ||
or rather | |||
INT doesn't parsefail | 14:05 | ||
int parsefails | |||
Int doesn't parsefail | |||
none of them do the right thing | |||
grrr | |||
Limbic_Region gets back to work | |||
should .. have higher precedence than - ? | 14:09 | ||
0 .. $foo - 3; | |||
that doesn't work like p5 | 14:10 | ||
you have to add parens | |||
0 .. ($foo - 3); | |||
castaway | try it without spaces? | 14:11 | |
$foo-3 | |||
(something like that, iirc) | |||
eric256 | pugs -e"my $foo = 5; print for 1 .. $foo-1" | 14:12 | |
prints 4 | |||
as do any variations on spacing. | |||
castaway | mm, leastways its on purpose, I thihnk :) | ||
PerlJam | which version? | 14:13 | |
Limbic_Region uses a binary build and has no way of knowing revision | |||
eric256 | 6.2.3 (r3428) .... freshly built last night | ||
Limbic_Region | www.jwcs.net/~jonathan/perl6/ | 14:14 | |
PerlJam | eric256: well it worked on an older revision that I happen to have handy (r3119_ | ||
Limbic_Region | mine was built this morning at around 1 AM | ||
eric256 | if you just rung pugs Limbic_Region they fixed it so it shows the correct revision number | ||
Limbic_Region | eric256 - pugs -V has never worked on any of the binary builds I have got from Jonathan | 14:15 | |
unless it was fixed since 1AM this morning | |||
I think it is a problem with svk versus svn (but I am not sure - hearsay actually) | |||
eric256 | no need for -V... just start its interactive mode and the splash screen has it | ||
they fixed the svk vr svn thing a day or two ago | |||
Limbic_Region | no it doesn't | ||
eric256 | ??? realy? | ||
Limbic_Region | it says the exact same thing as pugs -V | 14:16 | |
which is to say it says 0 for revision | |||
I get a version number only (6.2.3) | |||
eric256 | maybe he uses SVK to get it? weird thought because that jsut started working just a day or so ago. wonder if one part got fixed and broke something else. ;) | 14:17 | |
Limbic_Region | dunno - I am not worried about that | ||
eric256 | either way i can't figure out how that code would print just 4 unless it is trying to do length(1..5) - 1 | ||
Limbic_Region | I am worried that PerlJam is saying that 0 .. $foo - 3; used to work and doesn't anymore | ||
means we didn't have good enough test coverage | |||
anyway - have written it down on my list | 14:18 | ||
moving on | |||
eric256 | or someone changed the specs so that now it is correct and before it was wrong.. which seems to be what castaway was hinting at | ||
PerlJam | eric256: I think it's doing something like (1,2,3,4,5) - 1 and the list is evaluating to the last element | ||
Limbic_Region | grrr - naked blocks as looping constructs aren't available in p6 anymore are they - grrrr | ||
PerlJam | Limbic_Region: nope, they need to have a "do" prefix | 14:19 | |
eric256 | i think thats suppose to be a loop prefix | ||
loop { ... } while <<expre>>; | |||
PerlJam | eric256: I think Limbic_Region was referring to how you can say { ...; redo } and it just works (in perl5) | 14:20 | |
Limbic_Region | it's alright - it really should never have been written the way it was anyway | ||
eric256 | yea... i thought what i read last night said to use a bare loop for that...i guess that would make an infinite loop though | 14:21 | |
Limbic_Region | infinite loop is what I want | ||
integral | hmm, is there a &? to get the current loop? | ||
eric256 | loop {} works then | ||
PerlJam | Limbic_Region: oh, then loop { ... } is it. | ||
integral | s/loop/block/ ? | ||
Limbic_Region | with a last to break out when appropriate | ||
PerlJam - yeah, but it really doesn't make much sense - I was shortcutting the p5 | |||
integral | { ...; &?CURRENT_BLOCK() } # ∞ loop using tailcalls | ||
Limbic_Region | it boils down to this loop { ... next if <some condition>; .... last; } | 14:23 | |
which means it may potentially run 1..Inf times | |||
s/potentially// | 14:24 | ||
eric256 | whould loop { ... } while ( <<condition>> ) continue { ... } work? | ||
svnbot6 | r3438, Stevan++ | Perl::MetaModel - more work on the Perl::Meta::Compiler class; currently it only compiles properties of classes and some basic built-in methods; some tests for it too | ||
PerlJam | eric256: I don't think continue blocks exist any more. | 14:26 | |
It'd be more like: loop { ... NEXT { ... } } while $condition; | 14:27 | ||
eric256 | i was just reading that section... didn't get down to the closure traist, didn't dawn on me that it would apply to loops | ||
PerlJam | okay, r3437 ... $ pugs -e 'my $foo = 5; print for 1..$foo-1' | 14:28 | |
1234 | |||
Limbic_Region | how do I do an array slice ? @foo[ @bar ] ? | 14:29 | |
iblech | yep | 14:30 | |
Limbic_Region found another bug | 14:50 | ||
svnbot6 | r3439, putter++ | Switched some parsefails into evals in t/rules/from_perl6_rules/. | ||
Limbic_Region | pugs -e "my $i = 3; my @array = 1..5; @array[ --$i ] ; say $i" | ||
$i should be 2 | 14:51 | ||
but it is 1 | |||
unless I missed something about predecrement operators? | |||
iblech | No, you're right, I think. | ||
Limbic_Region | port p5 to p6 code is a great way to find b0rk stuff | 14:52 | |
PerlJam | again, on r3437 ... | 14:54 | |
$ pugs -e 'my $i = 3; my @array = 1..5; @array[ --$i ] ; say $i' | |||
2 | |||
(but write tests anyway if that's your aim :) | |||
Limbic_Region | how new is 3437? | ||
PerlJam | very new. | 14:55 | |
Limbic_Region | ok - so I will summarize a list of bugs when I am done | ||
PerlJam | svnbot just mentioned a commit by Stevan that put us as 3438 | ||
Limbic_Region | all should get tests regardless | ||
PerlJam | s/as/at/ | ||
Limbic_Region | but it is good to know some have already been fixed | ||
PerlJam | oh, and there's one from putter | ||
Limbic_Region | having tests ensures things don't get unfixed | 14:56 | |
PerlJam | Limbic_Region: make sure you have the latest version whenever you do get around to doing something. It may be that tests have already been added. | ||
(not that more tests would be a bad thing :) | |||
Limbic_Region | well - I am in a bit of a predicement WRT testing ATM | 14:57 | |
would be real nice if there was a way to grep/search svn online | 14:58 | ||
Limbic_Region needs to talk to Jonathan about including the tests in the binary build he makes | |||
hey PerlJam - would you mind running something for me under your build? | 14:59 | ||
PerlJam idly wonders if google is indexing svn repos around the world. | |||
Limbic_Region: what do you need run? | |||
Limbic_Region | that way I will be able to keep the syntax clean | ||
will nopaste current working version | 15:00 | ||
and then will nopaste what I think should work if there were no bugs | |||
PerlJam | okie | ||
Limbic_Region | perlbot nopaste | ||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
pasteling | "Limbic_Region" at 129.33.119.12 pasted "Iterative Combinations (bug workarounds)" (27 lines, 793B) at sial.org/pbot/10249 | 15:01 | |
Limbic_Region | first ensure that works | ||
pasteling | "Limbic_Region" at 129.33.119.12 pasted "Iterative Combinations (fewer bug work arounds)" (26 lines, 770B) at sial.org/pbot/10250 | 15:02 | |
PerlJam | [1, 2] [1,3] [1,4] etc. | ||
Limbic_Region | then try that | ||
PerlJam | *** Error: Modification of non-creatable array value attempted | ||
on the second one just after it output [1,5] | 15:03 | ||
Limbic_Region | ok - let me try one more version - testing only 1 bug at a time | ||
pasteling | "Limbic_Region" at 129.33.119.12 pasted "Iterative Combinations (1 bug assumed fixed)" (26 lines, 774B) at sial.org/pbot/10251 | 15:04 | |
Limbic_Region | this one only assumes 1 bug has been fixed | ||
? | 15:05 | ||
PerlJam | same error | ||
Limbic_Region | ok | ||
odd since you said pugs -e 'my $i = 3; my @array = 1..5; @array[ --$i ] ; say $i' prints 2 | 15:06 | ||
oh well, I will leave the workarounds in | |||
more important to move on at this point | |||
PerlJam wanders off to do some work | |||
putter | seen stevan | 15:22 | |
mugwump: ping | 15:24 | ||
iblech | Hm... my $hash = { key1 => "baz", key2 => "baz" }; say "Hallo $hash<key1>" doesn't currently work as expected | 15:35 | |
svnbot6 | r3440, putter++ | Added "has Perl::Type $paramType;" to Perl-MetaModel/lib/Perl/Param.pm. | ||
r3441, putter++ | Added "Split value and implementation types in Perl-MetaModel/lib/Perl/Param.pm. | |||
Limbic_Region | iblech - doesn't giving it a hint by say my $hash = hash { ... } help? | 15:36 | |
iblech | iblech: The problem is the output -- it outputs ~$hash (all keys and values, tab and \n delimited) and then "<key1>" | 15:37 | |
Limbic_Region | errr | ||
that should have been does | |||
iblech | Where it should output only "baz" | ||
Limbic_Region | not doesn't | ||
stevan | putter: pong | 15:40 | |
Aankhen`` | :-o | 15:41 | |
autrijus >> I just saw your name on the CPANPLUS AUTHORS list. | |||
That was a pleasant discovery. :-) | 15:43 | ||
svnbot6 | r3442, iblech++ | Like in Perl 5, die "...\n" now doesn't output the file position etc. where the | 15:55 | |
r3442, iblech++ | error has happened. | |||
putter | stevan: I did some toe-in-the-water fiddling with Perl::Param. Added has Perl::Value paramValueType, paramImplType. Thoughts? | 15:56 | |
s/Thoughts\?/Any feedback welcome./ | 15:57 | ||
stevan | putter: to be honest, that is mugwumps territory | 15:58 | |
I am just an implementation monkey :) | |||
Forth__ | hum...have no idea to write a pugsh | 15:59 | |
putter | ah, ok. :) thanks. | 16:00 | |
svnbot6 | r3443, autrijus++ | * We have OUTER:: scope now. | ||
r3443, autrijus++ | * Closure (VCode) now captures over the entire Env, instead | |||
r3443, autrijus++ | of just the envLexical slot. This is currently only used to | |||
r3443, autrijus++ | restore the original OUTER:: scope when calling a subroutine, | |||
r3443, autrijus++ | but once we switch to oleg's CC_2CPST for Eval monad, this will | |||
r3443, autrijus++ | get us rubyish coroutines (and serialised subcontinuations) for free. | |||
stevan | ahhh ,... my fingers are starting to code Perl 6,.. even when I am writing perl5 :P | ||
putter | stevan: ;) yes. the effect needs a name. also, after typing "perl" for the order-hundreth time to run pugs, I gave up and created aliases. | 16:04 | |
stevan | :) | ||
putter: I just discovered that ~ does not concat strings very well in perl5 :P | |||
and Perl5::Object.new() does weird things :P | |||
although I think really what I need is more coffee :) | 16:05 | ||
putter | oh yes. *laugh* | ||
cognominal | "rubyish coroutines": rubyish shouds like rubbish... | 16:06 | |
autrijus | heh | 16:07 | |
rehi, btw | |||
stevan | hey autrijus :) | ||
cognominal | hi | ||
autrijus just woke up -- I somehow fell unconscious ;) | |||
stevan | did you implement ::OUTER while you were sleeping? | 16:08 | |
autrijus | yeah, I dreamed about it | ||
so I woke up and coded it in | |||
stevan | :) | ||
I did that with the Meta class compiler last night | |||
too much smalltalk before bed :) | |||
autrijus | that's nice | 16:09 | |
stevan: deriving Ord is just implementing <=> in perl | 16:10 | ||
stevan | ok | ||
autrijus | Typeable is guaranteed -- it's having a .ref | ||
stevan | cool | ||
autrijus | why are you using lots of ~ ? | 16:11 | |
stevan | autrijus: I am planning (in my head) a basic implentation of Roles using the Meta::Model classes | ||
autrijus: bad habit of mine | |||
autrijus | 'foo ' ~ $foo.bar() ~ ' bar baz ' ~ $baz.baz() | ||
stevan | it helps me organize it visually | ||
autrijus | so you find "foo $foo.bar() bar baz $baz.baz()" less readable? | 16:12 | |
stevan | no not less readable | ||
autrijus | in that case, I won't touch the code then | ||
ohh | |||
stevan | but I like to indent and format things | ||
autrijus | nod | ||
stevan | (code as ASCII art) | ||
autrijus | cool | ||
stevan | I never studied Comp Sci, I went to art school | ||
code aesthetics are important to me :) | 16:13 | ||
autrijus | *nod* and we love your figlets | ||
stevan | :) | ||
autrijus | so, there's Roles | ||
what else would you like Perl::MetaModel to have? | |||
stevan | oh | 16:14 | |
autrijus is looking for a time point to snapshot that directory and backport to haskell | |||
stevan | I was going to try to make it compile the class with roles | ||
using the meta-model | |||
because the compiler right now just builds a string and evals it | 16:15 | ||
so I am thinking I can add the Role understanding to the compiler maybe | |||
(just for fun) | |||
and see if I cannot prototype Roles that wat | |||
s/wat/way/ | |||
it will just create a plain Pugs Class | |||
autrijus | that sounds intriguing and powerful | 16:16 | |
stevan | when ultimately the meta-model needs to understand this stuff I think | ||
autrijus | yup | ||
stevan | however I still need to make the compiler deal with methods first | ||
right now it just creates a meta() (which returns the Perl::Meta::Class instance) | 16:17 | ||
and an isa() which points to the meta-class isATypeOf for now | |||
I would do more, but I am starting to get behind in $work so ... | 16:18 | ||
autrijus | nod | 16:19 | |
svnbot6 | r3444, iblech++ | warn() implemented. | 16:22 | |
autrijus | iblech++ # core hacking in earnest | ||
iblech | My Perl 6 p6bible needed warn(), but it wasn't yet implemented, so... :) | 16:24 | |
putter | stevan: I just realized the metamodel typing still needs junctives, hierarchical, *and* subtypes... anything else come to mind? | 16:25 | |
stevan | oh,.. it needs much more that that too I am sure | ||
:) | |||
putter | ;) | ||
autrijus | iblech: I'm so looking forward into installing p6bible in p6 by default :) | 16:26 | |
iblech | :) | ||
putter | yes, please. and I contribute a script which merges S\d\d.pod to S.pod, making it easier to search... | ||
autrijus | it seems that the Eiffel XSLT app guy succeeded into getting PIR as his scripting language. | 16:27 | |
we need a libpugs :) | |||
(so that those xslt functions can be written in perl6) | |||
it may just be a simple case of a few "foreign export", really. | |||
it looks like GHC has a libghc mode, too. hopefully it will land to 6.4.1 | 16:28 | ||
putter | hmm... use Eiffel;... but probably have to create an additional level of (very light weight) threading... | ||
autrijus | that will magically enable Inline::GHC | ||
jhorwitz prays for libpugs | 16:31 | ||
autrijus | jhorwitz: you'll find it useful? :) | ||
it will however not be based on parrot at first | |||
but you can surely link both in :) | 16:32 | ||
jhorwitz | don't be so coy... ;-) | ||
compiling pugs -> parrot w/o running pugs or pugscc would be most excellent. | 16:33 | ||
autrijus discovers www.volker-wysk.de/hsshellscript/ | 16:34 | ||
putter | Ha, "Plugging Haskell In" www.cse.unsw.edu.au/~dons/hs-plugin...lugins.pdf has an interpreter "Plugs". :) | 16:35 | |
iblech | autrijus: [+] no longer works, as the fix from earlier today filters non-userdefined ops. Userdefined ops do work | 16:37 | |
autrijus | iblech: hey. if I define infix Z, I don't get [Z] | 16:38 | |
svnbot6 | r3445, iblech++ | die() and warn() no longer harddie with "Prelude.last: empty list" if no error | ||
r3445, iblech++ | message was specified, but output "Died." or "Something's wrong." (like Perl 5). | |||
autrijus | iblech: you know how or why? | ||
iblech: ugh. as for [+], I think the true solution is to switch Prim.hs into adding prec info | 16:39 | ||
iblech | autrijus: s/Z/q/ and it works. This seems to be a weird bug I was unable to trace | ||
autrijus | and derive the big table in Parser.hs | ||
based on precedence metadata | |||
so we don't end up with duplicates | |||
iblech | I think so, too | 16:40 | |
autrijus | you think you're up for it? :D | ||
autrijus is amazed by iblech's lambda-fu | |||
iblech | I'm amazed, too ;) -- But now, I don't think I can do that yet | ||
s/now// | 16:41 | ||
autrijus | ok. | 16:43 | |
I'll do it then. | |||
btw, you aware that | |||
[<] 1,2,3 | |||
is subtle broken? | |||
I'm not sure what to do | |||
arguably the op1Fold need to probe for fixity | |||
I mean associativity | 16:44 | ||
and fold accordingly | |||
iblech | Saw that bug some minutes ago... [<] 1,2,3 seems to reduce to (1<2)<3 instead of 1<2<3 | ||
putter | Hey, the May 2005 Haskell Communities and Activities Report is out. Probably mentioned already, but always worth reading. www.haskell.org/communities/ | ||
autrijus | yeah because op1Fold is just leftward | ||
putter: ooh, thanks for the info | |||
hm, I found a way to easily do linked list consing in Perl6 | 16:45 | ||
[=>] 1..10; | |||
and just remap .key to head, .value to tail | |||
osfameron | Larry wrote he was hoping no-one would notice => for consing.. | 16:47 | |
can you really use => in [] ? | |||
theorbtwo | That is very evil, autrijus. | ||
iblech | Of course, => is a infix op like +, *, etc., too | ||
theorbtwo | osfameron, it's (mostly) just an infix operator, so why not? | ||
autrijus | and it's foldr | 16:48 | |
as God^WLisp intended | |||
because => is right assoc | |||
osfameron | so [,] is a noop? | ||
svnbot6 | r3446, iblech++ | Added test for [=>]. | ||
autrijus | osfameron: yeah | ||
iblech wonders what other interesting [some_infix_op] combinations exist... | 16:49 | ||
putter | iblech: are you going to add [,] to reduce.t, or shall I? :) | 16:52 | |
iblech | putter: :) You can do it | 16:53 | |
I'm adding the next one then :) | |||
putter | k. *much laughter* | ||
PerlJam | why would you use [,] ? | 16:55 | |
Are you trying to make perl into lisp? | |||
stevan | autrijus: the meta-compiler handles methods now :) | 16:56 | |
I had a flash of inspiration | |||
back to $work now :) | |||
autrijus | whoa. | ||
stevan | it is kind of primative now though | ||
I do not deal with arguments and method signatures and such | 16:57 | ||
(args just get passed in as a *@args) | |||
iblech | Is for =open(...) {...} supposed to work? (Pugs hangs currently) | 16:58 | |
Limbic_Region | what's the p6ism for my $count = keys %hash; ? | ||
svnbot6 | r3447, Stevan++ | Perl::MetaModel - meta-compiler now handles methods (and method inheritance too); added C<can(Str) returns Bool> to built-in methods; see the t/50*.t for more info | ||
Limbic_Region | .count ? | ||
iblech | my $count = +%hash, IIRC | 16:59 | |
my $count = +keys %hash will work, too | |||
Limbic_Region | that works | ||
thanks | |||
iblech | but my $count = heys %hash will give you an arrayref to the list of keys | ||
s/heys/keys/ | |||
autrijus | iblech: I fixed [+] etc | 17:00 | |
it may fix [Z] accidentally as well | |||
iblech | autrijus++ # yay! :) Please tell me what the problem with [Z] was, then :) | 17:01 | |
iblech food & | |||
autrijus | iblech: nvm it's still bad | 17:04 | |
svnbot6 | r3448, autrijus++ | * [+] rescued | ||
autrijus | iblech: the bug was | 17:07 | |
ruleApply was after ruleLit | |||
and [Z()] is a lit. | |||
Limbic_Region | autrijus - I am working on a small project that I think will get new people on board | 17:14 | |
svnbot6 | r3449, autrijus++ | * [Z] now works | ||
Limbic_Region has uncovered 4 bugs in the process (2 of which may already have been fixed) | |||
and it is all because I write bad code | 17:15 | ||
;-) | |||
broquaint | Bad code makes for good tests! | 17:19 | |
Limbic_Region | also looks like a good candidate to profile pugs and optimize where appropriate | ||
broquaint - actually bad code makes for good "improve this code" contests | |||
I do need a way to determine if a list of sorted numbers is in a sequence of 3 or more | 17:20 | ||
i.e. 5,6,7 | |||
putter | r3450 (reduce.t) is untested. sorry, I have to unbreak syck. | 17:21 | |
autrijus | unbreak syck? | 17:23 | |
how is syck broken? | |||
(I imported 0.55) | |||
putter | syck.h defines some macros using malloc,etc, and memset, etc, but doesnt #include stdlib and string.h. I patched this before locally, but I'm afraid pushing it upstream is still on my todo list (somewhere...). Mea culpa. | 17:26 | |
svnbot6 | r3450, putter++ | Added [,] to reduce.t. And reordered some tests. | ||
r3451, autrijus++ | * oops, reverted the precedence, only allowing reduce | |||
r3451, autrijus++ | metaoperator to parse before literals | |||
Limbic_Region thinks he might have found another bug | 17:32 | ||
svnbot6 | r3452, ninereasons++ | work around unexpected behavior | 17:38 | |
vcv-- | netsplit, ouch | 17:41 | |
autrijus | ninereasons: adding "motd.p6 - " as the prefix of commit log, and/or explaining the mishevariour, would be appreciated... (and makes it easier to fix for) :-) | 17:42 | |
(since that looks like a genuine bug) | 17:43 | ||
iblech | autrijus: re. Found a bug: ("abc"|"def") ~~ rx:Perl5/.../ works as expected (returns a junctive match object), but my $a = "abc"|"def"; $a ~~ rx:Perl5/.../ returns only one | 17:47 | |
autrijus: re. Found a bug: ("abc"|"def") ~~ rx:Perl5/.../ works as expected (returns a junctive match object), but my $a = "abc"|"def"; $a ~~ rx:Perl5/.../ returns only a non-junctive match object | 17:48 | ||
autrijus | weird. | 17:49 | |
svnbot6 | r3453, putter++ | r2706 reapplied (syck.h required #includes). And this time, upstream has been notified. | ||
autrijus | but then again, not weird really, because ~~ is rw! | ||
($a|$b) ~~ s:P5/x/y/; | |||
I wonder what does that do. | |||
autrijus is confused | |||
Limbic_Region | without parrot on my Win32 box, what is the fastest way I can run code (options wise) - or am I stuck with what I got? | 17:50 | |
iblech | I think: It should try to s:P5/x/y on both $a and $b, and return a junctive object which may evalute to true|false, if, for example $a didn't contain a "x" but $b did | 17:51 | |
autrijus | Limbic_Region: you can tell autrijus to send you a copy | ||
Limbic_Region | a copy of parrot? | ||
autrijus | of binary parrot build | ||
yeah | |||
Limbic_Region | or a pugs.exe linked against parrot with the appropriate library | 17:52 | |
clkao | *yawn* | ||
autrijus | I hadn't got msys linkning to work. | ||
Limbic_Region | well - I kind of want the code to be slow | ||
autrijus | judging from Aankhen``'s report, nobody did :) | ||
I think extern parrot for now | |||
Limbic_Region | I just want to find out if something worked (which will take quite a while) | ||
autrijus | is the surest bet | ||
in PGE? | |||
Limbic_Region | nope | ||
I will nopaste what I am working on | |||
autrijus | er, what do you want parrot for then | ||
sure | 17:53 | ||
Limbic_Region | keep in mind that it is intended as a "how much can you improve this" contest | ||
to get people interested | |||
autrijus | autrijus.org/tmp/parrot.tgz btw. | ||
uploading | |||
done | |||
win32 vc6.0 build | |||
vcv-- | vc6? ick :) | 17:54 | |
Limbic_Region | parrot nopaste | ||
autrijus | the only version perl is known to build correct ;) | ||
Limbic_Region | perlbot nopaste | ||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
autrijus | s/correct/correctly/ | ||
mmm. | 17:55 | ||
Aankhen`` | autrijus >> I didn't try MSYS. | ||
autrijus ponders eval_scheme support | |||
vcv-- | perl wont build on vc2002/2003? | ||
autrijus | Aankhen``: oh, you didn't? then somebody else did | ||
Aankhen`` | Atleast... | ||
I just installed MinGW. | |||
autrijus | oh ok. | ||
pasteling | "Limbic_Region" at 129.33.119.12 pasted "My Idea for a "Sharpen your P6 skills" contest" (128 lines, 3.6K) at sial.org/pbot/10253 | ||
Aankhen`` | vcv-- >> Visual Studio? | ||
autrijus | vcv--: yes, but then an extra dependency on VC's libc will be generated | ||
vcv-- | oh. | 17:56 | |
autrijus | vcv--: and the "free" version is iirc unusable | ||
at least no success reports has been found | |||
vcv-- | right | ||
Limbic_Region | specifically, I want to test the right-jack and runs code | ||
clkao | karma vcv | ||
Aankhen`` | The free version sucks. -_- | ||
autrijus | karma vcv | ||
karma for vcv | |||
hrm, no workee :) | |||
vcv-- | ill have to try getting it to work on the free version | ||
theorbtwo | Seen hasn't been working either. | ||
autrijus | vcv--: I tried... lots of porter tried | ||
all failed | |||
that's after multihundred metabytes of SDK download | |||
vcv-- | shame :( | 17:57 | |
autrijus | so it's painful and unrewarding | ||
Aankhen`` | $karma vcv | ||
:-( | |||
Limbic_Region | autrijus - would you mind running that code I nopasted | ||
vcv-- | i know someone on the visual studio team, indirectly. he hates perl though, so dont think i could get any info out of him | ||
Limbic_Region | and give me a line that either has a Jack in the first 4 cards or a hand that has a sequence of 3 or more | 17:58 | |
Limbic_Region needs to verify the scoring is working | |||
btw - it is going to take a while | |||
autrijus | why does this need parrot? | ||
Limbic_Region | for speed | ||
autrijus | hm? speed? | 17:59 | |
Limbic_Region | actually - anything that will speed it up will be appreciated | ||
except re-writing it to be more efficient | |||
Aankhen`` | How do I link Pugs against an external Parrot? | ||
Limbic_Region | that is what the contest is for | ||
autrijus | I don't think parrot codegen handles this | ||
Limbic_Region | ok | ||
autrijus | Aankhen``: you do nothing :) | ||
Limbic_Region | so is there anything that can make the same code run faster? | ||
Aankhen`` | Parrot is required for PGE, right? | ||
autrijus | Aankhen``: just set parrot in path. | ||
Aankhen`` | Ah. | 18:00 | |
autrijus | PATH, that is | ||
Aankhen`` | I was wondering what I did wrong, heh. | ||
autrijus | Limbic_Region: yes, work on parrot codegen :) | ||
Limbic_Region | ok - so I guess I just need to be smarter than the average bear | ||
seed my test with desired data instead of waiting for the iterator to get to it | |||
vcv-- | autrijus: i know you said its painful and unrewarding, but i took that as a challenge. look what you got me into! | 18:01 | |
PerlJam | Limbic_Region++ It's great that you're writing so much perl6 :-) | ||
autrijus | vcv--: it's not worth it... :) | ||
but hey, if you insist, I can't stop you can I | 18:02 | ||
wolverian | does anyone have a link to something that discusses the definition of reduce as used in perl6? wondering if I could show a friend that it's more mathematical than what other languages use. | ||
vcv-- | i have a deep down hatred for anything vc6 related, and i wish to tinker with parrot..so :p | ||
wolverian: the best thing i read was damian's 9 use examples of it | 18:03 | ||
autrijus | wolverian: WhatIsAFold | ||
wolverian | vcv--: sure. I'm just wondering specifically about the mathematical definition, since people have been saying the perl6 reduce conforms to that. | ||
vcv-- | oh, gotcha :) | ||
wolverian | autrijus: thanks. | ||
autrijus | wolverian: haskell.org/hawiki/WhatIsaFold | ||
Aankhen`` | vcv-- >> Parrot works fine. | ||
You just can't link it against Pugs. | 18:04 | ||
Or perhaps it was vice-versa. *looks sheepish* | |||
autrijus | same thing... link is twoway :) | ||
vcv-- | well whatever it is.. im going to get my hands dirty | ||
autrijus | wolverian: but that's reduction for lists | ||
theoretically you can also fold over trees | |||
Aankhen`` | Yeh, but in this case, Parrot is being linked into the Pugs executable, right? | ||
autrijus | or even function types! | 18:05 | |
svnbot6 | r3454, autrijus++ | * added a line of hint in Makefile.PL that says parrot.exe needs | ||
autrijus | Aankhen``: yes. | ||
svnbot6 | r3454, autrijus++ | to be placed in PATH for external parrot to work. Prompted by Aankhen. | ||
wolverian | autrijus: mm. right. | ||
autrijus: that page doesn't really say if mathematics generally consider reduce/fold to take a list sub or a binary sub, which was my point, I think. :) (put in perl6 terms) | 18:06 | ||
vcv-- | binary sub? | 18:07 | |
wolverian | vcv--: reduce { $^a + $^b } ... | ||
theorbtwo | wolverian: I don't think mathematics generally considers there to be much of a difference between a binary function and a general n-ary function. | ||
vcv-- | oh right | ||
wolverian | theorbtwo: right. :) | ||
Limbic_Region | yay - it appears to work | 18:08 | |
vcv-- | im surprised by how many terms i dont know that i see you guys on the p6 mailing lists use | ||
autrijus | foldl :: (a -> b -> a) -> a -> [b] -> a | 18:09 | |
foldr :: (a -> b -> b) -> b -> [a] -> b | |||
that's the two kind of folds haskell understands... both comes with a base case | |||
vcv-- | Then autrijus comes along with his Haskell and confuses me even more | ||
ninereasons | autrijus - stale reply: I wasn't sure whether it really was a bug, and that's why I was vague. But I'll work on being more expressive :) | ||
autrijus | ninereasons++ # cool | 18:10 | |
PerlJam | vcv--: why are you surprised? The denizens of p6l are always using obscure terms ;-) | ||
autrijus | vcv--: well, the haskell here in foldl is really quite straightforward :) | ||
vcv-- | Heh.. true. surprised isnt an appropriate word to use i guess | ||
Aankhen`` | Yey! | 18:11 | |
vcv-- | autrijus: yeah.. i just havent wrapped my brain around it yet. my brain doesnt like to learn with conventional methods. ill figure it out eventually :) | ||
Aankhen`` | autrijus++ # Thanks for adding that. | ||
autrijus | vcv--: its translation in Perl6 is somethinglike: sub foldl (&code<::a, ::b> returns ::a, ::a $head, ::b @rest) returns ::a | ||
vcv-- nods head | 18:12 | ||
autrijus | see the WhatIsaFold link above to see why it's defined like that :) | ||
Aankhen`` | "&code<::a, ::b> returns ::a" is specifying parameters and a return type for the code block? | ||
autrijus | yes. | 18:13 | |
Aankhen`` | Neato. | ||
Would that work in Pugs? | |||
autrijus | eventually. not yet | ||
Aankhen`` | (mine is still on `nmake`, I haven't even got to `nmake test` :-P) | ||
autrijus | we don't do quantified type parameters yet | ||
Aankhen`` | OK. | ||
autrijus | type variables, even. | ||
I'm not sure, in general, how it works in perl6. maybe everything is runtime checked ;) | 18:14 | ||
Aankhen`` nods like he understands. | |||
s/\.$/ the distinction./ | |||
autrijus | oh. the distinction is that whether it can validate the &code<Int> against something that is actually accepting an Int at compile time | 18:15 | |
PerlJam | autrijus: I don't understand how agressive perl6 will be towards type checking. | ||
svnbot6 | r3455, putter++ | eval_is()d [,] and [=>] in reduce.t. | ||
autrijus | PerlJam: oh, I think it will be checked. | ||
Aankhen`` | Ah. | ||
autrijus | I'm just not sure how early is the check. | ||
PerlJam: it looks like everything is until runtime. | |||
wolverian | autrijus: I think it might be &foo:(::a, ::b) nowadays, but it's underspecced, really. | ||
PerlJam | autrijus: sometimes I think it should check what it can at compile-time and defer everything else to runtime. | ||
autrijus | wolverian: yeah. | ||
Aankhen`` | Windows XP's Remote Desktop looks pretty neat. | 18:16 | |
PerlJam | But then, as you say, it looks like everything is runtime | ||
Aankhen`` | And really useful. | ||
vcv-- | Hm. I know there was talks of one guy wanting an IDE made specificall for Perl6. Maybe ill get myself into that. by writing it in perl6 of course :) | ||
autrijus | PerlJam: "everything it can" is looking liek not much, unless we apply mad inference-fu | ||
vcv--: nice | |||
Aankhen`` | Perl 6 will be all but impossible to parse. :-( | ||
Maybe you could just rip it out of Pugs though. ;-) | |||
autrijus | Aankhen``: that's actually the plan | ||
PerlJam | Aankhen``: It's a good thing we'll have perl6 to parse it! ;-) | ||
autrijus | just apply it to a regex. | 18:17 | |
vcv-- | im a gui nazi. thats my specialty | ||
autrijus | a rule, that is | ||
Aankhen`` | Oh yeah, I forgot... there's going to be a builtin grammar for it, isn't there? | ||
osfameron | and hooks! | ||
Aankhen`` | ExcellentxE9. | ||
Aankhen`` takes back his uncalled-for whining. | |||
PerlJam | Aankhen``: built-in, user redefinable, fully introspective grammar | ||
autrijus | and you can even derive that rule by pretty-printing the active "Perl6" grammar object from your current lexical scope! | ||
vcv-- | Aankhen``: i thought so too.. but the foundation of it is what makes it so simple yet powerful. i think its revolutionary :) | ||
autrijus | what a fix! | ||
putter | fyi, [=>] and [,] arent actually working, and [//] @array where my @array = (undef, undef, 3, undef, 5); nonterminates. | ||
osfameron is really excited about a refactoring browser as good as IDEA for Perl... | |||
osfameron actually slobbers a little | 18:18 | ||
Aankhen`` | I love pattern matching. | ||
I drooled when I read A05. | |||
Limbic_Region | ok - writing perlmonks journal entry now | ||
putter | that's as of r3453 | ||
vcv-- | autrijus already put reduce [] into action in pugs?? | ||
autrijus | Limbic_Region: url? :) | ||
vcv--: er, sure. | |||
pugs> [*] 1..10 | |||
3628800 | |||
vcv-- | you amaze me | 18:19 | |
PerlJam | vcv--: If you dream it, odds are autrijus has already implemented it ;) | ||
autrijus | thank you. | ||
&product = sub { &prefix:<[*]> o (&infix:<..>.assume(1)) } | |||
mmm pointless perl6. | |||
even more pointless than pointless haskell. | 18:20 | ||
and it's .assuming. | |||
(the use of lots of the "o" operator from fp.pm is called "point-free", aka "pointless", style.) | |||
putter | autrijus: re eval_scheme, it just so happens I have (most of a) scheme to p5 self-hosting transliterator... ;) | ||
autrijus | putter: oh wow! | 18:21 | |
vcv-- | How about a parrot to x86 assembly convertor? :) | ||
autrijus | there is HScheme, too | ||
which is why we can get eval_scheme for free | |||
PerlJam | vcv--: we call that a JIT ;-) | ||
autrijus | vcv--: it's already there :) | ||
it's a full ContT monad with call/cc support | |||
vcv-- | no way | 18:22 | |
so it would be possible to compile to a native executable with little to no overhead? | |||
autrijus | [not|autrijus]~/work/parrot/jit$ ls | ||
alpha/ arm/ hppa/ i386/ ia64/ mips/ ppc/ sun4/ | |||
vcv--: right, and you know, it's already there too! | |||
# www.parrotcode.org/docs/native_exec.html | 18:23 | ||
vcv-- | I'm at a loss for words | ||
PerlJam | vcv--: go on ... ask for something else that you think is far fetched! | ||
autrijus | (there is a reason why pugs is targetting parrot.) | ||
vcv-- | Perl: I got nothin'! | 18:24 | |
putter | re hscheme, looks like it has some hscheme.sourceforge.net/issues.php . community report lists it as "stalled"... | ||
Limbic_Region | autrijus - not done yet | ||
will post when it is finished | |||
autrijus | cool | ||
vcv-- | "This method wraps the VM runtime engine and a precompiled Parrot program into a single binary." | ||
aww..see..thats cheating! | |||
autrijus | but it's jited :) | 18:25 | |
PerlJam | cheating? I say it's all according to plan | ||
vcv-- | Maybe one day there will be true compiling with *no* overhead :) | ||
dont get me wrong, im happy with the JIT, its very impressive :) | 18:26 | ||
autrijus | vcv--: if you look for ansi C codegen, I don't think it's parrot's goal | ||
although you're certainly welcome to help out Pugs's _other_ backend, which can one day compile to ansi C with no runtime system :) | 18:27 | ||
(Perl6->Haskell->Grin->Jhc) | |||
vcv-- | That I will consider | ||
putter | given the Scheme's... err, minimalist standard, one really wants a scheme implementation factory class. thus, use Scheme::Guile;. otherwise snarfing code from the world is just too hard. | ||
autrijus | putter: you know my Inline::MzScheme? :) | ||
vcv-- | If not, I will possibly invest in some programmers who could do it | ||
autrijus | however you lose interop with other parrot languages. :-/ | 18:28 | |
putter | yes. 'fraid I havent used it though. | ||
Aankhen`` | Does a `grammar { ... }` declaration work? | 18:29 | |
autrijus | Aankhen``: no, not yet. | ||
Aankhen`` | Darn. | ||
putter | I should have said "use Scheme::Transliterating::Guileish"; One problem with the Inline:: naming scheme is that one might want Guile external common, Guile external dedicated, Guile internal common/dedicated, Guile compatibility package on other foo, etc. | ||
autrijus | I'm not sure qualified rules even work. | 18:30 | |
in PGE, that is | |||
vcv-- | `` isnt still system()? | ||
Aankhen`` | Qualified rules? | ||
vcv-- >> `...` is just my way of differentiating code from the rest of the text. :-) | |||
autrijus | /<Foo::bar>/ | ||
vcv-- | Ahh... ok :) | ||
Aankhen`` | autrijus >> Ah. | ||
autrijus | (which is what you normally want grammar for) | ||
Aankhen`` | Well, if grammars don't work... :-) | ||
vcv-- >> I tried |...| but then I figured since I'm using Markdown syntax for most stuff anyway, I might as well do it for code too. :-P | 18:31 | ||
autrijus | what do you want grammars for? | ||
Aankhen`` | |...| looks uglier anyway. | ||
autrijus >> groups-beta.google.com/group/perl.p...55a5a65b9f | |||
PerlJam | autrijus: that's just a subrule. subrules work. | ||
autrijus | subrule? | ||
oh. | |||
you mean if I install Foo::bar by qualified name. | |||
PerlJam | right. | ||
autrijus | but what if <bar> is called in the same grammar package? | 18:32 | |
oh. I need to tell PGE the things in scope. | |||
vcv-- | Aankhen``: i was looking at that. considered giving it a shot | ||
autrijus | and also initialise it with builtin rules. | ||
PerlJam: hey, you know if there's a list of builtin rules? if not, can you start assembling one or find people to? :) | |||
vcv-- | That XML parser doesn't involve DTDs though.. right? right? | ||
Aankhen`` | Heh, I got most of the productions converted already, vcv--. | ||
vcv-- | DTDs are the devil :( | ||
Aankhen`` | Well. | 18:33 | |
PerlJam | autrijus: I think Damian posted the beginnings of such a list to p6l once. | ||
Aankhen`` | I'm gonna check out some of the P5 XML parsing modules. | ||
PerlJam | certainly you can mine the As, Es, and Ss to find ones that are probably built-in | ||
autrijus | I'm trying to delegate :) | ||
PerlJam | I know, I just don't have time so I'm delegating back :) | 18:34 | |
autrijus | putter++ # notifying why | ||
Aankhen`` | You could start with the common ones -- <sp>, <ws>, <ident>, etc. | ||
And then add the POSIX rules -- <alpha>, <digits>, etc. | |||
autrijus | Aankhen``: can you be the delegate? :D docs/quickref/rules will be an excellent place | ||
just list the names | |||
putter | re grammars/rules... there is a great deal of red in the smoke... | ||
autrijus | with definitions if you can conjure up, otherwise leave a XXX | ||
Aankhen`` | Mmm, I'll try. | ||
You want the list formatted in any particular way? | 18:35 | ||
autrijus | Aankhen``: no, just the usual quickref format | ||
Aankhen`` | OK. | ||
autrijus | (minimal formmatting the way you see fit) | ||
Aankhen``++ | |||
Aankhen`` | BRB. | ||
autrijus | "grammar" is parsed now, btw. | ||
vcv-- | delegate something easy to me ;) | ||
svnbot6 | r3456, autrijus++ | * parse for "grammar", as suggested by Aankhen. | ||
PerlJam | Aankhen``: <ident> <null> <before ...> <after ...> are a few more I can think of right off but you'll have to check S05 or A05 for their defs | ||
autrijus | vcv--: sure... proofread docs/quickref and maybe add something into it | 18:36 | |
PerlJam | wait a second ... I may have a list in my notes from when A05 first came out ... | ||
PerlJam looks | |||
autrijus | vcv--: oh, are you not a committer? then give me your email and add yourself to AUTHORS | ||
as the first assignment :) | |||
vcv-- | whereat? | ||
theorbtwo | In alpha order by first name. | 18:37 | |
PerlJam | ah yes ... Aankhen`` look at the bottom of this page: lighthouse.tamucc.edu/ScottDuff/Perl6Apocalypse5 | ||
vcv-- | er.. which docs? | ||
theorbtwo | First "vcv--" Last (CPAN) utf-8 | ||
autrijus | or just "vcv" :) | ||
i.e. give me an address I can send invitation mail to; after getting the invitation, use the newly acquired password to check in to svn.openfoundry.org/pugs/ | 18:38 | ||
vcv-- | matt @ weakmind . org | ||
autrijus | the quickrefs are in docs/quickref/*; the AUTHORS file is in the base dir. | ||
invitation sent. welcome aboard! | |||
vcv-- | ok. thanks :) | ||
Limbic_Region | autrijus - www.perlmonks.org/index.pl?node_id=458728 | ||
Aankhen`` | PerlJam >> OK, shall I throw that into a quickref? | ||
PerlJam | Aankhen``: sure. | 18:39 | |
Limbic_Region | I also want to talk to you about the 5 possible bugs I found | ||
everyone is invited to join in the Perl6 challenge btw | |||
autrijus | Limbic_Region++ | ||
Limbic_Region | perlmonks.org/index.pl?node_id=458728 | ||
autrijus | Limbic_Region: sure. which 5? | ||
PerlJam | Aankhen``: Wait, you mean the URL or the stuff on the page? Better to put the stuff on my page in the docs so that people can hack on it. | ||
autrijus | (if they are made into failing tests, I'll get around to fix them sooner or latter) | ||
Limbic_Region | well - I say possible because I am not sure of behavior | 18:40 | |
autrijus | the map {=>} thing is not a bug. | ||
it's a misfeature. | |||
but I think it's gonna stay. | |||
sad but true... write {=>;} | |||
i.e. | |||
Limbic_Region | not sure I understand | ||
autrijus | map { $_ => $_; } | ||
Limbic_Region | my %hash = map { $_ => $_ }; #doesn't work | 18:41 | |
autrijus | map { $_ => $_ } @foo; # illegal | ||
yes. | |||
because that's like saying | |||
my %hash = map \%another_hash @array; | |||
Limbic_Region | ok - so -> $_ is necessary? | ||
autrijus | you can use a semicolon. | ||
PerlJam | autrijus: is {=>} related to [=>] ? ;> | ||
autrijus | my %hash = map {$_ => $_;} @array; | ||
that works. | |||
PerlJam: ;) | |||
PerlJam: <<=>>> | |||
Limbic_Region | my %hash = map -> $_ { $_ => $_ } @array; | ||
also works | 18:42 | ||
autrijus | yup but more verbose. | ||
both works | |||
Limbic_Region | ok - so the ; is the succinct way to go | ||
Limbic_Region is intentionally disqualifying himself | |||
when you define a sub parameter type - is there supposed to be any type checking | |||
autrijus | currently it's only used in MMD. | 18:43 | |
Limbic_Region | sub foo (Int $bar) { say $bar } foo( 'hello' ) | ||
autrijus | it will be used for coercion later maybe | ||
Limbic_Region | ok - so that IS an unimplemented feature then? | ||
iblech | Hmm... »=>« actually has a meaning (surprise! :)): my @array_of_pairs = @keys »=>« @values | ||
autrijus | i.e. coercing 'hello' into 0 | ||
Limbic_Region | right - fine by me | ||
autrijus | but I'm not sure when coercion stops and when castfail begins | ||
Limbic_Region | but leaving it as hello isn't the right thing | ||
autrijus | no it's not. problem is I don't know what righ things is | 18:44 | |
Limbic_Region | I thought it was the difference between Int and int | ||
autrijus | I asked on p6l | ||
Limbic_Region | 1 was allowed to be typecast but wouldn't remember (cache) result | ||
one was a flat out failure | |||
autrijus | Larry gave some sort of answer -- but I think it needs to be reraised | ||
AtnNn | how do you type << and >> on us layout? | ||
Aankhen`` | PerlJam >> Doesn't <ident> only match a character that would be valid within an identifier, not the whole identifier? | ||
autrijus | Limbic_Region: maybe you need to reraise that on p6l | ||
sub foo (Int $bar) { say $bar } foo( 'hello' ) # this | |||
Limbic_Region | ok - so I will hold off on #2 until we know WHAT to be testing for | 18:45 | |
autrijus | I don't think it's been answered before | ||
Limbic_Region | and will instead raise it on p6.l | ||
Aankhen`` | And don't worry, I am putting the stuff from the page in the quickref, not just the URI. :-) | ||
autrijus | Limbic_Region++ | ||
also ask (int $bar) :) | |||
Limbic_Region | right | ||
I intend to explain "my understanding was...." | |||
svnbot6 | r3457, iblech++ | Added the usual svn properties and EOLs at EOFs to the apparently unstoppable | ||
r3457, iblech++ | efforts of Stevan++ on ext/Perl-MetaModel/. :) | |||
r3458, iblech++ | Added a preliminary p6explain. | |||
r3459, ninereasons++ | add t/pugsbugs/unhashify.t | adding a pugsbugs test to demonstrate that when a hash ((key => 'val')) is passed to a sub, it becomes a List \((key => 'val')). | |||
ninereasons | a little more descriptive, autrijus ? ;-) | 18:46 | |
Limbic_Region | and then ask what the currently accepted behavior is | ||
iblech | AtnNn: <Compose> <Greater than> <Greater than> and <Compose> <Less than> <Less than> | ||
Limbic_Region | ok - on to #3 | ||
putter | Aankhen``: re <ident>, nope, see t/rules/Disabled/from_perl6_rules/stdrules.t | ||
Limbic_Region | it may have been fixed already | ||
Aankhen`` | Alright. | ||
Limbic_Region | 0 .. $foo - 3; | ||
PerlJam | Aankhen``: I think it matches a sequence of characters that would be valid in identifiers, but don't take my word for it, read the As, Es, and Ss, and ask p6l if there is a lack of clarity or consensus. | ||
Limbic_Region | that didn't do the right thing in the version of pugs I have that Jonathan compiled last night | ||
AtnNn | <Compose>? | 18:47 | |
Limbic_Region | 0 .. ($foo - 3); # was necessary | ||
it may have already been fixed though | |||
PerlJam tries to concentrate full on work. | |||
iblech | AtnNn: On Linux, you can declare some unused key to act as a compose key. Don't know about other OSes, though | ||
Limbic_Region: Already fixed :) | |||
Limbic_Region | in any case - the parens should not be necessary right autrijus? | ||
ok - so needs a test to ensure it doesn't get unfixed iblech ? | |||
or does it already have a test? | |||
autrijus | pugs> my $foo = 10; say 0..$foo-3; | 18:48 | |
01234567 | |||
I don't recall a test | |||
but when that was brokenm | |||
lots and lots of other tests fail | |||
iblech | No, there's no test for it currently, IIRC -- do you want to write it or should I? :) | ||
autrijus | like shortcircuit.t | ||
of course, more tests are always welcome | 18:49 | ||
Limbic_Region | iblech - even if I write it I can't commit | ||
so if you have the tuits | |||
iblech | Ok, will do | ||
autrijus | it looks like iblech is gifted with a rich supply of tuits :) | ||
Limbic_Region | on to #4 | ||
putter | Aankhen``: Damian uses <ident> in his recent useful capture post www.nntp.perl.org/group/perl.perl6....uage/20985 | ||
autrijus | ident ==> <\w+> | ||
also found in pge's demo.pir | |||
putter | yes. | 18:50 | |
Limbic_Region | pugs -e "my $i=3; my @array = 1..5; @array[ --$i ] ; say $i" | ||
that prints 1 for me and not 2 | |||
I have heard that it too is fixed already | |||
autrijus | but that gives numeric letter as valid ident | ||
Limbic_Region | but I am not sure about a test | ||
autrijus | it's 2 here. | ||
the great infix checkin last night surely broke a lot | |||
(it's still very much worth it) | 18:51 | ||
Limbic_Region | ok - so a test to ensure unfixing is in order? | ||
autrijus | sure | ||
Limbic_Region | ok | ||
last 1 | |||
autrijus | Limbic_Region: latest pugs btw -- autrijus.org/tmp/pugs.zip | 18:52 | |
just the .exe | |||
so quite small | |||
er, wait, wrong link. never mind that :) | |||
autrijus will regen | |||
Limbic_Region wasn't going to fix stuff up anyway | |||
autrijus | oh ok. | ||
Limbic_Region | that's what the contest is for | ||
autrijus | cool | ||
last one? | |||
Limbic_Region | while ( @combo = $next() ) { | ||
should I be able to do | 18:53 | ||
putter | Aankhen``: note that ScottDuff/Perl6Apocalypse5 is a bit out of date. eg, :u1 etc are renamed. | ||
Aankhen`` | OK. | ||
vcv-- | aw. the parrot makefile assumed i had perl in c:\perl\bin when activestate installed it in e:\perl\bin >:/ | ||
Limbic_Region | while ( @combo = sort { $^a <=> $^b } $next() ) { | ||
I ended up making the @combo = sort ... the first line of the while block as a work around | |||
18:55
_metaperl_ is now known as _metaperl
|
|||
autrijus | hm | 18:55 | |
putter | what is more critical path, metamodel or rules? | ||
Limbic_Region | ok - sounds like a good question to have asked | ||
svnbot6 | r3460, iblech++ | Added a test testing &infix:<..>, &infix:<...> and their precedence. | ||
autrijus | Limbic_Region: you should. that's a bug | 18:57 | |
not sure where the bugs lies, though. | |||
I'd appreciate a minimised test case | |||
Limbic_Region | autrijus - will do | 18:58 | |
actually - will write it in my journal tonight - might not get a test for it till tomorrow | |||
Limbic_Region is kinda burnt out | |||
autrijus | Limbic_Region: that's fine, take care! | 19:01 | |
svnbot6 | r3461, iblech++ | reduce.t -- Skipping a hanging test and unTODOed a now working test :) | ||
vcv-- | uh oh. nmake is stuck at: | ||
c1 : warning C4349: /Gf is deprecated and will not be supported in future versio | |||
ns of Visual C++; remove /Gf or use /GF instead | |||
putter | mugwump: ping | 19:05 | |
stevan | putter: I think rules is probably more critical now | 19:06 | |
(to answer a 10 minute old question) | |||
svnbot6 | r3462, ninereasons++ | t/data_types/hash.t, add tests after t/pugsbugs/unhashify.t, as an exercise against the bug demonstrated there, which changes a Hash into a List when passed to a sub. | ||
stevan | putter: the meta-model stuff may or may not end up being part of the perl6 port of perl6 | 19:07 | |
(probably not, at least is its current form) | |||
putter: however, that said, I would love for you to help on the meta-model. But I really see rule support as more important since without rules we cannot have a perl6 port of perl6 | 19:08 | ||
Aankhen`` | Anyone know the difference between :overlap and :exhaustive? | 19:10 | |
theorbtwo | "aaa" ~~ /a*/ gives aaa, aa (twice), and a (three times) with one, and only aaa, aa, and a with the other. | ||
19:11
_metaperl is now known as metaperl
|
|||
theorbtwo | (One requires unique starting positions, the other does not.) | 19:11 | |
Aankhen`` | Ah. | ||
Hrm. | |||
Subtle. | |||
Thanks. :-) | |||
putter | stevan: ok. thanks. I was thinking that autrijus sounded like he was in wait mode on classes for some level of progress on meta. meta as spec rather than meta as impl. | ||
vcv-- | Does anyone know where i can define the GHC path in the makefile for pugs? | 19:12 | |
stevan | putter: I dont think autrijus is waiting on it | 19:13 | |
autrijus | putter: oh, no, it's just I'm trying to avoid dup work :) | ||
stevan | LOL | ||
autrijus | I'm /wi36 | ||
er. | |||
ww | |||
anyway. | |||
autrijus ponders the sanity of maintaining 40 irc subwindows | 19:14 | ||
stevan | sanity-- | ||
theorbtwo | You are the west wing? | ||
autrijus | theorbtwo: hm? | ||
theorbtwo | ww = west wing. American TV show. | ||
vcv-- | stupid makefile! >:/ | ||
autrijus | so. where was I. yes, classes. I'm in bugfix mode for rest of this week | ||
so it'd be cool if next week I can avoid re-research and apply Perl::MetaModel back | 19:15 | ||
but if there's missing spots, I'll fill it up :) | |||
stevan | I think much of the Perl::* level stuff was actually just perl6 versions of Haskell stuff | 19:16 | |
vcv-- | odd. did a search for "assert_ghc" in all files in c:\source\pugs\ and nothing came up | 19:17 | |
autrijus | stevan: right, I'm thinking about Meta level | ||
stevan | autrijus: what parts are the most useful for you? I will try to concentrate on that | ||
autrijus | stevan: the Meta stuff, and in particular Role | ||
stevan is trying to use recursion with his methods too, to make it easier to backport | |||
autrijus | don't worry about that :) | 19:18 | |
stevan | autrijus: ok, I will work on the Role stuff then | ||
autrijus | I've got forM defined :) | ||
(and forM_) | |||
stevan | autrijus: I like recursion better anyway :) | ||
so much cleaner | |||
autrijus | cool :) | ||
putter | I was thinking meta-level isATypeOf, types and subtypes needed fleshing out... | ||
autrijus | recursion++ | ||
stevan | putter: I agree | ||
the isATypeOf was really just so support isa(Str) | 19:19 | ||
beacuse we dont have type dispatched multi-methods :) | |||
vcv-- gives up and throws computer out window | 19:20 | ||
autrijus | we don't? | ||
stevan | autrijus: last I checked we didnt | ||
autrijus | oh, we have typedispatched multisubs | ||
but not multimethods | |||
putter | are "hierarchical types" subtypes? they are type constrains, but I havent seen them refered to as such. | ||
stevan | see t/oo/methods/multi.t (i think) | ||
autrijus | is that the case? | ||
vcv-- | autrijus: Where can I define the GHC path for the makefile for pugs? its driving me crazy trying to find it :( | ||
autrijus | putter: I have no ida | ||
idea | |||
stevan | putter: I am not familiar with them,.. which Synopsis is it? | ||
autrijus | vcv--: GHC | ||
vcv--: just the GHC env | |||
putter checks... | 19:21 | ||
autrijus | or put them in PATH | ||
vcv-- | heh.. duh. thanks, im not thinking today. | ||
stevan | putter: if you want to work on the types stuff though, that would be very very very cool. | ||
Corion | Does anyone know if Tye McQueens idea of making require() return a factory was seen by @Larry ? (perlmonks.org/index.pl?node_id=424374) | ||
putter | S12.pod:=head1 Types and Subtypes S06.pod:=head2 Hierarchical types | 19:22 | |
autrijus | stevan: indeed | ||
stevan | Corion: nothingmuch kind of does something like that | 19:23 | |
his packages always return __PACKAGE__ instead of 1; | |||
AtnNn | pugs> [**](2,3,4) -> Internal error? | ||
Corion | stevan: Ah - I'd like to see that in Perl6, so I'll ask nothingmuch too ... | ||
stevan | produces a similiar efffect I think | ||
Corion | stevan: Basically, returning __PACKAGE__ is the minimum you need, yes. | 19:24 | |
Limbic_Region | autrijus et all - use.perl.org/~Limbic%20Region/journal/24776 | ||
will work on post to p6.l now | |||
Corion | (backlogging) - I build Perl with the free MSVC7 compiler, but I haven't built Parrot with it. Is there an all-in-one source package that I can try without investing any time other than "gunzip; untar; nmake" ? | 19:25 | |
stevan | putter: i see what you mean now | ||
Array of Array of Int | |||
stuff like that | |||
Implementation types look interesting too | 19:26 | ||
iblech | AtnNn: Thanks for reporting, fixed, committing in a minute :) | ||
AtnNn | :) | 19:27 | |
Corion | Gah. I'm teh stupid. I left in some unfinished patches from yesterday and now wonder why the build breaks ... | 19:28 | |
Limbic_Region | message sent | ||
vcv-- | Corion: you're the windows guy right? | ||
Corion | vcv--: "The" guy is a bit much, but yes, I use Windows (and try to make sure that Pugs works on Win32) | 19:29 | |
vcv-- | thats what i meant, sorry :p | ||
do you use vc6 then? | |||
Corion | vcv--: No, the free VC7 compiler | ||
theorbtwo | Corion doesn't give himself enough credit -- he's the guy. | 19:30 | |
Corion | theorbtwo: You forget gaal, he's doing much Win32 stuff too | ||
vcv-- | oh really? i thought they were saying it didnt work with the free vc7 compiler | ||
theorbtwo | I didn't realize gaal used win32. | 19:31 | |
vcv-- | or maybe it was linking parrot and pugs together? | ||
putter | stevan: I wonder just how costly typechecking may become... you call a sub of one argument, and suddenly your off crawling down a list of junction types with assorted pattern matching constraints... recursively... | ||
Corion | theorbtwo: gaal is trying to keep msys alive :) | 19:32 | |
stevan | putter: that is true | ||
svnbot6 | r3463, iblech++ | Fixed [**] and added a test for it, thanks to AtnNn++ for reporting. | ||
Corion | vcv--: Maybe Parrot doesn't work with MSVC7. I haven't tried Parrot yet. | ||
vcv-- | Yeah. autrijus said pugs wont link with parrot if you use the free vc7 compiler | 19:34 | |
which i was planning on seeing if i could figure out why in the near future | 19:35 | ||
Corion | ... maybe they just haven't tried Hard Enough :) | ||
... but I don't want to spend hours chasing down various libraries, just to find out that one of these libraries doesn't build. So I want an all-in-one package there ... | |||
vcv-- | Yeah | 19:36 | |
Limbic_Region find coding in p6 very draining | |||
vcv-- | You've never coded in c have you? :P | 19:37 | |
Limbic_Region | vcv-- very little | ||
but it really isn't p6 | |||
it is any language that I am unfamiliar with | |||
Aankhen`` | vcv-- >> It won't link even if you use the expensive paid version. | ||
Limbic_Region | c qualifies | 19:38 | |
vcv-- | Aankhen``: must..figure..out..why | ||
Limbic_Region does feel a sense of accomplishment after getting something running though (p6 or c) | |||
Aankhen`` | vcv-- >> sial.org/pbot/10245 | ||
vcv-- | the free version uses the asme compiler and linker.. just lacks the ide and various tools | ||
Aankhen`` | Apparently it needs a bunch of libraries which GHC can't find. | ||
The free version has version 1.50 of nmake. | |||
VS.NET 2003 has version 7.10. | 19:39 | ||
vcv-- | thats it? i could probably figure those errors out! | ||
Corion | Aankhen``: Wrong. Microsoft (R) Program Maintenance Utility Version 7.10.3077 | ||
Aankhen`` | The free version will die at some point while compiling parrot, saying that the command line is too long. | ||
Corion >> What's your point? | |||
Corion | (with my free version) | ||
Aankhen`` | Hrm. | ||
That's weird. | |||
I downloaded nmake and got 1.50. | |||
Corion | Aankhen``: Yes. That's the nmake you can download separately. | 19:40 | |
Aankhen`` | I also downloaded the toolkit. | ||
Corion | The free version of MSVC7 includes nmake 7.10 | ||
Aankhen`` | Still had 1.50... | ||
Corion | Aankhen``: You have the old one in the path then | ||
Aankhen`` | Perhaps. | ||
vcv-- | Yeah.. just checked. it does use 7.10 | ||
Aankhen`` | I think I was a little confused about paths at the time. | ||
OK. | 19:41 | ||
stevan | hey chromatic :) | ||
Aankhen`` | I stand corrected. :-) | ||
Well, sit, really. | |||
:-P | |||
chromatic | Hi there. | ||
autrijus | greetings chromatic-san. | 19:42 | |
chromatic | I have a Haskell-ish question. | ||
vcv-- | E:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\oldnames.lib | ||
right there | |||
autrijus | chromatic: I have a Perl6-ish question | ||
vcv-- | is that all that was wrong with the vc7 free compiler?? | ||
autrijus | chromatic: but you get to ask yours first :) | ||
chromatic | I was reading through t/oo/magical_vars.t last night and tried to add in $?CLASS support. It looked pretty easy, but I'm finding Eval.hs a bit confusing. I think I know where it should go, but the eval monad required to change the pad confuses me and I can't quite get it right. | 19:43 | |
It looks easy still; can I have a hint? | |||
autrijus | sure, you have 3 free hints | ||
Aankhen`` | vcv-- >> I have it too, but it is not found. | ||
autrijus | chromatic: it's in Eval.hs, you need to modify getMagical | ||
vcv-- | put "E:\Program Files\Microsoft Visual C++ Toolkit 2003\lib" in your PATH var maybe? | 19:44 | |
chromatic | Ah, I was looking at applyExp. | ||
vcv-- | -E+C | ||
autrijus | and it involves a constSym. | ||
that's all. | |||
Aankhen`` | It's in a different location, which is in the path. | ||
chromatic | Hm, I was considering refType of the invocant. Where can I look up the current class? | ||
autrijus | envPackage, surprisingly. | 19:45 | |
chromatic | Alright, let me find where that is. | ||
Limbic_Region would like to kick Rob (dragonchild) sometimes | |||
autrijus | but that is perhaps for $?PACKAGE | ||
Aankhen`` | autrijus >> Can I send you a first draft of docs/quickref/rules? | ||
autrijus | although I confess I'm not sure of the difference | 19:46 | |
chromatic | Is there no current distinction between packages and classes? | ||
autrijus | Aankhen``: er, you're not committer? | ||
Aankhen`` | No. | ||
vcv-- | thats definately odd Aankhen``. i dont even get to that part of the compile, or else id try to help more | ||
autrijus | Aankhen``: hey. your email please | ||
Aankhen`` | Do you think you could look over it once first, though? | ||
autrijus | chromatic: no, there is not, and I'm a bit unsure about how they interace. | 19:47 | |
chromatic: I mean, a class is a package, right? | |||
s/interace/interact/ | |||
but I need to ask my perl6 question ere I forget it | |||
chromatic | Go ahead. | ||
autrijus | in "Array of Int", the Array role is parameterised by the Int class | ||
stevan | mugwump was thinking that Class isa Package | ||
autrijus | or is it the Array class? | ||
but anyway, say I have a userdefined "Set" | 19:48 | ||
how do I specify it can be parameterised with "Set of Int"? | |||
end of question. | |||
chromatic | I don't think anyone's decided if Array is a class or a role. I'm not sure it matters. | ||
It probably should be a role, though. | |||
Is Set a class or a role? | |||
autrijus | is "Set of Int" the same as "Set[Int]"? | ||
chromatic | I *think* so. | ||
autrijus | I don't know, I'm merely asking what the "of" thing is operating on. | ||
then all containers needs to be roles | 19:49 | ||
parameterising over its element type | |||
vcv-- | Aankhen``: i just ran perl Makefile.PL; nmake; on my system and it worked fine... | ||
autrijus | (which is what Fortress does with its traits system) | ||
vcv-- | er wait | ||
Aankhen`` | vcv-- >> You had PUGS_EMBED set to parrot? | ||
And PARROT_PATH set to the location of a built source tree? | |||
vcv-- | yeah.. dont think so. lemme work on that | ||
Corion | autrijus: I have a Haskell / Pugs question, later :) | ||
chromatic | I don't think they *have* to be roles, but they just have to be parametrizable. | 19:50 | |
iblech | chromatic: Are classes parameterizable? Thought only roles can be parameterized | ||
Aankhen`` | How can you set the path that GHC looks in for .lib files? | ||
autrijus | chromatic: I think larry ruled classes never take type params. | ||
Corion | Aankhen``: -I or -i | ||
Aankhen`` | OK. | 19:51 | |
Er... no environment variable? | |||
chromatic | Ah, I didn't realize that. | ||
Corion | Aankhen``: Not that I know off. www.haskell.org has some documentation on it. ghc --help isn't helpful | ||
Aankhen`` | I'm looking at the docs. | ||
chromatic | I can't see it not operating on the Set then, Autrijus. | ||
vcv-- | Aankhen``: mind if i PM you and ask about following the same steps you did to see if i can reproduce the error? ive never tried to link parrot and pugs before | 19:52 | |
Aankhen`` | vcv-- >> Sure thing. | ||
chromatic | It's clearly making something more specific than an unparametrized Set. | ||
autrijus | chromatic: then how come Hash is only parameterised over one type | ||
and the other (key) type needs to be passed over another shape() trait? | 19:53 | ||
chromatic | Default behavior of a hash? I can only guess. | ||
autrijus | I mean, usually Hash is defined like this | ||
chromatic | @Larry[0] is the only one who really knows what he has in mind here, I think. | ||
autrijus | role HashTable[::KeyType, ::ValueType] {...} | 19:54 | |
but in perl6 it's like | |||
role HashTable[::ValueType] { does shaped; } | |||
(or is it?) | |||
anyway, it's really strange and I can't reason about it. | |||
I'll think about it some more before p6l'ing it :) | 19:55 | ||
chromatic | Yeah, I can't figure out why a normal hash needs shaping. | ||
autrijus | another quick question. say I want to implement ruby yield(). | ||
I know the coro syntax is still up in the air. | |||
but one can implement coro using cont. | |||
problem is, what is syntax for cont? ;) | 19:56 | ||
chromatic | callcc is definitely out; it's not ugly enough. | ||
autrijus | if neither are specced, I'll need to improvise. | ||
Pugs has &?CALLER_CONTINUATION | |||
but it's by definition an escape continuation | |||
chromatic | Yeah, but how great is the difference between a calling continuation and a return continuation? | 19:57 | |
autrijus | I'm not sure how to expose full cont, coro, or the like. | ||
there's none, that's why I chose the CALLER syntax | |||
it's clearer than &?CONTINUATION | |||
which is ambiguous | |||
&Continuation::CallCC | 19:58 | ||
chromatic | &?COME_FROM_CONTINUATION and &?GO_TO_CONTINUATION? :) | ||
autrijus | &Continuation::Shift | ||
&Continuation::Reset | |||
is not ambiguous either | |||
&Continuation::Yield | |||
so maybe go with that? | |||
chromatic | I do like yield. | ||
autrijus | with lower case anyway | ||
&Continuation::yield | |||
use Continuation <yield>; | |||
chromatic | That implies coros to me though. | 19:59 | |
autrijus | right, then we need to figure a way to mark a call as a coro call. | ||
Limbic_Region | my favorit subject | ||
autrijus | (or define the language such all call is potentially a coro call.) | ||
Limbic_Region | ;-) | ||
chromatic | I like the latter. | ||
autrijus | I understand that luqui dislikes the latter. | 20:00 | |
chromatic | He's young; he'll adapt. | ||
autrijus | ooh. | ||
wolverian | doesn't parrot give us that for free, too? | ||
Aankhen`` | How do I pass parameters to GHC using Makefile.PL? | 20:01 | |
chromatic | Nearly free, yes. | ||
Limbic_Region | autrijus - after further conversations with him, I don't think that is actually the case | ||
Luke sees a distinction between gather/take and coroutines | |||
the former being already defined (mostly) and the latter undecided on | |||
autrijus | Limbic_Region: er, yes. | ||
Aankhen`` | Nevermind, I think I found it. | ||
Limbic_Region | what he doesn't like about certain coroutine proposals is the mutability of arguments | 20:02 | |
chromatic | Hm, I can't seem to make envPackage work. Doesn't it need a getState call? But that's out of scope here. | ||
Limbic_Region | but some form of a coroutine he is fine with | ||
autrijus | chromatic: getState is only in parser monad | ||
chromatic: in Eval monad it's called ask | |||
Limbic_Region | or at least that's how I interpreted our last conversation | ||
autrijus | chromatic: you want | ||
asks envPackage | |||
the type of it is (Eval String) | 20:03 | ||
now try turning it to (Eval (Maybe Val)) :) | |||
chromatic | I have to modify envPackage now? | ||
Aankhen`` | Argh. | ||
autrijus | chromatic: hm? are you still in implementing $?PACKAGE ? | 20:04 | |
(and $?CLASS) | |||
Aankhen`` | I pass in a directory containing oldnames.lib to GHC but it still won't find the file. | ||
autrijus | chromatic: "asks" is a read-only operation | ||
chromatic | Just $?CLASS at the moment, but $?PACKAGE is almost free after that. | ||
autrijus | "asks envPackage" is defined as | ||
do { env <- ask; return (envPackage env) } | |||
chromatic | I have so far: | 20:05 | |
getMagical "?$CLASS" = constSym $ asks envPackage | |||
(Just guessing on the purpose of $ there based on other examples) | 20:06 | ||
iblech | chromatic: I think what autrijus meant was that you have to make $?CLASS return a Class (Just Val) object (or undef (Nothing)), not a String | ||
autrijus | right. but that doesn't work | ||
chromatic | Yep, big type errors. | ||
autrijus | see | ||
constSym :: String -> Eval (Maybe Val) | |||
asks envPackage :: Eval String | |||
you can't pass in a (Eval String) to a function expecting a String. | |||
wolverian | what on earth is an Eval String? :) | 20:07 | |
autrijus | you have to first turn that (Eval String) into a String. | ||
chromatic | Ahhh, I wish GHC showed the patterns it tried to apply on error. | ||
wolverian | (I still need to learn Haskell.) | ||
autrijus | wolverian: Eval String is something that calculates a string. | ||
wolverian: it's not a string; it's an action that, when performed, returns a string. | |||
you can perform an action using | |||
result <- action | |||
syntax. | |||
wolverian | autrijus: right. a promise? | ||
autrijus | so in chromatic's example here: | ||
do | |||
package <- asks envPackage | 20:08 | ||
constSym package | |||
will work. | |||
but it's maybe easier to write it as | |||
constSym =<< asks envPackage | |||
where =<< has this type: | |||
wolverian | hmm. I would want to inline the <- (being the perl coder I am) | ||
chromatic | Ahh, I tried to apply it too soon. | ||
wolverian | oh. neat. | ||
autrijus | (=<<) :: (a -> Eval b) -> (Eval a) -> Eval b | ||
that is, it accepts two actions | 20:09 | ||
performs the right one first | |||
then put the result to the left one | |||
returning its final result. | |||
(look at the a and b types) | |||
wolverian | that hurts my brain. | ||
iblech is happy as he had the =<< line in mind before autrijus typed it :) | |||
autrijus | of course, timtowtdi, so you can also write | ||
asks envPackage >>= constSym | |||
and it will also work | |||
as >>= has the type: | |||
(>>=) :: Eval a -> (a -> Eval b) -> Eval b | 20:10 | ||
chromatic | I kept thinking constSym had String -> String | ||
Aankhen`` | autrijus >> Shall I send the draft in the morning, then? | ||
autrijus | Aankhen``: what's your email? | ||
Aankhen`` | I /notice'd you. | 20:11 | |
[email@hidden.address] | |||
wolverian | autrijus: an (Eval String) is basically a Code returns Str? | ||
autrijus | I missed it | ||
wolverian: well yes. | |||
wolverian | autrijus: hmm. okay. thanks! | ||
Aankhen`` | G'night for now. | ||
autrijus | wolverian: but I'd be misleading you. | 20:12 | |
(Eval String) means, more formally: | |||
an action that, when performed | |||
may cause I/O side effects | |||
and/or cause STM transactions in memory | |||
wolverian | autrijus: right. but perl6 defaults the other way. | ||
chromatic | Eval is a monad? | 20:13 | |
autrijus | within which you can always look up things in your lexical (global) environment | ||
wolverian | (that is, you explicitly mark something as safe, not the as monad) | ||
(safe = atomic) | |||
s,the,, | |||
autrijus | and within which you can always invoke continuations to return early | ||
this action, when fully performed, gives you back a String. | |||
chromatic: yes. | |||
all Perl 6, as evaluated by Pugs, is in the Eval monad. | 20:14 | ||
there will also be CompilePIR and CompileGHC monad. | |||
the plan is to unify the three under a class | 20:15 | ||
so when you write | |||
asks envLexical | |||
in interpreter mode it looks up the lex in memory | |||
in PIR compiler mode it generates the neccessary opcode to retrieve lex pad | |||
and in GHC compiler mode it loads the current binding in topic | |||
etc. | |||
chromatic | Hmm, envPackage seems wrong here. | ||
autrijus | so the code in Eval.hs can be shared. | ||
chromatic: it's fit for $?PACKAGE | 20:16 | ||
chromatic | Definitely not for $?CLASS though; it's giving 'main'; | ||
autrijus | chromatic: $?CLASS likesly wants something else. maybe a test first? :) | ||
yeah, because it default to main | |||
chromatic | Let me fix up the $?PACKAGE tests in here and I'll commit the $?PACKAGE part. | ||
iblech | $?CLASS is already tests in t/oo/magical_vars.t | 20:17 | |
chromatic | Actually yeah. | ||
iblech | s/tests/tested/ | ||
autrijus | k | ||
chromatic | I don't know what the difference is between a class and a package; I don't know if there should or shouldn't be one. | ||
autrijus | and I'll make envPackage actually update when you call across package scope | ||
chromatic | Oh, okay. I'll add the tests then. | ||
autrijus | chromatic: hearing this from one of @Larry is alarming | ||
chromatic | It's a special array. | 20:19 | |
As the index increases, comprehension decreases. | |||
What's steeper than the inverse square? | |||
autrijus | threshold | ||
;) | 20:20 | ||
Corion | autrijus: I have rawSystem() die on me with something that is not an ExitCode but something else. How do I trap exceptions in Haskell? | ||
autrijus | Corion: catch | ||
Corion: see how tryIO is implemented | 20:21 | ||
and grep for catch | |||
chromatic | Hm, undeclared variable $?PACKAGE, but I can't find any declaration of $?CLASS in the parser. | ||
Corion | (I tried to make tryIO work, but it didn't) | ||
autrijus: Should tryIO work for me in that case? Or should I adapt tryIO to my needs? | |||
Corion hunts tryIO | |||
autrijus | chromatic: just commit the code you have first? :) | ||
(so I get to look at it) | |||
Corion: catch it yourself I think | |||
Corion: fallbcak to #haskell if you must :) | 20:22 | ||
chromatic | #3465 | 20:23 | |
autrijus discovers p6explain | |||
pugs> class Foo { method bar { say $?CLASS } }; Foo.new.bar; | 20:24 | ||
Foo | |||
as of r3465. | |||
svnbot6 | r3464, autrijus++ | * make envPackage actually update when entering a closure | ||
r3464, autrijus++ | defined in another package. | |||
r3465, chromatic++ | First stab at making $?CLASS and $?PACKAGE work. It compiles anyway. | |||
autrijus | chromatic++ | ||
"it compiles! it must work!" | |||
chromatic | It's Haskell. That's a good metric. | ||
theorbtwo | We have the option to warn when the impossible might happen turned off. | 20:25 | |
autrijus | theorbtwo: you mean -Wall? | ||
but GHC alone can make the impossible happen. | |||
"easy things are hard, hard things are trivial, impossible things just happen" | |||
chromatic | "... once you stop seeing type mismatch errors." | 20:26 | |
theorbtwo | -fwarn-incomplete-patterns | 20:29 | |
(OK, not turned off, but not turned on.) | |||
chromatic | Hmm, VCode has subEnv which carries the subroutine's package name, doesn't it? | 20:33 | |
autrijus | yes. | ||
chromatic: r3464 does that | |||
(have you synced up to r3464?) | 20:34 | ||
chromatic | Uhh, I might be at 3463. | ||
autrijus | please svn up and it will magically work. | ||
PerlJam | magic++ | ||
chromatic | What's maybe? | 20:35 | |
svnbot6 | r3466, autrijus++ | * bikeshed: align die() and warn() with perl5. | ||
autrijus | chromatic: ask ghci :) | ||
make ghci | |||
or just "ghci" | |||
maybe :: b -> (a -> b) -> Maybe a -> b | |||
:t maybe | |||
maybe :: b -> (a -> b) -> Maybe a -> b | |||
(the ":t" is how to ask ghci about a function) | 20:36 | ||
maybe takes three args | |||
a default case to use when the candidate Nothing | |||
a transformer to use if the candidate is Just a | |||
the candidate | |||
...and returns the applicable case. | |||
chromatic | Does the last case recurse? | 20:37 | |
autrijus | "maybe" does not recurse. | ||
if you want recursion, try "until" | |||
chromatic | Oh, I was reading it wrong. | 20:38 | |
Hm, now why does $?CLASS fail? | 20:39 | ||
Aside from the fact that it probably shouldn't be a string. | |||
autrijus | pugs> class Foo { method bar { say $?CLASS } } Foo.new.bar | ||
Foo | |||
is that not correct? | |||
(did you recompile?) | |||
chromatic: ok, I'll have it yield a Type object. | 20:40 | ||
chromatic | I *think* that's right. | 20:41 | |
autrijus | pugs> class Foo { method bar { say $?CLASS.ref } } Foo.new.bar | ||
Type | |||
chromatic | Can't find anything in AES about it though. | 20:45 | |
svnbot6 | r3467, autrijus++ | * $?CLASS is now a type. | 20:51 | |
r3468, iblech++ | * Added a test testing method references (t/oo/methods/ref.t). | |||
r3468, iblech++ | * Added the usual svn properties to ninereasons++ t/pugsbugs/unhashify.t. | |||
autrijus | g'nite! | 20:57 | |
autrijus waves & | |||
webmind | nite | ||
putter | 'night | 20:59 | |
svnbot6 | r3469, iblech++ | * Fixed t/oo/magical_vars.t. | 21:02 | |
r3469, iblech++ | * Made $?CLASS a Typoe object, too. | |||
r3469, iblech++ | * Added $?ROLE to Eval.hs (same as $?CLASS currently). | |||
r3470, iblech++ | Fixed [**] test. | |||
ingy | hola | 21:11 | |
brentdax | ?que tal? | 21:13 | |
putter | hey ingy. | 21:17 | |
ingy | hi putter | 21:18 | |
mugwump | ingy! | 21:20 | |
mugwump runs over and hugs ingy | |||
ingy | hi mugwump | 21:23 | |
stevan | hey mugwump, check out Perl::Meta::Compiler | 21:25 | |
it constructs and evals perl6 objects now | |||
Juerd | autrijus: How does the prefix ? operator in your journal's example not clash with Bool context ?? | 21:26 | |
stevan | Juerd: which one? | 21:27 | |
wolverian | Typoe object :) (re: r3469) | 21:28 | |
stevan | Juerd: I dont see ? defined in the journal, maybe the char is not displaying properly for you? | ||
putter | Juerd: fyi, autrijus bid goodnight 1/2 hr ago. | 21:29 | |
wolverian | same here. | ||
stevan | hey putter, want to talk Perl::Meta::Type? I have given up on $work for the day :) | ||
ninereasons | iblech, what is the procedure for adding those "usual svn properties" ? | 21:31 | |
Juerd | stevan: "?" | ||
stevan: Hm, has to be then :) | 21:32 | ||
stevan | Juerd: what sentence is it in? | ||
Juerd | Hm, yes, it's a non-ascii char :) | ||
stevan: It's an example of user defined operators, in a verbatim block. | |||
wolverian | I see infix:<Z> | 21:33 | |
(I mean, it looks like Z. in the newest journal.) | 21:34 | ||
ninereasons | the zorro operator | ||
wolverian | haha. | ||
putter | stevan: sure, though | 21:43 | |
iblech | ninereasons: (couldn't sleep...) it's: | 21:44 | |
putter | I'm not sure I know much more than I did earlier today. pursuing individual questions was too inefficient, so I started a "big sweep"... in progress. | ||
iblech | svn propset svn:eol-style "native" foo and | ||
svn propset svn:mime-type "text/plain; charset=UTF-8" foo | |||
stevan | putter: bug sweep of ? | 21:45 | |
Juerd: ping (a perl6 question if you have a moment) | |||
putter | AES, p6l postings, etc. | ||
stevan | putter: s/bug/big/ | ||
putter: ok | 21:46 | ||
ninereasons | got it iblech thank you. | ||
putter | Faster than pursuing stuff like "so, you define a subtype ST where { defined }. my ST @array. what is @array[0]?" ;) | ||
Juerd | stevan: pong | ||
stevan | Juerd: I am trying to make this code: | 21:47 | |
pugs -e 'sub i ($f, *@args) { $f(*@args) }; i(sub ($a, $b) { say "a: $a\nb: $b"}, 1, 2, 3)' | |||
print a: 1 b: 2 | |||
basically take flattened args,.. and then flatten them as I pass then to $f | |||
21:47
Odin_ is now known as Odin-LAP
|
|||
stevan | so that $f's params work | 21:47 | |
Juerd | Shouldn't that work as it is? | ||
stevan | is that possible? | ||
Juerd: that is what I thought :) | 21:48 | ||
it doesnt | |||
Juerd | I think that's a bug then. | ||
stevan | :) | ||
cool | |||
I will make a test | |||
putter | stevan: any idea?: "A role applied with C<does> may be parameterized with an initializer in parentheses, but only if the role supplies exactly one attribute to the mixin class:" | 22:02 | |
svnbot6 | r3471, Stevan++ | Splaty args dont seem to work well, which makes the method compiler trickier; this tests the error, i will work on a workaround for now | ||
stevan | putter: I have to read more about role paramters | 22:03 | |
I dont remember much of their details | |||
I assume too that any discussions we have will result in many p6l emails | |||
putter | ok. thanks. it seemed sufficiently bizarre to be worth ask about, rather than just adding to the pile for later. | 22:04 | |
cognominal | can someone explain the beginning of limbic_region journal? | 22:05 | |
stevan | putter: I will re-read S12 now actually, I need to really look over it in more detail than I have previously | ||
cognominal | why adding a semicolon at the end of a block makes a difference? | ||
iblech | cognominal: Because then it's surely a Code, and not a Hash | 22:07 | |
cognominal: { a => 42 } is a Hash | |||
cognominal: But { a => 42; } or { ; a => 42 } or -> { a => 42 } is a Code | |||
cognominal | oki. | 22:08 | |
that will surprise many people | |||
putter | k | ||
Khisanth | perl needs some other brackets for hashes and code blocks :/ | 22:10 | |
mugwump finishes catching up on the day's backlog, very interesting | 22:30 | ||
svnbot6 | r3472, Stevan++ | Perl::MetaModel - comming minor changes | ||
r3473, autrijus++ | * associativity-preserving reduction over left, right | |||
r3473, autrijus++ | and chain infix operators. | |||
r3474, autrijus++ | * allow addressing &infix:<**> by name. | |||
r3475, autrijus++ | * "left" == "pre" in reduce | |||
r3476, autrijus++ | * correctly implement chained ops like [>]. | |||
iblech | YAY! | ||
autrijus++ | 22:31 | ||
Khisanth | either the bot has a long delay or autrijus is coding in his sleep :) | ||
iblech | The bot has only a marginal delay, so he *is* coding in his sleep :) | ||
mugwump | must ... finish ... committing ... before ... daybreak.. | ||
iblech | :D | 22:32 | |
elmex | ... | ||
Khisanth | iblech: that explains his productiveness | ||
elmex | mygirlfriend++ | ||
svnbot6 | r3477, autrijus++ | * &reduce always reduce from left to right, unlike [..]. | 22:39 | |
r3478, autrijus++ | * [...] now evaluates its arguments in slurpy context. | |||
r3479, iblech++ | unTODOed the now suceeding tests of reduce.t, $autrijus++ for 1..Inf! | 22:56 | ||
putter | stevan: how goes? | 23:00 | |
mugwump: ping? | 23:04 | ||
svnbot6 | r3480, ingy++ | Perl 6 pragma for Perl 5 | ||
mugwump | hey | ||
putter | btw, I added, lets see, what was it... paramValueType and paramImplType to Perl::Param. A toe-in-the-water effort. Any feedback welcome. | 23:05 | |
mugwump | Did those symbols come from the Haskell source? | 23:06 | |
or did you just think they were needed :) | |||
putter | later. S mumble was rather explicit. | ||
s/later/latter/ | |||
not the right thing? | 23:07 | ||
mugwump | the idea was that those classes are what you would get out of introspecting the Haskell source | 23:08 | |
does that make sense? | 23:10 | ||
putter | ah. not right thing then. | ||
should have been in meta somewhere. | |||
mugwump | You are doing the right thing, but the names should be taken from the Haskell source where possible | 23:11 | |
putter | ah, ok. (adding note to README...) | 23:12 | |
mugwump | pugs is a prototype! so let's build the prototype Perl 6 Perl 6 compiler from the prototype Haskell Perl 6 compiler :) | ||
Hopefully at some point there will be enough code there that a massive arc of energy joins the Perl 6 and Haskell code bases together | 23:13 | ||
putter | ;) | ||
mugwump bzzzts | |||
putter | just Haskell? <putter looks dejected> I have grammars and sometimes runtimes for C, C++, Scheme, ... . Let's have a nuclear barbeque. | 23:14 | |
osfameron | and javascript? | 23:15 | |
mugwump | yes of course... because those languages fit somewhere in between the mathematical purity of Haskell and the irreverant linguistic chaos of Perl. They will be electrolysed in the process. | 23:16 | |
putter suddenly has images of electroshocking bacteria to get them to swap code. | 23:17 | ||
pugs/p6/parrot/whatever as linguistic membrane perforator... | 23:19 | ||
mugwump: nice metaphor. | 23:20 | ||
just how does one metamodel "A given enum value can function as a subtype, a method, or as an ordinary value (an argumentless sub)."? >O | 23:21 | ||
mugwump | That's a good question | 23:22 | |
that comment is from AST/Internals.hs? | 23:24 | ||
You see, usually when I've been working with metamodels, they have been fairly simple. Like, in T2 there are only four metaclasses - Class, Attribute, Method and Association | 23:26 | ||
putter | S12 | ||
mugwump | oh | ||
wolverian | T2? | ||
mugwump | anyway, I had a hunch while starting on this that the metamodel that can describe itself to the language level needs the typing stuff there too | ||
svnbot6 | r3481, putter++ | Removed some inappropriate attributes from Param.pm. Added clarifying note to README. | ||
putter | makes sense. | 23:27 | |
kelan | does map take adverbial blocks like grep? ie: %hash = map:{ $_ => $_ } @array | 23:28 | |
putter is a member of the church of Everything Should Be First Class. | |||
mugwump | so the fact that putting the metamodel into Perl 6 seems to be pulling the whole Pugs code base with it doesn't surprise me overly :) | ||
putter | :) | ||
mugwump | kelan: yes, that's right. But you look like you want a Set with that idiom :) | 23:29 | |
kelan | that was just an example from limbic region's journal | ||
he gave two other ways to write it, but left that way out | |||
just making sure he didn't leave it out on purpose and i was missing something | 23:30 | ||
knewt worries about crossing the streams | 23:32 | ||
*g* | |||
putter | kelan: I don't actually see a test case for map:{...} @array . Care to create one? :) | 23:34 | |
kelan | ive been thinking about asking for committer. how does it work with darcs? or can you only read with darcs and must use subversion for read+write? | 23:35 | |
or does darcs push work? | |||
putter | re, darcs, I'm unsure, but I believe it is ro. | 23:40 | |
re committer, we're in the middle of the ~4hr daily lull on #perl6. elsewhen, there are folks with committer committing bits... | 23:42 | ||
re map:{ $_ => $_ } @array ... hmm. are you sure mugwump? can adverbs be in the middle of an argument list? | 23:43 | ||
kelan | does no one who works on pugs live in the eastern time zone? its always weird hours in here | ||
mugwump | @array.map:{ $_ => $_ } would be how I'd write it | 23:44 | |
kelan | ah, maybe thats what im thinking of | ||
mugwump is in +12:00 | |||
So it's Friday! :D | |||
kelan | heh | 23:45 | |
must be nice | |||
putter | so to sum up, map:{ $_ => $_ } @array is not valid. @array.map:{ $_ => $_ } or map { $_ => $_ ;}, @array | 23:46 | |
kelan | well if it can't be in the middle, how about: %hash = map @array :{ $_ => $_ }; | 23:48 | |
revdiablo | seen Limbic_Region | ||
kelan | pretty weird lookin | ||
revdiablo | hmm, what bot is that? | ||
kelan | !seen kelan | ||
shrug | |||
mugwump | seen jabber? | ||
doh! | |||
jabbot, I mean :) | |||
revdiablo | [2005-05-18 04:18:52] * jabbot [gugod@irc.csie.ntu.edu.tw] has quit [Remote closed the connection] | 23:49 | |
doh | |||
putter | speaking of timezone... | ||
stevan: perhaps compare notes tomorrow? | 23:51 | ||
'night folks. | |||
svnbot6 | r3482, autrijus++ | * support I/O in Inline::Pugs. | ||
stevan | kelan: I am EST :) | 23:57 | |
kelan | yay! | ||
well | |||
edt? | |||
stevan | edt? | 23:58 | |
I am in eastern US | |||
kelan | its day-light savings time right now | ||
but there are parts of indiana that don't observe it i believe | |||
stevan | oh, I dont pay attention to that stuff :) | ||
kelan | hah | ||
stevan | kelan: where are you? | ||
kelan | nc | ||
stevan | mugwump: ping | 23:59 |