-Ofun: xrl.us/hxhk | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6 Set by apple-gunkies on 11 November 2005. |
|||
dduncan | hmm, it seems that some update broke Test.skip() ... looking ... | 00:28 | |
okay, I see that I used it wrong ... fixing ... | 00:42 | ||
fixed, commit pending ... it seems that Test or the parser was just more permissive before of a bad skip() call | 00:47 | ||
er, actually I think I had done this correctly | 00:54 | ||
mlh | dduncan: just continuing a discussion the other day .. (sorry for disappearing) ... | ||
dduncan | and Test or the parser may be in error | ||
mlh | is there a switch to treat "hello" + 3 as an error? | 00:55 | |
dduncan | I don't know, and I don't recall talking with you about it | ||
mlh | ok, thanks | 00:56 | |
dduncan | or maybe you were the one that tried to ?eval that ... | ||
and I said to use a ~ instead | |||
to produce what you probably wanted | |||
mlh | yes, that was me | 00:57 | |
dduncan | but I don't think we discussed treating that as an error | ||
in any event, I know of no such switch | 00:58 | ||
mlh | indeed, but i meant to but got diverted | ||
may i vote for one then :-) -- -a switch i mean -- because, for me at least, "string" + number would always be an error. | 01:00 | ||
dduncan | how about "3" + 4 ... is that an error? | 01:03 | |
or how about "3hello" + 4? | |||
now that I think about it ... | 01:04 | ||
?eval "hello" + 4 | |||
evalbot_8301 | 4.0 | ||
dduncan | mlh, actually there is an error in Perl 5 (which Pugs doesn't seem to do yet) when you turn on warnings | 01:06 | |
it says: Argument "hello" isn't numeric in addition (+) | |||
the program doesn't die, but you are alerted to this | 01:07 | ||
... I don't know for sure, but Perl 5's use fatal may make that die? | |||
mlh, are you there? | |||
wolverian | that's not an error, but a warning :) | ||
dduncan | yes it is, a warning | ||
wolverian | no, Fatal won't do that. | ||
dduncan | but how do I make pugs emit that warning? | ||
wolverian | larry talked about this sort of a thing on p6l in his latest post (or one of them anyway) | 01:08 | |
I doubt pugs has any warnings yet | |||
dduncan | what Larry said is that he didn't want use of undefs to be a fatal error, but rather a soft error, such as a warning provides | ||
by default | 01:09 | ||
that was his response to my "better undef handling" thread | |||
he was citing hardware input/measurements as an example for where soft warnings are good, so a plane doesn't refuse to continue flying if some components break/misbehave | 01:10 | ||
I'm not sure if that's the best analogy, ... | 01:11 | ||
but I've conceded to letting things stay as they are | |||
wolverian | come up with a better one :) | ||
dduncan | my problem was that the analogy didn't seem to fit with the problem I was describing | ||
I was talking about poorly written code, not airplane controls | 01:12 | ||
regardless, | |||
I've conceded that it is fine for the undef handling to remain as it is /how perl 5 does it | |||
meaning non-fatal | |||
at least we HAVE the warnings | |||
dduncan away for dinner | |||
mlh | dduncan: thanks, and sorry again -- went out for lunch | 01:23 | |
i think larry's justification is fine for dynamic 'continue flying' cases, but if it can be detected statically ( which i _think_ is the intention for p6) then making it fatal would be a good option | 01:35 | ||
clkao | bwaha, 80.58 % | 02:12 | |
obra | clkao++ # what was it? | 02:14 | |
clkao | nothing, just increased the cpu limit for the processes | 02:15 | |
obra | heh | 02:18 | |
dduncan | Anyway, I noticed that some recent change to the parser or such had resulted in a "skip('foo')" being interpreted as 'foo'.skip() rather than Test.skip('foo'); | ||
obra | which js backend does it use these days? | ||
dduncan | and that was a failure, since Str didn't have a skip() | 02:19 | |
clkao | i use --run=jspm --perl5 | ||
so it has perl5 support | |||
dduncan | while adding another, first argument (1,), caused it to work, Test.pm defines skip() as a multi-sub, and the older form should have worked | 02:20 | |
obra | jspm == Javascript.pm? | ||
clkao | ya. if you want to play with it, read the readme to find the fixed JavaScript.pm from my place | 02:21 | |
it actually has 80% coverage now! | |||
obra | nah. I'll crunch on my release | 02:22 | |
gaal | clkao: a few days(?) ago you mentioned you saw a failure when you called "use" in eval not on column 0, but I couldn't reproduce it. was it in main pugs? can you point me at a demo failure? | 05:47 | |
stevan_ | audreyt: ping | 05:53 | |
hello gaal | |||
gaal | hey stevan_ | 05:57 | |
audreyt: low prio, but could you look at r8298 and say if the new case where named args have Cxt annotations is desirable, or if indeed it's now the only form in which named args can come? (If the latter, I'll remove the old form to resist cruft accruing) | 06:05 | ||
stevan_: WALK* :) | |||
dduncan | gaal, I can tell you that when I used the latest pugs in interactive mode and said to 'use NotExists', pugs died, rather than just displaying an error and waiting for the next input, like it does when you say '$undeclared = 3' | 06:10 | |
I would think that pugs shouldn't die | |||
in this situation | |||
may or may not be related to what clkao was talking about | 06:11 | ||
gaal | dduncan: yes, that's a bug in interactive pugs that should indeed be fixed. | ||
it isn't what he's talking about though :) | |||
dduncan | on another matter ... | 06:12 | |
if all goes well, I should have a new working relational database implemented in perl within the next week | |||
the pugs native version may even work too | |||
then you won't have to link in perl 5 when making your first db using apps | 06:13 | ||
gaal | great! | ||
dduncan | however, I should emphasize this is a fully perl native self contained solution ... it is not something that talks to 'normal' databases | 06:14 | |
that will come later | |||
it should also help show how perl 6's new constructs make such an implementation easier than perl 5 does | 06:15 | ||
I think that gather/take would help with some manual-ish implemented ops like table joins and such, for example | |||
gaal | hmmm. I don't see why this interactive use is failing so hard. | 06:20 | |
audreyt: "use NoSuch" in interactive pugs fails. should Pugs.Prim.Eval's requireInc fail like op1 "die" does, with a shiftT and all that? | 06:22 | ||
ahhh, it isn't just in interactive mode. you can'y catch use errors in a stringy eval on the command line, either. | 06:23 | ||
gaal wonders how catchable errors at compile time should be encapsulated. and remembers he has to go to $work :( | 06:24 | ||
bye folks & | |||
avar | "I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, 'What is that, swearing?" -Larry Wall | 06:30 | |
07:01
kakos` is now known as kakos
|
|||
GeJ | greetings all | 07:12 | |
07:42
DesreveR is now known as r0nny
|
|||
audreyt | stevan_: r8308 should fix the instantiate_container problem -- please sanity check | 10:17 | |
(bbl) | 10:21 | ||
clkao | audreyt: got laptop? | 10:22 | |
gaal: i will figure out use problem a bit later | |||
audreyt | clkao: no... gotta wait till tomorrow noon | 10:31 | |
sigh | |||
kane_ waves at audreyt | 10:33 | ||
clkao | is taiwan turning like britian? it used to be fast! | 10:34 | |
audreyt | clkao: asus's so-called "royal" club is incredibly popular | ||
so popular that they placed cafe tables and chairs and free tea etc for people waiting to turn their laptop in | 10:35 | ||
clkao | ya. i went there and got things sorted immediately | ||
XD | |||
audreyt | average waiting time is 2hrs last weekend I went | ||
kane_: hey | |||
clkao | sucks | ||
kane_ | audreyt -- got a few mins to spare? | ||
clkao | seen the use jsperl5: stuff? want to make it sane? | ||
jabbot | clkao: I havn't seen the, clkao | ||
audreyt | kane_: yes I do | ||
clkao: sure do | |||
kane_ | audreyt -- check /msg (or did you not register? :) | 10:36 | |
gaal | hey :) | ||
kane_ | ah nm, here's fine too actually | 10:37 | |
it's p6 anyway -- audreyt, did you get a chance to think about the new proposed use syntax? | |||
audreyt | kane_: I didn't get msg | ||
but I did register already | |||
kane_ | maybe it's me... we'll keep it here :) | ||
audreyt | so, what use syntax? | 10:38 | |
kane_ | the one i showed you from the S22 draft like, a few weeks ago? | ||
audreyt | I thought I expressed that I'd like to use the pkgmgr information on the site | ||
instead of forcing people writing code to specify packages? | |||
kane_ | yeah, and then i said some stuff, and you replied and then you wanted to think about it :) | 10:39 | |
audreyt | ok... a few things | ||
you assume Foo::Bar will be distributed as Foo-Bar instead of inside Foo | |||
if it's inside Foo then one'd need to explicitly say | 10:40 | ||
use Foo::Bar from Foo; | |||
it strikes me as inconvenient... or did I understand it incorrectly? | |||
kane_ | heuristics can be applied, but essentially, yes | ||
you could make 'use Foo::Bar' resolve as 'from Foo::Bar' and then as 'from Foo' as logical alternaties | 10:41 | ||
but 'use Foo::Bar' from Zot is something one could never guess | |||
audreyt | so, in absense of pkgmgr info, I gree the fallback to Foo heuristics is okay | 10:42 | |
but we do have pkgmgr info, and it seems silly to discard it | |||
so maybe allow an explicit form | |||
and allow the pkgmgr to intervene if present? | |||
kane_ | well, there's a few hefty downsides by relying on the pkg manager | ||
audreyt | key here is that people often merge or split packages | ||
kane_ | like it doesn't know about homegronwn stuff, etc | 10:43 | |
audreyt | but why? supposedly anything you can turn into a .jib can become a package | ||
kane_ | so that wouldn't work, also the META.info must be 100% correct or modules won't be found etc | ||
audreyt | and it should be possible to generate a .jib fromnothing but a package name and a module file | ||
kane_ | and then register it somewhere? | ||
audreyt | on your system, yes | ||
kane_ | that sounds like a lot more work | ||
audreyt | but Module::Install::all_from does exactly that | 10:44 | |
kane_ | explain? | ||
audreyt | takes a .pm, figures out META.yml, writes it | ||
so you can install it and register in local package conf | |||
I mean, I don't think the system should stop working if pkgmgr is broken or nonexistent | 10:45 | ||
kane_ | but i dont see why we need all that extra work | ||
audreyt | so an explicit form to get stuff from pkg is clearly a win | ||
but if I have a Foo-Bar that provides Foo-Util-Bar | |||
I mean Foo::Util::Bar | |||
kane_ | according to perl naming policies, that's Evil btw ;) | ||
audreyt | mm. | 10:46 | |
it's sorta the norm though. | |||
kane_ | btw, the suggestion is to move the authority/version/etc requirements from the 'use' to the 'from' section | ||
note that 'use Foo-(\d)-($authority)' is hard to resolve, and is actualyl something package wide, not module wide | |||
audreyt | yeah, I grok that part, that part is sane | ||
kane_ | so i feel very strongly about elminating that mpaping overhead, while leaving the package manager out of it | 10:47 | |
audreyt | ok. so you make a few assumptions | ||
kane_ | and remember, in 90% of the cases, it'll do the right thing | ||
audreyt | 1. all modules in the package share the authority | ||
kane_ | by just saying 'use Foo::Bar' | ||
audreyt | 2. all modules in the package share the version of the package | ||
3. packages are named such that it forms the common prefix for all modules in it. | 10:48 | ||
kane_ | 1 for sure, 2 most of the time | ||
3 is an unspoken convention (not adhered to enough) | |||
audreyt | but if we are to ditch pkgmgr from the use line | ||
then all(1,2,3) becomes neccessary | |||
kane_ | not necessarily | 10:49 | |
audreyt | otherwise the author is forced to hardcode the package line | ||
kane_ | 1 is something i dont think can take much argument, so we'll take that as a given | ||
audreyt | why? | ||
kane_ | and the rules for resolution can be: | ||
audreyt | S11 thinks it's not a given | ||
and thinks each class in the same file can have idfferent uahotiries | |||
authorities | |||
kane_ | 'use Foo::Bar' to look for all Foo-Bar packages, then for Foo packages to lookfor lib/Foo/Bar.pm in them | 10:50 | |
version resolution can happen when the .pm is found | |||
then the package version and authority become rather pointless | |||
(re S11) | |||
as they add nothing except that the combination should be unique | 10:51 | ||
audreyt | mm, that assumes the constraint that a single file can provide only one "use" | ||
only one class, that is | |||
(as in perl5) | |||
kane_ | yup | ||
unless you want to compile /everything/ it's gonna be damn hard to change that | 10:52 | ||
(or you have a way?) | |||
audreyt | yeah, it's the one you deemed too heavy -- namely a pkgmgr that maintains a map from strong names of classes to packages they are in. | ||
I can argue both sides. your proposal is neat and enforces a clean state of expectations | |||
so fits the p6 spirit in general | 10:53 | ||
kane_ | it's possible, but it imposes a crapload of overhead on the compiler and the perl interpreter | ||
in KISS spirit i argue for 'from' | |||
(and thanks :) | |||
audreyt | a pkgmgr (as adopted by .NET CLR, Sun Fortress, Haskell, etc) is much more suited to complex interdependent compiled language with static and dynamic linking semantics | ||
kane_ | s/perl interpreter/package manager/ of course | ||
*nods* | 10:54 | ||
audreyt | which I suspect may become a part of perl6 as well. | ||
kane_ | we can change things though | ||
here's a thought | |||
audreyt | we could. and they really don't clash | ||
kane_ | if you dont let the .jib code deal with this, but let it worry about putting things in the right spot, maintaining deps etc | ||
audreyt | it's complementary -- the lightweight one is always good as fallback | ||
kane_ | we can have install hooks keep caches etc that the interpreter can use | 10:55 | |
audreyt | yes | ||
kane_ | and an explicit 'from' would dumb down the use statement to scan dirs | ||
where a clever 'use' might consult a cache | |||
audreyt | yes. | ||
kane_ | that works for me.. also means we can work on the simple version, and add the complex one if need arises | ||
audreyt | so, tell me... why "from"? | ||
why not | 10:56 | ||
kane_ | hmm? | ||
didn't quite get that ;) | |||
audreyt | use Foo::Bar p6-Foo-Bar-(ANY)-(ANY); | ||
or | |||
kane_ | so it reads like english | ||
audreyt | use Foo::BAR-p6-Foo-Bar-(ANY)-(ANY); | ||
kane_ | and it's a recognizable keyword | ||
audreyt | okay. another q | 10:57 | |
we used to have | |||
use perl5:DBI | |||
do you think it needs to become | |||
use DBI from perl5; | |||
use DBI from perl5-(ANY)-(ANY)-(ANY); | |||
kane_ | x:Y statements are fine, as long as you can clearly parse them | ||
i think the use statement should translate internatlly to | |||
yes, what you said | |||
p5:DBI might just be shorthand | 10:58 | ||
which is fine | |||
audreyt | use p6:Foo-Bar:1.13:cpan+kane:DBI; | ||
kane_ | they all work | ||
as long as it's unambiguous, i dont care about the syntax | 10:59 | ||
audreyt | cool, I think we are clear :) | ||
yup, just making sure it's really all part of pkg | |||
never part of module | |||
kane_ | exactly | ||
Foo::Bar version X still has meaning | |||
but a different one than Foo::Bar from version X | |||
(if you want it that way of course :) | |||
audreyt | I think per-module versioning and authority still has a meaning. | 11:00 | |
but it's okay to defer to package all the time for now | |||
if we need a reverse index from modules to files-in-packages,we can add one later | |||
KISS and all that. | |||
glad we agreed :) | |||
kane_ | right.. we just get semantics here... i think we can define it as 'from: tells you where to find a file that might match your criteria, use: lets you check the file against those criteria' | 11:01 | |
audreyt | so, what does it mean in a p5 context? | ||
nodnod. | |||
p5 context, as in multiversionning-for-perl5 as well as pugs's "use perl5:PKG:VER:AUTH:DBI;" line | |||
kane_ | we can make it strikingly similar to 'use only', but cleverer | 11:02 | |
but loading in 2 different versions of 1 pm at runtime and DTRT based on scoping is hard | |||
if @INC is tie-able, it'll be a breeze | |||
audreyt | @INC is coderefable | 11:03 | |
kane_ | not quite good enough | ||
unshift @INC... | |||
audreyt | I think we can at least reject 2 diff versions when it arises | ||
kane_ | i fully plan to let .jib work against p5 | ||
with the 'only' like semantics of course | |||
so you can use this PM instead of standard makefile.pl/build.pl if you wish | 11:04 | ||
and training CPANPLUS to cope isn't too tricky either | |||
audreyt | you can tie inc. | ||
kane_ | right, so you can say 'use perl6::packages' and have it Just Work | 11:05 | |
audreyt | I think it's easier to just override CORE::require | 11:06 | |
but timtowtdi | |||
kane_ | right | ||
that's implementation | |||
audreyt | also we really need a sane p5 yaml binding to syck | ||
I'll talk to ingy or maybe jfdi tomorrow | 11:07 | ||
kane_ | anyway, thanks for the few mins of clearing things up... it's clear for me what JIB needs to do, and i think it's clear for you on the pugs end too now :) | ||
clkao | tying inc was my plan | ||
kane_ | YAML.pm is working for me right now | ||
audreyt | yup, excellent | ||
kane_ | i've not found anything pathological that broke it in JIB code | ||
audreyt | kane_: it's not roundtripping to every other yaml implementation. | ||
pugs included | |||
so it clearly needs to go | |||
kane_ | right | ||
gaal | btw is there any reason to keep p5's require "filename-in-inc" semantics (as opposed to something like use Module)? | ||
kane_ | there's one 'gotcha' in the mixe though | 11:08 | |
audreyt | gaal: require "foo.ini" | ||
kane_ | let me grab the right section | ||
audreyt: we use this now: \[ ... ] # grouping | |||
which serializes to a perlref | |||
that's not portable to other languages | |||
audreyt | I see that | ||
gaal | audreyt: and that happens more often than require "Some/Module.pm" ? :-( | ||
kane_ | require-- # pure evil anyway | 11:09 | |
audreyt | gaal: I think we just adopt a certain sane person's Module::Load | ||
gaal | I wonder if we can't make both work | ||
audreyt | for require() semantics | ||
that sane person happens to be here, so feel free to chat :) | |||
kane_ | audreyt: if you have a suggestion for a token that serializes cross platform, i'm happy to hear about it | ||
gaal: i'm yours when i hit the office.. i'm late as it is :) | |||
kane_ office & | |||
gaal | haha! | 11:10 | |
audreyt | kane_: nothing from topofmyhead now... | ||
shower, bbiab | |||
gaal | kane++ # totally sane, indeed | 11:15 | |
audreyt decides to 1)sleep early and 2)go to asus and fetch laptop the first thing in the morning | 11:26 | ||
g'nite :) & | 11:27 | ||
gaal | night audreyt, i hope we can moose tomorrow your-afternoon my-morning | 11:28 | |
araujo | Good morning. | 11:30 | |
Ive got a kind of compromising question here :-) | 11:33 | ||
pugs will be used to bootstrap a perl6 implementation right? | 11:34 | ||
dada | that's the plan AFAIK | ||
but I don't think that's really compromising | 11:35 | ||
araujo | Ok, and, when this implementation gets done, will pugs continue under development? | ||
Well, i was referring to that latest question :-) | |||
gaal | araujo: this is a while off, but it certainly may | ||
dada | oh, this last one seems a good question | 11:36 | |
compromising, even :-) | |||
araujo | hah, i warned you ;-) | ||
integral | pugs is just for fun, hopefully no one will care if pugs becomes obsolete :) | 11:37 | |
integral hopes it does | |||
araujo | I dont programm in perl, but i do in Haskell ... ive wanted to take a look at the project | 11:38 | |
gaal | %implementations = ( c => { gcc => <free widely-available>, msdev => <visual-ide>, intel => <fast> }, haskell => { helium => <educational>, hugs => <interactive>, ghc => <production> ... }) | ||
araujo | And one of the reasons i asked this... To know if you had any plan maintaining a perl implementation in haskell after the bootstrapping. | ||
gaal | so we can certainly have perl => { pugs => <fun experimental>, some_other => <efficient?>, ...} | 11:39 | |
integral | "you" :) | ||
araujo | That's perl dialect which i don't understand, but i suppose it is a kind of hash :-) | 11:40 | |
gaal | yeah | ||
[ ("perl", [("pugs", ["fun", "experimental"]), ("some_other", ["efficient"])) ] | 11:41 | ||
:-) | |||
araujo | :-) | ||
gaal | at some point it may certainly become "fun" to make pugs "efficient" though. :-) | 11:42 | |
araujo | Nice. | ||
dada | my $pugs :fun :experimental; | 11:43 | |
avar | ?eval [ ("perl", [("pugs", ["fun", "experimental"]), ("some_other", ["efficient"])) ].perl | 11:45 | |
11:45
evalbot_8301 is now known as evalbot_8307
|
|||
evalbot_8307 | Error: unexpected "[" expecting program | 11:45 | |
avar | hah! | 11:46 | |
araujo | So you guys are all lambda-camel? ;-) | 11:47 | |
dada | ?eval hash( perl => { pugs => [<<fun experimental>>], some_other => [<<efficient>>] ); | ||
evalbot_8307 | Error: unexpected "h" expecting program | ||
dada | ?eval my %perl = ( pugs => [<<fun experimental>>], some_other => [<<efficient>>] ); | 11:48 | |
evalbot_8307 | {("pugs" => ["fun", "experimental"]), ("some_other" => ["efficient",])} | ||
dada | yep | ||
araujo: not all. I'm just a camel | |||
gaal | and me, I'm back from a short away. beginner lambdahead. | 11:55 | |
kane-xs pokes gaal | 11:56 | ||
gaal | dada: I think this should also work w/o the explicit listref: | ||
?eval my %h = ( key => <val1 val2> ) | |||
evalbot_8307 | {("key" => ("val1", "val2")),} | ||
gaal | because in p6 => is a pair constructor, and its right operand is in scalar context, etc. | ||
kane-xs: I like Module::Load! we should get its usage blessed by @Larry. | 11:57 | ||
the keyword can stay C<require> for all I care | 11:58 | ||
kane-xs | gaal: by all means.. i use it where i can.. i'ts More Sane | 12:00 | |
and the code is trivial, as i'm sure you've seen | |||
gaal | yes | 12:01 | |
no reason not to implement it in the parser. | |||
kane-xs | sounds like a fun haskell excersize | 12:02 | |
kane-xs blesses gaal | |||
gaal | ruleRequireDecl = do { symbol "require" ; module <- choice [ ruleVarName, ruleUsePackage ] ..... } | 12:04 | |
kane-xs: go for it :) | |||
kane-xs | no no, i already pushed the monkey onto YOUR shoulder :) | ||
gaal | okay, in that case you do the p6-l work. :) | 12:05 | |
kane-xs is doing the p6 package manager work | |||
EFULLOFMONKEYS :) | |||
gaal | okay okay, tonight when i get back from $work :) | 12:08 | |
oh, there already is a ruleRequireDeclaration | 12:09 | ||
this is indeed very simple to do. | |||
kane-xs | gaal++ # porting man | ||
gaal | kane-xs++ # porting perldoc # ha | 12:10 | |
kane-xs | i'll take the free karma :) | 12:12 | |
gaal | kane-xs: your input on the module load thread is welcome. | 13:04 | |
r0nny | re | 13:18 | |
kioto | hi all | 13:26 | |
what is the state of perl6 ? | 13:29 | ||
avar | pre-super-alpha-the-spec-isn't-even-finished-yet | 13:30 | |
xinming | audreyt: ping | 13:41 | |
gaal | hmmm, require perl5:DBI should be made to work just as use perl5:DBI works no? So ruleRequireDeclaration should be refactored away | 14:18 | |
rulePerlVersion now assumes stringy, lexical comparison of version numbers. Is this correct? | 14:25 | ||
should "require v6" (as opposed to "use v6") work? | 14:27 | ||
avar | muff | 14:46 | |
pugs has no printf() ? | 14:47 | ||
gaal | fumm | ||
avar: hmm. there's a sprintf. | |||
don't know why not a printf too. | 14:48 | ||
avar | pugs -e 'sprintf "%100000000000000", 1' | 14:49 | |
gaal | ouch :) | 14:51 | |
trym | someone needs to make mod_perl6 ;) | 14:56 | |
xinming | trym: mod_parrot is enough | 14:57 | |
trym | ooh.. didnt know it existed | 14:58 | |
xinming | trym: It's a project which is already started | ||
gaal | avar: the problem is in the underlying haskell implementation. | ||
trym | xinming: sweet. how far along is it? | 15:01 | |
kane-xs | gaal: i'm not on a mailing list for pugs -- if you got a link or so i'm hapy to reply | 15:18 | |
gaal | kane-xs: www.nntp.perl.org/group/perl.perl6....uage/24337 | 15:26 | |
kane-xs | gaal: sane post.. i'll try and keep an eye on the thread :) | 15:27 | |
stevan_ | audreyt++ # nice solution to the attribute issue :) | 15:37 | |
stevan_ removes it from the TODO list :) | 15:38 | ||
15:40
stevan_ is now known as stevan
|
|||
stevan is actually liking the mini-lang very much,.. who needs p6 ;) | 15:41 | ||
clkao | lol | 15:42 | |
stevan | I am starting to think that assignment, looping and anything other than function calls are *highly* overrated | 15:43 | |
pdcawley | The mini-lang? | 15:45 | |
stevan | pdcawley: yes, it is part of the new Object Space core design | ||
gaal passes stevan a Ī» | |||
pdcawley really should take a look at the object space stuff... | |||
How 'hooky' is it? | |||
stevan Ī».(gaal) | 15:46 | ||
clkao | home.clkao.org/~clkao/tmp/ | ||
stevan | hooky? | ||
clkao | test-good and bad-pil | ||
pdcawley | Well, one of the things I like about ruby is it's abundance of callback hooks for various things in the object model. | ||
clkao | the only difference is the first line being empty. | 15:47 | |
pdcawley | Callbacks on the parent class whenever it's subclasses, on mixins whenever they're mixed in anywhere, on classes whenever they have modules mixed in... | ||
stevan | pdcawley: yup, p6 will have this (if I get my way that is ;) | ||
pdcawley | Good oh. | ||
clkao | then the variable gets into different namespace! | ||
stevan | pdcawley: the idea is to have a core set of runtime types,.. the smallest set we can manage | ||
clkao | test.pl in the same directory. | ||
stevan | then audreyt wrote a mini-language to manipulate those types | 15:48 | |
we are then building the metamodel with the mini-lang | |||
pdcawley | The various container types and basic object, class, metaclass? | ||
clkao | gaal: any idea? | ||
stevan | nope | ||
pdcawley: lower level than that | |||
pdcawley | Okay. | ||
stevan | we make those things with the mini-language | ||
gaal | clkao: how are you invoking this, exactly? | 15:49 | |
pdcawley | stevan: And then, presumably, only to the point that you can start implementing extra behaviour in Perl 6 itself? | ||
stevan | pdcawley: this is somewhat old, but it shows the basic structure/layers svn.openfoundry.org/pugs/perl5/Perl..._Space.jpg | ||
pdcawley: yes, pretty much | 15:50 | ||
although the mini-lang is exclusively within the runtime,.. and not exposed to the user-land yet | |||
but I have thoughts on bridging that gap | |||
pdcawley | It's definitely worth taking a look at Squeak here... | 15:51 | |
stevan | yes, I have been :) | ||
pdcawley | Heh. | ||
stevan | smalltalk & CLOS are my two favorite object models :) | ||
pdcawley | I've never managed to wrap my head around CLOS, mostly because I've never really tried. | ||
stevan | and I intend to shoehorn as much of both into P6 before I am done :) | ||
pdcawley: I suggest the book "The Art of the MetaObject Protocol",.. it is execllent,.. even if you never end up programming in LISP | 15:52 | ||
araujo | Smalltalk rul3z | ||
:-] | |||
pdcawley | It would probably be interesting to take a look at what the smalltalk VM provides; I don't have the book to hand though. | ||
stevan | there is a copy of the blue book online,.. I have the brown one right here next to me | ||
users.ipa.net/~dwighth/smalltalk/bl...p_toc.html | 15:53 | ||
pdcawley | As you are possibly aware if you read my blog, I've been doing most of my programming in Ruby, which is a jolly nice language and all, but I'm feeling the gravitational pull of Smalltalk more and more... | ||
stevan | pdcawley: we are thinking of moving to ruby at $work as well ... at least until p6 is done :) | ||
pdcawley | Indeed. It's a much cleaner (and, importantly, concise) OO language than Perl 5, but I find it rather lacking compared to what I know is coming in Perl 6. | 15:54 | |
clkao | gaal: ./pugs -Iext/Test/lib -CPIL | ||
/tmp/test.pl | |||
pdcawley | Dammit, I *like* the autovivification magic that Sigils give me. | 15:55 | |
clkao | compare the output for the /tmp/test.pl with and without the first blank line | ||
stevan | pdcawley: p6 is much more multi-paradigm-ish,.. and it has MI and MMD :) | ||
gaal | clkao: ahh, okay.. because with with normal pugs it did work. ok, looking. | ||
clkao | because foo gets declared into Test:: namespace in jsbackend | ||
pdcawley | I'm less than convinced of the desireability of MI in the face of Roles. But MMD doesn't suck. | ||
clkao | iblech suspected it's pil bug | 15:56 | |
araujo | I also like pretty much Smalltalk , now you talk aboit OO, will p6 implement OOP? | ||
clkao | er, buggy pil | ||
stevan | pdcawley: quite true, however, with C3 MRO,.,. MI becomes much more sane | ||
araujo: p6 will be all OO | |||
pdcawley grins, "I have objects, I have first class functions/closures and I have continuations. If I need anything else I can roll my own paradigm" | |||
araujo | stevan, Interesting. | ||
stevan | araujo: just about everything you touch in p6 will, on some level, be an object | 15:57 | |
pdcawley: quite true :) | |||
araujo | stevan, something like... ruby? | ||
stevan | araujo: ruby++ if you will ;) | ||
araujo | I mean, at the conceptual level.... | ||
Cool. | |||
pdcawley | araujo: Yeah, but with a more perlish feel to it | ||
araujo | stevan, I used (use sometimes) programm in Smalltalk | ||
Best OO language ive ever found out there | 15:58 | ||
Though.. there doesn't exist a serious and well-integrated implementation for unix-like system :-( | |||
Something very bad. | |||
stevan | araujo: I have never programmed in it much myself, I tend to sit back and appreciate it like the great work of art it is :) | ||
araujo | *free software* i meant. | ||
It is. | 15:59 | ||
stevan | araujo: Squeak? | ||
pdcawley points out that Squeak used just to have blocks that weren't closures and objects but it was implemented in itself, so someone managed to implement first class continuations in it by monkeying with the way the interpreter handled its control stack. | |||
araujo | I tried several times to look at ruby.. but i don't know... i didn't find my way around it. | ||
stevan, you mean the implementation available? | |||
pdcawley | araujo: I found that if I think of it as 'perl with better objects' I tend to fall off it slightly, but if I think of it as 'watered down smalltalk' I get along with it much better. | 16:00 | |
stevan | araujo: is there no Squeak implementation for your platform of choice? | ||
araujo | yes, Squeak is good, but it doesn't fit into unix :-( | ||
stevan | pdcawley: that is a good way to look at it actually :) | ||
araujo | One of the biggest advantages and, (ironically) disa-advanatages of Smalltalk, is the fact that it is a whole OS. Or at least it tries to emulate it. | ||
pdcawley, really?, that sounds nice. | 16:01 | ||
pdcawley | Yeah, you can't easily write the kind of glue you write in Perl/Ruby in Squeak. | ||
araujo: The ruby way is heavy on blocks and stuff. | |||
araujo | yeah :-( | ||
pdcawley | But less good on things like the smalltalk Collection suite. | ||
araujo | To develop in Squeak, means not going out from Squek. | ||
Pretty much the same for most of the ST implementations. | 16:02 | ||
pdcawley, I agree. | |||
pdcawley | You're pretty much limited to Array/Hash/Set <=> OrderedCollection/Dictionary/Set | ||
araujo | the collectors are very weak in ruby compared to ST. | ||
pdcawley | *everyone*'s collections are very weak compared to Smalltalks. | ||
stevan | pdcawley: AMEN to that ! | 16:03 | |
araujo | hah | ||
pdcawley notes that the new Perl 6 signatures mean it's going to be easier to write code that looks like smalltalk method selectors... | 16:04 | ||
Which is nice. | |||
stevan | yes, quite true | ||
stevan was always jealous of that | |||
pdcawley | $thing.at(1, :put<bar>) | ||
araujo | pdcawley, really? | 16:05 | |
oh | |||
$thin is an object? | |||
pdcawley | Yeah. | ||
araujo | Interesting :-) | ||
araujo didn't expect perl6 was taking this way | |||
pdcawley | You can now specify internal and external names for arguments. | ||
stevan | the method would look something like this: method at (Int $index, +$put) { ... } | 16:06 | |
pdcawley | So internally you use your handy dandy type suggesting argument name, but you give it a meaningful name for the client context too. | ||
stevan | although my named arg syntax might be a little behind | ||
araujo | Im not involved with perl at all... i used it for some scripots yeras ago, but that was all. I programm in haskell, and now ive found interesting the project because of it, now i see that perl has changed very much in this new version. | ||
pdcawley | Stevan: You can also do (syntax rusty): method at (Int $index, :put<$an_object>) | ||
If memory serves. | 16:07 | ||
stevan | pdcawley: your the summarizer,.. I just skim p6l mostly these days | ||
pdcawley | What blows my mind about the changes is how much of the language is unchanged, just with all sorts of extras if you want them. | ||
There's going to be an awful lot of p5 scripts that come over with only cosmetic changes. | 16:08 | ||
araujo | I see. | ||
pdcawley | But idiomatic Perl 6 will probably look very different from current idiomatic Perl 5. | ||
gaal | clkao: this also happens with -CPugs | ||
still don't know why it happens though. | |||
araujo | Well, the language specification is still being designed right? | 16:09 | |
pdcawley | Yes, sort of. | ||
An awful lot's been nailed down and at the 'dotting is and crossing ts' stage of the game. | |||
Other stuff is still up for grabs. | 16:10 | ||
araujo | i see | ||
pdcawley | I don't think we'll be seeing any big syntactic changes between now and Perl 6.0.0, but stranger things have happened. | ||
The promised macro system means that if anyone wants big syntactic changes they can have 'em, they just have to implement them first :) | 16:11 | ||
araujo | hah | ||
stevan chears for LISP style macros | 16:12 | ||
araujo | a macro system, Ć la lisp? | ||
stevan | araujo: that is currently the plan | ||
araujo | that'd be nice. | ||
stevan | very :) | ||
pdcawley | Well, the entire Perl 6 grammar's going to be available as a set of rules. | ||
So you define a macro by adding/overriding rules in the Perl 6 grammar. | 16:13 | ||
Or, if you feel like it, you can replace the Perl 6 grammar with something else entirely. | |||
stevan | clisp.p6grammer ;) | 16:14 | |
pdcawley | use Compiler 'Scheme' :{(def ...)} | ||
Ferinstance. | |||
Actually, more like: | |||
araujo | pdcawley, that's cool. | ||
pdcawley | use Inline 'Scheme' | ||
sub foo (...) { ... } | 16:15 | ||
araujo | So i suppose you could re-define things like operators, clauses etc? | ||
pdcawley | scheme (...) | ||
Whatever you like. | |||
As Larry says "All's fair if you predeclare" | |||
clkao | gaal: but how come it works properly :p | 16:16 | |
gaal | clkao: the outputs for -CPugs are very different! I have no idea what's causing this :-( | 16:26 | |
clkao | subName = "&Test::foo" | 16:36 | |
gaal | yes, i mean what in the parser might trigger these different interpretations | 16:39 | |
stevan | audreyt: ping | 19:25 | |
buu | Did anyone fix the svnbot? | 19:45 | |
svnbot6 | r8308 | stevan++ | PIL/Native/Bootstrap.pil | 20:22 | |
r8308 | stevan++ | - setting the attributes correctly based on audreyt++ solution to | |||
r8308 | stevan++ | the instantiate container issue ... | |||
r8308 | stevan++ | - some misc. comments | |||
20:37
kakos is now known as kakos|away
|
|||
svnbot6 | r8309 | stevan++ | PIL/Native/Bootstrap.pil | 23:02 | |
r8309 | stevan++ | - simplified CREATE using -> {}.do_for() | |||
r8309 | stevan++ | - added a &WALKCLASS based version of CREATE for | |||
r8309 | stevan++ | when the dispatcher is working correctly | |||
r8309 | stevan++ | - converted BUILDALL to use -> {}.do_for() as well | |||
r8309 | stevan++ | - commented out the &WALKMETH version for now | |||
r8309 | stevan++ | - cleaned up some of the Bootstrapping code | |||
r8309 | stevan++ | - added SEE ALSO section in the POD to point to the | |||
r8309 | stevan++ | p5 prototypes of the MetaModel and ObjectSpace | |||
r8309 | stevan++ | t/pil/metamodel.t | 23:03 | ||
r8309 | stevan++ | - adding some tests for creating new classes, and then | |||
r8309 | stevan++ | creating instances of that class. This tests the new | |||
r8309 | stevan++ | BUILDALL/BUILD functionality | |||
23:03
stevan_ is now known as stevan
|
|||
stevan is a karma whore ;) | 23:04 | ||
audreyt: I would like to discuss the dispatcher with you when you return | |||
stevan off to dinner (be back in ~2 hours) & | |||
obra | seen audreyt | 23:07 | |
jabbot | obra: audreyt was seen 11 hours 40 minutes 47 seconds ago | ||
Juerd | audreyt: Is your journal no longer maintained? | 23:09 | |
Or am I looking in the wrong place? |