Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2005-04-16

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

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

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo