Experimental IRC log haskell-2007-04-27

Available formats: content-negotiated html turtle (see SIOC for the vocabulary)

Back to channel and daily index: content-negotiated html turtle

These logs are provided as an experiment in indexing discussions using IRCHub.py, Irc2RDF.hs, and SIOC.

00:00:45<Binkley>so who wants to join a California Central Coast Haskell group? :P
00:01:02<SamB_XP>how about a Greater Philadelphia group?
00:01:32<matthew-_>Binkley: there are some folk at Google who might, Adam Langley for one.
00:01:49<Binkley>well, maybe I should start one, then!
00:02:12<sorear>Samuel Falvo II, too
00:02:22<dons>also, Clifford beshers, I think.
00:02:56<stepcut>dons: might be too far north
00:02:57<Binkley>not sure what the function of such a group would be
00:02:59<Binkley>besides drinking
00:03:02<Binkley>which would be fine with me
00:03:10<stepcut>everytime ghc's brain explodes, take a drink :)
00:03:13<Binkley>haha
00:03:18<Binkley>I'd have died of alcohol poisoning by now
00:03:32<stepcut>I think I have seen 4 people from San Diego on #haskell at once, though...
00:03:48<sorear>who were the other two?
00:04:02<stepcut>me, you, cliff, and some random guy last weekend
00:04:13<stepcut>cliff==thetallguy
00:05:12<kc5tja>matthew-_: I work at Google too. :)
00:05:53<sorear>kc5tja: I already mentioned you
00:05:56<kc5tja>oops, didn't see sorear's response.
00:06:01<kc5tja>And we cross-typed.
00:06:10<kc5tja>I'm not doing too hot today. :)
00:06:15<sorear>cross-typed?
00:06:29<kc5tja>You typed and I typed at the same time, and messages almost went out at the same time.
00:06:57<kc5tja>Unless there's a more technical term for that, I just invented one on the spot.
00:07:04<stepcut>looks like, tessier, gFunk, Mortoc, wkh, and user317, are all from San Diego, and have been in #haskell at least once
00:07:16<sorear>nemequ too
00:07:18<matthew-_>kc5tja: do you know agl? I think he was in Google Books or something. He gave a google tech talk about STM a week or so ago.
00:07:37<mdmkolbe-hom1>kc5tja: keyboard race condition?
00:07:50<stepcut>sorear: all those users I listed have the honor of being in regions of San Diego that are serviced by cox ;)
00:08:04<sorear>stepcut: don't know how you are searching - but /who #haskell gives nemequ ... sd.sd.cox.net
00:08:05<matthew-_>take-global-lock-on-keyboards >> type >> release-global-lock-on-keyboards
00:08:13<sorear>ah oh
00:08:16<sorear>*ok
00:08:30<stepcut>sorear: I just googled site:http://tunes.org/~nef/logs/haskell/ sd.cox.net
00:08:32<lambdabot>Title: Index of /~nef/logs/haskell
00:08:50<sorear>anyone know what the dns suffix is for time warner/ att SD?
00:09:20<cedricshock>Hi. Do any of you know of a sparse list implementation in Haskell?
00:09:33<sorear>like Data.Map?
00:10:18<stepcut>sorear: san.res.rr.com
00:10:19<cedricshock>Yeah, Data.Map would be one.
00:11:09<cedricshock>I'll think about this some more.
00:11:39<mdmkolbe-hom1>cedricshock: Data.IntMap maybe?
00:13:22<cedricshock>Data.IntMap is one too. These are probably a better way to go than the data structure I was just "inventing".
00:15:38<cedricshock>I think I'll bang out my silly structure just for practice.
00:16:33<mdmkolbe-hom1>cedricshock: which technique for sparcity would you use? (e.g. data SList a = SList [Int] [a])
00:17:42<cedricshock>mdmkolbe-hom1: Almost that. data SList a = [(Int, a)] (assuming I got my haskell syntax right)
00:18:29<mdmkolbe-hom1>cedricshock: yeah, that is more correct than what I wrote
00:18:34<dolio>There are functions in Data.List for various operations on such lists.
00:18:49<cedricshock>mdmkolbe-hom1: Yours makes writing a lot of the interface almost trivial.
00:18:58<sorear>cedricshock: what kind of sparsity do you want? eg, do you want fast semi-random access? do you want laziness? ...
00:19:37<mdmkolbe-hom1>cedricshock: once we get dependant types into Haskell, then my version could work right ;-J
00:19:55<cedricshock>sorear: laziness, fast access in order, fast transposition of nested lists. Gonna try to throw conjugate gradients on top of this thing.
00:19:56<dolio>> lookup 5 [(1, 'a'), (3, 'b'), (5, 'x'), (7, 'g')]
00:19:58<lambdabot> Just 'x'
00:20:22<kc5tja>matthew-_: No. I have never heard of him actually.
00:20:23<mdmkolbe-hom1>I imagine Data.IntMap does something like: data SList a = SList (Maybe (SList a)) Int a (Maybe (SList a))
00:20:54<cedricshock>sorear: I'm really not sure about the transposition, something more sophisticated might win at that.
00:21:22<sorear>mdmkolbe-hom1: pretty close, yeah
00:21:54<dibblego>is there a dos2unix on mac?
00:22:19<Binkley>Mac OS X, sure
00:22:25<Binkley>anything you can run on Unix you can run on OS X
00:22:26<Binkley>(mostly)
00:22:33<dino->I'm working with HUnit for the first time. Having trouble understanding a couple of things..
00:22:40<dino->What exactly is assertString for?
00:22:50<dino->It seems to fail if its string argument isn't null.
00:23:06<EvilTerran>is there a constant-time-both-ends FIFO structure in the standard libraries? what about in pure Haskell?
00:23:08<mdmkolbe-hom1>dibblego: perl -pe 's/\r\n/\n/g' (and maybe a -I (or is it -i) option)
00:23:18<cedricshock>mmdkolbe-hom1: I understand you comment about dependent types now (length of lists must be the same). I'm at a loss on your gues ate Data.IntMap.
00:23:25<dino->mdmkolbe-hom1: perl -pi -e
00:23:39<sorear>EvilTerran: yes. Data.Sequence
00:23:44<dibblego>ta
00:23:45<mdmkolbe-hom1>cedricshock: it's a ballanced tree
00:23:55<sorear>mdmkolbe-hom1: no, that's maps (on closer examination)
00:24:11<mdmkolbe-hom1>sorear: Data.Map?
00:24:16<sorear>yes.
00:24:19<dolio>IntMap is a trie.
00:24:27<cedricshock>mdmkolbe-hom1: I see it now. Yes, it's a tree.
00:24:32<sorear>mdmkolbe-hom1: Data.IntMap is data SList a = Tip Int a | Split (SList a) (SList a)
00:25:45<cedricshock>sorear: Ahhhh. No monads.
00:26:21<EvilTerran>sorear++
00:26:22<EvilTerran>thanks
00:26:31<EvilTerran>ACTION sets about trying to understand how it works
00:26:37<mdmkolbe-hom1>dolio: I'm not sure it's techniqually a trie http://en.wikipedia.org/wiki/Trie
00:26:37<lambdabot>Title: Trie - Wikipedia, the free encyclopedia
00:27:29<sorear>Data.IntMap is a trie of the PATRICIA subfamily
00:27:47<sorear>Data.Map is a plain old balanced tree
00:28:34<sorear>(I'm not shouting - PATRICIA really is spelled with all caps)
00:29:41<ortmage>so i got ghc-6.6.1 installed, but i had to use the i386 version because of link issues (it's a mixed 64/32 environment)
00:29:42<mdmkolbe-hom1>@source Data.IntMap
00:29:42<lambdabot>http://darcs.haskell.org/packages/base/Data/IntMap.hs
00:30:41<ortmage>i'm trying to compile ghc-6.6.1 for x86_64 using it, and i still get nativeGen/MachCodeGen.hs:108:27: Not in scope: `assignReg_I64Code'
00:30:50<SamB_XP>sorear: it is?
00:30:58<SamB_XP>ACTION thought it ought to be but wasn't
00:30:59<sorear>SamB_XP: yes!
00:31:05<mdmkolbe-hom1>sorear: I was under the impression that tries usually split more than binary ways
00:31:21<ortmage>should i try darcs ghc, or am i missing something obvious?
00:31:27<dolio>mdmkolbe-hom1: But it's a trie on the bits of the int, so there are only two ways to split.
00:31:37<sorear>mdmkolbe-hom1: no, tries can split any fixed number of ways
00:31:50<sorear>mdmkolbe-hom1: tries have constant depth and constant fanout
00:32:14<sorear>optimizations like those of the PATRICIA family can reduce physical depth
00:33:26<mdmkolbe-hom1>ACTION finally found a good definition of PATRICIA trees
00:38:38<sorear>ACTION points mdmkolbe-hom1 at wikipedia
00:38:48<dino->Also, what's the difference between a "user error" and a "failure" in hunit?
00:39:15<sorear>what's the user error message?
00:39:16<dino->I seem to only be able to get user errors, as when intentionally setting up a test that will always fail.
00:39:34<sorear>user error almost always means you called error
00:39:39<sorear>perhaps fail?
00:39:48<mdmkolbe-hom1>the wikipedia page burried the key point (that the edges of P-Trees are a string in stead of a single character)
00:40:03<sorear>I think you're supposed to use the assert* functions
00:40:17<Binkley>mdmkolbe: so edit it, then! :-)
00:40:40<sorear>dino-: don't use fail
00:40:52<sorear>hunit is io, io fail is throw-an-exception
00:41:02<dino->test4 = TestCase $ assertEqual "test4" 1 2
00:41:09<dino->That outputs a user error.
00:41:41<dino->### Error in: 2:test4 user error (HUnit:test4 expected: 1 but got: 2)
00:42:32<mdmkolbe-hom1>Binkley: I just did
00:43:27<sorear>dino-: performTestCase is supposed to wrap it and rewrite the errors
00:44:04<dino->The 1.0 user guide showed examples using runTestTT, so I must called that from main in my code.
00:44:10<dino->s/must/just/
00:44:55<sorear>hmm.
00:45:05<sorear>runTestTT seems to use performTestCase?
00:46:27<dino->No, it uses runTestTest and putTextToHandle
00:46:35<dino->perhaps I didn't read far enough into the manual
00:46:48<dino->runTestText
00:47:50<cedricshock>A sparse list seems to only mean something if there is a default value (0 in my case for linear algebra). For example, zipping two of them together is problematic. Is there a haskell data class for things with a default value?
00:49:37<EvilTerran>could you use Maybe, and coerce when appropriate?
00:49:53<EvilTerran>or Either, if the default is per-item?
00:50:01<cedricshock>EvilTerran: Maybe ;)
00:51:37<cedricshock>EvilTerran: The default could be per list, yes. It could even be per part of a list, but I think I want to be dealing with a stricter version of this all, and have one default globally for any type that's involved.
00:52:25<dino->sorear: Thanks, I think it has something to do with using that runTestTT.
00:52:26<EvilTerran>get Nothing = default; get (Just x) = x
00:52:49<cedricshock>Not having a global default turns this into run-length encoding instead of sparsity.
00:53:29<EvilTerran>(get = fromMaybe default)
00:53:44<sorear>is there anything 'wrong' with RLE?
00:53:50<sorear>it seems more generally useful
00:55:06<cedricshock>sorear: No, nothing wrong with it. Having finite lists is also more generally useful, but I'm not doing that either (for time's sake and because I want one, and only one, vector type).
00:57:28<cedricshock>sorear: Actually there is something "wrong" with RLE; it doesn't provide a strict enough basis for being able to fold over lists quickly, without a new idea of the interface to fold. (It's fine for map). Also it'd probably be even worse for transposing, but I'm not sure.
00:59:10<sorear>why would folding over a sparse list be any easier?
01:01:31<cedricshock>sorear: What you assume about f :: a -> b -> a that you fold with. Since folding f on the empty list yeilds the starting accumulator you can stretch that idea to f folded over the entire empty section is the starting accumulator, especially since in my model [] is infinitely many defaults (zeroes).
01:02:41<ddarius>The whole point of a sparse data structure is that you know what the unrepresented elements are.
01:02:44<sorear>But folding over default values is not the same as folding over no values!
01:02:45<ddarius>(Usually 0)
01:02:52<sorear>consider (*)
01:03:22<sorear>folding over zeros turns the accumulator to zero, not folding at all leaves the accumulator unchanged.
01:03:22<cedricshock>Though this could be a fun list: data RLEList a = Run Integer a | InfinitelyMany a | EndOfList
01:03:33<sorear>Besides, you said you wanted laziness.
01:03:48<sorear>a -> b -> a is used by foldl's, which are not laziness compatible.
01:05:00<cedricshock>sorear: Yeah, * is exactly the kind of function that requires you to not take advantage of the sparsity. I want to be able to exclude things like * from the type of function that can be applied.
01:05:05<dino->Eh, still happening even when I use the other controller (runTestText). I think this is a bug still present in the Debian package I have.
01:05:24<dino->http://hackage.haskell.org/trac/ghc/ticket/476
01:05:26<lambdabot>Title: #476 (HUnit treats failures as errors) - GHC - Trac
01:05:44<ddarius>cedricshock: That's not a list, you may want recursive uses of RLEList
01:06:21<cedricshock>sorear: Or rather assume that on any sparse list, the missing things /all/ make an identity out of the folded function. This is reasonable with one default and sparsity, but not with RLE:
01:07:07<cedricshock>ddarius: Oops, yeah it goes only with the run. Also that integer should be from Z+ (no-zeros).
01:07:38<ddarius>Also an Int should suffice.
01:07:53<sorear>Aww, no runs of -1 zeroes?
01:07:54<sorear>;)
01:08:27<cedricshock>ddarius: Which one's which again?
01:08:39<hpaste> sproingie pasted "conway's life" at http://hpaste.org/1591
01:09:03<sproingie>that paste .. i can't figure out what part State plays in it. i don't see any mutation going on.
01:09:03<cedricshock>sorear: Yeah, those negative runs are hard to imagine. The zeros I guess are all right.
01:10:32<sorear> makeBoard w h = runState $ replicateM h $ replicateM w $ State random
01:10:37<sorear>uses ... State!
01:10:45<sorear>to thread randomness
01:11:37<sproingie>i can see how the initial state of the board is nondeterministic ... it's random after all
01:11:41<cedricshock>sorear: Yeah, folding isn't very lazy.
01:11:56<sproingie>i'm still curious where the state comes in
01:12:12<dmwit>sproingie: Have you played around with the random package?
01:12:18<sorear>sproingie: you need the newseed from random n-1 to produce random n
01:12:28<sorear>sproingie: threading that is what State is for
01:12:35<dmwit>You have to constantly use/update a random-number generator (seed), and they use State to do that.
01:12:37<sproingie>oh, i thought random kept it internally
01:12:58<sorear>sproingie: no, that would violate referential transparency
01:13:03<dmwit>Incidentally, since you're looking at Conway's Life, check out
01:13:05<sorear>@type System.Random.random
01:13:07<lambdabot>forall g a. (Random a, RandomGen g) => g -> (a, g)
01:13:11<dmwit>?go an algorithm for compressing space and time
01:13:14<lambdabot>http://www.ddj.com/dept/ai/184406478
01:13:14<lambdabot>Title: Dr. Dobb's | An Algorithm for Compressing Space and Time | March 1, 2006
01:13:28<sorear>Muahaha.
01:13:35<sorear><- hashlife hacker
01:14:04<dmwit>That algorithm ALWAYS makes me smile. It's so *good*!
01:14:06<sorear>I actually implemented a mode for hashlife on arbitrarily large non-quiescent backgrounds.
01:14:12<sorear>Very very neat.
01:14:36<sorear>Too bad the rest of golly wants a finite number of cells ON at a time ;)
01:14:58<sorear>ACTION doesn't suppose recieving mail from Gosper counts as much if the To: is a mailing list :)
01:18:18<sorear>also read this: http://sourceforge.net/mailarchive/forum.php?thread_name=1884234.1152134672214.JavaMail.root%40fed1wml07.mgt.cox.net&forum_name=golly-test
01:18:21<lambdabot>Title: SourceForge.net: golly-test, http://tinyurl.com/yql4uq
01:19:52<dibblego>?hoogle concatMaybes
01:19:52<lambdabot>No matches found
01:20:03<dibblego>?hoogle [Maybe] -> Maybe
01:20:04<lambdabot>No matches, try a more general search
01:20:11<dibblego>?hoogle [Maybe a] -> Maybe a
01:20:12<lambdabot>No matches, try a more general search
01:20:29<cedricshock>sorear: Actually, rle is a good idea. Then the speed gain comes from knowing something about functions (fast ways to repeat them) instead of knowing something about the data.
01:20:39<sproingie>life and CA stuff isn't really my bag, but it's a nice place to start
01:20:55<sproingie>more interesting than hello world anyway
01:20:59<sorear>dibblego: catMaybes or msum
01:21:07<dibblego>ah thanks
01:21:17<sorear>dmwit: what do you think of my post?
01:21:36<dmwit>sorear: I'll have a look.
01:25:42<dmwit>Lots of neat ideas there.
01:46:23<mgsloan>ACTION knows this isn't an erlang channel, but... erlang doesn't have a type system!?!?
01:46:41<cedricshock>mgsloan: Erlang is dynamically typed
01:46:50<mgsloan>arg
01:47:02<jcreigh>oh, really?
01:47:11<jcreigh>for some reason I was thinking it was statically typed.
01:47:19<mgsloan>yeah, one would think so
01:47:32<jcreigh>it has pattern matching, doesn't it?
01:47:34<mgsloan>I suppose there are some issues in regards to distributed computing.. sort of
01:47:35<cedricshock>mgsloan: Yep
01:48:58<cedricshock>jcreigh, mgsloan: Essentially you write every function for the type atom | list (of same) | tuple | function (from same to same)
01:49:14<dons>also, the way erlang emerged (as an interpreter in a business environment) means they don't spend time designing a type system
01:49:50<sorear>cedricshock: erlang doesn't have user defined types!?
01:50:02<dons>I'm not aware of any fundamental reason why erlang wouldn't be statically typed. and given things like the dialyser, it would certainly make sense.
01:50:08<mgsloan>cedrick - huh
01:50:11<cedricshock>jcreigh, mgsloan: It's a bit easire and harder than that. Functions have arity (you can tell them apart by number of arguments) and you can make huge defaults to reject types
01:50:23<dons>one of the problems in compiling erlang is emulating the original (dynamic) interpreter. means you can't optimise as you would wish, unfortunately
01:50:57<cedricshock>sorear: Essentially, no. There are records, but those are pretty much tuple sugar...
01:51:01<mgsloan>cedrik - right, the foo/x notation where x is arg count
01:51:15<jcreigh>cedricshock: so if you pattern match against the wrong type, does it just not patch, or is that an error? (or an exception, or whatever)
01:51:21<jcreigh>s/patch/match/
01:51:33<mgsloan>cedrick - so if you pass in a tuple identical to a data type, it takes that?
01:51:34<cedricshock>jcreight: Faisl to match. It's prefectly legal to do things liek this:
01:51:43<cedricshock>fun {a, b, _} = 12
01:52:05<cedricshock>fun 'imaspecificatom' = 'silly you'
01:52:18<mgsloan>dons - well, I guess one could take erlang and modify as necessary to staticize, etc
01:52:20<cedricshock>And have that be a legal function (pardon if my syntax is booched).
01:53:06<cedricshock>And then if you called fun([a, b, c]) that would fail to match.
01:53:57<jcreigh>[ ... ] = list and { ... } = tuple?
01:53:59<sorear>so UDT's are basically (String,x,y,z)
01:54:02<sorear>?
01:54:39<cedricshock>jcreigh: Yeah.
01:55:42<cedricshock>mgsloan: Trying to call things with tuples can get ugly. I think the apply bifs take lists. Not sure; there's a way to do it but it's been a while since I erlanged up.
01:56:22<sorear>bifs?
01:56:40<cedricshock>sorear: built in functions.
01:57:02<sorear>are builtins magic in erlang?!
01:58:12<cedricshock>sorear: The atoms are not strings, thought they are uniquely identified in code by one (and I believe it can be backwards looked up so symantically they probably are). The bifs aren't magic, but that's where you need to look in the erlang docs for almost everything interesting.
01:59:13<sorear>cedricshock: (guessing) strings with fast equality, like Lisp atoms?
01:59:31<mgsloan>are there any agent-based static typed functional languages?
02:00:01<mgsloan>not that there's much better than erlang - every language has it's downsides
02:00:12<kpreid>jcreigh: pattern matching is not especially associated with static typing
02:00:14<cedricshock>sorear: Yeah. I think theres a maximum of 2^32 atoms in an erlang cluster, so you can probably guess how they're implemented...
02:01:12<Pseudonym>Using nanotech, obviously.
02:01:23<jcreigh>kpreid: sure; I can see how it could work in a dynamically typed language. But in practice it seems to be used more by statically typed languages.
02:01:30<cedricshock>mgsloan: If you just want the pattern matching benefits of static typing that's very easy to do in erlang; make tuples which have the first value be an atom of their type.
02:01:49<sorear>what? not md5? ;)
02:01:54<sorear>well sha1 now
02:01:59<kpreid>jcreigh: I hadn't especially noticed... perhaps we've seen different languages
02:02:20<mgsloan>right, it's actually more about the general benefits of static typing than anything else :)
02:02:28<sorear>If you have an atom collision, you're screwed. but you don't care because you have prize money!
02:02:38<jcreigh>kpreid: probably. I'm thinking of Haskell and ocaml specifically.
02:03:22<jcreigh>sorear: CRC-32, no doubt. :)
02:03:40<kpreid>Static, no patterns: C, Java, C#, ...; Static, patterns: Haskell, ML. Dynamic, patterns: Prolog, Erlang, E. Dynamic, no patterns: Perl, Python, ...
02:03:58<jcreigh>E?
02:04:11<cedricshock>kpreid: What do you mean by patterns?
02:04:11<kpreid>http://www.erights.org/
02:04:13<lambdabot>Title: Welcome to ERights.Org
02:04:28<kpreid>cedricshock: the sort which bind variables to parts of a data structure
02:04:44<kpreid>and can fail
02:04:59<cedricshock>kpreid: D'oh, what we were just talking about.
02:05:02<mvanier>j xmonad
02:05:52<cedricshock>Dynamic: ALL PATTERNS (only way to write): Q, stratego (might be static)
02:06:53<cedricshock>mgsloan: You can get quite a few of the statically typed benefits, since erlang is statically typed, there's just exactly one type.
02:07:18<cedricshock>mgsloan: But none of the interesting ones :(
02:10:01<kpreid>ACTION thinks pattern matching is a Very Good Thing because otherwise you get to write horrific nested conditionals to test and destructure
02:10:23<kpreid>...which probably means I've just gotten used to patterns and seek to emulate them when I don't have them
02:10:41<kpreid>s/emulate/approximate/
02:11:07<dibblego>pattern matching is "nested conditionals to test and destructure", only short and concise
02:11:14<cedricshock>Hmm, I should make a compressor and decompressor for my run-length encoding lists.
02:11:21<nohope>Hello :)
02:11:55<sorear>hello!
02:12:07<sorear>are you new to haskell or just #haskell?
02:12:21<nohope>sorear: Both :)
02:12:32<sorear>well, we hope you like it.
02:12:46<sorear>remember we like answering questions :)
02:13:16<nohope>sorear: Actualy, I'm very interested in learn Haskell from several months ago, but I hadn't have time yet :(
02:13:25<nohope>sorear: Great! :) So... first question:
02:13:47<sorear>I learned haskell because I had a lot of free time and no idea what to do with it!
02:13:54<nohope>sorear: Is Haskell fine for concurrent programming? Using multiprocessors etc.
02:14:00<nohope>sorear: hahaha :) great! :)
02:14:02<kpreid>Yes!
02:14:29<sorear>nohope: sure
02:14:32<monochrom>I only use Haskell for concurrent programming.
02:14:41<dons>nohope: yeah, multicore machines are supported out of the box, and a wide variety of concurrent and parallel abstractions are supported
02:14:51<sorear>nohope: we have lightweight threads and parallelism in the standard library
02:14:59<nohope>hmmm
02:15:06<nohope>That's really so cool!
02:15:12<kpreid>nohope: check out the Control.Concurrent.* and Control.Parallel.* modules
02:15:20<sorear>nohope: and the GHC runtime comes with a load-balancing multi-cpu scheduler
02:15:23<nohope>haha, I'll never get out of this channel anymore.
02:15:43<nohope>Nor leave this language.
02:16:00<sorear>nohope: so you can start 100 threads, compile with OSthread support (-threaded), run with +RTS -N4, and you'll get 25 threads running on each of 4 cpus
02:16:03<dons>> fix ((1:) . scanl (+) 1) -- have a fixpoint!
02:16:05<lambdabot> [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17...
02:16:26<nohope>sorear: Sounds very good.
02:16:28<sorear>> nubBy(((>1).).gcd)[2..] -- have a HOF!
02:16:30<lambdabot> [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,...
02:17:26<cedricshock>nohope: Just never look at the transaction monad; it's too good to be true. I dream about it sometimes, now.
02:18:48<nohope>So my problem is solved. I do programming in Tcl, PHP and a bit of C and C++, but I was looking for a different paradigm and I found functional paradigm. So I started to look for a good language and I found Haskell. And now my last answer just got answered :)
02:19:28<nohope>ACTION compiles hugs (he doesn't need ghc for now)
02:19:56<zeptar>ogod
02:20:18<sorear>?
02:21:44<dons>nohope: i'd start with a binary release of ghc. it is really a *lot* better environment, these days
02:22:05<nohope>dons: Really? Isn't hugs enough for learning purposes?
02:22:20<dons>it used to be preferred.
02:22:26<dons>but you may as well use ghci
02:22:37<sproingie>where is nubBy?
02:22:38<cedricshock>I forgot about ghci.
02:22:39<dons>which provides a better path into full ghc (and the range of libraries and extensions)
02:22:45<sorear>sproingie: Data.List
02:22:52<nohope>dons: I see...
02:22:57<kpreid>@index nubBy
02:22:58<lambdabot>Data.List
02:23:04<dons>I think you'll have a less than ideal experience of Haskell, if you only use hugs
02:23:19<sproingie>@index gcd
02:23:19<lambdabot>Prelude
02:23:30<sorear>dons: you know, in some language communities people are encouraged to NOT use non-standard extensions... :)
02:23:48<dons>sorear: yeah, but say he wants to build , hmm, any real world haskell
02:23:53<dons>you'll need ghc immediately
02:23:55<sproingie>damn that sieve is so freakin mind-bending
02:24:12<dons>sorear: its not just non-standard extensions either. its the fact that hugs is *slooow*
02:24:29<dons>and only an interpreter. which dramatically changes how you perceive the language
02:24:30<sproingie>ghc is considered the standard around here, things are more or less "backported" to other haskells on a best-effort basis
02:25:09<sproingie>technically the true standard is haskell 98, but things have really diverged
02:25:15<dons>nohope: you should be able to find binaries for ghc your distro's package system.
02:25:27<nohope>Yes. I already found that.
02:25:27<sproingie>speaking of which, when's Haskell' supposed to be final?
02:25:42<ddarius>hugs just sucks all around
02:25:43<Pseudonym>When it's done, I suspect/
02:26:01<sorear>sproingie: Nov 2006
02:26:10<sorear>sproingie: needless to say, hopes are not high
02:26:10<sproingie>i thought it was just capturing current best practices, not inventing new stuff
02:26:19<cedricshock>I need to find a way to break out of writing two functions for everything, one of which just kickstarts the accumulator on the other. There should be a better way to express that.
02:26:30<sorear>cedricshock: where
02:26:41<ddarius>sproingie: Haskell was just supposed to do that and form a consensus for existing lazy FPLs of the time...
02:26:59<kpreid>f x = f' x 0 where f' x n = ...
02:27:02<ddarius>Or use HOFS
02:27:04<dmwit>Okay, I'm trying to write a function morph :: State StdGen [a] -> [State StdGen a]. Is this even possible?
02:27:05<sorear>> let { fac x = fac' x 1 where { fac' 1 a = a ; fac' n a = fac' (n-1) (a*n) } } in fac 10
02:27:06<lambdabot> 3628800
02:27:19<dmwit>(It seems like it should be, but the way of it escapes me...)
02:27:20<sproingie>ddarius: yah but there came an actual language from that
02:27:21<ddarius>dmwit: Sure.
02:27:37<sorear>cedricshock: see my >...
02:27:41<sproingie>i guess Haskell' is another name for ghc then
02:27:46<ddarius>sproingie: That went significantly beyond the consensus of the time.
02:27:54<cedricshock>sorear, kpreid: thanks.
02:28:19<monochrom>cedricshock: Hmm interesting. I would first look into foldr, foldl', scanl, etc. If, next, the data structure is something other than lists, I would write similar foldr, foldl', scanl, etc., for the data structure.
02:28:24<Cale>dmead: looks like sequence?
02:28:29<Cale>er, no
02:28:31<mauke>sequence in reverse
02:28:39<Cale>Yeah, it's the opposite
02:28:49<Cale>How should the effects occur?
02:28:56<kpreid>@type foldM
02:28:59<lambdabot>forall a b (m :: * -> *). (Monad m) => (a -> b -> m a) -> a -> [b] -> m a
02:29:01<sorear>dmwit: what does morph need to do?
02:29:20<Cale>That is, what's the effect of running the ith list element you get?
02:29:24<Cale>(on the state)
02:29:52<dmwit>Like (gen, as) -> [(gen, a) | a <- as]
02:30:29<sproingie>i see a lot of stuff with very clever maps and folds ... it's like functional spaghetti code
02:30:36<sproingie>maybe call it origami code
02:30:42<sorear>dmwit: do you want a reader then?
02:30:48<ddarius>@google evolution of a haskell programmer
02:30:50<lambdabot>http://www.willamette.edu/~fruehr/haskell/evolution.html
02:30:50<lambdabot>Title: The Evolution of a Haskell Programmer
02:30:57<cedricshock>monochrom: Yeah, all of those things are nice, I just manage to make even /more/.
02:31:07<dmwit>sorear: Hmmm, maybe, I'll have a look at that.
02:31:10<sorear>@remember sproingie i see a lot of stuff with very clever maps and folds ... it's like functional spaghetti code ... maybe call it origami code
02:31:10<sorear>
02:31:11<lambdabot>Done.
02:31:18<dmwit>sorear: I also want to write to it eventually, though.
02:31:33<dons>User groups for Haskell! Who'd have thought: http://haskell.org/haskellwiki/User_groups
02:31:34<lambdabot>Title: User groups - HaskellWiki
02:31:53<sorear>dons: haskell has users?
02:31:55<sorear>:)
02:32:15<merus>nah, nobody uses haskell ;)
02:32:21<Cale>Ah, there's a problem with it. You need a value of type StdGen to be able to do that, but you effectively don't have one in that context.
02:32:39<Cale>Because you need a value of type StdGen in order to know how long the list will be.
02:32:53<SamB_XP>so, none of us are anybody?
02:33:05<SamB_XP>I guess we won't be needing this "Who's Who"
02:33:11<Cale>and yet in order to build a list of actions, you need to know how long that list should be
02:33:16<ddarius>Or none of use Haskell and we just like hanging out here.
02:33:22<cedricshock>I always feel dirty writing generators for infinite lists. "-> [a]" just seems like it should mean finite.
02:33:24<ddarius>Certainly the case for me.
02:33:27<Cale>dmwit: so I think you're a bit stuck.
02:33:44<dmwit>Rats.
02:33:53<ddarius>cedricshock: data Stream a = Cons a (Stream a)
02:33:56<dmwit>I mean, I know the length of the string ahead of time in a pure (non-random) way...
02:34:03<Cale>ah, okay
02:34:22<ddarius>dmwit: Do you want to duplicate the state over each or propagate it?
02:34:26<Cale>Then you could write something which takes that as a parameter and produces a list of actions which do the lookup at the end.
02:34:32<dmwit>ddarius: duplicate
02:34:42<dmwit>err... wait
02:34:45<dmwit>What's the difference?
02:35:01<dmwit>Cale: Ah, good idea!
02:35:16<Cale>Note that the result will be different.
02:35:19<ddarius>Considering it's a StdGen, duplicating it would mean each of element of the resulting list would produce the same random numbers.
02:35:24<Cale>(if you sequence them)
02:36:10<Cale>You clearly can't duplicate it if you have that type signature.
02:36:13<sproingie>i just realized this property of random today
02:36:16<dmwit>Well, maybe I should back up and see if I'm doing something fundamentally screwy to demand such oddball behavior.
02:36:29<dmwit>Here's the idea:
02:36:33<ddarius>dmwit: It looks like you are.
02:36:43<dmwit>I'm trying to generate a path in some terrain in a random way.
02:36:53<dmwit>I'd like to do a depth-first search, because any path will do.
02:37:17<Cale>So your final type will be State StdGen Path
02:37:25<dmwit>I was originally planning to simply have a State StdGen [Nodes], because the list monad makes for easy backtracking.
02:37:45<dmwit>This work correctly on the first path.
02:37:51<Cale>Ah, you really want StateT StdGen [] Nodes
02:37:56<sorear>dons: HaskODell eh? *mock mock*
02:38:04<dmwit>But then, if I try to use the random number generator... it bums out taking forever to calculate *all paths*.
02:38:10<dons>sorear: urgh
02:38:20<dons>damn wifi
02:38:23<sorear>*mock tease*
02:38:44<Cale>Or use my RandT
02:38:48<dmwit>Oh no, monad transformers!
02:38:50<dmwit>ACTION faints
02:39:01<dmwit>Okay, this will have to wait for another night... =P
02:39:03<merus>RandT? That just sounds scary.
02:39:06<Cale>http://www.haskell.org/haskellwiki/New_monads/MonadRandom
02:39:08<lambdabot>Title: New monads/MonadRandom - HaskellWiki
02:39:19<Cale>RandT [] is the monad you want
02:39:19<cedricshock>sorear: I've been writing a rle list, and have been allowing negative runs, but now that I'be started making lists back out of things, they are not really all that cool.
02:39:37<Cale>It's basically just like the list monad, only you also have getRandom, etc.
02:40:16<dmwit>Hmmm... at first I thought that site was going too far for my uses, but my uses have grown.
02:40:22<Cale>(also, you'll have to apply lift to lists which you want to pick from, but that's not such a big deal)
02:40:25<dmwit>(Where "at first" means about a week ago.)
02:40:36<dmwit>Okay, bookmark'd, thanks.
02:40:52<ddarius>Translate each section to RLE 3 'a' -> (replicate 3 'a' ++) and translate RLE -3 'a' to, say, drop 3
02:42:13<cedricshock>ddarius: Yeah, but whats RLE -3 'a' when there are no 'a's around. That requires some fairly strict normalization (which isn't hard).
02:43:09<ddarius>cedricshock: I was providing one possible interpretation (note that for negative lengths it ignores it's element), but in reality, negative runs are just a bad idea.
02:43:12<kc5tja>LAME -- When I used the :m operation to change the current module in GHCI, I cannot reference imported modules like I do in the raw source code.
02:43:29<kc5tja>E.g., if I have a module CutLexer.hs and it imports Data.ByteString as S, then
02:43:35<kc5tja>:m CutLexer
02:43:40<sorear>kc5tja: you need :m *CutLexer
02:43:41<kc5tja>let z = S.pack "Hello"
02:43:47<kc5tja>gives an error.
02:43:50<kc5tja>sorear: Ahh, let me try that.
02:43:57<dmwit>ACTION too
02:44:09<kc5tja>YAY! That worked. Thanks!
02:44:19<sorear>kc5tja: the '*' means to use the internal symbols, as opposed to just the exported ones.
02:44:41<cedricshock>ddarius: Yeah, in reality they are horrific, while infinite ones are just fine. Is there a type for a positive integer, or can I constrain my type to be positive?
02:45:34<ddarius>cedricshock: You could use Word, or use a Natural type (no), or use smart constructors.
02:45:44<ddarius>Word is probably the best solution all around.
02:45:55<cedricshock>what are smart constructors?
02:46:16<ddarius>Functions that wrap the actual constructors to enforce invariants and such
02:46:24<ddarius>@oldwiki SmartConstructor
02:46:25<lambdabot>http://www.haskell.org/hawiki/SmartConstructor
02:48:35<dons>its on the new wiki
02:48:43<dons>?wiki Smart_constructor
02:48:43<lambdabot>http://www.haskell.org/haskellwiki/Smart_constructor
02:48:44<dons>I think
02:49:01<ddarius>Guessing hawiki names is easier.
02:49:26<ddarius>Also, they are different, though it looks like the new one is better.
02:49:29<cedricshock>What's the word type (google is failing me here)
02:49:39<sorear>@src Word
02:49:39<lambdabot>Source not found. My mind is going. I can feel it.
02:49:45<sorear>bad lambdabot!
02:49:55<sorear>data Word = W# Word#
02:50:16<sorear> @src+ anyone?
02:51:40<ddarius>@index Word
02:51:41<lambdabot>Data.Word, Foreign, GHC.Exts
02:51:47<ddarius>@doc Data.Word
02:51:48<lambdabot>http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Word.html
02:52:13<cedricshock>I found this: http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Word.html#t%3AWord
02:52:15<cedricshock>Too late
02:52:16<lambdabot>http://tinyurl.com/y2v567
03:00:20<nohope>dons: There is yet nhc, right?
03:01:30<sorear>nohope: haha... nhc is dying fast
03:01:47<nohope>:/
03:01:58<sorear>nohope: it has this little assumption, wired very very deeply in, that all addresses have the high two bits zero
03:02:04<dons>yhc is the nhc replacement. but nhc is being maintained.
03:02:15<sorear>nohope: which was fine, in the grand old days of sbrk(2)
03:02:40<nohope>ghc looks big when I would prefer a tiny compiler/interpreter :)
03:02:54<sorear>nohope: but in th Age of Shared Libraries, it is very very fragile
03:03:02<sorear>no such thing as a tiny haskell implementation.
03:03:10<sorear>haskell is a huge language :(
03:03:41<nohope>I just read on the GHC Release Notes that it can compile C++ too :-|
03:03:50<sorear>also ghc is 1/15 the size of Linux, if that makes you feel better
03:05:24<monochrom>1/15 is big :)
03:05:48<monochrom>"My spaceship is not that fast! Just 1/15 the speed of light..."
03:06:43<monochrom>It will come out as "M y s p a c e s h i p i s n o t..." due to relativistic effects.
03:07:40<dmwit>Curiously, the ellipsis is immune to relativistic effects.
03:08:10<cedricshock>Wow, transposing this run-length encoded stuff is going to be EASY!
03:08:25<sjanssen>I'd buy it if monochrom used the Unicode ellipsis character
03:08:42<monochrom>…
03:11:32<kc5tja>Well, I'm getting problematic error: head of an empty list exception. But, ghci tells me nothing about what is throwing that exception: not where it is, or even a call trace.
03:11:36<kc5tja>Any ideas on how to diagnose this?
03:11:51<kc5tja>Algebraic substitution on paper suggests my code *should* work.
03:11:57<kc5tja>(Clearly, though, it doesn't)
03:12:12<sorear>nohope: if you want to give nhc the coup de grace, implement a OSX-compatible ffi layer. this will cause Malcolm Wallace to switch to yhc. concurrently, Matheiu Boespflog will finish rewriting the ghc-superior yhc type checker, and Neil Mitchell will finish his ghc-superior optimizer (part of his phd thesis)...
03:12:12<sorear>in theory anyway
03:12:30<sorear>kc5tja: compile with -prof -auto-all, run with +RTS -xc, it just might work
03:12:42<cedricshock>Unfortunantly, it looses all the benefits of sparsity. Well, at least I learned something today.
03:13:20<kc5tja>How do I tell ghci to compile with those options? Just put -prof... on the ghci command-line as if it were ghc?
03:14:26<sorear>kc5tja: nope, -prof is incompatible with --interactive :(
03:14:47<sorear>kc5tja: is your ghc very very new? (> 6.7.200703xx ish)
03:15:52<dmwit>Monoid has a lot of instances that lambdabot/hoogle don't seem to know much about,
03:16:20<sorear>@instances Monoid
03:16:22<lambdabot>(), (a -> b), (a, b), (a, b, c), All, Any, Dual a, Endo a, Ordering, Product a, Sum a, [a]
03:16:22<dmwit>like All, Any, Dual a, Product a, Sum a, etc. Any pointers where to look for more info?
03:16:31<kc5tja>Nope. 6.6.1 I think.
03:16:35<kc5tja>But, I know what it is.
03:16:37<sorear>dmwit: vvv
03:16:41<sorear>@docs Data.Monoid
03:16:42<lambdabot>http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Monoid.html
03:16:50<dmwit>Thanks.
03:17:00<kc5tja>case parent of .... where parent = head nonchildren (which in this case, nonchildren is empty)
03:17:07<cedricshock>Hmm, fast transposition is available with the main list across the diagonal, but that makes getting rows and columns slow. I think I only get one direction of speed.
03:17:20<kc5tja>I made an error on my paper substitution.
03:17:22<kc5tja>So typical.
03:21:04<sorear>hello ekidd
03:21:12<ekidd>Hello!
03:22:37<dmwit>So many monads... so little time.
03:22:44<cedricshock>This, children, is why you don't try reinventing ways to do things that there's already a nice, standard library for.
03:29:16<sproingie>ACTION giggles
03:29:19<sproingie>>>> Whether it be strategic planning, sales prospecting, company research or defining management best practices - Goliath is your leading source for accurat information.
03:29:57<dmwit>Oh, monoids are really dead simple.
03:30:00<dmwit>sorear++ helpful docs
03:31:04<sorear>dmwit: yeah - about as simple as they come.
03:31:18<sorear>dmwit: congradulations, you comprehend abstract algebra.
03:31:26<dmwit>heh
03:31:51<sorear>don't pay attention when lambdabot tells you 'math is hard'
03:31:51<sproingie>is there a "monoids and arrows in plain english" resource around?
03:32:13<dmwit>sproingie: There's a monoids in plain English here:
03:32:16<sproingie>there's about 3589275981734987124 "monads in plain english" explanations, but i'm not sure what a monoid is
03:32:25<dmwit>http://www.haskell.org/all_about_monads/html/writermonad.html
03:32:27<lambdabot>Title: The Writer monad
03:32:27<sorear>@google monoid
03:32:29<lambdabot>http://en.wikipedia.org/wiki/Monoid
03:32:30<lambdabot>Title: Monoid - Wikipedia, the free encyclopedia
03:32:53<dmwit>sproingie: It's basically just a set with an associative binary operator and an identity.
03:32:53<sorear>ime, wp's articles on abstract algebra concepts are pretty clear
03:33:00<sproingie>yah um, not so sure about the plain english part
03:33:02<sorear>no basically about it! :)
03:33:14<dmwit>Well... I didn't say it was closed. ;-)
03:33:30<sproingie>so any set that defines an operator on any two elements of the set?
03:33:59<sorear>sproingie: the operator needs to be associative, and have an identity (a "zero")
03:34:00<dmwit>sproingie: The set has to be closed under that operation, and it has to be associative, and you have to have an identity element... but yes.
03:34:13<sproingie>ah, that maps to another element in the set
03:34:17<dmwit>right
03:34:24<sproingie>so Int is a monoid?
03:34:32<sorear>sproingie: so, { foo x y = x ++ ":" ++ y } doesn't make [Char] a monoid, because it has no zero
03:34:32<dmwit>It's two monoids.
03:34:41<sorear>sproingie: very very very many
03:34:43<dmwit>sproingie: Both Sum Int and Product Int are monoids.
03:34:47<sorear>two are commonly used
03:34:58<dmwit>sorear: Fair enough.
03:35:00<sorear>sproingie: but plain (++) has zero ""
03:35:31<monochrom>Suppose you write: (+) :: X -> X -> X. This already implies "X is closed under (+)". In the presence of a strong type system, you seldom need to say "closed under" beyond a type signature.
03:35:54<kc5tja>AT LONG LAST, CUT's parser finally works, and properly handles nesting!
03:36:54<sorear>sproingie: another way to look at this is to say monoids are a generalization of functions with the same argument and return types (like Int -> Int, Double -> Double, [Char] -> [Char])
03:37:04<dmwit>monochrom: Yes, there's a slight difference between math monoids and Haskell monoids.
03:37:14<sorear>sproingie: then mzero generalizes id, and mappend generalizes (.)
03:37:20<sproingie>i can see the immediate use of monads and their properties, e.g. going from Maybe to List to get nondeterminism
03:37:35<sorear>sproingie: this definition gives the same properties - see Cayley's Theorem
03:37:50<sorear>sproingie: monoids are very useful too. consider a tree fold
03:38:11<sorear>sproingie: if you use a monoid, you don't have to worry about the result depending on how well the tree is balanced
03:38:12<sproingie>mm yah
03:38:18<sproingie>so you can generalize folds with monoids?
03:38:29<sorear>sproingie: yes.
03:38:34<sorear>@typ Data.Foldable.fold
03:38:36<lambdabot>forall (t :: * -> *) m. (Data.Foldable.Foldable t, Monoid m) => t m -> m
03:39:01<sproingie>that makes sense to me. i was never good at abstract math, but folds i can grok
03:39:23<sproingie>i'll have to come back in a bit and ask about arrows. gotta grab dinner before the place closes
03:39:24<monochrom>ACTION uploads abstract mathematics for everyone to download
03:39:51<monochrom>arrow is hot!
03:40:36<sorear>sproingie: you will learn haskell. you will learn abstract algebra and category theory in the process. there is little more abstract than that.
03:41:17<cedricshock>Any linear algebra libraries for haskell?
03:41:24<monochrom>you will sheafify *duck*
03:41:36<kc5tja>monochrom: Sweet! Except ... I can't make heads or tails of it. ;D
03:41:42<sorear>ACTION STILL doesn't get fibre bundles :(
03:41:44<monochrom>linear algebra is hot these few days
03:42:03<monochrom>I actually just know those names and not what they stand for!
03:42:06<sorear>ACTION probably could, if he tried again (given that he knows general pointset topology now)
03:42:20<dmwit>I wish All About Monads would use something other than the Continuation monad to explain monad transformers.
03:42:41<dmwit>Continuation is the only one they talk about that I can't really approach yet.
03:42:45<dmwit>ACTION grumbles
03:42:47<dolio>Hah.
03:42:49<cedricshock>dmwit: I never got monads until I read the preprint that's online of that first arrow paper.
03:42:51<monochrom>I wish Monads could be taught by all kindergartens.
03:43:21<sorear>I finally grokked monads when I stopped trying.
03:43:24<monochrom>Oh interesting! Arrow may make Monad easier...
03:43:40<dmwit>cedricshock: link?
03:43:44<cedricshock>monochrom: Linear algebra is always hot.
03:43:56<dmwit>I mean, I'm pretty good with IO, List, and State now. =P
03:44:00<cedricshock>dmwit: Looking for it.
03:44:16<kc5tja>Except, CUT is still emitting a truncated program. GGAHHH!!
03:44:22<kc5tja>At least the parser is known to work now though.
03:44:27<kc5tja>One less piece of broken code. :)
03:44:41<dmwit>Yay!
03:44:55<monochrom>Is that the true meaning of CUT? That it cuts a program short?
03:45:04<cedricshock>dmwit: doubly useful link: Hug00 in this: http://www.haskell.org/arrows/biblio.html
03:45:05<lambdabot>Title: Arrows: bibliography
03:45:24<sorear>I wish abstract math was more widely taught.
03:46:00<monochrom>To be fair, you have to had experience with the concrete before you're ready for the abstract.
03:46:39<cedricshock>sorear: Yeah, a lot of it fits in nicely at the high-school level.
03:46:44<monochrom>Recall how you learned (+) for whole numbers. You did like a million exercises before you really saw the point.
03:46:44<astrolabe>cedricshock: there's a wrapper for LAPACK somewhere. By the author of YAHC if I recall correctly.
03:46:56<kc5tja>monochrom: Hahah! I like that. Unfortunately, no. :)
03:47:20<monochrom>Now isn't it obviously that similarly you need to meet a million examples of monads before you see general monads?
03:47:26<kc5tja>However, I'm glad to have written an LR(0) parser entirely from scratch in a few handful of lines of code.
03:47:39<sorear>Monoid == [res : *] [fun : [typ : *] [zero : typ] [oper : typ -> typ -> typ] [assoc : [a : typ] [b : typ] [c : ty] eq (oper a (oper b c)) (oper (oper a b) c)] [lz : [a : typ] eq a (oper zero a)] [rz : [a : typ] eq a (oper a zero)] res] res
03:47:45<sorear>is just sooo elegant!
03:47:54<kc5tja>Even though the token stream is recursive descent, writing a recursive descent parser obviously didn't work for some reason.
03:48:00<kc5tja>So I busted out the big-guns. ;D
03:48:12<sorear>LR(0)? really?
03:48:18<kc5tja>sorear: yeah -- let me post.
03:48:21<sorear>ACTION still doesn't grok LR :(
03:49:10<cedricshock>astrolabe: Yeah, I found that. I really want an interface for linear algebra (so I can not have a million by million sparse matrix in memory, and instead have the much smaller dataset that produces it)
03:49:15<hpaste> kc5tja pasted "Simplest possible LR parser in the world." at http://hpaste.org/1592
03:49:40<sorear>cedricshock: haha. meanwhile I (aside: is 16 and in high school) have to raid the irregular stash of books an old hippy math teacher left behind when he moved to thailand last year...
03:49:53<sorear>and people wonder about my bizarre collection of subject
03:50:24<Pseudonym>LR(0) parsers are easy.
03:50:43<sorear>q: what do topology, number theory, galois theory and permutation groups have in common? a: I had access to books
03:50:58<cedricshock>sorear: I understand (a bit). I only know the things I've looked up myself online.
03:51:13<sorear>ACTION <3 wikipedia
03:51:19<monochrom>Is this parser just popping things from input and pushing them to output?
03:51:27<Pseudonym>But for extra credit, turn this into a QLR parser./
03:51:39<astrolabe>Sounds as though the hippy had good taste
03:52:32<dmwit>type Mathematician :: Coffee -> Theorem
03:52:42<kc5tja>monochrom: For everything except Takedown tokens, yes. Takedown tokens performs an LR reduction, where the last n nodes (where n is the number of nodes in the enclosing scope) is removed from the output list and is attached to its parent node (which IS still in the output list).
03:52:54<dmwit>err... s/::/=/
03:53:02<astrolabe>type CSGuy :: DrPepper -> Program
03:53:18<kc5tja>astrolabe: Nice. :)
03:53:32<astrolabe>I copied dmwit :)
03:53:34<monochrom>I see. Interesting.
03:53:56<kc5tja>monochrom: That's why I said it's the simplest possible LR parser. If it didn't do a reduction, it wouldn't be a parser. :)
03:53:57<dolio>Oh good. Doom in the browser.
03:54:08<dmwit>dolio: Eh?
03:54:10<sorear>shouldn't the result type be [Program] ?
03:54:31<dmwit>Maybe (Program, Piss).
03:54:42<dolio>dmwit: http://canvex.lazyilluminati.com/83/play.xhtml
03:54:48<dmwit>sorear: It takes more than one DrPepper to make more than one Program... =)
03:54:59<sproingie>there should be a beverage monad then
03:55:03<sorear>No wonder my GHC compile was causing soo little disk activity.
03:55:05<dmwit>... THAT Doom.
03:55:07<dmwit>Wow.
03:55:10<sorear>I forgot to run make :)
03:55:47<monochrom>Did you ran "runhaskell Setup build" instead?
03:55:53<kc5tja>sorear: Did you look at the code? Was it helpful in illustrating how LRs work?
03:56:08<kc5tja>Pseudonym: Never heard of QLRs.
03:56:10<sorear>kc5tja: I know how LR parsers *work*
03:56:20<sorear>kc5tja: I just don't know how to write them
03:56:27<Pseudonym>Right.
03:56:32<dmwit>dolio: It could be faster. =P
03:56:35<kc5tja>Ahh, well, hopefully my code will help serve as an illustration.
03:56:42<Pseudonym>kc5tja: It's a generalisation of "Even Faster LR Parsing".
03:56:43<dolio>dmwit: Don't blame me. :)
03:56:52<dmwit>=)
03:56:53<sorear>IOW, happy's output is comprehensible. happy itself is opaque.
03:57:04<kc5tja>Although I *do* cheat by using the output list as the token list as well (not practical in all LR parsers)
03:57:45<kc5tja>Pseudonym: I have to admit, I hadn't intended on writing it as an LR parser -- it just fell naturally out of the design. I didn't recognize it for what it was until after I'd finished drawing up the initial set of equations in my notebook.
03:58:31<sproingie>ACTION notices another parser called frown. how's frown compare to happy?
03:58:37<sorear>AHHH!!!
03:58:45<kc5tja>My next step is to reimplement CutEmit so that it properly compiles the parse tree into C.
03:58:55<sorear>Ghc really doens't want to compile :(
04:04:19<merus>Mathematicians are clearly comonadic. ;)
04:04:43<sorear>well, ghc is building now...
04:04:55<sorear>ACTION eagerly awaits the NewGhciDebugger
04:06:04<monochrom>which version building you are?
04:06:55<sorear>6.7.20070426
04:07:07<sorear>i'm compiling it with 6.7.20070323
04:07:22<sorear>6.7.20070413 doesn't expose GHC.Prim
04:07:29<sorear>Igloo calls this a feature
04:07:34<sorear>JaffaCake calls this a bug
04:07:44<sorear>in any case, it breaks self-compilation
04:07:47<sjanssen>won't that break a bunch of things?
04:07:50<monochrom>does anyone call it a prank?
04:08:57<sorear>sjanssen: no, because Igloo says everyone should have been importing GHC.Exts all along
04:09:37<sjanssen>ACTION didn't even know about GHC.Exts
04:10:41<sorear>YES!!! my gfind clone is finally working properly.
04:11:31<monochrom>Congrats. Why clone?
04:13:30<sorear>Mostly to make sure I understand it. I've got an ideas for how to make it much much faster.
04:14:30<sorear>hopefully, once I finish cloning it, I'll remember to make my changes to the real one :)
04:15:59<dino->I'm having a funny laziness problem. I have test case code that creates a file, then I use System.Posix.Files fileExist to make sure it's there. Then delete the file with System.Cmd.system, in that order in the do block..
04:16:07<dino->If I remove the last rm step, it works.
04:16:17<dino->Seems like it's being lazy about the fileExist
04:16:22<sorear>I'd also kinda like to see how small I can make a speed-optimized finder, with a small table-driven C engine and all the support logic in haskell.
04:16:48<sorear>aside: why don't you use System.Directory.removeFile?
04:16:59<sorear>System.Directory.fileExist, too.
04:17:12<monochrom>Do you create file and delete it in the same code?
04:17:20<dino->sorear: I was trying to remove the whole dir and it wasn't working earlier, but that's probably path problems I was having with my created strings.
04:17:38<dino->monochrom: no, another process creates the file.
04:17:53<dino->monochrom: That gets invoked with runInteractiveProcess
04:18:22<monochrom>unix? windows?
04:18:26<dino->Linux
04:18:35<dino->It makes me vaguely nervous that this isn't behaving like a sequence. :o
04:18:57<monochrom>Do you wait for the process to finish before deleting?
04:19:53<dino->monochrom: It's being executed with runInteractiveProcess, but I'm not really sure if it's finishing.
04:20:13<dino->Other tests test the output from the process and that's ok and present.
04:20:17<dino->In this same do block.
04:20:44<monochrom>Does rm tell you something?
04:21:36<mauke>which was the broken function?
04:21:40<kc5tja>Does Data.ByteString.concat join strings terminated by \n into a single string?
04:21:54<kc5tja>It's certainly looking like it in CUT's behavior. :(
04:21:56<dino->monochrom: Not sure, I'm not grabbing its output or exit code. I can check that.
04:23:12<ddarius>:t Data.ByteString.concat
04:23:18<lambdabot>[Data.ByteString.Base.ByteString] -> Data.ByteString.Base.ByteString
04:23:57<kc5tja>ddarius: That's not what I asked; I already know that. My question is, does "abc\ndef" -> "abcdef"?
04:24:01<ddarius>kc5tja: Why the heck would it do that?
04:24:23<kc5tja>That's what I'd like to know.
04:24:42<ddarius>> Data.ByteString.concat [pack "abc\ndef"]
04:24:43<lambdabot> Not in scope: `pack'
04:24:44<kc5tja>Yet, given code that has embedded newlines inside of strings, displaying it produces no newline effects.
04:24:52<ddarius>> Data.ByteString.concat [Data.ByteString.pack "abc\ndef"]
04:24:52<lambdabot> Not in scope: `Data.ByteString.pack'
04:25:04<ddarius>@index pack
04:25:04<lambdabot>bzzt
04:25:16<kc5tja>> "abc\n" ++ "def"
04:25:18<lambdabot> "abc\ndef"
04:25:31<kc5tja>OK, so it's not ++...
04:25:50<sorear>kc5tja: " ....\ <newline> \..." does NOT embed a newline
04:27:21<kc5tja>What?
04:27:30<kc5tja>I'm using \n!
04:28:02<sorear>\n should do it...
04:29:30<dino->Trying to pring out the ExitCode, it never gets to that hPutStrLn action after the system action. Fails at the assertBool one that's killing the whole expression.
04:29:35<dino->s/pring/print/
04:30:28<kc5tja>Huh, note to self: when debugging, make sure you run the correct executable!
04:32:26<monochrom>Oh, that's why. :)
04:34:08<kc5tja>Heh
04:34:10<kc5tja>Yeah.
04:34:18<kc5tja>I was rather worried there for a moment.
04:34:37<kc5tja>Hmmm...it parses the input files fast, but output is taking forever as it's munging memory at voracious rates.
04:34:55<dino->Same thing occurs when I try System.Posix.Directory.removeDirectory
04:34:56<kc5tja>Note to self: don't feed Haskell version of CUT a 7MB hunk of source code.
04:36:27<kc5tja>SWEET. Except for the length of time involved in its execution, CUT 2.6 in Haskell produces correct output (well, in so far as I've been able to define it in Haskell).
04:36:52<kc5tja>This calls for a few burgers.
04:40:05<dons>time to profile :-)
04:40:11<dons>and think about data structures ;-)
04:45:35<narain>is there a way to dump the transcript of a ghci session?
04:45:52<narain>(assuming i hadn't thought of it ahead of time)
04:46:53<narain>oh wait, i can just use :r to reload the updated source without quitting ghci, right?
04:47:38<sorear>man 1 script
04:48:54<shoffsta>script -c ghci output_file
04:48:55<narain>ACTION looks at man
04:49:03<mauke>or just :
04:49:11<monochrom>Yes :reload
04:49:37<dmead>ACTION is back (gone 12:47:15)
04:49:40<dino->Huh, I knew about :reload and :r, but not just : alone.
04:49:41<dmead>allo channel
04:49:55<monochrom>ehlo
04:50:20<narain>i like :
04:50:58<narain>but will it clobber my types? as in if i have values of a custom datatype and it reloads the type definitions which may or may not have changed, what will happen
04:51:05<narain>?
04:51:40<hpaste> monochrom pasted "System.Posix.Files" at http://hpaste.org/1593
04:51:59<Heffalump>narain: it'll clobber everything you've defined in the REPL
04:52:03<monochrom>dino-: The pasted code works for me.
04:52:03<Heffalump>whether things have changed or not
04:52:22<narain>Heffalump: oh. hm.
04:56:20<narain>?src Eq
04:56:20<lambdabot>class Eq a where
04:56:21<lambdabot> (==), (/=) :: a -> a -> Bool
04:58:19<monochrom>?src Arrow
04:58:19<lambdabot>class Arrow a where
04:58:19<lambdabot> arr, pure :: (b -> c) -> a b c
04:58:19<lambdabot> (>>>) :: a b c -> a c d -> a b d
04:58:19<lambdabot> first :: a b c -> a (b,d) (c,d)
04:58:19<lambdabot> second :: a b c -> a (d,b) (d,c)
04:58:21<lambdabot> (***) :: a b c -> a b' c' -> a (b,b') (c,c')
04:58:23<lambdabot> (&&&) :: a b c -> a b c' -> a b (c,c')
04:59:04<narain>?pl \x y -> g (f x) (f y)
04:59:04<lambdabot>(. f) . g . f
04:59:29<narain>?pl \y -> g (f x) (f y)
04:59:29<lambdabot>g (f x) . f
05:03:48<sproingie>arrow definitely confuses me
05:04:10<merus>Arrows are great! :D
05:04:15<sproingie>the types are just alphabet soup until i know what they actually *mean*
05:04:18<dons>woot, http://programming.reddit.com/info/1ld0m/comments
05:04:19<lambdabot>Title: Haskell Weekly News: New GHC, Xmonad, DisTract, Jobs, Libraries, User Groups! (r ...
05:04:41<monochrom>arrow is a generalization of functions. for the most part you just have to think: generalize to support exceptions, states, nondeterminism.
05:05:32<sproingie>i can't really grok generalization of function beyond a -> b
05:05:32<mauke>how many arrow tutorials are there?
05:05:32<monochrom>Whenever you see "Arrow a => a x y" imagine the first-order approximation x->y.
05:06:16<sorear>dons++ HWN
05:06:34<monochrom>wikibook has a short section
05:06:57<merus>ACTION should think of a toy program for demonstrating arrows
05:07:55<monochrom>> ((+ 1) >>> (+ 2)) 5
05:07:56<lambdabot> 8
05:08:01<monochrom>Like that? :)
05:08:22<merus>lol, yeah
05:08:25<monochrom>> ((+ 1) >>> (* 2)) 5
05:08:26<lambdabot> 12
05:08:38<monochrom>That one illustrates order.
05:08:59<eumenides>> (snd &&& fst) (1,2)
05:09:00<lambdabot> (2,1)
05:09:12<Cheery>> ((+ 1) &&& (* 2)) 5
05:09:13<lambdabot> (6,10)
05:09:14<sproingie>how does >>> differ from .?
05:09:35<sproingie>or for functions, is >>> the same as . ?
05:09:37<monochrom>>>> works for other arrows. >>> for pure functions is just flip(.)
05:09:38<dolio>It's backwards.
05:09:54<Cheery>I'd like to see arrows in other things as well than just with functions and numbers
05:10:02<Cheery>@dice 1d6
05:10:02<lambdabot>1d6 => 2
05:10:04<Cheery>@dice 1d6
05:10:04<lambdabot>1d6 => 6
05:10:05<Cheery>@dice 1d6
05:10:06<lambdabot>1d6 => 3
05:10:11<Cheery>hmm
05:10:15<Cheery>@dice 3d6
05:10:16<lambdabot>3d6 => 9
05:10:32<kc5tja>@dice 10d4+5
05:10:33<lambdabot>10d4+5 => 33
05:10:45<kc5tja>OUCH -- that's more than my hitpoints. Time to roll up a new character. :)
05:11:20<monochrom>haha
05:11:35<mauke>I finally understand how to use monad transformers
05:11:44<mauke>but I have no idea what arrows are supposed to do
05:11:52<kc5tja>I don't, but then again, I haven't yet had a need to use them.
05:12:27<monochrom>I'll cook up the next example in a minute. Need to lookup doc first for exact syntax.
05:12:31<sproingie>so a >>> b basically means feed a to b, &&& means return both a and b
05:12:33<kc5tja>Just as the 80s was the decade for modular programming, the 90s for object oriented programming, so I hope the 2000s-2010s to be the decade for functional programming.
05:12:42<Cheery>btw, about monads: http://dev.codeflow.org/svn/cheery/small.programs/ForthMonad.hs
05:12:43<sproingie>what's *** do? I'm having trouble coming up with something that can show
05:13:10<sorear>> ((+1) *** (*2)) (10,20)
05:13:11<lambdabot> (11,40)
05:13:14<mauke>*** looks like parallel plumbing
05:13:38<dons>> (id *** toUpper) ('x', 'x')
05:13:39<lambdabot> ('x','X')
05:13:45<sproingie>weird
05:13:56<dons>Cheery: yep. nice little stack monad.
05:13:56<sproingie>but neat
05:14:18<Cheery>kc5tja: I think 2000s-2010s won't be the decade for functional programming, ppl are just too simple for that to happen
05:14:30<sproingie>people are as simple now as they always have been
05:14:36<monochrom>The next step is partial function from x to y. Think of it as x -> Maybe y but we package it up as an arrow.
05:14:56<Cheery>sproingie: that's the problem
05:15:08<dons>Cheery: through some more cores and there's no choice.
05:15:10<sproingie>functional programming's just got to be taught.
05:15:21<sproingie>and frankly, programming's largely a vocational skill these days
05:15:28<sproingie>so there may be a permanent disconnect
05:15:29<dons>16 core amd boxes are maybe 3 years away from being standard desktops.
05:15:46<mgsloan>yep, I'm pretty excited about distributed/multicore programming, as current popular languages can't do it properly
05:15:54<sproingie>in some ways tho, FP is already here in different guises
05:16:03<sproingie>BPEL and such are very dataflow-oriented
05:16:34<mgsloan>provides a strong impetus for migrating to better languages, paradigms
05:16:35<kc5tja>Cheery: One can hope. FPLs are (slowly) gaining in popularity, which is damn nice.
05:17:02<monochrom>The exact syntax is this. After packaging up, the type of the arrow is written "Kleisli Maybe x y". Any time you have "f :: Kleisli Maybe x y" and you want to convert it back to "x -> Maybe y" since they're equivalent, write "runKleisli f".
05:17:04<sorear>current languages CAN do distributed/multicore. and they will, as long as people have problems sufficiently hard to demand nontrivial amounts of CPU.
05:17:06<merus>The wheel of fortune turns :)
05:17:17<sorear>I am, of course, assuming optimizers do not become sentient.
05:17:24<sorear>If that happens all bets are off.
05:17:55<kc5tja>sproingie: what is bpel?
05:18:01<monochrom>Also, if you have a function g :: x -> Maybe y, you can convert to the arrow world by "Kleisli g".
05:18:37<sorear>By 'nontrivial' I mean >1 day, ie serious scientific computing, NOT script jobs. Haskell will conquer those.
05:18:44<mgsloan>sorear - well, current 'popular' languages can do it, but not well
05:18:53<sproingie>kc5tja: business process execution language
05:19:07<monochrom>Finally, if you have a pure function x->y and you also want to lift it to the arrow world, "pure f" or "arr f".
05:19:15<narain>is there any way (other than newtype) that i can override an instance declaration of an existing type? i want show to behave differently but the library i'm using already derives it for that type
05:19:17<Cheery>does haskell have virtual machine -form of some sort?
05:19:26<monochrom>So now here are some example programs.
05:19:27<sorear>Cheery: like the York vm?
05:19:31<kc5tja>Cheery: yes.
05:19:40<mauke>narain: AFAIK no
05:19:59<Cheery>ok, that's great then.
05:20:00<sorear>Cheery: http://haskell.org/haskellwiki/Yhc/RTS
05:20:01<lambdabot>Title: Yhc/RTS - HaskellWiki
05:20:15<monochrom>> runKleisli (pure (+ 1) >>> pure (* 2)) Nothing
05:20:26<monochrom>Hmm that may be wrong.
05:20:28<narain>mauke: ok, thanks anyway
05:21:33<merus>ACTION squees at Data.Proposition !
05:21:47<Cheery>sorear: think about replacing the javascript with some better language and turn browsers to frontends rather than huge monolithic pieces of shit and you have the rough idea what I'm wondering now.
05:21:57<monochrom>But no one is listening, so that's fine!
05:22:25<eumenides>> runKleisli (Kleisli print >>> Kleisli print) 1
05:22:27<lambdabot> <IO ()>
05:22:28<sproingie>got distracted by the RL conversation around here
05:22:29<mgsloan>hah, yeah, that'd be cool cheery
05:22:30<Cheery>I'd like to know what's behind the reactive programming -stuf
05:22:47<mgsloan>though javascript isn't so horrid
05:22:57<sproingie>i don't quite get the Kleisli stuff just yet
05:23:07<kc5tja>*OUCH!* That hurt! Take this! data foo = bar | baz | blort!
05:23:15<kc5tja>^-- reactive programming
05:23:18<mgsloan>it's more the browsers, and their incompatibilities. I'm not going to really do any web stuff until this happens though
05:23:37<Cheery>mgsloan: yes
05:23:48<monochrom>haha kc5tja
05:24:12<Cheery>I neither hate the javascript itself so much, but the fact that somebody smartass decided that .html should be major distribution format for everything
05:24:59<kc5tja>let v = form (lion LionColor.black) (head Voltron) in ...
05:25:26<Cheery>Of course it was good idea, especially if we lived in last century.
05:25:27<kc5tja>Totally -- XML, HTML, I hate them all.
05:25:33<mgsloan>hah, yeah
05:25:40<kc5tja>ACTION rather liked the syntax of Curl.
05:25:43<kc5tja>(note: not cURL)
05:25:54<kc5tja>Curl was the application of Lisp-like syntax to hypertext documents.
05:26:06<Cheery>thought, it's nice to see that services and programs start being largely more important than hypertext documents.
05:26:10<kc5tja>It looked like someone cross-breeded TeX and HTML, but it was compact, easy to work with, and produced good results.
05:26:12<mgsloan>the internet in general is getting worse as far as all that goes. I really hope ipv6 DOESN"T catch on
05:26:37<sproingie>stick with the elegance that is ipv4, eh?
05:26:40<kc5tja>mgsloan: Why? IPv6 is just a datagram transport.
05:26:51<Cheery>so people *should* have some sort of dreams towards virtual machines oriented web.
05:26:55<kc5tja>And it's substantially simpler than IPv4.
05:27:05<mgsloan>I thought ipv6 had 2 additional bytes. I was wrong. It's freaking 16 bytes!
05:27:20<kc5tja>Yes, but it's a 16-byte long consistent entity.
05:27:22<mauke>oh noes! teh bytes!
05:27:48<kc5tja>Realistically speaking, though, if you want to conserve bandwidth like a bat out of hell, use CIF.
05:27:57<kc5tja>(ATM Cells In Ethernet Frames).
05:28:13<kc5tja>Or, better yet, use Frame Relay raw for the layer 2 protocol.
05:28:22<sproingie>routing is overrated
05:28:36<mgsloan>true. I just shudder to think of all that overhead...
05:29:02<mgsloan>Overhead that's waay unnecessary
05:29:41<kc5tja>Well, by the time it does catch on, it will undoubtedly utilize a revision of VJC, since CPU compression and decompression will be cheaper than the raw I/O itself.
05:30:24<mgsloan>ah, cool
05:30:29<Cheery>mgsloan: I think that's substantially worse overhead that happens when you query wikipedia
05:30:52<mgsloan>true, but that's probably more fixable
05:30:58<Cheery>I don't like the idea of getting tons of stuff I don't need to know, like the layout, navbars, etc.
05:31:00<kc5tja>22:29 < mgsloan> true, but that's probably more fixable
05:31:10<kc5tja>^-- that message is about the size of a full TCP/IPv6 header.
05:31:20<mgsloan>yeah, scary isn't it?
05:31:30<kc5tja>Yup.
05:31:35<mgsloan>every single data packet carries something that big
05:32:10<kc5tja>ACTION is actually a rather large fan of ATM.
05:32:12<eumenides>hm there's no function flip :: Map k a -> Map a k?
05:32:31<kc5tja>Even though ATM wastes 10% of link bandwidth, it ends up _saving_ bandwidth when you realize it obviates the need for TCP all-together.
05:32:44<Cheery>@hoogle Kleisli
05:32:45<lambdabot>Control.Arrow.Kleisli :: a -> m b -> Kleisli m a b
05:32:45<lambdabot>Control.Arrow.Kleisli :: newtype Kleisli m a b
05:32:46<lambdabot>Control.Arrow.runKleisli :: Kleisli m a b -> a -> m b
05:32:51<monochrom>You could write one, eumenides
05:33:02<mgsloan>sounds cool
05:34:19<kc5tja>And for wireless links, some X.25 variant should be used instead of Ethernet, because, well, end-to-end TCP connection over a link with high fault rates _per hop_ is just retarded.
05:35:18<kc5tja>TCP/IP is great for the wired-LAN. It pretty much fails miserably for everything else.
05:35:24<kc5tja>ACTION gets off his soapbox. :)
05:35:31<mgsloan>hehe
05:36:13<Cheery>if TCP is that bad, why is it used?
05:36:19<mgsloan>I must admit, if I designed the early internet, I'd probably have done a worse job. I'd probably have each computer figure out the route and encode it in the packet, or something luny like that
05:36:37<kc5tja>Cheery: Because 99% of the LANs are wired.
05:36:46<kc5tja>And, therefore, have relatively low error rates.
05:36:52<sproingie>@hoogle Monad
05:36:52<lambdabot>Control.Monad :: module
05:36:53<lambdabot>Data.Graph.Inductive.Monad :: module
05:36:53<lambdabot>Data.Graph.Inductive.Query.Monad :: module
05:37:03<sproingie>@hoogle Control.Monad
05:37:04<kc5tja>Look at satellite communications, however, and you'll see that 50% is HDLC-based (aka X.25 variant) and 50% is NASA-proprietary.
05:37:04<lambdabot>No matches, try a more general search
05:37:10<sproingie>meh
05:37:26<bos>@seen ndm
05:37:26<lambdabot>I saw ndm leaving #haskell-soc, #ghc, #haskell-overflow, #haskell-blah and #haskell 14h 42m 30s ago, and .
05:37:54<kc5tja>Cheery: There is also the small matter of the protocol being developed in an open atmosphere, while HDLC and its ilk were corporate developments and (at the time) guarded.
05:38:08<kc5tja>So, you end up with a _clear_ example of "worse is better" effect.
05:38:36<kc5tja>Remember that ARPANet was designed for academic and land-based military use only.
05:38:48<kc5tja>So the protocols were designed accordingly for that use.
05:38:58<kc5tja>ACTION isn't saying that TCP or IP are bad protocols.
05:39:18<kc5tja>I *AM* saying that they're being used in environments that they never were designed for, and consequently _don't_ perform well in those fields.
05:39:52<Cheery>you'd know my next question.
05:40:03<kc5tja>Moreover, anyone who has ever had the fun of designing a communications transceiver of any significant bandwidth over any significant distance will be the first to tell you, "Bandwidth _ain't_ cheap."
05:41:09<mgsloan>somewhat OT, but firewire is pretty impressive
05:41:35<tessier>If stepcut returns I'm interested in a San Diego based HUG
05:41:47<kc5tja>mgsloan: Short distances, well-shielded cables, local domain addressing only, non-globally-routable protocol. All of which makes for a great personal area network.
05:41:55<mgsloan>yep
05:42:17<kc5tja>I especially find its addressing model and its inherent counter-rotating ring topology attractive too.
05:43:00<kc5tja>Just as everything is a file (in principle) in Unix, in Firewire, everything is a chunk of memory.
05:43:07<kc5tja>Want to send data to a device? Write to its memory space.
05:43:11<kc5tja>Even if it's not _really_ memory.
05:43:20<mgsloan>hmm, know of any good docs on it? (other than spec, unless that's decent..) I'd be interested in learning more about it
05:43:27<kc5tja>Different functions on different data are selected by writing to different sub-regions of a device's memory space.
05:43:30<kc5tja>Simply brilliant.
05:43:34<mgsloan>right, that's one of the coolest things - not routing all the data through the cpu
05:44:16<mgsloan>ooh, different functions? now there's an idea... (I'm thinking of functions in the haskell and erlang sense..)
05:44:16<kc5tja>Well, in most cases, the CPU is notified when the transmission is done, just like Ethernet.
05:45:09<mgsloan>sure, but if you had a firewire hard drive and a firewire camcorder... no need for your cpu to be the go-between
05:45:36<kc5tja>Well, like, a hypothetical disk interface might have a write buffer from DISK+0 to DISK+511, and a read buffer at DISK+512 to DISK+1023. Write control registers might appear at DISK+1024, while read control registers appear at DISK+1536. So, writing data would involve stuffing data at DISK+0..511, and then writing control data to DISK+1024..
05:45:50<kc5tja>Oh, I see what you mean.
05:45:54<kc5tja>yeah, I like that feature VERY much.
05:46:03<kc5tja>I haven't seen that since IEEE-488.
05:48:21<sproingie>so everything in firewire is memory-mapped? interesting.
05:49:24<sproingie>sounds like that would necessarily have to be a driver abstraction tho. unless it's unnecessarily intimate with the memory controller
05:50:50<kc5tja>sproingie: Everything is _modeled_ as memory, yes.
05:50:52<mgsloan>well, the abstraction would be implemented on the devices. However, yes, I think some devices directly map to actual mem
05:50:56<kc5tja>It doesn't actually _have_ to be memory though.
05:51:24<Cheery>do you guys know resources for really catching the arrows?
05:51:37<Cheery>I sort of understand what they are, but not what for.
05:51:51<kc5tja>ACTION doesn't even grok monad transformers yet; I doubt I'll be able to help with arrows at my level of knowledge. :)
05:52:06<Cheery>I'd like to see a practical thing about their usage.
05:53:22<mgsloan>The wikibooks article i read was pretty simple, but for some reason I can't believe that arrows would have so much 2-element-tuple specific stuff
05:53:32<sproingie>this was a good one for monad transformers: http://sigfpe.blogspot.com/2006/05/grok-haskell-monad-transformers.html
05:53:36<lambdabot>Title: A Neighborhood of Infinity: Grok Haskell Monad Transformers, http://tinyurl.com/y6w3jr
05:53:42<mgsloan>though I think maybe it was half done and hadn't gotten to the juicy stuff
05:54:02<kc5tja>sproingie: You just made up that article now because there are too many common words with my own statement. ;D
05:54:32<sproingie>har. nope, you just reminded me of it
05:54:52<kc5tja>Well, I'll throw that onto my list of things to read.
05:55:10<kc5tja>ACTION is currently having much fun hacking on CUT after about a month and a half of deadtime.
05:55:16<sproingie>he has an article on arrows too, but unfortunately no real examples
05:55:23<sproingie>kc5tja: what's CUT?
05:55:31<kc5tja>http://www.falvotech.com/content/cut
05:55:33<lambdabot>Title: CUT
05:55:34<sproingie>he mentions comonads too ... something *else* i don't know about
05:57:02<eumenides>http://www.cs.chalmers.se/~rjmh/afp-arrows.pdf this is good
05:57:11<sproingie>i use cxxtest myself for unit tests in C++
05:57:17<sproingie>and i don't code in C if I can at all help it :)
05:58:04<sproingie>ooh 56 pages. got some readin' to do i guess
05:58:21<monochrom>I don't code in C. I ask ghc to do that. :)
05:59:17<sproingie>is there anything like python's doctest for haskell?
05:59:56<dons>sproingie: what does it do?
06:00:13<sproingie>dons: lets you embed tests in comments.
06:00:22<sproingie>>>> add(1,2)
06:00:22<sproingie>3
06:00:35<sproingie>er, forgot the comment indicators :)
06:01:00<sproingie>examples right here: http://docs.python.org/lib/module-doctest.html
06:01:02<lambdabot>Title: 23.2 doctest -- Test interactive Python examples
06:01:27<monochrom>quickcheck can do that and beyond
06:01:52<kc5tja>sproingie: I'm sorry -- that article on transformers is just plain opaque. I can't follow it AT ALL.
06:02:07<encryptio>how do i put/get/push/pull to/from an ssh server on a nonstandard port using darcs?
06:02:16<kc5tja>I mean, it introduces a nice set of rules of thumb for using them, but without an understanding of how they work, I just don't feel comfortable using them at all.
06:02:54<sproingie>kc5tja: the syntax for stacking monad transformers is still kind of opaque to me
06:03:06<araujo>hello
06:03:23<kc5tja>encryptio: Not sure.
06:03:38<sproingie>kc5tja: but the end result is that once you're done, you just call 'lift' to do a computation in the transformed monad
06:03:40<kc5tja>sproingie: He says that, "It all becomes obvious when you see how to use it." Uh huh. Riiiiight.
06:03:59<sproingie>kc5tja: i suspect it becomes obvious with practice
06:04:04<araujo>anybody would know what it is the opposite key binding for Shift-A on vim? (go to the beginning of the line)
06:04:08<encryptio>all i've found on the subject is an old mailing list post from sep. '04...
06:04:16<encryptio>araujo: shift-i
06:04:17<kc5tja>shift-I
06:04:19<sproingie>i wouldn't know, the syntax still befuddles me. the concept clicks though
06:04:26<araujo>Thanks encryptio kc5tja
06:05:03<sproingie>i guess a lot of the monad transformers in the standard library don't even need lift
06:05:08<kc5tja>encryptio: Does it use normal URL syntax for ports?
06:05:16<sproingie>not sure how they do that, but it's sure convenient
06:05:17<kc5tja>ssh:userId@host:port maybe?
06:05:37<encryptio>kc5tja: darcs doesn't for ssh... i'll try that, but it didn't work last time (similar style)
06:05:47<kc5tja>encryptio: Hmmm...
06:06:05<encryptio>"ssh: ssh: No address associated with nodename"
06:06:16<encryptio>and various other errors stemming
06:06:17<kc5tja>Might not be doable then, at least from the command line. Maybe looking at some of the control files inside _darcs might yield an SSH command preferences setting?
06:06:18<monochrom>I start with a state monad. The state is an int. So the full type is "State Int a". The monad part is "State Int" without the "a".
06:07:01<kc5tja>Right. The 'a' part is what would be returned by a function in a program.
06:07:03<sproingie>huh, quickcheck looks nifty indeed
06:07:16<monochrom>That is, whenever I see "(Monad m) => ..." it is legal to substitute "State Int" into m. Note no "a".
06:07:25<sproingie>i guess one type of 'property' you can give quickcheck is a literal example?
06:07:43<monochrom>Yes, one type of property is a literal test case.
06:08:09<sproingie>cool. can it be embedded in literate haskell docs?
06:08:15<monochrom>Next, I want to add a reader monad over my state monad.
06:08:59<Cheery>hmm
06:09:07<Cheery>could you make neural networks with arrows?
06:09:34<Cheery>and what kind of thing would it be as an idea?
06:09:34<sproingie>i imagine arrows are turing complete
06:09:37<monochrom>The environment of my reader is Bool. The type of the whole thing is then "ReaderT Bool (State Int) a".
06:10:19<kc5tja>I don't understand what you mean by "The environment of my reader is Bool."
06:11:06<monochrom>Here is how I figure out that type. I go to the doc of ReaderT. It says "ReaderT r m a". r is intended to be the environment. m is intended to be the lower monad. a is the polymorphic type variable. So I put r = Bool, m = State Int (recall the foregoing discussion).
06:11:08<encryptio>here seems to be a patch that fixes the problem: http://tinyurl.com/2d8ctc
06:11:37<sproingie>would love to stay up, learned lots of haskell today from here, but i gotta blaze
06:11:42<monochrom>You need to know the idea of the reader monad before any sentence of the form "my environment is ____" makes sense. It doesn't have to be Bool.
06:12:13<sproingie>or more like fizzle. time for bed.
06:12:47<sproingie>nite all
06:13:09<kc5tja>monochrom: OK, I don't know reader monads, nor even what they're used for (yet).
06:14:30<monochrom>Perhaps you understand adding a new layer of state over an old layer of state.
06:15:06<monochrom>I start with a state monad. the state is Int. "State Int a". The monad part is "State Int".
06:15:16<kc5tja>Well, that depends. When I read stuff like that, I instinctively think, "Just don't do that." :)
06:15:43<monochrom>I just need "understand". I don't need "desire".
06:16:43<monochrom>Next I add another layer of state on top of that. I want to add Bool. The whole thing is "StateT Bool (State Int) a".
06:17:16<monochrom>Here is how I figure that out. I go to the doc. It says "StateT s m a". I plug in s = Bool, m = State Int, as discussed.
06:17:55<merus>Reader monads are awesome ^^
06:18:17<monochrom>I think you know how to use get/put to access the Bool and lift get/put to access the Int.
06:25:55<dons>merus: I think readers are awesome too :-)
06:26:03<dons>nothing like them for implementing lexical scoping
06:27:19<kc5tja>Well, I can't say I understand the concept of "lifting" either.
06:27:34<kc5tja>It just seems so arbitrary to me sometimes.
06:27:44<monochrom>It is just there to gain access to the lower monad.
06:28:10<kc5tja>OK, "lower" monad -- so lifting it brings that monad "to the current" level so to speak.
06:28:20<monochrom>After the stacking you have direct access to the upper one, and indirect access to the lower one through "lift".
06:28:27<monochrom>YES!
06:29:07<kc5tja>My next task would be to figure out how it's done behind the scenes.
06:29:13<ski>@type lift
06:29:16<lambdabot>forall (m :: * -> *) a (t :: (* -> *) -> * -> *). (MonadTrans t, Monad m) => m a -> t m a
06:29:26<kc5tja>God, I can't ead a type signature like that.
06:29:29<dons>kc5tja: by wrapping things in constructors
06:29:34<dons>F (G (H a))
06:29:55<dons>:: t m (n a)
06:29:55<merus>@src lift
06:29:56<lambdabot>Source not found. Are you on drugs?
06:30:00<merus>I suppose.
06:30:19<monochrom>forall m a t. (MonadTrans t, Monad m) => m a -> t m a
06:31:05<monochrom>m is the lower guy, t is the upper guy
06:31:39<ski>lift :: State Int a -> StateT Bool (State Int) a -- e.g.
06:31:56<dibblego>why would I use Ix a => a instead of just Int?
06:32:10<mahogny>more general?
06:32:22<dons>dibblego: two dimensional indicies?
06:32:38<dibblego>hrm
06:32:52<monochrom>t = StateT Bool
06:34:29<ski>(hm, even the emperor uses Ix ..)
06:34:58<monochrom>which emperor?
06:36:33<dibblego>have good weekend, I'm out
06:36:49<monochrom>haha sometwo is derived from someone
06:36:50<ski>hm .. maybe Shaddam IV ?
06:37:15<monochrom>Maybe there are also allone, alltwo, ...
06:37:37<ski>allzero
06:52:03<johnnyl>@users
06:52:03<lambdabot>Maximum users seen in #haskell: 329, currently: 298 (90.6%), active: 37 (12.4%)
07:02:36<somezero>@quote success
07:02:37<lambdabot>dons says: i wish you success and may your lambdas always beta reduce.
07:02:43<somezero>I like that one :)
07:10:45<dolio>Heh, xkcd is pretty good today.
07:14:02<bos>am i correct in thinking that it's not possible to declare String to be an instance of a class?
07:14:36<dolio>Hmm...
07:14:39<ddarius>With mild extensions you can.
07:15:23<bos>hmm, -fglasgow-exts seems to do the trick.
07:15:37<dolio>@instances Show
07:15:39<lambdabot>(), (a, b), (a, b, c), (a, b, c, d), All, Any, Bool, Char, Double, Either a b, Float, Int, Integer, Maybe a, Ordering, Product a, ST s a, Sum a, [a]
07:15:42<bos>thanks.
07:17:11<alexj>is it possible to use runhaskell on a module that has a module declaration?
07:17:51<alexj>e.g. runhaskell Foo/Bar/Baz.hs
07:18:05<alexj>it appears not to be working for me, but perhaps I am doing something stupid.
07:18:06<bos>@hoogle UserID
07:18:07<lambdabot>No matches found
07:19:53<bos>i'm writing "find" in haskell.
07:19:57<bos>'tis fun.
07:20:52<bos>find "/home/bos" (isType Regular /&/ size />/ 1024)
07:24:11<dons>this is for ayrnieu, :-) --> http://programming.reddit.com/info/1ldo5/details
07:24:13<lambdabot>Title: Massively concurrent network services in Haskell: user-land thread scheduling (r ...
07:24:44<dolio>Heh. Are you sure he's not qwe1234 in disguise? :)
07:25:18<dons>nah, its Julian Fondren. he used to hang out here a couple of years ago, and has taken on the roll of lone haskell detractor
07:25:51<dons>its just frustrating in that he mixes misleading statements with hyperbole, grumble.
07:26:16<dons>its actually quite funny reading his comments in here on laziness and monads. so positivie! http://www.cse.unsw.edu.au/~dons/tmp/ayrnieu.txt
07:26:31<dolio>Yeah. He seems generally informative, but he really turns the trolling on on Haskell articles.
07:26:34<dons>I like "<ayrnieu> And sometimes, if you can express a problem lazily, you have simply won. Game over :-)"
07:26:48<dons>dolio: yes, its just a little game he wants to play
07:29:16<dons>we should really get the libaio stuff packaged onto hackage.
07:30:24<alexj>@where runhaskell
07:30:25<lambdabot>I know nothing about runhaskell.
07:30:35<DRMacIver>Morning
07:30:56<alexj>anyone know where to find good documentation of runhaskell?
07:32:14<bos>there isn't really any
07:32:42<alexj>that's lovely.
07:32:44<dons>what's to document? its just a ghci wrapper :-)
07:32:58<dons>50 loc, basically, to fork ghci
07:33:36<DRMacIver>Anyone planning on going to the london Haskell user group meeting?
07:33:40<alexj>ok if it is a ghci wrapper, how do I do: runhaskell -main-is Foo.Bar.Baz.main Foo/Bar/Baz.hs
08:09:39<vali>hello, noble creatures
08:10:12<Korollary>I just knighted somebody. You may be right.
08:11:03<vali>ACTION cheers
08:13:30<vali>hmm
08:13:46<vali>func1 x l = map (\y -> y * x) l
08:13:53<vali>does anyone know how to turn that into point-free style?
08:14:23<osfameron>I think lambdabot does
08:14:38<sieni>@pl \x l -> map (\y -> y * x) l
08:14:39<lambdabot>map . (*)
08:14:42<bos>@pl \x l -> map (\y -> y * x) l
08:14:42<bos><vali> does anyone know how to turn that in
08:14:42<lambdabot>map . (*)
08:14:55<vali>thank you
08:25:52<kuribas>Has anyone looked at the functional logic language Curry?
08:29:38<kuribas>It seems like it is easier to represent some problems in Curry than in Haskell, (i.e. type inference).
08:30:35<sjanssen>when will people learn that iterators, generators and streams don't express the whole of laziness?
08:32:13<bos>@pl \f g x -> f x >>= g x
08:32:13<lambdabot>liftM2 (>>=)
08:33:03<merus>sjanssen, probably never.
08:36:02<sieni>sjanssen: next thursday
08:36:40<bos>@pl \a b p s -> a p s || b p s
08:36:40<lambdabot>liftM2 (liftM2 (||))
08:37:53<dmead>djinn means devil in arabic?
08:39:59<LeCamarade>dmead: Yeah.
08:40:49<LeCamarade>dmead: It's also where the `Genie' idea comes from. (See Aladin, a Middle-Eastern story, which has the genie.) > #haskell-blah
08:41:18<dmead>ahh
08:41:30<dmead>yea i'm reading some stuff on the early koran
08:41:35<dmead>and that popped out at me
08:43:52<mdmkolbe-work>does djinn know 'forall'?
08:44:01<dmead>it should
08:44:40<mdmkolbe-work>the following never returned (it's been at least a minute)
08:44:42<mdmkolbe-work>@djinn (forall a. a -> m a) -> (forall a b. m a -> (a -> m b) -> m b) -> (forall a b c. (a -> b -> c) -> m a -> m b -> m c)
08:45:17<sjanssen>mdmkolbe-work: no, it doesn't
08:45:48<sjanssen>I've been told that could cause non-termination (currently djinn always terminates)
08:45:54<quicksilver>it also doesn't have any axioms for Monads, I don't believe
08:46:04<quicksilver>and your query didn't tell it that m was supposed to be a monad either (was it?)
08:46:36<mdmkolbe-work>quicksilver: it was, but I don't think it requires any of the monad axioms to realize that function
08:47:24<quicksilver>oh, I see, you're giving it return and bind as parameters anyway
08:52:50<dmwit>?src ap
08:52:50<lambdabot>ap = liftM2 id
08:52:57<dmwit>?src liftM2
08:52:57<lambdabot>liftM2 f m1 m2 = do { x1 <- m1; x2 <- m2; return (f x1 x2) }
08:53:31<quicksilver>ap is better defined as liftM2 ($)
08:53:38<quicksilver>?src is a bit perverse sometimes
08:53:39<lambdabot>Source not found. This mission is too important for me to allow you to jeopardize it.
08:54:02<dmwit>quicksilver: I was just trying to imagine how to realize the function above.
08:54:10<dmwit>I came up with a way that used ap, so... =P
08:54:40<merus>ghci
08:54:44<merus>damn, wrong window
08:54:45<merus>._.;
08:55:23<ville>Howdy. Wish to try out some Haskell. My Linux distribution's package repository has GHC 6.4.2, is this adequately new since the current release is 6.6.x already? Reason why I ask that with another programming language I am familiar with, having an up-to-date compiler is important.
08:55:48<dmwit>Hi ville!
08:55:52<sjanssen>ville: 6.4.2 should generally be okay
08:55:54<nornagon>($) === `id`
08:55:57<dmwit>I'm using 6.4.1 right now, and haven't done too bad yet.
08:56:06<matthew-_>@seen ndm
08:56:06<lambdabot>I saw ndm leaving #haskell-soc, #ghc, #haskell-overflow, #haskell-blah and #haskell 18h 1m 10s ago, and .
08:56:35<sjanssen>ville: ghc skips the odd numbered versions, so you're only one major version behind
08:56:52<ville>sjanssen: Yeah the stable/development cycle
08:57:18<sjanssen>ville: which distribution are you using?
08:57:22<ville>Ok glad to hear it should be alright, just wish to be somewhat up-to-date.
08:57:25<ville>sjanssen: Gentoo.
08:58:04<sjanssen>ville: expect 6.6 in a couple weeks. It's in portage with a hard mask, if you're feeling adventurous
08:58:10<ville>sjanssen: They've 6.6 hardmasked, so I'll try to stear clear for now.
08:58:21<ville>sjanssen: heh.
08:58:53<ville>dmwit: Alright. I'll go ahead with 6.4.2.
09:00:18<petekaz>Quick question, I'm reading dons blog on shell scripting, he has this instance defined: instance (Error e) => MonadError e (Either e) where throwError = Left
09:01:10<petekaz>Either only has on type variable specified, that's ok? Is that the same as instance (Error e) => MonadError e (Either e b) where throwError = Left
09:01:24<dmwit>petekaz: It's a little different.
09:01:37<dmwit>Either is a binary type constructor.
09:01:48<quicksilver>petekaz: well, instances of MonadError e are supposed to be of kind * -> *
09:01:51<dmwit>It can have partial application, just like a normal function, to create a partial type.
09:01:59<quicksilver>petekaz: i.e. they're supposed to have one variable not-yet-determined
09:02:12<dmwit>Monads *have* to be a partial type, with exactly one type parameter remaining to be specified.
09:02:58<dmwit>The "type" of a type constructor is called its kind, as quicksilver said.
09:03:27<dmwit>?kind Int
09:03:32<lambdabot>*
09:03:36<dmwit>?kind Maybe
09:03:38<lambdabot>* -> *
09:03:41<petekaz>I missed that point while reading the article.
09:03:53<dmwit>?kind Either
09:03:55<lambdabot>* -> * -> *
09:04:00<petekaz>Now that I look at the other instances he defined, they all follow the same pattern.
09:04:23<quicksilver>petekaz: for a given type class, the kind is always fixed
09:04:32<quicksilver>petekaz: so Monads always have kind * -> *
09:04:41<quicksilver>because they're all parameterised by a type
09:04:50<quicksilver>Nums always have kind *
09:04:56<quicksilver>Nums are just types, they're not parameterised
09:05:07<quicksilver>MonadErrors, of course, are just a particular kind of Monad
09:05:10<quicksilver>so you'd expect the same kind
09:05:38<petekaz>I understand now.
09:06:30<mdmkolbe-work>Someone posted a link to a paper here last night. But I can't remember the title. Is there anyway to find it again? (A very vague question I know.)
09:06:38<dmwit>?where logs
09:06:38<lambdabot>http://tunes.org/~nef/logs/haskell/ http://meme.b9.com/cdates.html?channel=haskell
09:06:46<quicksilver>if you tell me the context, I can scroll back and look for you
09:06:52<quicksilver>and roughly how long ago it was :)
09:07:00<petekaz>I missed the subtlety when looking at the other instances, so I thought there was something odd about this one, but now that you point it out, it seems to make more sense.
09:07:07<ville>Any particular book considered to be the ideal introductory text? What is considered to be the common level of usefulness of various www-resources? Again for another language I am familiar with, most of the wwww-stuff is usually just plain wrong.
09:07:31<dmwit>ville: I think YAHT is usually considered to be pretty good.
09:07:36<dmwit>?go yaht wikibook
09:07:37<sjanssen>ville: I've heard good things about the new book by Hutton
09:07:39<lambdabot>http://en.wikibooks.org/wiki/Haskell/YAHT
09:07:39<lambdabot>Title: Haskell/YAHT - Wikibooks, collection of open-content textbooks
09:08:22<mdmkolbe-work>found it from the logs, thx dmwit
09:09:43<quicksilver>ville: the wikibook is incomplete, but pretty good for the parts that are there
09:09:50<quicksilver>ville: I haven't seen hutton's book but I'm sure it's good
09:10:05<ville>sjanssen: any idea on the huton's book tittle?
09:10:14<ville>err hutton's
09:10:23<dmwit>ville: What other language(s) do you know?
09:10:33<ville>ah "programming in haskell"
09:11:44<sjanssen>ville: there's a review of it in the upcoming issue of The Monad.Reader
09:12:35<ville>dmwit: As far as done for a living: C++, Java and Perl.
09:14:42<ville>dmwit: So Haskell is a paradigm jump for me.
09:14:47<dmwit>ville: Yeah.
09:15:01<dmwit>There's a tutorial called Haskell for C programmers, but I honestly got very little out of it.
09:15:07<quicksilver>bah, issue of HWN
09:15:14<quicksilver>no work will be done this morning :(
09:16:16<osfameron>ville: I'm liking SChool of Expression, and didn't like YAHT (the writing, though the exercises on the other hand are very good)
09:17:21<ville>Ok have to review YAHT and see if it's enough to get me started.
09:18:52<LeCamarade>ville: YAHT is good. Very. Just don't try to grok everything. You'll only get angry. Haskell is definitely weird for a Perl guy.
09:20:00<ville>LeCamarade: Oh I am not a Perl guy by any measure. C++, but I believe the sentence still applies with a substitution.
09:20:15<DRMacIver>I liked "A gentle introduction", but that's coming from an ML background.
09:20:28<DRMacIver>Or rather I'm coming from an ML background, so the fact that I liked it may not be useful. :)
09:21:25<osfameron>I got angry/amused with the YAHT line "The immediate question which arises is: okay, so how do I get rid of the IO." which I think is one of the least coherent introductions to monads I've seen
09:22:15<osfameron>ville: you a perl hacker too? I think shlomi fish has some slides on Haskell for Perl programmers, though it's mainly just code snippets
09:23:05<LeCamarade>ville: Still ... getting used to a language where no changes in state are allowed can be such a leap.
09:23:13<ville>osfameron: I tried to imply I wasn't a Perl programmer, just something I did for a living long time ago
09:23:41<osfameron>ok
09:23:47<ville>As in 10 years ago.
09:23:54<LeCamarade>DRMacIver: The `Gentle' in there is for ML people. Not for normal people. :oD
09:24:52<dmwit>There's nothing wrong with the Gentle Intro.
09:24:52<osfameron>yeah, the "Gentle" made me incandescent with frothy rage
09:25:16<dmwit>Hey!
09:25:19<dmwit>I liked it a lot!
09:25:30<osfameron>I'm sure it's very lovely
09:25:31<dmwit>And I just came from a C/C++ background, so it is totally doable.
09:25:42<osfameron>but "gentle" implies something it isn't
09:25:47<dmwit>o
09:25:48<dmwit>well, yeah
09:25:55<DRMacIver>LeCamarade: Heh
09:25:55<osfameron>gentle is cartoon foxes and lots of simple exercises
09:25:57<mvanier>For IO in Haskell, I really like the "IO Inside" tutorial at http://haskell.org/haskellwiki/IO_inside.
09:25:58<lambdabot>Title: IO inside - HaskellWiki
09:26:07<osfameron>well actually cartoon foxes are annoying and induce stabby hate too
09:26:12<sjanssen>Gentle Intro seems to be a love it or hate it affair (I learned from it and liked it)
09:26:12<DRMacIver>LeCamarade: Well I've never claimed normality.
09:26:17<kuribas>dmwit: The Gentle Intro's section on Monad didn't feel like an introduction at all.
09:26:24<dmwit>Honestly, once I started with the Gentle Intro, I was afraid to look at anything that *wasn't* labelled Gentle. =)
09:26:32<LeCamarade>dmwit: Gentle conjures up pictures of a tutorial with talking foxes. But that stuff? :oD
09:26:51<dmwit>?sp labelled
09:26:52<lambdabot>Maybe you meant: spell spell-all . ask bf ft id map msg pl rc slap src v wn
09:26:53<DRMacIver>Talking foxes conjure up an image if annoyingly condescending rubyists. ;)
09:26:55<sjanssen>'Gentle' is probably the greatest single lie in a title, ever
09:26:58<dmwit>?spell labelled
09:27:06<DRMacIver>s/if/of/
09:27:16<osfameron>DRMacIver: that's the bunny. Or the fox.
09:27:17<mvanier>It's "gentle" in the same way that Ex-Lax is gentle.
09:27:31<DRMacIver>osfameron: I loathed the poignant wossname.
09:27:33<LeCamarade>DRMacIver: From ML, Haskell seems normal. Maybe it was the next step from the ML side (via Miranda). Miranda is a trademark of Research Software.
09:28:08<osfameron>DRMacIver: yeah, I got about 6 pages in and thought "Full marks for self indulgent wank, where's the Ruby?"
09:28:10<quicksilver>From ML, haskell seems like a nice serious of minor improvements, plus a couple of interesting changes (purity and laziness)
09:28:12<osfameron>I tried to read it 3 times
09:28:24<DRMacIver>ACTION doesn't have any strong opinions on Ruby, but really dislikes a lot of Rubyists. :)
09:28:47<DRMacIver>quicksilver: I don't know. The laziness switch is a bit of a headfuck, because there's no strong correspondence between good ML programs and good Haskell programs.
09:29:10<osfameron>DRMacIver: see http://hacketyhack.net/ though, also by Why, but seems to be more useful and maybe less annoying, even though it still has foxes
09:29:12<lambdabot>Title: Hackety Hack: the Coder's Starter Kit
09:29:33<DRMacIver>quicksilver: I wouldn't say Haskell seems normal coming from ML. It's enough of a context switch that it seems odd. It just doesn't seem completely arcane and out there, which it probably does if you're coming from C. :)
09:30:02<DRMacIver>osfameron: No, sorry. The front page makes me want to punch the author in the face.
09:30:08<quicksilver>DRMacIver: fair enough. It seemed pretty normal to me.
09:30:15<LeCamarade>ACTION hated ML for its having a kind of curry-phobia in the standard conventional usage.
09:30:27<DRMacIver>quicksilver: Maybe I didn't do enough ML then. :) I'm a bit out of practice.
09:30:41<DRMacIver>ACTION came to Haskell from ML via a year of doing mostly Java.
09:31:18<DRMacIver>(Although it was a year of doing mostly Java and saying "Argh, I wish this had (feature from ML)."
09:31:21<DRMacIver>)
09:31:28<merus>Java gives carpal tunnel
09:31:37<merus>*Java gives me carpal tunnel
09:31:46<LeCamarade>DRMacIver: That must hurt. I am _still_ doing Java. But I am planning a coup d'état over here.
09:31:55<osfameron>DRMacIver: fair enough :-)
09:32:29<LeCamarade>Actually, now I am doing C#, which is Capitalist Java.
09:32:47<LeCamarade>But, the real reason I'm sticking with C# is F#.
09:33:00<LeCamarade>@go F# site:en.wikipedia.org
09:33:02<lambdabot>http://en.wikipedia.org/wiki/F_Sharp_programming_language
09:33:02<lambdabot>Title: F Sharp programming language - Wikipedia, the free encyclopedia
09:33:06<DRMacIver>LeCamarade: Well C# has enough functional features (in particular anonymous methods / delegates) that it's a little less painful than Java. :)
09:33:22<DRMacIver>But I have no chance of pulling a coup, so I'm leaving instead.
09:33:29<DRMacIver>Although I may well still end up doing Java. :)
09:33:30<Sir_Boegel>Have you guys seen the post on haskell-cafe concerning installing GHC on FC6? (the guy looking for an mp3 app)
09:33:43<LeCamarade>That way, I can write things in good ol' Ocaml, and port to F#, and never have the aches of public static void main.
09:35:28<DRMacIver>LeCamarade: Well, Java has Scala, which is in many ways a better match.
09:35:53<DRMacIver>It's not at all ML like, but it has strong functional support and a lot of cool features. :)
09:36:05<DRMacIver>(I guess .NET has Scala too, but it lags behind)
09:37:00<LeCamarade>Nope. I want to write an ML syntax. There was Jaskell, which I still hope for, but until then, I get to do F#. I dunno if it is MS strategy. :oD
09:37:06<LeCamarade>@go jaskell
09:37:07<mvanier>Sir_Boegel: Yeah, I just saw that. That happened to me once. Seems like an overreaction.
09:37:08<lambdabot>http://jaskell.codehaus.org/
09:37:09<lambdabot>Title: Jaskell - Home
09:37:44<DRMacIver>Being tied to a particular syntax seems... odd, to me.
09:38:02<DRMacIver>Particularly OCaml syntax. It's about the worst instance of the ML family of syntaxes. :)
09:39:09<osfameron>syntax familiarity is very tempting though
09:39:11<LeCamarade>I do like twenty languages. It's just that I have made my choice (Haskell), and I want to stick to that while I prepare to launch out. I may have to need guru powers with ML-family langauges. I hate Ocaml - the worst ML-kid, but what can I do? ;oD
09:39:46<osfameron>can you expand on the ocaml-hate? (in #-blah if more appropriate), I'd heard really positive things about ocaml so I'm curious.
09:40:12<DRMacIver>ACTION has no OCaml-hate.
09:40:15<DRMacIver>I just don't like the syntax.
09:40:26<LeCamarade>I just don't like the way Ocaml tends to treat functional style like a burden. Also, aja, some guy who hangs out here sometimes, is doing Haskell for .NET. That will rock.
09:40:41<DRMacIver>I also don't like the "OMGzors. It's so fast!" given that SML has had better optimising compilers for years. :)
09:40:46<mvanier>Ocaml is fine if you can stomach the syntax.
09:40:52<ejt>I always had good experiences with ocaml, though I always stuck with a functional subset that's probably just SML
09:40:59<Sir_Boegel>mvanier: yeah... lazy bastard :P
09:41:09<ejt>the double ;;'s are odd
09:41:10<osfameron>I suppose I don't know other MLs so can't see what the particularities of Ocaml are ;-)
09:41:13<Sir_Boegel>mvanier: but to be honest, I tend to be like that too sometimes...
09:41:28<mwc>@quote inverselimit
09:41:28<lambdabot>inverselimit says: So I tried as my first project in haskell to write something that decomposes modules of polynomials using Schur-Weyl duality. This turned out to be a little tricky without being
09:41:28<lambdabot>comfortable with the syntax
09:41:34<mwc>holy crap
09:41:50<mwc>inverselimit owes me a new pair of shorts
09:42:06<mvanier>Sir_Boegel: I don't know why he didn't just install an RPM.
09:42:17<mwc>it's GHC building time again?
09:42:50<Sir_Boegel>mvanier: yeah, exactly...
09:42:52<mwc>That magical time when we all usher in the spring by the gratuitous dumping of a coupla terajoules worth of heat into the atmosphere by thousands of cooking CPUs the world over?
09:43:15<mvanier>I just installed ghc 6.6.1. It took up almost a gigabyte and took forever.
09:43:17<osfameron>that bad?
09:43:32<mwc>mvanier, took up a gig of what/
09:43:43<mvanier>Memory to compile from source.
09:43:44<DRMacIver>GHC does seem to take rather a lot of work to build. :)
09:44:01<osfameron>I like the "you need ghc to build ghc" thing too ;-)
09:44:04<mwc>Hmm, I have 1.5 GB of ram in this baby but it's hardly pushing at all
09:44:08<mvanier>Of course, I also compiled all the extralibs. It wasn't a hard compile though; nothing to it.
09:44:11<ville>I am building 6.4.2 and it is bringing this core 2 duo to total halt at points.
09:44:15<mwc>must be because I'm on PPC and so stuck compiling through C
09:44:34<quicksilver>osfameron: then again you need a C compiler to compile gcc
09:44:38<quicksilver>osfameron: this is not a new problem :)
09:44:41<mwc>osfameron, lol, you should have seen my fun packaging GHC 6.6 for linux/ppc
09:44:47<DRMacIver>mvanier: Well, I mean a lot of work by the computer, not by the user. :)
09:44:55<mwc>I got it done a week before they released 6.6.1. Bastards
09:44:56<mvanier>As it should be.
09:45:48<mvanier>I tried to build ghc from C once; couldn't do it. I got the generic binary instead.
09:45:54<quicksilver>as I recall, ghc-6.4 took me 8 hours to compile on a 800Mhz G4
09:46:00<quicksilver>binary packages ftw...
09:46:04<LeCamarade>osfameron: That `GHC to build GHC´ thing is quite natural. Recursive, you know.
09:46:11<mwc>quicksilver, yep, 6.6 is a little faster... on a 1.5 Ghz G4
09:46:27<mwc>but on a laptop, compiling sucks anyways. All those small little files
09:46:29<mvanier>ocaml bootstraps better than ghc though. You don't need ocaml to build ocaml.
09:46:31<DRMacIver>LeCamarade: Yeah. Besides - how else would you build undetectable backdoors into the compiler? :)
09:47:12<quicksilver>mwc: especially apple laptops. Great little machines, bloody slow disk access.
09:47:44<mwc>mvanier, theoretically, GHC ships with C files that have been 'compiled' so you can use --hc-boot and make it that way
09:47:44<merus>Here here.
09:47:47<mwc>didn't work last I checked
09:47:56<mvanier>didn't work for me either
09:48:04<osfameron>quicksilver, LeCamarade, mwc: yeah, I'm not really a language designer, I'm sort of aware of the bootstrapping program, but it amuses and/or terrifies me depending on my mood.
09:48:23<mwc>quicksilver, yeah, I replaced my 80 GB Toshiba (8 MB Cache) with a better model from the same line, 100 GB, 16 MB cache
09:48:24<osfameron>perl also requires perl to build I think, though it gets around that by first building miniperl
09:48:28<mwc>the extra cache was really noticible
09:48:41<quicksilver>osfameron: which is ironic, because perl isn't written in perl :)
09:48:49<quicksilver>osfameron: but some of the compilation support scripts are...
09:49:01<osfameron>quicksilver: true! though a lot of perl6 will be
09:49:02<quicksilver>mwc: interesting
09:49:17<merus>I was always kind of confused by the statement that only perl can parse perl, since most source filters in perl are terrible
09:49:26<quicksilver>osfameron: perl6 has been cancelled. Let's just fork haskell instead.
09:49:29<mwc>Bootstrapping is the bar-mitzfah for programming languages
09:49:51<quicksilver>merus: the correct statement is "only perl can parse Perl". capitalization important on that one.
09:49:52<Wild_Cat>perl 6? Cancelled? How so?
09:50:04<quicksilver>Wild_Cat: I'm joking
09:50:11<osfameron>quicksilver: that *does* seem tempting... perl6 leads me alternately to exaltation or deep depression
09:50:27<LeCamarade>osfameron: YHC is miniperl with Monads. I think. I'm still too scared of doing GHC from source. Especially since apt-get install ghc --yes --force-yes still works ... :oD
09:50:39<Wild_Cat>hey, you never know -- I mean, last news I had from Perl6 are from over 2 years ago.
09:50:51<merus>quicksilver, ah, that makes more sense
09:50:51<osfameron>yeah, apt-get is a thing of great loveliness
09:52:29<LeCamarade>Wild_Cat: Get pugs. I have it here. G . R . E . A . T. And written in Haskell. :oD
09:53:41<Wild_Cat>yeah, I heard about it. Not that it really concerns me as I'm not a big Perl fan. What I was more or less expecting from Perl 6 was Parrot.
09:54:14<Wild_Cat>in theory, it'd have been awesome. Python/Ruby + CPAN = Win.
09:54:41<LeCamarade>Wild_Cat: I am going to be a Perl fan. They are considering lots of Haskellish stuff. And junctions. But, again, I dunno. I script in Haskell, these days.
09:55:03<LeCamarade>And coroutines.
09:55:20<Wild_Cat>Haskell scripting? Interesting. Tell me more. I'd have thought a functional language wouldn't really be suited to such an eminently side-effected task.
09:55:37<quicksilver>Wild_Cat: you should check out CosmicRay's HSH then
09:55:54<LeCamarade>People just can't comprehend it when I script _better, safer_ in Haskell. Just add #! /usr/bin/runghc at the top. And go ahead with code.
09:56:04<Wild_Cat>me, I'm more a Python guy getting more and more interested in FP in general, and Haskell in particular.
09:56:18<quicksilver>Wild_Cat: http://software.complete.org/hsh
09:56:21<lambdabot>Title: HSH
09:56:32<quicksilver>(not that that is the only approach to scripting in haskell, nor even the best in all circumstances)
09:56:35<quicksilver>(but it's damn clever)
09:56:40<LeCamarade>Haskell scripts better than Python. Especially for the get-off-my-knuckles scripts.
09:56:45<quicksilver>@karma+ CosmicRay
09:56:45<lambdabot>CosmicRay's karma raised to 7.
09:56:56<Wild_Cat>quicksilver: ooh, looks fun.
09:57:06<Wild_Cat>LeCamarade: care to show a few examples?
09:57:53<Wild_Cat>admittedly, Python doesn't really fulfill my quick&dirty scripting needs. You can't really do sub-10-liners in it.
10:01:14<DRMacIver>Dammit, why do people keep offering me jobs? Choices are hard.
10:01:44<LeCamarade>Wild_Cat: Haskell is not better at it that Perl, but ahead of Python.
10:01:54<LeCamarade>ACTION goes browsing for a quick one ...
10:02:16<Wild_Cat>LeCamarade: yeah, I don't expect anything to beat Perl in that area. I mean, it's the whole point of the language.
10:02:32<quicksilver>I think haskell can be better than perl, actually, with sufficient initial investment
10:02:45<quicksilver>by which I mean, you need to build up a bit of a library of tricks and import them into your scripts
10:02:57<quicksilver>but I think once you had it all set up nicely, it would be easier
10:03:04<quicksilver>because it's so much better at abstracting common patterns
10:03:08<Wild_Cat>you haven't lived (and you don't know fear) until you've seen a one-liner that OCRs itself to read 90-degree rotated Mayan numerals and uses that information to display "Hello World".
10:03:59<LeCamarade>quicksilver: Exactly. You nailed it. You know, even Perl is just C with over-fat libraries. But Haskell, sans frills, is still better at it that Python.
10:04:16<osfameron>quicksilver: the haskell *language* may be better than perl for that, but perl still has an advantage for the libraries, which is a massive part of working with common patterns too
10:04:25<LeCamarade>For example, here is ls in Haskell ... (on the fly)
10:04:29<quicksilver>osfameron: oh, absolutely agreed
10:05:09<osfameron>I suppose that's what you mean by "initial investment"
10:05:35<quicksilver>osfameron: right
10:06:20<osfameron>all we need is for perl6/parrot to actually get written, port haskell to parrot, then Profit!
10:07:14<mdmkolbe-work>what is runghc? How is it different from ghc or ghci?
10:07:48<ivanm>I presume runghc is something like bash or perl, enabling you to create haskell scripts
10:07:50<ejt>mdmkolbe-work: runghc runs the given program as a script,
10:08:06<ivanm>e.g. put #!/usr/bin/runghc at the top of your haskell file
10:08:07<ejt>mdmkolbe-work: ghc compiles a program, ghci is an interactive shell
10:09:09<mdmkolbe-work>doesn't ghci have a flag that says "run this file and don't prompt"?
10:09:36<LeCamarade>mdmkolbe-work: GHC compiles to executable, GHCi does what runghc does, but won't terminate after running the program. runghc terminates. Essentially interprets Haskell.
10:09:37<ivanm>ghci -e does running a command...
10:09:41<mdmkolbe-work>ACTION is scurrying around the docs to try to find such a flag
10:09:59<LeCamarade>@quote flags
10:10:00<lambdabot>shapr says: GHC has more flags than the UN
10:10:19<LeCamarade>mdmkolbe-work: shapr says: GHC has more flags than the UN
10:11:21<ivanm>heh
10:11:27<mdmkolbe-work>thx, LeCamarade. the non-termination of ghci explains it
10:13:01<ulfdoz>ACTION rofls about "Poor first impression" on haskell-cafe ML.
10:13:43<LeCamarade>ACTION has failed to copy his ls to here. Merde as the French say.
10:13:57<LeCamarade>Evils of working in terminals only. :o(
10:14:09<mdmkolbe-work>so for the people writing haskell scripts, do you ever miss the DWIM'ery that Perl provides with the non-typed stuff or is there some trick to getting that in haksell? (I love Haskell, but few things can beet 'perl -ane "print $F[2] if $F[1] > 12")
10:15:13<LeCamarade>mdmkolbe-work: You get to hate stuff that hasn't passed a Haskell type checker. But, still, if it's a one-off you want ...
10:15:20<ivanm>ACTION has no idea what DWIM is, doesn't write scripts often and when he does they're in bash
10:15:32<quicksilver>mdmkolbe-work: that's actually very well typed, isn't it?
10:15:41<quicksilver>mdmkolbe-work: @F is always an array of strings
10:15:46<quicksilver>mdmkolbe-work: ah, the string-num bit
10:15:48<quicksilver>ACTION shrugs
10:15:55<LeCamarade>ACTION hates Do-What-I-Mean, because he is aware he often means the wrong thing. Haskell seems wiser.
10:16:03<quicksilver>(read F) :: Int > 12
10:16:05<quicksilver>is not that hard
10:16:25<LeCamarade>ivanm: It is Perl philosophy: Do What I Mean (not necessarily what I say).
10:16:26<quicksilver>:t \f -> read f > 12
10:16:29<lambdabot>String -> Bool
10:16:39<ivanm>*nod*
10:17:00<ivanm>heh.... you want intelligent compilers/interpreters, do you?
10:17:22<ejt>but type errors generally suggest I don't know what I mean, much better than doing the wrong thing
10:17:28<mdmkolbe-work>ivanm: another example of DWIM is when you dereverence out of bounds in a list, the list will get a default value
10:17:29<osfameron>ivanm: DWIM is "Do what I mean"
10:17:37<osfameron>oops, sorry
10:17:46<osfameron>didn't realise I was still in scrollback :-(
10:17:50<ivanm>heh
10:18:07<ivanm>mdmkolbe-work: you mean dereference, rather than dereverence?
10:18:17<ivanm>sounds a bit like using maybe...
10:18:31<mdmkolbe-work>ivanm: I actually meant reference
10:19:21<quicksilver>mdmkolbe-work: that's not DWIM
10:19:31<quicksilver>mdmkolbe-work: that's do something dangerous and stupid :)
10:19:41<quicksilver>mdmkolbe-work: but I understand your point
10:20:07<osfameron>quicksilver: $people{bob}{names}[0] = "Bob"; # does the right thing, in that it creates all the relevant stuff in the tree automatically
10:20:25<osfameron>which is maybe similar to mdmkolbe-work's point (or am I barking?)
10:20:37<quicksilver>osfameron: no, you're right, and I'm aware of this too :)
10:20:44<quicksilver>osfameron: my day job is as a perl programmer
10:20:52<ulfdoz>DWIM has imho the problem, that you sometimes need to know all its exceptions and assumptions.
10:21:22<osfameron>quicksilver: ah! I think I knew that... once, sorry
10:21:48<osfameron>yeah, I get caught out stupidly often with the "DWIM" of scalar and list context. Right now, I'd be delighted if that would just go away...
10:21:49<mdmkolbe-work>ulfdoz: it does, but it also becomes a shorthand. Perl has as many exceptions as English, but that is also what makes it so expressive.
10:22:20<quicksilver>osfameron: but the equivalent expression in haskell would do the right thing too
10:22:36<quicksilver>osfameron: it would infer that that type was Map (String,String,Int) String
10:22:47<quicksilver>osfameron: and create the relevant node :)
10:23:07<quicksilver>@type Data.Map.insert ("bob","names",0) "Bob"
10:23:09<lambdabot>forall t. (Num t, Ord ([Char], [Char], t)) => M.Map ([Char], [Char], t) [Char] -> M.Map ([Char], [Char], t) [Char]
10:23:10<osfameron>quicksilver: yeah! I guess type inference is very DWIM too then
10:23:12<ulfdoz>mdmkolbe-work: For me, is "do what I say" easier to understand. I'm not really good in remembering a lot of rules. Of course you can get a feeling for a lot of things, but that usually takes longer to develop the expertise.
10:23:18<LeCamarade>mdmkolbe-work: To write a script that pings a server and parses some file, Perl can't be replaced. But if it is elaborate and shouldn't fail, like Debian
10:23:30<LeCamarade>'s apt stuff, Haskell can make a good replacement.
10:23:59<quicksilver>osfameron: or I might encode it as Map String (Map String (Map Int String) ) I suppose
10:24:11<quicksilver>osfameron: which is a more direct translation of the perl. but either way.
10:25:02<osfameron>quicksilver: fair enough. And I'm beginning to see the benefits of just sticking to a defined structure rather than being able to mess with enormous amorphous hashes and then shoot yourself in the foot like you can with Perl...
10:27:02<quicksilver>osfameron: other languages allow you to shoot yourself in the foot. Perl makes sure that, if that's what you want, it takes of the whole bleedin' leg.
10:29:24<osfameron>heh, though (off topic so I'll now shut up) Perl has enough flexibility to give you bondage and discipline if you want it (Data::Validate, functional extension, by contract design etc)
10:33:44<quicksilver>osfameron: the nice thing, IMO, about haskell, is that the syntactic weight of the discipline is very low
10:33:55<quicksilver>osfameron: you can do with no type annotations at all, and let it infer them
10:34:07<quicksilver>osfameron: or you can have just a few annotations on your important types
10:34:19<mdmkolbe-work>A lot of Perl's DWIM is appeasing the the type checker (a lot is more than that), but I wonder if someone could write a front end that would insert the code into haskell to do that for you?
10:34:22<osfameron>yeah, I loved the Dominus article on type checking in an ML (I forget which), it looked really cute.
10:34:26<quicksilver>osfameron: the syntactic weight of the perl typing modules on CPAN I've looked at is high, compared to that
10:34:43<osfameron>quicksilver: oh, haskell typing is a thing of beauty, don't get me wrong
10:34:53<osfameron>typing + really clever destructuring bind
10:35:19<mdmkolbe-work>Did LeCamarade ever post his oneline Haskell ls?
10:35:36<quicksilver>mdmkolbe-work: now, he quit, swearing at his terminal program which wouldn't let him copy/paste
10:36:41<raxas>quicksilver: speaking about the bleeding, while other languages allow you to shoot yourself in the foot, haskell causes you to shoot yourself in the head soon
10:37:07<merus>hehe.
10:38:27<mdmkolbe-work>raxas: maybe, but Haskell is the only language that when I have an argument with the compiler, the computer usually turns out to be right
10:39:11<LeCamarade>mdmkolbe-work: Put right. Where is that quote about the guy who says he likes languages that tell him he is thinking wrong?
10:39:39<quicksilver>the quote was by eric kidd
10:39:42<quicksilver>hmmm...
10:39:47<quicksilver>@quote emk
10:39:48<lambdabot>No quotes match. Where did you learn to type?
10:39:52<quicksilver>@quote kidd
10:39:53<lambdabot>sjanssen says: "shapr: Erik Kidd == emu? don't quote me on that"
10:39:57<quicksilver>@quote kidd
10:39:57<lambdabot>sjanssen says: "shapr: Erik Kidd == emu? don't quote me on that"
10:40:16<osfameron>@quote emu
10:40:16<lambdabot>emu says: what would be the ingredients in a Haskell curry?
10:40:47<quicksilver>or, I thought it was
10:40:53<hpaste> eumenides pasted "error with IOArray -> IArray" at http://hpaste.org/1594
10:40:57<quicksilver>but I can't find it with google
10:41:20<eumenides>can anyone who's worked with arrays check what i'm doing wrong? ^
10:42:53<quicksilver>:t freeze
10:42:55<lambdabot>Not in scope: `freeze'
10:43:32<eumenides>http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-Array-MArray.html#v%3Afreeze
10:43:34<lambdabot>http://tinyurl.com/y2qz4l
10:44:43<quicksilver>eumenides: not specifying the monad, perhaps?
10:45:05<quicksilver>eumenides: does this work : (freeze maze) :: IO (IArray (Int,Int) Char)
10:46:51<eumenides>ah, that's odd. seems i should've loaded Data.Array.IArray instead of Data.Array
10:47:25<eumenides>quicksilver: works, but it's Array not IArray :)
10:47:48<quicksilver>eumenides: right, my mistake
10:47:54<quicksilver>eumenides: anyhoe, the reason is this:
10:48:03<quicksilver>eumenides: although you know that IOArray is associated with the IO monad
10:48:15<quicksilver>eumenides: so the only monad it makes sense to apply freeze in, is the IO monad
10:48:20<quicksilver>eumenides: the type checker can't see that anywhere
10:48:30<quicksilver>eumenides: IO isn't mentioned in any of the types it is unifying
10:48:45<quicksilver>eumenides: so you need to, effectively, tell which which instance of freeze you want (even though there is only one)
11:09:44<Itkovian>is there an xmlrpc lib available for haskell?
11:10:45<Lemmih>Yes.
11:13:25<Itkovian>Lemmih: thanks :-)
11:14:08<Lemmih>?where+ haxr http://www.haskell.org/haxr/
11:14:08<lambdabot>Done.
11:14:52<DRMacIver>Not to be a google pedant, but the "Haskell XMLRPC" in google turns up one or two useful results. :)
11:17:04<araujo>@where
11:17:04<lambdabot> @where <key>, return element associated with key
11:17:30<araujo>mm.. argh, i always forget, how to add elements to the 'where' database?
11:17:47<araujo>morning :-)
11:18:19<int-e>where+
11:18:36<quicksilver>@where+
11:18:37<lambdabot> @where <key>, return element associated with key
11:19:47<araujo>Thanks!
11:25:10<nohope>Good morning all!
11:26:41<quicksilver>Has it ever been proposed to add ghci's auto-import of fully qualified identifiers into the language proper?
11:31:16<nohope>Well, I have a simple question about ghc internals... is platform specific code separated from generic code?
11:34:06<quicksilver>I would be very surprised if it wasn't
11:34:45<Lemmih>Define 'separated'.
11:36:28<nohope>Lemmih: win32 code in a directory, unix code in another directory and generic (that can be used for all platforms, normally ANSI-C) in another directory. Well, they don't need to be in diferent directories but maybe in diferent files.
11:39:18<dylan>Or there could be a bunch of ifdefs.
11:40:46<nohope>dylan: yeah, can be :) I just would like how Haskell handles that.
11:41:11<matthew_->@seen ndm
11:41:11<lambdabot>I saw ndm leaving #haskell-soc, #ghc, #haskell-overflow, #haskell-blah and #haskell 20h 46m 15s ago, and .
11:41:21<Lemmih>nohope: GHC uses CPP and TARGET_HOST.
11:41:51<nohope>Lemmih: hm. I'm going to take a look at those resources :) thx.
11:46:01<gimboland>Can someone help me with a cabal problem? I'm trying to configure xmonad, and when I run "runghc Setup configure" I get: Setup.lhs:1:8:
11:46:01<gimboland> Could not find module `Distribution.Simple':
11:46:01<gimboland> Use -v to see a list of the files searched for.
11:46:18<gimboland>i have downloaded latest cabal from darcs and installed as per instructions
11:46:32<gimboland>i did have this working a couple of days ago, although i recall hitting this problem once then
11:46:56<gimboland>this morning, i deleted the build tree for cabal from my home dir, thinking i wouldn't need it any more, and then this started happening...
11:47:40<gimboland>[gimbo@orb ghc-6.6] ls -ld /usr/local/lib/Cabal-1.1.7/ghc-6.6/Distribution/Simple*
11:47:40<gimboland>drwxr-xr-x 2 root wheel 512 20 Apr 15:09 /usr/local/lib/Cabal-1.1.7/ghc-6.6/Distribution/Simple
11:47:40<gimboland>-rwxr-xr-x 1 root wheel 30049 27 Apr 12:42 /usr/local/lib/Cabal-1.1.7/ghc-6.6/Distribution/Simple.hi
11:52:06<petekaz>is Either a monad?
11:52:38<matthew_->petekaz: yep
11:52:44<doserj>not really
11:52:53<doserj>"Either e" is
11:53:00<dblhelix>petekaz: Either a is for all a.
11:53:13<petekaz>I can't seem to find the source code tha shows where >>= and such are defined for it.
11:53:46<dblhelix>Control.Monad.Error, I think...
11:54:03<quicksilver>yup, Control.Monad.Error
11:54:05<dblhelix>return = Right
11:54:07<petekaz>ok ... thanks.
11:54:21<dblhelix>Left x >>= f = Left x
11:54:28<dblhelix>Right x >>= f = f x
11:54:30<quicksilver>It's exactly like Maybe, except that the 'Nothing' (i.e. Left) can carry around a bit of information
11:54:31<petekaz>what is fail?
11:54:40<quicksilver>about what went wrong, presumably
11:54:41<dblhelix>ACTION hopes that's right... :-)
11:55:14<quicksilver>fail is the spanner in the works
11:55:20<quicksilver>since fail is fixed to take a string argument
11:55:36<ndm>@src fail
11:55:36<lambdabot>fail s = error s
11:55:37<hpaste> petekaz pasted "can I rewrite the above like so?" at http://hpaste.org/1595
11:55:39<quicksilver>we have to define a clumsy Error class, and let Errors be coerced from strings
11:55:57<ndm>but thats not actually true
11:56:08<ndm>that fail = error, its overloadable
11:56:19<quicksilver>so the monad instance isn't actually for Either a, in general
11:56:25<quicksilver>it's only for Error a => Either a
11:56:37<quicksilver>and that's all because fail takes strings
11:57:36<petekaz>I'm reading dons post on shell scripting, going through it slowly because I am trying to learn. So one question I had when reading it, his motivation for using ErrorT stuff (which I have not fully comprehended yet) is to remove the boilerplate code from the first modify fn. But to me, I would have thought one could just do something like one does with Maybe, just sequence them togethre to remove the boiler plate.
11:59:43<petekaz>The code is incorrect, but does the question make sense?
12:00:33<quicksilver>your intuition is correct
12:00:45<hpaste> petekaz annotated "can I rewrite the above like so?" with "Using Maybe example" at http://hpaste.org/1595#a1
12:00:55<quicksilver>that's exactly the kind of plumbing that can be rewritten with a monad
12:01:06<petekaz>Ok.
12:01:25<quicksilver>the reason dons has to use ErrorT
12:01:32<quicksilver>and not just the monad instance for either
12:01:33<petekaz>So the motivation for the ErrorT stuff he refers, is to just make ... (you read my mind)
12:01:37<quicksilver>is that you were already in a monad
12:01:42<quicksilver>(the state monad)
12:01:46<quicksilver>that's where get and set come from
12:01:47<matthew_->ndm: with filepath, say I've hardcoded into some code some paths, as Strings, eg "foo/blah/blam". But it's then going to be compiled and used under Windows. I can't see a method in filepath that converts from one to the other. Am I blind or is this deliberate?
12:01:56<quicksilver>so really this part of the explanation is about how you combine two monads
12:02:01<quicksilver>(State and Either)
12:02:08<quicksilver>so you can use the power of each/both
12:02:19<petekaz>But, in that last annotation, I have Maybe monad inside of IO.
12:02:28<petekaz>How is that different?
12:02:40<quicksilver>because you've got it 'completely inside'
12:02:52<quicksilver>that whole v1,v2,v3 bit has no IO in it
12:02:55<quicksilver>that's fine
12:02:56<ndm>matthew_-: perhaps normalise will do it
12:03:05<quicksilver>you're just nested two kinds of expression inside each other
12:03:17<quicksilver>the problem comes when you need 'a bit of maybe then a bit of IO then a bit of maybe'
12:03:35<quicksilver>so your case was simpler
12:03:36<ndm>matthew_-: yep, normalise replaces / with pathSeparator, i.e. moves to \ always
12:03:42<petekaz>I see.
12:03:46<ndm>matthew_-: plus windows accepts / as a path separator anyway
12:04:01<quicksilver>petekaz: but in don's case, he's got "get, then an error check, then set, hten an error check"
12:04:06<quicksilver>petekaz: so they're interleaved, not nested
12:05:06<matthew_->ndm: oh ok, I don't have windows, so I was testing the inverse: > normalise "\\foo\\bar" doesn't become /foo/bar under *nix
12:05:44<ndm>matthew_-: no, there is no explicit conversion - but / as a separator under all, hence why that trick works moving to windows
12:05:47<petekaz>quicksilver: so could he have written his own get/set that wrap the state monad and return Either values?
12:06:04<ndm>matthew_-: perhaps "convertToWindows" "convertToPosix" are functions that are missing from the library
12:06:13<matthew_->ndm: ok fine, that's great. Thanks.
12:06:29<matthew_->ndm: well, if you can just use '/' everywhere then that'll do too!
12:06:56<petekaz>quicksilver: nevermind, that's the same problem inverted right?
12:06:57<ndm>matthew_-: or directly create them with "foo" </> "blah" - but using / literally is often easier
12:07:01<quicksilver>petekaz: yes
12:07:07<quicksilver>petekaz: you can combine them by hand, it's true
12:07:16<quicksilver>petekaz: StateT and ErrorT just do it automaticaly, though
12:07:19<petekaz>but its more work and this is more elegant.
12:07:31<quicksilver>although all the "lift"s are annoyigng
12:07:35<matthew_->ndm: also, I think I asked this earlier and then my connection dropped, in ghc-6.6.1, is System.FilePath in the filepath package (i.e. do I need to mess around with cabal dependencies)?
12:08:14<petekaz>quicksilver: thanks. are there good tutorials/docs on the whole monad transformer thing?
12:08:24<quicksilver>petekaz: cale's is good
12:08:38<quicksilver>not particularly aimed at people who are still learning about monads, but it's good
12:08:52<ndm>matthew_-: yes, require filepath in cabal, and it will all work
12:08:55<petekaz>i didn't know he had a transformer doc, I've seen his monad as containers.
12:09:31<gimboland>ACTION reads about ghc-pkg, as he should have done sooner...
12:09:39<petekaz>quicksilver: would you happen to have a link?
12:09:41<matthew_->thank you!
12:10:23<kolmodin>I'm officially offended: http://www.scriptol.org/choose.php
12:10:25<lambdabot>Title: Popular programming languages
12:11:21<chris2>*gg*
12:11:33<gimboland>ACTION lol at the description of lisp
12:11:53<gimboland>they've really captured the spirit of the thing there
12:11:57<quicksilver>it used to be
12:11:58<quicksilver>http://cale.yi.org/index.php/How_To_Use_Monad_Transformers
12:12:02<quicksilver>but I can't get through at the moment
12:12:06<chris2>oh, i actually read "[better] try programming in another way"
12:12:12<quicksilver>Cale: ping?
12:12:46<petekaz>quicksilver: ok ... thanks. I'll search around for a workable link.
12:13:02<quicksilver>if nothing else, google or wayback should have a cache
12:14:20<petekaz>right. Thanks again for the help. The Haskell community seems to have such a great tolerance for newbie questions.
12:14:31<quicksilver>yes, I 'm not sure why they're so friendly here
12:14:40<quicksilver>I think Simon-PJ puts something in the water
12:14:41<Pseudonym>petekaz: You suX0Rz!!!!1!
12:14:51<Pseudonym>I think it's all the hair shirts.
12:15:59<petekaz>thanks again, off to work (day job).
12:16:25<dcoutts_>@yarr!
12:16:25<lambdabot>I'd like to drop me anchor in her lagoon
12:16:30<kolmodin>@yarr!
12:16:30<lambdabot>Eat maggoty hardtack, ye unkempt, jenny frequentin', son of a gun.
12:16:55<dcoutts_>ahh, back in the UK, nice and cold and cloudy :-)
12:17:16<kolmodin>rain?
12:17:35<kolmodin>welcome back!
12:17:42<kolmodin>to my time zone! (almost)
12:18:22<dcoutts_>no, no rain, just overcast and grey :-)
12:18:30<kolmodin>:)
12:18:42<dcoutts_>just what we expect from British weather
12:18:49<dcoutts_>but it's spring, which is nice
12:18:59<ivanm>dcoutts_: what, if its not raining its about to rain? *ducks*
12:19:14<kolmodin>ivanm: something like that :)
12:19:16<therp>oh 6.6.1 released? nice!
12:19:34<kolmodin>yeah. dcoutts, wanna hack the ebuild? :)
12:19:38<ivanm>kolmodin: heh
12:19:44<dcoutts_>kolmodin, I guess we should
12:19:57<dcoutts_>ivanm, no, it can go weeks of grey skies with no rain
12:20:04<kolmodin>yeah. someone should... :) I'm going back to work. ttyl
12:20:21<ivanm>dcoutts_: heh
12:29:29<quicksilver>dcoutts_: you've actually missed a very sunny march + april
12:42:09<dcoutts_>quicksilver, I did? Well, I'm sure it was sunnier in Sydney :-)
12:42:44<ivanm>and sydney is a hole! *ducks*
12:43:02<quicksilver>dcoutts_: I'm sure that's true too
13:25:19<gimboland>in case anyone cares, i fixed my Cabal problem: at some point in the past, I must have installed it as user rather than root, which registered a version in my per-user package database, which pointed to code which was no longer there. By removing that database entry, ghc can now see the right version of Cabal. Woo for RTFM'ing.
13:33:23<ptolomy>Hehe. in the 6.6.1 release notes "GHC can now be use to compile C++ files." Wow! :-P
13:33:45<vali>eew, C++
13:35:08<Wild_Cat>does that mean GHC has become a C++ compiler, or just that it can generate C++ source from Haskell code?
13:35:09<ptolomy>I've benefited financial from the evil of C++, and I feel a sense of guilt for that.
13:35:10<obsethryl>ptolomy: wow
13:35:35<obsethryl>ptolomy: any news on Qt support ? :D
13:35:45<quicksilver>Wild_Cat: it just means it knows how to invoke g++, I think
13:36:01<quicksilver>Wild_Cat: just as it has always known how to invoke gcc on C files, so you can make a mixed C/haskell program
13:36:11<Wild_Cat>that sounds less impressive now ^^
13:36:17<obsethryl>i mean are there any good haskell - qt stuff, or this is something put on hold due to licensing issues?
13:38:42<ptolomy>ACTION would give $200 to hasten the addition of reasonable records to haskell.
13:38:53<ptolomy>unless it is already a ghc extension.
13:38:57<osfameron>records?
13:40:08<obsethryl>guys, any news from the qt/haskell front, is it still up to GSoC2007 ?
13:41:05<ptolomy>if I find "-ftickle-me-pink for nice records with scoped labels" in the new GHC man page, I'll wet myself.
13:41:19<nominolo>ptolomy: i guess, getting subtyping right is non-trivial
13:41:21<petekaz>@seen Cale
13:41:21<lambdabot>Cale is in #oasis, #ghc, #haskell-overflow and #haskell. I last heard Cale speak 11h 58s ago.
13:43:19<ptolomy>ACTION tries to figure out what in extralibs has changed for 6.6.1
13:44:10<quicksilver>there have been some good proposals on how records might work
13:44:29<quicksilver>but nothing in GHC implemented afaik
13:45:59<ptolomy>Wow. The response in cafe to the fella who was saying "Goodbye Haskell .. not ready for primetime.. " based on his experiences with his linux distributions library installations confirms my impression that the haskell community is among the nicest and most helpful anywhere.
13:47:10<fantasmaa>@seen
13:49:00<dcoutts_>obsethryl, there's no Qt thing in GSoC07
13:49:35<obsethryl>dcoutts_: i found something over the internet sec
13:50:34<obsethryl>dcoutts_: that is a proposal so far, or perhaps i am not reading it right right now: http://hackage.haskell.org/trac/summer-of-code/ticket/1116
13:50:36<lambdabot>Title: #1116 (Haskell Qt binding generator) - Haskell.org Google Summer of Code - Trac
13:50:51<shapr>ptolomy: Which thread was that?
13:51:14<ptolomy>ACTION looks for the nabble..
13:51:28<Nafai>ptolomy: Even in my limited exposure to Haskell, I'd agree
13:51:32<ptolomy>http://www.nabble.com/Poor-first-impression-tf3656615.html
13:51:33<lambdabot>Title: Nabble - Poor first impression
13:51:36<obsethryl>perhaps its only a ticked then
13:51:41<obsethryl>ticket*
13:52:30<Nafai>ptolomy: Generally in communities where everyone is (or maybe just seems) so much smarter than me, like in Haskell, the level of niceness and helpfulness is no where near the level of that in the Haskell community
13:57:27<quicksilver>maybe this demonstrates that to learn haskell you don't need to be clever, so much as nice?
13:57:40<quicksilver>"Haskell - the *Nice* functional programming language!
13:57:55<ptolomy>Heh. I think some of the niceness of the community may be attributable to the fact that often haskell is just a humbling language.
13:58:11<Wild_Cat>Not to be confused with http://en.wikipedia.org/wiki/Nice_programming_language
13:58:38<matthew_->ptolomy: you may be on to something there
13:59:13<petekaz>@tell Cale Is your tutorial on how to use monad transformers available online somewhere? Your site seems to be unresponsive. Thanks.
13:59:13<lambdabot>Consider it noted.
14:06:02<davidL>@seen sorear
14:06:02<lambdabot>I saw sorear leaving #haskell-overflow, #haskell-blah, #ghc, #haskell, #haskell-soc and #xmonad 8h 44m 37s ago, and .
14:13:48<ptolomy>What happened to nomaware and it's monad stuff? I haven't been able to load that site in weeks.
14:14:00<quicksilver>it died
14:14:08<quicksilver>fortunately, someone uploaded it somewhere else
14:14:42<quicksilver>http://www.haskell.org/all_about_monads/html/
14:14:43<lambdabot>Title: All About Monads
14:18:16<dcoutts_>obsethryl, the point is, that project was not funded
14:18:39<dcoutts_>we got several projects funded, that wasn't one of them
14:19:48<obsethryl>dcoutts_: okie, i hope one day something like this starts :)
14:26:02<petekaz>hmmm ... xmonad still doesn't work with x2vnc.
14:26:23<petekaz>this stinks.
14:28:09<dcoutts_>obsethryl, so why qt rather than the existing wx or gtk bindings?
14:28:46<Wild_Cat>a possible reason is that Gtk doesn't work natively on OSX yet.
14:29:00<obsethryl>dcoutts_: i happen to like Qt more than both the other solutions for various reasons
14:29:24<araujo>obsethryl, gtk is cool
14:29:40<dcoutts_>Wild_Cat, aye, the gtk osx non-x11 version is still not ready for end users
14:29:45<obsethryl>araujo: no doubt, but i just like Qt more
14:30:21<Wild_Cat>also, wx on OSX uses Carbon and therefore feels bad.
14:30:39<obsethryl>araujo: by the word "like" i intend to say "enjoy the variety of features" here
14:30:42<dcoutts_>Wild_Cat, what's the newer one called?
14:30:43<obsethryl>Wild_Cat: ;)
14:30:56<Wild_Cat>dcoutts_: Cocoa?
14:31:01<dcoutts_>ah yes, that's it
14:31:22<obsethryl>anyway off to studying a bit more the niceties of haskell :)
14:31:32<obsethryl>thanks for the input
14:32:03<Wild_Cat>Carbon apps, by and large, feel, and sometimes look, wrong. The only exception I can think of is iTunes
14:32:30<Wild_Cat>(and to a lesser extent, the Finder -- FTFF aside, it doesn't feel bad)
14:33:03<dcoutts_>apparently the gtk-macosx stuff is using cocoa
14:33:17<Wild_Cat>that's the right thing to do.
14:33:41<dcoutts_>but of course that's only for the lower layers, the widget drawing and layout is done by gtk
14:33:53<Wild_Cat>it's a little bit harder since it uses Objective-C instead of plain C
14:34:08<Wild_Cat>but all things considered, ObjC is a rather good language.
14:35:15<dcoutts_>and is supported by gcc, though I've never seen it used for anything other than osx system programming
14:35:31<obsethryl>araujo: is that yours: http://araujoluis.blogspot.com/ ?
14:35:32<lambdabot>Title: araujo's blog
14:35:36<Wild_Cat>dcoutts_: there's GNUStep, but nobody uses it.
14:35:50<araujo>yes obsethryl
14:35:59<obsethryl>k
14:36:07<dcoutts_>Wild_Cat, ah yeah, that. It seems not to have changed much since I tried it 10 years ago :-)
14:36:16<Wild_Cat>pretty much, yeah.
14:36:42<dcoutts_>though I saw some GNUStep prople had a booth at FOSDEM
14:36:52<araujo>ACTION updating himerge and its web-site
14:36:56<Wild_Cat>a shame, really, because from what I've seen ObjC is much nicer than C++
14:37:13<dcoutts_>it's not such a complex extension
14:37:34<wolverian>lambdabot's @instances doesn't look at all the hierarchical libraries, right?
14:37:37<dcoutts_>but doesn't retrofit GC sadly
14:37:48<wolverian>is there a way to see what types in the libraries are instances of Foo?
14:38:01<pjd>what's the proper technical term(s) for functional data dependencies?
14:38:03<dcoutts_>wolverian, the haddock docs list instances
14:38:13<dcoutts_>pjd, what do you mean exactly?
14:38:14<wolverian>dcoutts_, oh, yeah, duh. thanks :)
14:38:19<quicksilver>pjd: data dependences is a technical term....
14:38:36<sproingie>gnustep seems to have passed into a nostalgia project these days
14:38:44<quicksilver>wolverian: lambdabot's @instances looks at what the owner tells it to, which is a big chunk but not the whole hierarchy
14:38:58<sproingie>they're still enamored of the amazingly fugly look of nextstep
14:39:09<Wild_Cat>WindowMaker wasn't bad.
14:39:15<quicksilver>RetroFuglySTEP
14:39:19<quicksilver>LastSTEP
14:39:22<quicksilver>BackSTEP
14:39:25<quicksilver>:P
14:39:29<Wild_Cat>nowadays GNUStep is about as significant as HURD, I guess.
14:39:38<sproingie>battleship grey, huge klunky 3d widgets
14:39:44<pjd>dcoutts_: as in what the IO/State monads introduce to order code
14:39:44<dcoutts_>QuickStep?
14:39:51<sproingie>vertical menus, horizontal button strips
14:39:58<dcoutts_>pjd, ok, data dependency is the right term
14:40:11<sproingie>unreadable relief-style checkboxes
14:40:19<obsethryl>araujo: extremely interesting implementation (himerge), bravo
14:40:41<araujo>Thanks obsethryl :-)
14:41:21<obsethryl>araujo: from the features i see in there it should be getting a default place in gentoolandia, i did not know of this project :P
14:41:43<pjd>ok, i was just wondering if there's something more specific for the functional programming sense; "data dependency" seems to be used very prominently in CPU design
14:42:27<Wild_Cat>unimportant question: in theory, functional code is very easy to auto-parallelize (monads aside). Do any of the existing Haskell compilers actually do that?
14:42:33<araujo>obsethryl, it has been on a darcs repo for quite a time now, i hope to be releasing a stable version soon
14:42:47<araujo>obsethryl, it will probably reach more users by then
14:42:53<obsethryl>araujo: i will try this at my gentoo box
14:42:55<quicksilver>Wild_Cat: no. It's surprisingly hard to find the sweetspot for automatic parallelisation
14:43:00<araujo>obsethryl, Cool!
14:43:08<quicksilver>Wild_Cat: plenty of people are excited by the idea, though
14:43:33<quicksilver>Wild_Cat: the thing about on-demand evaluation is that at any particular instant only one thing is being demanded
14:43:34<Wild_Cat>with the generalization of multi-core CPUs, it's unsurprising.
14:43:35<obsethryl>araujo: best address for getting it?
14:43:54<quicksilver>Wild_Cat: so you'd have to somehow predict what was goes to be demanded
14:44:00<quicksilver>Wild_Cat: i.e. some kind of strictness analysis
14:44:02<Wild_Cat>especially seeing that non-functional code is often a pain in the butt to parallelize (even manually).
14:44:07<araujo>obsethryl, right now, i keep fixing/cleaning/adding new featurs to the code. So it has been changed very much lately. Nevertheless, i will release a stable tarball soon (within one or two days)
14:44:11<obsethryl>araujo: read this one: ?
14:44:14<obsethryl>http://fmap.us/himerge.html ?
14:44:16<lambdabot>Title: araujo's home
14:44:23<sproingie>from what i learned of arrows the other day, &&& and *** lend themselves pretty well to parallelizing
14:44:32<obsethryl>araujo: okie then i will wait once you do that
14:44:40<obsethryl>once/till*
14:44:41<araujo>obsethryl, i happen to update the page a few minutes. The stable version isn't uploaded yet
14:44:48<obsethryl>k np :)
14:44:50<araujo>:-)
14:44:52<dcoutts_>Wild_Cat, there's easyish parallelisation with the parallel evaluation strategies lib, the only auto-parallelisation I know of is the NDP work
14:44:54<Wild_Cat>quicksilver: I figure parallelization only needs to occur when you need to evaluate something. Because of course, when you don't, Haskell is king since it doesn't evaluate anything.
14:44:57<dcoutts_>@where ndp
14:44:58<lambdabot>http://darcs.haskell.org/packages/ndp/Data/Array/Parallel/ http://www.cse.unsw.edu.au/~chak/project/dph
14:45:10<araujo>obsethryl, you can test the darcs version though ... it goes very well, and it will be the one that will make it to stable anyway
14:45:15<dcoutts_>the ndp is for parallel arrays, data parallelism
14:45:29<Wild_Cat>at that point, I guess you can render what needs to be evaluated as a tree whose branches you can evaluate in parallel. Or something.
14:45:50<Wild_Cat>of course, it's easier said than done.
14:45:52<sproingie>Wild_Cat: yeah but the cost of not evaluating is remembering that you might have to
14:45:57<dcoutts_>Wild_Cat, the main difficulty is finding the right granularity
14:46:04<obsethryl>araujo: then i guess i will have more work cut out for me this weekend :)
14:46:06<quicksilver>Wild_Cat: no, because you only *need* to evaluate one thing
14:46:09<quicksilver>Wild_Cat: the head of the tree
14:46:15<quicksilver>Wild_Cat: then you evaluate the branches on demand
14:46:17<quicksilver>(which may be never)
14:46:23<araujo>obsethryl, :-)
14:46:24<quicksilver>this is the conflict :)
14:46:42<quicksilver>however, strictness analysis is the kind of solution you need, and GHC already has some strictness analysis
14:47:31<araujo>obsethryl, you interested on GUI programming on Haskell?
14:47:49<dcoutts_>Wild_Cat, the NDP stuff is really cool, you can write algorithms over arrays of arbitrary types, including nested arrays and have it scheduled on multiple cpus, in some early benchmarks they're getting essentially linear speedups for up to 16-way smp
14:47:57<sproingie>the point being that you get it "for free" with a sufficiently smart compiler
14:48:17<obsethryl>araujo: yup
14:48:28<Wild_Cat>sproingie: yeah, I guess my original question was "does such a compiler exist yet?"
14:48:31<sproingie>i guess if you were insane about using restricted pointers in C you could also have an auto-parallelizing SSC
14:48:41<dcoutts_>there's an ICFP paper on using profiling to find what is worth doing in parallel, ie finding the right granularity
14:48:48<araujo>obsethryl, great! , it is really a good language for GUI
14:48:52<Wild_Cat>...to which the answer is "no".
14:48:57<araujo>obsethryl, pretty much the point of himerge is to show that.
14:48:57<pjd>does GHC's SMP parallelism support do anything for code that isn't explicitly threaded?
14:49:00<sproingie>Wild_Cat: nope, but ghc is damn close to it
14:49:22<obsethryl>araujo: i think that as well, functional programming seems like has a perfect match in that field (gui)
14:49:25<Wild_Cat>groovy.
14:49:33<dcoutts_>pjd, no, you need something on top, like par, strategies, ndp or forkIO
14:49:39<araujo>obsethryl, yes, and getting better and better
14:49:52<sproingie>araujo: what does himerge use for gui?
14:50:05<obsethryl>sproingie: gtk2hs
14:50:05<dcoutts_>araujo, aye, it'll get even better, quicker if we make that .def file parser ;-)
14:50:08<araujo>sproingie, you mean, what toolkit/library?, gtk2hs
14:50:16<araujo>dcoutts_, ooooh... yeah!!!!
14:50:31<araujo>dcoutts_, i can take a look at it soon :-)
14:50:33<dcoutts_>ACTION is trying to persuade araujo to help with gtk2hs hacking
14:50:40<dcoutts_>araujo, cool
14:50:49<obsethryl>since no qt is available yet on the haskell world, i might as well try my luck with gtk2hs
14:50:49<Wild_Cat>haskell, perfect for GUI programming? Man, I really need to learn more then. I'd have thought OO languages were a better fit.
14:51:02<araujo>dcoutts_, i am pretty much just finishing details for a release of himerge atm
14:51:16<dcoutts_>Wild_Cat, have you ever looked at an event callback in Java? :-)
14:51:17<sproingie>araujo: anything high level on top of that, or straight gtk2hs?
14:51:26<araujo>sproingie, straight gtk2hs
14:51:34<Wild_Cat>dcoutts_: I said "[real] OO languages".
14:51:37<Wild_Cat>:p
14:51:39<araujo>Wild_Cat, i invite yout o take a look at my article
14:51:45<dcoutts_>sproingie, we don't have a high level api on top, but it's a good platform on which to build one
14:51:48<Wild_Cat>araujo: link please?
14:51:50<sproingie>i remember frantk from long ago, i fell in love with the idea
14:51:56<obsethryl>yeah araujo's link was not bad
14:51:58<dcoutts_>@where gtk2hs
14:51:58<lambdabot>http://haskell.org/gtk2hs/
14:52:00<sproingie>but it was holy hell to build and in the end you needed tk
14:52:00<araujo>Wild_Cat, http://araujoluis.blogspot.com
14:52:02<lambdabot>Title: araujo's blog
14:52:05<Wild_Cat>cheers
14:52:10<quicksilver>pjd: I would argue that `par` doesn't count as 'explicitly threaded'
14:52:17<quicksilver>I think of it more as a parellisation hint
14:52:18<sproingie>i guess phooey is the new pure FP gui?
14:52:22<quicksilver>so it's rather more implicit
14:52:27<quicksilver>but it's a long way from automatic
14:52:29<pjd>quicksilver: true
14:52:40<dcoutts_>sproingie, it's one approach amongst many
14:52:54<araujo>Wild_Cat, I pretty much think functional programming will help to re-define, improve or even replace many conceptions of OOP for GUI.
14:53:07<dcoutts_>sproingie, if people decide it's the best approach then we'll implement it on top of gtk2hs
14:53:14<sproingie>dcoutts_: are there any others using a modern toolkit?
14:53:46<dcoutts_>sproingie, not many, but I don't think the fact that they are not on modern toolkits was ever the problem
14:53:48<araujo>sproingie, i have to say that gtk2hs is very high-level and pleasant to work with.
14:53:48<ndm>I think PropLang is the best way to do a GUI
14:53:53<ndm>and that is implemented on top of gtk2hs
14:54:09<dcoutts_>ndm, I should read the code for that some time, see if I really agree :-)
14:54:17<sproingie>dcoutts_: i'm not really sure how the TV approach works with buttons and the like, i.e. stuff that's more discrete and less continuous
14:54:26<sproingie>dcoutts_: but i'm out to learn :)
14:54:32<ndm>dcoutts_: wait til the SoC project kicks off, so i know if the student is going to use it, enhance it or move away from it
14:54:39<ndm>that will effect what happens
14:54:39<dcoutts_>ndm, and I need to make you that extension so you can fine out when a property changes
14:54:43<araujo>ACTION arranges schedule so he can start helping dcoutts_ with the .def parser
14:54:55<dcoutts_>araujo, :-)
14:55:13<osfameron>something like Laszlo would be cute in haskell
14:55:35<sproingie>a haskell binding to flex would be something
14:55:36<ndm>dcoutts_: ah yes, that would be handy - although not critical - it works quite fine without it
14:55:42<Wild_Cat>I hadn't thought of that, but declarative languages do indeed have an edge as far as describing UIs is concerned.
14:55:46<osfameron>there's a nice system of gui constraints, but of course because javascript isn't FP, it's impossible to do in general case, so it's basically implemented as a hack
14:56:07<dcoutts_>sproingie, erm, flex? you don't mean flex the lexer generator do you? we've got alex for that of course.
14:56:08<ndm>have you seen FlapJax, thats insanely cool
14:56:11<sproingie>javascript can be fp if you want it to be. just not strongly typed.
14:56:17<sproingie>dcoutts_: no, adobe flex
14:56:20<dcoutts_>ah ok
14:56:25<araujo>Wild_Cat, yay!
14:56:44<quicksilver>< araujo> sproingie, i have to say that gtk2hs is very high-level and pleasant to work with.
14:56:55<quicksilver>one of the enchanting things about haskell is even if a library is a little low-level
14:57:01<quicksilver>it's extremely easy to abstract a bit yourself
14:57:03<araujo>Wild_Cat, they will also give you (in the case of Haskell) , a good way of rapid prototyping based on solid formalisms
14:57:04<sproingie>i'll give gtk2hs a try sometime. i'm starting with wxhaskell right now
14:57:10<quicksilver>very easy to build a slightly higher level combinator for what you need
14:57:12<araujo>quicksilver, good point!
14:57:18<dcoutts_>quicksilver, I think araujo has a slightly different meaning for high level in this context
14:57:23<araujo>you pretty much expressed what i wanted :-)
14:57:40<mahogny>quicksilver, oh, but it's easy in C++ too. just add 10 classes on every object, and then some class on top of that, and it all works out
14:57:42<dcoutts_>I describe wxHaskell and Gtk2Hs as medium level GUI apis
14:57:54<dcoutts_>they provide some abstraction, but are not high level declarative
14:58:00<araujo>*nods*
14:58:03<sproingie>low-level would be hopengl i guess :)
14:58:08<dcoutts_>right
14:58:12<mahogny>ACTION loves writing submissions with hard deadlines in the last minute
14:58:17<dcoutts_>or something that just wraps all the C calls
14:58:21<araujo>mahogny, haha
14:58:41<quicksilver>dcoutts_: I think what I'm trying to say it's actually rather easy to make a declarative mid-layer for your particular project
14:58:44<obsethryl>hmm i have to subscribe to haskell-gui
14:58:51<quicksilver>dcoutts_: if you're finding the syntax load a bit high
14:58:59<mahogny>my supervisor just figured we should apply for a grant. never written an application with CV, personal letter etc in less than 40 minutes :P
14:59:06<mahogny>until now
14:59:08<dcoutts_>quicksilver, I'm not sure I get what you mean
14:59:23<dcoutts_>mahogny, that's good going :-)
14:59:45<mahogny>well. I wish I could be that efficient with my ordinary work too :)
14:59:53<araujo>quicksilver, well, that's pretty much inherent to Haskell itself
15:00:09<sproingie>i sort of have to learn more of haskell itself before i can do anything complicated in it
15:00:33<sproingie>the concepts like monads click, the syntax for things like transformers and lifts still confounds me
15:00:54<sproingie>probably just need practice
15:00:55<mahogny>it's barely syntax :)
15:01:23<mahogny>I haven't yet found the monad within me
15:01:27<mahogny>I still think they look ugl
15:01:28<sproingie>and i'm still frightened ad confused by the error output
15:01:29<mahogny>y
15:01:58<dylan>I like the error messages that contain the word "cunning"
15:02:10<araujo>haha
15:02:31<dcoutts_>hia andygill
15:02:36<mahogny>speaking of gtk2hs, it finally compiled :P time to test it on mac
15:02:54<andygill>hi dcoutts
15:03:09<dcoutts_>mahogny, it works, but you'll notice straight away it doesn't look native on osx
15:03:50<dcoutts_>andygill, I'm glad you liked the fusion stuff :-)
15:04:03<mahogny>well. there are two opposing forces at this place; one mac fanatic (my supervisor) and one anti-C++-and-haskell-lover (me). we'll see who wins in the end
15:04:20<dcoutts_>andygill, interesting idea about the virtual data types
15:04:22<andygill>yes, it seems to be more robust
15:05:03<ndm>dcoutts_: oh, i had a few questions on the fusion stuff
15:05:04<dcoutts_>andygill, well, we've not solved compiling the nested stuff reliably yet, build/fold is still better there, but we've got some ideas to try
15:05:13<andygill>I always though of 'iterate (+1) 1' as a function with internal state, your fusion makes this explict.
15:05:28<dcoutts_>andygill, aye, I suppose so
15:05:40<sproingie>i'm not so much anti-c++ as i am anti-linker. about the instant i do anything in C++ that involves more than three lines of code, i end up with mysterious linker errors
15:05:51<ndm>just how special purpose are the hacky changes you've made to the optimiser?
15:06:06<mahogny>any language which forces you to manually write headers oughta be banned
15:06:07<osfameron>sproingie: sure, but to take a "this object has this constraint" and then prove properties on it like "Well, I'd better update that property then" seems to be a bit kludgy. At least that's what I gathered in the 1 day of Laszlo training I attended (heh, an expert!)
15:06:07<andygill>Can you fire me a quick email with an example of the problem?
15:06:19<ndm>i was just wondering, since if you've implemented them in a too hacky way, they may be missing other optimisations which would effect the code
15:06:31<ndm>mahogny, you mean like haskell? hs-boot and all
15:06:39<dcoutts_>ndm, too special purpose imho, we have an idea for a better approach but it's not clear yet if it's work
15:06:45<mahogny>ndm, yeah :)
15:06:52<Cheery>What makes low level code hard to read?
15:06:53<sproingie>osfameron: well yeah you pretty much need a framework designed for the purpose
15:07:19<osfameron>yeah
15:07:22<ndm>dcoutts_: ok, thats the impression i got
15:07:23<sproingie>invariant assertions aren't too hard to do in C++ with gnu nana
15:07:23<dcoutts_>andygill, actually finding a small example is part of the problem, in our tests it was only falling over in the really big multi-module examples, rl is the best person to ask for a test case
15:07:30<mahogny>speaking of linker errors, someone try (or not) make universal binaries on Mac in combination with systems like Fink and libraries like Qt
15:07:33<sproingie>nana's an ancient piece of code that still works nicely
15:08:01<dcoutts_>ndm, it theory you could try and justify them as being general purpose optimisaitons, but in practice this would be the only thing that uses them.
15:08:03<mahogny>10 frameworks + libraries and mixed C/C++ = extremely hard to trace linker errors
15:08:33<sproingie>but constraints ... i suppose you could give class invariants side effects of constraint solving, though that would be "evil"
15:08:49<ndm>dcoutts_: second thing was on the automatic derivation of steppings, do you have any even half-idea if its really possible?
15:09:24<ndm>dcoutts_: and their thing, if you were to fuse data structures like booleans, would you end up with something isomorphic to the original code, but with renamed data structures?
15:10:05<dcoutts_>ndm, well intuitively it looks possible right, I mean we can do it by hand. The question is can we identify the conditions when the transform is possible, then can we automate it. People tried warm fusion before for build/foldr so it's not implausible we could do it for the dual.
15:10:37<dcoutts_>ndm, as for bool, no idea, I'd have to try it and see, I don't have an intuition for that atm.
15:11:33<dcoutts_>andygill, but the basic issue is that in a large list comprehension we take a linear number of simplifier+specconstr passes, linear in the number of generators. In the end that's bad.
15:11:39<ndm>dcoutts_: cool, i've got my optimisation scheme more pinned down now, and hope to implement it shortly
15:12:20<dcoutts_>andygill, the plan is to avoid ever nesting any streams into stream states, then the optimisation is much much easier, it's just a single spec constr pass.
15:13:39<mahogny>is it possible to make gtk programs separate from the X process when alt-tabbing? is it possible to give it a resource fork or something?
15:13:45<mahogny>without too much mess
15:13:50<dcoutts_>ndm, I'm looking forward to it! :-)
15:14:43<dcoutts_>mahogny, you can get a gtk prog to switch to another X screen, but disconnecting from X completely is not something that is currently possible with X + Xlib
15:15:37<dcoutts_>mahogny, the tricky aspect with disconnecting is the server side and client side state.
15:16:12<sproingie>you have to use something like xnest or vnc which can detach the whole x server without the clients knowing
15:16:59<mahogny>I suspected so. hurgh. macos is such a SOB if you want to use it as a unix system
15:17:21<dcoutts_>I think the X hackers want to make disconnecting and reconnecting possible
15:17:22<araujo>ACTION greets CosmicRay
15:17:39<CosmicRay>hi araujo
15:17:49<mahogny>a proper X implementation from apple wouldn't hurt
15:22:12<Wild_Cat>mahogny: what's wrong with Apple's X11?
15:24:53<ndm>@tell dons The York Haskell users group meets once a day for lunch :)
15:24:54<lambdabot>Consider it noted.
15:29:30<andygill>dcoutts, have you considered a difference rewrite schema for list comps?
15:30:54<dcoutts_>andygill, we considered at least 2, the current monadish style one and one that directly builds a single stream with a complex internal state.
15:31:40<dcoutts_>directly building a single stream would not allow us to avoid nesting streams in stream states
15:32:06<dcoutts_>I like the approach of doing a monad style desugaring and going from there
15:34:45<gimboland>what's a nice succinct way to specify the section for "subtract one" (where, eg (+1) is the section for "add one"). The obvious choice, (-1), is getting treated as the literal number -1, afaics
15:35:39<dcoutts_>@type negate
15:35:49<lambdabot>forall a. (Num a) => a -> a
15:36:06<dcoutts_>> (negate 1) 7
15:36:07<lambdabot> add an instance declaration for (Num (t -> a))
15:36:08<lambdabot> In the expression: (nega...
15:36:10<dcoutts_>bah
15:37:08<dcoutts_>gimboland, well there's always just (\n->n-1)
15:37:46<gimboland>:-)
15:38:16<gimboland>yeah. just wondered if there was something cunning i was missing. Ta!
15:39:41<eumenides>subtract 1
15:41:04<mahogny>Wild_Cat, nothing wrong with it except it's the only process listed so I can't use alt-tab and at least GIMP has annoying problems with focus
15:41:05<dcoutts_>ah, I thought there was a named function for it, I got confused with negate
15:43:23<gimboland>eumenides: even nicer - ta!
15:43:30<matthew_->gimboland: flip (-) 1
15:44:13<gimboland>i thought i tried that but it didn't work. i must have done it wrong...
15:44:52<matthew_->pred
15:45:28<eumenides>ach
15:45:31<matthew_->> pred 4
15:45:33<lambdabot> 3
15:45:39<matthew_->> pred (5/4)
15:45:40<lambdabot> 0.25
15:47:47<matthew_->> pred (negate (1/0))
15:47:48<lambdabot> -Infinity
15:47:54<matthew_->> pred (1/0)
15:47:55<lambdabot> Infinity
15:48:02<matthew_->mmm. seems quite useful that
15:48:22<gimboland>@type pred
15:48:24<lambdabot>forall a. (Enum a) => a -> a
15:48:56<matthew_->mmm. I wonder how hard ghc will try to optimise it. Whether for ints it really will get down to the same as x-1.
15:49:02<gimboland>i need negatives, (or at least -1), else pred would be nice...
15:49:25<matthew_->> pred (negate 5)
15:49:26<lambdabot> -6
15:49:30<gimboland>oh wait...
15:49:50<gimboland>yeah, sorry, no problemo :-) super
15:53:07<hpaste> gimbo pasted "Suggested xmonad addition: movews" at http://hpaste.org/1596
16:16:04<bartw>good day
17:06:18<shapr>SHAZAM!
17:06:48<shapr>Fun code today guys?
17:06:56<shapr>I rebuilt the latest version of xmonad, it's nice!
17:08:08<thetallguy>Maseltov!
17:15:19<shapr>Sure is quiet today.
17:15:31<dmhouse_>ACTION MAKES SOME NOISE!
17:16:04<thetallguy>anyone have the cvs command to get the latest inf-haskell?
17:16:16<thetallguy>stepcut recommended it and google isn't coming up with it.
17:17:21<dmhouse_>thetallguy: try looking at haskell.org/haskell-mode, that has CVS details.
17:17:37<dmhouse_>inf-haskell is awesome! For anyone that doesn't know.
17:17:46<kolmodin>echo "return ()" | ghc --interactive -ignore-dot-ghci -v0 > output
17:17:50<kolmodin>what does output contain for you?
17:18:08<kolmodin>for me it contains a single line saying
17:18:09<kolmodin>^[[?1034h
17:18:58<dmhouse_>kolmodin: for me, it's "ghc: command not found", but there may be a logical explanation for that... :)
17:19:13<kolmodin>dmhouse_: haha :)
17:19:44<malcolmw>kolmodin: for me, the output file is empty
17:20:03<kolmodin>malcolmw: what's your system?
17:20:24<malcolmw>ghc-6.6, powerpc-darwin
17:20:39<dmhouse_>Everyone that uses haskell-mode should read http://haskell.org/haskellwiki/Haskell_mode_for_Emacs#inf-haskell.el:_the_best_thing_since_the_breadknife
17:20:43<kolmodin>so the file is really 0 bytes, no unprintable chars or something?
17:20:44<lambdabot>Title: Haskell mode for Emacs - HaskellWiki, http://tinyurl.com/w7vnb
17:20:53<malcolmw>kolmodin: yup, zero bytes
17:20:56<kolmodin>ok
17:21:22<kolmodin>my machines behavior is clearly a bug, it kills the configuration of hs-plugins
17:21:39<hpaste> Gwern pasted "dmenu = no fn" at http://hpaste.org/1597
17:22:14<Lemmih>kolmodin: zero bytes with ghc-6.6, amd64.
17:22:18<hpaste> Gwern pasted "dmenu -fn" at http://hpaste.org/1598
17:22:27<kolmodin>hmm
17:22:31<kolmodin>Lemmih: OS?
17:22:38<Lemmih>kolmodin: Ubuntu.
17:22:41<kolmodin>right
17:24:01<kolmodin>ok. thanks
17:28:05<dmhouse_>Someone say something, I may have just screwed my connection up.
17:28:18<emu>moo
17:28:31<dmhouse_>Good. :)
17:28:32<capisce>moo moo moo
17:28:34<capisce>moo?
17:29:11<emu>dmhouse_: is this the first time you have used inf haskell?
17:29:42<dmhouse_>emu: me? Or thetallguy?
17:35:17<Saizan>dmhouse_: (load "~/.lib/fptools/CONTRIB/haskell-modes/emacs/haskell-site-file") \n (load "~/.lib/fptools/CONTRIB/haskell-modes/emacs/inf-haskell") <-- this would work in .emacs to have inf-haskell working?
17:37:32<emu>you shouldn't have to load inf-haskell like that
17:37:47<emu>http://haskell.org/haskellwiki/Haskell_mode_for_Emacs#Minimal_setup
17:37:49<lambdabot>Title: Haskell mode for Emacs - HaskellWiki, http://tinyurl.com/w7vnb
17:43:51<emu>@pl \ w -> f w w == w
17:43:51<lambdabot>(==) =<< join f
17:46:02<shapr>excitement!
17:46:20<shapr>dmhouse_: Have you tried shim?
17:46:35<Lemmih>ACTION doesn't see the excitement.
17:46:41<shapr>it's hiding...
17:46:43<joelr1>good day
17:46:51<shapr>Greetings!
17:46:54<shapr>Salutations!
17:47:02<hpaste> joelr1 pasted "ugly code" at http://hpaste.org/1599
17:47:04<shapr>Extra-parallel computations!
17:47:13<joelr1>does anyone other than me find this code ugly?
17:47:13<shapr>ACTION is playing with cryptolib
17:49:11<shapr>Does anyone know if Dominic Steinitz' ASN.1 library is available? I know he split it out of cryptolib, and I need it to read keys.
17:49:30<allbery_b>it does look rather like it wants to be templated somehow
17:49:33<Lemmih>joelr1: http://research.microsoft.com/~simonpj/Papers/hmap/index.htm
17:49:34<lambdabot>Title: Scrap your boilerplate: a practical approach to generic programming
17:50:26<joelr1>Lemmih: i started a thread on cafe recently about trying to scrap boilerplate when transforming ASTs
17:50:33<joelr1>i don't think much came out of it
17:51:53<Lemmih>joelr1: If C.Expr is either a subset or superset of Expr then you could probably use GADTS.
17:52:43<joelr1>right
17:52:55<joelr1>it boils down to having to restructure ASTs which i don't want to do
18:03:31<Lemmih>ACTION wields his lambdas and starts throwing patches.
18:03:53<shapr>Yay patches!
18:04:08<shapr>Lemmih the functional ninja! Head Normal Form ATTACK!
18:04:34<SamB_XP>if it is the normal form, why do you need to specify it?
18:07:12<araujo>ACTION wonders why some people think than using the IO monad makes your program not purely functional
18:07:32<joelr1>is there a monadic Just?
18:07:48<Binkley>which people think that?
18:08:00<shapr>Binkley: Usually imperative programmers.
18:08:01<Cale>joelr1: return :)
18:08:01<lambdabot>Cale: You have 1 new message. '/msg lambdabot @messages' to read it.
18:08:09<joelr1>Cale: morph (C.Series id ago) = liftM2 Series (morph id) (Just $ morph ago)
18:08:20<SamB_XP>well, it does mean the that the program is imperative
18:08:25<joelr1>Cale: it's _that_ Just
18:08:51<joelr1>Cale: return . Just =<< morph ago?
18:09:01<joelr1>i was hoping for a shortcut
18:09:20<SamB_XP>@pl return . Just =<< morph ago
18:09:21<lambdabot>Just `fmap` morph ago
18:09:28<Cale>yeah, fmap
18:09:36<joelr1>aha!
18:09:39<araujo>Binkley, shapr yeah
18:09:42<SamB_XP>hmm, rather presumptuous
18:09:54<SamB_XP>(assuming there is a Functor instance for the Monad!)
18:09:58<joelr1>or liftM Just (morph ago) , suppose
18:10:13<SamB_XP>quite so
18:12:20<shapr>araujo: I've seen similar misunderstandings with garbage collection.
18:12:48<araujo>https://www2.blogger.com/comment.g?blogID=6913397465984649777&postID=4450302941445054336
18:12:50<lambdabot>http://tinyurl.com/yukrbj
18:12:53<SamB_XP>shapr: hmm?
18:12:59<SamB_XP>what kind of misunderstandings?
18:13:08<araujo>shapr, you mean, a functional language can't have a garbage collector?
18:13:11<shapr>I once got to explain to somebody in extreme detail how garbage collection simulates infinite memory, and is just as useful as manual memory allocation.
18:13:47<shapr>Someone (I forget who) just didn't understand how GC could possibly work.
18:14:04<araujo>But, what was he assumption?
18:14:04<SamB_XP>which is probably why language specs tend not to say that you have to use garbage collection to implement them...
18:14:07<araujo>his*
18:15:27<shapr>araujo: Er, something about immutability, sharing and GC
18:16:01<araujo>yeah, i have noticed that 'mutability' tends to confuse people about it
18:16:53<SamB_XP>shapr: maybe he didn't realize that the garbage collector is allowed to rewrite immutable objects ;-)
18:17:40<davidL>is there anything builtin that test for recurring cycles in a list?
18:18:07<shapr>I said to him, 'if you assume infinite memory you only need to allocate memory for newly created values, and you can ignore values that are no longer used by anything. Garbage collection lets you do something similar by reusing the memory previously used by values that are no longer used.'
18:18:08<SamB_XP>davidL: 'tis impossible!
18:18:29<araujo>Very common to the "Haskell has side-effects because of the IO monadic type" confusion
18:18:33<davidL>SamB_XP: why?
18:18:53<SamB_XP>shapr: you should have explained the store as representing a directed graph
18:18:54<araujo>shapr, nice point
18:18:59<bos>davidL: you need a different notion of equality than haskell provides.
18:19:21<shapr>SamB_XP: I think that wouldn't have helped.
18:19:21<SamB_XP>and garbage collection as moving the little pieces of paper around
18:19:47<shapr>This was a very smart C programmer, but I doubt he'd dealt with directed graphs before.
18:19:51<SamB_XP>(a directed graph being made of string and paper, obviously!)
18:19:53<davidL>bos: so it cannot be done in haskell?
18:20:05<bos>davidL: to detect a loop, you need something like pointer equality.
18:20:20<Binkley>you can be a programmer without having to think about graphs?
18:20:29<SamB_XP>Binkley: apparantly!
18:20:39<shapr>davidL: It can be done, but you need to remove yourself one step, Paul Hudak posted a cute solution for that sort of thing on the mailing list.
18:20:54<shapr>Binkley: Yup, especially a C programmer.
18:20:57<SamB_XP>what kind of programmer doesn't know that the store is a directed graph?
18:21:26<davidL>I will result to using C, if such is the case
18:21:27<Binkley>it seems like if you didn't know about graphs, and you were a programmer, you would need to invent them
18:21:51<shapr>Binkley: Yup
18:21:59<shapr>Binkley: That happens for a lot of things.
18:22:04<Binkley>yeah
18:22:11<Binkley>that's why computer science is about reinventing the wheel :-)
18:22:19<clanehin>davidL: what are you trying to do?
18:22:37<dylan>ACTION invented graphs and linked lists on his own. :(
18:22:44<dylan>[in perl]
18:22:51<shapr>I met a guy who independently re-invented OO in C with pointer indirection, and was struck by a lightning bolt of understanding when he started using Python/Java.
18:22:59<davidL>clanehin: trying to find a recurring cycle in a list of numbers
18:23:03<shapr>dylan: Still, it's the best way to understand them, isn't it?
18:23:14<SamB_XP>shapr: did he start in the C API guide?
18:23:21<shapr>I invented pure FP in Python, that's when a friend of mine pointed me to Haskell.
18:23:27<clanehin>davidL: right, but why?
18:23:34<dylan>shapr: LOL, that's even better.
18:23:38<dylan>shapr++
18:23:45<SamB_XP>shapr: at least PYthon programmers have already heard of referential transparency
18:23:54<davidL>clanehin: it's a problem on project euler
18:24:07<clanehin>davidL: wait, do you want to see if the data structure is cyclic, or just that the numbers repeat themselves?
18:24:13<shapr>dylan: I was also struct by a lightning bolt of understanding when I tried Haskell after that :-)
18:24:44<shapr>I should have made that struct joke with the C guy comment ;-)
18:24:55<Binkley>yeah, I was trying to think of a good struct joke there
18:25:01<dylan>shapr: the only major thing I noticed from perl -> ocaml was static typing and pattern matching, both of which were cool.
18:25:08<davidL>clanehin: well I know that the numbers will eventually cycle, I just want to find out when and how much
18:25:17<shapr>Yeah, pattern matching is awesome.
18:25:23<shapr>And so very simple!
18:25:26<dylan>and ocaml -> haskell is monads + laziness + sane syntax.
18:25:38<SamB_XP>davidL: so how would you know if there was a cycle?
18:25:42<dylan>pattern matching is easier in haskell.
18:25:44<shapr>dylan: And typeclasses
18:26:02<dylan>shapr: that wasn't new. it just reminds me of runtime CLOS.
18:26:04<shapr>I keep hearing that OCaml has different operators for equality on different types.. yow!
18:26:16<emu>who needs graphs when you have matrices
18:26:35<shapr>davidL: You can do it by constructing the list and comparing constructors.
18:26:43<thetallguy>ooh, thanks shapr, that's another thing for my list
18:26:52<dylan>I miss ocaml's module system
18:26:52<shapr>thetallguy: what?
18:27:08<thetallguy>shapr: reasons why we switched from ocaml to Haskell
18:27:09<dylan>but I wanted it to have first class modules, anyway, which it doesn't...
18:27:32<SamB_XP>emu: ... matrices sound kinda bulky
18:27:39<davidL>I will investigate Floyd's cycle-finding algorithm
18:27:40<shapr>dylan: Which is too bad really, it would be cool to parameterize modules STL-style.
18:27:43<thetallguy>shapr: type classes I had down, but it reminded me that you can't dervie stuff in ocaml
18:27:52<shapr>thetallguy: Yeah, that'd make me crazy.
18:27:53<SamB_XP>emu: also how do you store your sparse matrices without graphs?
18:28:02<thetallguy>shapr: deriving show, read, eq, etc. saves so much brain power
18:28:03<shapr>dylan: That would be useful when doing QuickCheck tests.
18:28:08<randomity>davidL: what's the problem?
18:28:18<emu>mm, vector of lists =)
18:28:22<dylan>shapr: or buidling UIs seperated from their backends.
18:28:24<davidL>randomity: problem 26
18:28:28<shapr>dylan: How so?
18:28:37<SamB_XP>emu: that sounds rather unsparse
18:28:46<emu>actually, i use a vector of maps for one of my graphs
18:28:56<dylan>shapr: the backend of, say, a chat client, is passed a UI module and uses the functions it has.
18:29:05<randomity>davidL: what?
18:29:11<shapr>You could use a typeclass for that, yeah?
18:29:18<emu>instead of an adjacency matrix
18:29:23<davidL>randomity: projecteuler.net -- problem 26
18:29:31<dylan>not in the same way I'm thinking. I'm thinking of a typed first-class module.
18:29:39<dylan>you can emulate it with a record, but it's not the same.
18:29:48<SamB_XP>shapr: well it might be nice if you could write the type signatures without all the type variables...
18:30:11<davidL>@users
18:30:12<lambdabot>Maximum users seen in #haskell: 335, currently: 326 (97.3%), active: 38 (11.7%)
18:30:13<shapr>SamB_XP: You mean, class constraints are too verbose?
18:30:49<SamB_XP>shapr: I mean that passing all your type variables to each type constructor could get annoying
18:32:04<shapr>Oh, for the list cycle problem?
18:32:27<SamB_XP>shapr: who what where when why how?
18:33:09<shapr>I'm confused then, what were you talking about? Can you give me an example?
18:33:34<SamB_XP>well.
18:33:54<SamB_XP>hmm. what did it look like...
18:34:54<randomity>davidL: why are you using graph theory for this?
18:34:58<clanehin>davidL is looking for repeating cycles in the raw data, not the list data structure, but I suspect it's impossible to write a function to do this in every case. You'll have to use what you know about division to narrow it down.
18:35:40<davidL>Floyd's algorithm will work fine actually
18:35:42<randomity>it's a lot easier if you just examine the division algorithm
18:35:55<davidL>randomity: how so?
18:36:21<randomity>long division. just implement the algorithm yourself, and keep track of which remainders have already been seen
18:36:43<davidL>yeah, that's what I was thinking originally
18:36:49<randomity>as soon as you see a remainder that's already seen, you stop because you know the fraction will repeat infinitely
18:37:09<SamB_XP>shapr: I can't seem to find a real-world example
18:37:28<davidL>randomity: ah I see, so instead of looking at the result of the division I should look at the remainder?
18:37:29<shapr>SamB_XP: If you find one, I want to see it.
18:37:56<SamB_XP>but imagine an AST with several datatypes in it that are all parameterized by the name type
18:38:02<bos>someone needs to implement http://en.wikipedia.org/wiki/Tits_group
18:38:03<randomity>davidL: yes. when the remainder goes to a previous value, the division has started to cycle
18:38:32<eumenides>does anyone have any simple ST array examples?
18:39:16<SamB_XP>ACTION wonders how you would write the type of a module
18:39:45<bos>SamB_XP: hm?
18:39:58<SamB_XP>it would be easier with records!
18:40:00<SamB_XP>real ones!
18:41:29<davidL>randomity: thanks for the help, that makes a lot more sense than my original implmentation
18:41:48<shapr>Automorphism.. um, yeah.
18:42:02<randomity>davidL: np
18:53:07<DukeDave>Hey gang, I've put a %format theta' = "\theta'" in some lhs2tex code but I keep getting "lexical error", any ideas? :S
18:54:37<DukeDave>Could easily get around it by not using ', but would make my notation inconsistent :(
18:55:19<davidL>randomity: doesn't your implementation assume that there are no sub-cycles in the bigger cycle?
18:55:54<twanvl>Have you tried just using theta = "\theta"?
18:56:40<randomity>davidL: I assumed the problem was to find the shortest infinitely repeating cycle in the decimal expansion
18:56:45<DukeDave>Yeah, that works fine, in fact I already have that defined
18:57:08<DukeDave>But some of my calculations use theta' and I wanted to get the nice symbol :(
18:57:08<randomity>davidL: if you allow longer cycles, then I can just claim that 1/3 is 0.(3333)(3333)(3333), or 0.(3333333333)(3333333333)(3333333333)
18:57:22<DukeDave>I just can't see to escape the '
18:57:29<DukeDave>*seem
18:57:32<randomity>davidL: giving me arbitrarily large cycles for any number
18:57:46<davidL>randomity: what about, for example, 0.00(177304...)
18:58:20<DukeDave>Grumble, surely this has come up!
18:58:21<DukeDave>ACTION goes searching
19:00:04<randomity>davidL: dunno
19:02:14<njd>@users
19:02:15<lambdabot>Maximum users seen in #haskell: 335, currently: 332 (99.1%), active: 37 (11.1%)
19:02:29<davidL>randomity: ok, heh, sorry -- I was looking at the quotient again, you're method indeed works
19:02:33<gimboland>@hoogle trace
19:02:33<lambdabot>Debug.Trace.trace :: String -> a -> a
19:02:34<lambdabot>Debug.Trace :: module
19:02:34<lambdabot>Debug.Trace.putTraceMsg :: String -> IO ()
19:04:03<Baughn>@hoogle (a -> Bool) -> [a] -> [[a]]
19:04:03<lambdabot>No matches, try a more general search
19:05:28<Baughn>@hoogle a -> [a] -> [[a]]
19:05:29<lambdabot>No matches, try a more general search
19:05:30<Baughn>@define words
19:05:34<lambdabot>Plugin `eval' failed with: IRCRaised Data.ByteString.last: empty ByteString
19:05:56<monochrom>haskell is lovely
19:07:15<Baughn>@type splitWih
19:07:18<Baughn>@type splitWith
19:07:18<lambdabot>Not in scope: `splitWih'
19:07:19<lambdabot>Not in scope: `splitWith'
19:07:51<bos>splitWith is defined on ByteStrings, not on other types
19:08:24<monochrom>@type Data.ByteStrings.Lazy.splitWith
19:08:24<lambdabot>Couldn't find qualified module.
19:08:24<monochrom>Nevermind me.
19:08:24<monochrom>@src words
19:08:24<lambdabot>words s = case dropWhile isSpace s of
19:08:24<lambdabot> "" -> []
19:08:24<lambdabot> s' -> w : words s'' where (w, s'') = break isSpace s'
19:08:47<monochrom>You can write your own splitWith based on that.
19:08:57<gimboland>looks a bit odd: http://www.cse.unsw.edu.au/~dons/code/lambdabot/State/quote (linked from http://haskell.org/haskellwiki/Lambdabot)
19:09:13<Baughn>I can. Figured that sort of thing would be in the standard library, though.
19:09:24<Binkley>yeah, there's been that problem ever since they switched to a binary format for those files
19:09:43<gimboland>what should it be?
19:10:11<Binkley>it should be a text file... someone might want to suggest to dons that he set up something that generates the text file from the binary file for purposes of browing
19:11:00<gimboland>@quote lambdabot
19:11:00<lambdabot>lambdabot says: Of course i'm female
19:11:22<gimboland>:) hence the pigtails
19:11:59<gimboland>my shartak avatar looks remarkably like lambdabot : http://www.shartak.com/profile.cgi?id=3013
19:12:01<lambdabot>Title: Shartak : gimbo
19:12:06<gimboland>co-incidence? i don't think so.
19:13:42<kc5tja>Gahh! I have to clear the screen. Every time I read shartak, I read it initially as startrek. ;D
19:14:16<gimboland>:)
19:16:49<shapr>Is there an easy way to grab the source of a MediaWiki page? MoinMoin has something like PageName?source=
19:17:22<ehird10>shapr: Yes.
19:17:23<ehird10>Edit it.
19:17:31<ehird10>It'll give you the source if you can't
19:17:59<shapr>Hm, I just get "you must be logged in to edit" from HaskellWiki
19:19:07<ehird10>Oh.
19:19:08<dmwit>shapr: Which page? One of us can send it to you.
19:19:09<ehird10>Login then.
19:19:30<dmwit>ehird10: It takes a day or two to register (it has to be approved by a human, IIRC).
19:19:34<ehird10>dmwit: ah
19:20:05<shapr>dmwit: It's not that I don't have a login, it's that I'm trying to automate checking of the HAppS tutorial on HaskellWiki
19:20:10<shapr>Lemmih found the solution though.
19:20:15<ehird10>Well, register a bot account.
19:20:20<shapr>http://www.haskell.org/haskellwiki/?title=HAppS_tutorial&action=raw
19:20:22<dmwit>Ah, okay.
19:20:22<lambdabot>http://tinyurl.com/2d3ruy
19:20:43<shapr>Lemmih++
19:20:47<Lemmih>Whee.
19:20:56<shapr>@karma Lemmih
19:20:57<lambdabot>Lemmih has a karma of 37
19:20:59<shapr>@karma lemmih
19:20:59<lambdabot>lemmih has a karma of 1
19:21:01<shapr>hmm
19:22:07<Lemmih>?karma-all
19:22:08<lambdabot> "audreyt" 634
19:22:10<lambdabot> "fglock" 193
19:22:12<lambdabot> "dons" 139
19:22:14<lambdabot> "larry" 106
19:22:16<lambdabot> "gaal" 98
19:22:18<lambdabot>[989 @more lines]
19:22:28<Lemmih>fglock, larry?
19:22:29<ehird10>ACTION wishes there was an @all
19:22:54<shapr>Lemmih: I'm guessing those are #perl6 people.
19:23:07<shapr>@more
19:23:07<lambdabot> "agentz" 88
19:23:08<lambdabot> "lwall" 64
19:23:08<lambdabot> "putter" 56
19:23:08<lambdabot> "glguy" 51
19:23:08<lambdabot> "sjanssen" 49
19:23:09<lambdabot>[984 @more lines]
19:23:22<shapr>lwall and larry are probably Larry Wall.
19:23:23<mauke>heh, does lambdabot listen to pugs commit messages?
19:23:33<shapr>@listchans
19:23:33<lambdabot>#darcs #gentoo-haskell #gentoo-uy #ghc #haskell #haskell-blah #haskell-overflow #haskell-soc #haskell.dut #haskell.hac07 #jtiger #oasis #parrot #perl6 #scannedinavian #xmonad
19:23:40<shapr>#perl6
19:24:40<ehird10>#haskell...blah?
19:25:00<kaol>for anything but haskell
19:25:47<ehird10>Isn't that ... everything on freenode except for #*haskell*?
19:27:17<gds>audreyt, iirc is the dude that started writing perl6 in haskell.
19:27:28<shapr>Yup, chick
19:27:32<shapr>not dude
19:27:54<gds>Sorry - I tend to use "dude" as gender-neutral ;)
19:28:15<gds>(is there a polite gender-neutral alternative?)
19:28:47<_roconnor>dood
19:28:48<ehird10>gds: "him" when gender is not known works for me
19:28:55<roconnor>d00d
19:29:13<gds>ACTION likes d00d :)
19:29:42<kc5tja>There was once a motion to import Sie from German as a gender-neutral word.
19:29:51<kc5tja>Not sure what happened to the effort except to say that it fizzled.
19:29:59<ehird10>Or Hes or whatever
19:30:01<kc5tja>ACTION would like to have a proper gender-neutral reference.
19:30:06<ehird10>I wouldn't
19:30:08<kc5tja>afk -- lunch, then meeting.
19:30:13<ehird10>"person" or "they" wfm
19:30:20<integral>just use "it" :-)
19:30:23<pjd>ACTION votes for they
19:30:45<ehird10>so i would say <gds> audreyt, iirc is the person that started writing perl6 in haskell.
19:31:13<pjd>s/, iirc is the person that//
19:32:06<Binkley>or "is the person who started writing..." if you want to be all correct and stuff :-)
19:38:03<davidL>> scanl (\x -> (x - ((quot x 7) * 7))*10) 1 [1..10]
19:38:04<lambdabot> Occurs check: cannot construct the infinite type: a = b -> a
19:38:05<lambdabot> Probabl...
19:42:10<davidL>> scanl (\x y -> (x - ((quot x 7) * 7))*10) 1 [1..10]
19:42:12<lambdabot> [1,10,30,20,60,40,50,10,30,20,60]
20:03:08<emu>wasn't there an X11 library included with ghc?
20:15:53<Cheery>@dice 1d6
20:15:54<lambdabot>1d6 => 6
20:16:00<Cheery>@dice 1d6
20:16:00<lambdabot>1d6 => 4
20:16:04<Cheery>@dice 1d6
20:16:04<lambdabot>1d6 => 3
20:17:18<ehird10>@dice -1
20:17:18<lambdabot>unexpected "-": expecting number
20:17:29<dmwit>?price 3d2
20:17:30<lambdabot>3d2 => 5
20:18:09<Cheery>@dice 1d6
20:18:09<lambdabot>1d6 => 6
20:18:15<Cheery>gah
20:19:06<merus>@dice 3d6
20:19:06<lambdabot>3d6 => 8
20:19:12<merus>ewww
20:19:32<Cheery>just shuffled myself tomorrow's topics. :)
20:20:03<emu>gtkhs works nicely
20:20:08<emu>im happy to report
20:21:33<dolio>@dice 500d250
20:21:34<lambdabot>500d250 => 63451
20:23:46<ddarius>> product [1..100]
20:23:48<lambdabot> 9332621544394415268169923885626670049071596826438162146859296389521759999322...
20:23:53<ddarius>Doh.
20:23:58<ddarius>> product [1..50]
20:24:00<lambdabot> 30414093201713378043612608166064768844377641568960512000000000000
20:24:25<ddarius>@dice 200d30414093201713378043612608166064768844377641568960512000000000000
20:24:26<lambdabot>200d30414093201713378043612... => 322162144545576065266616952903033850738206...
20:24:51<Cheery>700000d2
20:25:09<Cheery>@dice 700000d200000
20:25:09<lambdabot>700000d200000 => 69947977698
20:25:23<dolio>It stops actually rolling dice at some point.
20:25:48<ddarius>@dice 30414093201713378043612608166064768844377641568960512000000000000d2
20:25:48<lambdabot>304140932017133780436126081... => 456211398025700670654189122490972955140153...
20:25:53<qebab>nothing like a bot to play with on a friday night :)
20:26:04<ddarius>And every other day of the week.
20:26:12<qebab>fact
20:27:45<kosmikus>?tell DukeDave in lhs2tex formatting directives, you can escape ' by adding another ', so %format theta' = "\theta''"; or, you can use implicit formatting and just say %format theta = "\theta" and then %format theta' (without any right hand side)
20:27:46<lambdabot>Consider it noted.
20:28:12<hpaste> bos pasted "find(1) in haskell" at http://hpaste.org/1600
20:31:27<dmhouse>bos: nice! Paste the whole module?
20:32:23<bos>yeah, i'll be putting it up for general use once it's done.
20:33:25<monochrom>We need to overload &&, ||. :)
20:34:05<bos>yeah, having to splatter extra goo around them is no fun :-)
20:34:08<monochrom>I conspire to confuse newbies! Now they can't even use logic without first fighting an "unresolved overloading" message!
20:34:16<dmhouse>Yar!
20:34:18<ddarius>Am I the only person in the Haskell community who doesn't really give a fuck about people who can't follow simple directions and doesn't really think they should be coddled?
20:34:22<shapr>ddarius: Yeah, I tried 999999999d999999 or something and it crashed lambdabot.
20:34:31<monochrom>"Why is Haskell resisting to be used?"
20:34:58<dmhouse>monochrom: actually an overloaded Bool type has been proposed many times.
20:35:02<shapr>ddarius: Well, I try to give people the benefit of the doubt, the first time I assume they just misread or misunderstood and try to explain to them.
20:35:27<shapr>ddarius: Have you heard of the social strategy, Tough But Fair?
20:35:29<monochrom>ddarius: referring to the recent "trying to install hmp3, not ready for prime time" in haskell-cafe?
20:35:45<ddarius>I'm fairly nice too when they present their problems reasonably.
20:36:25<ddarius>monochrom: Yes and no. I've seen many other instances where my thoughts are "Fine, bye". The Haskell community doesn't need people like them and is not sore for people at all.
20:36:46<ddarius>shapr: I don't think so.
20:36:46<bos>http://www.amazon.com/dp/0446526568
20:37:33<Binkley>ddarius: is this about that guy who wrote he was giving up Haskell because of not having libreadline installed?
20:37:35<ddarius>bos: I'm usually not too much of an asshole. But I don't see why we should be importing them.
20:37:47<bos>ddarius: this was not directed at you at all.
20:37:49<ddarius>Binkley: See my response to monochrom.
20:37:57<Binkley>ah sry
20:38:00<ddarius>bos: Either way.
20:38:06<monochrom>When I first read the OP, I thought, I should reply "Good bye." Without comment, help, mocking, lecture. Just plain "good bye". However, since everyone has helped, there is no need.
20:38:06<ddarius>bos: It works for my point.
20:38:13<bos>ddarius: precisely.
20:38:15<Binkley>Well, when you say "the Haskell community doesn't need people like them," it depends on your agenda
20:38:24<Binkley>if you want to see more people using Haskell, I think we need all the people we can get
20:38:33<Binkley>if you like the community the way it is, though, it's a reasonable opinion
20:38:38<Binkley>and I think either stance is understandable
20:38:45<ddarius>Binkley: In my opinion, no reasonable agenda (especially for Haskell) needs people like that.
20:39:18<ddarius>Personally, I prefer quality people over more people, but in this case, I don't think helping people like that is a net win for getting more people to use Haskell.
20:39:19<monochrom>Nice, I should take a look at that "no asshole" book.
20:39:36<Binkley>ddarius: I agree he was coming off like a prick in that post
20:39:46<Binkley>but I think it's good that people were able to reply to it without stooping to his level
20:39:51<Binkley>I think that reflects well on our community
20:39:59<dmhouse>ddarius: that's incredibly judgemental. What if he, say, had just had a crappy week and wasn't ready for one more thing going wrong?
20:40:03<monochrom>I think it's fair to say: no community wants asshole. Am I right?
20:40:19<dmhouse>Admittedly, he did then post to the ML with complaints, but OTOH there _was_ a bug in the build procedure.
20:40:28<ddarius>Binkley: I agree people shouldn't stoop to his level. But in my opinion, a straight dismissal (my "Fine, bye" or monochrom's "Good bye") don't do that.
20:40:59<Binkley>I don't think anyone should feel obligated to help anybody out... but that's the beauty of having an active mailing list
20:41:06<Binkley>if you don't feel like dealing with someone, you don't have to
20:41:10<ddarius>dmhouse: What if I'm having a crappy week and just wasn't ready for one more lazy jerk?
20:41:13<dmhouse>ddarius: and he goes and tells his friends that the Haskell bunch are unfriendly and impatient. We need all the good image we can gather.
20:41:14<Binkley>hah
20:41:25<dmhouse>ddarius: then keep your comments to your self. A 'STFU' doesn't help anyone.
20:41:35<monochrom>He says "good bye" and I reply "good bye". Seems like what he wants anyway. He didn't even ask for advice did he?
20:41:37<ddarius>dmhouse: Anyways, he had to go out of his way to post that comment. He could have just left, since that was his stated plan anyways.
20:42:01<ddarius>Binkley: Trust me, I don't. Same here.
20:42:11<dmhouse>ddarius: yes, and I'm not defending him, that was a stupid thing to do, but there _was_ a bug in the build procedure, cut him some slack.
20:42:29<ddarius>dmhouse: A "bug" that was readily documented.
20:42:51<monochrom>The whole message, literally, and neglecting flaming, is, "I notice this problem. Good bye." OK, looks like a suitable reply is "Point taken. Good bye."
20:42:52<ddarius>Again, I never suggested saying STFU, just not bothering to help him since he never stated he wanted any.
20:43:23<dmhouse>Download -> extract -> ./configure -> make -> make install should work unless you have a funky system. Why wasn't said bug fixed, instead of being written about?
20:43:30<Binkley>I think it's easy to say "this is readily documented" when you're very familiar with the documentation for a particular project
20:43:54<Binkley>if you're installing something new, and you have two choices, you're going to pick the one that doesn't require you to read more documentation
20:44:00<monochrom>Well it's written on the same page he obtained the tarball. No hunting.
20:44:00<ddarius>It's on the page he downloaded the tarball from. Also he apparently wasn't even using the build system of his distribution!
20:44:12<dmhouse>monochrom: seems to me that a better response is "Fair enough, you had a bad experience, help us improve things". If you're not patient enough to give that kind of response, just hold back and let the people that are deal with it.
20:44:34<ddarius>Binkley: He chose the one that "required" reading no documentation. Namely, ignoring the documentation right there.
20:44:34<Binkley>and the nice thing about that response is it assumes good faith
20:44:53<Binkley>it assumes he wants to help, and when you assume that, sometimes people rise up to it
20:45:20<ddarius>dmhouse: Also, note both me and monochrom have not replied in any negative capacity. We are "holding back". (Actually, I'm just ignoring it for the most part.)
20:45:21<monochrom>You are too nice.
20:45:58<dmhouse>ddarius: that's fine, then. We seem to be agreeing that no response is better than a negative response :)
20:46:49<monochrom>If he deleted his "good bye haskell" then I'm inclined to reply "help us" too. In fact why did he say "good bye" only to come back for more? I don't understand. (Or I do, but I only have a conjecture.)
20:47:10<Binkley>well, if he was really just swearing off Haskell he wouldn't have wasted time posting to the mailing list
20:47:13<ddarius>No, my thesis is a "neutral" response may well have been best. About the only thing this thread garners the Haskell community, in my opinion, is a greater perception of friendliness.
20:47:24<Binkley>he posted to the mailing list because he wanted people to know what a newbie's impression of haskell was, because he thought they might care
20:48:03<monochrom>Yeah, "Point taken, good bye" is a neutral response. Actually better than neutral because it acknowledges the problem and his contribution!
20:48:14<ddarius>Binkley: The "newbies" that are actually interested in learning Haskell don't have that impression even in those circumstances.
20:49:10<ddarius>If you can't read documentation or follow simple directions though, you're pretty screwed as a programmer in general, and certainly as a Haskell programmer currently.
20:49:10<Binkley>well, this guy didn't want to learn Haskell
20:49:10<Binkley>he wanted to install an application written in Haskell
20:49:11<monochrom>He just wants to install an ncurse mp3 player. Unless he's lying.
20:49:11<dmhouse>It's not a neutral response at all, it's a response that shows disinterest and no willingness to learn. It's a response that doesn't even point him in the right direction.
20:49:17<Binkley>well, maybe he isn't even a programmer
20:49:19<Binkley>who knows?
20:49:25<Binkley>we want more people using applications written in Haskell, right?
20:49:35<monochrom>Did he want pointed in the right direction? He didn't say.
20:49:40<Binkley>and how many more of them are going to get thrown off by things like this? Sure, you can say they're dumb, but that doesn't help you get more users
20:49:51<monochrom>They are not dumb.
20:49:58<Binkley>I don't think they're dumb either
20:50:12<Binkley>I'm just saying, criticizing people for not reading documentation doesn't accomplish much
20:50:20<Binkley>changing things so the documentation isn't necessary -- when you can -- helps
20:50:28<monochrom>I think our question is: is he whining? what do we do to whiners?
20:50:49<ddarius>dmhouse: He explicitly states that he's saying goodbye to Haskell, furthermore I don't see him deriving significant value from the Haskell community. In my opinion, the right direction for him is away from Haskell.
20:51:08<dmhouse>I think part of the problem is that it's an unexpected hurdle. You think "Great, a nice MP3 player, let's install it. Okay, I need to install GHC first, let's just get that out of the way... great, this is taking longer than I expected, I really can't be bothered to plough through it, I don't even _want_ a Haskell compiler."
20:51:39<Binkley>exactly
20:51:56<monochrom>Perhaps you can argue that "good bye haskell" should not be taken literally, that it's a hyperbole idiom that expresses frustration and nothing more.
20:52:00<dmhouse>E.g. I can remember trying to download software, and being forced to install and figure out how to use TLA/Arch. _That_ was a painful user experience.
20:52:57<monochrom>I do think "yum whatever ghc" is the best advice. Perhaps also add "you don't need the latest 6.6.1, it's just 10 hours old, don't worry about it".
20:52:57<ddarius>dmhouse: Do you dismiss an entire language community because some application does not install right out of the box the way you want?
20:53:19<Binkley>ddarius: does it matter? the point is that some people *will*
20:53:25<Binkley>you can't change how people think, but you can change your build process
20:53:47<ddarius>Binkley: My point is that those people aren't valuable as members of the community.
20:54:16<Binkley>ddarius: well, presumably we want people who aren't part of "the Haskell community" benefitting from Haskell, too
20:54:26<Binkley>if we aren't producing applications that the rest of the world wants and needs, what's the point
20:54:49<ddarius>Binkley: Then he can respond to the hmp3 maintainer, not to the Haskell-cafe
20:54:59<Binkley>but this wasn't the hmp3 maintainer's fault
20:55:14<shapr>ddarius: Tough but Fair is "First, treat others how you would want to be treated, then treat them how they treated you."
20:55:15<ddarius>Then GHC
20:55:23<Binkley>Well, sure
20:55:27<clanehin>No, it's his distribution's job to check dependencies, if you install something from source it's assumed you will read the docs
20:55:33<ddarius>shapr: What I'm suggesting is how I'd want to be treated.
20:55:34<Binkley>lots of people post things on the wrong mailing list, though
20:55:39<Muad_Dibler>Binkley, ddarius, shapr: this whole discussion proves something at least!
20:55:52<shapr>ddarius: Yeah, just describing the strategy. I like studying social strategies.
20:55:56<clanehin>If he would have just used the distro's tools to do it, he could have complained that the distro didn't check dependencies, if it in fact didn't, but it does
20:55:57<dmhouse>ddarius: of course not. I'm not defending his actions. But I do think if the entire community labelled him as a jerk and moved on, people would think differently of Haskell.
20:56:16<dmhouse>clanehin: it was GHC that didn't install, not HMP3.
20:56:28<ddarius>dmhouse: If they -explicitly- did, ok. But, again, that's not what I was suggesting.
20:56:36<shapr>ddarius: One thing I've noticed is that some people come to #haskell and act as they would in #perl or #c. They either change their ways to fit into #haskell, or they leave (or get leaved).
20:57:01<ddarius>ACTION doesn't know how people act in #perl or #c.
20:57:10<clanehin>d,house: I know, and he choose to install it from source instead of using the distribution to do it for him
20:57:30<ddarius>But yes, people who are interested are at least -remotely- open minded.
20:57:37<clanehin>dmhouse: so he's on his own at that point
20:57:43<shapr>ddarius: I joined #perl on EFNet when I only knew VB and asm, and they banned be for asking for an editor with syntax highlighting.
20:57:59<shapr>er "they banned me"
20:58:03<Binkley>shapr: what was their justification?
20:58:06<clanehin>it's like if you drive off-road and then complain there wasn't a sign marking the bumps in the ground
20:58:09<monochrom>Perhaps the generic binary tarball should just be obscured in the first place. Choice is known to be user-unfriendly. If he was forced to get ghc from yum, we wouldn't even hear from him. There is no loss in generality, since those who read the fine prints will locate the obscured generic binary.
20:58:16<dmhouse>Yeah, I think the culture of a community is underestimated when rating languages.
20:58:17<shapr>Binkley: That I was an idiot for asking questions.
20:58:22<Binkley>haha
20:58:25<Binkley>jeez
20:58:30<mauke>probably "asking basic questions"
20:58:32<capisce>dmhouse: why? :)
20:58:38<vali>shapr: i can confirm that. haskell is the friendliest and most helpful language-channel i've been to. the elitist-attitude just doesn't seem to be present here
20:58:40<shapr>Binkley: They said that real programmers don't need colors, and that if I really wanted the solution I could go out and find it myself.
20:58:45<ddarius>capisce: I highly agree with dmhouse.
20:58:52<mauke>EFnet/#perl isn't exactly a language/help channel
20:58:55<ddarius>capisce: Haskell's community is possibly it's -greatest- benefit.
20:58:55<capisce>you're the one who's going to do the programming, not the community
20:59:16<shapr>mauke: Well, what is freenode/#haskell, and why are they so different?
20:59:29<mauke>freenode/#haskell is about the language
20:59:39<shapr>vali: That's good to hear.
20:59:48<ddarius>capisce: Since you're here, you may well have noticed that a) having community support helps a lot and um (b) possibly not...
20:59:56<monochrom>I now need to read everything all of you say. :)
20:59:56<shapr>ACTION laughs
21:00:08<kc5tja>But you can't change the user's build _environment_. My workstation here at Google won't let me install the Haskell X11 module -- I keep getting errors, no matter WHAT I do. But it works fine at home. I spent three days trying (on and off; about 10 to 12 man-hours total). The authors of X11 can't really address that problem.
21:00:41<Binkley>no, but you can at least provide error messages that tell the user what they need to do to fix it --
21:00:45<Binkley>when you *know* that the problem exists
21:00:55<Binkley>the point of that guy posting about libreadline was to point out that a problem exists
21:00:56<kc5tja>But, what I _really_ want is to use GHC for actual projects here. Ahhh....now that would be a dream....
21:01:00<Binkley>of course it's a known issue, but he didn't know that
21:01:41<dmhouse>kc5tja: does no-one use Haskell at Google?
21:01:55<clanehin>Binkley: to be fair, the error message he did get actually did indicate that he was missing libreadline 4.
21:03:10<shapr>capisce: Yeah, but being able to ask people whenever you hit a bump is handy.
21:03:18<Binkley>clanehin: well, his complaint, if I read it correctly, was that the build process told him that installation was successful
21:03:26<Binkley>when in fact it wasn't, because it didn't result in a ghc he could use
21:03:39<capisce>shapr: might be, when I first learnt programming all I had were books :)
21:03:42<Binkley>I would agree with him that the build process should be checking for it
21:04:05<shapr>capisce: Me too, but I've since learned the benefits of a helpful community.
21:04:19<mauke>shapr: how long ago was this/do you remember who banned you?
21:04:42<ddarius>ACTION has never really relied on a community or books for learning/programming. (Well indirectly on the community I guess, that -is- where all the papers and tutorials and such come from.)
21:04:48<capisce>shapr: that's cool, I'm just reading The Haskell School of Expression now
21:04:58<capisce>shapr: haven't tried coding anything yet :)
21:05:11<shapr>capisce: For most problems I just spend another half hour figuring it out, but after that, it's time to ask somebody.
21:05:26<monochrom>#perl being elitist and Perl being popular. This is interesting.
21:05:46<SamB_XP>mauke: so if it isn't about perl, what is it about?
21:05:47<kc5tja>dmhouse: Apparently there is one other known person who uses it, but no Google project that I'm aware of uses Haskell.
21:05:56<shapr>mauke: It was probably 1992 or so. I ended up learning Python and never got back to learning Perl.
21:06:10<mauke>ah, before my time
21:06:28<kc5tja>ACTION was thinking of purchasing Haskell School of Expression; however, I ended up getting SICP instead.
21:06:28<capisce>shapr: I guess I'm conditioned into banging my head against a problem until I figure it out for myself
21:06:38<kc5tja>ACTION is still pondering on getting HSE though...
21:06:39<mauke>SamB_XP: it's more or less a social channel for a certain group of people, that also happen to know perl
21:06:40<capisce>kc5tja: that's on my list of books to read :)
21:06:51<SamB_XP>mauke: how is that different from #haskell ;-)
21:07:02<mauke>#haskell actually talks about haskell
21:07:04<Binkley>capisce: I'm conditioned that way too, and I've wasted a lot of time that way :-)
21:07:11<monochrom>social channel is #haskell-blah :)
21:07:15<SamB_XP>on occasion, yes
21:07:20<capisce>one question, is it worth reading The Haskell Road To Logic after first having read The Haskell School of Expression?
21:07:20<mauke>oh, and there is no haskelldoc :-)
21:07:35<capisce>will it still be valuable and give new insights? :)
21:07:40<SamB_XP>mauke: sometimes one wonders what to type after foodoc
21:07:52<SamB_XP>like, can you type perldoc $?
21:08:24<mauke>SamB_XP: you start with 'foodoc foodoc' then proceed with 'foodoc foo'
21:08:25<osfameron>SamB_XP: annoyingly, no
21:08:27<capisce>are there any more in-depth Haskell books that delve into more advanced subjects?
21:08:28<kc5tja>dmhouse: From what I understand, we do tend to use Python or Scheme for RAD purposes, but once a proof of concept appears, it gets re-implemented in Java, C++, etc., depending on performance requirements.
21:08:29<monochrom>I have read HSE and lots of other stuff, but not Road To Logic. I guess that means I don't need the latter.
21:08:33<osfameron>though you can do perldoc -q faq_topic
21:08:37<osfameron>or perldoc -f function_name
21:08:42<SamB_XP>and I wasn't talking about $?, I was talking about $
21:09:01<mauke>SamB_XP: and what is that supposed to do?
21:09:15<osfameron>and you should be able to do perldoc -x any_indexed_term on newer perldoc, though I think that's waiting for me to release a patched version... d'oh...
21:09:19<monochrom>The haskell wikibook delves into advanced subjects. Not complete, but see if it has what you want. http://en.wikibooks.org/wiki/Haskell
21:09:21<lambdabot>Title: Haskell - Wikibooks, collection of open-content textbooks
21:09:22<SamB_XP>mauke: tell me why there are $ signs everywhere
21:09:35<SamB_XP>and give me documentation about scalars
21:09:45<dmhouse>kc5tja: cool. Well, go champion Haskell! :)
21:10:07<capisce>monochrom: ah, interesting, thank you
21:10:26<SamB_XP>of course, I'd have to type it like "perldoc '$'" or somesuch
21:10:27<emu>was somebody talking about difficulty installing the X11 package?
21:10:29<osfameron>kc5tja: I recommend HSoE, it's written well and has good exercises, and teaches you something interesting
21:10:44<mauke>SamB_XP: "scalars" is not enough. $ is also part of the syntax for accessing arrays and hashes, and a regex metacharacter
21:10:49<monochrom>I offer to bring an elitist perspective to the haskell community. It balances things out. It is unhealthy to be too sweet.
21:10:53<dmhouse>And if there's something in the Wikibook that you want to see, request it! Or better, write it yourself!
21:11:03<mauke>and the name of the built-in pid variable
21:11:03<SamB_XP>mauke: well I suppose it would talk about all of that except the regex stuff
21:11:05<yrlnry>#perl can be helpful sometimes. It depends a lot on who happens to be there.
21:11:22<osfameron>SamB_XP: it would be "perldox -X $"
21:11:26<SamB_XP>yrlnry: reminds me of ##c
21:11:26<yrlnry>Take out two helpful people and replace them with two pricks and the whol;e character of the channel changes.
21:11:26<mauke>still, EFnet/#perlhelp and freenode/#perl are usually a lot better
21:11:27<osfameron>SamB_XP: but that doesn't have anything useful in it yet.
21:11:30<monochrom>I'm procrastinating contributing to the advanced, no-one-will-ever-read parts of the wikibook, e.g., program derivation!
21:11:40<SamB_XP>osfameron: oh.
21:11:41<dmhouse>yrlnry: and how you ask your question, I imagine.
21:11:50<yrlnry>samb_xp: really? I have not found ##c to be anything other than a bunch of pricks.
21:11:55<integral>And if your name is recognised.
21:11:59<kc5tja>dmhouse: I'd love to.
21:12:05<yrlnry>dmhouse: i think it depends on that a lot less than you might expect.
21:12:12<SamB_XP>osfameron: would "perldoc perldoc" make it clear how to look up syntactical stuff?
21:12:17<dmhouse>Part of the way to improve your user experience is to learn how to not be a prick yourself.
21:12:34<ddarius>ACTION wonders what helpful person he has replaced...
21:12:42<kc5tja>osfameron: Yeah, I just finished SICP, and I really wish I had this book when I was growing up. :)
21:12:44<mauke>SamB_XP: it contains "If you are looking for a table of contents to the Perl library modules documentation, see the perltoc page."
21:12:52<kc5tja>osfameron: I'll wait until next paycheck to purchase HSoE though.
21:12:56<dmhouse>yrlnry: well, I find that if you ask a reasonable question in a reasonable manner and respond reasonably to any advice offered, you'll get on with most people in most channels.
21:12:58<SamB_XP>yrlnry: well, I guess nobody has felt helpful lately
21:13:15<Binkley>the trick is figuring out what "reasonable" means :-)
21:13:24<SamB_XP>yrlnry: also most of the time people ask really stupid questions in ##c
21:13:29<osfameron>SamB_XP: er, don't think so. Feel free to send patches! (the -X one isn't yet on CPAN, I'm supposed to apply it and release, but I, er, couldn't find tuits)
21:13:46<SamB_XP>osfameron: I have plenty of square ones
21:14:00<dmhouse>yrlnry: "People are basically good."
21:14:13<kc5tja>dmhouse: I was kickbanned from #debian once for asking a question, and yes I've already RTFMed and stated so. How's that for getting on well? :) In fact, that's one reason why I stopped using Debian all-together. I just didn't want to be associated with that kind of crowd.
21:14:45<osfameron>SamB_XP: right now, your best bet is "perldoc perldoc", "perldoc perltoc" and then read lots of stuff, especially perlop and perlfunc, also perlsub... but yeah, until the indexing stuff gets off the ground, it can be a bit annoying to remember where to look for stuff
21:14:51<yrlnry>I once got kickbanned from #unix for asking what the name of the table is in the kernel that maps the file descriptor number to the file pointer.
21:15:04<hyrax42>?src Data.Map.unions
21:15:04<lambdabot>Source not found. My pet ferret can type better than you!
21:15:15<osfameron>kc5tja: it's worth it, I think. I still need to read SICP too...
21:15:18<Binkley>the table that can be named is not the true table
21:15:20<yrlnry>Oh, and for contracdicting someone when he informed me that I was trying to get them to do my homework for me.
21:15:20<SamB_XP>yrlnry: you'd think they'd be helpful enough to answer "file descriptor table"...
21:15:26<hyrax42>:t M.unions
21:15:29<lambdabot>forall k a. (Ord k) => [M.Map k a] -> M.Map k a
21:15:36<integral>yrlnry: Those would be "FILE *"s?
21:15:36<hyrax42>?src M.unions
21:15:37<lambdabot>Source not found. Sorry about this, I know it's a bit silly.
21:15:41<kc5tja>yrlnry: Heheh -- that'd be the handle table. But that's pretty silly though. I hate it when people do things like that that take more energy to kickban you than to just answer the damn question. :)
21:15:46<SamB_XP>integral: ints
21:16:04<kc5tja>integral: Nope.
21:16:12<kc5tja>FILE *s are c structures that reside in user-space.
21:16:18<integral>kc5tja: Yes, I know that.
21:16:28<hyrax42>?fptools Data.Map
21:16:28<lambdabot>http://darcs.haskell.org/packages/base/Data/Map.hs
21:16:29<monochrom>ACTION bans integral for a mistake :)
21:16:29<kc5tja>Within the FILE structure, there is an int which refers to the Unix file descriptor -- I think he was asking about that descriptor mapping.
21:16:36<kc5tja>Hahaha
21:16:41<integral>I was just pointing out that you could misread yrlnry's line.
21:16:46<kc5tja># /kickban integral n00b! ;D
21:16:53<kc5tja>ACTION nods
21:16:58<yrlnry>kc5tja: I nursed the grudge for a long time until the same guy showed up in #perl and then I accused him of trying to get us to do his homework for him and booted him. It was petty, but satisfying.
21:16:59<monochrom>ACTION bans yrlnry for being ambiguous
21:17:01<SamB_XP>and the kernel has a some kind of table indexed by fd
21:17:04<SamB_XP>for each process
21:17:04<integral>I walked into that one though
21:17:08<osfameron>is this the #haskell for perlers channel? oh, no, it's the proper one!
21:17:12<yrlnry>integral: No, not the FILE *
21:17:18<osfameron>ACTION band monochrom for banning too many people
21:17:24<yrlnry>integral: No, not the FILE *'s; the internal kernel file pointer objects that contain the seek offsets.
21:17:31<integral>yrlnry: I guessed that.
21:17:32<monochrom>ACTION bans osfameron for typo!
21:17:33<SamB_XP>osfameron: you confused with #perl6?
21:17:38<kc5tja>yrlnry: YYESS!! That's awesome. Revenge is a dish best served cold. Of course, now there's a cold war between you.
21:17:40<dmhouse>Enough banning. :)
21:17:44<yrlnry>who cares?
21:17:47<kc5tja>That's the problem with revenge.
21:17:48<integral>there's a #haskell on irc.perl.org too, osfameron
21:17:51<osfameron>SamB_XP: no, there's a #haskell on rhizomatic too ;-)
21:17:59<kc5tja>It's great to see other people do it, but I sure don't want to be involved. ;D
21:18:00<SamB_XP>oh. whatever that be!
21:18:02<osfameron>integral: yeah, I'm on that one too. It's quite quiet compared to this one
21:18:13<integral>I meant to kc5tja not osfameron clearly :-)
21:18:17<SamB_XP>this one is quite noisy lately
21:18:20<integral>no, SamB_XP I meant.
21:18:32<osfameron>integral: make up your mind ;-)
21:18:42<integral>ACTION points into the crowd randomly
21:18:55<monochrom>integral means me
21:19:01<dmhouse>ACTION really doesn't know how to work ERC properly yet, it took me 3 minutes to find that command :)
21:19:11<monochrom>ERC = ?
21:19:18<kc5tja>Emacs Relay Client
21:19:21<dmhouse>An IRC client built into Emacs.
21:19:28<monochrom>It's antique.
21:19:33<dmhouse>It's convenient.
21:19:39<osfameron>so is irssi
21:19:41<kc5tja>It's little.
21:19:43<SamB_XP>I hope we don't try that silly thing where you randomly split the people joining into two different channels
21:19:54<kc5tja>ACTION uses irssi -- I'm quite pleased with it.
21:20:06<cdsmith>kc5tja: is that little by emacs standards?
21:20:08<Muad_Dibler>I use mIRC.
21:20:10<dmhouse>ACTION used to, but a client running within the editor is just More Convenient.
21:20:26<Muad_Dibler>ACTION waits for flaming.
21:20:27<kc5tja>cdsmith: No, it was a fishing hook to get someone else to post, "It's yellow." Then I'd follow up with, "It's different." :D
21:20:43<cdsmith>kc5tja: ah!
21:22:26<ddarius>Muad_Dibler: Wrong channel.
21:23:09<monochrom>wrong channel to get flamed
21:23:34<Binkley><obflame>mIRC? YOU N00B</obflame>
21:23:46<Muad_Dibler>thank you Binkley :)
21:23:53<Binkley>happy to oblige ;-)
21:27:27<vali>is there no windows binary for 6.6.1 yet?
21:29:22<Philippa>Binkley: it's not quite as crappy these days, though my only real excuse is that I lost the code for my own client and never got started on rewriting it...
21:29:45<Binkley>I don't really have strong feelings about it
21:30:19<Philippa>there're some annoying bits of IRC culture it's somewhat more responsible for than most
21:30:21<Binkley>I just wanted to make sure Muad_Dibler got the expected flame :-)
21:32:30<monochrom>My ghc 6.6.1 build has finished! Just two hours. I use -H80m -O -fasm
21:32:36<shapr>@seen capisce
21:32:36<lambdabot>I saw capisce leaving #haskell 17m 57s ago, and .
21:32:39<shapr>aww
21:32:41<shapr>I missed him.
21:33:01<monochrom>-H80m may be more than necessary. I was just trying. Last time I tried 64, should be good enough.
21:33:13<monochrom>But I now strongly believe in -fasm.
21:33:25<shapr>@tell capisce Yes, the Haskell Road To Maths and Logic is worth reading separately from HSoE and The Craft of Functional Programming
21:33:26<lambdabot>Consider it noted.
21:34:21<monochrom>shapr: could you tell me why? thanks.
21:35:01<shapr>ddarius: Anyway, I think it's good to be welcoming at first because the irritating may not know any other way to behave in a technical discussion. But if they are unable to learn how to fit into the new community even after explicit descriptions of how to behave, then they should be removed.
21:35:27<shapr>For example, Smerdyakov is doing good things in the field of proof programming, but I still don't want him in #haskell.
21:36:16<araujo>ACTION still trying to explain the "IO monad isn't an impure computation ..."
21:36:56<kc5tja>OK, I've been browsing about for a while, but not able to find a definitive answer to this question. Given func v | v == 0 = blah; | v == 1 = blort; | _ = everythingElse, Haskell really doesn't seem to like this construct. It complains about the _ clause. Is there a way to match an "everything else" clause when using this kind of pattern-matching?
21:36:58<shapr>araujo: I explain the state monad in terms of a calculator with a Memory button. It's usually clear how that can be both 'stateful' and pure at the same time.
21:37:10<bos>is there a standard way to name variants of functions that do and don't handle exceptions?
21:37:20<araujo>shapr, elaborate? :-)
21:37:30<Binkley>kc5tja: why not write _ = everythingElse for your default case?
21:37:32<Binkley>omitting the |
21:37:40<shapr>monochrom, araujo: phone, will respond later
21:37:51<araujo>shapr, good
21:37:54<mauke>kc5tja: that's because the syntax requires a (boolean) expression after |
21:38:06<mauke>kc5tja: _ is not valid in an expression. trivial workaround: | True = ...
21:38:08<gds>kc5tja: you want "otherwise" iirc
21:38:22<mauke>the prelude contains otherwise :: Bool; otherwise = True
21:38:23<kc5tja>mauke: Hmmm, OK. I was just wondering.
21:38:26<kc5tja>gds: Thanks.
21:38:31<kc5tja>ACTION tries it.
21:38:50<mauke>> if otherwise then 2 else 3
21:38:51<lambdabot> 2
21:39:18<gds>ACTION nips in with the keyword "otherwise" while mauke explains why it makes sense ;)
21:39:29<mauke>it's not a keyword
21:39:35<mauke>it's just a variable
21:39:39<monochrom>> case 10 of v | v==0 = 0 | v==1 = 1 | otherwise = v
21:39:39<lambdabot> Parse error
21:39:43<gds>Sorry, I meant in the conversational sense...
21:39:51<monochrom>> case 10 of v | v==0 = 0; | v==1 = 1; | otherwise = v
21:39:51<lambdabot> Parse error
21:40:00<mauke>> case 10 of v | v==0 -> 0 | v==1 -> 1 | otherwise -> v
21:40:01<lambdabot> 10
21:40:18<monochrom>OH!
21:40:30<mauke>> case 10of v|v==0->0|v==1->1|otherwise->v
21:40:31<lambdabot> 10
21:40:40<mauke>wow, perl's got nothing on this
21:42:21<kaol>> case 10of v|v==0->0|v==1->1|True->v
21:42:22<lambdabot> 10
21:42:35<kc5tja>> otherwise
21:42:36<lambdabot> True
21:42:49<SamB_XP>> 10
21:42:50<lambdabot> 10
21:42:57<mauke>OPTOMIZED
21:43:22<kc5tja>> if if then then else else
21:43:22<lambdabot> Parse error
21:43:33<kc5tja>doh, can't grok PL/I. Shucky darn. :)
21:44:03<yrlnry>I wonder if "if then then else else if" is more confusing.
21:44:15<yrlnry>"if else then if else then"
21:44:22<yrlnry>Ah, that's best.
21:44:38<yrlnry>ACTION is deeply satisfied.
21:44:45<mauke>oh god, I had a parser for that once
21:45:04<mauke>it just failed to check variables for keywordness
21:45:13<kaol>> if if True then True else False then True else False
21:45:15<lambdabot> True
21:46:11<mauke>> if not if otherwise then not True else otherwise then True else not otherwise
21:46:12<lambdabot> Parse error
21:46:15<mauke>:(
21:47:02<mauke>> if not$ if otherwise then not True else otherwise then True else not otherwise
21:47:03<lambdabot> True
21:50:48<kc5tja>Hehehe
21:51:00<hyrax42>?docs Data.Map
21:51:01<lambdabot>http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Map.html
21:56:17<hyrax42>?pl \x -> f (g x) (h x)
21:56:17<lambdabot>liftM2 f g h
22:11:34<hyrax42>?src foldl'
22:11:35<lambdabot>foldl' f a [] = a
22:11:35<lambdabot>foldl' f a (x:xs) = let a' = f a x in a' `seq` foldl' f a' xs
22:13:05<sorear>@seen davidL
22:13:06<lambdabot>davidL is in #xmonad and #haskell. I last heard davidL speak 24m 14s ago.
22:13:17<davidL>hey
22:13:26<sorear>hi?
22:13:40<davidL>(it's fantasma)
22:13:50<sorear>it = ?
22:14:04<davidL>me
22:14:18<davidL>I'm fantasma
22:14:24<ddarius>@seen fantasma
22:14:25<lambdabot>I saw fantasma leaving #haskell, #ghc, #darcs and #xmonad 46m 43s ago, and .
22:15:01<newsham>http://www.cs.ubc.ca/labs/dsg/Sem_Winter_2007/2007-eurosys-melange.pdf
22:15:03<lambdabot>http://tinyurl.com/26qxbv
22:15:05<sorear>ddarius: no, you're not. had I been awake at the time I would have responded "Haskell won't miss you. We don't need people who are too dumb to read requirements lists.". fortunately, I wasn't.
22:15:44<monochrom>Please give me a debugger that is not there yet! :)
22:16:47<ddarius>sorear: I know what discussion you are replying to, but not which line I said that you are.
22:17:04<ddarius>:t show . read
22:17:07<lambdabot>String -> String
22:17:47<ddarius>Oh. The first line.
22:18:59<sjanssen>sorear: referring to the "Poor first impression" email?
22:20:14<sorear>sjanssen: 13:35:56 <ddarius> Am I the only person in the Haskell community who doesn't really give a fuck about people who can't follow simple directions and doesn't really think they should be coddled?
22:20:27<sorear>indirectly, yes.
22:21:02<sjanssen>heh, "fuck" is easy to grep for in #haskell
22:21:28<sorear>that's how I re-found it when ddarius asked ;)
22:21:33<ddarius>newsham: Unfortunately, for good and bad reasons, the obvious trend arising from work like that will not be acknowledged (though clearly stated) for quite some time despite undeniable advantages in every way.
22:22:11<ddarius>ACTION wonders how many lines of his contain "fuck". Even discounting this line, it should be more than one.
22:24:08<sorear>ddarius: in the entire history of clog's #haskell logging, exactly three lines match ddarius.*fuck
22:24:34<sjanssen>I suppose this makes four?
22:24:53<sorear>sjanssen: yeah. ddarius sorear ddarius sorear
22:24:59<ddarius>Well, there's also darius.
22:25:03<ddarius>Well, Darius
22:25:19<sorear>03.04.25:09:11:35 <vincenz> Darius: I don't know, I think with c you can do some major fucked up shit
22:25:19<sorear>03.11.21:00:40:48 --- quit: Darius ("And I'll bu--rn like a Roman fucking candle")
22:25:19<sorear>04.12.14:17:15:45 <Darius> Philippa: brainfuck isn't that bad.
22:25:19<sorear>04.12.14:17:16:44 <Darius> Philippa: Heck, ML has worse syntax than brainfuck.
22:25:39<sorear>so, only your /quit message :)
22:25:56<sjanssen>mdo n <- countLines "ddarius.*fuck"; putStrLn $ show n ++ "times ddarius.*fuck"
22:26:01<Saizan>that last 2 lines should be @remembered
22:26:36<Saizan>?instances MonadFix
22:26:44<lambdabot>((->) r), Either e, ErrorT e m, IO, Maybe, RWS r w s, RWST r w s m, Reader r, ReaderT r m, ST s, State s, StateT s m, Writer w, WriterT w m, []
22:26:48<kc5tja>ML isn't the prettiest syntax, but it's far better than BF, I think.
22:27:14<sorear>@seen jcreigh
22:27:14<lambdabot>jcreigh is in #xmonad, #haskell-blah and #haskell. I last heard jcreigh speak 2h 50m 7s ago.
22:28:17<ddarius>kc5tja: The weak semantics of Brainfuck are what makes it "ugly" not so much the syntax.
22:29:17<sorear>hello dcoutts!
22:29:25<dcoutts>hia sorear
22:29:25<lambdabot>dcoutts: You have 1 new message. '/msg lambdabot @messages' to read it.
22:33:24<davidL>how do I do something along the lines of ``takeWhile (\x -> notElem x) list''
22:34:31<monochrom>takeWhile notElem list
22:34:35<Saizan>is it normal that make install resembles a ./configure when building ghc?
22:34:57<davidL>monochrom: notElem has two parameters though
22:34:58<monochrom>perhaps you mean takeWhile (`notElem` "abc") list
22:35:24<davidL>monochrom: I want to to notElem x <list that has already been processed>
22:35:44<davidL>basically, it would takeWhile until there is an element that repeats
22:36:49<monochrom>ACTION has an evil idea
22:37:56<kc5tja>ddarius: We're just going to have to agree to disagree on this issue. BF is so-named for a reason. :)
22:37:59<monochrom>ACTION 's idea clearly diverges
22:38:50<sorear>Saizan: yes, the configure is rerun because the results are not cached.
22:39:18<ddarius>> takeWhile (null . tail) . group $ "abcddefggh"
22:39:22<sorear>Saizan: keep in mind the ghc build system is in serious flux - it was only moved to cabal 2 weeks ago
22:39:22<lambdabot> ["a","b","c"]
22:39:31<ddarius>> concat . takeWhile (null . tail) . group $ "abcddefggh"
22:39:32<lambdabot> "abc"
22:39:57<dolio>> concat . takeWhile (null . tail) . group $ "abcbdbebfbgb"
22:39:59<lambdabot> "abcbdbebfbgb"
22:40:42<ddarius>foldM ho!
22:41:12<monochrom>ACTION has an inefficient idea
22:41:24<procyon112>> let f x:y:z | x==y = x; f x:y:z = x : (f (y:z)); f x = [x]; f [] = [] in f "abcdeffgh"
22:41:24<lambdabot> Parse error in pattern
22:41:30<kc5tja>monochrome has a cunning plan...
22:41:41<ddarius>Or unfoldr.
22:43:21<ddarius>ACTION decides to eat ice cream and watch movies.
22:47:11<dolio>> let f (_, []) = Nothing ; f (s, h:t) | h `elem` s = Nothing | otherwise = Just (h, (insert h s, t)) in unfoldr f ([], "abdbdbebfbgb")
22:47:12<lambdabot> "abd"
22:47:44<monochrom>yeah, I like that.
22:49:00<Saizan>?type insert
22:49:02<lambdabot>forall a. (Ord a) => a -> [a] -> [a]
22:49:26<Saizan>?type elem
22:49:28<lambdabot>forall a. (Eq a) => a -> [a] -> Bool
22:50:09<Saizan>mmh, so insert just waste cpu cycles?
22:50:35<dolio>That could just be h:s. I was thinking Data.Set at first, but then I didn't want to type extra stuff.
22:50:40<Saizan>this is a work for Data.Set
22:50:44<Saizan>:D
22:50:49<Saizan>fine :)
22:54:41<sorear>Saizan: don't trust @src, it as a very curious mixture of
22:55:05<sorear>a) specification pseudo-psuedo-code from the Report, not actually used by any compiler
22:55:07<sorear>@src sort
22:55:08<lambdabot>sort = sortBy compare
22:55:12<sorear>@src sortBy
22:55:12<lambdabot>sortBy cmp = foldr (insertBy cmp) []
22:55:29<sorear>b) ultra-evil ghc magic that users oughtn't see
22:55:35<sorear>@src unsafePerformIO
22:55:35<lambdabot>unsafePerformIO (IO m) = lazy (case m realWorld# of (# _, r #) -> r)
22:55:47<opqdonut>@src insertBy
22:55:48<lambdabot>insertBy _ x [] = [x]
22:55:48<lambdabot>insertBy cmp x ys@(y:ys') = case cmp x y of
22:55:48<lambdabot> GT -> y : insertBy cmp x ys'
22:55:48<lambdabot> _ -> x : ys
22:56:55<monochrom>This is great. :)
23:05:52<dolio>> let test c = uncurry (||) `liftM` gets (second $ elem c) >>= \b -> modify (const b *** (c:)) >> return b ; f s c = test c >>= \b -> if b then return s else return (c:s) in reverse . flip evalState (False, []) $ foldM f [] "abcbdbeb" -- Yuck
23:05:54<lambdabot> "abc"
23:06:49<ehird10>i still think "foldM = fix (flip flip tail . ((flip . (ap .)) .) . flip flip head . ((flip . ((.) .)) .) . liftM2 flip ((flip . (((.) . (>>=)) .)) .) . (flip .))" is the best thing lambdabot has ever said
23:07:18<opqdonut>?pl foldM
23:07:19<lambdabot>foldM
23:07:20<ehird10>... and then "foldM = fix (\ aw f i -> (\ w -> ((\ ao cp ai aj am -> (ao cp aj) >>= (ai am)) >>= \ aa -> (\ cv ar as -> aw cv as ar) >>= \ z -> return (\ ag -> aa ag z)) f i (head w)) >>= \ bn -> tail >>= \ bm -> (return (bn bm))" the other way through
23:07:34<ehird10>> (return (bn bm))" the other way throug (that got chopped off...)
23:07:34<lambdabot> Improperly terminated string
23:07:36<opqdonut>how did you get that out?-D
23:07:44<dolio>I don't know, that doesn't have any (,) in there to get confused with (.)
23:07:46<ehird10>opqdonut: @src foldM, @pl the-source, @unpl the-result
23:07:54<opqdonut>haha
23:07:59<opqdonut>@src foldM
23:07:59<lambdabot>foldM _ a [] = return a
23:08:00<lambdabot>foldM f a (x:xs) = f a x >>= \fax -> foldM f fax xs
23:08:07<ehird10>just the second line
23:08:12<opqdonut>@pl f a x >>= \fax -> foldM f fax xs
23:08:12<lambdabot>flip (foldM f) xs =<< f a x
23:08:21<ehird10>no:
23:08:22<ehird10>@pl foldM f a (x:xs) = f a x >>= \fax -> foldM f fax xs
23:08:23<lambdabot>foldM = fix (flip flip tail . ((flip . (ap .)) .) . flip flip head . ((flip . ((.) .)) .) . liftM2 flip ((flip . (((.) . (>>=)) .)) .) . (flip .))
23:08:37<opqdonut>ah yes
23:30:01<TomMD>@seen lambdabot
23:30:01<lambdabot>Yes, I'm here. I'm in #haskell, #xmonad, #parrot, #scannedinavian, #jtiger, #perl6, #oasis, #darcs, #ghc, #gentoo-uy, #gentoo-haskell, #haskell-soc, #haskell.dut, #haskell.hac07, #haskell-overflow
23:30:02<lambdabot>and #haskell-blah
23:30:53<ehird10>> "\n@seen lambdabot"
23:30:53<pjd>do androids look in electric mirrors?
23:30:54<lambdabot> "\n@seen lambdabot"
23:30:56<ehird10>aww
23:44:54<davidL>@pl x -> f . f . f . f . f . f . f . x
23:44:55<lambdabot>(line 1, column 3):
23:44:55<lambdabot>unexpected ">" or "-"
23:44:55<lambdabot>expecting variable, "(", operator or end of input
23:45:08<davidL>@pl \x -> f . f . f . f . f . f . f . x
23:45:08<lambdabot>((f . f . f . f . f . f . f) .)
23:46:28<opqdonut>:t iterate
23:46:30<lambdabot>forall a. (a -> a) -> a -> [a]
23:46:50<opqdonut>> (iterate (+1) 0)!!10
23:46:51<lambdabot> 10
23:46:55<opqdonut>:)
23:46:58<davidL>?index unfoldr
23:46:59<lambdabot>Data.List
23:59:30<hpaste> jcreigh pasted "FFI question: Cleaner way to free resources?" at http://hpaste.org/1601

Back to channel and daily index: content-negotiated html turtle