Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net
Set by autrijus on 4 August 2005.
svnbot6 r6154 | iblech++ | PIL2JS: Hack to make PIL2JS work again. Instead of calling return 00:44
r6154 | iblech++ | continuations, we throw a function which runs them. PIL2JS.runloop catches the
r6154 | iblech++ | exception and runs the function then. Thereby we break the stack problem,
r6154 | iblech++ | but it feels extremely hacky to always throw exceptions... Sadly #javascript
r6154 | iblech++ | doesn't have a less hacky answer, either.
iblech JS people: How can I tailcall to a function? 00:45
iblech goes to sleep and hopes he'll find an elegant solution to the stack overflow problem :)
Night all :)
stevan anyone familiar with PIL or PIL2 around? 00:47
dudley stevan: I'm committing what I've got so far on the Java meatmodel. 02:29
It needs a lot of work, but real life threatens to take a lot of my time soon, so I figured I'd just check in what I have. 02:30
svnbot6 r6155 | dudley++ | org.perl6.metamodel (Java): 02:50
r6155 | dudley++ | * Added some stuff to stevan++'s Java port of the JS meatmodel. Still very much
r6155 | dudley++ | a work-in-progress.
stevan dudley++ 02:56
f0rth_ Java! 02:57
stevan f0rth_!
dudley stevan++ # I'm just a metaimplementation monkey. 02:58
stevan dudley: very nice 02:59
dudley: you did quite a lot 03:00
this looks great
dudley :-) 03:01
stevan dudley: it looks like the only thing missing is the Perl6.Object right? 03:03
dudley Yeah. 03:04
stevan wow
dudley++ # :)
dudley if you don't count roles, multimethods, etc...
stevan the JS metamodel does not have them yet either
well I hacked multimethods really badly the other day
dudley I heard that, but I've been intentionally ignoring it while I worked on this stuff :) 03:05
stevan dudley: it is a horridly ugly hack, so keep ignoring :P
dudley :) 03:06
stevan we had to add an arity parameter to methods
which we then checked against the args.length
the first match of number of paramters won
*cough* bad-hack *cough*
dudley ooh, I like $obj.meta.describes(Foo) 03:12
stevan me too
I am not sure if it works for subclasses
like Foo.meta.describes(Bar) where Foo isa Bar
but isa() could easily be implemented with WALKCLASS then 03:13
dudley Seems sane to me.
stevan I like WALKCLASS and WALKMETH, they are very useful 03:14
those are right out of APoc 12 too
dudley But that's just for entertainment, you can't take it seriously :) 03:15
stevan :D
info-tainment
I am starting to feel like Roles are the catch-all for anything which does not fit nicely into any other category 03:16
dudley I've had that feeling in the back of my brain for a while.
But I haven't read the Trait papers yet, so I assumed I just didn't understand them. 03:17
stevan dudley: I think I might one of the only, if not *the* only one on p6l who has read all the trait papers 03:18
because after you read all the paper you think adding attributes to traits is just insanity 03:19
dudley I wouldn't count autrijus out, but you're probably right
can you instantiate a role? 03:20
stevan actually I have been meaning to try and get the guy who wrote those involved with Pugs
you can, but it wraps it in an anon class first
dudley well that feels a little better, then.
stevan yes
but attributes is just really hard,.. because the questions becomes,.. who owns them 03:21
the role? the composing class?
and then what to do with conflicts?
surely methods refer to the attribute
so two methods which are not in conflict access two different attributes which are in conflict 03:22
the possibilities for ugly things are huge
s/things/things to happen/
dudley This is perl, remember? 03:23
stevan :)
my biggest worry is that something like this will make roles too unpredictable to be useful 03:24
because you will need to look inside the role too much
and that will kill their reusability on anything but a very small scale
dudley What does a role get you that you can't get from mixins and interfaces? 03:26
stevan well, the method conflict resolution is one, the second is the compositional aspect
interfaces have no impl, so having an impl is a big win right there 03:27
mixins tend to be implemented in a number of ways
sometimes they inject themselves into the inheritence heirarchy
which is ugly
if I wanted that, I would make a class
svnbot6 r6156 | fglock++ | * Perl6::Value::List - Started syncing Perl6/Perl5 versions 03:28
r6156 | fglock++ | * Removed class Lazy::Range
r6156 | fglock++ | * Lowercase Array methods fetch(), store()
r6156 | fglock++ | * Removed redundant Array methods next(), previous()
stevan with Roles/traits, the methods are actually composed into the class
so the methods are actually added to the metaclass
the role itself is just a holder, it is not needed once it is added into the class
then when you add in a bunch of roles, there is specific method conflict rules 03:29
if two methods conflict, neither is used
dudley I guess that's what I always thought mixins were
wait, neither is used?
stevan yup
dudley Exception? 03:30
stevan the beauty of this, is that it means order of roles does not matter
no, it is just removed from the list
the class must implement it to resolve the conflict
or exception
so it forces you to deal with the problem
dudley ahh, okay
stevan and the composition becomes "safer"
and not having to worry about role ordering is also very useful 03:31
it simplifies the combinations
class Foo does Bar does Baz {} is the same as class Foo does Baz does Bar {} 03:32
a whole class of subtle bugs disappear
dudley I like that very much.
stevan yes me too
but you add attributes into the mix, and a whole new class of bugs show up 03:33
one of these days I will go on a p6l crusade to abolish role attributes, but I just dont have the time to fight it right now
dudley are role attributes canon, or is there room for discussion?
stevan well, hard to say, roles are still fuzzy 03:34
we had many discussions about them at the hackathon and at YAPC
but never any resolution, only more questions really
mugwump I take it you're talking about private attributes only
stevan mugwump: no, public too
mugwump as public role attributes are just methods
which are subject to normal dispute resolution
stevan mugwump: yes, that was in your thread
but is it "the way" now? 03:35
mugwump I've been out of the loop - I didn't get time to push through the $.foo vs ./foo() thing yet
stevan because that also impacts how methods are defined in classes as well
I liked where larry was going with it, but it seemed to fizzle out (or maybe I just got distracted)
mugwump It was laid down to settle I guess 03:36
stevan ah
honestly, the best thing will probably be for people to start using roles 03:37
and see what happens
I have been known to overthink things like this, and be too pessimistic
dudley pessimism-- 03:39
stevan I like to think of it as pragmatism, but my wife disagrees :)
03:40 ods15_ is now known as ods15
dudley :) 03:42
Goodnight. & 03:46
stevan night dudley
dudley++ # welcome to meta-land
03:49 spinclad_ is now known as spinclad 04:31 khisanth__ is now known as Khisanth
brentdax I have a system of approximately 2725 lines, plus CGI.pm and FindBin.pm. 04:57
It takes 55 wallclock seconds (44 real) to run pugs -c on it.
(Oh, the 2725 includes POD.) 04:59
svnbot6 r6157 | Stevan++ | Perl6::MetaModel - (p5) 06:09
r6157 | Stevan++ | * eliminated dependence on $<package>::META variables
r6157 | Stevan++ | (except in MetaClass, but thats for the bootstrap)
r6157 | Stevan++ | * added a ::find_class global fuction to map names to classes
r6157 | Stevan++ | * added ASCII art from p6l post to 10,000 view
autrijus rehi 07:21
autrijus is still at $work :-(
castaway_ comforts autrijus 07:22
07:22 castaway_ is now known as castaway
autrijus purrs 07:22
castaway all this having to work in order to eat, in order to be able to do the fun stuff, is annoying ,) 07:24
autrijus I'd say 07:25
castaway there should be some way to get an exemption
svnbot6 r6158 | autrijus++ | * rename "Single" to "Item" and "Plural" to "List". 07:34
r6158 | autrijus++ | * the "Str" representation is now using Data.PackedString
r6158 | autrijus++ | for efficiency. Still gotta fix its latin1 bias.
castaway
.oO( 6158 !? )
masak 6158 is an impressive number by any standard 07:37
since feb 1, that many changes have been made to pugs
wow
castaway yup 07:38
GeJ is there some CIA-like site for pugs? 07:39
autrijus GeJ: CIA :)
(look for 'perl6')
GeJ autrijus: thanks 07:40
autrijus np...
GeJ I just wish CIA could respond
autrijus :)
castaway CIa-like?
autrijus cia.navi.cx 07:41
currently offline
castaway ah.. and why does it sound like its run by the central intelligence agency? :) 07:42
autrijus because it's designed to be a central intelligence centre for open source proejcts 07:43
bbiab
castaway aha (dont we have enough of those?) 07:45
autrijus maybe -- I'm not too familiar with those 07:57
castaway well, me either ,) 07:58
nothingmuch autrijus: how goeth pil2? 10:05
castaway he's $working, or was..
autrijus nothingmuch: still $working. 11:09
50% less time available means something like 75%+ less productivity 11:10
because it takes time to enter the zone, etc.
nothingmuch yeah, i know the feeling 11:17
nothingmuch suffers too much from context switching at work
autrijus c'est la vie :) 11:19
castaway (multitasking++) 11:20
ods15 lol nothingmuch 11:24
Arathorn seems to be context switching with about 2.5-day timeslices and a load of about 14 :(
autrijus I'm switching in ~5hr chunks :( 11:26
11:52 Aankh|Clone is now known as Aankhen``
vkon are there serious reasons why *.o and '*.hi' files got copied when 'make install'? 11:55
nothingmuch vkon: whether serious or silly, they are probably wrong 11:57
Arathorn: my slices are between 10 minutes and 5 hours
and load average is between .5 to 6 or so
vkon as always, patches welcome? 11:58
nothingmuch vkon: indeed 11:59
do you have a commit bit?
vkon I am able to commit, and will try to fix it, but not right now. (few hours later) 12:00
autrijus er, .o will get installed 13:26
svnbot6 r6159 | fglock++ | New List methods: is_contiguous(), to_str(), clone(), to_ref(), to_bit(), to_num()
autrijus because that's how pugscc can work
.hi too
so please don't touch that part
think of it as libperl.o
(or rather .a)
dudley I was wondering about that when I was looking at the installer 13:27
and then promptly forgot about it :)
fglock autrijus: I'm trying to find the right place for my files - 'perl5/' is for Perl5 runtime - where do Perl6 (and javascript, parrot) files go? 13:36
autrijus fglock: Perl6 files go to ext/. 13:38
fglock ok - just to be sure
autrijus I think javascript runtime should eventually go to javascript/; parrot runtime should maybe go to parrot/. 13:39
luqui hey autrijus, I'm writing the thingy that disallows assignments in conditionals
autrijus but that's not very imporatnt right now
luqui isn't this the identity function:
condCheck parser = do { exp <- parser; parser }
autrijus no
exp <- parse; return exp
also don't do that in parser please...
luqui por que?
autrijus I thought larry said that all assignements is to be disallowed in boolean context. 13:40
luqui I wasn't sure about that
autrijus my Bool $x = ($_ = 3); # also disallowed
luqui and to get it you could say:
autrijus <lwall>
because we've said that assignment to an *existing* variable in a boolean
context is illegal:
luqui my Bool $x = do { $_ = 3 }
except... that's still in boolean contet
autrijus yes
even 13:41
luqui so, uh, how do you do it if you want to
autrijus ($_ = 3) ?? 1 :: 0
is still boolean context.
my Bool $x = ?($_ = f());
is fine, though.
fglock autrijus: i was rethinking 1|2..Inf - I think it should be compiled to 1..Inf|2..Inf - lists don't have to worry about junctions
luqui I don't understand why 13:42
autrijus hm, no, as ? still imposes boolean context.
you can't win
my Bool $x = do { $_ = f(); $_ }
is the only way out.
luqui ouch
maybe we need a function ::T --> Bool
autrijus that function is called (as Bool) 13:43
luqui so it is
autrijus my Bool $x = (($_ = f()) as Bool)
as is coerce, so imposes no context.
luqui yikes... well... fair enough
where do you suggest that I approach it 13:44
autrijus if you don't like it, check with larry, but don't touch the parser
it's not the layer
luqui okay, but just on the haskell side about my earlier question, isn't:
condCheck parser = do { whatever I dont care blah blah blah; parser } the identity no matter what?
autrijus (if you want, make it a runtime error, in Eval.hs's reduceSyn "=")
(but it really belongs to the typecheck layer) 13:45
luqui which doesn't exist yet?
autrijus which will exist src/PIL/
but is not available to the current runcore.
so, to answer your question
it's identity only if the "whatever" does not involve the "parser" 13:46
consider
condCheck parser = do { parser ; parser ; parser }
surely it's not identity.
luqui hmm... oh yeah, it goes through the combinator three times
autrijus so you want
condCheck parser = do { exp <- parser ; ... exp ... ; return exp } 13:47
luqui it is only the identity for the combinators that I'm using for my mental model :-)
autrijus yes. :)
maybe we should call the things mentalmodels.
mentalclass, mentalobjects
fglock: that is certainly my intuition, yes. 13:48
fglock thanks
autrijus :)
luqui: btw, do you think my unification algorithm is sane?
luqui where? 13:49
luqui isn't quite through all his mail after the trip home
autrijus role Coerce[::to] { method coerce (--> ::to) { ... }
}
multi *coerce:<as> (( Coerceable[T] $from : Type ::T
) --> T) { $from.coerce }
the unification proceeds by inspecting type variables in both type and param position
as denoted by ::
and unify toward common supertype 13:50
then it binds the instantiated (monomorphic) types
and typecheck the term types normally.
so
sub id (::T $x --> T) {} 13:51
will not degenerate to Any
while
sub id (::T $x --> ::T) {}
just degenerates to Object or Any in the worst case.
luqui ah, we considered that
basically, sub foo (::T $x, ::T $y) {...} 13:52
looks symmetric and is symmetric
but sub foo (::T $x, T $y) {...}
autrijus great. sick minds think alike
so @Larry is okay with that?
luqui doesn't look symmetric and doesn't behave that way either
well, he's kind of punting the exact semantics of type inference
autrijus also the binding is not positional
sub foo (T $x, ::T $y) {}
will also DWIM.
luqui that's an interesting prospect 13:53
autrijus sure, he can punt because I'd like to make it my job :)
luqui I was actually thinking about this some
autrijus just that he's not actively against this idea, is good enough
luqui Any degeneracy isn't as much as a problem as I thought
autrijus huh.
luqui sub id (::T $x --> T) { $x }
autrijus with degeneracy, it means adding id() around terms will suddenly make everything typecheck. 13:54
luqui my Int $foo = id("Bar");
autrijus bzz, does not typecheck
but if you wrote ::T and ::T
luqui okay, assume I wrote that
autrijus then it degenerates and typechecks.
luqui no, it doesn't
autrijus binding T to Item or something.
luqui watch:
the system above is equivalent to the following equations: 13:55
svnbot6 r6160 | scook0++ | * Un-break Haddock for the new PIL stuff
r6160 | scook0++ | * s/it's/its/ in 10_000_ft_view.pod
luqui does("Bar", T)
does(T, Int)
which can only have a solution if "Bar" does Int, which it doesn't
autrijus er no.
you can have Any as a solution, or (Str (+) Int) as a solution. 13:56
luqui Any is not a solution that
because !does(Any, Int)
likewise with (Str (+) Int)
autrijus eh?
I'm missing something.
luqui can you clarify what you're missing :-) 13:57
autrijus ok.
you said Any does Int is false.
yet
sub id (Any $x --> Any) { $x }
is the default type.
luqui no it's not
autrijus i.e. when the user has no annotation.
ooh it's not.
luqui we were considering, before we abolished junctions, that sub id (Whatever $x --> Whatever) 13:58
is default
where Whatever is the mere mortal name for none()
fglock about the 'comma' operator - if 1,2,5..Inf is a list - scalar,scalar,list - a 'List' may contain lists? (the implementation would be cleaner if comma returned 'Array')
luqui because none() never fails to typecheck
however, using such junctions, you can prove that every type is equal to every other type
so we killed them
now we need a way to introduce untypechecked values again
autrijus yes. 13:59
in haskell it's known as Dynamic.
luqui is there a mathematically pure way to introduce such a type?
(if haskell has it, I would assume so)
luqui goes and looks at the Dynamic docs
but Whatever is an interesting prospect 14:00
svnbot6 r6161 | Stevan++ | Perl6::MetaModel - (p5)
r6161 | Stevan++ | * more untangling from the p5 package the de-sugared form
r6161 | Stevan++ | seems to be package/AUTOLOAD free now though.
autrijus sure, Dynamic is just a simple type with two coercers:
luqui it can represent anything and can coerce to anything
autrijus toDyn :: a -> Dynamic
fromDynamic :: Dynamic -> Maybe a
luqui well, yeah, that looks good
autrijus but haskell has no subtyping
;)
luqui why does subtyping kill things? 14:01
autrijus oh, because in haskell asking .does is silly
no monotype .does another
luqui ahh
14:01 autark is now known as jp-autark
autrijus anyway. 14:01
luqui I'm trying to figure out how coercions work
in the set world-view
autrijus please explain why (Int (+) Str).does(Int) is false.
what about Int.does(Int (+) Str) ? 14:02
also false?
luqui because "Int" (in) (Int (+) Str)
sorry
because "foo" (in) (Int (+) Str)
but "foo" is not (in) Int
autrijus right, so it only responds covariantly
now how do I write a type that .does(Int) and also .does(Str)? 14:03
I used to be able to say Int|Str.
which is the standard union type.
luqui Int (+) Str
yeah
autrijus er.
luqui oh
wait
wrong
Int (*) Str
autrijus good
luqui intersection
autrijus but nothing instantiates that. 14:04
(disallowing '1' for now)
luqui right, because Int and Str are by default disjoint
so Int (*) Str is the same as writing Bottom (or whatever we call it)
but there's nothing stopping you from writing: 14:05
role IntStr does Int does Str {...}
then Int (*) Str is not empty, as long as IntStr has an instance
this is what we get out of having Int and Str be roles 14:06
autrijus but still, it's not the same as Int|Str.
luqui not at all
autrijus so you took that functionality away.
yay, one less thing to worry about.
luqui this was the proof that convinced the rest of @Larry to take that away: 14:07
Foo (<=) (Foo|Bar)
Bar (<=) (Foo|Bar)
therefore, Foo = Bar
(hmm, for some reason my head is broken)
autrijus yeah 14:08
your proof is not sound at all.
luqui (that might be wrong, but the one I wrote on the whiteboard was right)
autrijus 1 <= 3; 2 <= 3; 1 = 2
yay
nothingmuch hola
autrijus whatever proof you wrote, it can be repeated at value domain with junctions.
luqui yeah
that's why it's important that "use junctions" be off by default 14:09
so they're merely a syntactic convenience
autrijus ?eval 2 <= (1|2)
evalbot6 bool::false
luqui hi nothingmuch
autrijus eh.
luqui autrijus, wtf?
autrijus ?eval ?(2 <= (1|2))
evalbot6 bool::true
autrijus luqui: bad output parser.
luqui oh...kay
ahh
autrijus ?eval ?((1|2) <= 1)
evalbot6 bool::true 14:10
autrijus ?eval ?(2 <= (1|2) <= 1)
evalbot6 bool::false
autrijus clever!
that's entirely correct!
luqui how does it do that?
autrijus so your proof isn't much of proof at all :)
luqui: it expands to ((2 <= 1 <= 1) | (2 <= 2 <= 1))
because multiway comparison autothread as a listfix.
or rather chainfix.
luqui oh neat
good for it
nothingmuch autothreading is teh suxx0r 14:11
luqui here's the proof, though since my brain is broken, it's longer than it was on the whiteboard:
A (<=) (A|B); (A|B) (<=) B; B (<=) (A|B); (A|B) (<=) A; therefore A = B 14:12
so every type is equal to every other type :-)
nothingmuch, por que?
integral (A|B) (<=) B? aren't the methods available (statically) on A|B the intersection of the methods available on A and B? 14:13
luqui integral, damian wanted junctive types to behave like junctive values
since those types are utter nonsence, we changed (A|B) to (A (+) B) (the set union of A and B)
integral oh, ok, | is a junction constructor to you, I wasn't thinking of it as that 14:14
autrijus ok. go back to union types.
sub f (Int (+) Str $x) {}
what can you do to $x
?
only things that you can do to _both_ Int and Str right?
luqui hmm.. I suppose so
autrijus which is not at all useful. 14:15
integral but isn't perl dynamic?
luqui right, this is the static side
integral So statically you don't know if it'll always be possible, but you can do it anyway at runtime
luqui and I'd like to work things out strictly, and then figure out how we can elegantly relax it
autrijus integral: but then all hope is lost for the results
I mean the result types. 14:16
because we don't have junctive types now.
previously you can carry type information around
using junctives
luqui autrijus, example?
autrijus subtype Int_Str of (Int (+) Str);
thinking 14:17
multi sub foo (Str $x --> Int) {...} 14:18
multi sub foo (Int $x --> IO) {...}
my Int_Str $x := 3;
what's the type of "foo(3)" statically? 14:19
luqui IO
but
autrijus ok. what is "foo($x)"?
luqui Int (+) IO
... I think
autrijus ok. what if I take the first case (Str --> Int) away?
luqui type error 14:20
eew
autrijus ;)
how can I write something that's (Int_Str --> IO) then.
sub f (Int_Str $x --> IO) { 14:21
given $x {
when Int { foo($x) }
when Str { foo(-1) }
}
}
luqui we could do that if we had a wicked smart inferencer
but I think in general it's undecidable
autrijus this is called typecasing ;)
luqui but where you really want to be is in pattern space
hmm, in haskell if you define a function :: SomeData -> Something 14:22
autrijus there is a reason why no languages beside Algol 68 has union types ;)
luqui if you don't exhaustively case SomeData, it lets you get away with it
autrijus but it raises a warning that is fatal under -Wall
also that's variant casing
and this is typecasing. 14:23
luqui eh, in perl land those are the same thing
autrijus not at all... variant casing is statically sound 14:24
luqui the top-level data is just a role that all the variants do
you mean by guaranteeing that you won't add at runtime?
autrijus right, closed world
you enumerate possible contructors, all yielding a monotype, at compiel time.
while with typecasing you can change the .does relationship quite randomly. 14:25
actually, entirely randomly.
luqui at runtime?
no.. you can only add to it
or am I misunderstanding
autrijus when you add to it, the original casing cease to be exhaustive 14:26
anyway, let me think about it
the Dynamic type is a pair of
(T, v)
where T is a type tag and v is a value of that type
luqui if you write it like Foo (+) Bar, then if you case over Foo and Bar, you're necessarily exhaustive
autrijus right. 14:27
ok. 14:28
my Int_Str $x;
you can only fetch $x in an environment that can accept both Int and Str
right?
(contravariance)
luqui okay 14:29
as usual, ignoring perl's dynamic nature
autrijus sometimes there's no dynamic nature :)
it's just runtime failures
or compile time error
luqui anyway, go on
autrijus my Int_IO $x; close($x)
my Int_IO $x; ...; close($x);
is blatantly unsafe 14:30
either runtime or compile time.
luqui yeah
autrijus hm, so that pretty much means we need to have typecasing as a compile time form
to recover its member types.
luqui ?
autrijus otherwise it's as good as Dynamic, aka Any.
luqui ah 14:31
autrijus because you can't write close($x) in any typesafe way
unless you can typecase it apart.
alright. I'll deal with it. 14:32
luqui it would be nice to have a form of given that can pattern guard
given $x { when Int -> $int { ... } when IO -> $io {...} }
except actually good
autrijus I thought it's legal. 14:33
I mean, it's valid p6 already.
luqui but would it imply that $int is an Int
autrijus it would also imply that $x is Int.
luqui true
hmm
could you infer that?
i mean, actually use it
autrijus good question. 14:34
given binds $x to $_
so we need binding propagation, check
when matches $_ to type
so I need a rule for the when form.
sub statement:<when>
(...)
but when is a macro that expands to 14:35
if ($_ ~~ Int) { (-> $int {...}).($_) }
right?
luqui sub statement:<when> (Class ::T, &code:(T)) {..}
yeah, pretty much 14:36
autrijus I need type environment for $_.
hm.
luqui when you reduce to single-assignment, can you reduce the type environment based on tests?
autrijus yay, dependent types
multi infix:<~~> (Any $x, Type ::T) { $x.does(T) } 14:37
but that does not constrait $_ at all.
which is why typecase is a special form.
luqui makes sense 14:38
autrijus so let's forget about that.
I'll adopt your form.
statement:<when> is a normal subroutine and contraints the $int
but not the outer $x.
you wrote Class ::T 14:39
does it mean Int_Str is a Class?
how come?
luqui yeah, that was fudgeful
well, I want a type to be passed in, and then I want to use that type statically
autrijus I thought you just write ::T.
luqui doesn't that mean a value of type T 14:40
autrijus huh.
sub f (Int, Int) {...}
I thought that's illegal.
I thought you always need to name the params.
luqui possibly so
well
autrijus how else will you refer to it?
?eval sub f (Int) {}
evalbot6 Error: unexpected ")" expecting word character, "?", "*", "+", "++" or parameter name
luqui except for siglets
autrijus siglets? 14:41
luqui but it's unclear whether you can put a siglet in a regular sub declaration
&foo:($,$)
short for &foo:(Any, Any) (or (Whatever,Whatever), or whatever) :-)
autrijus er no.
it's short for
&foo:(Scalar of Any, Scalar of any) 14:42
&foo:(Scalar of Whatever, Scalar of Whatevery)
luqui I don't really care
autrijus nod. but as I said, it makes no sense to write it in sub decl.
in p5 we had excuse because you can recover with @_
not so in p6.
luqui right
although, haskell has a use fo _
s/fo/for
autrijus I'm fine with _. 14:43
sub f (_) {}
luqui how can you tell whether that's an array?
Array _
Array *_
autrijus you can't, _ is anything.
luqui ?
autrijus if you want to enforce one of the container types always
luqui anyway
autrijus then allow
luqui back to the issue at hand 14:44
autrijus sub f ($, $) {}
is fine
sub f (Int $, Int $) {}
is fine also
but
sub f (Int, Int) {}
never makes any sense.
luqui how do you say "I want a type that does Foo, not an object that does Foo"
autrijus sub f (Foo ::T){} for sure?
luqui ? 14:45
autrijus for object you write sub f (Foo $o)
luqui yeah, but it's a little different
for that, you're asserting that $o (in) Foo
autrijus ...yes?
luqui where as with Foo ::T, you're asserting that ::T (<=) Foo
autrijus sure
that's what the sigils means
sub f (Foo @a) 14:46
luqui hmm... but with array, you're asserting that Array.returns(Foo)
okay
cool
I like that quite a lot
autrijus so sigils direct the relationship
ok. now, does ::T and &x have a container type again?
luqui hmm... you could also say that $o.returns(Foo) is being checked 14:47
autrijus my proposals is that they are either values, or use the scalar container type.
i.e. it makes no sense to tie either of them.
luqui it's difficult to rebind values, no?
oh, but you can rebind names
autrijus if you rebind &x, then you rebind using scalar's rebinding
yes.
luqui that depends on whether you can still say BEGIN { T := OtherType } 14:48
autrijus also
my &f = sub { 3 };
should be legal.
on the ground that
luqui that might be nice
autrijus my $x is constant = 4;
is ruled legal.
luqui and my T = Int 14:49
?
autrijus sure.
my ::T = Int;
you don't have prior T yet
so can't use it as bare.
luqui probably
autrijus anyway. I want to establish a invariant: 14:50
my Int $x; my Str $y; $x := $y;
should not typecheck.
but if that's allowed
then the inferencer is hindered, but I'll deal.
luqui It makes sense to me not to allow that
autrijus my Int $x; my Str $y; if (rand(2)) { $x := $y; }; f($x); 14:51
try infer that!
luqui I wonder what the larger implications of that are though
does that mean:
my Int $foo;
use AModule <$foo>; # error, can't rebind $foo 14:52
fglock I need some help with array slices
autrijus it's a double declaraion clash anyway.
similar to "my $x; my $x"
luqui in other words, we can't let people use types as a way to say "don't mess with me"
autrijus you need another scope.
my Int $foo; { use Module <$foo>; } 14:53
is entirely fine.
luqui but I guess you could always "use dynamic" on those bastards
autrijus it's just normal shadowing.
luqui so I think that should be okay
autrijus it's just normal shadowing :)
luqui oh yeah, because use is compile time
autrijus no binding occurs here, sir
luqui duh
and stuff 14:54
I get it
okay, my Int $x; my Str $y; $x := $y; is illegal for now
autrijus cool.
it also means
my Int $x; my Num $y; $x := $y; 14:55
is illegal
my Num $x; my Int $y; $x := $y;
is illegal too.
the only exempt type is Any, or Whatever, or Dynamic.
fglock: yes?
luqui not necessarily
it only needs to be contravariantly compliant if it is constant 14:56
autrijus eh, a container is used bothways.
you need invariance.
oh constant, duh
mmm that also means you can't rebind constancy away.
right?
fglock I think I found the solution myself. When you ask for a slice @a[1,2,10..Inf], the compiler splits this into 3 splices, so I don't have to care about complex lists, I think
luqui if you can, then you lose your optimizations
autrijus my Int $x is constant; my Int $y is rw; $x := $y;
exactly so, but if you can rebind types away 14:57
then those optimizations are doomed anyway.
so for now we say neither.
luqui fair enough
luqui just thought of something
if you can fudge (<=), then you can pretend that you're the same type as something else (call it Foo) 14:58
just make it so you are (<=) Foo, and Foo (<=) you
whee
autrijus yup.
I wonder why you didn't write (*) as /\ and (+) as \/
;)
luqui we considered it
autrijus (*) to me implies product types, not intersection. 14:59
luqui and (<=) as (=
cartesian product you mean?
autrijus yeah, as in tuples.
luqui for some reason Larry seems to be reluctant to add tuples
autrijus you can add tuples easily yourself anyway. 15:00
luqui but if we do add them, it will probably look more like (A, B) than A (*) B
autrijus sure.
ok. I'll go back to my inferencing work. if you question assignment-in-boolean's sanity, please report back :)
I don't think it can be a special form for if() and while(). 15:01
if ($x := 3) { ... }
I wonder if people will learn to write that ;)
if ($x := f()) { ... }
which is almost as good as 15:02
if f() -> $x { ... }
especially now we consider that $x's type stands.
luqui yeah, that might be the way to go if you want the effects to continue after the if 15:03
autrijus yup.
p6 does seem more and more functional every day.
as in, shying away from destructive updates. 15:04
I wonder why.
luqui but without being the bitch that functional languages seem to be for certain kinds of problems
autrijus oh, ocaml handles those problems just fine :)
luqui has tried to learn ocaml several times
but not very well
autrijus and ocaml has a good property - it doesn't confuse (Scalar of Int) with (Int)
luqui s/well/hard/
autrijus p6 confuses that, which is the root cause of endless confusions about container types. 15:05
luqui how could p6 not confuse that?
autrijus it can't... all C-family languages confuse that.
in ocaml to read from a variable you need to write !ref
not just ref
luqui oh 15:06
autrijus so
print "hello, world"
but
print fetch($x)
or something.
luqui that's linguistically yucky
autrijus print $x.val
luqui but i can see its appeal
autrijus sure it is, but at least you don't have the "function arguments are is constant" dilemma. 15:07
instead you say "function arguments are values"
luqui right
autrijus so, different languages and different strengths, etc.
luqui waterbed and whatnot
autrijus yup.
oh. 15:08
my Bit $x = undef;
luqui oh, I'm about to write the "value types manifesto"
autrijus legal?
luqui well, we'd have to special case it in order to disallow undef
autrijus so yeah, another C-inherited thing :)
luqui I kind of like undef being the sole instance of Bottom
maybe Undef is Bottom's name 15:09
autrijus maybe. but then Undef can be used as really everything.
a hash container, for example. 15:10
for undef.kv() -> $k, $v { ... }
you want that? :)
luqui my $foo = rand 2 ? {} : undef 15:11
I kinda do
autrijus my %x := undef;
that is a large divergence from p5.
where undef is an item
never a collection.
there is only empty array
no undef array
luqui but Larry has some problems with that 15:12
undef can carry error messages with it
autrijus ok
my Bit $x = fail "this is undef with error"
luqui but it definitely requires more thought and exploration
autrijus my %x := fail "hey look some error"
masak why := ?
luqui 'cept that ought to fail the current scope
autrijus luqui: not when it's not fatal 15:13
luqui no, it still exits current scope
autrijus well
luqui you want: my $x = foo() // fail
autrijus my %x := do { fail "hey look" }
luqui to put something into $x and continue?
autrijus better?
luqui ?
autrijus I want to bind undef into %x.
luqui maybe you use "error" to create one or something
autrijus and carry a message 15:14
anyway, with that semantic, every type "a" in perl becomes
Either Error a
down to Bit level
luqui but not bit
autrijus right
luqui because those guys don't participate in the type lattice
autrijus granted.
what about enums?
nvm, they do
luqui doesn't grok enums in perl yet 15:15
autrijus my Bool $x = undef;
is just fine.
so, fun, because no typecasing can catch that.
or rather, the first when() typecase will succeed.
luqui eew
autrijus as Undef indeed inhabits it.
luqui why does stuff have to be so complicated :-) 15:16
autrijus usually a typeful language doesn't do this implicit null thing ;0
luqui I wish it would all Just Work
dwimmy language design :-p
autrijus actually I never saw one that does.
luqui except, oh, C
autrijus C is typeful?
luqui if you pretend every type is a *
autrijus C is so weakly typed, it's not typeful at all.
luqui okay, C++
autrijus ...still weakly typed. 15:17
luqui C++ is typeful, it's just awkward
how is it weakly types
autrijus (type*)
luqui assume the nonexistence of the various casts
it's possible to write C++ without them
autrijus int a = 5;
float b = a;
luqui yeah, Perl has those too
oh
what are you talking about? that's just sugar
autrijus no, perl does a explicit coercion based on inference. at least I hope so.
luqui int a = 5; float b = a; cout << b; # 5, not *(float*)&a 15:18
autrijus oh!
sorry, my bad then.
thinko.
luqui np 15:19
autrijus anyway
but int in C++ is not a pointer type.
luqui nor in Perl
autrijus while Int in p6 is a maybe type.
luqui int isn't
autrijus right. what about Code?
Pair? 15:20
Type?
they are all maybe types ;)
luqui thinks pragma
autrijus doesn't think pragma is going to save you
(fwiw, I think (code, pair, type, junc) should be intrinsics)
if just to avoid undef probing in the runtime. 15:21
as the runtime uses those 4 types a lot.
having no unboxed form for them forces the prelude to use maybe types
luqui yeah, undef as bottom is starting to sound worse
who expects my $x = undef; $x.does(MyObject); to be true
autrijus er, but those four are not collections
right. 15:22
in PIL2 runtime:
data Item = Undef | Object Object
| Int Int | Num Num | Str Str | Ref Ref | Bit Bit
| Pair Pair | Junc Junc | Type Type | Code Code
the last line is apocryphal.
but both iblech and I feel that need.
as in, forcing all pair and code to be boxed back to Object
is a pain :) 15:23
luqui Int Int is "int" ?
autrijus yes.
luqui okay
autrijus everything else is Object.
and a Object type is actually a Maybe type. 15:24
luqui I wonder if this has something to do with the declarative closed data types that I keep trying to propose
autrijus Scala handles it thus:
my Animal $x; # never undef
luqui "enums", but better
autrijus my ?Animal $x; # possibly undef
and with a $x in type ?Animal
luqui that was what I was thinking in the pragma
autrijus you need to use defined() casing
to call a method on it. 15:25
this way you guarantee to eliminate _every_
Can't call method "meth" on an undefined value
error
in compile time.
luqui the "use undef" (on by default) pragma would imply that every Foo is actually a ?Foo
autrijus cool eh? :)
my Animal $x is defined; 15:26
XD
actually it's not that bad.
and then "no undef" will add "is defined" to things.
luqui right
svnbot6 r6162 | fglock++ | * renaming Array-Lazy to Perl6-Container-Array, Perl6-Value-List
luqui I think the pragma is important, because, like ::_, people who use it are going to want to use it all the time
autrijus you think it's cool?
luqui I like the idea though 15:27
autrijus what's ::_ again
luqui oh, it's not real (yet)
autrijus ok. I'll p6l this idea.
luqui it was brought up in the meetings to mean "this is strongly typed, but infer what type it should be"
my ::_ $x
autrijus eh.
isn't 15:28
luqui later reduced to my :: $x
autrijus my $x
good enough?
luqui and later killed
no, my $x means my Whatever $x
autrijus I see.
luqui don't write any of this down
autrijus sure. 15:29
luqui it was a lot of speculating, without deciding whether it was a good idea
autrijus my $x is typed;
luqui you and your traits
autrijus this is p6 ;)
luqui but, after all, that's why we introduced them
good for you, get us out of linenoise hell
autrijus use traits <constant typed defined Tieable>; 15:30
my $x; # automagically said
mmmmmm.
I must say I like that. 15:31
luqui you're now writing in a static language 15:33
svnbot6 r6163 | fglock++ | * removed old Array-Lazy
luqui that you can declare to be dynamic when you feel like it
autrijus yes.
{ no traits <typed>; ... }
luqui if only writing compilers for static languages weren't orders of magnitude harder than for dynamic languages
I mean, and getting them to be optimally fast
autrijus I would point out that writing good runtimes for dynamic languages is order of magnitudes harder. 15:34
luqui fair enough
autrijus it's the same carpet.
luqui so that means that... um
we've got the worst of both worlds
autrijus so that means p6 is very hard to implement.
thank you, I already know that :)
luqui haha
oh, did you fix the syntax error thingy that was bugging me so much
or do I still need to do that 15:35
autrijus you mean ::Class::Name?
luqui no, I mean syntax error line numbers propagating way too far up
given { # 500 lines }
error on line of given
autrijus oh that. I think I fixed that.
luqui hooray
autrijus not 100% sure
but I think so
luqui maybe I can start again on some p6p6 stuff 15:36
(not that I was really blocking on that)
(it was just annoying me)
(and I was just being lazy)
but I've come back from OSCON with a much better understanding of haskell at least
all I need to do is multiply that understanding by 10 and maybe I can hack on the .hs files in pugs 15:37
autrijus :) I think I'll welcome your help on the PIL2 type inferencer. 15:38
but I need to do some more Visiolization first.
so I can visiolize the problem better.
luqui what does V11n mean?
autrijus luqui: it means drawing stuff out like pugscode.org/images/container.png
luqui ahh that stuff
autrijus it's made by visio, hence the name. 15:39
luqui well, I'm interested in type inferencing stuff
so I welcome your invitation :-)
autrijus yay. all you need is TaPL. failing that, the paper "colored type inference" is enough
luqui is this going to be written in haskell
autrijus the first pass, for sure, because you really want a minimally vague language to write that in.
luqui or are we going to write the inferencer in perl6 and call out 15:40
autrijus but when it's there, we can write it in the static dialect of p6 ;)
luqui hehe
autrijus problem is we don't have a static dialect yet.
luqui right
integral autrijus: "Colored local type inference"? 15:41
luqui I've been working on an algorithm to solve the does() equations above
autrijus right. sorry 15:42
our problem is even harder than that paper's
because we have both union and intersection types.
luqui and difference :-) 15:43
autrijus right, and difference types. that's very new, thank you.
luqui no, we had it before with and(..., none(...)), but it was very poorly defined.
autrijus I didn't think you can use junction literals in type position. 15:44
I thought only infix
and none() is not infix.
luqui I thought you could before
anyway, it doesn't matter anymore
autrijus none of AES says that.
hurray :)
luqui: my proposal is on p6l now :) 16:12
luqui reading 16:13
hmm, do you realize that "use traits <defined>" is pretty similar to "use fatal"
autrijus no. 16:14
"use fatal" covers void functions
luqui yeah
autrijus as well as bindings
as well as other things.
luqui that's why I said "similar"
Limbic_Region wants a 'me' pragma
autrijus well, yeah...
luqui use me;
autrijus sue me;
Limbic_Region require me; 16:15
luqui hmm, would "use me" just be a recursive call to "import" ? 16:16
oh, sorry, :-) 16:17
autrijus I think you need the Ac prefix.
luqui it could be implied by default when you're using Perl 6 at all
autrijus luqui: I've read this rumour: www.sauria.com/blog/2005/08/04#1365
"...The most interesting bit of information from Larry's talk is that the Pugs project appears to be the choice for the compiler for Perl 6. At least, I think that's what he said, because it was a little difficult to separate the information bits from the humor bits."
obra Yeah. He said nice things about pugs. 16:18
But not quite that
autrijus I wonder what transpired to make ed think that.
s/ed/Ted/
*nod*. 16:19
luqui I don't recall anything
but that's mostly because I consider pugs to be the same thing
autrijus okay, just want to derumour rumours :)
luqui so he could have said it, and I would just keep nodding
autrijus obra: ok... I'll reply to that blog then. is it okay if I quoted your two lines? 16:21
obra Sure. 16:22
autrijus hits "Submit"
thanks :)
obra Larry praised autrijus and pugs for making perl6 fun again and getting up lots of momentum and excitement for perl6. 16:23
oops. too late ;)
autrijus :) 16:24
"is typed is defined" alone would make me want to use perl6 :)
hm. come to think about it, I wonder why perl5 people, even without access to "err" and "//", tolerates null pointer exception this much. 16:26
not to mention easy-to-remember hard-to-get-right "if (length())", "if (defined())".
luqui I don't use either of those 16:27
but I'm very liberal in my use of undef
autrijus luqui: you just test for truth?
luqui yeah
autrijus so if you write a web form and I fill in "0"
luqui I don't write web forms :-)
autrijus I can count on my input to disappear :)
ah. that explains :)
luqui I think my code works exactly how it's supposed to, but I only recently started using warnings 16:28
so that means I only recently learned about "no warnings 'uninitialized'"
bbs 16:29
autrijus Value of %s can be "0"; test with defined()
(W misc) In a conditional expression, you used <HANDLE>, <*>
(glob), "each()", or "readdir()" as a boolean value.
yow. ad-hoc inferencing... I can't add my functions to that list :-/ 16:30
integral "null-pointer exceptions" in perl a more benign that C ones though: they can be caught, and they give better error messages
autrijus integral: right, but it's of the same benignness as Java
and Java people doesn't exactly love those.
google for "error occurred" nullpointerexception yields ~10k pages 16:32
on the other hand
"software error" "on an undefined value"
yields more than 35k.
I guess either perl5 is more popular for web scripting, or is more affected by this :) 16:33
(or both)
Limbic_Region autrijus - it is has been my experience that p5 programmers who make the mistake of only testing for truth when defined false values are valid are just as likely to make other assumptions about input (that end up being wrong) 16:39
so I would say it is quite prevalent
"Know your data" is a lot easier said than done 16:40
autrijus what are other assumptions?
Limbic_Region people who parse html with regexen expect input to conform to THEIR idea of valid 16:41
autrijus I'd single out defined/length/truth as the one thing that p5 encoruages people to confuse.
Limbic_Region and every case where division is involved 16:42
autrijus yeah, not testing regexen is indeed bad.
Limbic_Region I am just saying that the code assumes certain input and don't add error handling for input that doesn't match that expectation (or better yet handle it) 16:43
autrijus *nod*
Limbic_Region fixing defined/length/truth isn't going to make the people making bad assumptions start writing better handling routines - it is just going to prevent them from shooting themselves in the foot as much 16:44
autrijus right. it's the same idea as // and err
if the programmer is clueless, it's doomed anyway
but for clueful programmers, it shouldn't be that painful.
Limbic_Region of course, playing devil's advocate - one might say by making certain cases less likely to result in a blown off face - the coder is more likely to be careless 16:45
autrijus yup.
clkao // as default depot
autrijus // as comment
clkao: you can type "/ //" you know :)
Juerd # to indicate IRC channel names
hm... :) 16:46
autrijus mm bad ideas.
Limbic_Region of course there needs to be a new operator created - one that says if defined but false do this, if defined and true do that, and if ! defined to something else entirely
Limbic_Region ducks 16:47
autrijus given $x { when undef { ... } when true { ... } default { ... } } 16:49
not exactly hard.
Limbic_Region right - which makes // and err completely un-necessary 16:50
I was playing antagonist again
autrijus no, err is neccessary as an infix :)
Limbic_Region finding the first defined value in a list ;-)
Limbic_Region likes that example too
autrijus riiight.
?/? :/: 16:51
Limbic_Region I guess what I was saying is that while // and err make life easier they aren't necessary
autrijus stops bad ideas
Limbic_Region and if you are going to make life easier - why draw the line there
autrijus it is neccessary when you don't have a good given/when form
Limbic_Region knows why but was being an antagonist anyway 16:52
autrijus as otherwise you need to invent a new temporary storage :)
do { for (f()) { if (defined) { ... } elsif ($_) { ... } else { ... } } }
is the p5 form.
very readable, that :)
Limbic_Region there is a price to be paid for having a language rich enough to support clean, clear, concise code 16:54
and both the consumer (programmer) and supplier (developer) have to pay the piper 16:55
autrijus that is undoubtably true.
but the price is always there, either in language or in idiom.
Limbic_Region admittedly the consumer gets the better end of the deal
autrijus sub f ($x, $y) {} # language
sub f { my $x = shift; my $y = shift; } # idiom 16:56
sub f { my ($x, $y) = @_; } # another idiom
Limbic_Region as a consumer, I first have to learn the developers concept of clean, clear, concise use of the language 16:57
second, I have to learn enough of that language to make it do what I want since rich means big 16:58
that's not too bad considering what the developer has to pay
luqui Of course, the whole idea of Perl 6 is to make it easy for people to come from any paradigm 17:02
which means that we developers have to know all paradigms...
there's a covariance/contravariance thing going on here
autrijus luqui: you saw my === semiproposal? :) 17:04
17:04 Aankh|Clone is now known as Aankhen``
luqui nopers 17:04
where? 17:05
autrijus multi append ([], @ys) { @ys }
multi append ([*$x, *@xs], @ys) { ($xs, append @xs, @ys) }
sub last (@l) { my ($`x, @`xs); append(@`xs, [$`x]) === @l; $`x }
silly example
but illustrates the point.
luqui it does? what are the backticks? 17:06
autrijus free logic variables.
luqui don't those multis need to know that they're working on logic variables 17:07
svnbot6 r6164 | fglock++ | * rearranging ext/Perl6-* dirs
autrijus no, that's structural.
luqui ?
autrijus the unpacking, listfix comma etc all contain solvers 17:08
luqui logic variables have the same kind of evil that junctions do... perhaps even greater
autrijus so multis defined with them can be solved as well.
luqui: right... but I've been studying Curry and it makes Haskell logical just by introducing two forms
let x free
x =:= y
that's all :)
and
if you don't use them, you get vanilla haskell
when you start using them, you get a logical languag. 17:09
luqui and you start infinite looping
autrijus most of the infinite loops are detected in constant time.
luqui ?
how
Arathorn wouldn't you need a WAM to detect that?
autrijus Arathorn: yes. 17:10
luqui: by modifying the runtime to be powerful enough.
luqui: I'm not saying I want this in perl6 :)
but it is nice to think about.
luqui you would combine predicates by just &&ing them together, and they would try as hard as they could to make it true 17:11
even, backtrack if they couldn't
autrijus ah, you are talking about exponential time, not infinite
right, you can't avoid those.
luqui no, infinite. I've been writing a bit of prolog recently, and infinite loops are pretty common 17:12
autrijus fortunately, in a mixed functional/logical language, the free variables are lexical and can be constrained.
svnbot6 r6165 | fglock++ | * updated P6::V::List makefile
r6166 | fglock++ | * P6::C::Array cleanup
autrijus luqui: and prolog doesn't detect them for you?
luqui nope
autrijus how strange. curry does that all the time.
give me an example?
luqui let's see, I'll give you a sketch
when I was trying to write a type inferencer, I had predicates like:
sup(X, Y, X) :- does(Y, X). 17:13
autrijus Curry explicitly says "Prolog is inefficient, contains infinite loops, due to its uncontrolled nondeterminism"
luqui sup(X, Y, Y) :- does(X, Y).
sup(X, Y, lub(x,y)).
autrijus and the Curry report claims that it solves that
luqui huh
autrijus so maybe you'd like to take a look. 17:14
luqui I was planning to anyway
autrijus (I'm using danae.uni-muenster.de/~lux/curry/)
luqui can I run it on my amd64 without template haskell
autrijus sure
I think the implementation is h98.
or at least no TH.
luqui oh, you should see my Monad.pm 17:15
Limbic_Region luqui - it isn't polite to be showing off your monads in public
autrijus does it come with Monad/Transformer.pm?
luqui doesn't grok monad transformers yet
so no
autrijus k
luqui it also doesn't have a lot of convenience functions that it should 17:16
SamB heh
luqui it's just the basic closure transform on blocks, basically
autrijus ah.
in p5 or in p6?
luqui p5
luqui awaits p6 grammar munging
autrijus k.
luqui though it's not cpanned, because I haven't written any documentation
luqui goes to read about monad transformers 17:17
svnbot6 r6167 | fglock++ | * P6::C::Array cleanup (2)
autrijus thinks luqui is in for a lot of fun 17:19
luqui: Harrorth talks about them quite a bit
luqui "fun" or fun? 17:20
autrijus fun.
svnbot6 r6168 | fglock++ | * Perl6-Container-Array passes all tests again 17:23
Limbic_Region autrijus - do you keep regular hours for $work ? 17:24
autrijus Limbic_Region: semiregular, yes.
Limbic_Region so when do you um sleep?
autrijus every (monday and/or tuesday), thursday.
Limbic_Region ahhhh
nevermind 17:25
autrijus more and than or.
the work hours are usually noon to 7pm or so 17:26
so I can get by by sleeping at 2am or so.
which translates to no serious hacking on workdays.
help, I'm scared by larry. 17:28
stevan: say defined IO; # prints 0
That is, we already have an object of type IO that doesn't really
have a value yet.
I can't seem to understand this. :-/
that sentence spells "prototype based OO" to me 17:29
and I'm not sure I understand that
autrijus tries to understand the concept that ::IO isn't defined. 17:31
autrijus also wonders why bool::false suddenly stringify to '0'.
autrijus asks larry. 17:35
obra What should it stringify to? 17:37
and what does bool::true stringify to?
autrijus ?eval ~(1 == 1) 17:38
evalbot6 '1'
autrijus ?eval ~(1 == 0)
evalbot6 ''
autrijus i.e. same as p5
(I assumed.)
obra *nod* For some reason stringifying as 1 and 0 does seem to make a bit more sense in my head 17:39
autrijus me too, but I want larry to confirm that :)
obra :)
autrijus I mean it's certainly not as controversial as Y2K.
but still a large diverge.
hm, new ruling 17:40
perl6 -e 'print foo()'
compile time error!
obra wonders how much the y2k thing will fuck up novices.
autrijus sanity.
I always thought it's a very bad idea to delay that error to runtime. 17:41
compare perl5:
$ perl -cwe 'use strict; print foo()'
-e syntax OK
mauke yeah, but perl5 has Symbol::Approx::Sub 17:42
autrijus ...you can't have it take effect when you don't load it...
mauke ok
autrijus also, the presence of AUTO* defeats that check
and that's exactly what S::A::Sub does. 17:43
so it's same in p6.
fglock I still don't get how to tell if a parameter is an Array or not - I just introduced a bug I can't find out how to fix 17:45
(i'm working in the zip() implementation)
autrijus .does(Array)?
fglock I'll try that 17:46
geoffb admits to himself that trying to backlog 2 weeks of #perl6 is insane
fglock how do I expect a list of array? "List of Array @list" ?
autrijus Array @list 17:47
is good enough.
geoffb autrijus, is STATUS relatively up to date?
autrijus Array *@list
fglock when do I use *@list ?
autrijus if you expect slurpy
fglock: you use *@ if the fun is variadic
you use @ if you expect only one argument
fglock so *@list can be a list of array, right? my problem is elsewhere then 17:48
autrijus geoffb: wow. you triaged it with my journal of yeterday?
fglock: however, *@l has a bad habit
you can't pass in
foo(@a, @b, @c)
need to say
foo(@a, \@b, \@c) 17:49
er
foo(\@a, \@b, \@c)
think perl5 for why
Aankhen`` That sux0rz.
fglock "Array @list" didn't work 17:50
moan hm, 2 questions
why doesnt this parse?
my Sub $sub = sub (Str $param) returns Void { $param.say(); };
and why does it parse if i remove the trait, but still does not care about the parameter-list?
autrijus fglock: typechecks generally doesn't wokr.
geoffb autrijus, not sure I understood the question . . . in any case, checking I find that no, STATUS is way out of date. Hmmm. 17:51
autrijus geoffb: my journal of yesterday is a STATUS of sorts.
geoffb :-)
autrijus, OK, I'll see if I can fix up STATUS to match. 17:52
fglock I found the problem - CORE::zip has a higher precedence than $object.zip !!!
geoffb Then maybe hack.pod if it turns out to be OOD
autrijus geoffb++
fglock: yow!
fglock it wasn't calling "my" zip 17:53
autrijus fixing!
fixed.
committing
fglock BTW, how can I force calling CORE::something instead of the method?
autrijus &*zip($a, $b);
the & is optional. 17:54
*zip works too
fglock cool - I was trying *::zip ...
geoffb ?eval "testing, testing, checkcheckcheck" 17:55
evalbot6 'testing, testing, checkcheckcheck'
svnbot6 r6169 | autrijus++ | * CORE::zip should not override $object.zip.
stevan autrijus: say defined IO; 17:56
that makes sense (sort of)
if your platform or version does not have ::IO, it wont be defined 17:57
autrijus but isn't IO resolved to ::IO
stevan yes I think so
autrijus eh sure but this is
defined
geoffb Has iblech reported a new JS test %?
autrijus larry is saying ::IO is the undef instance for IO
geoffb: no, he's CPS'ing
stevan ??
autrijus so the high water mark is 64% or so
stevan undef instance??
autrijus stevan: look at the p6l post
I think he is utterly confused
or I am
can't tell
stevan looks
autrijus: BTW - did you see my $obj.meta.add_method() post? 17:58
autrijus Now I realize that in perl 6 you can re-open classes and add methods to
them. However this is not convenient for programmatic class generation.
stevan yes 17:59
autrijus you mean runtime, don't you
introducing new methods at runtime :)
stevan yes runtime programmatic class generation without eval
yes
or even a new class, but thats something for later
autrijus larry ruled anon methods must exist. 18:00
stevan ok, good
then I like the anon method approach then
autrijus so something like 1) obviously works.
yeah.
stevan it is cleaner
autrijus it is.
it involves no reblessing.
stevan :)
autrijus I hate reblessing
geoffb P5 and PIR backends are still stalled waiting on PIL2 eval, yes?
autrijus geoffb: PIR is really waiting on leoctx5. 18:01
stevan autrijus: why is undef not like null in Java?
geoffb oy, leoctx5 is still not merged? Heavens
autrijus stevan: I think they are identical.
stevan ok
autrijus geoffb: *sigh*
stevan so I see your POV then
stevan looks at larrys post 18:02
autrijus geoffb: P5 is not stalled on anything really... it's moving as a backend on the metamodel and container type front.
I don't think it's stalled.
dudley is larry saying that a Class is an undef value, whereas an Instance is defined?
stevan oh,... who is doing the container types?
autrijus stevan: fglock did Array
or rather is doing.
stevan dudley: nice
autrijus Scalar is trivial.
stevan I thought he was doing it in Perl 6 for some reason
autrijus Hash is not yet touched.
he is doing it in both. 18:03
he is insane.
fglock :)
autrijus :)
stevan this project seems to atract those types :)
autrijus verily.
fglock i thought there would be a "mini-perl6" that could use it
there exist something like a "lazy hash"?
autrijus heavens no. 18:06
stevan autrijus: see Larry's post on the metamodel thread
autrijus yes?
geoffb (sorry for delays, multitasking here): OK, so P5 MM and containers are being written, but the runloop is unchanged?
autrijus Foo is the name of a potentiality. It's the name of anything you can
construct using the Foo package, the Foo undefined value, and the Foo
metaobject (if any).
stevan Foo is the name of a potentiality.
autrijus I need an operational semantic for that potentiality. 18:07
stevan autrijus: let me think this over some more
autrijus ok.
stevan I see a glimmer of sanity in it
I just need to let it sink in
PerlJam lwall++ (class as a spotlight)
stevan autrijus: This actually feels like a clarifaction of the ambigious "Foo" 18:08
but I have to think about it some more
autrijus stevan: but it's resolved to one or another.
"the Foo undefined value"
is particularly strange.
PerlJam autrijus: but it kind of makes sense.
autrijus I hope he is not talking about
my Foo $x .= new;
but I think he is.
stevan If you read it as: Don't care 'bout that. ::Foo is just the delegator, the 18:09
dispatcher of dispatchers, judging everything and nothing.
geoffb Does PIL2JS use PIL2 or PIL1 still?
stevan or sorry "Foo" is just the delegator
PerlJam autrijus: I don't. I think he's talking about my Foo $x; $x is Foo
autrijus geoffb: PIL1. PIL2 is not there at all. I've been building support code for it.
PerlJam Er, that last bit really isn't perl6 syntax though it looks it. :)
geoffb autrijus, OK, gotcha
stevan I agree w/ PerlJam
autrijus okay. if that is the case
stevan ::Foo and meta(Foo) are really backstage components 18:10
autrijus $x.whatever is as good as Foo.whatever ?
stevan and "Foo" is the bridge
PerlJam I wonder what a typed undef stringifies to? my Foo $x; $x.say; # Foo(undef)
stevan and Foo can be undef in certain contexts
autrijus PerlJam: it stringifies into a warning and an empty string.
stevan autrijus: this is not unlike Java 18:11
autrijus stevan: but in java, null can't be used as a class method
I mean, if you have a variable of type Foo that contains null
PerlJam autrijus: oh right. My mind was starting to wander :)
stevan yes, and neither should the undef form of "Foo"
autrijus you can't suddenly pretend it's a first-class class object.
stevan so my Foo $x;
$x is a special Foo(undef)
autrijus I see 18:12
my Foo $x
as being
stevan until you STORE something into $x
autrijus x :: Scalar (Maybe Foo)
which can be instantiated by either Foo
I mean (Just Foo)
PerlJam stevan: But would my Foo $x = undef; be the same as my Foo $x; ?
autrijus or Nothing.
which is still exactly the same as java.
stevan PerlJam: good question, no idea
autrijus PerlJam: the first one burns some more cycle. 18:13
;)
stevan :D
PerlJam stevan: I'd imagine that it would as the container is responsible for storage.
autrijus the observable result though is the same.
stevan PerlJam: yes that does make sense
PerlJam right
stevan but when you were not looking, all hell would break loose 18:14
autrijus however, consider
my Foo $x is constant = undef;
vs
my Foo $x is constant; $x = undef;
should the second form die?
stevan those would have to be valid
autrijus my Int $x is constant; $x = 10;
stevan only if it was in violation of the "is constant" part 18:15
autrijus I'm talking about that part, yes.
stevan I dont know
maybe
autrijus i.e. does "constant" means "single assignment; assign before use"
or
"is constant = 123" is actually a special form for "is constant := 123"
or is the example in synopsis a typo? :) 18:16
stevan I think both forms should work then
Larry says: Apoc are purely for entertainment purposes
autrijus but not Syn
geoffb Is the JS MM integration complete, or in progress? And how close is the JS MM to the P5 MM in terms of completeness?
stevan I assumed the definition sould be extended to them
geoffb: JS MM is the most integrated 18:17
autrijus my $x is constant; if (0|1).pick { $x = 'initialized' }; $x = 'foo!'
PerlJam stevan: no way, Syn are definitivish :)
stevan however it is not boostrapped in the same way
autrijus hm, I'll ask p6l.
stevan geoffb: the p5 MM is bootstrapped, but not integrated at all
PerlJam autrijus: my $x is constant; # compile time error as there is no initializer.
geoffb stevan, can you explain that a little further? How can the JS MM be integrated without bootstrapped?
stevan PerlJam: it's the :ish" part that'll getcha 18:18
PerlJam autrijus: maybe not if what was wanted was a constant undef :)
stevan geoffb: in the bootstrapped MM, the following is true: MetaClass is instance of MetaClass; Object is an instance of MetaClass; MetaClass is a subclass of Object; 18:19
this is not true in the JS model
only in the p5 model
geoffb ah, I think I get it.
As long as you don't look to deep, the MM works in JS. But in P5, it's deeply correct, but not working
stevan geoffb: see the 10,000 ft view in the perl5/Perl6-MetaModel/docs dir, it has some more details and pretty pics of this bootstrap stuff 18:20
geoffb: kind of yes
geoffb Stevan, yeah, looked at that. Trying to make up for OSCON and related loss of #perl6 by doing something useful and updating STATUS. :-)
stevan geoffb: bootstrapped means less work for the integrator (in theory that is, no in practice yet)
geoffb++ # some one has to do the dirty work :) 18:21
Juerd gmc_: Possibly, the "connection" you saw did not involve the network at all.
eh
What the.
svnbot6 r6170 | fglock++ | * New method Perl6::Value::List.from_coro( $sub )
r6170 | fglock++ | * tests pass (again)
Juerd What am I doing in this window, so suddenly?
ww
stevan and speaking of dirty work, I have to get back to my $work
geoffb stevan++ # I have it easy, stevan's actually writing the code :-)
stevan :) & 18:22
autrijus does more p6l brain-triaging
stevan BTW - if anyone who wants to un-warknock my $obj.meta.add_method() thread it would be much appreciated :) 18:23
fglock a question about lazy list operators - if I do "@a=@x.grep{..}", and @x changes, then the non-instantiated part of @a will change, right? 18:25
(otherwise I have a big problem to solve) 18:26
autrijus stevan: did so.
geoffb Parrot embedding still working as of 0.2.3? (I can never know, because this POS system can't link a parrot-embed pugs) 18:27
autrijus fglock: if @x is strict, then @a is strict
fglock: so if you change @x, nothing happens
geoffb Or are people stuck using 0.2.2?
autrijus geoffb: I think both work, but I'm not entirely sure. 18:28
geoffb reflects unsureness directly to STATUS file. :-)
autrijus fglock: the lazy parts of @x would certainly reflect to @a. 18:29
fglock: so if you have
@a = grep { /^foo/ } =open('/etc/passwd');
and read the first line of @a
and change /etc/passwd
fglock autrijus: so I need a to_strict() method. What if I push a lazy list into a strict Array? does the Array turns Lazy, or the list turns strict?
autrijus then strange things may happen, yes.
geoffb Am I correct in assuming that since you two are actively speaking of laziness, it doesn't work yet, but is in rapid progress? 18:30
autrijus fglock: an Array is composed of any number of either eager or lazy components.
fglock: pushing a lazy list into it simply adds a lazy component to its end.
fglock ok, so there is no such thing as a strict or lazy Array - that's good
geoffb I never thought I would ever be a self-appointed doc monkey on any project . . . .
autrijus geoffb: yes and yes. 18:31
fglock: sadly, there is a strict array that forces everything stored into it to be subject to **
** is the steam roller that demands the values
(not recursively)
you can implement it as .flatten 18:32
putter geoffb: 0.2.3 embedds fine (at least on FC3 amd64)
fglock by not-recursively do you mean other dimensions? (flatten sounds like flatten dimensions)
geoffb putter, thanks! 18:33
(and thanks to autrijus and stevan for answering my questions)
putter nothingmuch: your smoke is dead :( *tear* and if it supported parrot/rules, we could just point pm at it to find out what is/isnt working...
np. :) 18:34
geoffb++ # STATUS
autrijus larry revealed his true intention! 18:35
: My current understanding is that the typechecker considers IO to be of
: Class type, not of IO type; the fact that IO.does(IO) is true is purely
: an illusion created by special dispatch for .does.
Well, that's what I thought last week. :-)
and then.. 18:36
But these days I'm wondering if the whole point of a class is to proxy
for its missing members, and everything else is deferred to the metaclass.
hrmph.
autrijus ponders whether to ask for code examples, or to wait until dust settles 18:37
autrijus also ponders whether larry is restating the prototype-based OO idea. 18:38
putter thinks we need feather running a smoke... it looks like jonathan's is the only working public smoke... other times it seems to just be nothingmuch...
fglock what is the result of the "comma" operation in 1..10,20..30 ? (I hope it is an Array made of 2 lists) 18:40
autrijus fglock: your hope is granted.
fglock :) I thought comma was a list builder 18:41
autrijus it is an array made of two lists, but with 21 elements.
fglock sure
autrijus :)
putter autrijus: re "I hate reblessing" ... when individual objects can add and remove methods and fields (and if they can't, ruby remains a more powerful language) you pay most of the compile pain right there. individual objects being able to does and undoes rules follows. at which point reblessing is rather painless. no? ;) 18:42
s/rules/roles/
svnbot6 r6171 | geoffb++ | Update STATUS to 2005-08-10
autrijus putter: when you start removing methods from classes, you enter the typeless realm. 18:43
putter: where no error can be detected statically
so yes, sure, you can do that, but I hate that :)
I think we can start bill perl6 as "Ruby with Types"
or something like that :)
putter renormalist: subpatterns work. the syntax is <subrule> rather than <$subrule>
autrijus or "Ruby with Types and Unicode" 18:44
avar mm unicode
putter autrijus: use typelessrealm; :)
geoffb A language designed by a Japanese person doesn't do Unicode?
autrijus geoffb: shocking isn't it
cf. Why's "Time.now" movie.
geoffb uh, YEAH
autrijus you know, J was the most antiunicode people. 18:45
of CJK
who were the most antiunicode region.
geoffb Why?!?
avar you can add unicode support to ruby by modifying the core classes at runtime though
geoffb And why is it sometimes CJK and sometimes CJKV?
autrijus geoffb: because vietnamese shares some traits and not some others 18:46
geoffb geoffb-- # ignorant American
Fair enough
autrijus avar: right, and guess how fast it is :)
geoffb: anyway, jp people hated unicode
putter re typelessrealm, given that the world is moving towards long running self-updatable systems, I think the bug lies in the compile/runtime distinction. That has to be blurred.
geoffb They wanted codepage hell?
autrijus because Unicode didn't contain enough characters for their use
and blatantly ignored characters written differently 18:47
geoffb Are recent versions still missing what they want?
autrijus and cap things at 16bit.
but all of these gone away after Unicode 3.0
geoffb ah, good
autrijus but old impressions die hard.
avar autrijus, geoffb: pastebin.com/333941
SamB so how long until japanese source files are in utf8
geoffb nodnod
avar prints 2 then 1
autrijus but 3.0 is 1999
SamB and how long until emacs properly supports that?
geoffb SamB, I don't think you can say that emacs properly supports anything, and I say that as an emacs user 18:48
autrijus and Ruby is 1993
SamB well, I mean instead of just having placeholders for everything
autrijus 1993 is unicode 1.1... unicode at its worst
geoffb AH! It all makes sense now
putter ride's here. & 18:49
cheers :)
autrijus avar: yup, but you can't mix things.
SamB I still think unicode is an ugly tangled mess
but it is PROBABLY an improvement over encoding hell
autrijus avar: wacky though perl5's unicode model is, you can at least mix stuffs with different encodings.
(and charsets.)
geoffb You know, I really wish US schools actually made even a vague attempt to teach children about anything other than local politics
avar they teach politics? 18:50
avar suprised
autrijus ...and intelligent design
geoffb thankfully avoided ID hell . . .
SamB you know, I don't have a clue about local politics. probably because I'm homeschooled.
dudley US schools have a hard enough time convincing kids they need to know anything about their own government
much less someone else's 18:51
geoffb avar, yep: "Commies Bad. Slavery bad, but only if you call it that."
autrijus it's really funny reading en.wikipedia and watch people thinking that ID is somehow a worldwide movement.
SamB what is ID?
oh, right, intelligent design.
geoffb SamB, an attempt to put a christian ethos on things without actually referring to particular christian entities 18:52
But there I go again.
SamB hmm, I can't remember the phrase for "God-directed evolution"... 18:54
autrijus is that like type-directed evaluation?
geoffb SamB, I suppose that depends on how directed you mean.
SamB how about "extreme creation"?
geoffb SamB, heh 18:55
Would creationism directed by matched male and female gods be "pair programming"?
dudley how about "metacreation"?
autrijus "Evolutionary creationism"?
"Theistic evolution"?
dudley autrijus: You can't say evolution. It's just a _theory_ , not a _fact_ 18:56
stevan IMO "intelligent design" is as much a valid argument for UFOs as it is "God"
SamB yeah, "theistic evolution" is what I thought to, but I looked "theistic" up in dict, and I wasn't sure if that was right or not...
dudley or so goes the argument around here.
PerlJam dudley: just like the electron
autrijus dudley: just like peano numbers! 18:57
geoffb Personally, I still like the idea of someone being proud of designing fjords. 'Cause damn, they're just cool.
SamB wait, I thought peano numbers were real!
PerlJam signs up for the faith-based science classes now
autrijus SamB: numbers are facts? surely you jest
SamB stacks of cans act just like peano numbers 18:58
geoffb To pythagoreans, I suppose they were
SamB unless you knock them over
autrijus SamB: that's what "theory", or "model", means, really :)
we model cans with peano numbers, falling stuff with gravity, etc.
SamB hehe. anyway, why can't we say the names of theories again?
autrijus maybe because they are now undefined instances of themselves? 18:59
;)
dudley Oh, you can say it, but it's not true because it's not a fact
svnbot6 r6172 | fglock++ | * New methods Perl6::Value::List.flatten(), is_lazy()
PerlJam autrijus: in Larry's world all we can say about them then is their name!
autrijus say +defined Evolution; # prints 0
dudley it's only a theory, which means "something some scientist guy made up to get money from the government" 19:00
dudley lives in a place where people actually believe things like that 19:01
geoffb wow, sorry to hear that dudley
PerlJam dudley: you live in Kansas? 19:02
autrijus well it looks like a rebindable, dynamic, weakly typed belief system.
dudley PerlJam: damn close. Arkansas.
geoffb Of course, I live in a place were people are equally likely to believe the Pope is all-knowing, and that crystal energies are the key to global harmony . . . .
PerlJam geoffb: except for the all-knowing pope that sounds like somewhere in California 19:03
oh wait! Are you in Canada?
geoffb PerlJam, Sonoma county in Northern CA. Catholics, Mormons, Hippies, you name it. 19:04
CA == California, not Canada
And LOTS of each
PerlJam geoffb: don't let them breed and it shouldn't be a problem. 19:05
geoffb has always thought it must be odd living somewhere that almost everyone believes the same thing
PerlJam, I wish!
PerlJam geoffb: or introduce a predator to the ecosystem.
autrijus geoffb: it's easy... all hermits know that
geoffb LOL
dudley geoffb: Especially if you believe nearly the polar opposite
autrijus for small values of everyone, of course
geoffb dudley, oh yeah, I'll bet! 19:06
dudley but autrijus is right, it's a lot easier if you're a hermit
PerlJam I'm in south texas were conservative republicans are rampant. There are small pockets of free thinkers but they are few and far between.
geoffb PerlJam, what else besides Austin in Texas has free thinkers? 19:07
(honest question)
PerlJam geoffb: you need to think in terms of communities around the size of 20 or 30 people rather than cities. Free thinkers are embedded everywhere in all Texas cities, it's just that there are so few of them. 19:09
svnbot6 r6173 | autrijus++ | * add an abstract, hopefully more efficient and one day 19:11
r6173 | autrijus++ | also more powerful, Str type.
autrijus bah. w3m ate my journal. 19:28
obra :(
autrijus doesn't feel upbeat enough to write it again :-/ 19:29
obra did it leave a vim tmpfile?
autrijus er, nothing like that
I clicked "Preview" and then quitted w3m.
probably not w3m's fault.
I blame it nevertheless.
obra huh. my w3m always leave tmpfiles around, both for render and for texteditor files
autrijus no vim tmpfiles
obra ls -lart ~/.w3m?
autrijus obra: nono... I saved it, hit preview 19:30
thought I hit save
then quite
*quit
checked, no luck
obra eit :/
I'm sorry
autrijus np... I think I'm too zonked anyway
autrijus proceeds to sleep :) *wave*
Qiang night 19:31
autrijus night Qiang :)
&
geoffb (GI infections)-- # 2-year-olds are better at sharing sickness than anything else 19:32
svnbot6 r6174 | fglock++ | * New methods Array.flatten(), is_lazy() 20:00
r6175 | geoffb++ | Update source map to 2005-08-10; reorder a couple lines that don't match tree output
geoffb ?eval sub log2($num) { log($num) / log(2) } sub order($num) { log2($num) } sub commit_order ($user, $commits) { "$user has commit order { order($commits).as('%.2f') }" } commit_order('foo', '29') 20:06
evalbot6 Error: No compatible subroutine found: "&as"
geoffb What number formatting function works in pugs right now? 20:08
?eval sub log2($num) { log($num) / log(2) } sub order($num) { log2($num) } sub commit_order ($user, $commits) { "$user has commit order { int(order($commits) * 100) / 100 }" } commit_order('foo', '29') 20:09
evalbot6 'foo has commit order 4.85'
geoffb ?eval sub log2($num) { log($num) / log(2) } sub order($num) { log2($num) } sub commit_order ($user, $commits) { "$user has commit order { int(order($commits) * 100) / 100 }" } sub cheer ($user, $commits) {my $autrijus = order(2206); my $order = order($commits); my $left = int($autrijus / $order * 100) / 100; commit_order($user, $commits) ~ ($order > $autrijus ?? " and is in the lead!" :: "; only $left to go!") } cheer('foo', 64') 20:18
evalbot6 Error: unexpected "c" expecting ";", statements or end of input
geoffb ?eval sub log2($num) { log($num) / log(2) } sub order($num) { log2($num) } sub commit_order ($user, $commits) { "$user has commit order { int(order($commits) * 100) / 100 }" } sub cheer ($user, $commits) {my $autrijus = order(2206); my $order = order($commits); my $left = int($autrijus / $order * 100) / 100; commit_order($user, $commits) ~ ($order > $autrijus ?? " and is in the lead!" :: "; only $left to go!"); } cheer('foo', 64 20:19
')
evalbot6 Error: unexpected "c" expecting ";", statements or end of input
geoffb ?eval sub log2($num) { log($num) / log(2) } sub order($num) { log2($num) } sub commit_order ($user, $commits) { "$user has commit order { int(order($commits) * 100) / 100 }" } sub cheer ($user, $commits) {my $autrijus = order(2206); my $order = order($commits); my $left = int($autrijus / $order * 100) / 100; commit_order($user, $commits) ~ ($order > $autrijus ?? " and is in the lead!" :: "; only $left to go!") } cheer('foo', 64)
evalbot6 'foo has commit order 6; only 1.85 to go!'
chip At some point it'd be fun to hook up a C++ compiler to IRC, just to see what people would feed it 20:20
geoffb chip: heh 20:21
mauke horrible template metaprograms, of course 20:22
geoffb hmmm, my eval above is giving the wrong answer . . . sigh
oh, DUGH 20:23
chip I picked up the ORA STL pocket guide. STL _is_ just as horrifying as I remembered
geoffb ?eval sub log2($num) { log($num) / log(2) } sub order($num) { log2($num) } sub commit_order ($user, $commits) { "$user has commit order { int(order($commits) * 100) / 100 }" } sub cheer ($user, $commits) {my $autrijus = order(2206); my $order = order($commits); my $left = int(($autrijus-$order) * 100) / 100; commit_order($user, $commits) ~ ($order > $autrijus ?? " and is in the lead!" :: "; only $left to go!") } cheer('foo', 64)
evalbot6 'foo has commit order 6; only 5.1 to go!'
chip "bind2nd<int>(..." no, I can't go on
geoffb ?eval sub log2($num) { log($num) / log(2) } sub order($num) { log2($num) } sub commit_order ($user, $commits) { "$user has commit order { int(order($commits) * 100) / 100 }" } sub cheer ($user, $commits) {my $autrijus = order(2206); my $order = order($commits); my $left = int(($autrijus-$order) * 100) / 100; commit_order($user, $commits) ~ ($order > $autrijus ?? " and is in the lead!" :: "; only $left to go!") } cheer('foo', 35)
evalbot6 'foo has commit order 5.12; only 5.97 to go!'
geoffb Silly things to do while waiting for pugs to compile . . . . 20:25
Hmmm, maybe I should direct that energy towards shopping for a new system 20:26
mauke chip: boost.org/libs/libraries.htm#Function-objects 20:28
chip yeah, boost is in the book too 20:29
svnbot6 r6176 | fglock++ | * Added perl5/Perl6-Container-Array skeleton
chip it's just that you can't actually introduce anything that isn't a built-in operation without defining a new class, with a name, that does it. (Unless C++ invented anonymous classes with operator ()() while I wasn't looking)
Would it kill the C0X committee to introduce anonymous functions?! 20:30
for_each(iter.first(), iter.last(), void anon (char *p) { cout << $p })
s/\$/*/ 20:31
mauke for_each(iter.first(), iter.last(), cout << _1);
SamB I heard something about some kind of template-language turing-completeness magic for something like lambdas...
mauke boost.org/doc/html/lambda/using_library.html 20:32
chip oh, sure. I'd rahter stick a fork in my eye than turn my brain inside-out just so I can write C++ expressions in template-ese
and of course my example is simple because this is IRC 20:33
boost++ for at least making the effort, though 20:34
Aankhen`` goes to sleep.
svnbot6 r6177 | fglock++ | * updated ext/Perl6-* TODO
Aankhen`` Nite.
svnbot6 r6178 | fglock++ | * TODO update 21:04
r6179 | fglock++ | * TODO update
fglock obra? 22:21
obra hi 22:22
fglock I found out the bug in DateTime::Set - it is a problem in DateTime.pm
I sent it do the DateTime list
obra cool. 22:23
Thanks
fglock The time zone thing looks so easy - until you start working with it :) 22:24
I just got another bug report
obra Yeah. I know :/
fglock hey, just found out who you are :) 22:27
obra *laugh* 22:28
Hi, I'm Jesse. I wrote RT.
fglock yes!
I still use the ICal parser you wrote for Date::Set - it is in DateTime::Format::ICal 22:31
obra Nice. 22:32
You saw that I recently replaced Net::ICal with Data::ICal?
Wow. I don't remmeber the DateTime::Format::ICal code at all. must have mentally blocked it out 22:34
fglock You wrote it a day when "I" was blocked :) - Data::ICal is nice - are you planning to go on with the calendar protocols? 22:36
(most of the code in DT::F::ICal is Dave's - your snippet is marked)
obra This is a logged channel. I'm going to reply in personal messages 22:37
iblech [PIL2JS] Yay, PIL2JS fully works again, now! :) Resmoking... (but expecting many test fails) 22:55
brentdax I'm trying to switch to svk. Where is the dump file thing for Pugs, so I don't have to pull 6100 revisions down? 22:57
fglock iblech - do you have lazy lists implemented? 22:58
iblech fglock: No. But, as soon I have coro etc. implemented, I could simply compile your code to JS, right? 22:59
mugwump brentdax: can these be made from an existing svk repo?
fglock it doesn't need coro actually - you can use normal subs (or I could rewrite that part)
brentdax I'm not really sure--I've just seen it mentioned that if you're going to start using svk, there's a file you can use to avoid downloading all the revisions.
mugwump that sure would have helped me check out parrot. as it was I left it overnight 23:00
svnbot6 r6180 | iblech++ | * Usual svn props.
r6180 | iblech++ | * PIL2JS fully restored:
r6180 | iblech++ | * Fixed exportation, default values for params, and &exit.
r6180 | iblech++ | * my $x; sub foo { $x = { return 3 } }; foo();
r6180 | iblech++ | PIL2JS.cps2normal(function () { $x() }) does not die now, but returns
r6180 | iblech++ | undefined.
r6180 | iblech++ | * Fixed &prefix:<+> on Strs (turned out I only forgot a "new").
fglock iblech: I thought the perl6 version would not be useful - that's nice 23:01
iblech fglock: It is extemely useful. Later, we could optimize it by porting it to native JS, but I think it'd be ok for now.
fglock :) 23:02
iblech PIL2JS is damn slow anyway ATM, a little bit additional slowness won't be noticed ;)
fglock it would be nice to have a "baby-perl6" to perl5 converter - I could use that for syncing the libs 23:03
mugwump brentdax: ok, I have a dump for you :) 23:17
brentdax Great--I'm only up to r453 so far.
How do you want to send it? 23:18
mugwump I'll give you a url in a sec 23:19
it's still trawling through my massive svk depot
brentdax Alright.
mugwump guess I might start making new depots for each mirrored path ... should be easy using svndump | svndumpfilter include --preserve-revprops 23:20
3,500 revs to go! :) 23:22
brb & 23:26
brentdax Okay, why is Pugs giving a Perl 6 regex to PCRE? 23:34