Pugs t-shirts www.cafepress.com/pugscode | Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net
Set by stevan on 15 August 2005.
putter iblech: looks like "make test-js" is currently broken. smoke looks ok. 00:01
sigh. 00:07
&
00:50 brentp is now known as _brentp 04:38 _brentp is now known as brentp
gaal putter: maybe we can just filter out -B [<opt>] in pugs and then not have to worry about it in the backend? like the perl frontend did with s///. 04:51
putter: also, you mean a magical variable, right, not environment. a p6 version of $^X. 04:52
I'll see to it when I have some free time, but as I've moved offices and tasks things are a little dense atm.
brentp so 04:59
is there an estimated release date of perl6 05:00
brentp cant wait
dduncan well, Larry knows, but isn't telling 05:04
he said so in his last Onion speech
brentp heh 05:05
how much work would be needed to port perl5 code to perl6
dduncan very little, if the perl 5 code is written in a well-maintainable fashion 05:06
and even then, automated tools are being produced now to make it almost effortless 05:07
Supaplex qool
dduncan Larry's modifying a branch of Perl 5 to maintain all whitespace etc in its parse tree, so it can spit out perl 5 code identical to what it parsed; the next step is that it can then generate equivalent Perl 6 code
however, that's meant to be a quick-port solution 05:08
Supaplex humph
dduncan a better long term solution is to either take that output and massage it into better perl 6 code, or write it yourself 05:09
you should still understand perl 6 if you're going to maintain the translated version
but perl 6 provides ways to do the same things as perl 5, that look either identical or very similar, so a basic port isn't too hard 05:10
but perl 6 also provides improvements that a developer should be exploiting, things that perl 5 can't do at all
though some of those can be simulated with perl 5 modules 05:11
brentp wheres the rundown on perl6 05:15
ie; the differences
etc
autrijus greetings 05:25
geoffb Hi there . . . still duing ICFP? 05:26
dduncan greetings 05:28
brentp haha 05:32
armed and dangerous dolphins were released in the hurricane
dduncan funny, I just mentioned that on another IRC channel
brentp heh 05:33
dduncan observer.guardian.co.uk/internation...53,00.html
brentp you reading /.?
dduncan yes
brentp heh
dduncan one of the replies linked to this also: www.defensetech.org/archives/001580.html
and that one has various funny links of its own
the place I brought this up first was on the IRC channel for the 'joy of tech' comic strip 05:34
always worth a read, that comic
(add a .com to those words, for the url) 05:35
... to the website
brentp wheres the joy of tech channel?
dduncan its #joyoftech on irc.slashnet.org 05:36
but the web site is the main show
autrijus rehi 05:37
sorry, was on taxi
in the icfp site now -- the keynote is going to be very relevant and interesting 05:38
(on how "optional" explicit type annotations really works from a language implementor's pov)
geoffb Is it correct to decode that into "It's OK if we let the programmer decide between ducks and Mallards"? 05:41
dduncan a Mallard is a type of duck 05:42
I know, they live around where I do
geoffb I knew that. I was trying to be funny. Apparently a bad thing to do when tired. 05:43
autrijus geoffb: yeah, but the problem is that if the programmer only does that partially
dduncan okay, fine if you were being funny
autrijus and if the module author has different level of annotations than the user
et cetera
dduncan as long as the audience is educated enough to recognize that was intended
never mind 05:44
geoffb ah . . . misinterpreted "really works" -- I read it as "It does, in fact, work", as opposed to "this is how it happens internally"
autrijus *nod*
yeah, this area was very fuzzy
lots of heuristics but very few formal theory 05:45
wolverian Juerd, hey, nice p6l posts. I like the generic stringification proposal. 05:53
autrijus mm benjamin pierce, the tapl author and icfp chair, is sitting next to me :) 05:55
autrijus starts taking notes
wolverian autrijus, touch him for me, will you :) 05:56
autrijus :D 05:57
Keynote: Where is ML Type Inference Headed Types are good - safety etc; writing types down can be horrible. Type inference is constraint solving as we all know. As type system becomes more powerful, it needs to require more help from the probrammer. But many information are "blatantly obvious" to the programmer. A front end to the constraint based solver: aka "local type inference", propagates type information according to heuristics. We call it "strat 06:00
(full transcript will be made online an indeterminable days in the future)
In Classic H-M ("full") type inference, we pass candidates judgements around according to the constraints, solve them into the (provably) only solution possible, so the programmer needs not write any types down. Normal implementations maintain an enrivonment of known-valid judgements. But the speaker proposes that we eliminate the type environment, enrich syntax of constraints, and embed the judgements directly into constraint variables. (lots of formu 06:07
Khisanth wolverian: that might be weird if he happens to look over at autrijus' screen 06:11
rafl Morning
sili all of that inference and constraint solving sounds slow 06:12
autrijus Constraint generator for typed lambda calculus with subtyping in linear complexity. Generaion and solving are separate passes. Constaint language remains simple even when you add features into programming language. Ergo: it's a practical new way to write inferencers.
sili: "linear"
sili hmm 06:13
autrijus now demonstrating this technique on a OO-ML language
...with GADTs 06:14
hm, no, scratch the OO/subtyping part, that's for the next demonstration 06:15
familiar GADT typing rules follows
"case" over a GADT, with annnotations only on the toplevel, and infer everything else on the subterms 06:18
(GHC 6.4 does that but has unpleasant interactions with type classes)
now reducing this problem in the new light of constraint solving
GeJ Good morning gentlemen 06:19
autrijus first intuition is adding implicit constraints
turns out to be a bad idea 06:20
as they have no readily solvable rules
and we lose principal types in many cases - a "constant int" has many many weird types 06:21
# cristal.inria.fr/~fpottier/publis/p...nas-05.pdf 06:23
ah. two-phase shape+type inferencing. makes lots of sense. 06:24
nothingmuch morning 06:25
autrijus yo.
geoffb morning
autrijus good, that paper explained wobbly types in a way that my brain can accept 06:26
nothingmuch shivers at the insanity
autrijus nothingmuch: you saw the url link to the icfp invited talk? I think it will jibe well with you
nothingmuch no
where?
autrijus cristal.inria.fr/~fpottier/publis/p...nas-05.pdf
nothingmuch aha 06:27
autrijus splitting type inference into two phases, using constraint resolving
nothingmuch sounds nice
autrijus yup
nothingmuch is it already implemented? ;-)
autrijus the understandability is the main win
it is, in GHC 6.4, but not well understood
nothingmuch no, i meant in pugs
autrijus this is mostly an attempt to formalize the idea
heh no ;)
nothingmuch goes to see what's new in his work mailbox today 06:28
It's not a Date, it's a UnixEpochTimestamp. I'm choosing my classes 06:29
for maximum expositive effect
there's a class for UnixEpochTime?!!!
nothingmuch thinks Ashley is crazy 06:31
in fact, i think the pro interpolation-is-ne-stringification people in the stringification-should-be-mega-fucking-overloaded thread have not yet hunted down any bug that has to do with this stuff yet 06:32
geoffb . . . You know, having a one-line Forth definition work the first time is every bit as satisfying as having 10 or 20 lines of Perl work the first time . . . 06:33
nothingmuch yes, that's true =) 06:34
nothingmuch would like to bring up such a bug
a wonderful bug with stringification
nothingmuch had to do Algorithm::Dependency stuff with CDBI objects
and since this was in Maypole the CDBI objects were automatically stringified to any column that slightly resembled the word "name"
i made the objeccts inherit Algorithm::Dependency::Item (what a wonderful interface) 06:35
and then I tried to calculate dependencies
but it just didn't work
because A::D used the stringified value of the objects in a hash, instead of using a refhash or Set::Object
this took me about an hour to crack 06:36
rafl hat similar problems with catalyst and cdbi once. 06:39
s/hat/had/ :-) 06:40
nothingmuch oh, no, i'm sorry 06:49
that was another story
while ( my $id = shift @queue ) {
that was my problem
QtPlatypus while (defined (my $id = shift @queue )) { 06:52
nothingmuch no 06:53
while (@queue) {
my $id = shift @queue
but nevermind, the whole concept of IDs is, quite frankly, stupid 06:54
see also Algorithm::Dependency::Objects
twice the convenience
1/5th of the slocs
10 times the safety
and probably performs better too
Set::Object instead of an Algorithm::Dependency::Source being a funny object interface for a hash (with a _load_items method), and every item being a wrapper or inheritence glue into an item which must now know about ids 06:55
hola luqui 07:10
luqui hola
luqui writed an attribute grammar module
test-first (my first time)
nothingmuch =)
luqui albeit, there was only one test, but it was a complicated one
geoffb luqui, just about to head off to sleep, but: You said you were teaching an OpenGL class . . . are the slides linked anywhere? 07:11
nothingmuch that actually makes test first hard
luqui geoffb, no slides
nothingmuch test first should be as incremental as possible
luqui well then it wasn't test first
it was "I want this interface"
geoffb luqui, notes, article, etc?
luqui more like a user story I guess
geoffb, none of the above. I was kinda like "I know about opengl, and you don't, so let's make something you want to make" 07:12
geoffb ah.
Since I write articles teaching OpenGL, I was looking for material to assimilate. :-)
luqui geoffb, both of my sessions spent an hour setting up 07:13
ugh
geoffb bleah
luqui if anything, a good starters template for the compiler-deficient would be nice
nothingmuch Juerd++
good post
luqui mingw + sdl or something
Juerd++
geoffb Wayne Keenan's SDL_perl for win32 . . . <cough> 07:14
nothingmuch that relates to my Debuggable role proposal a bit
luqui heh, these folks didn't know perl
geoffb :-)
ah well
OK, must off to bed for real
nothingmuch ciao! 07:16
autrijus mm techniques for writing safely composable source filters 07:19
nothingmuch *universee folds and makes a plop sound
autrijus involves CPS macros, ASTs, and type-directed translation
but would work even in perl5 setting
it's just very counterintuitive ;) 07:20
nothingmuch hehe
autrijus the key idea seems to be in something called macro-continuations
autrijus reads some more papers
nothingmuch sounds spooky =) 07:21
autrijus not surprisingly it's yet another oleg papr =)
luqui conjectures that autrijus, by some freak of mathematics, has read an uncountably infinite number of CS papers
autrijus # okmij.org/ftp/papers/Macros-talk.pdf
luqui oh, autrijus, you probably already know this, but it is possible to solve the expression problem in haskell 07:26
it's just an abstract pain in the ass
(as much a PITA as scala, but harder to think about)
Supaplex invokes kill(SIGSLEEP,getpid()); 07:27
autrijus aye, yes, I know that, I've read simonpj's paper
involves typeclass encodings 07:28
luqui yeah, sortof
autrijus I'm sure it's possible to do a TH that simplifies the construction of adding variants
but it's not yet available and I'm not going to be the one writing it :)
(btw, the AG/UUAG solution to expression problem is elegant) 07:29
luqui what it came down to for me was essentially: data Tree tree = Branch tree tree | Leaf Int
autrijus, sortof
it doesn't seem to be easily typesafe
autrijus oh also, you may want to play with EHC
a haskell compiler writting entirely in UUAG
very easy to understand
luqui interesting 07:30
autrijus # www.cs.uu.nl/wiki/Ehc/WebHome
luqui I'd like you to look over Attribute::Grammar when I get a few more tests/features
autrijus k. on cpan yet?
luqui nope, soon 07:31
autrijus cool
luqui++ # put the C in CPAN
luqui I implemented the module about three hours after learning what ann AG was :-)
so it will be missing some things :-)
nothingmuch luqui: don't upload it as Attribute::Grammar please 07:32
that will confuse people wrt attribute handlers
autrijus Grammar::Attribute?
you know, like org.pugscode.class.type.foo
reversed nouns
nothingmuch i think that works better, but perhaps '<some category::AttributeGrammers'
luqui I like that, for the proper definition of <some category> 07:33
autrijus Perl6 ;)
j/k
nothingmuch hehe
autrijus Language::AttributiveGrammar
Language::AG
luqui heh, not quite. some of the syntax is vaguely reminiscent though
nothingmuch en.wikipedia.org/wiki/Category_Theory 07:34
luqui nothingmuch, and...?
nothingmuch generalized abstract nonsense WRT to <some category> could be amusing
nevermind the confusion of the different sense of category
luqui will go with Language::AttributiveGrammar for now
nothingmuch mui bien 07:35
luqui what about the category of categories (from <some category>, not category theory)
I wonder what the morphisms on that category would be
scook0 luqui: ping # theories 07:42
luqui pong 07:43
scook0 well, mostly patterns anyway
I noticed the "how did that T get on the LHS of my pattern type" problem
but it occurred to me that that T is almost meaningless anyway
luqui how so?
scook0 because it doesn't mean "if you give me a T, I'll give you a result" 07:44
because for the auto-generated patterns in particular, each pattern can only succeed for one union tag 07:45
so the T isn't telling us much about what's legal to give to the pattern 07:46
it's really only saying "if it ain't a T, don't even bother"
luqui well, that would have to be a special property of patterns
but I see your point, it very well could be
the T does tell you something, though
T is bound by the theory 07:47
so it means "it is reasonable to match this pattern against this type"
scook0 yes, that's what I meant by "otherwise don't bother"
luqui well, the question is, is it a "otherwise don't bother" failed match, or a "otherwise don't bother" failed typecheck? 07:48
autrijus woot, just gave Pierce a pugs t-shirt
luqui viva la revolucion
after all, a typecheck against a function makes sure that the argument is in the domain of the function 07:49
but I think patterns can be sort of special, because they are
scook0 hmm, I'm just thinking about the implications of that typecheck on superset-union types
luqui however, in order to get good typechecking, I need some way to declare that "these five patterns will match all of this type" 07:50
and I don't think the theory does that
scook0 if the pattern matcher is typed as taking a Tree 07:51
what happens when you give it an AnnotatedTree?
the pattern might still be valid
luqui how so?
oh, right
that's like giving an Animal to a function taking a Dog 07:52
scook0 but AnnotatedTree :> Tree
exactly
luqui and so that ought to fail to typecheck
scook0 and then that would preclude meaningful behaviour
nothingmuch autrijus: please jjoin in the stringification thread... Localization is being brought up, and I think you have a lot to contribute
luqui is surprised dan kogai hasn't piped up 07:53
scook0 so this is kinda what I meant when I said that T doesn't buy you much in the sig
luqui well....
hmm...
if you have a function that tries to match that pattern, it tells you that the domain is at least that big 07:54
even when it's not
odd...
scook0 the pattern is valid for a type...
provided that /some/ of that types values are also Ts
luqui so we must consider a union to really be a union
and we then have o'caml tagged types 07:55
scook0 'really a union'?
luqui which may not be so bad
scook0 was I missing something?
luqui well, it just turned the union type into a factory and a bunch of roles
and there was nothing left that said that the roles are *the only things* that can make up the union 07:56
scook0 so we can't assume that unions are complete? 07:57
luqui so we must have: Branch <: Tree; Leaf <: Tree; Tree <: Leaf (+) Branch
which seems like it could possibly be hell for a typechecker
but possibly not
oh, and even Branch (*) Leaf == Bottom 07:58
now we're getting into things that are uncheckable 07:59
scook0 hold on, I'm not following
luqui well, I'm just jabbering on about how a union type should look
without respect for patterns
then maybe the domain for pattern:<Leaf> ought to be Leaf 08:00
clearly. and then it will never fail
scook0 yeah, that was one thing I was thinking of
but I'm not sure it generalises to arbitrary patterns
luqui right
well, you'd have to pick the smallest representable superset of what you do actually match 08:01
scook0 what if you have something like pattern:<EvenLeaf> (matches a leaf containing an even number)
luqui it's domain would probably have to be Lead 08:02
Leaf
scook0 exactly
luqui anyway, that's not important, and is a widely studied area
what's important is that this has to fit into a theory
because my mock objects are beloved to me
scook0 mock objects? 08:03
luqui pretending an object is of a type when it isn't
or rather, I'm trying to make that impossible
that is, you can make an object behave like it's in a certain type, and then it is defined to be in that type
scook0 ah 08:04
luqui that's what the theory does. Everybody else wants to separate "a real thing" and "its interface"
scook0 is that why you made every class a role?
luqui uh huh
scook0 I thought so -- there are certainly some advantages
luqui hmm, I was thinking the other day that you could implement patterns using classes 08:05
an object in class Tree just has methods pattern:<Branch> and pattern:<Leaf>
and an object in class AnnotatedTree has those two plus pattern:<Ann> 08:06
but the subtyping comes up backwards if you do that
however---
maybe if you define that an object in class Tree has method pattern:<Branch> *or* pattern:<Leaf>
then a union type is a union theory: you must implement this or that
{Branch | Leaf} <: {Branch | Leaf | Ann} ?? 08:07
clearly true
scook0 are you talking about unions or union theories? 08:08
luqui trying to bring the two together
but I think the latter 08:09
that is, you obey Tree even if you only implement Leaf
scook0 and by extension, you also obey AnnotatedTree
luqui yeah
but then you get the factory types, which is what gets us past the scala "abstract constructor" problem 08:10
that is, for a type T to obey Union, you have to either implement pattern:<Leaf> or pattern:<Branch>, and you have to be able to create both 08:11
I think I need some time with the mathematical implications of this
because I think it's the right foundation
er, s/Union/Tree/
scook0 I think the underlying problem is that unions tend to invert the subtyping relationship 08:12
luqui is there a duality there
scook0 when compared to records/classes
because a class that does more is a subtype
but a union that does LESS is a subtype
luqui depending on what you mean by *less* 08:13
but yes, that's the "problem"
which I've called a beautiful duality :-)
I'm just wondering if the creation bit has some duality with roles
scook0 s/problem/key point/
I wonder how that duality interacts with co/contra-variance 08:14
luqui very elegantly
that's the whole point behind roles/factories 08:15
but then there's this pattern thing that is throwing everything off
and I hope I can get it back ;-)
scook0 I hope so too
auto-defined patterns would be easy to get back
but arbitrary patterns are the big win 08:16
luqui to be honest, I never really cared about arbitrary patterns
but it seemed obvious if I was going to allow mock anything else
scook0 patterns are a bit like "reverse functions", actually
luqui they are the reverse of the union case constructors :-) 08:17
scook0 which might be why we run into problems when treating them as normal functions
luqui wonders if a pattern is just a formalism for an inverse function
and of course, if you have a function and an inverse function, then you have an isomorphism 08:18
which could be construed as a "safe coersion"
wow... abstract nonsense
scook0 I'm impressed 08:19
luqui I'm going to have to sleep on this
integral luqui: Have you seen epigram?
luqui by which I mean "lose sleep over this" :-)
integral, I read the project description
integral it has a <= operator thing I don't full understand that appears to do it's pattern matching 08:20
luqui oh wait, i did see some epigram code
integral sorry, afk
luqui I was completely lost
integral, thanks 08:21
luqui must sleep now
scook0, thanks, you stirred up ideas again
scook0 luqui: my pleasure -- bye 08:22
09:03 davidra is now known as jp-autark
wolverian identify divine 09:04
hmm. oops
:]
now, let's everyone /clear together 09:05
buu zomg 09:11
GOING TO GET PWNED
wolverian :( 09:14
buu Fear the wrath of my repressed inner script kiddy. 09:15
nothingmuch wolverian: nickserv.pl is your friend 09:17
buu eval: print "?eval say" 09:20
buubot ?eval sayReturn: 1
buu hrm
No bot cascades for me
QtPlatypus Thats good, otherwise a quine would be an infinit loop 09:22
buu I can but hope!
Quites are entirely too complicated for me. 09:25
Juerd Quines
nothingmuch hi Juerd 09:28
very good post on stringification 09:29
thank you
buu Juerd: Quines are quite complicated!
Juerd nothingmuch: Thanks 09:30
I felt this needed to be said
Typing it has severely cut in my sleeping time, though, so don't expect me to be very active today :) 09:31
spinclad buu: 'is quite simple' is quite simple. 09:33
but ''is quite simple' is quite simple' is a bit more complicated, true
buu spinclad: Er, what? 09:37
spinclad ''\_: _ is quite simple' is quite simple' is either simpler or more complicated than that... 09:38
'\_: _ is quite simple' is just a function 09:39
f, say; its quine is just (f f)
so (f this)? 09:40
svnbot6 r7142 | scook0++ | * Minor code tweaks to Parser.hs 09:44
r7142 | scook0++ | * Doc typo fixes for Blondie and theory.pod
autrijus nothingmuch: seen nothingmuch 11:17
nothingmuch: ccshan just gave me this strange puzzle; I finished it and you may be interested in the result 11:19
the puzzle is how to define "begin" "push" "add" and "end"
such that
begin push 3 push 4 add end
evaluates to 7
and in a typesafe way, so illegal forth programs can't typecheck
the answer is 11:20
begin = ($ ())
push s x = ($ (x, s))
add (x, (y, s)) = ($ (y + x, s))
end (x, ()) = x
nothingmuch autrijus: who is ccshasn? 11:46
autrijus nothingmuch: search.cpan.org/~kenshan/ 11:48
I learned shift/reset delimited continuations from his papers, among other nifty stuff
nothingmuch hmm 11:49
nothingmuch will look into it
pbut right now Microsoft's delightful CryptAcquireContext is going to swollow up my time
aas for the puzzle, that's pretty cool
reminds me of how ski used . to make a nice forthish syntax 11:50
autrijus but the fun thing is that it "typechecks" forth, so to speak 11:51
by guarding against stack over/underflows
nothingmuch yep =) 11:52
nothingmuch is still trying to grok
pdcawley_ seen luqui?
nothingmuch but sort of getting it
pdcawley_: earlier today
autrijus: essentially it's a CPS machine, right? 11:53
pdcawley_ I just wondered if he'd done another 'In their conference call this week, @Larry talked about...' summary.
nothingmuch begin gets (push 3 push 4 add end)?
pdcawley_: a second one? or a third one?
see use.perl.org/~luqui/journal
pdcawley_ dunno. One for last week, I want to roll it into the summary.
nothingmuch btw, sorry for giving you a hard time this week ;-) 11:54
autrijus nothingmuch: easier version: nopaste.snit.ch:8001/4405
pdcawley_ You gave me a hard time? When?
autrijus pdcawley_: the p6l portmanteaus 11:57
pdcawley_ confesses that right now he's doing a very cursory skim of the lists as stuff arrives and then reading in more depth when it comes time to write the summary. 11:58
Which means that, in an hour or so when I reach p6l I'll probably pop up here and go "nothingmuch: No problems mate!", or "You *utter* bastard" depending on my mood. 11:59
Sadly this week's summary will not include any cricket commentary.
nothingmuch pdcawley_: i hope my mails are easy to skim ;-)
Juerd said that I could try to do a better job of it
autrijus: so i was write about it being CPS like 12:01
it basically makes a Joy out of forth ;-)
no wait, that pun is not only lame it's also inaccurate
because k is not really on the stack
btw, begin and end could be conveniently monadized, right? 12:02
autrijus sure, but the cool thing they don't have to be 12:03
it's just simple typed lambda calculus
nothingmuch btw, i just read the first page of "The Essence of Compiling with Continuations" over lunch 12:04
nothingmuch is very proud that he didn't give up yet
autrijus cool 12:05
nothingmuch i actually understood everything so far ;-)
even the BNF
(for core scheme)
autrijus nice :) 12:07
I'm still trying to get my head around the first talk of today 12:08
about separating partial (user-annotation-driven) type inference/checking
from complete (compile-figure-out-everything) type inferencing
into two phases
which would hopefully give us a good way to talk about "static typechecking in p6" in a robust way 12:09
nothingmuch autrijus++ 12:11
that's important
pdcawley_ Autrijus: Are you going to be at EuroOSCON? 12:12
nothingmuch tries to wrap his brain up and make it crap out useful data
nothingmuch has to do:
some bug, monthly presence report, fix a wrapper script on the unixes
autrijus pdcawley_: aye
pdcawley_ Is there a hackathon planned? 12:13
autrijus pdcawley_: not currently, mostly due to having to go to NPW after that
pdcawley_ NPW?
autrijus so if a hackathon is to be planned, has to be before the conf
nordic perl workshop
pdcawley_ Gotcha.
autrijus 24 hours after oscon
eurooscon that is
pdcawley_ Yeah.
nothingmuch what about before eurooscon?
autrijus I'm fine with that
I can arrive early if other people do
pdcawley_ won't be able to make it -- flights all booked for the Sunday before. 12:14
nothingmuch i can arrive early if stev^Wsomeone pays me to ;-)
autrijus :) 12:16
clkao autrijus: i am arriving 5pm sunday 13:12
autrijus clkao: excellent. which hotel are you in again? 13:20
clkao nh city centre 13:21
autrijus url? 13:22
clkao just google
autrijus k
got it with a different spelling of "centre" ;)
pdcawley_ writes: So far there has been no discussion of the return value of C<< Pin.head.contents.grep -> Angel $a { $a.is_dancing } >> but I'm sure it's only a matter of time. 13:50
nothingmuch uh? 13:51
anybody got any statistics for OS popularity amongst desktop using?
pdcawley_ A p6l thread that won't die and is venturing into philosophy.
nothingmuch which one?
pdcawley_ When you say popularity, do you mean 'number on the desktop' or 'liked the most'? 13:52
Re: \(...)
But I'm sure there are others.
nothingmuch oh, that one
pdcawley_ There usually are.
nothingmuch you poor thing =)
i stopped reading it two weeks ago
pdcawley_ Hey, I get to be snide.
pdcawley_ notes that he just made up some grep syntax there that'd be really neat. 13:53
nothingmuch i think it works too
there is no reason why it shouldn't work
right?
btw, do you hate me yet?
pdcawley_ 'twould be cool if grep would check the signature of the block and if the current thing isn't of the appropriate type, simply go to the next one instead of throwing a type mismatch error. 13:54
Not yet, no.
IRC : mailto :: nothingmuch : ?
nothingmuch ?eval $nothingmuch.real_name 13:55
Yuval Kogman
pdcawley_ Oh, I've always hated you.
nothingmuch hehe
i think this week warrants a direct apology 13:56
and that the linkage/compilation week does too
pdcawley_ Oh ghod. You're responsible for the 'conditional wrapper blocks' thread aren't you? 13:57
nothingmuch yep
and the blondie mess
pdcawley_ *so* wanted to respond with 'write a fucking macro'
nothingmuch and the linker/optimizer
that's an implementation detail 13:58
frankly I couldn't care less whether it is a macro or not
pdcawley_ Not really it's not. If you can write a macro to do it, it's not part of the language, it's something you can supply as a library.
It's certainly not something that needs to be baked in at this point in the game.
nothingmuch hmm? how come?
-> vs 'sub' was... what's the diff? 13:59
pdcawley_ Because if you need to do it, you include the library that implements the macro.
Because -> and sub have different return semantics.
nothingmuch that wasn't the point of the thread... i was trying to see if anyone has a better idea on how this can be expressed
pdcawley_ grins, "Well, I'm about to give it a rather closer reading. I may have missed the original point when I first read it." 14:00
The trouble is, so much stuff that could and should be implemented as a library function/macro turns into something that people think the language itself needs. 14:01
nothingmuch well, i'll argue that it's an implementation detail again
'use' is a macro that happens to be in the prelude, IIRC
i just thought that the concept itself tends to come up from time to time, and maybe people with experience in thinking about how meaning is conveyed can help this be better resolved 14:02
the post was not a "ooh ooh, perl 6 needs this, please add it"
or was at least not intended as such
pdcawley_ Generally when faced with something like that, I see about factoring it out into multiple subs. Gives you a chance to name things well, and in Perl 6 the 'readability cost' of making a new subroutine is way lower than in Perl 6. 14:03
nothingmuch please explain
factoring what out? 14:04
the macrosish behavior? or the actual problem?
QtPlatypus pdcawley_: I'm wondering how much of "stuff" could be factored out and implemented as libary functions/macros. 14:05
dada I'm afraid this is not meaningful at all 14:07
pdcawley_ Oh crap. I'm happy to have a philosophical discussion, but not when I'm supposed to be writing the summary.
Remind me tomorrow if you like.
nothingmuch pdcawley_: have fun
pdcawley_ Heh. Sorry and all.
dada IIRC, the parser itself is going to be implemented in Perl6. so from a certain point of view, _everything_ is in a library function
nothingmuch dada: and if I get my way most of the builtins too 14:08
at least reference implementations ;-)
dada mmm 14:09
maybe the builtins should be in a (pre)compiled library
nothingmuch ofcourse they should 14:10
but there should also be reference implementation
do you know of the Blondie plan?
dada in P6, you mean?
no, I don't know
nothingmuch yes
well, basically the prelude itself is circular
for example map can be defined in terms of for
for can be defined in terms of map
whateve
r
the most readable and correct implementations should be chosen for each bit of code 14:11
dada mmm
nothingmuch each code block has a hash that can be computed
let's look at &infix:<*> (Num $x, Int $y)
it's body is:
sub &infix:<*> (Num $x, Int $y is copy) { my $res = $x; while ($y--) { $res += $x } }; 14:12
--$y
this block of code computes to a certain hash
and the hash will change if the definition changes
dada and?
pdcawley_ 10.1 * -10
nothingmuch or if &postfix:<--> or += ever change 14:13
pdcawley_: it was a silly example
nothingmuch is forcefully simplifying
dada _but_
nothingmuch now, we know that hte parrot runtime has an implementation of multiplication
dada I guess &infix:<*> will be more something like { inject_parrot_bytecode('mul $x, $y'); }
nothingmuch so the code emitter for PIR has a DB of hashes and their mapped primitives 14:14
err, yes
that's exactly what I'm getting to
dada ok, I'll listen
svnbot6 r7143 | iblech++ | PIL2JS: runjs.pl: Extend putter++'s "-B JS" hack to include "-BJS", restoring jspugs.pl.
r7144 | iblech++ | util/smokeserv/smokeserv-server.pl: Appropriate <span title="..."> for the numbers.
QtPlatypus So if would be something like &if (&test,&than) { &test() && &than() } # Ok its going to be a macro but you get my drift.
nothingmuch so the parrot runtime says "i claim that the function whose hash is ... is equivalent to the code 'mul <operand1>, <operand2>'" or whatever
given proper typing ofcourse 14:15
equivalence is transitive, so when the reference implementation changes, it can have an 'is equiv("hash")' trait
the purpose of this approach is compound:
a. reference implementations provide the most accurate definition of behavior 14:16
b. a runtime can implement far less than the whole prelude and can still run perl 6 code (slower)
(faster development of new backends)
dada mmm ok, I see the point
nothingmuch c. things that cannot be expressed in terms of perl 6 code, e.g. open(), are stubbed 14:17
dada you mean: if parrot today does 75% of what Perl6 needs, let's use that 75% and fake the remaining 25% for now
nothingmuch yep
or more likely: let's implement what we must
and then profile
and implement the slowest builtin
for a given app
stevan how do you handle ciruclarity issues on the prelude?
nothingmuch stevan: the backend must provide at least one equiv has 14:18
h
stevan morning all :)
nothingmuch to break the circulaarity
stevan cool
nothingmuch i.e. either map, or for
or both
but at least one
stevan pluggable bootstrapping
dada yes, it sounds cool
nothingmuch this also makes perl 6 more "flexible" in that IO primitives are stubs in the "default" implementation
if your runtime happens to support them, fun
but it's not a requirement =)
anyway, so Blondie is an AST that is supposed to test this idea 14:19
and right now it has a perl 5 interpreter
and a type inferrencer which emits C
stevan does Blondie have macros?
stevan has been reading too much about LISP macros,.. oooohhh so nice
nothingmuch stevan: nope 14:20
it's not really for that level
pdcawley_ remind me what's the sytax for declaring an optional argument?
nothingmuch it doesn't have syntax ;-)
sub foo ($reqiured, ?$optional) { #positionals
stevan nothingmuch: it seems to me that AST level macros can be an extremely powerful feature,.. especially for defining such low level things
pdcawley_ Ta.
QtPlatypus sub foo(?$optional)
{...}
nothingmuch stevan: explain "such low level things" 14:21
nothingmuch always saw Blondie as picking up after macro expansion has hypothetically already happenned
stevan nothingmuch: it seems to me, that having map be defined by for, and vice-versa is best done using macros, rather than proper function calls
nothingmuch stevan: ah 14:22
stevan but Blondie is an AST
nothingmuch right
stevan right?
nothingmuch the perl 6 prelude is perl 6
it should have all that
stevan user level macros are on thing
s/on/one/
pdcawley_ is having a seriously hard time coming up with some 'believable' example 'before' code to explain the 'conditional wrapper blocks' thread.
stevan but AST level macros are another
nothingmuch remember that macros in perl 6 can get PIL or whatever the AST ends up being =)
pdcawley_: uh, i forget what I needed it for ;-) 14:23
stevan nothingmuch: yes, but PIL is not here yet,... Blondie is ;)
nothingmuch stevan: hmm
QtPlatypus nothingmuch: My understanding is mostle likely we will not get the AST.
nothingmuch want to contribute a macro layer that happens before the Blondie::Compiler pass?
pdcawley_ You are so going to have to do better than that.
nothingmuch QtPlatypus: really? i was sure we're getting both
stevan nothingmuch: sure, but I need your help to wrap my head around everything 14:24
nothingmuch pdcawley_: i'm trying to remember what I was working on that day
pdcawley_ Macros were originally documented as getting the AST.
stevan QtPlatypus: I think the rules is "it is open unless explicitly closed"
pdcawley_ Without a macro form that uses the AST and either transforms it or returns an AST fragment or whatever, Perl 6 macros will be severely crippled.
stevan which translates to "if we can make it open, we will, otherwise you cant have it"
QtPlatypus pdcawley_: Yes but that changed later on. There is a bit in the notes about it. Hold on I'll pull it up..
stevan pdcawley: amen to that :) 14:25
pdcawley_ Stevan: That's my understanding too.
nothingmuch pdcawley_: well, the c pre processor is obviously not so crippled
i think one of the obfuscated C contests implemented an ALU in the preprocessor ;-)
pdcawley_ Yes it fucking is.
stevan nothingmuch: yeah, write a multi line macro
you can see the splints
nothingmuch stevan: no need, you can do \\\n 14:26
;-)
pdcawley_ The C preprocessor is a monstrous nightmare.
QtPlatypus pugs/docs/plan read the bit at the end about macros
nothingmuch is not serious, you guys
pdcawley_ can never tell with you.
nothingmuch sorry =(
QtPlatypus You will most likely get something like PIL though.
stevan beats nothingmuch with a stick made of LISP
autrijus nothingmuch: you had a missing ;-) after "crippled"
nothingmuch autrijus: well, i was building up tension for the punchline
pdcawley_ So you'd have to parse the PIL to get an AST? Ick.
autrijus pdcawley_: er no, those are objects.
PIL is not a surfact language 14:27
stevan couldnt hear the drum roll
autrijus surface, even
pdcawley_ Fairy nuff.
Has anyone worked out how to do metaquoting in Perl 6?
autrijus quasiquoting you mean 14:28
pdcawley_ That's it, yeah.
`{...} ?
autrijus nothing yet
{| ... |}
not sure. it's not yet on my radar for this milestone :)
pdcawley_ And then the equivalent of ,foo within the quasiquote region? 14:29
autrijus (|...|) maybe?
I don't know
pdcawley_ Perl 6 Quasiquoting would definitely make macros nicer.
autrijus haskell uses [| ... $(foo) ... |]
broquaint Quasi-quoting for what now?
svnbot6 r7145 | iblech++ | * t/data_types/pair.t: "$pair" eq ~$pair eq "$pair.key()\t$pair.value()", per [1].
r7145 | iblech++ | * t/operators/array_interpolation.t: "@array[]" eq ~@array, weird whitespace
r7145 | iblech++ | exception rule gone, per [1].
r7145 | iblech++ | [1] www.nntp.perl.org/group/perl.perl6....uage/23224
nothingmuch broquaint: well, something close to perl is SQL
you can have your driver check your SQL at compile time 14:30
instead of as a string later on
pdcawley_ broquaint: Well, sometimes it's easier for a macro to return a stringish thing rather than a transformed AST.
nothingmuch oh, that too
broquaint So we're borrowing the LISPs idea of q-q?
pdcawley_ We're suggesting it :)
broquaint Ack!
autrijus I think it'd be a good idea :)
broquaint I mean ... yay ...
nothingmuch ack?
pdcawley_ And yes, being able to check the string you're about to eval at compile time is lovely too.
broquaint Quasi-quoting makes my head hurt. Please let there be a sensible syntax highlighter for it.
autrijus points randomly to perl6.vim and cperl6-mode 14:31
nothingmuch errm... i think that neither could really do it without an embedded perl compiler
err... interpreter
system
broquaint is still suspicious of the horror of q-q
pdcawley_ q-q isn't horrid. 14:32
Without it LISP macros would be even more scary than they are already.
broquaint If you're used to it.
pdcawley_ And that's the *bad* kind of scary.
Supaplex is down - doo do doot doot doo do doot doot the system the system
pdcawley_ Not the 'scarily powerful and therefore really rather good'
broquaint Scarily powerful but still ugly.
QtPlatypus nothingmuch: It doesn't need one, it just needs a something that takes in perl6 and spits out something digestable 14:33
pdcawley_ Yeah, but all lisp quoting is ugly.
broquaint So let's not use it! :)
nothingmuch QtPlatypus: ... by running macros written in perl?
pdcawley_ grins, the *concept* of quasiquoting isn't ugly though.
And why am I chatting on IRC when I *still* haven't finished the summary.
Can you say "Displacement activity"?
autrijus finishes the AG-for-perl6 review 14:34
broquaint Copy and paste from IRC. It's nearly like the summary - a quasi-summary.
autrijus or rather AG-for-parrot. still working on the AG-for-perl6
broquaint AG?
nothingmuch autrijus: what does "review" mean?
broquaint Auto-generation?
nothingmuch broquaint: you don't want to know, it's scary
broquaint Will it make my head teh splode?
autrijus nothingmuch: I'm thinking about playing with UUAG-for-PIL2
QtPlatypus nothingmuch: *nods* Yep. I'm thinking of doing as a marco that takes in the program and spits out the "How to highlight" instructions. 14:35
nothingmuch QtPlatypus: ah, but it's still perl 6
autrijus nothingmuch: the EHC compiler is beautiful
nothingmuch autrijus: what's diff(GHC, EHC)?
autrijus nothingmuch: GHC is written in functional-monadic style; EHC is written purely declaratively in AGs. 14:36
nothingmuch what does it emit?
autrijus checks the CodeGen files
Grin (and therefor C), Java, Haskell
broquaint Is GHC implemented in Haskell?
autrijus broquaint: aye, and so is EHC
broquaint Groovy.
nothingmuch really ought to grok wtf AGs *really* are 14:37
integral Groovy is pure Java apparantly
autrijus nothingmuch: www.cs.uu.nl/wiki/Ehc/WebHome
nothingmuch abaris.zoo.cs.uu.nl:8080/wiki/pub/E...torial.pdf (promising) 14:38
putter autrijus: ping? 14:39
autrijus putter: pong!
putter :)
autrijus how's life?
ICFP rc0ks. I'm still in it, listening to someone who implemented an OS with haskell 14:40
stevan House?
autrijus yeah
stevan nice, I was reading about that last week 14:41
autrijus and the t-shirt penetration rate is increasing steadily
nothingmuch t-shirt penetration rate?
autrijus simon pj is wearing perl6 t-shirt all day today
nothingmuch hah!
stevan nice
autrijus: which one?
autrijus stevan: the perl6/timeline one 14:42
the "standard" one
stevan very cool
putter The next step for pilrun + mm2 is likely going to be a "massage everything into p6 with-conventions, hand to pugs, grovel over result to generate mm2 code". Which means faking pil2. What is the current state of pil2 thought? By faking something similar, pain can be avoided later.
re life, long overdue jobsearch. :/
autrijus putter: state of thought for pil2 is being heavily reshaped in the past 3 days
got _lots_ of discussions with lots of lambdafolks
putter ok. I'll optimize for easy.
autrijus yes, that is very prudent. 14:43
in particular I'll, at suggestion of allison, look into UUAG for PIL2 instead of the currently handcoded src/PIL*
in any case the entire month ahead is for pugs hacking :) 14:45
stevan horray!!!!!
autrijus no $job interference finally
putter gaal: not magic var. an environment variable (as in export PUGS_EXECUTABLE) is available earlier in the life of the perl script called. ie, at perl "compile-time". a --pugs command line argument tends to get processed later. to support --pugs, pugs-p5 currently wraps the 'use PIL::Run::everything' in a string eval, to delay it. which is fine, if a bit ugly. pilrun is currently trying to run as early as possible so the p6 setup is 14:46
available early, and can be used interchangably with p5.
autrijus stevan: oh, he is the House author but it's not House 14:47
putter re $job interference... just as I get a lot of it... :( ah well.
autrijus house was too monolithic... he is demoing a micro kernel, of all things, in haskell
putter autrijus: thanks
autrijus putter: thank _you_... we dreamed of ./pugs -CPerl5 not even one month ago 14:48
putter gaal: oh, but --pugs has priority. that can immediately used for both pil2js and pugs-p5, so some of the "pumbing" through util can be removed.
autrijus and just while I was away it's shaping up real good
-BPerl5, even.
I'm running out of battery -- be back in 12 minutes
14:53 xinming_Beijing is now known as xinming
putter strawman proposal: now that pugs-as-haskell is forking off perl backend helper programs, the next step seems to be setting up to permit movement towards unification. so rather than teaching Main.hs to drop -B js/perl5, and then --repl (or some such - eval files and _then_ become interactive), and ... whatever else, perhaps Main.hs should call a single helper, which can drop -B, etc. 14:54
If it was just -B, this would be silly. and the list of other candidates is not large, so it's not a "no doubt" right thing. so... thoughts? 14:55
s/movement towards unification/movement towards backend unification/ 14:56
stevan autrijus: ping me when you are back, I would like to talk MM2 integration (assuming that is one of your priorities)
putter hi stevan!
stevan hey putter, how goes things
Jooon autrijus: aha, batteries! I knew you were on something other than normal food 14:58
putter I started down a path of source filtering simple p6 class/etc and sub/etc code into mm2 calls. but I think the right thing is to instead preprocess it, to decorate it and avoid information loss, and then hand it to p6. and grovel over the resulting pil to figure out what happened. eg, massage "is Foo;" into "is Foo; method fake_is_Foo () {}". fake... survives -C Perl5, where "is" doesn't. it's a pain, but upside is we get concise p 15:01
ilrun oo description, no more PrimP5, and user oo works(!)(modulo pugsbugs).
s/hand it to p6/hand it to pugs/
oh yes, question: MM:Pure can deal with native things - ARRAY, etc. any thoughts on blending that with mm2? so one can have the equivalent of ARRAY does Array, and unboxed ARRAY's suddenly work? 15:03
stevan: ? ;) 15:06
autrijus rehi 15:07
putter: it makes sense, although I agree not with urgency. decoration is good. 15:08
stevan: MM2 is definitely the priority
putter the motivation for going in a more p6 approach is it concentrates things (currently an object's p5 and p6 are in three+ different places). and simplifies them. currently, we're seen a lot of "works locally, but not globally" kinds of bugs. 15:09
autrijus nodnod. 15:10
stevan autrijus: so what can I do to help on that? 15:12
I can start documenting details if you want
or I can write some of this in Perl 6 if that would help 15:13
autrijus actually, help migrating pilrun to mm2 and highlight incompatibility would help a lot too
since I think I have a fairly good idea of mm1
stevan k
autrijus and also then we get identical semantics for free for -BPerl5 and native core 15:14
which I'm feeling is getting more important each day
Limbic_Region autrijus - are you aware of Dan Sugalski's blog? 15:15
autrijus you mean his fork? yes 15:16
stevan I am wondering actually how the MM should fit with the runtime
Limbic_Region salutations all btw
no - his blog
where he has been discussing his fork
autrijus yes and yes.
Limbic_Region figured you might be midly interested in it if you didn't already know
autrijus nod. I'll be interested iff I see code. 15:17
before that it's silently ignored :)
putter stevan: any thoughts on getting "ARRAY does Array"? the fake-pil2 approach get's a bit less attractive if that's not possible.
stevan putter: I think maybe you, me and autrijus (fglock and iblech if they are around) need to discuss how the MM integrates with the runtime 15:18
putter re "how the MM should fit with the runtime", any particular puzzles?
stevan in particular when the MM takes over
the MM requires certain things to exist
autrijus I can think of two places; one when class composition takes place (INIT time)
stevan but the runtime wants these same things accesible via the MM
autrijus and one when any invocation whatsoever happens 15:19
putter what's an example of such a thing
stevan autrijus: but what about packages, and such
how do they integrate?
they are defined in the MM,.. are they also in the runtime? 15:20
nothingmuch doesn't unload the blondie/macro talk yet... #perl6 seems to pleasantly busy ;-)
autrijus stevan: MM mediates access to p6 packages I'd think
stevan ok
autrijus how each runtime instantiate the primitive package-storage-things are their freedom
but the API is part of MM I'd say
putter stevan, so what's wrong with the "current scheme but with p6_lookup and method/etc assignment redirected to associated mm2 pkg object"? 15:21
stevan autrijus: if the runtime provides hashes,.. they dont need to do anything else for package/namespace stuff
Limbic_Region question WRT MMD - in p6 you can have a sub and a method with the same name since they are distinguished using sub/method keywords. Additionally, each sub/method can have multiple variations based off signature right - so making a OO/imperative module is "too easy" right?
autrijus stevan: I'm sure we can assume the runtime will provide flat dictionaries, extensible lists, strings and numbers.
stevan putter: what is largely what I am thinking (I think)
nothingmuch Limbic_Region: i think that generally the answer is yes
autrijus Limbic_Region: a functional module is also too easy. 15:22
stevan autrijus: what about functions?
autrijus: nested dictionaries are nice too
autrijus oh, sure, maps and seqs needs to nest
svnbot6 r7146 | iblech++ | * PIL2JS: jspugs.pl: Accept same commandline-options as runjs.pl does (most
r7146 | iblech++ | importantly --pugs=/path/to/pugs).
r7146 | iblech++ | * Main: Give --pugs=$*EXECUTABLE_NAME to runjs.pl so
r7146 | iblech++ | /path/to/my/other/pugs/version -BJS doesn't call some other pugs in $PATH.
r7146 | iblech++ | * Main: Also repaired pugs -BJS, which should start jspugs.pl.
autrijus I think we also want first-class function pointers, if not downright closures.
stevan or at least some kind of dict reference which I can put into the dictionary
autrijus I don't see a problem of wanting closures.
stevan closures++ 15:23
Limbic_Region autrijus - I think mixing more than 2 paradigms in the same module is asking for trouble - but it would be less easy since there would be no way to distinguish between the functional subs and the imperative subs without adopting a naming convention
autrijus since the lambda-lifting is well understood for runtimes without closures
stevan if I have closures, I can make methods on my own
autrijus Limbic_Region: indeed indeed. but that's a cultural issue
stevan: I think you have closures.
nothingmuch Limbic_Region: they can't be called the same way though
stevan it would nice if the runtime provided,.. but not absolutlely needed
Limbic_Region nothingmuch - what is the "they" in that statement?
nothingmuch functional is a superset of imperative
autrijus since it's so easy to fake closures nowadays
and p6 needs closures anyway 15:24
nothingmuch so 'subroutines' are foo(...)
Limbic_Region functional subs and imperative subs would be called in the exact same way - methods would differ
nothingmuch methods need to be called on an object
Limbic_Region of course - if you are creative enough - all the functional subs would have a different signature
nothingmuch you need to say exactly what class to search through
in that sense if you have a module with 'sub foo' and 'method foo'
stevan autrijus: so I have (in p5 terms) HASH, ARRAY, SCALAR, and CODE
autrijus aye
but not neccessarily REF 15:25
nothingmuch then the method will be called when you are looking for a code chunk with the name 'foo' WRT a method invocation on an object
stevan autrijus: okay, thats all MM2 uses (except for the magic)
nothingmuch and the sub foo will be called otherwise
autrijus that would be good.
nothingmuch unlike perl 5 in that respect
stevan autrijus: what do you mean by no REF
Limbic_Region nothingmuch - I understand that - my issue isn't with methods and sub separation
autrijus stevan: references to references and explicit dereferencing/blessing semantics ala perl5
stevan ah
nothingmuch then i don't see the issue... please re-explain, Limbic_Region 15:26
stevan autrijus: I think I can avoid that (for the most part)
autrijus the REF-tagged-with-package semantic is somewhat preculiar to perl5
Limbic_Region I was commenting on how nice/easy it will be to have OO/imperative or OO/functional modules in p6
autrijus and it's fine to use it in the p5 magic/sugar
Limbic_Region since they are distinguished with keywords and signatures using MMD
autrijus but I thought the idea of MM2 is you avoided that
so it should be fine
nothingmuch ah
stevan autrijus: that part if no criticial, it is only to make something easier 15:27
Limbic_Region autrijus mentioned that it would also be easy to add functional to the mix (as originally I didn't include it)
stevan could be removed I think
autrijus stevan: s/removed/moved aside/
stevan yes
Limbic_Region I said that having 3 paradigms in one module was asking for trouble
stevan autrijus: I only rely on that in one place,.. which is to make add_method simpler
Limbic_Region as you would likely have to adopt a naming convention to distinguish between the functional and imperative
because you couldn't rely on the signatures always being different
autrijus stevan: that totally works then
stevan so that it puts class methods and private methods and such in to the right tables
autrijus k 15:28
where in the src?
stevan perl5/Perl6-MetaModel2.0
autrijus er I mean where in it
stevan one sec,.. looking
autrijus stevan: the plan is that during the next few days I'll releng toward 6.2.10
and then focus on the .28.0 part which is MM2
and try to get it out around eurooscon
stevan autrijus: see gnosis.pl for the method "branch-by-type" 15:29
nothingmuch autrijus: please give me a two line explanation on what the diff between pretty printing and AG is?
autrijus nothingmuch: AG propagates upwards.
as well as downwards.
nothingmuch oh, i see
autrijus and no matter how much propagation you have, it only uses one (or, rather, minimal) pass
stevan autrijus: a little more in metamorph.pl too.,.. basically anytime I use blessed() I am checking that 15:30
putter if swapping mm2 for mm1 isnt expected to be too painful, I'd suggest making the transition now. it's not like there is an client expectation for -B perl5.
autrijus whereas using visitor pattern you need to do it over +Inf passes
nothingmuch is /me right in guessing that AG is a superset of prettyprinting?
autrijus nothingmuch: AG makes prettyprinting very much trivial.
so yes, but the superset is very super.
nothingmuch s/prettyprinting/pretty printer combination stuff/?
woot
i'm using them for Pesto ;-)
stevan putter: the pain swapping MM1 to MM2 will be in dealing with class objects
they have changed
they are not tied to p5 packages anymore,.. and there is no ->meta anynore 15:31
.meta is implemented in the sugar
nothingmuch autrijus: thank you for introducing me to AG
putter I'm not sure that's significant from the pilrun/P6::V/C perspective... checking... 15:32
autrijus nothingmuch: np :) thank Wouter Swierstra for introducing it to me :)
and $Larry and allison
Limbic_Region waits for the scandelous photos to emerge and for nothingmuch to blame his sordid affair with AG on autrijus
stevan putter: I think we might want to removed the MM stuff in P6::V/C though
nothingmuch stevan: that's the secret tree transformation stuff?
stevan putter: it might be best to wrap it afterwards
nothingmuch woot!
stevan nothingmuch: ??
nothingmuch autrijus: so what were your thoughts on AG/parrot? 15:33
emitting PIR?
or implementing AG in PIR?
autrijus nothingmuch: I think implementing AG in PIR is troublesome. 15:34
stevan putter: so my thought is that we supply the needed primatives for the MM, and the post-bootstrap they are wrapped in the MM to make them accessible to the MM world
autrijus emitting PIR-Tree is the correct idea
nothingmuch okay
autrijus so nothing we can't do with UUAG
and all there's left is to replace the primitive rewriting logic from hs to p6
which is considerably easier -- much much easier -- than redoing the compiler monad and gadt in p6. 15:35
that's the main attraction of AG to me
putter "primitives need by the mm" are what?
nothingmuch oh, yyou want EHC to be written in perl?
stevan putter: hashes, arrays, functions (closures) and scalars
nothingmuch you're sick ;-)
autrijus not sicker than I usually am 15:36
but yes :)
or preferably, _translated_
nothingmuch well, in that case let me retoret
yes, ofcourse
stevan and I have been privately discussing macros in blondie
autrijus good
stevan nothingmuch: you told me that was our secret *weep* 15:37
nothingmuch shutup, bitch
autrijus eww
nothingmuch ride leaving
nothingmuch will brief later
but think:
autrijus sure. I'm going to ICFP reception in an hour
be back in two
nothingmuch macro that takes a Seq and makes a [AST]
autrijus Seq of what?
nothingmuch Seq of nodes
putter stevan: I'm confused. how are the mm2 tests currently working, if there are unimplemented dependencies? 15:38
stevan ASTs?
nothingmuch seq of ASTs
and a macro which takes a [AST] and makes a seq
autrijus how is Seq of AST different from [AST]?
nothingmuch seq2list map (macro) list2seq(... some seq ...)
stevan putter: chaos.pl provides what I need,.. along with p5 (which is the current "host"/runtime)
nothingmuch type safe macros
that are just functions
they aren't really different
later on this
*poof*
stevan was questioning the sanity of this actually,.. but.,.. 15:39
putter hmm... putter goes off to do an experiment...
autrijus I'll be right back 15:40
gaal putter: sure; but i wanted to avoid polluting the environment of every process started by pugs. what i was thinking of is letting pugs know its $^X as soon as it can, in fact soon enough for helpers spawned by -B to have that passed as an explicit parameter. 15:41
Juerd I hope my latest message will be as well received as the previous 15:45
putter gaal: iblech just now added --pugs= support, and -B tolerance to jspugs. so I think we are all set for now.
autrijus back
putter stevan: something seems to be require/use'ing "lib/genesis.pm" rather than "genesis.pm". maybe. 15:47
autrijus ./lib/Perl6/MetaModel.pm: require "lib/genesis.pl"; 15:48
stevan putter: yes, it should probably not have the lib in there 15:49
autrijus also, what's lost if we name them as Perl6::MetaModel::Genesis etc? 15:50
stevan let @INC deal with it
autrijus note they are still namespaceless
just so we can install them to normal sitelib
(but I don't have a real problem of polluting the sitelib root with chaos.pl -- it just seems neater to follow the hier) 15:51
(is this a very bad idea?) 15:53
stevan no 15:54
that would work
putter has ::SELF changed ? 15:56
stevan one sec,.. call with $client
putter ah, $::SELF 15:57
autrijus okay, I'm going to ICFP reception 15:58
be back in a couple hours
putter & 15:59
Can't locate object method "add_subclass" via package "Perl6::Object" (perhaps you forgot to load "Perl6::Object"?) at /home/net1/perl6/pugsxpl2/perl5/PIL-Run/../Perl6-MetaModel2.0/lib/metamorph.pl line 116.
stevan putter: no Perl6::Object anymore 16:00
that is in $::Object
putter right 16:01
tnx
stevan no more strings for class names
gaal putter: but what populates the command line with the correct values?
nothingmuch so anyway 16:04
essentially Seq is just 'type Seq = [AST]'
and seq2list = id
stevan nothingmuch: autrijus is a the ICFP reception
nothingmuch and list2seq=id
oh
actually, bbiab too
putter gaal: i don't understand... 16:07
Can't locate object method "add_subclass" via package "Code" (perhaps you forgot to load "Code"?) at /home/net1/perl6/pugsxpl2/perl5/PIL-Run/../Perl6-MetaModel2.0/lib/metamorph.pl line 116.
stevan what is Code? 16:08
gaal putter: pugs spawns "jspugs --pugs /home/putter/src/pugs/pugs"
putter perl5/Perl6-Value/lib/Perl6/Code.pm
gaal how did it know that was the path to use?
stevan putter: I dont use that in the code
gaal but: i must go now, back in ~40min
putter gaal: don't know... iblech's work... 16:09
stevan putter: you are trying to subclass it?
gaal ah, he did the pugs side of this too? great :) iblech++
putter the same file contains some other classes which subclass it
gaal &
putter iblech++ indeed
stevan putter: what file?
putter perl5/Perl6-Value/lib/Perl6/Code.pm
& 16:10
stevan putter: you need to assign the class to something
so class 'Code' => { ... } becomes 16:11
my $Code = class 'Code' => { ... }
and then you pass is => [ $Code]
putter what was the effect of the mm1 construct - ie, what was assigned by it?
stevan putter: MM1 created a "Code" package, which held a reference to the metaclass(Code) in it 16:13
MM2 now returns a class(Code) which is the same as the old metaclass(Code)
this decouples the MM from p5 packages
putter what was the reference named? 16:14
stevan MM2 uses one package,.. called Dispachable,.. which just handles method dispatch
$Code::META
I stored it as a package variable
but to be honest,.. you should not be using the class() macros
you should be creating the class manually
putter ok, I'm going to do package Code; our $META = class 'Code' ... for a minimal-change "get it working again first" hack. 16:15
stevan my $Code = $::Class->new('$:name' => 'Code')
putter: wont work
to many other things have changed too
I am not sure there is an "easy" transition here
putter I realize the mm uses of 'Code' will have to be changed to $Code::META.
stevan MM1 just did meta($instance_of_Code) 16:16
MM1 just doe $Code
putter understood
stevan old way: meta($iCode)->add_method()
new way,.. $Code->add_method()
putter will the class() macro's still work? 16:17
stevan not the MM1 ones
they are different in MM2
and really are not meant for anything other than to make testing easier 16:18
putter "making testing easier" is what this is! :)
how different?
stevan putter: see t/10_Point.t and t/10_Point_MM.t for examples
putter I dont see a class macro in t/10_Point.t 16:20
stevan putter: attr is now "attributes"
and we have class_attributes instead of an class { attr => ... }
same with instance
we have "methods", "submethods" and "class_methods" now
does is the same
and "is" is the same
putter: yup, that one doesnt use it
but t/10_Point_MM.t does
you should be writing code which looks like t/10_Point.t 16:21
not t/10_Point_MM.t
the class() macro should not be considered part of the metamodel
putter stevan: yes, the code should eventually look like t//10_Point_MM.t. and perhaps the right thing to do now is to stop, and rewrite all of Perl6::V/C from scratch. But we have "running code". And I'd hate to lose that, just because some syntax changed. 16:22
stevan putter: no need to stop and start from scratch 16:23
putter well, extensively edit? :)
stevan yes, to a certain degree
my concern is that we have a number of MM classes in the core
the core needs to be MM free in order to bootstrap the MM
once the MM is bootstrapped,.. everything should be built on top of that 16:24
putter I'd rather do a class() compatibility macro. if that's not easy, then neither will the edit be (maybe).
ok, perhaps I'm missing something.
stevan let me ask a few questions re: PIL-Run 16:25
1) where are P6::V/C used?
putter is mm2 simply not swappable for mm1 in P6::V/C? has mm2 introduced conflicts we can't deal with?
stevan s/where/where and how/
putter: no, we can move P6::V/C over I think 16:26
but their "usage" might be an issue
putter mostly ApiX.pm, ...(irc preempts)
re "P6::V/C", err, so mm2 already provides Code, Array, Hash, Scalar objects? 16:27
stevan putter: no, MM2 expects them to exist already
for it to create itself from
putter Num, Int, Str, etc
stevan MM1 was not self-bootstrapping (it was kind of,.. but not really)
MM2 is
putter so what do you mean move P6::V/C over? puzzled
stevan one moment,.. let me look at APIX 16:28
fglock hi stevan, putter
putter since it looks like class() format changed, the key question is can one create a mm1 class() compatability macro. if so, we should be all set. if not, there are semantic changes I dont understand yet.
hi fglock :) 16:29
currently trying to bang P6::V/C into mm2. still not clear what that requires.
stevan hey fglock
putter: the key problem is in how the class objects produced by the class() macro are used
putter looks like class() format changed. thinking about adding a backwards compat version. 16:30
stevan since they are no longer tied to p5 packages
stevan has to eat some lunch.. bbiab
putter if it is merely a namespace, "how do I refer to this object" issue, then that should just be a n (where n is the number of classes) line change in P6::V/C, and a few localized tweaks in pilrun. 16:31
stevan parting thought: P6:V/C need not be implemented with the MM for use in ApiX
putter ie, 'Foo' becomes $Foo::MUMBLE.
stevan putter: can P6::V/C be just primative elements of the runtime?
fglock there are primitive classes already - but the wrapper is big 16:32
stevan putter: but MM2 has it's own Package type which will implement p6 Package stuff
putter that starts to look like throwing it away. has the underlying semantics of class() changed incompatibly?
or just the surface syntax?
stevan putter: both
putter since pilrun currently doesnt have a concept of pkg, that's not a problem. simply a naming issue.
stevan class() was always a quick and dirty macro for the underlying stuff 16:33
putter stevan: the key question is:
stevan putter, fglock: do P6::V/C need to be implemented with the MM?
fglock stevan: P6::V/C uses perl5 classes, wrapped into MM 16:34
stevan maybe we should unwrap them from the MM, and use the pure p5 for now
putter can a backward compable class() macro be written. if yes, then we're golden. if not, ie, something really non-trivial changed, then we're obviously, necessarily, looking at rewrite. no?
fglock Array wraps Perl6::Container::Array
stevan then we build the MM on top of them
fglock: so if we unwrap it now,.. then the MM bootstrapp can wrap it post-bootstrapping 16:35
putter stevan: before I waste time trying, is there any reason a mm1-compatible class() cant be written on mm2?
stevan putter: many many non-trivial changes have happened,.. MM 1.0 was largely "wrong"
putter could you give me an example of a non-trivial change? 16:36
stevan putter: the compatibilty macro can be written... however, all the code which uses any MM classes will still need to be changed
putter: there are no meta-classes
there are class instances
and there are instances of those classes 16:37
.meta is just sugar now
putter right. but that should just be order-10 lines... no?
there is 1 (2?) uses of ::meta in the whole thing
stevan in what whole thing?
ApiX?
putter (aside from warn()ings) 16:38
P6::V/C + PIL-Run
stevan really has to eat some lunch,.. bbiab
putter ok, enjoy. thanks.
fglock since mm1 classes are p5 classes, we could just re-wrap them in mm2 (that is, use both at the same time) - is this possible? 16:39
putter hum? P6V/C have a lot of class() calls which no longer work... 16:40
fglock ah ok - CLASS is a "global" sub 16:42
putter it looks more like a "rename the hash keys, and generate accessors" problem than a "everything must change" one, but I'm not sure.
for naming, we can just replace is => [ 'Foo' ] with is => [ $Foo::MUMBLE ], have the class macro do $Foo::MUMBLE = Class->new...; fix p6_new(), and... hmm, there is various code which skipped p6_new and did Int->new('$.unboxed'). so all that loses now. hmm. well, if we're creating package Foo;, we can put a new() there too. 16:45
but I still dont understand mm2's bootstrapping needs. 16:46
pdcawley_ Quick question is 6perl @Larry's mailing list? 16:48
Limbic_Region thinks so 16:52
luqui has mentioned it more than once
nothingmuch has been thinking 16:55
the next thing Blondie is going to get is parametrizable types
anyway, dinner
Limbic_Region wonders if Blondie knows about nothingmuch's scandalous affair with AG 16:56
stevan Limbic_Region: Blondie is easy, so she doesn't mind 16:57
Blondie will just move on to the next lambdacamel
she knew of nothingmuch 's reputation before hand anyway 16:58
Limbic_Region is going to have to be careful about talking of his love affair with Perl as there is a high probability that his first born daughter will be named Pearl 16:59
putter ok, P6V/C is compiling... working through pilrun issues... 17:35
working through the prelude... 17:45
nothingmuch p6v/c?
fglock nothingmuch: perl5/Perl6-Container, perl5/Perl6-Value 17:48
nothingmuch ah 17:49
putter steven: ping?
nothingmuch s/eve/eva/
putter wondering what the mm2 equivalent of attr => [ [... build => sub{...} ]] is 17:50
fglock: any idea? 17:55
fglock looking 17:56
putter since its only Scalar/Array/Hash, I'm tempted to edit them into BUILD's 17:59
ha! there is never more than one. so it's a BUILD. 18:00
fglock putter: see perl5/Perl6-MetaModel2.0/t/33_BUILD.t
putter stevan: does ->add_method() work for BUILD? 18:02
appears to 18:06
stevan: ping? 18:15
oh, doh. 18:16
Bad instance (FORCE=SCALAR(0xac3d50)) ? 18:18
FORCE=SCALAR(0xac3d50) is what ::SELF is bound to during the BUILD call. thoughts? 18:19
ok, I'm going to pause until stevan/someone can comment on BUILD. 18:20
it's not clear yet that this exercise will converge, so I'll not commit it just yet.
fglock: unless you wanted to play?
pilrun relies heavily on Scalar and Scalar's $:cell->store. but since $:cell isnt getting initialized... nothing works yet. 18:24
stevan putter: no automatic initializer anymore 18:35
putter: pong
the FORCE stuff should nto be happening though 18:36
putter hi stevan
stevan are you passing in BUILD as a submethod?
submethods => { BUILD => sub { ... }}
add_method still works
most of the API is still the same
just howyou use things has changed
putter ->add_method('BUILD'=>...)
MM->add_method('BUILD' => ::make_method(sub{ 18:37
shift;
_($a => $build->());
err, $MM.
stevan MM->add_method('BUILD' => ::make_submethod(sub { ... }); 18:38
putter oo. trying...
is DESTROY also a submethod?
stevan uhm
actually BUILD should not have to be a submethod 18:39
I should fix that
but in general it should be,... but the MM should not enforce this
putter woot. moving on from initialization to (failing) method invocation... 18:40
stevan progress !!
geoffb fades in from the aether 18:41
Hey, MM2 merge! W00t! Good on ya, putter++ and stevan++
stevan dduncan: you will enjoy this private.himi.org/%7Egwalla/flash/xmen.swf 18:42
as will any other XMen fans
ok putter so, why the failing method invocation? 18:43
putter hmm. Array uses AUTOLOAD. eep. ok, how does one AUTOLOAD?
stevan *cough* uhm... ah,.. hmm... autowhat? 18:44
putter AUTOMETH? ;)
stevan scribbles up a TODO list
putter lol
stevan yes, i was sort of punting on those
putter a lot
stevan I will put that in for yah
putter ah. ok. let's see...
stevan the attr initalizers though I think need to be in the sugar 18:45
they dont make sense in the MM
stevan dashes up the stairs for more coffee, be right back
fglock is just lurking today 18:46
stevan should be $work-ing, but just can't muster the strength to force himself too 18:47
putter should be job searching. ha.
geoffb resembles stevan's remark 18:48
stevan ok, putter I will implement AUTOMETH, and maybe the AUTOSCALAR, etc stuff too
putter attr intializers are in. though everything is rw because I didnt want to deal.
ok. 18:49
autrijus greetings 18:50
I was abducted by aliens and survived!
nothingmuch ? 18:51
geoffb Hopefully the probes didn't leave anything behind
autrijus, congrats on $job relief
nothingmuch thinks an antenna that writes haskell, inside autrijus's ass might be pretty useful
dduncan stevan, yes, thanks for sharing that ... incidentally, the creator of that one has made a variety of others too
nothingmuch just be nice to the cows with it, okay autrijus? 18:52
geoffb nothingmuch, eww and lol
autrijus lol
no, the alien is simon pj
and I've been abducted into hacking record syntax and GADTs into GHC
and it worked :D
putter fglock: :)
geoffb yay
nothingmuch that sounds spooky
geoffb oh, nothingmuch: if you hadn't already found it, this online edition of Brodie's Starting Forth actually has working links: home.iae.nl/users/mhx/sf.html 18:53
(The first one I came across didn't.)
autrijus nothingmuch: data Term a where IsZero { num :: Term Int } :: Term Bool
has certain very good properties. but I digress 18:54
geoffb We all do. At least the digressions here tend to be technical . . . :-)
autrijus ...but sometimes they involve cows instead 18:55
geoffb Moooo
nothingmuch wait, that sounds rather trivial
geoffb: thanks 18:56
didn't GADTs support this stuff already?
geoffb nothingmuch, np
nothingmuch or was GADT stuff a subset of haskell?
autrijus GADT only supported normal prefix constructors
the reason having to do with the hard-to-typeness for record selectors in GADT form.
data D a where A { x :: a } :: D Int B { x :: a } :: D String 18:57
the 'x' can't be typed
putter stevan: "2+2" on MM2 works :) 18:59
nothingmuch ah 19:00
geoffb putter: one small step for PIL-RUN . . .
putter ;)
autrijus wow, that was quick :) 19:02
autrijus backlogeth
putter ok, I'm in wait state for AUTOMETH. bbiab. 19:08
stevan putter++ 19:15
stevan searches for appropriate MM hacking music 19:16
putter: you should read this re-AUTOMETH, etc search.cpan.org/~ingy/Perl6-Bible/l...le/S10.pod 19:19
putter reading... 19:20
eeep. though I like "There is still an AUTOLOAD hook that behaves as in Perl 5." ;) 19:21
AUTOMETH looks like a bit too much extra stuff for this "swap MM1 for MM2" exercise... 19:22
could I change that request to AUTOLOAD? :) 19:23
stevan yeah I will do that
AUTOMETH is not speced enough IMHO
fglock autoload is used as an "auto-dereferencer" - it can be substituted for a $x->fetch->$method 19:25
putter certainly not for an afternoon quicky.
hmm...
fglock in Scalar, that is 19:26
putter err, what about AUTOLOAD in Array
fglock in Array it is mostly just wrapping calls to Perl6::Container::Array
dduncan it appears that irc.perl.org is down today ... or I can't connect to it 19:27
fglock AUTOLOAD is also used in Ref - for auto-dereferencing 19:28
putter ~150 lines of wrapping...
:)
stevan putter, fglock: AUTOMETH and AUTOMETHDEF seem to be weird things,.. and I am not 100% what they are doing/trying to accompish (other than making can() more compatible with AUTOLOAD)
putter AUTOLOAD would be fine by itself. 19:29
stevan yeah, thats what I am doing
putter k 19:30
fglock putter: from Array TODO: "# TODO - there are too many methods under AUTOLOAD - upgrade them to real methods" 19:31
:)
putter :)
fglock Hash was written later - it has just 4 lines in AUTOLOAd 19:32
putter if stevan encounter's difficulties, we can think about doing that now. but I'd like to keep the changeset minimal, so there is less ambiguity about what has broken in transition, and what in P6VC+pilrun changes. 19:33
stevan putter: pong 19:44
putter: MM2.0 has AUTOLOAD
I am not 100% happy with the implementation
it works like 1.0 did 19:45
eric256_ hmmm anyone have a link to the info about Juerds Feather server....if that is still running
stevan except instead of AUTOLOAD($self), you check $::AUTOLOAD
autrijus eric256_: it is, because I'm using it to irc
stevan however I htink I am going to make it stash in the package like it really should
putter stevan++
stevan putter++
autrijus stevan++ putter++ 19:46
(I may drop soon from this by-minute hotel wireless net)
eric256_ i forgot the url to ssh into for it...
autrijus eric256_: ssh perlcabal.org
19:46 DesreveR is now known as r0nny
eric256_ thanks 19:47
svnbot6 r7147 | stevan++ | Perl6::MetaModel 2.0 -
r7147 | stevan++ | * added AUTOLOAD for PIL-Run, works like it did for MM-1.0
eric256_ wanted to play somewhere on pugs but can't get it to compile on my machine...
stevan putter: fixed,.. now it stashes into the package 19:49
however, it is kinda tricky with class methods vs. instance methods
FooClass->AUTOLOAD is a different method than $iFoo->AUTOLOAD
not sure how to approach this properly yet 19:50
putter wooooooooot! prelude loads w/o obvious problems. "say 'hi'" works :)
stevan I am also unsure of how this will work/react if you use next_METHOD too
putter++
putter stevan++ fglock++
ok. I think it's safe to commit to the "try a quick swap of mm1 for mm2" exploration branch. I'll clean a bit and commit. 19:52
svnbot6 r7148 | stevan++ | Perl6-MetaModel 2.0 -
r7148 | stevan++ | * proper our $AUTOLOAD variables, none of this global hackery
putter oh, drats. didn't commit fast enough. :) r7148 broke it. 20:00
stevan putter: its a simple change 20:01
the $AUTOLOAD is not in the class's pacakge
just change $::AUTOLOAD to
::opaque_instance_class($self)->FETCH('$AUTOLOAD') 20:02
putter shudder
ok
stevan its not that bad
putter _('$AUTOLOAD') ? :)
stevan __('$AUTOLOAD)
2 _
for class attributes :)
putter :) tnx
and it's in. 20:09
there is a (in cleanup) Bad dispatcher (undef) at /home/net1/perl6/pugsxpl2/perl5/PIL-Run/../Perl6-MetaModel2.0/lib/chaos.pl line 95 ... on exit. 20:10
svnbot6 r7149 | putter++ | Perl6-Value, Perl6-Container, PIL-Run: Swap in Perl-MetaModel2.0. Some regressions. fglock++ stevan++
stevan curses perl's global "cleanup" 20:11
putter: I am actually look into fixing that
I need to have control over the desctruction order
I am looking at ogd (search.cpan.org/src/ELIZABETH/ogd-0...ib/ogd.pm)
putter fglock: there didn't end up being much change to P6::V/C. class changed to class1 (defined in Perl6::Value). Some renames ('Perl::Object', ::SELF, ::CLASS, etc). But that's about it. 20:13
class1 did most of the work.
stevan: ok
hmm, is there something like END which runs before the globals are gced? 20:15
stevan putter: yes, ENDs run in a certain order 20:16
assuming no one else uses END I can probably do the DESTROYing there
if someone uses END, then there is a trick I can use to insert a last END block using B
putter err, can pilrun just replace END{} with a global which calls the p6 END hooks when it's DESTROYed? (as long as it can be forced to be destroyed first...) 20:18
Juerd Wow, there's an unbelievably informed post. 20:19
putter basically move p6/mm END to before any p5 END's run, by using early destruction of a global to trigger it. 20:20
Juerd: post? 20:21
Juerd p6l
putter ah 20:22
fglock Juerd: may I have an account in your server? 20:23
Juerd If you request it by sending me an e-mail message requesting it, including your real name 20:24
This assuming that you're referring to feather
If you want an account on any other of by boxes, please contact me during business hours ;)
s/by/my/
fglock oh - it's feather - I'll send the mail, thanks! 20:25
Juerd Oh, and include your preferred user name 20:26
eric256_ hey juerd...you might want to edit the message when you login, since it tells people to read /home/juerd/README which isnt' usefull yet.. ;) 20:29
Juerd Or, anymore 20:30
We should have a wiki
Does anyone want to write a Perl 6 wiki?
Because if it'll be a wiki, I think it'll have to be written in Perl 6
stevan putter: hmmm, destroy things is not that simple 20:35
so many references ...
putter Ok. Still a number of regressions in pilrun. Performance is down by something vaguely like 3x. 20:36
stevan yeah, MM2.0 is slower :)
it just does more
because it uses less p5 stuff
putter stevan: re destroy. doh, yes, of course. i was fixated on END.
hmm... smokes will now likely take ~2hrs at 1GHz... 20:37
stevan putter: you could recode some stuff in C if you like :) 20:38
putter ;)
fglock: could you summarize how your unboxed stuff works?
fglock unboxed just returns the underlying perl5 object or scalar 20:39
nothingmuch omega just posted this on #catalyst... thought I might share: img330.imageshack.us/img330/8215/nooblol9em.jpg
putter stevan: don't tempt me... www.vendian.org/mncharity/dir3/inli...ustration/ ;-) just kidding.
fglock: can p5 scalars be used as p6 objects? 20:40
fglock not sure what you mean - you can tie Scalar to a p5 object, and you can use some kind of autoboxing to promote a perl5 scalar to Scalar 20:41
putter does autoboxing exist now?
eric256_ how do i tell pugs to look in /ext for the Test module?
putter eric256_: -Imumble ? 20:42
eric256_ ok. the help when you do pugs -h says -l is ignored
fglock looking for an example...
PrimP5 coerce:as implements autoboxing (kind of) 20:43
putter I noticed Class::Multimethods::Pure has support for ARRAY, HASH, etc. Prompting daydreams of a p6 Perl5::NativeObject and class Perl5::Array does Array. 20:44
Basically I'm wondering if the internals could all return native objects, which only get boxed if needed. 20:46
fglock except for lazyness, Perl 5 arrays would do everything that is needed
pasteling "stevan" at 67.186.136.119 pasted "Memory Cycle madness in the MM 2.0" (3144 lines, 179K) at sial.org/pbot/13320
stevan putter: the cycles are pretty bad :)
wolverian dammit, why doesn't my screen(1) refit to the terminal properly anymore? 20:47
fglock putter: Hash keys behave differently. The rules for Scalar are a bit different too
wolverian this is absurd
putter perhaps it's just aclimation, but on my box, pilrun has subjectively gone from "a bit slow, but fine"(except for loops) to "slowwwwww".
looking... 20:48
stevan are you using multi methods?
putter err, what am I looking at ;)
eric256_ using -l just causes pugs to quit
stevan putter: the Devel::Cycle report for find_cycle($::Class) 20:49
its unreadable,.. but it shows how impossible destruction would be
putter re "are you using multi methods?", most of the interface to mm2 is class1 at the top of Perl6/Value.pm.
stevan ok,.. 20:50
MM2 is slower,.. but when you use Multimethods,.. its really slow
but thats because C::MM::Pure is slow on top of MM2.0 being slow
nothingmuch that's ok... static analysis will save us
;--)
stevan Blondie to the rescue
20:51 khisanth_ is now known as Khisanth
putter p6_declare_class and p6_create_instance in ApiX.pm may be the only other place 20:51
stevan putter: I think it might be wise to not use the MM at this level
fglock putter: but a Perl 6 "dialect" that translated to pure-native Perl 5 would be fast, and probably useful
putter stevan: ? 20:52
stevan putter, fglock: what would be the impact of removing the MM code from P6::V/C ?
what is the value of having it use the MM?
then only p6_declare_class and p6_create_instance would use the MM
we can then wrap Perl6::Container::Array with the MM post bootstrapping 20:53
and the same with ::hash, etc
would that make sense? or no?
putter maybe it's just my rubyness talking, but I expect to be able to overwrite, say, Num's methods...
;)
stevan putter: and you will
because the user-level access will be to a MM object 20:54
but in the base impl it wont
basically this is like the diff between int and Int
one is native and controlled by the compiler/runtime, the other is part of the objecct model
fglock stevan: how about just delay loading Container and Value? 20:55
stevan don't you need them?
Contianer and Value are just wrapped by the MM right? 20:56
with native p5 implementations?
fglock I mean, load order: MM, Container/Value, then Prelude5, the Prelude6
Container/Value are actually part of the Perl5 prelude 20:57
putter Ok, I'm completely confused again. What "bootstrapping"? 20:58
stevan putter: the MM is circular,.. Class is an instance of Class 21:00
chicken and the egg problem
so at some point you break it
that is the boostrap
eric256_ don't break the egg!!!
stevan no,.. the chicken :)
eric256_ apologizes for the outbreak...but couldn't ressist ;)
putter MM is a black box. it servers oo stuff. VC use it to create some.
I don't see how mm bootstrap is relevant...??? 21:01
stevan it isnt really
putter s/servers/serves/
stevan but if P6::V/C are objects
putter so "bootstrap" doesn't matter, yes?
stevan are they objects of the runtime, or objects in the user space?
putter both
the runtime being partly implemented in p6 21:02
stevan I disagree with that (I think)
I think P6::V/C should be runtime objects only
the user version of those is different
it calls the primative runtime objects to dispatch
but they should be seperate thing I think
putter what properties do you envision "runtime objects" to have? 21:03
stevan is making this up as he goes along,.. so if I am wrong,.. please correct me
putter: I guess I see certain "things" as being part of the runtime... while other "things" are part of the language
the user-side of the language that is
putter I'm still adrift/unclear on what's being suggested # re please correct
stevan I am suggesting we remove all MM code from P6::V/C 21:04
then make part of the PIL-Run Prelude the creation of MM objects which wrap the relevant P6::V/C stuff
so that internally PIL-Run does not use the MM 21:05
putter ApiX has provided a proceedural "runtime" which isn't available in p6 space. but there is currently no data object-ish "runtime".
stevan I dont know what you mean by proceddural runtime 21:06
and data object-ish runtime
putter pilrun basically just converts PIL'ed p6 code (and a bit of faked p6 code in PrimP5) to p5 code which uses the ApiX...err, api. of p6_mumble subs. 21:07
p6_apply() then invokes methods on stuff. 21:08
and converts objects to/from native int/str/etc. but other than that, it doesn't deal with the nature or implementation of objects. 21:09
s/and converts/and ApiX converts/
So I can't quite picture a runtime vs non distinction for objects. We could implement p6 int, array, etc, as native p5 objects. And generally use them rather than Int, Array, Etc, when writing PrimP5 and PrimP6. That sounds plausible. 21:12
stevan putter: that is what I mean
although maybe not Primp6 21:13
PerlJam primps the 6
putter But basically, p6 code is being transliterated into p5. Not necessarily a great idea, junctions and autothreading are going to be... problematic. But it's simple...
Hmm... ok. int array are the low hanging fruit.... 21:14
the division between PrimP5 and PrimP6 is an emphemeral implementation artifact. if something seems to make sense in one but not the other... that's perhaps the sign of a problem. 21:15
for int, array - how do they interact with mm2? 21:16
putter goes to check ./pugs for int/array handling... 21:17
?eval 1 21:18
:(
stevan 1 21:19
putter: I am not sure pugs make the distinction
putter multi sub f(int $x){say "int ",$x;} multi sub f(Int $x){say "Int ",$x;} my int $z=3; f($z)
yields "Int 3" :/ 21:20
:) thank you stevanevalbot. :)
mm2 handles types? 21:21
stevan nope
types are not the metamodels problem
putter ohhhh.
stevan they are the containers issue
because they are compile time things
IIRC that is 21:22
autrijus: ping
putter how can one do multimethods w/o types?
stevan i hacked it :)
putter sigh. ;)
stevan I assumed they are implemented in the runtiome
multisubs
because multisubs are not part of the metramodel 21:23
and to make multisubs into multimethods is simple
eric256_ has been reading the conversation for quite a while now and has followed just about 0 of it. lol
is there anything small i can do on pugs?
PerlJam eric256_: don't feel lonely. I haven't quite grokked it yet.
eric256_ tests cleanup or anything like that?
PerlJam eric256_: tests are always welcome
stevan is not sure he gets it either :)
eric256_ any specific tests in mind? 21:24
PerlJam eric256_: Anything that is sub-tested ;-)
stevan putter: I think we need to decide what is the MM responsibility and what is not
I have made some assumptions in the design about that 21:25
putter notes docs/quickref/namespaces no longer reflects recent posts on p6l...
stevan I think they are sane ones,.. but I am starting to question this
fglock P6::Value::Code implements it's own Type object
PerlJam stevan: was one of the assumptions that everything must pass through the MM dispatcher at some level?
s:2nd/the/a/ 21:26
putter does Code do multimethods?
stevan PerlJam: only method calls
PerlJam: I assume there are primative subs available
PerlJam stevan: Aren't subs just funny looking methods on the Sub/Code/whatever class?
stevan I have to,.. i need to start with something :)
putter and there are... :) fglock++
stevan PerlJam: but how can I have a Sub/Code class without first having Class? 21:27
putter (primitive subs available)
PerlJam stevan: that's where the bootstrapping comes in ;)
stevan PerlJam: thats too much to bootstrap,.. to many subs are used before you even get to a point where you can create Sub/Code 21:28
fglock putter: it does multisubs
stevan I think it makes sense to assume a base level of functionality
putter stevan, I'm not suggesting insanity (re design assumptions). just noting another blob functionality for our collective todo list.
stevan even smalltalk does that :)
putter ooo
putter removes blob of functionality from our collective todo list. ;) fglock++ 21:29
fglock putter: Code.pm has a very simple "resolution order" algorithm - this needs to be implemented 21:30
putter does ./pugs ever use int/array/mumble? (so I can look at it in PIL...)
PerlJam holy crap ... there's a guy walking across the parking lot here that looks just like a slightly balding Larry Wall
stevan hey PerlJam werent you in TX? near the hurricane?
PerlJam yes, I'm TX. No where near the hurricane (though Corpus Christi had a mandatory evacuation just in case) 21:31
I'm *in* TX
stevan I suppose it is a pretty big state ;)
for some reason I thought you were in that area though 21:32
putter ah, no type information (attached to variables) is coming through PIL at all.
fglock: any thoughts on int/array/etc? Are they just native objects? 21:33
PerlJam stevan: Texas is hyooge! If a pick a direction, I have to drive at least 4 hours to be out of the state (and then I'm in Mexico), or if I want to stay in the US, I have to drive at least 6 hours along the coast or 8 hours north or 12+ hours east
putter at 90 mph. ;)
stevan PerlJam: yes, i drove from New Orleans to ElPaso once
PerlJam putter: that's a given!
stevan its a big-un fo sho ;)
via Austin too 21:34
PerlJam stevan: did you get a good look at that sign as you come in TX on I-10 from LA that says 800-some-odd miles to El Paso ?
fglock putter: they can be made into native objects - but this requires some work 21:35
putter so, how would it work?
they have to show up as Type's,
the ApiX.pm p6_to_mumble need to be made happy with getting a native rather than mm object, 21:36
the multimethod dispatcher has to be able to coerce them to boxed forms, 21:37
fglock re Type: Type->new( name => 'Array', match => sub { $_[0]->isa('Array') }, .. and so on
re dispatcher: it is hard to tell str from int from num 21:38
but this may not be a problem
putter re str vs num, there's a p5 magic trick for that. int vs num could just be int($x)==$x ? 21:39
putter goes to look for magic...
PerlJam wouldn't it just box them all as a Native type and have the appropriate magic buried within?
fglock Int, NaN are not supported by Perl5 - it thinks they are str
Perl6::Value::stringify and Perl6::Value::numify handle native types - but it is slow 21:40
PerlJam a Native thingy would be analogous to perl5's SV and have slots for IV, NV, etc. and couple of bits to tell you which native type it really is. 21:41
putter (~$_&$_) eq 0 from damian's multimethods.
PerlJam: but it would be nice (performance wise) if an "int" could be a native p5 int. 21:42
If the long proposed p5 patch to permit non-blessed references (ARRAY, HASH, etc) to have methods had ever been applied, we wouldn't be struggling here. It would be trivial. 21:44
fglock putter: Value.pm, line 377 - implementation of unboxed types - you can use that
re ARRAY, HASH - p6 arrays can be infinite; hash keys can be objects
you can't easily reuse ARRAY and HASH, except in some cases 21:45
putter is p6 "array" required to be infinte-capable? 21:48
hash keys could just use object id.
fglock Array is lazy by default, you have to use the "Eager" role to make them non-lazy 21:49
putter ok, Value.pm, line 377 seems straight forward. one could add a fastpath for non-ref objects and for ARRAY.
but what about "array" as opposed to "Array". or does such exist? like "int" and "Int". 21:50
PerlJam there is no array vs. Array
putter s/exist/speced/
ah, ok.
fglock re hash: that's what Perl6::Container::Hash::Object does (store id)
putter perhaps an implementation language extension ;)
does P6::V/C call methods on things which might end up being native objects? 21:51
eg, if a native int get's placed in an Array, or Scalar.
fglock this is done by the compiler, now 21:52
does PIL emits "int"?
putter doesn't look like it unfortunately 21:53
thus no coerce either
anyone remember the name of the CPAN module which permits method calls on unblessed references? 21:55
fglock putter: "autobox" 21:56
putter fglock: how can it be done by the compiler? if I do a Scalar->new()->store(3), does that work? or will someone perhaps try to 3->mumble() it.
ahh, autobox. thanks. 21:57
fglock putter: it should work, if there is a mumble(Int) - I don't know if it works in pil-run 21:59
putter $x=Scalar->new();$x->store(3); $x->zark() returns "3" !? :) 22:01
as a Str. 22:02
obra seen rkinyon
fglock it was programmed like that (Scalar.pm 257) - I'm not sure why 22:03
putter ok. so it looks like things can be made faster. perhaps even faster than they were. but perhaps that should wait until after the switch to mm2 settles down. there are still a bunch of regressions.
:)
so maybe just suffer for a bit until mm2 is working as well a mm1 did. then add a fastpath. 22:04
sound plausible?
fglock is there a pugs release nearby? in that case, we could wait until after the release 22:05
or create pil-run2 22:06
geoffb fglock, autrijus has been making sounds in that direction, but I doubt much will happen until he has absorbed ICFP for a couple days.
He could surprise us, of course.
putter since no release has ever really supported a pilrun, there are no support issues. and expectation management wise, low-key and crufty is perhaps even better than putting effort into "having a pretty face". p6/parrot has been so oversold, minimum time to extensive functionality is perhaps the only metric which matters. 22:08
geoffb It would be nice though not to have the P5 backend on fire at release time 22:09
putter yes
geoffb at least something for the release-waiters to play with, even if it's not as good as it was, er, a few hours ago 22:10
putter err, for some definitions of "on fire"
geoffb nod
.oO( Why doesn't iblech just leave the bot in 24x7? Metered internet? )
22:11
fglock PIL-Run no longer promises that "only say 'hi' works" :) 22:12
putter :)
I'm a great believer in minimizing client expectations... but that was beginning to seem excessive. :) 22:13
fglock: so, how shall we approach getting mm2 settled in? make smoke and test (iblech++?) are both working. some things like ::meta are likely "things known to need updating". I'm not sure what else is in that category. 22:15
stevan: ping?
smoke will take a few hours though. 22:16
fglock Is Scalar an Array working? I could work a bit on that
putter when I started a make test-perl5 run, it looked like there were some regressions both in sanity and array. 22:17
fglock btw: I think adding junction support to Code->do is not too difficult (without threading) 22:18
putter anything with {'instance_data'} probably needs to be changed. 22:19
! awesome. :)
fglock I'll take a look later - I must leave in a while
putter ok. thanks. 22:20
stevan: what is the mm2 version of $_[0]->{instance_data}{name}
fglock putter: would you create an entry in docs/journal later (about pil-run/mm2 integration)? 22:23
putter trying ->name 22:25
svnbot6 r7150 | Darren_Duncan++ | /ext/Locale-KeyedText : resync with perl 5 changes, and other perl 6 specific formatting changes
putter fglock: err... feel free? 22:28
I've been avoiding logging progress as expectation management on this thing (p6 on p5) is going to be a doozy, and I'd like to avoid the usual p6/parrot thing of claiming things work, even when brief user experimentation will show they don't. 22:31
Here, yes mm2 supports roles, modules, etc, etc. Which is great. But pilrun sure doesn't. Even ./pugs -C doesn't. So it's not going to happen real soon (unless I spend a day or few spending time I shouldn't;). 22:33
eric256_ does all this class work you are doing right now effect pugs? i've kinda got the feeling it is a perl5 implementation that is going to be translated..or is that the wrong feeling? 22:36
putter So what would one say? pilrun has switched to mm2. that is, it's now even more broken than it was before. ? 22:37
eric256_: pugs is only affected in that ./pugs -B perl5 now exists. Which would be something to advertise... if only it worked a little better.
eric256_ any rough ETA when pugs is going to start seeing all these class and roles things? 22:39
putter It works great from a development in progress perspective. But rather less so from a "random user reading pugs release announcement" perspective.
well, with mm2, and autrijus having time again, perhaps rsn. as in a week or few. 22:41
geoffb He seems to be pushing for 6.28.0 by EuroOSCON
pdcawley_ Remind me, what's the syntax for specifying the return type of a function? 22:44
putter foo () returns Int {} ? 22:53
stevan: p5ugs> :5 Str->new()->isa('Class') 23:01
1
pdcawley_ Ta. 23:06
pdcawley_ wonders if TSa will understand his point this time. 23:07
svnbot6 r7151 | putter++ | Perl6-Value, Perl6-Container, PIL-Run: updated uses of {'instance_data'}. With DESTROY's now working, the gc errors are pervasive. Perhaps the DESTROY's should be commented out, just so we can get work done. 23:13
r7152 | putter++ | Perl6-Container, Perl6-Value - disable DESTROY's to moderate MM2.0 gc problem. 23:20
stevan putter: pong 23:52