00:00:00 --- log: started haskell/02.01.30 00:01:06 * Yurik is trying to write hGetStorableL 00:01:46 that is a good exercise 00:06:09 failing :-) 00:06:34 What type do you want the function to be? 00:08:03 something like (Storable A) => Handle -> Int -> [IO a] 00:08:20 almost the type I would choose 00:08:28 hGetStorableL :: (Storable a) => Handle -> Int -> IO [a] 00:08:28 --- join: Pixel (~Snak@130.227.221.2) joined #haskell 00:08:49 --- part: Pixel left #haskell 00:08:54 It returns one IO-action that when fired will give a list of values 00:09:03 you would get a list of io-actions 00:09:13 that you have to start one by one (sort of) 00:10:22 it should be an easy recursive function to write 00:10:36 or non-recursive using higher order functions 00:11:11 foldM 00:12:06 * Yurik is experimenting and feels himself very stupid 00:13:06 don't worry, this new to you. we have all been there 00:13:43 I can give you the more advanced version, but I think it might be a good idea for you to write the recursive version 00:14:01 hGetStorableL h n = sequence $ replicate n (hGetStorable h) 00:14:27 what is replicate? 00:14:49 seems very natural... heh 00:14:53 replicate 3 42 gives [42,42,42] 00:15:10 * xbill notes his twine combinator. 00:15:13 oh, I understand 00:15:23 replicate n (hGetStorable h) is what gives the [IO a] 00:15:27 xbill: twine? 00:15:30 yeah, cool :-) 00:16:11 works :) yeah :) 00:16:50 one can also make it faster by alloc a whole block at a time i guess 00:16:56 but fails on big lists (stack overflow) 00:17:11 ooh 00:17:57 where could that happen. I tought it was as lazy as it could be, but obviuosly not 00:18:22 it fails on 1M of elements 00:18:29 and probably less 00:18:30 or rather, the other way around, We probably want it stricts somewhere.. 00:18:48 the way to increase stack size isn't good, eh? :-) 00:19:00 no 00:20:23 what's the difference between sequence and sequence_? 00:20:24 * Yurik is trying to develop another hGetStorableL 00:20:36 try to write the recursive version and maybe it will not show this problem 00:20:42 look at the type 00:20:54 you could ask for the type in ghci 00:21:29 the version with _ throws away the result 00:21:53 well, I have work to do so you are on your own again 00:22:23 in ghci you write ":t sequence" to ask the type 00:24:10 oh, I see 00:35:14 hGetStorableL h n = do 00:36:35 res <- hGetStorable h 00:37:10 r <- [res] ++ (hGetStorableL h (n-1)) 00:37:10 return r 00:37:10 but this doesn't works :-) 00:37:10 and hGetStorableL h 0 = do return [] 00:37:10 of course 00:37:46 * Yurik is out to smoke-n-think 00:40:41 * xbill does that quite often. 00:48:53 * Yurik is back 01:00:11 * Yurik will reboot and be back shortly 01:01:55 --- join: koft (~koft@207-172-174-180.c4-0.hlb-ubr1a.hlb-ubr.nj.cable.rcn.com) joined #haskell 01:03:10 --- quit: Yurik (Read error: 104 (Connection reset by peer)) 01:05:57 --- join: Yurik (~yrashk@gw.telcos.net.ua) joined #haskell 01:06:55 re 01:07:22 tarded 01:24:53 --- quit: xbill ("Leaving") 01:29:31 --- quit: jewel (Remote closed the connection) 01:29:50 --- join: xbill (wli@DOMINIA.MIT.EDU) joined #haskell 01:31:22 --- quit: xbill (Client Quit) 01:33:04 --- part: koft left #haskell 01:33:42 --- join: xbill (wli@DOMINIA.MIT.EDU) joined #haskell 01:53:02 --- join: michaelw (michaelw@pandora.debian.org) joined #haskell 01:53:27 hello 01:53:32 hi 01:55:46 * michaelw scans channel logs 01:56:05 wow, there's actually talk in here :) 01:56:18 yep 01:56:30 I even say stuff now and then. 01:56:34 shocking, isn't it? :-) 01:57:04 yes, indeed 01:57:44 which level is the chatting usually? 01:58:06 like "hi i'm a newbie, can anybody explain foldl to me?" 01:58:19 tends to be "how do I do this complicated thing" 01:58:23 or like "i have this cunning ghc extension..." 01:58:31 well, s/complicated/somewhat complicated/ 01:58:39 hmm, I don't think there's been any of that :-) 01:58:56 oh, ok :) 01:59:07 why, do you have one? 01:59:33 nope, i have more or less resigned from ghc 02:00:10 including the FFI stuff? 02:00:33 oops, i'm known here? :) 02:01:04 :) 02:01:17 Heffalump: well, my work changed, and there is not much opportunity to combine it with haskell any more 02:01:42 that's a shame :( 02:04:46 does that mean you're not going to maintain the Debian packages of ghc any more too? 02:06:30 well, currently i'm not a very good maintainer. there are bugs open for quite some time and i don't get around to fix them. which i really hate, but can't help it :( 02:06:49 i already missed the last three minor releases 02:07:29 two, surely? 02:07:40 since the package is 5.02 and we're at 5.02.2 now 02:07:56 oh, i thought they released 5.02.3? 02:08:02 don't think so 02:08:20 hmm, that proves the point somehow :> 02:08:24 :-) 02:08:35 to answer your question: soon the sememster ends here, and then i'll have a go at them to finally fix them. 02:08:57 i already closed 2 RC bugs against happy and ghc4 the last two days. 02:10:00 none of the listed bugs in ghc5 looks particularly bad 02:10:07 hopefully, after the package restructuring i can set up some automatic procedure to generate the packages 02:10:51 Heffalump: well, #116984 is a thoughie 02:10:59 requires quite some restructuring 02:11:09 but i already started doing it 02:11:25 it's just not finished 02:11:51 I think you can be forgiven not doing wishlist items, really :-) 02:13:15 oh, here's a third release you missed, 4.08.2 :-) 02:13:17 well, it's a general issue: i hate to see ghc increasing even more in size 02:13:30 there you go :) 02:13:40 space consumption is an issue I'm a big stickler about 02:13:52 I think it's ok for GHC to be big really, it does do a lot 02:13:56 * xbill checks bugs.debian.org 02:14:21 Heffalump: well, hmm... i think i missed this more or less on purpose back then, since i backported some of the real showstoppers 02:15:08 Heffalump: i could've made a 4.08.2 this time, hadn't i forgotten about it... 02:15:27 well, I'm pretty happy with 5.02 now :-) 02:15:52 5.00 didn't compile my pet project so I didn't like it, but since then I've not had any problems 02:16:49 okay, back to work... talk to you later :) 02:16:59 bye :) 02:17:04 --- part: michaelw left #haskell 02:17:05 * shapr awakens 02:17:06 * Heffalump should go to work too 02:17:08 ah crap 02:17:25 hey, I didn't realise it was possible to leave a channel with a message 02:17:47 --- join: ganesh (ganesh@munchkin.comlab.ox.ac.uk) joined #haskell 02:17:58 --- part: ganesh left #haskell 02:18:02 cool. 02:18:17 morning shapr 02:21:15 good morning Heffalump 02:21:36 * shapr scans the log of michaelw's conversation. 02:29:17 oh 02:47:39 --- quit: Yurik (Read error: 104 (Connection reset by peer)) 03:02:40 --- join: Yurik (~yrashk@gw.telcos.net.ua) joined #haskell 03:02:40 * shapr sings 03:02:40 * shapr tapdances 03:02:40 re 03:02:40 re Yurik 03:02:40 * shapr writes Zopey stuff 03:02:40 * xbill writes kernel-ish stuff. 03:02:40 lucky you :) 03:12:02 kernel-ish? 03:12:26 yah, the new kernel Ish 03:12:41 2.5.2-ish? :-) 03:15:29 yah, kind of like 2.5.2-ac 03:15:47 but ish stands for Ian Stewart Hall 03:16:05 * shapr is making this up off the top of head for entertainment purposes only 03:16:29 really? :-) 03:16:40 there isn't a 2.5 -ac branch, anyway 03:17:05 I know, but it sounded almost believable didn't it? 03:17:30 well.... 03:17:41 I am full of chaos today. 03:39:20 --- join: dmiles (~alife@sense-sea-MegaSub-2-56.oz.net) joined #haskell 03:39:32 hi dmiles 03:39:38 how's KIF treating you? 03:42:08 --- quit: dmiles (Client Quit) 03:42:22 --- join: dmiles (~alife@sense-sea-MegaSub-2-56.oz.net) joined #haskell 03:45:50 --- quit: dmiles (Client Quit) 03:55:50 --- join: Observer (~Observer@pD9E21009.dip.t-dialin.net) joined #haskell 03:56:45 Hi, could anyone help me with compiling OpenGL programs with GHC 5.02.2? 03:58:29 --- quit: shapr (Read error: 54 (Connection reset by peer)) 03:59:26 --- join: jewel (~jleuner@spamisevil.test.ie.vianw.net) joined #haskell 04:00:41 --- join: shapr (~user@p-c2fbab34.easy.inet.fi) joined #haskell 04:02:57 Nobody with OpenGl expiriences? 04:03:18 I couldn't get HOpenGL to compile 04:03:28 but I haven't tried lately 04:03:34 have you gotten it to compile? 04:03:41 You know it's part of ghc? 04:04:16 Compilation was painless. 04:04:52 I suspect your code-fu is greater than mine ;) 04:05:28 Something that takes several hours to compile is hardly "painless" :-) 04:05:33 In configuration stage you have to add --enable-hopengl (if I remember correct). 04:06:08 Well, painless in terms of error messages ;-) 04:06:20 I was unsuccessful. 04:08:19 Observer: ghc5 in debian doesn't have HOpenGL support, but if you happen to be a debian maintainer, maybe you want to do an NMU? 04:08:24 you sound more than skilled enough to do it :) 04:08:43 I compiled GHC from scratch 04:08:52 Don't know about Debian packages. 04:09:27 NMUing it would be rather rude 04:09:43 really? 04:09:48 read the wishlist bug report 04:09:54 and what Michael said earlier 04:10:15 he wants to do it but he's worried about the size of the resulting package 04:10:40 oh 04:11:18 * Heffalump decides to have a go at building the packages 04:11:30 (not that I'm a debian maintainer, but I could provide an apt repository) 04:11:32 are you a debian maintainer? 04:11:38 oh, that would be cool :) 04:12:13 I compiled GHC 5.02.2 on a Debian box (woody) 04:12:41 But I have no clue about building packages 04:13:57 if you can build GHC, debs will not be a problem for you :) 04:14:49 Well actually I don't know what is so hard when compiling ghc except that your machine needs lots of memory. 04:16:17 * Heffalump either 04:16:40 I've built RPMs of it with no hassle (admittedly starting from Manuel's spec file, but it didn't do anything particularly complicated) 04:17:18 So could you help me with OpenGL? 04:17:26 OpenGL itself? 04:17:38 No. Compiling OpenGL programs with GHC. 04:17:39 I've just tinkered, but maybe 04:17:43 oh, not me 04:17:48 * Heffalump can't, I don't use OpenGL 04:17:53 sorry 04:18:01 Observer: through your question into the channel, maybe we can help 04:18:44 what's the problem? 04:19:01 I wonder why the file 'package.conf' lists HGl when the package name is actually OpenGL. 04:20:02 There is a dependancy to xlib (as a Haskell package) which is nothing I could find. 04:20:36 I'd like to compile a program this way: ghc -package OpenGL name.hs -o name 04:23:23 does -package HGl work? 04:24:15 No. Since there is no package HGL. 04:24:22 oh 04:24:33 I guess it has been renamed at sometime in the past. 04:25:12 However one could edit the package.conf file and change HGL to OpenGL which is the actual package name, I think. 04:26:35 The problem then is not about compiling, since OpenGL calls are now in scopy but with linking because of the mentioned dependency to xlib. 04:26:53 Scope, not scopy ;-) 04:27:12 I think we all read and speak fluent typo 04:27:22 I sometimes think it's my native language. 04:27:55 ;-) 04:28:39 so, does it work if you edit package.conf? 04:29:05 No. As I said, there is a missing dependancy to xlib. 04:29:12 oh 04:29:31 how could editing package.conf affect that? 04:29:32 I've just noticed that in the GHC sources there is a directory xlib. 04:29:57 * shapr sucks down the ghc5 cvs tree 04:32:09 No No. Editing package.conf is necessary since there is no longer a package HGL. It's called OpenGL and if you edit package.conf GHC finds the OpenGL calls in your program. 04:41:04 --- quit: Yurik (Read error: 110 (Connection timed out)) 04:45:40 * Observer is going to make a new build. 04:46:33 * Heffalump shuts down his vmware box to give it more RAM 04:47:33 ohhh 04:47:39 my green-card version is 2.0 04:47:45 that could have been my problem the whole time 04:48:18 well f00 04:48:37 problem with what? 04:48:43 why I couldn't build it before 04:48:51 I was assuming the green-card deb would work 04:48:53 do you need green card to build GHC? 04:49:03 no, but you do for HOpenGL 04:49:08 oh, right 04:49:24 * Heffalump doesn't hold his breath for his own chances of success then 04:51:41 Are you sure you need green-card for OpenGL? I don't think that's true. 04:52:42 http://www.haskell.org/HOpenGL/INSTALL 04:57:23 hhmmm ... 04:58:34 maybe that's changed? 05:00:48 * Observer tries to figure out 05:10:46 To be sure I've now installed greencard and then edited the hslibs/Makefile in the source distribution to get (hopefully) xlibs (and while I'm at it the object-io) compiled. My Computer is now working and I take a break. See you ... 05:11:08 :-) 05:11:21 come back and tell us what you find out :) 05:11:26 I want to know 05:12:10 I guess it will take maybe 2 hours or so. 05:12:16 yikes 05:12:24 what's your computer stats? 05:12:34 MHz/MB of ram? 05:12:52 A laptop. 1GHz/512MB 05:12:55 oh 05:12:57 cool :) 05:13:04 faster than the desktop I'm using now 05:13:10 still takes two hours??? 05:13:16 is there a distributed gcc? 05:13:46 What's that supposed to be? 05:13:48 you could in theory distribute make, but I'm not sure how reliable it'd be 05:14:01 and you'd need a distributed g*h*c in this case :-) 05:15:13 I was thinking that I have a 200MHz, a 600MHz, and an 800MHz in this room 05:15:20 all on a 100Mbps switch 05:15:27 and they're all running debian 05:15:37 so PVM is simple to install/use on them 05:16:29 I suspect the setup/tear down costs would be quite significant given that a ghc build is lots of small individual compiles rather than one big one 05:16:32 but I could be wrong 05:16:39 Well, sounds nice. However I don't want to fiddle with another setup now. Better take a café latte ;-) 05:17:20 * Observer is going to make some coffee ... 05:17:39 * Heffalump needs lunch. 05:18:02 * shapr decides to ask his compiler contacts about pvm-gcc 05:18:30 what do you want that for? 05:19:23 distributed compilations 05:19:38 of what, IM 05:20:15 Instant Messaging? 05:20:40 I mean 05:20:44 sorry :-) 05:20:48 everything/anything I want to build 05:20:56 especially ghc + HOpenGL :) 05:21:07 plus ghc5 deb has pvm support 05:21:12 does ghc building use gcc at all? 05:21:19 so I could do paralell stuff too 05:21:24 er, I don't know 05:21:28 I thought it did 05:21:38 * shapr realizes his erro 05:21:40 error 05:21:46 duh, ghc builds ghc :) 05:21:47 I think ghc now outputs .o files itself. I could be wrong. 05:21:51 yes :-) 05:21:56 so I could already do it 05:22:02 possibly :-) 05:22:07 nifty! 05:52:38 --- quit: jewel ("Client Exiting") 05:56:52 --- join: jewel (~jleuner@spamisevil.test.ie.vianw.net) joined #haskell 06:48:49 --- join: Vutral (~ss@212.169.153.142) joined #haskell 06:49:12 hi Vutral 07:13:44 Still not finished yet. But I have to disconnect for now. See you soon. (btw. GHC makes use of gcc (se directories cbits in the source distribution)) 07:13:51 --- part: Observer left #haskell 07:19:04 hey 07:19:19 noticed that haskell is similar to ruby :> 07:19:27 in syntax 08:45:26 --- join: Vutra_ (~ss@212.169.154.124) joined #haskell 09:00:49 --- join: Vutr__ (~ss@port-212.169.145.69.flat4all.de) joined #haskell 09:02:49 --- quit: shapr (carter.openprojects.net irc.openprojects.net) 09:03:11 --- join: shapr (~user@p-c2fbab34.easy.inet.fi) joined #haskell 09:04:42 --- quit: Vutral (Read error: 110 (Connection timed out)) 09:18:04 --- quit: Vutra_ (Read error: 110 (Connection timed out)) 09:51:53 --- quit: jemfinch (Remote closed the connection) 09:55:48 --- part: Vutr__ left #haskell 10:10:52 --- join: delYsid (mlang@212186194087.graz.teleweb.at) joined #haskell 10:13:55 is there anything in the IO monad to execute another program? 10:14:13 --- quit: delYsid (Remote closed the connection) 10:16:45 Hmmm, I'm not sure there is. How strange. 10:16:59 yeah. :-( 11:01:15 --- quit: shapr (carter.openprojects.net irc.openprojects.net) 11:05:57 My god, it's 25 C outside! 11:06:01 In January! 11:06:11 I've seen summer days cooler than this. 11:18:14 --- quit: dennisb (Read error: 113 (No route to host)) 12:08:58 --- join: dennisb (~dennis@as2-4-3.an.g.bonet.se) joined #haskell 12:10:16 Linux deadlocked an hour ago.. this computer usually is very stable with uptimes in months.. I probably missed all the nice discussions now.. 12:14:04 what kernel? 12:14:46 2.4.17-vanilla? 12:14:51 2.4.17 is known buggy 12:15:07 try 2.4.18-pre7-ac1 12:16:38 I can also try to reproduce your bug and fix it 12:16:48 I run rh72 (2.4.9) 12:17:06 it's not easy to reproduce since I have no idea what caused it 12:17:11 ouch, 2.4.9 has problems... can you try a rawhide problem? 12:17:17 rawhide kernel? 12:17:45 the computer have been running since three weeks before it deadlocked. 12:18:14 well, i can't see if it is better anyway until it maybe crashes again 12:18:45 but it is a very unpleasent feeling to know that it might lock up again 12:19:43 there is nothing in the logs showing anything 12:20:04 the -ac kernels after 2.4.17 pass stress-kernel 12:20:20 (then again the 2.4.9 RH7.2 kernel did too) 12:21:08 yes, and I have one of the via-chipset computers that was not so good in 2.4.10 - 2.4.16, at least it looked like it on lkml 12:21:21 are you connected to rh in any way? 12:21:50 No, but I am a Linux kernel programmer working for IBM. I work with Rik van Riel on the rmap VM. 12:22:28 aha, nice. I usually read lkml (well, some mails every day) so I know about it at least 12:22:45 I'm in ac's changelogs =) 12:23:00 me too, I fixed a network driver for 2.2.20 12:23:09 nice 12:23:10 but that's about it 12:23:30 I show up in riel's changelogs more than anything else 12:24:03 i just did some small backporting from 2.4 in order for my old server to work better, it still runs rh6.2 (with latest upgrades) 12:24:49 I've got some cleanups to do anyway... 12:25:07 well, get started :-) 12:25:18 I guess you talk about real cleaning.. 12:25:36 some are real, some are cosmetic. 12:27:42 --- join: discobob (discobob@slc175.modem.xmission.com) joined #haskell 12:28:42 what's wrong with 2.4.17? 12:29:14 nothing in perticular 12:30:03 [20:14] 2.4.17 is known buggy 12:30:25 aha, yes. he said that :-) 12:30:46 but on the other hand, most kernels are known buggy :-) 12:30:51 * Heffalump is running it in rather a lot of places 12:31:53 use 2.4.18-pre*-ac* 12:31:59 much better 12:32:24 I generally prefer vanilla kernels on the grounds that those tend to get the most testing, unless there's a known reason not to 12:32:35 Rawhide kernels are also very good -- ac basically took a bunch of Rawhide stuff for his stuff. 12:32:59 mainline VM is known broken -- at the very least apply the -aa if -rmap is too extreme 12:33:06 elevation.hs:32: 12:33:06 Varying number of arguments for function `labelBuildings'' 12:33:15 labelBuildings' :: Int -> [Building] -> [Building] 12:33:15 labelBuildings' n [] = [] 12:33:16 Those are lines 31 and 32. 12:33:31 what's 33? 12:33:47 yes, you have an other case with a different number of args? 12:36:02 Heh, I forgot a @. :P 12:36:30 what *is* ":P", btw? 12:36:57 cos if it means to you what it does to me, you must go round with your tongue permanently stuck out 12:38:00 xbill: in what circumstances does it break? 12:40:33 I guess I do. 12:40:35 :P 12:41:32 * Heffalump repeats his question about executing external programs from Haskell 12:41:49 I haven't bothered to try that yet. 12:41:54 I see there's a Posix module. 12:42:00 ahah! 12:42:01 It didn't seem to offer the equivalent of popen, though. 12:42:05 * Heffalump should look at that 12:42:05 popen? 12:42:10 man 3 popen 12:43:47 ah 12:44:56 i've seen some small extra layer that someone wrote that gives that 12:45:15 but it's not so hard to do yourself 12:46:05 running external programs (like "system") or piping, like popen? 12:47:14 yes 12:47:22 but there is even a nice function 12:47:33 http://www.haskell.org/ghc/docs/latest/set/process-primitives.html 12:47:42 runProcess 12:47:55 it looks good 12:48:06 ahah, ta 12:49:35 umm. Hmm. I actually don't want to fork. 12:49:52 * Heffalump reads GHC docs more carefully 12:50:05 How do you plan on running another process then? 12:50:28 I want to do "system", which AIUI doesn't fork. 12:50:49 AIUI system does fork; exec; 12:50:58 You just want to exec? 12:51:04 Sorry, lag. 12:51:19 igloo: and then waits for SIGCHLD? 12:51:24 * Igloo mutters about evil non-standard stuff while I'm here 12:51:37 Heffalump: man 3 wait 12:51:43 Er, man 2 wait 12:51:55 there is a "system" command in haskell98 12:52:27 dennisb: errm, ok. I must be suffering from spectacular blindness then 12:52:56 I didn't remember seeing one and couldn't see it in the IO library 12:53:08 but it does not give you stdin, out, err 12:53:12 http://www.haskell.org/onlinelibrary/system.html 12:53:17 Yeah, that's why you need a pipe. :P 12:53:48 DOH! 12:54:07 for some reason I failed to look in any file but IO.hs 12:54:23 * Igloo echoes Heff's "Doh!" 12:55:00 thanks :-) 12:55:33 right. The "replace my shell scripts with Haskell scripts project" can continue. 12:56:15 Hmmm, I can't really write my next shell script in Haskell without a portable interpretter 12:56:34 And this really isn't the time to start writing one 12:56:42 where does it need to run? 12:56:44 heh 12:56:50 i've seen some project where they use haskell to create testfunctions for other programs 12:56:56 * Heffalump thinks hugs is fairly portable 12:57:00 Everywhere I have an account and everywhere I might in the future 12:57:02 they had a library with combinators for starting programs and piping between them using a haskell symbol <|> 12:57:14 Oh, the interpretter would need to be written in an interpretted language too 12:57:23 igloo: eeek, why? 12:57:35 why to which? 12:57:45 so you could write haskell that looked like shell scripts (well, to some degree) 12:57:53 the interpreter being written in an interpreted language 12:58:09 dennisb: I don't care what they look like, I've just had enough of bash semantics (or lack thereof) 12:58:37 Well I guess it could compile it automagically, but that would be getting rather nasty 12:58:49 well, I liked the way it looked, things like run "ls -1" <|> run "sort" 12:58:55 Igloo: where do you intend to run this script? 12:58:59 G-code =) 12:59:01 or where do you expect it to be run 12:59:10 Everywhere I have an account. It's to manage config files. 12:59:16 macro-expansion to convert to asm 12:59:30 so installing hugs in all those places might be a bit inconvenient? 12:59:35 mprotect() the generated asm executable and jump to it 13:00:10 Well it means that setting up a new account would require it to make hugs automagically. Which might be interesting. 13:00:11 there are some guys that wrote an x86-assembler using shell-scripts 13:01:10 g-code looks like I would need a g-code interpretter everywhere, which doesn't help much :-) 13:02:58 no 13:02:59 wow, Jonathan Bowen wrote the runhugs manpage 13:03:06 G-code is trivial to convert to asm 13:03:13 the original one that is 13:05:29 gah. .sh != .hs 13:06:26 xb: For any given arch? 13:06:40 Heff: Who's that? 13:07:45 I think he used to be in my old office, or at least used the filing cabinet that is now in that office, since I found a bunch of UK Unix Users Group stuff of his in it 13:09:31 Cool 13:34:26 right. 32 line shell script turned into 53 line Haskell script. 13:43:12 Where is it? 13:45:13 ~ganesh/bin on urchin 13:45:24 dorsync.hs and dorsync.sh 13:49:27 But they do different things 13:49:35 in what way? 13:49:50 note that the stuff at the bottom that's commented out in the shell script isn't run by the Haskell program 13:50:32 The omitting stuff 13:51:31 http://urchin.earth.li/~ganesh/ for anyone else interested, btw, not that my code is nice or does anything interesting 13:51:45 igloo: oh, sorry, I subtracted that number of lines when I gave the figure above 13:52:09 the balance is now 55-32 after some changes 13:52:50 I think you can lose the second joinWith one if you do joinWith sep (x:xs) = x ++ concat (map (sep ++) xs) 13:53:29 I don't care, that's my standard joinWith definition. Almost every program I write ends up with it somewhere :-) 13:53:36 Have you accounted for the fact that some of the .sh lines are > 80 chars whereas you've wrapped the .hs? 13:53:42 :-) 13:53:59 nope 13:54:17 the overall point is that the Haskell is clearly longer 13:54:19 (but nicer) 14:03:44 --- join: shapr (~user@p-c2fbab34.easy.inet.fi) joined #haskell 14:04:30 hiya 14:04:53 hmm. I wonder if I could get a "go away or I shall replace you with an extremely small Haskell script" T-shirt 14:05:39 heh 14:05:42 why not :) 14:05:58 [I've just been rewriting a shell script in Haskell] 14:06:07 cool, can I see the before and after? 14:06:28 http://urchin.earth.li/~ganesh/ dorsync.sh and dorsync.hs 14:06:33 w00 14:06:36 * shapr checks it out 14:06:39 it's rather icky code 14:06:58 #lisp says it best: 14:06:59 *** #lisp topic: Our mantra: Good code is written code - http://www.paulgraham.com/carl.html - go write apps! 14:07:01 cos I just wanted to get it working for now, rather than do the right abstractions 14:19:07 Heffalump: joinWith sep ss = concat $ intersperse sep ss 14:19:28 (intersperse from the List module) 14:20:17 ta 14:20:39 * Heffalump makes a mental note to use that in future then 14:36:09 --- topic: set to 'Have a library you'd like to donate, or one you'd like to see? Talk to us at http://sf.net/projects/haskell-libs/ | we be loggin' http://tunes.org/~nef/logs/haskell/ | welcome to the Haskell Dojo | julien is up to white belt! jewel and shapr are up to green belt! (shapr, 03:44:16 01/26/02)' by shapr 14:36:17 --- topic: set to 'Have a library you'd like to donate, or one you'd like to see? Talk to us at http://sf.net/projects/haskell-libs/ | we be loggin' http://tunes.org/~nef/logs/haskell/ | welcome to the Haskell Dojo | julien is up to white belt! jewel and shapr are up to green belt!' by shapr 14:36:19 ahem :) 14:36:47 * Heffalump decides that a library for writing shell scripts in Haskell is called for, and tries to work out what it should have 14:37:01 * shapr agrees 14:37:39 oh well. bedtime. cya later. 14:37:43 night 14:37:57 g'night! 14:49:54 Hmm. 14:50:22 ? 14:50:35 That's just my generic proclamation of "Logan is here!" 14:50:40 oh 14:50:41 hi Logan 14:50:42 It means that you should rejoice. 14:50:45 Hello. 14:51:35 * shapr rejoices 14:55:27 * shapr entertains himself with Heffalump's idea 14:55:31 http://haskell.org/wiki/wiki?HaskellPurityTest 14:56:09 If you mean writing a purity test I think it was my idea 14:56:18 oh, I'm sorry, you're right 14:56:37 The more imperative constructs you've used, the less pure you are? 14:57:09 * Igloo wonders if a library counts for the bug fixing 14:57:12 * shapr fixes the purity test 14:57:16 bah 14:57:18 Igloo: I think so 14:57:23 yusri: you scremt? 14:57:32 (the 'yusri is here proclamation') 14:57:40 oh! 14:57:45 ;) 14:58:09 Oh, I've found problems with compiling GHC on Solaris/Intel anyway 14:58:26 oh, I think bugs in a library count for less than bugs in the binary 14:58:50 Have you reinvented a dozen prelude functions? :P 14:59:05 heh! 14:59:20 "Have you ever found an error in the report" 14:59:39 "Have you ever IRCed on #haskell on OPN" 15:00:00 heh! 15:00:03 quick, add them! 15:00:07 * shapr grins 15:00:19 But then I'd be using the wiki :-P 15:00:39 oh 15:00:45 I guess your questions will be lost forever then 15:00:56 * shapr tries to blackmail Igloo into using the wiki 15:01:00 ;-> 15:02:16 Then the wiki will not grow and wall fall into obscurity 15:02:22 s/wall/will/ 15:02:26 Mua ha ha ha ha! 15:02:33 oh you're cruel. 15:02:35 :-P 15:02:42 I do my best 15:02:59 see, if you use the wiki, then it will continue to grow and be fruitful. 15:03:25 Exactly. Hence me not using it :-) 15:03:33 hrm 15:03:48 you don't want the HaskellWiki to succeed? 15:04:04 I'll make a deal with you - if you write a wiki in Haskell which does cunning things for conflict resolution then I'll use it 15:04:15 ouch 15:04:17 well 15:04:20 ok 15:04:47 I just got a reply from MarkoSchuetz about HaskellWikiInHaskell two days ago, and I'm still following up on it 8-) 15:05:16 how about "if a HaskellWikiInHaskell which does cunning conflict resolution exists" then you will use it? 15:05:47 I'm not particularly fussed who writes it if that's what you mean :-) 15:06:04 awright, it's good! 15:07:56 Conflict resolution? 15:08:31 If someone updates the page while you are editting it 15:08:33 Wiki seems vaguely similar to my roommate's project, http://planetmath.org 15:08:39 Concurrency. 15:08:50 If I were implementing a wiki, I'd probably use CVS. :P 15:09:07 some already do 15:12:58 I'm not very familiar with the Wiki world. :P 15:13:15 It seems very Stephensonesque. :P 15:13:16 I nearly a WikiFixture :-/ 15:13:21 really? 15:15:47 pywiki is cvs-based, true? 15:16:03 er, possibly 15:16:22 I believe I read that somewhere 15:16:56 Actually, I wrote a wikiesque training system for work a while back- it was quite fun to write. 15:17:39 cool :) 15:18:49 python :) 15:19:56 I like python. 15:20:06 so do i. 15:20:13 I like haskell. 15:20:36 me too 15:20:44 actually, I like a lot of things. 15:20:48 me too! 15:20:51 I've never been called 'selective" 15:20:55 including people who like a lot of things ;) 15:20:56 * yusri shrugs 15:21:04 * yusri grins 15:21:04 enthusiasm is far better than apathy. 15:21:09 I agree. 15:22:18 I had a q for you a day or so ago about python list comprehensions- but I've forgotten it. 15:22:47 what do you want to know about them? 15:23:08 ah- 15:23:11 I recall 15:23:32 is there any way to do test items for inclusion? as in... 15:23:56 [ x | x<-xs , x > 3 && x < 99 ] 15:24:02 (the comma sections) 15:24:16 or section, rather 15:24:34 what about using in? 15:24:51 well, I mean for more complicated example than numbers 15:25:05 yah, that's what I mean :) 15:25:19 for example... 15:25:31 [ x for x in stringList (want to test x for a re.match here) ] 15:25:40 ok 15:25:40 if you want to accept something in a python function only if it's a sequence type 15:26:07 * yusri nods and listens 15:26:10 then you can use if type(myArg) in [type(()), type([]), type('')] 15:26:20 it's `elem` in haskell 15:26:45 as in: 15:27:07 [ x if re.match('text', x) for x in stringList ] 15:27:08 ? 15:27:20 yah, that should work 15:27:27 hmmm- will try it, tks 15:27:34 you just gotta remember how true and false works in Python :) 15:28:08 well, re.match returns None if it doesn't match, so it should work 15:28:38 I vaguely recall that there are some situations in which you get stuff anyway... 15:28:46 I don't remember the details though 15:28:59 I'll look into that too- :) 15:29:05 ok :) 15:29:52 btw, list.pop() is an underappreciated function in Python 15:30:14 er, [].pop() 15:30:35 * yusri nods 15:31:05 python doesn't like that 'if' 15:31:15 I once saw a cute idiom: while myList: list.pop(0); do stuff with the item 15:31:18 hrm 15:31:23 * shapr grabs an interpreter 15:32:07 what exactly did you put in? 15:32:33 [ x if re.match('te', x) for x in me ] 15:32:44 me = ['test','here','again'] 15:33:06 (obviously me before the list comp) 15:33:53 I've also tried: [ x for x in me: if re.match('te', x) ] 15:34:07 But I didn't expect that to work 15:34:19 [ x for x in ['test','here','again'] if re.match('te',x) ] 15:34:21 works for me 15:34:32 the colon, maybe 15:34:50 yep 15:34:52 there we go 15:34:55 solved- tks 15:35:08 maybe the for has to be before the if? 15:35:09 I dunno 15:35:23 yeah, i guess so. 15:35:33 kinda odd 15:35:41 * shapr tries the equivalent stuff in haskell 15:35:59 very 'modifier'-like (rare) for python 15:36:09 ? 15:36:26 if param == value 15:36:45 perlish 15:36:46 duhh 15:36:54 haskell doesn't take strings with single quotes 15:36:57 * shapr bonks his head 15:36:58 right 15:37:04 I keep forgetting that 15:37:12 especially since I suaully write them that way 15:37:30 it's amusing when in one day I might write elisp, java, python, haskell, and joy code 15:37:35 reverse "su" 15:37:48 joy? 15:37:52 and soon I'll probably be adding SQL and visual basic to that per-day list 15:38:03 joy: http://www.latrobe.edu.au/philosophy/phimvt/joy.html 15:38:10 * yusri nods 15:38:14 kind of like Forth meets Haskell, and they have kids. 15:38:30 Joy is a stack-based functional concatenative lang 15:38:39 My daily rota involves Python (at work), Ruby & Haskell (at home) 15:39:37 at work I prototype a Java program in Jython, within Emacs 15:40:06 at home I play with Joy and Haskell in Emacs (and do Zope stuff on the side) 15:40:21 * yusri wishes he knew how to use emacs for development 15:40:27 I'm a vi-guy, I guess 15:40:29 emacs is nice 15:40:32 so is vi 15:40:42 you just gotta make you use one of them really well 15:40:48 or whatever editor you use 15:41:23 true 15:43:37 crap 15:43:43 ? 15:43:52 MarkoSchuetz no longer works at nextsolutions.co.jp 15:44:05 or at least, his mail bounced 15:44:40 mailto:marko@cs.uni-frankfurt.de 15:45:40 er, no... sorry 15:45:44 FrankChristoph 15:45:50 I already got a reply from Marko 15:47:00 hmmm... 15:48:41 I'm trying to track down a copy of the HaskellWikiInHaskell 15:48:55 yeah- that would be interesting 15:51:49 hmm- can't even find it on c2.com's LongListOfWikiClones 15:52:15 did marko say frank has a copy? 15:53:23 yah, he wrote it. 15:53:25 frank did 15:54:06 last msg I can find from FrankChristoph on google is from '98 15:54:28 marko also gave me the email address of the current sysadmin of that box 15:54:34 maybe it's still up there. 15:54:39 if not, then I guess it's time to start over. 15:54:51 or maybe email WardCunningham about his HaskellWiki thoughts 15:56:39 I found a few 99 ones 15:56:48 same addy 15:58:51 well, that's somewhat comforting :) 15:59:14 at this point, it may be simpler to email the haskell list 15:59:32 brb 15:59:52 --- quit: yusri (Remote closed the connection) 16:04:43 --- join: yusri (~bruce@pcp415718pcs.martnz01.ga.comcast.net) joined #haskell 16:05:19 ok- X was acting up 16:05:45 my uptime was somewhere over a month, too- that annoys me. 16:06:12 did you have to reboot your whole machine to fix the X problem? 16:06:36 it was 'sticking' at intervals 16:06:43 sounds bad 16:06:46 during halt there were a few scsi errors 16:06:47 * xbill gets that under heavy load. 16:07:08 Never had that problem before. Will be watching carefully 16:09:49 * xbill notes -- do *NOT* look at scsi_dma.c and expect to retain your sanity. 16:37:26 * yusri hates c, so that likely wont be a problem ;) 17:16:45 --- join: jao (~jao@62-36-95-79.dialup.uni2.es) joined #haskell 17:23:56 * xbill grinds out more kernel garbage. 17:46:26 --- quit: discobob ("Client Exiting") 18:59:47 --- quit: jao ("leaving") 20:53:38 --- quit: juhp (Remote closed the connection) 20:54:34 --- join: juhp (~petersen@firebox-ext.jp.redhat.com) joined #haskell 20:56:10 --- join: nori (null@ppp-49-149.26-151.libero.it) joined #haskell 20:56:13 --- part: nori left #haskell 21:24:43 --- quit: juhp (Remote closed the connection) 21:26:13 --- join: juhp (~petersen@firebox-ext.jp.redhat.com) joined #haskell 21:30:08 --- quit: xbill ("Leaving") 21:35:40 --- join: xbill (wli@DOMINIA.MIT.EDU) joined #haskell 22:14:01 --- quit: dennisb (carter.openprojects.net irc.openprojects.net) 22:27:19 --- join: dennisb (~dennis@as2-4-3.an.g.bonet.se) joined #haskell 22:35:57 --- quit: xbill ("Leaving") 22:48:57 --- join: xbill (wli@DOMINIA.MIT.EDU) joined #haskell 23:46:16 * shapr SPRINGS awake! 23:46:28 goooood morning #haskell!!! 23:47:29 morning 23:50:56 anything exciting happening? 23:52:17 nope. 23:54:02 oh 23:59:59 --- log: ended haskell/02.01.30