6.2.10 released! xrl.us/hxnb | geoffb's column (/. ed): xrl.us/hxhk | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net Set by autrijus on 10 October 2005. |
|||
stevan | hey luqui | 00:19 | |
autrijus | adamc00: yo | ||
journal up. good night! | 00:39 | ||
stevan | good night | ||
luqui | hi stevan | 00:51 | |
stevan | hey luqui | 00:52 | |
luqui | you could also think of a class MyClass as a role, and use the property system to make the class object. That is, (Object but MyClass).new | 00:54 | |
er, Class but MyClass | |||
stevan | luqui: I am not clear how all that works | ||
luqui | wait, maybe it is Object | ||
when you say $foo but bar, you are "reblessing" $foo into an anonymous subclass of its former class with the "bar" role mixed in | 00:55 | ||
stevan | yes, that is similar to eigenclasses | ||
luqui | you could use the same mechanism | ||
stevan | rebless == change-class-of | 00:56 | |
luqui | sure | ||
stevan | luqui: I dont have properties implemented,.. eigenclasses are :) | ||
wolverian | this might be a stupid question, but how do I specify that a method's invocant is the class itself, not an instance of it? (ie a class method) | ||
luqui | well maybe you can go the other way then | ||
use eigenclasses to implement properties :-) | |||
stevan | wolverian: that is what we are talking about actually | ||
luqui: that may be the way to go :) | |||
wolverian | stevan, heh, I'm just a poor peasant looking for the right syntax :) | ||
stevan | wolverian: you say method foo (Class $class:) | 00:57 | |
luqui thinks that that way of doing it is a deceptive oversimplification | 00:58 | ||
I would rather see something like classmethod... | |||
wolverian | right, me too. | ||
stevan agree's with luqui | |||
and wolverian | |||
but I am not on the cabal *cough* luqui *cough* | |||
luqui | when larry wrote that, though, he was still thinking of declarators as sacred | 00:59 | |
now he thinks of them pretty much as compile-time functions | |||
stevan | we could be like Ruby | ||
luqui | so he might be more open to that approach nowadays | ||
stevan | method Foo.bar () { ... } | ||
syntax is not my department though | |||
luqui | Yeah, not mine really either... | ||
my syntax looks good at first and then looks worse and worse as you get used to it | 01:00 | ||
Larry's seems to be the exact opposite... I guess that's why we trust him | |||
oh...kay... you want ==> instead of ~>, crazy man, but we'll go with it | 01:01 | ||
and now ~> looks too small for what it's doing | |||
stevan | hmmm, why do class methods need to be inherited? | ||
does that really make sense? | |||
luqui | well... maybe | 01:02 | |
stevan | are we not inheriting the behavior without the accompanying state? | ||
luqui | it depends on what you think about class interfaces | ||
stevan vows never to use class methods again,.. they are just icky | |||
luqui: how so? | |||
luqui | If a class C is a subclass of a class D, does that also mean that C (not an instance of, but the class itself) should behave like D | ||
wolverian | reading synopses, enums seem really overloaded to me. | ||
luqui likes the "new" method quite a lot | |||
stevan | new is an instance method of Class | 01:03 | |
luqui | wolverian, those are being torn down by theory theory however it works out | ||
that is its primary focus | |||
stevan | it is not a class method at all :) | ||
wolverian | luqui, ah, nice! | ||
luqui | uh what? | ||
you're saying that when I say Foo.new, I'm asking Class to do something, not the Foo object? | 01:04 | ||
stevan | Foo is an instance of Class | ||
luqui | yeah | ||
stevan | new() is an instance method of Class | ||
luqui | no | ||
stevan | so Foo (being an instance of Class) can call new() | ||
luqui | because you can override it | ||
stevan | yes | ||
uhm | |||
yeah, singleton method on the Foo | 01:05 | ||
luqui | righto | ||
stevan | and it is easily overridden | ||
luqui | so it's really more a method on the eigenclass | ||
stevan | yes | ||
which shadows Class::new | |||
luqui | okay | ||
stevan | but you can still call SUPER::new since the eigenclass is a subclass of Class (ultimately) | 01:06 | |
luqui | so the eigenclass idea is that there is no difference between a class method and an instance method on the eigenclass? | ||
stevan | not exactly | ||
eigenclasses are methods attached to a particular instance | |||
not to a class | |||
however classes are instances,.. so you get 2 for the price of one | 01:07 | ||
luqui | eigenclasses are not methods (in response to "eigenclasses are methods..." | ||
) | |||
so what did you mean to say? | |||
stevan | sorry | 01:08 | |
eigenclasses are a means to an end | |||
the end is singleton methods | |||
which are methods attached to a particular instance | |||
not to a class | |||
luqui | okay | 01:09 | |
stevan | you can accomplish this easily with eigenclasses | ||
luqui | okay, so now back to the question: are class methods inherited? | ||
stevan | yes, should they be | 01:10 | |
luqui | let's start from the top: what does it mean for a class *object* to be inherited from another | ||
what kind of relationship holds between the objects? | |||
stevan | it is a subtype relationship | ||
luqui | let's try not to confuse classes and types | 01:11 | |
stevan | each class has a list of superclasses | ||
this means nothing on it's own though | |||
luqui | so the set of classes in the program forms a dag | ||
stevan | only when you either 1) create an instance or 2) dispatch a method call does it mean anything | ||
uhm, yes it should be dag-ish | 01:12 | ||
luqui has the urge to go back to mathematical fundamentals | |||
but it might not get us anywhere here | |||
stevan | the class is an instance of class messes up the dag-ish-ness | ||
luqui | oh right, instance of itself | ||
stevan | uhm I was not aware there would be math on this test professor luqui | ||
but that is a special case and can be ignored | 01:13 | ||
so "its all a dag man" ..... | |||
luqui has found that when you come across a hard abstract question, rather than trying to decide the answer, you should rejig your thinking to make the answer obvious | |||
which, at least in my theory and junction proposals, has found great solace in mathematical fundamentals :-) | 01:14 | ||
aanyway... | |||
stevan | class == state + behavior | ||
luqui | a description of state | 01:15 | |
stevan | state | ||
luqui | not the state itself | ||
right? | |||
stevan | some kind of storage of values | ||
stevan wonders if luqui has gotten to the TaPL chapters on objects | 01:16 | ||
luqui | no, I've not really been reading TaPL | ||
stevan | I have only skimmed them myself | ||
luqui | should I before continuing? | ||
stevan | nah | ||
let me reviese my statement | |||
object == state + behavior | |||
luqui | that sounds much better to me | 01:17 | |
and class isa object, no? | |||
stevan | yes | ||
but that is Class not class | |||
proper noun :) | |||
luqui | well, a class is an object | ||
Class or MyMagicClass | 01:18 | ||
stevan | Class is an instance of Class which is a subclass of Object | ||
luqui | and a method is a function whose domain is a set of objects (which we call a "type") | ||
stevan | remove classes from the model for a moment, they are fussing things up | ||
no, lets go back even further | 01:19 | ||
luqui | okay | ||
stevan | object == state + behavior | ||
luqui | behavior == ? | ||
stevan | think of an object as a set of closures, the functions being the behavior and the state being the bound free variables | ||
luqui | heh, like Class::Closure | 01:20 | |
stevan | set is a bad word there,.. s/set/bunch/ | ||
yes, like Class::Closure :) | |||
so,.. if we ignore the idea of classes completely,.. and just think of pure objects | |||
state + behavior | |||
now, lets add inheritence | 01:21 | ||
stevan cracks open TaPL to make sure he doesnt start talking too much shit | |||
luqui | and we are asking whether two objects' behaviors are related to each other | ||
wait--I'll go up my usual avenue. Let's not call them "class methods" but "type methods" | 01:22 | ||
because you can never really say the name of a class, according to theory.pod | |||
stevan | ok class, please open your books to page 225 "Imperative Objects" | ||
luqui | a type is a set of objects | ||
let me rant a bit, then I will | |||
stevan | ok | ||
luqui | and a type method is function with the domain of *sets* | 01:23 | |
with that bare definition, there is no requirement for methods to be inherited | |||
but, as I did with roles, maybe there is an algebraic relationship that holds for type methods | |||
like, if a type method is defined for a set, it is also defined for every subset of that set | 01:24 | ||
giving us inheritance | |||
then... does that make sense | |||
stevan | uhm, sort of... | 01:25 | |
do theories have state? | |||
luqui | Well, let's consider an example. | ||
stevan, ceratinly not. but they can inject stateful functions into classes (just like roles) | |||
that's how I'm thinking of it | |||
stevan | ok | ||
luqui | what's a good example of a type method? | 01:26 | |
how about new? | |||
if you can create a new member A, then you can also create a new member of *any* subset of A | |||
s/member/member of/ | |||
that..... doesn't seem to be true | 01:27 | ||
in particular, you cannot create a new member of the empty set | |||
stevan | hmmm this is getting a little funky | 01:28 | |
luqui | but more generally, creating a new A presumably gives you some predefined element of A. By saying that you can create a new member of any subset, that means you can create any object in that set | ||
well, it's a brainstorm | |||
but maybe "creating a new" object when it is a value type doesn't make sense | 01:29 | ||
stevan | A.new is not really inheirted | ||
luqui | (and my subset thinking only works on value types) | ||
fair enough | |||
what kind of class method would be? | |||
stevan | the canonical example is an instance counter | ||
A.counter # 0 | |||
A.new | |||
A.counter # 1 | 01:30 | ||
luqui | interesting | ||
stevan | but this doesnt make sense to be inherited by B | ||
luqui | well, that particular method has a very interesting algebra | ||
B is A | |||
stevan | B.counter should have it's own state,.. uncurrupted by A | ||
luqui | A.counter # 0 | ||
B.new | |||
B.counter # 1 | |||
A.counter # 1 ! | |||
A.new | |||
B.counter # 1 | 01:31 | ||
A.counter # 2 ! | |||
stevan | something like that could not be default behavior | ||
luqui | right | ||
stevan | it would mean calling A::counter though B would have an implied next METHOD | 01:32 | |
luqui | anyway, nothing is really falling into place | ||
stevan | cause class methods suck camel balls | ||
luqui | which makes me think that there is no fundamental reason to inherit class methods | ||
stevan | except that you could in p5 :) | ||
luqui | right, historical reasons | ||
okay, off theory | |||
justatheory | what? | ||
luqui | what practical value would it be to inherit class methods | ||
what practical value would it be *not* to inherit class methods? | 01:33 | ||
stevan | bad class design would be alive and well in p6 :) | ||
luqui | you can't stop that | ||
wolverian | after using Java I'm tempted to ask what practical value are class methods? | ||
stevan | to not inherit simplifies the meta-model | ||
wolverian: exactly! | |||
luqui | wolverian, good question | ||
maybe Foo.bar is not a class method | 01:34 | ||
stevan | especially since Class isa Package and you can always stash plain ole subs | ||
luqui | since you can't actually refer to a class | ||
but just a sub in the Foo package | |||
uh, yeah, right, we just said the same thing :-) | |||
stevan | that is how we are storing Foo class state | ||
class Foo { our $.bar; } is the same as package Foo { our $.bar } | 01:35 | ||
luqui | wolverian, did you see *any* example of a class method in java that made sense to be a class method? | ||
wolverian | luqui, no. | ||
stevan | the only examples I have seen are for things like the File class | ||
luqui | it might be worthwhile just to kill them altogether | ||
stevan | but I dont think those are *good* examples | ||
wolverian | luqui, well, some did, given the restrictions of Java | ||
but would not in the context of Perl 6 | |||
luqui | right, just as a poor excuse for a function | ||
however, some methods really do make sense on the class | 01:36 | ||
stevan | luqui: if you think of class methods as singleton methods which override or add to the instance methods of Class, they dont seem as bad | ||
luqui | from a cognitive perspective | ||
stevan, right | |||
wolverian | luqui, any examples? | ||
luqui | and it's probably safe to think exactly that way | ||
stevan | but methods attached to an instance,.. are not inherited | 01:37 | |
luqui | wolverian, Foo.num_instances | ||
wolverian | luqui, right. true. | ||
luqui | stevan, righto | ||
so... | |||
so be it? | |||
"class methods" are not inherited | |||
stevan | welllll | ||
ponder this one | 01:38 | ||
actually nevermind | |||
stevan just realized his example is moot in the context of BUILD | |||
luqui | I think inheriting class methods would not be an inheritance issue at all | 01:39 | |
and the only reason you'd want to do it is for scoping | |||
stevan | I would guess that any behavior you might accomplish with class methods could be just as easily accomplished with either | ||
1) Role composition of singleton methods | |||
2) subclassing Class | |||
luqui | stevan, sure, but Joe Shmoe has no idea what the heck subclassing Class means | ||
maybe even role composition | 01:40 | ||
stevan | 3) getting a good book on OO and stop writing procedural modules ;) | ||
luqui | say you're from Java | ||
wolverian | oh, isn't BUILD a class method? | ||
luqui | maybe that kind of scope makes sense... | ||
stevan | luqui: then you will have been sworn off of class methods a long time ago | ||
luqui | wolverian, no, it is an instance method | ||
stevan | wolverian: no, BUILD is a submethod on the instance | ||
luqui | submethod, there's an icky corner of the object model | 01:41 | |
stevan | luqui: actually it's not,.. they are quite clean | ||
wolverian | hm. .new, then? | ||
luqui | what does it accomplish? | ||
stevan | wolverian: new is an instance method of Class | ||
luqui | wolverian, right, but that has no inheritance relationship | ||
wolverian | stevan, right. | ||
stevan | submethods are good for BUILD and DESTROY,.. thats about all really | ||
inheriting BUILD and DESTROY are not usually what you would intend | 01:42 | ||
wolverian | instance method of Class == class method? | ||
luqui | and they're not even good for that | ||
stevan | especially if they are all run by BUILDALL and DESTROYALL anyway | ||
wolverian: instance method of Class == instance method of Class | 01:43 | ||
they look like class methods,.. but they are not | |||
because Class itself is an instance | |||
wolverian | argh, destroy all self-referential semantics. | ||
stevan | LOL | ||
luqui: I will ponder this some more,.. I think it might be a sane proposal | 01:44 | ||
luqui | please do | 01:45 | |
stevan | it will likely be meet with resistence | ||
luqui | object model is important :-) | ||
stevan, I'm not so sure | |||
stevan | however, if we can counter all points with examples,.. it should fly | ||
wolverian | oh wow, I think I understand the difference now. that was a maze. | ||
stevan needs to take some cold medicine, watch some mindless TV and sleep | 01:47 | ||
I will likely p6l this tomorrow | |||
adios & | |||
wolverian | I have class in two hours; 5am now. | ||
stevan++ # bye! | 01:48 | ||
02:54
JAPJuggler is now known as radjuggler
|
|||
eric256 whistles in the dark | 02:55 | ||
eric256 whistles in the dark some more | 04:06 | ||
luqui | although I'm having a wonderful time I'd rather be doing what you're doing | 04:09 | |
eric256 | lol | ||
luqui | catamorphisms are SO COOL | 05:55 | |
obra | cataWHATs? | 06:00 | |
luqui | catamorphism | 06:07 | |
you know how fmap is generalized map (from lists to arbitrary whatevers) | |||
catamorphism is generalized reduce | |||
and anamorphism is generalized something, I'm just not sure what | 06:08 | ||
justatheory | Bah | 06:27 | |
I'm having trouble building GHC 6.4.1 on Tiger. Do I need GCC 3.3, still? | |||
justatheory knocks on the channel | 06:31 | ||
Is this thing on? | |||
Khisanth | bzzzzzzzzzzzzzzz | 06:34 | |
justatheory | Hrm | 06:35 | |
integral | #haskell can be more awake | 06:46 | |
PerlJam | justatheory: I think the awake ones here are also sans Tiger. You need to find the appropriate Mac-heads. | 06:48 | |
justatheory | I thought that all geeks were a Mac-heads these days. | ||
integral | sure, just cheap ones with Panther =) | 06:49 | |
justatheory | oh | 06:50 | |
well, it's probably really a GCC 4 issue rather than Tiger. | |||
At least, I expect so. | |||
integral | are you using a precompiled binary? | 06:51 | |
justatheory | no | ||
They only have darwinports now. | |||
They used to have .dmg files, but I guess not anymore. :-( | |||
I don't use darwinport.s | |||
or any ports system. I have an allergy. | |||
integral | err, really? *sigh* I guess no one put the .dmg on the website. It was announced on the ML | ||
justatheory | For GHC? No, just darwinports. | 06:52 | |
I was trying to install pugs with CPANPLUS. | |||
integral | no, it was announced on the mailing list. I've got the damn email in front of me: www.uni-graz.at/imawww/haskell/GHC-6.4.1.pkg.zip | ||
justatheory | That's the dmg? Gool. | ||
integral | my mistake, it is a .pkg | ||
justatheory downloads that | |||
Same diff, AFAIC | 06:53 | ||
s/AI/IA/ | |||
integral++ # Thanks for the link to the .pkg! | 07:14 | ||
integral bows | 07:16 | ||
justatheory | piers++ # "Anyhow, chromaticā¦" | 07:18 | |
nothingmuch | oh my *GOD* rindolf is an idiot | 07:19 | |
justatheory | rindofl? | 07:20 | |
rindolf? | |||
integral | nothingmuch: has he done something new, or just the same testing + meme stuff? | 07:21 | |
nothingmuch | the Test::Shlomif::Harness | ||
nothingmuch is embarraced to know him IRL | |||
integral | I just feel sorry for the other people who run that perl-meme site | ||
justatheory notes that compiling Perl6::Pugs is causing serious lagā¦ | |||
nothingmuch | i really don't see how someone has the tact to make changes like the code Andy quoted | 07:22 | |
justatheory | Oh, rindolf == shlomi fish? | ||
nothingmuch | yes | ||
furthermore, his code is insultingly stupid | |||
justatheory doesn't think that he's been insulted by other people's code, except in comments | |||
piers++ # "Your summarizer wasn't entirely sure what they were talking about." | 07:23 | ||
nothingmuch | =) | ||
perlmeme.org/tutorials/cgi_script.html (also insulting... i suspect it's his work too ;-) | 07:24 | ||
luqui | what's wrong with that? | 07:25 | |
nothingmuch | it's how to start a CGI script | ||
assuming the user knows pipes, and env variables | |||
and stuff like these | |||
QtPlatypus | Yes and the problem is? | 07:26 | |
justatheory | use CGI::Carp qw(fatalsToBrowser); # NO! | ||
nothingmuch | QtPlatypus: the issue is that instead of teaching how to write a CGI the script gives an example, and says what it does, but not what the things it does mean | ||
which is good for a reference, but this is not a tutorial | 07:27 | ||
integral | it's what people want though... | ||
luqui | Joe Schmoe would rather copy a template and tweak it than write one by hand | ||
luqui knows this after a year of teaching OpenGL :-) | |||
QtPlatypus | nothingmuch: Your worried that it will encouage cargo cult programing. | ||
nothingmuch | no, it's more than that | 07:28 | |
no one ought to use CGI for HTML | |||
it's just there for backwards compatibility | |||
why encourage that? | |||
luqui | nothingmuch, what should you use instead? | ||
assuming little knowledge of perl's workings, of course | |||
nothingmuch | HTML::Template is simple, clear, and powerful enough | ||
luqui should check that out the next time he generates HTML... i.e. never :-) | 07:29 | ||
nothingmuch | anyway, nevermind | ||
integral | nothing wrong with HTML combinators per se though, just that they're in the wrong module | ||
nothingmuch | integral: remember please that this is the first impression someone is going to get | 07:30 | |
people whove been coding for 2 months don't appreciate pretty printing combinators | |||
luqui | "Perl is a language for getting your job done" # Camel book | ||
if it works faster than any other language, then it makes a good impression | |||
anyway... | 07:31 | ||
luqui backs off | |||
integral | nothingmuch: sorry, I'm just trying to be balanced, rather than ripping rindolf to shreds continually just because rindolf is rindolf. | ||
justatheory likes TT and Mason | |||
nothingmuch | integral: fair enough | ||
nothingmuch backs down | |||
integral | particulary when for once it's not just rindolf's site. | ||
nothingmuch | enough for now | ||
luqui backs up | |||
justatheory does the holky polky | |||
justatheory turns himself around | 07:32 | ||
geoffb | Grrr. Damn SBC incompetent ADSL management . . . . | 07:39 | |
*yawn* | 07:44 | ||
OK, time to crash (into bed), methinks | |||
nothingmuch | ciao geoffb | 07:49 | |
07:49
Grrrr is now known as Gruber
|
|||
svnbot6 | r7554 | luqui++ | Solved the GADT problem in the Notes section. | 08:39 | |
Juerd | Quick poll: what are your opinions about getting rid of .() altogether? | 10:47 | |
I believe it is unnecessary and confusing for people new to the language | 10:48 | ||
autrijus | $blah() instead? | 10:50 | |
$blah .() | |||
or do you mean we rid of code dereference in function application, which is insane? | 10:51 | ||
bbiab... | 11:07 | ||
rafl | autrijus: ping | 11:58 | |
What puts the include-dirs: src/perl5 into Pugs.cabal? | 12:25 | ||
I mean, where does the string 'src/perl5' come from? | |||
autrijus | rafl: util/build_pugs.pl | 13:05 | |
(I'm in train station, wireless going off range at any point) | |||
rafl | autrijus: Yes, I already found it, but it doesn't matter anymore, I guess. | ||
autrijus | ok | ||
rafl | autrijus: Why I pinged you: Why does ghc-pkg need to access all include-dirs when registering a package? | 13:06 | |
autrijus: We have src/syck, etc. in there which won't get installed. | |||
autrijus | oh hm. I have no idea really. | ||
rafl | autrijus: So you need a pugs src dir to register with ghc. That's bad, isn't it? | ||
autrijus | not _that_ bad as it is usually registered from install time | ||
but not for you I surmise | |||
rafl | Indeed. | ||
autrijus | can you bring it up with SyntaxNinja or other Cabal people on #haskell? | ||
or on the cabal list | |||
for I need to run now. be back in a couple hours... | 13:07 | ||
rafl | Before I do that: Is there a way to remove the non-absolute paths from include-dirs and still keep compiling work? | ||
OK, bye! | |||
autrijus | maybe. or you can absolutify all of them | ||
in build_pugs | |||
rafl | Well, won't help. A /home/rafl/projects/debian/.../pugs/src/syck/ won't exist for every user. | 13:08 | |
We would need to install the includes. | |||
autrijus | nod. | 13:10 | |
& | |||
rep | ops | 13:33 | |
rafl get's ignored in #haskell, yay.. | 13:41 | ||
iblechbot: ping | 13:46 | ||
washu | does anyone know how to create a byte array from string in perl (like java getBytes?) I'm messing around with unpack, but it doesn't seem to do the job. | 13:51 | |
rafl | washu: Maybe you want to join #perl. This channel is about perl6/pugs development. | 13:52 | |
PerlJam | washu: in perl6 it would be @bytes = $string.bytes; # probably :) | ||
washu | #perl is not showing up on my list. I thought it was gone. Thx. | 13:55 | |
PerlJam: that would be nice => | |||
PerlJam still isn't clear if it's been blessed that .bytes(), .chars(), etc. return a list in list/array context. | 13:56 | ||
washu: and when you show up on #perl, I'll help. | 13:57 | ||
eric256 | does pdcawley_ do the weekly summary? | 13:59 | |
PerlJam | I think Piers and Matt are still tag teaming. | 14:07 | |
eric256 | ahhh.. from his comment yesterday i thought he was. no matter. just thought it was funny that the they used brane instead of brain. ;) | 14:08 | |
rafl | ingy: ping | 14:26 | |
ingy: I have a problem with Spork 0.20: Can't locate object method "slides_directory" via package "Spork::Config" at /home/rafl/.local/share/perl5/Spork/Command.pm line 44, <DATA> line 1. | 14:27 | ||
Juerd | autrijus: No, getting rid of it, as in: no replacement | 14:34 | |
autrijus: Well, no postcircumfix replacement anyway | 14:35 | ||
autrijus: I haven't really thought about unnamed calls yet | |||
rafl | ingy: OK, fixed it. I missused it. | 15:12 | |
ingy | :) | ||
rafl | ingy: Can you tell me how it calculates the size of the images? | 15:13 | |
ingy: I have a picture with 200x400 px here which gets streched to 350px width so it doesn't fit the screen anymore. | |||
ingy | rafl: just say {image: url 200} | 15:14 | |
rafl | ingy: Great, spork++; # It should really be in Debian. | 15:15 | |
ingy | otherwise the width will be set to 350 | ||
or whatever the default width is | |||
rafl | ingy: Thank you. | 15:16 | |
Do you know what nwp (the guy who want's to maintain it) does currently? | |||
ingy | no | ||
rafl | :-( | 15:17 | |
Jooon | he is in the #kwiki channel currently, although there is not much activity there | 15:19 | |
svnbot6 | r7555 | iblech++ | * ChangeLog: Typo fix. | 15:23 | |
r7555 | iblech++ | * PIL2JS: | |||
r7555 | iblech++ | * jspugs.pl: Fixed the display of the paths to the various external | |||
r7555 | iblech++ | programs/files jspugs uses if $*CWD is not "$srcdir/perl5/PIL2JS". | |||
r7555 | iblech++ | * P5 Prelude::JS, P6 Prelude::JS::Operators: Division by zero and module zero | |||
r7555 | iblech++ | raise exceptions now (instead of doing what JS does, namely returning | |||
r7555 | iblech++ | Inf/-Inf or NaN). | |||
eric256 | can you set $*IN to chomp automaticaly yet? | 16:08 | |
hmmmm | 16:16 | ||
svnbot6 | r7556 | eric256++ | Updated animals.p6 with new language features. | 16:24 | |
rafl | autrijus: I'll do a talk on perl6/pugs next month. Can you please tell me what you told the audience in the 4 slides following 'But First ...' in your apocalypse talk? | 16:26 | |
svnbot6 | r7557 | eric256++ | hangman.p6 - some more general pugs-ification | 16:42 | |
r7558 | eric256++ | Examples\Games\*.p6: Updated input methods to chomp(=$*IN) | 16:48 | ||
r7559 | iblech++ | * t/builtins/strings/string_interpolation.t: "&func .()" and "&func. ()" | |||
r7559 | iblech++ | should (and doesn't in current Pugs) interpolate. | |||
r7559 | iblech++ | * examples/games/animals.p6: my %hash = {...} creates a hash with one elem (key | |||
r7559 | iblech++ | is {...}, value is undef). Also see t/var/assigning_refs.t. | |||
r7560 | iblech++ | PIL2JS: Prelude::JS::Operators: Implemented ~& ~| ~^, using a higher-order | 17:00 | ||
r7560 | iblech++ | function which operates on JS sourcecode. :) | |||
r7560 | iblech++ | Note: We need more tests for the bit operators (especially for the edge cases, | |||
r7560 | iblech++ | e.g. "foo" ~& "", "\foo" ~& "\0" etc.). But, as I don't know what the correct | |||
r7560 | iblech++ | result should be, somebody else has to write the tests. :) | |||
17:02
cm_ is now known as cm
|
|||
pdcawley_ | Yes, I still write the summary, or at least, I wrote the last one. And branes was deliberate. | 17:07 | |
PerlJam | I think I'm going to have to killfile Thomas Sandlass. Reading his posts to p6l is just too tiring. | 17:09 | |
cm | :-) | 17:11 | |
eric256 | hehe....any ideas why my pugs programs don't seem to be getting @ARGS filled? | 17:12 | |
PerlJam | eric256: example? | ||
eric256 | if i do... @ARGS.perl.say; (as the only part of a program.) then do | 17:13 | |
pugs example.p6 test | |||
it prints [] | |||
not sure but i think pugs is sucking up the arguments... | |||
broquaint | Works fine here. | 17:14 | |
eric256 | this is on windows | ||
lemme test on feather | |||
broquaint | Ah, this is on feather. | ||
eric256 | definitly works fine on feather...gonna try the exact same file..maybe i did something dumb | 17:15 | |
lol | |||
PerlJam | works fine on my local non-feather box too :) | 17:16 | |
eric256 | gtg i'll try later | ||
PerlJam | (of course I'm running linux) | ||
cm | what's feather :) | 17:22 | |
17:23
typester is now known as sleepster
|
|||
svnbot6 | r7561 | iblech++ | PIL2JS: Prelude::JS::Operators: Implemented +^ and ~^. This means PIL2JS passes | 17:30 | |
r7561 | iblech++ | 17/17 of bit.t. :) | |||
autrijus | cm: it's feather.perl6.nl, aka perlcabal.org, Juerd's server that provides free shell access to p6 developers | 17:31 | |
cm | thank you | ||
autrijus | iblechbot: where is it written that "&x .()" or "&x. ()" should interpolate? | 17:32 | |
iblechbot: we don't do that for array/hash either and I think it makes little sense | |||
(and a casual glance in S02 did not reveal that syntax...) | |||
PerlJam | those shouldn't interpolate IMHO | ||
I too think it makes little sense | |||
autrijus | ditto | 17:33 | |
autrijus ponders | |||
PerlJam | I thought the rule was that it would interpolate only if the sequence was contiguous (i.e. no intervening whitespace) | 17:34 | |
autrijus | yeah | ||
iblech | Hello everyone | 17:35 | |
rafl: pong | |||
autrijus: It should *not* interpolate. This is what the test tests :) | |||
autrijus: I.e. "&func .()" should eq '&func .()', but "&func.()" should eq ~func() | 17:36 | ||
theorbtwo | I like pb&j. (But not with lemon jelly!) | 17:37 | |
fglock__ | iblech: I had to interrupt a 'make smoke' with ctrl-C - is there a way to look at the results? | ||
iblech | fglock__: As far as I know, no :( As tests.yml is only written at the very end | ||
cm | "Cannot export Parrot_string_find_digit: symbol not defined [..]" -- any idea? :( | 17:38 | |
autrijus | iblech: ok, my fault for only looking at the commitlog :) | 17:39 | |
cm: how did you trigger that? | |||
cm | trying to mingw32-make parrot, as described by wiki.kn.vutbr.cz/mj/index.cgi?Build...ActivePerl | ||
iblech | autrijus: No, my fault for forgetting the small suffix "n't" (shouldn't instead of should) :) | ||
cm | autrijus, this happens when creating parrot.exe | 17:40 | |
autrijus, i am the latest code from subversion (../trunk) | |||
autrijus | leo__: your ground here :) | 17:41 | |
cm: did you do a really fresh build? | |||
cm | autrijus, I guess.. I just checked out the code from subversion, then ran Configure.pl & started make'ing | 17:42 | |
autrijus | cm: send details to [email@hidden.address] or visit irc.perl.org #parrot, can also work | ||
cm: nodnod. the much-needed varreg refactoring is in place, so I expect the trunk to be somewhat fragile | |||
cm | autrijus, i'll try #parrot first, thanks | ||
autrijus, is that the variable frame refactoring thing leo was talking about on perl6-i? | |||
iblech | cm: Yep. | 17:43 | |
svnbot6 | r7562 | iblech++ | * t/operators/binding/subs.t: Added a =begin unspecced guard around a subtest. | 17:47 | |
r7562 | iblech++ | * PIL2JS: Prelude::JS::Array: &splice should destroy possible bindings of the | |||
r7562 | iblech++ | array elements when splicing. This cuts down test failures of | |||
r7562 | iblech++ | t/operators/binding/arrays.t from 3 to 1. | |||
leo__ | cm: recent Parrot? | 17:49 | |
cm | leo__: latest svn. mdiep_ solved my problem, [19:45] <mdiep_> cm: I believe parrot.def needs to be edited -- those functions were recently removed | ||
leo__ | yup excatly | ||
cm | leo__: I guess it's too trivial to send a patch? :) | ||
leo__ | I can't test on Win, so sill send a test please | 17:50 | |
argh, lagging connection - sorry | |||
cm | leo__, where is parrot.def generated? | 17:51 | |
leo__ | it should have a comment at the top - else grep inside config for the failing symbol | 17:52 | |
# over to #parrot | |||
svnbot6 | r7563 | iblech++ | * t/pugsbugs/smartmatch_autovivifies.t: Use a P5 instead of a P6 regex object. | 18:05 | |
r7563 | iblech++ | * PIL2JS: More squashing of minor bugs | |||
r7563 | iblech++ | * Prelude::JS::Array: 3..2 results in the empty list now (previously, it | |||
r7563 | iblech++ | evaluated to (3)). | |||
r7563 | iblech++ | * Prelude::JS::Array: %hash.sort works now (the result is a list of pairs. | |||
r7563 | iblech++ | Dunno how/whether it's specced). | |||
iblech | Hm... {42}.arity is 1 in current Pugs, and there exists a test for this. Why is this so? (In PIL, {42} is a block taking an *optional* $_, and optional params don't count in the .arity, right?) | 18:07 | |
wolverian | should .arity ever be a simple scalar? | 18:11 | |
iblech | There was a thread about that, but there was no final ruling, IIRC | 18:12 | |
wolverian | right. | 18:13 | |
xinming_Beijing | hmm, Will pugs need ghc 6.6 in the future after ghc 6.6 released? :-/ | 18:14 | |
autrijus | xinming_Beijing: most likely yes, when 6.6 is deemed stable enough | 18:15 | |
xinming_Beijing | I sometimes got the complie progress failures. And I use GHC 6.5... | ||
So, Now, I will try GHC 6.4.1 instead... | |||
autrijus | well... you are on your own with 6.5.x :) | ||
6.4.1 is recommended; 6.4 is possible | |||
GeJ | I guess so, autrijus was involved in a hackathon at IFCP to add features that would ease pugs implementation IIRC | 18:16 | |
svnbot6 | r7564 | iblech++ | * New t/builtins/arity.t: Added four very very simple tests for &code.arity and | ||
r7564 | iblech++ | referred to a thread on p6l (which didn't contain a final ruling). | |||
r7564 | iblech++ | * t/subroutines/bare_block_with_dollar_underscore.t: Extremely minor cosmetical fix. | |||
autrijus | GeJ: yeah, but more importantly, GHC 6.6 has much better SMP support and saner GADT | ||
gaal | is GADT pronounced "gadget"? :) | ||
obra | How many changes in recent GHC are driven by pugs? | 18:17 | |
PerlJam | autrijus: and transactional memory? | ||
wolverian | oh, hell, VB9 has STM? | ||
what will I ridicule now? | 18:18 | ||
autrijus | PerlJam: STM is already in 6.4 | 18:19 | |
theorbtwo | I only really meant for .airty to be a first step toward a prototype method that returned the complete prototype. | ||
autrijus | obra: two or three syntax things mostly | ||
PerlJam wasn't sure how well it was supported | |||
autrijus | only one deep thing that I had not had tuits to finish it | ||
PerlJam: it works quite well but not yet SMPized | 18:20 | ||
theorbtwo | SMP support is getting to be important now that HT is common. | ||
Khisanth | theorbtwo: so there is some sort of &func.signature ? | ||
GeJ | more important as all the manufaturers tend to multi-core I guess | 18:21 | |
theorbtwo | Not that I'm aware of; I never got further then .airity. | ||
Khisanth | just thought that might be useful for the lazy documentation writer :) | ||
theorbtwo | That was my thinking as well. | ||
xinming_Beijing | Perl 6 will be compiled to bytecodes. So, I wonder, If the "binary" will contain the comments. And also, I wonder If perl will also do the same in perl 5, hmm, just like. `cat file.p6 | perl`, and if you use `perl file.p6`, perl 6 will automatically call the compiler and generate the file.p6b, handles regeneration of the file as python does... hmm, python will do this if IIRC... | 18:27 | |
maybe not comments, I mean the document part of the source code. | 18:28 | ||
Khisanth | why? will compiling in p6 be a lot slower than p5? :) | 18:31 | |
autrijus | xinming_Beijing: good question. larry's decree was that by default the source is stored with the compiled binary | ||
Khisanth: possibly, yes :) | |||
Khisanth: if you ask for it, that is | 18:32 | ||
Khisanth | If I ask perl to be slower? | ||
autrijus | Khisanth: if you want to trade compile time for runtime. | ||
think -O0 vs -O2 vs -Ofun (the latter will nopaste your program to IRC and send back amusing reviews) | 18:33 | ||
xinming_Beijing | autrijus: How about the document part of the source code? they are useless "most" times. | ||
autrijus | xinming_Beijing: but %=DOC (or %=POD, or whatever it's called today) will hold them | ||
xinming_Beijing: so they are stored as well by default. I imagine there will be strip programs | |||
and/or options | 18:34 | ||
xinming_Beijing | I'd prefer 3 choice... automatically, strip, keep :-) | ||
automatically will strip if it's not used, otherwise keep. :-P | 18:35 | ||
autrijus | it's hard to detect if it is used or not, but well, sure, you can apply heuristics | 18:36 | |
"heuristics", aka "does not work too well in general but you get what you ask for" | |||
Khisanth | not "works most of the time"? :) | 18:37 | |
geoffb | -Ofun article has gotten up to rank 1163 in the O'Reilly weblog ratings. | ||
geoffb sets a personal goal to break 1000 | |||
stevan | geoffb: how do I rank it? | 18:39 | |
geoffb | (For reference, my previous best was 3908) | ||
cm | autrijus, can I build pugs without hs-plugins (some build problem on win32) | 18:40 | |
geoffb | stevan, I think it's based on page hits | ||
stevan keeps refreshing his browser window | |||
geoffb | (That was not a call for spurious hits. :-) | ||
I meant, I'm setting a personal goal to write something cool enough that it naturally breaks into the 3-digit range | |||
autrijus | cm: sure, it is not mandatory | 18:41 | |
geoffb | practice, practice, practice I guess | ||
stevan sets up a script to cause all his companies servers to hit geoffb's article | |||
xinming_Beijing | autrijus: hmm, I think, for the code which directly used the %=DOC will be detected. though, except some codes which is running in some tricks. | ||
geoffb | stevan, LOL | ||
autrijus | xinming_Beijing: *nod* that is the idea, yes | 18:42 | |
xinming_Beijing | stevan: while true; do wget my.blog.url/ && sleep 5s; done; | ||
stevan: this might help... But I don't know if it will really hit the counter. :-) | |||
autrijus | I think "ab" works better in general | ||
stevan just hired a roomful of offshore programmers to hit geoffb's blog 24/7 | 18:43 | ||
geoffb | LOL | ||
Nothing like a good laugh in the morning to really make the day better . . . . | |||
stevan | autrijus: did you see my discussion with luqui in the backlog, re: class methods are useless | 18:44 | |
xinming_Beijing | stevan: hmm, could you please give me the blog-url? | ||
stevan | geoffb: the way I see it, -Ofun is largely responsible for keeping pugs moving at it's current pace | 18:45 | |
autrijus | stevan: yes, and I think it is mostly sane. | ||
stevan | xinming_Beijing: see the topic | ||
geoffb | stevan, DEFINITELY | ||
autrijus | stevan: I'm wading thru theory.pod for the _third_ time this week | ||
stevan | geoffb: because after all, perl6 isn't *that* cool on it's own | ||
autrijus: yes, I kind of glazed over when he starting bringing theory.pod into it | 18:46 | ||
xinming_Beijing can only find the paste bot. | |||
autrijus | ...well, it used to be *that* cool back in the RFC process... | ||
geoffb huffs at stevan for daring to note that Perl 6 might not be the coolest thing since the sandwich | |||
stevan | autrijus: true | ||
autrijus | ...but I wasn't there :) | ||
stevan | geoffb: yes, but even sandwiches have to be fun :) | 18:47 | |
geoffb | heh | ||
stevan | I mean peanut butter is fine,.. but when you add jelly... then you got a party! | ||
geoffb | :-) | ||
.oO( What would the RFC process have been like if autrijus was involved . . . ? ) |
18:48 | ||
stevan thinks there would have been a lambda keyword for sure | |||
in unicode of course | |||
geoffb | And type systems would have been at least 10 RFCs by themselves | 18:49 | |
xinming_Beijing | capture the output from other program will be the part of perl or the part of lib? | 18:56 | |
autrijus | luqui: hi. | ||
xinming_Beijing: qx// is part of perl6 as specced | |||
geoffb | Not having that in core would be on my list of "no longer Perl" things | 18:57 | |
luqui | hi autrijus | 18:58 | |
right, perl still needs to be -e-friendly | |||
autrijus, do you know about the Rec type? | |||
autrijus | luqui: in p6 context? no. | 19:04 | |
it's not in any spec iirc | |||
luqui | no, not in p6 | 19:06 | |
in haskell | |||
the catamorphism thingy | 19:07 | ||
autrijus | er, I don't understand | 19:08 | |
Rec is part of the various extensible record proposals | |||
luqui | data Rec f = In (f (Rec f)) | ||
autrijus | ah, banana in space | 19:09 | |
yes. | |||
luqui raises an eyebrow when he hears about the space banana | |||
autrijus | aka Mu. | ||
luqui | anyway, I'm trying to define List using Rec | 19:10 | |
autrijus | luqui: the banana papers are interesting reads | ||
luqui | data LF a lf = Nil | Cons a lf | ||
but I can't use cata on it unless it is a functor (in a) | |||
and I can't seem to make it a functor | 19:11 | ||
and #haskell is no help ;-) | |||
ajs | luqui, et al.: Keep in mind that "in core", as Larry has pointed out, is a murky phrase in P6. It might well be in a library or available through a call to a Parrot primative (though I expect that Perl has too many semantic extras for it to be pure Parrot) | ||
luqui | ajs, sure | 19:12 | |
autrijus | luqui: "From Hindley-Milner Types to First-Class Structures" | ||
luqui has been avoiding arguing about "core" for ages now | |||
ajs | So, I fell off the planet for a while... has anyone taken over S29, or should I be jumping back in and reviewing the current state of the world? | ||
autrijus | ajs: hi! | ||
ajs | autrijus: indeed, nice to be "back" | 19:13 | |
PerlJam | ajs: S29 needs to somehow become "official" IMHO | ||
(no, no one has picked up the S29 ball that I know of) | 19:14 | ||
autrijus | luqui: something like: instance Functor lf => Functor (LF lf) where fmap _ Nil = Nil; fmap f (Cons lf x) = Cons (fmap f lf) (f x) | 19:16 | |
ajs | Ok, cool. I'll jump back in and see what the state of the world is. When I left it, there was a lot of work to be done turning email, details from other synopses and the like into tect | ||
er text | |||
luqui | autrijus, of course | ||
but lf is the *second* argument of LF | |||
autrijus | you want type lambda, but you can't get type lambda, because haskell's type expansion is predictive | 19:17 | |
luqui | and if I make it the first, then Rec (LF a) doesn't work | ||
autrijus | so maybe using newtype to flip them? | ||
luqui | well, I tried that, but that seemed to run into other problems that I didn't understand | 19:18 | |
I'll try it again | |||
autrijus | maybe you want Morror and MLF. hm. | ||
Morrow, even. | |||
luqui: hm, have you read the banana papers? | 19:19 | ||
luqui | no | ||
luqui is completely academic-papered-out | |||
geoffb resembles that remark | 19:20 | ||
autrijus | ok. they are: "Bananas, lenses, and barbed wire", "Bananas in Space", "Dealing with Large Bananas", "Revisiting Catamorphisms Over Datatypes with Embedded Functions" | ||
geoffb | o/~ One of these titles just doesn't belong . . . | 19:21 | |
autrijus | geoffb: lol, exactly my thought | ||
luqui: I've read that newtype or a wrapper data type can be made to work, but I'm not exactly the one you want on technicalities | 19:22 | ||
luqui | mmkay | ||
autrijus | maybe you want oleg :) | ||
(in ICFP, invited talk, "the next ML", the speaker lists as one of the major direction for ML: "Sexier types but without Oleg") | 19:23 | ||
geoffb | ?? | ||
autrijus | it's a compliment of sorts | ||
geoffb: okmij.org/ftp/README.html -- oleg is behind some extremely weird type magick in haskell land | 19:24 | ||
geoffb | [added to yet-unread firefox tabs ...] | 19:25 | |
luqui | got it! | 19:26 | |
I was thinking about it backwards | |||
autrijus | including that zipper filesystem thing, "true" ocaml style OO system in haskell, logic transformer that adds prolog-like search ability to arbitary monads, types parameterized not with types but with numbers, delimited continutations, and assorted other things. | ||
luqui | it actually did have to be a functor in lf :-) | ||
autrijus | luqui: ah. :) | ||
...and whatever benign language features introduced, oleg can poke holes in it and abuse it into something truly startling. | 19:28 | ||
sort of like a cross between damian and abigail. | |||
luqui | what is oleg? | 19:29 | |
*who? | |||
Steve_p | Haskell guy, isn't he? | ||
autrijus | luqui: Oleg Kiselyov | ||
Steve_p checks autrijus's journal | |||
Of course, just asking autrijus is faster :) | 19:30 | ||
autrijus | Steve_p: also scheme guy and prolog/c/c++/perl etc guy | ||
sub fixpoint { &{$_[0]}(@_) }# Yep, it does look like @#&$! | 19:31 | ||
Steve_p feels that pain | |||
autrijus | # ref: okmij.org/ftp/Perl/Scheme-in-Perl.txt | ||
PerlJam idly wonders if mjd knows oleg | 19:32 | ||
geoffb | I know Damian's rep. Don't know abigail's. | 19:33 | |
Is Oleg a genius or just wierd? | |||
autrijus | geoffb: abigail is known for exploiting illdocumented perl5 bugs into japhs. | 19:34 | |
geoffb | ah! | ||
autrijus | er, I mean, features. | ||
geoffb: oleg is a genius who is also just weird. | |||
geoffb | heh | ||
Well, I think the world needs more of those | |||
Is he a prof like Damian used to be? Or just has a lot of time on his hands? | 19:35 | ||
autrijus | I think he is working on a day job but apparently does have lots of time on his hands. | ||
geoffb | nod | 19:36 | |
PerlJam | geoffb: peruse perlmonks for posts from Abigail :) | 19:39 | |
geoffb | PerlJam, oh dear, something else to read. | 19:40 | |
geoffb turns to look at his bookshelves | |||
Oy | |||
Someday . . . . | |||
Those that fail to learn history are doomed to repeat it. Those who learn history don't have time to. | 19:41 | ||
autrijus | short lyf; long craft, lerne; | ||
geoffb | autrijus, nodnod | 19:42 | |
geoffb constantly has problems explaining to people the massive amount of self-guided continuing education necesary to stay vaguely current in this craft | |||
autrijus | it's easy to stay current if your river is narrow enough ;) | 19:44 | |
PerlJam | geoffb: I've decided to mostly content myself with vaguely knowing what's going on by occasional participation. | ||
autrijus | unfortunately, PL is a huge river. | ||
geoffb | PerlJam, nod. I do that for some things. | 19:45 | |
autrijus | hm, based on the things luqui are working on, he is probably at the stage of "Post-doc Haskell programmer" now | 19:52 | |
soon he'll progress into "Tenured professor" | |||
# ref: www.willamette.edu/~fruehr/haskell/...ution.html | |||
Juerd | s/files/questions/ | 19:53 | |
(I'm not sending a followup to three lists :) | |||
) | |||
PerlJam | Juerd: WRT the pugs repository ... is it automatically updated (i.e., as changes show up on svn.openfoundry.org/pugs, they quickly appear on feather) ? | 20:00 | |
autrijus | PerlJam: the svk remo in my home dir is synced every 60 sec | 20:04 | |
PerlJam | I wonder if it would be worth it to get a similar deal for parrot. | 20:07 | |
autrijus | nod | 20:08 | |
and of the main perl6 repo, those are in //mirror/perl6/doc/trunk | |||
if someone wants to set up a parrot mirror alongside it in either //mirror/parrot using robrt's bootstrap, or by hand, please feel free -- my ~/.svk/local is a+wrx | 20:09 | ||
PerlJam *really* needs to push himself to start using svk more | |||
autrijus finishes reading perl5/* | 20:10 | ||
...excluding PIL2JS which would take another half day. | |||
...but including theory.pod over many times | 20:11 | ||
my brain is threatening to overload, so I'm going to take a shower and try to journal down something. | 20:12 | ||
eric256 | any ideas why -n as an ARG doesn't work? | 20:43 | |
ie....pugs example.p6 --n works, but pugs example.p6 -n does not | 20:44 | ||
by works, i mean @ARGS.perl.say outputs --n in the first one, but nothing in the second | |||
autrijus | obviously, bug. write a test :) | 20:45 | |
geoffb | autrijus, is your top journal intentional? | ||
eric256 | okay...just checking. ;) | ||
geoffb | It looks like a thread reply . . . . | ||
eric256 has doubts about what is obvious and what is not. ;) | |||
if i'm in a for @ARG { is there any way to get the next element in the list ? ... would be very helpfull ;) | 20:46 | ||
PerlJam | eric256: for zip(@ARG,0..) -> $a, $i { ... } | 20:47 | |
er, that should be 0... | |||
eric256 | zip hangs on infinite lists currently | ||
PerlJam | eric256: alternatively, you could use for zip(@ARG,[@ARG[1..@ARG.elems],undef]) -> $curr, $next { ... } | 20:48 | |
(assuming I've got the syntax right) | |||
eric256 | i've been using for 0 .. +@ARGS - 1 -> $i{ | 20:49 | |
to get inxeds | |||
indexs even | |||
PerlJam | well, that'll work too | ||
Oh, I guess mine has an obiwan error | |||
eric256 | @ARGV Y 0... -> $elem, $index will be a welcome idiom....if someone overloads Y to mean Zip | 20:50 | |
;) | |||
why don't we just use regular old Y agian? | |||
fglock__ | eric256: "Y" works as zip | 20:51 | |
iblech | eric256: for @ARG.kv -> $i, $a { my $next = @ARG[$i + 1]; ... } | 20:52 | |
eric256 | iblech: nice | ||
any ideas where or how i would test that autrijus? | 20:53 | ||
iblech | eric256: Probably t/pugsrun/ | ||
Juerd | PerlJam: It appears to be something with public write access | 20:54 | |
eric256 | yea i was looking in there to see..all examples seem related to actual pugs command lines...guess i can create a script that jsut @ARGS.perl.say and compare the output. | ||
Juerd | PerlJam: There is no daemon syncing, but if you "svk up" once, the local repository is updated for all users | ||
PerlJam: Perhaps autrijus can provide you with more details | |||
PerlJam keeps forgetting that .kv is blessed upon @arrays | |||
Juerd | PerlJam: Since the pugs building script uses the local svk stuff, it is updated at least once every 15 minutes | 20:55 | |
iblech | PerlJam: It is :) And .pairs .keys .values is as well | ||
autrijus | geoffb: no, I think use.perl is confused | 20:56 | |
eric256 | so at least i could just do @ARGV.keys and get the indexes with no -1 crap | ||
autrijus | I blame slash. rm'ing | ||
geoffb: thanks for the reminder btw. | |||
geoffb | autrijus, ah. and np. | ||
autrijus | it's a reply to luqui's "conflicted" | 20:57 | |
svnbot6 | r7565 | iblech++ | * t/unspecced/evaluation_order.t: Added some more tests | ||
r7565 | iblech++ | (e.g. (die "first")[die "second"] etc.) | |||
r7565 | iblech++ | * Pugs.Eval: Fixed evaluation order in array and hash access. | |||
r7565 | iblech++ | * PIL2JS: PIL::PApp: Fixed evaluation order of (die "first")(die "second"). | |||
eric256 | does Test.pm have any builtin handling for running commands and capturing output? | 20:59 | |
or should i jsut follow the pugsrun examples? | |||
autrijus | eric256: follow pugsrun for now, although I'm surprised there were no qx tests | 21:00 | |
so some qx tests would be appreciated too | |||
meppl | is there an description to use c++-moduls or is it possible? | ||
autrijus | meppl: no-one has attempted it before | 21:01 | |
meppl | okay | ||
thx | |||
autrijus | meppl: if you want to use p6 to script C++, try spidermonkey | ||
and see if they have ways of C++ scripting | |||
so we can use 'pugs -C JS' to manipulate them | 21:02 | ||
IIRC adobe did exactly that | |||
but not sure if there are code for it | |||
autrijus proceeds to import 3.5G of songs into the shiny iPod Nano thing. | 21:03 | ||
meppl | no, but | ||
thank you very much | |||
;) | |||
autrijus | :) | ||
(to qualify: "exactly that" = JS scripting C++ via spidermonkey. not "use p6 to script acrobat") | 21:06 | ||
although it'd be nice | |||
Juerd does not even have 3 GB of music | 21:09 | ||
PerlJam | Is there an rpm for SVN::Simple::Edit? | 21:12 | |
Or anyone have a clue why I'm getting this error on my FC4 box: | 21:16 | ||
Can't load '/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/auto/SVN/_Delta/_Delta.so' for module SVN::_Delta: /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/auto/SVN/_Delta/_Delta.so: undefined symbol: svn_swig_pl_get_current_pool at /usr/lib/perl5/5.8.6/i386-linux-thread-multi/DynaLoader.pm line 230. | |||
(and others like it) | |||
integral | is it linked against the right version of the subversion libraries? (eg. did you upgrade svn but not SVN::whatever?) | ||
PerlJam | AFAIK, I'm current with all rpms for FC4. | 21:18 | |
(not that the subversion bindings to perl can't be broken though) | |||
integral | hmm, FC4 doesn't have some bug tracking system you can check for this stuff? | 21:19 | |
pasteling | "stevan" at 67.186.136.119 pasted "Is this correct usage of but" (18 lines, 320B) at sial.org/pbot/13627 | ||
svnbot6 | r7566 | iblech++ | * t/syntax/list_quote_whitespace.t: skip test on non-vanilla-Pugs (eval() is needed). | 21:21 | |
r7566 | iblech++ | * t/subroutines/loopscope.t: Added two more tests dealing with an explicit $_. | |||
r7566 | iblech++ | * t/subroutines/dollar_underscore.t: Added a comment why PIL2JS fails on this | |||
r7566 | iblech++ | test and why PIL2JS might actually be correct. | |||
autrijus | stevan: doesn't the BUILD want "next;" ? | 21:27 | |
stevan | autrijus: no, the BUILDALL will take care of that | ||
I am trying to make a class which counts it's instances | 21:28 | ||
the classic class method example | 21:29 | ||
you can do it easily with a subclass of Class | |||
but I thought maybe it would work with Roles and but as well | |||
nothingmuch: ping | 21:30 | ||
nothingmuch | pong | ||
stevan | stupid adium .... | ||
PerlJam | stevan: looks okay to me. Except I'm not sure about your use of "our" for $.count | ||
stevan | PerlJam: yes, that seems to be confusing | ||
I am of the opinion that anything in a Role is dumped into the consuming class | 21:31 | ||
nothingmuch | PerlJam: i didn;'t agree either | ||
PerlJam | stevan: Also, remember that roles are composed into classes, so you may have potential conflicts with $.count, .count(), and .BUILD() | ||
nothingmuch | IMHO 'our $.count' is $Countable::count' | ||
and 'has $.count' is assimilated as instance variable on the metaclass (that is, a class scoped variable, unique to each class) | |||
stevan | PerlJam: the "but" should avoid that,.. because "but" creates an anon-class first | ||
nothingmuch | PerlJam: IIRC roles that don't trust each other will be name mangled | 21:32 | |
so that $.count can be defined in any number of roles, and assimilated into the same class - the attr is private to the role | |||
PerlJam | stevan: yeah, but it's an anonymous class that's a clone of the original (which may have those members) | ||
nothingmuch | or maybe you use '$:count' | ||
anyway, that shouldn't be a problem | |||
PerlJam | nothingmuch: oh, perhaps so. | ||
nothingmuch | the conflict should only happen with the method count | 21:33 | |
stevan | PerlJam: I was under the impression is was a anon-class which is a subclass of the original actually | ||
the result would be the same as the cloning | |||
(thats how the eigenclass stuff works) | |||
A but Countable is basically sugar for | 21:34 | ||
::CountableA = class { does Countable; is A } | |||
at least I think that is right :/ | 21:35 | ||
so the count() would not conflict so much as it would override anything in A | |||
eric256 | autrijus: from back log....what is a qx test regarding pugsrun? | 21:36 | |
autrijus | eric256: er, no, another test testing the qx// construct | 21:37 | |
eric256 | ahh.. you had me pretty confused. hehe | 21:39 | |
nothingmuch | javascript makes webdevelopment almost fun when it's encapsulated in e.g. HTML::Prototype | ||
the results are so much more satisfying | |||
autrijus | eric256: sorries :) | 21:41 | |
eric256 | hmmm -n is the only one that doesn't work. odd | 21:42 | |
leo__ | stevan: (generated classes) ::CountableA - do you have any clue about the lifetime of such classes? | 21:43 | |
autrijus | eric256: I suspect -p too | ||
stevan | leo__: I would expect that ::CountableA could be stored in the ::* package, which means it would live forever | ||
or at least until the GC took it away | |||
leo__ | live foreve simplifies things for Parrot, GCing classes isn't really simple | 21:44 | |
stevan | leo__: I think only when you do: my class { ... } do they need to be GCed | 21:45 | |
but that should be an instance of Class, and so clean-up-able like any other instance in the system | |||
class Foo {} should be sugar for Class.new(:name<Foo>) | 21:46 | ||
leo__ | instances aren't a problem, but a Class get's a type number, registered into an array of type namess | ||
stevan: nm - not so important know, but I've to consider that case eventually - thx for the input | 21:48 | ||
svnbot6 | r7567 | eric256++ | Added tests for passing args to script. Currently any pugs args are being caught even if they happen after the script name and should be applied to the script. | ||
r7568 | eric256++ | Script needed for new Args tests. | |||
PerlJam | stevan: wouldn't it be logical for them to have the same lifetime as the variable to which they are "attached"? | ||
stevan | leo__: no problem :) | ||
PerlJam: yes, but saying ::CountableA implies stashing in the global ::* package | 21:49 | ||
eric256 | i have no idea how to test qx since it doesn't work yet. ;)...or does it? | 21:50 | |
PerlJam wonders if there will be any destruction issues (guaranteed order for instance) with anon classes. | |||
autrijus | eric256: it doesn't work yet :) | ||
stevan | my ::CountableA = A but Countable; | ||
I dont know if that is real syntax or not | 21:51 | ||
PerlJam | eric256: pretend that it works and write the test that way, but wrap it in an eval. | ||
stevan: it seems reasonable-ish to me. I'd expect A to have :: too though. | |||
eric256 | PerlJam...i meant more that i don't know what to expect from it...just plain string that matches STDOUT of the test script? and do you have a suggested t directory? | ||
stevan | PerlJam: yes, that is probably correct :) | ||
PerlJam | eric256: oh, I'd do something like verify that qx(echo -n foo) is the same as "foo" or something like that. | 21:53 | |
I'm still unclear as to when the :: are needed and when they are not. | |||
stevan | PerlJam: yes, me too | ||
eric256 | PerlJam on win32 that equals -n foo though ;) | ||
PerlJam | eric256: well s/echo -n foo/pugs -e 'print foo'/ then :) | 21:54 | |
er, pugs -e 'print "foo"' | |||
or whatever the appropriate quoting is for Win32 | 21:55 | ||
eric256 | my point was that the quoting and everything would be different on each system.. that was part of my problem...but i can just make a generic script that returns what its called with, but i still have to find the pugs.exe which might or might not be in the path..... hince my original delima ;) | 21:56 | |
PerlJam | eric256: so make a separate test for each platform. | 21:57 | |
integral | has anyone else built pugs on feather recently? I've just tried and got a "PIL2JS needs the Class::Rebless module from CPAN", and /usr/local/bin/pugs is a about 200 revisions behind | 22:00 | |
autrijus | integral: the "Rebless" thing is fixed within the 200 revs | 22:02 | |
eric256 | integral ... there was a change in the compiling of pugs and i don't think it worked | 22:03 | |
wolverian | has there been p6l discussion on adding .tail and .head (naming not important)? | ||
eric256 | i was actualy just reading Juerd's email on the list and find that my name got attached to that "yea!" lol. hopefully he is around | ||
integral | hmm, seems I needed to svk pull, not just svk update, so I'll try that now | 22:04 | |
eric256 | .tail and .head would be easy enough to do no your own wolverian | ||
wolverian | eric256, yes. | ||
eric256 | sub head (@array) { return @array[0] } | ||
wolverian | eric256, that's not my question, though :) | ||
eric256 | lol. my point is they are simple enough to be in a list util library or soemthing | 22:05 | |
integral | how efficient is tail? could it return something lighter weight than a copy of the array? | ||
eric256 | Juerd: ping | ||
wolverian | eric256, yes, I know they are. are they confusing enough to not put in the core? | 22:06 | |
eric256 | ....try that agian. i didn't understand the question | 22:07 | |
wolverian | eric256, oh: I kind of like the functional approach to manipulating list. thus .tail instead of [1...]. is that too confusing or unnecessary to put in the core? (ah, I said "not" on my previous line. sorry!) | 22:09 | |
integral | if head works on lists, surely (@array) is the wrong prototype? | ||
wolverian | method tail { @_[1...] } | 22:10 | |
eric256 | i would think then that maybe you want a library of functional helpers... i just don't think everything needs to be in the core. maybe i'm wrong, look at php before moving things to core | ||
yes integral it wasn't a good example and for some reasons lists and arrays are the same to me regardless of how hard i try! lol | |||
wolverian | eric256, I don't want _everything_ in the core. :) but thanks, it's clear to me that you don't at least see any use for them in the core. that's good information. | ||
integral | here's a data point: GHC's Prelude just reexports stuff from elsewhere, so stuff should go into a module first | 22:11 | |
wolverian | of course. with "core" I don't mean "don't modularise it!" :) | ||
eric256 | actualy i see a use for them..just not in the core. simpler is better. use Functional; at the top of your script would mean tons to someone reading it, gives them a visual que that the rest of your script is going to be more functional in nature. | 22:12 | |
wolverian | eric256, that's a good point. | ||
eric256 | of course that might be a miscue if you just want head and tail. ;) | ||
wolverian | we have import lists.. | 22:13 | |
eric256 | true. /me anxiously awaits wolverian's example using his homebrew head and tail | 22:16 | |
wolverian | hehe. a friend asked, that's all. :) | ||
eric256 | i would at least suggest an example implementation before bringing it up on the list. in developing the example you might become enlightened and have something more to share, if not you will have code to point at and say...this is why i think this way | ||
wolverian | I'm not sure how to specify a list invocant | 22:17 | |
oh, they turn into Arrays automatically, right? | 22:18 | ||
eric256 | integral implies not. ;) | ||
wolverian | right | 22:19 | |
but the array must be slurpy | |||
and then it will allow itself to be called as $scalar.last too | |||
Juerd | eric256: pong | ||
wolverian | method *tail (*@foo) { @foo[1...] } | ||
integral | you want: tail(func()) to call func in list context, but @array is an item thing I thought? | 22:20 | |
Juerd | eric256: pong | ||
uh oh, duplicate pong! :) | |||
wolverian | integral, @array is context(...) I think | ||
but that still allows this: "foo".tail | 22:21 | ||
integral | erk, I hate perl6. | ||
wolverian | wouldn't it be nice of Strings were Arrays.. :) | ||
integral | I suppose the only reason for stuff like is context is to sell P6BP where we find out that we shouldn't use it. :-P </troll> | 22:22 | |
wolverian | anyway, anyone else have a candidate implementation? :) | ||
eric256 | hey juerd | 22:26 | |
do you need to linke to my auto directory so that people get the updated version or did you do that all ready? i would check but its mid build | 22:27 | ||
Juerd | eric256: ls -l /usr/local/bin :) | 22:35 | |
eric256 | huh? | ||
ahh | 22:36 | ||
hmmm...it says its linked...but it still runs a different version | |||
ahh. nm | |||
okay if 15min or so pugs should be all better on feather | 22:37 | ||
and now parrot should be working agian too | 22:38 | ||
integral | cool | ||
eric256 | well in 15 minutes they will both work agian +-15minutes ;) | ||
integral++ for pointing that out ;) | 22:40 | ||
integral try pugs on feather now... should work | 22:46 | ||
integral | yep, it does. thanks for that :-) | 22:50 | |
eric256 | np | 22:52 | |
i run my own copy in my home directory so i didn't notice that one was outo f date | 22:53 | ||
leo__ | eric256++ # $ parrot --version ... (r9462) | 22:54 | |
eric256 scrolls through TSa's mail list message.....long...very long in a subject i'd already been lost on... | 22:56 | ||
we need someone to summarize just the Sane Less Insane pair topic...maybe water it down a bit | 22:57 | ||
leo__ | eric256: I think TSa didn't get the subject 'Sane (less insane) pair semantics' | 23:00 | |
and the word sane seems to be missing in his dict | |||
wolverian | oh. method *tail ( *[ $head, *@tail ] ) { @tail } that oughta work, I think - or does it need 'is context(..)'? | 23:01 | |
eric256 | did you try it wolverian? | ||
wolverian | no. :) | ||
eric256 | lol | ||
?eval method *tail ( *[ $head, *@tail ] ) { @tail }; "hello world".tail | |||
evalbot_7568 | Error: unexpected "[" expecting parameter name | ||
eric256 | ?eval method *tail ( *$head, *@tail ) { @tail }; "hello world".tail | ||
evalbot_7568 | [] | ||
wolverian | that should die, I think | 23:02 | |
eric256 | i don't think you can define it functionaly like that. maybe you can. i dunno | ||
?eval method *tail ( $head, *@tail ) { @tail }; "hello world".tail | |||
evalbot_7568 | Error: No compatible subroutine found: "&tail" | ||
wolverian | pugs doesn't support list unpacking apparently (or whatever you want to call it) | ||
eric256 | ?eval method *tail ( $head, *@tail ) { @tail }; (1..5).tail | ||
evalbot_7568 | Error: No compatible subroutine found: "&tail" | ||
wolverian | heh. | ||
eric256 | ?eval method *tail ( *@tail ) { @tail[1..] }; (1..5).tail | ||
evalbot_7568 | Error: unexpected "[" expecting word character, "::", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or "}" | ||
wolverian | @tail[1...] | 23:03 | |
eric256 | ?eval method *tail ( *@tail ) { @tail[1...] }; (1..5).tail | ||
evalbot_7568 | () | ||
eric256 | lol | ||
dunno | |||
wolverian | that's.. interesting | ||
eric256 | 5 oclock..time to bolt | 23:04 | |
later | |||
wolverian | wow, theory.pod looks nice | 23:05 | |
autrijus | wolverian: it _is_ nice. | ||
how to reconcile that with dynamism though, is part of what making my brain want to explode. :) | |||
wolverian | sure. it also makes me appreciate the separation of type and implementation declarations in Haskell | 23:06 | |
(although that's more generic than here) | 23:07 | ||
23:07
Ikarus is now known as Ikarus[zleep]
|
|||
wolverian | I wonder if I'm the only one who prefers reading POD in vim over perldoc.. | 23:08 | |
mugwump | I have set my emacs to use a big font for POD headings :) | 23:09 | |
wolverian | I just like the colours :) | 23:12 | |
autrijus | wolverian: I usually use pod2html :) | 23:22 | |
wolverian | autrijus, that doesn't have colour, does it? | ||
autrijus | no, but it has variable sized fonts :) | 23:24 | |
(and hyperlinks) | |||
stevan: dconway wants to know how "class F { method new { ... } } class G is F {}" works | 23:25 | ||
dolmen | is there a "Best Practices for Darcs" document for the Perl6 project ? | 23:26 | |
autrijus | dolmen: er, uhm, no, and to be honest, our darcs mirror is just a convenience device for people who does not wish to install svn/svk | ||
and as such provides very little best practices for the mirror -- no changelogs, bad tagging, read onliness | 23:27 | ||
onlyness | |||
dolmen | oh, I thought it was the other way: svk the mirror | ||
clkao grins | |||
autrijus | no, svn.openfoundry.org/pugs/ is the main | ||
stevan: and in ruby, class methods like "def Person.blah" does affect the subclass in the usual C3 way. | 23:31 | ||
er, I mean, regular-dispatch way. | |||
(C3 is python.) | |||
Juerd | wolverian: You are not the only one. | 23:33 | |
autrijus | stevan: I think parallel inheritance in the eClass chain does not look like avoidable | 23:35 | |
but maybe I'm missing something. hm. | |||
wolverian | Juerd, good to hear that. | ||
svnbot6 | r7569 | autrijus++ | * Checking in the "unadapted" version of "Larry was a mariner" | 23:48 | |
r7569 | autrijus++ | to facilitate brainstorming and discussions. | |||
autrijus proceeds to send allison a committer bit. | 23:49 | ||
Juerd | autrijus: You mean there are still people without? :) | ||
autrijus | Juerd: you may be surprised :) | ||
for example, guido has one | |||
but larry had not | |||
there is something very ironic about this. | 23:50 | ||
Juerd | Is this the Guido I think it might be? | ||
autrijus | yup. | ||
geoffb | Guido? Really? Has he ever committed? | ||
Juerd | Good to have him on board. | ||
autrijus | no, it was during ingy's oscon talk | ||
larry invited guido | |||
so I sent invitation to them both | |||
guido took it; larry did not. | |||
hmmmm. | |||
Juerd | Why did Larry not take it? | 23:51 | |
Did he specify? | |||
autrijus | I have no idea. separation of concerns? | ||
he mentioned during hackathon that he wishes to be somewhat distanced from day to day implementations, just so he can judge proposals fairly | |||
Juerd | Seems counterproductive to me | ||
autrijus | well, I'm not sure about that. | 23:52 | |
Juerd | I find that people who have actually worked with Perl 6 have a better mental map of what is sane and what is not. | ||
autrijus | of @Larry, luqui and chromatic are doing great and shipping things bothways nicely. | ||
Juerd | And someone who uses pugs, should practically be a committer, because they will find bugs :) | 23:53 | |
Speaking of mental sanity, I think I should stop trying to understand tsa and his posts. | 23:54 | ||
autrijus | mm, "mugs of pugs bugs" | 23:55 | |
Juerd | He does usually have some good point hidden inside lots of complex misassumptions :) | ||
autrijus | ...that tugs hugs and hugs rugs... | ||
Juerd | It just takes a lot of effort for me to find them | ||
autrijus | er I mean, tugs jugs... | ||
autrijus should clearly finish journaling and get some sleep. | 23:56 | ||
Juerd | wear ear plugs | ||
autrijus | mmm hlaghs | ||
Juerd | hmmm | ||
pugs drugs. | 23:57 | ||
*shrugs* | |||
good nugs, eh, night | |||
autrijus | gugs nugs | ||
geoffb | night, Juerd | ||
wolverian | fu.. erm.. | 23:58 | |
PerlJam | autrijus: would you happen to know why I get an error when trying to svk sync the parrot sourcet tree? I'm doing "svk sync //mirror/parrot -s 9463" and it's saying "HTTP Path Not Found: REPORT request failed on '/parrot/!svn/bc/0/trunk': path not found. | 23:59 | |
geoffb starts yet another profiling run at $work, with yet more profiling hooks turned on, hoping that this time he will find the info needed to make the problem clear | |||
PerlJam | I'm not sure why it appears to be trying to retrieve what looks like version 0 | ||
autrijus | PerlJam: you want $svk for that, but I think you shouldn't mirror all revisions in general; Robrt should have provided a repodump | ||
I mean, #svk |