00:00:00 --- log: started haskell/02.01.27 00:02:49 What's up? 00:28:06 --- quit: discobob (Read error: 113 (No route to host)) 00:28:37 nadda 00:28:45 sup with you 00:40:06 Trying to figure out what I should do all night. 00:43:57 hehe 00:44:01 play qbert 00:44:44 or you can help me with this program 00:56:22 What is the program? 01:17:35 this ftp server for windows, its comong along nicely now actualy 02:24:02 --- quit: Yurik (Read error: 113 (No route to host)) 02:28:10 --- quit: qbert ("zzzzz") 02:45:58 * shapr awakens 03:35:16 --- quit: shapr (Remote closed the connection) 03:40:33 --- join: shapr (~user@p-c2fbab34.easy.inet.fi) joined #haskell 04:40:26 w000 04:40:33 * OK www.vialaponie.com IMAP4rev1 v10.234 server ready 04:40:35 how dam!! 04:40:50 ahem 04:40:54 cool. no buffer overflows? :-) 04:40:57 that was sposed to be "hot dam" 04:41:23 just means I've successfully hacked xbill's code into something closer to release quality 04:41:33 ah 04:41:54 I *will* commit Imaplib.hs to haskell-libs cvs tree today. 04:43:22 I'd like to get it hacked such that it's possible to do 'import Imaplib' and then imapConnect hostname login password 04:43:36 hrm 04:43:40 problems somewhere 04:44:34 hi Heffalump 04:44:35 what's up? 04:46:00 hiya 04:46:02 not much 05:17:05 something's wrong... 05:20:18 can't login ... 05:21:29 * Logan considers trying to interface haskell with MySQL. 05:22:03 there's a MySQL lib 05:22:05 for haskell 05:22:11 there's also an ODBC lib 05:24:04 * Logan nods. 05:24:07 Working on installing it now. 05:24:26 * shapr adds debug code to Imap.hs 05:25:11 How do you debug haskell? :P 05:25:19 putstrln so far 05:25:27 lots of 'em 05:25:51 I've tried having the function I'm testing embed debugging information in the value it returns. :P 05:25:58 But that only works well for functions that return strings. 05:26:51 trace can be useful for debugging pure stuff, but the evaluation order can confuse you 05:27:10 what's trace? 05:28:04 import Int? 05:28:07 trace foo exp == exp but, when evaluated, will print foo 05:28:11 (trying to compile H/Direct) 05:28:46 It's something like unsafePerformIO (putStr foo) `seq` exp 05:28:58 oh, interesting 05:29:30 which module has it? 05:29:44 IOExts I think 05:29:50 * shapr checks that out 05:30:01 aha 05:31:41 hrm 05:33:19 is there some way I can figure out which module a function is in? 05:33:28 for example, words only splits at spaces 05:33:42 so I'd like to know what more generic function it builds on 05:34:02 it's in the Prelude 05:34:09 but that's not a good general solution 05:34:26 grep for it? 05:35:18 Yeah, I'd love a good general split function. 05:36:30 Just pass it a function that eats delimiters from the head of a list. 05:36:47 If one doesn't already exist, it'd be trivial to write. 05:37:00 looks like it's hard coded into the definition of words 05:38:04 wordDelimEat xs(x:xs') = if Char.isSpace x then wordDelimEat xs' else xs or something like that. 05:38:27 words = split wordDelimEat 05:39:06 Hmm, I guess you need a function for taking the head up to a delimiter as well. 05:39:27 I think I'll write this just for the fun of it. :P 05:40:59 hrm, where did you find split? 05:41:28 I didn't, I'm making it up. :P 05:41:31 oh! 05:41:33 Let me write it real quick. 05:41:57 it should be something like the opposite of intersperse 05:41:59 well, kind of 05:42:46 actually, no 05:43:32 ya know, I think unfoldr might be able to do that 05:43:44 Hmm, let me look at it. 05:44:29 foldr1 (++ " " ++) ["a","b","c"] 05:44:33 is that sane looking? 05:44:41 er 05:44:43 yes 05:44:51 It is? 05:44:52 well, not sure if the bit inside brackets will parse 05:44:54 so can I unfoldr that? 05:44:57 but the overall idea is 05:44:59 umm 05:45:14 Why not (" " ++) ? 05:45:24 Oh. 05:45:30 it barfs 05:45:34 I'm not thinking. 05:45:35 (\xs ys -> xs ++ " " ++ ys) is safe 05:45:43 ah 05:45:45 Yeah, I was going to suggest that. :P 05:45:51 what's wrong with (++ " " ++) ? 05:46:09 Igloo can probably tell you precisely 05:46:15 obviously foldr1 (++) ["a","b","c"] works 05:46:17 but it doesn't look like valid sectioned operator syntax to me 05:46:23 eh? 05:46:23 It's not valid syntax 05:46:32 (+5) is a sectioned operator 05:46:34 Haskell allows left and right sections 05:46:47 * shapr blinks 05:46:50 * shapr looks up 05:46:53 Not middle sections or whatever you want to call them 05:46:54 that went over my head 05:47:00 oh 05:47:01 oh! 05:47:03 I get it 05:47:44 ok, this does work: 05:47:45 foldr1 (\xs ys -> xs ++ " " ++ ys) ["a","b","c"] 05:47:46 so... 05:47:48 Igloo: aww, I was expecting you to quote the exact bits of the grammar that reject it 05:47:50 can I unfoldr that? 05:47:51 shapr: should do 05:47:56 umm, wdym "unfoldr"? 05:48:05 Heff: No bit of grammar rejects it 05:48:10 List.unfoldr 05:48:11 It's just that nothing accepts it 05:48:19 shapr: errm, look at the type of it 05:48:23 igloo: oh yes, doh 05:48:28 Well, I guess every bit of grammar rejects it. I could paste the whole thing if you'd like :-) 05:48:45 I doubt you could 05:49:03 so.. 05:49:08 when is unfoldr useful? 05:49:11 do you have an example? 05:49:20 shapr: unfoldr does sort of do the reverse of foldr but it's not a direct translation 05:49:24 hm 05:49:30 If you fold with an invertible function? :P 05:49:37 Logan: yeah 05:49:44 roughly 05:49:48 and what qualifies as invertible? 05:49:50 Which I haven't thought about enough to understand what such a thing would be. 05:49:55 right, same here 05:49:55 f' $ f x = x 05:50:00 shapr: something you can write an inverse for :-) 05:50:08 oh 05:50:11 so something like reverse 05:50:19 Or f' . f = id or osmething like that. 05:50:19 shapr: yeah 05:50:26 I'm still shaky on these operators. :P 05:50:35 basically, any function which when applied twice gives you the original input 05:50:38 logan: a bit more complicated than that - look at the Maybe in the type of unfoldr 05:50:47 shapr: roughly, but see what I said about Maybe 05:51:02 logan: f' $ f x = x (for all x) is equivalent to f' . f = id 05:51:26 what you said about Maybe doesn't even maybe make sense to me :) 05:51:29 it's Just Nothing 05:51:37 * shapr makes really bad Haskell jokes 05:51:37 sorry? 05:51:41 aargh :-p 05:53:06 * shapr laughs 05:53:35 seriously though 05:53:42 I don't really understand what you mean 05:53:42 ok, what Logan said about inverses is correct - if f' . f = id then f' is the inverse of f 05:53:53 in otherwise, f' applied to (f x) will always give you x 05:54:07 but f' needs to work on all values that have the correct type 05:54:23 and there might be some values for which there is no possible x 05:54:37 e.g. suppose that f :: Int -> Int 05:54:39 and f x = 2 *x 05:54:53 then 3 isn't f x for any x 05:55:11 but f' 3 still needs to do *something* 05:55:27 so that definition with Maybe means that f' 4 can be Just 2, but f' 3 can be Nothing 05:55:41 prop_id :: a -> a -> Bool 05:55:57 prop_id x = myFunction (myFunction x) 05:56:06 that how you'd say it in QuickCheck I think 05:56:08 you've lost a ' but yeah 05:56:54 * Heffalump puts on a Microsoft t-shirt just to be difficult and goes to drag people shopping 05:57:05 aiee! 05:57:08 not Microsoft! 05:57:30 * Igloo does it before realising words squashes multiple spaces, which will probably make it nicer 05:57:37 But for now shopping 05:58:08 Cool, just wrote an ugly but general split function. :P 05:58:13 I don't like how I did it though. 05:58:13 yay! 05:58:15 I wanna see it 05:58:28 Igloo: you wrote one also? 05:58:30 can I see it? 05:58:47 http://www.loganh.com/haskell/Logan.hs 05:59:17 Basically you provide a function that counts the length of the longest prefix of the given list composed entirely of a "delimiter" (whatever that might be). 05:59:20 > my_words = unfoldr (split ' ') 05:59:20 > split _ "" = Nothing 05:59:20 > split c xs = Just (split_on c xs) 05:59:20 > split_on c [] = ([], []) 05:59:20 > split_on c (x:xs) | c == x = ([], xs) 05:59:22 > | otherwise = (x:ys, zs) 05:59:25 > where (ys, zs) = split_on c xs 05:59:44 split_on looks like a copy of a prelude function 05:59:50 span or something 05:59:57 I thought the Prelude only has a splitAt 06:00:02 Oh, it might be actually 06:00:19 What is the Just for? 06:00:24 It needs a dropWhile to remove the extra cs 06:00:35 Mine is a little more general than Igloo's. :P 06:00:47 unfoldr :: (a -> Maybe (b,a)) -> a -> [b] 06:01:11 Maybe a = Just a | Nothing 06:01:22 Does yours allow prefixes of arbitrary length then? 06:01:26 iglooSplit c xs = split (dropWhile (c ==)) xs (I think) 06:01:58 Oh, wait, that's not how I did it. :P 06:02:06 Have to count how many c's are at the beginning of the string. 06:02:31 iglooSplit c xs = split (length $ takeWhile (c ==)) xs (maybe) 06:02:51 You mean /= 06:02:54 (I assume) 06:03:40 Logan> let iglooSplit c xs = split (\x -> length $ takeWhile (c ==) x) xs 06:03:40 Logan> iglooSplit ' ' " This is a test " 06:03:40 ["This","is","a","test"] 06:04:03 Igloo: I have to take the prefix (rather than drop it) because the same function is responsible for identifying when a word _ends_ as well as begins. 06:04:15 Which is why the function returns a length instead of a new list. 06:06:00 hm, I wonder how I'd test that with QuickCheck 06:06:50 QuickCheck? 06:07:06 http://pragmaticprogrammer.com/cgi-local/pragprog?QuickCheck 06:08:56 When does prop_RevUnit get used? 06:09:19 Hmm... 06:09:36 when you run quickCheck prop_RevUnit 06:09:55 the reason I put in three tests, and demonstrated one of them 06:10:01 is that only two of those tests work 06:10:09 but I wasn't going to make that obvious :) 06:10:12 Oh, I think I see what it's doing. 06:11:36 shapr: The way you'd test this (since it consumes delimiters greedily) is to compare the "joined" list to the original list after extra delimiters in the joined list have been removed. 06:11:51 Or you could just not test its ability to consume extra whitespace at all. 06:11:54 Which makes it easier to test. 06:12:44 Or you could do loganWords x == words x :P 06:14:53 What else should I add to my burgeoning library? :P 06:41:05 Imaplib.hs? ;) 06:44:12 * shapr continues hacking on Imap.hs 06:44:21 hmmm 06:44:49 urf 06:44:56 a real imaplib will be complicated 06:46:27 I haven't looked at the IMAP protocol much. 06:47:28 --- join: oskie (usel@as2-1-6.lh.m.bonet.se) joined #haskell 06:47:34 hello 06:48:37 Hi. 06:48:37 I'm a real beginner with haskell .. I wonder, what's the AND operator in haskell called? 06:48:45 && ? 06:49:16 and operator for true & false I mean .. so true && true yields true? 06:54:07 Yes. 06:54:23 Logan: imaplib.py is 1216 lines 06:54:33 poplib.py is 336 lines 06:54:37 ok that's weird.. is both true and True defined? 06:54:44 I think I'm switching priorities 06:54:54 nope 06:54:56 True is what you want 06:55:01 True is a datatype 06:55:04 true would be a function 06:55:11 hm ok 06:56:41 hi oskie 07:00:03 anyone using hugs here? 07:00:55 I can put something like "t = Eq foo bar" in a file and load it with :load 07:01:10 eh? 07:01:17 but is it possible to, from the command line, add that command to the database? 07:01:50 if I do it from the command line, I get "ERROR - Syntax error in input (unexpected `=')" 07:03:45 How about let t = Eq foo bar? 07:04:27 ah 07:04:54 weird .. now it says ERROR - Syntax error in expression (unexpected end of input) 07:11:48 what are you trying to do? 07:12:03 you want to test if foo and bar are both True? 07:12:35 let t = foo && bar 07:12:54 * shapr goes off to have a finnish lesson 07:31:47 --- join: lodewijk (~lodewijk@voge.xs4all.nl) joined #haskell 07:55:54 --- part: oskie left #haskell 09:45:47 --- quit: lodewijk ("BitchX: faster than a speeding bullet, more powerful than a locomotive") 11:15:57 --- join: atun (~weeee@212-170-171-148.uc.nombres.ttd.es) joined #haskell 11:16:46 hi to all, i'm looking for a text editor to program in haskell (windows). Can anyone help me?? thx. 11:22:24 any text editor will do, use your favorite one, I use emacs (in windows and unix) 11:24:57 hi atun 11:25:00 hi dennisb!! 11:25:05 I haven't seen you in awhile 11:25:08 what's up? 11:25:33 I've been here, but to busy getting to deep into discussions :-) 11:26:09 I seem to spend more and more of my life in irc, that's not a good sign.. 11:26:12 yes, but i would like it to put some colors in my code. I don't remember the one we use at university and i'm using right now windows notepad which is much unconfortable 11:26:22 atun: emacs can do that 11:26:34 thx 11:26:40 i'll look for it 11:26:41 dennisb: yah, same here 11:26:43 So can vim :-) 11:26:49 but I don't mind spending lots of time on irc 11:27:08 atun: if you were using unix at uni, then it was probably emacs you used 11:27:20 no, we use windows 11:27:31 Igloo: yes, and vim is a good editor too 11:27:37 we have a very cool text editor there 11:27:53 * dennisb don't want to get in the middle of an emacs - vim battle 11:28:00 neither do I 11:28:26 hehe 11:28:53 * dennisb _knows_ emacs is best 11:29:05 I should get one of those thinkgeek t-shirts 11:30:21 which one? 11:30:23 the emacs one? 11:30:30 * shapr ducks the flying ice 11:31:00 btw, why choose Igloo ? 11:31:28 For a nick do you mean? 11:31:31 yup 11:31:49 The hiding from teh police one (specifically the one where the hiding people use vim) 11:31:53 IGL are my initials 11:31:57 oh! cool! 11:32:04 mine are sme 11:32:09 so I sometimes sign my email with 'sme 11:32:11 i looked at the haskell page about editor modes, the only thing listed for windows is something for textpad 11:32:13 http://www.haskell.org/libraries/#editormodes 11:32:14 :-) 11:32:33 Why "shapr" then? 11:32:41 that's actually short for synethesist 11:33:03 but i'm sure there would be more editors in windows where you can load som haskell-mode 11:33:04 Shae is short for shapr 11:33:05 ;) 11:33:10 seriously 11:33:35 I'd have thought PFE could but I've never really used it 11:34:40 Igloo: I changed my name a few years ago, so each part of the name I have now has all kinds of detail behind 11:35:27 Ah 11:37:16 i've been hacking C mostly the last weeks 11:57:47 --- quit: shapr (Read error: 104 (Connection reset by peer)) 12:00:26 --- join: shapr (~user@p-c2fbab34.easy.inet.fi) joined #haskell 12:14:53 porting code from Python to Haskell is not a trivial task 12:15:02 Haskel <-> Joy is much simpler 12:15:12 er, Haskell 12:16:20 python sucks anyway 12:16:28 heh 12:16:30 hi xbill 12:16:41 I'm fond of Python 12:17:02 I wish Haskell were as interactive as Python 12:17:03 okay it's not my favorite then 12:17:08 ;) 12:17:38 Imap.hs won't let me login to my server, and I can't figure out why.... 12:17:48 so I'm trying to figure out how to debug stuff 12:18:27 Imap.hs polls the imap server and squirts it down the local sendmail pipe. 12:18:29 you could always do simple trace-calles 12:19:02 I'm having a problem logging in, so I'm trying to persuade it to print the answer 12:19:10 dennisb: how does a simple trace call work? 12:19:23 it prints out everything anyway 12:19:30 you use the trace function! 12:20:31 * shapr figures out the trace function 12:20:31 duhh 12:20:37 * shapr feels really dense 12:21:06 http://www.haskell.org/ghc/docs/latest/set/sec-ioexts.html#TRACE 12:21:16 (I guess that was what you read) 12:21:47 You simply use it to print some things during the program execution 12:21:49 yup, thanks 12:22:40 it's not safe to use, and it can cause strange things to happen, but mostly it just works and can be effective to use for debugging 12:23:23 printf-debugging is not as bad as some people say 12:37:23 um, Imap.hs dumps everything anyway 12:37:56 I suspect it's user error (aka, I'm missing something obvious) 12:39:19 xbill: yes, you said it above (i haven't tried you program) 12:40:44 i'm trying to get mingw (gcc for windows) to link libraries statically, with no luck... it's not only haskell that gives people grey hairs.. 12:41:09 heh 12:43:40 Whew it's hot. 12:48:22 how hot is it there? 12:48:24 Logan: yes, it is. It's above zero, great. Maybe the snow will go away 12:49:12 64! 12:49:20 Last weekend it snowed. 12:49:26 The only substantial winter weather this winter. 12:49:29 64 C? 12:49:31 F 12:49:31 oh 12:49:33 must be F 12:49:46 18 C 12:51:00 that's pretty good 12:54:41 Yeah. 12:54:44 Pretty strange winter. 12:56:52 Usually this time of year it gets up to 4 C during the day. :P 12:57:34 and yet it's 18 12:57:35 weird 12:57:41 * Logan nods. 12:57:56 Which means it's very very stuffy in my room now. 12:58:07 * Logan whips up a permutation function in haskell really quick. 12:58:15 It actually worked on the first try. :P 12:58:23 cool, what does it do? 12:59:00 Given a list, generates the list of all permutations of that list. 12:59:14 Logan> permute "abc" 12:59:14 ["abc","acb","bac","bca","cba","cab"] 12:59:24 I should modify it so it follows a more predictable ordering. 13:00:00 what's the function look like? 13:00:02 * shapr guesses 13:00:04 I.e., if the elements of the original list are in order, the permutation list should be in lexicographical order. 13:00:15 permute :: [a] -> [[a]] 13:00:15 permute [] = [] 13:00:15 permute [a] = [[a]] 13:00:15 permute (x:xs') = permute' [] x xs' 13:00:15 permute' :: [a] -> a -> [a] -> [[a]] 13:00:18 permute' before x [] = map (x:) $ permute before 13:00:20 permute' before x after@(a:after') 13:00:23 = 13:00:25 (map (x:) $ permute (before ++ after)) ++ permute' (x : before) a after' 13:01:01 If I append x to before in that last line, instead of adding it to the beginning, I'd probably get lexicographical order. 13:01:24 Oops, that broke it entirely. 13:01:52 Oh, nevermind, typo. *grin* 13:02:59 Unfortunately it's a bit more inefficient to do it that way. 13:03:07 I need a more powerful list type. :P 13:03:17 unify stuff? 13:04:04 Something that I can append to efficiently, etc. 13:04:23 Though it's not a big deal. 13:04:35 through stuff on the head and reverse it? 13:04:47 data FastList a = FastList ([a] -> [a]) 13:05:02 then appending is just composition under the FastList constructor 13:06:02 i.e. constant time 13:06:56 Heh, I don't understand what that statement really does. 13:10:13 it's a datatype of lists that makes it very easy to stick something on the end 13:12:12 someone wrote a paper in the late 80s about this - I thought it was John Hughes but I can't find it 13:14:44 Now to write a quick function for obtaining the maximal element in a list. 13:15:40 --- quit: atun (Read error: 113 (No route to host)) 13:15:52 I'm having fun generalizing some useful, simple algorithms. :P 13:15:54 well, that has to be linear time, so there's not much you can do to make it quick 13:15:59 unless your list is sorted, of course 13:16:08 Quick in the sense of how long it'll take me to write it. :P 13:16:30 ah :-) 13:16:30 Though for very large lists there are things you can do to improve the constant of proportionality in a linear time solution. :P 13:16:51 there's not a huge amount you could do in Haskell without intimate knowledge of how the compiler works 13:16:57 * Logan forgets what the number of comparisons for the most optimal general algorithm for obtaining the maximum value was. 13:17:12 Well, you still have control over the number of comparisons. 13:17:40 umm, surely n-1 for a list of length n, since you need to visit each element? 13:17:58 and the obvious algorithm will only do n-1 anyway 13:18:12 Maybe I'm thinking of the one to get the two maximum elements. 13:18:20 Actually, I'm not sure what I'm thinking of. :P 13:18:30 :-) 13:18:40 hmm. 9 characters. 13:19:24 oh. 7. 13:20:07 Oh, it was for finding the maximum and minimum. 13:20:36 Which can be done in about 3n/2 comparisons. :P 13:20:49 is that average case or worst case? 13:21:16 I think it's always about 3n/2. 13:21:28 got a reference? 13:22:26 Introduction to Algorithms: A Create Approach, Udi Manber 13:23:13 It's kinda easy... 13:23:28 --- join: qbert (~mmrmiagi@12-238-239-84.client.attbi.com) joined #haskell 13:23:30 Let's say you've already found the max and min of the first k numbers. 13:23:48 hi qbert 13:24:11 You take the next two numbers, compare them to each other, them compare the greater one to the max and the lesser one to the min. 13:24:21 3 comparisons for every 2 numbers. 13:24:26 em 13:24:29 oops 13:25:08 ;) 13:25:33 ah, gotcha :-) 13:27:44 Hmm, there's a PrelList.maximum 13:27:54 yes 13:28:22 But they don't take an ordering function. 13:28:30 Then again, they just do a foldl 13:28:54 it all comes from the Ord class 13:29:11 type classes are *nice* 13:29:55 Yeah. 13:30:12 I'm deliberating over whether I want to go through the trouble to define an instance of Ord here or not. I suppose it makes sense. 13:30:20 If I can remember the syntax. *grin* 13:31:43 I have to define all these functions? 13:35:14 Either that or live with your conscience 13:35:24 Let's say I have some arbitrary data type, but I can map it to a Double for comparisons. 13:35:37 Is there some easy way to reflect this mapping and make it an instance of Ord? 13:36:08 If it is trivially defined in terms of a Double then I think the revised report allows you to derive Ord 13:36:19 Otherwise you have to write all the mapping stuff for each function 13:36:35 Hmm, that'd be a good place to improve the language, then. :P 13:36:55 If I just convert my data to Double before passing to max, I lose all the information associated with it. 13:37:10 It has been to an extent with the deriving I just mentioned. I doubt more will be done before Haskell 2 13:37:39 Oh, I misread. 13:37:50 I don't know what you mean by "trivially defined". 13:38:04 you only have to define one function to define Ord, btw 13:38:09 Something like newtype Foo = Foo Double or data Foo = Foo Double 13:38:20 All I want to do is specify a function that is a -> Ord b in order to make a an instance of Ord. 13:38:40 igloo: errm, how can you derive Ord from a trivial mapping to Double? 13:39:11 It might be GHC only 13:39:12 sure if the datatype is defined like you say, but suppose the mapping is something like "toDouble (Foo a) = -a" 13:39:24 igloo: if so, what does it have to do with the revised report? 13:39:35 I thought it was also in the report 13:39:46 but how does it work? 13:40:11 data Foo = Foo Double deriving Ord does the obvious thing 13:40:32 right. did it not before then? 13:41:43 Oh, am I thinking of user defined classes? 13:41:50 I think I might be 13:42:30 right 13:42:44 --- join: yusri (~bruce@pcp415718pcs.martnz01.ga.comcast.net) joined #haskell 13:46:06 --- quit: shapr ("argh, must shoot people") 14:16:52 --- nick: qbert -> python_is_cool 14:17:44 --- nick: python_is_cool -> xsdg_away_is_not_cool 14:18:54 --- nick: xsdg_away_is_not_cool -> praise_be_to_evil 14:24:51 --- quit: Heffalump (carter.openprojects.net irc.openprojects.net) 14:25:08 So who has a convex hull algorithm in haskell sitting around? :P 14:25:45 --- join: Heffalump (ganesh@munchkin.comlab.ox.ac.uk) joined #haskell 14:29:13 Heh, so many ACM problems require graphs. 14:32:18 --- nick: praise_be_to_evil -> qbert 14:36:52 --- join: discobob (discobob@slc1418.modem.xmission.com) joined #haskell 14:38:59 --- nick: Logan -> LoganZzZz 15:44:53 --- join: Yurik (~yrashk@gw.telcos.net.ua) joined #haskell 15:44:57 re 16:21:11 yo 16:21:56 qbert hi 17:09:31 --- quit: juhp (Remote closed the connection) 17:29:30 --- join: juhp (~petersen@firebox-ext.jp.redhat.com) joined #haskell 17:35:32 --- quit: discobob (Read error: 104 (Connection reset by peer)) 17:59:43 --- join: dblack (~dblack@ool-18be3b59.dyn.optonline.net) joined #haskell 18:33:01 --- join: zorb (a@ppp-208-188-43-129.dialup.eulstx.swbell.net) joined #haskell 18:54:30 what do haskell files end in ? 18:59:05 hmm? 18:59:15 the extension of the name? .hs or .lhs 18:59:18 or .hi 18:59:55 hasklefile.hi ? 18:59:59 l 19:00:15 .hi; interface file. generally generated by compiler. 19:00:26 (didnt know to what extent you meant) 19:01:00 ah 19:01:00 just haskellsourcefile.hs or litteratehaskellsourcefile.lhs 19:01:13 s/tt/t/ 19:01:18 k cool 19:01:33 i m going to learn haskell as soon as time permits, do you like it ? 19:01:59 yeah 19:04:10 why ? 19:04:14 though one of its most interesting attributes can be annoying (lazyness) 19:05:08 ahh like perl 19:05:28 well, not really :) 19:05:31 different sorts of lazy ? 19:05:35 ;) 19:06:27 you do realize that the way haskell generally evaluates expressions is in a "lazy" fashion, right? 19:07:07 no i havent seen it at all 19:07:12 can you paste an example ? 19:08:49 i suppose its evaluation strategy could be said that it evaluates only what it needs an puts off the rest. 19:08:49 this can be very efficient at times. 19:08:49 ah.. 19:08:49 print (take 100 fibs) where fibs = [1..] 19:09:08 wait. 19:09:14 let me think of a better one. 19:09:21 thats more simple. 19:10:17 ok. 19:10:25 whats a fib ? 19:11:08 i was thinking of the fibbonacci sequence but instead i defined it differently 19:11:20 ah 19:12:16 [1....] is virtually the same as list = 1: map (\x -> x+1) list 19:13:28 I have defined list as a "infinite" list. 19:13:35 um. 19:13:48 say i take 3 list. 19:14:35 erg. bad choice of name for variable. 19:14:55 ok z = 1: map (\x -> x + 1) lsit 19:14:57 asdklfjkl;f 19:15:03 sorry 19:15:19 hehe ok ;) 19:15:40 z = 1 : (map (\x -> x + 1) z) 19:16:03 same list. 19:16:14 anyway, say i take 3 z 19:16:28 or let q = take 3 z 19:17:54 heh 19:18:04 evaluate take 3 z haskell will evaluate the first element (which needs no evaluation) so it will then evaluate take 2 (map (\x -> x +1) z) 19:18:36 take 2 commutes 19:18:48 conceptually the list q at this stage is 1 : (take 2 map (\x-> x + 1)) .. 19:19:02 hmm? 19:19:17 oops missing z 19:19:20 conceptually the list q at this stage is 1 : (take 2 map (\x-> x + 1) z) .. 19:19:22 grr 19:19:35 and a missing parenthesis set as well. 19:19:37 geez 19:20:09 I guess I wasn't very prepaired to be in a teaching mode tonight. 19:21:12 * zorb wonders if he scared qbert away 19:21:53 I think its really not too hard to understand. 19:22:47 I sometimes have a penchant for not explaining things very well. 19:23:13 makeing the easy abstruse :( 19:23:16 I could make addition scary! 19:24:10 yeah, i'd be the one to invent roman numerals if I where back then in the day! 19:24:21 * zorb stops slamming self. 19:25:16 * zorb did scare qbert away! 19:29:11 anyway, another way of explaining lazyness could be shown in let expressions. 19:30:24 let x =some big expression; y = 5; z= 5*y in z - 3 19:31:15 "some big expression" will never get evaluated because its not in the final expression following the "in" 19:31:23 fib = 0 : 1 : zipWith (+) fib (tail fib) 19:32:52 not bad, though i think your 0 introduced an unintentional bug :) 19:33:06 me thinnks. 19:33:12 * zorb rahter 19:35:07 * zorb would thank xbill for thinking of a better example but that evaluates to 0:1:1:... 19:35:15 whatever ... is. 19:35:36 heh 19:35:43 Fibonacci sequence 19:35:59 doh 19:36:18 my brain really isnt working tonight. 19:37:16 its also been a while since ive tried to simulate haskell evaluation in my head :) 19:41:35 * zorb sees what's up at that haskell library project 19:51:36 who's doing the smtplib? 19:54:45 * zorb heads out (check on logs later) 19:54:49 --- quit: zorb ("Leaving") 19:59:17 smtplib? 20:05:06 --- quit: qbert () 20:44:49 --- join: discobob (discobob@slc1497.modem.xmission.com) joined #haskell 21:16:02 --- quit: pHa ("Reconnecting") 21:17:21 --- join: pHa (sjh@Riverview74.tbaytel.net) joined #haskell 22:09:22 --- quit: Yurik (Read error: 104 (Connection reset by peer)) 22:38:51 --- quit: dblack (Ping timeout: 14400 seconds) 22:47:17 --- join: shapr (~user@p-c2fbab34.easy.inet.fi) joined #haskell 22:59:28 --- join: Yurik (~yrashk@gw.telcos.net.ua) joined #haskell 22:59:35 hi Yurik 23:05:20 shapr hi 23:05:25 what's up? 23:07:39 fine, thanks 23:09:03 any code or questions? 23:10:55 well, now I have only one question :-) where I can read intelligible tutorial on monads? :-) 23:11:16 aha 23:11:56 the haskell.org website has a section on Monads 23:11:58 just smthing like for-the-beginners, then I'll be ready to read more complicated one 23:14:02 heh 23:14:08 monads are a pain 23:14:41 good morning xbill 23:15:01 anywhay, I understand the basics and would like to find out some more on how monads can be used. or the basic knowledge is enough? 23:15:09 s/anywhay/anyway/ 23:15:22 I think you should use them for awhile 23:16:58 and you should read some of the papers on haskell.org 23:17:11 but then, I'm not a monads expert, someone else may be able to recommend something better 23:17:54 ok, thanks 23:18:15 btw, what is the meaning of Maybe, in brief? (I mean in applience to Haskell, of course :-) 23:18:58 as far as I understand it, it means " return a value, or return an error " 23:19:28 ok, thanks; that is what I thought 23:21:55 --- quit: discobob ("Client Exiting") 23:27:29 not quite 23:27:39 Maybe types have value 23:27:45 Just 23:27:48 or 23:27:52 Nothing 23:27:57 they are useful for optional data 23:28:12 say Nothing means use the default, otherwise use the 23:28:20 hi juhp! 23:28:25 I like your software! 23:28:35 thanks! :) 23:29:14 i hope there will be much more one day.... 23:29:53 me too 23:29:53 i was was really happy today, 'cos someone sent a binding to gtkmozembed to the gtk+hs list 23:29:57 anything new you're working on? 23:30:15 with a sample browser! 23:30:19 coool! 23:30:25 * shapr subscribes to the gtk+hs list 23:30:27 yeah! 23:30:47 what do you think would make Haskell a more general purpose language? 23:31:16 I starting to do various things, but haven't made much headway recently 23:31:35 debugging popenhs took much of my haskell time last week... 23:31:46 how do you debug Haskell? 23:31:57 and i released 1.00 on Friday 23:32:02 yah , have it :) 23:32:03 strace ;-) 23:32:07 ah, ok 23:32:20 i wish for better tools 23:32:25 me too 23:32:38 Hat should be for ghc soon 23:32:44 well, they say it will be 23:33:18 yes, I think so. Haven't tried it. 23:33:39 I haven't either, it's only for nhc right now 23:33:51 but for IO strace is well probably continue to rule i suppose 23:34:05 s/is well/will/ 23:34:06 yah, probably so 23:35:07 to make Haskell a more general purpose language, we need more libraries i think 23:35:11 good ones! 23:35:12 I think so too 23:35:20 I started a sourceforge project to that effect 23:35:29 tell me more 23:35:33 sf.net/projects/haskell-libs/ 23:35:39 but it's just a baby project :) 23:35:41 cool 23:35:51 * juhp goes to look 23:35:53 do you want me to add you as a developer? 23:37:15 so far the only code is Imap.hs, donated by xbill 23:37:53 yeah, sure 23:38:08 maybe popenhs could go in too? 23:38:22 of course! 23:38:36 good :) 23:38:49 do you have a sourceforge id? 23:39:33 juhp exists 23:41:25 want me to use that one to add you? 23:47:08 * shapr does so 23:47:50 --- quit: jlb ("Client Exiting") 23:48:48 thanks 23:52:44 * juhp does it take a while to reach the website 23:53:10 I haven't uploaded a webpage, so haskell-libs.sf.net should give an empty directory 23:53:22 * juhp wonders if it takes a while to reach the website? 23:53:25 but http://sf.net/projects/haskell-libs/ shouldn't take long 23:54:13 one possibility I recently noticed: if you're logged into sourceforge, and your chosen theme is "extra-light" then the images take a long time to load in galeon 23:57:22 juhp: I'd like for haskell-libs project to become a central place to find webpages and cvs trees for Haskell libraries. 23:57:44 currently there isn't such a place outside of the Haskell website 23:59:59 --- log: ended haskell/02.01.27