pugscode.org <<Overview Journal Logs>> | r1773/winxp: 587/4256 smoke/win2k (occasional): xrl.us/fqum (25/4321 , r1980) | pugs.kwiki.org
Set by Corion on 14 April 2005.
mugwump ingy: speaking of YAML streaming, I'm thinking that a Parse::RecDescent-based YAML parser that sends events to a YAML representation graph that is also a Perldoc document would be a nice test case. What do you think? 00:25
jabbot pugs - 1983 - fix a couple typos 01:05
01:24 obra_ is now known as obra
metaperl someone enlighten me about temp $var 01:27
PerlJam metaperl: What about it? 01:31
metaperl what synopsis covers it?where can I learn about it?
PerlJam temp is the new local if you know what that is in perl5. 01:32
metaperl I see
PerlJam I think it's talked about in S04 01:33
But I don't know if it says anymore than I just did. 01:34
I just looked. S06 has a whole section on Temporization 01:39
metaperl S06 is the meat of Perl 6 for me so far...
I just did a presentation on slurpy list parms last night: www.metaperl.com/talks 01:40
www.metaperl.com/talks/p6-fp-slurpy/
PerlJam, in the Temporization section it talks about the TEMP method which allows you to configure the behavior of the temp call 01:55
jabbot pugs - 1984 - further illustrate problems with assigni 04:15
autrijus rehi lambdacamels 05:17
autrijus blames a dead screen and a living web irc log
err
autrijus blames a dead screen and praises a living web irc log
Ovid Hello autrijus. 05:18
ninereasons autrijus: hi. slow day, eh?
mugwump autrijus: any response yet from any(@cabal,$cabal->{lackeys}) about metamodel / class stuff? 05:20
theorbtwo Allo, autrijus. 05:21
autrijus mugwump: no, not yet, but I had not brought it up; give me some more days to work on PA02 first :) 05:22
mugwump mmm. I've been weighing up whether it's worth writing the MetaModel as a MetaModel in Haskell at all, compared with just writing the plain Class model in Haskell, to give enough functionality to write the P6FC 05:23
autrijus the MM-in-MM sounds like a good idea
theorbtwo What's the best place to start hacking on ::GTK2 from? Can I assume I can stick a haskell type in somewhere, and fetch it out again, and that I can have an AUTOMETH method implemented in haskell? 05:25
autrijus theorbtwo: yes, I think you can add a foreign type of "Obj" 05:27
or "Opaque"
to the Val structure
(forall a. Object a) => Obj a
where Object is a class
that defines the basic metamodel things
start with "invoke a method" 05:28
and fill in things as you need them
theorbtwo OK, cool.
autrijus theorbtwo: then your ::GTK2 wrapper can simply be shuffling those Objs around
theorbtwo: I'd be thrilled to help in a couple days
theorbtwo Not sure when I'm going to be able to start, though; my root filesystem seems to falling appart as I speak. 05:29
autrijus aw!
theorbtwo You've got a few $workdays first?
Ovid Night all. 05:30
theorbtwo G'night, ovid. 05:31
mugwump yay, going to see a grand Tai Chi master tomorrow
Alias_ I hope he Veeerrrryyy slloooowlllyy kicks your ass :) 05:32
mugwump he gives his seminars in Mandarin, maybe I'll get 5% comprehension this time around :)
It would be an honour to have my ass kicked by such a master 05:33
www.taichichuan.co.nz/taichi/Lineage.html # his lineage
Alias_ he comes with a breeding certificate?
wow
He's like a martial arts dude you can take to shows!
mugwump for sure, 100% pedigree
autrijus theorbtwo: yeah, I, like stevan, is terribly behind on $work 05:34
or rather, stevan is not terribly behind, he's just having to go back to p5 land 05:35
but I'm terribly behind :)
mugwump I'm trying to convince the Java guy here that we need to port our p5/java code base to p6
he hated p5 for good reasons that p6 fixes
ie, type safety ;) 05:36
Alias_ mugwump: Port all our code now, and in two years we can safely run it on production 05:37
I imagine it's hard to make the business case for that
mugwump dons his cowboy hat
hey, pugs is already in use in production environments. 05:38
Alias_ Not for anything important I hope
No offence to the lamdacamels
theorbtwo I wouldn't use pugs in production now, but I suspect it'll be at a point in a month where I would. 05:39
(I'd want objects first.)
autrijus mugwump: the "taichi elements" school: 0rz.net/2b0hv
mugwump: main (chinese only) site at www.taichi-dowing.org.tw/ 05:40
Alias_: I'm using pugs in production :) 05:41
however, Dan used parrot in production (quite successfully) too
and that's not really saying that you need to do that now :)
Alias_ Define "production" :)
autrijus Alias_: www.onlamp.com/pub/a/onlamp/2004/04...ction.html 05:42
my situation is similar. 05:43
my situation is basically porting legacy C + Perl5 application into Haskell + Perl6
mugwump heh, "legacy" 05:45
I love it
it's such a great slanderous term
autrijus "heritage"? "tradition"?
mugwump legacy doesn't have to imply awfulness, of course 05:46
autrijus "ancestral"?
theorbtwo Well, as used in the industry, it generally does.
It implies that in it's existing form it's a dead end.
mugwump it just depends on the timescales, I guess
autrijus then, "prehistoric"
(which is true! no comments, ma!) 05:47
theorbtwo Bah.
mugwump I was involved in a SunOS -> Solaris migration in 1998-1999
autrijus and no useful PODs either
mugwump The SunOS network had been installed around 1989
theorbtwo Needing comments is a sign that your code should have been more clear.
mugwump In that culture, "legacy" implied a sort of pride in a system that worked so well for so long
autrijus theorbtwo: I wonder if you can say that to ksh and XS code.
theorbtwo All XS code needs to be more clear. 05:48
autrijus but if "more clear" means "totally ported to something else" ;)
then I agree
theorbtwo Sometimes, it probably does.
Though I'm not sure that either C or P5 are such languages.
In fact, I'd tend to call Haskell less readable to the average programmer then either perl or C. 05:49
(If only because the average programmer already knows imperitive programming.)
Alias_ theorbtwo: That's totally wrong. Comments say what you are doing and why, the code says how
The two are different things
autrijus Alias_: in certain languages the two are the same thing :) 05:50
like, "make"
Alias_ You code in the "why" in make?
autrijus I thought that's the label names
Alias_ "This looks a bit funny, but we do it so the foobar down the list doesn't spit the dummy"
theorbtwo Correct.
You need comments when your code looks a bit funny.
Alias_ All code looks funny 05:51
Why do things in the order you specified
There's tons of things that comments give you that code does not
autrijus ahh. we're getting somewhere
I think PODs are great, btw
inline block of docs
that is not tied to specific lines 05:52
theorbtwo Sometimes, the funnyness of the code and the comment is worth it because the best you could do is to move the funniness somewhere else where it is worse.
Alias_ POD is mainly for interface documentation though, less often for internal documentation
autrijus yeah and that's your "why"
theorbtwo POD is used to define human semantics for a block of code.
autrijus but, lunch. & 05:53
Alias_ I look at most code and think "If I sit here and stare long enough I could work this out, but why isn't there a one line comments that summarises it
theorbtwo Eat well, autrijus.
Alias: That's what the sub name is for, in part.
Also, the comment at the top of the sub.
s/comment/doc block/ 05:54
Alias_ In order to read code only, you need as much skill as the person that wrote the code
theorbtwo I often comment next to variable (inc. & vars) declarations.
Alias_ With comments, you don't so much
theorbtwo shrugs. 05:55
I don't have a lot of experince writing code for others to read.
Alias_ Nothing I hate more than looking for bugs in a system, and it's 3000 lines of undocumented code
Where do you even start
theorbtwo When I have, on pugs, I've gotten one review that said it was very clear to read, and one that said it was horrible to read.
Alias_ Anyways... </rant> 05:56
theorbtwo (On different bits of code, of course.)
05:56 megalomania is now known as chady
chady q:f/good &localtime() everyone/ 05:57
hope I got that right ;) 05:58
theorbtwo G'morning, chady.
mugwump heh, babelfish really chokes on that taichi elements site 06:08
gaal hey there, folks.
mugwump "Since the Chen village has originated the Taijiquan, has been through repeatedly the fist careful study, originally will assault the security the Chinese boxing, will melt can to the Book of Changes and in Taoism's profound philosophy."
"But [ Taijiquan after ] also is one kind of basic criterion which indicates, really contains Italy to need to perform the card by way of the practice to examine, thus always practicing boxing are many, proves becomes aware, the annotation actually greatly has ōæ½xB2ōæ½xA7ōæ½xBDōæ½xEC." 06:10
mugwump gives up and tries a different foreign language instead - Haskell 06:12
wow, the number of commits in svn.perl.org/perl6 have been staggering recently 06:32
Alias_ someone moved all the modules? 06:33
06:37 castaway_ is now known as castaway
mugwump dude, where have you been? 06:37
see modules/README 06:38
Alias_ well... it's just that some of my modules were in there... 06:42
That's pretty much the only reason I have an account :)
mugwump ok, well it will be at tpe.freepan.org/repos/alias 06:43
Alias_ I'm looking at it now
Should be intersting to see what they do with Config::Tiny, since it relies on acting like both an object and a hash
method read_string(::?CLASS $class, Str $config) 06:44
Is that right?
Shouldn't that be method read_string(::?CLASS $class: Str $config) ??? 06:45
mugwump Probably :) 06:46
mugwump & # friday night
Alias_ oh dear... whoever did the port really screwed it up 06:47
The more I read of Perl 6 in the modules content, the more I'm thinking it looks _more_ complicated and _more_ ugly 06:50
I thought we were keeping much of the same elegance
castaway has a feeling theres lots of bits that most people will never actually need 06:52
(not that I've actually read much of the design docs)
Alias_ yeah, ditto
I'm just looking at the Perl 6 version of my code, and not liking what I see 06:53
But then I don't know how to separate what is Perl 6 from what is the porter's own particular style
castaway Config::Tiny is yours? 06:54
Alias_ yes
Config::Simple wasn't simple enough for me 06:55
Unfortunately, the whole "use an object like a hash" idea that allowed it to be done so elegantly is sort of lost in the Perl 6 version 06:56
Config::Tiny objects where just meant to be HoH structures that you could call methods on
Most of the time you just use them like a HoH, except for reading and writing
castaway funky
Alias_ In P6 it's an object with a cfg property that's a hash
castaway was planning to use it ,)
Alias_ So in P5.... $Config->{section}->{key} = 'value'; 06:57
castaway you can't have a hash thats also an object?
Alias_ in P6.... $Config.cfg<section><key> = 'value';
It doesn't appear so
castaway somehow I thought the compatability wasnt changing *that* much
Alias_ Due to Larry's whole "no more direct access to internals" decree
castaway bugger, whatever happened to 'no shotguns'?? 06:58
Alias_ hmmm?
castaway Perls policy.. "We assume you'll stay out of our living room (space), so we dont have shotguns to keep you away" (or something like that, its in the Camel, modules section 06:59
Alias_ right
Seems some of that has dissapeared
I really liked that about Perl
castaway hmm.. another Perl6--
Alias_ The assumption is people play nice, and it you want to _not_ trust them, you can do it but it has to be done in an around'a'bout way 07:00
castaway yes
Alias_ "It's in the docs that you use the methods... why would they touch the internals unless they really knew what they are doing, or were idiots"
castaway and now you'd have to do roundabout stuff to let them? 07:01
Alias_ Or it's impossible
castaway hmm,m wonder why that got changed
Alias_ I hope we still do things like attaching sekrit hash entries to other people's objects without having to subclass now
I find that sort of "hint" attaching very useful
castaway hm,m I've only done that once, and I wouldnt really call it good ,) 07:02
Alias_ Useful in specific scenarios
I also tend to do objects where you don't create a hash entry at all if there's no data for it
Under the assumption that you save some space, and everything works the same 07:03
castaway makes sense
Alias_ if ( property only 0.01% of a million objects have ) { ... } works just fine 07:04
nothingmuch gah 08:02
nothingmuch is having an argument with pedantic sysop about things that annoy me
Alias_ heh 08:03
nothingmuch the machines under his control are unuable 08:04
and every time someone is stuck, guess who has to get things done
"why can't i copy data"
"why can't i login?"
Alias_ "I'll do it for you..."
???
nothingmuch "why did they change the root password?"
it's more like "oh, he's done it again... you could try to blah blah blah blah"
or sometimes "sorry, i can't help you till he wakes up" 08:05
(11 hour time zone difference)
Alias_ ugh
Goog sysadmins like to help people
Bad systems like to stop the users fucking with "their" systems 08:06
nothingmuch exactly
Alias_ Really good systems like to help people, but manage to do so in ways that might take a little longer to setup, but can be managed automatically long term, and the users STILL can't fuck things up
:) 08:07
I've worked with exactly one good sysadmin in my life so far
It was a joy
nothingmuch we have a sysadmin with very good intentions
but he is swamped
nothingmuch used to be his subordinate
but then i got moved around
Alias_ Unfortunately, the DBA half of the admin team was an overly protective bastard
nothingmuch DBAs are supposed to be very evil 08:08
nothingmuch has never met one that actually administers
at our company they do technical support
Alias_ The time I had one, he wrote Perl scripts and was the darling of the manager 08:10
nothingmuch beh 08:17
i hate threats too
some other guy
not the sysop 08:18
told me he is 'going to change the root passwords soon'
in my minds ear i heard "so that you can't access anything anymore"
(data files owned by me, instead of what they were on the source, because I couldn't rsync as root)
actually, the problem he complained about was a side effect of not having the root password in the first place 08:19
phew 08:21
steam let out in lawyer speak
the reason I'm even more upset is that there is a pretence of security 08:22
we are using NIS and RSH, ffs
castaway sounds like an odd setup to me 08:23
nothingmuch it is
i gave them 10 valid example of day to day usage requiring the root password, or at least sudo (which I doubt anyone will maintain properly) 08:24
i think visudo should be setuid
castaway what so you need it for?
nothingmuch then I can live with not knowing the root password
automounts break, nfs mounts fall, processes go mad
swap gets dried up
(got to reboot, add more, or sometimes just kill someone elses process) 08:25
castaway but thats the sysadmins job, no?
nothingmuch he has no time for that
he is one person, with another part timer
castaway then they need a sysad that does
nothingmuch taking care of 40 servers or so
sure, but even then
provided there is one
castaway yes even then.. assuming you are a developer, you shouldnt need that kind of power IMO
nothingmuch when i'm doing the code coverage report that management so dearly wants, i can't call it at 1 AM 08:26
s/it/him/
castaway (maybe you're not and Im misunderstanding)
nothingmuch i used to be a sysop
and I'm not exactly a developer
i'm a developer, and a tester, and a fixer-upper
castaway why cant you? if the system is supposed to work for you at that hour :)
nothingmuch i'm responsible for maintaing the users' shell envs
and for cleaning tmp dirs
and managing lvms
and when someone's make on AIX hangs, i have to find out why 08:27
and i have to see that truss tells me it's looking back three dirs down, and then traversing
castaway ah well, then it makes more sense
nothingmuch and when it fstats an nfs mount that isn't there, the user is screwed
if infrastructure problems were resolved, and arguably (i disagree), they can't 08:28
then I wouldn't need to have the root password
otoh, if i don't have it, and the problems don't go away
i estimate that I will spend about 30 minutes on the phone to the sysop each day 08:29
when I need something done that's holding back 5
and 2 hours waiting for him to fix something
and get the root password anyway, when he is trying to save a dying raid that is holding back 30 people
and at the bottom line, if i have to break into the boxes, which I can, i will
because the boxes are there so I can get work done
not so that they are 'secure' or whatever
castaway sounds like they need to hire at leaset 2 more people for the sysad team.. 08:39
kungfuftr moo 08:45
jabbot pugs - 1985 - utf-8 URL encoding support with some tes 09:15
Schwern How does one change directories in perl 6? 09:18
castaway it's not "chdir" ? 09:20
Schwern Hope not
kungfuftr i don't think it's specced anywhere, so i'd assume it'd be perl5 behavior of 'chdir' 09:22
will check pleac though
rgs syscalls suck
castaway hmm, S29 is nowhere near complete yet 09:23
Schwern Read the File::chdir docs.
It lays out my beef with chdir() pretty well.
castaway having the same name doesnt mean the same underlying func.. (IMO anyway) 09:25
gaal Schwern, it's simple really
inline java
use jnios
Schwern of course! 09:26
gaal then call chdir from that.
castaway ,)
kungfuftr can't you localize subroutine calls in perl6?
Schwern My proposal is that the CWD is a scalar.
kungfuftr: Maybe. But why?
rgs $*CWD then
castaway localising certainly sounds like an argument.. having it as a variable rather than a call is odd thuogh
kungfuftr local cwd('/yar/foo'); 09:27
Schwern castaway: Its scalar data.
autrijus hmm, theorbtwo is not around.
rgs op1 "chdir" = boolIO setCurrentDirectory
castaway he's fighting with a dead filesystem, autrijus
autrijus I'm currently pondering working on Inline::GHC.
I think it's a 10-minutes job.
Schwern castaway: Localizing a function call isn't odd? :)
gaal what does it mean to localze a *call*?
castaway looks to see if he's listening
Schwern In fact... how will a function call know what to localize?
What does it mean to localize a system call? 09:28
castaway Schwern, no, it could just be magic.
Schwern castaway: Right. Tailor made for chdir.
autrijus I think $*CWD makes sense.
Schwern: wants to patch?
I can walk you through
it'll be about 15min of your time
Schwern castaway: Which is a big, bright flashing neon sign saying "IMPEDENCE MISMATCH"
rgs or, I can try
Schwern autrijus: Umm... sure what the hell
castaway That is, a call inside a block will automagically revert after wards.. (unless it gets some "stay global" param) 09:29
autrijus rgs: welcome to hop along :)
Schwern castaway: How does a function call revert?
autrijus ok. the first thing is to create a new type of Scalar
Schwern castaway: For example: local print "foo"
castaway Scwhern I dont know, Im a user not an internals person :)
autrijus that redefines "fetch" and "store" calls.
Schwern castaway: Forget internals.
autrijus: Umm... how do I make a new type?
gaal you can revert the *effects* of a call. it the function has no side effects, isn't that merely temp $result = func()?
autrijus let me know when you have AST.hs open in your editor 09:30
line 1124.
Schwern gaal: Yes, a local variable.
autrijus (src/AST.hs)
grep for the line "phantom types! fun!"
Schwern gaal: but chdir has side effects.
castaway "chdir" is just a word.
gaal which is why the concept of localizing a function call makes no sense to me :)
Schwern autrijus: Got it.
autrijus (the term "phantom types" refers to a type that has no constructor)
Schwern gaal: Right. 09:31
autrijus Schwern: ok. so you copy that line, and change IHashEnv to IScalarCWD
Schwern castaway: So's "perl", what's your point?
kungfuftr chdir('/foo/bar','/hehe/hoho'); # be in the same two directories at the same time?
autrijus or IScalarCwd
kungfuftr hides
autrijus I think Cwd makes more sense
Schwern autrijus: Copy it where?
autrijus to the next line
I stands for Implementation, aka Tied
castaway That you seem to think it implies that it does whatever the system chdir does (if not, then I'm lost)
autrijus Scalar is its base role
Cwd is its specialization
makes sense?
Schwern castaway: Umm... what else would it do?
autrijus after you're done with that, go to line 973 09:32
castaway whatever it likes ,)
Schwern autrijus: Sure.
autrijus actually, 1089
instance Scalar.Class IScalarLazy where
Schwern castaway: Ok, bozo bit flipped. Goodbye.
autrijus copy that block
rename IScalarLazy to IScalarCwd
Schwern autrijus: Copied
autrijus change iType to something sensible
and implement "fetch" and "store"
they need to have the types 09:33
fetch :: a -> Eval VScalar
store :: a -> VScalar -> Eval ()
theorb Ah, here it goes.
castaway autrijus: theorbtwo is awake and attempting to connecvt to freenode ,)
theorb heard you were looking for me.
castaway ah :)
autrijus hey theorb. got time to work on Inline::GHC together today?
theorb I've got some major FS corruption, so I'm out of it for a bit, I'm afraid.
autrijus oh ok.
I'll complete it myself
castaway You can use d-i if you like (there being pugs+haskell on it, I mean)
Schwern autrijus: Ok. 09:34
autrijus Schwern: a VScalar is just a Val
Schwern autrijus: No idea what those fetch/stores do
autrijus let's do store first
theorb Way too slow to be usable, I'm afraid.
autrijus it needs to be of type: a -> VScalar -> Eval ()
which in perl terms, means that
method store ($new_value) returns Void { }
since we don't care about the invocant 09:35
we put _ as the invocant
castaway hmm, reboot cutie?
autrijus so our declaration will look like
Schwern Oh yeah, that was the problem with $CWD. No error indicator
autrijus store _ val = ...
now, if the store was an error
do you want to raise exception?
Schwern chdir $dir or die "Can't chdir to $dir: $!" has no equivalent
autrijus sure does 09:36
$CWD = $dir err die "..."
Schwern How can the result of that expression be false?
autrijus err is undef.
not false
err is //
ok. so to complete the store port 09:37
Schwern Ahh, it does work in File::chdir. Ok.
autrijus copy line 982ish
storeVal _ key val = do
str <- fromVal val
liftIO $ setEnv key str True
Schwern Why am I copying this? I have no idea what it means.
autrijus so our store looks like
oh ok, let me explain it line by line
storeVal is a Hash method
it has signature 09:38
storeVal :: a -> Index -> Val -> Eval ()
which means it takes the Hash object, an index, a value, and evaluates something
so the 1st line
storeVal _ key val = do
kungfuftr needs to poke work colleague to hand over haskell book
autrijus means we ignore the hash object, and name the index/value as key and val
second line
str <- fromVal val
means we cast the val into a string 09:39
(fromVal can cast it to anything)
(here the type is derived automagically by Haskell)
now we have a string, and we call it str
finally, do perform an IO action. we can perform such actions in the Eval monad by calling "liftIO"
liftIO $ setEnv key str True
so it means we call "setEnv key str True" 09:40
Schwern Gotcha
autrijus where setEnv is a haskell builtin.
Schwern So key goes away.
autrijus key is a string, basically
so setEnv takes a key as env key and str as new env val
Schwern I'm already thinking about adapting it for a scalar.
autrijus the True means we want to override existing env.
Schwern scalar store.
autrijus yeah
store _ val = do
then do the same str cast 09:41
your syscall is setCurrentDirectory
liftIO $ setCurrentDirectory str
is a good first approximation.
i.e. it works
Schwern Ok. What about returning undef on failure?
autrijus (we will add error handling later)
Schwern ok
autrijus now, let's do fetch
incidentally, there's a Haskell builtin 09:42
getCurrentDirectory
imported also from Internals.hs
so... fetch is left as exercise for the reader
you can consult HashEnv's fetchVal for now.
let me know when you're done with this part. 09:43
after that, just change one line in Run.hs -- copy line 104 into line 105
Schwern Do I leave "store :: a -> VScalar -> Eval ()" in?
autrijus and how to change line 105 will be obvious.
no, you don't need to declare the signature.
it's already given out in Types/Scalar.hs 09:44
it's all inferred :)
whilst perl 5 has "contexts" based on the return type, haskell can infer different behaviours over all parameter types, in addition to return type
(but it's in perl6 and known as MMD -- but MMD isn't required to do return types -- which is sad) 09:45
so, once you're done with the two places, type "make ghci"
and see if your code typechecks.
if it does, then it's Proven As Correct. ;)
Schwern fetch _ = do
liftIO $ return getCurrentDirectory 09:46
?
autrijus no
str <- liftIO $ getCurrentDirectory
the reason for this is that getCurrentDirectory itself is an action
not a value
so the "return" is unneccessary (and in fact wrong)
"return" turns a value into an action
but getCurrentDirectory is already an action.
Schwern What's an action? 09:47
autrijus an action is something that has side effects.
and can be composed sequentially with other actions.
"Int" is a value
Schwern How does the function know what to return?
autrijus "Eval Int" is an action that, when run, yields a Int
you'll need to tell it. so another line is needed:
return $ VStr str
which is equiv to 09:48
return (VStr str)
the reason why we can't just write
return str
is that str is of type String, not of type Val
and fetch has the signature
fetch :: a -> Eval VScalar
Schwern Gotcha
autrijus so we need to promote it by adding a constructor
it's all part of this data type lego thing.
kungfuftr autrijus: would it not be better to have all these special variables in a special varibales object instead? 09:49
autrijus so, with that, you've added a new Tieable class.
09:49 theorb_ is now known as theorbtwo
autrijus kungfuftr: you mean dropping $*OUT and @*ARGS 09:49
and name them $SPECIAL.args ?
somehow I don't think that's the way to go.
gaal syntax question: would running the action and returning the cast value work on one line? eg return @ VStr str <- liftIO etc. etc.
autrijus gaal: sure. you write: 09:50
gaal something like a perl pipe
kungfuftr autrijus: nah, more like $?OS, etc.
autrijus return . VStr =<< liftIO getCurrentDirectory
theorbtwo OK, I'm taking a break from cleaning up my busted FS.
autrijus which is shorthand for
gaal yay, the =<< is like perl <== :)
autrijus liftIO getCurrentDircetory =>> \x -> return ( VStr ( x ) )
err
liftIO getCurrentDircetory >>= \x -> return ( VStr ( x ) )
Schwern , SymVar SGlobal "$*CWD" $ scalarRef (undefined :: IScalarCwd) ? 09:51
autrijus yeah, =<< and >>=
Schwern: totally correct.
now "make ghci" and see if "say $*CWD" works.
err
eval "say $*CWD"
you'll need to type that at the ghci prompt.
theorbtwo ./pugs -e 'say $*CWD' is probably easier...
gaal monads become suddenly so clear when you call them actions. :-p
autrijus gaal: right :)
kungfuftr autrijus: $*SPECIAL.os, etc.
autrijus except they are only proper "actions" when they are upon the IO monad 09:52
but hey, IO monad is The Chosen Monad, so it makes sense to explain that first
theorbtwo autrijus: Other then IO and Eval, are there any monads we need to think about (as monads)?
autrijus theorbtwo: well, it'll be easier to debug in ghci 09:53
theorbtwo: well... Bind.hs uses the Either monad
and Eval.hs uses the Maybe monad
theorbtwo Monadicly?
autrijus both are ways to say that "this computation may cause exception"
monadically.
theorbtwo Oh, OK.
gaal i keep confusing . and $ . is there something that can help me agaisnt that? 09:54
autrijus sure
a $ b c -- a (b c)
gaal yes
autrijus (a $ b) c -- (a b) c
(a . b) c -- a (b c)
the "." reads "function composition"
the "$" reads "apply" 09:55
a handy rule is that
Schwern , SymVar SGlobal "$*CWD" $ scalarRef (undefined :: IScalarCwd)
err.
autrijus a $ b $ c $ d
can always be written as
a . b . c $ d
Schwern $ ./pugs -e 'say $*CWD'
/Users/schwern/devel/pugs
autrijus woot.
Schwern Ok, that was too easy
autrijus now, write some test.
t/unspecced/cwd.t
clkao how are you autrijus
autrijus clkao: why, I'm fine
Schwern 0 ~/devel/pugs$ ./pugs -e '$*CWD = "lib"; system("ls")' 09:56
Perl6
autrijus woot.
clkao i feel distanced to the world. hopefully i'm finally settling down soonish
autrijus Schwern: the test needs not be fancy; just cwd to '..', and compare it to the old cwd, make sure it's different, and test identity
theorbtwo You should probably also test temporilization. 09:57
autrijus (except we don't have temp yet)
but it will Magically Work when we have.
theorbtwo Make it todo_eval, then.
castaway (so implement that first ,)
gaal autrijus, he will want to check the system call did get called, no? :)
autrijus I'm fine with todo_eval
but hey, some basic code first, then commit 09:58
I want to see the code :)
we can always add other stuff later
and Schwern is, I believe, a committer already.
theorbtwo He's in AUTHORS, at least.
autrijus Schwern: that was indeed easy :)
gaal todo_is($*CWD = "/i/do/not/exist", undef, "error checking");
autrijus compare it to adding a new SvMG in Perl 5. 09:59
;)
and the good thing is, when the IMC subsystem lands, it will just magically become part of the PerlScalarCwd IMC.
no code wasted.
rgs you don't add things in perl 5. it breaks compatibility :)
autrijus and it will be /compiled/ into getCurrentDirectory.
rgs: lol
err, I mean the PerlScalarCwd PMC. 10:00
although I'm not sure I want to keep the PMC name. I think I'll just call it Obj.
we'll see.
theorbtwo: hey, so if you have a few secs, how about adding a eval_haskell primitive? :) 10:01
theorbtwo: I imagine it will simpify some development efforts toward adding new embedded haskell code, eg Gtk
theorbtwo wonders if he can get hs-plugin's Eval and pugs' Eval to Play Nice Together. 10:02
autrijus sure!
theorbtwo: I think it's a simple matter of importing Eval.Haskell into pugs's external.haskell
eval :: (AltData.Typeable.Typeable a) =>
String -> [Import] -> IO (Maybe a)
is the Eval.Haskell type 10:03
all our values are already typeable
and we can start with Str
and refactor later
so
sub eval_haskell (Str $code, *@imports) returns Str {} 10:04
since Import is just String
so just liftIO it
and analyze the Maybe Str
return undef on Nothing
and return VStr a on Just a
that's all!
theorbtwo Wow.
You got through implementing it before this machine finished building hs-plugins. 10:05
autrijus don't forget to add a stub eval in External.Haskell
castaway grins
autrijus oh, no, I'm just outlining the strategy :)
autrijus has wrote ~0 lines of code
I was hoping that you will maybe give it a stab :D
theorbtwo I will.
autrijus while I restudy my Inline::MzScheme and think about merging it with hsplugins 10:06
dons++ # hs-plugins is a Damn Slick package
theorbtwo Riffling through the dusty remains of my former filesystem was getting rather boring.
autrijus type-safe eval "" for compiled language is so nice.
gaal autrijus, on my machine, p5., ~0 is a lot.
kungfuftr autrijus did i make any sense at all?
bah
autrijus in p6, ~0 is just "0"
kungfuftr: no, actually not. :p 10:07
kungfuftr: $*SPECIAL means something at runtime
Schwern kungfuftr: What you said about being in two directories at the same time isn't so far fetched.
autrijus $?SPECIAL means compile time
Schwern kungfuftr: Windows actually tracks your cwd per volume.
autrijus now, if you are arguing against twigils
I can maybe see a point
but I think @larry is firmly set on twigils
kungfuftr sorry, $?<stuff>
autrijus and 10:08
$?<OS>
isn't neccessary better than $?OS
osfameron twigils?
autrijus osfameron: secondary sigils
theorbtwo Secondary sigils.
osfameron aha, nice word
autrijus as long as @larry doesn't go into trigils...
kungfuftr autrijus: $?OS -> $?GLOBALTHINGY.os(), etc.
autrijus kungfuftr: and the gain will be? 10:09
kungfuftr autrijus: overridable, abstraction and subclassing
autrijus you can override $?OS easily as well. 10:10
I'm not sure you want to pass $GLOBALTHINGY around, so abstraction is mootish
although I do agree subclassing the world is fun
but anyway. the thing about $?OS and %*ENV is rooted in perl's tieable (aka dbmopen) tradition
I tend to think it's a valuable tradition to keep.
gaal Install linux today! temp $?OS = "debian". 10:11
autrijus but I wouldn't mind if it's also available in a thoroughly OO way.
gaal: right, that will go ahead and reformat your disk.
Schwern Can I do a readdir from pugs?
castaway laughs
kungfuftr autrijus: ditto
autrijus Schwern: list context readdir?
gaal no, if we do it right it *won't* reformat, because it's temp.
theorbtwo It'll burn knoppix to a CD and reboot?
castaway backs up current OS, reformats, instlls.. restores afterwards? :)
gaal but that should happen automagically soon anyway :)
castaway or installs vmware for you 10:12
Schwern autrijus: I want to list the files in the current directory.
autrijus ok...
let me take a stab
theorbtwo Er, this should go into Embed.Haskell, right?
autrijus theorbtwo: right
Schwern I can't figure out another way to test $*CWD
autrijus that's fine. implemented 10:13
checking in
theorbtwo Then CI away.
gaal you want Directory.getDirectoryContents...
autrijus gaal: right, and I've done it :)
gaal :)
autrijus++; # if my computer gets too slow, i'll consider upgrading 10:14
autrijus Schwern: so you have @files = readdir($dir) now.
r1986.
Schwern Thanks
autrijus np :)
we'll worry about dirhandles later. 10:15
one thing I like about p6 is that str now autovivifies at handles for most methods.
=$fh vs =<FILE>
etc
jabbot pugs - 1986 - * readdir() in list context.
autrijus for readdir</tmp> -> $file { ... } 10:16
soo easy.
theorbtwo likey.
Juerd autrijus: Except <> isn't special there (no implied ()), so I think space between readdir and </tmp> would be good. In fact, readdir '/tmp' is probably better. 10:19
10:19 chady is now known as chady_
autrijus Juerd: sadly, I'm firmly of the golfing camp. 10:19
(on this matter)
Juerd ee also [email@hidden.address]
s/^/s/
autrijus I think =<README> makes sense. 10:20
theorbtwo I'd tend to agree with Juerd.
autrijus and =('README') reads weird.
Juerd autrijus: It gets misleading with for readdir</tmp>, readdir<~/tmp> -> $file { ... }
autrijus also slurp<README> vs slurp('README')
theorbtwo still doesn't like the prefix = operator.
autrijus Juerd: why is it misleading?
Juerd 'cause that's for readdir('/tmp', readdir('~/tmp')) -> $file { ... }
Hence my suggestion to write readdir </tmp> instead. 10:21
autrijus except it isn't.
readdir is unary
Juerd Ehm.
autrijus and it only globs <>.
so that means what it means.
Juerd Oh god.
It being unary makes sense, yes, and fixes this.
autrijus I've tried it already :D
Juerd The oh god is about globbing on <>. That's special syntax, which I hate.
autrijus oh, <> no longer globs 10:22
not in the p5 sense
Juerd "and it only globs <>"
autrijus I mean it in the "eats up" sense
theorbtwo s/it only globs/it only grabs/
autrijus yup
Juerd Oh, okay.
theorbtwo Blasted overloaded terms.
autrijus so I think for unaries like slurp and readdir
Juerd Thought readdir<*/foo>'d glob. Pfew. Good thing it doesn't.
autrijus the use of <> is perfectly logical.
Juerd autrijus: Perhaps.
Schwern What's the equivalent to $0?
Juerd I see no special reason for using <> to ''.
theorbtwo $*PROG, I think.
autrijus $*PROGRAM_NAME 10:23
Schwern: consult perlvar.
Juerd Hm - $*PERL5<0>? :)
theorbtwo (In case of disagreement, /always/ prefer autrijus.)
autrijus (i.e. English.pm is now default)
gaal eval_perl5('$0'), Juerd.. :) 10:24
autrijus riiight :)
eval_haskell("getProgramName")
theorbtwo: oh btw, when you're doing eval_haskell, assume the type as IO String 10:25
gaal eval_c("/* go way up the stack */ argv[0]');
autrijus I think that's the sensible first step
so
eval_haskell('"Hello"')
would not work
eval_haskell('return "Hello"')
would.
again, we can always fix later
ok, I think that's it for now. 10:26
I need to return to $w0rk for a while :)
Juerd gaal: '$0'.eval :lang<perl5>
;)
gaal indeed 10:27
autrijus imagines Schwern is coming up with some quite extensive tests. 10:31
being Schwern, that's not too surprising :)
Schwern Sorry to dissapoint, I'm struggling with the basics here
$*CWD ~= "foo" doesn't work 10:32
autrijus breaks how?
commit first so I can see?
Juerd Hm
Schwern Also I'm remembering now that $CWD isn't usefulw ithout @CWD
Juerd Does $*CWD = "foo" chdir?
autrijus Juerd: yeah
Juerd NEat.
autrijus Schwern: @*CWD is easy too. 10:33
Juerd tr E => 'e'
autrijus just implement it as IArray
Schwern Yeah, except chdir'ing into a subdir doesn't work out to well with $*CWD
Juerd Schwern: pop @*CWD?
autrijus because you need to prefix it with "/" ?
Schwern push @*CWD, "foo"
autrijus: Right.
Juerd oh, into.
Schwern pop @*CWD == chdir('..') 10:34
autrijus well then. just prefix it with / :)
Juerd Schwern: Yeah, misinterpreted the "into" part
autrijus I think you can do @*CWD already. see Types/Array.hs for the signature
Schwern autrijus: Ugg, second guessing the user's intentions.
Juerd Schwern: $*CWD ~= '/subdir' then ;)
autrijus Schwern: I mean in the test.
gaal does that include the volume on windows?
Schwern Juerd: Blows portability
Juerd Schwern: Watch me care! ;)
autrijus except currently it's okay in pugs.
Schwern gaal: $CWD does. @CWD as implemented in File::chdir does not.
autrijus all platforms that can run pugs honours / 10:35
Schwern gaal: Thus... %CWD. :)
autrijus %CWD is _also_ easy :)
Juerd The path separator thing has never bothered me re portability.
autrijus so
push :: a -> [Val] -> Eval ()
pop :: a -> Eval Val
Juerd The alternative is File::Spec, and that slows down programming by way too much.
autrijus fetch :: a -> Eval VArray
store :: a -> VArray -> Eval ()
gaal would like to ask the person who invented separate volumes a few questions one day.
autrijus here VArray is just [Val]
Schwern I have no idea what my OF password is.
Juerd Besides that, / just works on all systems I use Perl on (unixish and win32)
Schwern Juerd: No, it doesn't.
autrijus just implement the four
and you'll have a working @*CWD 10:36
theorbtwo autrijus, push returns +@array.
Juerd Schwern: Haven't had complaints so far :)
Schwern Juerd: And it doesn't matter but its too late to go into this.
autrijus (all the rest methods are generated for you)
theorbtwo: it's a language level thing.
theorbtwo: consult perltie
theorbtwo (At least it does in p5.)
Schwern Juerd: Look at File::chdir.
Juerd It's 12:37 pm
theorbtwo Oh, OK.
autrijus (i.e. not class level)
Schwern: I'm fixing your passwd.
Juerd Schwern: Is there any reason for Perl 6 not to simulate the sane environment?
Schwern Juerd: Too late to think about this. 10:37
Juerd I think that if chdir isn't going to be portable, perhaps it should be syschdir instead...
Schwern: Never too late.
theorbtwo It means that on platforms where filenames can contain '/', they will be inaccessable for pugs, depending on exactly what "sane environment" you were talking about.
Schwern Juerd: 3:35am is too late.
Juerd Schwern: But it's not 3:35am here, so I'm still free to think about it ;)
Schwern Well, you're getting it wrong. 10:38
autrijus Juerd: you can't pretend volumes doesn't exist. you can of course fake it with /C /D
but then you'll run into problems like \\server_path
Juerd autrijus: Right. As the file:// "protocol" does too.
autrijus Juerd: ah, URIs!
now we're getting somewhere. I'm all for
Juerd Just skip all the filesystem level stuff and jump right into URIs.
autrijus type FilePath = URI
yup. sure. why not?
Schwern Please god no
Juerd file:///C|/Documents and Settings/Juerd works, and I don't see why it should need changing... 10:39
(Microsoft writes that as file://C:/Docu..., but we all know to ignore that ;))
Schwern tosses VMS filepaths into the stew.
Juerd This fixes the \\server\share\path too: smb://server/share/path
Schwern What happens to C:\foo\bar/baz\bif.txt? 10:40
Juerd Schwern: Invent an URI scheme for them and they magically work... :)
Schwern No bloody uris
Juerd Schwern: Gets converted dwimmably, warning about portability.
autrijus Schwern: bar/baz isn't a valid filename.
q[acme] but they're U!
Schwern Juerd: Unacceptable.
Juerd Or that's what I imagine it'd do.
Schwern: no warnings :portable;
autrijus Juerd: IO::All does that, actually.
Schwern Juerd: You have to be able to access any possible file.
autrijus mildly popular too
Juerd Schwern: There can be no bar/baz in Win32. 10:41
autrijus as does gnome vfs.
or any vfs for that matter.
Juerd Schwern: And in URIs you can use %xx to escape ANY character...
Schwern Juerd: I'm not limiting myself to just Win32.
Juerd That's why URIs work
Schwern No bloody uris
autrijus personally I think it makes a lot of sense :) just let the user be happily unaware of it.
Schwern Christ. If there's one thing Subversion got wrong its using uris.
Juerd You said that before. Why no uris?
Schwern They're needlessly verbose.
autrijus right. that's what languages are for. 10:42
Juerd Schwern: Hm, funny - I consider that one of the things where it went exactly the right direction
autrijus spelling out URIs is a sin.
gaal if we have uir *objects*, we can make CWD store them, and dish out (or accept) reasonable string versions.
autrijus typing URIs by hand violates the Architecture Of The World Wide Web.
Juerd autrijus: But working on them with chdir and the like is great.
gaal *uri objects
Schwern Also what happens to C:\C\foo?
autrijus Schwern: nothing really. you can happily use it as always :) 10:43
Juerd Schwern: A guess is made based on $*OS, and a warning is emitted because you used : and \.
Schwern autrijus: How? /C/C/foo?
Juerd (If those warnings are enabled, which I think they should)
Schwern What would /C/foo mean then?
autrijus /C/foo on win32 means the "%VOLUME%:\C\foo" 10:44
Schwern What happens to Windows users who want to throw native filepaths at $CWD?
Juerd autrijus: C:\C\foo would get translated to file://C|/C/foo on Win32, to file://$*CWD/C:/C/foo on unices.
I think...
autrijus Juerd: that's my imagination too. basically, preserve the p5 semantics.
Juerd Yea.
autrijus at no point should we lose the useful illusion.
Schwern Ok, I'm just getting grouchy and stupid. Sleep for me. 10:45
Juerd autrijus: But with the ability to inspect the URIs so you can actually debug portability problems, *unlike* Per 5 :)
Perl even
Schwern: Good night, sleep well.
autrijus: Good mantra
autrijus schwern++ # committed _before_ sleep
Juerd pugscode.org <<Overview Journal Logs>> | r1773/winxp: 587/4256 smoke/win2k (occasional): xrl.us/fqum (25/4321 , r1980) | pugs.kwiki.org | <autrijus> at no point should we lose the useful illusion. 10:45
jabbot pugs - 1987 - First stab at $*CWD 10:45
Jonathan_ Hi...sorry for being away so long, had to work in Spain for two weeks and was way away from my box that did my Win32 pugs builds. :( 10:48
I just updated my MakeMaker to the latest, but still have problems building. 10:49
autrijus what's the error? 10:50
Jonathan_ Sorry, I'm trying and failing to find the PasteBot URL... 10:51
autrijus pasteling: nopaste 10:52
perlbot: nopaste
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
pasteling "Jonathan_" at 195.112.34.165 pasted "Current Win32 build problem" (28 lines, 1.1K) at sial.org/pbot/9348 10:53
Jonathan_ Thanks. 10:54
kungfuftr anyone know how to get line numbers in a side-by-side diff?
autrijus Jonathan_: nopaste the main Makefile and ext/CGI/Makefile too 10:56
I'll bbiab
pasteling "Jonathan_" at 195.112.34.165 pasted "My makefile" (963 lines, 37K) at sial.org/pbot/9350 10:58
"Jonathan_" at 195.112.34.165 pasted "My ext/CGI/Makefile" (602 lines, 16.9K) at sial.org/pbot/9351 11:00
Jonathan_ Thanks...sorry I don't have time to dig into it myself at the moment.
autark-jp ":".split('ab:cd') --> ('ab', 'cd') [shouldn't it be the other way around, or did I misunderstand the apocalypse?] 11:19
Jonathan_ I'm no P6 expert, but I think it should be "ab:cd".split(":") if indeed you can do method calls on literals, which I fail to remember. 11:20
autark-jp it seems one can :) 11:21
theorbtwo You can do method calls on literals. 11:28
I don't recall which way around split goes, though.
autark-jp in current pugs it is "sep".split("string") ... which just seems weird. 11:29
castaway makes not a lot of sense that way around (IMO anyway)
autark-jp I also got bitten by ('a', 'b', 'c').join("|") giving "baca|"
I guess I missing out on something essential ... better read the docs again :/ 11:30
theorbtwo That sounds like a bug...
castaway It seems its assuming all func(a,b) can also be a.func(b) 11:31
(like p5s OO methods)
autark-jp according to ./t/builtins/lists/join.t it's not.
castaway hmm? how does it look in the tests?
theorbtwo Umm... with less? 11:32
autark-jp my $joined1 = ("a", "b", "c").join("|"); is($joined1, "baca|", '().join("|") should NOT dwim');
I tried to stare intently at it, but it didn't help me very much ;) 11:33
castaway aeh, very confusing 11:34
theorbtwo It's doing a join('a', 'b', 'c', '|') -- that is, joining b, c, and | with a.
castaway thats a positive test, that shouldnt work?
theorbtwo The question is why TF it is doing that.
No, it's a positive test -- it should do what it says there, not what you meant. 11:35
castaway but the very next test does more or less the same thing
autark-jp something special is going on with lists apparently.
castaway (except its an array, not a literal list)
and is supposed to work, if I read it correctly 11:36
theorbtwo Your confusion is caused by the word "work".
castaway is(@list.join("|"), "a|b|c", [email@hidden.address] works'); 11:37
buluaga so what is new with perl6 ? 11:38
castaway: is that perl6 code?
castaway yes
buluaga so how far is perl6 developed
castaway (or no, depending how you look at it :)
autark-jp ;)
buluaga is there any kind of releases so I could play with coding in it?
castaway perl6 isnt, pugs is
yes, cpan, Pugs::... something
6.2.0 11:39
buluaga well yes because perl6 and perl5 can be compiled on each others interps right?
what is pugs?
castaway It's a perl6 implementation in Haskell, see pugscode.org
buluaga Hrmm..
castaway on each others what? (I think the answer is 'not yet')
buluaga does it need a special intereperter? 11:40
castaway there are supposed to be binaries available, I havent look though, else you need the GHC
theorbtwo Pugs is the interpreter; you need GHC 6.4 in order to compile pugs.
buluaga GHC?
theorbtwo www.haskell.org/ghc/ 11:41
castaway the Haskel compiler
buluaga hrmm.
castaway (like you need gcc to build perl5)
theorbtwo (A haskell compiler, but the only one that supports all the extensions we use.)
buluaga So what is the avenge of pugs?
theorbtwo avenge?
buluaga sorry 11:46
avantage
=/
theorbtwo advantage.
buluaga advantage 11:47
im tired =/
lol
theorbtwo Well, if you want to hack on perl6, it's advantage is that it actually exists.
If you just want something you can use without having to hack on, give us another couple weeks. 11:48
That's not to say that pugs is unstable, but that it doesn't implement quite large enough of a subset of perl6.
buluaga well how closely related to perl6 is it, I mean is the code, syntax,functions and what not similar
or is puds something totally different from the actual perl6 being developed?
rindolf Hi all! 11:49
castaway it implements the actual design
theorbtwo Pugs aims to be an implementation of perl6, so it shouldn't differ from it at all, from a user point of view.
rindolf I've set up a new infobot - Pninith. Would you like me to place her here?
castaway (else I wouldnt have mentioned it)
what, more bots?
theorbtwo However, at present "aims to be" and "should" are somewhat to the forefront. 11:50
rindolf castaway: there ain't no such things as too many bots
theorbtwo Pugs does not yet have user-visible objects.
castaway oh but there is :)
theorbtwo #parrot has too many bots, and AFAIK it only has one. It all depends on the utility:annoyance ratio. 11:51
castaway true
theorbtwo grrs at GHC.
kungfuftr how does one export variables from a class? 11:52
theorbtwo AFAIK, put "is export" on the declaration. 11:53
kungfuftr yar... kk
theorbtwo is afraid that people listen to him too much when he says "AFAIK".
castaway some answer is better than none at all :) 11:54
buluaga ahhh 11:55
pugs sounds nice
im going to check it out
castaway have fun
buluaga now im an averge perl coder
will i be able to learn pugs easily?
or will it be a challenge like learning java ?
lol
autark-jp I can assure you, pugs is nice :)
castaway have you read the p6 design docs? 11:56
buluaga no not yet.
when is perl6 suppose to be released, is it even being developed or just in the process?
theorbtwo On a Thursday. 11:57
castaway probably in a year or 2
(or 10)
kungfuftr what's the common name for variables like $?OS, etc? 11:59
rgs octarine variables. 12:00
castaway perlvars ?
kungfuftr cocks his shotgun
castaway: yar, so perl5 perlvar's seem to be seperating out into different twigils, etc 12:04
castaway twigils?
kungfuftr $?<foo>, $*<foo>, $^<foo>, etc.
castaway hasnt figured out what thsoe are yet 12:05
kungfuftr special, global and placeholding, iirc 12:06
theorbtwo $?foo are magical variables.
Runtime-magical, that is.
kungfuftr ah... sorry... magical
theorbtwo $*foo are compile-time magical variables.
$^foo are placeholders. 12:07
castaway where placeholder means.. what?
kungfuftr castaway: $^a, $^b in sort, etc.
theorbtwo If a sub contains placeholder variables, they are taken to be the named arguments to the sub, in unicodeabetical order.
Er, s/sub/closure/.
autark-jp { say $^x }.("foo") 12:08
castaway aha
rindolf castaway: what's up?
theorbtwo so sort {$^a <=> $^b} @foo is shorthand for sort(sub (*@_) {$_[0] <=> $_[1]}, @foo).
castaway the sky, as always, rindolf
rindolf castaway: which sky, mine or yours? 12:09
castaway only acknowledges the existance of "the one sky" !
theorbtwo At least on this planet.
castaway and $?OS is presumably runtime-magical, because if compiled on winNT, and run on Win2k, it will give you the latter? 12:10
theorbtwo If you ask for $?OS, it could, yeah.
castaway nods 12:11
kungfuftr can you setup a variable as a proxy object directly? 12:18
bah, ignore me! 12:20
nothingmuch how funky will proxy objects be? 12:23
i'd like to be able to do proxy object trees:
a proxy object with a remote object
and anything the remote object returns is proxied on the other side
theorbtwo Transparent RMI you mean? 12:24
nothingmuch i think
that sounds like a good name
castaway (DCOM :) 12:27
kungfuftr my $foo = new RemoteProxy;
though the implementation for STORE, FETCH, etc. would be the stickler 12:29
kungfuftr has had his brain too thrashed by javascript over the last few days 12:31
castaway :) 12:32
nm, did you get at your SEE yet? :)
kungfuftr SEE?
nothingmuch yes, it's open now =)
castaway ooh, ta :)
SubEthaEdit
kungfuftr ah
bah, i need to get OSX
castaway no :) 12:33
kungfuftr no?
castaway is porting to emacs :) 12:34
nothingmuch well, castaway & theorbtwo are trying to make it be no =)
(vim vim vim!)
castaway has no idea how to write C(++) libraries
larsen castaway: really ?
kungfuftr emacs-- # no, i want an editor... not an operating system
castaway really what? :) 12:35
larsen castaway: I'm referring to your first statement
castaway kungfuftr: how one uses it is up to them, I'm mostly just editing
porting? yes
larsen cool. I second nothingmuch's objection, but cool 12:36
castaway btw, although the protocol allows for lots of 'ERR' msgs via beep, it mostly just hangs up on me, when it gets something it doesnt like :)
hmm, what does one write vim extensions in, then?
nothingmuch does anybody have an opinion on Inline::Files?
theorbtwo Other people should feel free to write bindings for other editors, etc, based off of our work.
nothingmuch castaway: I would guess C
larsen theorbtwo: yes. which is why I said "cool". 12:37
castaway too bad.. pointers are evil :)
theorbtwo =for YADDA ... =cut should pretty well obliviate the need for it.
nothingmuch in p5, theorbtwo?
castaway should maybe ask Inrepid (eep)
theorbtwo Oh. 12:38
No real oppinion.
It is a source filter, for no good reason, though.
castaway has no idea what Inline::Fiels is
kungfuftr nothingmuch: www.vi-improved.org/wiki/index.php/...InCommands
castaway Files, even
nothingmuch castaway: it's like __DATA__, but arbitrary 12:39
castaway ah, sneaky
Source filter?
nothingmuch no, Inline:: =)
(which might be a source filter)
castaway ponders
nothingmuch anyway, if it is, i don't want to use it
nothingmuch has had only bad experience with source filters
castaway RTFS :) 12:40
nothingmuch =)
theorbtwo curses. 12:41
nothingmuch terminfo. 12:42
theorbtwo I can't get the package of hs-plugins called eval and the pugs module Eval to play nice together.
stevan howdy yah-all 12:45
theorbtwo Allo, stevan. 12:46
Juerd Is p6l getting faster? 12:59
I was used to waiting minutes before seeing my own messages back, but the latest arrived in just seconds!
theorbtwo wanders off. 13:00
Juerd Bye theorbtwo 13:01
nothingmuch theorbtwo: ping 13:41
castaway he stepped away from the comp, methinks 13:42
nothingmuch perlbot nopaste 13:47
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
nothingmuch actually, no need 13:48
autrijus theorbtwo: easy. we rename our Eval to Pugs.Eval 13:51
but can't you use euqlified import? 13:52
qualified, even
hrm, nvm, I see you can't
then maybe we massively rename src/ to src/Pugs.
thoughts?
autrijus needs to hop on the MRT train now... wireless out & 13:53
castaway
.oO( MRT ?)
autrijus metro thing
taipei's subway
there's wireless coverage along the MRT line 13:54
castaway ah, funky
nothingmuch needs to move to taiwan 13:57
autrijus ...and I'm now at a midway station 14:00
waiting for another MRT car to arrive :)
thanks to ssh, it doesn't even drops the connection.
castaway technology++ 14:01
autrijus also notes the wireless is expected to cover 90% of population in Taipei at end of this year
and it's also free as in beer :)
castaway cool
nothingmuch autrijus: when will the hackathon happen? 14:02
and do you think there's any place left? 14:03
i've mailed John, but no reply yet
autrijus I don't really know...
I think it begins at 22nd
nothingmuch (Btw, birthday is on last day of YAPC... nice way to celebrate =)
stevan nothingmuch: I think there is still room 14:04
last count I made was 11 or 12,.. and the max was 13
autrijus: greetings from perl5 land
nothingmuch is going outsid 14:05
ewifi is working very barely
castaway ooh, coming too, nm?
stevan autrijus: kungfuftr and I have been chating and the idea of side-effect free closures came up 14:09
would that even be possible?
basically it would be an exception to access anything outside of itself
nothingmuch_ beh!
from 'oo nm coming to yapc': 14:10
yes, i am, i have a demi sponsor
nothingmuch_ was hired on IRC
stevan anyway just a thought, gotta run out for a bit
pjcj IIRC there's a property you can apply to say something has no side effects. I wanted pure, but I think it's called something else.
cacheable or memoizable or something
Limbic_Region unadulterated
nothingmuch_ what did i miss? 14:11
stevan pjpc: for closures/block too?
pjcj not sure - maybe it was just for subs
stevan nothingmuch: just throwing out the idea of side-effect free closures/anon-blocks/anon-subs
castaway cheers
nothingmuch_ if you can do recursion on blocks
pjcj but it was quite a while ago, so things have probably changed underneath the idea 14:12
nothingmuch_ then they should be considered as subs in terms of capabilities, methinks
kungfuftr will post to p6l later
stevan has been reading too many functional language books
stevan also really needs to run out,.. so I will leave you all to discuss and I will backlog later
pjcj Here's the middle of a thread -- www.nntp.perl.org/group/perl.perl6....uage/12396 14:18
autrijus ooh pure functions 14:26
does it mean you can't say "print" in it?
or does it mean that if you say "print" in it, it will get run on unpredicable times for unpredictable amounts? 14:27
nothingmuch_ autrijus: i think the user gets to decide what is pure 14:29
it's just an attr
Limbic_Region Ovid - I read about the nullification of the same sex marriages in your neck of the woods
14:30 nothingmuch_ is now known as nothingmuch
Ovid Yeah. I was pretty pissed off about that. Bigotry: 1. Love: 0. 14:30
nothingmuch how do i rename myself in colloquy?
oh, oops 14:31
=)
autrijus nothingmuch: oh, then the term in haskell for that is "unsafe".
;)
as in "unsafePerformIO"
"unsafeEval"
castaway unsafe=unpredictable?
autrijus yeah, also, it defeats type safety 14:32
nothingmuch tries to concentrate
autrijus *Main> :t unsafePerformIO
unsafePerformIO :: IO a -> a
i.e. it lets you (ab)use something that performs side effects 14:33
and pretend it's pure (i.e. memoizable)
nothingmuch anybody want to help me document Test::TAP::Foo? 14:40
nothingmuch is really having trouble thinking
rindolf So the concatenation operator in Perl 6 will be "."? 14:44
autrijus no... it will be "~"
autrijus suggests rindolf to install pugs and play a bit 14:45
nothingmuch rindolf: the synopses discuss this stuff to great detail
PerlJam It *IS* ~
nothingmuch the tests make sure it's like it's said
rindolf autrijus: no longer "_"?
autrijus rindolf: no longer. see Perl6::Bible on CPAN
nothingmuch rindolf: s03 discusses operators
rindolf autrijus: why isn't there a trunk directory in the pugs repository? 14:48
autrijus: you've placed all the files in the root directory.
autrijus rindolf: because there is no branches :)
rindolf autrijus: that's a poor excuse. 14:49
autrijus however there is svn.perl.org/perl6/pugs/trunk/
rindolf: so if you want trunk/tags, there it is
rindolf: how so? if a project has no branches and no tags, why can't it be placed at root?
I consider it an excellent excuse :)
rindolf autrijus: because you don't know when you'll need a branch. 14:50
autrijus: and don't tell me you don't tag your releases.
autrijus rindolf: I know I won't.
and I tag it at svn.perl.org.
so. :)
come to think about it, I'll do the tagging for 6.2.0 now
rindolf autrijus: I see. What is the purpose of svn.openfoundry.org/pugs/
autrijus rindolf: an anarchistic playground.
PerlJam autrijus: don't mind rindolf, his head isn't bent the right way ;)
autrijus rindolf: because svn.perl.org committership is handed out less liberally. 14:51
PerlJam: I think the question is valid :)
nothingmuch anybody know putters real name? 14:56
working on AUTHORS section
(of Test::TAP::Foo)
autrijus no idea 14:57
nothingmuch autrijus: btw, how would you package template.html and template.css?
autrijus nothingmuch: part of __DATA__ I think? 14:58
nothingmuch Inline::Files scares me 14:59
two files... not fun
plus, Petal is too dumb to eat that
for a super cool approach to templating the Petal implementation is sometimes very disappointing
i hate source filters because they tend to break sometime
autrijus DATA is not source filter :)
nothingmuch and it's really overkill, despite being elegant
i was thinking next to the .pm file
autrijus but anyway. in that case just next to pm file
nothingmuch __DATA__ surely is not, and i use it extensively
see MPEG::Audio::Frame's test suite... each test is centered around an MPEG stream in __DATA__
is there a super cool module that knows how to find these files? 15:00
castaway hmm, Tks widget has: use lib Tk->findINC( 'demos/widget_lib' ); 15:03
wherever thats defined.. 15:04
nothingmuch will look at it eventually 15:05
castaway Oh
sub findINC
{
my $file = join('/',@_);
my $dir;
$file =~ s,::,/,g;
foreach $dir (@INC)
{
my $path;
return $path if (-e ($path = "$dir/$file"));
}
return undef;
}
nothingmuch did it with File::Basname::dirname 15:06
and catfile
but based on __PACKAGE__ =~ s/::/\/; 15:07
.= ".pm";
and then looking in %INC
i wonder which is better
castaway shrugs
anyfish, hometime..
nothingmuch ciao
castaway disappears to see where theorbtwo wandered off to.. later folks :) 15:08
nothingmuch how will aliased subs be handled in p6? 15:17
PerlJam nothingmuch: what do you mean?
nothingmuch *alias = \&blah;
PerlJam &foo := &bar;
nothingmuch no stylish declarative way? 15:18
PerlJam you realize this is perl right?
TMTOWTDI!
(but, for my money &alias := &my_sub; is just fine) 15:19
integral wonders what: sub foo is &bar; would do 15:20
rindolf When are you guys planning to intrduce readline support to pugs? 15:22
autark-jp AFAIK there are readline support in pugs already. 15:23
boogie just read support is missing 15:24
you can check readline in examples/network/http-server.p6 15:25
rindolf autark-jp: I'm invoking pugs and I cannot edit my lines conveniently. 15:27
autark-jp rindolf: well, that kind of readline support should be available as well. 15:28
rindolf autark-jp: it isn't. 15:29
autark-jp rindolf: I think you need to have the perl module readline.pm installed (or something like that)
rindolf autark-jp: proper capitalization, pleasE?
autark-jp rindolf: where?
at the end of sentences? ;-) 15:30
sri_ moin 15:31
rindolf autark-jp: for module names. 15:32
Is it readline.pm, ReadLine.pm, Readline.pm, etc.
Hi sri_
ninereasons actually, I think that the interactive version of pugs uses Haskell's Readline library, doesn't it? 15:33
autark-jp rindolf: I wasn't sure of it's correct capitalization(?)
ninereasons (which appears to be a standard part of ghc-6.4) 15:34
rindolf I have ghc-6.4 15:35
ninereasons rindolf, when you say, "cannot edit my lines conveniently", what is happening that's inconvenient? 15:36
or what convenience is missing? 15:37
nothingmuch ninereasons: you know, you think of a word 15:38
and it doesn't appear on the screen 15:39
pjcj I think I'm missing the module that takes my muddled thoughts and translates them into valid perl6, mailing perl6-language and patching pugs as appropriate
nothingmuch pjcj: is it's inexistence a feature or a bug?
ninereasons ah, nothingmuch . Mine doesn't do that either. is there a plugin for that ? ;-)
nothingmuch Term::Readline::DWIM
you know, what perl is all about 15:40
DWIT, maybe
maybe just DI
or DI::ForMe
ninereasons DWITTY, nothingmuch :-)
rindolf ninereasons: pressing the arrow keys doesn't work.
nothingmuch do what I think that's yummy?
rindolf: ld -lreadline?
rindolf nothingmuch: how can I tell that? 15:41
nothingmuch that's a command
i am wondering what it says
if it just exits with status 0 then we can move onwards because we know readline can be linked to
pasteling "rindolf" at 82.80.0.238 pasted "ld -lreadline output" (11 lines, 612B) at sial.org/pbot/9361 15:42
nothingmuch so how about installing readline?
reinstalling, that is
ninereasons that functionality is part of pugs presently, rindolf . nothingmuch has put the finger on why it doesn't work for you, I think 15:43
rindolf nothingmuch: yes, but "ld -lreadline -lncurses && echo success" works.
nothingmuch those symbols sound important
tgoto 15:44
maybe that controls moving around the term?
hell, i dunno
autark-jp ldd pugs and see if it has readline linked in?
nothingmuch everyone is LinkedIn, autark-jp, don't be silly 15:45
rindolf autark-jp: it doesn't.
jhorwitz nothingmuch: fixed with -ltermcap or -lncurses. would be a dependency of libreadline.
nothingmuch rindolf: so why do you expected it to work?
jhorwitz: good point ;-)
rindolf nothingmuch: how do I get it to link against readline? 15:46
nothingmuch rindolf: see Makefile.PL
i don't know, but I bet the knowlege is in there
rindolf nothingmuch: readline is not mentioned in Makefile.PL (case insensitive search) 15:47
Where should I check out pugs from. I checked it out from svn.openfoundry.org/pugs/
ninereasons that's the right place, rindolf 15:48
nothingmuch rindolf: that is right 15:49
ninereasons you should be at subversion r1988
nothingmuch config_h.pl does the magic
really rindolf, this stuff is easily found out
ninereasons s/should/could/
nothingmuch i grep -ri readline on the source tree
saw PUGS_HAVE_READLINE
grep -r'ed for that
my $has_readline = try_compile(<< '.');
import System.Console.Readline
main = readline "" >> return ()
.
autark-jp maybe ghc wasn't build with readline support? 15:50
nothingmuch conclusion: ldd ghc and see if it likes readline
if it doesn't, get another GHC
if it does, then i think there's some kind of time space anomality sucking in readline somewhere between /usr and ~
not allowing the pugs dir to see it
ninereasons hates those time space anomalies 15:51
pasteling "rindolf" at 82.80.0.238 pasted "ghc problems with readline" (13 lines, 534B) at sial.org/pbot/9362 15:52
nothingmuch that's better resolved at #haskell 15:53
roie_m don't you need to tell ghc "-lreadline"? I think ghc just calls gcc for the linking phase. 15:54
nothingmuch we are mostly #perl6 people here, methinks
so please get a ghc that does
jhorwitz rindolf: my ghci has readline support, but pugs did not until updating today to r1988 (was at 6.0.13 release)
nothingmuch so your chances here are probably not as good
what this looks like is that your ghc does not have readline
(surprise)
jhorwitz: there's a message in the changelog about it
maybe it's relevant? (didn't read it/it's context)
but i think rindolf is at HEAD
jhorwitz nothingmuch: you're right. >= 6.0.14 fixed it 15:56
rindolf ghci has readline support. 15:59
nothingmuch rindolf: so check out that time-space anomality
rindolf nothingmuch: sure, right away.
nothingmuch-- # You're being unhelpful
nothingmuch rindolf--; # you're not helping yourself 16:00
we are not the people responsible for your linux distro or ghc installation
rindolf nothingmuch-- # I don't know how.
nothingmuch we've got you to a point where we know that ghc does not expose readline support
rindolf Turns out one needs to add -package readline 16:01
nothingmuch this is not a pugs issue and appearantly no one knows how to solve it
integral So their advice of 'ask #haskell' _was_ helpful?
nothingmuch see? that wasn't that hard
rindolf nothingmuch: so now I have to modify the code to do that everytime ghc is called with readline support? 16:02
nothingmuch which code?
where is -package readline needed?
rindolf nothingmuch: whenever you try to compile Haskell code with readline support. 16:03
nothingmuch as an option to GHC? 16:04
rindolf nothingmuch: yes
Incidentally, I also added the other VCSes to better-scm.berlios.de/
nothingmuch you can hack Makefile.PL to add it to $ghc_flags
rindolf But it should be resolved permanently. 16:05
nothingmuch so you can commit your hack
or i could do it if it's too much
rindolf I don't like to litter the codes with such hacks. I prefer solid solutions that are guaranteed to work everywhere. 16:06
gcom nothingmuch++ # nice of you to try so hard
nothingmuch so write a hack that is solid and guaranteed to work everywhere
and call it a solution
ninereasons nothingmuch++ # I agree with gcom
pjcj nothingmuch++ # I agree with ninereasons ;-) 16:08
rindolf Where can I file a bug about pugs? rt.cpan.org? 16:10
jhorwitz rindolf: you just need the right libs: ghc -o test test.hs -lHSreadline -lreadline -ltermcap
ninereasons t/pugsbugs/
rindolf jhorwitz: no, I need -package readline
jhorwitz well, that worked for me. :) 16:11
jhorwitz is now done solving haskell issues above his head. :)
nothingmuch jhorwitz: eek, i patched it the way rindolf said 16:12
i don't have ghc 6.4 on this machine though, so i can't check
anyway, try r1989
and jhorwitz: i'll appreciate a fix if that doesn't work right, and it should be as you said =)
rindolf: please svn diff that and file a bug report if it isn't a solid solution 16:13
you can go file the bug report on some public forum
perlmonks, perl6-compiler
but given your "please fix this for me" attitude i don't think it will get very far
i have to go hang some laundry now 16:14
pasteling "rindolf" at 82.80.0.238 pasted "pugs problems" (4 lines, 400B) at sial.org/pbot/9364 16:17
nothingmuch ah, i see 16:31
the only logical way around it i see is to add join(" ", ... ) in the args to system() 16:32
or introduce paramter processing 16:33
or make config_h.pl an integral part of Makefile.PL instead of having it in the Makefile itself
as a target
but that was done in order to stop the recompilation every time Makefile.PL was rerun
if you want to do a more "solid" fix you're welcome
otherwise i'm doing system on a string 16:34
since it works, and it's what Makefile does anyway
and I'm not going to care about taint mode or whatever
because if the user set $ENV{GHC} to something naughty it's their fault 16:35
r1990
ninereasons stevan et al, I'm thinking of unTODOing all of the negative index tests in t/data_types/array.t 16:37
stevan et al, on the assumption that "TODO" means "unimplemented feature", and "unTODO" means "bug"
stevan et al, sound correct?
nothingmuch ninereasons: sounds good 16:38
rindolf: can i get an update on the situation? 16:39
rindolf nothingmuch: that error (and a bootload of other errors) was the last thing I got. 16:41
nothingmuch so please svn up and try again, because I said i fixed it since 16:42
rindolf nothingmuch: OK.
nothingmuch otherwise i'll apply reverse patches, and another patch that causes Makefile.PL to die if $ENV{HOME} =~ /rindolf/;
rindolf 1991 - a palindrome
nothingmuch: my homedir is /home/shlomi
nothingmuch i'll make the match extra smart 16:43
based on Sys::HostIP
and Sys::Hostname
and getpwent magic
do disallow shlomi, rindolf, and what not
and useradd 'pugs_disallow'
which is in sudoers 16:44
whose cron will chmod -x `which svn`
every minute
ninereasons :)
nothingmuch sol that you can never ever ever get or commit a fix for that
so please, if you want something done, either do it, or at least have the courtesy to pay attention to people doing it for you
rindolf nothingmuch: it works now, thanks. 16:45
nothingmuch++
nothingmuch thank you
rindolf nothingmuch++ # so the delta will be positive
nothingmuch the delta was positive enough already, thankyouverymuch 16:46
rindolf P.S.: you still negated my karma when I said that joke about join #perl so it will pass the 400 participants threshold.
nothingmuch uhuh.
karma is not a temporary thing
jabbot nothingmuch: is not a temporary thing has neutral karma 16:47
nothingmuch it's a sort of state based on the past
and then, and a while ago, i thought badly of you due to some behavior
and this is where it's recorded
only most people consider it a game
hola chady 16:50
didn't know you were on this boat too 16:51
chady hey nothingmuch
I just started joining the past couple of days
nothingmuch ah
how is life northwards?
chady fine... watching our backs 16:52
tonight for example is candidate for another explosion
nothingmuch didn't get a chance to ask anything since way before things started getting tense
overall are you optimistic? 16:53
the papers made it sound good a while back
chady it's getting better, people's spirits are good
nothingmuch like overall the public wants peace, and quiet, and plans to get it some way, hopefully nonviolent
nothingmuch wish he could say the same about israel
i think it's looking up
but spirits in general are down
chady oh 16:54
nothingmuch i think that sharon's plan will be rather painful
chady well, in any case, I can't wait to get out of the region
nothingmuch they're debating reposessing all firearms from settlers, for example 16:55
which is a good thing, on the surface
but it's a very strong reminder of how tricky and dangerous it all actually is
where do you plan on going?
chady anywhere but here.. maybe australia, but it's still talk for now
nothingmuch aye
nothingmuch gets back to documenting 16:56
chady nice job being done on pugs btw 16:57
nothingmuch thanks on behalf of everyone
especially autrijus
nothingmuch thinks he is the best part of it
every once in a while you see
autrijus joined #perl6
autrijus: oh by the way, we have feature x, and also y and z
chady this whole thing's making me wanna learn Haskel :) 16:59
nothingmuch yeah, me too
i started, but then started getting swamped
it's looks like a very powerful language
chady I probably will, just as soon as I finish this project I have
nothingmuch many things i've worked hard on in perl seem like they will be easy in it 17:00
first and foremost due to laziness, I think
since you are free to ignore a rather expensive optimisation
that usually costs a lot to setup in other languages
good luck with them both, then ;-)
Corion wtf? Win32 build is broken :( Who is using unixisms in the Makefile? :-(
chady thanx
nothingmuch Corion: sorry, that's me
Corion nothingmuch: Grrr
Corion goes to investigate
nothingmuch nothingmuch--
rindolf: see? that's how it's done. People investigate 17:01
Corion nothingmuch: Naah - that's why I'm testing stuff :)
nothingmuch but i'll tell you
readline support needs -package readline
and the only way i found to get both Makefile and config_h to call ghc that way without duplicating code is to set $ENV{GHC}
so i made env GHC="ghc $ghc_flags" $(PERL) config_h.pl 17:02
and made config_h system(join(" ", $ENV{GHC} ...)
Corion nothingmuch: Is there a reason you don't want to pass in $ghc via @ARGV ?
nothingmuch both of which are icky unixisms ;-)
i didn't look deep enough or think long enough to see (that|if) it's possible 17:03
Corion nothingmuch: Ah
nothingmuch should i fix it? i think someone windowsish should, because i don't know all the pitfalls
maybe the best way is to merge config_h.pl into Module::Install::Pugs 17:04
Corion nothingmuch: I'm looking into it, will try the @ARGV version and commit.
nothingmuch and then make it only replace the new config h if it's different
Corion nothingmuch: I hope that it will work, because otherwise, the next best thing will be a file. Or moving config_h stuff into Module::Install::Pugs instead of a separate program.
nothingmuch that way it won't be recompiled all the time 17:05
*nod*
we can force rindolf to do it
;-)
aha! they have returned with food 17:06
nothingmuch heads off to chew on pita + labane
Corion nothingmuch: BTW, any reason why you're not using File::Temp in config_h.pl ? Or didn't you hack much with config_h.pl anyway?
Corion leaves questions in the code 17:07
nothingmuch Corion: i didn't change that part
i'll do it in 15 mins 17:08
Corion nothingmuch: Ah, so it's just crufty code.
nothingmuch: No, I'm refactoring it a bit anyway - better wait until I've committed :)
nothingmuch: Just eat your dinner :)
Yay. Win32 builds again. 17:10
Bah. And the GHC test is failing for me because of the lack of readline.o (some symbols missing). I guess it always did. 17:12
Yay. Make test also runs. 17:13
castaway ruffles Corion
Corion boings
castaway another bouncy person, it must be catching 17:14
theorb is back on the task of backing up and restructuring/reinsalling his system.
(lesigh.)
Autrijus, if you're still about, thanks for the idea of restructuring; it will make things much easier. 17:15
Corion theorb: What machine went down? Bad thing :( 17:18
castaway lilith :( 17:19
Corion castaway: Ugh - that's your central server, no?
theorb No, it's my desktop.
...but it's used for everything I actually use.
Corion theorb: Not much better then ... 17:20
theorb Oh, BTW, re making CWD a magical var, won't that cause more srict/lazy issues? 17:22
Corion Oh. But something within Pugs broke, as I get pugs.exe: cannot cast from VList [VStr ""] to Handle
I like $*CWD and @*CWD, even if it wouldn't fully work for Win32
... it would force people to become more platform agnostic. 17:23
... and using file:// URIs would be fine with me too, except that people don't want to enter file URIs into a program/config file/whatever.
elmex it owuld force people to do something they don't want: to evolve
nothingmuch what's @*CWD? ("/", "/foo", "/foo/bar")?
Corion (and file:// URIs would work fine with UNCs)
nothingmuch: No - ("foo", "bar") - always the absolute path, in its components 17:24
nothingmuch thinks that the Path object in p6 should encapsulate URI
theorb No, @*CWD ~~ ('foo', 'bar') if $*CWD == '/foo/bar';
nothingmuch also thinks that the notion of chdir is broken
and should be there for compatibility
and that the CWD should be per file manager 17:25
and each bit of code can just be given a different file manager
Corion Hmmm. I guess we'll need "skip_wontfix" and "skip_todo", if we keep the tests as our feature/bug management system ;)
nothingmuch might be tempted to design this interface
Corion chdir() should die, just to force people to recognize $*CWD :)
nothingmuch Corion: IMHO skip_won't_fix should be negated OK
Corion %CWD is a nice idea :) 17:26
castaway setting $CWD makes me go 'ick' (tho Im not sure why ,)
theorb Eh, no reason to not just make cwd("string") an alternate way to write $*CWD='string';
nothingmuch perlbot nopast
perlbot nopaste
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
Corion nothingmuch: Heh, but you can't give it a count... skip "Windows can't do this", 3 is ugly to do with ok()...
nothingmuch perlbot nofuture
theorb Anybody have an answer to my lazyness issue?
Corion castaway: Magic action at a distance, it is a bit weird. but you should use @CWD anyway, which is much better than File::Spec->updir :)
theorb Keeping around paths in split format is quite possibly quite nicer then using File::Spec all over the place. 17:27
castaway updir ??
doesnt sound like something Ive ever used 17:28
Corion castaway: The thing you should use instead of hardcoding ".."
pasteling "nothingmuch" at 212.143.91.217 pasted "authors + copyright of Test::TAP::* - theorbtwo - please confirm" (48 lines, 784B) at sial.org/pbot/9368
castaway If I ever write those sort of "I'm not really a shell script" scripts, then they really dont care if they're portable or not ,)
nothingmuch castaway: it's File::Spec stuff, FYI ;-) 17:29
Corion curses. Again the pugsrun/ tests are broken ...
castaway I've only ever used split and catdir in there, I think ,) (and catfile)
Corion ... but then, what would I do on a Friday evening, if not fix tests on Pugs :) 17:30
Grrr. Pugs karma strikes again. It's now raining outside, so I actually get to stay home instead of going out ... 17:32
Corion shakes his fist towards the sky
theorb It's lovely weather down here, Corion?
Corion theorb: If you like rain, you'd like it here now. 17:33
nothingmuch castaway: File::Basename is terribly useful, and catfile should always be used
castaway likes it, if its warm too
nothingmuch if you're messing with that stuff
castaway whats basename do that splitpath/file/whatever doesnt?
nothingmuch nothing 17:34
kungfuftr nothingmuch: about for long?
nothingmuch it's just quick
Juerd Here goes the File::Spec madness again :/
nothingmuch kungfuftr: yep
Corion commits. This might cause Unix build breakage.
nothingmuch unless Neama says "please go out"
Corion r1992
nothingmuch Corion: /me will test
Corion nothingmuch++
castaway mumbles something about ETOOMANYMODS 17:35
nothingmuch castaway: yup
Test:: and File:: suffer from that
Corion pugscode.org <<Overview Journal Logs>> | r1773/winxp: 587/4256 smoke/win2k (occasional): xrl.us/fqum (89/4295, r1991) | pugs.kwiki.org | <autrijus> at no point should we lose the useful illusion. 17:35
theorb Well, doesn't look any more broken to me then when I left the tree. 17:35
nothingmuch thinks that File::Manager should be *the* p6 way to do File::Spec etc
castaway speaking of which, did you ever remove that one from the class::dbi/sql::t thingy?
theorb But that was pretty broken.
nothingmuch using an object that is a Path or File::Path
castaway Flie::Manager?
FileSystemObject ! 17:36
nothingmuch which knows about everything from local path formats, to those of foreign OSs, to URIs
castaway: why is that important? (/me curious)
Corion I think the idea of how IO::All does files/dirs isn't bad. But the idea of how IO::All conflates all of this with a single-arg-open is something we should leave behind with Perl4. :)
castaway what exactly?
Corion castaway: FSO isn't bad
castaway I never said it was ;)
nothingmuch i think i get it 17:37
is that some reference I'm not really getting?
windows api?
ah
castaway FSO is what one uses in vbscript, vba etc
Juerd 19:36 < nothingmuch> Test:: and File:: suffer from that
castaway the "do everything" object#
Juerd nothingmuch: And most other namespaces.
nothingmuch Juerd: i'm not too sure about most
there is some sufferring
but I think that Test:: should be rather unified, so that people aren't shy of using good test assertions 17:38
and that File:: is simple enough to have the one (or two, but never more than three) true interface
Corion Hmmm. Does t/examples/examples.t work for anybody ? I get weird newlines in the list elements...
nothingmuch that can do everything easily
Juerd File:: should all be in IO:: anyway.
nothingmuch without doing stuff like system(qw/rm -f/) or whatever
Juerd Unless it's file*system* specific
nothingmuch it's not IO, it's file system, but sure
Juerd There is stuff that opens files in File:: 17:39
castaway cos its convenient
Juerd Perhaps we should try to define what certain top level namespaces are for? 17:40
And maybe even create some sort of guide for module naming?
nothingmuch Juerd: convince ingy/mugwump?
theorb thinks that anarchy hasn't gone that poorly.
castaway hmm, too many shotguns IMO 17:41
nothingmuch athough ingy is notorious for top level namespaces
Corion theorb: Well, we should try to learn from the errors made in P5 :)
nothingmuch Spiffy, Spoon, Kwiki, YAML
Juerd nothingmuch: No, I wonder if it's needed.
nothingmuch .... =)
Juerd nothingmuch: They're all good.
nothingmuch ah
Juerd nothingmuch: Because these are projects.
castaway they are?
Corion nothingmuch: I've learned many things from them. Mostly, to avoid! :)
theorb tends to disagree.
Juerd Yes. A project with a project name should have its own TLN
castaway ouch
Projects::blah ,)
theorb That's going to produce an awful flat namespace.
Juerd No, please.
theorb: So?
kungfuftr nothingmuch: paste.husk.org/3038 ?
Corion Juerd: Ugh. Spiffy is only the object framework for Spoon/Kwiki. No use outside of it. 17:42
theorb Descriptive names ++.
nothingmuch thinks that the namespace isn't that much of an issue
Juerd Corion: Not true.
Corion Juerd: You use it?
castaway I think naming things after what they do makes navigation lots easier
nothingmuch i think names should be descriptive as possible
theorb If you want to have a short name, use use foo as bar.
Juerd Corion: I've heard about people using it, and even if nobody else uses it, it's still use*able*.
nothingmuch with good editors giving you completion
or aliasing
Corion I also prefer names that are descriptive.
theorb Names should be descriptive; when you see them in the source you should know more or less what they do.
"Spoon" doesn't tell me anything.
Juerd Corion: Now, consider Kwiki. Where'd it belong?
castaway also maypole.. useless
theorb WWW::Kwiki.
Juerd theorb: Why WWW? 17:43
PerlJam theorb: of course not, he's dead.
Corion Juerd: Consider Wiki::Toolkit or WWW::Wiki or something like that.
castaway or CGI:: where it was before
theorb Because it's a framework for websites.
Juerd And then someone creates a Tk kwiki thing.
nothingmuch and proper search facilities making namespaces hierarchly inclined indentifiers instead of a the defiinition of hierarchy
theorb PerlJam: Huh? Who is dead and why do I care?
Juerd That uses a samba mount for storage.
It's modular enough.
castaway WWW:: is mostly scraping stuff
PerlJam theorb: Spoon. That's why he doesn't tell you anything.
theorb (I know, spoon is dead, but spoon the person and Spoon the module are different things.)
nothingmuch kungfuftr: persistence is very simple 17:44
theorb sighs.
nothingmuch XML should be a bit thicker
but i think it's the only one that needs that
Juerd I think TLNs should be used only if something can purely be put in one category.
And for that purity, guidelines are needed.
nothingmuch and HTML... *sigh*... too many ways to format
Corion Anyway - can I please get confirmation/denial for the weird list quoting behaviour I'm seeing in r1992 with t/examples/examples.t - or does it run for everybody ?
kungfuftr nothingmuch: it's just an example
nothingmuch and i don't think we can read that
ingy gah
nothingmuch it's a sort of good idea
i'm thinking of splitting up HTMLMatrix
theorb I'd like to see a nice place to stick keywords. 17:45
nothingmuch into a more template friendly heap
theorb sighs.
nothingmuch and Test::TAP::Visualize::HTMLMatrix::Petal
but the name is getting terribly long, and while we're on that discussion: how would you guys call it?
castaway ETOOMANYLEVELS
theorb nm: It's worth nothing that perl5 does /not/ have use as.
Test::Visualize::Petal
ingy namespaces aren't really an important issue
nothingmuch theorb: it's a kind of namespace you type once
it's not Test it's TAP
and you guys made me stick Test:: on that, so that's your fault ;-) 17:46
theorb TAP is redundant to Test.
Corion Oh. Perl6 should really have [tye]s recommended variation of require/use: my $foo = require Foo::Bar; my $bar = $foo->new;
ingy in Perl6 everyone can distribute a module called Spiffy
Juerd Corion: Ehhm.. hm.
theorb They could, but that doesn't mean that it doesn't matter.
Everybody distributing a module named Spiffy would create lots of confusion. 17:47
nothingmuch as for Visualize: errm.
Test is redundant to TAP
it's not a testing module
theorb Turing tarpit.
kungfuftr nothingmuch: i wouldn't seperate out the name spaces... since it's Model-View-Store thing
nothingmuch it's got to do with results
Corion Juerd: Factories are really convenient, especially in this case of really::long::module::names :)
Juerd Corion: evalfile does that, if the file properly contains a single class { ... } ;)
castaway if everyone can, that makes it even more of a mess
Corion Juerd: Yes. But use doesn't yet. And require() (in P5) would need too much cooperation currently.
ingy I think we need to change tools and culture to keep people from embedding and looking for all the meaning of a module in a namespace. and that's what we are doing. because as we know, it doesn't scale
theorb This is true, ingy. 17:48
ingy but have fun trying if you wish
theorb But it's no excuse for encourging bad names.
Corion I don't think that handing out MD5 names for modules is better.
nothingmuch I'm thinking of Test::TAP::Model::Visual for the utility methods
Juerd theorb: Names are rather subjective.
theorb This is true.
nothingmuch and Test::TAP::HTMLMatrix::Petal
theorb There's a lot of factors to consider.
nothingmuch or perhaps s/^Test:://;
Corion goes on fixing the weird quoting issue, even if he's the only one who sees it.
theorb But names like "Spiffy" and names like "Test::TAP::HTMLMatrix::Petal" both go too far in one extreme. 17:49
PerlJam theorb: Not if they create an easily recognizable and cognitively distinct jargon.
integral likes Haskell's lexical import qualified Foo
castaway Net::TCPIP::Telnet::Remote..
PerlJam theorb: (Spiffy does, the other does not IMHO)
theorb integral: use ... as .... 17:50
integral *nod*
Corion Hah. Seems like the list quoter doesn't skip/ignore whitespace. Like \r, which happens to exist in my file.
nothingmuch so Test::TAP::HTMLMatrix?
Corion ... now, how to make that into a proper test... Ah - construct it within Pugs, and eval it ...
nothingmuch because I got a "what if i want Test::TAP::HTMLMatrix::TT" 17:51
nothingmuch would gladly drop the Petal
Corion Where should tests for the Pugs parser go? t/syntax/ ?
theorb sighs, wonders how long nothingmuch will spend restructuring something that wasn't broken in order to not improve it. 17:52
nothingmuch theorb: i'm done
and i just want to release, but people keep changing my mind 17:53
and it was broken, with all due respect
it did not handle bailouts
it did not have counts, or whatever
and adding these features was not very easy
it was a script, and these are two modules
theorb How should it handle bailouts? 17:54
nothingmuch like it does now
Corion Is there any synopsis/apocalypse/whatever on how whitespace should be handled in qw-like constructs? I'm orienting myself at what P5 does, for now.
nothingmuch the file that bailed out noted
the tests that were never reached but planned noted
err, visualized
theorb Didn't handle them because I never saw any.
Corion Especially Unicode will be problematic, then, with my implementation. Feel free to improve, later on. What is the unicode whitespace char? \xA0 ? 17:55
nothingmuch theorb: they are defined as a part of TAP
that's why i generalized
theorb More then one, Corion.
nothingmuch because i needed something that was more broad for work
our framework now uses TAP (Well, sort of)
Corion theorb: Feel free to add, when I'm done with my test :)
theorb \xA0 is nonbreaking space.
Just use \s? 17:56
castaway or IsSpace 17:57
Corion theorb: I'm going the other way around. 17:58
ninereasons /msg perlbot paste
Corion Aaah - I could just use "for (\x00 .. \xFFFFFFFF) -> $sep { ... }" ... Naah.
ninereasons oops
Corion I'll construct my preliminary list of five whitespace separators, and those with tuits can improve that list.
theorb \x10FFFF is the max unicode char number, BTW. 17:59
Corion theorb: Ah. So it would be much less stuff to grep through, then ;)
Test committed, looking at lexer/parser now ;) 18:00
nothingmuch Corion: what about QuickCheck? 18:01
or porting Test::LectroTest to p6?
Corion nothingmuch: What about it?
nothingmuch tmoertel: ping
it sounds awefully close to iterating the whole unicode sigma 18:02
elmex nothingmuch: ponh
nothingmuch elmex eq tmoertel? 18:03
Corion Heh. The thing is much uglier. The parser splits on *exactly* one space :) 18:05
theorb Corion, what are you working on?
Corion theorb: t/syntax/list_quote_whitespace.t 18:06
cwest_ Tom Moertel is a good friend of mine.
I can let him know about the LectroTest suggestion (or has he been here?)
Corion (see r1994)
nothingmuch cwest_: he was lurking here up to a while ago 18:07
nothingmuch always hoped he'll help, given haskell background and very good posts on perlmonks
elmex nothingmuch: no
nothingmuch is a tmoertel fan ;-)
cwest_ He got killed by a client recently, figuratively.
nothingmuch eek
cwest_ He's a freakishly smart person.
Corion So tests don't protect against killing clients? 18:08
Hmmm. Is it a good sign if you think you find offending code, and there is the marker "-- XXX Wrong" already? ... 18:11
18:12 cwest_ is now known as cwest
nothingmuch ooh, good post: www.sidhe.org/~dan/blog/archives/000185.html 18:14
castaway *g*
theorb Well, it means that you aren't the only one that thinks it's offensive. 18:15
Corion Hmm. Seems like the error is in/below angleBracketLiteral, but I wouldn't know how to fix it there (as there is no mention of whitespace there) 18:18
mdiep In file included from /tmp/ghc7730.hc:5: 18:20
make: *** [pugs] Error 1
theorb mdiep: Looks like you missed a line there, mdiep. 18:21
cwest huh.. mine is:
Compiling Help ( src/Help.hs, src/Help.o )
/tmp/ghc13133.s:7073:Unknown pseudo-op: .subsections_via_symbols
make: *** [pugs] Error 1
mdiep my client doesn't seem to sending the lines
cwest gcc 3.3, ghc 6.4, mac os x 10.3
mdiep \/usr/local/lib/ghc-6.4/include/HsReadline.h:5:31: readline/readline.h: No such file or directory
this is while compiling Unicode 18:23
theorb Odd. 18:26
The former sounds like it's compiling for the wrong arch, the later sounds like it's not got a full readline install.
Corion Can anybody in Haskell-land tell me where the subroutine "words" comes from ? Is it some Parsec thing? It seems that that subroutine is not stripping the correct whitespace, but I can't find its definition 18:29
theorb I think it's in the Prelude. 18:30
www.haskell.org/onlinereport/prelude-index.html 18:31
erxz_paste "ninereasons" at 199.107.164.126 pasted "being expressive in perl6" (20 lines) at erxz.com/pb/659
cwest no full readline. I saw a warning about that during compile.
I didn't think anything of it.
Corion theorb: Thanks. So words() is broken, as it splits on " "... How imaginative :) 18:32
theorb On Char.isSpace, actually.
But yeah.
ninereasons I'm having trouble sorting %taunt on values in the example above. Am I running into a bug, or my ignorance? 18:33
Corion theorb: Ewww. I was just hoping I could punt by using isSpace. But that won't work then. So I'll hardcode my list of five whitespace characters then ;) 18:34
ninereasons: They %taunt you :)
ninereasons :) Corion , yes.
The data structures are just different enough, that I'm having trouble finding my way through them. 18:35
roie_m Corion: angleBracketLiteral is my fault, it was meant as a hack to support %hash<something> while I figure out a way to make it interpolate.
Corion roie_m: :) Well, I'll try to hack some "smarter" whitespace handling into it :) 18:36
roie_m Since <> interpolates \q[], the whole thing has to be done in Perl and not in Haskell anyway with "split".
Which means the "words" issue is going away soon, I think.
theorb doesn't see how the one follows from the other. 18:37
roie_m You might want to say %hash<\qq[$a]>, where $a contains more than one word. 18:38
Juerd roie_m: Does <> really interpolate anything?
roie_m It should interpolate \\, \> and \q[], according to S02, unless that changed.
Corion I don't think that <> interpolates. {} interpolates.
Juerd I thought that was <<>>
Corion: {} holds an expression... It can hardly be called interpolation.
Corion %hash{foo} is $hash{ foo() } in Perl5. 18:39
ninereasons i would like at least that %hash<'groups of words'> would work, roie_m
Juerd That's not interpolation, Corion
roie_m Juerd: I understood that <<>> interpolates everything, like qq
Corion %hash<foo> is $hash{foo} in Perl5
Juerd: Err, true.
theorb <> interoperlates.
hlen i like the new syntax
theorb <<>> did not, until it got removed and changed to <>.
Juerd hlen: Now that we have <>, I like it.
roie_m ninereasons: I think that's %hash<<'two groups' 'of words'>>
ingy anyone free software to read a word doc on a mac?
Juerd hlen: I hated having to type %foo<<bar>> or %foo{'bar'}.
ingy: NeoOffice, an OOo-port. 18:40
hlen Juerd, indeed, i feel the same way
theorb <> interoperlates slightly differently then everything else, though.
mdiep ingy: TextEdit?
ingy thanks
Juerd theorb: than
theorb First you split, then you interoperlate, not the other way around.
ninereasons that would be alright with me, roie_m
Juerd theorb: Ah, much like shell arguments.
theorb $foo = 'foo bar baz'; @foo=<$foo>; +@foo == 1
Juerd theorb: foo "bar baz" bar
roie_m theorb: Larry Wall just said the opposite on perl6-compilers yesterday :-)
mdiep << >> interpolates first, then splits
theorb Right.
Juerd But, does this mean <foo "bar baz" bar> and <foo \q[bar baz] bar> work alike? It'd be consistent and useful. 18:41
theorb Hm, Rule 1.5 says that whatever Larry said more recently is right.
roie_m Did he say anythign since yesterday?
Juerd: No, I think <foo \q[bar baz] bar> = qw/foo bar baz bar/
castaway grins
roie_m <foo "bar baz" bar> = ['foo', '"bar', 'baz"', 'bar'] 18:42
<<foo "bar baz" bar>> = ['foo', 'bar baz', 'bar]
Don't know if the second element should be with or without the ""
theorb He must have changed his mind again, then.
ninereasons the first is the way that pugs works now - so it appears that autrijus agrees with your interpretation, roie_m 18:43
roie_m Yes, I do, it's without.
Juerd roie_m: That'd be utterly useless.
roie_m ninereasons: The first what? I lost you. 18:44
Juerd roie_m: It just means it ignores the \q[] part of it.
ninereasons <roie_m> <foo "bar baz" bar> = ['foo', '"bar', 'baz"', 'bar']
roie_m Juerd: Of course. Interpolating \q[] into '' or into <> is useless. The magic is when you interpolate \qq and such. 18:45
ninereasons: Yeah, I wrote that, not autrijus.
r1988
ninereasons my %h = <a 1 b 2 c 3>
%h<a "b c" c>
('1', undef, undef, '3')
that's what I mean, roie_m ; pugs wrote that 18:46
roie_m Yeah, but I wrote the code in pugs that does that, so it doesn't mean that autrijus agrees with me.
theorb When pugs and Larry disagree, Larry is right. 18:47
ninereasons ah - I see what you mean by "I wrote that" -- sorry
theorb (See rule 1 -- when anybody and Larry disagree, Larry is right.)
roie_m I think they agree in this case, though. <> is the same as perl5 qw// 18:49
perl -e 'print join ";", qw/a "b c" d/'
and <<>> interpolates stuff.
But I could be wrong
theorb Hm, he had a significantly different thinking when he did the great <<>>/<> swap. 18:50
Corion Hmmm. Aren't True and False the stuff that a function argument to filter() should return?
theorb But he may have backed down from that.
Corion Or is 0 and 1 the stuff to return?
theorb I think true and false are.
IE undef, "", or 0, and anything else.
Corion theorb: true / false or True / False ?
theorb: Ah.
theorb Last I heard, we didn't have a True and False.
mdiep << >> interpolates. < > does not. 18:51
roie_m theorb: Where/when did that happen?
mdiep true and false are bit enums, I believe.
theorb sighs.
mdiep but they're not canonical true and false.
they just return true and false values.
theorb When I say things like "last I heard", it means that it's a vauge memory without a source. 18:52
autrijus greetings.
I just saw some commits.
where is it said that \xA0 splits <> ?
nothingmuch hola autrijus
mdiep so `say 'boo' if ($val != true) and $val;` will print "boo\n" if $val is a true value not equal to a bit value of 1
Corion autrijus: \xA0 is Unicode whitespace AFAIK 18:53
autrijus roie_m: thanks for the wonderful implementatoin
Corion: it's also specifically "non-breaking"
roie_m theorb: No, I meant the <<>>/<> swap.
autrijus so I think I need more context before doing something P5 does not.
Corion autrijus: Ah, so that special case is out. Cool :)
autrijus ok. I fixed your test and roie_m's code. that test now passed :)
roie_m++
Corion++
Corion autrijus: Bah - you're ruining my fun! :-)) I've also almost fixed it. :))
autrijus sorry... :) 18:54
Corion but I will try to finish my patch and then svn up to see where we differ :)
autrijus feel free to check in a better fix
I just called split()
yeah.
Corion autrijus: Bah - cheating through knowledge of Prelude :-) I faked it in a way uglier method (by post-filtering the output of words() :) )
roie_m autrijus: Thanks, that makes sense. I've been racking my brains about that. 18:55
autrijus Corion: actually, p5 I think at first just called split() also
then was rewritten to use the correct way
thus saving needless function calls 18:56
Corion autrijus: I forgot to look into the Prelude for stuff I'd use in Perl :)
autrijus so by all means override my change :)
"words" is correct
Corion autrijus: Ah, you're using Perl6.split() and not Haskell.Prelude.split() ?
autrijus yes, I'm using perl6 split.
Corion autrijus: Tricky! :) 18:57
autrijus and a regex that's called :P5/\s+/
;)
yeah, so by all means override mine :)
theorb I think p5 still uses split, it just does it at compile-time.
autrijus ah. makes even more sense. 18:58
you can of course do the split at compile time also
by directly using RRegex.Syntax
it's even spelled as =~ :)
theorb Shouldn't that be ~=?
Corion theorb: Haskell is prefixing the /= , so it would be /~ too :)
autrijus looks at theorb funny 18:59
Corion (and by inference, =~ :) )
I prefer ~~
theorb too, Corion.
autrijus theorb: it's =~ in p5... I think RRegex just used that
and the author even makes it context-sensitive also.
theorb Ah. That'd explain the funny look.
autrijus actually, having more contexts than the p5 one.
Corion How do I cast a VStr to a String ?
theorb fromVal, I think.
autrijus you can't. 19:00
theorb Oh.
autrijus well, you can use the "id" function.
Corion autrijus: Mmmhmm
autrijus type VStr = String
a VStr is just a String.
theorb Oh, so you don't need to; haskell will just use it.
autrijus now, if you are asking how to cast a (VStr "foo") :: Val
into "foo" :: String 19:01
Corion autrijus: Ah. But GHC thinks that they differ ... So I have an error somewhere :)
autrijus then yes, fromVal when you're inside a monad, and vCast
they you're out.
I think in your case, vCast works better.
vCast (VStr "foo") :: String # "foo"
but note vCast infers the casting depends on the context, so
vCast (VStr "foo") :: Int # 0
etc.
mm, I'm writing haskell, I should've written -- instead of # 19:02
Corion autrijus: Yeah, I've seen much vCast voodoo 19:03
autrijus and there's also castV :)
theorb realizes a half-hour later that Corion may have been talking about a haskell function filter and not a p6 function filter. 19:04
Corion theorb: Yep - I was talking Haskell, sorry :) Perl "filter()" is called "grep()" :)
theorb Yeah. 19:05
theorb is stupid sometimes.
nothingmuch bets he is usually stupider 19:06
autrijus poll: 19:07
I like rx:P5// a lot.
nothingmuch raises hand
autrijus I'd like to propose that we unify the current
Corion I like rx:p5 better. 19:08
autrijus :Perl5, :p5, :perl5 usage to it.
Corion P5 is ugly for my eyes.
autrijus Corion: but first, it's not in the spec anyway
obra sort of prefers p5
nothingmuch i prefer lc p5, actually
it's easier to type
autrijus and larry said that it confuses with rx:p (parsed)
nothingmuch not that we'll be typing it in an ideal world =)
autrijus and finally, I sort of think
rx:P5<ms>/.../ 19:09
obra actually, :perl5 will make :php5 and :pcre5 and :python5000 easier to look sane
autrijus reads better than rx:p5<ms>/.../
castaway hmm, me for :perl5
and not capitalised, either way
theorb The thing is that all of them are a subset of perl5, AFAIK, obra.
autrijus okay. thanks for responding to this poll :)
obra though, rx:p5 looks like line noise
autrijus I think timtowtdi :D
obra theorb: not quite ;)
so. rx:p5 is most in the spirit of perl5
Corion autrijus: Ugleeeee ! rx:perl5 if you must, but I still prefer rx:p5. No matter what @larry.say()
autrijus I'll write :P5 for now, but :Perl5, :perl5 will still all be recognized.
obra er. rx:P5 maybe ;)
nothingmuch rx:perl5 is also nice
i agree on <ms> readability, it looks more like a unit 19:10
theorb assumes autrijus meant to include :p5 ?
autrijus theorb: I'm not that sure about :p5. I won't drop it right away
nothingmuch theorb: no, @larray.say() eq "bad"
autrijus but its inclusion is a mistake
so maybe I should've dropped it
i.e. it was :perl5 only for a long time 19:11
and :p5 only added accidentally yesterday
obra what does rx// do?
autrijus obra: qr//
obra without the perl5 flavoring.
ah.
which syn should i read for p6re?
autrijus 05
obra k
autrijus so I think: drop :p5 since it's never meant to be there 19:12
preserve :perl5 because what's what t/ ext/ currently uses
(and it's still in the synopsis)
mdiep autrijus: Compiling Unicode ( src/Unicode.hs, src/Unicode.o )
autrijus and allow :Perl5 and :P5 because of @larry.say
mdiep In file included from /tmp/ghc7730.hc:5:
/usr/local/lib/ghc-6.4/include/HsReadline.h:5:31: readline/readline.h: No such file or directory
Corion I think I've been using p5 for a long(er) time. But a s!:p5!:perl5! is quick to do
autrijus Corion: ok. sorry for that
mdiep: manually comment out readline support
in src/pugs_config.h 19:13
theorb thinks p5 is the shortest to type, and I'm not clear on what the problem with it is -- anybody have a reference?
autrijus theorb: yes. www.nntp.perl.org/group/perl.perl6.compiler/576
mdiep src/pugs_config.h: #undef PUGS_HAVE_READLINE 19:14
autrijus argh!
someone added something that should not have been added.
nothingmuch: the existence of the readline packages implies nothing about its usability 19:15
and ghc --make can figure out the neccessary package anyway.
mdiep waits calmly for autrijus' fix. (shouldn't be more than a couple minutes, right? ;-)
nothingmuch autrijus: rindolf said that -package readline was necessary
for it to work
autrijus for "make" to work?
nothingmuch i don't recall it not working earlier
for pugs to have readline support 19:16
this was really a naive fix with no bg checking, just logic
i'm sorry if i screwed things up
erxz_paste "ninereasons" at 199.107.164.126 pasted "being expressive in perl6" (35 lines) at erxz.com/pb/660
autrijus no need to be sorry :)
next time ask for a specific error lgo from rindolf :)
ninereasons is the above a reliable way to do what I want?
Corion Let's ban rindolf here as well :)))))
autrijus Corion: no :)
Corion autrijus: :) 19:17
autrijus mdiep: fixed, svn up and rerun makefile.pl
mdiep heh. thanks! :-)
nothingmuch Corion++
=)
autrijus hrm, what does "want" stringify to in p6? 19:19
the name of the context?
nothingmuch yup
autrijus cool... let me implement that...
...done
nothingmuch i'd say look at search.cpan.org/perldoc?Want for inspiration 19:20
on it's naming scheme
it's based on a damian RFC
(/me should stop doing that stuff ;-)
(Btw, i am not authoritative, ever, all my "yes" etc are only opinions)
autrijus no-one is authoritative here :)
nothingmuch let it not imply that i've actually checked anything
autrijus (smart mobs)++
nothingmuch =)
autrijus ok, want() is in. 19:21
nothingmuch woot woot dance woot dance
damn Test::Distribution
Corion We have want ? Cool!
nothingmuch i don't know how to disable pod coverage, so i'm just documenting everything
castaway makes a note to say "yes" to things she'll like, whether known or not ,)
autrijus Corion: just the string form of it :)
nothingmuch the problem is that If i learn i won't document it
Corion autrijus: Close enough!
autrijus heh, it's just 3 lines 19:22
op0 "want" = const $ do
cxt <- asks envContext
return $ VStr cxt
Corion autrijus: Err - where did you put your whitespace fix? I tried to put my fix into angleBracketLiteral(), but it didn't work there.
nothingmuch wonders if he should rent a bass in YAPC::NA
autrijus Corion: in qLiteral
nothingmuch for the duration of the hackathon at least
autrijus case qfSplitWords flags of
'y' -> return $ App "&prefix:\\" []
castaway should actually register...
autrijus etc
Corion autrijus: Ah - so I've been barking up the wrong tree all the time :)
autrijus: I already did a svn up, so I can see it now :) 19:23
autrijus: Mind if I put my Haskell code in place of your call to Perl5.split() ? :)
autrijus sure I mind. I'd be delighted :) 19:24
Corion autrijus: Except, that you're using the GenParser monad, and I have a plain function. But I guess some [ App ...] magic will fix that.
autrijus a plain function in p6 space? 19:26
oh no, in haskell space.
Corion autrijus: A plain function in Haskell space
autrijus in that case... hrm 19:27
are we interpolating before splitting?
nothingmuch Test::TAP::Model released
on a cpan near you eventually
Corion autrijus: No, IMO not (qw() doesn't interpolate in P5 either)
nothingmuch or darcs get nothingmuch.woobling.org/Test-TAP-Model
kungfuftr has plans for it, stay tuned
autrijus in that case you can just case analyze expr
and assume it's a (Val (Str x)) 19:28
and then apply your function to x.
theorb Oh, that reminds me: were you planning on doing that renamming, or did you want me to? 19:29
nothingmuch renaming?
nothingmuch has not quite really uploaded to pause yet, so please speak up if it's got to do with it 19:30
theorb No, renameing src/* to src/Pugs/*.
nothingmuch h 19:31
ah
nothingmuch clicks button
autrijus theorb: I think it's the right thing in the long run
theorb: so if you can do that, I'd be very grateful 19:32
(as it's 3:32 am now and I'm about to sleep)
theorb Oh, right.
castaway silly timezones 19:33
theorb G'night, Autrijus.
nothingmuch good night
theorb Corion: \xA0 should /not/ split (it's a /non-breaking/ space). 19:34
Corion theorb: Yep
Eh... Weird - I think my test is somewhat broken :) 19:37
(no, stupid programmer error, as always) 19:38
ninereasons will it always be necessary to predeclare subroutines? 19:45
or does that just indicate the present stage of development?
nothingmuch kungfuftr: ping 19:48
Corion ninereasons: I guess it's just the current state, as we also need parentheses around many things 19:51
castaway ooh, Max, your namesake is on tv tomorrow ;) 19:52
Corion castaway: My namesake ? Max Headroom ? Mel Gibson ? 19:53
castaway Mad Max ;) 19:54
Corion castaway: Ah, Mel Gibson ;)
castaway which reminds me, how does one pronounce your surname?
Mai-schein or Mais-chein?
Corion Maybe Shine
(in Haskell, that is)
Mai like the month, and shine like the sun :) 19:55
nothingmuch woo! rsvp for hackathon accepted!
castaway nods
theorb Cool, nm!
castaway pokes theorbt
theorb needs to figure out how to pronounce Yuval now.
castaway Yoo-val ? 19:56
Corion Juh-Wahl
nothingmuch i can record it
i think i have a mic on this puter
theorb chuckles.
castaway oh, that hard?
theorb "Hello, my name is Yuval Korgman, and I pronounce Pugs 'Pugs'." 19:57
nothingmuch no, but most most americans tend to make it sound hungarian
nothingmuch thinks of imitating linus 19:58
heeiloo, my name is youvaal kougman, and i pronounce linux as 'linux' 19:59
castaway hmm, and how the linux?
nothingmuch www.paul.sladen.org/pronunciation/t...-linux.mp3 20:00
castaway ah, good
nothingmuch when I was in finland people mostly shut up
nothingmuch couldn't get any accents at all
except for some american biologist who was also at that station
and people in norway 20:01
(2 of which were immigrants, one (a hitchhiker we picked up) was drunk)
the only scandinavian accent I really picked up is the swedish chef
stevan you mean we are not going to call each other by our IRC handles?
nothingmuch stevan: i don't mind that 20:02
Corion stevan: :))
theorb So long as Schwern doesn't call me "theo".
stevan theorb: :)
nothingmuch in fact, I have a name tag from y2hack which has only 'nothingmuch' on it =)
Corion theo: Why? Aren't you called Theo Ralph Brown ?
theorb is not. 20:03
nothingmuch wonders if he has any cigarettes left
castaway hopes not ,)
gaal we could have the AUTHORS file link to wavs where people say their names as pronounced in their native languages.
theorb That's not a bad idea. 20:04
gaal nm: why did you add my name? :)
Corion Hmmm. Pugs test now hangs on t/pugsrun/06-dash-version.t ... Weird ...
nothingmuch hops off to the gas station
gaal: because i like unicode ;-)
btw, Test::TAP::Model released
theorb wonders if that's really supposed to be an apostrophy in nm's name.
nothingmuch apostrophy? where?
oh, that 20:05
yes
we call it a chupchik
קו is ku
ג' makes ג, a G sound into a j sound
מן is man
americans had lots of trouble with kujman 20:06
so that was naturally softened up to kogman
gaal netgreps for bo2
theorb suspects there is a correct char for chupchik, but that's not it. 20:07
theorb shrugs.
nothingmuch i only know of the one under w in a hebrew layout 20:08
Corion TorgoX's JavaScript sliderule might help
gaal nm, did you know hebrew has its own traditional quotes? hardly anyone uses them nowadays 20:09
,,like this''
nothingmuch yeah
gaal i *like* them
nothingmuch i remember old mac word processors (ravktav) would do that
gaal in the rare chances i get to write with a pen, i try to do that. 20:10
nothingmuch never remembers
not that my hand writing is legiable either way
castaway German uses those ,)
nothingmuch which is very sad, considering how much i actually write in a pencil
nothingmuch never reads what he writes
and once a month cleans up about 20 pages of scribbles from his desk 20:11
A3 ones
theorb wonders if hebrew is as hard to read has it looks.
gaal hebrew proably got it form german then
theorb Er, s/read/write legibly/
nothingmuch there are two forms
theorb Wow, I have to fold an A4 sheet in half to find space to put it on my desk.
I know, serif and sans.
nothingmuch we call them 'print' and 'writing'
the one you see on your screen are print like 20:12
gaal wow, i was just surprised by something. any chinese spekers on now?
nothingmuch they are very hard and annoying to write in a pretty way
gaal speakers, sorry
nothingmuch most of the handwritten letters are one or two strokes, though
and still quite legiable
theorb Oh, cool. 20:13
nothingmuch (unless i'm writing them ;-)
gaal arabic=beautiful
harder to learn though
nothingmuch anyway, cigarettes 20:14
or rather singular
gaal the writing system, i mean
nothingmuch never got along with arabic
maybe if you come to YAPC::NA we can do a semitic script workshop?
semite?
gaal yay :)
get me a sponsor too :)
nothingmuch ask stevan to give you a job =) 20:15
nothingmuch will work weekends and evenings to get that done
you, OTOH, will pretend-work from prison ;-)
gaal it
's in the end of june, right?
nothingmuch yup 20:16
gaal your bday, right
nothingmuch yup
22nd the hackathon starts
27th YAPC starts
29 YAPC ends, and I celebrate bday
Corion bday == boozeday? :)
nothingmuch birthday 20:17
gaal exactly right, Corion
nothingmuch boozeday is every friday
gaal lol
Corion nothingmuch: Ah, just like in the office :)
theorb wonders what the drinking ages are in .il and .ca.
nothingmuch well, almost every friday
gaal 18 here
nothingmuch Corion: ah, yes, there's drinking in the office too
theorb Somebody was looking for a chinese-speaker?
nothingmuch sometimes has beer for lunc
but only one
gaal i was
nothingmuch beer makes me tired
Corion I sometimes work. Work makes me tired. 20:18
theorb Hm, anybody know what {-# SOURCE #-} is in a import {-# SOURCE #-} foo ?
Missed your chance.
autrijus theorb: oh btw
theorb lives. Life makes me tired.
Um, aren't you asleep, autrijus?
Corion autrijus: Awake already again?
autrijus theorb: please keep IMC and Unicode and UTF8 and RRegex and pcre in the same place 20:19
nothingmuch theorb: IIRC it's got to do with recursive usage between modules
autrijus: aren't you supposed to be sleeping?
autrijus since they are "external"
theorb Ah, OK.
autrijus the {-# SOURCE #-} refers to a mutual recursion import.
it says "import from .hs-boot"
nothingmuch autrijus: john replied with "ok"
Corion ... or maybe he just has a command line irc client and sets up at(1) or cron(1) jobs :)
theorb Oh, OK.
autrijus nothingmuch: woot
nothingmuch =)
gaal how do you say "wave" in mandarin? i was under the impression it was bo2, but this says something else: cgibin.erols.com/mandarintools/cgi-...;whatchar= 20:20
ew, sorry about the long url
sea wave, that is.
autrijus it's "hui1 shou3".
gaal thanks, autrijus
autrijus ę® is wave
ninereasons perlbot shorten it
autrijus ꉋ is hand.
gaal that's entirely not what i thought
autrijus (utf8)
perlbot Shortened URL: snipurl.com/e1kr
gaal oh, sea wave 20:21
Corion Hmm. Weird. FireFox did display the hebrew writing, but not autrijus' writing. Maybe I need to install more fonts ;) 20:24
theorb Install them all and God will know his own. 20:25
autrijus wishes leo luck. 20:26
theorb is on kterm, and nothing shows correctly except ASCII.
autrijus (he have just gone offline, with freshly downloaded GHC 6.4 and new makemaker)
castaway just read "Adults", "Minions", "Seniors".. (on a travelagent site) 20:27
clkao hmm. i can imagine some nonsleep 48hours hacking over the weekend
nothingmuch sounds like you're going to have a very exciting flight
autrijus: your sleep is important to pugs 20:28
and your health
or actually, your health is important to pugs
clkao he is not healthy anyway
more hotsprings needed
Corion Ugh. pugs -e "for (any< -v --version>.values) -> $v { say qq|*$v*|}" # is a bug, is it ? 20:29
autrijus and more mountains!
nothingmuch we need more of them in israel 20:30
Corion (and I think it stems from the behaviour of split() :)
nothingmuch mountains++
although having the deepest hole in the ground is also nice
autrijus no it is not.
pugs -e 'for (any(< -v --version>).values) -> $v { say qq|*$v*|}'
works fine.
thing is that any() is listop
so you can't fake <> as parens.
Corion autrijus: Aaah.
clkao autrijus: when can i write real classes with pugs? 20:31
autrijus clkao: you already can
castaway WIR
autrijus schwern just did
but you have to learn haskell
clkao good.
no
good
autrijus perlland classes lands perhaps next week.
clkao i guess i'll polish patch dependency crap or svk-lite for the weekend
autrijus if you just want polymorphic type-based invocation
then that's easy, we already have MMD, we just need bless() 20:32
or "my Class $foo"
if you need more than that, it's going to take a couple weeks.
pjcj t/pugsrun/06-dash-version.t seems to be hanging for me - known problem?
nothingmuch autrijus: give me a haskell task idea
i'm sick of p5
Corion Endless loop for anyone else? pugs -e "say +(any(< -v --version>).values)" # doesn't finish for me 20:33
autrijus here too.
nothingmuch same
Corion And that's a bug: pugs -e "my @l = < -v --version>; say +@l" # should say 2, not 3
autrijus they are all bugs.
nothingmuch: a haskell task -- fix those bugs :D
but if you are looking for "fun" tasks, implement @*CWD maybe. 20:34
Corion nothingmuch: Easy - just fix the call to Perl.split() to strip whitespace at the front and back of the string before splitting
autrijus or help theorb in doing eval_haskell""
Corion Actually, I'll go and try to do that myself ...
nothingmuch eval_haskell sounds a bit too much for me 20:35
but i'll try for the split as soon as i have some nicotine in my blood
Corion autrijus: While it's nice to have you around here, you should sleep ;)
autrijus: Should I make the infinite loop into a test?
(or golf it down further?)
gaal Corion: add watchdog capabilities to the harness! :) 20:36
Corion gaal: Ha ha. :)
theorb eval_haskell should be pretty easy once the rename goes through.
autrijus Corion: you want to implement alarm() as async{} + thread.kill ?
Corion: but sure, make it into a test and fix it :) 20:37
Corion autrijus: Ah, that would be a way, yes. No, I'll look at making your Perl.split() code perform more work ;)
nothingmuch Corion: shouldn't be hard, the harness is p5
gaal can you do that so it works on windows too, autrijus?
wow
Corion adds the test.
autrijus gaal: sure, haskell concurrency is da bomb.
it's actually faster on win32 as well.
(lightweight threads)
unlike a certain ithreads. )
gaal heh
nothingmuch ithreads--
not usable at all
for anything threads are good for
(except emulating fork) 20:38
gaal how do you kill the kill (that is, do alarm(0)?
castaway ithreads++
autrijus gaal: just by modifying some shared variable 20:39
nothingmuch castaway: why?
autrijus i.e. the async{} decs the var every 1 sec
and kill the kill sets it to -1
thus never triggering 0
there are other ways possible. 20:40
gaal and joins when it sees "please die" signalled
ok
castaway im2threads++
gaal now, what shoufdl the alarm do, send a sigalarm to $$, er, $?PID ? 20:41
nothingmuch Test::XML::Simple++
gaal or can we do better than that and avoid unix signals?
Corion I'll add the infinite loop test and then look how to fix the harness, maybe. I think the harness has a (built-in) capability for timing out tests.
CPAN.pm seems to use that functionality from what I remember.
nothingmuch *poof* 20:42
gaal Corion, i don't think so. Straps.pm:285 20:43
Corion Hmmz
gaal is trying for alarm() in pure perl - but still doesn't know what to do when the alarm actually soudns 20:46
theorb SIGALARM, or at least $SIG{__ALARM__}
gaal kill $$, 14? 20:47
Corion adds another (broken) test
gaal except the other way around? :)
we don't have kill though, do we 20:48
ok, i'll try to add it if it isn't there yet
theorb Probably shouldn't hardcode that 14.
Adding in kill would be nice in any case.
gaal if your system doesn't have ALRM at 14, well, it deserves a random signal :) 20:49
j/k
Corion Hmmm. Is there any nice'n'easy way to see the Haskell AST for Perl6 code? Like -MO=Deparse / -MO=Terse
... I want to do some nasty/dirty AST embedding to fix the leading whitespace in qLiteral()
gaal Corion: . in interactive pugs 20:50
Corion Ah. pugs -CHaskell
gaal: Oh. I should try that, one day :)
pjcj Corion: I don't think you can see it all, but see Pretty.hs
Corion gaal: No, . doesn't display anything for me. SHould it go onto the same line as the Perl code? 20:51
autrijus Corion: just pugs -C 20:52
Corion Ah. Not after the code, but before it :)
ingy theorb: is SHA1 all working as originally written?
autrijus ingy: yes!
SHA1 all works as originally written.
Corion autrijus: No, doesn't work...
theorb It was for a bit, but is not now.
Or will not shortly.
ingy ?
autrijus ingy: it works in 6.2.0.
theorb We should move it into core and write tests against it.
autrijus theorbtwo is assing eval_haskell() as well.
Corion But -CHaskell works, it seems.
theorb I'm in the middle of renaming everything. 20:53
autrijus but anyway.
Corion: you really want -CPugs
Corion: you really don't want -CHaskell :)
Corion So I will embed the AST, just like autrijus did. I'm hacking like the pros already :)
autrijus: Will try that then ;)
autrijus Corion: also "make ghci" and then type
castaway mm, roundtrip, 2100 euro *per person*, no thanks, opodo
autrijus parse "arbitary code"
Corion Hmmm. Empty output with -CPugs.
autrijus: Ah - will make ghci then ;)
autrijus Corion: eh, look at dump.ast 20:54
ah, you are using the "error message" in -CHaskell
as the AST
clever
Corion autrijus: I'm stupid :)
autrijus: Yes - I realized that I've looked at dump.ast in other situations already :)
autrijus ok. as fun as it is, it's 5am now :) 20:55
journal up, and I should sleep. 20:56
autrijus waves &
rock on lambdacamels! :)
theorb G'night (again).
obra night autrijus
Corion (Is he asleep now? I don't dare mention his name, lest he wakes up again) - we don't have @list = ($foo ~~ rx:perl5:g/(x)/) # have we ? 21:01
D'oh - we have - I was just too stupid :)
clkao you can use a u t r i j u s
Corion clkao: :)) 21:02
clkao win36
nothingmuch castaway: what is 2100 euros?
gaal sujiraut sounds nice too.
castaway lotsa money ,)
nothingmuch i meant who wants you to pay that much?
Corion 2k Eur is quite a lot indeed. YAPC::E is 300 EUR (for the flight)
castaway opodo.de, a travelagent 21:03
Corion nothingmuch: Opodo for the flight to YAPC::NA / Pugsathon I guess
nothingmuch ah
i didn't know who/what opodo was
castaway sorry.. MUC->PHL->XXY->MUC
nothingmuch anybody know a cute XPath cheat sheet? 21:04
castaway the XPath spec? ;)
gaal yes: zvon have a great resource
www.zvon.org/xxl/XPathTutorial/Gene...mples.html
nothingmuch beh, q and w are too close together 21:05
gaal that's so you can say :wq quickly
nothingmuch gaal++
theorb thinks w and q are exactly where they belong. 21:06
(May God save us from azerty.)
nothingmuch :wq is useful
but cmd+q instead of cmd+w (which doesn't happen very often, but happens) is annoying
theorb sighs. 21:07
(I want my keyboard and mouse to arrive, so I can actually use my mac.)
nothingmuch theorb: any usb keyboard/mouse should do
gaal if i say $x-- err say "moose", and $x was undef: (a) does moose get said? (b) does a warning get emitted? [i hope: yes, and no.] 21:08
theorb It's an ADB mac, nm.
nothingmuch oh my 21:09
and you expect to run OSX on that?
theorb gaal, I'd expect $x-- to set $x to -1, and return undef.
Yes, nm.
nothingmuch good luck
which kind?
beige g3?
theorb I checked the requirements first.
G3/266.
Yup.
nothingmuch doubts they will be supported for long
castaway t doesnt have to run fast, just run ,)
theorb It may not run it /fast/, but it should run it.
OTOH, I have plenty of RAM that should work in there. 21:10
nothingmuch many times i see "requires a mac with builtin USB"
that's where my pessimism is from
ram is very useful
theorb Hm.
nothingmuch gets along very well with 1gb of ram in a mac with 400mhz
gaal and no warning, right? like p5
Corion Yay! My first AST transplantation seems to work! I am the king of AST! :-))) 21:11
nothingmuch gaal: i would say that no warning
otherwise you can't just $i++ from anywhere
either way, it's useful behavior, i rely on it a lot
you have to predecalre
when you 'use sloppy'
or wait, you don't get warnings that way
Corion (compiling Perl code to AST, just to paste it back into Haskell is a bit backwards. But I kept the Perl code as a comment :) )
gaal i know how it is in p5 :) just checking with p6 21:12
nothingmuch is giving an opinion on what p6 should be like =)
theorb Well, Tiger says it requires a G[345] with builtin firewire. 21:13
But I wasn't planning on using Tiger with it.
nothingmuch tiger should be funky
but panther is good too
theorb ...and I'm fairly certian I checked fairly well before I started this escipade.
I've got a copy of Panther.
nothingmuch btw, in theory if you have enough ram you should be able to do tiger too 21:14
there's a project to allow running of OSX on older hw 21:15
i don't remember what it's called though
crysflame is waiting for Tiger.
Corion Now, < a b c > is implemented as @list = rx:perl5:g/(\S+)/ # I wonder what border cases I've missed. Like \xA0. 21:16
Juerd crysflame: What about it convinces you to want it?
nothingmuch Corion: i think it's good
because it's well defined
Juerd Corion: It *shouldn't* split on \xA0, because \xA0 is *non breaking* space...
nothingmuch but <<>> isn't so simple 21:17
Corion Juerd: Yes. I don't know if \xA0 counts as \s or not.
Juerd It doesn't in Perl 5, and I think that's a good idea.
It's not whitespace in practical sense, it only renders as such.
Corion Juerd: And, as \S is the complement of \s, that will affect it as well (see my implementation, above)
nothingmuch due to shell quoting behavior
crysflame Juerd: the price. 21:18
Juerd Corion: But this is a good one for p6l, I think.
"the price"?
crysflame yes. it's the hardest answer to argue with i could think of. :)
Juerd crysflame: Do you have Panther now?
Corion Juerd: Feel free to bring it up - I'm not subscribed. There is a test for it, but I can't find it, even though I've written it some hours ago.
Juerd Tiger doesn't really add much, does it?
crysflame Juerd: yes.
i don't know. i haven't seen it yet.
nothingmuch Tiger's cool features are supposed to be the searching caps and apis 21:19
i think that's the only thing i'm anticipating
Corion Juerd: t/syntax/list_quote_whitespace.t - feel free to add a correct link into the relevant Apocalypses/Synopses 21:20
crysflame oh, right
i'm totally thrilled about Mail.app
as it may be stabler and faster
nothingmuch Corion: there's quoting.t that tests for some stuff like that
crysflame if the trend is holding true
nothingmuch i doubt faster
(with my mail loads at least)
Corion nothingmuch: Yep... I should merge the other test with it maybe (I've also added a third type of tests to quoting.t already) 21:21
crysflame spotlight will make it wildly faster
note that i'm not defining faster
Corion nothingmuch: But myself, I prefer short test files ...
Juerd crysflame: Ah, I don't use client side mail :)
nothingmuch Corion: i don't mind short of long, as long as checks for the same things are together
Corion nothingmuch: Hmmm - you're right - I should maybe move my test from t/syntax to t/operators 21:22
Corion moves
nothingmuch Corion: that's not really what I meant... arguably it's both syntax and an operator
crysflame: if it handles my 16000 msg inbox like mutt does (which is bordering on OK) then I might use it
Corion nothingmuch: So what was your idea then ?
nothingmuch i just don't want checks for the same thing in two files 21:23
either old stuff from quoting.t moves out if it's bloated
or new stuff merged in
Corion nothingmuch: Ah, no. The checks check different stuff.
nothingmuch nothing fancy
Corion The quoting.t change now checks that < a b c > gets three elements too.
nothingmuch what about texas quotes + shell quoting?
that is very related to the handling of whitespace in < > 21:24
Corion the syntax/list_quote_whitespace.t checks that \r \n \t and " " get treated equally.
texas quotes ?
nothingmuch texas quote: <<
french quote: Ā«
ascii equiv of french quote
Corion nothingmuch: Ah, I think that code waits for unification with the rest of the quote...
Ah.
crysflame nothing: yep, i'm on that page as well 21:25
Corion Is gaal adding timeout support ? 21:27
Corion scrolls upĆ¼
gaal is 21:29
Corion gaal++
Limbic_Region wonders who was working on sleep()
Corion (so I don't have to worry about the infinite loop I committed :) )
gaal though i got a weird parse error on something basic
oh, we don't have sleep? :)
Corion Limbic_Region: I was, for some time, until I realized I lack the knowledge to make sleep() return the count of seconds slept. 21:30
gaal i took a detour to add kill
Corion But sleep() works, otherwise
nothingmuch gaal: can you try to backport to Test::TAP::Model?
gaal backport what
Limbic_Region speaking of which - /me needs to find a thread
nothingmuch i have a revision of yaml_harness, but i'm not checking it in till Test::TAP::Model is mirrorred by CPAN
backport the harness fix
gaal what fix?
Corion Gah. I think my "fix" broke junction parsing. Or something other... Great ... 21:31
... because all OS specific tests now fail on Win32, which tells me that the if $?OS ~~ any(<foo bar baz>) # is not working anymore.
theorb hmmms. 21:32
Limbic_Region Corion - see this node by Larry WRT p6 and sleep www.perlmonks.org/index.pl?node_id=435595
Corion Hah. Because the tests are using the old (and much more likable) version: any<foo bar baz> instead of any(<foo bar baz>)
Limbic_Region: no
nothingmuch hopes we have floating point granuality sleep
Limbic_Region :fractional sleep should do what you expect"
Corion, wasn't a question
it was a demand 21:33
:P
Corion Limbic_Region: Demand for what? Sleep already takes microseconds as a parameter.
Limbic_Region: Read the source.
nothingmuch: Haskell has, so we do.
theorb So I moved and edited a bunch of files on my end... how do I get this to reflect properly in the repo?
nothingmuch why does larry hide his true identity on perlmonks? 21:34
to prevent widespread hysteria?
gaal brb
castaway he hides? 21:35
nothingmuch well, not really hides
but sort of conceals
castaway no more than anyone else IMO
Limbic_Region Corion - oh, well it was a mistake on my part "return the count of seconds slept" lead me to believe they were atomic units
nothingmuch =P
maybe i don't read enough perlmonks
theorb I think it's to avoid hero-worship.
Corion Hmmm. My "fix" fixed some stuff, but broke any<foo bar baz>. Is that acceptable ? 21:36
castaway (which s the opposite reason everyone knws who merlyn is ;)
nothingmuch =) 21:37
Limbic_Region Corion - out of curiosity, if I wanted to read the source for the work you did on sleep, where would I look? 21:38
Corion Limbic_Region: In Prim.hs, and most of the work was done by shapr I think :)
gaal nothingmuch: why do you hide your identity on pm? :p 21:40
nothingmuch gaal: there is a sort of cloud of mystery about TimToadyy
it took me a long while to be sure it was him
Limbic_Region nothingmuch - really? There are enough nodes where he makes it painfully obvious 21:41
theorb not for me, nm, but I was around on the CB when he was first there.
He and Dan, in purticular.
nothingmuch oh well
castaway you could have just asked (in CB )
nothingmuch nevermind, bygons
i know now, and have for a while
and it wasn't objection
Limbic_Region theorb - Larry, Dan, and Damian IIRC
nothingmuch i was just curious
Limbic_Region was impressed 21:42
theorb So was I.
(I forgot Damian.)
ninereasons still doesn't know who I0 is
theorb A Monad?
ninereasons someone clever :)
Limbic_Region *shrug* - to be honest, I have been as impressed if not more impressed by completely unknowns then I have the big names 21:45
hlen 's been waiting for so long for the pipe operators.. =| 21:46
Limbic_Region knocks the crack out of hlen's hands and says that is not what the pipes are for 21:47
nothingmuch would like to have a private pipe operator 21:48
and err
nothingmuch had a wonderful pipe named isabelle
nothing else
and another pipe i didn't name
nothingmuch used to smoke Captain Black
honest
perlbot nopaste 21:52
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
Juerd finished his latest p6l flood 21:53
pasteling "nothingmuch" at 212.143.91.217 pasted "castaway - find in inc - looks ok?" (24 lines, 492B) at sial.org/pbot/9371
Juerd I should care less
nothingmuch My::Module -> My/Module/file.foo
Corion Bah. My fix is cool, but breaks any() ... 21:55
Juerd How can it be cool if it breaks any? 21:56
Vandalism? :)
nothingmuch Juerd: it doesn't break all(), so it could be worse ;-)
theorb Breaks any(), or brakes any<>?
castaway looks ok to me, nm
Limbic_Region or brakes any any? 21:57
nothingmuch now there's one final problem: how do you get the user to output two files?
looks like my example is going to need getopt ;-)
Juerd nothingmuch: Do users ever output files?
Corion pugs -e "say('foo' ~~ any(<foo>))" # prints nothing with my patch applied
theorb Hm, that's sad. 21:58
nothingmuch Juerd: =/
Juerd Corion: Shouldn't that be any(<foo>).pick, anyway?
nothingmuch theorb: what is?
Juerd Or do disjunctions stringify to any of their values?
Corion Juerd: Before, that worked. Before, even 'foo' ~~ any<foo> # worked
Juerd: I think they stringify to any of their values
Juerd Oh, sorry, I read ~, not ~~
theorb Sad that it breaks things. 21:59
nothingmuch things can be fixed
nothingmuch doesn't think it's very sad
Corion theorb: Even sadder that it's already committed :)
Juerd OMG - 11 posts to p6l in one day
Corion Ah - how do I enforce list context ? Is there any operator to do that? 22:01
(while still keeping my list) 22:02
I could do (my @tmp = EXPR) ... I guess that's it.
theorb list, Corion.
Corion theorb: Ah - cool!!
22:07 Limbic_Region is now known as LR|Food
Corion What would you expect to be the result of pugs -e "say +(<a b c>)" # should it be 3 ? 22:10
Compare against pugs -e "say(<a b c>)" 22:11
Juerd Corion: list context is forced with list, scalar context is forced with scalar, hash list context is forced with hash, void context is not forced with void... hmmm... 22:12
Corion: Yes.
Corion juerd: :)
Juerd Corion: (3)
Corion Juerd: So I've introduced a hellish bug with my "patch" :(
Juerd +LIST puts LIST in scalar context, making it an arrayref, of which the numeric form is the number of elements. 22:13
Corion Because either I'm applying list() wrongly, or it doesn't work to provide list context to EXPR ~~ rx:perl5:g/(\S+)/
theorb Can you find a use of the void context specifier that is not obfuscatory?
Juerd theorb: sub unpure_function ($foo) { void wouldbe_expensive_in_other_context($foo) } 22:14
Rather than
theorb: sub unpure_function ($foo) { wouldbe_expensive_in_other_context($foo); 0 }
Corion D'oh. A [Syn "cxt" [Val "str" ... node hints at scalar context, doesn't it ? 22:15
theorb Stick a "returns void" on the sub.
Juerd theorb: Okay, then I have no idea :)
22:17 LR|Food is now known as Limbic_Region
theorb curses svn. 22:29
Corion Bah. I don't find where my stuff broke, or where junction parsing does not work out... I hope you all can live with junctions currently broken in the way they are.
Good night !
theorb G'night, Corion. 22:30
Juerd That bastard is leaving us with broken junctions! ;) 22:31
gaal any lambdafolk up? 22:51
nothingmuch is up but doesn't count
i can try to help though
gaal okay, here's the deal. i'm doing kill, which in haskell is called signalProcess. 22:52
it has to go through Compat
signalProcess :: Signal -> ProcessID -> IO ()
Signal and ProcessID are both Ints, defined in System.Posix.Signals. so far ok? 22:53
theorb Yep. 22:54
BTW: That's Pugs.Compat, as of a few seconds ago.
Welcome to 2009.
gaal k, now in Compat i declare, well, compat types for these two
how do i "export" these two types? it dosen't go like functions in the module ( xxxx) where clause 22:55
theorb Are you sure it doesn't?
gaal because what i get now (wehn i do HAVE_POSIX), is
No instance for (Value System.Posix.Signals.Signal 22:56
theorb Ah.
gaal that's in Prim, not in Compat
because Prim doesn't import Posix stuff directly
so i'm missing the syntax for exporting types, i guess 22:57
rather: 23:00
that is how you export a type
but not how you, er, reexport it
ie if you don't declare it yourself but want your caller to import it.
theorb OK, the tree should build again. 23:01
theorb goes to bed, one Great Renaming later.
gaal night.
gaal wanders off to bed, killless but slightly less scared of haskell 23:06
pasteling "gaal" at 192.115.25.249 pasted "pp alarm, broken" (29 lines, 706B) at sial.org/pbot/9373 23:11
gaal zzz& 23:12
nothingmuch Test::TAP::Model 0.02 released, Test::TAP::HTMLMatrix released 23:27
oh crap, i forgot kungfuftr's improvements 23:31
kenalex what is the difference between perl and perl6 23:33
stevan nothingmuch: you should announce on perl-qa 23:48
nothingmuch i have a postponed message already written
stevan cool 23:49
nothingmuch damnit, why can i never get a 0.01 release right
stevan :) 23:50
because its 0.01
maybe try releaseing 1.0 first :)
ninereasons r2010: Warning: Module `Pugs.Internals' is imported, but nothing from it is used (except perhaps instances visible in `Pugs.Internals') 23:53
r2010: both 'make' and 'make optimized' are broken with the above error. 23:55
nothingmuch ninereasons: which repo is that?
ninereasons I'm sorry nothingmuch, it's the end of my day; what's meant by "repo" ? 23:56
ninereasons cringes
nothingmuch svn.openfoundry.org? or svn.perl.org?
ninereasons repository! svn.openfoundry.org (i think) 23:57
that's the one without trunk, right?
svn co svn.openfoundry.org/pugs/ 23:58
Juerd ninereasons: repository.
ninereasons Juerd, repo 23:59
:) now I'm cool too.