00:00:00 --- log: started haskell/02.02.27 00:07:38 --- join: yesno (balaza@ruzin.fei.tuke.sk) joined #haskell 00:08:23 hi 00:14:35 --- quit: yesno ("byr") 00:32:33 --- quit: Igloo (carter.openprojects.net irc.openprojects.net) 00:35:26 --- join: Igloo (~igloo@c93.keble.ox.ac.uk) joined #haskell 00:39:29 --- nick: smklsmkl -> smkl 00:53:24 --- join: Yurik (~yrashk@gw.telcos.net.ua) joined #haskell 01:37:17 --- join: shapr (~user@195.156.199.166) joined #haskell 01:56:00 --- quit: shapr ("bbl") 02:14:56 --- quit: cuelebre ("adios") 02:24:21 --- join: cuelebre (~cuelebre@212.85.32.125) joined #haskell 02:46:02 --- quit: cuelebre (Remote closed the connection) 03:14:43 --- join: cuelebre (~cuelebre@212.85.32.125) joined #haskell 09:15:37 --- quit: Yurik ("reboot") 09:31:22 --- join: smklsmkl (~sami@glubimox.yok.utu.fi) joined #haskell 09:32:39 --- quit: smkl (Read error: 104 (Connection reset by peer)) 09:35:54 --- nick: smklsmkl -> smkl 12:52:04 --- join: Grimace (~grim@dsl-212-23-14-41.zen.co.uk) joined #haskell 12:52:21 * Grimace waves 12:58:13 'lo 16:13:00 Hahaha, we have to use this functional programming library for C++ in my PL class (as an experiment, we're writing the same code in scheme and C++). 16:13:12 And the library's interface looks a lot like the standard prelude. 16:13:24 In terms of functions available and their names. 16:13:32 Though maybe al ot of this is standard across a lot of FPLs. 16:13:53 Oh, just saw this on the page: The FC++ library is based on Haskell, and includes many of the functions defined as part of the Haskell Standard Prelude defined in the Haskell 98 Report. 16:13:58 That would explain it. :P 17:28:54 Dearie me, ST monads are *still* hurting my head 17:31:03 I need a good practical example of an ST monad (or monads) being defined and used in an application 17:46:28 Grimace: Did you read the paper "Comprehending Monads"? 17:46:45 It gives a few examples of ST monads (and more). 17:51:11 heh, aye, and I'm fine with it up 'til page 3 17:51:47 where it really heads off into more abstract territories 17:52:00 and I lose it ;) 17:53:01 but that's really more about the theory than the practice 17:54:37 Skip ahead to the examples, then. :P 17:58:22 examples? ;) I think I've got a different paper...! 18:00:33 aha, this other wadler paper's a bit more like it 18:27:28 --- join: zorb (jay@ppp-208-188-40-210.dialup.eulstx.swbell.net) joined #haskell 18:32:22 Grimace (as I scan through the logs) I see you want documentation for specifically the ST monad (not just any state monad). May I suggest you read "State in Haskell" by John Launchbury and Simon P. Jones? 18:33:14 --- join: Cerebrum (x@200.214.221.10) joined #haskell 18:33:38 Hello 18:33:46 whats up? 18:34:05 what need's to be reduced to WHNF? 18:34:08 (eh.) 18:34:19 nevermind. 18:34:35 I think up of really goofy jokes sometimes. 18:35:46 (goofy jokes that don't necessarily make any sense :-) 18:35:55 ah. 18:36:09 hehe 18:36:17 sorry, Im talking at the Ocaml channel now... 18:36:26 do you want to join us there(just 2 speaking there) 18:36:43 sure. not sure I could contribute anything though :) 19:11:00 --- quit: Cerebrum ("bye") 19:13:19 what happened here? before winter olympics this place rocked with conversations! 19:14:52 well, anyway, Have fun ya'll. 19:15:02 --- quit: zorb ("Leaving") 19:47:46 --- quit: Grimace ("Client Exiting") 21:58:46 --- join: dennisb (~dennis@as2-4-3.an.g.bonet.se) joined #haskell 22:58:40 --- join: comatoast (spatOp@dsl-206-55-130-48.tstonramp.com) joined #haskell 23:11:22 is it bad to run algorithms on lists of a that assume that the list is finite? 23:13:36 I wrote for_each_unique_pair in C++, and wondered if I could (with some hair loss; I'm terribly new to haskell) functionalize it some more 23:15:17 sorry? 23:16:02 http://www.cyclooctane.com/~comatoast/files/for_each_uniq_pair <--can you give me some hints on how to haskellize this, without doing it the iterative way? 23:23:32 emmh 23:23:56 don't really know c++ and am a bit busy now 23:24:13 if you have a quickie i could try to answer... 23:24:41 (i didn't understand your original question though) 23:25:07 is it bad to run algorithms on lists of a that assume that the list is finite? 23:25:21 I figured it'd be nice to write a function that'll apply some binary function f to every pair of items in the list 23:25:29 but the way I've done it... 23:25:51 is to do f(1, 2), f(1, 3), f(1, 4)...and so on 23:26:33 this'll come to the end of the list before it's done 23:27:19 so you can write a function that returns a list of all pairs 23:27:57 you mean [f x y | x <- l, y <- l] ? 23:28:06 I can't read that. 23:28:08 :| 23:28:16 hm.... 23:28:22 sounds like it might do the trick... 23:28:58 but you don't want y to span over all l I guess, so something like: 23:28:59 close perhaps. 23:29:01 does it apply (f x y)...hmmm, how are x and y plucked out of l? 23:29:04 unique_pair [] = [] 23:29:05 unique_pair (x:xs) = map ((,) x) xs ++ unique_pair xs 23:29:12 (to create the pairs) 23:30:46 --- quit: Igloo (carter.openprojects.net irc.openprojects.net) 23:32:46 --- join: Igloo (~igloo@c93.keble.ox.ac.uk) joined #haskell 23:48:06 so I have this "module UniqueStuff where " {- stuff I've been given -} ; I can load it into hugs by doubleclicking on the file...but I'm not sure what to do at the UniqueStuff> prompt. how can I test out this pair generator? 23:48:57 you can run the function 23:49:05 unique_pair [1,2,3,4] 23:49:09 ooh! 23:49:44 wow, thanks 23:50:02 and it also works on strings or any other type, it's polymorphic 23:50:18 right, you'd call it a list of 'a, right? 23:50:22 or is that just ocaml? 23:50:25 yes 23:50:31 well, it's ML 23:50:33 yes, that is just ocaml, or.... 23:50:37 it's just a list of a in haskell 23:50:44 [a] 23:51:06 you can ask hugs for the type 23:51:10 :t unique_pair 23:51:27 ...and everyone will be able to guess that a is unbound from the context (if I'm talking to someone else about something) 23:51:39 like T in std::vector 23:51:43 lists are always unbound 23:53:20 so I could copy down that type declaration into my program if I wanted to be anal, right? 23:53:27 yes 23:53:48 it's good for documentation also 23:54:03 and to catch strupid bugs 23:54:30 some people put types on all functions others never put them in 23:54:48 (well, in some cases you may have to give the type) 23:55:01 it'd do me good, at least at first...that way I get used to reading and writing them... 23:55:14 yes, I agree 23:55:16 now isn't unique_pair overloaded? 23:55:24 no 23:55:33 why isn't it? 23:55:51 why should it be? 23:56:00 the way I read it, you've got two definitions, one that takes [a], and one that takes [] 23:56:01 it's polymorphic, it works on any type 23:56:25 Aha, no. It's pattern matching. You could write it with an "if" 23:56:48 if the list is empty you do the first, if it's not empty you do the other 23:57:03 it's just one single function definition 23:57:10 I've seen a match-type construct in ocaml...okay.... 23:57:18 yes, same thing 23:57:29 well 23:57:35 match-type, i don't know 23:57:53 probably not the same thing, but pattern matching is in ml 23:58:21 in haskell you use type classes to do overloading 23:58:39 now, what if I wanted to put another function inside this module? would I need to separate these three unique_pair lines apart from it somehow (other than a \n) 23:59:01 no 23:59:03 just put it in 23:59:14 you don't even need a \n 23:59:20 * comatoast tries to put everything on one line 23:59:29 aha 23:59:39 not on the same line 23:59:42 it screamed 23:59:58 i tought you ment an empty line 23:59:59 --- log: ended haskell/02.02.27