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.
Set by Corion on 15 April 2005.
nothingmuch ninereasons: ok, that rules out a bad sync of the rename 00:01
stevan thinks of Repo Man everytime people call it repo
ninereasons that was one odd movie, stevan 00:02
stevan ninereasons: it's been years since I seen it too,.. but I had a friend who loved it 00:03
would always make reference too it,.. but no one understood but him :) 00:04
ninereasons I have a bunch of \? in my 'svn stat'.. let me clean those out and try again.
stevan ninereasons: make clean will usually get rid of those
ninereasons that was the first time I'd seen emilio estavez
i think
stevan that was pre-Breakfast Club 00:05
ninereasons that's right. the loner guy. 00:06
stevan no he was the jock
I think that was his "breakthrough" role
ninereasons mm.. who am I thinking of then? 00:07
judd nelson 00:08
stevan yeah I think
been a while since I have seen that one too :)
ninereasons :) 00:09
r2020 still breaks. has the lack of plugins become fatal, I wonder? 00:11
trying linux to see what's hopping over there.
*r2010 00:12
dies there too.
Could not find module `Config': 00:13
sounds serious
stevan ninereasons: are you doing make or make optimized? 00:14
I am getting that too (OS X)
ninereasons plain 'make'
stevan hmmm
theorb did some re-arranging before 00:15
Oh i think i found it 00:16
ninereasons: give me a minute or two here
ninereasons I can wait. 00:17
stevan it seems to be working
if it compiles I will check in
ninereasons I see that I've kept pugs binaries all the way back to pugs.766
stevan but if you want you can change line 20 of src/Pugs/External/Haskell.hs to be "import Pugs.Config" 00:18
ninereasons makes sense, stevan. 00:19
in pugs.766 interactive, pressing ":r" does not cause a segfault. 00:20
ancient history :)
stevan :)
I really need to get a haskell book
ninereasons I have a couple but it's hard for me to go through them, for some reason. 00:21
stevan I look at it,.. and it makes more sense now than it did before, but still
ninereasons: I find books on functional programming can get pretty "mathy"
not being a math major,.. it goes over my head fast
ninereasons i've only a tangential interest, I'm afraid; although I wish it were more.
nothingmuch ok, 0.02 released 00:22
ninereasons the bug-free version, at last :)
stevan yeah Haskell tends to not really have any $work use for me :)
ninereasons that's it, stevan.
but seeing what it's done for making perl6 accessible has really raised imy interest, significantly. 00:23
jabbot pugs - 2001 - Added test for an infinite loop. This te 00:24
pugs - 2002 - Test for leading whitespace in qw() oper
pugs - 2003 - First pass at cookbook entry for escapin
pugs - 2004 - Filename change (extraneous hyphen)
pugs - 2005 - Dodgy Perl AST embedding to fix qw() lis
pugs - 2006 - Partial move of tests from any< to any(<
pugs - 2007 - Even more XXX-tagged comments for pleac
pugs - 2008 - Larry@p6l: A02 says \t eq ' 'x8 in /^^\s
pugs - 2009 - The Great Renaming. * becomes Pugs.*, e
ninereasons pre2011 builds for me, stevan
jabbot pugs - 2010 - Whoops, missed a couple files
ninereasons but not on freebsd :( 00:27
stevan ninereasons: I am commiting 2011 right now 00:28
it compiled for me
ninereasons r2011 compiles on linux but not freebsd 4.11 00:32
jabbot pugs - 2011 - missed one file in the src/ re-org this 00:33
stevan ninereasons: whats the error 00:34
ninereasons half a sec ..
changed line 5: -- import Pugs.Internals 00:35
commenting this out allowed it to compile.
stevan in what file?
ninereasons oh yeah. that's kind of important, isn't it 00:36
src/Pugs/External/Haskell.hs
stevan :)
ninereasons I wonder if that line's required for using plugins, though?
stevan I dont think so 00:37
but I am not 100% sure
can you paste the entire message?
the error
ninereasons it's gone - but give me 2m42.443s and I can reproduce it 00:38
stevan ok 00:39
ninereasons src/Pugs/External/Haskell.hs:5:0: 00:40
Warning: Module `Pugs.Internals' is imported, but nothing from it is used
(except perhaps instances visible in `Pugs.Internals')
*** Error code 1
stevan ok that I know nothing about :) 00:41
ninereasons Repo Man was 1984, Breakfast club 1985. Estevez debuted on the big screen in "Tex" 1982 00:47
stevan :) 00:49
roie_m was pugs_config.h supposed to move along with everything else, in the Great Renaming? 00:52
stevan roie_m: no idea 00:53
jabbot pugs - 2012 - Added comments to Juerd's comments and u
roie_m Because the makefile says one thing and util/config_h.pl says another... 00:54
ninereasons I don't know why Corion thought he killed junctions. r2011 seems to handle any() and all(), in all tests 00:58
and any tests, for that matter :)
stevan roie_m: feel free to experiment on a fix,.. I have no idea whats up 01:00
roie_m stevan: I'm pretty sure I can fix it, but I want to know what the intention was so I don't fix it the wrong way. 01:01
stevan roie_m: I think the intention of moving from src/ to src/Pugs/ was just to clean things up a bit 01:02
roie_m stevan: That doesn't really say where pugs_config.h should be... 01:03
stevan roie_m: to be honest, I have no idea where it should be,.. but my guess is whereever it needs to be to not break the build :) 01:04
roie_m stevan: I'm guessing src/, but I'd rather wait for someone who's more certain than us (theorb would know, wouldn't he?) 01:05
stevan: so I'll ask when he's on
stevan he is alseep now I think 01:10
roie_m I know, and I should be too. I'll do it in the morning. 01:11
ninereasons: Maybe move the Pugs.Internals line to just below Pugs.Config (around line 20) 01:12
ninereasons I'll try that, roie_m
roie_m Then it will be used only if the plugin us used. 01:13
ninereasons that makes sense.
stevan roie_m: you need not worry about certainty,.. thats is why we use SVN :)
theorb!!!! 01:15
ninereasons that appears to work. I'm going to check that in giving roie_m praise by proxy for the change. 01:16
r2013 01:18
roie_m I'll ask again so theorb can hear: was pugs_config.h supposed to move along with everything else, in the Great Renaming? Because the makefile says one thing and util/config_h.pl says another...
stevan roie_m: that may have been his computer just logging back in,.. he may not really be there 01:21
roie_m Darn. I'll wait till morning then. 01:22
jabbot pugs - 2013 - move import of Pugs.Internals to below P 01:23
pugs - 2014 - Fixed some text and examples based on co 01:53
pugs - 2015 - Removed deprecated filename
pugs - 2016 - Minor typo fixes 02:43
pugs - 2017 - Fixed line width problem
pugs - 2018 - Added a multi-adverb example, and an mul 03:23
gaal morning. 04:13
stevan morning gaal 04:23
(it actually is morning now for me (00:22))
gaal hey :) 04:24
i woke early, dunno how come
stevan, any ideas with this? sial.org/pbot/9373 04:31
stevan the my int $interval part looks odd, maybe just alarm(Int $interval)? 04:38
but then again I am half asleep :)
gaal eek 04:39
that makes two of us :)
thanks
hmm, though it still fails.
baah, i don't understand haskell namespaces :( 05:07
rather: i sorta understand them, but don't know how to bend them to my will
stevan async may need to be threads::async 05:12
and I am not sure we have LABELS: yet
gaal we don't? uh
stevan I dont think so,.. never tried though 05:13
gaal async is primitivce
primitive even
and in the top level namespace for nwo.
stevan ok
gaal also, no, i tried w/o the label last night - just remembered
maybe last doesn'twork yet, though. 05:14
stevan did you try last() ?
sometimes the parens make things work
gaal hmm
stevan gremlins in the source I think :) 05:15
gaal :)
no luck, though :(
masak good morning 05:23
gaal mornging
(off to make coffee, brb) 05:24
jabbot pugs - 2019 - Expanded examples, podified for more exp 06:43
theorb_ Allo, all. 07:02
07:02 theorb_ is now known as theorbtwo
gaal morn 07:02
theorbtwo Have all the problems from my Great Renaming been sorted out?
gaal i don't know of any new problems, but my head has been stuck in a particular problem for a while 07:03
jabbot pugs - 2020 - Expanded the descriptions and improved f 07:13
gaal Can++; # "Thief" is surprisingly touching 07:15
any lambdas up? (gaal asks again) 07:39
bsb Hi all. What should: (1|2).ref return? 07:41
theorbtwo Junc, I think.
But possibly Scalar::Const.
gaal as opposed to junk, which would be less useful. 07:42
bsb Cool, junction_functions.t needs updating then
If I could dav through our firewall I'd try
next question: none(1,2).pick 07:44
or is that just stupid?
none(1).pick returns '1' currently 07:45
gaal can you pick from a none? if so, i'd say undef
else, an exception
bsb I get undef for none(1,2).pick but none(1).pick misbehaves
gaal that can't be right :) 07:46
my guess is undef is correct
but i'm not sure
bsb Another nit, s03 has 1|2 + 3&4; # (4|5) & (5|6) 07:52
pugs gives (1 | (4 & 5))
unless bracketed: (1|2) + (3&4)
gaal gives up on kill and goes off to make pizza (toppings top violence any day, anyway) 07:56
Corion A good morning! 08:02
It seems like nobody else experienced the problems I think there are with my <...> parsing, so I'll have to cook up a proper test for that ;) 08:03
castaway_ hawo Corion, is it still raining? 08:11
(bugger, just broke a plate, typing that)
Corion castaway_: No, at the moment not
castaway_: strong typing is bad for you!
I just want to finish a definite test that exposes the problem with "foo" ~~ any<foo bar baz> (or removes my doubt), and then I'm out, I hope 08:12
theorbtwo Go.
The test can wait.
Corion theorbtwo: Naah
08:13 castaway_ is now known as castaway
Corion Heh. The bug that I thought was an infinite loop is simply exhausting memory and then stopping. So it's no infinite loop. Yay! 08:17
theorbtwo is reminded of a Linus quote.
"It's so fast, it does infinite loops in 3 seconds flat!" 08:18
castaway :)
oh, Corion, you're at the postbank.. do they answer the telefon Sat mornings? ;) 08:19
Corion castaway: Dunno - I never phone them
castaway fat lotta use you are! :) 08:20
hmm, theres a 24x7 number.. I wonder how much use that is 08:23
Corion No wonder that my "fix" didn't cause problems - somebody either reverted it or I didn't commit it :) 08:24
... or it's just a side effect of the Great Renaming wiping out my intermediate changes
theorbtwo: svn blame says that you reverted my patch?
theorbtwo I did? 08:25
I didn't mean to.
Corion r2009
theorbtwo I'm sorry.
Corion I'll put my broken code back in, as it creates different problems :)
theorbtwo: No problem :) I was merely wondering why nobody was screaming at me this morning :))
theorbtwo That was a hellish move for me... I'm not real sure why.
Corion theorbtwo: No worries there - I was just questioning my sanity, but svn revert also restored my sanity :) 08:26
theorbtwo Ah.
I remember repatching it in by hand, but I might have messed up somewhere in the process. 08:27
Frankly, it'd supprise me if I didn't.
Corion Hah. And I think I see where I messed up yesterday - returning a list instead of a reference to a list. 08:28
Reading the AST code takes some getting used to :)
Hmmm. Now only 2 of 10 tests fail. But it should have fixed all of them ... We-ird. 08:29
Bah. No. Wrong parsing. My stuff returns the list in scalar context (i.e. a number)
Breaking patch back in, together with another test. 08:38
r2021
smoke in progress, so you can see some red page :)) 08:39
jabbot pugs - 2021 - Put broken (any<foo bar baz>) whitespace 08:43
Corion theorbtwo: BTW, according to the RSS, I never committed my broken stuff, so you didn't break anything ;) 08:54
theorbtwo OK. 08:55
castaway heh
theorbtwo The stuff "this is psudo-embeded perl code"?
Corion theorbtwo: Yep 08:56
theorbtwo: (it's the compiled AST from Perl code)
theorbtwo You must have; I remember putting it back.
I know.
It was a very confusing thing all in all, and I hope I don't have to repeat it any time soon. 08:57
Corion theorbtwo: Maybe I talked about it so vividly that you imagine it being there
theorbtwo Nope.
Corion r2020 - breakage here : datenzoo.de/pugs/win2k.html 08:58
(some quoting stuff succeeds now, but junctions are broken big style and I don't even know where to look :) ) 08:59
theorbtwo Most of those seem to be the "TODO for release" breaking things. 09:00
theorbtwo wonders WTF (->) [String] is for a type. 09:01
Corion theorbtwo: Hmmm. A bare (parameterless) function that returns a string array ? 09:02
theorbtwo That'd be (-> [String]), I think...
Possibly not.
09:07 chady_ is now known as chady
autrijus where does that show up? 09:08
hi Corion, theorbtwo :) I see we have a new shiny directory layout now
autrijus goes fixing the infinite loop
Corion Good day autrijus
autrijus greetings. I slept 12 hours! 09:09
castaway mornin autrijus
Corion autrijus: Sleep is good ! :)
theorbtwo G'monring, autrijus!
Corion autrijus: After the "infinite loop" (it ends after eating some memory), can you look at qLiteral() ? I've put a fix in, but it breaks junctions and I don't even know why. t/syntax/list_quote_junction.t shows the problem. 09:10
Corion fades away.
theorbtwo hopes Corion enjoys the sunshine.
castaway later Corion :) 09:11
autrijus err wait
I can't replicate the inf loop anymore
what goes?
wasn't it in t/pugsrun/06-dash-version.t?
jabbot pugs - 2022 - * remove a redundant "IO" import 09:13
autrijus reruns test 09:14
theorbtwo nopaste 09:17
nopaste?
perlbot, nopaste?
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
theorbtwo Thank you.
autrijus oh, duh, it's t/pugsbugs/any_values_infinite_loop 09:19
gaal heya! 09:43
gaal popping in between dough and sauce 09:44
autrijus, can you help me with a type question?
autrijus yes? 09:45
I'm in middle of shower so expect slightly slower response time, but ask ahead
gaal i'm implementing kill. i tried following the code from chomp in Prim, which is similar 09:46
you have wifi in your *shower*? :)
autrijus yeah.
gaal so, there's the line in chomp that does
rets <- mapM (doBoolIO etc. etc. etc.) list 09:47
castaway falls over laughing
and a waterproof laptop, no doubt
gaal i'm trying to do something similar, but get
No instance for (Value System.Posix.Types.ProcessID)
theorbtwo Wow. If I hadn't though you were crazy already, I'd be sure of it now.
gaal (ProcessID is the type of each lement of the list i'm calling kill on)
now the tihng is, i though mapM + doBoolIO were supposed to, eh, unmonad the argument one by one 09:48
at least, that's how it works with the chomp example...
but it seems not to work.
s/seems no to/certainly doesn't/
autrijus so 09:50
you want to obtain a ProcessID given a Val
gaal yes (ProcessID is secretly an Int)
autrijus it's a CPid 09:51
I don't see that it's a Int
gaal hmm
autrijus it's Enum
so you can cast to it via toEnum / fromEnum
gaal i must have been confusing it with signal then :(
autrijus yeah
so you can't directly fromVal 09:52
pid <- fromVal x
(toEnum pid)
is the CPid you want.
gaal okay, so would that be rets <- mapM (...) $ fromEnum =<< fromVal list
theorbtwo I thought to convert a Val to a String, you just used it like that?
autrijus theorbtwo: you need fromVal or vCast to cast val to string 09:53
gaal: more like
gaal why string? no strings attached to this proble
m.
autrijus rets <- mapM (doBoolIO . killProcess . toEnum) vals
or, as you said 09:54
theorbtwo Different problem, gaal.
autrijus rets <- mapM (doBoolIO . killProcess . toEnum) =<< fromVals v
theorbtwo I'm working on eval_haskell / evalHaskell
autrijus theorbtwo: Val to String is fromVal (monadic) and vCast (pure)
vCast won't work on references.
gaal ..where kill process = signalProcess pid
errr
= signalProcess signal
theorbtwo Hm, well, I don't know why I'd want to eval a stringified reference, but what they hell, I'm already in an Eval, I think. 09:55
autrijus right
and signal is CInt, not Int
so I imagine you need a similar trick.
theorbtwo: you would do that if you are evalling a tied scalar
gaal thanks, autrijus.
autrijus np
and now I'm out of shower :)
autrijus goes back fixing infinite loop
theorbtwo
.oO(You are stuck in a twisty maze of monads, all different.)
09:58
autrijus inf loop fixed. 10:09
-\\n Scalar pre keys (rw!Pair)\
-\\n Scalar pre values (rw!Pair)\
+\\n List pre keys (rw!Pair)\
+\\n List pre values (rw!Pair)\
stupid bug :-/
gaal pizza needs attention! & 10:11
jabbot pugs - 2023 - pleac: comments to comments to comments 10:13
pugs - 2024 - * fixed infinite bug; turns out to be a
autrijus bbiab & 10:15
roie_m theorbtwo: Great Renaming problem: should pugs_config.h (during the build) be in src or src/Pugs? 10:35
Because the Makefile says one thing and config_h.pl says the other.
theorbtwo Odd. It built for me, I figured somebody had fixed it. 10:38
roie_m It builds, but if you run make again it will call config_h.pl again. 10:42
theorbtwo Should be fixed now.
roie_m Thanks, that was what I thought. 10:43
jabbot pugs - 2025 - More Great Renaming problems: it should
theorbtwo Should have just checked it in. 10:48
Are you a comitter?
cognominal pugs> print if 1
*** Error: No compatible subroutine found: &if
marginal but still does not cut it
roie_m Yeah, I should have but I was going to sleep anyway so I decided to ask you which way tohe fix should be
(ie whether to change the Makefile to refer to src/ or config_h.pl to refer to Pugs/) 10:49
cognominal wish I knew enough haskell/parsec to fix the grammar
theorbtwo Get Autrijus to work with you on it when he gets back? 10:50
cognominal I am reading the docs. I hope I will quit larval stage in a week or two 10:51
not that I will make a pretty chrysalis or imago 10:56
elmex writing haskell code is like driving a bicyle ... 11:13
it just comes from your head and is going down to the disk ;)
theorbtwo wishes it was that easy for him. 11:14
elmex well... i'm not experienced enough to write much in haskell ;) but i managed to write a irc-server once... well... err.. never finished it :) it's still less than halfdone 11:15
theorbtwo Then again, perhaps it is an apt analogy, as I never learned to ride a bike.
theorbtwo grrrs. 11:18
11:22 chady is now known as chady_
nothingmuch *yawn* 11:28
theorbtwo Allo, nothingmuch.
nothingmuch anybody here that does not intend to bring a public key to YAPC speak up now so that I have lots of time to brainwash you 11:33
does anyone object to yaml_harness and testgraph.pl being updated? 11:35
that is, to depend on Test::TAP::Model and Test::TAP::HTMLMatrix? 11:36
theorbtwo speaks up. 11:38
OTOH, if I do, I can actually collect some signatures for it.
nothingmuch exactly
confs are when keys may become slightly useful after all
theorbtwo The problem with keys is that you need to keep them around. 11:39
nothingmuch theorbtwo: are you ok with yaml_harness and testgraph.pl being ported?
why is that a problem?
the keychain is encrypted, with a good passphrase it's probably OK to put it on a USB pendrive 11:40
theorbtwo lost his keys for several months lately.
My appartment keys, that is.
nothingmuch unless you're in some political mess in some 3rd world country
or US
well, you can copy digital keys =)
theorbtwo Turns out they were in my raincoat for the winter.
nothingmuch loves finding things in coats 11:41
theorbtwo Yeah, I've been known to leave money in coats on purpose when I'm feeling slightly flush.
So my later destitute self can find them. 11:42
nothingmuch hah
theorbtwo wonders where the "ContT Val (ReaderT Env IO)" came from in this error. 11:44
Oh, that might be the defintion of an Eval Val. 11:47
nothingmuch ook, i didn't know YAML was so slow 12:20
nothingmuch.woobling.org/pugs_test_status/ 12:21
nothingmuch wonders how come he made todo yellow
nothingmuch doesn't recall doing something that silly
jabbot pugs - 2026 - Test::TAP::Love 12:23
nothingmuch ooh 12:27
ghc-6.4: panic! (the `impossible' happened, GHC version 6.4):
mkWWcpr: not a product PugsziAST.Param{tc r4WV}
Please report it as a compiler bug to [email@hidden.address]
or sourceforge.net/projects/ghc/.
oh, i get it 12:37
theorbtwo wonders why it's showing the thingy name half-mangled and half-demangled.
nothingmuch thingy name? 12:39
oh, the ghc
theorbtwo PugsziAST is mangled, Param is not.
nothingmuch yeah 12:40
no clue
nothingmuch.woobling.org/pugs_test_status/ (fixed) 12:44
theorbtwo I like what you did with the percent -> color mapping. 12:45
nothingmuch the yellowing? 12:46
credit is due where it is deserved
i stole the idea from Devel::Cover (although not the impl)
now if only i can get a whole test run to happen without hanging... =P 12:47
theorbtwo I think autrijus fixed that. 12:48
nothingmuch r2026?
oh
the ghc panic is stopping a new pugs from being linked 12:49
nothingmuch is stupid
theorbtwo Mm?
nothingmuch the pugs exe remains from the last build where ghc did not parf
barf
theorbtwo Right.
Was wondering about the "is stupid" comment.
nothingmuch didn't make the connection 12:50
thought i was running 2026 even though 2026 was not building
theorbtwo Do a svn diff -rHEAD src, see what's changed? 12:51
nothingmuch i am at head
theorbtwo Art thou sure? 12:52
nothingmuch yes
it's just that the build of pugs itself is from wayback
theorbtwo Right, I
I'm wondering why it's not linking. 12:53
castaway waves
nothingmuch it's from 13:07 today
jabbot pugs - 2027 - Copied "$?OS" to "$*OS" variable. Will n
nothingmuch theorbtwo: because make bails out when ghc dies on some object earlier
hola castaway 12:54
theorbtwo Hm, I ought to figure out how to catch haskell errors to throw to a p6 die. 12:59
Odd, my eval_haskell only lets me return a Char, and I don't see why. 13:00
Oh, right, code the no hs-plugins case before ci. 13:02
jabbot pugs - 2028 - Substituted '$?OS' by '$*OS' in tests, a 13:03
castaway Strings are char lists, mebbe thats why? 13:04
castaway wonders who did that change and why 13:05
castaway looks up rfc 2081 13:09
jabbot pugs - 2029 - eval_haskell -- must return a Char at pr 13:33
castaway nuthin, still here? 13:34
theorbtwo thinks it's time for a shopping trip. 13:35
castaway indeed. 13:36
please take a peek at SEE if you can, anyways.. it seems to have disappeared..
autrijus uh. 14:21
someone forgot to "svn add src/Pugs/Embed/Haskell.hs". 14:22
rendering the tree broken.
theorbtwo: still there?
seems not. oh well... 14:26
I committed a stub fix. 14:30
jabbot pugs - 2030 - * Until theorbtwo gets back, here is a s 14:33
Corion re 14:36
If I get a "C" from svn, that means there is a conflict, right?
gugod right
autrijus yes. 14:39
if you keep getting "C", it's time to ponder switching to svk :D
Corion autrijus: No. It was just iblech fixing the same thing that I've fixed as well :) 14:40
autrijus cool :)
theorbtwo++ # eval_haskell
Corion ... although I wonder - (any<foo bar baz>) should work, while (any<foo bar baz>,zap) is confusing :)
autrijus theorbtwo-- # not actually checking in the code
Corion Ah - I think the conflict arises because iblech changed to $*OS. Which is cool :) 14:42
autrijus: Do you have a moment? I need some enlightenment regarding qLiteral()... What does my code do different from your code so that junctions break? 14:43
autrijus Corion: sure... give me a line that breaks
Corion autrijus: t/syntax/list_quote_junction.t 14:44
autrijus: Tests 1, 2, 3 and 4 don't work, but they should :)
autrijus any<foo bar> is a syntax error?
who said that where?
Corion autrijus: No, it's no syntax error. Ah - I left that wrong interpretation in my test :(
fixing
autrijus please do :)
Corion I'll make it a warning - print( any<foo bar baz>,"Hello World") is likely not what one thinks :) 14:45
autrijus yeah.
Juerd <> implying () wouldn't be bad, I think. 14:46
autrijus except then we'll be even more whitespace sensitive
Corion Juerd: I'm not sure yet. But I stumbled over that early on :) 14:47
Juerd It's the same rule as for (), so no new rule, and *less* surprises.
foo<foo bar>, "baz"
autrijus print any <foo bar>, "baz", @x;
print any<foo bar>, "baz", @x;
Juerd foo <foo bar>, "baz"
foo(<foo bar>), "baz"
foo (<foo bar>), "baz"
equivalent pairs, in how people expect them 14:48
Corion Juerd: The parentheses should go elsewhere IMO - any<foo bar baz>, "baz" # should be (any<foo bar baz>), "baz" - but I think leaving it as is works...
autrijus foo (<foo bar>), "baz"
this means foo(), "baz"
Juerd autrijus: The same rules are there for () already...
autrijus not foo((), "baz")
or am I mistaken?
Juerd autrijus: ITTM foo((<foo bar>), "baz"), if foo is n-ary
In fact, I'm quite sure
Juerd looks up evidence
autrijus Juerd: I think it only applies to {} [] <> 14:49
not ()
() is not "subscripting"
at least that's what I get from reading s02
clarifications welcome
Corion: are you fixes in? 14:50
Corion autrijus: just committing
theorbtwo is back.
autrijus hey theorbtwo!
please overwrite my stub
Juerd None found in S06
autrijus: I'm quite sure I read something about this
Corion autrijus: iin principle I think my translated AST should work - it does EXPR ~~ rx:perl5:g/(\S+)/ to do smarter splitting than split /\s+/; regarding leading whitespace. Except that it doesn't seem to return exactly the same stuff as your code does. 14:51
autrijus Juerd: I'd welcome a clarification.
personally I'd welcome such a uniformity.
i.e. to write spaces, use dot
foo .()
Juerd autrijus: Its syntax is like subscripting, including .()!
theorbtwo wonders how to do that.
autrijus Juerd: .() is subscript? where in the bible? 14:52
Juerd autrijus: *like* subscripting, syntax-wise
autrijus Juerd: yeah yeah, I think we are in vehement agreement.
prod @larry?
Juerd And that's not said explicitly afaik
autrijus basically I'd like
Corion Hmmm. I think in the committed version, my original Perl code is not in there. I'll commit that too :) 14:53
autrijus foo() # parsed a &foo()
Juerd Heh, I think I should leave p6l alone a bit. I have too many questions pending, and should spread them over longer time
autrijus foo .() # parsed a &foo .()
foo () # parsed a &foo.( () )
s/ a / as /
if it makes sense to you
Juerd autrijus: It is like that, I'm sure. I'm only not able to find proof :(
autrijus theorbtwo: oh, copy over your .hs 14:54
then delete it
svn up
jabbot pugs - 2031 - corrected wrong information about syntax
pugs - 2032 - Committed left-out original Perl code fo
autrijus then mv -f it back
Corion Is there a way to make "make optimized" the default? It could make (smoke) testing quicker, I think, at least on my machine ...
autrijus Corion: except I think it kills some slow machines with insufficient ram
Corion: you can set $ENV{GHC} to 'ghc -O' on smoke system, no? 14:55
iirc
Juerd Similar rules apply to array subscripts:
$ref = [$x]; # array composer because term expected
if $term[$x] # subscript because operator expected
if $term [$x] # syntax error (two terms in a row)
if $term .[$x] # valid subscript (term expected after dot)
Corion autrijus: Ah ... So I should look if there is some %ENV{make-optimized-pugs-by-default}.
Juerd And to the parentheses delimiting function arguments:
$ref = ($x); # grouping parens because term expected
if $term($x) # function call because operator expected
if $term ($x) # syntax error (two terms in a row)
Corion autrijus: Yay - that's what I'll use :)
Juerd if $term .($x) # valid function call (term expected after dot)
I think the same rules should apply for named subs, with an exception for subname ($x), because if the name is known, it can well be interpreted as subname(($x))
autrijus print (1); # syntax error
clearly inacceptable 14:56
ok.
Juerd autrijus: Yes, but with $term, $term being unknown at parse time, you have no choice
autrijus Juerd: sure, I know that too well :-/
Juerd You can't just assume it's a subref, or else almost anything is valid syntax :)
This is S04, btw
autrijus oh btw, I think I have a much better understanding of larry's "perl 6 has an optional type system" proclamation today 14:57
Juerd Oh, sorry for the flood by the way
Forgot that in these channels it's not normal to do that
autrijus it turns out to mean "perl 6 has a strong typing system, with subtypes, and has a type reconstruction algorithm that always resolves monomorphism ambiguities into most general (sometimes junctive) types" 14:58
I'm just typing this out so I can search for that line later :) 14:59
autrijus looks at Corion's parser bug
theorbtwo wonders how it resolves polymorphic ambiguities.
autrijus theorbtwo: "junctive"
i.e. incompatible types can always be unioned
and delay resolution to runtime.
if you provide no annotation, that's exactly what you get.
theorbtwo decides to wait to play language lawyer until somebody verifies that I didn't break the tree. 15:00
autrijus ooh a real eval_haskell is in
shint
shiny
Corion theorbtwo: For me it's still standing. But I'm at r2020 or 2021 I think. 15:01
theorbtwo just checked in 2033.
Corion r2032 is where I'm at :)
autrijus oh btw, theorbtwo: I think "class Evalable" is a win for both eval_haskell and Inline::GHC 15:02
pugs> eval_haskell "Just 'x'"
'x'
woot, it works!
theorbtwo I heard you and dons talking about that on #haskell, but don't recall it, nor recall quite understanding it at the time. 15:03
jabbot pugs - 2033 - Really put in src/Pugs/Embed/Haskell.hs.
autrijus theorbtwo: it means that 15:04
ret <- eval_ code imports [] [] []
can be of type
(forall a. Evalable a) => a
instead of a fixed "String"
theorbtwo Right, I got that.
autrijus and so
eval_haskell " 1 + 2"
theorbtwo Where's the advantage from just forall a. => a ?
autrijus eval_haskell "return (1 + 2)"
Corion does my $incr = eval_haskell "(1+)"; # work ? 15:05
:))))
autrijus Corion: sure!
Corion autrijus: Magic! Wooot!
autrijus theorbtwo: uh, "return(1)" under the forall a. => a regime will not actually return 1, but merely return an IO, no? 15:06
theorbtwo Mm, see your point.
Corion So we actually get the Prelude into Pugs now! :-))
autrijus Corion: yes.
Corion: and into Perl5 too
as soon as Evalable has a toSV method
Corion autrijus: What's Perl5 ? :)))
theorbtwo But then you do a case ret of {IO x -> return x; ...}
autrijus theorbtwo: well... haskell has no typecasing. 15:07
you can fake it with toDyn/fromDyn
theorbtwo Ah, right.
autrijus but I think using a class is much clearer
theorbtwo Right now I'm wondering why Just '4' and '4' both work, but "42" does not. 15:08
autrijus Corion: "If you want to program in Perl 5, program in Perl 5. It's a nice language. I use it occasionally... :-)"
theorbtwo Also, how to make wrong haskell code into a die and not a hard kill of the whole pugs.
Corion theorbtwo: "42" is a String ([Char]), while '4' is a Char... Maybe it doesn't like Arrays ? 15:09
theorbtwo Ah, right, Just 'x' didn't work.
autrijus theorbtwo: the first is easy... don't use error, use fail
theorbtwo: and in Prim, use tryIO
to capture the error
or roll your own catch
s/first/latter/
Corion pugscode.org <<Overview Journal Logs>> | r1773/winxp: 587/4256 smoke/win2k (occasional): xrl.us/fqum (158/4302, r2032) | pugs.kwiki.org | <autrijus> at no point should we lose the useful illusion. 15:09
theorbtwo wonders what useful illusion that is. 15:10
autrijus theorbtwo: that the user can still use native pathnames even if the underlying things are URIs.
theorbtwo Ah, OK. 15:11
Corion autrijus: The only thing that I fear is, that stupid programmers will require the user to enter URIs instead of plain filenames... But if we fudge that behind the scenes, everything might be OK in the end.
autrijus Corion: yup. and anyway it had not come to pass
theorbtwo One problem with using URIs is that it'll lead to the incorrect assumption that you can $*CWD='perlmonks.org/'
Corion theorbtwo: :)))) 15:12
autrijus theorbtwo: what is wrong with that?
Corion The new website leecher: $*CWD='perlmonks.org'; system('tar cvjf ~/perlmonks.org.tgz .') # :)) 15:13
theorbtwo Exactly.
autrijus if you have a DAV-enabled tar... :)
Corion autrijus: It makes system() look weird.
autrijus: And we don't have the kIOslave like KDE has.
theorbtwo Doing a $*CWD should actually chage the current working directory from the OS's point of view.
Otherwise when you spawn non-perl children, they will not have the CWD you expect them to have.
Corion theorbtwo: Right. I don't want too much IO::All magic.
theorbtwo I don't mind the IO::All sort of magic. 15:14
Corion Ingy can port the missing stuff of the IO::All magic.
theorbtwo Having open work on URIs would be great.
Corion theorbtwo: I mind it very much. It took far too long for Perl to get the three-arg open, and we shouldn't throw that away again.
theorbtwo: Yeah, that's nice, but it shouldn't secretly/inadverently spawn server processes and other stuff, just because somebody crafted a special URL. 15:15
untainting is a daunting task for many users already.
theorbtwo Hm, you do have a certian point.
In any case, when you get to CWD and mirroring to the OS state, the URI viewpoint breaks down.
Corion theorbtwo: Of course, IO::All might be convenient in some situations, but so is open "| rm -rf". 15:16
theorbtwo nodsnods.
Corion theorbtwo: I don't see that it totally breaks down, but it should mostly support the file:// format :)
theorbtwo I wasn't saying make IO::All magic the only way to do things.
Just /a/ way to do things.
Corion theorbtwo: I like the IO::All idea of lazily representing the filesystem as a tree. 15:17
... but I don't like the ::All part of IO::All :)
gugod simply use IO; ?
Corion gugod: :))) No, it was more about the "do-it-all" aspect of IO::All, no matter what the name is :) 15:18
Hmmm. What do you all do to push content over to another host as soon as it changes? rsync in a cronjob ? The OS is Linux/Debian - I want low latency but also low CPU usage... 15:19
castaway just has cronjobs with scp in them, but only a couple
theorbtwo Make the thing that changes it do it, generally.
Otherwise, try using the File Alteration Monitor? 15:20
Corion theorbtwo: The thing that changes it runs on even another machine :) But yes, I could trigger the stuff from there via a ssh command ...
Maybe I should simply install cygwin on this machine :) 15:21
theorbtwo Oh, there's only SGI::FAM as far as I can see.
Corion theorbtwo: Yeah - and from what I remember, it was hellishly inefficient, at least when compared to what Win32 offers... 15:22
theorbtwo Newer linux kernels know how to do something more or less like the win32 api you're talking about, I think.
Corion ... which reminds me, I should look into how Haskell differentiates between OS threads and internal threads, so that system() leaves all other threads running.
theorbtwo: In principle, it's trivial to do, but you need kernel support for it :) 15:23
theorbtwo ...and FAM knows how to use it or not use it transparently.
"If the kernel supports dnotify (kernels >= 2.4.x) FAM is notified directly by the kernel." 15:24
Corion nice 15:25
Bah - use.perl.org/~chenyelun/journal/ - handmade journal spam ... 15:28
theorbtwo Oh, people on the CB were wondering about that the other day. 15:29
(IE when the first of those came up.)
But some of those are the person's own site, so I'm not so sure he doesn't simply not speak understandable English.
Corion theorbtwo: You mean, he's maybe simply the chinese version of TorgoX ? 15:31
... or simply TorgoX under another name?
theorbtwo doesn't know who TorgoX is.
Corion theorbtwo: He's also on use.perl - Sean Burke 15:32
Juerd The creator of the holy unicode slide rule! 15:33
jabbot pugs - 2034 - Responded to comments and added minor fi
autrijus no, it's just spam. 15:34
we at Taipei.pm were appalled
theorbtwo Ah, OK.
autrijus apparently use.perl has a high enough googlerank.
Juerd It does
I get spam in wml pages on wapsilon.com, just for the google pagerank. 15:35
castaway when googling for what, or is that irrelevant?
Juerd A pr of 6 is good enough to benefit from
Corion castaway: I think any google rank rubs of
Juerd castaway: A link to your site from a high PR site benefits your ranking
castaway: And more so for the words used in that link. 15:36
This is why if you search for "debian raid", my site is 3rd -- that page was linked by many geek news sites 15:37
It's not because the page itself is so special or unique
castaway right, I know how the ranking works.. I was wondering about the spammers..
Juerd Then I don't understand your question... 15:38
castaway the rank is only noticable when you search for something particular, no?
Juerd No
I thought I just explained that
castaway no, if I dont search for debian raid, I dont get your site, surely 15:39
Corion castaway: Rank does not depend on context
Juerd Searching for those specific words used in the link text helps extra, but your ranking benefits from the link anyhow.
castaway: Indeed - but even if you look for other words on that page (words not used in the link texts), it'll score higher than before
This is why tnx.nl/php scores well when people look for stuff like "stripos perl". Nobody has linked to it using the word "stripos", but enough links point there for the overall rank to be high enough. 15:40
castaway oh, I get it..
thanks 15:41
Juerd So sites with a high pagerank that lets you change the information they present (like slashdot, use.perl, any famous blog with comment feature, many personal guestbooks) is valuable for spammers :(
Corion Hmmm. catalog_tests.pl is now broken for me... Do I need anything else other than Test::TAP::Model and Test::TAP::HTMLMatrix ? Do I need new invocation parameters or something? 15:43
castaway there used to be a time when the internet didnt need shotguns.. :(
Juerd hates guestbook spam, but the current measures against it weed out most.
(See the horrible javascript on juerd.nl/guestbook)
Corion Ah - no, catalog_tests still works, but the main file is not generated
Juerd Now if the spammers'd just disable scripting ;)
castaway points at nm
jabbot pugs - 2035 - * clean up rxSplit code in qLiterals bef 15:44
pugs - 2036 - * force list context on the ~~
castaway (and wonders where he went)
Corion autrijus: WHen you do stuff, it looks so elegant ;) 15:45
autrijus it's an acquired taste :) 15:48
castaway mumble, I wanna test my SEE toy..
Corion Oh great. Now I know why the smoke graph doesn't work anymore. "Illegal division by zero"
autrijus hm? 15:49
what where how?
Corion autrijus: In nothingmuch's Perl code.
autrijus oh. wow
Corion autrijus: You cleaned up my code, but it doesn't work yet (I assume that's OK so far :) )
autrijus: (the test still fails)
autrijus it's not your code 15:50
it's op2Match
try 1~~(1|2) 15:51
(1|2)~~1
neither works
Corion autrijus: D'oh. :)
autrijus: But still, your cleaned up code looks far nicer than the mess I produced :)
autrijus I wonder why it's not autothreading over ~~ 15:52
ah, that's because of the "Any"
Corion nothingmuch: In line 93 of Test::TAP::Model::File, please change it to $self->seen ? ($self->ok_tests / $self->seen) : "no tests seen";
autrijus the Any prototype disables autothreading.
Corion autrijus: It would autothread? Cooooooolio!
I want want want implicit autothreading unless explicitly disabled :)
autrijus sure :) 15:53
Corion autrijus: Well, I'm told that Abigail wants single-threading (over map/grep), unless autothreading is explicitly enabled.
autrijus oh. you are talking about OS threads. 15:54
Corion autrijus: Well, in Haskell I think we can have OS and Interpreter threads interchangeably, no? 15:55
autrijus sure we can...
but actually our threading model is now 5005 threading
my $x = 0; async { $x++ }; async { $x++ }; sleep 1; say $x
it may be surprising to some people.
Corion autrijus: No, that works.
castaway 5.005 threads++ 15:56
,)
Corion autrijus: Ah no, that doesn't work
autrijus: system() also stops all threads :(
autrijus ok... I disabled Any's inhibition of autothreading
(which is according to damian Correct)
Corion So Pugs can now actually take 200% CPU ? :) 15:57
theorbtwo Woo!
autrijus let's see how many tests break
Corion Ah, no - still no OS threads :)
there shouldn't be any additional breakage, of course :)
theorbtwo And things /always/ do what they should... 15:59
autrijus Corion: so your bug is fixed.
it's not your fault :)
Corion autrijus++ # fixing my bugs 16:00
autrijus: Well, I haven't worked out a good way to debug stuff in Haskell yet, as I'm mostly a printf-style debugger
autrijus Corion: trace
Corion (and that doesn't work in functional languages)
autrijus trace (show foo) return ()
Corion autrijus: Ah - I should work more with ghci :)
autrijus Corion: it works exactly as that in functional languages :)
just sprinkle trace and error 16:01
all over your program
Corion autrijus: aaah!
autrijus trace has this good nice type
trace :: String -> a -> a
i.e. it is just like "id"
but happens to print out some string.
Corion autrijus: That means that trace() is a hack :)
autrijus: it should be in the IO monad :)))))
autrijus it's implemented with unsafePerformIO 16:02
which has this good type
Corion autrijus: Ah...
autrijus > :t unsafePerformIO
unsafePerformIO :: IO a -> a
nice, no?
so much for monadic safety :D
Corion doesn't liftIO have the same type? 16:03
autrijus nope
unsafePerformIO demotes a monad
liftIO promotes it
Corion autrijus: Ah ... Some day I'll understand monads ...
autrijus liftIO :: (MonadIO m) => IO a -> m a
jabbot pugs - 2037 - * "Any" no longer inhibits autothreading
autrijus Eval monad is "on top of" IO monad 16:04
so it's safe to "lift up" IO actions
into Eval actions
Corion autrijus: Aaah ... That makes things more understandable :)
autrijus when you see "monad", read "action"
and when you see "on top of", read "adds more effects to"
that will make things much easier to grok :) 16:05
gaal hey, nothingmuch and i are after pizza and still before cracking kill. what's the evenual type of ProcessID again? 16:06
autrijus just remember to "toEnum" :)
gaal also: where can we look this up?
we tried that :(
autrijus for your purposes its type is (forall a. Enum a => a)
oh?
consult your GHC library manual
usually installed as docs/libraries/index.html
it's file:///usr/local/share/doc/ghc6/libraries/index.html here
and click "Index"
then "P", then "ProcessID" 16:07
and ProcessID is just a type :)
theorbtwo www.haskell.org/ghc/docs/4.06/hslibs/book1.html
autrijus uh, no, not 4.06 please
theorbtwo Eeep.
autrijus haskell.org/ghc/docs/latest/html/li...index.html
haskell.org/ghc/docs/latest/html/ # main index 16:08
the user guide has tons of good stuff.
gaal thanks - but maybe you have an idea what's wrong with this? rets <- mapM (doBoolIO $ killProcess $ toEnum) $ tail vals 16:10
Couldn't match `System.Posix.Types.CPid' against `t -> t1' 16:11
autrijus sure 16:12
doBoolIO $ killProcess $ toEnum
this takes nothing
and feeds toEnum to killProcess
you really want
gaal se we need a . someehere?
autrijus doBoolIO . killProcess . toEnum
which means
gaal that didn't work either, though :)
autrijus \x -> doBoolIO ( killProcess (toEnum x ) )
and why tail the vals?
oh, the first is signal
gaal nothingmuch: i thought we wouild like to make a closure out of the doBool because it takes a closure,
and then when it tries to do something with th eclosure it gobbles up the param mapM gave it 16:13
autrijus chmod's prototype is wrong tho
shouldn't have copied it
it's declared as chmod(List)
whereas it should be
chmod(Int, List)
I'm fixing that
jabbot pugs - 2038 - Fixed error in hash subscripts, added ne
gaal In that case, we wand that kind of prototoype too 16:14
autrijus you do 16:15
theorbtwo Saves you from having to shuffle arguments yourself. 16:16
Corion nothingmuch: What did I do wrong to get datenzoo.de/pugs/win2k.html ?
theorbtwo You don't have the CSS where it needs to be. 16:17
autrijus fixed.
Corion theorbtwo: Aaah. Changed the location again, then ... 16:18
Grrr. Why is "util/testgraph.css" a good default location?
gaal Corion: testgraph.pl'
autrijus bbiab... 16:19
gaal 's tiny HTMLMatrix subclass does funny things to be as backwards compatible
it used to be util/testgraph.css, so that's where i put it
theorbtwo It's generated a HTML file with embedded CSS for a bit.
gaal nothingmuch: sorry, my vi reflexes caused me to leave the channerl 16:20
anywho, inline css is not yet backported
that will be recitified when i go home, but it'll be another 2 hours or so
Corion Much better now - datenzoo.de/pugs/win2k.html - r2020
... I simply created util/ and put the CSS file there :)
rsync++ 16:21
gaal as for the yellow:
that was a small bug in the function that chooses the css class for a test case 16:22
darcs pull or wget -r my repo from woobling.org
machack666 hyper operators are behaving incorrectly for lists of various sizes.
gaal the straps' concept of OK somewhat differs from what it wanted. If you want to hack in a fix, $case->ok => $case->actual_ok
jabbot pugs - 2039 - * correct chmod's prototype. 16:23
Corion How do I recognize an unexpected success ? 16:24
machack666 according to S02, (and clarified on p6l), if we have two lists of corresponding size on either side of the hyper operator, we are supposed to leave the non-corresponding elements alone.
Corion gaal: Ah, so I'll have to wait for another CPAN release to get the CSS/colours working correctly?
machack666 ie, (1,2,3,4) >>+<< (1,2) should result in (2,4,3,4) 16:25
castaway those arent the same size .. ? 16:26
machack666 as of r2013, pugs gives us (2,4) and throws away the last two
(this may have been fixed; i haven't svn upped today)
machack666 svn ups 16:27
scw I wonder if >>~<< is valid hyper operator? It's not in pugs 16:28
castaway then add it ;) 16:30
gaal autrijus, we now have: rets <- mapM (doBoolIO . (killProcess . toEnum)) pids
machack666 no reason it shouldn't be
theorbtwo ~ is a unary prefix operator; it's hyper version would be ~<<, not >>~~<<.
(I think.)
gaal Couldn't match `ContT Val (ReaderT Env IO)' against `(->) Val'
theorbtwo Oh, that's a fun one; I had something like that earlier.
gaal (pids is <- fromVals of the second argument to the builtin) 16:31
theorbtwo Your signature doesn't match the number of parameters the \x -> foo takes.
Or, at least, thats where I got it.
Corion Ooo - seems like I could unskip three more tests in t/operators/arith.t now :)
gaal which signature?
machack666 r2039 exhibits the same behavior
gaal of the function enclosed int he lambda?
theorbtwo I think, yeah. 16:32
machack666 is this a test that should go into the hyperops, or is it already in there,just todo-ed?
castaway you could check..
machack666 checks the source
no differing-sized arrays tests 16:33
scw theorbtwo: I'm thinking about the string concatenation operator ~ 16:34
theorbtwo D'oh!
Yeah, that should hyper.
scw theorbtwo: :)
machack666 should this go in pugspugs
pugsbugs
Corion Yay. Lots more NaN bugs are fixed in arith.t! :) 16:35
theorbtwo No, should go in junc.
...and in hyper, depending on what you're talking about at the moment. 16:36
machack666 does not have commit access ...
scw <foo pu> >>~<< <bar gs> # a little too much < and > :p
machack666 I can update some tests and send someone a diff 16:37
theorbtwo machack666: write a test, and use nopaste.
machack666 ok
theorbtwo perlbot, nopaste?
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
Corion I should move my stuff out of pugsbugs too, to make room for new pugsbugs :) 16:38
Should we make a Win32_todo directory or something like that? I'd like to move my env-is-readonly into that, for example. 16:39
gaal odd, now it says that signalProcess is applied to too many args 16:41
mapM (doBoolIO . signalProcess sig) (map (toEnum) pids)
Corion gaal: That means you need to sprinkle either some parentheses or some $
gaal we're already quite spicy, Corion 16:42
i think it wants more dead chickens.
or maybe i should have let it had some of the pizza.
pasteling "machack666" at 24.124.101.107 pasted "test update for t/operators/hyper.t to account for list extension" (42 lines, 1.1K) at sial.org/pbot/9383 16:44
jabbot pugs - 2040 - Added tests for both $*OS and $?OS.
pugs - 2041 - Reactivated some tests that previously c
pugs - 2042 - * Hyper operator >>~<< and ?~?
pugs - 2043 -
gaal what is ContT used for? 16:48
theorbtwo Corion, you've messed with DVB-T some, right? 16:49
Corion theorbtwo: No, not yet. I haven't even bought a TV :)
theorbtwo Oh.
It's comming in around here soon -- end of May.
But if they don't start broadcasting English, I don't care.
Corion theorbtwo: I've only looked into potential candidates for DVB-T boxes, and I still think that the Siemens Gigaset AV740 is the hot thing. But the image quality seems to be sub-par.
gaal Couldn't match `ContT Val (ReaderT Env IO)' against `IO' <--- nothingmuch tries to read:
Corion theorbtwo: No english TV, at least not in Frankfurt (only 30 channels, and all German/private) 16:50
theorbtwo Ugh.
gaal ContT Val (something) will, given proper massaging with builtins/pugsisms, create an IO
theorbtwo All the actual /content/ is from the US though! (OK, half-ish.)
gaal and we're missing that?
Corion theorbtwo: You should be able to find the list of channels online at the website of the bavarian broadcast thing - br-online.de most likely.
theorbtwo I tried.
Not so much.
gaal walks nm to his car
theorbtwo But I don't expect them to have new US or British channels. 16:51
I was just hoping they'd put out both the dubbed and original soundtracks.
Corion theorbtwo: See www.br-online.de/br-intern/technik/dvb.html
theorbtwo I did.
Corion (PDF links at the lower half of the page)
theorbtwo: I don't know what they'll do about the audio tracks, and how many they'll broadcast.
theorbtwo I can't make heads or tails or most of it. 16:52
Corion looks again. 16:53
theorbtwo: There is no info on the audio tracks ... Maybe the ueberallfernsehen.de has it somewhere ... 16:54
theorbtwo Ah, well, that's an improvement. 16:56
castaway somehow doubts the content will change much
theorbtwo Hm, perhaps it isn't. 16:57
ninereasons nothingmuch, should I be seeing something at nothingmuch.woobling.org/pugs_test_status/ ?
autrijus rehi 17:01
gaal: you want liftIO 17:02
gaal: still there?
Corion Grrr. testgraph.pl is broken once again.
(and run-smoke.pl is no help, as it hides all output :((( )
theorbtwo liftIO takes IO foo and makes it into an Eval Foo. (I think.)
autrijus yup. 17:03
that's what it does.
theorbtwo Er, ignore the caps on foo.
jabbot pugs - 2044 - Moved fixed pugsbugs/ test into more fit
gaal is back; nm is on his way home 17:06
make ghci is so cool :) 17:07
theorbtwo www.haskell.org/ghc/docs/6.4/html/l...index.html ++ 17:08
(Note that the sorting is ASCIIbetical and case /sensitive/.)
autrijus gaal: so, just liftIO it and see if it works :) 17:10
if it still doesn't, you can still commit and I'll fix it
gaal not sure what to lift - the map? the signalProcess closure?
vals? 17:11
autrijus the signalProcess closure, most likely.
gaal r2045 (breaks the build) 17:16
oh, autrijus, the Compat version is bad too, i didn't make a correct compat version of the Signal type. 17:17
autrijus looking 17:18
gaal should be CInt, probably
autrijus doesn't terribly matter :) 17:19
fixing
gaal since i failWith, yeah :) 17:20
jabbot pugs - 2045 - broken attempt at kill 17:23
autrijus fixed. 17:27
gaal btw this is knowingly just a first shot: it doesn't attempt kill 0, $pid, and unless haskell gives us that i dont' know how to easily get it
wow
autrijus r2046 17:28
gaal i totally don't undersand that :) 17:29
autrijus :) 17:32
Corion Does the pugs version number not get set automagically from svn ? My pugs --version remains statically at r2020
autrijus Corion: it should. if it doesn't... that's a bug (Altho not a serious one) 17:33
gaal Corion, you need to perl Makefile.PL
autrijus gaal: ok, I'll try an easier to understand version
theorbtwo You don't need to perl Makefile.PL.
Corion gaal: I think I did. Several times.
theorbtwo Or at least you shouldn't.
Corion I wondered because my smoke output didn't seem to update. :)
gaal um actually, you're right, you needn't need to
you need to get make to rebuild Config.hs
jabbot pugs - 2046 - * "kill" implemented.
gaal which might take a make clean? 17:34
autrijus gaal: r2047 -- I hope it's easier to grok now
gaal autrijus, i'd love to understand the first version too :)
autrijus gaal: both are the same thing :)
ok, let's do it line by line 17:35
op2 "kill" = \s v -> do
sig <- fromVal s
pids <- fromVals v
the first two lines casts (s :: Val) to (sig :: Int)
and (v :: Val) to (pids :: [Int])
gaal yes
autrijus let doKill pid = do
signalProcess (toEnum sig) (toEnum pid)
return 1
then we default an inner function
called doKill 17:36
its signature being
doKill :: Int -> IO Int
the sole purpose of its existence is to take pid (Int)
gaal IO Int, because "return 1", yes
autrijus cast it to ProcessId (via toEnum)
and also cast sig to Signal (via toEnum)
and throw them to signalProcess
next line:
rets <- mapM (tryIO 0 . doKill) pids
rets is obvious of type (rets :: [Int]) 17:37
so we unroll one iteration in the loo[
loop
(try IO 0 . doKill) pid
which is
tryIO 0 (doKill pid)
gaal "tryIO 0 f" returns either f, or 0 if it failed
autrijus tryIO :: (MonadIO m) => a -> IO a -> m a 17:38
basically it lifts an IO action -- here is (doKill pid)
into an Eval action
and supplies a default value to return if it fails
recall that 17:39
Corion Build is broken for me at r2047 (Wong Kar Wai)
autrijus doKill :: Int -> IO Int
so
Corion: Compat.hs issue?
doKill pid :: IO Int
Corion autrijus: Yep -
src/Pugs/Compat.hs:35:4: Not in scope: type constructor or class `Signal'
Aaah - I get it :) 17:40
autrijus Corion: just nuke the Signal export
Corion ... so now, we'll get the ugly signals emulation we all dread in Perl5/Win32 already :)
Haskell allows trailing comma now?
autrijus only in export list
Corion Should I commit that back or is it a dirty Win32 fix? 17:41
autrijus Corion: I've fixed the build for you
try svn up
Corion More errors.
autrijus: Cool :) Will svn up and report back
gaal what does "lift" mean? 17:42
autrijus gaal: say you want to write a function
alwaysThree :: IO Int
that always returns 3
how do you do that?
gaal alwaysThree = return 3?
autrijus yup.
why not just 3 ?
gaal but i have to associate it with IO somehow 17:43
autrijus because 3 is Int, not IO Int
gaal or is "
"return" that association?
autrijus return :: (Monad m) => a -> m a
yes.
return turns Int into IO Int
gaal but where in that was IO?
autrijus it's the m
gaal isn't Monad more abstract than IO?
autrijus yup
look at signature again
Corion I think "return 'foo'" in Haskell is 'return sub { "foo" }' in Perl
autrijus return :: (Monad m) => a -> m a
jabbot pugs - 2047 - * use the easier-to-understand "sum" in
pugs - 2048 - * nuke Signal from export list 17:44
autrijus it says:
"return" takes a value of any type
and lifts that value into a monad
denoted by m
so, we have
instance Monad IO
that is, IO is an instance of the Monad class
pasteling "Corion" at 217.86.58.204 pasted "Build error in r2048" (11 lines, 538B) at sial.org/pbot/9384 17:45
autrijus so in the IO monad, return has the type
gaal all right, but then why is my alwaysThree not Monad 3 ?
autrijus return :: a -> IO a
gaal: because Monad is a class, not a type.
gaal: Num is a class, Int is an instance.
alwaysThree actually has a broader type.
gaal okay; what picked the IO type from
aha!
autrijus :t (return 3)
(return 3) :: (Monad m, Num a) => m a
gaal okay.
autrijus it has nothing to do with IO or Int.
IO is instance of Monad, Int instance of Num. 17:46
we can always narrow types using signatures
gaal and then in use time there's inference to the correct type
autrijus but never broaden it.
yup.
gaal okay, good, i think i follow
theorbtwo Well, at compile time, I think. But based on where it's being used.
autrijus (actually, that was not strictly true, in face of monomorphism restrictions -- but I digress)
gaal: so, we say return "lifts a value into any monad".
makes sense?
because it turns a "lower" type into a "higher" type 17:47
Int is lower
IO Int is higher
theorbtwo Higher == less pure?
autrijus it's higher because it's "more annotated", i.e. contains more effects
gaal yes; now liftIO for example; is it :: (IO m) => a -> m a 17:48
?
autrijus no.
liftIO :: (MonadIO m) => IO a -> m a
gaal ah, from an IO monad to a
autrijus here "IO a" is the lower type
gaal er, to a what? :)
autrijus "m a" is the higher type
m must be instance of MonadIO 17:49
instances of MonadIO are things that are higher than IO.
theorbtwo (Which Eval is.)
gaal "MonadIO"? what's that, if IO is already a monad?
autrijus "higher" means "contains"
class Monad m => MonadIO m where
liftIO :: IO a -> m a
a type "m" must first be a Monad to be a MonadIO 17:50
in order to become MonadIO, that type must define some way to "lift" IO actions into that type.
because IO may contain side effcts,
the only safe way to define that is when the "m" itself can perform the same sort of side effects IO performs.
here, "Eval" is that m. 17:51
(making sense?)
type Eval x = ContT Val (ReaderT Env IO) x
it means: "Eval" is something that can perform IO
theorbtwo Ah!
gaal until that last line, it did :)
autrijus but in addition, it can also read an environment pad at any time 17:52
theorbtwo I was right, that's where that ContT Val (ReaderT Env IO) yadda grabage comes from in error messages from time to time.
autrijus and in addition to _that_, it can also at any time take or invoke a continuation that returns a Val.
theorbtwo: yup.
theorbtwo It's writing Eval yadda in least terms.
autrijus that's what the "T" means
ReaderT Env IO
means that it takes a IO monad
then "transforms" it 17:53
to imbue new superpower on it
the superpower being that of the Reader monad
and the thing it reads ("asks") is Env
same goes for ContT Val.
a transformed monad always preserves its original powers.
so ReaderT Env IO can still do IO.
but it's "higher" than IO already
so to perform IO in it, we must lift IO up to meet it 17:54
similar to how we lift (3 :: Int) to (return 3 :: IO Int)
and the way to lift that is liftIO.
actually, a single "lift" also works
lift :: Monad m => m a -> t m a 17:55
actually
lift :: (MonadTrans t, Monad m) => m a -> t m a
it reads:
"lift takes a action in the monad 'm'"
"and returns a new action in the higher monad 't m'" 17:56
so, for example
lift (return 3)
can turn
(return 3) :: IO Int
into
lift (return 3) :: ReaderT Env IO Int
but that is still not Eval, because Eval is two steps higher than IO
so we need two lifts
lift (lift (return 3)) :: (ContT Val (ReaderT Env IO)) Int 17:57
but writing (lift . lift) is insane
castaway wonders when someone is going to dilute the #perl6 channel logs into "Autrijus' Haskell/Pugs Tutorial"
autrijus happily, it turns out the most lifted type is IO
integral what's insane about (lift . lift)?
autrijus so the gods created something special
called liftIO, that can work out exactly how many lift is needed
to promote IO to something higher. 17:58
theorbtwo integral: It gets in the way of what you're actually trying to do.
autrijus integral: it's insane because it means you need to remember how many lifts.
integral ah, ok :-)
gaal is there a diagram somewhere i can stare at that orders the monads?
is the ordering strict?
autrijus integral: say, if we later refactor Eval into WriterT ContT ReaderT IO
then we'd need to write lift.lift.lift 17:59
whereas liftIO will always work.
integral so, liftIO = lift . lift then?
scw autrijus: Err, is it an example?
autrijus integral: no.
in (ReaderT Env IO), liftIO is lift
in (ContT Val (ReaderT Env IO)), liftIO is lift . lift
integral sorry, yes, I meant that
autrijus in (WriterT String (ContT Val (ReaderT Env IO))), liftIO is lift . lift . lift 18:00
gaal www.haskell.org/onlinereport/classes.gif
autrijus scw: yeah, it's just an example. we are not going writerT
Corion is svn.openfoundry.org down?
autrijus gaal: there is no inherent "order" for monads
integral is staring at something transformer like but for arrows
autrijus Corion: it looks like so. pinging them
gaal what i linked to is not for monads, right :(
Corion got a broken build and can't svn up :) So I 18:01
gaal so how come some are higher than others?
Corion ... I'll have to fix it myself :)
gaal is it like the triple camel race thing? are there circularities in height?
autrijus gaal: no no no. :)
you count the height by looking at how many stories it has.
Int -- one story high 18:02
IO Int -- two
Maybe (IO Int) -- three
et cetera.
gaal ah, so each mix has a height
autrijus yes.
the jargon is "kind"
gaal but there are some standard mixes, no?
so the Eval kind is 18:03
autrijus ContT Val (ReaderT Env (IO a))
gaal er, that scary expression from above
autrijus so we are 4 stories high.
a -- 1st
IO -- 2nd
Corion I have a build error at sial.org/pbot/9384 - how do I fix that?
autrijus ReaderT -- 3rd
ContT -- 4th
gaal what are Val and Env doing in that expression? 18:04
autrijus Corion: oops. you fix it by changing Compat.hs line 110 into
signalProcess :: Int -> Int -> IO ()
theorbtwo To specify a ContT takes two parameters -- the thing the continuation returns, and the inner thing.... I think.
autrijus gaal: what theorbtwo said. you can think it in lambda terms
IO :: a -> IO a 18:05
Corion Yay autrijus
autrijus ReaderT :: b -> m a -> ReaderT b (m a)
that is, the ReaderT transformer requires one extra type param
gaal ah, okay, yes. 18:06
which theoretically could be a monad too, no?
autrijus sure...
gaal so you have height in several dimentions.
autrijus you can have
theorbtwo Well, the m a bit must be a monad.
autrijus ReaderT (IO Int) (IO Int)
theorbtwo But b could also be a monad.
autrijus but the entire type is still only three stories high. 18:07
because we only care about the last argument.
the reason is that all monadic constructs operate on that.
eg in
ReaderT (IO String) (IO Int)
when you do =<<, >>=, bind, join
<-, return 18:08
they all operate on IO Int
not IO String
to operate on that IO String, you use "ask".
so you can have
ReaderT (Eval (Eval (Eval a))) Int
err
ReaderT (Eval (Eval (Eval a))) (IO Int)
theorbtwo 's head hurts just thinking about that.
autrijus and it will still be three stories high.
gaal h == 3 18:09
autrijus yup
gaal though i have no idea what (Eval (Eval (Eval a))) means! :)
autrijus gaal: it means something that must be evaluated thrice to yield a result :)
it's actually quite useful.
gaal i.e., /eee(k!)
autrijus yup. 18:10
type Hastur a = Eval (Eval (Eval a))
so, foundry is down, and it's 2am. so it will take 7 hours before it goes online :-/ 18:11
that sucks
but wait... it's Sunday, that may be 29 hours (gasp)
meanwhile send patches to list *sigh*
scw May be a good news to me that I can spend more time on preparing mid term :/ 18:12
obra what happened to foundry?
autrijus obra: we don't know, it appears that only that machine is down
cvs.openfoundry.org lives
obra oh :/
autrijus which is bad, because my rt3-elixus stuff lives on that too
but I'll live
obra you don't have it mirrored?
autrijus svk? sure do 18:13
if not for svk I'd be panicking right now :)
so I'm switching main repo to svn.perl.org 18:14
for the next day
obra heh
gaal so how does liftIO work? or is that too deeply magical for now? 18:16
autrijus gaal: it's actually simple :)
castaway calcs the length then applies?
autrijus gaal: you start with liftIO in IO 18:17
where
liftIO = id
makes sense?
gaal yes
autrijus then in a transformer, you define
liftIO a = lift . liftIO a
liftIO a = lift . liftIO $ a
gaal (you don't have to lift IO to get IO - right?)
autrijus right. 18:18
so, in a transformer, it just do a liftIO plus a lift.
that way it "delegates" the liftIO to the immediate downward monad
gaal so "a transformer" is any, er, type of the class Monad except IO itself, that might be interestied in lifting IO
autrijus until it touches IO
gaal yes
autrijus a transformer is something that looks like FooT 18:19
for further enlightenment read www.nomaware.com/monads/html/
gaal is that just a naming convention, or is the T part of the syntax?
ok, will. 18:20
thanks muchly! :)
(Evan recommended that tutorial too recently)
cognominal autrijus: what is needed to support "print if 1"? 18:21
currently pugs try to interpret "if" as a function. 18:22
gaal autrijus++; # worthy and patient monad walkthrough 18:23
autrijus cognominal: statement modifiers needs block parsing when encountered as a term. 18:24
Foundry down, use svn.perl.org/pugs/trunk for now | pugscode.org <Overview Journal Logs> | r1773/winxp: 587/4256 smoke/win2k (occasional): xrl.us/fqum (158/4302, r2032) | pugs.kwiki.org 18:28
theorbtwo svn co svn.perl.org/pugs/trunk 18:31
svn: PROPFIND request failed on '/pugs/trunk'
svn: PROPFIND of '/pugs/trunk': 405 Method Not Allowed (svn.perl.org)
autrijus errrr. 18:32
Foundry down, use svn.perl.org/perl6/pugs/trunk for now | pugscode.org <Overview Journal Logs> | r1773/winxp: 587/4256 smoke/win2k (occasional): xrl.us/fqum (158/4302, r2032) | pugs.kwiki.org 18:33
theorbtwo Thank you, that works. 18:33
autrijus theorbtwo: your bug is that two returns. 18:37
dropping one works.
- return $ case ret of 18:38
+ case ret of
+ Left e -> error $ unlines $ ["Couldn't eval haskell code: "]++e
Right (Just x) -> return x
theorbtwo Oh.
autrijus theorbtwo: when you do
return (return x)
you enter two monads.
incidentally [] (list) is also a monad.
theorbtwo Ah.
autrijus [Char] is a monad that turns Char into [Char].
theorbtwo That makes a lot of sense.
(In a sick sort of way.) 18:39
autrijus pugs> say eval_haskell<"Lambda!"> 18:48
Lambda!
obra that's a first class primitive? 18:49
Corion Hmmm. How do I change the repository URL instead of checking out a new copy? Or is committing out of the window for the moment anyway?
autrijus obra: it's a experimental feature that will go away :) 18:50
obra :)
autrijus likely to
eval("foo", :language<Haskell>);
obra was just pondering eval:haskell
Corion ... another todo test was fixed (and can be promoted): t/general/atoms.t: 60: todo_ok() -> ok()
obra ala rx:perl5
autrijus that works too. 18:53
obra is so not a language designer 18:54
theorbtwo ponders -- battle more with error handling and eval_haskell, or get my system back into working order... 18:58
(Working from a knoppix CD at present.)
(Largely over ssh to a slower machine.) 18:59
obra Though I guess it would make sense to have a single syntax for "use/emulate this other language "
Corion use Inline::Haskell <<'__END__' 19:03
:))
castaway : 19:04
:)
Corion BTW, I'm currently going through the tests and fixing the plans and succeeding TODO tests
(while, in another chat/message board, talking about execution order vs. implicit parallelization) 19:05
And, BTW, what causes "pugs.exe: cannot cast from VList [] to Handle" ? t/pugsrun/02-dash-n.t produces these ... I think it's a problem of the while($_ = =<>) { ... } loop ... 19:06
machack666 is svn.perl.org taking a long time to switch to for anyone else? 19:07
theorbtwo would bet that <> is not defaulting properly.
autrijus I wish I can help, but I must crash now :)
machack666 never mind
theorbtwo Er, rather that &prefix:<=> isn't defaulting properly.
castaway later autrijus
theorbtwo G'night, autrijus. 19:08
OK, time to fix my computer. 19:09
Or kill it trying.
autrijus g'nite. journal up, btw. 19:10
pasteling "ninereasons" at 130.94.162.133 pasted "numberification" (26 lines, 578B) at sial.org/pbot/9386 19:12
ninereasons does that behavior look right? 19:14
example 2 says: 19:17
my %hash = <a 1 b 2 c 3>; for (%hash.pairs) { say $_.values == 2 ?? $_.values ~ ":yes" :: $_.values ~ ":no" }
shouldn't 2 == 2 ? 19:18
(2 eq 2 is true)
($_.values eq 2 is true when $_.values is "2", that is) 19:19
mj hello ... say +system('bla') ~ +system('pugs -v'); will print 11 :-( 19:21
machack666 I know you all are busy, but does someone with commit access want to look at this patch for the hyper operators tests?
sial.org/pbot/9383
Corion machack666: Currently, committing is not possible :)
machack666 this tests for problems whith truncating the number of dimensions in a list 19:22
well, then
:)
when's in chaarge of openfoundry?
s/when/who/
castaway nobody til Monday ,)
machack666 eek. 19:23
castaway (since its already Sunday in taiwan, sooner than it may sound)
machack666 svn.perl.org is r/o, or just no commit permissions setup? 19:24
castaway for less people, irrc
machack666 castaway: thanks for the info; I'll check back tomorrow 19:25
Corion Can I get a second pair of eyeballs for the last test in t/operators/quoting.t ? In line 187 - shouldn't the backslashes be doubled (that is, four backslashes alltogether) ? Because single quotes still need the backslash doubled, no? 19:27
Corion fudges it by my $backslash = "\\"; and then using $backslash twice in the interpolated string ;) 19:28
Gah. I need to get my daily commit fix! 19:29
Hmmm. Maybe I should hack something together from HTTP::Server::Simple and the YAML output. To get a live test browser. With a (CGI) "rerun test" facility, to rerun single or all tests. 19:32
While I cannot commit.
:)
... something like the moral equivalent to ebug :)
obra Corion: that would be neat. 19:34
Corion obra: Yes, I think so, myself. That'll require looking into testgraph.pl though, I fear.
sproingie yaaaaaay pugs working ... now to start pugsnomic :) 19:49
pasteling "ninereasons" at 130.94.162.133 pasted "all good?" (29 lines, 713B) at sial.org/pbot/9387 19:53
ninereasons in example 2, is it right that stringification should be required for '==' to return true (as in example 4) ? 19:55
in other words, is this as it ought to be? : 20:00
pugs> my %hash = <a 2>; %hash.values == 2;
bool::false
since this is as it ought to be ?: 20:01
pugs> my %hash = <a 2>; ~%hash.values == 2;
bool::true
no opinions? 20:03
Juerd ninereasons: stringification and == never go together well.
%hash.values should numerically be 2, list/array-ishly be <2>, and for the string version you can theoretically base that on any of the other two: 20:04
1. array => stringify the <2>, resulting in '2', which as a number is 2
2. number => stringify the 1, resulting in '1', which as a number is 1 again 20:05
Corion Heh. pugsbugs golf: pugs -e "=<>"
Juerd I don't think any of these makes a special kind of sense over the other, but I think the former has more practical use.
Corion (seems like all use of =<> is currently broken)
Hmm. No - pugs -e "=<A>" also doesn't work 20:06
ninereasons Juerd, so you think that it should be true to say, my %hash = <a 2>; %hash.values == 2; ? 20:08
Juerd No 20:09
That should be false, as +%hash.values is 1
And == forces numification.
ninereasons now I follow.
what about the second one then, Juerd: my %hash = <a 2>; ~%hash.values == 2; 20:11
is that as it should be?
Juerd Yes 20:12
Perhaps with a warning :)
Hm, no
Only special in the specific case of the first value looking like a number 20:13
And in all other cases it already warns about foo not being numeric in ==
In fact, the explicitness of ~ should even disable that warning iMO
s/iMO/IMO/ 20:14
Oh, and for future reference: please use a numeric value in examples like this that don't naturally occur in a similar construct, like +%hash.kv, which is 2 20:15
ninereasons_ I lost connection, but saw your response in the backlog, Juerd. thank you. 20:28
20:36 ninereasons_ is now known as ninereasons
nothingmuch holy crap 21:59
my friend got run over, and then beat up 22:00
he was a bit drunk, so the guy driving pulled over... first guy gets out of the car
obra oh god.
nothingmuch blam, he gets hit
obra is your friend ok?
nothingmuch the assholes then go back
(yep, was hospitalized yday, but released) 22:01
they start beating him up
driver and others get out
they beat them up too
try to steal their car
and end up stealing only their cell phone
then the cops arrive
but instead of chasing after them, they stick around
and try to get some kind of witness report
while he's lying on the pavement, entirely dislocated
can't see a thing (glasses broke) 22:02
s/dislocated/disoriented/
*sigh*
theorb Sigh. 22:03
Corion mumbles something about people thinking that a file named "pugs" will always exist. 22:45
nothingmuch ?
Corion (on the other hand, that was a low hanging fruit of four additional tests fixed)
nothingmuch: ok(-f 'pugs') fails on Win32
nothingmuch oi vey 22:46
Corion nothingmuch: No shit
nothingmuch changed to 'ok -f $?PROGNAME' or something?
Corion nothingmuch: Ah - that's even better. I special-cased Win32 and used a variable ($pugs)... $?PROGNAME is better! 22:47
nothingmuch =)
did you get the fixed HTMLMatrix?
sorry for that bug with unexpected ok
nothingmuch has been a terrible releng
Corion nothingmuch: ? 22:49
nothingmuch the table was yellow instead of dark green
because it was ok instead of
'actual_ok' 22:50
Test::Harness consideres 'not ok # TODO' ok
Corion aaah 22:51
Are you sure that $?PROGNAME should work?
Hah. $*PROGRAM_NAME 22:52
Yay. Only one non-passing test in operators/filetest.t now. And all of them were test bugs ... 22:54
... and -z does not get tested at all ...
elmex ? 23:06
btw. why do tests speed up development process? 23:07
castaway because then you know exactly what to write
(and get less distracted, I think) 23:08
elmex distracted?
castaway from the goal
nothingmuch elmex: also, you can think about how you want to solve something, without thinking of the other consequences 23:09
if your tests are good enough, the reveal the consequenced without thinking 23:10
elmex hm. well.. err... the goal is to write a perl 6 interpreter ;) don't know how to get distracted from that
nothingmuch and then you can think
Corion elmex: But you don't write it in one day.
nothingmuch the goal is broken down to little goals
theorb You don't get into the "I could change this, but it might make other things break" problem.
elmex of course not
theorb You can try it, and know exactly what else you broke.
elmex well, the 'breaking other things' problem is mainly a problem of not understanding code or so.. .well. i also think, that tests are good for that reason, to see when i break something. 23:11
but besides that i don't see many reasons for tests
castaway right, its the "breaking the big problem down into manageable ones" approach
nothingmuch elmex: humans have limited memory
castaway they're a guideline.. tell you whats done, what needs doing, etc
elmex hmm
theorb elmex: Also, they provide feedback.
nothingmuch tests let you keep it free for what you want to do 23:12
not what you have already done
and what will happen if you change xyz
theorb If you don't have anything saying "OK, you did something, yey!", then you can hack and hack and hack and not feel like you've gotten anywhere.
elmex heh, i often rewrite old code... throw it away and rewriting it. that won't show up in tests
theorb Not if you do it right. 23:13
elmex do what right?
theorb But you can be sure you did do it right if the pattern of pass/failing tests doesn't change, or gets better.
Replace old code.
elmex well, when the old code was also as valid...
pjcj elmex: that's the major reason for having tests, in my mind -- so when you refactor your code you know you have done it right 23:15
nothingmuch c2.com/cgi/wiki?TestingLetsYouGoFast
pjcj programming without good tests is just too much like hard work
nothingmuch think of testing as a way to make sure that someone looks the same on the outside 23:16
even if it was gutted
theorb s/someone/something/
nothingmuch theorb++
what if someone else in the project started using an undocumented interface, you wrote a while ago
and you say "hey, this is the only place i used xyz, it could be better'
and you change xyz 23:17
if that person wrote tests for their part of the system
then this would break by your change
but more often than not you have these problems with your own code
this is a good case
testing lets you ignore these problems
because if there is a fine enough granuality, the *implications* of changes are controlled 23:18
and you don't have to worry about it anymore
Corion Does anybody have an idea why 1**Inf is defined as NaN ? 23:19
theorb I think it's one of the undefined terms by somebodyoranother's therum. 23:20
Try mathworld.wolfram.com/Indeterminate.html 23:24
(I can't see the equations there at present; I don't have X.) 23:25
Corion theorb: Thanks - that explained it ! 23:34
I've added that link to the relevant test :)
theorb Haskell is written by mathematicians, and we stole their arithmitic. 23:35
Corion good night 23:38
theorb G'night, Corion.
castaway night Corion 23:39
nothingmuch btw, will p5 have ∞? 23:43
and why is 1**Inf Nan while 1/0 a fatal error? 23:44
theorb I can't see that char from here, nm.
nothingmuch inf symbol
theorb Ah. 23:45
Donno.
nothingmuch is there a nice idiom for creating an empty object in p5? 23:59