Pugs t-shirts www.cafepress.com/pugscode | Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net
Set by stevan on 15 August 2005.
luqui Class::Multimethods::Pure is my best so far, IMO. 00:01
luqui has to go
luqui &
rafl luqui: Why the old artistic license, btw? 00:40
luqui dunnos 00:41
luqui doesn't really care about licensing
steal my code, mangle it, claim it's your own, see if I give a damn
I just use the default template 00:42
rafl luqui: old artistic license isn't too cool. It mainly has some too vague formulations to be a real free software license. 00:44
luqui: I thought the default templates say "same license as perl (GPL/Artistic)" 00:45
luqui hmmm 00:46
then that's what mine should say
Ahhh 00:47
the README is correct, the POD is not
rafl likes plain GPL better, but GPL/Artistic is fine of course, because it's compatible with the GPL.
luqui: Updating the license in the POD would be nice for packaging. 00:48
luqui done, uploaded to pause 00:49
you can find the most recent version at luqui.org/public 00:50
because pause lags a bit
rafl Thanks! 00:53
There's the pause incoming directory, so I don't care about that lag. :-)
luqui ahh, good point 00:54
rafl luqui: Can you think of a nice Description? The full introducion you give on the POD is a bit too much, I guess. 01:04
luqui how long a description? 01:12
rafl Let's say 10-20 lines. 01:13
luqui not right now... :-( 01:14
luqui is leaving for gamedev in about, oh, say, -2 minutes 01:15
bye!
luqui &
rafl Bye!
luqui thanks for your debian work
luqui & # really
rafl gets another beer. 01:25
Here pugs build logs from hppa-linux and s390-linux. They have some tests failing that worked for me on i386. Maybe it helps to improve pugs in some way: buildd.debian.org/fetch.php?&pk...amp;as=raw buildd.debian.org/fetch.php?&pk...amp;as=raw 02:30
02:47 sleepster is now known as typester
spinclad rafl_: pugs out of NEW means it should be in unstable now, no? 06:02
nothingmuch morning 06:03
spinclad not seeing it... probably propagating?
mornin nuffin
nothingmuch anything new? 06:04
spinclad pugs in debian, rafl++ 06:05
for me, no... went to our church's zen center tonight, glad to be back there 06:06
gonna look at pugs core and mm and ponder a haskell backend... if i get somewhere i expect i'll talk with luqui 06:09
don't know how realizable this is for me yet... 06:10
nothingmuch stevan is actually your man, i think
stevan++; # father of metamodels 1 through N, and meta model N 2.0
spinclad sure, for the mm... thinking luqui as one who's been catching the haskell bug 06:11
nothingmuch ah
spinclad so yeah, both of em 06:12
nothingmuch in that case you can splice them
you could take off stevan's head and put it on luqui's torso
luqui would look much meaner that way
spinclad no! i need both their heads!
nothingmuch you
'll have both their heads in one package 06:13
spinclad ah! like zaphod then. yeah, might work
anyway, this is for the morrow. getting an early night tonight (02:15) 06:14
nothingmuch had one too
came back from work, watched some telly, dinner, dishes and streight to bed 06:15
spinclad is it sunup around by you?
nothingmuch 9:15
nothingmuch is not getting good ride options to work, so everything is 2 hours later than i'd like it to be 06:16
spinclad wish i could enjoy staying and chatting... 06:19
i think on balance i'll enjoy the morning more *snf* 06:20
&
Khisanth HMM 06:36
is the pugs binary suppose to be in the repo? O_o 06:40
scook0 Khisanth: I think 'pugs' is now a Perl script that calls the actual binary 06:48
(confused me too...)
nothingmuch what's a nice to compute mathematical function that is quite hard to compute but not insane (e.g. ackerman) 08:47
masak nothingmuch: memoization? 08:51
nothingmuch actually i'm trying to make my comptuer work harder than that =)
i think i'll use a dually recursive fib function 08:52
Juerd Calculate pi to more digits than currently known.
Publish, profit.
nothingmuch tsk tsk
i should clarify: i'm trying to benchmark the circular prelude thing
Juerd Or, in fact, just compute the final digit.
:)
nothingmuch "the" final digit? 08:53
Juerd Yeah.
nothingmuch heh
Juerd Or the last three, or something like that.
Can anyone reach feather by ssh? 08:59
nothingmuch yes
Juerd Oh, now I can too
Weird.
pugs has grown much. 09:00
8.3 MB now, was 5.x last time I looked 09:01
broquaint Has this been passed around yet? www.cse.ogi.edu/~hallgren/House/ 09:02
It seems suitably mad so I thought it would go down well here. 09:05
masak an OS in haskell... now why does that sound both crazy and agreeable at the same time? 09:25
broquaint Agreeably crazy? Crazily agreeable? It's starting to sound a little like pugs ... 09:26
masak broquaint: apart from playing around with, what is House good for? 09:32
masak reads the paper on House 09:37
Juerd curses
Someone wrote a module that extends DBIx::Simple and uses DBIx::Simple namespace for that
The annoying thing is that I like this module, and can't be as upset about the namespace issue as I want to be. 09:38
broquaint No idea, masak. I think it's fairly academic :) Just interesting to see some Haskell operating close to the metal. 09:39
masak Juerd: couldn't you patch the module to use another namespace? 09:42
Juerd Of course I could, but it's not my module. 09:43
I would be committing a very serious crime if I changed someone else's module. 09:44
The author of the module in question has done this in the past, by the way, so he might not mind, but I'm not like that.
I sent a message to him, cc [email@hidden.address] to discuss it. 09:45
masak Juerd: what's the problem? you could submit your patch to the author for the next version of the module, and meanwhile use your patched version
Juerd No, what I want requires changes to both modules. 09:46
And as he invaded my namespace, I can't do this without clashing.
masak ah
Juerd So we need to communicate first, and try to synchronise our releases.
(Assuming he's willing to change things.)
masak is stuff like this written down somewhere in perldoc?
Juerd What stuff? 09:47
Namespace invasion?
masak yes 09:48
Juerd No - it's a social thing, not a technical one.
You don't install a spoiler on someone else's car without asking first.
masak you mean it's common courtesy not to invade namespaces 09:49
Juerd Not even if it looks really neat and you're doing it for free.
Yes.
masak i agree
but everybody might not have realized that
Juerd This guy by now should have some sense of how people don't like this
In the past, he's even *uploaded* his version of a not-his module 09:50
Without maintainership.
masak ouch
people have varying levels of social skill :/ 09:51
he might still be a nice guy, too :)
Juerd By the way - I have this from several perl mongers, and have not witnessed the fact myself. 09:52
In person I haven't hated him yet.
masak i'm sure if you ask him -- and he's not a sociopath -- he'll agree to get outta your namespace 09:53
Juerd I hope so
I'm trying, at least.
I don't mind his invasion, really, but this way of working blocks further cooperation between our modules 09:54
As long as he's not overriding existing methods, it's fine by me.
But to really make this work, I'd have to have these methods too, and by doing so, he'd be overriding, which would be immensely ugly.
nothingmuch likes the fact his mini language had builtin support for higher order functions without thinking about it 09:55
Juerd www.nntp.perl.org/group/perl.modules/44048 # this should work
nothingmuch: Then you did something right.
nothingmuch is using a function called repeatedly_apply_and_accum to implement &infix:<*>, &infix:</>, and &infix:<**> 09:56
sub &infix:<*>( repeatedly_apply_and_accum(&infix:<+>, $x, $x, $y) }
syntax errors, but whatever 09:57
except I have a stupid bug in /
it doesn't work that way ;-)
QtPlatypus nothingmuch: You could define +'s in terms of lambda functions. 09:58
nothingmuch QtPlatypus: yeah, i know, but i'm not touching that with a 10 foot pole
since i like defining my AST with things that really look like numbers
and since the "compilation" phase is harder 09:59
QtPlatypus nods
nothingmuch i'm trying to elegantly demonstrate the pluggability of builtin ops (**, * and / are all optionally built in)
QtPlatypus nods.
nothingmuch then I'm computing (($_ ** 5) / ($_ ** 4)) for 1 .. 10
which should ofcourse be 1 .. 10 10:00
but should demonstrate the order of magnitude of difference between the runtime features
wow, this is fun 10:19
luqui: ping 10:27
what is the canonical value of &infix:<...> internally? is it '&infix:...'? If I ask &infix:{'<'}.name what do i get? 10:31
and does ::('&infix:<<>') or ::('&infix:{"<"}') work? or should it be ::(&infix){'<'} ? 10:32
anyway, lunchtimne 10:33
nothingmuch returns 11:24
nothingmuch would like a neither operator and nor operator... they work very well 11:27
neither $x nor $y
listy neither is what you think it is 11:28
oneary neither is no-op and nor is chainary '!$x and !$y 11:29
11:47 _SamB_ is now known as SamB
pasteling "nothingmuch" at 212.143.92.226 pasted "/me loves perl" (9 lines, 246B) at sial.org/pbot/13094 12:13
rafl_ spinclad: At least after the next dinstall run this evening. 13:35
Here pugs build logs from hppa-linux, powerpc-linux and s390-linux. They have some tests failing that worked for me on i386. Maybe it helps to improve pugs in some way: buildd.debian.org/fetch.php?&pk...amp;as=raw buildd.debian.org/fetch.php?&pk...amp;as=raw buildd.debian.org/fetch.php?&pk...tamp=11266 13:40
Unfortunately the debian build failed for other archs (3 for Debian reasons, 2 for ghc reasons). buildd.debian.org/build.php?arch=&pkg=pugs
chinu hi all 13:45
i have a question
regarding crawler programming in perl
rafl_ Hello chinu 13:46
chinu: Are you asking about perl5 or perl6?
chinu perl 6 13:47
elmex_ you can program something in perl6 ?
wow, thats news
chinu no
it is perl5
Qiang_ heh. he is asking the same question in #perl too.
rafl_ chinu: So please ask in #perl. This channel is about perl 6 and pugs development. 13:48
chinu so what, if you know answer me
elmex_ i wonder when perl6 will be ready enough to be able to bind with SDL
chinu but no one is answering there
rafl_ chinu: Ask a proper question, then.
Qiang_ "chinu , so what, if you know answer me" that's quite a polite !!! 13:49
chinu ok sorry 13:52
if i hurt you
13:52 elmex_ is now known as elmex
nothingmuch any Inline:: hackers here think they could they could hack an Inline:: for C--? 13:59
elmex C-- ?
nothingmuch the intermediate language 14:00
i would like to avoid compiling to C because it doesn't have prefix form 14:01
hah! I've totally lost my marbles and I want to generate C code at run time, and eval it into Perl. How do I do this? 14:04
that so applies to me =/
search.cpan.org/~ingy/Inline-0.44/C...#Evaling_C 14:05
McFist how can I test if bless() works in pugs? 14:06
nothingmuch ok(ref eval { bless $thing, "Class" }, "true value); 14:07
is(ref eval { bless $thing, "Class" }, "Class", "true value);
look inside t/oo
i'm willing to bet one cookie that it's already tested
stevan nothingmuch: you might be wrong actually
nothingmuch that's why I only bet one cookie
stevan nothingmuch: bless() is much deeper magic now in perl 6 oo
stevan takes nothingmuch's cookie 14:08
nothingmuch i thought it retains compatibility, no?
McFist both this and one in t/oo doesn't work
nothingmuch hmm
in that case see how it's specced, make sure the test is good
and add a TODO test ;-)
McFist *** No compatible subroutine found: "&bless"
stevan nothingmuch: I assume nothing about perl 6 anymore
nothingmuch do you have commit bits?
stevan McFist: what are you trying to do? 14:09
TIMTOWTD a lot more things in Perl 6
McFist stevan: I'm trying p5-ish "sub new { bless shift }"-like class instantiation
stevan McFist: yuk, why?
nothingmuch bless shift != good 14:10
stevan class C {} gives you the same thing
nothingmuch bless $thing, shift == good
McFist stevan: because I don't know how to do that properly
nothingmuch class C { } is all you need
QtPlatypus McFist: The default "new" does that for you
stevan ?eval class C {}; my $c = C.new();
nothingmuch class C {}; C.new;
evalbot_7006 \C.new();
stevan huh>????
nothingmuch can already here Damian saying "Every object is a closure" 14:11
stevan McFist: all objects now inherit from Object, and so are provided a default new() method
McFist yes, default 'new' does it, but what if I want my own 'new' ?
nothingmuch McFist: override BUILD
stevan yes, that is usually the best solution
class C { submethod BUILD { ... } }
BUILD will get all the arguments new() got 14:12
nothingmuch corrects himself - ammend to BUILD, don't override it
stevan and can be used to perform initializations
nothingmuch: actually you do override
because BUILDALL will call all BUILDs
for all descendents
nothingmuch and Class.BUILD calls nothing at all because they're submethods?
stevan but you usually override with a submethod, so your BUILD wont get inherited 14:13
Class.BUILD() will blow up
nothingmuch submethods should be method : uninherited
stevan at least I think it should
yeah, that
nothingmuch doesn't see why there's such a confusing name for something so scarce
McFist another thing I wanted to new(1), because the default new() does only "** Must only use named arguments to new() constructor"
stevan cause its perl ;)
McFist: that might be a restriction on pug's current OO state 14:14
we are working on that
nothingmuch maybe you can override new to call supernew with fudged params?
stevan yes
?eval class C { method new (@args) { $?SELF.SUPER::new(args => @args) }; C.new(1, 2, 3) 14:15
evalbot_7006 Error: unexpected end of input expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or "}"
stevan darn pugs
elmex does pugs knoow classses /? 14:16
dudley_ barely
stevan ?eval class C {}; my $c = C.new(); $c.ref 14:17
evalbot_7006 ::C
stevan ?eval class C {}; my $c = C.new(); $c
evalbot_7006 \C.new();
stevan ?eval class C { has $.b; }; my $c = C.new(b => 'hello world'); $c.b(); 14:18
evalbot_7006 \'hello world'
McFist aha, so s/bless/supernew/ works then... but there's a problem:
class C { method new (@args) { say @args.elems; $?SELF.SUPER::new(args => @args); } }; C.new(1, 2, 3);
says 1
do I expect that it should say 3 wrongly?
stevan ?eval class C { has @.args; method new (*@args) { say @args.elems; $?SELF.SUPER::new(args => @args); } }; my $c = C.new(1, 2, 3); $c.args(); 14:19
evalbot_7006 3 [1, 2, 3]
stevan McFist: the @args should be slurpy *@args
otherwise you need to do:
?eval class C { has @.args; method new (@args) { say @args.elems; $?SELF.SUPER::new(args => @args); } }; my $c = C.new([1, 2, 3]); $c.args();
evalbot_7006 1 [[1, 2, 3]]
stevan hmm, that doesnt look right either 14:20
McFist pugs seems not to know about *@args yet
stevan ?eval class C { has @.args; method new (@args) { say @args.elems; $?SELF.SUPER::new(args => @args); } }; my @_args = (1, 2, 3); my $c = C.new(@_args); $c.args();
evalbot_7006 3 [1, 2, 3]
stevan there we go
McFist: what version of Pugs are you using?
McFist stevan: 6.2.9
stevan ?eval $?PUGS_VERSION 14:21
evalbot_7006 \'Perl6 User\'s Golfing System, version 6.2.9, August 3, 2005 (r6945)'
stevan what revision?
McFist r7004
stevan hmm
paste your code where *@args is not working
McFist my bad, mixed *@ and @* 14:22
hmmm... so @args is not slurpy by default? shouldn't it be slurpy for "sub new(@args)" declarations? 14:27
nothingmuch no, never
if you do that @args is a readonly binding to the @CALLER::args
McFist is there TFM about that? 14:28
nothingmuch synopsis 6
dev.perl.org/perl6/doc/design/syn/S06.html
someone please make up a name for my dumb intermediate language?
DIL
hmm
McFist ah, no, of course there shoulb be explicit * for sub($a,%b,@c), i.e. where there's ambiguity... I can't understand why sub A($a,@b) and sub B($a,*@b) should behave differently 14:30
nothingmuch because A($a, $b, $c) won't work - it needs an array, like A($a, @b)/ 14:31
while B($a, $b, $c) will work, like '@b = ($b, $c)'
McFist no, I mean, I see that it doesn't work, but I can't understand the reason behind that 14:32
nothingmuch oh
sub splice (@array, $offset, $number, *@replacement) { ... } 14:33
sub compare (@array, @other_array) { }
McFist agreed, but there's ambiguity - 1st arg is an array
ingy hi nothingmuch
nothingmuch hi ingy
please hack Inline::CMinusMinus for me
and please apply the Test::Base patch
and thank you for reminding me that i've totally lost my marbles =)
#catalyst::abraxxa christened my language Blondie 14:34
McFist my point is that if there's sub a(@b), why making a(1,2,3) fail, seems 100% DWIM for me? 14:35
nothingmuch because a wants an array, not a list of elements to bind into an array
DWIM is only good if it isn't limiting 14:36
stevan nothingmuch: why Blondie? 14:42
in honor of your long golden locks (that Ingy loves so much) 14:45
nothingmuch returns 14:57
in honor of it being dumb
stevan nothingmuch: your not dumb :) 15:08
nothingmuch the IL is
Khisanth stevan: could be the cartoon character too 15:14
metaperl 'lo all... 15:34
stevan hey metaperl 15:35
fglock hi metaperl, stevan
metaperl wondering what module gives me this for Perl5: my @j = foldr1 { (shift(), $sep, shift()) } @link ;
stevan luqui: you keep forgeting the changelog for C::MM::Pure,.. <ren voice>I need to know what happened man!!!!</ren_voice>
hey fglock 15:36
metaperl List::MoreUtils::pairwise() will do it... Language::Functional has too strong an expectation of the return type of the folding function 15:38
nothingmuch wonders why adamk likes array refs so much 17:43
stevan wonders why nothingmuch likes adamk so much 17:48
Juerd Who's adamk?
stevan Adam "PPI" Kennedy
nothingmuch stevan: he's got some pretty decent modules 17:52
i was just using Class::Inspector->subclasses($my_class)
and for the 40th time i forgot to dereference
i guess it's more "efficient" 17:53
stevan why do you need to deref? 18:02
wolverian hmm. I want to write: given <> { when Int { say "I was given a string that looks like an integer" } } 18:05
make sense?
that is, I want to equate types and patterns. I guess. 18:07
the problem is that it doesn't make sense for every type.
it also doesn't make much sense given the current ~~ behaviour 18:08
what I want is rule Int { ... }, I guess, and perl to know if I mean class or rule Int. 18:09
(maybe this is what you get for reading Haskell for a few minutes without really understanding it)
I guess 'given <> { when Int.rule { ... } }' might be sensible as well. 18:11
nothingmuch hmm
that's a nice problem
wolverian right. I actually started thinking about this when using java.util.Scanner
nothingmuch given <> { when try { +$_ } { "a Num" } } 18:12
but that's a bit crude
i like haskell's read
wolverian which has methods to read from pipes, such as: .nextInt(), .nextDouble(), .hasNextInt(), which is horrible
I want to generalise that.
nothingmuch given read <> { when Int { } }; # that would be cooooool
read <> is MMD on the return type
wolverian exactly. but the problem is that Int is a type
nothingmuch it is not resolved until when ... hits
when there is enough data for the resolution (Int context test) it tries to apply the read that does Ints 18:13
wolverian hmm.
I don't like read() as a name.
given <> { when coerces Int { ... } } # another way to look at it 18:15
that's probably putting the weight into the wrong place. 18:16
theorbtwo The problem, I think, is that any string can be an integer... 18:17
...it's just that most of them are a 0.
wolverian right. I don't like that. 18:18
nothingmuch hmm
wolverian I even remember a decision by larry that that doesn't happen anymore
"foo" as Int => fail "Can't coerce"
or something.
nothingmuch that's good news
fail under use fatal is death
wolverian I'm not sure I remember right.
nothingmuch, right.
Juerd wolverian: Something can coerce to something lossily
nothingmuch under bool or smartmatch context is no
and under numeric context can be 0 18:19
everyone is happy =)
wolverian Juerd, yes. please elaborate, I'm not sure of the relevance :)
Juerd "0.5" as Int is 0
And then you probably don't want "0.5" ~~ (something) Int to be true
Where your (something) was "coerces"
wolverian right. 18:20
that would require a stricter type system.
Juerd Yes
nothingmuch coerce(:strict)
Juerd I think it would be good to have some difference between lossy and lessless coercion
nothingmuch Juerd++
Juerd And ways of testing ability of coercing in a specific way 18:21
nothingmuch is almost done refactoring Blondie, but is out of time
*poof*
wolverian I guess in this specific instance I'm only looking for a builtin wrapper to coercion that puts a try { } around the coercion and returns bool::false or the result of the coercion
(although nothingmuch's read() would be a nice abstraction of that.) 18:22
Juerd $bar.fits_in(Int) or fail; my Int $foo = $bar;
fits_in and can_be? :)
wolverian right. :)
something like that.
18:22 GeJ_ is now known as GeJ
wolverian or Int.can_house($foo) 18:22
Juerd This would make your when/~~ case simply: when .can_be(::type)
wolverian to look at it in reverse 18:23
right.
Juerd House suggests encapsulation, though
wolverian yes. bad name, my point was to reverse the arguments.
(not that I think that would be better. just thinking aloud)
Juerd I personally prefer instance methods in most cases
wolverian me too.
(especially now that I've had to code Java at the university) 18:24
Juerd UNIVERSAL::isa($foo, 'ARRAY') feels so overly wrong to me...
I understand why it's necessary
But my brain just wants such things to be real instance methods
And Array.is_this_one_of_yours_perhaps($foo) would be so much worse even than the manually written instance method call on UNIVERSAL 18:25
Besides, we need these things to be instancy, because an instance might be composed of several roles. 18:26
and/or classes.
wolverian what do you think about 'give read $foo { when Int { ... } }'? read() being just a name from Haskell.
s,give,given,
Juerd That does a .does check. 18:27
wolverian read() doing .can_be() when its return type is resolved
Juerd I don't know if that applies to coercion.
wolverian (that is, it doesn't evaluate until it knows its return type)
Juerd Int does Num, but Num doesn't quite do Int, I suppose.
wolverian hmm. does Code ~~ Type run the Code?
Juerd Num can coerce to Int, though. 18:28
I've ordered home-university stuff, just to find something to spend time on that has nothing to do with computers (because of the RSI) 18:29
wolverian that's good. what kind of stuff?
Juerd And the first course describes OO. It's SO annoying to read about classes (not even in code context, but in modelling context) and methods and KNOW there's much more than that.
wolverian heh. 18:30
Juerd I keep thinking: noooo!!!!!11111eleven, use roles there!
re what kind of stuff: technical computer science 18:32
It's just the introductory thingy, consisting of 2/21 of the entire thing.
What I'm reading now makes me wonder: if university is the highest level of education that we have in this system, what the hell is below it? 18:34
Aankhen`` goes to sleep.
Juerd I just hope it gets more challenging
Good night, Aankhen``
Aankhen`` G'night.
wolverian Juerd, my introductory courses are similar. however, looking at the second and third year courses things start to get really advanced there. 18:35
Juerd For example, per learning unit they indicate time you should spend on it. I tend to spend half of that, including revisiting it later.
wolverian Juerd, not to speak of postdoc, of course.. :)
Juerd I'm not doing this for a certificate or title
I'm actually literally killing time.
wolverian Juerd, right. our CS department has the principle that knowing programming is not a requirement for getting in.
Juerd, that is why the first courses are so idiotic, generally.
Juerd I see 18:36
This first course touches modelling and simple design. The next 2 chapters are about SQL. 12 hours into SQL, they first mention joins.
It would be better if they condensed the text and removed all the filling material 18:37
wolverian I think that is what lectures are for. maybe.
Juerd Then I'd spend much less time reading everything, hoping to learn something
No lectures in home education
wolverian right.
can't you attend the lectures? 18:38
Juerd There are none.
wolverian (they are open for everybody here.)
oh, well then.
Juerd Afaik, they're not open to non-students here
wolverian that sucks.
Juerd I ordered this from the "open university"
Which is home education with an occasional opportunity to ask questions
They claim it's the same level as real university, and you can get the same degrees from them 18:39
wolverian open university here is only in summers and you get in with money instead of skill.
Juerd But that's all kind of irrelevant. I could just as well have ordered Spanish lessons, but I hope to learn some more about my hobby.
Here, you need neither
wolverian for open university? 18:40
Juerd It's relatively cheap (though expensive compared to just buying books), but there are no requireemnts.
And people with no money can get discounts up to 80%. I would qualify for such a discount if my source of income wasn't entrepreneurship.
The only requirements they have is that you speak and write Dutch fluently, and that you are over 18 years old. (21 if you want a discount) 18:41
wolverian hmm. okay. 18:42
here university is free but you need to pass the exams. open university doesn't have exams but costs money. (anything from 50 to 800 euros per course.)
Juerd They project 7 years by default, and I recently heard that over 90% of their student never finishes 18:43
wolverian I'd like a 80% discount too for the open university. then I could actually study in the summers.
Juerd, wow. that's a lot.
Juerd I'm probably not finishing it either
So far, it hasn't managed to entertain me.
The only thing I learned so far is how to draw OO stuff in UML diagrams. 18:44
... yay.
afk 18:45
Going home
stevan obra: ping 18:49
19:02 kgftr|konobi is now known as kgftr|wedding
obra ayes? 19:04
stevan hey obra I have some questions for you re: RT 19:11
can I email you?
obra ok 19:14
19:15 typester is now known as sleepster
wolverian hmm. what does a manual accessor look like? has Int $.year = new Proxy: STORE => ...? 19:16
stevan wolverian: no, there will be an autogenerated method 19:29
wolverian stevan, so I override the method myself, right? I was hoping for a syntax that ties into the has declaratin
s,in$,ion,
(such as in C#: class Foo { public int Bar { set { ... } get { ... } } } 19:30
s,$,), # gah
has Int $.year { FETCH { } STORE { } } would work. 19:31
stevan wolverian: thats just sugar, something like that si surely possible 19:33
I like the C# style myself
but you have to ask on p6l about that
wolverian right. I will.
thanks. :)
stevan the problem with attaching the proxy to the has declaration
wolverian actually, I'm really short on time - I have to return this assignment tomorrow to university
stevan is that you are really declaring a meta-object there
wolverian want to post to p6l for me?
stevan I will check the docs to see if there is anything related 19:34
and post approriately
wolverian (what sucks is that the assignment is vague and I'm stumbling in the dark and it takes more time because of that)
stevan you writing about p6?
wolverian stevan++ thanks a lot!
stevan, no. I wish I was.
the assignment is to write about 300 words about this general CS classification article by Rosenbloom in IEEE Computer magazine 19:35
I have no idea what I am supposed to write about it.
stevan then write about p6 ;) 19:36
wolverian another thought: can I turn autocoercion on/off lexically? 19:50
yet another: does autothreading apply to return values? if I return a junction, does the rest of the program autothread? 20:01
20:23 Qiang_ is now known as Qiang
Juerd wolverian: I'd prefer not being able to turn of automatic coercion, as that is practically disabling context 20:44
wolverian: Instead, specifically indicate that you don't want a value unless <condition>.
.does(Int) or fail;
.isa(Int) or fail;
wolverian fail when not Int 20:45
Juerd Perhaps.
Coercion happens only because of context
A Num in Int context coerces to an Int 20:46
wolverian right.
Juerd Except for .as, which I think is weird.
It could just be that every type, when used as a function, provides context.
wolverian I don't think you can decide when a type is used as a function 20:47
Juerd Which would give us Int($foo), and automatically happily $foo.Int
wolverian (grammatically)
Juerd Used as a function with arguments.
wolverian Int $foo # type or a function call without parens?
Juerd In fact: it could **BE** a function, that when called without arguments returns its value -- like undef.
undef($foo) makes $foo undef, undef() returns undef. 20:48
wolverian that makes sense.
Juerd Int($foo) makes $foo Int, Int() returns ::Int
This could work.
wolverian p6l about it. it fits larry's classes-are-prototypes idea, I think
Juerd Maybe I will, in a few hours or otherwise tomorrow 20:49
wolverian maybe we can abolish .new()? ;)
(oh so python-y)
Juerd Abolish it? Why and how?
wolverian class Foo { } my $bar = Foo(args);
Juerd Oh my. I just realised that undef this way can *easily* be a type.
Which makes the special-case-of-undef case easy too: parametrized type. 20:50
There's probably some trap in here
wolverian tha went over my head. :)
Juerd I just hope I think of it before I p6l anything.
wolverian s,tha,that,
Juerd Well, remember how exceptions are interesting forms of undef?
nothingmuch that's a nice idea, Juerd
Juerd What if undef was in fact a type?
nothingmuch undef is what enum makes 20:51
but parametrizable
Juerd nothingmuch: I'd need to look up enum to say anything about this.
nothingmuch enum generates classes that behave like values
Juerd I don't know what enum in perl 6 context is. I know enum for constants, but I fail to see how that could be related to undef.
I see
nothingmuch so 'bool = enu <<:False(0) True>> 20:52
Bool not bool
wolverian oh, right. now I see.
Juerd I need a typing break
nothingmuch hmm
for symmetry we can have Undef ;-)
Juerd Sorry, I'll go watch a Scrubs episode or two first now.
nothingmuch: I'm almost thinking of proposing dumping item() and just using Scalar() for that. 20:53
Please stop me :) I'm mad.
Oh, right, Scalar() would change type, while item() would not.
Pfew.
afk
nothingmuch have fun
'sub merge'... hmm 20:54
do we have a submerge keyword?
it makes about as much sense as submethod
wolverian merge?
nothingmuch is just implementing a Map adt and typed 'sub merge' 20:55
wolverian I have no idea what that means. :)
nothingmuch neither do i
wolverian (I mean, Map adt) 20:56
nothingmuch oh
a map abstract data type is a hash
but it's abstract, so it has methods
and one of them is 'fmap'
which is why i'm not using a hash ;-)
wolverian right, that p6l post was yours, right? I didn't understand what 'fmap' is. 20:57
nothingmuch oh
that was luqui
wolverian oh. :)
nothingmuch a thing that does fmap is a called a functor
and basically it means that if you give this thing a function
(it's a container)
then it will apply the function to every element inside it
wolverian oh.
isn't that just like map? 20:58
nothingmuch and return the mapped elements in the same structure
yes it is
but map is taken for lists
wolverian fmap is for...?
nothingmuch theoretically map is 'map :: (a -> b) -> [a] -> [b]
map = fmap
wolverian okay.
nothingmuch i don't know why there is a diff
but map is just for lists, while fmap is for stuff
wolverian is it recursive? 20:59
nothingmuch (stuff => Functor)
it depends on the functor
a tree is recursively fmapped
but a tree of trees should not fmap the subtrees
wolverian hmm. okay.
nothingmuch unless you fmap (\x -> fmap function x ) tree_of_trees
since the tree is a tree of any type 21:00
wolverian a tree can be of arbitrary depth, though? (ie. not a flat list)
nothingmuch yes
wolverian so there fmap is different from map
nothingmuch i'm reducing nodes in an AST
and I need to convert them
and traverse them
since the nodes are either unary
or nary
or maps
wolverian I'd call it .walk instead of fmap
or something :)
nothingmuch ah
but it isn't that
wolverian oh? 21:01
nothingmuch it returns a different structure, that is the same shape
but a copy
wolverian oh.
nothingmuch walk doesn't have a return value, I think
in my head, anyway
wolverian yeah.
my $result = $foo.deep_copy.walk(&func);
nothingmuch yup 21:02
except that fmap is potentially lazy in a lazy langauge
wolverian isn't it potentially lazy in perl6 too (if it had it)? 21:03
rephrase: can it be implemented as such?
nothingmuch i guess
ofcourse
every problem in computer science can be solved by another level of inderection
(except the problem of too many levels of indirection)
wolverian rephrase again, then: would it make sense to do so in perl6?
nothingmuch just use subreferences =)
or lazy { } (larry implied we have it now) 21:04
wolverian oh, do we have lazy sub args?
sub foo ($bar is lazy) { ... }
nothingmuch multi sub fmap (&f, [$x, *@xs]) { lazy { [ $x, fmap &f @xs ] } }
i hope so 21:05
wolverian if so, how can I force evaluation of $bar?
nothingmuch i dunno
=)
wolverian sub foo ($bar is lazy --> $bar) { change the environment; return $bar; LEAVE { change the environment back } } 21:06
that is, change the environment for the duration of the evaluation of $bar, then change it back 21:07
ie. how to evaluate $bar without using it in a context that requires evaluation?
(I mean, without mutating it.)
(eval $bar? :)
QtPlatypus wolverian: Evaluate $bar in an eger context 21:08
wolverian oh. return eager $bar?
# :)
return $bar as Eager;? 21:09
21:20 rafl_ is now known as rafl
Juerd I p6l'ed it. 21:38
It's a little incoherent, heh. 21:41
wolverian Juerd, nice post. thanks! 21:49
Juerd I usually write my ideas directly in mail-form 21:51
After that I talk about it and think it over some times before sending the final version eventually 21:52
rafl ftp.us.debian.org/debian/pool/main/p/pugs/ :-)
Juerd Summarizing something that spontaneously came up on irc is a very different thing.
It's hard to find good structure for the message.
wolverian agreed. 21:53
spinclad rafl: 404 Not Found 21:57
Juerd rafl: Wow, neat!
rafl: How often is that updated? Only releases, or snapshots? 21:58
spinclad i guess it hasn't reached all mirrors yet... ok at ftp.debian.org (for me, this time)
rafl++ # yay! 21:59
rafl spinclad: It's on ftp.us and ftp.de, as far as I know.
Juerd: Releases, atm. But I also plan to upload snapshots to experimental.
haskell-src-exts also got in today, btw. 22:00
Juerd rafl: Any specific reason for not using snapshots as a pugs-svn package? 22:01
spinclad i look again and it's at ftp.us, it may be luck of the round robin yet
rafl Juerd: Yes, I don't like that. What don't you like about uploading to experimental? 22:03
spinclad the naming schemes are different, don't they have to be different packages? 22:04
(versioning schemes) 22:05
rafl What it different about what naming schemes?
spinclad: Yes, let's wait until the mirror update is complete.
spinclad 6.2.9 v. xxx.r7000 22:06
rafl Ah, it is (for ftp.de.debian.org :-)
spinclad: I'll use 6.2.9+svn7000 or something like that.
spinclad (or 6.2.9.r7000 maybe) 22:07
rafl spinclad: ${last stable revision}+r${svn revision}-${debian revision} I guess.
spinclad yes, that should order properly i guess
Juerd rafl: Only one lame reason :) Extra effort when installing :) 22:08
rafl Juerd: That doesn't justify a second package, of course. :-)
spinclad awk, bbl & 22:09
Juerd rafl: I know :) 22:12
rafl As well as the extra effort for me when building it. ;-)
luqui Juerd, your proposal is interesting. I have to say I like the concept of type names being context applicators better then the notion of them being interesting undefs... 22:22
Juerd Thanks
I forgot about that kind of interesting undef, by the way. The ones I referred to are exceptions. 22:23
luqui yeah
Juerd Oh, you replied to
*reads*
What's an identity map?
luqui sub identity ($x) { $x } 22:24
for various types on $x :-)
Juerd Doesn't really help me understand your reply though :)
luqui don't worry about that part
Juerd Okay
luqui I was basically saying that for a type Foo, you'd be defining a function sub Foo (Foo $x) { $x } 22:25
that is, does nothing but return its argument
Juerd Re ~ being Str(), yes, in my mind it currently is.
Yep, that's what it'd do :)
sub item ($foo) { $foo }
Same thing :)
luqui oh, speaking of which 22:26
?eval my $x = 4; undef($x); say $x
evalbot_7008 Error: cannot cast from VUndef to Pugs.AST.Internals.VCode (VCode) 22:27
luqui ?eval my $x = 4; undefine($x); say $x
evalbot_7008 bool::true
luqui good
wolverian that looks like a start of a very interesting thread
s,a start,the start,
Juerd If so, it'll be a widely fanned out one, touching much of the language. 22:29
luqui realizes he is using the word "notion" a lot today :-)
Juerd, touching the guts of much of the language
Juerd luqui: At least you didn't describe that as having a notion.
luqui but the outside shouldn't change much, we know we're pretty happy with that 22:30
but that's how most of the proposals these days are going
Juerd Yeah
I really do hope to get Type as functions providing context, though
It fits so much better with my image of how the rest of how context works
luqui well, don't get too attached to it :-) 22:31
Juerd I'm not.
I'm attached to <->, and that hurts enough already :)
luqui recalls the few proposals he's been attached to (eg. pure multimethods)
it's painful to argue them
(especially when Damian is the one against you :-) 22:32
Juerd I am attached to .foo meaning $_.foo unconditionally
Regardless of whatever, if any, shortcut for $?SELF.foo
wolverian I agree with that one.
luqui yeah, Larry is swinging that way too
Juerd People do seem to think I really want ./foo -- I like it, but I could live without.
luqui he just doesn't want to say so
because people whine
wolverian a default self() would be fine with me. (whatever its name, but not $?SELF because that is ugly.) 22:33
Juerd Nobody's with Larry on this point, so the current ruling can't be final if others have commit access :)
brb # in bed, with laptop... 22:34
wolverian what, you're going porn surfing? :) 22:35
luqui was going to say # off for a quickie
wolverian on an unrelated note, I've been using Eclipse to code some Java lately and I like how smart it is about the syntax. 22:36
refactoring, inserting ) and " and such automatically and sensibly. that would be nice for perl too.
anyway, that's an old subject, and I think I need something to eat now.
luqui was actually pondering an editor that would hook into the type inferencer 22:37
and red-underline type errors like Word does with spelling errors
especially for Haskell, but if Perl gets a static-type-inferenced dialect, it'd be nice for that too 22:38
wolverian right. sounds nice.
would be nicer if it could fix them for you. 22:39
luqui has trouble making his brain do that 22:40
wolverian (which goes into DWIM area and possible errors in it, of course.)
luqui doubts a computer could
wolverian right.
Eclipse does what you describe, but that's trivial for a type-annotated language.
buu Any language that requires a special editor to use properly, sucks. 22:41
luqui we're not saying you need the editor to use it properly
we're just saying that it helps :-)
like office assistant, but smarter than a curious three year old
wolverian I'd really like some standard metadata things specified as well 22:42
luqui eg?
wolverian method documentation that can be trivially extracted, etc
class interface + usage
luqui nonononononono
wolverian hm?
luqui this is my whole reason for knocking down javadoc-style documentation for perl 22:43
perl has a strong culture in documentation
kakos Don't listen to luqui. He is wrong in absolutely everything he does.
luqui and people just don't use modules that have no documentation
wolverian that is a good point.
luqui so if docs are generated automatically, the cultural pressure to write decent docs is gone
Juerd re 22:44
luqui <tab>
DWIM english autocomplete :-)
Juerd wolverian: Porn surfing? No.
wolverian I'd just like a method of attaching or referencing POD sections to classes and such
Juerd wolverian: But I do enjoy IRC in bed, before sleeping. I hate books, you see :) 22:45
wolverian Juerd, hm, why do you hate books?
Juerd It's psychological
I never finish books.
kakos You still have to write decent docs with javadoc-style documentation
luqui kakos, no, you still have to write *docs* with javadoc-style documentation
Juerd So I can't stand them. It feels like they keep information from me, while it is me who doesn't get it from them.
luqui that is, here is what each of my classes does, and here is what each of the methods does 22:46
wolverian Juerd, why don't you finish books?
luqui but perl culture demants a DESCRIPTION section that is almost tutorialesque and shows you how to *use* the library
Juerd Almost all books manage to bore me after a while.
wolverian luqui, right.
Juerd luqui: Oh, not really
wolverian luqui, I would like to make that standard to the bundle/package/whatever, or at least recommended, and then attach the specific documentations to the untis they describe 22:47
kakos It might be better if perl culture demanded a description section instead of demanting one.
Juerd luqui: I've seen the cultural demand more as: textual explanation followed by reference material
wolverian Juerd, I find books extremely interesting. :)
Juerd wolverian: So do I.
luqui Juerd, fair enough...
depends on the module of course
Juerd luqui: I can absolutely not stand CGI.pm-like documentation
wolverian s,untis,units,
luqui Juerd, but Parse::RecDescent?
Juerd Let me see. I haven't seen that in a while.
luqui: I don't like it in the main documentation, but I do like tutorials like that. 22:48
IMO, documentation should in general provide stuff for reference, and a quick overview of possibilities 22:49
luqui hmmm, I guess the thing I like about perl docs most is the SYNOPSIS section 22:51
Juerd Depends on how it's handled 22:52
Too often, the SYNOPSIS is a complete program of which only three lines are relevant
luqui depends on the module whether that's good or bad 22:53
Juerd This happens whenever an author doesn't see clearly that his module is actually modular and not part of a whole :)
One of my favourite examples of that is DBIx::XHTML_Table 22:54
Which isn't dependent on DBI at all
luqui huh 22:55
Juerd It does connect, prepare and execute
But there's really no reason why this is in this module
And you can in fact use it without DBI, or --this is what I do-- with DBI, but without telling it.
nothingmuch damnit
Juerd It just formats an array of arrays as an xhtml table... 22:56
luqui nothingmuch, DAMNIT
wolverian that looks like interface crud for the sake of performance optimisation.
nothingmuch es, damnit
Juerd What are the damnits about? 22:57
wolverian I take that back. there is absolutely no reason for this module to have anything to do with DBI. 22:58
nothingmuch something is inexplicitly not working
Juerd It's still a nice module
nothingmuch from that I can infer that I'm an idiot
and it's frustrating to figure that out
luqui theorem: something not working => nothingmuch is an idiot
proof?
Juerd hehehe 22:59
nothingmuch given condition a where status(a) == working
and a condition a' = f(a) where status(a') == broken 23:00
and a function g where g(a, a') = f
if nothingmuch cannot solve g then nothingmuch is an idiot
luqui lol
nothingmuch in short - i have no clue what I did to break it
but it broke!
luqui version control?
nothingmuch i have the original
this is very odd 23:01
Juerd diff it
nothingmuch i did
Juerd So, what's different?
nothingmuch it reduces recursive thunks into (my $x = Thunk( Val($x) )
pdcawley Is there a hackathon planned at EuroOSCON? 23:02
Juerd I have no idea 23:04
What is planned, or more: being planned, is an extra amsterdam.pm social meeting
Not as part of euroscon, but because lots of perl minded people from far away will be in this country. 23:05
luqui nothingmuch, when you say "my $x = Thunk(Val($x))", how abstract are you speaking?
nothingmuch it's recursive 23:06
luqui was just making sure you weren't generating code that said that
nothingmuch nope
that's dumper output 23:07
(i submitted a bug about it today ;-)
shit 23:08
it's the fucking pretty printer!
luqui there goes the sufficient condition in your proof 23:09
nothingmuch yes
if i don't pretty print the compiled tree there is no infinite loop 23:10
wolverian heh. I have a strange urge to say "lol" out loud.
luqui eeeeeewww.
(to both preceding statements)
wolverian hey, it's 2am. I'm allowed to say silly things.
luqui okay, it was more an "eeeeeewww" to nothingmuch and a "haha" to you 23:11
nothingmuch wolverian: where do you live?
wolverian nothingmuch, home.
nothingmuch beh
wolverian (I mean, my home.)
how do you mean?
nothingmuch your time zone is mine, and that normally does not compute
wolverian oh. Finland. 23:12
nothingmuch ah
luqui If you want something finnished, wolverian is your man
ahaaa, ahaaa, ahaaa
wolverian heh heh heh.
nothingmuch bwa 23:13
nothingmuch won't touch finland with a ten foot pole
mainly because poland is farther than 10 feet from finland
and there are no poles that tall anyway
bwa
i don't know any more like these, except the ones on Turkey 23:14
but i think we've had enough, right?
wolverian I only know jokes about Swedes and they're all reducible to "they're all homos"
nothingmuch has been doing lots of reductions
wolverian that's why I said it. :)
buu wolverian: Let's hear one! 23:15
wolverian I don't actually remember any. 23:20
I suck at jokes. :)
buu =[ 23:21
wolverian anyway, time to sleep. I have six hours until morning
cheers. 23:22
nothingmuch okay, it unboke 23:23
Juerd Good night 23:29
rafl is going to prepare an svn snapshot package for Debian now.. 23:52