00:00:00 --- log: started haskell/02.01.23 00:11:13 --- quit: LoganH (Remote closed the connection) 01:42:34 --- join: jewel (~jleuner@57.66.12.99) joined #haskell 01:44:54 --- join: shapr (~user@p-c2fbabb9.easy.inet.fi) joined #haskell 02:11:48 --- join: Logan (~logan@up112.blacksburg.ntc-com.net) joined #haskell 02:12:05 Haskell dojo? 02:12:11 tada! 02:12:14 * shapr bows 02:12:15 I wonder how I'm progressing. 02:12:43 lemme pull up the belt color chart 02:12:50 I'm starting to understand how to do graph theory in haskell. 02:13:04 http://haskell.org/wiki/wiki?HaskellIrcChannel 02:13:09 There's just one thing I can't figure out at the moment, for doing this particular problem I'm doing. 02:13:12 cool! I wanna see code! 02:13:24 I've got several (simple) problems I've implemented so far. :P 02:13:31 Let me put them on a web server for you to browse, if you like. 02:13:54 yah yah! 02:17:39 http://www.loganh.com/haskell/ 02:17:42 Those are the ones so far. 02:17:45 Some are really ugly. :P 02:17:54 But most of them work. 02:18:56 Some are solutions to a couple of problems from this problem set: http://www.acm.inf.ethz.ch/ProblemSetArchive/B_US_SouthCen/1998/index.html 02:19:01 Others are from the 97 ACM ICPC 02:19:36 I think I'm orange. :P 02:19:48 If simple usage of data and type counts. 02:20:05 Though I think I exhibit some traits of brown. 02:20:26 So I just need to meet the requirements for green! :P 02:21:43 --- nick: Logan -> LoganH 02:23:51 green isn't too hard 02:24:06 I just have to think of something for blue 02:25:36 I don't know enough about Haskell to have a good idea of what would fit in there yet. :P 02:25:41 me neither ;) 02:25:44 Maybe when I do, I'll qualify for it just by knowing. 02:25:48 Kind of zen-like. 02:29:45 I'm starting to get to the point where I really want to understand type classes. 02:29:50 So I can write my own general purpose code. 02:30:17 I should've made that cards program use memoization, but I didn't know how at the time. :P 02:30:34 yah I know that feeling 02:34:27 How do I add downloaded Haskell libraries so that ghc loads them by default? 02:34:59 ~/.ghcrc I think 02:35:07 you can add stuff to be autoloaded there 02:35:10 speaking of which 02:35:28 since I'm writing the "how to download/install/use ghc and hugs" chapter of the tutorial 02:35:32 I better find out 02:36:46 The instructions for htis package was: "put these files somewhere where hugs/ghc can find them and Load FGL". :P 02:37:03 sounds reasonable 02:37:35 How do I tell ghc which directories to look in for .hs files I request to load? 02:38:52 er, searching... 02:40:41 this is part of the answer: http://haskell.org/ghc/docs/latest/set/ghci-dot-files.html 02:41:37 Hmm, -i 02:41:48 What in other compilers would be -I. :P 02:41:55 One or more modules or filenames can also be specified on the command line; this instructs GHCi to load the specified modules or filenames (and all the modules they depend on) 02:42:31 since I'm used to using export PYTHONSTARTUP=/home/shae/startup.py 02:42:52 I'll probably make a /home/shae/src/haskell/ghcistart.hs 02:43:08 and load that from my ~/.ghci 02:45:18 is that what you were asking for? 02:46:17 Hmm, -i isn't working for me. 03:05:57 Have you used FGL? 03:06:04 Unfortunately it doesn't seem to compile in ghc. ): 03:07:57 nah, I haven't tried it, but I will now 03:08:30 RootPath.hs:17: 03:08:31 Illegal instance declaration for `Eq (LPath a)' 03:08:31 (The instance type must be of form (T a b c) 03:08:31 where T is not a synonym, and a,b,c are distinct type variables) 03:08:31 In the instance declaration for `Eq (LPath a)' 03:08:33 RootPath.hs:20: 03:08:35 Illegal instance declaration for `Ord (LPath a)' 03:08:38 (The instance type must be of form (T a b c) 03:08:40 where T is not a synonym, and a,b,c are distinct type variables) 03:08:43 In the instance declaration for `Ord (LPath a)' 03:09:09 try it with -fglasgow-exts 03:10:21 Overlapping instance declarations: 03:10:21 RootPath.hs:17: Eq (LPath a) 03:10:21 /usr/lib/ghc-5.02/imports/std/PrelBase.hi:165: Eq [a] 03:10:21 Overlapping instance declarations: 03:10:21 RootPath.hs:20: Ord (LPath a) 03:10:23 /usr/lib/ghc-5.02/imports/std/PrelBase.hi:166: Ord [a] 03:10:33 I need to learn what these instances are. 03:11:04 instances have to do with type classes 03:11:25 * LoganH nods. 03:11:34 have you used Java? 03:11:36 Yes. 03:11:44 you understand interfaces in Java? 03:11:49 Yes. 03:12:05 that's pretty close to type classes in Haskell 03:12:13 take the Show class for example 03:12:15 LoganH: what's the definition of LPath? 03:12:51 in general don't use -fglasgow-exts or -98 or whatever unless you know why you need it (e.g. using someone else's code that says you need it :-) 03:12:59 oh 03:13:06 it often fixes my problems :) 03:13:12 with your own code? 03:13:21 no, with other code 03:13:32 right, yes, other code is often written to use specific extensions 03:13:35 so you have little choice 03:13:37 Members of the Show class are types that have a show function defined for them? 03:13:43 right 03:13:48 LoganH: and have an instance definition saying they are 03:13:55 type LPath a = [LNode a] 03:14:02 shapr: for your own code, you really ought to understand *why* you need the instance first 03:14:08 type Node = Int 03:14:09 type LNode a = (Node,a) 03:14:09 Heffalump: I completely agree! 03:14:17 loganH: and you're trying to write "instance Eq (LPath a)" ? 03:14:37 Well, I'm not, it's in this functional graph library I got from http://cs.oregonstate.edu/~erwig/fgl/haskell/ :P 03:14:44 oh, right 03:14:46 ummm 03:15:01 * Heffalump --> look at it 03:15:13 data Temp = Cold | Hot 03:15:21 -- ok let's add Temp to the Eq class 03:15:21 instance Eq Temp where 03:15:21 Cold == Cold = True 03:15:21 Hot == Hot = True 03:15:21 _ == _ = False 03:15:55 so Eq is a typeclass 03:16:01 * LoganH nods. 03:16:19 oh, here's one I wrote to figure it out for myself: 03:16:22 Specifying types whose values have equivalence (implemented by the == function) defined for them. 03:16:27 class CharExts a where 03:16:27 isVowel :: a -> Bool 03:16:27 isConsonant :: a -> Bool 03:16:34 instance CharExts Char where 03:16:34 isVowel a = elem a "aeiouAEIOU" 03:16:34 isConsonant a = elem a (filter (not . isVowel) ['A'..'Z'] ++ ['a'..'z']) 03:17:05 * LoganH nods. 03:17:14 I'll have to start using polymorphism soon. 03:17:26 * Heffalump reads the code and goes *ick* 03:17:50 it *might* work but I don't understand why they're using a type synonym for LPath 03:18:02 LoganH: how so polymorphism? 03:18:23 An LPath (labelled path) is a list of labelled nodes (LNode). 03:18:35 An LNode differs from a Node in that it's an ordered pair of a label and a Node. 03:18:37 loganH: yes, it's the use of a type synonym that's ugly 03:18:49 I don't know enough to know why it's ugly. :P 03:18:53 because they're trying to make equality be something different to what it would be on lists, yet a LPath is just a (specific) list 03:19:08 Maybe they want to leave room for change? 03:19:12 In case someday LPath isn't just a list? 03:19:19 but they could have used newtype 03:19:26 which would do the job perfectly, with a little extra effort 03:19:28 I don't know about newtype. :P 03:19:42 I think this code was o riginally written in ML, if that explains anything about their style. 03:19:51 I only know what Heffalump taught me about newtype :) 03:19:54 but the authors of this library should have 03:19:59 hmm, right 03:21:25 So what is the reason for the compile error in RootPath.hs? 03:21:57 And are there any other haskell libraries that provide functional graph implementations? 03:24:41 LoganH: http://www.dcs.gla.ac.uk/~gnik/publications.html ? 03:25:49 http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne/haskell_libs/daVinci.html 03:26:21 ooh ahh, Haskell talks to daVinci, an X-windows directed graph visualization tool 03:26:56 Hmm, never heard of daVinci. 03:26:59 I've only used graphViz. 03:27:23 I'm unable to reach that first URL you posted. 03:28:19 the first url contains a thesis dealing with graph algorithms in Haskell 03:28:33 why it's a good idea, what kind of nifty things it lets you do, etc 03:29:56 Is it the same as http://cs.oregonstate.edu/~erwig/papers/abstracts.html#JFP01 ? 03:31:06 nope 03:31:33 Is there code associated with it? :P 03:31:54 it's ~275k of gzipped postscript 03:32:51 author is DJ King 03:33:17 google says he's written at least two papers on graph algorithms in Haskell 03:33:18 http://haskell.org/wiki/wiki?PreludeListFunctions <- should've found this earlier. *grin* 03:33:29 Maybe I can find a mirror on a reachable site. 03:34:14 or I can email it to you 03:35:30 I have Structuring Depth-First Search Algorithms in Haskell, and Lazy Depth-First Search and Linear Graph Algorithms in Haskell. 03:36:42 I might try rolling my own graph implementation for now. 03:36:45 ok 03:36:53 It'll be inefficient, but it'll aquaint me with types. 03:36:59 and that's the point 03:37:22 Inefficiency? :P 03:37:32 no, learning :-P 03:51:51 DJ King's stuff is good for certain things but possibly not as a generalised graph toolkit 03:56:49 How about Erwig's? 03:56:57 not looked at it, sorry 03:58:50 http://cs.oregonstate.edu/~erwig/papers/abstracts.html#JFP01 03:59:00 The implementation of that FGL library is based on that paper. 04:00:54 oh, right 04:02:04 hmm, looks useful at a very first glance 04:02:20 but be a bit careful of using recent research for real practical problems :-) 04:15:46 --- join: SolidCore (~fractal@ppp-64-206-116.friaco.access.uk.tiscali.com) joined #haskell 04:15:58 * LoganH nods. 04:16:06 As opposed to using code I wrote myself? :P 04:16:06 hi 04:16:24 anyone know Delphi? 04:16:39 you mean pascal? 04:16:53 me? nahh delphi 04:17:04 Bordland Delphi 6 04:17:04 hehe 04:17:11 :)- 04:17:28 well? does anyone know delphi 04:17:36 this channel is about haskell 04:17:53 whats haskell 04:18:01 paskell 04:18:03 look at www.haskell.org 04:18:15 nahhh im downloading... take me along time 04:18:23 * jewel lols 04:18:24 go on just give me a brief 04:18:33 you can't read? 04:18:41 ahh w8 04:18:51 so u guys are doing functional progrsamming 04:18:56 whats that like then? 04:19:32 quite different 04:21:06 SolidCore: with bananas, lenses, envelopes, and barbed wire 04:29:14 paskell 04:29:18 BWAHAHAA 04:29:21 * shapr falls over laughing 04:30:41 I think I need to create a quotefile for #haskell 04:44:05 --- join: oofun (alfredding@61.171.126.249) joined #haskell 04:44:07 --- part: oofun left #haskell 04:45:13 Heh, I mentioned haskell to my roommate, and he thought I was talking about pascal. 04:46:12 --- quit: SolidCore (Read error: 110 (Connection timed out)) 05:10:13 xbill: lol 05:10:34 * Heffalump is from the uni that was at one point part of that movemement :-) 05:11:40 er, which movemement? 05:11:47 Paskell? 05:12:27 the bananas, lenses etc comment 05:12:50 loganh: I get that all the time 05:13:30 shapr: there's a paper by Meijer, Fokinga and Paterson (and possibly someone else) with a title that goes something like xbill's quote above 05:14:04 it's a reference to category theory, which has some relation to Haskell 05:14:22 category theory has lots of operators that look a bit "weird" 05:17:21 aha 05:17:24 fokkinga 05:20:53 --- quit: dblack ("[x]chat") 05:20:54 http://research.microsoft.com/~emeijer/ 05:20:58 under "software design" 05:22:33 that's the bunny 06:09:12 ma ractu 06:10:04 .ua le badna 06:30:04 --- join: dblack (~dblack@shunat236-80.shu.edu) joined #haskell 07:16:37 * jewel browses Erik's thesis 07:49:50 coi 08:25:00 --- quit: shapr ("shooting people") 09:28:30 --- quit: smkl (Remote closed the connection) 09:30:56 "we are releasing now new beta compilers for Mondrian and Haskell for .NET." 09:31:38 where'd you see that? 09:31:56 last I heard, the .NET code generation in GHC was severly broken 09:32:13 http://www.mondrian-script.org/ 09:32:56 Haskell proper seems to do well enough for scripting. 09:34:44 --- join: smkl (~sami@glubimox.yok.utu.fi) joined #haskell 09:34:45 --- quit: smkl (Remote closed the connection) 09:36:35 hmm. 09:36:40 * Heffalump should poke that 09:37:38 --- join: ajoyagua (~ismael@62.83.28.29) joined #haskell 09:52:36 --- join: smkl (~sami@glubimox.yok.utu.fi) joined #haskell 09:56:36 --- quit: ajoyagua ("Aplicación Saliendo") 10:10:59 --- join: jemfinch_ (~jemfinch@rpat-100-139.resnet.ohio-state.edu) joined #haskell 10:11:08 --- quit: jemfinch` (Read error: 104 (Connection reset by peer)) 10:38:01 --- join: shapr (~user@p-c2fbabb9.easy.inet.fi) joined #haskell 10:48:45 --- join: jsw (scott@12-234-202-177.client.attbi.com) joined #haskell 10:50:57 --- quit: shapr (Remote closed the connection) 11:12:17 --- join: djul (~jleuner@57.66.12.99) joined #haskell 11:28:00 --- quit: jewel (Read error: 110 (Connection timed out)) 12:15:17 --- quit: dblack ("[x]chat") 12:34:10 * LoganH yawns. 13:13:10 --- join: dblack (~dblack@ool-18be3b59.dyn.optonline.net) joined #haskell 13:26:19 --- quit: smkl (Read error: 104 (Connection reset by peer)) 13:26:48 --- join: smkl (~sami@glubimox.yok.utu.fi) joined #haskell 13:57:36 --- join: lodewijk (~lodewijk@voge.xs4all.nl) joined #haskell 14:25:02 --- quit: lodewijk ("BitchX: strong enough for a man, pH-balanced for a woman") 15:51:15 --- join: shapr (~user@p-c2fbabb9.easy.inet.fi) joined #haskell 16:13:44 --- quit: shapr (Remote closed the connection) 16:37:19 --- join: ajoyagua (~ismael@195-MADR-X27.libre.retevision.es) joined #haskell 16:43:33 --- quit: LoganH (Read error: 104 (Connection reset by peer)) 16:43:55 --- join: Logan (~logan@up112.blacksburg.ntc-com.net) joined #haskell 16:44:15 --- quit: ajoyagua ("Aplicación Saliendo") 17:58:56 --- quit: dmiles (Read error: 104 (Connection reset by peer)) 18:57:34 Heh, doing an on line programming competition in C++ tonight. 18:57:39 And I'm really wishing I could've used haskell! 19:57:14 --- quit: pHa ("O_O") 20:01:11 --- join: pHa (sjh@Rockcliffe10.tbaytel.net) joined #haskell 20:03:22 --- join: dmiles (~alife@sense-sea-MegaSub-2-56.oz.net) joined #haskell 21:11:39 I'm really getting into this type polymorphism stuff. 21:47:59 --- quit: pHa ("Reconnecting") 21:48:03 --- join: pHa (sjh@207.164.213.77) joined #haskell 22:00:03 --- join: dennisb (~dennis@as2-4-3.an.g.bonet.se) joined #haskell 22:10:05 Logan: how so? 22:21:21 Just starting to use it. 22:21:33 It seems more intuitive than in other languages I've used. 22:28:25 cool :) 22:28:29 what are the other ones you've used? 22:33:26 --- nick: jemfinch_ -> jemfinch 22:33:56 Well, the closest to this sort of power I guess would be C++ templates (which are ugly, complicated, and not as intuitive). 22:34:20 Is there a built-in function that is just the identity? (e.g., equivalent to \x -> x ?) 22:35:03 I don't know :-/ 22:35:11 I actually don't program in Haskell. 22:35:44 which feature of Haskell are you talking about in particular? 22:36:54 id :P 22:37:00 The type system. 22:38:29 are you talking about the ability to declare classes of types that can be used with a certain function that's unique to Haskell? Or just the plain old type inference/parametric polymorphism that's in ML and such too? 22:39:57 Well, I have no experience of ML. :P 22:42:43 what languages do you have experience in? 22:42:55 (does what you're talking about involve Haskell's "class" keyword?) 22:53:02 I'd have hard time saying anything in the strictly typed systems of Haskell/ML is as powerful as C++ templates. 23:15:00 This is my first major foray into functional programming. 23:16:35 ah, ok. 23:59:59 --- log: ended haskell/02.01.23