00:00:00 --- log: started haskell/06.09.23 00:08:20 > [id] <*> [()] 00:08:21 Not in scope: `<*>' 00:08:43 what's this <*> ? 00:08:49 is it an arrow combinator? 00:08:49 Control.Applicative 00:08:55 ah , I'll bring it in 00:09:05 <*> is Monad's ap 00:09:42 --- join: Krooga (n=nospam@cust3634.vic01.dataco.com.au) joined #haskell 00:09:42 ah, its too new. i'll need to install a 6.6 snapshot first 00:10:03 ahh 00:10:14 are the 6.6 snapshots different than the 6.5 ones? 00:10:28 no, a 6.5 snapshot is what I mean :) 00:10:31 what is to become 6.6 00:10:43 I was about to hit the download button ;) 00:12:22 * glguy is watching youtube videos of Efren Reyes kick serious serious ass in 9-ball 00:13:56 when he's done with people in these finals and semi-finals matches, they look like are grateful to have been schooled so thoroughly 00:14:04 they* 00:14:32 many sports are like that - I just got back from squash training - sometimes I play Brett Marti 00:14:34 *Martin 00:14:45 or Craig Rowland 00:15:20 to be honest, I don't know what squash is, or who those people are 00:15:35 former world #2 and #7 respectively 00:15:45 squash is a sport that is unfortunately not popular in the US 00:16:05 sadly :( 00:16:13 * dons chooses squash too 00:16:16 indeed 00:16:23 how similar is it to racketball? 00:16:29 yes, similar. 00:16:38 glguy, racquetball is a spawn of squash - the court is a tad larger, otherwise it's the same 00:16:56 --- join: russo (n=russo@ppp83-237-63-39.pppoe.mtu-net.ru) joined #haskell 00:17:00 I've played racquetball at least 00:17:04 different racquet and ball 00:17:13 dibblego: oh, btw, in response to your feedback yesterday, i put up, http://www.cse.unsw.edu.au/~dons/data/Basics.html 00:17:15 Title: Haskell Unix Tools, http://tinyurl.com/zq2lk 00:17:18 extended version 00:17:20 dons, cool thanks 00:17:47 got a lot of interest out there in blog land, before haskell.org went down this morning. so thanks for the inspiration! 00:18:08 no problem - I'm going to write an article soon and make mention of the Maybe monad 00:18:23 mmm. tasty. 00:18:29 let me know if you want some proof reading or feedback 00:18:32 it will be on Java though 00:18:35 I will thanks 00:19:00 --- join: boegel_ (n=boegel@86-39-73-81.customer.fulladsl.be) joined #haskell 00:19:41 --- quit: boegel (Read error: 104 (Connection reset by peer)) 00:19:55 --- nick: boegel_ -> boegel 00:19:55 > (\w -> foldl (\r b -> if testBit w b then setBit r (8-b) else r) 0 [0..7]) (1 :: Word8) :: Word8 00:19:57 0 00:19:59 --- join: Itkovian (n=Itkovian@d54C4B834.access.telenet.be) joined #haskell 00:21:04 Itkovian: can you bring haskell.org back up with magic tele-computational powers? 00:23:21 --- join: sslow (n=siganos@ppp2-103.adsl.forthnet.gr) joined #haskell 00:26:23 --- quit: dfeuer ("Leaving") 00:27:25 Australian squash players are far more successful than our tennis players, soccer team and all those popular sports 00:28:35 --- quit: Stinger_ (Remote closed the connection) 00:28:49 --- quit: alkoma ("BitchX-1.1-final -- just do it.") 00:29:20 I remember a couple of months back when Palmer won one of the big touraments while he was #1, it got a mention on the radio 00:29:26 *tournaments 00:31:09 --- join: goltrpoat (n=goltrpoa@cpe-72-179-21-113.austin.res.rr.com) joined #haskell 00:31:26 has haskell.org been down all day? 00:31:32 oh.. nm, just saw the topic 00:32:43 i heard there's GADT-style record syntax in 6.5, and with the site being down, it takes an inordinate amount of time to figure out what that syntax could possibly be. 00:33:03 --- join: paolino (n=paolino@151.82.6.126) joined #haskell 00:33:17 > (\w -> foldr (\b r -> if not $ testBit w b then setBit r (8-b) else r) 0 [0..7]) (0 :: Word8) :: Word8 00:33:18 254 00:33:47 what is wrong with this ^^^ code? (It's supposed to reverse the bits in a Word8) 00:34:18 @arr 00:34:18 Yo ho ho, and a bottle of rum! 00:34:52 > (\w -> foldr (\b r -> if not $ testBit w b then setBit r (7-b) else r) 0 [0..7]) (0 :: Word8) :: Word8 00:34:54 255 00:34:58 :) 00:36:08 --- quit: sslow () 00:37:56 --- join: roconnor (n=roconnor@g33218.upc-g.chello.nl) joined #haskell 00:39:45 --- join: dfeuer (n=topolog@wikimedia/Dfeuer) joined #haskell 00:40:15 --- nick: eno -> eno-away 00:40:32 I'm reading a l-t-u thread... and someone really needs to announce that Haskell has a printf function 00:42:24 url? 00:42:31 http://lambda-the-ultimate.org/node/186 00:42:33 Title: New Paul Graham thing... | Lambda the Ultimate 00:42:43 --- quit: boegel ("This computer has gone to sleep") 00:43:03 there's a sub-thread (if you will) where people go on and on about how having a printf function allows idiots to debug C programs or something 00:43:10 LtU is weird. there are some remarkably intelligent people posting here and there, and then there are entire threads that just make you cringe 00:45:33 --- quit: Itkovian () 00:45:35 printf is a laborious and quite flawed method of problem resolution 00:46:24 it's something they do at IBM and if you don't, then you're not very clever 00:46:49 (seriously) 00:47:08 I've witnessed some amazing use of the debugger at work 00:47:13 the win32 debugger 00:47:34 printf has nothing to do with it 00:47:41 goltrpoat: yes.I agree 00:48:00 the internet is full of people with 5s attention spans 00:48:16 what are you talking about? 00:48:22 * glguy kids, of course 00:48:29 heh 00:49:17 dons: btw, been meaning to ask you this.. how well does hsplugins work under windows? 00:49:29 n.b. we have a GHCi.Debugger now too 00:49:39 I guess people on LtU don't read the HWN 00:49:44 goltrpoat: seems to work fine, afaik. 00:49:48 it's in use by a number of people 00:50:02 but you'll want ghc 6.4.2 or earlier. hs-plugins hasn't been ported to 6.6 yet 00:50:11 yah, ive noticed it's in use by a number of people, just wasn't sure what platform those people were on 00:50:19 i'm in a bit of an interop bind 00:50:26 --- join: slipstream (n=slipstre@ppp83-237-55-217.pppoe.mtu-net.ru) joined #haskell 00:50:36 no, I mean i know its used on windows by a number of people 00:50:37 dons: is the debugger work in my snapshot build from the 19th? 00:50:43 ah cool. 00:50:55 hmm, glguy not sure. might have to be enabled? 00:51:02 --- part: edwardk_ left #haskell 00:51:02 what are the issues with 6.6? 00:51:10 it's too good 00:51:15 * glguy doesn't know 00:51:24 small change to the .hi file format, and Typeable has been fixed, meaning I can toss out some code in hs-plugins 00:52:24 basically -- long story short, i have a compiler for a DSL, a relative large project, in C++. it's about 75% done, but ive written a few DSLs in haskell, and i figure it'll take less time to port the whole thing to haskell and finish up the remaining 25%, than it would to finish it up in c++ 00:52:52 trouble is, we can't include gcc in the toolchain, and this requires a fairly stupid amount of rather intricate interop with C++ 00:54:13 i should be able to handle it all through discovering exports in dlls, but ive been rather reticent to get too deep into that. 00:54:28 since win32-specific stuff seems to be rather poorly handled, in general. 00:54:50 goltrpoat: "discovering exports in dlls" you just mean dynamic linking? (like POSIX's dlopen, dlsym?) 00:55:06 dons: Lemmih was hacking with ghc-api instead of hs-plugins for hIDE. will (some) functionality of hs-plugins go into ghc itself? 00:55:55 --- quit: slipstream-- (Read error: 104 (Connection reset by peer)) 00:56:09 glguy: there is a reflection system on the C++ side, that exports type information. our other interop mechanisms tend to go both ways -- so the satellite language can muck around with C++ types based on the metadata, and the native side can muck with the satellite language types. 00:56:24 component dlls export their reflected typeinfo. 00:56:24 ah 00:56:46 Anything I've done with reflection has been in a .NET environment 00:57:01 yah, it's basically very much along the lines of .NET reflection 00:57:44 we actually have a bridge that takes native reflected types to .NET reflected types and back. 00:58:05 --- quit: NamelessOne (Read error: 104 (Connection reset by peer)) 00:58:23 i don't need to construct haskell types from metadata, but i do need to get hold of the metadata in order for the compiler to validate the syntax. 00:59:08 --- quit: ofer0 (Read error: 60 (Operation timed out)) 00:59:19 anyway, the point was that i either have to write a static lib in c, have it load up the component dlls and export the kit and kaboodle to the haskell-side compiler via FFI, or load stuff up dynamically, or have the compiler itself loaded up dynamically. 00:59:29 hence the question. pardon the long-winded explanation. 00:59:50 --- join: sslow (n=siganos@ppp2-103.adsl.forthnet.gr) joined #haskell 01:02:31 (oh and we're trying to use visual haskell, so rolling back to 6.4.2 would be a bitch in quite a number of ways) 01:02:40 --- quit: dibblego (Read error: 104 (Connection reset by peer)) 01:02:52 well, I haven't done any FFI stuff, so I can't help you there, though I find your problem interesting 01:03:01 and I also enjoy using visual haskell 01:03:24 yah i hope someone's doing the 2005 version 01:03:32 "Haskell, for example, seems to me a language that's designed more to write papers about than to hack in" 01:03:34 hahaha 01:03:42 * gour hopes we'll get hiDE someday 01:06:01 --- quit: weitzman (Read error: 110 (Connection timed out)) 01:06:02 glguy: do you know if there's a way to like.. regain mouseover type info and such with -fglasgow-exts? 01:06:44 goltrpoat: I add {-# GHC_OPTIONS -fglasgow-exts #-} to the top of my source file 01:06:51 i mean, i'd understand if it disappeared on instances of multiparameter typeclasses and whatnot, but it just disappears on the whole thing 01:06:52 instead of changing the compiler flags 01:06:53 yeah, same here 01:06:56 ok 01:07:12 you mean OPTIONS_GHC 01:07:14 ? 01:07:31 I don't think so... 01:07:52 well then. 01:07:55 that works. 01:07:56 thanks :) 01:08:09 glad to help with at least one thing ;) 01:08:19 and now it's my bed time 01:08:20 .. 01:08:23 + 3 hours 01:08:27 * glguy & 01:08:30 later 01:09:29 --- join: kaol_ (n=kaol@sammakko.yok.utu.fi) joined #haskell 01:15:11 moin 01:17:05 --- join: kep__ (n=const@nat-175-12.yapic.net) joined #haskell 01:19:45 --- quit: kaol (Read error: 110 (Connection timed out)) 01:19:49 --- quit: dfeuer ("Leaving") 01:24:19 don't suppose anyone's compiled a list of proposed extensions to the kind system that actually leave type inference decidable 01:29:13 --- nick: tmoertel_away -> tmoertel 01:29:38 I thought that typing was no longer decidable? (With extensions) 01:29:58 sorry, minus extensions 01:31:01 i'm trying to wrap my head around what makes it decidable actually. can the kind system be context free? 01:31:09 --- join: Bourbaki (n=Miranda@p50915A77.dip.t-dialin.net) joined #haskell 01:31:10 --- quit: jgrimes (Read error: 110 (Connection timed out)) 01:31:10 moin 01:31:13 as a language in itself i mean 01:33:28 --- join: jgrimes (n=jgrimes@Lee-10-101.rh.ncsu.edu) joined #haskell 01:40:16 --- quit: sslow () 01:50:02 dons, is dcoutts in transit from ICFP? 01:52:05 --- join: mnislaih (n=pepe@81-202-140-205.user.ono.com) joined #haskell 01:53:40 --- join: Bobstopper (n=bobstopp@luckynet229075.luckynet.jp) joined #haskell 01:58:38 --- quit: mjk ("KVIrc 3.2.0 'Realia'") 02:00:12 foxy, no 02:01:48 foxy, have you got the latest c2hs darcs version? I thought we'd updated it. 02:05:39 dcoutts__, there's a problem with patch 107 in the c2hs darcs repo which prevents windows darcs from applying 02:07:01 hmm 02:07:35 dcoutts__, I worked around that by going via linux 02:08:24 dcoutts__: but I still have the same problem /using/ c2hs 02:08:48 you mean building it? 02:08:54 with 6.5 02:09:16 dcoutts__, It built fine with 6.5, but the install step doesn't work, so I did that by hand 02:09:50 dcoutt__, my problem is that I get: 02:09:51 c2hs.exe: Errors during expansion of binding hooks: 02:09:53 MxMatrix.chs:5: (column 8) [ERROR] 02:09:54 >>> Unknown identifier! 02:09:56 Cannot find a definition for `mxClassID' in the header file. 02:10:12 but `mxClassID' is definitely in the header file I'm trying to bind to 02:10:33 perhaps you could send a bug report with the details to the c2hs list 02:11:07 darcs + windows seems quite buggy (there is also a problem with the fps repo on windows darcs) 02:11:51 --- quit: beelsebob () 02:13:47 dcoutts__, where is the c2hs list and what should I include in the bug report? 02:14:10 c2hs@haskell.org 02:14:53 say the problems with 6.5, with darcs/windows and your binding error 02:15:17 including a reference to the header file and .chs you were using 02:16:23 ok, thanks 02:21:13 dcoutts__, do I need to join the mailing list to send to it? 02:22:09 I don't think so 02:22:28 I think it required that. But you could post through gmane without joining 02:23:13 (most of the haskell.org lists do to avoid too many spam problems) 02:23:13 --- nick: tmoertel -> tmoertel_away 02:23:57 --- join: damkor (n=ivan@132.Red-88-9-149.dynamicIP.rima-tde.net) joined #haskell 02:24:24 dcoutts__, you told me a few weeks ago how to check what the preprocessor was reading when invoking c2hs, could you refresh my memory? 02:25:39 foxy you can override the cpp that's used 02:25:39 eg with echo 02:25:39 that shows what it's being called with 02:25:57 hi there, I've got a question about haskell packages 02:26:05 dcoutts__, I want to check that the .h file I'm including gets read 02:26:21 is there any way to include a compiled package with my sources 02:26:46 so that the sources can be compiled using the binary package files? 02:27:06 it tried several ways (primarily using -L option to ghc) 02:27:16 --- join: sslow (n=siganos@ppp2-103.adsl.forthnet.gr) joined #haskell 02:27:20 but it seems to expect the sources anyway 02:27:32 (i mean the library's sources) 02:28:20 --- nick: russo -> russo_TV 02:28:54 --- join: boegel (n=boegel@d54C59E8A.access.telenet.be) joined #haskell 02:29:25 --- nick: tmoertel_away -> tmoertel 02:30:21 @seen shapr 02:30:22 I saw shapr leaving #haskell 10h 3m 37s ago, and . 02:31:21 --- quit: damkor ("leaving") 02:32:13 --- quit: kep__ ("leaving") 02:33:55 @seen ndm 02:33:55 I saw ndm leaving #ghc, #haskell-overflow, #haskell-blah and #haskell 14h 15m 51s ago, and . 02:33:58 @tell ndm this gtk+ windows patch got applied in gtk+ 2.10.4: http://bugzilla.gnome.org/show_bug.cgi?id=340201 02:33:59 Consider it noted. 02:34:37 --- join: Lemmih (n=david@kbhn-vbrg-sr0-vl206-099.perspektivbredband.net) joined #haskell 02:37:36 --- quit: boegel (Read error: 60 (Operation timed out)) 02:40:15 dcoutts__, I now get an error that "the symbol '__attribute__' does not fit here" the file in which this occurs is 'float.h' which is a standard gnu header... 02:41:23 should I report that to the mailing list as well? 02:49:28 --- quit: roconnor (Read error: 110 (Connection timed out)) 02:50:06 --- quit: mnislaih () 02:52:59 --- join: chris2 (n=chris@p549D3ABB.dip0.t-ipconnect.de) joined #haskell 02:56:16 --- join: glauber_sp (n=Glauber@200-168-101-11.dsl.telesp.net.br) joined #haskell 02:56:49 hi guys. goo morning =) (at least here hehe) Does anyone have this paper: http://www.macs.hw.ac.uk/~dsg/gph/papers/abstracts/par-intro.html 02:56:53 Title: Parallel Functional Programming: An Introduction, http://tinyurl.com/mj4zo 02:57:08 the downloaded file doesn't open 02:58:36 It works for me... 02:59:00 --- join: roconnor (n=roconnor@g33218.upc-g.chello.nl) joined #haskell 02:59:34 foxy, with which program do you open? 02:59:53 both the ps and the ps.gz open here and don' t show nothing 02:59:54 ghostscript (the .ps not .ps.gz file) 03:00:26 I get all 19 pages 03:00:41 hum. I'll try again. kpdf and evince didn' t show nothing, only 19 blank pages =/ 03:00:43 have you tried again? Maybe the download terminated incorrectly? 03:00:57 does kpdf read ps files? 03:01:02 --- join: Jaak (n=Jaak@raatuse.aklubi.ee) joined #haskell 03:01:14 I've downloaded 4 times already. and not only today. I'm downloading again 03:01:28 foxy, kghostview =) 03:03:56 foxy, gv gives a stack underflow error. I guess I need to recompile it 03:04:17 foxy, is that glibc 2.4 ? 03:05:10 dcoutts, I use glibc 2.4, why? 03:05:19 any known error? 03:05:28 --- join: poltrgoat (i=goltrpoa@cpe-72-179-21-113.austin.res.rr.com) joined #haskell 03:05:29 c2hs can't parse some of the 2.4 headers yet 03:06:05 dcoutts, hum, I'm not using c2hs eheh 03:06:27 I' m trying to open a ps file only =) 03:09:41 --- join: boegel (n=boegel@86-39-73-81.customer.fulladsl.be) joined #haskell 03:10:13 --- quit: glauber_sp ("Fui embora") 03:10:13 --- nick: tmoertel -> tmoertel_away 03:13:31 dcoutts__, it's mingw 3.4.2, how do I find what version of glibc? 03:13:42 ah, no glibc 03:14:01 well just find the header and send it in 03:14:15 done 03:14:59 the file was _mingw.h, and it is related to dll importing 03:17:40 Why does ReadP not define greedy operators? 03:18:14 --- join: mnislaih (n=pepe@81-202-140-205.user.ono.com) joined #haskell 03:18:25 like: gmany1 p = liftM2 (:) p (gmany1 p <++ return []) 03:21:57 --- quit: goltrpoat (Read error: 110 (Connection timed out)) 03:22:54 someone needs to fix www.haskell.org 03:23:59 --- join: arjanb (i=borganis@borganism.student.utwente.nl) joined #haskell 03:24:59 --- join: Itkovian (n=Itkovian@d54C4B834.access.telenet.be) joined #haskell 03:28:07 @slap haskell.org 03:28:07 * lambdabot beats up haskell.org 03:28:32 --- quit: paolino (Read error: 110 (Connection timed out)) 03:29:42 --- join: NamelessOne (n=lskjdflk@218.22.21.11) joined #haskell 03:33:02 someone should write a book on optimizing haskell programs 03:34:44 poltrgoat: yes, or any advanced level textbook would be nice 03:35:00 dons: why don't you write a couple of haskell books 03:35:15 i was actually thinking that 03:35:15 heh 03:35:18 (re dons i mean) 03:35:45 --- join: cptchaos (n=cptchaos@d054227.adsl.hansenet.de) joined #haskell 03:36:12 I think there's a dire need for some 03:36:19 I guess dons should write a thesis first ;) 03:37:01 Thesis writing is good for you. 03:37:11 At some point I'll get around to it asd well. :) 03:37:40 --- nick: poltrgoat -> goltrpoat 03:39:00 something like "Practical Haskell" would be nice (similar to "Practical Common Lisp") and also "Monads and Arrows in Haskell" and "Design and Implementation of the Glasgow Haskell Compiler" 03:39:57 * Syzygy- would like a comprehensive reference of Haskell that assumes the reader is familiar with category theory to a large extent... :) 03:40:08 * sieni doesn't 03:40:20 --- quit: boegel ("Leaving") 03:41:40 --- quit: xinming (Read error: 110 (Connection timed out)) 03:42:01 Syzygy-: Haskell programs are points in a topological space 03:42:10 Oh, really? Which one? 03:42:19 The program types are the open sets 03:42:29 Program type? 03:42:39 well, function types 03:42:41 Ah. 03:42:52 Is there anything decent to be said about the space? 03:42:53 Haskell functions are points in a topological space 03:42:59 Is it haussdorff, for instance? 03:43:19 hmm 03:43:27 And I don't believe that anybody that claims that he understands category theory before understanding everything in that book: http://www.amazon.co.uk/Introduction-Homological-Cambridge-Advanced-Mathematics/dp/0521559871/sr=8-1/qid=1159008120/ref=sr_1_1/026-8508330-1641259?ie=UTF8&s=books 03:43:31 http://tinyurl.com/hxnpm 03:43:46 Syzygy-: oh wait, forget what I said. I forgot Haskell isn't consistent 03:43:52 so it is the one point space :P 03:43:56 Ah. 03:44:14 perhaps it is the 0 point space 03:44:22 sieni: Oh the dear old Weibel. :) 03:44:24 * roconnor kicks (fix id) 03:44:55 sieni: I'm doing a PhD in group cohomology right now. I use Weibel as a stepping stone to wrap my head around my other references 03:46:23 I got my Ph.D. in Analysis and have tried to read Weibel's book a few times with quite a bad success :-) 03:46:44 Ewwww, analysis. ;) 03:46:50 analysis <3 03:46:54 does everyone here have a phd? 03:46:57 * Syzygy- took my masters in homological algebra as well... 03:47:00 roconnor: Not yet. 03:47:00 except me 03:47:21 roconnor: many are probably in the process of getting one :-) 03:47:38 maybe my friend is right. You need a phd to use Haskell. 03:49:32 sieni: What, more specifically, did you do? 03:50:07 Syzygy-: there are links: http://www.hurmio.org/~ville/ 03:50:12 Title: Ville Hakulinen, Ph.D., kauppat.yo. 03:50:32 Btw, sieni: If you want something really obnoxious in homological algebra, take a look at Dave Benson's books on representations and cohomology. 03:50:50 heh 03:50:59 I haven't been reading much math lately 03:52:04 --- quit: foxy (Read error: 110 (Connection timed out)) 03:54:55 --- join: BCoppens (n=bartcopp@kde/developer/coppens) joined #haskell 04:01:54 --- join: Prip (n=aaa@host163-127-dynamic.19-87-r.retail.telecomitalia.it) joined #haskell 04:03:58 --- join: foxy_ (n=chatzill@222-152-203-140.jetstream.xtra.co.nz) joined #haskell 04:04:01 --- nick: foxy_ -> foxy 04:04:22 --- quit: ramkrsna (Read error: 110 (Connection timed out)) 04:05:06 --- join: ramkrsna (n=ramkrsna@unaffiliated/ramkrsna) joined #haskell 04:05:32 how would guys write code to apply some function exactly N times to an initial value? 04:06:39 I have a version using n-k patterns and another taking the Nth element of the list returned by iterate 04:06:46 I'm looking for a more elegant way of expressing it 04:08:15 ? 04:08:16 unfoldr? 04:08:26 isn't iterate just what you need? 04:08:34 ?type iterate 04:08:36 forall a. (a -> a) -> a -> [a] 04:08:41 or do you need to fold it? 04:08:44 take N $ iterate f element 04:08:48 oops 04:09:14 I have a version using iterate 04:09:24 ?type unfoldr 04:09:25 forall a b. (b -> Maybe (a, b)) -> b -> [a] 04:09:33 > take 10 $ scanl (\a b -> a+b) 0 [1..] 04:09:34 [0,1,3,6,10,15,21,28,36,45] 04:09:42 that would be 04:09:54 > iterate (+1) 8 !! 5 04:09:56 13 04:10:02 ?let applicate n f x = iterate f x !! n 04:10:03 Defined. 04:10:09 yes that's what I have already :-P 04:10:11 I want something else. 04:10:16 why? 04:10:27 --- quit: ikegami-- (Remote closed the connection) 04:10:46 something more function-level oriented, where I would construct the function application n times 04:10:57 like with some replicate/fold ($) thing 04:11:41 but I can't figure out how to write it this way 04:11:53 @pl \x y z -> iterate x y !! z 04:11:53 ((!!) .) . iterate 04:11:54 --- join: IainFraser (n=wizhard@cpc1-nott4-0-0-cust559.nott.cable.ntl.com) joined #haskell 04:12:07 --- part: IainFraser left #haskell 04:12:52 --- quit: cptchaos ("Download Gaim: http://gaim.sourceforge.net/") 04:13:25 --- join: foxy_ (n=chatzill@222-152-203-140.jetstream.xtra.co.nz) joined #haskell 04:14:32 any ideas? 04:17:56 it's only as an exercise I gave to myself, I don't expect this other way to be prettier or more efficient or anything 04:19:21 --- join: cptchaos (n=cptchaos@d054227.adsl.hansenet.de) joined #haskell 04:22:59 (foldl1 (.) .) . replicate? :) 04:23:43 ahh, thanks 04:23:54 I was battling with foldl1 and replicate since 10 minutes 04:24:06 could you give a non-pointfree version? 04:24:13 wilx: that's completely unreadable ;-) 04:24:40 \n f -> foldl1 (.) (replicate n f) 04:25:11 damn, I was only doing foldl1 ($) instead of foldl1 (.) 04:25:15 I was near 04:25:16 thanks. 04:26:31 well, isn't ($) like id or something? 04:27:03 @pl \x -> 04:27:03 --- join: boegel (n=boegel@86-39-73-81.customer.fulladsl.be) joined #haskell 04:27:04 (line 1, column 6): 04:27:04 unexpected end of input 04:27:04 expecting lambda abstraction or expression 04:27:09 @pl \x -> ($) x 04:27:10 id 04:27:14 ^_^ 04:27:38 @type ($) 04:27:39 forall b a. (a -> b) -> a -> b 04:27:44 I'd call that function application 04:28:13 --- quit: dcoutts__ (Remote closed the connection) 04:28:22 I was expecting the fold to produce something like 04:28:27 f $ f $ f $ f $ f x 04:28:33 > (+2) . 3 04:28:35 add an instance declaration for (Num (a -> b)) 04:28:36 which would be valid 04:28:42 > (+2) $ 3 04:28:44 5 04:28:54 @type (.) 04:28:56 forall c a b. (b -> c) -> (a -> b) -> a -> c 04:29:19 > (+2) . (+3) 04:29:21 Add a type signature 04:29:52 @pl (+2) . (+3) 04:29:53 (5 +) 04:32:33 --- quit: foxy (Read error: 110 (Connection timed out)) 04:35:35 --- quit: mnislaih (Read error: 110 (Connection timed out)) 04:35:47 --- quit: iblechbot (Read error: 110 (Connection timed out)) 04:39:37 --- join: xinming (n=xinming@222.212.1.74) joined #haskell 04:40:20 @pl (+2) . (3+) 04:40:21 (5 +) 04:45:19 --- nick: kaol_ -> kaol 04:51:37 --- join: pierre- (n=pierre@85.249.253.211) joined #haskell 04:53:45 --- join: Stinger_ (i=stinger@219-90-224-73.ip.adam.com.au) joined #haskell 04:54:08 what's the diff between uncheckedShiftRL# and shift? 04:54:17 @hoogle uncheckedShiftRL 04:54:18 No matches found 04:54:32 ?fptools GHC.Word 04:54:32 GHC.Word not available 04:55:37 Shift right logical. Result undefined if shift amount is not in the range 0 to word size - 1 inclusive. 04:55:42 ah thanks roconnor 04:55:48 ?karma+ roconnor 04:55:49 You can't change your own karma, silly. 04:57:17 @hoogle rotate 04:57:18 Data.Bits.rotate :: Bits a => a -> Int -> a 04:57:18 Data.Bits.rotateL :: Bits a => a -> Int -> a 04:57:18 Data.Bits.rotateR :: Bits a => a -> Int -> a 04:57:26 @fptools Data.Bists 04:57:26 Data.Bists not available 04:57:29 @fptools Data.Bits 04:57:29 http://darcs.haskell.org/packages/base/Data/Bits.hs 04:57:40 ?karma+ lambdabot 04:57:41 lambdabot's karma raised to 28. 04:58:44 --- quit: kpreid () 04:58:45 --- quit: perspectival () 04:59:22 --- join: kpreid (n=kpreid@24-52-49-37.bflony.adelphia.net) joined #haskell 05:00:25 --- join: iblechbot (n=iblechbo@62.216.196.17) joined #haskell 05:01:23 --- join: perspectival (n=silas@rb4b68.net.upc.cz) joined #haskell 05:03:38 --- join: x8nyl (n=oop@87.203.174.96) joined #haskell 05:05:50 Is there an unchecked rotate for George? 05:06:06 --- join: twanvl (n=twanvl@ip5451f037.direct-adsl.nl) joined #haskell 05:09:04 --- join: erider (n=erider@unaffiliated/erider) joined #haskell 05:10:27 --- join: ProfTeggy (n=grust@p5499870C.dip0.t-ipconnect.de) joined #haskell 05:13:36 where do I find the implementation of GHC primitives such as stg_shiftL32 05:14:41 --- quit: sylvan (Read error: 104 (Connection reset by peer)) 05:16:33 --- quit: foxy_ (Read error: 110 (Connection timed out)) 05:21:53 --- quit: boegel ("Leaving") 05:27:01 ?quote 05:27:01 kolmodin says: I would rather lose my left arm than write it in Java 05:27:08 ?quote 05:27:08 spj says: it looks like hopscotch! (referring to a funny notation for lists) 05:27:15 ?quote 05:27:15 darius says: Well profiling does add a bit of reflection, but it should have the good sense not too go near the barbed wire fences and armed guards. 05:27:36 ?quote 05:27:36 dylan says: I run emacs for the games 05:27:45 :) 05:28:03 I can't find stg_shiftL32 in the ghc sources ... 05:28:41 is it part of extras? 05:30:48 --- join: Heffalump (n=ganesh@urchin.earth.li) joined #haskell 05:30:56 --- join: foxy_ (n=chatzill@222-152-202-225.jetstream.xtra.co.nz) joined #haskell 05:31:00 --- nick: foxy_ -> foxy 05:31:38 any c2hs people around? 05:32:49 --- nick: russo_TV -> russo 05:40:50 --- join: der_eq (n=eq@dslc-082-082-071-139.pools.arcor-ip.net) joined #haskell 05:47:17 --- quit: goltrpoat () 05:48:01 --- join: Philippa_ (n=somewher@cpc1-clif6-0-0-cust591.nott.cable.ntl.com) joined #haskell 05:48:01 --- quit: Philippa (Read error: 104 (Connection reset by peer)) 05:59:56 --- join: foxy_ (n=chatzill@222-152-246-84.jetstream.xtra.co.nz) joined #haskell 06:00:37 dons: your last change in Plugin/Seen.hs broke lambdabot's build for me 06:00:39 ./Plugin/Seen.hs:323:75: parse error on input `)' 06:10:33 yeah, gotta fix it. just unpull that patch for now 06:10:42 ok 06:11:42 hmm. mailing list is back up. 06:11:51 hopefully the web site soon... 06:13:48 --- quit: ProfTeggy ("Sleeping... zzZZ!") 06:14:27 --- quit: russo () 06:16:22 --- join: ndm (n=chatzill@91.84.47.42) joined #haskell 06:16:50 --- quit: dmwit ("I'm flying home! =D") 06:17:01 is haskell.org back yet? i have got some emails through, but cna't get in via http 06:17:01 ndm: You have 1 new message. '/msg lambdabot @messages' to read it. 06:18:35 @tell dcoutts__ cool, i guess they aren't going to fix the "file chooser is wrong" bug though, but its good to see they are pushing forward 06:18:36 Consider it noted. 06:18:55 --- quit: foxy (Read error: 110 (Connection timed out)) 06:19:14 --- join: beelsebob (n=tatd2@DHCP-31.quixotic.org.uk) joined #haskell 06:19:49 --- quit: foxy_ (Read error: 110 (Connection timed out)) 06:21:56 --- join: integral_ (n=bs338@p3m/member/integral) joined #haskell 06:22:24 --- quit: integral (Nick collision from services.) 06:22:36 --- nick: integral_ -> integral 06:24:10 --- join: femol (n=user@201-43-128-194.dsl.telesp.net.br) joined #haskell 06:25:40 --- join: chessguy (n=chessguy@c-69-242-13-143.hsd1.pa.comcast.net) joined #haskell 06:26:53 --- join: crem (n=Rupord@mm-251-157-57-86.adsl.mgts.by) joined #haskell 06:33:57 --- quit: xinming (Read error: 145 (Connection timed out)) 06:34:04 --- quit: crem_ (Read error: 60 (Operation timed out)) 06:38:56 --- join: kisu (i=kisu@2001:618:400:0:0:0:d375:4cd6) joined #haskell 06:40:54 woohoo! haskell.org returns!!!!! 06:41:28 --- join: yip (n=yip@adsl-guttman.tau.ac.il) joined #haskell 06:41:41 WOOOOOOT! 06:41:57 * ndm prepares a release, only a day late... 06:43:07 --- quit: roconnor (Connection timed out) 06:44:13 --- join: sslow_ (n=siganos@ppp105-83.adsl.forthnet.gr) joined #haskell 06:45:26 sup haskell 06:46:17 --- join: abcde` (n=hark@host217-43-84-100.range217-43.btcentralplus.com) joined #haskell 06:47:21 hi yip 06:47:40 how's it hanging beef? 06:47:46 on the left 06:48:02 --- quit: Bourbaki (Read error: 104 (Connection reset by peer)) 06:49:21 let's make sure to keep it that way 06:52:38 --- quit: sslow (Read error: 110 (Connection timed out)) 06:54:21 --- join: fasta (n=fasta@zonnebloem.demon.nl) joined #haskell 06:56:04 --- quit: cwenner ("using sirc version 2.211+KSIRC/1.3.12") 06:58:37 --- join: cwenner (n=cwenner@lund-idb4-ux4-vl88-85-235-31-166.perspektivbredband.net) joined #haskell 07:04:26 --- join: Polish (n=tirpack@gprs59.vodafone.hu) joined #haskell 07:05:12 --- part: Polish left #haskell 07:06:51 --- join: sslow (n=siganos@ppp91-198.adsl.forthnet.gr) joined #haskell 07:08:51 yay, its back up 07:09:03 --- join: fwd (n=fwd@81.25.39.67) joined #haskell 07:09:05 yeah 07:10:16 --- quit: sslow (Client Quit) 07:10:21 i wonder if it was really a reddit effect? 07:10:40 " The web server had over 150 client connections which exceeded 07:10:40 its limit. I restarted the web server and all is well." 07:10:50 --- quit: perspectival (Read error: 110 (Connection timed out)) 07:11:13 dons: 150 doesn't sound that much.... 07:11:33 --- join: sslow (n=siganos@ppp91-198.adsl.forthnet.gr) joined #haskell 07:11:38 no. when I went to bed the 'unix tools' page was getting 20 hits a minute, and in the next hour receieve 1000 more 07:11:42 but that's not enough 07:11:57 musta been a dos. 07:11:59 i'm wondering how many people use hoogle - i suspect that causes more people to hit the web server, even when they don't need info 07:12:28 i'm kinda surprised that the website doesn't get killed by hoogle, since its about 3 secs per query on my machine... 07:12:53 mmm 07:13:50 * ndm is rewriting it to be faster, it currently parses about 1Mb of haskell per request... 07:14:43 urgh 07:15:05 congrats on getting Dr Haskell out! 07:15:07 ndm++ 07:15:17 yep, would have had it out last night, but haskell.org died on me... 07:15:23 Haskell meaning the result of a show? 07:15:38 or source? 07:15:51 --- join: perspectival (n=silas@rb4b68.net.upc.cz) joined #haskell 07:15:54 heya Igloo , back home? 07:15:59 Yup 07:16:02 Igloo: nope, haskell as in: http://haskell.org/hoogle/res/hoogle.txt 07:16:12 --- quit: yip (Read error: 110 (Connection timed out)) 07:16:12 kind of source 07:16:21 turns out its 250Kb, i thought it was more 07:16:22 I leave Oxford for 1 week, and when I get back the pavements have become playgrounds for little frogs! 07:16:32 but its a bad parser, so that probably doesn't help :) 07:16:37 Ah, right 07:17:13 the new version has to do about 4Kb of binary read to do a name search, so much much faster 07:17:28 is haskell.org down again? 07:17:52 lennart: it came back about 5 mins ago 07:17:57 works here. 07:18:07 --- quit: sslow_ (Read error: 110 (Connection timed out)) 07:18:09 it's been down for about 15 hours though 07:18:11 yep it work again for me too 07:18:18 more, 21 hours, I think. 07:18:28 --- join: _JusSx_ (n=davide@adsl-194-62.38-151.net24.it) joined #haskell 07:18:33 <_JusSx_> hi hasell ppl 07:18:37 <_JusSx_> hi haskell ppl 07:18:42 yeah, i tried to release Dr Haskell at 6pm last night, so must be 21 hours 07:18:50 --- quit: LordBrain ("leaving") 07:19:54 hi _JusSx_ 07:20:26 yeah, the logs say the last commit was 01:23, until ndm's at 23:27. 07:20:45 --- join: phas (n=phas@213-140-22-68.fastres.net) joined #haskell 07:20:51 my commit? 07:21:22 "Yhc; 23:27 . . NeilMitchell" 07:21:40 Yhc isn't on haskell.org 07:21:48 oh, you mean the wiki commits :) 07:22:19 yup 07:23:06 although i was able to get in via SSH to haskell.org during the downtime 07:23:15 --- join: ragnarok (n=ragnarok@213-140-22-68.fastres.net) joined #haskell 07:23:26 --- join: yip (n=yip@adsl-guttman.tau.ac.il) joined #haskell 07:23:28 hi 07:23:28 i ran top, to check hoogle hadn't gone nuclear on haskell.org (that would be embarassing) 07:23:36 we're trying to do a haskell shell 07:24:02 i'm trying to figure how sintax can be 07:24:10 --- part: NamelessOne left #haskell 07:24:25 haskell syntax? :) 07:24:34 yeah dons but 07:24:51 i've to use also "programs" 07:25:00 ?remember Bulat there is new Time library, which is supposed to replace old System.Time. we hope that it will happen before 2038 07:25:19 phas, have you looked at the existing work on haskell shells? 07:25:24 yes 07:25:27 mainly hashell 07:25:45 wich uses "special parentesis" 07:26:04 like (program) {haskell code} (programs) 07:26:16 but i wonder if there's a better solution 07:26:29 In 2038 I'm too old for work, so what do I care. ;) 07:26:32 right, there's a couple of others, there, 07:26:35 ?wiki Libraries_and_tools/Operating_system#Shell 07:26:35 http://www.haskell.org/haskellwiki/Libraries_and_tools/Operating_system#Shell 07:26:51 ulfdoz: heh 07:27:38 newsham++ -- releasing the file fuzzer 07:28:46 --- quit: sslow (Read error: 110 (Connection timed out)) 07:28:51 --- mode: ChanServ set +o dons 07:29:26 --- topic: set to '["Join us as we move forward toward the Age of the Lambda","Logs: http://tunes.org/~nef/logs/haskell/", "Haskell - The language of choice for discriminating hackers"]' by dons 07:29:29 --- mode: ChanServ set -o dons 07:29:53 I figure that since the winning team this year did use haskell, we can keep the title :) 07:30:19 what did the winning team use? 07:30:39 lol 07:30:43 Our friends at CMU say C++, Haskell, Python. 07:30:53 oh, and is there any massive need for the [" "," "] list syntax in the topic? 07:31:02 not unless we use the lambdabot. 07:31:03 (or is that just my irc reader?) 07:31:07 maybe not, I suppose. 07:31:08 religion, i think. 07:31:13 (it's supposed to be Read/Showable :) 07:31:26 it seems lambdabot is so massively clever, that a little title parsing isn't that hard :) 07:31:31 --- join: Limbic_Region (n=Limbic_R@p3m/member/Limbic-Region) joined #haskell 07:31:31 hehe 07:31:33 yeah, i guessed the read/show aspect 07:31:54 "we put the funk in funktion" 07:32:33 i wonder who puts the tion in it 07:32:50 dons supplies half 07:33:08 i guess tic supplies the other half... 07:34:52 if you have previously written an academic paper, how much can you plagerise from the old one to the new one? 07:35:06 dons: well the only other work that says something on my problem is HSH 07:35:34 --- quit: MarcWebe1 ("leaving") 07:35:35 dons: wich proposes a "command >>= command>>= haskell script >>= command ..." 07:35:37 sintax 07:35:54 --- join: mkhl (i=mkhl@200-148-40-125.dsl.telesp.net.br) joined #haskell 07:36:02 but the problem here is that functions are limited to arity 1 07:36:18 i mean that i cannot express what in hashell i express with 07:36:28 foo {command} {command} 07:37:31 phas: So curry (or if it is uncurry) 07:38:03 ndm: There tends to be a lot of carry-over from paper to paper if you look into academic publications and track authors. 07:38:40 At least in mathematics, the consensus seems to be that there should be some substantial reason for a new paper; where substantial has been taken to mean "I got admitted to a cooler journal" among some famous mathematicians. 07:38:59 Syzygy: you mean something like command >>= (command >>= foo) 07:39:02 ? 07:39:11 oh, there is a substantial reason, but the motivation etc is still the same, which is what i was going to pinch 07:39:15 sound like abyguos 07:39:24 ambiguos 07:40:02 --- join: ikegami-- (n=ikegami@t048146.ppp.asahi-net.or.jp) joined #haskell 07:40:21 --- quit: ikegami-- (Remote closed the connection) 07:41:44 --- quit: Itkovian () 07:45:40 --- quit: dottedmag ("ERC Version 5.1.4 (IRC client for Emacs)") 07:46:04 --- join: lhz (n=lhz@c-fe71e255.010-110-73746f32.cust.bredbandsbolaget.se) joined #haskell 07:47:24 --- join: hyrax42 (n=hyrax42@modemcable253.102-201-24.mc.videotron.ca) joined #haskell 07:50:05 --- join: ihope_ (n=foo@c-71-205-100-59.hsd1.mi.comcast.net) joined #haskell 07:59:05 are there any people who are seriously into haskell who are not interested in mathematics? 07:59:29 I'd be surprised, personally. 07:59:40 me :) 07:59:51 :) 08:00:17 though maybe PL research is maths, in this crowd. 08:00:42 What, exactly, is pl research? 08:00:58 either a) you're into programming language research, b) maths c) you're learning it in uni. perhaps 08:01:15 --- join: sslow (n=siganos@ppp91-198.adsl.forthnet.gr) joined #haskell 08:01:32 though there's lots of other haskellers these days, commerical users, people using it in back rooms without their boss knowing and more.. 08:04:12 yip - those seriously interested in Perl 6 are seriously interested in Haskell 08:04:19 and most of those people are pretty poor at math 08:04:32 --- quit: mathrick (Read error: 104 (Connection reset by peer)) 08:04:38 * Limbic_Region fits all categories mentioned 08:04:49 hrm - actually, that is a bit of set theory ;-) 08:04:55 --- join: foxy_ (n=chatzill@210-86-109-14.jetstream.xtra.co.nz) joined #haskell 08:05:00 --- nick: foxy_ -> foxy 08:05:29 --- join: mathrick (n=mathrick@nat.kollegienet.dk) joined #haskell 08:05:40 --- quit: ihope (Connection timed out) 08:12:48 --- join: roconnor (n=roconnor@g33218.upc-g.chello.nl) joined #haskell 08:13:03 --- join: mnislaih (n=pepe@81-202-140-205.user.ono.com) joined #haskell 08:13:07 is there a parser library that works on bytestring yet? 08:14:40 --- join: vincenz (n=vincenz@cable-87-244-184-97.upc.chello.be) joined #haskell 08:15:18 --- quit: Krooga (Read error: 104 (Connection reset by peer)) 08:15:19 kolmodin: yeah 08:15:32 kolmodin: http://darcs.haskell.org/~paolo/darcs/ByteStringParser 08:15:35 Title: Index of /~paolo/darcs/ByteStringParser, http://tinyurl.com/o6p8o 08:15:40 --- join: russo (n=russo@ppp83-237-15-219.pppoe.mtu-net.ru) joined #haskell 08:16:24 xerox: thanks 08:18:34 --- join: perspectiva1 (n=silas@rb4b68.net.upc.cz) joined #haskell 08:19:03 --- quit: perspectival (Read error: 104 (Connection reset by peer)) 08:19:40 Why doesn't a k = k work? 08:20:23 a k = (k ) 08:20:33 its a section, so needs to be in brackets 08:20:46 a k = () k does also work 08:20:51 thanks 08:21:05 if you undersaturate a binary operator, put it in brackets is the basic rule 08:21:12 --- quit: sslow (Read error: 110 (Connection timed out)) 08:21:21 the second variant is using a binary operator as a prefix function 08:21:27 hence its ok 08:21:55 --- quit: mnislaih () 08:22:28 --- quit: x8nyl (Remote closed the connection) 08:25:01 > 1 `(+)` ` 08:25:02 Parse error 08:25:05 > 1 `(+)` 1 08:25:06 Parse error 08:25:13 too bad that doesn't parse 08:26:14 --- join: sad0ur (n=sad0ur@rb1a240.net.upc.cz) joined #haskell 08:26:14 --- quit: chessguy (" HydraIRC -> http://www.hydrairc.com <- 100,000+ downloads can't be wrong") 08:26:15 > 1 `(`(`(+)`)`)` 1 08:26:16 Parse error 08:26:25 :) 08:27:08 allowing nested use of ` ` would be silly 08:27:42 but a `flip f` b might be nice ... 08:27:54 why not write b `f` a? 08:28:13 imagine something more complex 08:28:26 yes, liftM would work pretty well there 08:28:31 ndm: In my case only the prefix version works. I want to return a function. I get syntax errors when using the other notation. 08:29:23 > let f a = (+ a) in 1 08:29:25 1 08:29:34 fasta: works fine there... 08:29:41 @type (+ 1) 08:29:43 forall a. (Num a) => a -> a 08:30:15 --- quit: scsibug () 08:30:32 ndm: that's odd 08:30:41 oh no 08:30:41 > let f a = (+ 1) in f 1 1 08:30:48 > let f a = (+ a) in f 1 08:30:54 vincenz: only if the input is even :) 08:30:55 vincenz: you were right, 1 is odd :) 08:31:04 2 08:31:06 ndm: I thought you had typed f 1, and was showing a function as a number 08:31:07 Add a type signature 08:31:14 lambdabot: you're slow today! 08:31:28 lispy: i talked to Colin about smallCheck, he says he might put up a darcs repo 08:31:35 yay! 08:31:37 * lispy cheers! 08:31:41 but its hard convincing him that a tarball isn't perfect... 08:31:42 \o/ 08:31:43 ndm: nm, I am confusing something. 08:32:02 ndm, you'll have to introduce him to web browsers ;) sometimes its nice to be able to read things online 08:32:06 ndm: well, 'darcs dist' creates tarballs....(pre zipped but that's easy to fix iirc) 08:32:22 dons: yep, i know, he still won't use hoogle web interface, only a command line version 08:32:35 heh 08:32:37 lispy: i'll talk him through it, he'd probably want pre zipped 08:33:00 and he still searches the haskell 98 report by hand before googling or hoogling something 08:33:15 old people.... ;) 08:33:46 (i have no idea how old colin is, but he sounds like he prefers the 'old' ways of doing things) 08:33:50 hehe. cool. the report as first source. 08:34:17 ndm: does he make interesting arguments why that's a good way to operate? 08:34:25 --- join: spreeker (n=stephan@s5590852e.adsl.wanadoo.nl) joined #haskell 08:34:38 lispy: easier for everyone is his argument, although thats based on what was easiest quite a while usually 08:34:39 maybe there is a subtlty others have missed building these tools 08:34:46 he does prefer the old way of doing things 08:34:59 he's not that old, i don't think, he's still quite fit and active 08:35:07 maybe 50ish 08:35:18 --- join: ziggurat (n=ziggurat@dsl081-114-028.dfw1.dsl.speakeasy.net) joined #haskell 08:35:31 i wonder if the amish would allow programmers as long as they didn't use electric computers 08:35:43 do the amish not like electricity? 08:35:59 Why do you think darcs is so "awesome"? It still contains one very easy to reproduce bug, which to me means that nobody is looking after it. 08:36:00 the amish are the classical definition of neo-luddite :) 08:36:27 mainly because it's so easy to use 08:36:35 fasta: the darcs focus right now is fixing the theoretical problems 08:36:44 fasta: but, what bug are you referring to? 08:37:12 fasta: if it's easy to fix then, yeah we should probably just fix it 08:37:25 lispy: hold y when "darcs pull" when there are about >10 patches. 08:37:28 lispy: i got a fromJust Nothing the other day out of darcs 08:37:36 i often get non termination 08:37:41 and quite often get into the situation where 08:38:03 fasta: hmm...i looked at that bug but i couldn't reproduceit 08:38:11 darcs record, with 1 change in there: a works fine, y freezes and doesn't terminate 08:38:19 oh, I can reproduce that bug too 08:38:20 while a is instant 08:38:25 you just need a slightly slow computer 08:38:37 a 3Ghz dual core pentium? 08:38:38 or some hard to process patches 08:38:42 Heffalump: what's "slow"? 08:38:46 fasta: never seen that 08:38:47 oh, not very. 08:38:53 and i pull 100s of patches from ghc sometimes 08:38:56 shall we take this to #darcs? 08:39:00 sure 08:39:06 ndm: I was referring to fasta's problem, not yours 08:39:23 fasta: maybe hit 'a' next time? ;) 08:39:32 Heffalump: fair enough, i can usually get round my problem with d/a/rev and combinations 08:39:33 fasta: would be nice to fix it though... 08:39:36 lispy: that's beside the point, right.. 08:39:42 fasta: yes 08:39:45 fixing bugs is better than introducing new ones 08:40:42 --- join: cwenner_ (n=cwenner@lund-idb4-ux4-vl88-85-235-31-166.perspektivbredband.net) joined #haskell 08:41:21 --- join: madpickle- (i=jizzy@i-195-137-52-102.freedom2surf.net) joined #haskell 08:41:23 --- quit: roconnor (Connection timed out) 08:43:01 --- quit: cwenner (Read error: 110 (Connection timed out)) 08:43:16 --- nick: cwenner_ -> cwenner 08:45:03 --- quit: spreeker () 08:45:05 --- join: spreeker (n=stephan@s5590852e.adsl.wanadoo.nl) joined #haskell 08:45:12 --- join: Krooga (n=nospam@cust3634.vic01.dataco.com.au) joined #haskell 08:50:33 --- nick: ihope_ -> i-hope 08:50:42 --- nick: i-hope -> ihope 08:55:34 --- join: chessguy (n=chessguy@c-69-242-13-143.hsd1.pa.comcast.net) joined #haskell 08:57:15 --- join: clanehin (n=lane@cpe-069-134-236-134.nc.res.rr.com) joined #haskell 09:04:44 --- join: Psyche^ (n=Psyche@e176093064.adsl.alicedsl.de) joined #haskell 09:05:48 --- join: mauke_ (i=mauke@p54997EF2.dip.t-dialin.net) joined #haskell 09:06:54 --- join: TaPiOn (n=tapion@ede67-1-81-56-22-69.fbx.proxad.net) joined #haskell 09:06:57 --- join: ndm_ (n=chatzill@82.152.211.27) joined #haskell 09:07:08 --- quit: ndm (Read error: 110 (Connection timed out)) 09:07:13 hello any one can help me for c programming (win32) ? 09:07:17 --- nick: ndm_ -> ndm 09:07:24 i search an other cmd like system() 09:09:31 --- join: nick8325 (n=nick@i-195-137-60-130.freedom2surf.net) joined #haskell 09:10:23 --- join: beelsebob_ (n=tatd2@80-41-95-72.dynamic.dsl.as9105.com) joined #haskell 09:13:49 --- quit: beelsebob (Read error: 113 (No route to host)) 09:17:35 --- quit: mauke (Read error: 110 (Connection timed out)) 09:18:53 TaPiOn: have a look at the exec* family of functions 09:19:04 --- join: j3h (n=josh@c-24-21-174-195.hsd1.mn.comcast.net) joined #haskell 09:19:22 k 09:19:39 tanks 09:20:46 --- nick: mauke_ -> mauke 09:20:58 --- quit: Patterner (Read error: 110 (Connection timed out)) 09:20:58 --- nick: Psyche^ -> Patterner 09:25:05 TaPiOn: ShellExecute and ShellExecuteEx are the better ways of doing it in Win32 09:25:25 ohhh thank you :) 09:25:31 API ? 09:25:40 --- join: beschmi (n=steele@dslb-084-058-207-010.pools.arcor-ip.net) joined #haskell 09:26:32 TaPiOn: its in the Win32 API 09:26:40 @google msdn ShellExecute 09:26:42 --- join: jtoy_ (n=jtoy@c-24-147-139-3.hsd1.ma.comcast.net) joined #haskell 09:26:43 http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=124382&SiteID=1 09:26:43 Title: help with Shellexecute - MSDN Forums 09:26:51 @google msdn ShellExecuteEx 09:26:54 http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shellexecuteex.asp?frame=true 09:27:01 thanks 09:27:02 the second one is the one to hit 09:27:24 dons: i hear its entirely your fault that haskell went down... 09:27:38 morning! 09:27:45 yay!, haskell.org is back! 09:28:00 --- join: abc (n=abc@a052.201.adsl.nextweb.net.mt) joined #haskell 09:28:56 is there a function from Int -> [Int] 09:29:12 that will change 123 into [1,2,3] 09:29:22 thanks 09:29:59 > let f = map (read . (:[])) . show in (f 123) :: [Int] 09:30:06 [1,2,3] 09:30:22 abc ^^^ 09:30:50 @hoogle digitTo 09:30:51 Char.digitToInt :: Char -> Int 09:31:06 > let f = map digitToInt . show in f 123 09:31:07 [1,2,3] 09:31:14 abc, much nicer version ^^^ 09:31:31 --- part: TaPiOn left #haskell 09:31:51 thanks for your help 09:32:04 --- join: int-e (n=noone@td9091aea.pool.terralink.de) joined #haskell 09:32:05 i am newbie to haskell 09:32:25 :-) 09:32:26 why are you learning? what motivated you to start it? 09:32:34 elegance 09:32:56 cool, well it is elegant, as that above example shows hopefully :) 09:33:42 have you got something you're trying to write in particular? or just play hacking for now? 09:33:59 I am trying to implement Luhn function 09:34:16 actually I am playing for the fun this language gives 09:34:22 --- nick: eno-away -> eno 09:34:44 you know what Luhn function does? 09:34:55 given an Int -> Bool 09:35:11 credit card validation number 09:35:14 --- join: LimbicRegion (n=Limbic_R@cmu-24-35-57-240.mivlmd.cablespeed.com) joined #haskell 09:35:24 ah, thats cool 09:35:31 hence the need for digits, i see :) 09:35:53 i am not sure if I am not sure if I am going in the right direction but I think its the smartest way 09:36:09 seems sensible, its a long time since i did a credit card validator 09:36:10 change the Int to [Int] then do the stuff using cool list functions 09:36:22 @wikipedia Luhn 09:36:25 No Result Found. 09:36:31 not difficult 09:36:58 http://en.wikipedia.org/wiki/Luhn_algorithm 09:37:06 if you are interested 09:37:07 ;-) 09:37:35 yeah, i found that easily, just wiki'd it 09:37:53 looks like you need a function that does the double repeatedly until you get a single digit 09:38:00 and a function to apply to alternate digits 09:38:02 --- join: mnislaih (n=pepe@81-202-140-205.user.ono.com) joined #haskell 09:38:29 double is easy 09:38:37 and even counting 09:39:14 yeah, looks quite doable 09:39:15 actually for you it seems that from start to end is easy hehe ;-) 09:39:26 for me the first part was challenging 09:39:33 hehe, practice makes perfect 09:39:41 thats exactly the sort of thing hsakell is great at 09:40:03 in a couple of days time I will be helping people ;-) 09:40:08 hehe, good good 09:40:10 I think its a nice place to hang here 09:40:17 people seems to be nice 09:40:18 well once you've done it, blog it, and link to the wikipedia article 09:40:38 that's exaactly what I am going...it seems that you read my mind ;-) 09:40:43 www.gaetanocaruana.com 09:40:46 it will be up soon 09:40:53 I will mention you 09:41:19 thanks :) 09:41:45 if your blog is haskell related, add it to planet.haskell.org 09:41:57 do you hang often here? 09:42:03 oh thanks I will ;-) 09:42:18 yeah, usually 09:42:34 fine :-) 09:42:35 its nice, people are friendly, and can solve very difficult problems 09:42:42 plus lambdabot is wonderful :) 09:43:22 yea infact I am noting what commands are you giving to her 09:44:36 i got a spam with a subject drawn from Asimov's "Foundation"..yow 09:44:49 --- quit: jtoy_ () 09:44:52 @list 09:44:52 http://www.cse.unsw.edu.au/~dons/lambdabot/COMMANDS 09:44:58 thats a list of all the commands 09:45:14 you'll see @hoogle, @index, @type, > (evaluation) and @pl quite a bit in here 09:45:47 ic :-) 09:45:51 @pl \a b c d e -> a (b c) (d e) 09:45:52 (((.) .) .) . (.) 09:45:55 i will have a look at them 09:46:02 ?version 09:46:02 lambdabot 4p227, GHC 6.5 (OpenBSD i386) 09:46:02 darcs get http://www.cse.unsw.edu.au/~dons/lambdabot 09:46:56 --- quit: madpickle- (Read error: 145 (Connection timed out)) 09:46:56 --- quit: satan (Read error: 54 (Connection reset by peer)) 09:47:42 --- quit: Trixsey ("( www.nnscript.de :: NoNameScript 4.03 :: www.XLhost.de )") 09:49:11 --- join: ndm_ (n=chatzill@91.84.47.91) joined #haskell 09:50:10 --- quit: Limbic_Region (Read error: 110 (Connection timed out)) 09:50:10 --- nick: LimbicRegion -> Limbic_Region 09:50:20 --- quit: _JusSx_ (Client Quit) 09:51:43 --- quit: russo () 09:52:15 --- quit: AtnNn (Connection timed out) 09:52:36 --- quit: lisppaste2 (Remote closed the connection) 09:53:18 --- quit: magnus- ("Download Gaim: http://gaim.sourceforge.net/") 09:54:10 --- join: jak (n=jak@85-210-239-158.dsl.pipex.com) joined #haskell 09:55:06 --- join: lisppaste2 (n=lisppast@common-lisp.net) joined #haskell 09:57:18 --- join: jtoy_ (n=jtoy@c-24-147-139-3.hsd1.ma.comcast.net) joined #haskell 09:57:24 --- join: Trixsey (n=secret@c-2b9072d5.012-2011-73746f31.cust.bredbandsbolaget.se) joined #haskell 09:58:00 ?users 09:58:00 Maximum users seen in #haskell: 238, currently: 230 (96.6%), active: 27 (11.7%) 09:58:28 --- join: roconnor (n=roconnor@g33218.upc-g.chello.nl) joined #haskell 09:58:32 --- quit: fwd (Remote closed the connection) 09:58:40 ?pl \ f x -> f x x x x x x x x x x x x 09:58:42 join . join . join . join . join . join . join . join . join . join . join 09:59:28 ?pl \f x y -> f x y y x y y y x x y x 09:59:32 ?pl \f x y -> f x y x y x y x y x y x y x 09:59:33 join . (flip .) . flip flip id . (ap .) . join . (flip .) . join . (flip .) . flip flip id . (ap .) . flip flip id . (ap .) . flip flip id . (ap .) . join . (flip .) . flip flip id . (ap .) 09:59:33 optimization suspended, use @pl-resume to continue. 09:59:44 join . (flip .) . flip flip id . (ap .) . join . (flip .) . flip flip id . (ap .) . join . (flip .) . flip flip id . (ap .) . join . (flip .) . flip flip id . (ap .) . join . (flip .) . flip flip id 09:59:44 . (ap .) . (flip =<<) 09:59:44 optimization suspended, use @pl-resume to continue. 10:00:03 --- join: Psyche^ (n=Psyche@e176084251.adsl.alicedsl.de) joined #haskell 10:00:07 ?pl \f x y z -> f x y z z y 10:00:08 flip flip id . (liftM2 flip .) . flip flip id . ((flip . (ap .)) .) 10:00:23 ?type \f x y z -> f x y z z y 10:00:25 forall t t1 t2 t3. (t -> t2 -> t1 -> t1 -> t2 -> t3) -> t -> t2 -> t1 -> t3 10:00:32 flippin' 'eck 10:00:35 (pun intended) 10:01:08 @djinn (t -> t2 -> t1 -> t1 -> t2 -> t3) -> t -> t2 -> t1 -> t3 10:01:09 f a b c d = a b c d d c 10:01:37 --- quit: perspectiva1 (Read error: 110 (Connection timed out)) 10:01:42 ?. djinn type \f x y z -> f x y z z y 10:01:44 f a b c d = a b c d d c 10:01:57 ?. pl . djinn type \f x y z -> f x y z z y 10:01:59 f = flip flip id . (liftM2 flip .) . flip flip id . ((flip . (ap .)) .) 10:02:17 ?pl \ a b c d e f g h i j k l m n o p q r s t u v w x y z -> h e l l o w o r l d 10:02:32 const (const (const (((const . const . (const .)) .) . ((const .) .) . ((const .) .) . (((const .) .) .) . (((const .) .) .) . ((((const .) .) .) .) . ((((const .) .) .) .) . (((((const .) .) .) .) . 10:02:33 ) . (((((const .) .) .) .) .) . (((((const .) .) .) .) .) . (((((const .) .) .) .) .) . ((((((const .) .) .) .) .) .) . ((((((const .) .) .) .) .) .) . ((((((const .) .) .) .) .) .) . flip (flip . ( 10:02:33 flip .) . ((flip .) .) . (((flip .) .) .) . ((((flip .) .) .) .) . flip flip id . (ap .) . ((flip .) .) . (((flip .) .) .) . ((((flip .) .) .) .) . (((flip .) .) .) . flip flip id . (flip .) . ((ap . 10:02:33 ) .) . (((flip .) .) .) . flip flip id . (ap .) . flip id)))) 10:02:34 optimization suspended, use @pl-resume to continue. 10:02:45 @pl-resume 10:03:15 hrm 10:03:16 const (const (const (((const . const . ((const . const . const . ((const . const) .) . ((const .) .)) .)) .) . ((((const .) .) .) .) . (((((const .) .) .) .) .) . (((((const .) .) .) .) .) . ((((( 10:03:16 const .) .) .) .) .) . (((((const .) .) .) .) .) . ((((((const .) .) .) .) .) .) . ((((((const .) .) .) .) .) .) . ((((((const .) .) .) .) .) .) . flip (flip . (flip .) . ((flip .) .) . (((flip .) .) 10:03:16 .) . ((((flip .) .) .) .) . flip flip id . (ap .) . ((flip .) .) . (((flip .) .) .) . ((((flip .) .) .) .) . (((flip .) .) .) . flip flip id . (flip .) . ((ap .) .) . (((flip .) .) .) . flip flip 10:03:16 id . (ap .) . flip id)))) 10:03:18 optimization suspended, use @pl-resume to continue. 10:03:30 poor pl 10:03:36 yes 10:03:42 ?pl \x y z -> x y z z y 10:03:43 join . (flip .) . flip flip id . (ap .) 10:04:12 --- quit: ndm (Read error: 110 (Connection timed out)) 10:04:16 --- quit: pierre- (Remote closed the connection) 10:04:33 ?pl \f x -> f x x 10:04:33 join 10:04:46 ?pl \ f g h x -> f (g x) (h x) 10:04:46 liftM2 10:05:02 ?pl \x -> x xx 10:05:03 ($ xx) 10:05:04 ?pl \x -> x x 10:05:05 join id 10:05:06 ?pl \ f g h x -> f (g x) h 10:05:06 (flip .) . (.) 10:05:25 ?pl \x -> x x x 10:05:25 ?pl \ f g h x -> f g (h x) 10:05:25 ((.) .) 10:05:26 join (join id) 10:05:34 ?pl \x -> x x x x 10:05:35 join (join (join id)) 10:05:41 ?pl \x -> x x x 10:05:42 join (join id) 10:06:06 ?pl \f x -> x x x 10:06:07 const (join (join id)) 10:06:47 --- part: j3h left #haskell 10:07:10 i call this one the Haskowl: 10:07:12 ?type ((.)$(.)) 10:07:13 forall a b c a1. (a -> b -> c) -> a -> (a1 -> b) -> a1 -> c 10:07:38 ?. djinn type ((.)$(.)) 10:07:40 f a b c d = a b (c d) 10:07:59 > ((.)$(.)) (==) 1 (1+) 0 10:08:00 True 10:09:17 aha, the owl is B' 10:12:54 --- quit: sad0ur ("leaving") 10:13:45 --- join: monochrom (n=trebla@toronto-hs-216-138-220-146.s-ip.magma.ca) joined #haskell 10:14:34 --- quit: abcde` (Read error: 131 (Connection reset by peer)) 10:14:38 --- quit: yip (Read error: 110 (Connection timed out)) 10:16:02 --- quit: Patterner (Read error: 110 (Connection timed out)) 10:16:03 --- nick: Psyche^ -> Patterner 10:17:37 cya guys...thanks again ndm_ 10:17:40 just before I fall asleep, I've made a little section for fun combinators we find with @pl here, like the owl. http://haskell.org/haskellwiki/Pointfree#Combinator_discoveries 10:17:45 Title: Pointfree - HaskellWiki, http://tinyurl.com/fwu37 10:17:47 and swing. 10:17:55 abc: no probs 10:17:58 so in future if you find something fun, add it and give it a name :) 10:17:59 :-) 10:18:02 \quit 10:18:04 --- quit: abc () 10:18:28 dons: unbalanced ')' in owl 10:18:37 fixied 10:18:49 ?type \x -> x x 10:18:50 Occurs check: cannot construct the infinite type: t = t -> t1 10:18:50 Expected type: t 10:21:44 you can't construct the Y combinator in haskell, can you? 10:21:53 ?type fix 10:21:54 forall a. (a -> a) -> a 10:22:15 psi: yup, either using language recursion, or by writing a datatype encapsulating it. 10:22:37 what does language recursion mean? 10:23:16 --- join: yip (n=yip@adsl-guttman.tau.ac.il) joined #haskell 10:24:25 --- join: weitzman (n=david@CMU-198389.WV.CC.cmu.edu) joined #haskell 10:24:56 what does fix do? 10:25:09 --- quit: Krooga () 10:26:00 --- join: dottedmag (n=dottedma@dottedmag.net) joined #haskell 10:26:01 --- part: spreeker left #haskell 10:26:53 --- join: Korollary (n=Unknown@c-67-183-137-247.hsd1.wa.comcast.net) joined #haskell 10:26:57 > fix (\f n -> if n < 2 then 1 else n * f (n - 1)) $ 5 10:26:59 120 10:27:57 cool 10:29:21 --- join: tessier_ (n=treed@adsl-75-5-99-178.dsl.sndg02.sbcglobal.net) joined #haskell 10:29:26 psi: http://r6.livejournal.com/95963.html 10:29:29 Title: r6: Y Combinator in Haskell 10:29:42 thanks 10:35:32 How can I take the logarithm of a value of type Integer? 10:35:45 ?type log 10:35:46 forall a. (Floating a) => a -> a 10:36:02 ?type log . fromInteger 10:36:02 > log (fromInteger 42) 10:36:04 forall a. (Floating a) => Integer -> a 10:36:04 3.7376696182833684 10:36:13 ?type log . fromIntegral 10:36:14 forall a b. (Floating b, Integral a) => a -> b 10:36:18 fromInteger, thanks 10:36:57 can't quite wrap my head around that fix2 10:37:15 fix2 is just fix with a restricted type 10:37:27 --- join: kombinator (n=michal@grue.residence.ens-lyon.fr) joined #haskell 10:37:32 or not even that 10:37:38 mauke: fix2 f = f (fix2 f) 10:37:50 ?type let fix2 f = f (fix2 f) in fix2 10:37:52 forall t. (t -> t) -> t 10:38:02 yeah, plain fix 10:38:10 psi: but you understand fix? 10:38:41 no, I just know how it's used 10:39:18 As you start unfolding fix and fix2 you end up getting f (f (f (f (f (f (f (fix2 f)...) 10:39:35 basically you have as many fs as you need 10:39:57 hopefully you will only need a finite number of unrollings (this is possible thanks to laziness) 10:40:19 so f will do something before looking at its argument 10:40:35 > fix ((2:) . scanl1 (const ((/2) . ap (+) (2/)))) !! 1000 10:40:36 1.414213562373095 10:41:02 --- quit: fasta ("leaving") 10:41:03 Ah, I think I see it 10:41:25 so only in some case will f's argument actually be used 10:41:46 and in the other cases the argument will be discarded 10:41:58 stoping the potentially infinite unfolding 10:43:05 it is a bit mind twisting 10:43:12 > take 10 $ fix (\f -> 1 : 1 : zipWith (+) f (tail f)) 10:43:13 [1,1,2,3,5,8,13,21,34,55] 10:43:27 psi: yes. 10:43:38 psi: you should try circular programming 10:43:50 ?pl \f -> 1 : 1 : zipWith (+) f (tail f) 10:43:51 (1 :) . (1 :) . ap (zipWith (+)) tail 10:44:15 > take 10 . fix $ (1:) . (1:) . ap (zipWith (+)) tail 10:44:16 [1,1,2,3,5,8,13,21,34,55] 10:46:58 do people use fix in real programs? 10:47:54 psi: at least mfix is used in real programs. 10:48:45 ?type mfix 10:48:47 forall (m :: * -> *) a. (MonadFix m) => (a -> m a) -> m a 10:49:53 --- join: dolio (n=dolio@nr5-216-196-210-204.fuse.net) joined #haskell 10:50:26 I just know that Y is a cool thing in lambda calculus, because you can't name things there, but that's not an issue in haskell. 10:50:59 name functions 10:51:55 brb. 10:52:00 the creation of artificial intelligence will probably require extensive understanding of fixed-points oO' 10:52:20 --- join: br1 (n=br1@r200-40-216-88-dialup.adsl.anteldata.net.uy) joined #haskell 10:53:05 is it just me or is the new yahoo even worse than the previous one 10:53:11 (yahoo-mail) 10:54:26 --- nick: pietron -> epiphone 10:55:58 ?hoogle curry 10:55:59 Prelude.curry :: ((a, b) -> c) -> a -> b -> c 10:55:59 Prelude.uncurry :: (a -> b -> c) -> (a, b) -> c 10:56:34 ?type chr 10:56:35 Int -> Char 10:56:40 --- join: ulfdoz_ (i=mary@2001:1a50:5057:0:0:0:0:1) joined #haskell 10:56:52 > ap zip . map chr $ [65..75] 10:56:52 Couldn't match `(->) [a]' against `[]' 10:56:56 --- quit: ulfdoz (Remote closed the connection) 10:56:59 > ap zip (map chr) $ [65..75] 10:57:01 [(65,'A'),(66,'B'),(67,'C'),(68,'D'),(69,'E'),(70,'F'),(71,'G'),(72,'H'),(73... 10:57:21 @hoogle ap 10:57:23 Monad.ap :: Monad a => a (b -> c) -> a b -> a c 10:57:23 Control.Monad.ap :: Monad m => m (a -> b) -> m a -> m b 10:57:23 Data.Graph.Inductive.Query.ArtPoint.ap :: Graph gr => gr a b -> [Node] 10:57:38 ap is monadic (.), is it? 10:57:42 --- join: perspectival (n=silas@rb4b68.net.upc.cz) joined #haskell 10:58:24 or monadic ($) 10:58:45 ?type ($) 10:58:46 forall b a. (a -> b) -> a -> b 10:58:47 Ah. 10:58:51 Right. 10:58:57 Yeah, it wouldn't be (.), doh. 11:00:20 (.) is a special case of fmap :) 11:03:13 ?. pl undo \m n -> do { f <- m ; a <- n ; return (f a) } 11:03:14 (. ((. (return .)) . (>>=))) . (>>=) 11:03:20 Whoa. 11:04:08 I'm a bit confused as to how the type of fix is determined by the compiler 11:04:16 ?type fix 11:04:17 forall a. (a -> a) -> a 11:05:19 where fix f = f (fix f) 11:05:25 fix f = let x = f x in x 11:05:49 --- quit: Limbic_Region (" tiuq\") 11:05:50 So, f is a function that when applied to a value, gives a value of the same type. 11:06:03 Otherwise you couldn't re-feed it into f. 11:06:13 And fix returns a value of that type. 11:07:45 Using dolio's equation. Let's give x a type; since we don't know what it should be yet, no harm to use a variable, let's say "a". Then from "x = f x", f :: a->a. 11:08:33 Type inference is a special case of logic deduction. How do you do it? Logically, carefully, patiently. 11:09:07 hm, I see. his definition was a bit different from mine, let me wrap my head around it 11:10:19 That's the way it's actually defined in the libraries, although they're equivalent in effect. 11:10:26 --- quit: kisu ("Leaving") 11:10:27 Both lead to f (f (f... 11:10:42 right 11:11:16 Using psi's equation. Let's give "fix f" a type; again use a variable like "a" for the moment and see what happens. Then from "f (fix f)", f::a->a. Then from "fix (f :: a->a) :: a", fix :: (a->a)->a. 11:11:28 Although, for a while, I didn't realize that the let... version was the same as the Y combinator. 11:12:12 --- part: Heffalump left #haskell 11:13:49 Using a combinator for recursion can let you do cute things, though, like this: 11:13:55 http://www.haskell.org/hawiki/MemoizingRecursion 11:13:59 Title: MemoizingRecursion - The Haskell Wiki, http://tinyurl.com/gjxoc 11:14:36 monochrom: how do you know f::a->a? 11:14:39 --- quit: MechaBlue (Read error: 110 (Connection timed out)) 11:14:44 That has a variant of the Y combinator that automatically memoizes its results. 11:15:06 x :: a 11:15:18 f x -> f :: a -> ... 11:15:27 And x :: a -> f :: a -> a 11:15:54 Since f x :: a 11:16:10 We assigned "fix f" to be of type "a". That means "(fix f :: a) = f (fix f :: a)". f takes a parameter of type a and returns something of type a. 11:16:12 Since f x = x 11:16:17 weitzman: there was no x there 11:17:00 As long as (f x) and x have the same type, a 11:17:10 And f must have type a -> ??? 11:17:15 Bam 11:17:22 > take 10 $ fix ((1:) . scanl (+) 1) 11:17:23 [1,1,2,3,5,8,13,21,34,55] 11:18:03 monochrom: ah! I didn't look on the left side. 11:20:14 Let's see, what was the one xerox did the other day... 11:20:51 He photocopied the Haskell manuals? :) 11:21:51 > let factorial = fix (\f x -> if x > 1 then x * f (x-1) else 1) in factorial 5 11:21:52 120 11:21:54 It was a fixed point for generating successive approximations to sqrt 2. 11:22:07 based on the continued fraction? 11:22:12 [1,2,2,2...]? 11:22:27 No. It used the averaging method. 11:22:32 ah 11:23:37 > take 30 $ fix ((1 :) . (1 :) . intersperse 1 . map (+ 1)) 11:23:38 [1,1,2,1,2,1,3,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1] 11:24:13 > take 30 $ fix (intersperse 1 . (1 :) . map (+ 1)) 11:24:14 Exception: <> 11:24:18 hmm :( 11:24:59 > (fix $ scanl (const ((/2) . ap (+) (2/))) 1) !! 1000 11:25:00 > take 4 $ map (foldr1 (\x y -> x + 1/y) . (1:)) $ inits [2,2..] 11:25:01 1.414213562373095 11:25:02 [1.0,1.5,1.4,1.4166666666666667] 11:25:12 (using the continued fraction) 11:25:48 --- quit: chessguy (" HydraIRC -> http://www.hydrairc.com <- IRC for those that like to be different") 11:25:55 > fix ((\ ~(a:b) -> a:b) . intersperse 1 . (1 :) . map (+ 1)) 11:25:57 [1,1,2,1,2,1,3,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1... 11:26:26 --- join: Nextgens_ (i=xterm@gateway/tor/x-a9ff32413fc71714) joined #haskell 11:26:36 --- join: chessguy (n=chessguy@c-69-242-13-143.hsd1.pa.comcast.net) joined #haskell 11:26:56 Nextgens_: very funny 11:26:56 Nextgens_: you still fail at hax0ring 11:26:58 I seem to have generated http://www.research.att.com/~njas/sequences/A091090 possibly 11:27:00 Title: The On-Line Encyclopedia of Integer Sequences, http://tinyurl.com/gu6le 11:27:31 would it be possible to modify haskell so that it's lazy enough for things like (length infiniteList) > 10, work? 11:27:50 only if you make numbers non-atomic or something 11:28:18 mmmm...but the length computation is non-atomic 11:28:35 i guess it's probably pretty expensive to keep checkining if the length is > 10 though 11:28:50 block Nextgens_ please, he is phish for nickservpasswords 11:29:34 lispy: typedef Integer = [Int] 11:29:46 I've already reported this to nalioth 11:29:58 glguy: tanks! 11:30:13 --- quit: Nextgens_ (Excess Flood) 11:30:20 lispy: surface-to-air missles! 11:30:58 11:29 *** Undefined CTCP query received. Silently ignored 11:31:00 The above would work with genericLength and Nat = Succ Nat | Zero 11:31:11 i wish it told me who sent that 11:31:19 lispy: Lucky you. My client dumped out the entire contents. 11:31:26 "silently ignored"? 11:31:26 It would depend on how you implemented the length function 11:31:28 More reasonable is to write a lengthAtLeast, though 11:31:29 it told you tho 11:31:51 "--- Received a CTCP THIS nickname is owned by someone else from Nextgens_ (to #haskell)" 11:31:52 length = Succ (length rest) or length = length rest .... Stick Succ() way inside 11:32:03 13:29 Nextgens_ [i=xterm@gateway/tor/x-a9ff32413fc71714] requested unknown CTCP SOMEBODY from #haskell: has sent you a message, to read it type: /server read 1 11:32:11 that's what I get 11:32:14 --- join: akemp (n=akemp@c-67-180-211-133.hsd1.ca.comcast.net) joined #haskell 11:32:31 --- quit: psi ("rcirc on GNU Emacs 22.0.50.1") 11:32:38 Igloo: ah 11:32:53 and I wonder how stupid a client must be for that to work. 11:32:57 i don't actually have a use for this, just wondreing 11:34:52 --- join: Dr_Pi (n=ivanfrey@CPE00121740417c-CM014370009170.cpe.net.cable.rogers.com) joined #haskell 11:35:34 int-e: stupid enough to actualy type "/msg nextgens_ identify..." 11:35:58 --- quit: lhz ("Leaving") 11:36:05 heh, it's not even like a query window would pop up, you'd actually have to type in the guy's name :) 11:36:44 glguy: first the client would have to display it in some convincing way. 11:36:54 (or so I hope) 11:37:45 I was at the post office today... there were 3 desk clerks. one was imcompetent and took forever to do simple things. one had a crashed computer and could not process customers, and one was looking up regulations in a reference for a customer and filling out 3 passport applications 11:37:56 I was at the clerk with the crashed computer 11:38:03 the line just kept getting longer and longer 11:38:09 people were getting *mad* 11:38:34 the first two should have swapped computers 11:38:38 --- join: madpickle (i=jizzy@i-195-137-52-102.freedom2surf.net) joined #haskell 11:38:49 and also, before we were helped, the lady in front of us took a call on her cell phone *while* the clerk was asking her questions to complete her transaction 11:39:01 eek 11:39:03 and stopped asking questions and seemed to assume the default answers 11:39:10 what a whore 11:39:23 that is probably why postal workers kill people 11:39:29 heh 11:39:40 I'd have shipped her package to "City Dump" 11:39:46 Anyone here knowledgeable in the cgi-compat library? 11:39:50 or rerouted it through under my feet 11:39:56 haha 11:40:04 I think there must surely be rules against that 11:40:07 akemp: Kinda. 11:40:10 oh , there are 11:40:11 the latter, I mean 11:40:11 akemp: kinda 11:40:12 not the former 11:40:20 posted in THREE places in the post office 11:40:22 huge signs 11:40:33 akemp: i used the fastcgi library which is on top of it recently 11:40:34 out of curtesy to the other custumers 11:40:44 please do not talk on your cell phone when approaching the counter 11:40:53 but they dont' say "Don't take any calls at the counter" 11:40:57 that one was assumed 11:41:13 Silly question, but I've gotten busy and haven't coded in a while. Trying to rub off the rust. Question: I'm using cgi-compat to do service a request, but then I need to do some IO actions. How do I do IO in the middle of the CGI monad? 11:41:45 akemp: Use liftIO. 11:41:58 do a <- liftIO $ .... 11:41:59 does CGI transform the IO monad then? 11:42:07 glguy: must surely wrap it 11:42:07 CGI is a transformer, yes 11:42:26 CGIT is a transformer. CGI = CGIT IO. 11:42:29 http://en.wikipedia.org/wiki/Going_postal wikipedia has an entry for everything! 11:42:47 * SamB points out that you can have a MonadIO that isn't a monad transformer 11:42:51 @type lift 11:42:53 forall (t :: (* -> *) -> * -> *) a (m :: * -> *). (MonadTrans t, Monad m) => m a -> t m a 11:43:15 That's what I thought, but I'm getting one of those Haskell uber-errors about overlapping instances created by my use of liftIO. 11:43:22 ?type liftIO 11:43:23 forall (m :: * -> *) a. (MonadIO m) => IO a -> m a 11:43:23 ah, so CGI isn't a transformer it's just a wraper? 11:43:29 akemp: huh? 11:43:31 ?instances MonadIO 11:43:32 ContT r m, ErrorT e m, IO, RWST r w s m, ReaderT r m, StateT s m, WriterT w m 11:43:33 paste something! 11:43:40 Will do 11:43:44 @paste 11:43:45 http://paste.lisp.org/new/haskell 11:44:02 akemp: i noticed he helloworld example in fastcgi required -fallow-overlapping-instances 11:44:11 lispy: eek! 11:44:29 okay, so -fallow-overlapping-instances must be needed for most anything fastcgi! 11:44:37 @where fastcgi 11:44:38 http://www.cs.chalmers.se/~bringert/darcs/haskell-fastcgi/ 11:44:58 --- join: KingMeTaL (n=nitro@tdev222-127.codetel.net.do) joined #haskell 11:45:00 but, i didn't worry about it...i did wonder if it's so you can do both fastcgi or normal cgi with pretty much teh same code 11:45:01 --- quit: beelsebob_ (Read error: 110 (Connection timed out)) 11:45:03 akemp pasted "CGI probs" at http://paste.lisp.org/display/26587 11:45:16 paste is tasty 11:46:07 @where+ fastcgi http://www.cs.chalmers.se/~bringert/darcs/haskell-fastcgi/doc/ 11:46:08 Done. 11:46:10 @where fastcgi 11:46:12 http://www.cs.chalmers.se/~bringert/darcs/haskell-fastcgi/doc/ 11:46:33 The upshot is that I'm using CGI to grab a URI from the CGI call, then using HTTP to retrieve the url. CGI uses the CGI monad; HTTP uses the IO monad. 11:47:34 akemp: i'm not sure what to make of that 11:47:39 --- join: magnus- (n=magnus@pool-72-94-97-200.phlapa.east.verizon.net) joined #haskell 11:47:45 akemp: if you allow overlapping instances does the code work? 11:48:07 Hi.. is there any haskell option to never allow ignoring return values inside do constructs? 11:48:16 ghc option 11:48:21 magnus-: it would be silly! 11:48:48 --- quit: chris2 (Client Quit) 11:48:55 SamB: why? 11:49:24 hmm, you'd have to override >> somehow 11:49:32 because half the times things return ()? 11:49:38 er, *time. 11:49:54 magnus-: i think it's better to wrap up that exec function take advantage of the definition of (>>=) 11:50:14 lispy: -fallow-overlapping-instances worked, though I'm not too happy with it. Don't really know how the solution solved the problems (aside from allowing overlapping instances...). 11:50:49 SamB: We can then make an exception for (). It is fine to ignore () 11:50:50 You'd be unable to write anything with do notation, then, since the last expression in a do has to not be a pattern match. 11:50:51 akemp: then you might want to talk to bringert...he could probably explain why it's needed 11:51:05 lispy: I was about to look at that myself... 11:51:22 Or, unable to write anything that doesn't return () itself, then. 11:51:32 dolio: the last expression can of course return whatever it wants 11:51:47 --- quit: SamB (Read error: 104 (Connection reset by peer)) 11:52:00 magnus-: i could see this as useful 11:52:14 --- join: jcreigh (n=jason@72-160-115-61.dyn.centurytel.net) joined #haskell 11:52:23 magnus-: with the provisions of not caring about () and not caring about the last statement in the do 11:52:47 --- join: Itkovian (n=Itkovian@d54C4B834.access.telenet.be) joined #haskell 11:52:51 hmm, would redefining >> with a restricted type work? 11:52:53 i wonder how hard it would be to get that into ghc 11:53:17 can denotational semantics be used to describe the semantics of functional programming languages? 11:53:23 --- quit: jcreigh (Read error: 131 (Connection reset by peer)) 11:53:46 chessguy: that's how denotational sematics are often use, from what i understand 11:54:19 anybody know of such a description for, say, haskell? 11:54:22 --- quit: jgrimes (Read error: 110 (Connection timed out)) 11:54:27 --- join: SamB (i=naesten@216-15-104-38.c3-0.upd-ubr7.trpr-upd.pa.cable.rcn.com) joined #haskell 11:54:45 I don't think any exist. 11:54:56 boo, hiss! 11:54:57 chessguy: iirc, haskell does not have a denotational semantics written down...i seem to recall mention of this in the history of haskell paper 11:55:08 They were originally planned, but got left by the wayside. 11:55:10 bad form! 11:55:15 Yeah, the history paper talks about it. 11:55:19 chessguy: check tackling the awkward squad for some semantics of haskell IO 11:55:20 lispy: the problem is working fine, so that looks like a complete solution 11:55:29 lispy: s/problem/program 11:55:52 akemp: yeah, i'd like to understand this better as well 11:56:00 mmmm, isn't IO done using monads in haskell? 11:56:45 yup 11:56:58 --- quit: Itkovian (Client Quit) 11:57:04 then it's over my head at the moment 11:57:11 chessguy: tackling the awkward squad would be a good read for you :) 11:57:16 it starts very simple 11:57:17 --- join: jcreigh (n=jason@72-160-49-51.dyn.centurytel.net) joined #haskell 11:57:38 --- join: jgrimes (n=jgrimes@Lee-10-101.rh.ncsu.edu) joined #haskell 11:58:10 Awkward squad covers some of the more interesting areas that would be in such a denotational semantics. 11:58:25 * SamB tried to make WindowMaker think it had segfaulted, but it just died! 11:58:55 SamB: you sent it a segfault signal? 11:59:01 yes! 11:59:10 wouldn't it be safe to say that using denotational semantics for FP should be much easier than imperative languages? 11:59:15 usually when it segfaults it pops up a friendly dialog box offereing to restart it! 11:59:20 since there's no state ? 11:59:23 er. spelled better. 12:00:30 --- join: mejja (n=user@c-272472d5.023-82-73746f38.cust.bredbandsbolaget.se) joined #haskell 12:00:34 That's probably a safe thing to say. 12:01:23 seems to me, that's the crux of why FP is less likely to have mistakes 12:01:31 C is, essentially, always in the IO monad. 12:01:32 or at least the state is kept well away from ordinary functions 12:01:37 --- join: beelsebob (n=tatd2@80-41-95-72.dynamic.dsl.as9105.com) joined #haskell 12:01:58 So if it's harder to give semantics to something like IO, then giving semantics to C would probably be harder than giving semantics to something where only a small part is IO. 12:02:07 yeah 12:02:59 @where cgi-compat 12:03:00 \ 12:03:00 I know nothing about cgi-compat. 12:03:06 sorry 12:03:41 @google "cgi-compat" haskell 12:03:47 http://www.cs.chalmers.se/~bringert/darcs/haskell-cgi/doc/ 12:05:59 @hoogle cgi-compat 12:06:00 Hoogle Error: Parse Error: Unexpected character '-compat' 12:06:37 @where cabal-get 12:06:38 http://hackage.haskell.org/darcs/cabal-get-bootstrap/ 12:07:27 "In short, Haskell is the world’s finest imperative 12:07:27 programming language. 12:07:28 " 12:07:52 --- join: mascht (n=martin@ppp-82-135-75-17.dynamic.mnet-online.de) joined #haskell 12:08:12 --- quit: KingMeTaL () 12:08:22 --- join: Tobsan (n=din@h18n2c1o279.bredband.skanova.com) joined #haskell 12:08:29 ? 12:08:54 ! 12:09:02 a quote from that awkward squad paper 12:09:14 Lemmih: do you know where I can get cabal-get? 12:09:22 chessguy: I don't think Tobsan saw that quote. 12:09:26 without needing to have it first in order to compile it? 12:09:30 --- quit: jcreigh (Connection timed out) 12:09:41 oh, whoops 12:09:42 SamB: It's distributed with Cabal. 12:09:54 Lemmih: ah 12:11:01 @where+ cabal-get Same place as Cabal! 12:11:02 Done. 12:11:48 (cabal-get is now cabal-install, btw) 12:12:26 So, what has Haskell been optimized for that makes it deficient compared to Lisp? :) 12:13:19 @where+ cabal-get cabal-get is now cabal-install, and is in Cabal's source tree 12:13:20 Done. 12:16:42 dolio: readability? 12:17:18 Lemmih: how do I build it? 12:17:25 Heh. 12:18:35 --- join: russo (n=russo@ppp83-237-63-39.pppoe.mtu-net.ru) joined #haskell 12:18:45 --- join: madhorse (n=madhorse@14.Red-80-33-35.staticIP.rima-tde.net) joined #haskell 12:19:27 --- quit: ihope (Connection timed out) 12:19:29 --- join: Itkovian (n=Itkovian@d54C4B834.access.telenet.be) joined #haskell 12:20:02 --- join: blibbet (n=blibbet_@pool-71-102-96-186.sttlwa.dsl-w.verizon.net) joined #haskell 12:20:40 SamB: With cabal. 12:21:33 Lemmih: how come there isn't anything in dependencies/ 12:22:43 I don't even see a dependencies/ directory. 12:22:50 --- quit: gour ("Quit (http://xchat-gnome.navi.cx/)") 12:23:43 Ah, now I see it. 12:23:47 the Cabal/dependencies one ? 12:24:15 --- quit: Itkovian (Client Quit) 12:25:34 xerox: What's up with cabal-install? 12:28:25 it will be really nice when it comes with GHC... 12:29:20 @seen xerox 12:29:21 xerox is in #perl6, #haskell.it, #haskell-overflow, #haskell-blah and #haskell. I last heard xerox speak 1h 48m 46s ago. 12:29:35 @whensleeps xerox 12:29:36 Unknown command, try @list 12:30:02 @version 12:30:03 lambdabot 4p227, GHC 6.5 (OpenBSD i386) 12:30:03 darcs get http://www.cse.unsw.edu.au/~dons/lambdabot 12:30:14 --- quit: madhorse ("Abandonando") 12:30:25 * SamB is using that URL to get to dons's webpage 12:30:54 --- quit: Stinger_ (Remote closed the connection) 12:34:54 --- quit: ragnarok (Remote closed the connection) 12:34:55 * SamB wonders what http://www.cse.unsw.edu.au/~dons/irc/haskell-06.html indicates about xerox's bed time 12:34:57 Title: #haskell @ freenode.org stats by dons, http://tinyurl.com/kpre5 12:38:01 What timezone are the stats in? 12:39:04 Heh, 7th most used word is monad. 12:40:39 hehe. "lambdabot is a very aggressive person. He/She attacked others 87 times." 12:40:53 Poor lambdabot, nobody likes him/her. He/She was attacked 37 times. 12:40:53 For example, like this: 12:40:53 * lambdabot beats up lambdabot 12:40:56 hmm. We use think less often than Haskell? 12:41:10 Poor lambdabot, nobody likes him/her. He/She was attacked 37 times. 12:41:10 For example, like this: 12:41:10 * lambdabot beats up lambdabot 12:41:15 I also like dcoutts_'s place using the most foul language at 0.0%. 12:42:03 vincenz talks to him/herself a lot. He/She wrote over 5 lines in a row 529 times! 12:42:16 tibbe also makes sailors blush, 0.0% of the time. 12:42:22 yeah yeah 12:42:31 I'm also second after dons 12:42:32 hmm, it doesn't collect statistics on how many "boings" someone makes! 12:42:36 and I've been away from IRC for quite a bit! 12:42:43 Great, my current quote has a typo. 12:42:54 Cale: like my even spread? 12:43:03 hehe 12:43:19 --- quit: ski (Read error: 110 (Connection timed out)) 12:43:26 vincenz: more even than lambdabot 12:43:49 Cale: lambdabot dies randomly and is restarted when dons gets up ;-) 12:44:02 but I've been away from irc quite a bit 12:44:02 log into less, idle more 12:44:02 and still third 12:44:02 o.O 12:44:15 --- join: paolino (n=paolino@151.82.7.166) joined #haskell 12:44:27 vincenz: this is for the year so far 12:45:01 yeah 12:45:05 and I've been gone quite a bit 12:45:20 --- quit: russo (Read error: 131 (Connection reset by peer)) 12:46:21 --- quit: mnislaih () 12:46:41 --- join: dcoutts__ (n=duncan@wlan42.mittag-leffler.se) joined #haskell 12:46:47 --- join: jcreigh (n=jason@72-160-112-235.dyn.centurytel.net) joined #haskell 12:48:29 Heh. "Python browser in 25 lines." 12:48:41 Oh? 12:48:41 All you need is a library that does all the work for you. :) 12:48:44 Hehe 12:48:51 --- join: russo (n=russo@ppp83-237-63-205.pppoe.mtu-net.ru) joined #haskell 12:49:05 25 lines, out of which three are "Import HTTP; import Socket; import Browsing;" ? 12:49:41 it's even easier than that 12:49:42 * vincenz snickers 12:49:47 I didn't look at the code. That seems pretty low level, though. 12:49:48 import win32client.com; 12:49:49 I could write one in haskell in three lines then 12:49:52 module balbla where 12:49:55 import Maincode 12:49:55 then just use IE 12:49:59 main = callmaincode 12:50:07 lispy: cheating! 12:50:31 more to the point, it only works on windows! 12:50:54 SamB: what eles is there? 12:51:15 SamB: oh 12:51:22 SamB: why would you use the internet from dos anyway? 12:51:27 um. 12:51:31 ... 12:51:35 I could never figure that out either, actually! 12:51:53 but, there is this thing called Lunix that some people are liking to use 12:52:02 Essentially, it's "make a button, make an html window, make a text box..." 12:52:03 it would be hard to write a browser as a TSR program 12:52:15 --- quit: mrchebas () 12:52:16 "On click, get url contents, feed into html window." 12:52:45 --- quit: chrisb__ (Connection timed out) 12:53:17 --- quit: paolino (Remote closed the connection) 12:53:57 okay, I think dcoutts broke it! 12:54:08 --- quit: beelsebob () 12:54:08 !? 12:54:08 dcoutts__: You have 1 new message. '/msg lambdabot @messages' to read it. 12:54:23 dcoutts: you took out the dependencies for cabal-install! 12:55:03 SamB: yes. they were well out of date 12:55:18 none of them were being used 12:55:38 was I wrong? 12:56:30 well, there were a lot of references in the cabal file for cabal-install to things in ../dependencies 12:56:31 dcoutts__, thanks on your GTK + Windows stuff, how long before it ends up in the latest releases of the GTK package and Gtk2Hs? 12:56:36 dolio: I've got a browser in 25 lines too, in Haskell with Gtk2Hs and Mozembed 12:56:41 however, its possible those were stale too... 12:57:06 however, the cabal-install in head does not build! 12:57:19 at least, not in any obvious way 12:57:25 indeed, we're waiting for xerox's code 12:57:31 SamB: I think the only one it needs now is a http backage 12:57:34 dcoutts__, if i use windows do i get mozembed for free? or does it require firefox/extra libs etc? 12:57:41 Yeah, I figured it's pretty easy in any decent language that includes an html rendering widget in one of its libraries. 12:58:16 ndm_: mozembed for windows is a bit tricky last I looked because they don't normally build gtk+ builds of firefox for windows 12:58:24 * ndm_ imagines an hs-plugins based extension system to the browser 12:58:43 ndm_: I've seen some stuff about it though because novel's ports of some gtk/mono stuff uses an embeded browser 12:58:46 --- nick: ndm_ -> ndm 12:59:14 ndm: as for gtk+ 2.10.x, I'm still waiting for a win32 installer 12:59:39 --- join: psi (n=psi@c-c97e71d5.015-127-6c756c1.cust.bredbandsbolaget.se) joined #haskell 12:59:42 dcoutts: so, are you telling me that some code that is not yet in the repository does not need all these things, but the code there now does? 12:59:42 the people who were doing the 2.8.x ones have been a bit quiet 12:59:57 SamB: right 13:00:13 dcoutts__, what about the threading thing, any updates on that? its holding back GuiHaskell, which has the potential to become quite useful... 13:00:23 so... why did you remove the dependencies *before* this code was added to the repo? 13:00:23 and will certainly kill WinHugs stone dead 13:00:23 SamB: and we don't build the version currently in the repo 13:00:46 ndm: we have to talk to JaffaCake about that 13:01:09 ndm: he said he'd think about it, after 6.6 is released we can talk to him 13:01:35 dcoutts__, cool, thats nice to know 13:01:44 in the meantime Yhc is marching onwards 13:01:51 good! 13:01:54 a port might get to the point of possible soonish 13:02:02 cool 13:02:23 ndm: I talked with him about it at the msr thing in cambridge, the day before you arrived 13:02:39 dcoutts__, yep, you said 13:02:57 dcoutts__, oh, we might have a gentoo ebuild at some point soon, turns out of build master is a gentoo guy 13:03:11 cool 13:03:22 ndm: a gentoo dev or user? 13:03:24 any thoughts on that? would the gentoo haskell team rather it was turned over to you? 13:03:40 dcoutts__, on linux dev = user (but i think he's more a user than a dev officially) 13:03:47 ndm: well you can darcs send it to get it into our repo 13:03:59 we can jointly maintain it 13:04:00 ndm: not when it comes to packages! 13:04:24 sounds best, since you're the more gentoo style people, i think 13:04:38 ndm: we have 5 official gentoo haskell devs, these are people who have passed a test and have commit access to the portage tree. 13:04:43 he seemed to talk like it was a 10 minute job 13:04:51 we now have windows snapshot builds 13:04:51 dcoutts: a test? 13:04:52 probably is 13:05:01 certification 13:05:18 * lispy wants to become a debian dev but never put in the effort to get it 13:05:37 ndm: so yes, he and us can maintain it in our darcs repo of haskell ebuilds, that'd work well 13:05:49 lispy: do you at least have a properly-signed GPG key? 13:05:51 @where gentoo-haskell 13:05:51 I know nothing about gentoo-haskell. 13:05:58 @where gentoo 13:05:59 I know nothing about gentoo. 13:05:59 SamB: nope 13:06:05 ndm: see #gentoo-haskell 13:06:20 ndm: and then we can take responsability for getting it into portage once it's been tested in our overlay 13:06:33 dcoutts__, i was just looking for a darcs repo he can prod it in the direction of 13:06:42 ok, thats cool, probably save us some work 13:07:00 ndm: darcs get http://haskell.org/~gentoo/gentoo-haskell/ 13:07:01 Title: Index of /~gentoo/gentoo-haskell 13:07:17 use --partial I think 13:07:25 it's got a lot of change history 13:09:06 --- join: ski (n=prolog@www.ieee.aegean.gr) joined #haskell 13:09:08 http://code.google.com/p/yhc/issues/detail?id=34 13:09:11 Title: yhc - Google Code, http://tinyurl.com/l28z6 13:09:21 i've filed a bug and assigned it to someone else, so they'll get round to it sometime 13:10:03 * SamB just tried to cat a URL ;-) 13:10:13 * ndm enjoys opening bugs and assigning them to other people 13:10:17 You should switch to Plan9, then. 13:10:41 does that actually work on plan9? 13:10:50 I thought plumbing was only for mousey things! 13:11:05 --- nick: eno -> eno-away 13:11:05 anyway... 13:11:19 Probably not. But you'd no longer think in terms of URLs, but think of URLs as a special case of filesystem paths. :) 13:11:20 http://hackage.haskell.org/ModHackage/Hackage.hs?action=xmlrpc is giving me errors, and worse, they are in HTML! 13:11:25 http://tinyurl.com/kryof 13:11:36 well, wait. 13:11:42 And maybe then it's possible. :) 13:11:45 that might not be what cabal-install sees... 13:13:07 hmm, it certainly *LOOKS* like HTML when I strace it... 13:16:26 isn't that supposed to give you something in XML-RPC back, now? 13:17:57 this is the full URL it was requesting: http://hackage.haskell.org/ModHackage/Hackage.hs?action=xmlrpc/00-latest.txt 13:18:00 http://tinyurl.com/mzvfy 13:18:32 --- quit: psi (Remote closed the connection) 13:22:02 @where HackageDB 13:22:03 http://hackage.haskell.org/ModHackage/Hackage.hs?action=home 13:25:24 --- quit: beschmi ("Leaving") 13:26:00 @where HaskellDB 13:26:01 http://haskelldb.sourceforge.net/ 13:31:15 --- join: psi (n=psi@c-c97e71d5.015-127-6c756c1.cust.bredbandsbolaget.se) joined #haskell 13:31:30 --- part: jak left #haskell 13:33:58 does anyone remember my rant about how linux will only be adopted by linux devotees girlfriends and friend? 13:34:40 well, I found this link on digg, and thought it was funny and relevent http://www.bunchos.com/_wp/?page_id=3 13:34:42 Title: Bunchos dot Com » Quick guide to get a girlfriend using Linux 13:34:50 glguy: what about programmers and tech people? 13:35:17 SamB: I'd suppose that anyone being techy enough to end up liking linux is classified as a devotee anyway. 13:35:24 heh 13:37:37 "Well, it might help if don’t call her bitch or diminish her cool Mac laptop." 13:37:44 heh 13:39:48 why would you have to fake having power... 13:41:33 ? 13:41:44 are you reading that whole thing on how to get a girlfirend? 13:42:17 --- quit: cwenner (Read error: 110 (Connection timed out)) 13:43:12 I think he left out a step... 13:43:17 a rather large one! 13:43:52 --- join: lightstep (n=amir@DSL217-132-222-241.bb.netvision.net.il) joined #haskell 13:44:31 and which step is that? 13:44:33 hmm, you know how "where" works? 13:44:37 --- join: jak (n=jak@85-210-239-158.dsl.pipex.com) joined #haskell 13:44:46 yes 13:44:51 http://paste.lisp.org/display/26591 13:44:57 what's wrong then`? 13:45:07 exept me having big tabs 13:45:51 Tobsan: I think that *is* the problem 13:46:10 where (theCard, newDeck) = getCard indx (Add c h) 13:46:10 newIndx = randomR (0, sizeH hand) 13:46:21 notice how those two bindings aren't lined up? 13:46:28 --- join: Itkovian (n=Itkovian@d54C4B834.access.telenet.be) joined #haskell 13:46:42 SamB i'm afraid i don't really understand 13:46:45 --- join: ramza3 (n=ramza3@c-24-99-72-157.hsd1.ga.comcast.net) joined #haskell 13:47:02 am i supposed to do two "where"s? 13:47:09 --- quit: femol (Remote closed the connection) 13:47:46 Tobsan: no, the first ( and the newIndx should line up. 13:47:50 Tobsan: you are supposed to use tabs with width 8 13:48:01 or not use any tabs 13:48:05 SamB i know that x) 13:48:14 Tobsan: so *do* that 13:48:15 int-e ok, i'll check it out 13:48:15 --- quit: phas ("Ex-Chat") 13:48:25 http://paste.lisp.org/display/26591#1 13:49:19 Add( theCard (shuffle' newIndx newDeck gen) ) is also wrong. 13:49:35 Add theCard (shuffle' newIndx newDeck gen) is what you probably mean 13:49:55 int-e perhaps...but that doesn't matter i guess 13:50:05 no it does matter 13:50:16 the two expressions have different meanings 13:50:38 Add (a b) applies Add to one argument; Add a b applies Add to two arguments. 13:50:47 int-e not in this case 13:50:55 and Add( a b ) is misleading but means Add (a b) 13:50:58 i'm positive 13:51:04 --- join: cwenner (n=cwenner@lund-idb4-ux4-vl88-85-235-31-166.perspektivbredband.net) joined #haskell 13:51:27 (Add a b) would be Add a b again. 13:51:58 int-e ok, well i've changed it, but i'm still getting the same error 13:52:10 unexpected "=" 13:52:34 did you look at glguy's annotation? 13:53:16 the cause of that error is the indentation problem I think. 13:53:23 int-e yes, but he didn't change anything, did he? 13:53:34 sure, he changed the indentation 13:53:37 that's significant 13:54:22 yes. seriously. if you switch to width-8 tabs, your program will work (as soon as it lines up) 13:54:29 lol, why would I paste it if I didn't change anything?? 13:54:30 your where clause is equivalent to where (theCard, newDeck) = getCard indx (Add c h) newIndx = randomR (0, sizeH) all on the same line, because of the way you indented it. 13:54:31 int-e ok, i changed my indentation, but now it's complaining about newIndx 13:55:11 glguy sry, didn't know that indentation mattered 13:55:17 then you probably didn't indent it far enough. 13:55:36 Tobsan: seriously! 13:55:46 set your editor to 8 spaces per tab! 13:55:56 SamB ok, trtying 13:55:59 trying* 13:56:34 SamB you know how to do that in TextPad? 13:56:58 * glguy wonders if textpad has bindings to launch vim... 13:56:58 nvm, found it 13:59:10 --- quit: jcreigh (Read error: 131 (Connection reset by peer)) 13:59:22 * SamB doesn't know how to get *out* of sane-tab-mode 14:01:04 oh, and I use emacs 14:01:39 Tobsan: TextPad is great, but set it to convert Tabs to Spaces on both creation and saving. Saves you all this hassle, and you can still use 4 spaces for a tab (which is much nicer in my opinion) 14:01:56 ndm ok, thanks 14:01:58 Tobsan: and use WinHugs, which nicely integrates with TextPad :) 14:02:08 ndm i do 14:02:22 good good :) 14:02:38 bnut about my code...it complaines again 14:02:43 SamB: sane-tab-mode == ugly-tab-mode 14:02:44 (unexpected symbol "newIndx") 14:02:45 Yeah, I don't think the tab key should get you a tab char either ;-) 14:03:06 by sane-tab-mode, I mean the tabstops are 8 characters apart 14:03:22 in textpad, convert tabs to spaces on creation gives you "never put a tab in my document" mode, which is what everyone should use 14:03:22 nothing to do with the tab key! 14:03:34 no one should ever use tabs, then we'd have no issues 14:03:43 i don't really care about the tabs...' 14:03:45 Tobsan: newIndex? 14:03:46 this is true 14:03:50 ndm yes 14:03:58 Tobsan: paste your code, and the error message 14:04:00 @paste 14:04:00 http://paste.lisp.org/new/haskell 14:04:09 ndm, http://paste.lisp.org/display/26591 14:04:27 but, by the same token, there would be no need to set tabs to display at different widths ;-) 14:04:28 Syntax error in input (unexpected symbol "newIndx") 14:05:25 Tobsan: paste edited with my version, which should fix that 14:05:31 its the indentation again, i think 14:05:31 Tobsan: that's the old code. 14:06:06 Tobsan: and you're not indenting newIndx far enough now I think. The 'n' has to line up with the first ( on the previous line. 14:06:09 are you saying all my errors are indent-problems? 14:06:23 no, but all your syntax errors are. 14:06:35 or so I think right now. 14:07:31 rule of thumb: put a linebreak after each "do" and "where" 14:07:56 lol, i had no idea that the indentation mattered that much 14:08:03 but now that part works 14:10:31 --- join: chrisb__ (n=chrisb@84.208.117.180) joined #haskell 14:10:50 thanks guys, i think i cleared most of it there 14:14:51 --- join: cinema (n=cinema@AMontsouris-151-1-25-12.w82-123.abo.wanadoo.fr) joined #haskell 14:16:25 I'm tired of "news headlines" with question marks in them (especially after watching jon stewart rip into them) 14:17:17 --- quit: monochrom (Read error: 110 (Connection timed out)) 14:17:55 glguy: indeed 14:18:12 glguy: I even hate them on Slashdot, when I bother to read Slashdot. 14:19:16 --- join: ihope (n=foo@c-71-205-100-59.hsd1.mi.comcast.net) joined #haskell 14:19:20 I wish more people reacted to media garbage like I do, it might slow down 14:19:31 when I hear "are you getting jewed? find out more at 10" 14:19:36 I immediately change the channel 14:19:50 Jewed? They can say that on TV? 14:19:53 "jewed?" 14:20:03 i can't beleive they can! 14:20:25 Can they? 14:20:26 yeah... i guess they don't say that 14:20:29 --- join: monochrom (n=trebla@toronto-hs-216-138-220-146.s-ip.magma.ca) joined #haskell 14:20:50 --- quit: iblechbot (Read error: 145 (Connection timed out)) 14:21:08 All this crap about terrorism though 14:21:36 but i agree with the point, ITV news in the UK is now a succession of adverts for upcoming ITV programs - "Has a cure to the superbug been found?" - answer, watch a program on tomorrow to find out 14:23:40 There has never been a significant terror threat. Each year, more people die in Canada from automobile accidents than all the people killed by terrorism around the world. 14:24:21 Cale: you're never going to make money with an honest attitude like that 14:24:51 the trick is to be a piece of shit marketing person 14:25:40 --- join: sad0ur (n=sad0ur@rb1a240.net.upc.cz) joined #haskell 14:25:56 hmm, I'm a very angry person 14:26:16 what scares me is that you can't bring water on a flight, but semtex is ok 14:26:27 semtex? 14:26:39 @wikipedia Semtex 14:26:42 No Result Found. 14:26:57 I'm not the only one that doesn't know what it is then :) 14:27:09 Semtex is a brand of energy drink manufactured in the Czech Republic. 14:27:12 @tell dons @wikipedia is just totally broken... 14:27:12 Consider it noted. 14:27:17 http://en.wikipedia.org/wiki/Semtex_%28drink%29 14:27:19 http://tinyurl.com/r7rag 14:27:22 Semtex is a general-purpose plastic explosive 14:27:37 a bomb thats really powerful, light, and plasticy 14:28:07 As little as 250g can down an airliner 14:28:13 thats a nice statistic :) 14:29:26 * ndm adds to his Christmas list 14:31:17 ?localtime ndm 14:31:18 Local time for ndm is 23 September 2006 10:30 pm 14:31:27 good... you don't live anywhere near me 14:32:36 haha 14:32:45 ndm you live in UK? 14:32:57 Tobsan: yep 14:33:08 off to watch tv now (the shining), bye 14:33:17 :o Jack nicholson 14:33:25 --- join: chrisb (n=chrisb@84.208.117.180) joined #haskell 14:34:23 --- quit: chrisb__ (No route to host) 14:34:43 ?localtime glguy 14:34:44 Local time for glguy is Sat Sep 23 16:34:22 2006 14:37:58 --- quit: yip (Read error: 60 (Operation timed out)) 14:40:14 --- quit: chessguy (" HydraIRC -> http://www.hydrairc.com <- IRC has never been so good") 14:42:47 --- quit: ramza3 (Read error: 54 (Connection reset by peer)) 14:45:34 --- join: fwd (n=fwd@81.25.38.234) joined #haskell 14:45:47 This just in on digg... "Is Debian dying?" 14:46:30 --- quit: therp (Read error: 60 (Operation timed out)) 14:47:04 --- quit: Foxyloxy ("Sausages!") 14:47:18 digg? 14:47:37 heh, that's a change of pace over BSD dying 14:49:01 I think that most people that know what the *BSDs are have realized that it's not going away 14:50:00 --- quit: buggmuzz (Read error: 110 (Connection timed out)) 14:50:31 glguy, I'm being a smartass. 14:50:46 --- join: Dreadshoot (i=none@81-229-125-50-no50.tbcn.telia.com) joined #haskell 14:50:53 me too 14:51:20 --- quit: Itkovian () 14:51:26 BSD might not be going away, but having used FreeBSD a few years ago, I can say it's not going to lose any ground to Linux in the desktop market anytime soon 14:51:36 I mean 14:51:39 The opposite of that 14:52:08 What I'm trying to say, is that it sucked on the desktop compared to linux 14:52:15 There, that wasn't so hard to say 14:52:54 but that argument works easily against Linux vs OS X and Windows, but that doesn't stop people from adopting linux 14:53:06 but also i don't see BSD and the answer to the desktop anyway 14:53:16 Well, there are certain things Linux has that are very useful 14:53:22 Like a giant community 14:53:37 And I prefer the debian/ubuntu package repository to ports 14:53:43 I had some problems with ports 14:53:50 It's nice when an army of geeks maintain your packages 14:54:45 Actually I went with FreeBSD in 2003 after a failed attempt at a Debian install 14:55:04 At the time I was happy, but I switched to Ubuntu and haven't missed BSD 14:55:32 ;) 14:55:34 * weitzman disappears 14:57:02 It's nice when an army of geeks maintain your packages ;) sounds cool 14:59:29 --- join: perspectiva1 (n=silas@rb4b68.net.upc.cz) joined #haskell 14:59:30 --- quit: perspectival (Read error: 104 (Connection reset by peer)) 14:59:40 --- quit: jak ("Leaving") 15:03:26 --- quit: MikeJS (Remote closed the connection) 15:03:39 --- quit: dcoutts__ (Read error: 110 (Connection timed out)) 15:04:24 --- quit: cinema ("Leaving") 15:05:42 --- join: Limbic_Region (n=Limbic_R@p3m/member/Limbic-Region) joined #haskell 15:10:49 --- join: johnnowak (n=johnnowa@207-38-246-119.c3-0.wsd-ubr2.qens-wsd.ny.cable.rcn.com) joined #haskell 15:11:26 --- quit: psi (Remote closed the connection) 15:12:37 --- join: psi (n=psi@c-c97e71d5.015-127-6c756c1.cust.bredbandsbolaget.se) joined #haskell 15:14:36 --- quit: chrisb (Read error: 110 (Connection timed out)) 15:16:51 What is the best option for mutable variables? The StateMonad or IORef? 15:19:55 --- join: nanavati_ravi (n=ravi@c-66-30-140-14.hsd1.ma.comcast.net) joined #haskell 15:20:07 --- quit: psi (Remote closed the connection) 15:23:53 araujo: What do you need? 15:26:15 --- quit: monochrom ("Ex-Chat") 15:26:20 Lemmih, I need to have some kind of destructive-updating 15:26:22 araujo: The State monad is decent when you just want a simple piece of state which is carried through an otherwise pure computation. 15:26:27 For a variable. 15:26:38 --- join: psi (n=psi@c-c97e71d5.015-127-6c756c1.cust.bredbandsbolaget.se) joined #haskell 15:26:41 For more complex kinds of state in a pure computation you can use the ST monad 15:27:08 IORefs are more for carrying around state in a computation which already involves IO in some way 15:27:46 yeah, that is it. 15:28:03 and for very simple thread communication (for anything serious in the way of thread communication, you should use MVars or Chans or soomething like that) 15:28:38 Well, the variable needs to be accessed by a single thread. 15:28:42 okay 15:28:56 Is it worthy to use MVars? 15:28:58 Then it's probably an IORef, if you're already in IO 15:29:03 --- quit: Limbic_Region (" HydraIRC -> http://www.hydrairc.com <- The professional IRC Client") 15:29:11 Yes, i am in there .... 15:29:17 If you're in a single threaded program, an MVar is probably inappropriate 15:29:35 since attempting to read from an empty MVar will cause your thread to block 15:29:45 Yes, i noticed that :-) 15:31:16 --- join: beelsebob (n=tatd2@82.152.117.217) joined #haskell 15:31:33 Cale, OK, so, considering the IO, the IORef would be the way to go , do you know any good paper to read about it? 15:32:06 There's not much to IORefs 15:32:06 --- quit: nanavati_ravi (Read error: 104 (Connection reset by peer)) 15:32:15 :-( 15:32:35 you create a new IORef using newIORef 15:32:43 (and giving an initial value) 15:32:58 and then you can read or write to that IORef with readIORef and writeIORef 15:33:03 --- quit: kombinator ("Leaving") 15:33:11 there's also modifyIORef which will apply a function to the value in the IORef 15:33:17 yeah, i can see the library is pretty straightforward to use, i just wanted some theoretical background. 15:33:32 Well, it's just a pointer, really :) 15:33:41 I see. 15:34:04 Note that since it points at a Haskell value, the value contained by an IORef might not be evaluated yet. 15:34:08 It could even be undefined 15:34:40 IORef is mentioned here http://research.microsoft.com/~simonpj/Papers/marktoberdorf/ 15:34:41 Title: Simon Peyton Jones: papers, http://tinyurl.com/jl2rm 15:34:50 So they are lazy .... 15:35:01 right 15:35:13 Nice, lazy references .. mm 15:35:24 well, writeIORef will cause the pointer to be updated immediately, of course 15:35:33 yeah, makes sense 15:35:36 but the value it points to is not evaluated at all by this 15:35:44 i guess the modify function too right? 15:36:01 right 15:36:02 Ok, that's the nice part. 15:36:25 It updates only the reference. 15:36:29 So you should be a little careful about it though, since it's easy to build up stack overflows waiting to happen 15:37:08 I am not used to work with this kind of computation (and probably i wouldn't like to get used to), i hope to use only a single variable for now. 15:37:22 > foldl (+1) 0 [1..1000000] 15:37:23 Occurs check: cannot construct the infinite type: t = b -> t 15:37:23 Expec... 15:37:24 --- join: chessguy (n=chessguy@c-69-242-13-143.hsd1.pa.comcast.net) joined #haskell 15:37:30 > foldl (+) 0 [1..1000000] 15:37:32 Exception: stack overflow 15:37:35 like that 15:37:38 :-( 15:37:39 (only with IORefs :) 15:37:50 I see ... 15:37:50 So you might want to force some evaluation from time to time 15:38:20 Ok, i see it brings pretty much the annoyance of pointers in other languages .... 15:38:21 depending on what you're doing 15:38:35 well, at some degree .... 15:38:46 Cale, now you scared me :-P 15:39:10 --- quit: beelsebob () 15:39:16 So if you're doing something like an accumulator, force the computation to occur when you make the update. 15:39:25 Good good. 15:39:32 That's all there is to that :) 15:39:39 Ok, Thanks Cale ! 15:39:42 Thanks astrolabe ! 15:40:04 Ah. I thought you'd missed it :) 15:40:04 I will get some food first and then i'll try this :-) 15:40:14 * araujo off 15:41:26 --- quit: weitzman (Read error: 110 (Connection timed out)) 15:49:46 * vincenz is off 15:49:47 night! 15:50:14 --- quit: vincenz ("leaving") 15:54:31 --- quit: lightstep ("Ex-Chat") 15:54:59 --- join: jcreigh (n=jason@72-160-112-235.dyn.centurytel.net) joined #haskell 15:55:10 --- join: nanavati_ravi (n=ravi@c-66-30-140-14.hsd1.ma.comcast.net) joined #haskell 15:57:12 --- join: weitzman (n=david@CMU-198389.WV.CC.cmu.edu) joined #haskell 15:57:17 --- join: MikeJS (n=mike@24.151.112.174) joined #haskell 16:00:54 --- quit: sad0ur ("leaving") 16:01:48 --- join: stepcut (n=user@ip68-107-68-183.sd.sd.cox.net) joined #haskell 16:06:25 --- quit: mascht ("Lost terminal") 16:09:26 --- quit: Jaak ("leaving") 16:10:35 --- quit: Averell (Read error: 145 (Connection timed out)) 16:11:24 --- part: br1 left #haskell 16:17:11 --- quit: takuan ("leaving") 16:17:32 --- join: abc (n=abc@a052.201.adsl.nextweb.net.mt) joined #haskell 16:18:11 --- join: darinm (n=dwm@moscow-cuda-gen2-68-64-62-137.losaca.adelphia.net) joined #haskell 16:19:09 --- join: br1 (n=br1@r200-40-217-60-dialup.adsl.anteldata.net.uy) joined #haskell 16:20:07 --- quit: Twigathy (Remote closed the connection) 16:21:14 --- join: Averell (i=averell@p3m/member/Averell) joined #haskell 16:28:15 --- join: Twigathy (n=Twigathy@82.152.117.217) joined #haskell 16:30:34 --- join: beelsebob (n=tatd2@80-41-16-27.dynamic.dsl.as9105.com) joined #haskell 16:30:37 --- quit: fwd (Read error: 113 (No route to host)) 16:32:18 http://www.codinghorror.com/blog/archives/000684.html 16:32:20 Title: Coding Horror: When Understanding means Rewriting, http://tinyurl.com/evfed 16:32:33 this article claims that programmers spend tons of time understanding old code 16:32:36 --- join: ramza3 (n=ramza3@c-24-99-72-157.hsd1.ga.comcast.net) joined #haskell 16:32:39 lots of time rewriting code 16:32:44 and a little time writing new code 16:32:56 that doesn't jibe with what I've seen 16:33:09 people don't bother to "understand" what they are modifying 16:33:14 they just dive in and break stuff! 16:36:20 which works fine *if* breakage is easily detected... 16:36:21 --- quit: matthew-_ (Read error: 104 (Connection reset by peer)) 16:40:20 --- join: chrisb (n=chrisb@cm-84.208.117.180.chello.no) joined #haskell 16:41:03 --- quit: Prip ("Sto andando via") 16:46:46 --- quit: abc () 16:47:00 --- quit: stepcut (Read error: 110 (Connection timed out)) 16:57:38 --- quit: twanvl () 17:01:05 --- quit: johnnowak () 17:01:16 --- nick: Dreadshoot -> x3m 17:01:57 --- quit: mejja (Read error: 110 (Connection timed out)) 17:07:33 --- quit: erider (Read error: 110 (Connection timed out)) 17:08:02 --- join: erider (n=erider@unaffiliated/erider) joined #haskell 17:08:52 --- quit: ndm ("Chatzilla 0.9.74 [Firefox 1.5.0.7/2006090918]") 17:09:38 --- quit: int-e ("Bye!") 17:12:21 can you compile stuff(to exe) through ghci? 17:14:54 x3m: I don't know. Why don't you use ghc proper? 17:15:33 who says i dont? 17:15:47 What do you mean by ghci then? 17:16:06 the interpreter prompt or whatever it is 17:16:36 Ah, OK. So you have been compiling through ghc but you want to use ghci now? 17:16:48 i just wonder if its doable 17:17:40 Well. You can escape to the prompt with "!:" so that's a way. 17:18:17 It's the other way: ":!" 17:18:28 --- nick: tmoertel_away -> tmoertel 17:19:13 *** Exception: system: invalid argument (null command) 17:19:21 when trying :! 17:19:53 You have to put something after that: ":! ghc mimod.hs" 17:21:06 ah okay 17:22:16 --- quit: erider (Read error: 104 (Connection reset by peer)) 17:25:50 --- quit: foxy (Read error: 110 (Connection timed out)) 17:26:29 --- join: erider (n=erider@unaffiliated/erider) joined #haskell 17:27:36 hmm 17:30:41 how is a hello world app supposed to look like 17:30:59 main = putStrLn "Hello World" this seems to work 17:31:33 but the tutorial mentions: module Main on a line above, i tried that and then it didnt compile 17:31:47 it should be "module Main where" 17:32:42 and yes, that is the usual structure 17:33:20 --- join: Deformative-II (n=joe@c-68-61-240-49.hsd1.mi.comcast.net) joined #haskell 17:33:29 with module Main where it doesnt compile 17:33:53 then i get: test2.hs:2:0: parse error on input 'main' 17:34:04 * araujo back 17:34:13 :-) 17:34:19 "lisp never had type-safe compile-time lambdas." 17:38:02 --- part: nanavati_ravi left #haskell 17:38:20 this module stuff dont work 17:40:17 ?where paste 17:40:17 http://paste.lisp.org/new/haskell 17:40:28 Perhaps you should paste what you're trying to compile there. 17:42:12 test pasted "." at http://paste.lisp.org/display/26604 17:43:03 thats it, pretty much what i've allready said 17:44:58 --- quit: cwenner (Excess Flood) 17:45:01 --- quit: cptchaos ("Download Gaim: http://gaim.sourceforge.net/") 17:45:06 Hmm. Odd. 17:45:31 --- join: cwenner (n=cwenner@lund-idb4-ux4-vl88-85-235-31-166.perspektivbredband.net) joined #haskell 17:45:34 x3m: What line do you use tom compile? 17:45:40 its in ghc in win btw 17:46:05 --- quit: darinm () 17:46:15 ghc --make test.hs -o test 17:47:21 line endings? junk characters? 17:47:29 The file must be named main 17:47:41 oh, trying that 17:47:53 no, no junk and line endings exactly as i did in the paste 17:48:19 lol, i like the contrast between quicksorts in C and Haskell in http://www.haskell.org/haskellwiki/Introduction 17:48:20 --- join: stepcut (n=user@ip68-107-68-183.sd.sd.cox.net) joined #haskell 17:48:22 Title: Introduction - HaskellWiki, http://tinyurl.com/eogyw 17:49:11 2 lines versus 25ish 17:49:18 :) 17:49:18 x3m: try putting it on one line. module Main where main = putStrLn "hello" 17:49:20 got it to work now 17:49:37 x3m: Great 17:49:48 --- join: dfranke (n=dfranke@ip24-250-204-33.ga.at.cox.net) joined #haskell 17:51:13 I wonder how bad in-place qsort would be in the ST monad. 17:51:36 ST? 17:52:12 ST is a monad that lets you do imperative programming minus IO, essentially. 17:53:37 --- nick: tmoertel -> tmoertel_away 17:53:45 "An incestuous example: the Glasgow Haskell compiler is written in Haskell: a 30,000-line application" 17:58:24 dolio: I'm more interested in cool uses of the accum constructor funciton for arrays 17:58:52 --- quit: tennin (Read error: 110 (Connection timed out)) 17:59:02 oh, it's more like 60k now 17:59:03 dons: You have 2 new messages. '/msg lambdabot @messages' to read them. 17:59:05 i should update that 18:01:46 i assume the 30k is for Haskell 90 18:01:47 98 18:03:34 let fac n = if n == 0 then 1 else n * fac (n-1) in fac 3 18:03:37 > let fac n = if n == 0 then 1 else n * fac (n-1) in fac 3 18:03:38 6 18:03:44 > let fac n = if n == 0 then 1 else n * fac (n-1) in fac 0 18:03:45 1 18:03:54 > let fac n = if n == 0 then 1 else n * fac (n-1) in fac -1 18:03:54 add an instance declaration for (Num (a -> a)) 18:04:17 strange error 18:04:41 > let fac n = if n == 0 then 1 else n * fac (n-1) in fac (-1) 18:04:43 Exception: stack overflow 18:04:43 fac - 1 parses as (-) fac 1, not fac (-1) 18:04:58 aha 18:04:59 Or, fac -1, even. 18:11:32 br1 pasted "monomorphism" at http://paste.lisp.org/display/26606 18:12:03 Could anyone look into my problem there, please? 18:13:39 --- quit: blibbet ("Leaving") 18:16:29 A :: B -> C -> D means that A is a function which taeks an argument of type B and an argument of type C and returns something of type D, right? 18:16:39 yes 18:16:52 but A should be lower case 18:16:52 --- quit: fnordus (Read error: 104 (Connection reset by peer)) 18:17:20 well, ok, it was just an example 18:17:49 so if it was A :: B -> C -> D -> E, then there are three arguments? 18:17:50 --- quit: der_eq (Read error: 54 (Connection reset by peer)) 18:18:43 One way of looking at it is that A takes an argument of type B and returns a value of type C -> D -> E 18:19:07 hmmm 18:19:30 but the easier way to look at it is what i said, right? 18:20:06 Possibly, but your way might confuse you if E = Int -> Char 18:20:20 In which case there are 4 arguments 18:20:44 aha. so i was assuming primitive types naively 18:22:10 Is there defaulting to the IO monad or someting like that? 18:22:25 No 18:22:55 What could be happening in my case, then? 18:23:52 That's the monomorphism restriction. If you want it to have the polymorphic type you need to give it explicitly 18:24:10 Or rewrite it to look like a function 18:24:44 But why does it matter if I use the function or not? 18:25:46 If you use it then it knows what monomorphic type to give it 18:26:21 You can also use -fno-monomorphism-restriction 18:26:41 The MR is mostly silly. 18:27:04 mmh 18:27:11 that's strange 18:27:20 There are some somewhat obscure cases where programs will run exponentially slower without it though. 18:27:54 These problems can always be alleviated by assigning monomorphic types explicitly. 18:28:54 Yes, I more or less understand the reasons for the restriction. What I didn't know was that ghc considered other functions at file scope to determine the type 18:28:55 any news on 6.6 18:29:23 Is that an extension to what the standard requieres in for the monomorphic restriction? 18:30:51 --- join: foxy_ (n=chatzill@222-153-54-180.jetstream.xtra.co.nz) joined #haskell 18:30:55 --- nick: foxy_ -> foxy 18:32:29 br1: No 18:32:39 --- quit: cwenner (Read error: 110 (Connection timed out)) 18:32:48 emu: We probably need another round of RCs 18:33:10 seems like a good idea 18:33:27 * Igloo needs to do lots of patch merging tomorrow 18:34:07 --- join: matthew-_ (n=matthew@81.168.74.31) joined #haskell 18:35:52 --- quit: chrisb (Nick collision from services.) 18:36:04 --- join: chrisb__ (n=chrisb@cm-84.208.117.180.chello.no) joined #haskell 18:36:11 the "Implementation of aton and ntoa outside the IO monad" looks useful too, Igloo 18:38:38 --- quit: erider (Read error: 110 (Connection timed out)) 18:38:39 --- join: erider_ (n=erider@unaffiliated/erider) joined #haskell 18:39:12 well, all very interesting. when the 'unix tools' article went up, it sat at the top of the reddit list, and we got 3k hits in 3 hours. then haskell.org went down, 21 hours later it came back up, and we got 300 hits in the next 12 hours :/ 18:39:21 @pl \ f g x -> f x (g x) 18:39:22 ap 18:39:26 oh well, we missed a bit of an opportunity there 18:39:50 @pl \ f g x -> f x g 18:39:51 flip 18:40:38 @pl \ x y -> y x 18:40:39 flip id 18:41:05 lennart, you don't happen to be a lector at lth? 18:41:14 @pl \ f x -> f x x 18:41:14 join 18:41:16 dons, argh 18:41:28 no, i'm an ex-lektor at cth 18:41:33 haskell missed its chance at the limelight 18:42:03 stupid /. effect 18:42:27 @pl \ k f g x -> k (f x) (g x) 18:42:28 liftM2 18:42:51 @pl \ k f g x -> k (f x) g 18:42:52 (flip .) . (.) 18:43:07 @pl \ k f g x -> k f (g x) 18:43:08 ((.) .) 18:44:04 http://www.haskell.org/ghc/docs/6.4.2/html/libraries/base/Control-Monad-ST.html mentions the paper "Lazy State Threads". I think it should say "Lazy Functional State Threads" 18:44:06 http://tinyurl.com/rafpa 18:44:10 sris: why? 18:45:02 lennart, just curious because im taking a haskell course at lth, sweden this fall and our lecturer is named lennart too ;) 18:45:21 hmmmm, not me as far as i know 18:45:40 i guess not 18:46:04 --- quit: BCoppens ("Konversation terminated!") 18:47:07 dons: the Linspire guys were promising a bunch of unix-like tools in haskell, any relation to yours? 18:47:24 --- join: fnordus (n=dnall@24.85.128.203) joined #haskell 18:47:39 mmm. interesting. no, i've not heard that. 18:48:03 mine i just hacked up on friday after a query from a user here. 18:49:34 @pl \ x y z -> x y 18:49:34 (const .) 18:49:51 i think my favourite is this one: io $ zipWith (printf "%3d %s") [(1::Int)..] 18:50:06 cat -n 18:50:20 there's a bit of magic happening there, with printf. 18:50:22 yep 18:50:55 hmmm, yes, i'm surprised it type checks 18:51:00 heh 18:51:05 no type signature? 18:51:26 the 'io' constraints it to String 18:51:36 oh, ok 18:51:52 --- quit: arjanb ("zzz") 18:51:56 printf is a beast :) 18:52:37 it also needs freshening up. i think it's still my ancient code 18:52:48 printf in Haskell has to be implemented in Template Haskell or something, right? 18:52:54 no 18:53:02 ?type printf 18:53:04 forall r. (PrintfType r) => String -> r 18:53:04 H98 suffices 18:53:45 Oh...how does the variable number of arguments thing work? 18:53:53 > print "%d %s" 99 "bottles" :: String 18:53:53 The function `print' is applied to three arguments, 18:53:54 but its type `a ... 18:54:13 > printf "%d %s" 99 "bottles" :: String 18:54:13 Add a type signature 18:54:16 > printf "%3d %4s %6f\n" (42 :: Int) "h98 forever!" (pi::Double) :: String 18:54:17 bah 18:54:17 " 42 h98 forever! 3.141592653589793\n" 18:54:31 stupid defaulting never works as i like 18:54:40 yeah 18:55:06 jcreigh: it works by type class magic 18:57:31 > printf "%s" (42 :: Int) :: String 18:57:33 Exception: Printf.printf: bad argument 18:57:42 So the type-checking fails at runtime, then. 18:59:01 yeah, the format string isn't analysed at compile time 18:59:18 but the arguments must be known to be printf-able 18:59:32 and they can vary in number 18:59:49 ?type printf "%s" "abc" 18:59:50 forall t. (PrintfType ([Char] -> t)) => t 18:59:53 --- join: _dolio (n=dolio@nr10-216-68-185-34.fuse.net) joined #haskell 18:59:53 ?type printf "%s" "abc" "def" ghci" 18:59:55 lexical error in string/character literal 19:00:09 ?type printf "%s" "abc" "def" "ghc" 19:00:11 forall t. (PrintfType ([Char] -> [Char] -> [Char] -> t)) => t 19:00:18 ?type printf "%s" "abc" "def" "ghc" :: String 19:00:19 String :: String 19:01:36 ?instances-importing Text.Printf PrintfType 19:01:37 (a -> r), IO a, [c] 19:01:46 mmm. tasty 19:01:53 there's the variable argument trick 19:02:32 ?instances-importing Text.Printf PrintfArg 19:02:33 Char, Double, Float, Int, Integer, [c] 19:03:07 seems like an: instance Show => PrintfArg a where ... for the rest would be useful 19:03:18 though i've not actually ran into that as a problem yet 19:04:58 http://www.smh.com.au/news/web/new-browser-offers-stealth-mode-surfing/2006/09/21/1158431835805.html 19:04:59 Title: New browser offers stealth mode surfing - web - Technology - smh.com.au, http://tinyurl.com/lcrha 19:05:04 firefox-over-tor, on a usb stick 19:07:18 <_dolio> Hmm... My ugly in-place quicksort is slower than the beautiful Haskell quicksort. 19:07:41 heh 19:07:52 how's it compare to List.sort ? 19:08:13 <_dolio> List.sort is a bit faster, I think. 19:08:25 <_dolio> But the Haskell idiomatic qsort is faster than List.sort. 19:08:34 mm. makes me think a @time would be a useful plugin 19:08:47 --- nick: erider_ -> erider 19:09:37 _dolio: With optimization? 19:10:02 <_dolio> I'm fairly inexperienced with MArray algorithms, though, so maybe I missed something obvious. 19:10:18 ah 19:10:33 you wrote a mutable, inplace array-based qsort? 19:10:34 <_dolio> Translating C loops into recursive functions can be awkward. 19:10:41 <_dolio> Yeah. 19:11:46 --- quit: dolio (Read error: 110 (Connection timed out)) 19:12:16 --- nick: _dolio -> dolio 19:13:22 br1: What kind of optimization? 19:16:17 If I use unboxed arrays, I can get performance comparable to the idiomatic qsort. :) 19:20:27 hmmm..... is haskell.org down? 19:21:23 Apparently it is 19:21:27 ...again 19:21:31 It was up earlier 19:21:55 yes, it's been up for 12 hours or so. 19:21:58 *sigh* 19:23:07 are they running apache? 19:23:21 is it a recent version? using any 'weird' features? 19:23:36 Did whoever brought it up release any explanation? 19:24:02 are the default Read/Show implementations any good for serializing/unserializing data? 19:24:19 yes, there were 150 simultaneous connections, and it went down. they're investigating whether it was a /. effect, or a DOS 19:24:20 weitzman: just that there were 150 client connections and they restarted the server 19:24:32 --- join: bran_ (i=foobar@k9.dv8.org) joined #haskell 19:24:44 --- join: glauber_sp (n=Glauber@200-168-101-11.dsl.telesp.net.br) joined #haskell 19:24:52 150 connections doesn't seem like a good reason for a server to drop dead 19:25:00 i can't imagine that there is any slashdot effect right now though. 19:25:02 Unless they opened connections and didn't accept any data 19:25:34 --- quit: br1 (Read error: 104 (Connection reset by peer)) 19:25:37 Even then, timeout would deal with it unless it were a DoS 19:25:51 it's sort of like whatever thing they were supposed to do went to sleep and never timed out...that was how it sounded (but i don't have much info) 19:26:09 maybe its time we had a bit of a more robust setup for haskell.org 19:26:33 Written in... 19:26:36 Erlang! 19:27:51 Hapache 3.0 19:28:19 what's annoying is that the mail server seems to be run from the same box? 19:28:20 That paper lispy mentioned yesterday said something about implementing an HTTP server in Haskell, although it didn't point to any code 19:28:25 and hackage? 19:28:31 Ooo, now I'm faster. I needed to strictify, I guess. 19:28:34 weitzman: yeah, there's HWS and HAppS 19:29:08 Although in terms of robustness, I don't think will come down to language choice 19:29:13 Or, perhaps not. Sorting random numbers as a benchmark is tricky business. 19:29:15 how hard would it be to set up a mirror of just the website? 19:29:22 anyone had experience doing that kind of thing? 19:29:26 dons: sort a sorted list :) 19:29:28 er 19:29:32 dolio: sort a sorted list 19:29:35 Bandwidth, redundancy, policies for high-load 19:29:50 dolio: isn't that the way to get qsort to behave poorly (not worst but poorly) 19:30:19 if only the wiki had a darcs backend... 19:30:34 we could trivially mirror and distribute it 19:30:49 dons: syncing databaseses must be a solved problem though... 19:31:06 sure 19:31:11 (the extra eseseses help solve the problem) 19:31:16 darcs pull haskell.org just sounds nice though ;) 19:31:22 heh 19:31:22 lispy: Yeah, but would that be good for benchmarking two qsort implementations? 19:31:24 Might be a little more complicated if the wiki has any concept of users with more permissions than others 19:31:39 In terms of not sending around their password hashes 19:31:44 yeah 19:31:55 a simple option would be for mirrors to be ro 19:32:13 ok, mailing list still works. good 19:32:18 though that was a bit of a delay 19:32:52 how long does a hugs build take compared to ghc 19:32:54 --- quit: jcreigh ("Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet.") 19:33:04 well, ghc takes 6+ hours to build on my ibook 19:33:12 i bet hugs is much faster 19:33:19 must be super high quality then. 19:33:58 * dons principle of fun and software: the longer it takes to build, the more goodies you get 19:34:07 yea 6+ hours for ghc on my ibook too 19:34:14 problem is I think I hosed my darwinports 19:34:19 * lispy stamps his foot to signify his annoyance with the darwinports version of emacs failing to run 19:34:20 and may need to start from scratch 19:34:26 Even dons principle can't convince me to install gentoo 19:34:38 heh 19:34:50 * Patterner uses gentoo too 19:35:01 --- nick: eno-away -> eno 19:35:10 ?users #gentoo-haskell 19:35:15 Maximum users seen in #gentoo-haskell: 18, currently: 13 (72.2%), active: 1 (7.7%) 19:35:46 I have a crazy gentoo-using friend who will occasionally mention things like, "My computer was compiling XXX" all night. XXX might be something like X, or gcc, or something of that nature 19:35:55 there is no aqua/carbon variant for the emacs port? 19:36:25 hyrax42: yes 19:36:31 hyrax42: called, carbon emacs 19:36:38 i gave up on #gentoo-* channels 19:36:42 oh I didnt' see it 19:36:46 but i can't get it to run on the command line :( 19:36:47 weitzman: similar on the bsd's, where we build out packages from source as well 19:36:55 hyrax42: so it's not very useful to me 19:36:58 XXX = KDE :) 19:37:06 oh it's on emacs-devel 19:37:08 though ghc takes about 30 mins, since it's built from C source on openbsd 19:37:09 At one point this summer I told my computer to do a full build of the window Vista core components, but I left the virus checker on and it didn't finish overnight 19:37:28 Although my dev box was pretty powerful 19:37:34 well darwinports is meant to be similar to bsd ports 19:37:46 not sure wy ghc takes 6-8 hours 19:38:05 haskell.org down again? 19:38:11 yes. 19:38:13 :-( 19:38:14 about 10 mins ago. 19:38:18 :/ 19:38:23 good thing I hav a billion wiki pages open 19:38:32 --- quit: ski (Read error: 145 (Connection timed out)) 19:38:34 if only I could get my inferior-haskell to work in emacs 19:38:43 --- join: scsibug (n=scsibug@ppp-70-253-38-121.dsl.rcsntx.swbell.net) joined #haskell 19:38:58 my emacs crashes on startup for some reason :( 19:39:14 and i'm sick of using carbon emacs...so time to fix it 19:39:53 that's been enough to chuck 'unix tools' off the reddit front page :/ah well, the fickle blogosphere 19:40:04 argh 19:41:03 what's bad about carbon emac 19:41:04 s 19:41:04 But what is the problem? , this would be the third day down? 19:41:17 it was down for 21 hours, up for 12, and now down for 20 mins or so 19:41:36 Maybe it will come up after 21 minutes down 19:41:41 Then go down in 12 seconds 19:41:52 :-P 19:42:36 I want a @get-haskell-org-admins-on-the-hot-line plugin 19:42:43 so we can set off their pagers from irc 19:42:45 @help!!! 19:42:45 Unknown command, try @list 19:43:00 yeah 19:43:18 hyrax42: it requires a window and does really odd things to the control keys :( 19:43:27 oh? 19:43:34 my keys seem fine 19:43:52 we need mirrors 19:43:56 oh well .... 19:44:33 hyrax42: your apple keys still works when carbon emacs has focus? 19:44:33 dons: maybe you can port @getshapr :) 19:44:45 yeah :) 19:44:59 lispy: yeah 19:45:06 works as meta 19:45:12 hook up lambdabot to the mobile phone network, and it can send out some text messages to the admins 19:45:14 but I can command-tab as well 19:45:27 dons: I have some haskell code for that 19:45:39 just some things annoying like M-tab being autocomplete in some modes 19:45:55 hyrax42: that's what i mean, they take over the apple key so it makes osx funny :( 19:45:59 dons: could alsa have an asterisk box call them and report errors 19:46:40 yeah, an undergrad at my uni used to have a website for sending text msgs to sydney numbers 19:46:53 --- quit: glauber_sp ("Fui embora") 19:47:02 he could do it for free? 19:47:05 send the sms? 19:47:33 --- quit: macron (Read error: 104 (Connection reset by peer)) 19:48:13 actually, most cell provides provide email->sms gateways if you just email, @something.cellprovider.com 19:48:34 for free though? 19:48:37 --- join: cwenner (n=cwenner@lund-idb4-ux4-vl88-85-235-31-166.perspektivbredband.net) joined #haskell 19:48:38 yeah 19:48:49 mmm. /me tries this 19:48:53 well, free to the sender, depends 19:49:08 That depends upon the provider. 19:49:35 probably, I only have experience with 2 of them ;) 19:49:37 or the country? I think receiving is free here. 19:51:29 in the US, most carriers charge you for receiving -- but many subscribers have various bundles that include a few hundred or few thousand 'free' txt messages per month 19:51:54 yeah, i think they charge you to send and receive in the US righT? 19:51:57 considering the actual data must be several 100s of dollars a gigabyte.. 19:52:05 lispy: yeah 19:52:15 Here, one provider is paid, the other one is for free. 19:53:23 You can send from and receive from internet for free. 19:53:27 in the US there is also an option for send pays double, receiver pays nothing 19:53:59 You are only charged if you send from the phone. 19:54:27 That's one provider, the other charge you for both service. 19:54:47 * araujo is with the free one of course :-) 19:55:04 Though i just use it for sending messages to my sister 19:55:10 doh, my provider has a web interface, but EmailSMS costs $0.25 per sent SMS and $5.00 per month 19:55:24 --- join: Krooga (n=nospam@cust3634.vic01.dataco.com.au) joined #haskell 19:55:27 dons: that sucks 19:55:32 yeah 19:55:50 --- join: johnnowak (n=johnnowa@207-38-246-119.c3-0.wsd-ubr2.qens-wsd.ny.cable.rcn.com) joined #haskell 19:55:53 there's even a command line tool to hook into it, you just have to pay 19:56:09 --- nick: mathrick -> mathrick|sleep 19:56:13 --- join: mathewm (i=mathewmi@popcorn.dreamhost.com) joined #haskell 19:56:14 dons: you might check and see if clickatell has cheaper rates: http://www.clickatell.com/ 19:56:16 Title: Clickatell Bulk SMS Gateway 19:56:22 Anyone know what's up with haskell.org right now? 19:56:26 down 19:56:44 as a bonus, you can then send sms to any network 19:56:48 mmm.. 19:56:59 yeah, I noted that hoogle is hanging :( 19:57:22 It was down last night, too, but was up today. ?? 19:57:26 yes 19:57:32 For several hours. 19:57:38 just went down again... 19:57:44 * araujo could open a few pages 19:57:56 dons: clickatell has several APIs ranging from simple to complex, I have haskell binding for one of them. 19:58:11 Let's hope it gets back soon 19:58:24 I don't want to spend other night like this 19:58:32 stepcut: yeah, looks nice. 19:59:18 anyone here familiar with GHC internals and the GHC API? 19:59:21 now I just need to figure out why people would want to pay me to send them text messages ;) 19:59:28 heh 19:59:53 we could start up a haskell homework answers servvice 19:59:59 hehe 20:00:04 $5 per answer, delivered o your phone 20:00:11 and send from lambdabot, via irc :) 20:00:23 maybe a sms interface to Dr Haskell ;) 20:00:34 yeah, to lambdabot even 20:00:37 anyone have any links on suitability of haskell to ai applications? 20:00:41 pointfree refactoring from your mobile 20:00:56 or is it suitable? 20:01:03 for when you just need to use Monad (->) a_ 20:01:30 hyrax42: do you have any AI experience ? 20:01:41 stepcut: well I'm doing an AI class 20:01:59 and the project is playing a sort of chess variant 20:02:05 there's a competition :) 20:02:23 and I wanted to use Haskell if it's be suitable to it 20:02:24 hyrax42: I have no real experience, but I think a lot of AI comes down to things like the A* algorithm in the end -- and those types of algorithms are very well suited to haskell 20:02:42 what variant? 20:02:47 I remember the ICFP cops and robbers was won by a haskell team 20:02:58 chessguy: more like a distant cousin 20:03:05 what is it? 20:03:09 called "all the king's men" or "smess" 20:03:42 7x7 board, 7 "pawns", 4 "queens", 1 "king" 20:03:51 well, if it's got a large branching factor, and you're planning on doing alphabeta....you might be better off with a more low-level language 20:03:58 the "queens" are restricted in movement by arrows on the board 20:04:08 chessguy: that's what I was worried about 20:04:19 what is it about alpha/beta that makes haskell nto so suitable 20:04:43 it's not so much alpha-beta, but the idea behind it, which is to search as deeply as possible 20:04:51 chessguy: Have you seen the implementation of alpha-beta pruning in "Why Functional Programming Matters"? 20:05:00 yeah, i helped write a nice AB search in a couple of hourse for last year's icfp contest 20:05:20 cops and robbers? 20:05:30 short, sweet, hooked in to our existing heuristics nicely 20:05:43 the classical chess engine is all about optimization. for example, crafty (one of the best open-source programs) actually has parts of it written in assembler 20:05:44 I've written an alpha-beta search, and I didn't notice anything that would make it particularly unsuited for Haskell 20:05:45 glguy: the john hughes paper? 20:05:54 glguy: link? 20:06:06 http://www.math.chalmers.se/~rjmh/Papers/whyfp.html 20:06:09 Title: Why Functional Programming Matters, http://tinyurl.com/e4jve 20:06:19 hyrax42: yes, the John Hughes paper. 20:06:27 hm I dont' remember that part 20:06:39 probably I didn't read it because I wasn't familiar with AI at the time 20:06:40 it's not that it's unsuited, but if you're looking for a high performance, optimization-driven program, lower-level is better 20:07:22 or a mixture of high level code for the non-core parts, and low level stuff for the critical path. that's often cheaper than writing the whole thing in C 20:07:48 what is _casm_ ``...'' for? 20:07:48 yes 20:08:27 now, i'm not saying that AB is the best approach, but most chess engine writers would :) 20:09:19 hyrax42: this is a nice paper on solving the queens problem using haskell http://www.cse.ogi.edu/PacSoft/publications/2001/modular_lazy_search_jfp.pdf#search=%22modular_lazy_search_jfp%22 20:09:21 http://tinyurl.com/sxtn7 20:09:59 It's actually a nice general purpose constraint solver, which they apply to queens, and a few other standard problems 20:10:02 haha my irc client tells me it downloaded that file at 4.000 GB/s 20:10:22 I really need to organise all the papers I've downloaded 20:10:34 ~/downloads/new/web is pretty messy these days 20:11:39 well anyway, I'll try my best with haskell 20:11:52 see where I can get 20:12:04 I think the prof is a very C-all-the-way type 20:12:50 are you in fact planning on using AB? 20:13:09 --- join: jcreigh (n=jason@72-160-112-235.dyn.centurytel.net) joined #haskell 20:13:12 not sure 20:13:21 we only just started on adversarial search 20:13:43 adversarial? 20:13:48 --- quit: ihope (Read error: 110 (Connection timed out)) 20:13:51 but it seems like it's more or less necessary to keep from searching too many useless things 20:13:59 as opposed to like A* 20:14:09 ah, min-ma 20:14:11 x 20:14:14 where there's no "opponent" in the problem 20:14:17 yea 20:14:32 ok 20:14:58 @version 20:14:59 lambdabot 4p227, GHC 6.5 (OpenBSD i386) 20:14:59 darcs get http://www.cse.unsw.edu.au/~dons/lambdabot 20:15:00 but do such algorithms require especialy much mutaability or other non-haskell-friendly things? 20:15:09 > [id] <*> [()] 20:15:09 Not in scope: `<*>' 20:15:20 laziness sounds like it'd be a pretty n ifty thing to have 20:15:23 on your side 20:15:27 for stuff like that 20:15:37 hmm, quite possibly 20:15:44 but maybe you're saying overhead will have it beaten out by other approaches? 20:15:54 for example, in chess, you often generate all the moves, but then only search a few 20:16:25 i don't know, it would be interesting to see 20:17:03 --- quit: svens_ (Read error: 110 (Connection timed out)) 20:17:08 yay experiments 20:17:29 well anyway, I rather not do it in java or c 20:17:42 python etc. will perform abysmally 20:17:48 *I assume 20:17:57 we had to write our single player, and adversarial game tree searches in C++ 20:18:05 I guess I could try it in lisp or scheme, but I'd rather try haskell 20:18:08 --- quit: matthew-_ (Read error: 104 (Connection reset by peer)) 20:18:13 we can use any language 20:18:22 that runs on the comp lab systems 20:18:27 I checked; they have ghc 6.4.2 20:18:29 do you know what the branching factor is? 20:18:38 no not really 20:18:57 chess is what 30-40? 20:19:00 this should be a fair deal less 20:19:21 yes, about that 20:19:30 damn i was off by 6 min on my sys clock 20:19:37 is this it? http://www.chessvariants.com/other.dir/smess.html 20:19:41 Title: Smess, http://tinyurl.com/gb6ly 20:19:47 hyrax42: I would definately recommend skimming that modular lazy search paper -- I think it might answer some of your questions 20:19:55 yeah that's the one 20:19:57 stepcut: it's open 20:19:59 :) 20:20:02 what a strange board 20:20:08 yeah it's a bit weird 20:20:18 those arrows restrict the directions a "queen" can move in from them 20:20:33 oh the "pawns" are more like kings... can move any direction, unrestricted by arrow 20:20:35 s 20:21:25 you mean the ninnies? that site says they are restricted by the arrows 20:22:34 whoa, my initial impression to those arrows is that that is a game that only a computer AI could enjoy 20:22:53 lol 20:22:55 haha 20:22:58 chessguy: hmmm 20:23:06 if you scroll down tot he "all the king's men" rules 20:23:12 and try to read that horrible scan 20:23:41 it sounds like only the knights (aka numskulls) are limited by the arrows 20:23:46 I'll have to email prof for clarification 20:25:15 it does sound like your branching factor will be reduced somewhat 20:26:30 probably 20 or less 20:26:34 but I'd have to mess around to see 20:26:57 --- quit: akemp ("Leaving") 20:27:00 I was meant to start coding today 20:27:05 but well now it's 11.30 20:33:54 --- join: vincenz (n=vincenz@cable-87-244-184-97.upc.chello.be) joined #haskell 20:33:55 * vincenz sighs 20:34:14 --- join: xinming (n=xinming@222.212.1.74) joined #haskell 20:34:22 --- quit: ziggurat ("This computer has gone to sleep") 20:34:51 hmm, I'm having trouble getting lambdabot to build on debian. I've got hs-plugins 1.0 20:35:16 and fps 0.8, but it seems to want Data.ByteString.Char8.breakChar, which is commented out. 20:35:31 hmm. try the darcs repo. 20:35:39 but i'm just about to commit a patch, if you can hang on for 10 minutes 20:35:49 dons: you know, I must admit I'm surprised. Your page about the unix-like one-liners is definitely useful. But it is hardly novel, it's not like interact is a new thing. Well it is novel in putting them all together, just that it's curious it was only done now. 20:35:51 breakChar is in fps 0.7 20:35:52 for which? lambdabot? 20:36:12 vincenz: yeah, its not new at all, it was just a 20 minutes hack. weird huh? 20:36:24 most of the stuff comes from h4sh anyway 20:36:41 dons: the weirdness is just that it's getting such interest. I should think of these little things :P 20:36:46 --- quit: clanehin (Remote closed the connection) 20:36:51 I mean I read about interact in yaht, the first haskell tutorial I ever read 20:36:57 dylan: yeap about to push a patch. 20:37:08 dons: I guess what is weird is what people will find interesting 20:37:13 woot, lemme know when to darcs get 20:37:17 vincenz: simple easy things are good for outsiders. don't mention monads or anything strange 20:37:22 true :) 20:37:27 just solve the problem 20:37:35 i'm thinking of something like a little html parser or similar 20:37:41 it has to be a domain that people already understand 20:37:50 --- join: ziggurat (n=ziggurat@dsl081-114-028.dfw1.dsl.speakeasy.net) joined #haskell 20:37:54 and written without dumping too much PL theory on the user 20:37:58 yep 20:40:03 I've a little evil plan to watch what tutorials are hot in ruby and python, and then write similar haskell versions... 20:40:17 * vincenz grins 20:42:02 I like that haskell IO is similar to IO::All (perl) 20:42:15 :) Perhaps you should post dcoutts' Haskell browser in 25- lines. 20:42:26 mm. maybe! 20:42:26 ah yeah, I heard about that one 20:43:07 What threading library does forkOS use? 20:43:23 * vincenz doesn't know but is guessing pthreads 20:43:26 I assumed it was pthread but ldd doesn't list it. 20:43:43 pthreads, yep 20:44:04 Alright, thanks. 20:44:22 I'm working on libgcrypt bindings and I need to tell it what threading library to use if I want it to be thread-safe. 20:44:23 is it fair to say monads are the Pons Asinorum of Haskell? 20:44:49 Adamant: it's not fair to say that to people who don't speak Latin. 20:45:05 :) 20:45:29 it's a math phrase, I figured the Haskellers would know it. 20:46:02 Well I'm a math major and I have no idea what it means. 20:46:16 * lispy me too and same here 20:46:38 ?google Pons Asinorum 20:46:40 http://www.bartleby.com/61/78/P0437800.html 20:46:40 Title: pons asinorum. The American Heritage® Dictionary of the English Language: F ... 20:46:44 Pons Asinorum = Bridge of Asses. it comes from a problem by Euclid that seperated people doing more advanced study in math from those who wouldn't in medivial times. 20:46:54 ?all-dicts Pons Asinorum 20:46:57 *** "Pons" gcide "The Collaborative International Dictionary of English v.0.48" 20:46:57 Pons \Pons\, n.; pl. {Pontes}. [L., a bridge.] (Anat.) 20:46:57 A bridge; -- applied to several parts which connect others, 20:46:57 but especially to the pons Varolii, a prominent band of 20:46:57 nervous tissue situated on the ventral side of the medulla 20:46:59 [14 @more lines] 20:47:10 pons asinorum is pons asinorum if you ask me 20:47:21 heh 20:47:24 ?more 20:47:25 oblongata and connected at each side with the hemispheres of 20:47:25 the cerebellum; the mesocephalon. See {Brain}. 20:47:25 [1913 Webster] 20:47:25 20:47:25 {Pons asinorum}. [L., literally, bridge of asses.] See 20:47:25 Well, I guess that just makes a jackass out of me then. 20:47:27 [9 @more lines] 20:47:35 from the first link 20:47:36 A problem that severely tests the ability of an inexperienced person. 20:47:47 dfranke: no I didn't know it either, I had to look it up 20:47:53 the first link 20:50:39 ?more 20:50:39 {Asses' bridge}, under {Ass}. 20:50:39 [1913 Webster] 20:50:39 20:50:39 *** "pons" wn "WordNet (r) 2.0" 20:50:39 pons 20:50:41 [4 @more lines] 20:50:54 dons: it compiles now, except a syntax error in the Seen plugin 20:52:20 bleh 20:52:31 when i fixed my darwin ports problem i blew away my ghc install 20:52:34 dylan: yes, that's what i'm fixing :) 20:52:34 grrr 20:52:50 now i'm waiting for perl to compile so ghc will begin 20:53:20 dylan: ok, try darcs pull now 20:54:11 dons: appears to be working. Thanks! 20:54:19 by the time this compiles i'll be too sleepying to hack the code i wanted to write :) 20:54:35 lispy: gentoo, eh? 20:54:55 dylan: oh no...i'm a debian guy, but this is on my mac where i have to use a gentoo-ish solution called darwinports 20:55:14 Ah 20:55:41 darwinports can be nice, but if you ever have a problem with it, which you will, it's a real bear 20:56:15 * lispy shells into his remote debian box hoping to hack there 20:56:26 i wanted to write opengl code so hacking remotely isn't so attractive :) 20:56:32 ?quit weekly sync 20:56:33 --- quit: lambdabot ("weekly sync") 20:57:10 --- join: lambdabot (n=lambdabo@manzano.cse.unsw.EDU.AU) joined #haskell 20:57:57 ?version 20:57:59 lambdabot 4p231, GHC 6.5 (OpenBSD i386) 20:57:59 % ./lambdabot 20:57:59 Initialising plugins .................................lambdabot: out of memory (requested 2479072304855777280 bytes) 20:58:01 darcs get http://www.cse.unsw.edu.au/~dons/lambdabot 20:58:02 zsh: exit 1 ./lambdabot 20:58:06 rm State/seen 20:58:08 out of memory? 20:58:31 an artifact when changing the state type 20:58:39 interacts a bit badly with the binary parser 20:58:50 simply rm State/seen :) 20:58:55 p231? hmm...sounds like i'm behind, i think i'm on 220 or 222 or so 20:59:24 lots of new quotes for HWN: M ./State/quote +94 20:59:47 ah 20:59:57 well, i'm not too worried about keepin the quote db in sync 21:00:09 ./lambdabot --online fails to go online. 21:00:17 dylan: better check Config.hs 21:00:23 it exits with 1, and I did edit Config.hs to point to my irc server 21:00:35 port = 6666, too. 21:00:53 are you connecting to freenode? sometimes it won't let multiple 'lambdabot' nicks connect 21:01:06 No, not freenode 21:01:17 private irc server. 21:01:22 i'm not aware of any other issues. 21:01:31 changing port works, right? 21:01:37 should do. 21:01:47 i found that the non-plugin version doesn't connect reliably from my machine 21:01:48 it's not even attempting to connect. 21:02:07 it's about 1/8 times that i get a connect 21:02:14 time outs maybe? 21:02:36 time outs to localhost? 21:02:48 dons: when does 6.6 release, do you happen to know? 21:02:54 next week? 21:03:05 it'd dying with SIGALRM 21:03:10 --- quit: chessguy (" HydraIRC -> http://www.hydrairc.com <- The professional IRC Client") 21:03:30 dylan: not sure. you can debug it with a carefully placed (io $ print msg) in Plugin/Base.hs 21:03:48 i've never seen a SIGALRM thrown 21:03:54 vincenz: last i heard from SimonM they wanted to do a new RC about a week after ICFP 21:04:15 * vincenz nods at lispy 21:04:22 it'll be good to have fps in the std libs 21:04:28 very good 21:04:37 next is to get a version of parsec that uses it :) 21:05:43 mmm 21:06:21 dons: even, it's a segfault now 21:06:27 only under strace, though 21:07:07 some improvement! 21:07:10 it connects now 21:07:23 hmm. sounds like something is amiss 21:07:36 * lispy checks the walltime, ghc tarball downloading now at 21:07 21:07:38 more info please 21:07:59 dylan: are you building the plugin version or non-plugin? 21:08:12 do you think fps would significantly speed up parsec? 21:08:32 emu: i was thinking it would reduce the memory consumed 21:08:32 --- join: NamelessOne (n=lskjdflk@218.22.21.11) joined #haskell 21:08:36 lispy: the one with 'sh ghci' works, the other one doesn't 21:08:37 yes, it does. the linspire guys found some 10x speed up for a particular task 21:08:42 emu: fps seems to be more memory efficient 21:09:04 yea i'd imagine. but i'd think parsec was losing lots of time in other processing steps.. 21:09:04 dylan: so it runs ok in ghci? but the static binary doesn't? 21:09:35 ah, it does now, the plugin version 21:09:52 the compiled binary runs when I copy the plugins cabal file. 21:10:02 and rebuild? 21:10:14 dons: yes it does?...erm 21:10:17 sounds like the binary got a bit mixed up somehow? 21:10:26 dons: that's generic about fps, that's not certain to be so for a parser lib built on top of it 21:10:54 vincenz: the linspire guys found this using the ByteStringParsec lib. talk to stepcut. 21:11:08 one clear improvement is that you can extrac tokens without copying 21:11:10 using drop/take 21:11:12 @hoogle ByteStringParsec 21:11:13 No matches found 21:11:20 and then in general its what 12x less space per char 21:11:29 ?where ByteStringParsec 21:11:30 I know nothing about bytestringparsec. 21:11:38 hmm, what's the name? 21:11:39 @google ByteStringParsec 21:11:41 http://tunes.org/~nef/logs/haskell/06.08.20 21:12:03 if google was always indexing, you could make a fixed-point google search 21:12:06 ?where bytestringparser 21:12:07 http://hackage.haskell.org/~paolo/darcs/ByteStringParser 21:12:10 heh, that would be awesome in google index so often that the link pointed to our conversation :) 21:13:20 ?uptime 21:13:20 uptime: 16m 43s, longest uptime: 2d 8h 20m 7s 21:13:34 interesting short implementation 21:13:57 --- quit: dolio (Read error: 104 (Connection reset by peer)) 21:14:00 no infinite-lookahead operator 21:14:20 dons: explain the token bit? 21:14:43 you can extra tokens from a bytestring by doing a zero-copy substring build. 21:15:44 s/extract/ 21:16:02 --- quit: Deformative-II (Remote closed the connection) 21:16:12 --- quit: johnnowak () 21:16:17 crap 21:16:26 haskell.org is down so i can't install ghc 21:16:58 :/ 21:17:26 what files do you need? 21:17:44 --- join: dolio (n=dolio@nr10-216-68-185-34.fuse.net) joined #haskell 21:17:49 Patterner: Attempting to fetch ghc-6.4.2-src.tar.bz2 from http://www.haskell.org/ghc//dist/6.4.2/ 21:18:44 http://mirror.switch.ch/ftp/mirror/gentoo/distfiles/ghc-6.4.2-src.tar.bz2 21:19:22 i don't know how to make darwin port use that file instead :( 21:19:36 edit the makefile? 21:19:38 (or whatever script they use) 21:19:58 can't you just download and move it to the right place? 21:19:58 but probably there's an env var 21:20:01 http://tinyurl.com/rrsbq 21:20:25 --- part: NamelessOne left #haskell 21:20:35 --- join: svens (n=svens@i3ED6E8F9.versanet.de) joined #haskell 21:20:40 hm...wget is not installed :) 21:20:58 Patterner: maybe that will work..worth a try 21:21:13 but don't ask me what the right place is :) 21:21:31 looks to be /opt/local/var/db/dports/distfiles/ghc 21:21:59 i just hope the tarballs are the same 21:22:12 they are 21:22:23 * Patterner underlines the "mirror" parts of the url 21:22:47 right, but not knowing anything about gentoo that could just be a gentoo mirror of a gentoo custom tarball :) 21:23:16 http://mirror.switch.ch/ftp/mirror/gentoo/distfiles/ghc-6.4.2-alut.patch.gz <- that's gentoo :) 21:23:19 http://tinyurl.com/zmryj 21:23:45 all the tarballs are vintage. patches are distributed seperately. 21:24:09 ah, i think debian does it that way too 21:24:37 yes 21:25:04 i think they label the tarballs "$NAME_orig.tar.gz" :) 21:25:55 does ghc 6.4.2 run on macosx intel? 21:26:31 give me one and i'll test it for you 21:26:32 bran_: i've heard that all the G4/G5 still can be emulated...so does it run natively? I dunno... 21:28:08 man, wget is much harder to compile than i realized... 21:28:39 port install wget # where is the problem? 21:28:54 Funny, my sysadmin mentioned yesterday that he compiled and installed wget (on FreeBSD) in like 15 seconds. :) 21:29:12 Patterner: the problem is that it's still downloading and installing the dependencies 21:29:22 port install ghc reveals that "ghc is not available on mac x86" 21:30:00 i've needed expat, libiconv and gettext so far 21:30:19 waiting is not a hardship :) 21:30:56 i just exected one fetch and compile...but it's doing a lot of work...(which is what i meant by hard) 21:31:15 dons: ever tried ruby/ 21:31:20 Eidolos: 15 seconds is not possible. wget uses autoconf's configure :) 21:32:27 can't a log of the autoconf stuff be cached? 21:32:29 lot* 21:32:40 but that's cheating :) 21:32:57 shrug, I'm just going on what he's saying. 21:34:52 vincenz: nope. i like their logo though... we need a better logo on haskell.org 21:35:13 we need h.o to be online 21:35:17 * araujo wants h.o back! 21:35:18 before we need to worry about it's logo ;) 21:35:26 that too 21:35:49 it's just conincided with the weekend, and everyone away due to ICFP. unfortunate timing 21:37:19 * lispy needs to learn an OO language next term for a class 21:37:29 any suggestions? looks like O'Haskell is pretty dead 21:37:41 Smalltalk? 21:38:01 dolio: yeah, that's probably in the top three at the moment 21:38:06 i've heard it's OO done right 21:38:34 but it's dynamic right? 21:38:43 It's a nice example of what you can do with "everything's an object' taken to the extreme. 21:38:46 I'd suggest Ruby. 21:38:47 which makes me want to put ocaml before it 21:38:51 Yeah, it's dynamically typed. 21:38:55 hmm.... i need 33 seconds... 21:39:20 oh, actually i think i'll do scala 21:39:26 i've been meaning to learn scala and it's OO 21:39:52 does anyone here live in a country where they pronounce processor with a long O? 21:40:19 the way ruby's class vars are static across subclasses is ugly 21:40:20 it's pracess-or where i comefrom 21:40:45 --- quit: jcreigh ("Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet.") 21:40:46 ?vixen pr0n 21:40:46 you know what? if we'd known it was going to be like this we'd have picked our own goddamn cotton! 21:40:56 omg... 21:40:57 ha! 21:41:17 who typed that one in? 21:41:57 --- join: dfeuer (n=topolog@wikimedia/Dfeuer) joined #haskell 21:43:35 its all from the original vixenlove file, which contains various sexist and racist lines like that, which are somtimes injected randomly. (vixenlove has been around a long time before lambdabot got a vixen plugin) 21:43:59 ahh 21:44:24 Politically incorrect comments don't bother me, I was just surprised :) 21:44:29 --- join: NamelessOne (n=lskjdflk@218.22.21.11) joined #haskell 21:44:33 glguy: I think I'd say it "pro (long) cessor" 21:44:44 prawcessor! 21:45:51 ?. vixen dice 1d2 21:45:52 what is pron? 21:45:55 ?. vixen dice 1d2 21:45:55 *giggles* 21:46:04 just random things when there's no match 21:46:07 ?. vixen dice 1d2 21:46:08 I can't of anything nice to say about myself 21:46:41 the dictionary shows that there are 3 ways to say it 21:46:43 somewhat disturbing things, on occasion 21:46:59 dons: i had a thought that whenever a module had an error it should default to calling vixen and giving that for output :) 21:47:07 dons: it could be lambdabot --sassy 21:47:25 that was true at one time . hehe 21:47:26 prahcessre, prah-cessre, and pro-cessre 21:47:34 ?vixen prahcessre, prah-cessre, and pro-cessre 21:47:34 what type of music do you like? 21:47:37 where re is that weird upsidedown e-r 21:47:48 ?vixen sex 21:47:48 Shouldn't we get to know each other before we talk about sex? 21:48:01 ?vixen haskell 21:48:01 church is my favourite computer scientist. 21:48:03 ?vixen haskell 21:48:04 church is my favourite computer scientist. 21:48:07 I win 21:48:11 not enough regexes for that :) 21:48:17 ?vixen Java 21:48:17 where can I a see a picture of you?? URL?? 21:48:19 should add some more phrases too 21:48:21 ?vixen win 21:48:21 so, what do you think of me? 21:48:31 ?vixen basic 21:48:31 what were you saying? 21:48:39 ?vixen nude 21:48:39 I'm sorry, I'm confused. 21:48:55 heh, now i need zlib and openssl for wget 21:48:57 geez... 21:52:03 what operating system are you one that is making you do all of this? 21:52:12 osx 21:52:25 ah, finally wget is configuring 21:52:34 macports is handling all of it for you, right? 21:52:38 right 21:53:01 hehe, someone suggests porting fps to erlang ... :} 21:53:04 "Erlang can have its syntax cleaned. It can be sped up. It can get a port of Haskell's fast packed strings." 21:53:22 hehe 21:53:43 when i find myself programming in X and wishing it was Y, i just switch to Y....sounds like they need to do the same :) 21:54:00 where X = Erling and Y = Haskell ;) 21:54:25 arg 21:54:34 now it needs to fetch happy from haskell.org 21:54:38 dons: what is their logo? 21:54:44 --- join: cerculetz (i=cerculet@86.34.42.149) joined #haskell 21:54:52 dons: ever tried smalltalk/squeak? 21:54:57 Erlang's logo appears to be an "e" 21:55:20 oh, a ruby 21:55:21 duh 21:55:31 dons: I could ask a friend of mine? 21:55:37 dons: he's good at designing those kind of things 21:55:44 hmm, haskell.org is down 21:55:54 sigh 21:55:56 this won't work 21:56:01 still down from when someone (lispy?) mentioned it yesterday? 21:56:30 the gentoo mirror doesn't happen to have this file does it? 21:56:30 Attempting to fetch ghc-6.4-darwin-bootstrap-tiger.tar.bz2 from http://www.haskell.org/ghc//dist/6.4/MacOSX/ 21:56:31 How can I print a WordX in binary? eg printing out something like 24930::Word16 should give something like "ab"? 21:57:18 Bobstopper: you mean hexa? 21:57:33 > 10*16+12 21:57:46 * vincenz pokes lambdabot 21:58:09 hexa? I'll have a look 21:58:41 nono 21:58:42 I mean 21:58:46 waht format do you intend with "binary" 21:59:08 * lispy manages to find the bootstrap tar on google 21:59:38 @hoogle showHex 21:59:45 @hoogle hex 21:59:48 Cale: it's not hex tho 21:59:53 Cale: I thought it was hex cause of the 'a' and 'b' 21:59:59 Cale: but it relates not at all with the nubmer 22:00:08 Bobstopper: please answer? 22:00:08 yeah, that's rather odd :) 22:00:32 Cale: perhaps he means like 8-bit...which would be dependent on: character encoding, endianness... 22:01:25 Yeah, I mean that 22:01:36 w00t, ghc is compiling 22:01:40 Basically I want to print an actual Byte, rather than an integer representation of the byte like show might 22:02:01 what does an actual byte look like? 22:02:09 > map (chr . (`mod` 2^8)) . iterate (`div` 2^8) $ 24930 22:02:14 Bobstopper: the problem is that a byte is undefined 22:02:21 Bobstopper: I mean how it's printed 22:02:30 Bobstopper: it depends on encoding, as well as endianness 22:02:33 --- join: mbot (n=mbot@CPE004854805910-CM000e5cdd834a.cpe.net.cable.rogers.com) joined #haskell 22:02:35 > map (chr . (`mod` 2^8)) . iterate (`div` 2^8) $ 24930 22:02:38 "ba\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\... 22:02:43 Cale: lambdabot is do... 22:02:43 oh! 22:02:53 > map (chr . (`mod` 2^8)) . takeWhile (/= 0) . iterate (`div` 2^8) $ 24930 22:02:54 "ba" 22:02:59 hehe 22:03:19 > reverse .map (chr . (`mod` 2^8)) . takeWhile (/= 0) . iterate (`div` 2^8) $ 24930 22:03:20 "ab" 22:03:20 --- join: mhfan (n=mhfan@60.166.51.174) joined #haskell 22:03:25 oops, space :) 22:03:51 There's a somewhat roundabout way to do it. 22:03:57 --- quit: mathewm (Remote closed the connection) 22:04:06 --- quit: noclouds (Connection timed out) 22:04:23 Ok. I thought there might be something like that already existing in the libraries. Thanks. 22:04:48 Bobstopper: not really, because it's not very well defined 22:04:59 Bobstopper: like I said, it depends on what order you want your bytes in, how bytes are encoded and such 22:05:04 Cale: what about 22:05:07 > chr 24930 22:05:09 '\24930' 22:05:11 mayybe we could have a contest to design a logo, like netbsd did 22:05:12 heh 22:05:38 Well, of course it does. So it's just a case of defining a function for each appropriate endianness or having it default to the OS' expectations, right? 22:06:38 like aton handles endianness and everything, but there's no way to actually print the Word32 once it's returned it for you. 22:06:42 Bobstopper: might I be a bit hmm... philosophical ... and question what you're using this for? 22:07:04 s/aton/inet_addr/ 22:07:22 This informercial has it figured out 22:07:35 I'll watch this womans breasts and let them tell me whatever they want 22:07:54 I figure if you've packed the WordX already, you've probably already sorted out the endianness. So something to just print it out afterwards would probably be nice. 22:07:58 Is it the one where you can make lots of $1,000 checks doing unspecified things? 22:08:07 dolio: are you watching it too?? 22:08:14 No, but I've seen it. 22:08:23 Bobstopper: what do you need this for? Perhaps there's a better way of doing what you're trying to do by employing printing out numbers 22:08:24 she's so hot... I almost believe her 22:08:31 I could earn 5000$ each month 22:08:32 Hehehe. 22:08:42 millions are being paid out! 22:09:04 her bet is that in 7 minutes they will have convinced me that I want to do it! 22:09:11 Basically I want to print the source HostAddress in a networking protocol using only the 4 bytes such an address should need 22:09:41 as well as a host of other WordXs 22:09:43 * glguy owes it to himself.. 22:10:18 re: running ghc 6.4 on Intel Macs, I've tried it. Only ghci works. If you try to compile something, the compiler generates PPC assembler and feeds it to the Intel assembler. Chaos ensues. 22:10:38 the compiler generates assembly? 22:10:45 the haskell one? 22:11:17 It must, because it died trying to feed PPC assembly to the Intel assembler when I tried to compile a simple Haskell app using ghc. 22:11:23 dgoldsmith: you can specify the gnu assembler 22:11:25 ghci works fine since it's doing bytecode. 22:11:31 with -pgml-ld I think 22:11:32 172 22:12:05 dons: ever tried an oo-based lang? 22:12:05 Numeric.showHex :: Integral a => a -> ShowS 22:12:07 Text.ParserCombinators.Parsec.Char.hexDigit :: CharParser st Char 22:12:09 Text.ParserCombinators.Parsec.Token.hexadecimal :: TokenParser st -> CharParser st Integer 22:12:11 It is the gnu assembler. But the gnu assembler on Mac OS X Intel expects Intel instructions, unless you tell it you're cross-assembling. 22:12:11 Numeric.readHex :: Integral a => ReadS a 22:12:13 "ba\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\... 22:12:16 vincenz: used to teach java :) 22:12:21 dons: ah, right 22:12:23 "ba\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\... 22:12:33 Not a problem for me, I'm running the 6.5-based Intel-native build. 22:12:35 "ba" 22:12:38 so, then the next questions after what language, is what project will i do....i'm trying to think of something cool for darcs... 22:12:40 WOAH 22:12:43 "ab" 22:12:46 lambdabot suffered congestion? 22:12:58 That's what I'd recommend over trying to get 6.4.1 to run under Rosetta. 22:13:02 wtf is lambdabot doing? 22:13:02 lispy: ? 22:13:05 lispy: what are you trying to do? 22:13:05 '\24930' 22:13:16 glguy: he's rsponding with a SEVERE lag to previous requrest 22:13:18 requests 22:13:30 vincenz: i'm taking a glass this term where we have to learn an OO language and do a project in it 22:13:34 ?bot 22:13:34 :) 22:13:45 dons: he seems to be lagged by minutes 22:13:48 dons: odd ain't it? 22:13:51 erm 22:13:51 weird. 22:13:52 she 22:14:06 you'd think that either you'd get an answer lagged by seconds, or it would just not answer 22:14:11 vincenz: obviously i'd rather cite oleg's oohaskell and just use haskell...but i don't think that will fly 22:14:16 (but i could try asking) 22:14:22 --- quit: hyrax42 () 22:14:29 lispy: what language have you decided upon? 22:14:44 scala! 22:14:46 :) 22:14:47 it's OO and FP 22:14:48 and I'm not certain oohaskell would be a good idea 22:14:52 * dons investigates 22:15:17 vincenz: scala is currently #1 on the list 22:15:27 vincenz: ocaml and smalltalk are #2 22:15:30 (tied) 22:15:45 what list? 22:15:45 scala is pretty cool 22:15:52 lispy: mind mentioning why scala is first? not familiar with scala 22:16:11 vincenz: because it's like ocaml, but nicer :) 22:16:26 Does scala run on the JVM? 22:16:31 yes 22:16:42 dons: have to admit, the ruby-lang.org site is sexy 22:16:47 lispy: no seriously 22:16:58 --- join: matthew-_ (n=matthew@81.168.74.31) joined #haskell 22:17:01 vincenz: seriously 22:17:03 ?bot 22:17:03 :) 22:17:03 :) 22:17:11 lispy: I mean can you give me some more objective and meaningful reasons? 22:17:21 lispy: "like ocaml but nicer" is hardly informative 22:17:25 vincenz: scala runs on the jvm (is binary compatibile with java) but it's an FP + OO language with static checking 22:17:38 * Patterner has visions of nude matz now... 22:17:45 lispy: right but not much moreso than say, java? 22:17:46 vincenz: supposedly solves the expression problem 22:17:48 lispy: the static checking that is 22:17:55 lispy: define "expression problem"? 22:18:04 vincenz: no, it's like haskell static checked 22:18:09 vincenz: even has pattern matching 22:18:13 ?uptime 22:18:13 uptime: 8h 17m 5s, longest uptime: 8h 17m 5s 22:18:13 uptime: 1h 21m 36s, longest uptime: 2d 8h 20m 7s 22:18:20 ?google wadler expression problem 22:18:20 http://www.daimi.au.dk/~madst/tool/papers/expression.txt 22:18:22 http://www.daimi.au.dk/~madst/tool/papers/expression.txt 22:18:23 http://tinyurl.com/oe2bk 22:18:24 http://tinyurl.com/oe2bk 22:18:27 mbot: @part 22:18:46 mbot: @part #haskell 22:18:47 --- part: mbot left #haskell 22:18:56 lispy: oh, seems much like ocaml's special sumtypes, forgot the name 22:19:02 lispy: the `A ones 22:19:08 ah yes. 22:19:21 * lispy doesn't actually know ocaml other than a few simplistic programs 22:19:45 ?google scala expression problem 22:19:48 http://lampwww.epfl.ch/papers/IC_TECH_REPORT_200433.pdf 22:20:21 lispy: http://caml.inria.fr/pub/docs/manual-ocaml/manual006.html 22:20:24 section 4.2 22:20:24 Title: Labels and variants, http://tinyurl.com/rjfec 22:20:25 "variants" 22:20:35 polymorphic variants 22:21:58 vincenz: i don't know the expression problem real well, but i guess being able to solve it is useful... 22:22:07 * lispy needs to read up on it more 22:22:18 lispy: just check the link 22:23:21 Well, once somebody goes ahead and implements open datatypes, haskell will solve it, too, right? :) 22:23:25 vincenz: the variants? i did...ocaml confuses me :) 22:23:54 --- quit: xinming (Read error: 131 (Connection reset by peer)) 22:23:55 vincenz: for instance, what does this say: 22:23:55 #[`On; `Off];; 22:23:56 - : [> `Off | `On ] list = [`On; `Off] 22:24:09 i have no clue... 22:24:23 it means that you havea list 22:24:26 of a data type 22:24:34 that has AT LEAST `Off and `On 22:24:48 and a list of those 22:25:04 kinda like 22:25:09 data A = On | Off 22:25:12 but having it be open 22:25:36 ah 22:25:49 there is more to the expression problem than that though right? 22:25:54 dunno 22:25:59 as I read it, I don't think so 22:26:25 like if you right a function when all you know about is On and Off then it better keep working the same when someone adds KindaOn 22:26:33 s/right/write/ 22:27:25 well it does 22:27:37 if I remember correctly 22:27:42 in haskellish syntax to make it clearer 22:27:46 --- quit: araujo ("out!") 22:27:49 `Foo | `Bar is polymorphic variants 22:28:03 foo x = case x of `Off -> ... | `On -> ... 22:28:07 this will require a data type 22:28:13 [`Off | `On] 22:28:20 foo x = case x of `Off -> ... | `On -> ... | _ -> ... 22:28:23 this will require a data type 22:28:26 [> `Off | `On] 22:28:59 --- quit: jtoy_ () 22:29:02 aah, yes, the infamous feature that smerdy never understood what was good for... 22:29:24 dylan: smerdy is a troll 22:29:34 vincenz: a troll with chanserv privledges. 22:29:36 smerdy? 22:29:41 dylan: so? 22:29:45 dylan: he's an elitist troll 22:29:48 vincenz: *shrugs* 22:29:51 he ruins the channel for all newbs 22:30:02 Oh 22:30:06 is he the dick in #ocaml? 22:30:27 his name means "he who reeks" in russian, which sums it up nicely. 22:31:14 lispy: yes 22:32:04 I do believe that in early days shapr even asked him to leave #haskell, if my memory serves me well 22:32:25 I rather enjoyed my time in #ocaml... a newbie would join, ask a question. Smerdy would tell them to Read That Fine Paper, and I'd just spit out ocaml code at them. 22:32:41 dylan: yes, and notice how big the channel was 22:33:10 I noticed how big the entire ocaml community was. 22:33:16 i find most language channels on irc to be hostile 22:33:24 he's not an isolated troll... 22:33:26 #java, ##c, #lisp, #ocaml 22:33:32 lispy: #haskell is an exception 22:33:35 #haskell is the *worst* 22:33:35 yes, [#haskell ban Smerdyakov!*@* [by sagan.freenode.net, 2352045 secs ago] 22:33:37 dylan: how do you mean? 22:33:37 yes 22:33:50 heh 22:33:54 vincenz: I've read similar elitism on the ocaml mailing lists, too 22:33:58 oh 22:34:01 it's a shame 22:34:09 #scheme is pretty nice 22:34:10 besides, elitism doesn't imply correctness 22:34:15 * vincenz is against any language zealot 22:34:15 What are you guys trying to say? that #haskell doesn't have any 31337 users?? 22:34:27 bring on the newbies! lambdas for all! 22:34:38 which is rather annoying, cause when you ask a channel about the features and flaws of a language, you get only the features, and that languages does EVERYTHING (tm) 22:34:42 @users 22:34:44 Maximum users seen in #haskell: 238, currently: 203 (85.3%), active: 17 (8.4%) 22:34:44 > map (+1) [1..10] -- for anyone silenty lurking. get hacking with the bot 22:34:46 [2,3,4,5,6,7,8,9,10,11] 22:34:46 @elite of course haskell is elite. ;) 22:34:46 oF (Our$e hAskE|1 I5 1337. ;) 22:34:50 > replicate 203 "lambda-cookies" 22:34:51 ["lambda-cookies","lambda-cookies","lambda-cookies","lambda-cookies","lambda... 22:35:16 > [id] <*> [()] 22:35:16 Not in scope: `<*>' 22:35:20 glguy: no no no. 22:35:34 * glguy does the anime airpuff sigh 22:35:41 #haskell and related community resources reminds me of perl and debian communities. :) 22:35:45 I need to a) port hs-plugins to ghc 6.6, b) install 6.6 on lambdabot's box. c) do a nad b. 22:36:03 dons: and until them I'm probably going to get errors every day ;) 22:36:07 s/them/then 22:36:11 :P 22:36:22 > (`map` [1..10]) $ ((*) `join`) 22:36:23 [1,4,9,16,25,36,49,64,81,100] 22:36:31 there is a challenge for all the newbs 22:36:38 ? 22:36:38 why does that print the first 10 squares! 22:36:38 nice :) 22:36:42 heh 22:37:07 we need a little collection of "Lispy's Puzzles" for beginners 22:37:09 lispy: that's nasty 22:37:12 lispy: for newbs 22:37:15 > take 10 $ fix $ (1:) . scanl (+) 1 22:37:16 lispy: they'd need to know monads 22:37:16 [1,1,2,3,5,8,13,21,34,55] 22:37:18 @type join 22:37:20 forall a (m :: * -> *). (Monad m) => m (m a) -> m a 22:37:26 * glguy challenges to newbs to explain that one 22:37:28 lispy: want to make a wiki page... :) 22:37:28 dons: i was just thinking of registering newbchallenge.org 22:37:29 or blog it? 22:37:44 nice idea 22:37:58 or should it be n00b 22:38:04 > (*2) `fmap` (+1) 7 22:38:05 add an instance declaration for (Num (f a)) 22:38:15 > ((*2) `fmap` (+1)) 7 22:38:16 16 22:38:20 @hoogle join 22:38:21 Monad.join :: Monad a => a (a b) -> a b 22:38:21 Control.Monad.join :: Monad m => m (m a) -> m a 22:38:21 Data.PackedString.joinPS :: PackedString -> [PackedString] -> PackedString 22:38:29 glguy: i admit, i need to master scanl still 22:38:34 ?type scanl 22:38:35 forall a b. (a -> b -> a) -> a -> [b] -> [a] 22:39:11 > scanl (+) 0 [1..10] 22:39:12 [0,1,3,6,10,15,21,28,36,45,55] 22:39:14 * glguy would like to see (.) generalized to fmap 22:39:37 glguy: hmm... 22:39:46 [1..3] . [4..5] == ?? 22:40:07 lispy: [1..3] `fmap` [4..5] ==?? 22:40:14 I don't think that means anything 22:40:20 oh, i think i didn't understand you before 22:40:31 i read fmap as Functor 22:40:35 > fmap (^2) [1..10 22:40:35 Parse error 22:40:36 > fmap (^2) [1..10] 22:40:38 [1,4,9,16,25,36,49,64,81,100] 22:40:48 > (^2) . [1..10] 22:40:48 --- join: thetallguy (n=beshers@cpe-66-27-78-246.san.res.rr.com) joined #haskell 22:40:49 Couldn't match `a -> b' against `[a1]' 22:41:05 in ghci, join wasn't found; can't I just make that `Monad.join` instead? 22:41:14 ?type scanr 22:41:15 :m Control.Monad.Reader 22:41:16 forall b a. (a -> b -> b) -> b -> [a] -> [b] 22:41:20 mlh: type that ^^ 22:41:22 hey thetallguy 22:41:28 ?type scanl 22:41:29 forall a b. (a -> b -> a) -> a -> [b] -> [a] 22:41:49 lispy: scan is just a fold that also returns intermediate results 22:42:03 where does the name come from? 22:42:35 > let maximum = foldl1 max in [1,5,2,7,3,5,10] 22:42:36 Add a type signature 22:42:37 glguy: ? 22:42:42 > let maximum = foldl1 max in maximum [1,5,2,7,3,5,10] 22:42:43 10 22:42:52 > let maximum = scanl1 max in maximum [1,5,2,7,3,5,10] 22:42:53 [1,5,5,7,7,7,10] 22:43:19 mlh: when join is used in that way, you need to load Control.Monad.Reader 22:43:32 glguy: interesting 22:43:53 > scanl (+) 0 [1..10] 22:43:55 [0,1,3,6,10,15,21,28,36,45,55] 22:43:58 ah 22:44:00 > let sum = foldl (+) 0 in sum [1..10] 22:44:02 55 22:44:06 > let sum =scanl (+) 0 in sum [1..10] 22:44:07 [0,1,3,6,10,15,21,28,36,45,55] 22:44:30 so in one sense scan is like a generalized fold 22:44:47 kind of.. but you can do what scan does iwth a fold 22:44:51 you cann't do what fold does with a scan 22:45:10 no? 22:45:16 ?type foldl 22:45:17 forall a b. (a -> b -> a) -> a -> [b] -> a 22:45:18 ?type scanl 22:45:20 forall a b. (a -> b -> a) -> a -> [b] -> [a] 22:45:21 glguy: ta. still baffled, but ta :-) 22:45:25 isn't it the other way around? 22:45:28 fold can be made to return a list 22:45:35 scan can not be made to not return a list 22:45:41 (unless you just call last on the result) 22:45:42 --- quit: jgrimes (Read error: 110 (Connection timed out)) 22:46:01 any idea where the name came from though? 22:46:37 I don't know anything concrete 22:46:56 exactly, it returns fold, plus all prefixes 22:47:18 making it a special case of fold :-p 22:47:26 ?scheck \f z xs -> head (scanr f z xs) == foldr (f :: Bool -> Bool -> Bool) z xs 22:47:28 Completed 16352 test(s) without failure. 22:47:34 making fold a special case of scanl :) 22:47:37 dons: what would be cooler than a random newbchallenge would be a tutorial where you write your code in haskell on the website and as long as it computes the predefined answer then you get the question right and move forward to the next exercise (and we can do this now) 22:48:00 mmm nice idea. 22:48:12 dons: not my idea, it's how i learned lisp :) 22:48:46 dons: if we had user accounts + multiline input in lambdabot then we'd just need to write the thing 22:48:49 --- join: jgrimes (n=jgrimes@Lee-10-101.rh.ncsu.edu) joined #haskell 22:49:01 --- join: Stinger_ (i=stinger@219-90-224-73.ip.adam.com.au) joined #haskell 22:49:02 yeah 22:49:10 so, let's get hacking :) 22:49:13 i'm sold 22:49:38 the user accounts thingy we can solve by allowing people to use openid 22:49:42 > let f = foldl (\y x -> head y + x : y) [0] in f [1..10] 22:49:44 [55,45,36,28,21,15,10,6,3,1,0] 22:49:48 then we just need some logic and maybe a db to store data in 22:49:51 there's fold doing scan's job 22:50:05 now show me scan doing a sum 22:50:44 dons: i'm trying to solve the open id thing but the guy who has a partial haskell implementation isn't getting back to me 22:51:34 glguy: just call last 22:51:48 lispy: exactly, it doesn't stand on its own ;) 22:51:53 glguy: it gave you all the sums, it was just that you only needed the last :) 22:52:11 right, its the special case where you get all of the results 22:52:17 (c: 22:52:23 isn't more results == more general... 22:52:32 no, more general is more general 22:52:38 more types of results 22:52:39 > let f = scanl (\y x -> head y + x : y) [0] in f [1..10] 22:52:41 [[0],[1,0],[3,1,0],[6,3,1,0],[10,6,3,1,0],[15,10,6,3,1,0],[21,15,10,6,3,1,0]... 22:52:46 and the ability to encapsulate the fuunctionality 22:52:59 --- join: johnnowak (n=johnnowa@207-38-246-119.c3-0.wsd-ubr2.qens-wsd.ny.cable.rcn.com) joined #haskell 22:53:11 it doesn't matter 22:53:15 I'm just being argumentative 22:53:15 there is more than one way to generalize 22:54:38 "Nationally recognized as the best in the state" 22:54:40 wtf is that? 22:55:05 hmm, now I'm arguing with the TV 22:55:09 might be time for bed 22:55:20 ?scheck \xs -> last (scanl (\a b -> a + b) (0::Int) xs) == sum xs 22:55:24 Completed 623530 test(s) without failure. 22:55:43 scan's functionality is subsumed by fold! 22:55:56 folds functionality is subsumed by scan! 22:56:02 lies 22:56:04 GRrr 22:56:26 scan + last == fold, fold + random stuff = scan 22:56:33 exactly 22:56:37 subsumed ;) 22:56:46 and since scan+last is easier to remember, scan wins 22:56:49 fold + random stuff + last = fold :) 22:57:16 you should write a paper on that ;) 22:59:48 did you make any progress picking scala 23:00:00 I want you to learn more about it and tell us more :) 23:00:02 what do you mean? 23:00:02 23:00:28 the class doesn't start till tuesday 23:00:36 so, i don't need to pick it anytime soon :) 23:00:40 but scala seems good 23:00:47 but what project to do? 23:01:22 i can think of lots of things i want to do but when i constrain it to this, i'm less ideaful 23:03:12 whoa, you can have varadic functions in haskell? does that mean the arity varies? 23:03:37 Yeah. 23:03:56 example? 23:04:19 http://okmij.org/ftp/Haskell/types.html 23:04:21 Title: Haskell Programming: Types 23:04:40 ?type printf [] 'x' 23:04:41 forall t. (PrintfType (Char -> t)) => t 23:04:48 ?type printf [] 'x' 'y' 'z' (1::Int) 23:04:50 forall t. (PrintfType (Char -> Char -> Char -> Int -> t)) => t 23:05:31 ?type printf [] 'x' 'y' 'z' (1::Int) :: String 23:05:32 String :: String 23:10:08 dolio: that link is pretty cool 23:10:31 --- join: falconair (n=shahbazc@c-68-80-214-116.hsd1.nj.comcast.net) joined #haskell 23:10:34 Yeah. There's lots of stuff there I only kind of understand. :) 23:12:19 --- quit: johnnowak () 23:13:06 --- join: kep__ (n=const@nat-175-12.yapic.net) joined #haskell 23:16:01 haskell.org is down? i can't get any news on the status of GHC 6.6 (among other haskell news) 23:16:11 --- join: ThreeQ (n=ThreeQ@lal-99-102.Reshall.Berkeley.EDU) joined #haskell 23:16:30 yes, it's down. 23:16:59 ghc 6.6 may have another RC this week 23:17:04 --- join: emertens (n=emertens@unaffiliated/glguy) joined #haskell 23:17:14 hmm... h.o is down 23:17:21 all the people who can put that in the /topic are sleeping at the moment... 23:17:26 --- quit: emertens (Client Quit) 23:17:42 btw, is there one location where one can read all research papers related to haskell? 23:17:46 you really want it in the topic? 23:17:54 falconair: yes, haskell.org/ :) 23:18:00 under the 'Research papers' link 23:18:12 --- mode: ChanServ set +o dons 23:18:13 is there a short one-liner that would do this? [[1,2],[3],[4,5,6]] -> [[1,3,4],[2,3,4],[1,3,5],[2,3,5],[1,3,6],[2,3,6]] 23:18:31 sequence? 23:18:35 heh, i meant new papers, as they are released...so i can keep up 23:18:50 > sequence [[1,2],[3],[4,5,6]] 23:18:51 [[1,3,4],[1,3,5],[1,3,6],[2,3,4],[2,3,5],[2,3,6]] 23:18:52 --- topic: set to '["Haskell.org is temporarily down", "Join us as we move forward toward the Age of the Lambda","Logs: http://tunes.org/~nef/logs/haskell/", "Haskell - The language of choice for discriminating hackers"]' by dons 23:18:56 --- mode: ChanServ set -o dons 23:18:56 holy crap 23:18:56 --- join: therp (n=nil@chello080108077214.34.11.tuwien.teleweb.at) joined #haskell 23:19:04 how did I not see sequence 23:19:09 falconair: yes, new papers go up there 23:19:10 thanks, glguy :) 23:19:19 but maybe we should keep a list of them ordered by when they appear. 23:19:22 ThreeQ: because that's not what sequence is "for" specifically 23:19:26 so people know what is new 23:19:49 falconair: check sequence.complete.org for new papers from the haskell workshop 23:20:20 thanks dons 23:21:49 --- quit: weitzman (Read error: 110 (Connection timed out)) 23:23:30 ThreeQ: even if you have been doing haskell for 15 years you can miss using sequence like that :) 23:23:53 lennart: yes, but it makes perfect sense when you think about it that way 23:24:04 yes, it does 23:25:04 but the list monad is a bit strange (and so is the (a->) monad) 23:25:31 * glguy thrives on finding uses for Monadic functions 23:25:55 what would be an example of using the (a->) monad? 23:26:07 > join (+) 2 23:26:09 4 23:26:14 > join (*) 5 23:26:15 25 23:26:15 > join (,) 3 23:26:17 (3,3) 23:26:33 oh! 23:26:50 > liftM2 (/) sum genericLength [1,3,7,20] 23:26:51 7.75 23:27:00 arithmetic mean ^^ 23:27:19 wow 23:27:34 haskell is pretty neat 23:28:00 > sequence [sin, cos, exp] (pi/2) 23:28:01 [1.0,6.123031769111886e-17,4.810477380965351] 23:29:14 > ap (,) (+1) 4 23:29:16 (4,5) 23:29:52 --- nick: eno -> eno-away 23:30:11 > ap (,) (+1) (snd ((ap (,) (+1) 4))) 23:30:13 (5,6) 23:30:16 > ap (+) (2/) 1 23:30:18 3.0 23:30:23 --- quit: kep__ ("leaving") 23:30:38 > ((/2) . ap (+) (2/)) 1 23:30:40 1.5 23:31:02 > ( (+1) `fmap` (*2) ) 3 23:31:03 7 23:31:21 > fix $ scanl (const (/2) . ap (+) (2/)) 1 23:31:22 [1.0,0.5,0.25,0.125,6.25e-2,3.125e-2,1.5625e-2,7.8125e-3,3.90625e-3,1.953125... 23:31:34 Oops. 23:31:44 looking for radical 2 approximations? 23:31:49 > fix $ scanl (const ((/2) . ap (+) (2/))) 1 23:31:51 [1.0,1.5,1.4166666666666665,1.4142156862745097,1.4142135623746899,1.41421356... 23:32:15 uses the continued fraction approximation ^^ 23:32:23 hey, that's a cool one 23:32:24 > scanl (const ((/2) . ap (+) (2/))) 1 23:32:25 Add a type signature 23:32:28 Turning that into radical n makes it a lot more cryptic. 23:32:34 > scanl (const ((/2) . ap (+) (2/))) 1 :: [Double] 23:32:35 Expecting a function type, but found `[Double]' 23:32:36 Expected type: [Do... 23:32:38 hmm... 23:33:00 lennart: xerox came up with it, not me. 23:33:04 what are you feeding to fix? 23:33:33 > take 5 $ map (foldr1 (\x y -> x + 1 / y) . (1:)) $ inits [2,2..] 23:33:34 [1.0,1.5,1.4,1.4166666666666667,1.4137931034482758] 23:34:20 ?type scanl 23:34:21 forall a b. (a -> b -> a) -> a -> [b] -> [a] 23:34:27 scanl hasn't been fully applied there 23:34:31 right 23:34:33 ?pl \x y -> x + 1 / y 23:34:33 (. (1 /)) . (+) 23:34:37 ?type fix 23:34:38 forall a. (a -> a) -> a 23:34:43 lispy: (/2) . ap (+) (2/) takes a value x and computes (x + 2/x)/2 23:34:58 const f extends that to two parameters. 23:35:20 > take 5 $ map (foldr1 (\_ y -> 2 + 1 / y) . (1:)) [2,2..] 23:35:20 add an instance declaration for (Num [a]) 23:35:21 In an arithmetic sequence: [2... 23:35:33 fix (scanl (const f) 1) computes successive iterations of that, starting with 1. 23:35:50 hey, pl didn't spot (1/) being recip :) 23:36:15 The accumulator and parameter will be the same in this case, so you use const to just throw one away. 23:37:05 * lispy still struggles with fix 23:37:46 > fix id 23:37:47 Add a type signature 23:37:55 fix takes a function, f, and returns a value, x, such that (f x)==x 23:37:58 > fix (+1) 23:38:00 Exception: <> 23:38:03 oh 23:38:21 --- join: johnnowak (n=johnnowa@207-38-246-119.c3-0.wsd-ubr2.qens-wsd.ny.cable.rcn.com) joined #haskell 23:38:25 how does it find x? 23:38:48 well, it returns the smallest one in a particular ordering 23:38:50 by calling fix (f.f) ? 23:39:19 > take 10 $ map (subtract 1) $ iterate ((2+).recip) 2 23:39:20 [1.0,1.5,1.4,1.4166666666666665,1.4137931034482758,1.4142857142857141,1.4142... 23:39:21 --- quit: dottedmag ("ERC Version 5.1.4 (IRC client for Emacs)") 23:39:22 it's found by iteration (recursion) 23:39:29 lennart: how can it do that for all types? 23:39:36 wouldn't it have to be an instance of Ord? 23:39:47 the ordering is not that ordering 23:40:00 it's the information ordering in a CPO 23:40:01 haha 23:40:06 ?google prelude fix 23:40:09 http://www.10w40.com/individual/100508.asp 23:40:09 Title: 1984 - 1991 Honda Accord and Prelude Repair Manual at 10W40.com 23:40:13 not at all, what i wanted :) 23:40:15 the least element is _|_ (undefiend) 23:40:54 Ok this is whakced 23:40:56 what's a CPO? 23:40:56 ?index fix 23:40:57 Control.Monad.Fix, Control.Monad.Reader, Control.Monad.Writer, Control.Monad.State, Control.Monad.RWS, Control.Monad.Identity, Control.Monad.Error 23:40:58 operationally, fix really just does recursion 23:41:17 CPO = Complete Partial Order 23:42:01 ?google complete partial order 23:42:03 http://en.wikipedia.org/wiki/Complete_partial_order 23:42:04 lennart: i wanted to read the haskell definition, do you happen to know it? 23:42:05 denotationally (fix f) gives you LUB(f^n(_|_)) 23:42:23 let fix f = f (fix f) 23:42:25 what does f^n mean? 23:42:32 f iterated n times 23:42:33 You can expand fix f = f (fix f), and then when you apply it to arguments, you expand like that as many times as you need to get a value. 23:42:34 fuck 23:42:35 f applied n times, I'd imagine 23:42:36 yeah 23:42:39 anyone here use pmwiki? 23:43:15 so you get the smallet value of _|_ f(_|_) f(f(_|_)) ... 23:43:42 okay, so fix f searches for an x so such that f x == x, but it's just implemented as fix f = f (fix f)...so what am i missing? 23:43:49 nothing 23:44:06 how does the recursion stop 23:44:20 sometimes it doesn't 23:44:30 oh, when fix f = x 23:44:34 ah i think i get it 23:45:04 looping (i.e., bottom) might be the smallest value fulfilling f x = x 23:45:08 > take 10 $ map(+(-1)) $ fix ((2:).map((2+).recip)) 23:45:10 [1.0,1.5,1.4,1.4166666666666665,1.4137931034482758,1.4142857142857141,1.4142... 23:45:12 lispy: The way to think of it is that f might return something usable right away 23:45:22 even without knowing the value of its parameter 23:45:37 > fix ((:0) . map (+1)) 23:45:38 Occurs check: cannot construct the infinite type: a = [a] 23:45:39 > fix (const 1) 23:45:39 Expected... 23:45:40 1 23:45:42 > fix ((0:) . map (+1)) 23:45:44 [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2... 23:46:06 > fix ((0:) . scanl (+) 1) 23:46:08 [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,... 23:46:16 fix (const 1) == const 1 (fix (const 1)) == 1 23:46:25 right 23:46:27 that makes sense 23:46:31 iterate f x = fix ((x:).map f) 23:46:35 --- quit: ValarQ (Read error: 110 (Connection timed out)) 23:46:52 is that how the prelude defines it? 23:47:05 not quite 23:47:16 (it just defines it with implicit recursion) 23:47:32 > fix (\f n -> if n == 0 then 1 else n * f (n-1)) 5 23:47:33 120 23:47:37 It uses the let x = f x... version. 23:47:40 > fix (\f n -> if n == 0 then 1 else n * f (n-1)) 20 23:47:42 2432902008176640000 23:47:51 there's factorial :) 23:48:23 slick 23:48:37 fix has type (a->a)->a, but the type a is almost always a function when you use fix 23:48:42 > (\n -> product [1..n]) 20 23:48:43 2432902008176640000 23:48:46 --- quit: cerculetz () 23:49:18 I remember what class I was in when I was reading Hudak's book and discovered fix 23:49:25 life altering... 23:49:26 ;) 23:49:30 is there anything else that fix will really work on? 23:49:31 heh 23:49:39 it was a cognitive psych course 23:49:42 night class 23:49:52 just as the quizes were being handed out 23:50:06 > fix (1:) 23:50:07 [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1... 23:50:21 other than functions, I mean 23:50:28 I just watched the SICP lecture where Sussman explained the Y combinator earlier tonight. 23:50:35 He put on a cape. 23:50:40 ThreeQ: I just gave you one 23:50:41 And a suit jacket. 23:50:42 > take 10 $ fix ((1:). scanl1 (+)) 23:50:44 [1,1,2,4,8,16,32,64,128,256] 23:50:57 is fix = Y? 23:51:02 oh 23:51:03 the infinite list of 1s is the fixpoint of 1: 23:51:03 Yeah. 23:51:13 (:) isn't a function, that's right 23:51:23 ?type (:) 23:51:25 forall a. a -> [a] -> [a] 23:51:25 (:) is a function 23:51:41 > take 10 $ fix ((1:).scanl (+) 1) 23:51:42 but the 'a' type in fix is [Int] in this case 23:51:42 [1,1,2,3,5,8,13,21,34,55] 23:51:58 oh 23:52:00 ?type (1:) 23:52:02 forall a. (Num a) => [a] -> [a] 23:52:04 The infinite list of 1s is the value such that when you cons a 1 onto the front, you get the same thing. 23:52:10 got it 23:52:31 > scanl (+) 1 [1..10] 23:52:33 [1,2,4,7,11,16,22,29,37,46,56] 23:53:14 ?type ((1:).scanl (+) 1) 23:53:16 forall b. (Num b) => [b] -> [b] 23:53:41 > ((1:).scanl(+)1) [1..10] 23:53:43 [1,1,2,4,7,11,16,22,29,37,46,56] 23:54:04 so why is it off by one compared to the fix version? 23:54:12 > ((1:).scanl(+)1) [1,1,2..10] 23:54:13 Parse error 23:54:40 er, no it's not off by one 23:54:41 lispy: huh? 23:54:44 it's just differente 23:55:00 > take 10 $ fix ((1:).scanl (+) 1) 23:55:02 [1,1,2,3,5,8,13,21,34,55] 23:55:06 > ((1:).scanl(+)1) [1..10] 23:55:07 [1,1,2,4,7,11,16,22,29,37,46,56] 23:55:16 very different 23:55:32 one is fibonacci numbers, one is partial sums 23:55:53 * lispy has to think about these 23:56:00 > take 10 $ fix (scanl (+) 1) 23:56:02 [1,2,4,8,16,32,64,128,256,512] 23:56:17 > fix (+ 1) 23:56:18 Exception: <> 23:56:35 fix (scanl (+) 1) 23:56:47 > fix (scanl (+) 1) 23:56:49 [1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,2... 23:57:20 > fix (foldl (+) 1) 23:57:21 Occurs check: cannot construct the infinite type: b = [b] 23:57:21 Expected... 23:57:23 > scanl (+) 1 [] 23:57:24 [1] 23:57:27 Ah 23:57:57 > scanl (+) 1 undefined 23:57:58 Undefined 23:58:05 bah! 23:58:10 so that's doing scanl (+) 1 [] = [1], then scanl (+) 1 [1] = [1,2], then scanl (+) 1 [1,2] = [1,2,4] and so on right? 23:58:27 almost 23:58:28 > head $ scanl (+) 1 undefined 23:58:30 1 23:58:39 except that it starts with _|_ 23:58:40 > take 1 $ scanl (+) 1 undefined 23:58:40 > scanl (+) 1 [1] 23:58:41 [1] 23:58:42 [1,2] 23:58:48 > scanl (+) 1 [1,2] 23:58:49 [1,2,4] 23:58:57 hrm 23:59:47 > fix $ scanl (*) 2 23:59:48 [2,4,16,256,65536,4294967296,18446744073709551616,34028236692093846346337460... 23:59:53 Operationally, scanl f b always produces b as a first element, so it provides a starting point. 23:59:59 --- log: ended haskell/06.09.23