The Return of the Journal : pugs.blogs.com/ | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6
Set by GammaRay on 31 December 2005.
dduncan I find that pugs is quite tempermental as to its speed 00:04
after the last update, I did 'make', and then 'make smoke' ... according to the figures, things like the first few ext/ tests were taking 35-50 seconds each, and everything else correspondingly slow 00:05
part way through 'builtins', I killed it, did a make realclean, rebuilt, etc ...
now smoking again, its about 10-20 seconds per test 00:06
the same tests, with the same source code, and no config file changes
and same computer load
I've seen such variances over the last 4-6 months, and I'm not exactly sure what causes them 00:07
the difference would be code/config related, as all members of the test suite get faster or slower by about the same ratio 00:08
code/config/compiler that is
00:09 \xe6var joined 00:12 \xe6var joined
wolverian whoot, Class::Spiffy 00:15
00:29 lisppaste3 joined 00:31 bsb left 00:35 kroh joined, cPbrian joined
cPbrian do you? 00:36
00:47 rhesa joined
azuroth I do 00:50
00:52 frederico joined 00:54 frederico joined
rhesa hi all. i'm new to pugs and perl6, and thought i'd get my feet wet by porting something from perl5. I've started on HOP::Stream, because that's very simple code. But I'm having a hard time finding out how to do certain things. Here's an example: sub is_promise {...} should return true if the argument is a code ref. How do I test that in perl6? 00:56
I've got something working with "$ref.isa(Sub) or $ref.isa(Block)", but it feels awkward.
scook0 rhesa: you could try multimethods 00:59
also, .does is probably preferred to .isa 01:00
rhesa thanks 01:01
wolverian probably the whole idiom needs refactoring to a more typed environment
rhesa likely, but I have a bootstrapping problem there :) 01:02
I know perl5, but not perl6
and I find it hard to get started.
wolverian right. it'll work with a more perl5ishy approach, too.
so, continue. :)
rhesa I've read a lot of the stuff on dev.perl.org, the pugs docs, some modeules in there, and some of the pugs tests, but it's difficult to distill idiom from that just now. 01:03
here's one i don't know how to write yet: " while( defined( my $num = foo() )" 01:04
wolverian while defined(my $num = foo) { ... }
rhesa pugs barfs on the "my" there. Should that be written with a pointy thingy?
wolverian not really, but since perl6 supports lazy lists, you might as well move from while to for
for foo -> $num { ... } # where foo is an iterator 01:05
I'm not sure how well pugs supports this yet
rhesa let me try that :)
01:08 Ovid joined 01:09 KingDiamond joined
rhesa hm. where do I look up how "for" is supposed to be used? 01:10
Ovid Hey, Class::Spiffy doesn't use source filtering. That should make some folks happy. 01:11
01:12 abc joined
miyagawa yeah, new YAML.pm uses it 01:17
robkinyon audreyt: ping 01:26
01:27 justatheory joined 01:34 kroh left 01:43 \xe6var joined 02:02 Cryptic_K joined 02:06 Khisanth joined 02:15 ben` joined 02:16 KingDiamond joined 02:21 Khisanth joined 02:24 pdcawley joined 02:30 vel joined 02:34 ben__ joined 02:35 ben__ left 02:41 xern joined
audreyt stevan: I'm off to $job now, but please sanity check my p6l fix. 02:46
&
obra reaudrey 02:47
later
02:49 vel left 03:05 beppu_ joined 03:11 grayson joined 03:12 grayson joined 03:17 ben` is now known as grayson`
meppl guten morgen 04:09
azuroth heyo 04:42
04:48 Amnesiac joined 05:03 Cryptic_K joined 05:16 putter joined
putter anyone around who wants to stroll over to the whiteboard and have a chat about p6 types/classes/object/bless and discussions of same? 05:19
beppu_ whiteboard? 05:22
05:23 gantrixx joined
gantrixx hello? 05:23
beppu_ 'sup?
gantrixx wow, I'm in 3 different groups and you are the only one saying anything 05:24
beppu_ maybe everyone's asleep.
gantrixx maybe
maybe everyone here is from europe or something
beppu_ I'm in California. 05:25
how about you?
putter it should be noonish in asia+aus, no? why no warm bodies this time of day?
gantrixx Arizona
beppu_ not too far away....
putter hi gantrixx
gantrixx hi putter
where are you from putter?
Actually, I just logged on to get a little help from the handhelds.org guys 05:26
but no one is in there
putter US/Massachusetts. Just an hour or few from steven.
gantrixx US/Phoenix/AZ
I just got a Nokia 770
putter re whiteboard - a blackboard-like thing hanging on the wall, to stand in front of while conversing, drawing illegible sketches, and waving hands. 05:27
beppu_ ok, cool. I was just making sure you guys didn't have some kind of online shared space for sketching stuff in realtime.... 05:29
putter wishes...
beppu_ kinda like a graphical SubEthaEdit 05:30
putter no, I'm just a bit bemused by the recent p6l and #p6 discussions on bless etal, and was looking for another brain to help crystalize my thoughts.
;)
s/my thoughts/thoughts/ 05:32
beppu_ I'm so far behind the times when it comes to perl6... What's "bless etal" ? 05:33
beppu_ can't even get pugs to compile on my machine because it's so RAM deficient. 05:34
s/my/his/;
05:34 Skud joined
putter re what is, in the specific, the most recent threads on groups.google.com/group/perl.perl6.language . In the general... hmm... the spec being both... broad... and a source of unhapiness (and not about its broadness), and... a source of non-meeting-of-the-minds and perhaps non-Ofun discussions. 05:37
beppu_: tewk was setting himself up to do memory and time profiling. perhaps there will be some outliers which can be clipped, broadening the range of machines which can deal. 05:38
for a while, there were also prebuilts on Windows. if there is enough interest (ie, someone decides to host it:), perhaps we could have a "contributed builds" resource. 05:39
beppu_ I'm running Gentoo. 05:40
My debian box at work has pugs, though. (apt-get install pugs)
putter does debian have a prebuilt concept? pugs has definitely been debianized.
ah
beppu_ yeah, debian packages contain prebuilt binaries. no compilation required. 05:44
Well, I'm looking through the thread that says Perl 6's bless is seriously broken. Is that the one you were thinking of?
05:46 elmex joined
putter yes 05:48
:)
beppu_ Although I don't know enough about p6, I'm inclined to agree with rob kinyon that bless doesn't seem necessary in p6. 05:49
putter ok, other thoughts? 05:50
comments/observations/musings/remarks? ;)
beppu_ I'm going to miss that built-in. It was very useful for code poetry. ;) 05:51
putter :)
beppu_ but who knows if it'll really go away. It certainly seems less useful, now.
It really was brilliant for perl5. Definitely a hack, but a good hack in my opinion. 05:52
putter agreed
beppu_ perl6 seems to have a more formalized notion of OO, and thus bless seems like it's kinda left without a job to do.
putter hMMmm... 05:53
ok... does bless have a job, what is it, is it necessary... 05:54
backing up to big picture,
05:55 Cryptic_K joined
putter p6 oo is still quite, I dont dont quite want to say "fuzzy", but.. 05:55
beppu_ originally, bless was used to associate a reference with a package name. it associated data w/ behaviour which is the essence of what it means to be OO.
I thought that was so clever when I first read about it... (6 years ago?). 05:56
(I loved the name, too.)
putter Larry is uncertain say Classes and Roles will really exist, and to what extent Class.new things ("instances"?) are Class and/or Role -like.
beppu_ bless -- I'm making you special...
putter ha! I hadn't thought of it like that. :) 05:57
stevan putter!!
putter stevan!! :)
beppu_ what about me? ;)
j/k
stevan beppu_!!!
beppu_ YES!
;)
stevan putter: we should organize a northeast corridor hackathon :) 05:58
putter step up to the whiteboard! beppu_ and I were just starting a chat about bless etal...
stevan putter: yes, I saw,.. although I really should go to bed,.. i couldnt resist :)
putter stevan: yes, definitiely. NE P6 User's Group. ;)
stevan putter++ # yes, perfect!
putter Hey, we can have the first p6mongers group! :)
stevan I think chromatic is starting to make sense, ... at least in the sense he is saying things I want to hear :) 05:59
putter: I wonder how many other #p6-ers are from our area?
putter goes back to look at chromatic's posts... has some meta-observations to share too...
stevan putter: I just responded to it, and tried to expand on some of what I think he is saying 06:00
mainly that "it's all just storage"
which means a class is a class is a class no matter what "storage" you use
you can tell them what you would like used, and then it's the compilers problem to figure it out 06:01
which in a way actually helps to make the distinction between PIL^N and Perl 6 a little cleaner in my head
which also reminds me of something you were talking about with Inline::PILN 06:02
which makes me think that something like that is not a bad idea really
that being able to have the body of a method hold some code other than perl 6, but which corresponds to the repr type might be interesting
putter hey stevan, would you like to backlog the last couple of minutes (it's short, but it will sync us) of converstation w me and beppu_? colabti.de/irclogger/irclogger_log/...-01-20,Fri 06:03
stevan yes, I did already
putter ok
stevan I also think chromatics point about bless really being the same as CREATE is nice 06:04
cause one of my biggest problems of late has been figuring out how those two are supposed to interact
(which is what S12 says)
but which does not seem to make sense to me
putter tries to figure out how to phrase / make describable his primary impression from the discussion... 06:06
There seem to be issues with the choices of levels of detail for the discussion. Ie, 06:07
On the one hand, there is Larry being uncertain Classes and Roles exist, and to what extend Foo.new's are Class and Role -like. On the other hand, 06:08
stevan where is larry being like that?? 06:09
06:09 dduncan joined
stevan which thread 06:09
putter there is a long chain of decisions though design space <pause>
stevan or just in general
putter: gotcha
I didnt know if it was something more specific recently :)
putter in general. he periodically pauses and says, unless this <some foundational thing> goes different. more on that in a moment... 06:10
06:10 MuadDie joined
putter <unpause> and observations that if we big bag of specific constraints foo, additional constraint bar doesnt play well, "ouch!". ;) 06:11
Now, Larry's end makes sense in that
he has a set of properties in mind for the design, and is comfortable with arbitrary wanders in design space in hope to better maximize his happiness metric. And the implementation choice chain end makes sense, because 06:13
you are working on a specific implementation. Or not quite, and i think that's my thought. If Larry's vision is the client (or Larry, whatever), then 06:14
he seems in a place where point solutions, implementation spikes, wont meet the needs of the client. I don't see a dialog of 06:15
"here are a whole bunch of things bless could mean,", and there are a lot of them, variously interesting and less so, "and some of the concequences fo those choices". 06:16
The contrast stuck me as really odd.
;)
putter goes back to read stevan's earlier comments... 06:17
stevan putter: I do tend to be focused on the "how do we implement this thing" end
but I am also concerned about keeping things consistent, not only in the language design, but in how the language is "built" 06:18
which is not really about implementation so much, because a good language (IMO) is a small one, upon which you can build the rest of the language 06:19
pasteling "stevan" at 67.186.136.119 pasted "Weird Inline idea" (10 lines, 217B) at sial.org/pbot/15530 06:20
putter Agreed. Kernel languages, eg Oz, ++
stevan yes
putter: please look at the paste
this might be an interesting way to accomplish a number of goals 06:21
1) convert p5 to p6 mechanically
if we can use p5 inline, then it becomes much easier I think
putter It's just like there is a mismatch between the topic being discussed, rather the problem domain trying to be clarified, and the terms of the discussion. Take bless and MOP, (will look at paste in a moment..)
stevan putter: yes I agree,.. i felt that too 06:22
2) deep language interoperability becomes really easy
3) the Container code (Array, Hash and Scalar) become very easy since they are just a bunch of inline[PILN] methods ;) 06:23
putter assume not unreasonably that we will have a complete mop (anything doable can be done though the mop). then what subset of mop functionality is named "bless", and how p5 or whatever it is, sort of doesnt matter. But its being used as proxy for what the object system looks like on the other side of the mop. Rather than that being discussed directly. no?
putter goes to backlog and read paste... 06:24
stevan putter: yes (at least I think so), the best way to handle cross language interoperability one a sub|super-class level is to make MOP compatibility layers 06:25
stevan is reading a really great book on really crazy MOPs now actualy
beppu_ stevan, what books is that?
putter s/But its being used/But the definition of bless is being used conversationally/
stevan beppu_: it is called "Advances in Object-Oriented Metalevel Architectures and Reflection" 06:26
beppu_ is googling...
stevan its from like '96, so it's a little old, but has some really interesting stuff in it
beppu_: it is kind of like a sequel to "The Art of the Meta Object Protocol" 06:27
beppu_ haven't read that one, either.
stevan some of the same characters come back, etc etc etc :)
putter ewww, CRC Press. 06:28
beppu_ I probably should, though.
stevan beppu_: it's a lot of LISP code, but its very well written and fairly easy to follow
putter: what is wrong with CRC?
stevan doesnt even know who CRC is anyway 06:29
putter www.worldcatlibraries.org/wcpa/top3...9e526.html 06:30
dont immediately see a home page for the book :( 06:31
06:31 GeJ joined
stevan its an old one,.. mostly a collection of cool MOP based papers 06:31
putter ok, anyway, where were we...
stevan did you look a the paste? 06:32
beppu_ Pardon my noobiness, but are they going to allow that kind of inlining?
(re: your paste)
stevan beppu_: no idea, I just made it up :)
GeJ greetings all 06:33
stevan hello GeJ
beppu_ so what would the bless mean for class Foo ?
are instances of Foo a Foo and a pydict ?
stevan it just tells Foo what kind of storage to use,.. that is all
beppu_: no, they would be Foo only, the pydict would be hidden from the user 06:34
it would be just for storage
but then it makes it hard to get to the storage, which is where the inline idea comes in 06:35
beppu_ and when you say storage, are you saying... that that particular bless is saying that class Foo uses python semantics for its innards?
stevan because if you can't get at the specific storage type, i see no reason why it is anything different than plain old p6opaque
beppu_: no, I am telling the compiler that it should use a pydict to store the attributes for instances of Foo 06:36
putter re paste, * inline languages (agreed); * using a method "is foo" mechanism (unclear - some reservations); * reps setable independent of Class (agreed), to thnigs from other languages (agreed), using bless (unclear - some reservations). field-like (attributes, sigh, whatever they are called) spec being independent/overlayable on underlying replike thing (agreed). let's see... were there any other concepts...?
beppu_ ok...
stevan putter: nope, I think thats all of them
putter re book, if there are papers you really like, if you could mention them that could be neat. maybe google will turn up an online copy/variant. 06:37
stevan putter: I will look, however, the book was published in 96, so they may not be onlin
beppu_ this bless is a lot different from p5 bless, then.
stevan beppu_: yes, basically
but taken this way, it does not break backwards compatibility 06:38
since any p5 code would use it just like a normal blessed p5 hash
beppu_ very clever...
putter book definitely not online (CRC:), but some papers may have "equivalent" tech reports which are, for example.
stevan but the p6 code would wrap that hash and just DWIM
putter stevan: in a universe of namelike (and typelike?) things, plus funlike things (dispatchlike?), and fieldlike, and replike (supporting the others)... do you think of replike things being strictly for fieldlike support, or also/alternately playing with funlikes or typelikes? 06:41
beppu_ 's brain exploded. 06:44
stevan :D
putter: I am starting to think of replike things less strictly
putter and any thoughts on what a fieldlike api looks like? is it just a pointer, and the client writes handlers which frob it, and those are of a "normal methods users might use" flavor? or do potential rep objects provide an api the compiler can wire into? or... I'm not sure what other possibilities exist...? bound to be some...? 06:45
stevan ideally all reprs would support some kind of feildlike interface, which would be get_attr, set_attr and has_attr 06:46
but if they didnt, then I suppose the inlining idea would be useful
putter apologizes to beppu_. hands him bits of brain wiped from whiteboard. beppu_ reassembles (hopefully:)
stevan our whiteboard is now spotted with beppu_ brain, yulk 06:47
beppu_ I'm going to lay down and recuperate. I'm going back to hacking on p5 for work.
stevan :)
stevan has to sleep soon himself
putter eep, almost 2am.
gaal just comes in to say hi 06:50
putter Hmm... I guess my takeaway argument is...
gaal I guess you folks are going to sleep :) 06:51
putter hi gaal. dont mind the brain on the whiteboard. beppu_ had a bit of difficulty.
rsn, yes
gaal heh.
06:52 MuadDie left
gaal rhesa: "my" doesn't work yet when inlined. it's in the language, but hasn't been implemeneted in pugs yet 06:52
putter things, hmm, but sometimes brain explosions are a _good_ thing. like that "my brain has just be scrubbed by a brush" feeling some awesome conversations leave you with...
gaal well, many of the scoping problems in pugs currently are of the "ouch" variety of brain explosion 06:53
putter ooo, then the my.t failures can be :todo<feature>ed? are do at least some of them have other causes..
stevan bids all a good night 06:54
stevan &
putter but, but, ah well. putter will try to remember main takeaway point for later.
bye stevan &
gaal putter: I thought they could (and did, but svn was down)
night
putter oh, right
putter attempts to svn up, waits, waits, waits... 06:55
ah well. 06:56
re takeaway thought...
dduncan I am happy to report that, as shown in my newly uploaded smoke (normal runcore, darwin), the infinites in the test suite are gone, so it runs through to completion again 06:58
putter We are in a broad and attractive design space which with luck we will be happily exploring for years. A... possiblities-oriented?... discussion, an implementation approach which emphasizes area rather than point solutions, and
a lets pull things together easily to bootstrap (area solution implies if it isnt quick and easy, we are missing some needed tools) approach... might be nicely productive. 07:00
Contrast with some language design situations where you have "god, if we dont manage the politics right at the March committee meeting, then feature x wont make it into Zibble06, and we'll be screwed for years". 07:01
While having to do a "Perl 6.0" imposes some "must get it right" pressure, it is at least plausible, given the nature of p6 and pugs, that we are better off getting it wrong, quickly, and having time to play with the language before it gets nailed to the floor as 6.0. Though the risks of 07:03
that approach is we take it, but with little control over the size of our popluation, end up with a make senario - realizing we made mistakes (significant tabs), but having too many users (tiny relative to eventual, but sufficient...) to fix it. 07:05
But still, if we can't handle the complexity of the p6 design space gracefully, then that is perhaps a hint that p6 needs additional complexity handling devices. ;) 07:06
end of takeaway thought. :)
dduncan: yay. audreyt++ (I fuzzily recall from svnbot lines going by...) 07:07
stevan: note above takeaway thought :) 07:09
putter cleans whiteboard. turns off light.
good night all &
such a quiet time of day... 07:10
07:12 iblechbot joined 07:15 putter joined
putter late night postit... 07:15
m19s28.vlinux.de/iblech/stuff/pugs-...508b6.html
dduncan++
:) iblech++ for smokeserv
(have to take time to appreciate the infrastructure you sometimes dont notice because it works so well:) 07:16
dduncan: hey, you have NaN issues too!
tewk: how did numbers go? 07:18
search.cpan.org/~ingy/Class-Spiffy-.../Spiffy.pm 07:20
any #perl6 folks from the US North East, please ping stevan or me. NE P6 User's Group! ;) 07:22
beppu_++ Thank you for the conversation! :) 07:24
beppu_ putter, You're welcome, and go back to sleep. ;) 07:26
putter www.isbn.nu/toc/084932663X has a nice ToC for Advances in Object-Oriented Metalevel Architectures and Reflection... $100! yipes. 07:29
:) good night beppu_ &
beppu_ good night.
07:56 joepurl joined 08:29 christo joined, saper joined 09:16 kane_ joined 09:17 Alias_ joined
Alias_ audreyt: ping? 09:17
seen audreyt 09:18
jabbot Alias_: audreyt was seen 6 hours 31 minutes 40 seconds ago
09:31 RichiH joined
RichiH this might sound like a strange question, but will perl6 support /* */ or some such to comment whole blocks? 09:32
Alias_ Perl's never really gone for those, because you can't nest them 09:33
09:33 dada joined
Alias_ But if not, someone will probably write a module that modifies the current grammar so you can :) 09:33
RichiH heh 09:34
RichiH would choose being able to run stuff on any installation over this way to do quick and dirty debugging ;)
plus, i can use visual mode and :<,>s/^/#/ and back or I. still, would be nice ;) 09:35
09:48 G2 joined
azuroth merry christmas 09:59
09:59 Alias_ left
dduncan a little late for that, eh? 10:08
10:20 wilx joined 10:24 r0nny joined 10:30 iblechbot joined
beppu_ I don't like Python, but I use BitTorrent. 10:30
I don't like Java, but I use Azureus and FreeMind.
I *like* Perl, but there aren't any full-blown applications written in Perl that I use (aside from web sites). 10:31
same w/ Ruby.
(delirious ... 2:30am)
PST
10:32 azuroth left 10:34 bsb joined
dduncan that should change 10:36
it WILL, if I have anything to say about it
beppu_ whois dduncan? 10:41
10:46 kane_ joined
dduncan what did you want to know? 10:47
my web site is darrenduncan.net , if that helps
beppu_ I'm just being delirious. I gotta go to sleep. ;)
what kinda app are you planning to make, though? 10:48
dduncan a consumer database app, which should become ubiquitous 10:59
used by almost everyone ... with a computer
its technically designed for organizing research information (including genealogy) but it is broad enough to handle nearly anything you'd use something like Filemaker Pro or MS Access for 11:00
so it does inventories and stuff too 11:01
that's all I will say for now
good night
11:16 Eric joined 11:19 Eric left 11:31 scw joined 11:38 mjl69 joined 11:50 mjl69 joined 12:00 elmex joined 12:05 Alias_ joined 12:07 r0nny joined 12:26 wilx joined 13:01 KingDiamond joined 13:02 penk joined, ajs_ joined 13:12 DesreveR joined, DesreveR is now known as r0nny 13:29 Limbic_Region joined
Limbic_Region long time listener, first time caller - is the repository down? 13:30
audreyt appears so. checking 13:35
audreyt ported group_concat from mysql41 to sqlite3 today 13:38
Limbic_Region is not a heavy enough of a db user *yet* to need to build custom tools - but cool 13:40
13:41 \xe6var joined
audreyt hm svn.openfoundry.org is dropping packets heavily 13:42
audreyt suspects router problems
clkao luckily we have offline version control
13:48 DaGo joined
bsb svk++ 13:50
lypanov admits to loving svk 13:56
lypanov switched a few daysd ago
s/sd/s/
audreyt: hehe. a coworker asked why i was "in the news"
(wrt blog)
13:57 iblechbot joined
Alias_ You were in the news? 13:57
lypanov my nick is mentioned on the pugs blog
Alias_ btw, the planet Perl 6 layout is screwed 14:01
lypanov: You are a Ruby'er?
audreyt lypanov: :D 14:03
lypanov Alias_: i use ruby yup 14:04
stevan good morning boys and girls 14:15
gaal good morning mr stevan!
stevan hey gaal
audreyt stevan: yo! 14:16
stevan audreyt: I think your "if it does Hash" thing is sane,..
however, it means that bless if different from CREATE
but thats okay
audreyt I think that's okay, and that's what people'd suspect. 14:17
stevan I really just want clarity,..
audreyt a Foo that does not do Hash yet can be acted-at-distance with %args
is just wrong to me
stevan agreed
audreyt (see my new p6l post)
stevan yup :)
I am concerned about the idea that Hash might have been does-ed earlier in the ancestry, 14:18
Alias_ It would appear that Planet breaks every time there's a link
stevan and methods overridden in ways which are incompatible
but I think that could still be managed 14:19
audreyt yup
Alias_ audreyt: There's another layer of POD/layout cleanups in Module-Install 14:20
stevan we just have to make sure to deal with it in the OO Style Guide :)
Alias_ audreyt: For whenever you want to do the next release... but update before you change anything
audreyt: ... because I changed pretty much every single file
audreyt Alias_: woot
Alias_ We need an example for the cookbook section on doing C-based modules though 14:21
Because I've had a couple of people ask what to do, and I don't know what to say
All that can_cc, etc etc stuff 14:22
stevan ingy: pingy
14:22 r0nny joined 14:28 kolibrie joined 14:30 Khisanth joined
audreyt tries perl5.8.8rc1 out with -DPERL_DONT_CREATE_GVSV 14:42
14:42 chris2 joined
Alias_ Module::Build isn't going into 5.8.8? 14:42
stevan audreyt: what does that do? 14:43
Alias_ how odd
audreyt stevan: it maintains bincompat but eliminates unused runtime scalars for each and every symbol 14:44
i.e. if you code in mostly lexical scalars
then it can save a lot of mallocs 14:45
that's one of the many Ponie-inspired refactorings
Nicholas++
Alias_ Practically meaning what? Less memory? More speed? 14:46
audreyt both
Alias_ neat, how much?
audreyt and far better ithreads cloning behaviour 14:47
I don't know, I intend to bench
Alias_ good
audreyt which is why I'm compiling it
search.cpan.org/~nwclark/perl-5.8.8...8delta.pod # very impressive
Alias_ ok, this weekend I hope to have test cycles running in PITA
Which means $you_guys might want to take some interest and look at setting up some stuff for doing your smoke testing 14:48
audreyt stevan: so, do you think we punt .bless in our boot code for now?
stevan: or do you think we should change reprs so all respond to opaque accessors (which works for me too?)
s/..$/reverse $&/e
hm, this is #perl6, so prehaps s!..$!{reverse $/}! 14:49
stevan hmmm 14:50
I think we can support bless in the boot code
and I dont think we need to mess with the reprs for now
I think I would like to get bless and CREATE working in the way I currently envision them
audreyt okay.
stevan as seperate things unconnected to one another
audreyt yup 14:51
stevan then build List/Array/Hash/Scalar using the repr types as they are now
audreyt nod
stevan at that point I think we will have a better idea of how the reprs work
audreyt agreed
14:51 rantanplan_ joined
stevan at least I hope we will ;) 14:51
audreyt also, I'm thinking about this construct 14:52
true`if_then(->{1}, ->{nil})`add(2)
stevan hmm 14:53
what is that for?
audreyt it's a codegen issue
one approach is to codegen each branch into int`add and nil`add underlying instructions 14:54
and then by static analysis we know there could never be a nil`add
stevan yes
audreyt and therefore reject that code
i.e. don't give the illusion that PIL^N is somehow polymorphic -- they are just sugar
makes (some) sense?
stevan cant we just optimize out the ->{nil} becuase of the true at the start? 14:55
or was that just for example :)
audreyt it's just for example ;) replace that with something less analyzable if you will :) 14:56
stevan ok
audreyt and also, eve if we optimize out, that happens after typechecking
so it should still be rejected
stevan yes, I think that makes sense,..
audreyt but there is a big loophole.
stevan PIL^N should not be a terribly sophisticated language,.. 14:57
what loophole?
audreyt namely, `create($foo`if_else(->{'p6opaque'},->{'nosuch'}))`get_attr
stevan hmm
audreyt basically we can only analyze `create forms that are either constant strings or things that do not depend on external input (which is, well, everything now, but that will change) 14:58
stevan maybe `create should not be able to take expressions as args?
audreyt but then you can't implement .CREATE as specced at all.
stevan is that enforcable
I can, it will just be ugly
audreyt it still cannot -- there is the same external dependency 14:59
if you start to read in the repr from stdin
stevan ok
14:59 rodi joined
stevan so it would end up being a runtime error? 15:00
audreyt I think. I'll sleep on it :)
stevan hmm, I am not sure I like that,..
one thought for your dreams
audreyt I don't like it at all, but then, polymorphism has to sink in at some level, the question is which level 15:01
stevan would `create_<insert-repr-here>() be any safer?
audreyt it would, as it forces an explicit switch, and each branch can be analyzed explicitly
15:02 G2 joined
audreyt but you still run into places where one branch fails the prim and another works 15:02
Limbic_Region any C knowledgeable people mind helping me with a completely OT problem (/msg me if willing to help)
stevan audreyt: I will have to think this over too
get some sleep :) 15:03
audreyt as .CREATE is polymorphic over repr types
you cannot write .CREATE without using either return type MMD _or_ runtime polymorphism
stevan what if all reprs had the same interface? 15:04
stevan cant easily figure out how that would work, but what if
audreyt what do I codegen then?
the key to codegen is translating $x`foo into x_type_foo 15:05
if we don't do that, we have to push the dispatch downward to VM
and indeed it's turtles all the way down
stevan I am may be going in the wrong direction here, but I have a thought 15:06
audreyt require a prefix to every prim method? if you go that way, type annotations solve the same problem but easier
stevan prefix?
audreyt 1`int_add(2) 15:07
stevan oh
how very PyPy :)
audreyt my goal was always to use inference to avoid that.
which works well for all well-typed functions
i.e. currently everything but `create
stevan what if the opaque type is just a small wrapper,.. { id, cls, <thing> }
and it just has a `fetch and `store 15:08
maybe add a { type } to the wrapper too
then if I want to do something to the <thing> I `fetch it out, do something to it, and `store it back 15:09
this way CREATE will always return the same thing (a wrapper)
audreyt then the runtime errors happen at `fetch's cast level
stevan hmm
audreyt doesn't really solve the problem -- it's like Java's Array[Any]
stevan but cant you use the { type } field in the wrapper?
audreyt no, as it's a runtime information
stevan then its like Array[Hash]
hmm 15:10
audreyt annotations has to sink in at some point. I'm inclining to push it up to PIL2
and PILN's typesafety is only as far as analyzable
and we codegen polymorphic opcodes to the underlying VM
since JS/P5/PIR all has polymorphic opcodes anyway 15:11
so no practical problems, at least not until 6.2813
but I've only slept 4 hours this morning so I may be incoherent/overlapping/undecidable at this moment 15:12
I guess I'll sleep on it :)
stevan ok,.. I need to have more coffee and ponder it myself :) 15:13
audreyt :)
stevan you sleep, I will wake up
audreyt and I'm glad luqui is reading vObj finally
stevan nice
now we just need him to read AMOP and something on the ML module system :)
they he wont have to keep reinventing them :P 15:14
audreyt oh and the constraint programming paper as well :)
stevan still has to read that one
audreyt actually, me too -- I've only skimmed it
Alias_ Why is it every time I hang out here for more than an hour I feel really stupid
:)
stevan Alias_: keep hanging out,.. that feeling goes away :) 15:15
Alias_ Trouble is, it might take years
I have other things to do :)
15:15 hcarty joined
stevan thinks maybe Alias_ is not ready to shave his head for Pugs 15:16
Alias_ hell no
I find it hard to lower myself to the language level
Makes it much harder to build big shiny Thing
s
stevan live in the mountains of Taiwan... eating only rice, small berries and reading PhD thesis
Alias_ yes, that might help
stevan :) 15:17
Alias_ I find I work better at up around the million line of code level though
As in Perl + CPAN
stevan :D
Alias_ And minutes of CPU :) 15:18
stevan ok, enough fun for now... $work time :)
15:22 hexmode joined 15:29 KingDiamond joined 15:45 Eimi joined 15:51 robkinyon joined 16:03 marmic joined 16:04 elmex joined 16:06 EricJ joined 16:26 bsb joined 16:27 G2 joined, sili joined
sili what's $repr, in reference to what i'm seeing on the p6 lists regarding OO and &bless? 16:27
16:28 EricJ left
sili and what's MOP? :) 16:28
16:31 kroh joined, justatheory joined
bsb en.wikipedia.org/wiki/Meta-object_protocol 16:33
robkinyon MOP == MetaObject Protocol 16:40
the framework for creating OO frameworks
$repr is what, in Perl5, would be the reference you bless
In P5, you create an object by blessing a reference. Normally, it's a hashref, but any reference is legal 16:41
sili robkinyon: ok 16:43
robkinyon: this whole OO thing in p6 confuses the hell out of me
particularly constructors and what "makes" an object with bless... 16:44
it's definitely a little different than p5
robkinyon Well, it's not that P6 is different from P5. It's that P5 is different from the rest of the world 16:45
sili so do objects use hashes as storage methods, or does the storage method even matter? 16:47
robkinyon P6 is a lot closer to languages like Smalltalk, CLOS, and the like
Unless you really really need to care, you don't care
and, unless you know why you should really really care, you don't care
sili i see 16:49
robkinyon basically, it's a type called p6opaque. It acts kinda like a hash in some ways, but it's more like a prototype object from Self or JS
theorbtwo Mostly, as far as the implementer is concerned, the average object is based on something magic.
sili so if i had: method maker ($class, %opts) {$class.bless(%opts)} i get an object? %opts become attributes? 16:51
robkinyon well, that doesn't make much sense 16:52
sili doh
robkinyon you declare your class in P6, just like you would in C++ or Java
sili nevermind then. i'll try to write some examples and see what happens
right
robkinyon then, you ask the class to create you a new instance, which it does
you can pass it %opts and, if you use the default BUILD, those will be assigned to the appropriate attributes 16:53
sili BUILD happens when i bless? 16:54
robkinyon no
there is no bless
the steps are:
sili so confused. i thought there was
robkinyon 1) my $fido = Dog.new( %opts );
theorbtwo There is bless still, I think, but it's a seperate mechinisim from the normal object thing.
robkinyon 2) That calls Dog.CREATE() which actually creates the new instance and marks it as coming from Dog 16:55
3) Then, it calls $fido.BUILD( %opts ) which does initialization
4) Then, your $fido is returned to you
what you are thinking of as bless() occurs during step 2
theorbtwo: It's a completely unnecessary and error-causing separate mechanism 16:56
:-)
pdcawley Doesn't it call *all* the fido.BUILD methods?
ie, BUILD isn't called in the usual 'inherited' fashion.
robkinyon and BUILDALL and the like 16:57
i was trying to give the layman's explanation. :-)
sili robkinyon: so what would I do if I wanted to overwrite CREATE()? do I have to use the parent class' CREATE?
robkinyon no
you set up your own Dog.CREATE()
it's a class method
sili ok. but what does the code look like in it?
pdcawley Generally, overwriting CREATE is left as an exercise for the psychotic reader -- most of the time you should be doing BUILD 16:58
robkinyon you don't care until you need to care.
theorbtwo The default one? Like lots of handwaving and dark magic.
sili theorbtwo: ascii art?
robkinyon sili: In P5 terms, you're asking the question of "How do the opcodes work?"
sili i see 16:59
theorbtwo More like "how do I make a hashref without using {}, or \%foo".
robkinyon much better analogy 17:03
sili is this correct: if I want to write my own constructor, i'd have method something($class, %opts){my $something = $class.CREATE(); $something.BUILD(%opts); <Extra stuff here>; $something}
theorbtwo That looks around right to me. 17:05
robkinyon something like that
you'd pass in the alternate $repr into the CREATE() method if you want
But, you generally don't have to override the constructor. Nearly everything you want to do should be done in BUILD as so: 17:06
method BUILD { # Call SUPER.BUILD() ... Do stuff ...}
sili fair enough 17:07
so bless() is really there just to confuse the hell out of me.
robkinyon yes
ignore bless for now
you don't need it, you don't want it
sili thanks all. 17:10
17:12 xern joined
sili i hope other p5'ers don't get confused as I did 17:12
robkinyon you mean like they are doing right now? :-/ 17:13
sili we'll need special docs. "p6 for the world" and "p6 for p5ers" 17:14
robkinyon No - p5ers need to realize that p6 isn't an extension of p5, just as p5 wasn't an extension of p4 17:15
there were so many changes between p4 and p5 that you would have thought the world was ending
References? OO? ' isn't the package separator?? AAAAAAAAAAAAAH!
rhesa the biggest problem i have is that p6 is still changing: some docs say X, other code samples say Y, still other notes say Z, and none of them tell you what pugs actually supports
example: ?? !! 17:16
robkinyon rhesa: You mean that's different from any other application you've ever used?
:)
rhesa yes, most of the p5 docs are pretty stable :)
17:17 xinming joined
rhesa most of my questions do come from looking at it with p5 eyes, i'll admit that :) 17:18
but it's hard to find out how it really should look, especially the little things. 17:19
robkinyon we need a p6-wikipedia 17:21
rhesa another example: optional parameter to a sub: is it "?$optional" or "$optional?" ? pugs complains about the latter, but doesn't seem to support the former.
yes, that would be cool!
robkinyon pugs isn't a complete implementation
of course, you're more than welcome to write a failing test. :-) 17:22
rhesa i understand that
robkinyon and, if your failing test is wrong according to the spe
rhesa maybe i will, sounds like a good idea :)
robkinyon c, then someone will say something
sili hopefully 17:23
robkinyon oh, they will! :-)
audrey is very particular about passing tests ASAP 17:24
17:33 eric256 joined 17:34 eric256 left
stevan robkinyon, sili : re: BUILD and CREATE 17:34
you should never override CREATE unless you really know what you are doing,.. you can however "wrap" it with a next METHOD call (akin to SUPER:: calls in p5) 17:35
CREATE will construct the p5opaque for you
so best to leave it to do its work :)
and re: BUILD
audreyt ?eval sub f ($x=1) {$x+2} f(1) 17:36
stevan you should just override BUILD in your class
17:36 evalbot_8763 is now known as evalbot_8764
evalbot_8764 3 17:36
audreyt ?eval sub f ($x? = 1) {$x+2} f(1)
stevan BUILDALL will be called for you, and will call all the BUILD methods in the entire class hierarchy
evalbot_8764 3
audreyt ?eval sub f ($x?) {$x+2} f(1)
evalbot_8764 3
audreyt ?eval sub f ($x?) {$x+2} f()
evalbot_8764 2
audreyt rhesa: what's broken again? :)
rhesa audreyt: :) let me dig out the specifics 17:37
audreyt sigh. I can't fall asleep without posting a journal now :/
(which I just did.)
obra heh
audreyt habits, etc.
17:38 Cryptic_K joined
stevan sili: the difference between bless and CREATE (as I see it at the moment, which means it is subject to change and/or my capacity for misunderstanding) is that bless takes a "thing" (a hash, array, whatever) and you must construct your object manually (create all your attr, etc) like in p5. Where as CREATE will build your object with all the correct attributes (including inherited ones) automatically. 17:39
audreyt: I was thinking about our issue from earlier,.. I think once again CLOS might be able to save us :)
rhesa audreyt: I suppose I should blame Debian testing for shipping an old version (6.2.9, Aug 3, 2005).
robkinyon audreyt: {good habits}++
audreyt rhesa: ahh... that's prehistorical
rhesa sub f (?$x) { $x+2 } say f(1); works for me...
audreyt easily stone age :) 17:40
rhesa lol.
audreyt rhesa: yeah, the optional param syntax was changed around October
rhesa: because ?$x outside param list is boolean casting
rhesa so i should whip out my compiler then :)
$x? does read better to me
audreyt so it's quite confusing. also when a default is specified, the ? isn't needed now
stevan audreyt: if we add a more full featured attribute-meta-object to the MOP, then we could potentially have the class-meta-object use the appropriate attribute-meta-object based on the chosen repr
robkinyon if a default is specified, then it's not optional from the body's perspective 17:41
17:41 Cryptic_K joined
stevan and the approriate attribute-meta-object will just DWIM to access the underlying repr 17:41
audreyt robkinyon: and if a default is unspecified for optional, then it's equivalent to default = undef
robkinyon if a default isn't specified, then the body has to manually verify that the attribute was set
by checking definedness. :-)
stevan this will allow for widely varying repr as long as they have an accompanying attribute-meta-object
audreyt heh :)
nah.
you can't tell f(undef) from f()
with sub foo ($x?) {} 17:42
robkinyon you can't ask for the number of args that were passed?
audreyt robkinyon: not with this signature
robkinyon i think that's a hole in the spec
audreyt sub foo (\$args) { $args.size }
does work
as does 17:43
sub foo (*@args) { @args.size }
so I'm not sure it's a hole in the spec :)
(the first one captures whatwever args passed in as an object; the second one slurps them into an array) 17:44
stevan goes off to shower, audreyt please comment on the sanity of that last rant when you are done :)
audreyt stevan: I need them in code not in english :) 17:45
(I know what attribute metaobject is from the p5 prototype of P6-ObjSpace, but how it relates to different reprs is not clear)
(also I was about to sleep. need to wake up in ~6 hours)
audreyt waves :) & 17:48
theorbtwo Ah. Newer pugs isn't in debian testing because it relies on newer ghc, which has serious policy violations -- it depends on xlibs-dev (instead of something more specific), and there's some sort of cabal problem.
rhesa theorbtwo: I hope they straighten that out. 17:52
theorbtwo It looks like the ghc6 maintainer is working on it, at which point pugs will go in automagically. 17:53
rhesa great. 17:54
17:58 elmex joined
\xe6var policy violations? 18:06
debian package policy? 18:07
18:22 elmex joined 18:28 kuto joined 18:31 elmex joined
robkinyon audreyt: There is no analog to Javascripts arguments method on the subroutine object? 18:41
18:45 lisppaste3 joined 18:49 Qiang joined
audreyt robkinyon: no. its presence makes inlining rather difficult 18:51
as it'd require the runtime to always construct an Args object
without that requirement, we can desugar calls into much more efficient forms that does the binding directly.
you can always collect arguments yourself: 18:52
sub f (\$args) { my ($x, $y) := *$args; ... }
18:53 nnunley joined
audreyt JS is rather hostile to native codegens 18:54
I'm not aware of a JS-to-C or equivalent compiler.
& 18:55
nnunley There's a JS to Java compiler, under the www.mozilla.org/rhino/
And there's already a java to native pathway.
18:56 vel__ joined
audreyt the Rhino JSC is not a codegen; it's more like perlcc ;) 18:58
or even, perlcc -B. 18:59
robkinyon: also note .arguments is explicitly removed from ECMA standard 19:00
precisely because it defeats optimization.
see www.mozilla.org/rhino/opt.html for details.
(and I was wrong; there is limited interaction with Java VM codegen under JSC's higher optimization levels.) 19:01
but anyway, my point was simply that allowing general .arguments form defeats optimization. :) 19:02
stevan *sigh* sleep talking again 19:25
nnunley raises an eyebrow. 19:28
stevan nnunley: you know who is supposed to be sleeping :P
<she who cannot be named or she might wake up> :)
nnunley Ahh. Yes.
Lock down the subversion server, and feather. 19:29
stevan :)
she has svk
nnunley Yes. Only so much you can do. 19:30
So... What how much of a difference is there between JScript.NET and JavaScript? 19:33
stevan one has a . in it :)
I think JScript is full of juicy M$ enhancements 19:34
like J++ was to Java
basically making JScript a more featureful language for the CLR
nnunley They seem to be refering to the ECMAscript standards... And mono also has a C# based compiler pipeline.
stevan hmm, they do seem to be invested in the ECMA stuff pretty heavily 19:36
so maybe it is not so proprietary 19:37
if you can't beat them... join them and overtake them :)
19:40 beppu joined
robkinyon audreyt: I'll happily stand corrected. And, frankly, I don't think there's a need to differentiate f(undef) and f() when there's a $x? w/no default. I was just exploring a dusty corner. 20:55
rhesa sorry I drove you into it ;) 20:56
robkinyon LOL
I don't need much help being driven into dusty corners or indefensible positions. Witness my screes on P6l. :-)
12Hmmm ... testing colors. :-) 20:57
rhesa it works :) 20:58
21:02 dduncan joined 21:29 ezraburgh joined 21:47 dduncan left 21:48 ezraburgh joined 21:51 Ovid joined 22:02 borkened joined 22:14 frederico joined, RichiH left 22:22 SamB joined 22:35 gantrixx joined 23:02 vel__ left 23:20 \xe6var joined 23:33 bsb left
xinming 23:33
23:47 azuroth joined 23:58 Khisanth joined