The Return of the Journal : pugs.blogs.com/ | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6
Set by stevan on 23 December 2005.
sky seen audreyt 01:37
audreyt sky: pong 01:55
"comped"?
obra "given a complimentary" 01:56
audreyt oh. nope... I chose typepad mainly because sky and miyagawa are there :) 01:57
obra nod :) 02:00
audreyt and also because obra is not in the business of Blifty blog hosting :) 02:02
mm, blifty.{net,org,com} is all open 02:03
obra heh
my demo blog app is still too trivial
and will wait until i figure out how to abstract the authentication magic
also, dispatcher 02:04
audreyt nod 02:05
need more tricks in Jesse's Insane Form Transforming Yoga
obra hehh 02:07
audreyt continuations and regions and selective form->action->model interactions does sound like yoga to me 02:08
and the "insane" part is indisputable as well
obra I'll give you that
stevan__ obra++ # Jifty looks very nice 02:10
02:10 stevan__ is now known as stevan
obra yay! 02:11
it's still very beta
and wants love
but hopefully it will get your love
stevan the "full stack" part was what convinced $coworker :) 02:12
he has been bugging the catalyst crew for that ever since he got the rails book
obra heh 02:13
stevan obra: I will surely get some lovin from us :)
obra is keeping track of which sorts of buzzwords attract which sets of people ;)
stevan :D
stevan "continutations" was what sold me 02:14
and the REST stuff too
I need to dig into the form handling more ,... it sounds really cool too
obra that was my big original concept 02:15
and it worked out really well
audreyt I think demasonizing the dispatcher will attract another set of people
rather large set too, considering TT2's audience
wolverian yes, please :) 02:16
obra so, I still want the dispatcher to end up falling through to serving a tree of templates, whatever the template engine 02:17
And yes, I'd be thrilled to see good patches that let jifty use TT2 as an alternative
stevan likes TT, but has never used Mason so has no opinion yet 02:18
actually I care very little about my template engine, as long as it can do all the things I need (which I am sure Mason can) 02:19
obra nod. 02:20
the common complaint about mason is that perl is its domain language
stevan well I know in Rails, eruby is the same way ,.. and people seem to have taken to it 02:21
I think it brings up thoughts of ASP and PHP development for some,... which is understandably not a good thing 02:22
wolverian I just don't like perl in templates. templates are messy enough without it.
(domain specific languages)++
stevan wolverian: but why is the TT language really that much different? 02:23
wolverian it looks like ruby :)
stevan :D
audreyt and also it's minimal like your favourite minilang :)
stevan ponders a Jifty::Template::MiniLang module 02:25
audreyt thinks stevan is insane
stevan thinks?
audreyt otoh, compiling minilang to perl5 takes very few lines
stevan I would think you would know that by now
audreyt given your previous Perl6-ObjectSpace 02:26
stevan :)
audreyt I dreamed (literally) of compiling minilang to native haskell code using GADT to precompute method bindings
I've been dreaming strange things lately ;)
stevan I was dreaming about vObj the other night
audreyt very nice 02:27
I think I'd like to finish up YAML::Syck and PGE::OPTable port today 02:28
wolverian I dreamt I was a elephant. that was very, very strange.
audreyt and then turn to minilang dispatcher 02:29
stevan: so still in $thinking phase about roles?
obra audreyt: I'd like a perl one first ;) 02:30
or minilang ala jifty::dbi::schema
stevan audreyt: nope, in implementation mode now
audreyt stevan: ooh cool
stevan I am just going to add a way to handle "requirements"
for things like role Foo { method bar { ... }}
audreyt wolverian: it could've been stranger... such as dreaming that you were 2+ elephants at once
stevan and for method conflicts
wolverian audreyt, hmm, yes. have you dreamed that? :) 02:31
audreyt stevan: 'k. let me know if you need support from underlying level 02:32
stevan audreyt: will do,.. I think I should be good though 02:33
I am commiting private method functionality right now
audreyt wolverian: at one time when I had fever, I dreamed I was a dreamer and the dream itself at once in parallel
that was quite strange
s/and/and also/ 02:34
stevan currently it just adds to %!methods until you get the dispatcher part working, then you can change them to add to %!private_methods
wolverian audreyt, wow. I just dream about crabs attacking me when I have a fever.
stevan audreyt: do you have any thoughts on adding types to the mini-language? 02:36
avar You have the most funky dreams when you have a high fever
i.e. fever to the point of you being in delirium 02:37
svnbot6 r8438 | stevan++ | PIL/Native/Bootstrap.pil 02:38
r8438 | stevan++ | - added support for private methods, still needs work on the
r8438 | stevan++ | dispatcher end (in Haskell) for full proper support
r8438 | stevan++ | t/pil/metamodel/*
r8438 | stevan++ | - fixed all instances of . which should actually be `
avar Is there a particular reason why perl makefiles have a PL extension instead of pl ? 02:42
audreyt stevan: you can use private methods now 02:46
stevan: first-class types-as-value would work
stevan: why do you plan to use it? 02:47
stevan audreyt: re: private methods ... really? 02:49
svnbot6 r8439 | audreyt++ | * PIL.Native.Eval - recognize %!private_method in dispatcher
r8439 | audreyt++ | as well. not yet distinguished between $obj!meth and $obj.meth though.
stevan :P
audreyt: so how does it work? does it use the MRO?
stevan reads the haskell source 02:50
audreyt stevan: r8440 02:51
I gotta run... bbl 02:52
stevan ok
svnbot6 r8440 | audreyt++ | * private method calls should not consider MRO nor install &?NEXT. 02:55
avar the only application that loads my computer more than ghc is phpdoc 03:32
svnbot6 r8441 | avar++ | * Does a character codepoint (\x..) evaluate to the same thing as its literal?, nah-ah in pugs 6.2.10 03:37
dduncan I don't recognize %!private_method , unless that's just because all attrs implicitly have methods
stevan dduncan: %!private_methods is a mini-language thing 03:39
it is part of the metamodel
dduncan okay
stevan it is an attribute of the ::Class object 03:40
dduncan: unless you want to hack the metamodel,.. you will never encounter it 03:41
dduncan I hear that!
?eval ::Foo; 03:46
03:46 evalbot_8436 is now known as evalbot_8441
evalbot_8441 ::Foo 03:46
dduncan ?eval class Bar {} ::Bar; 03:47
evalbot_8441 \Class.new(("name" => "Bar"), ("traits" => ("Object",)))
dduncan ::Foo;
?eval ::Foo;
evalbot_8441 ::Foo
dduncan this appears to be wrong 03:48
class Foo was never declared
oh wait
I am seeing some differences in my pugs ... could have to do with state maintenance between requests 03:49
superficially, it appears that after declaring any class, referencing the name of any other class, those not declared, returns true, or "{obj:Class}" to be specific
those same undeclared class refs returned undef before the unrelated class declaration 03:50
this is seen when running ./pugs on the command line
a related question of mine ... 03:51
luqui dduncan, I'm trying to reproduce this
can you give me a sequence of commands to execute?
dduncan yes, just a minute
wolverian isn't :: still the 'class that isn't yet declared' sigil? 03:52
luqui uh... kinda
Larry recently killed the ^ type sigil, reviving :: 03:53
so maybe that's not what :: means anymore
luqui doesn't remember, but thinks that Larry addressed the issue
dduncan here's a simpler case
1. ::Foo;
2. class Bar {}; ::Bar;
3. ::Foo;
do that on a freshly opened Pugs
if pugs is open, quit and reopen first
line 1 returns undef 03:54
line 3 returns {obj:Class}
note that the ::Bar; on line 2 is important for line 3 to return somthing different than line 1
luqui <lwall> The problem that worried me (about wanting to refer to a type that 03:55
will exist but hasn't been declared yet) does not arise often in
practice, and can be solved with a symbolic ref in any event, or
by predeclaring a stub type.
wolverian oh. so what's :: now?
luqui type sigil
wolverian ah. thanks
luqui dduncan, try omitting those semicolons
wolverian ::$(Foo) is the symref?
er, s/$//, I think..
luqui ::('Foo') maybe... 03:56
wolverian right. thanks again :)
luqui I'd prefer class Foo {...} Foo
man, that {...} thing is really starting to bug me
wolverian heh.
dduncan okay, that version treats Foo as a sub and fails
wolverian in this case it is a bit bugging
but usually you don't need to write stubs except when you want the ... to be visible 03:57
dduncan in any event, the actual problem I want to solve is, how do I test whether a package (not a file) has been loaded or not, so I can just conditionally 'require' it
luqui dduncan, omitting the *semi*colons, not the colons
dduncan oop,
luqui pugs interactive is flaky with regard to semicolons. It ends up ignoring various things 03:58
when in doubt in pugs interactive, never put a semicolon at the end of a line
dduncan will try to remember that
luqui thinks he should get that fixed
dduncan okay, leaving out the semis showed some useful info 03:59
will try to make use of it in code ...
luqui in response to your "actual problem"... I have no idea 04:00
dduncan I noticed in pugs interactive mode
that the result of the non-declared ::Foo had a ref of ::Type 04:01
whereas, the result of declared ::Bar had a ref of ::Class
this might do what I need
need to test more though
luqui that may just be a bug 04:02
dduncan may be
diotalevi Does pugs do threading?
luqui diotalevi, uh huh
diotalevi This is the "#pugs" place, and not actually perl6, right?
luqui yes
well, perl6 too
diotalevi Why is it called #perl6 then? 04:03
luqui because perl6 spec and pugs implementation are tightly interrelated
it would be a pain to have to think about where each question belongs
diotalevi Cuz people have told me that this is where to go to talk about pugs but that it isn't the place if I have other non-pugs perl6 stuff.
luqui and the same people would be in both channels anyway
diotalevi, no, it's fine in both cases 04:04
diotalevi oh ok.
luqui (though writing to perl6-language is generally more appropriate with perl 6 language stuff, because that's where the design team is listening)
diotalevi so was that "uh huh" to threading sarcastic or does it actually have threading support? 04:05
Can I run anything interesting on this thing yet?
stevan diotalevi: see examples/ 04:06
all are runnable
t/* has about 10,000 tests (most of which run too)
ext/* has many ported modules, almost all of which has their own test suites too
luqui diotalevi, pugs really does do thread
s
stevan diotalevi: to quote luqui,.. "uh huh" ;) 04:07
diotalevi Sweet.
Can I run perl5 stuff on pugs? 04:08
luqui diotalevi, you can use perl 5 modules
wolverian you'll still need perl on your system.
luqui use perl5:DBI; # etc
stevan diotalevi: there is a perl 5 bridge between the two, although it has some quirks IIRC
diotalevi zowie.
How about stuff that cares about perl5 optrees? Does that stuff still work? 04:09
luqui uh no
I mean, I'm not sure what you're talking about without an example
but any tricky stuff will probably not work
diotalevi I'm the maintainer of a few B:: modules and author of several more. Nothing "tricky," that doesn't use documented interfaces. 04:10
luqui ponders use perl5:Perl6::Attributes
;-)
well, pugs interprets itself, it does not convert itself to a perl5 optree
(well, I guess the perl5 backend does ;-)
diotalevi so when pugs runs perl5 code, does it launch a real perl5 interpreter or emulate one? 04:11
luqui launch
diotalevi sweet. Then it should DRT.
luqui see, I wasn't sure what you meant by "cares about optrees"
dduncan luqui, thanks for your help
whether based on a bug or not, I found a solution 04:12
diotalevi oh. do you know what optrees are?
luqui yes
dduncan the expression ::($module_name).does(Module)
luqui but the definition of "cares about" was a little vague
dduncan, interesting
dduncan returns true if the module is loaded, and false if not
diotalevi yeah, cares about is vague.
luqui I was thinking like optimize.pm
dduncan so I'll checkin a Locale::KeyedText with the relevant bug fixed in a moment ... 04:13
diotalevi actually... anything that cares about those is already in bed with the interpreter.
sky hmm 04:14
clkao sky 04:15
stevan audreyt: ping 04:16
luqui: wanna hack some haskell for me :) 04:17
luqui stevan, just a moment, then yes
stevan its simple stuff,.. I just can't get the damn type sigs to match up
cool
luqui stevan, mmkay 04:19
ready'
stevan luqui: so I am looking to add delete to the mini-lang's hash type 04:20
it should work fine with Data.Map.delete
but I can't get the types to match up in PIL/Native/Coerce.hs
class IsPlural needs a proper signature 04:21
and I am not sure what that should be
then it needs to be added to the instance on line 106
but that part is easy ( I think) 04:22
luqui should be
stevan and it doesn't need to do in place delete,.. it can just return a new map
which I what Data.Map does anyway (i think)
luqui haskell has no idea what "in place delete" is anyway ;-)
stevan yeah I figured :) 04:23
luqui (well, you could do it within STM monad)
(but naah)
stevan I dont need ti anyway
it can just return the copy
luqui in "IsPlural", the variables are:
"a" - the type of the thing that's being declared plural (map in this case) 04:24
svnbot6 r8442 | Darren_Duncan++ | r1604@Darren-Duncans-Computer: darrenduncan | 2005-12-25 20:22:01 -0800
r8442 | Darren_Duncan++ | /ext/Rosetta-Incubator : in KeyedText.pm, updated template_module_is_loaded() so it works correctly under current Pugs, though whether it is due to a specced or unspecced or bug is unknown
luqui "key" - keys; "val" - values
so the delete function should take a map and a key and return a new map with that value deleted, no?
stevan yes
a -> key -> a?
luqui yeah... well key -> a -> a probably 04:25
(it's convention in haskell to end signatures with a -> a)
(so that you can curry them to a mutator)
stevan ok
luqui but audreyt doesn't seem to be following that convention here 04:26
so you should probably do a -> key -> a
stevan it compiled!!!!
luqui coolness 04:27
you realize that you have to implement delete for all the other Plurals, right?
stevan yup
luqui (which could be an error message)
stevan it warned only
but I am putting in stubs to throw errors 04:28
luqui wait -- what does splice do?
stevan :)
probably exactly what I want delete to do :P 04:29
luqui except it takes an Int
stevan yup, and it is not assigned as in Prims.hs
luqui it looks like it drops the first n elements of the container 04:30
splice is a pretty bad name for that...
stevan yeah tail would be more approriate I think 04:31
or rather,.. my usage of it... would be better expressed as &tail
luqui well, "tail" and "drop" are taken by the prelude
stevan cause all I ever do is splice(1)
luqui (not that you can't hide those.. but they're useful, and it's a pain to hide them) 04:32
luqui wonders what Data.Seq is 04:33
stevan eak! Data.Map.delete takes a Map as it's arg 04:38
luqui uh huh? and?
oh 04:39
no, that looks fine
stevan it barfs all sorts of errors now though
luqui did you change the sig to a -> key -> a ? 04:40
stevan deleteAt looks promising maybe
yes I did
luqui that's the problem
stevan knows that
luqui Map.delete :: key -> Map -> Map
so you need to flip Map.delete's argument order to make it match
using none other than the "flip" builtin, which does precisely that!
:-)
stevan ok
where do I put that? 04:41
luqui delete = flip Map.delete
stevan nevermind I see
horray,.. we have compilation
and it works too :) 04:42
muchas gracias luqui
luqui de nada
ugh... learning a new instrument is so hard! 04:45
luqui cringes at his own violin playing
stevan can only play "Smoke on the Water" on violin 04:46
luqui better than me
luqui tries
stevan you just reverse the way your hands would go on a guitar since its tuned by 4ths instead of 5ths
luqui and you do it with a bow... 04:47
stevan ah
nah
strumming
luqui oh, I sound a lot better strumming than bowing
stevan its a power chord,.. you can't bow a power chord :P
luqui you can bow a double stop
and a power chord only has two notes anyway
the biggest hardness about the violin is that it has no frets 04:48
so everything sounds off key
stevan that takes time
luqui yeah. and I want to be a virtuoso NOW, damnit!
stevan I used to play a lot of fretless bass (electric, not standup) and it just took some time to get your hands trained 04:49
luqui bows smoke on the water
using double stops. Gee, that was fun.
stevan most good players can hear if they are off,.. so they quickly slide up/down to compensate
stevan got extra credit in figure drawing class for being able to do that once :)
luqui I can hear it too... and I slide up/down to compensate
"quickly".. not so much
by the time I compensate, I'm out of bow 04:50
:-)
stevan :D 04:51
stevan gives himself "roles with proper conflict handling" for a chirstmas present 04:52
luqui Coolness! (stevan xx 100)>>++
stevan and if all the other tests pass I will share it with everyone else too
of course I can't die in the mini-lang...
so I just don't include it 04:53
luqui actually thinks that's almost the right way to go
stevan I am considering returning a list of conflicts
you need to call &resolve on the class to get all the roles to flatten into it
luqui thinks, at first glance, that the best way to do it is to replace the method with a die "conflict in these roles" message
stevan well,.. yes and now 04:54
no
luqui it would be nice to catch it at compile time
stevan that would work, but it differs the error until runtime,.. this should be detectable at compile time
or at the very least class composition time
luqui has to think about this 04:55
stevan if &resolve returns a conflict object, that should give the next layer up enough infomation to decide what is best
in other words,.. just punt to the next layer :)
luqui we have to think in terms of interfaces
stevan aka - make audreyt handle it
luqui when role A does role B, that means that if you conform to A, then you automatically conform to B 04:56
I think that's the metric that needs to guide our conflict handling
stevan no, you are thinking something else
luqui ?
stevan if A has method &foo and B has method &foo,.. they are in conflict
luqui I know 04:57
stevan however, that is irrelevant until class C does them
luqui if A does B and A does C, then implementing A must implement both B and C
stevan yes
luqui if B and C have a conflict, then that must be resolved by whatever implements A, or by A itself
stevan yup
luqui say that A doesn't resolve it... 04:58
that method gets added to the interface of A
(the necessary interface, that is)
and if the class doesn't implement that method, then it doesn't conform to A
that makes the most sense to me
of course, we should fudge the error messages 04:59
to point to the conflict in B and C, not the fact that the class doesn't do A
stevan yes, correct on all accounts
luqui okay good
stevan the conflict between B and C is undiscovered until the class tries to consume A 05:00
luqui well... not "undiscovered", but "unreported"
stevan yes
luqui I've been thinking about scoping and roles a bit 05:05
but it's very fuzzy, so bear with me
an object would have a "view role" 05:06
stevan is very "fuzzy" at the moment anyway (long day)
luqui only methods in that role could be called on the object
other methods would pretend not to exist
stevan downcasting
luqui yeah... something like that 05:07
stevan this is fairly common Java thing
luqui but in Java "pretend not to exist" means "refuse to compile"
maybe that's what it means in static perl too
anyway, that's precisely how to handle private members
and the readonly-ness of attributes 05:08
stevan MyInterface a = (MyInterface) collection_iterator.getNext();
luqui that's an upcast, isn't it?
casting from Object into something more specific?
stevan oh,.. well yes, in this case your right
luqui but I think we're on the same page 05:09
stevan but since it was probably some object which implements MyInterface, then ... well you get what I mean
I was actually thinking about this too
that really the user should only ever interact with Roles
luqui anyway, to handle these things, you'd have:
svnbot6 r8443 | stevan++ | PIL/Native/Coerce.hs
r8443 | stevan++ | - added delete to IsPlural class, and appropriate instances
r8443 | stevan++ | PIL/Native/Prims.hs
r8443 | stevan++ | - added delete to the mini-lang's {} primative
r8443 | stevan++ | PIL/Native/Bootstrap.pil
r8443 | stevan++ | - added remove_method, remove_private_method and
r8443 | stevan++ | remove_attribute to ::Class
r8443 | stevan++ | - fixed ::Role.resolve so that it properly detects and removes
r8443 | stevan++ | method and attribute conflicts. Need to talk to audreyt++
luqui class Foo { has $.foo; has $!bar }
becomes
svnbot6 r8443 | stevan++ | about how I should return the conflicts so that errors can
r8443 | stevan++ | be thrown appropriately
r8443 | stevan++ | t/pil/metamodel/*
r8443 | stevan++ | - added role_conflicts.t to test basic role conflicts
r8443 | stevan++ | - added some more tests to roles.t
luqui role Foo { method foo() {...} } role FooImpl { does Foo; method foo() is rw {...} method bar() is rw {...} } 05:10
and the class would be created from FooImpl. Inside the class, it would see itself as FooImpl, but outside, everything would see it as Foo 05:11
which doesn't have the "rw" accessor for the foo attribute
stevan yup 05:12
I was thinking something very similar
luqui the private member might be something different though; it should have a different scope than the public methods
stevan and we get autogeneted accessor conflict resolution for free
luqui but there's something a little tricky
stevan I discussed this on p6l a while back
luqui the reason I wanted $.foo to mean method call is so that you could override attributes on behalf of your ancestors 05:13
because you know better than they do
and that's all dandy... except what happens when your ancestor *writes* to such an attribute?
that hardly makes sense in the above model 05:14
stevan do you have a use case for that?
a real world one
I would think that if you wanted to override attribute
luqui for which?
stevan you would have to seek out all the places it is used,.. and override those methods
luqui which isn't cool...
stevan but that really breaks stuff 05:15
cause your sub class now behaves differently
very diff
luqui well, my use case is that I create accessors for all my attributes when I create classes
so that my subclasses can do that
stevan yes 05:16
luqui and we already know that attributes autogenerate accessor methods
and everything is virtual, so those accessor methods can be overridden
but then when the ancestor writes to his attribute, it is simply ignored
which kinda seems like the wrong thing to m
me
stevan ignored? 05:17
luqui yeah; the outside world doesn't see his change
if he uses his own accessor method to get it back, his change hasn't happened
it hasn't even been considered by the subclass
stevan accessor methods are virtual too
luqui I know. but the rw part of them is not 05:18
stevan ah
interesting
ok
so if I override it with just r, then there is an issue
luqui yeah. especially since $.foo is the self-call syntax.
you can't tell the difference between writing to the underlying attribute and to its accessor (which I think is a step in the right direction, actually) 05:19
stevan well that has to desugar into something,..
luqui so it would seem that subclasses don't derive from the public role, but from the private impl class
which seems wrong...
stevan no
luqui no what? 05:20
stevan because the subclass has a different relationship than the user of the class
stevan is reminded of a cool paper on composable encapsulation policies for Smalltalk
luqui oh, and I don't have a use case for this weird rw stuff, because I have a tendency to write value types
i.e. constant classes
is it called "composable encapsulation policies"? 05:21
:-)
because I found that paper
stevan something like that yeah :)
luqui reads 05:22
I'm glad that I'm finally thinking aloud about this
stevan yeah thats it
stevan googled composable encapsulation policies and found it
its by the same people who did the original Traits paper
well, while I like the $.foo desugaring into a method call,.. I think it may be problematic 05:23
luqui neato
stevan now that I think about it at least
because of exactly the example you made
luqui right. but before we abandon it, I'd like to work through it
stevan the body of a method needs to have access to the innards of self
luqui because every other OO language uses the "autogenerated accessor" technique (most of the time without the "auto" part) 05:24
stevan in a way which is more permissive than the code *outside* a methods body does
luqui sure, thus Foo & FooImpl roles
you can still call $.foo an accessor, as long as the innards see the rw version and the "outards" don't
"information hiding is not necessarily an essential component of encapsulation." I like this paper already. 05:25
stevan yeah its a good one 05:26
ok,.. I have to sleep,..
read the paper,.. and we can continue this later
luqui excellent 05:27
nite
stevan actually the way to do this would be to make Foo the role,.. and FooImpl be a class 05:28
classes would have no notion of rw, or auto-generated accessors, etc
the Foo role would do all that
then your subclasses just deal with the class version
but the users always deal with the role version 05:29
luqui basically what I was saying above, that subclasses do FooImpl 05:31
oh wait
"then your subclasses just deal with the class version" 05:32
how? can you still override attributes?
stevan yes 05:33
luqui but classes have no notion of rw...
stevan yes
it is always rw
for classes
luqui oh. yeah, so basically what I was saying above. 05:34
stevan but $.foo does not desugar into self.foo
luqui aa soo, that's the one
stevan it desugars to self`get_attr('$foo')
luqui hmm, that's an interesting idea
you can still override attributes, but it's not the same as overriding a method
stevan yes
luqui I think I like it. Let me toy with it. Go to bed! :-) 05:35
stevan exactly :)
nite &
luqui Perl 6 has no reason to have inheritance 06:56
role composition is monotonic, and we reject local precedence ordering (the idea that class Foo { is Bar; is Baz } should look in Bar first) 06:57
s/is/does/g :-) 06:58
gaal luqui: what does monotonic mean? is that "and" up there used in the sense of "that is"? 07:23
luqui monotonic means that you never get a base class's method having precedence over a derived class's version 07:30
basically, "stuff isn't totally insane"
by that definition, Perl 5 was totally insane
er, I guess that's not what it means (I tried to simplify)
gaal when does that happen in p5? 07:31
luqui It means that "if A precedes B in the linearization of a class C, then A will precede B in the linearization of any subclass of C"
it doesn't happen in p5; I oversimplified
gaal ah, ack. 07:32
luqui do you grok that?
gaal i grok the correction :) I don't know what linearization means, though I have a guess.
luqui the order in which you look for methods
gaal no mixins (compiletime composition) involved? well my guess was wrong :) 07:33
luqui hmm... actually, perl5 is insane 07:34
let me contrive an example 07:35
and I actually think that the oversimplification is correct
gaal A pattern I've used in the past in P5 was inheritable singletons -- there was one instance of type B *or* C, both of which were derived from A. The actaul reference was stored in A. But this is a little weird, and doesn't have much to do with invocation anyway. 07:36
luqui Okay, insane p5: the standard diamond problem: B isa A, C isa A, D isa B, D isa C 07:37
gaal okay...
luqui If C overrides one of A's methods, say "foo", but B doesn't, then D.foo will resolve to A
not to C where it "should"
gaal C3 fixes that, no? 07:38
luqui indeed
and so does role composition
role composition does it all by constructing vtables; it does no linearization
gaal i'm not sure that's insane though :) 07:39
I mean it is consistent.
luqui how is it consistent?
gaal suppose B had overridden foo to do SUPER::foo()
you'd get B.foo
luqui (also: {"you are stupid", "stupid are you"} is consistent, but that doesn't mean it's good)
gaal "stupid are you" is a question with a little help from intonation and punctuation :) 07:40
luqui you'd need a comma, I think
gaal I said punctuation :)
luqui yeah, just realized that
wait, you said that B.SUPER::foo() would give you B.foo? 07:41
do you mean A.foo?
gaal both :)
luqui okay, I think I see what you're saying
gaal in invocation, it'd give you B.foo
luqui but we know that SUPER is broken, too
gaal in behavior, A.foo, but that'd be *reasonable*.
luqui so the fact that C overrided foo gets completely ignored when it is inherited multiply? 07:42
doesn't seem like inheriting from C did much good at all
gaal what would you do if both had overridden foo?
luqui that's what "local precedence ordering" is 07:43
gaal hmm?
luqui in python, it would have picked B, since it came first in the list of derivations
gaal p5 also
luqui but perl doesn't like ordering dependencies like that; i.e. we're rejecting the necessity of local precedence ordering
instead, we pitch a fit 07:44
gaal that's the only alternative
luqui was that a question?
gaal an observation.
luqui true
gaal errr, I mean: "sure, if you don't want to do that, raising an early error is the only alternative" 07:45
luqui and what you're left with is *precisely* the semantics of role composition
luqui understood
gaal except that last time I read S12, there was mention of runtime role composition
which silently discarded conflicts
luqui except it doesn't really
it just isn't "flat" like regular role composition 07:46
it introduces an ordering
the order in which they were composed at runtime
gaal can you still call the other method?
nothingmuch hola
gaal hey nm
luqui and I've thought about it; you can't get around that ordering
you can't make role composition commutative
gaal, the method that was overridden?
gaal the one that I said was discarded 07:47
luqui dubious, at least not without explicit qualification
gaal I said, ha. S12 did.
luqui :-)
gaal luqui: qualification is fine here. alternatives are to demand an alias at composition time 07:48
nothingmuch christmas sucks
no email
means i actually have to work
luqui works for me...
gaal stevan mentioned something about accessing the vtable programmatically, but most programmers wouldn't want to have to do that.
nothingmuch: that's why you're on the channel is it? :) 07:49
luqui yeah, you might say <overridden_role>.meta.methods<method_name>($obj)
luqui thought nothingmuch was saying that email didn't work
rather than the phenomenon of nobody sending you email
after checking my mail, I understood ;-) 07:50
gaal if there were something like a cast, you could do (<overriden_role>)$obj.<method_name>
nothingmuch =)
this CD is interesting
i have no clue what to make of it
gaal I don't know, I'm getting so much spam these days I always know if my mail stops working 07:51
luqui gaal, that wouldn't respect the "virtualness" of methods
nothingmuch The Big Gundown: John Zorn Plays the Music of Ennio Morricone
luqui nothingmuch, which CD?
I don't know what to make of the title
gaal nothingmuch: did you get a chance to hear the other lisa germano?
nothingmuch ~en.wikipedia.org/wiki/John_Zorn
gaal: i got some more off emusic 07:52
but only heard it, didn't listen yet
gaal yeah takes me a while too
nothingmuch Hapiness, Excerts From a Love Circus, and I already had Geek the Girl
gaal luqui: can you explain that virtualness comment?
nothingmuch: Lullaby for Liquid Pig is really, really beautiful 07:53
nothingmuch got mp3/ogg/something?
luqui well, if Bar does Foo: my Foo $x = Bar.new; $x.method_overridden_by_bar # calls Bar's version
that's pretty much the definition of virtual dispatch
gaal sure
nothingmuch it's not on emusic, and it'll be a while till i get stuff from amazon
gaal it's out of print :(
luqui so even though $x had been "casted" to Foo, it should still behave like Bar, because it is one 07:54
nothingmuch crap
luqui unless you're redefining cast
but I'm under the impression that if you override an attribute in a base class, space for that attribute shouldn't even be allocated
so it may not even make sense to call the method of a base class
gaal luqui: point. 07:55
luqui man, we still have to figure out BUILD. How can you claim to have an object system if you don't even have that?
gaal wants a subject system
but is more likely to get an abject system 07:56
luqui wants a dative system. But there have to be hot chicks on it.
luqui wonders if he still has that latinesque toy language of his 07:57
gaal wonders what luqui's gallinaceous dative system would do in the case of method conflicts. 08:00
luqui maybe it would be methodist-only 08:01
luqui looks up "gallinaceous"
gaal galline golfs it down a bit, really. 08:02
you did want chicks eh.
anymoose: $work &
luqui that even furthers the joke
gaal hey, the reason I spell my name with two As is to prevent (American) people from thinking I'm a chick. 08:03
s/prevent/avoid having them assume/ etc. 08:04
(can't help what other people think)
luqui: in c#, base class attributes *are* allocated, and are reachable. fwiw. 09:13
# msdn.microsoft.com/library/en-us/cs...sorspg.asp
Alias_ OK, so 10:01
Alias_ waits until nothingmuch stops being distracted by salad
nothingmuch ~30 mins 10:02
ciao
gaal Lettuce go now you and I... Is it dressing from a cucumber that makes me so encumbered? 10:07
luqui gaal, yeah, I know. I'm trying to change conventional OOP. 10:24
but thanks
luqui beds 10:27
nothingmuch dancing moose moose moose moose laa di da di da 10:39
avar zomg 10:40
just how long does building pugs take?
webmind depends on your cpu I think? :)
avar It still hadn't compiled after ~6hrs 10:41
started it when I went to sleep
nothingmuch that's too much
avar 1GHz iBook G4 running GNU/Linux
nothingmuch doesn't make sense
avar I even did make unoptimized! 10:42
nothingmuch that makes even less sense
avar how long should it take, approximately 10:43
gaal avar: how much RAM have you got? 10:50
is the machine thrashing?
avar 512MB real 512MB swap
gaal luqui: ack; which is why I appended the qualification. 10:51
avar: how big is your ghc? you *sure* you're running with -O0?
avar what would "big" mean in this sense?;) 10:52
nothingmuch RSS, VSZ from top or ps
avar mm, I tried turning swap off and I'm building it again, it was defenetly swapping before though, but I still think it took a bit too long 10:54
(didn't finish, I killed it)
trying again 10:55
gaal avar: afair 'make unoptimized' shouldn't go over 200, maybe 220mb 11:02
avar oh dear 11:08
it always gets killed my linux because of lack of memory, trying with swap again 11:21
xinming b 12:30
DaGo buenas! 13:25
avar woo 13:30
my pugs build worked like a charm when I reduced the heap size for ghc 13:31
it was either that or setting precompile_prelude: false
gaal avar: did you manage an unoptimized build with precompiled prelude? that's interesting 13:35
avar of course it doesn't actually work;)
well, I have to install it, it's trying to load some stuff from /usr/lib/perl6 13:36
does PREFIX= still not work like it says in INSTALL?
gaal dunno. 13:38
why do you need to install? i haven't installed in a loong while. 13:39
export PERL6LIB=blib6/lib
or setenv equivalent.
rafl_ Juerd: ping 14:31
svnbot6 r8444 | audreyt++ | * Text.Parser.OpTable: 100% feature-complete port of PGE::OPTable! 14:55
r8444 | audreyt++ | Pure-Haskell port of PGE (compiling rules to parsec) is now within reach.
audreyt wonders if luqui will get some cycles to do a p6 port from this
clkao WHOOT 14:56
audreyt++
audreyt :))) 14:57
clkao we should meet up
audreyt verily. you @ taizhong or taibei?
clkao taipei 14:58
till wednesday and then i am off for some hiking
i am having dinner with uni friends tomorrow
audreyt k 15:00
so you are free at daytime?
clkao likely, and will probably be around ntu 15:01
audreyt cool, I can probably go find you then
you got a cell #?
clkao yep. tmp one. 15:02
xinming audreyt: will you come to China in the future? :-)
hcchien clkao: where will you go for hiking
audreyt xinming: sure, if there's a conference and preferably if someone pays for airfare :)
xinming: if you can manage to come to Tokyo for YAPC::Asia, we can also meet there 15:03
clkao hcchien: 1b.hinet.net/~happyman/out/show.php...12.tag.png
xinming audreyt: I can't go anywhere after I learnt well, and make some money. :-P 15:04
I think I should use "before". :-/
xinming is going out for supper 15:05
gaal is "bei" in taibei related to mandarin bei (north)? 15:10
nothingmuch ARF
nothingmuch is getting segfault from inside libc's malloc
=( 15:11
audreyt gaal: yup
nothingmuch: clearly you need a better libc 15:12
nothingmuch audreyt: it's directly affected by a change I made
i just need to figure out what =(
redhat--
stevan_ hello all :)
nothingmuch the set of all inputs to malloc is amazingly huge
ofcourse, the bug lies therein
but I trigger it somehow
hola stevan_
stevan_ audreyt: roles are working now, but we need to chat about how to die when conflicts arise 15:13
nothingmuch fuck this. i want to be out biking
work-- # exhausting
stevan_ (C++)--
hmm, that cancels itself out
nothingmuch well, learning new stuff is exhasting
stevan_ learning new stuff is good though
nothingmuch stevan_: you just tride to pass an rvalue as a rw to postfix -- 15:14
naghty
audreyt stevan_: ::.error_conflict_arises
stevan_: that may be to gonzo. you'd like an exception object I presume?
stevan_ audreyt: no need for exceptions actually
I was thinking I would return you a "conflict" object 15:15
I could collect detailed info
audreyt that's best
stevan_ basically punting to the next layer
audreyt since at your level a conflict need not be fatal
stevan_ exactly
audreyt so it makes sense to punt... damn we agree again.
stevan_ :)
I blame nothingmuch
nothingmuch kicks stevan_
i'm exhausted, don't blame me for anything right now
stevan_ ok, I blame luqui then 15:16
nothingmuch thanks
stevan_ he was the one helping me with the Haskell
audreyt not fair, luqui's not even here :)
stevan_ exactly :)
stevan_ praises nothingmuch
you sound like you need it :)
nothingmuch stevan_: tell rob i am willing to make a Catalyst plugin out of CGI.pm's html generation, so he can have his awesome rails feature ;-) 15:17
stevan_ audreyt: I will collect the follwing things: the name of the conflicting item, and the roles in which they conflicted
nothingmuch it didn't occur to me till today that *that* was what he was really complaining catalyst lacks ;-)
stevan_ and return an opaque with a hash of these items, one for methods and one for attributes
nothingmuch: no, what he wants is the Ruby on Rails idea of a "full stack" 15:18
he wants the intelligent defaults too
nothingmuch i'm not really serious
stevan_ which is counter to Catalyst in many ways
nothingmuch but he gave 'textbox("foo", "bar")' as an example of a killer feature ;-)
stevan_ nothingmuch: :)
nothingmuch: when was this? recently, like today?
nothingmuch when was what? 15:19
stevan_ cause i told him to look at Jifty, which might be where he got that idea
nothingmuch a while ago
stevan_ oh
nothingmuch like 2-3 weeks
stevan_ yeah, blame me, I got him the Rails book on the company card :)
nothingmuch aye
nothingmuch can't see how a fully integrated stack can be good for business though
sure, it saves time the first 50% of the way 15:20
but then...
stevan_ nothingmuch: well thats the thing, most of what we do is in the first 50%
nothingmuch unless the app is so simple it might as well be just a scaffold
stevan_ well, the scaffold looks like shit though
people want pretty applications :)
nothingmuch heh
audreyt stevan_: roger. is Bootstrap.pil ready for separate dispatch of .send and .send_private? 15:21
stevan_ but other than that, yes thats most of what we need
audreyt: yes I think it is
nothingmuch what I mean to say is that the reason I value catalyst is that when I had to plug it into some backends that were not fully integrated into a stack
audreyt k
nothingmuch backends which my company paid big bucks to have
stevan_ I am properly installing to %!private_methods and self!method is used where appropriate
audreyt yeah, cat is very gluey. I like that a lot.
nothingmuch then catalyst made it very easy, since I didn't have to a. learn magic b. learn how to undo that magic c. undo the magic d. reimplement the magic on my other backend
the ratio of magic to usefulness is very good 15:22
magic is only good if it gives usefulness
stevan_ nothingmuch: I agree, but the less time i spend on $work , the more time i can spend here ;)
audreyt perl5/mg.c: "Sam sat on the ground and put his head in his hands. 'I wish I had never come here, and I don't want to see no more magic,' he said, and fell silent."
nothingmuch that's true
but i guess the real issue is what I had to work on and what you have to work on 15:23
stevan_ nothingmuch: very true
avar Compiling Pugs.Run ( src/Pugs/Run.hs, dist/build/src/Pugs/Run.o )
GHC's heap exhausted: current limit is 99999744 bytes;
hur hur
nothingmuch you're thinking of reimplementing the ears thing?
audreyt avar: "make" again should fix that
stevan_ nothingmuch: I actually think a full stack on top of catalyst is probably a good idea
audreyt avar: we are working on fixing it with the minilang thing :) 15:24
avar audreyt: it was a typo in config.yml
nothingmuch stevan_: Catalyst::Enzyme is perhaps a full stack and then some
audreyt avar: it was?
oh, a missing 0
stevan_ nothingmuch: well, we have some new work which almost requires we re-write it (new features, more flexibility, etc)
nothingmuch also, by not saying "full stack, la la la" you can't avoid design
stevan_ nothingmuch: I have been watching Catalyst::Enzymem
avar I speled precompile_prelude: false bad! 15:25
nothingmuch so people make the frameworks (e.g. HTML::Widget) be something that's both useful as a full stack (90% at least)
and very reusable, too
avar audreyt: nah, already doing "make unoptimized"
stevan_ nothingmuch: have you looked at seaside?
nothingmuch if you look at lathos's maypole hacks for CDBI - eeeeeeeeeeeeeeeeeeeekk
no, not yet
i sort of planned to
audreyt k.. very strangely, "unoptimized" is more likely to blow up heap in Run.hs
nothingmuch but no i realized i'll never get to it
audreyt if you just type "make" now, it will probably work :)
nothingmuch now
stevan_ nothingmuch: it is very nice, and worth a look
avar audreyt: already did make clean;) 15:26
audreyt avar: sigh :)
nothingmuch when I'm back in the webapp business, if ever, i promise to have a look
stevan_ if for nothing more than to steal the good ideas from
nothingmuch: ok :)
nothingmuch i know that it's continuation based, right?
stevan_ yup
stevan_ likes continutations :)
nothingmuch what i'd like is to steal jifty's form dispatch orientation thing
it sounds useful
i just have to see what it is 15:27
but again, punt till webapp business
hint hint
;-)
stevan_ we are going to do a review of all the major frameworks in January, and build pros/cons lists too
if it comes out useful we will put it up public somewhere
nothingmuch aye 15:29
my grudge with jifty at the moment: learn yet another ORM, and yet another template engine
stevan_ nothingmuch: learning new things is a Good Thing, it expands your vision ;)
nothingmuch well, yes
but (time / value) 15:30
i already know the ORM and templating problem
stevan_ I like the sound of Jifty, my only concern is it's BETA state, but thats a temporary thing
nothingmuch no matter how clever Jifty::DBI is, i doubt it will be as mind opening as the lambda shaped crowbar that audreyt shoved in to my ear and pried my mind open with
stevan_ nothingmuch: yes, we are looking for a long term investment though, so "learning new things" is not really a concern for us
nothingmuch aye 15:31
stevan_ wonders if there is a Haskell on Rails :P
audreyt aye, it's HSP
stevan_ :)
audreyt very cool stuff with inline XML construction and regex match of XML patterns 15:32
stevan_ oh
nothingmuch is it like that filesystem that oleg(?) wrote?
using the zipper pattern and continuations to represent a repeatable read model for the data, through an HTTP view? 15:33
that would be so cool that no one would use it
=D
audreyt nothingmuch: no, that's WASH
nothingmuch that's not googleable
oh, it is
stevan_ tries to recruit nothingmuch to work on a mini-language based web framework
audreyt nothingmuch: www.haskell.org/communities/11-2005....html#wash
also www.haskell.org/communities/11-2005....html#hasp 15:34
stevan_ audreyt: is the mini-language going to be PIL2? or is it that already?
audreyt stevan_: no, PIL2 will have native construction nodes for SigList, ArgList and containers 15:35
NativeMap etc is _not_ exposed to PIL2.
stevan_ ok
nothingmuch AUGH
stevan_ we need a good name for it then
nothingmuch i want to go out
walk
sick of sitting
ENORIDE
stevan_ mini-language is too much to type, and not very sexy
audreyt PILN
for PIL-Native 15:36
PIL.N
nothingmuch Pee.NET
stevan_ gives nothingmuch a "get out of work free" card
nothingmuch (the L is silent)
audreyt do not pass IRC. do not collect 200 karma.
nothingmuch karma nothingmuch? 15:37
no jabbot?
perlbot: karma for nothingmuch?
perlbot Karma for nothingmuch: 27
stevan_ slow perlbot
nothingmuch perlbot: karma for audreyt
perlbot Karma for audreyt: 15
nothingmuch perlbot: karma for autrijus
perlbot Karma for autrijus: 90
nothingmuch hmm
perlbot: karma for c
perlbot Karma for c: 708
nothingmuch i remember you had ~600 a while back 15:38
oh well
gaal so, who's changing their name to c?
nothingmuch gaal: chromatic
15:38 stevan_ is now known as c
c c-- 15:38
audreyt c--++
15:38 c is now known as stevan_
audreyt # nice intermediate language 15:38
gaal c-+-+
nothingmuch ?eval say 'c-- ' for 1 .. 100
15:38 evalbot_8441 is now known as evalbot_8444
evalbot_8444 OUTPUT[c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- 15:38
nothingmuch ?eval say 'c-- ' for 1 .. 100 15:39
evalbot_8444 OUTPUT[c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c--
nothingmuch ?eval say 'c-- ' for 1 .. 100
evalbot_8444 OUTPUT[c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c--
nothingmuch perlbot: karma for c
perlbot Karma for c: 442
nothingmuch laa di daa
stevan_ wow it worked :)
nothingmuch ?eval say 'c-- ' for 1 .. 100
evalbot_8444 OUTPUT[c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c--
nothingmuch ?eval say 'c-- ' for 1 .. 100
gaal talk about "killer feature"
evalbot_8444 OUTPUT[c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c--
nothingmuch ?eval say 'c-- ' for 1 .. 100
evalbot_8444 OUTPUT[c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c--
nothingmuch perlbot: karma for c
perlbot Karma for c: 178
nothingmuch ?eval say 'c-- ' for 1 .. 1000
stevan_ :D
evalbot_8444 OUTPUT[c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c--
nothingmuch ?eval say 'c-- ' for 1 .. 100
evalbot_8444 OUTPUT[c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c--
nothingmuch ?eval say 'c-- ' for 1 .. 100
evalbot_8444 OUTPUT[c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c--
nothingmuch perlbot: karma for c 15:40
perlbot Karma for c: -86
nothingmuch damn right!
stevan_ thats better :)
nothingmuch ?eval say 'c-- ' for 1 .. 100
evalbot_8444 OUTPUT[c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c-- c--
nothingmuch one last time ;-)
gaal sets topic for #pugs: "nothingmuch doesn't like c very much"
audreyt or rather, s/c/$work/
nothingmuch no, i like work
i'm just tired
gaal s/pugs/perl6/
nothingmuch and I want to go home and do stuff
audreyt I see
nothingmuch but I don't have a way home yet
audreyt so s/$work/boredom/ 15:41
nothingmuch aye
time for tea
stevan_ audreyt: I think I like PILN the best 15:43
gaal audreyt: I'll finally have some time tomorrow for import/export stuff again. what do you think can be done w/o major refactorings?
nothingmuch tPILN
PILN 15:44
somewhat hard to type
Pee.NET, on the other hand
gaal assuming i break chained assignments :)
stevan_ nothingmuch: Pee stands for?
gaal pull in reduceSyn's logic into ruleVarDeclaration etc?
nothingmuch stevan_: it's a porn site
just ignore me
stevan_ :) # programmer porn 15:45
nothingmuch unixsex!
i think i'm going to go home
or rather, to b.s.
stevan_ where programmers go to look at unmanaged code
stevan_ has to go as well (family activities and such)
avar audreyt: setting precompile_prelude = false worked;)
stevan_ adios all &
kenben when is perl 6 coming out 16:11
clkao by christmas, of course
nothingmuch a christmas
kenben lol 16:12
svnbot6 r8445 | audreyt++ | * PILN: Handle the three method dispatch forms (obj`prim, 17:10
r8445 | audreyt++ | obj!private, obj.public) distinctly and correctly.
r8445 | audreyt++ | * Adjust Bootstrap.pil's invocations to use the new syntax.
r8445 | audreyt++ | A few tests from bootstrap.t still fails; probably needs
r8445 | audreyt++ | some input from stevan++.
r8446 | audreyt++ | * fix syntax tutorial in PIL.Native.Parser's comments. 17:34
luqui guten tag 19:36
svnbot6 r8447 | gaal++ | * pil REPL: don't die on parse errors 20:19
20:50 Mahmoud-Afk is now known as Mahmoud
wolverian is there a specced method yet to tell what kind of values an array can hold? 20:52
I see there's .shape.. I don't think that holds what I want, though
(this is perl6, not pugs)
.sig.returns maybe? 20:55
arrays are after all glorified subroutines :)
avar mm, ideas 20:56
I'm going to write a program that allows you do to stuff like my $res = $x + $y; where $x = "one" and $x = "forty-two"; $res would then become 43 20:57
Obviously I'm going to have to overload the + operator and have $x and $y be some type I make up
wolverian remember i18n :)
avar but I don't quite know how to get started, the synopsis only glance over it..
where can I read about how to do stuff like 20:58
gaal multi &infix<+> (Str $x, Str $y) { ... }
avar $y = new Number("forty-two");
diotalevi_ Say, this is OT but it seems like rt.perl.org isn't authenticating using the same database as rt.cpan.org. Is this true?
wolverian avar, Number.new :)
avar gaal: Yeah, I know, but I don't know how it works with classes..
and I want to make it work through one
gaal rt.cpan.org authes with PAUSE 20:59
what's at rt.perl.org? :)
avar i.e. how does overloading an operator inside a class relate to the rest of the program?
wolverian it's a global (ie, in the * namespace), unless you say 'my multi'
diotalevi_ avar, isn't there already a CPAN module for doing that? "one" + "two" is likely already handled in a p5 cpan module.
gaal avar: this is multi dispatch
see the end of S12 IIRC 21:00
wolverian so, no ideas about the array introspection?
avar ah, a multi sub is accesable below the scope which it was defined in?
diotalevi_ rt.perl.org is what perl5 is tracked in. Apparently it's not in the rt.cpan.org site.
wolverian goes look in S29
avar I though it was just accessable if you included a file ...
wolverian not in S29 :) 21:01
avar if that's the case that's the answer I was looking for then;)
gaal avar: like wolverian said, you want the method to be in *
avar mm, okey, thanks!
gaal ah, S13
wolverian ..which is the default when you say 'multi foo ...', I think 21:02
gaal wolverian: I think not
"Note the lack of * on those definitions. That means this definition of addition is only in effect within the scope of the package in which infix:<+> is defined. Similar constraints apply to lexically scoped multi subs. Generally you want to put your multi subs into the * space, however, so that they work everywhere."
wolverian oh, sorry. 21:03
gaal I think introspection is underspecced in general. 21:06
I'm sure luqui &co. have more rabbits up their sleeves, but I never saw how to interrogate a sub about whether it has a named arg called X and what's its type etc. 21:08
luqui hmm... yeah, not specced
probably just goes with the OO interface for &codes
gaal was I right about your rabbity sleeves? (does that tickle, I always wondered?) 21:09
luqui i.e. it's not something that really needs to be specced
gaal, it hurts more than tickles
gaal hum? why not?
luqui well, it's almost arbitrary, as long as there is *some* WTDI
it's not a linguistic issue
gaal OO interfaces can be better or worse too you know :) 21:10
luqui though for multiple implementations, it's good to have it nailed down
gaal, yeah, sure, but that's not the kind of thing that's done often enough for it to matter
lisppaste3 avar pasted "overloading" at paste.lisp.org/display/15032 21:12
avar mm, what am I doing wrong
that's the basic concept of how this is going to look...
luqui avar, well, what is going wrong? 21:13
avar *** cannot cast from VObject (MkObject {objType = (mkType "Tala"), objAttrs = <ref>, objOpaque = Nothing, objId = 53}) to Double (VNum)
at int2is2.p6 line 31, column 5-12
gaal avar: try putting the last three lines inside the class scope, for starters
not sure what the state of this is in pugs 21:14
luqui avar, when you're overloading an operator
you want to put the multi into the global namespace
the only time you don't is when you want to lexically override some notation
that is, change multi sub infix:<+> ...
to multi sub *infix:<+> ...
gaal sleeps & 21:15
avar woo, that works;)
thx
luqui we really ought to have warnings and whatnot about that
gaal how would you avoid the warning?
luqui no warnings ...
gaal heh, that may be a while. :) 21:16
luqui to me, and this could be argued, the only operator overloading that make sense are lexical and global
package doesn't make sense
but package is the default!
gaal zzZZZ fer realzors & 21:17
avar arr, nothing's working/ 21:20
21:20 avar is now known as avar\awk
luqui avar\awk... \awk? 21:20
Aho, Weinberger, Kernighan? 21:21
avar is more famous that I thought...
wolverian maybe should prod p6l about introspectoin? 21:26
s,oi,io,
luqui have at it 21:27
21:30 avar\awk is now known as avar
wolverian sent 21:35
lisppaste3 avar annotated #15032 with "infinite loop..." at paste.lisp.org/display/15032#1 21:38
avar that's strange 21:39
luqui avar, known bug
luqui plays with it to find a workaround 21:40
hmmm... the usual workaround is not working 21:44
luqui is stumped 21:45
22:07 Mahmoud is now known as Mahmoud-Afk
avarab luqui: did you find something? 22:20
svnbot6 r8448 | luqui++ | Fixed interpretation of curlies to make a hash. The following:
r8448 | luqui++ | { %foo }
r8448 | luqui++ | { %$foo }
r8448 | luqui++ | { %foo, a => 1, b => 2 }
r8448 | luqui++ | are now interpreted correctly.
luqui wtf... svk is being a bitch
avarab, no, sorry
I could have sworn I already committed that! 22:21
avarab that's pretty much a showstopper for my app if I can't find a workaround;/ 22:23
luqui hmm.. 22:24
unless you can figure out a way to add without calling '+'... 22:25
svnbot6 r8449 | luqui++ | Backtracking controls. 22:29
r8450 | luqui++ | Change "cut"'s name to "commit", even though what I'm doing is a little more general than commit.
avarab hahah
I found a workaround
luqui how can I get conflicts when I'm the only one editing these files!? 22:30
avarab, cool, what did you do?
svnbot6 r8451 | luqui++ | A little documentation.
lisppaste3 avar annotated #15032 with "workaround" at paste.lisp.org/display/15032#2 22:31
luqui isn't sure why that works...
svnbot6 r8452 | luqui++ | A little bit more documentation, for the slightly tricky quantify combinator.
r8453 | luqui++ | Minimal quantifiers.
luqui maybe it's the type annotations 22:32
avarab is there a t/pugsbugs/ for it?
luqui I think r0nny put in a test for a related problem 22:33
svnbot6 r8454 | luqui++ | Making sure that quantifiers are maximal by default.
r8455 | luqui++ | Optional, and some untested anchors.
luqui but more tests never hurt
avarab I'm not sure how to make a test for something that results in an infinite loop
and something I can't narrow down to a single statement...
luqui it's easy to test the latter
just set up the necessary stuff before the actual test 22:34
svnbot6 r8456 | luqui++ | Renamed match_num and match_name to capture_num and capture_name, since
r8456 | luqui++ | they're better names for that.
luqui if calling + results in an infinite loop...
then put a counter around the call to +
and make sure it doesn't exceed, oh, say, 10 22:35
it's an infinite *recursion*
svnbot6 r8459 | luqui++ | Get rid of some error checking in perl6.vim, because it has false negatives.
r8459 | luqui++ | Specifically: ( $s { } )
r8460 | luqui++ | Fixed editor.vim better.
r8461 | luqui++ | Allow ./method: arg1, arg2 (listop method with implicit invocant). Refactored
r8461 | luqui++ | the parser a little in the process.
luqui other sorts of infinite loops are not so easy
ugh, that was a painful push
I could have sworn that I pushed that stuff long ago
and I got conflicts all over the place
svk-- 22:36
lisppaste3 avar pasted "hmm" at paste.lisp.org/display/15036 22:40
luqui & 22:42
stevan audreyt: all tests pass now 22:54
mostly it was swapping . for ` 22:55
luqui stevan, did you see my proclimation yesterday?
stevan see r8463
luqui I don't have the guts to p6l it yet
stevan luqui: yes I did
I agree with you, but disagree at the same time :)
luqui 'splain
stevan I agree we dont really need them
but I disagree that we should do anything about that
svnbot6 r8463 | stevan++ | PIL.Native.Bootstrap.pil
r8463 | stevan++ | - added .class and .id methods to ::Object so that they are
r8463 | stevan++ | accessible to the metamodel
r8463 | stevan++ | - fixed is_a (it used . where it meant `)
r8463 | stevan++ | t/pil/metamodel/*
r8463 | stevan++ | - fixed all tests to pass, a lot of swapping . for `
stevan people are used to classes 22:56
they like classes
luqui oh, no, I didn't say we didn't need classes
stevan classes make them feel all warm and fuzzy
luqui I think we do
I said we didn't need inheritance
stevan that all goes for inheritence too
you can't shake things up that much
luqui i.e. there doesn't need to be a difference between inheritance and role composition
stevan right
but shhhh don't tell people that
:P
you will scare them away 22:57
luqui well, we could just s/is/does/g, and teach people that "does" is how you inherit
"is" is for trait application anyway
and I've never liked the overloading of that word
stevan I think it is a case of "dont rock the boat"
luqui why?
stevan perl 5 people will have enough time with a real object system
it takes some getting used to
I think most people will like it 22:58
but its an adjustment
luqui yeah... except...
there's this thing about "what does it mean for a role to inherit"?
stevan so to snatch classes and things many people are comfortable with, out from under it,.. thats too much
roles dont inherit
thats the thing
they flatten
luqui yeah 22:59
stevan only like a handful of people really understand what that means
luqui so they flatten in the inheritance
but then what does inheritance do?
stevan its chains it
only langs like C++, where everything is analyzed to death, is inheritence flattend
into vtables
thats what vtables are basically
flattened inheritence
luqui yep
stevan but anyway,.. I agree with you,.. they are pretty much interchangeable in most cases 23:00
luqui the "pretty much" is what scares me
stevan but thats the technical side of the argument
luqui we have two different things, which do almost the same thing
stevan well I imagine there might be an edge case or two where they differ
luqui exactly!
stevan but I am paranoid like that
luqui how do people know which one to use?
stevan they will learn
luqui I don't know yet... you don't either.
stevan roles are new things,.. shiney,.. and ohhhh so purty
luqui sure 23:01
stevan it will take time
luqui I'm thinking that it will only "rock the boat" for people who are into the metamodel already
stevan consider this,.. you, and I ,... we can write the p6 OO style guide
so we can stear them in the right direction :)
luqui for the end user, and for the folks who don't care about the OO design, it amounts to s/is/does/g
stevan oh, it's not rocking my boat really
wolverian I happen to agree. two keywords that do the almost same thing is weird.
stevan i think its a question of comfort level 23:02
this is the human end of language design
luqui you think people are more comfortable with the "is" keyword than the "does" keyword?
stevan if you change something too radically,.. you will scare a percentage of people away
wolverian I don't like "does"
stevan luqui: keyword is irrelevant,.. its the words you use
luqui stevan, yeah...
and we use the words "inheritance" 23:03
stevan to best describe roles,.. you say they are composed,..
luqui and role composition becomes our inheritance model
stevan to best describe classes... you say they are inherited
luqui maybe.
stevan I will think it over more,.. and try to come up with test cases both for and against 23:04
luqui the thing that differentiates roles from classes is that they have sane conflict resolution
other than that, they are just abstract classes
stevan and they are not inherited
no, they are not
luqui pretend they are
stevan they are modules
they are not able to be instantiated
they dont need constructors
luqui neither are abstract classes
stevan they are dumb collections of methods and attrs
luqui stevan, hang on 23:05
stevan swings from his branch awaiting luqui's next thought :)
wolverian I don't see any difference between abstract classes and roles, myself
(besides inheritance)
stevan wolverian: exactly,.. thats a big difference I think 23:06
luqui tell me the difference between class Foo { does Bar } and class Foo { is Baz }, given that the Bar role is just like the Baz abstract class (no constructors, uninstantiable)
stevan luqui: how does next METHOD work in a flattened context?
if you have no super,..then where do you go
luqui point
stevan because everything is composed together,.. thee is no parentage,.. and so you cannot go anywhere 23:07
luqui I don't tend to use those guys, so they don't enter into my consideration...
stevan yeah
luqui hmm
stevan I tend to agree that role composition can be a superior form of class composition
luqui what do people use SUPER for?
stevan but I dont agree that it should replace inheritence
time and a place for both
luqui er, I mean, NEXT (SUPER is gone)
stevan, what is that time and place?
stevan t/pil/metamodel/S12_example.t 23:08
luqui: I hate to cut this short,.. but I am running off to see King Kong,.. and my wife is going to kill me if I dont get off the computer :)
luqui okay
we'll discuss later
stevan luqui: I dont know what those time/places are,.. but we can/will figure them out 23:09
luqui that's important
if we have a distinction between is and does, we have to know what the heck it is
stevan but NEXT is *very* useful,.. trust me :)
luqui see ya
stevan ok,.. I will try to pop in later tonight
luqui I'm here all day, I think 23:10
stevan runs off before he gets in trouble &
luqui: another thought (this time to support the "just use roles" end of the argument 23:26
if you use multi-methods instead of instance/class methods, then you can have call-next-method
since you would just be calling the next most appropriate method,.. which will likely be the same one you would call for SUPER or next METHOD 23:27
this is how CLOS works
then classes/instances are just purely about attribute management
this is also how Dylan works
it would be possible and be very cool 23:28
CLOS/Dylan call it generic functions
take a look :)
stevan can go and enjoy the movie now that he said that ;)
and for the record,.. I am down with whatever meta-model makes sense,.. I am not married to the current one 23:29
I like it,..but I would be happy to write another one too,.. I enjoy it :)