00:00:00 --- log: started haskell/07.10.09 00:00:02 so this "applicative" stuff is a lot like some of the concepts in "funmath" 00:00:10 where you write hats over functiosn and operators to lift them 00:00:57 --- quit: ddarius (Read error: 110 (Connection timed out)) 00:01:32 --- quit: ivanm (Read error: 110 (Connection timed out)) 00:01:49 --- quit: jewel (Read error: 113 (No route to host)) 00:02:08 --- join: iblechbot (n=iblechbo@ppp-62-216-200-249.dynamic.mnet-online.de) joined #haskell 00:03:54 --- quit: jonathanv (Read error: 110 (Connection timed out)) 00:05:03 --- join: FZ (n=chatzill@unaffiliated/fz) joined #haskell 00:05:14 --- join: filp (n=hordf@ip-168-248.sn2.eutelia.it) joined #haskell 00:07:53 --- quit: boyscared (Read error: 104 (Connection reset by peer)) 00:08:11 --- join: boyscared (n=boy@oh-76-5-125-71.dhcp.embarqhsd.net) joined #haskell 00:09:17 --- join: phb2 (n=phb2@c213-100-44-22.swipnet.se) joined #haskell 00:10:30 --- quit: shachaf (Read error: 113 (No route to host)) 00:11:35 --- quit: sutats ("leaving") 00:12:12 --- join: doserj (n=doserj@dewey.inf.ethz.ch) joined #haskell 00:12:30 --- quit: Tela () 00:14:36 --- quit: Plareplane ("Leaving") 00:14:38 --- join: piis3141 (n=piis3141@ip4da169f4.direct-adsl.nl) joined #haskell 00:14:58 --- join: Plareplane (n=Plarepla@216-197-152-148.sktn.hsdb.sasknet.sk.ca) joined #haskell 00:15:45 --- join: boegel (n=boegel@konijn.elis.UGent.be) joined #haskell 00:16:16 --- join: jewel (n=jewel@61.247.251.10) joined #haskell 00:18:45 newsham: yeah, I think there is a list of papers to read on various topics 00:18:59 newsham: I'll find it. 00:19:58 yeah, http://haskell.org/haskellwiki/Research_papers 00:19:59 Title: Research papers - HaskellWiki 00:20:22 That has a list of the research papers relevant to Haskell broken down roughly by topic. 00:20:45 The Functional Pearls section has quite a lot of particularly good ones. 00:21:29 --- join: Kyzia (i=kyzia@195.5.34.126) joined #haskell 00:21:44 hello 00:21:46 http://globalchat.pp.net.ua/ 00:21:46 --- part: Kyzia left #haskell 00:21:47 Title: Ãëîáàë_×àò - Ãëàâíàÿ ñòðàíèöà 00:22:04 --- quit: bringert () 00:22:58 --- join: amiddelk (n=arie@melinda.cs.uu.nl) joined #haskell 00:28:14 I wish that as an op, I could edit the past conversation on the channel, so as to remove the effects of spammers ;) 00:28:34 Censorship! 00:28:41 yes 00:28:43 and? 00:28:47 --- join: pulczynski (n=marek@fw.grono.org) joined #haskell 00:28:48 isn't that the point of an op 00:28:52 --- join: takuan (n=takuan@83.101.37.197) joined #haskell 00:29:14 --- quit: pulczynski ("Leaving.") 00:29:33 --- join: pulczynski (n=marek@fw.grono.org) joined #haskell 00:30:16 --- join: Aperculum (n=lauri@unaffiliated/aperculum) joined #haskell 00:30:19 --- join: roconnor (n=roconnor@vhe-540354.sshn.net) joined #haskell 00:30:31 --- part: pulczynski left #haskell 00:30:52 --- join: QplQyer (n=jeroen@state.ugent.be) joined #haskell 00:30:54 So I made this mini-mini-combinator language to make turing maching programs, but it's really ugly looking with nested functions. I wonder if this is a good place to stick a monad. 00:31:56 * jeffz wonders how effective spamming a non-english language website amongst mainly english speakers is. 00:32:14 it's cheaper than it is effective. 00:32:15 maybe its just the get the url into logs? 00:32:25 glguy: ah good point. 00:32:28 Google spamming. 00:32:31 Pagerank. 00:32:50 --- quit: Mr_Awesome (Read error: 110 (Connection timed out)) 00:33:52 Shimei: Well, a monad is just a combinator language which has the right kind of combinators in it. 00:33:58 --- quit: boyscared (Read error: 104 (Connection reset by peer)) 00:34:17 --- join: boyscared (n=boy@oh-76-5-125-71.dhcp.embarqhsd.net) joined #haskell 00:35:51 SEO is a pretty skeevy profession. 00:40:45 --- quit: Korollary ("leaving") 00:41:30 --- join: Rack (n=soue@201.132.207.143) joined #haskell 00:42:13 --- quit: LeCamarade ("":o)"") 00:42:35 --- quit: lstephen666 ("Leaving") 00:43:17 --- quit: oerjan ("leaving") 00:44:01 --- join: goban_ (n=whyso@pool-96-228-43-108.rcmdva.fios.verizon.net) joined #haskell 00:44:50 skeevy executaive officer? 00:45:42 --- join: calvins (n=calvins@c-67-188-118-53.hsd1.ca.comcast.net) joined #haskell 00:46:05 --- join: bparkis (n=bparkis@library-356.wireless.umass.edu) joined #haskell 00:46:26 --- join: bringert (n=bringert@3-1-5-7a.gva.gbg.bostream.se) joined #haskell 00:46:28 oh search engine optimization 00:49:31 --- quit: edwinb (Remote closed the connection) 00:50:30 * mgsloan wonders if there are people who just optimize programs 00:51:13 yes there is 00:51:17 they're called ricers 00:51:29 --- quit: mikael () 00:51:30 There certainly are people whose job it is to take code written by physicists and the like and make it run properly on a supercomputer 00:51:45 hah 00:51:54 that's interesting 00:52:32 I wonder what physicists use.. with some nice syntax haskell could be pretty good for physicists 00:52:47 fortran and matlab? 00:52:49 Fortran, what else? 00:52:53 I suppose so 00:53:46 Fortran is insanely well optimized for it's problem domain 00:53:54 compiler-wise, anyway 00:54:56 --- quit: omnId ("Leaving") 00:55:55 yeah, I seem to recall hearing that in general 00:56:11 --- join: cbe (n=cbe@62.70.2.252) joined #haskell 00:56:15 --- join: therp (n=nil@chello080108077214.34.11.tuwien.teleweb.at) joined #haskell 00:56:26 there were some attempts to make a Lisp fast enough to beat Fortran, and the end result did so. the problem is that there are way more people working on optimizing Fortran than there are optimizing Lisp or Haskell. 00:56:32 pretty ugly language though 00:56:40 so, it's hard to maintain an advantage 00:56:43 right 00:57:02 oh yeah, Fortran is gross 00:57:16 Ironically the first language on my programming language timeline that I have taped to the wall. 1954... 00:57:26 (first and still strong?) 00:57:28 --- nick: clad|sleep -> cladhaire 00:57:38 If I had to use it I'd probably write a language that outputs fortran code 00:57:39 --- part: zappa left #haskell 00:57:45 Lisp was #2 and is still being used. 00:57:49 fortran and lisp are the oldest languages still in use 00:58:03 and yeah, fortran came first 00:58:04 basic is still used! 00:58:06 B-O comes next on my chart. :p 00:58:16 Aperculum: basic is young 00:58:17 With a name like that, no surprise it died. 00:58:23 there were some kind-of languages written for earlier computers, I think the first one was designed by Zuse 00:58:34 lisp was originally intended to be a fortran variant, iirc 00:58:37 ibid, basic is oldest highlevel language after fortran and lisp 00:58:43 plankalkül 00:58:49 What about algol? 00:58:52 --- quit: rc-1 (Connection timed out) 00:58:57 Shimei: not in use 00:58:58 BASIC is not that old 00:59:07 Oh, right. High level languages in use. 00:59:28 --- quit: mgsloan (Remote closed the connection) 00:59:42 Given that the "basic" in use is VB.Net, I'm not sure it really passed on much lineage. 00:59:52 it will be interesting to see how Fortress turns out. 01:00:20 Aperculum: hm, right, 1963. i though it was late 60s 01:00:44 yeah, only 5 years after lisp 01:00:48 --- quit: turulu (Remote closed the connection) 01:00:52 --- quit: Adamant (Remote closed the connection) 01:00:55 although 5 years is long 01:01:44 Aperculum: cobol is older than basic, btw, pre-60s 01:01:58 and it's still in use, though mostly in legacy systems 01:06:07 --- join: TwigEther (n=Twigathy@raptor.ukc.ac.uk) joined #haskell 01:06:27 XML is like violence: if it doesn't solve your problem, you aren't using enough of it. 01:06:44 * jeffz wonders how you define a legacy system. 01:07:17 --- quit: scodil ("Lost terminal") 01:07:39 glguy: ;) 01:07:43 --- quit: njbartlett () 01:07:57 jeffz: do you mean that cobol is used in many new projects? 01:08:42 jeffz: by legacy, i mainly mean systems that were built long ago and are in maintenance mode 01:13:36 I would define legacy as "a old system with known flaws or limitations which in an ideal world we would replace, but it's so hardwired in that that is expensive or difficult to do" 01:13:40 something like that 01:14:37 the flaw may just be that "noone knows how to make any changes to it, in the future, even though right now it works perfectly" 01:14:49 cobol was still a mandatory course in the business oriented it program here when i started studying (not on that program, fortunately) 01:14:53 not anymore though 01:15:21 ibid: well, where I work, some new cobol programs are written, nothing very large though. 01:15:38 isn't SAP's ABAP language largely cobol ? 01:15:43 jeffz: "mostly" leaves room for exceptions :) 01:15:51 --- join: Jaak (n=Jaak@193.40.10.182) joined #haskell 01:16:27 I sometimes think I might've had more fun doing COBOL than Java. 01:16:41 quicksilver: it is my impression that most legacy systems by my definition are legacy systems by your definition :) 01:17:07 ibid: I guess =) though, I still think the term legacy system is ambiguous and lends itself to be used where people think they can do a better job, often with some misunderstanding. 01:17:38 legacy can mean something as simple as "not conforming to the standards we use now, because it was written before we had them" 01:17:44 jeffz: :) what i was trying to convey is that its use is winding down 01:20:03 ibid: that's probably just a matter of time, I don't think I know anyone who is under 40 years of age who programs cobol. 01:21:22 --- quit: bparkis ("Leaving") 01:21:29 --- join: goban__ (n=whyso@pool-96-228-43-108.rcmdva.fios.verizon.net) joined #haskell 01:21:58 jeffz: yep 01:22:14 jeffz: though, it was still taught here ten years ago :) 01:22:23 --- join: Adamant (n=wtfmonki@unaffiliated/adamant) joined #haskell 01:23:51 --- join: turulu (i=antiludi@gateway/tor/x-db241b485744e9e7) joined #haskell 01:25:04 --- join: xinming_ (n=xinming@70.132.73.218.broad.wz.zj.dynamic.163data.com.cn) joined #haskell 01:25:29 --- join: masak (n=user@130.238.45.242) joined #haskell 01:28:10 --- quit: goalieca (Remote closed the connection) 01:32:27 --- quit: mathrick (Read error: 104 (Connection reset by peer)) 01:34:05 --- join: mathrick (n=mathrick@users.kollegienet.dk) joined #haskell 01:34:39 --- quit: goban_ (Connection timed out) 01:34:51 --- join: mr_tenor (n=nick@c220-239-33-8.rivrw7.nsw.optusnet.com.au) joined #haskell 01:36:58 --- join: KatieHuber (n=katie@203-97-111-120.cable.telstraclear.net) joined #haskell 01:37:19 --- quit: jewel (Read error: 113 (No route to host)) 01:37:19 --- quit: xinming (Read error: 110 (Connection timed out)) 01:37:52 --- join: goban_ (n=whyso@pool-96-228-43-108.rcmdva.fios.verizon.net) joined #haskell 01:39:06 --- join: tarrybon1 (n=dlc@c-71-60-148-169.hsd1.pa.comcast.net) joined #haskell 01:41:56 --- quit: tarrybone (Nick collision from services.) 01:42:07 --- join: jewel (n=jewel@61.247.251.10) joined #haskell 01:42:08 --- nick: tarrybon1 -> tarrybone 01:43:02 --- quit: nominolo ("Ex-Chat") 01:45:12 --- nick: cladhaire -> clad|brb 01:47:23 so, the indentation matters in haskell 01:47:26 like in python? 01:48:26 --- join: augustss (n=Lennart@63.175.43.10) joined #haskell 01:49:42 quicksilver: I "finished" my code 01:50:14 --- join: ivanm (n=ivan@60-242-0-245.static.tpgi.com.au) joined #haskell 01:50:34 --- quit: goban__ (Connection timed out) 01:51:42 Aperculum: yes, indentation matters in python too 01:51:58 Aperculum: but the rules are different, so it's not exactly "like in python" 01:52:11 ibid: is there a main difference? 01:52:47 masak: it's been a long time since i last looked at python :) 01:53:05 to me, there seems to be a main similarity, namely that things that are semantically subordinate other things are further to the right 01:53:11 masak: but for one, in haskell, layout is lexical sugar for { ; } 01:53:12 yes, the indentation dependent syntax is optional, you can throw in braces and semicolons to get a sensible syntax 01:53:29 --- quit: glguy ("leaving") 01:53:34 @seen quicksilver 01:53:34 quicksilver is in #haskell and #ghc. I last heard quicksilver speak 35m 56s ago. 01:54:07 there's brace syntax in python too 01:54:07 --- quit: Kattana (Read error: 110 (Connection timed out)) 01:54:24 ...I think 01:54:26 oh python has braces too? Well I never! 01:54:35 let me check :) 01:54:36 masak: wasn't when i did python 01:54:47 masak: of course it's possible they've stolen them from haskell since :) 01:54:55 I'm probably wrong, actually 01:55:02 --- quit: mlesniak (Read error: 110 (Connection timed out)) 01:55:22 --- quit: iblechbot (Read error: 110 (Connection timed out)) 01:55:23 masak: and, of course, in python the layout enabler is ':', while haskell uses a number of keywords 01:55:43 right 01:55:58 I was thinking of this piece of code 01:56:00 http://www.freedom-to-tinker.com/tinyp2p.html 01:56:03 Title: TinyP2P 01:56:07 which actually does without braces 01:56:18 so I guess python doesn't have them :) 01:58:31 ibid: yes, I'd say that is the main difference then 01:58:56 which "that"? :) 01:59:47 --- quit: ac ("Lost terminal") 02:00:23 --- join: haraldk (n=harald@dhcp106-38.linpro.no) joined #haskell 02:01:29 --- join: ac (n=abram@dsl231-034-070.sea1.dsl.speakeasy.net) joined #haskell 02:01:49 ac: pleased to hear it :) 02:02:05 quicksilver: it was much easier generalizing it then I was expecting 02:03:18 --- join: Kattana (i=Kattana@modemcable181.114-80-70.mc.videotron.ca) joined #haskell 02:04:46 masak: Python has braces, but they're for dictionaries 02:09:49 --- join: njbartlett (n=njbartle@cpc2-barn4-0-0-cust110.brnt.cable.ntl.com) joined #haskell 02:10:18 --- join: MyCatSchemes (n=rb6822@yilvet.cs.bris.ac.uk) joined #haskell 02:10:53 err, I've also heard of a python brace syntax replacing indentation, but that might have been some web service thingy's own quirk 02:13:10 --- quit: seafoodX (Read error: 110 (Connection timed out)) 02:14:03 --- join: fmardini (n=fmardini@77.245.6.99) joined #haskell 02:14:19 --- quit: fmardini (Client Quit) 02:14:34 Japsu: I think that exists for blind people. 02:15:02 --- join: Rebooted (n=opera@88-104-185-170.dynamic.dsl.as9105.com) joined #haskell 02:15:06 --- quit: idnar (Nick collision from services.) 02:15:09 --- join: idnar_ (n=mithrand@unaffiliated/idnar) joined #haskell 02:15:53 --- nick: clad|brb -> cladhaire 02:16:11 --- part: Rebooted left #haskell 02:16:25 --- join: lnxz (n=Joachim@bjo1-1x-dhcp451.studby.uio.no) joined #haskell 02:19:25 --- join: dibblego (n=nobody@220-245-107-64.static.tpgi.com.au) joined #haskell 02:20:32 --- join: seafoodX (n=sseefrie@alphad261.lnk.telstra.net) joined #haskell 02:24:48 --- join: gkr (n=notme@201-212-49-41.cab.prima.net.ar) joined #haskell 02:24:51 --- quit: jwp_ (Read error: 104 (Connection reset by peer)) 02:28:44 --- join: mrchebas (n=alexey@ster.cs.uu.nl) joined #haskell 02:29:27 --- quit: dibblego ("Leaving") 02:29:40 --- join: jwp_ (n=jwp@mail.icrossing.com) joined #haskell 02:29:45 --- quit: mrchebas (Client Quit) 02:29:53 --- join: mrchebas (n=alexey@ster.cs.uu.nl) joined #haskell 02:32:11 --- join: yitz (n=abba@line236.adsl.actcom.co.il) joined #haskell 02:33:16 --- quit: prb () 02:33:17 --- join: gabkdlly (n=gabriel@dslb-088-073-040-137.pools.arcor-ip.net) joined #haskell 02:34:56 --- join: hkBst (n=hkBst@gentoo/developer/hkbst) joined #haskell 02:35:47 --- join: dibblego (n=nobody@220-245-107-64.static.tpgi.com.au) joined #haskell 02:39:10 --- join: exDM69 (n=rsalmin2@omena.hut.fi) joined #haskell 02:40:18 --- quit: phb2 () 02:42:20 --- quit: dibblego ("Leaving") 02:43:57 --- join: dibblego (n=nobody@220-245-107-64.static.tpgi.com.au) joined #haskell 02:46:32 --- join: malcolmw (n=malcolm@venice.cs.york.ac.uk) joined #haskell 02:47:20 --- quit: Tykom () 02:49:37 Anyone here ever spend time computing lambda expressions? 02:49:54 yes, we do that all day long 02:50:15 yitz: Is that a question? =p 02:51:00 I haven't so much, but I just noticed a weird identity: let c=(.), and let c4=c c c c. Then we have that c c4 == c c4 c c c c. Ever see stuff like that? 02:52:43 @pl let {c = (.); c4 = c c c c} in c4 02:52:43 (line 1, column 5): 02:52:43 unexpected "{" 02:52:43 expecting natural, identifier or "in" 02:53:00 unpl i'd think 02:53:07 right 02:53:10 either way it hates me 02:53:14 --- nick: sior|sleep -> sioraiocht 02:53:16 --- join: mrighele (n=mrighele@metropolis.sci.univr.it) joined #haskell 02:53:25 It was probably the "sleep". 02:53:32 @unpl let c = (.); c4 = c c c c in c c4 02:53:32 let { c a b d = a (b d); c4 = c c c c} in c c4 02:53:42 bah 02:53:45 no help 02:54:03 @type (.) ((.)(.)(.)(.)) 02:54:05 forall a a1 b c a2 a3. (a3 -> a -> a1 -> b -> c) -> a3 -> a -> a1 -> (a2 -> b) -> a2 -> c 02:55:18 Given a func w/ 4 params, it composes on the 3rd, w/ the composing func. specified between params 2 and 3. 02:55:50 @type let{c=(.);c4=c c c c}in c c4 c c c c 02:55:52 forall a a1 a2 b c a3. (a -> a1 -> a2 -> b -> c) -> a -> a1 -> a2 -> (a3 -> b) -> a3 -> c 02:56:53 Same type. In fact, they are equal. Prove it by repeatedly applying the identity x (y z)==c x y z. 02:57:19 --- join: mlesniak (n=chatzill@dhcp244.dcaiti.TU-Berlin.DE) joined #haskell 02:57:41 --- quit: bringert () 02:58:44 In fact, that identity is a semi-associativity condition that makes the entire lambda calculus into a semi-monoid. Apparently with quite interesting structure, as my example shows. 02:59:49 c c2 == c4. c c3 == c7. But c cn cannot be reduced for n>3. More interesting stuff like that if you throw flip into the mix. 02:59:50 --- quit: MyCatSchemes ("Swim, swim, hungry!") 03:02:51 --- quit: dogmaT (Read error: 113 (No route to host)) 03:03:15 Oops, sorry, composing func. specified between 3 and 4. Anyway. 03:05:49 yes, interesting 03:07:46 I discovered these things while playing with @pl, some strange and vary surprising patterns start to appear. 03:08:09 --- quit: dibblego ("Leaving") 03:08:09 --- join: swiert (n=wss@sneezy.cs.nott.ac.uk) joined #haskell 03:09:21 --- join: zx]treads (n=student@195.251.214.51) joined #haskell 03:09:55 --- join: gour (n=Gour@3-180.dsl.iskon.hr) joined #haskell 03:11:47 Maybe I'll post it to the cafe. 03:14:03 --- join: chris2 (n=chris@p5B16A71F.dip0.t-ipconnect.de) joined #haskell 03:16:42 --- quit: boegel (Read error: 110 (Connection timed out)) 03:16:48 --- quit: meryrus () 03:17:32 --- join: merus (n=merus@vlan-125-087.onu.edu) joined #haskell 03:18:01 --- quit: fxr (Remote closed the connection) 03:24:10 --- join: ptx (n=ptxmac@0x5550c853.adsl.cybercity.dk) joined #haskell 03:26:36 --- join: tarrybon1 (n=dlc@c-71-60-148-169.hsd1.pa.comcast.net) joined #haskell 03:27:20 --- quit: Thas (Read error: 110 (Connection timed out)) 03:27:25 --- join: snearch (n=snearch@e178044047.adsl.alicedsl.de) joined #haskell 03:28:48 --- join: misterbeebee_ (n=mike@71-35-157-132.tukw.qwest.net) joined #haskell 03:32:48 --- join: Taejo (n=max@196.210.103.191) joined #haskell 03:33:53 --- join: apfelmus (n=apfelmus@F7301.f.ppp-pool.de) joined #haskell 03:34:19 --- join: gimbo (i=gimbo@mini.theravensnest.org) joined #haskell 03:34:23 --- quit: misterbeebee (Read error: 110 (Connection timed out)) 03:36:32 :'( I'd like to create a Geometry.2D module namespace 03:36:32 Hi apfelmus. We were just discussing something I noticed yesterday. I posted it to the cafe. Do you know anything about that stuff? 03:37:03 but 2D is not a valid module name. any alternative thoughts? 03:37:13 TwoDee ? 03:37:28 yitz: uh, oh? /me looks 03:37:37 --- quit: tarrybone (Connection timed out) 03:37:55 Planar 03:38:25 Planar sounds good. But is there a nice name with the numeral 2 in there? 03:39:28 PlanarInOtherWords2Dimensional. um... 03:39:39 short if possible :) 03:39:44 Space2D? 03:40:07 Plane2D ? 03:40:41 --- quit: Averell (Read error: 110 (Connection timed out)) 03:41:57 --- quit: Cale_ (Read error: 104 (Connection reset by peer)) 03:42:22 I guess the "InOtherWords" is implicit... 03:43:28 --- join: Averell (n=averell@p3m/member/Averell) joined #haskell 03:43:42 :) It's a bit redundant, though since Plane or 2D alone would be enough 03:44:24 --- join: igel (n=igel@brsg-4db2d323.pool.einsundeins.de) joined #haskell 03:45:01 --- quit: snearch ("Nettalk6 - www.ntalk.de") 03:45:12 --- join: boegel (n=boegel@konijn.elis.UGent.be) joined #haskell 03:47:31 --- join: GNU\caust1c (n=caust1c@a207.wh-wieland.uni-ulm.de) joined #haskell 03:51:04 --- join: phb2 (n=phb2@c213-100-44-22.swipnet.se) joined #haskell 03:51:21 --- quit: phb2 (Client Quit) 03:53:41 yitz: my head hums. how do you prove c c4 = c c4 c c c c ? 03:53:53 I just get stuck :) 03:54:20 is it better to install haddock, pfesetup, alex, c2hs, cpphs, greencard before installing happy to compile and install ghc-head ??? 03:54:51 > let reg = mkRegex "(\\d)" in show $ matchRegex reg "d123" 03:54:52 Not in scope: `matchRegex' 03:56:03 apfelmus: Geometry.TwoD 03:56:23 --- quit: KatieHuber () 03:56:26 kaol: no regex in lambdabot 03:56:46 I just wanted to check if it would give Just ["d"] as the result, too 03:57:08 --- quit: boegel ("Leaving") 03:57:41 bah. good for nothing Text.Regex, if it doesn't even understand \d 03:57:47 --- join: VerbalDK (n=jensfrad@port35.ds1-ns.adsl.cybercity.dk) joined #haskell 03:58:15 * geocalc =<< help !!! 03:58:22 text.regex uses yoru system regexp library, I thought 03:58:37 yitz pasted "Proof that c c4 == c c4 c c c c" at http://hpaste.org/3172 03:58:51 kaol: I don't think \d is regexp 03:59:00 kaol: I think that's a perl-only thing? 04:00:05 looks like so... Hmpf. 04:00:35 * kaol considers using FFI to call perl 04:00:57 ! 04:01:13 I have two alternatives to suggest 04:01:30 a. use the regexp notation for that, which is [[:digit:]] 04:01:37 --- join: twanvl (n=twanvl@ip5451f037.direct-adsl.nl) joined #haskell 04:01:51 b. observer that regexps are extraordinarily ugly and use some nicer looking parser combinators 04:02:07 c. let d = [0-9] 04:02:09 or regexp combinators 04:02:19 they aren't quite as ugly 04:03:03 SamB_XP: I've never understood the point, though. why not just use parser combinators? 04:03:13 --- join: fritschy (n=x06180@X715f.x.pppool.de) joined #haskell 04:03:18 The point of regexp is they are a convenient language for expressing matching 04:03:23 I have bunch of stuff in the DB and some of the items have a regexp attached to them. 04:03:36 btu as technoloogy has evolved they no longer seem so attractice 04:03:40 ah 04:03:42 in perl format? 04:03:45 yes 04:04:04 well that does explain it 04:04:08 though I don't think that there's anything in there that I couldn't express as POSIX regexpes too 04:04:10 have you considered Text.Regex.PCRE 04:04:12 quicksilver: they aren't so bad when you are making a two-level parser... 04:04:26 also Yi uses them for key bindings 04:04:28 doesn't it? 04:04:58 SamB_XP: no, they're not that bad. ~But I don't think they're that good, either :) I just don't know why any new system would choose to use them. 04:05:17 quicksilver: I certainly don't like a lot of the things regexps are used for 04:05:18 yitz: ah, i found one, too. interesting, interesting. i don't know anything about it, but digging under "Combinatory Logic" should reveal interesting things 04:05:42 --- quit: gkr (Read error: 113 (No route to host)) 04:06:31 yup, looks like the most exotic thing I've used was \d. Easy enough to replace with [0-9] 04:06:36 yitz: http://en.wikipedia.org/wiki/Combinatory_logic#Combinators_B.2C_C 04:06:47 apparently, c is the B combinator 04:07:14 unfortunately, I've got to run off for lunch 04:07:15 see you 04:07:35 is it better to install haddock, pfesetup, alex, c2hs, cpphs, greencard before installing happy to compile and install ghc-head ??? 04:08:09 I don't think happy requires haddock, cpphs, or greencard 04:08:09 malcolmw: You have 1 new message. '/msg lambdabot @messages' to read it. 04:08:45 ok malcolmw thanks 04:08:48 geocalc: maybe Cabal's generic warnings are confusing 04:09:12 hahhh 04:12:37 --- nick: Eelis- -> Eelis 04:13:25 --- quit: progexp101 (Read error: 104 (Connection reset by peer)) 04:13:54 --- join: MyCatSchemes (n=rb6822@yilko.cs.bris.ac.uk) joined #haskell 04:14:43 hm. Has anyone bootstrapped GHC for FreeBSD7/amd64 yet? 04:15:03 --- quit: apfelmus () 04:17:34 apfelmus: yes, and flip is C. 04:17:46 profmakx-> by looking at ghc state page seems no 04:18:04 well 04:18:10 then i will do that tonight i think 04:18:23 cool 04:24:07 hmm, shouldn't http://darcs.haskell.org/generics/comparison/ have a _darcs directory? 04:24:08 Title: Index of /generics/comparison 04:24:14 --- join: tarrybone (n=dlc@c-71-60-148-169.hsd1.pa.comcast.net) joined #haskell 04:24:22 oh, it's parent has one... 04:25:04 --- join: nominolo (n=nominolo@dhcp-249-5.nomad.chalmers.se) joined #haskell 04:28:17 --- join: progexp101 (i=progexp@gateway/tor/x-10473f2eaa167ca9) joined #haskell 04:31:39 smash your boilerplate is interesting... 04:31:47 --- quit: mlesniak ("ChatZilla 0.9.78.1 [Firefox 2.0.0.7/2007091417]") 04:34:42 --- quit: tarrybon1 (Read error: 110 (Connection timed out)) 04:35:05 --- quit: fritschy ("Leaving.") 04:35:38 --- nick: sioraiocht -> sior|away 04:36:11 --- quit: zx]treads (Remote closed the connection) 04:40:34 --- quit: NichardRixon (Read error: 110 (Connection timed out)) 04:42:28 --- quit: gabkdlly (Read error: 110 (Connection timed out)) 04:42:31 --- join: dogmaT (n=dogmat@r2aj154.net.upc.cz) joined #haskell 04:43:11 --- join: gabkdlly (n=gabriel@dslb-088-073-040-137.pools.arcor-ip.net) joined #haskell 04:43:27 ac: ping, you were having issues with gtk2hs timeouts? what was the problem exactly? 04:43:59 dcoutts_: I think he was struggling to get IORefs working so the timeout could share state 04:44:06 dcoutts_: I believe he got it working in the end 04:44:12 ah ok, good 04:44:21 although I suggested IORefs were overkill and just capturin the state in the closure is easier and more functional :) 04:44:37 --- nick: merus -> meryrus 04:44:55 --- quit: dv^^ (Remote closed the connection) 04:46:20 --- join: dv^^ (i=dv@gateway/tor/x-be71e57c26117f0c) joined #haskell 04:46:36 I noticed somethign about refactoring in haskell, actually 04:46:47 if you make a pretty broad-ranging change to your code 04:46:56 (like changing the data representation of something) 04:47:06 if the old code works, and the new code typechecks, it generally works 04:47:44 this is in contrast to dynamic languages where after a big change you have to check *ever* piece of code which directly or indirectly depends on what you changed... or there may be bugs lurking in rarely used code-paths 04:47:46 --- quit: swiert ("bbl") 04:49:09 quicksilver: I noticed that too, and it gave me a warm fuzzy feeling ;) 04:50:04 ooh, scratch your boilerplate is really neet... 04:50:05 i noticed quite a few positive things about refactoring and changing haskell code 04:51:04 --- quit: yitz () 04:51:23 of course, it's not a rigorous theorem. Clearly you can choose to use wooly dynamic data structures and get wooly dynamic problems :) 04:51:30 but it's an observation about code in practice 04:52:16 --- join: bringert (n=bringert@3-1-5-7a.gva.gbg.bostream.se) joined #haskell 04:52:34 --- join: CindyLinz (i=b91101@bsd7.csie.ntu.edu.tw) joined #haskell 04:53:51 quicksilver: but hopefully you don't use any given one very often in a program 04:54:02 --- quit: bringert (Client Quit) 04:54:13 JHC uses a few dynamic things 04:54:33 I think changing one would still cause the code using it to not typecheck, though 04:54:46 SamB: sometimes I wish for a nice automatic derivation thingy to make wooly structures from wool-free structures 04:55:06 SamB: e.g. given data Foo a = Bar a (Foo a) | Baz (Foo a) (Foo a) 04:55:12 quicksilver: if you could have wool-free ones, why would you need them woolified 04:55:20 --- quit: blarz (Remote closed the connection) 04:55:31 --- join: blarz (n=simon@blarzwurst.de) joined #haskell 04:55:38 or rather if you had already written it that way 04:55:52 wouldn't wool-free be the way you'd want it to stay? 04:55:57 SamB: for generic programming type stuff 04:56:01 oh. 04:56:01 traversing the tree generically 04:56:07 a type for 'current branch' 04:56:15 a type for 'other gunk attached to this branch' 04:56:32 autmatic construction of zipper from data 04:56:34 that sort of thing 04:56:46 It would be sledgehammer to crack nut type stuff, a lot of the time 04:56:47 and very ugly 04:56:53 so it's not a serious proposal :) 04:56:54 --- quit: mr_tenor (Remote closed the connection) 04:57:06 seen Uniplate? 04:57:09 yes 04:57:16 helps somewhat :) 04:57:22 a case in point, actually 04:57:32 suppose you have a structure Foo, and a zipper FooZipper 04:57:37 and you write pretty-printers for both 04:57:48 the pretty-printer for FooZipper does the "same thing" at each actual node 04:57:58 but it passes continuations back up the tree 04:58:09 whereas the pretty-printer for Foo works 'forwards/downwards' like always 04:58:25 so you have a backwards/CPS version, and a forwards/recdescent version 04:58:31 but they do teh same thing at each actual node 04:58:35 and you can't share the code :( 04:58:37 annoying 04:58:47 you sure? 04:58:51 no 04:58:57 I'll hpaste some code if you like 04:59:01 and you can tell me I'm being stupid :) 04:59:14 --- join: zx]treads (n=student@195.251.214.51) joined #haskell 04:59:15 I thought it would be possible to use combinators for traversal which have a different strategy 04:59:34 and you plug in the same action for each node, independent of strategy 05:00:30 quicksilver pasted "zipper pretty print: boilerplate?" at http://hpaste.org/3174 05:00:34 there you are 05:00:47 displayPt for the object itself, displayContext for the zipper 05:00:53 very similar code btu I couldn't see how to unify 05:01:50 --- quit: cbe (Remote closed the connection) 05:01:52 --- join: balodja1 (n=noname@62.117.85.97) joined #haskell 05:02:27 hmm, the types are not isomorphic though, are they? 05:02:35 --- quit: balodja (Read error: 113 (No route to host)) 05:03:10 well zippers aren't normall isomorphic to the object they zip 05:03:12 that's rather the point 05:03:18 --- nick: idnar_ -> idnar 05:03:27 the zipper doesn't have any constructor for the 'Leaf' nodes (Gradient and Noise) 05:03:33 because you can never been 'in' a 'Leaf' 05:03:48 and the zippper has two constructors for binary nodes like Blend 05:03:52 and, of course, the zipper has a Top 05:03:56 --- join: Tychom (n=tychom@m146.net81-64-90.noos.fr) joined #haskell 05:04:25 --- quit: MyCatSchemes ("Swim, swim, hungry!") 05:04:34 --- join: sad0ur_ (n=sad0ur@rb1a240.net.upc.cz) joined #haskell 05:04:46 well, I'm not sure there is much boilerplate in your example really 05:05:08 well the drawStrs and the indents 05:05:09 I mean, the drawStr stuff is different for every constructor 05:05:25 yes, but it's the same for corresponding constructors in type and zipper 05:05:48 the indents look like you could do something 05:06:32 "corresponding constructors" - but how do we know they are corresponding? only by the name I guess 05:07:04 well the correspondance is formalised by the definitions of 'up' and 'down' 05:07:07 (not shown) 05:07:26 e.g: ptc_down' (PTC c (Scale s pt)) = Just$PTC (PTCScale s c) pt 05:07:39 but yes, that is the nub of it 05:07:46 even with the indents, I'm not sure you could generate them automatically, because the pattern is non-regular (cf. PTCBlendRight) 05:07:52 makes me want a third type 05:07:56 'FTNode' 05:08:05 which can then be used in both plain and zipper versions 05:08:54 such that PTCScale s c' becomes (PTC (NodeScale s) c'), while Scale s text becomes PT (NodeScale s) tex 05:08:55 --- quit: gbeshers ("Leaving") 05:09:06 but that doesn't quite work because the arities aren't always the same 05:09:12 and it makes my basic ADT less natural... 05:09:26 hence, my comments about wooly and non-wooly and automatic type generation 05:09:49 type families perhaps? 05:09:58 I wondered that 05:10:07 --- join: Rebooted (n=opera@88-104-185-170.dynamic.dsl.as9105.com) joined #haskell 05:10:08 but I haven't explored them yet 05:10:32 I mean, you could have a totally generic syntax tree type, parameterised by node types 05:10:38 --- quit: Tychom () 05:11:37 --- join: andyjgill (n=andyjgil@c-76-105-238-134.hsd1.or.comcast.net) joined #haskell 05:11:42 data SyntaxTree n = Nullary n | Unary n (SyntaxTree n) | Binary n (SyntaxTree n) (SyntaxTree n) | .... 05:11:55 and then you could have a single generic zipper corresponding to that 05:11:56 --- quit: zx]treads (Read error: 104 (Connection reset by peer)) 05:12:03 and parameterise the whole lot by a node type 05:12:22 ... but, that isn't type safe, because it doesn't force you to only use binary nodes in a binary way 05:12:32 I think you could solve *that* using GADTs 05:13:13 --- part: blueriver left #haskell 05:13:31 --- join: dfeuer_ (n=David@pool-71-163-172-151.washdc.fios.verizon.net) joined #haskell 05:13:59 but whatever you do, it's a whole lot less convenient than your original ADT. 05:14:23 --- quit: dogmaT (Read error: 113 (No route to host)) 05:16:26 --- join: bringert (n=bringert@3-1-5-7a.gva.gbg.bostream.se) joined #haskell 05:17:22 --- quit: nominolo (Read error: 110 (Connection timed out)) 05:17:36 --- quit: bringert (Client Quit) 05:19:37 --- join: Thas (n=robertm@75-172-19-225.tukw.qwest.net) joined #haskell 05:21:57 --- quit: Arnia (Connection timed out) 05:25:03 --- join: boegel (n=boegel@konijn.elis.UGent.be) joined #haskell 05:30:34 --- join: iblechbot (n=iblechbo@ppp-62-216-197-248.dynamic.mnet-online.de) joined #haskell 05:31:10 --- part: Rebooted left #haskell 05:31:18 --- join: matt__r (n=matt__r@CPE-121-209-185-196.nsw.bigpond.net.au) joined #haskell 05:31:19 --- join: Arnia (n=jgeldart@client-82-3-80-61.manc.adsl.virgin.net) joined #haskell 05:32:07 I have a simple cabal script (distribution.Simple) set up and it *seems* to rebuild everything every time 05:34:46 and you're just doing "runhaskell Setup.hs build" between builds? 05:34:51 --- quit: augustss () 05:35:06 yep 05:35:16 I am just getting some empirial evidence now 05:35:32 --- join: fasta (n=fasta@zonnebloem.demon.nl) joined #haskell 05:35:54 time for first build is 26 secs; touch one source file and build again - 27sec. 05:36:30 touch nothing and build takes 24 secs 05:36:31 do you have -fforce-recomp in any file or options anywhere? 05:36:39 give or take a second or two 05:36:46 Why doesn't this work? :t \a -> fst $ runST a By that I mean: is it just an implementation problem or is it a more serious problem? 05:37:04 matthew-_: nope 05:37:31 matt__r: is the filesystem mounted with noatime or anything odd like that? 05:38:02 I can't imagine, this is (fairly) vanilla osx and the files are on my boot disk 05:38:35 :q 05:38:37 matt__r: maybe everything depends on the file you touched? 05:38:39 oops 05:39:03 --- join: augustss (n=Lennart@63.175.43.10) joined #haskell 05:39:05 but what about the untouched one, with no changes between builds, I still get 20+ seconds 05:39:11 matt__r: and you don't use the module system. 05:39:19 (quite unlikely) 05:39:19 you bet I do 05:39:30 matt__r: ok, then file a bug :) 05:39:35 how could you not? 05:40:00 cool 05:40:18 matt__r: how much code are we talking about here? 05:40:32 dumping a few thousand lines of code in a bug report is not a good idea 05:40:46 not huge amounts - ummm, I would guess around 1500 lines ???? 05:41:03 matt__r: you should try to simplify the problem. 05:41:15 and which versions of everything? 05:41:18 A universal simplifier would be so nice :) 05:41:21 you mean before I file the bug? 05:41:24 yep 05:41:51 cabal tells you what the first file is that it's trying to compile 05:41:55 --- join: MyCatSchemes (n=rb6822@yilko.cs.bris.ac.uk) joined #haskell 05:42:00 does that give you any clues? 05:42:08 matt__r pasted "versions of everything" at http://hpaste.org/3175 05:42:37 it just compiles everything everytime 05:42:56 matt__r: when you do what? 05:43:02 regardless of dependencies or even if any of the files changed 05:43:23 ?? 05:43:42 matt__r: you must give the machine some command before compilation begins. 05:43:46 matt__r: what is that command? 05:43:46 do you have another machine you can test on? - will the code compile on a linux or windows box, for example? 05:44:12 runhaskell ./Setup.hs build 05:45:02 matt__r: I have no idea, simplify(test on another platform) and file a bug. 05:45:16 hmmm. does it still do it if you do a clean and configure 05:45:20 --- join: glen_quagmire (n=glen_qua@pool-71-247-255-87.nycmny.east.verizon.net) joined #haskell 05:45:27 Well, I will make a little project that stil exhibits the behaviour and post it up on my public repo and then test it on a few machines tomorrow when I am back at work. 05:45:29 I'm just wondering whether the config files have got confused 05:45:34 thanks for the suggestions 05:45:45 I have tried clean and reconfigure 05:46:05 try another platform if you can to see if it's something odd with your local install 05:46:16 but I'm outta ideas too on that one 05:47:12 --- join: nominolo (n=nominolo@dhcp-248-121.nomad.chalmers.se) joined #haskell 05:47:15 or just install linux on your mac, replacing OSX. Then try again. 05:47:17 * matthew_- ducks 05:48:07 > 2**(-1) - 2**(-55) -- how come when exponent is different by 54, the smaller number becomes 0.0 ? 05:48:09 0.5 05:48:38 @go what every computer scientist should know about floating point 05:48:40 http://docs.sun.com/source/806-3568/ncg_goldberg.html 05:48:40 Title: What Every Computer Scientist Should Know About Floating-Point Arithmetic 05:48:40 explains 05:49:24 > 2^^(-1) - 2^^(-55) 05:49:25 0.5 05:49:32 > 2^^(-1) - 2^^(-55)::Rational 05:49:33 18014398509481983%36028797018963968 05:49:59 > 2**(-1) - 2**(-30) 05:50:00 0.4999999990686774 05:50:04 > 2**(-1) - 2**(-30)::Float 05:50:05 0.5 05:50:20 for Float it's different by 25 05:50:28 fasta: did anyone answer your $ runST question? 05:50:32 quicksilver: no 05:50:46 --- join: swiert (n=wss@sneezy.cs.nott.ac.uk) joined #haskell 05:50:46 > 2**(-124) - 2**(-149) :: Float 05:50:48 4.7019774e-38 05:50:48 --- join: cmarcelo (n=cmarcelo@200.184.118.132) joined #haskell 05:50:50 fasta: it's because $ is polymorhic 05:50:57 > 2**(-124) :: Float 05:50:58 4.7019774e-38 05:50:59 fasta: but polymorphism is only over rank-1 types 05:51:15 fasta: so a polymorphic function can't be instantiated at a rank-2 type like runST 05:51:15 even for denormalized numbers, it's number of fraction bits + 2 05:51:23 quicksilver: that doesn't answer the question, does it? 05:51:26 > floatDigits 0 05:51:27 53 05:51:30 fasta: I'm getting there :) 05:51:36 > floatDigits (0::Float) 05:51:37 24 05:51:40 quicksilver: (since that part I already knew) 05:51:42 fasta: the reason for this restriction is to make type inference work 05:51:51 Float has 23 bits for fraction . So, exponents should be different by 24 or more. For Double, 52 + 2 = 54 05:51:57 I can't find why +2 is needed 05:51:59 --- quit: iblechbot (Read error: 110 (Connection timed out)) 05:52:10 s/24/25 05:52:16 glen_quagmire: It will always be one more than the numbe returned by floatDigits 05:52:24 fasta: the augmented H-M algorithm used for type inference makes certain assumptions which wouldbe violated by instantiating polymorphics at rank-2 types. 05:52:29 at least assuming isIEEE is true 05:52:35 > isIEEE 0 05:52:36 True 05:52:42 > isIEEE (0::Float) 05:52:43 True 05:52:51 fasta: certainly people have discussed whether or not you can improve on this situation, but GHC can't 05:53:09 quicksilver: well, I am interested in the outcome of the discussion :) 05:53:34 quicksilver: or did they just talk and it was just that nothing came of it? ;) 05:53:34 --- quit: MyCatSchemes ("Swim, swim, hungry!") 05:54:16 --- join: pastorn-rr (n=rustmeis@dhcp-243-8.nomad.chalmers.se) joined #haskell 05:54:16 --- quit: pastorn-rr (Client Quit) 05:54:23 --- join: pastorn-rr (n=rustmeis@dhcp-243-8.nomad.chalmers.se) joined #haskell 05:54:29 --- quit: dfeuer_ (No route to host) 05:54:29 In the case I shown it doesn't look like an incomputable function. 05:54:36 +have 05:55:23 http://www.haskell.org/pipermail/haskell-cafe/2007-January/021047.html 05:55:23 --- join: Tychom (n=tychom@m146.net81-64-90.noos.fr) joined #haskell 05:55:25 Title: [Haskell-cafe] Composing functions with runST, http://tinyurl.com/ytrq68 05:55:41 fasta: that post might be helpful (or possibly some of the rest of the thread) 05:55:50 certainly conor's post, which it quotes 05:55:56 roconnor: oh It kinda makes sense. floatDigits (0::Float) is 24. When exponent is different by 25, there will be 24 leading 0's when exponents are matched up for arithmetic 05:56:17 quicksilver: I think I saw that post, but I will read it again. Thanks 05:56:20 --- join: yitz (n=abba@line236.adsl.actcom.co.il) joined #haskell 05:56:25 --- join: dogmaT (n=dogmat@r2aj154.net.upc.cz) joined #haskell 05:56:57 glen_quagmire: I think it is more of a matter that the result gets truncated to 24 digits 05:57:09 --- join: audreyt_ (n=audrey@220-130-166-8.HINET-IP.hinet.net) joined #haskell 05:57:12 --- join: Arnia_ (n=jgeldart@client-82-27-247-58.glfd.adsl.virgin.net) joined #haskell 05:57:15 --- quit: ari (Read error: 110 (Connection timed out)) 05:57:34 --- quit: int-e ("leaving") 05:57:55 * roconnor tries to remember what the IEEE says about subtraction 05:58:39 roconnor: a - b will calculate a number almost, but not entirely, unlike the difference between a and b 05:59:20 * EvilTerran refers to the link he @go'd earlier 06:01:13 --- quit: Arnia (Connection timed out) 06:02:06 :D 06:03:02 --- quit: njbartlett () 06:03:57 --- quit: atsampson (Remote closed the connection) 06:04:08 --- join: atsampson (n=ats@7hw.poik.net) joined #haskell 06:04:50 --- join: kpreid (n=kpreid@cpe-24-59-154-165.twcny.res.rr.com) joined #haskell 06:05:00 --- quit: arossato (Remote closed the connection) 06:05:38 --- join: arossato (n=arossato@host193-174-dynamic.14-87-r.retail.telecomitalia.it) joined #haskell 06:07:23 quicksilver, what does that mean? 06:09:07 Taejo, it means it might not be very accurate when numbers of widely different magnatudes are involved, and that quicksilver has read HHGG 06:09:47 ;) 06:09:47 ah, yes, I thought I recognised some HHGG there, but I still can't remember the reference 06:10:07 the drinks machine on the heart of gold produced something almost, but not entirely, unlike tea, iirc 06:10:19 indeed 06:11:50 --- join: agoode (n=agoode@2001:4830:1633:0:212:3fff:fe70:6222) joined #haskell 06:12:35 --- nick: tizoc_ -> tizoc 06:12:54 --- quit: ski (Remote closed the connection) 06:13:36 --- quit: haraldk (Remote closed the connection) 06:14:33 --- quit: audreyt (Read error: 110 (Connection timed out)) 06:14:40 --- join: pizza_ (n=pizza@66.152.246.202) joined #haskell 06:18:12 --- quit: pizza_ (Client Quit) 06:18:38 --- join: ski (n=slj@c-bd10e055.1149-1-64736c10.cust.bredbandsbolaget.se) joined #haskell 06:20:40 --- join: mikael (n=mikael@dhcp-249-75.nomad.chalmers.se) joined #haskell 06:20:45 --- join: Nshag (i=user@Mix-Orleans-106-3-229.w193-248.abo.wanadoo.fr) joined #haskell 06:21:04 The module system was inconvenient so I just dumped everything in one file. (there must be a refactoring for that, and also for the inverse operation) 06:22:12 --- join: pizza_ (n=pizza@poipu/supporter/pizza-milkshake) joined #haskell 06:22:23 fasta: I was wanting that earlier today, for an optimisation experiment 06:22:50 fasta: in module optimisation can be more aggressive than cross-module, and I was curious if it would make a different for my program. But not curious enough to try it and see :) 06:23:03 quicksilver: oh, I wanted it to debug something 06:23:11 quicksilver: I need lots of imports otherwise. 06:23:13 --- join: mattrepl (n=mattrepl@pool-71-246-224-160.washdc.fios.verizon.net) joined #haskell 06:23:20 --- quit: gabkdlly (Read error: 110 (Connection timed out)) 06:23:41 quicksilver: a module with 3800 lines of code result :P 06:23:45 results* 06:23:56 (well, that's not everything (of course)) 06:24:06 Just everything that's relevant. 06:24:16 --- join: gabkdlly (n=gabriel@dslb-088-073-040-137.pools.arcor-ip.net) joined #haskell 06:24:19 --- quit: mikael (Client Quit) 06:24:41 --- quit: boegel ("This computer has gone to sleep") 06:25:38 quicksilver: that shows that tool support is important 06:26:19 I fixed my bug, though. :) 06:26:27 --- quit: Arnia_ (Read error: 110 (Connection timed out)) 06:26:51 I handled a situation twice (on two data structure levels) 06:27:12 Thereby producing the complete opposite effect. 06:27:26 Which of course only occurs for more complicated cases... 06:30:10 --- join: _ry (n=ry@cable-81-173-134-106.netcologne.de) joined #haskell 06:30:10 --- join: mikael (n=mikael@dhcp-249-75.nomad.chalmers.se) joined #haskell 06:33:50 --- join: Arnia (n=jgeldart@client-82-27-251-253.glfd.adsl.virgin.net) joined #haskell 06:33:58 fasta, I think it's fairly well known that good tools are important. (Hence GHC HQ putting in the debugger, for example). 06:34:29 some good refactoring tools would be lovely 06:34:36 pejo: sure, but the debugger is not ready. 06:34:41 I keep meaning to look at hare and see how far they got, and whether the code is dead 06:36:17 I find myself doing stuff like return . foo >>= return . bar >>= return . baz. It seems to me that having a monad in a chain like that is just useless baggage. Is there some simpler idiom for this that I've missed? 06:36:49 --- join: boegel (n=boegel@konijn.elis.UGent.be) joined #haskell 06:36:51 --- quit: pastorn-rr ("Leaving") 06:37:00 --- join: LPhas (n=Phas@81-208-106-68.ip.fastwebnet.it) joined #haskell 06:37:05 kaol: ordinary function composition? 06:37:06 baz . bar . foo ? 06:37:07 liftM (baz.bar.foo)? 06:37:11 kaol: you don't have to use a monad 06:37:17 http://www.flickr.com/photos/carlzimmer/1414689773/in/set-72157601351535771/ 06:37:20 Title: The Y Combinator.jpg on Flickr - Photo Sharing!, http://tinyurl.com/22xofm 06:37:29 once a Float becomes Infinity, i can't subtract enough number to make it normal again? 06:37:40 > (5e35 * 5e35) / 5e35:: Float 06:37:42 680.56476 06:37:47 matthew_-: isn't that a fake? 06:37:58 matthew_-: it looks like someone creative with PS. 06:38:00 weird, on my machine, that's Infinity 06:38:04 glen_quagmire: no, you can't. You can think of Infinity as a kind of error value giving information about divergence. 06:38:07 matthew_-: and it's old 06:38:07 it's that simple? perhaps I just haven't thought this out. 06:38:15 Cale: ah thank you 06:38:20 --- join: cognominal_ (n=cognomin@cac94-1-82-67-232-89.fbx.proxad.net) joined #haskell 06:38:55 glen_quagmire: subtracting it from itself will give NaN 06:39:09 and NaN doesn't turn into anything else. 06:39:27 > reverse "NaN" 06:39:28 "NaN" 06:39:32 damn it, cale's right! 06:39:33 magic 06:40:02 @pl (flip (.)) 06:40:02 flip (.) 06:40:14 --- quit: seafoodX () 06:40:27 * quicksilver peers at kaol 06:40:36 kaol: it didn't have any points in :P 06:40:45 > let a = 5e35 :: Float in (a * a) / a 06:40:46 680.56476 06:40:51 --- quit: cognominal_ (Client Quit) 06:40:58 > let a = 5e35 :: Float in (a * a) 06:40:58 You could define a "reverse ." operator 06:40:59 Infinity 06:41:09 that's very peculiar 06:41:21 maybe lambdabot optimizes stuff 06:41:29 probably lambdabot is useing -fexcess-precision 06:41:30 --- join: cognominal_ (n=cognomin@cac94-1-82-67-232-89.fbx.proxad.net) joined #haskell 06:42:27 there is not such option quicksilver 06:42:34 what do you mean? 06:42:35 @g -fexcess-precision 06:42:35 Maybe you meant: gazetteer get-shapr ghc girl19 google gsite gwiki . v 06:42:38 of course there is 06:42:42 it's a ghc option 06:42:46 and lambdabot uses ghc :P 06:42:59 i mean, google doesn't return that 06:43:06 * glen_quagmire searches on haskell.org 06:43:07 it allows it to store intermediate values of calculations in registers 06:43:24 and since registers have more precision, you may get slightly different answers 06:43:31 that is, excess precision :) 06:43:39 --- join: der_eq (n=eq@dslb-088-070-118-189.pools.arcor-ip.net) joined #haskell 06:43:49 hmm, no google hits, for that flag 06:43:51 that's pretty interesting 06:43:55 quicksilver: does that also work for ints or only floating point? 06:43:57 oh. google interprets - in -fexcess-precision in its own way 06:43:57 oh 06:43:58 --- quit: augustss () 06:44:00 you need to quote it 06:44:07 @g fexcess-precision 06:44:07 Maybe you meant: gazetteer get-shapr ghc girl19 google gsite gwiki . v 06:44:08 glen_quagmire: you should perhaps google for fexcess-precision, - in the front of a search term causes the pages not containing that word to be searched 06:44:10 * idnar smacks forehead 06:44:18 I have 468 hits for it :) 06:44:35 glen_quagmire: oh, you noticed already :-) 06:45:01 --- quit: raxas ("leaving") 06:45:26 hrm with -fexcess-precision, I still get Infinity for (5e35 * 5e35) / 5e35 :: Float 06:45:44 odd. try with -O2 as well? 06:46:28 still Infinity. I 'm trying it in ghci -fexcess-precision -O2 06:46:56 you might have to compile it 06:47:07 I shouldn't think -fexcess-precision makes any different to interpreted coe 06:47:08 code 06:47:19 --- quit: agoode (No route to host) 06:47:20 but isn't lambabot interpreter? 06:47:32 not exactly, iirc 06:47:34 I'm not sure if -O2 makes any different 06:47:42 (to interepreted code) 06:47:45 it's hsPlugins, whatever that does 06:47:52 glen_quagmire: well obviously lambdabot is an interpreter 06:47:55 > 3+4 06:47:56 7 06:48:01 since it interprets :) 06:48:07 however, it does so by compiling 06:48:16 It is an interpreter which works by using ghc to compile code 06:48:43 unlike ghci which is an interpreter which does not compile to native code, but compiles to a kind of VM/bytecode 06:48:53 --- quit: sad0ur_ ("leaving") 06:49:27 --- quit: bgola` (Read error: 110 (Connection timed out)) 06:51:13 this is weird 06:51:26 when I compile with -O2 only, I get 680.56476, same as lambdabot 06:51:44 --- quit: andyjgill () 06:51:44 when I compile with -O2 with -fexcess-precision, I get 5e35 06:51:49 interesting 06:52:09 I suspect you've found a bug in the interpreter then 06:52:28 I think that 680.56476 is the "correct" answer for IEEE 32-bit floats 06:52:28 No i actually compiled to native binary 06:52:52 and the interpreter giving 'Infinity' is in fact a bug in the way that the ghci interpreter implements Float 06:52:56 however, that is only a guess 06:53:12 I'm no expert on floating-point edge cases 06:53:31 --make -fexcess-precision -O for the win 06:54:41 do you get different behaviour with -fvia-C and -fasm ? 06:55:13 --- join: njbartlett (n=njbartle@cpc2-barn4-0-0-cust110.brnt.cable.ntl.com) joined #haskell 06:55:23 --- join: cmarcelo_ (n=cmarcelo@200.184.118.132) joined #haskell 06:55:37 glen_quagmire: if you can be bothered, it would be interesting to try the C program "a = 5e35; b = (a*a)/a;" 06:55:40 with 'float a' 06:55:44 (well and gloat b) 06:55:54 matthew_-: --make -fvia-C -fasm returns Infinity for (5e35 * 5e35) / 5e35 06:56:07 glen_quagmire: no, one or the other. 06:56:24 "--make -fvia-C" vs "--make -fasm" 06:56:29 maybe it's optimizing that to 5e35? 06:56:57 --- quit: thepointer_ ("Leaving") 06:56:59 --- join: thepointer (n=thepoint@218.185.80.187) joined #haskell 06:57:36 matthew_-: both version returns 5e35. I think -fexcess-precision with -O will figure out 5e35 can be cancelled out on (5e35 * 5e35) / 5e35 06:58:38 from #geordi, geordi: {float a = 5e35; cout<<(a*a)/a; } returns 5e35 06:58:58 I get 499999980845158122682707800104108032 with gcc 06:59:09 --- join: augustss (n=Lennart@63.175.43.10) joined #haskell 06:59:31 > (1.7976931348623158e308, 1.7976931348623159e308) 06:59:34 (1.7976931348623157e308,Infinity) 06:59:41 Same as on my machine. 06:59:42 which I guess is pretty close to 5e35 06:59:55 --- quit: cmarcelo (Nick collision from services.) 06:59:58 --- nick: cmarcelo_ -> cmarcelo 07:00:13 but (5e35 * 5e35) / 5e35 :: Float is Infinity on my machine 07:00:21 it works correctly in lua 07:00:27 (you get back 5e35) 07:00:49 --- join: Pupeno- (n=Pupeno@dsl-37-170.dsl.netsource.ie) joined #haskell 07:01:04 --- join: andyjgill (n=andyjgil@c-76-105-238-134.hsd1.or.comcast.net) joined #haskell 07:01:30 --- join: Arnia_ (n=jgeldart@client-86-27-69-231.winn.adsl.virgin.net) joined #haskell 07:02:21 --- quit: Pupeno (Read error: 104 (Connection reset by peer)) 07:03:30 --- quit: Arnia (Read error: 110 (Connection timed out)) 07:03:48 Forget the divide: 5e35*5e35 is Infinity in ghci 07:04:12 it works in perl aswell 07:04:24 > Infinity / 0 07:04:25 Not in scope: data constructor `Infinity' 07:04:33 > Inf / 0 07:04:33 Not in scope: data constructor `Inf' 07:04:35 It should be 2.5e70, well within the limit of 1e308. Looks like a bug. 07:05:37 Wait a second - you are saying ::Float, I was looking at Double, duh 07:06:11 matthew_-: that's not really "correct" 07:06:23 matthew_-: it's supposed to give junk, since it overflows the range of Float 07:06:27 matthew_-: that's ratehr the point :) 07:06:37 matthew_-: the only question is what kind of junk you expect 07:06:45 quicksilver: meh, potato, potato ;) 07:06:51 lua + perl almost surely use double behind the scenes 07:06:55 > 5e35*5e35::Float 07:06:56 so are useless for this test 07:06:56 Infinity 07:07:02 --- quit: Lemmih ("leaving") 07:07:02 --- join: iblechbot (n=iblechbo@ppp-62-216-197-42.dynamic.mnet-online.de) joined #haskell 07:07:05 --- join: byorgey (n=byorgey@cscwlan.csc.com) joined #haskell 07:07:06 quicksilver: indeed. 07:07:14 --- quit: dblhelix ("homeward bound") 07:07:14 > (5e35*5e35)/5e35::Float 07:07:16 680.56476 07:07:24 how can I get largest Float? 07:07:26 lol 07:07:31 maxBound 07:07:33 > maxBound :: Float 07:07:34 add an instance declaration for (Bounded Float) 07:07:34 In the expression: maxB... 07:07:38 nope! 07:07:38 > 1/ 0 07:07:39 Infinity 07:07:40 oopsy! 07:07:41 there you go 07:07:43 maximum float :) 07:07:55 @let binSearch p a b|c<=a||c>=b=a|p c==LT=binSearch p c b|otherwise=binSearch p a c where{c=(a+b)/2} 07:07:58 > pred ((1/0)::Float) 07:08:02 Infinity 07:08:03 Defined. 07:08:10 what 07:08:12 > succ 1.0 07:08:13 2.0 07:08:15 evil 07:08:21 highly 07:08:27 I mean, EVIL 07:08:39 or well 07:08:42 floats are numerable 07:08:47 but real numbers aren't 07:08:59 the enum instance for float and double is quite humorous 07:09:05 since it doesn't enumerate them at all 07:09:20 what should I pass to maxBound? Bounded are enums? 07:09:20 > binSearch (flip compare (1e100::Float).(*1e38)) 1 10 07:09:21 9.999999 07:09:23 its entire raison-d'etre is the [a..b] syntax, which is pretty daft 07:09:24 > [1.0..5.0] 07:09:26 [1.0,2.0,3.0,4.0,5.0] 07:09:29 ah 07:09:30 perhaps it's needed for the betweenum trick? 07:09:31 ah 07:09:33 that, too 07:09:45 > 9.999999e38 07:09:46 9.999999e38 07:09:49 yes, really that should be a different type-class 07:09:50 > let inf = ((1/0)::Float) in take 10 . iterate pred $ inf 07:09:51 [Infinity,Infinity,Infinity,Infinity,Infinity,Infinity,Infinity,Infinity,Inf... 07:09:53 'rangeable' or something 07:09:53 > 9.9999991e38 07:09:54 9.9999991e38 07:09:58 I want the largest valid Float, not Infinity 07:10:01 hmm 07:10:02 > binSearch (flip compare (1/0)) 1 10 07:10:03 9.999999999999998 07:10:06 quicksilver: yeah 07:10:10 but the haskell committee were opposed to proliferation of typeclasses 07:10:13 oh, wait 07:10:27 so we have to live with a broken Monad class and a broken Enum class 07:10:27 > 9.999999999999998e38 07:10:28 > (toEnum . fromEnum $ 42 :: Integer) :: Double 07:10:29 9.999999999999998e38 07:10:29 Couldn't match expected type `Double' 07:10:31 never mind, that's not helpful 07:10:33 we need more typeclasses 07:10:33 --- join: tizoc_ (n=user@r190-0-145-37.dialup.adsl.anteldata.net.uy) joined #haskell 07:10:40 > 9.9999999999999999e38 07:10:41 we need Bind and Return! ;) 07:10:42 1.0e39 07:10:45 as well as no Tuple class, or other obvious things 07:10:45 :t pred 07:10:47 forall a. (Enum a) => a -> a 07:10:54 > 9.999999e38::Float 07:10:56 Infinity 07:10:58 > take 4 [1.1 , 1.2 ..] 07:10:59 [1.1,1.2,1.2999999999999998,1.3999999999999997] 07:11:09 > 4e38::Float 07:11:10 Infinity 07:11:11 > 9.999998e38::Float 07:11:13 Infinity 07:11:15 > (2**(128) :: Float) 07:11:15 > 04e38::Float 07:11:17 > 0.4e38::Float 07:11:21 Infinity 07:11:21 Infinity 07:11:22 > 9.99999e38::Float 07:11:22 4.0e37 07:11:23 Infinity 07:11:34 yitz: stop asking the same thign 07:11:47 or at least, use a binary search 07:12:00 > (2^128 - 1 :: Float) 07:12:01 Infinity 07:12:24 > binSearch (flip compare (1e100::Float).(*1e38::Float)) 1 10 07:12:24 Parse error 07:12:34 > binSearch (flip compare (1e100::Float).((*1e38)::Float)) 1 10 07:12:34 The section `(* 1.0e38)' takes one argument, 07:12:35 but its type `Float' ha... 07:12:54 > binSearch (flip compare (1e100::Float).(*(1e38::Float)) 1 10 07:12:54 Unbalanced parenthesis 07:12:55 > 1e100 :: Float 07:12:56 Infinity 07:13:00 > 1e100 :: Double 07:13:01 1.0e100 07:13:10 > binSearch (flip compare (1e100::Float).(*(1e38::Float))) 1 10 07:13:11 9.999999 07:13:19 @hoogle Double -> Float 07:13:20 No matches, try a more general search 07:13:23 > binSearch (flip compare (1e100::Float).(*(1e38::Float))) 1 10 :: Float 07:13:24 9.999999 07:13:42 > 1e39::Float 07:13:43 Infinity 07:14:26 you can work it out from floatRange, can't you? 07:14:34 > floatRange (undefined :: Float) 07:14:35 (-125,128) 07:14:57 you can work it out from the spec for IEEE floating point numbers... 07:15:03 > binSearch (flip compare (1/0 :: Float) . realToFrac) 1 (1e100::Double) 07:15:04 --- quit: FZ ("ChatZilla 0.9.78.1 [Firefox 2.0.0.7/2007091417]") 07:15:05 9.999999999999998e99 07:15:58 > 6.8e38 07:15:59 matthew_-: well Float isn't guaranteed to be IEEE, let alone n-bit IEEE for any particular value of 'n' 07:15:59 6.8e38 07:16:01 ... 07:16:12 ?type flip compare (1/0 :: Float) . realToFrac 07:16:13 forall a. (Real a) => a -> Ordering 07:16:23 > 6.81e38 07:16:24 ?type flip compare (1/0 :: Float) 07:16:26 6.81e38 07:16:26 Float -> Ordering 07:16:35 > 6.9e38 07:16:37 6.9e38 07:16:38 hrm. 07:16:44 idnar: you're using Doubles. 07:16:54 idnar: this does not appear relevant to the current discussion :P 07:17:05 oh yeah 07:17:08 silly me 07:17:13 > 6.8e38 :: Float 07:17:14 Infinity 07:17:17 > 2 ^ 128 07:17:17 > 3.4e38 :: Float 07:17:19 340282366920938463463374607431768211456 07:17:19 3.4e38 07:17:23 --- join: ntgrl (i=bsmith@p3m/member/integral) joined #haskell 07:17:27 > 3.41e38 :: Float 07:17:29 Infinity 07:17:30 > (3.4028235e38::Float, 3.4028235e39::Float) 07:17:31 (3.4028235e38,Infinity) 07:17:32 I believe that's the right one 07:17:33 pm please 07:17:39 yeah, it's what I said 07:17:42 it's 2^128 07:17:54 where 128 is given by 'floatRange' 07:18:06 which would be the quicker way to work it out :P 07:18:10 --- quit: integral (Connection timed out) 07:18:12 > (3.4028235e38::Float, 3.4028236e38::Float) 07:18:13 (3.4028235e38,Infinity) 07:18:27 > compare (1/0) (1/0) 07:18:29 EQ 07:18:35 > (fromIntegral $ 2^128) :: Float 07:18:36 Infinity 07:18:37 > compare (1/0) (2/0) 07:18:38 EQ 07:19:03 Same as on my machine. Except the binSearch worked for me here, but not on the bot. Interesting. 07:20:05 --- join: djfroofy (n=drew@atl190.turner.com) joined #haskell 07:20:30 hm, I come in #haskell to escape from the messy, impure world, and everyone's playing with floating-point. Looks like it's going to be a long day. =P 07:20:34 can some explain what `(1:)' means in the context of this: fix ((1:) . scanl (+) 1) 07:20:49 oh, that's better =) 07:20:50 > (1:) [2,3,4,5] 07:20:52 [1,2,3,4,5] 07:21:06 @unpl (1:) 07:21:06 (\ a -> 1 : a) 07:21:20 it's a section of (:) 07:21:37 djfroofy: does that answer your question? 07:21:41 --- quit: tmoertel_away (Remote closed the connection) 07:21:56 --- join: MyCatSchemes (n=rb6822@sietil.cs.bris.ac.uk) joined #haskell 07:22:07 I'm more scared by the scanl (and the fix :-) 07:22:26 is that another scary fibonacci numbers? 07:22:29 byorgey: I got a wide array of answers, but my interpretation is its a function that takes a list and returns 1 consed with the list? 07:22:36 EvilTerran: of course =) 07:22:43 djfroofy: that's right. 07:23:05 @index fix 07:23:05 Control.Monad.Fix, Control.Monad.Reader, Control.Monad.Writer, Control.Monad.State, Control.Monad.RWS, Control.Monad.Identity, Control.Monad.Error 07:23:07 (foo ??) = (\bar -> foo ?? bar), regardless of what expression foo is, and what operator ?? is 07:23:16 (:) is an operator like any other in that respect 07:23:26 similarly, there's (?? foo) = (\bar -> bar ?? foo) 07:23:29 EvilTerran: this goes back to my rant yesterday about having to read a phd thesis to understand a function - fix in this case 07:23:43 fix *is* pretty hairy 07:23:59 operator sections, however, are pretty fundamental haskell 07:24:00 @src fix 07:24:00 fix f = let x = f x in x 07:24:06 --- join: ttt- (n=z@dD5E0CB46.access.telenet.be) joined #haskell 07:24:27 @type fix (1+) 07:24:29 forall t. (Num t) => t 07:24:34 EvilTerran: yes, the pretzel semantics scare me 07:24:44 > fix (+1) 07:24:45 Exception: <> 07:25:00 Olathe, are we back to discussing infinity again? ;) 07:25:16 --- quit: tizoc (Connection timed out) 07:25:30 --- quit: mornfall ("Lost terminal") 07:25:34 djfroofy: yah, definitely seperate your concerns into (1:) and fix 07:25:38 djfroofy: the thing is, you don't have to understand fix to understand Haskell, the language. It isn't part of the language proper. 07:25:41 --- join: mornfall (n=mornfall@rb4b151.net.upc.cz) joined #haskell 07:25:44 djfroofy: most people find fix a bit mysterious at first 07:25:46 * MyCatSchemes wonders how 'big' aleph-(aleph one) is? 07:25:49 but Haskell is general and powerful enough that you can easily define things such as fix. 07:25:53 djfroofy: however (1:) is not too unpleasant 07:26:01 > fix (1:) [] 07:26:02 Couldn't match expected type `[a] -> t' 07:26:13 Olathe: you don't need the []. 07:26:17 > fix (1:) 07:26:19 [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... 07:26:19 --- join: oerjan (n=oerjan@hagbart.nvg.ntnu.no) joined #haskell 07:26:23 O-o 07:26:49 > fix (\l -> head l : map (+1) tail l) 07:26:50 Couldn't match expected type `[a]' 07:26:53 MyCatSchemes, i was under the impression that alephs were only defined for natural number subscripts 07:26:55 fix (1:) says, "find a list which is invariant under the operation of adding a 1 to the front." 07:26:56 byorgey: agreed. though. i don't like running into a line of code and taking it for granted. My journey down the rabbit hole started here: http://haskell.org/haskellwiki/Implement_a_chat_server 07:26:57 Title: Implement a chat server - HaskellWiki 07:27:10 Obviously, the infinite list of all 1's fits that bill. 07:27:11 > take 20 $ fix ((1:) . scanl (+) 1) 07:27:12 djfroofy: then you can understand fix as "(1:) is all very well but we need a list to apply it to. What list shall we apply it to? I know, let's apply it to *itself*, recursively" 07:27:12 EvilTerran: yeah, and Euclid was under the impression parallel lines didn't meet. Fuck that. ;) 07:27:12 [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765] 07:27:15 > fix (\x -> (x + 1):x) 07:27:16 Occurs check: cannot construct the infinite type: a = [a] 07:27:16 Expected... 07:27:36 to be honest, fix really isn't all that useful in haskell, except for golfing, and occasionally for equational reasoning and whatnot 07:27:42 djfroofy: yup, I understand. "journey down the rabbit hole" is a very good way to describe it =) 07:27:47 > fix (\x -> ((head x) + 1):x) 07:27:48 Exception: <> 07:27:51 especially not fix without a 2-ary function as its first parameter 07:28:46 I guess the haskell irc channel is my new and improved hoogle ;) 07:29:03 @hoogle irc people 07:29:04 Did you mean: Irc People 07:29:04 Prelude.undefined :: a 07:29:04 Control.Monad.Reader.ask :: MonadReader r m => m r 07:29:15 > fix (\f x -> x + if x > 0 then f (x-1) else 0) 10 07:29:16 Olathe: that won't work since there's nothing for it to "get started" on 07:29:16 55 07:29:16 Heh. ask. 07:29:36 ... why did that come up with ask? 07:29:46 that's amusingly appropriate 07:29:50 hehe, nice 07:29:56 fix is useful if you want to use mdo (recursive do notation) - you don't use fix directly, but you need to define in order to give your Monad an instance of MonadFix so that you can use mdo. Of course, most common monads are predefined with the instance so we don't have to worry about fix too much. 07:30:06 @hoogle a b 07:30:07 Prelude.undefined :: a 07:30:07 Control.Monad.Reader.ask :: MonadReader r m => m r 07:30:07 Control.Monad.State.get :: MonadState s m => m s 07:30:20 --- join: sproingie (n=chuck@64-121-2-24.c3-0.sfrn-ubr8.sfrn.ca.cable.rcn.com) joined #haskell 07:30:41 weird 07:30:45 fix is also useful for expressing recursive functions in a form which can be extended and manipulated using various combinators. 07:31:02 byorgey, as i said, equational reasoning and whatnot 07:31:14 i call that "whatnot" ;) 07:31:16 EvilTerran: that's not equational reasoning. 07:31:19 EvilTerran: probably the first thing whose result matches the t1 t2 form 07:31:20 oh. 07:31:37 for example, writing a recursive function in a fix-able form allows you to easily add memoization. 07:31:56 sorry, i said "as i said" before i'd finished parsing your prior sentence 07:32:06 hence my attempted save 07:32:08 byorgey: but of course, that's orthogonal to the invention of 'fix' as a named thingy 07:32:22 byorgey: that's just "if you write your recursive functions like this, then you can' 07:32:42 byorgey: although, certainly, it does rather beg for you to give a name to the canonical knot-tyer 07:32:48 @go haskell mdo 07:32:48 maybe we should call fix 'boyscout' 07:32:49 http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html 07:32:49 Title: 7.3. Syntactic extensions 07:33:01 @go haskellwiki recursive do 07:33:03 http://www.haskell.org/haskellwiki/Recursion_in_a_monad 07:33:03 Title: Recursion in a monad - HaskellWiki 07:33:04 quicksilver: right. I was just pointing out that fix turns out to be useful for more than just writing concise Fibonacci numbers. 07:33:10 true 07:33:18 hehe 07:33:20 type-level fix would be useful for similar reasons 07:33:28 yup 07:33:32 you can transform Stream into List using type-level fix 07:33:39 if you stick a 'Maybe' in 07:33:51 if I'm not mistaken 07:34:14 Stream? 07:34:29 --- join: prb (n=prb@c-24-22-188-196.hsd1.mn.comcast.net) joined #haskell 07:35:58 sarehu: a stream is a data structure that stores a current value, and a function for getting the next value from the current one. 07:36:12 does anyone else have problems with haskell.org right now? 07:36:32 It works for me. 07:36:58 works for me too. 07:37:14 sarehu: or, if you like, a Stream is a List without the 'Nil' case 07:37:20 sarehu: or without the [] case 07:37:26 http://haskell.org/testthesiteformelambdabot 07:37:36 sarehu: so, since it can never end, it is 'forced' to be infinite 07:37:36 ok, just wondering about the capitalization 07:37:43 I guess lambdabot hates 404s 07:37:56 http://haskell.org # go LB go 07:37:57 Title: Haskell - HaskellWiki 07:38:04 Yay lambdabot ! 07:38:25 strangely, it works through tor 07:38:28 must be routing problems 07:38:45 --- join: gbeshers (i=gbeshers@nat/redhat/x-03088ba180b12fae) joined #haskell 07:38:51 Meh, I am printing a number somewhere, but I have have no idea where exactly... 07:39:00 sarehu: all haskell type constructors are capitalized 07:40:48 --- join: ndm (i=8afbf0ae@gateway/web/cgi-irc/ircatwork.com/x-df3887b19851ca32) joined #haskell 07:41:13 I was wondering if whoever was referring to some specific datatype that existed in the wild 07:41:28 how do you "multiply" a list? is (concat . replicate n) the canonical way? 07:41:33 hm, what is the preferred data structure for "a map without values" or "a map where key = value" ? 07:41:48 nominolo: Data.Set ? 07:41:54 nominolo: not quite sure what you mean :) 07:42:00 nominolo: in what respect is it not a list? 07:42:11 i need fast lookup 07:42:18 --- quit: oklopol (Read error: 104 (Connection reset by peer)) 07:42:28 nominolo: sounds like Data.Set 07:42:30 but, well, Set seems amazingly obvious 07:42:38 as long as you don't mind uniqueness being forced 07:42:42 birkenfeld: it depends what you want. (concat . replicate n) seems reasonable for multiplying by a positive integer. 07:42:56 Data.Set is implemented, roughtly, as Data.Map with key = value 07:42:57 I think 07:43:30 quicksilver, i'm porting an ML implementation. they used a map, i think 07:43:53 byorgey: it seems to even accept negative integers, handling them as zero 07:43:59 which is fine 07:44:06 @src replicate 07:44:06 replicate n x = take n (repeat x) 07:44:10 @src take 07:44:10 take n _ | n <= 0 = [] 07:44:10 take _ [] = [] 07:44:10 take n (x:xs) = x : take (n-1) xs 07:44:51 birkenfeld: yup. 07:45:20 nominolo: got that link to the make filesystem simulator? 07:45:33 --- join: stoic_ (n=stoic_@64.107.156.234) joined #haskell 07:45:34 dcoutts_, one sec 07:45:43 btw, where does one report bugs in the GHC library docs? 07:45:44 kolmodin: got the make code we started writing? 07:45:57 I wrote a bit more on the train home 07:45:58 @src scanl 07:45:58 scanl f q ls = q : case ls of 07:45:58 [] -> [] 07:45:58 x:xs -> scanl f (f q x) xs 07:45:58 nominolo: I'm pretty sure Data.Set is what you want 07:46:02 pencil and paper :-) 07:46:15 birkenfeld: ghc trac? 07:46:19 ok 07:46:40 dcoutts_, http://code.haskell.org/~nominolo/ 07:46:41 Title: Index of /~nominolo 07:46:46 nominolo: ta 07:47:05 --- join: bringert (n=bjorn@csmisc14.cs.chalmers.se) joined #haskell 07:47:05 quicksilver, they use a unique-map. i guess that's faster than a normal map 07:48:01 hm, maybe it's a haddock bug 07:48:14 birkenfeld: what's the bug? 07:48:29 moin! 07:48:30 is IntMap deprecated now? 07:48:38 in the docs for Prelude.elem, it says "...usually written in infix form, e.g., x elem xs." 07:48:47 that is, the backquotes are missing 07:48:52 but they seem to be in the source 07:48:53 The bug is one of those that can sit on the surface of a pond. 07:49:03 hey nominolo 07:49:14 hi dons 07:49:26 back in OR? 07:49:41 yeah, finally. 07:49:41 --- join: Mr_Awesome (n=eric@par0442.urh.uiuc.edu) joined #haskell 07:49:47 mwhha, xmonad lambdacats, http://arcanux.org/lambdacats.html 07:49:47 Title: Lambdacats 07:49:50 "fillBelly = foldr (++) [] fridgeContents" 07:49:56 just saw that! 07:50:15 as soon as someone makes a 'catamorphism' one, I will be happy =) 07:50:18 hah! 07:50:27 byorgey: you know what you need to do. 07:51:05 is there something similar to the lambdabot `@src' that i can use in ghci or elsewhere? 07:51:22 not really. 07:51:33 we should bundle up these things in a tiny tool that we can embed easily in ghci 07:51:35 private msg 07:51:38 (unlike lambdabot, which is a bit hard) 07:51:42 in hugs you can do :f function 07:51:45 you can print lines of the source, iirc 07:52:03 :list works for local files 07:52:12 --- quit: augustss () 07:52:28 --- join: oklopol (i=oko@194.251.101.183) joined #haskell 07:53:31 --- quit: mikael () 07:53:39 cant GHCi on Acid do @src? 07:53:52 yeah, but its hard to get it to work 07:54:03 yes. see "unlike lambdabot, which is a bit hard [to embed]" 07:54:18 (come to think ofit, last I'd heard GOA was broken) 07:54:21 goa is the lambdabot binding 07:54:22 right 07:55:51 --- join: blarz_ (i=simon@blarzwurst.de) joined #haskell 07:55:56 byorgey: haddock seems to take the `elem` as a link to elem 07:56:02 --- quit: amiddelk ("Cya later") 07:56:21 birkenfeld: oh, yes, that's Haddock syntax. 07:56:39 Haddock is kind of fishy. 07:56:50 so it's a bug in the documentation. it needs some sort of escape characters or something to display the ` characters. 07:56:54 haha 07:56:57 the docs mention only '...' and `...' though 07:57:02 --- quit: gabkdlly (Read error: 110 (Connection timed out)) 07:57:03 dons: is hs-plugins a "sanitisation" of the GHC API, or is it something else entirely? 07:57:05 --- quit: MyCatSchemes ("Mugging my lectu^W^W^WFinding some information.") 07:57:07 oh, really? hm 07:57:14 --- join: gabkdlly (n=gabriel@dslb-088-073-040-137.pools.arcor-ip.net) joined #haskell 07:57:42 quicksilver: something else, currently. we were all hoping porting it to use ghc-api would happen this hackathon... 07:57:53 hs-plugins is older than the GHC API, isn't it? 07:58:13 allbery_b: hmm. which parts are 'else'. It has its own linker? 07:58:13 --- quit: Metabol (Read error: 104 (Connection reset by peer)) 07:58:23 allbery_b: presumably it doesn't have its own parser? 07:58:35 --- join: Metabol (n=Metabol@unaffiliated/metabol) joined #haskell 07:58:38 it does have its own parser 07:58:39 --- part: gabkdlly left #haskell 07:58:47 (for .hi files) 07:58:49 ah 07:58:52 right 07:59:03 but the haskell code itself it runs 'ghc' as a sub process ? 07:59:10 yes 07:59:21 and then it dynamically loads the .o file produced? 07:59:26 yep 07:59:30 * quicksilver nods 07:59:43 I'll put it on the ghc trac in any case 08:00:05 --- quit: _ry () 08:00:09 quicksilver: it predates the ghc-api 08:00:12 --- join: dolio (n=dolio@nr5-216-196-210-207.fuse.net) joined #haskell 08:00:26 dons: *nod* 08:00:26 I wish I could tell the debugger: halt on IO and show the LOC that caused it. 08:00:41 --- join: arcatan (n=arcatan@kaanaa.satakuntatalo.fi) joined #haskell 08:02:57 ohh, the austrailian dollar hits 90 cents US. 08:03:02 ... poor dons 08:03:27 time to ask for a raise 08:05:51 --- quit: VerbalDK ("G-Lined") 08:06:13 * oerjan wonders if one could implement a magical kind of ?line implicit variable 08:06:15 --- quit: boegel ("Leaving") 08:06:23 --- join: fmardini (n=fmardini@77.245.6.99) joined #haskell 08:06:35 oerjan: for ghci? 08:06:50 for ghc profiling 08:07:07 --- nick: tizoc_ -> tizoc 08:07:19 ah. For a minute I thought you meant something like the "it" variable in ghci 08:07:43 no, i meant a variable that could be used by a function to fine the line _calling_ it 08:07:49 *find 08:08:00 fine, too i guess 08:08:36 08:08:44 if a function included it explicitly in its type, error messages could use it 08:09:10 such as those dreader pattern matching errors in Prelude functions 08:09:29 *dreaded, whatever happened to my typing skills :( 08:09:31 maybe something more general - the call stack, or something? 08:09:50 something like what http://perldoc.perl.org/functions/caller.html returns 08:09:51 Title: caller - perldoc.perl.org 08:09:54 --- quit: blarz (Read error: 110 (Connection timed out)) 08:09:59 --- join: phlpp (n=philipp@pD9F5C219.dip.t-dialin.net) joined #haskell 08:10:08 --- quit: stoic_ (Read error: 104 (Connection reset by peer)) 08:10:17 --- join: Tac-Tics (n=tactics@63.149.16.13) joined #haskell 08:10:47 Can I ask the ghci debugger to step 1000 times? 08:11:06 Then I could use binary search to find the problem 08:11:12 hi, just installed 6.6.1 on osx 10.4 using ports, but when i run examples from soe i get Unable to open X display :0.0, all works great in ubuntu, is this related to a missing haskell library or do i have an issue with my x11 installation 08:11:21 roconnor: hah 08:11:34 fmardini: maybe you don't have X running? 08:11:54 fmardini: I don't believe the haskell/X stuff will autorun it 08:11:54 fmardini: Have you installed all the additional X stuff that comes with XCode? 08:12:17 quicksilver: yeah i did 08:12:19 I seem to remember that it doesn't install by default. 08:12:26 --- quit: Daveman (Read error: 104 (Connection reset by peer)) 08:12:26 quicksilver: how can i make sure its running 08:12:39 apple-tab 08:12:44 dons: soon your Galios salery will match your university salery :P 08:12:45 do you see x in there? 08:13:11 roconnor: :P 08:13:29 damn this economy 08:13:29 dons: travel back ok? 08:13:29 puusorsa: what is apple tab 08:13:41 fmardini, the apple key on your keyboard 08:13:50 and tab key. you know, how you switch between apps 08:13:52 swiert: yeah, flight was pretty good. though got detained briefly at frankfurt :( 08:14:03 detained? 08:14:04 puusorsa: silly me :), no no x 08:14:12 puusorsa: how can i start it 08:14:19 click on the icon? 08:14:24 xmonad is contraband 08:14:24 fmardini: In applications/X11 08:14:27 no icon 08:14:46 maybe you don't have it installed? 08:14:47 fmardini: Applications/Utilities/X11 actually. 08:14:58 roconnor: yeah, something like that. they let me on the flight though, so that's ok. 08:15:07 use quicksilver and type in x11 08:15:28 puusorsa: thanks man 08:15:31 all works now 08:15:32 dons: who detained you? 08:15:55 --- quit: jwp_ (Read error: 104 (Connection reset by peer)) 08:16:11 oh, it was no big deal 08:17:50 swiert: hackathon was lots of fun. 08:18:07 next one will be at chalmers 08:18:37 dons: cool. too bad I missed it. 08:18:44 --- nick: Lycurgus_ -> Lycurgus 08:18:48 Any idea when? 08:19:10 --- quit: fmardini () 08:19:14 6 months time, roughly. so between feb-apr i suppose 08:19:22 then another one following that at icfp in canada 08:19:38 we'll have details in the coming weeks about the the chalmers one 08:20:05 dons: right. Any plans to get it officially associated with ICFP? 08:20:05 * dons hunts for vegemite in the cupboard. bbl 08:20:10 yeah, that's on the cards 08:20:13 icfp 2008 is in canada? 08:20:22 yep, in BC. 08:20:22 oh, chalmers sounds nice 08:20:23 victoria, british columbia 08:20:31 dons: woudl be nice if someone wrote up a hac report 08:20:35 --- join: MyCatSchemes (n=rb6822@sevsie.cs.bris.ac.uk) joined #haskell 08:20:35 any skiing there and then? 08:20:40 dons: not that I'm trying to volunteer you :) 08:21:09 If anyone is interested in writing up a Hac report, there's a TMR special on the SoC coming up... 08:21:18 I'm sure I could fit in a Hac report. 08:21:22 --- join: jwp_ (n=jwp@mail.icrossing.com) joined #haskell 08:21:39 --- nick: Lycurgus -> Lycurgus_ 08:21:52 --- quit: Mr_Awesome (Read error: 110 (Connection timed out)) 08:22:55 swiert: isn't the PDF full already? ;) 08:23:03 did they announce the contest winners 08:23:21 mrd: no, they forgot 08:23:46 * matthew_- slaps himself. Whistler is in BC. Of course there's good skiing. September's a bit early though 08:24:00 --- join: takamura (n=takamura@80.31.50.246) joined #haskell 08:24:11 --- part: takamura left #haskell 08:24:20 er? 08:24:29 * oerjan is joking 08:24:37 they forgot to update the web site 08:24:50 well, that i may believe 08:24:56 * mrd is not joking 08:25:14 kosmikus: Well, I want to be considerate of people who don't have broadband ;) 08:25:36 mrd: there was a reddit post about a blog on the results, though 08:26:14 mrd: I'm sorry that the webpage is not updated yet. It will be during the next days, though. 08:26:51 is any report about it written up? 08:27:07 --- quit: QplQyer ("*poef* *roekwolk*") 08:27:10 doserj: yes, there is. it'll also become available on the webpage really soon. 08:27:15 great! 08:27:57 --- quit: swiert ("bbl") 08:28:49 oh. i'm reddit-free since march. 08:29:48 Also subreddit free? 08:30:13 yes, completely clean 08:32:27 --- join: zygen (n=vincent@dslb-084-058-164-155.pools.arcor-ip.net) joined #haskell 08:34:39 mrd: how was the transition 08:34:42 --- quit: lnxz (Remote closed the connection) 08:35:37 well, i suppose it was eased by the fact that i had plenty of work to do. 08:36:21 i still sometimes think of perhaps checking out the site, when bored, but i always find something else to do 08:36:25 --- join: dje (n=dje@S0106000d9324c457.vc.shawcable.net) joined #haskell 08:36:36 --- join: joe_hurd (n=joe_hurd@gw-1.galois.com) joined #haskell 08:36:37 like banging my head on a wall 08:36:44 mrd: or writing some haskell 08:36:57 oh wait, that's what you meant right? 08:36:58 ;) 08:37:14 no that's more like writing mechanized proofs =) 08:37:31 well that sounds fun too! 08:38:55 mrd: that must've been one Hell of a productivity boost. 08:39:31 i suppose. i was taking 2 classes while working full-time. something had to go. 08:40:59 which i'm doing again, for some reason. but it's not quite as much work this time around. but it is time for class... bbl 08:41:18 --- join: NichardRixon (n=xor@rn-cgr1a01.uwaterloo.ca) joined #haskell 08:43:22 --- join: locomalo (n=leandro@host80.200-117-121.telecom.net.ar) joined #haskell 08:44:44 dons: http://wso.williams.edu/~byorgey/catamorfizm.png =) 08:46:18 awesome :) 08:46:21 byorgey++ 08:47:00 --- quit: dje () 08:47:05 --- join: dje (n=dje@S0106000d9324c457.vc.shawcable.net) joined #haskell 08:47:15 --- join: waern (n=davve@waeda.csbnet.se) joined #haskell 08:47:44 sweet. 08:48:15 --- join: CosmicRay (n=jgoerzen@gatekeeper.excelhustler.com) joined #haskell 08:50:07 --- quit: Taejo (Connection timed out) 08:50:17 --- join: Taejo (n=max@196.210.103.191) joined #haskell 08:50:52 the wonders of Google image search =) 08:51:58 --- quit: ttt- (Connection timed out) 08:52:06 --- join: svref (n=dm@dsl093-230-014.lou1.dsl.speakeasy.net) joined #haskell 08:52:10 --- part: svref left #haskell 08:52:16 --- join: halcyon10 (n=halcyon@dslb-082-083-081-248.pools.arcor-ip.net) joined #haskell 08:52:38 --- join: DarthJesus (n=Godsmith@unaffiliated/jargon) joined #haskell 08:52:49 http://mediaplague.com/?cat=serial 08:52:51 Title: Media Plague :: cat=serial 08:53:01 http://mediaplague.com/boards/showthread.php?p=33#post33 08:53:24 --- quit: masak ("tests rock!") 08:53:32 Ah, a message from the dark side 08:53:49 :D 08:54:37 http://mediaplague.com/?cat=serial is everything @keal from 2001 to 8000 08:54:38 Title: Media Plague :: cat=serial 08:55:22 --- join: swiert (n=Wouter@88-106-135-208.dynamic.dsl.as9105.com) joined #haskell 08:55:55 wow 08:56:09 that's true keal, 08:56:09 I made this from scratch in one night using Quick Basic 7.1 PDS. 08:56:09 It runs virtually flawless minus shifting overflows. 08:56:10 Uses just integers and operator codes. 08:56:49 Also, RPN=no parsing necessary, really. 08:56:53 =P 08:57:23 http://mediaplague.com/boards/showthread.php?p=33#post33 is my program i made last night :) 08:57:27 up-to OR over 256 tokens! wow! 08:57:40 hehe =) 08:57:44 :P 08:58:08 over 256 if you dont have endless series of numbers in a row 08:58:23 :) 08:58:48 --- quit: mrchebas () 08:59:04 --- quit: nominolo ("Ex-Chat") 08:59:10 comes with source code :) 08:59:27 RPN for the win, i still have a 20 zear old HP calculator around for that reason :) 08:59:56 Yes, why create a parse tree when you have a human compiler? 09:00:21 o.o 09:00:26 ;) 09:00:34 ;-) 09:00:43 --- join: cjeris (n=Jeris@140.247.124.140) joined #haskell 09:00:47 --- join: rickynils (n=rickynil@asimov.ros.sgsnet.se) joined #haskell 09:00:55 this is my 70th or so calculator program btw 09:01:10 --- join: timlarson_ (n=timlarso@65.116.199.19) joined #haskell 09:01:30 one of them emualating doing all sorts of math using just your fingers on your hands 09:01:41 DarthJesus: erm 09:01:48 how is this relevant to haskell 09:02:18 --- quit: andyjgill () 09:02:21 did any of you make haskell 09:03:02 which of you invented haskell? 09:03:13 DarthJesus: cute, but please be less like @keal 09:03:31 i am serious who invented haskell? 09:03:36 @yow ! 09:03:36 Do you guys know we just passed thru a BLACK HOLE in space? 09:03:50 @go haskell history 09:03:52 http://www.haskell.org/haskell-history.html 09:03:52 Title: The History of Haskell 09:04:07 --- join: Saul_ (n=Saul@50-15-ftth.onsnetstudenten.nl) joined #haskell 09:04:17 Good morning #haskell! 09:04:26 DarthJesus: so you don't use the nick `keal' anymore? 09:04:29 heya shapr ! 09:04:37 Live fast, die old, and leave behind some beautiful code! 09:04:38 * dons throws energetic lambdas at shapr 09:04:57 * shapr throws not-so-depressed lambdas at dons 09:04:58 --- join: augustss (n=Lennart@63.175.43.10) joined #haskell 09:05:01 * dmwit eats marshmallows in an attempt to match enthusiasm with the best 09:05:09 hej augustss, god morgon! 09:05:47 --- join: jutaro (n=jutaro@p54BD4A5C.dip.t-dialin.net) joined #haskell 09:06:08 --- join: Lemmih (n=lemmih@c-150970d5.020-42-6c736b2.cust.bredbandsbolaget.se) joined #haskell 09:06:10 It's a beautiful day for some code! 09:06:17 good morning, shapr! 09:06:20 it's been raining here most of the day. 09:06:24 --- join: xynn (n=james@cpe-69-205-127-65.rochester.res.rr.com) joined #haskell 09:06:33 dons sings the lovely day song: "its a lovely day today, for whatever you like to code" 09:06:37 It's raining here too, that's why I not unicycling :-) 09:06:39 matthew_-: that is so you won't be tempted to go outside instead of coding. :) 09:06:40 "its a lovely day for coding things! its a lovely day!" 09:06:50 * cpoucet sings "It's a lovely day today, for running in a monad" 09:07:00 heh 09:07:05 cpoucet: Is that a big lambda shaped wheel for hamsters? 09:07:07 it's a lovely day for finding that apostrophe key on your keyboard... 09:07:17 overrated 09:07:21 shapr: yes, and you're bound to the wheel 09:07:33 with sharp >>=s 09:07:41 or shapr >>=s 09:07:49 sharp shapr 09:08:08 --- join: Axioplase (n=Pied@LNeuilly-152-22-107-12.w193-251.abo.wanadoo.fr) joined #haskell 09:08:12 --- quit: Axioplase (Client Quit) 09:08:23 haskell is for lazy people 09:08:26 * byorgey tries to imagine a "lambda shaped wheel" 09:08:26 :| 09:08:34 --- quit: dogmaT (Read error: 113 (No route to host)) 09:08:56 --- join: Axioplase (n=Pied@LNeuilly-152-22-107-12.w193-251.abo.wanadoo.fr) joined #haskell 09:09:01 DarthJesus: So you're keal? 09:09:12 --- join: takuan_dozo (n=takuan@83.101.37.225) joined #haskell 09:09:27 yeah, i think so 09:09:46 DarthJesus: Ya know, I thought you were a markov bot for days and someone was showing off their code, that's the only reason I didn't ban you before. 09:09:54 I'm pretty certain he is 09:09:57 i don't see how haskell can produce math that isnt known of yet 09:09:58 the forum linked to contains the word "keal" 09:10:07 DarthJesus: ooh, proof! 09:10:21 @keal 09:10:21 how bout i say ick no unicorn and daisy loving girl mathematician will ever enjoy this 09:10:30 "Timothy Robert Keal's Reverse Polish Notation Calcultator 0.02" 09:10:41 and the link is to a folder of username DarthJesus 09:11:01 Prozactly. 09:11:26 just look at the membercount and whois 09:11:33 its kind of sad when you become a parody of yourself, DarthJesus 09:11:35 @pl \x y -> x + length y 09:11:35 (. length) . (+) 09:11:40 bah 09:11:59 --- join: lnxz (n=joachim@bjo1-1x-dhcp451.studby.uio.no) joined #haskell 09:12:03 http://mediaplague.com/pk/ my old dada comies series 09:12:04 Title: pooter comiks 09:12:06 @pl \(x,y) -> x + length y 09:12:07 uncurry ((. length) . (+)) 09:12:09 --- mode: ChanServ set +o dons 09:12:11 --- mode: dons set +b *!*=Godsmith@unaffiliated/jargon 09:12:11 --- kick: DarthJesus was kicked by dons (off topic) 09:12:13 --- mode: ChanServ set -o dons 09:12:26 oh, i was hoping for some arrows from the bot 09:12:42 hehe 09:12:44 dons: arrows don't combine arguments afaik 09:12:59 > liftM2 (+) id length 09:13:00 that would be (id *** length) >>> uncurry (+) 09:13:00 Couldn't match expected type `[a]' against inferred type `Int' 09:13:01 * Japsu is still calling for a real @obfuscate to replace @pl 09:13:08 right. 09:13:17 oh wait 09:13:19 :t second length 09:13:21 forall a d. (d, [a]) -> (d, Int) 09:13:32 byorgey: right, but the combination happens in uncurr 09:13:45 --- quit: Beelsebob () 09:13:48 ok does anyone have a nice haskell job position available, or am I going to sell my soul to the .NET job offer? Ph.D. doesn't finance itself :/ 09:13:52 @pl \(x,y) -> let a = x in let b = length y in (a,b) 09:13:52 second length 09:13:57 @pl \(x,y) -> let a = x in let b = length y in a+b 09:13:57 uncurry ((. length) . (+)) 09:13:59 --- join: raxas (n=raxas@9.187.broadband6.iol.cz) joined #haskell 09:14:18 therp: occasionally they get posted on haskell-cafe. PhDs do finance themselves in many countries, where are you based? 09:14:25 quicksilver: austria 09:14:33 * therp subscribes to haskell-caffe 09:14:42 I suspect your odds of an austria-based post are low :( 09:14:49 relocation is key 09:14:50 therp: and check the haskell weekly news archives 09:14:53 come to the UK! 09:14:55 all the jobs get posted there 09:15:07 but as a european you are eligible for all kinds of pan-european PhD grants 09:15:18 yeah, that'll make the phd a lot easier 09:15:19 pan-european PhD grants? hmm that sound interesting 09:15:28 Yes 09:15:29 Marie Curie 09:15:33 it's not exactly big money 09:15:35 It is 09:15:38 but it's enough to support yourself and enjoy the phd 09:15:45 Marie Curie fellowships pay more than normal phd fellowships 09:15:55 the EU spends *a lot* of money on stuff. Some of which includes funding projects which include hiring PhD students 09:15:59 right 09:16:04 again, Marie Curie 09:16:05 :) 09:16:20 http://arcanux.org/lambdacats.html 09:16:20 Title: Lambdacats 09:16:23 :D 09:16:46 hey! 09:17:05 I wanted to do overgeeky haskell related lolcats :) 09:17:16 --- quit: mfunebre () 09:17:27 cpoucet: thanks for the pointer. will have a look at that 09:17:33 --- quit: sproingie (Connection timed out) 09:17:41 therp: well, get to work! =) 09:17:44 therp: then for \'s sake, go ahead and do so, then email them in to that blog so they can be added. 09:17:56 therp: 'cuz if you're going to make them, I wanna see 'em. 09:17:58 ?hoogle constM 09:17:59 No matches found 09:18:02 byorgey: http://clemens.endorphin.org/TypeSystem.jpg :) 09:18:13 but hm my dns seems dead. 09:18:19 won't load for me 09:18:48 :t \x m -> m >> return x 09:18:49 forall (m :: * -> *) a b. (Monad m) => b -> m a -> m b 09:18:54 me neither 09:19:00 ?hoogle b -> m a -> m b 09:19:01 Prelude.asTypeOf :: a -> a -> a 09:19:01 Prelude.const :: a -> b -> a 09:19:01 Prelude.seq :: a -> b -> b 09:19:20 matthew_-: If I'm not mistaken many of the specific countries research bodies will fund european students 09:19:27 quicksilver: yep, that too 09:19:28 @type return . const 09:19:30 forall (m :: * -> *) a b. (Monad m) => a -> m (b -> a) 09:19:41 E.g. an austrian can get an EPSRC grant 09:19:43 quicksilver: I'm partially funded by the EC and partially by the DTA 09:19:44 @type const . return 09:19:46 forall b a (m :: * -> *). (Monad m) => a -> b -> m a 09:19:52 I think they have to meet *slightly* tougher conditions, but.. 09:19:55 EPSRC...EC..DTA? 09:19:57 quicksilver: ahh I see. 09:19:59 oh, never mind 09:20:06 EC = european comission 09:20:15 --- join: BCoppens (n=bartcopp@kde/coppens) joined #haskell 09:20:16 therp: EPSRC is a UK-based research council which gives PhD grants to brits 09:20:16 byorgey: It has to have a (>>) in there somewhere or its useless to me. ;-) 09:20:19 DTA = UK Department of somethingarouther 09:20:22 therp: but other europeans are also eligible 09:20:23 has anybody experience installing ghc under os x? the description at http://www.haskell.org/pipermail/glasgow-haskell-users/2007-May/012576.html is way too technical for me :( 09:20:25 Title: ghc-6.6.1 Mac (Darwin) Binary Dists, http://tinyurl.com/2hya9r 09:20:33 what would be an appropriate place to post a question for grants? haskell-cafe? 09:20:38 therp: you could contact a good computer science department and they would be able to explain this 09:20:48 --- quit: takuan (Connection timed out) 09:20:58 dmwit: right. for a moment I stupidly confused ignoring the return value and ignoring m itself. 09:21:06 therp: you could speak to the head of phd applications at, say, imperial college london, or queen mary london 09:21:10 http://en.wikipedia.org/wiki/Catamorphism <-- looking at the code example there, shouldn't treeDepth = (const 1, \l r-> 1+ max l r) rather than (1,\k r->1 + max l r) ? 09:21:11 Title: Catamorphism - Wikipedia, the free encyclopedia 09:21:16 Does microsoft research cambridge ever fund PhD places? 09:21:26 I don't remember it doing so but it sounds like the kind of thing they might 09:21:33 therp: good compsci departments are used to dealing with phd students from all over the place and will have $$$ 09:21:47 therp: and if you come to Imperial then you can have lunch with me and ToRA! 09:21:47 * quicksilver nods 09:22:00 --- join: ddarius (n=derek@74.197.10.104) joined #haskell 09:22:13 or go to glasgow and have lunch with quicksilver (I think) 09:22:16 matthew: hm I'm kinda emotionally bond to this place. so relocation isn't really an option for me I'm afraid 09:22:18 MyCatSchemes: yes. 09:22:35 byorgey: thank you. I thought that looked fishy, just wanted to make sure. 09:23:01 therp: well that's fair enough too. But if your computer department isn't used to attracting money from the EC or other funding bodies then it may make your life harder 09:23:19 --- quit: Saul_ (Read error: 110 (Connection timed out)) 09:23:31 --- quit: glen_quagmire ("leaving") 09:24:01 I should probably spend some time updating my PhD exposé instead of working on the PhD itself, because this way I will run out of money in about 3-4 months.. 09:24:51 :t liftM . const 09:24:54 forall a1 (m :: * -> *) a. (Monad m) => a -> m a1 -> m a 09:25:03 --- join: jmelesky (n=jmelesky@dsl081-136-068.chi1.dsl.speakeasy.net) joined #haskell 09:25:17 hey guys.. 09:25:38 :t (<$) 09:25:40 forall a (f :: * -> *) b. (Functor f) => a -> f b -> f a 09:26:20 dmwit: ^ 09:26:47 :t (<3) 09:26:49 forall a. (Num a, Ord a) => a -> Bool 09:27:25 Do you recommend any Haskell books? I've a bsc. in mathematics and currently doing msc. in theoretical comp.sci, I grok functional programming, lazyness, type inference, pattern matching, I mostly need to learn Haskell's "standard" libraries, conventions etc. - and, get a little closer to fitting monads in my head 09:27:34 > 3 <$ [32] 09:27:35 [3] 09:27:41 probably read the wikibook then? 09:27:47 dons: yes.. 09:27:47 Arnar: yes, but it doesn't exist yet 09:27:56 --- join: vaasu (i=sidfn@203.104.25.129) joined #haskell 09:27:57 quicksilver: oh, something upcoming? 09:28:00 yeah. that book is on its way 09:28:01 Arnar: you sound like a perfect customer for 'haskell for the working programmer' 09:28:03 > 3 <$ [32, 45] 09:28:05 [3,3] 09:28:08 Sweet! 09:28:11 until then, hang out on this channel , read hackage.haskell.org 09:28:16 Arnar: which is being written by some inhabitants of this channel 09:28:22 and the other things on the haskell.org wiki 09:28:29 quicksilver: ah, sound about right. I've programmed professionally for some 6-7 years 09:28:31 --- join: SyntaxNinja (n=ijones@gw-1.galois.com) joined #haskell 09:28:41 quicksilver: any way to become a reviewer? :) 09:29:04 dons: yes.. this channel is extremely helpful I must say 09:29:13 hackage.haskell.org I didn't know about though.. 09:29:18 --- quit: filp ("Bye") 09:29:21 --- quit: gimbo ("Leaving") 09:29:21 Arnar: you should beg, pray, bribe and make friendly noises to bos and CosmicRay 09:29:49 --- quit: jwp_ (Read error: 104 (Connection reset by peer)) 09:29:49 I'm not sure if they're interested in more reviewers or not, at this stage 09:30:19 Arnar: hmm it's called "Real World Haskell" 09:30:22 Arnar: I have a terrible memory :) 09:30:26 Arnar: http://www.realworldhaskell.org/blog/ 09:30:28 Title: Real World Haskell 09:30:52 quicksilver: thanks.. 09:31:06 --- join: jwp_ (n=jwp@mail.icrossing.com) joined #haskell 09:31:29 that's what you referred to "haskell for the working programmer" before, or is it a different book? 09:31:38 that's the focus of the new book 09:31:50 Arnar: oh, you might also like to go through the videos of the haskell workshop 09:31:58 to get up to speed on some of the latest things happening in the language 09:32:05 dons: ah, yes.. definitely 09:32:24 there's a link from the haskell.org frontpage to videos recorded by malcolmw 09:33:29 dons: thanks.. see it 09:33:30 Arnar: that's what I meant, I had the idea right but that wasn't actualy the title :) 09:34:04 quicksilver: ok, just asked to be sure :) 09:34:07 dmwit pasted "half-hour RPN calculator" at http://hpaste.org/3177 09:34:11 --- join: Korollary (n=Unknown@c-24-22-208-129.hsd1.mn.comcast.net) joined #haskell 09:35:20 dmwit: expressions' [] >>= return . head = liftM head (expressions' []) 09:35:31 I didn't want to import Control.Monad. 09:35:38 @index fmap 09:35:38 Control.Monad, Prelude, Control.Monad.Reader, Control.Monad.Writer, Control.Monad.State, Control.Monad.RWS, Control.Monad.Identity, Control.Monad.Cont, Control.Monad.Error, Control.Monad.List 09:35:41 fmap then 09:35:41 It turns out to be a few characters less typing. =P 09:36:23 dmwit: boo 09:36:30 Okay, fmap is fine. =) 09:36:46 forever = fix . (>>) +1 insanity 09:36:51 ddarius: is >>= return . f frowned on? 09:37:09 dmwit: why do you pass a known value to expression' 09:37:16 dmwit: why even give expression' a parameter if it'll be an empty list 09:37:22 operator xs = choice [char c >> operate op xs | (c,op) <- [('+',(+)),('-',(-)),('*',(*)),('/',(/))]] 09:37:28 cpoucet: Because it won't be empty in the recursion. 09:37:36 ah, right, my irc window was hiding gthat 09:38:20 oerjan: Ooo, I like the choice combinator. 09:39:00 matthew-_: It's not that big a deal either way, but usually liftM is clearer and slightly more compact. 09:39:01 --- join: jr_ (n=chatzill@f051078001.adsl.alicedsl.de) joined #haskell 09:39:32 --- quit: der_eq (Remote closed the connection) 09:39:37 --- join: jjore-w (n=jbenjore@c-24-16-241-176.hsd1.wa.comcast.net) joined #haskell 09:39:43 ddarius: fmap is even more compact :) 09:40:05 matthew_-: infix `fmap` (or liftM) is quite an attractive idiom 09:40:11 --- quit: arcatan (Read error: 104 (Connection reset by peer)) 09:40:12 --- join: laz0r (n=laz0r@port-87-234-144-134.dynamic.qsc.de) joined #haskell 09:40:19 quicksilver: ahh, good thinking batman. 09:40:20 http://programming.reddit.com/info/2yb35/comments 09:40:21 Title: Live from the Haskell Workshop: Run-time Code Generation in Haskell :: Video (re ... 09:40:28 the harpy video, great demo. 09:40:34 matthew_-: if you previously had a non-monadic expressions, you might write "head (expressions' [])" 09:40:40 * ddarius doesn't like infix fmap or liftM. 09:40:50 matthew_-: then, when you moved it into a monad, you could write "head `fmap` (expressions' [])" 09:41:03 matthew_-: which is 'syntactically similar' making it feel like an evolutionary step 09:41:14 quicksilver: So is liftM head (expressions' []) 09:41:18 damnit, I'd imagined that with a flip 09:41:28 matthew_-: actually I like it even more when the thing on the left is a constructor 09:41:43 a <- make_foo ; return (Foo a) --- ugly 09:41:47 I was thinking of: (expressions' []) `fmap` head 09:41:51 for what f is (foldl f) == (foldr f)? f must be commutative, and f :: a -> a -> a, right? 09:41:54 Foo `fmap` (make_foo) -- prettier 09:41:58 IMO, of course 09:42:00 dmwit: since you are already importing Applicative you can use <$> 09:42:15 Taejo: f needs to be associative and strict in both arguments. 09:42:17 I discovered the other day that you could happily write [] Int rather than [Int], which I quite liked 09:42:21 :t (<$>) 09:42:23 forall a b (f :: * -> *). (Functor f) => (a -> b) -> f a -> f b 09:42:38 matthew_-: yes, the 'punning' of [] is slightly unsatisfactory 09:42:39 * ddarius has no problem with Foo <$> make_foo 09:42:52 Arnar: what does hackage not know about? 09:42:55 matthew_-: that is [a] as a type and [a] as a value, but with subtly different sense. 09:42:57 quicksilver: you mean the hardwiring of it to pre+post fix? 09:43:04 ahh 09:43:12 matthew_-: well [a] as a value being a list with exactly one member 09:43:22 but [a] as a type is just a plain unary type constructor 09:43:24 it's a bit odd :) 09:43:33 sure, but I was ignoring values, and just thinking of [] as a type function of kind * -> * 09:43:45 yes. it's the only 'outfix' unary we have 09:43:49 'bra-ket-fix' 09:43:50 :k [] 09:43:52 * -> * 09:43:56 --- quit: ozone_ (Read error: 104 (Connection reset by peer)) 09:43:57 that's the one! ;) 09:44:25 --- quit: the_dormant ("Leaving.") 09:44:28 quicksilver: there are a couple of others... 09:44:48 (,),(,,),(,,,),(,,,,),... 09:45:01 @type let f :: (,) Bool Int; f = (True, 5) in f 09:45:03 (,) Bool Int; f = (True, 5) in f :: (Bool, Int) 09:45:09 doserj: not unary 09:45:21 ah 09:45:27 doserj: not unary, but yes :) 09:45:32 --- quit: fasta ("Lost terminal") 09:45:39 also [,] [,,] [,,,] if we're not restricting to unary 09:45:46 and you can't section any of them, more's the pity 09:45:48 ?index fix 09:45:48 Control.Monad.Fix, Control.Monad.Reader, Control.Monad.Writer, Control.Monad.State, Control.Monad.RWS, Control.Monad.Identity, Control.Monad.Error 09:45:58 quicksilver: err, but not type functions 09:46:06 hmm 09:46:20 --- join: gkr (n=notme@201-212-49-41.cab.prima.net.ar) joined #haskell 09:46:24 dmwit: Unfortunately fix is not in the Prelude 09:46:26 matthew_-: indeed not 09:46:46 matthew_-: it's the non-quite-parallel between type and value which I think is quite odd 09:46:47 @type uncurry 09:46:49 forall a b c. (a -> b -> c) -> (a, b) -> c 09:46:53 matthew_-: not that I actually suggest it should be changed :) 09:46:56 is there an uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d? 09:46:56 quicksilver: yes indeed. 09:46:59 matthew_-: just that it can and does sometimes confuse 09:47:15 :t uncurry3 09:47:17 Not in scope: `uncurry3' 09:47:21 Japsu: apparnetly not :) 09:47:26 dmwit annotated "half-hour RPN calculator" with "with some suggestions from #haskell to make it denser" at http://hpaste.org/3177#a1 09:47:28 quicksilver: yep. I think a careful comparison with something like Maybe should clear up any confusion :) 09:47:39 quicksilver: ;D 09:47:51 matthew_-: right. The point being that 'Maybe' is a different word from 'Just' 09:47:55 indeed 09:47:56 matthew_-: and a damn good thing that is :) 09:48:10 main = getLine >>= parseTest expression >> main 09:48:22 yes 09:48:25 --- join: ozone (n=andrep@starbuck.algorithm.com.au) joined #haskell 09:48:47 (But probably not worth an annotation this time. =) 09:49:01 maybe types should only be written using greek characters and values in roman characters 09:49:16 matthew_-: yeah, that would actually be quite nice 09:49:17 --- join: Daveman (n=dave@pool-138-89-1-77.mad.east.verizon.net) joined #haskell 09:49:24 then it would be clear, the difference between [] as a type function and [] as a value. ;-) 09:49:44 well you'd still be overloading the symbols [] themselves 09:49:45 because [] and [] look very different in greek and roman character sets... 09:49:48 ;) 09:50:15 --- join: ptx_ (n=ptxmac@0x5550c853.adsl.cybercity.dk) joined #haskell 09:50:59 --- join: glguy (n=eric@unaffiliated/glguy) joined #haskell 09:51:02 --- join: spoopithy (n=spoop@76.28.23.59) joined #haskell 09:51:02 heh, zip "+-*/" [(+),(-),(*),(/)]] is cute 09:51:16 =) 09:52:09 --- part: vaasu left #haskell 09:52:24 cool 09:52:32 --- join: mikael (n=mikael@dhcp-247-28.nomad.chalmers.se) joined #haskell 09:52:46 --- join: mrsolo (n=mrsolo@dsl092-025-194.sfo1.dsl.speakeasy.net) joined #haskell 09:53:33 though if there was a operatorFromString function, that would be nice too :-) 09:54:05 doesn't help much in general 09:54:14 normally you want your own custom AST type in there anyhow 09:54:16 guess not. And I guess not typable in haskell 09:54:38 so you have [(Plus,(+)),(Minus,(-))...] 09:54:41 Hrmn. The IO monad makes the first few pages of CAR Hoare's CSP book really intuitive. 09:54:45 or write it as a zip if you like 09:55:01 but I find writing as a list of pairs scales better 09:55:09 once your assoc list is more than a few lines long 09:55:15 you want to see which bit lines up with which bit :) 09:55:42 --- join: BSP_ (n=Batterse@zone1.robinson.cam.ac.uk) joined #haskell 09:55:45 --- part: BSP_ left #haskell 09:55:46 yeah, definitely. That's why I said "cute" rather than "a sound engineering practise" 09:56:41 Also, I get the impression that this stuff could *totally* be implemented directly in Haskell as data structure traversals, thanks to laziness. ^^ 09:56:43 however the practice of using lists of pairs and doing something with them to build tables is really nice 09:57:06 quicksilver pasted "keymap as list of pairs" at http://hpaste.org/3178 09:57:23 osfameron: consider the above rather short code to set up some keybinds 09:59:36 --- quit: TSC (Read error: 110 (Connection timed out)) 10:00:04 --- join: vaasu (i=sidfn@203.104.25.129) joined #haskell 10:00:13 quicksilver: ok, I can see that's a dispatch table, but I don't know what the Turbulence and modifyPT stuff is 10:00:18 --- quit: spoop (Connection timed out) 10:00:41 osfameron: modifyPT just knows how to find the particular little bit of state inside the global state 10:00:51 osfameron: Turbulence doesn't matter, it's just a constructor 10:01:11 --- quit: bos (Read error: 113 (No route to host)) 10:01:26 osfameron: the point is you can write a modification function for a tiny bit of state, and then use something like modifyPT in this case to 'lift' that tiny modification into an IO () action 10:01:42 osfameron: (which goes and looks up an IORef and finds the right bit and changes it and saves the changes) 10:01:45 --- quit: ptx (Read error: 110 (Connection timed out)) 10:01:58 osfameron: and still the main chunk of the keymap looks nice and neat and easy to read :) 10:02:12 quicksilver: I'm missing too much background to understand that (e.g. the IORef stuff) 10:02:39 I've got wedged in haskell studies for about a month... hoping to get more time from November... 10:03:51 ok, well if you wrote it out in full it would look like: \env -> do state <- readIORef env ; let pt = (selector function here) state; let Turbulence x y z = pt in writeIORef env (state { selector = Turbulence x (y+1) x }) } 10:04:17 osfameron: it's (a) shorter than that and (b) more resilient to re-arrangements of your data structure 10:05:01 can anyone work out which built-in function is ((. (scanr (.) id . repeat)) . map . flip id)? 10:05:13 freak 10:05:30 @unpl ((. (scanr (.) id . repeat)) . map . flip id) 10:05:30 (\ l u -> map (\ h -> h l) (scanr (\ a b c -> a (b c)) (\ d -> d) (repeat u))) 10:05:40 @type ((. (scanr (.) id . repeat)) . map . flip id) 10:05:42 forall c. c -> (c -> c) -> [c] 10:05:46 quicksilver: right. But presumably even without modifyPT you could presumably extract the bit that gets the IORef and writes it as part of the dispatch? 10:05:48 iterate 10:05:51 --- quit: FMota (Read error: 104 (Connection reset by peer)) 10:05:54 Taejo: iterate 10:05:59 osfameron: yeah, that's all modifyPT is 10:06:00 correct 10:06:05 osfameron: it's just that patter extracted 10:06:05 typing ftw 10:06:07 --- join: FMota (n=FMota@dhcp-36-203-57-69.cf-res.cfu.net) joined #haskell 10:06:24 cpoucet, indeed. Such is the Haskell way 10:06:28 osfameron: so this is just a nice example of abstraction really :) 10:06:33 quicksilver: ah, ok. So instead of doing an inversion of control thingy, you just compose the function that does the whole thing. 10:06:44 quicksilver: sorry, got to head off. That's interesting though... 10:06:55 --- join: sjanssen (n=sjanssen@CPE-76-84-191-66.neb.res.rr.com) joined #haskell 10:07:25 --- quit: ddarius (Read error: 110 (Connection timed out)) 10:08:12 --- join: Beelsebob (n=tatd2@91.84.210.102) joined #haskell 10:08:26 --- quit: malcolmw ("got to go...") 10:09:00 --- quit: MyCatSchemes ("Swim, swim, hungry!") 10:10:58 --- quit: locomalo ("Saliendo") 10:11:25 --- join: MyCatSchemes (n=rb6822@sietie.cs.bris.ac.uk) joined #haskell 10:11:42 has anyone here installed ghc on an intel mac before? 10:11:57 --- join: QplQyer (n=jeroen@dD5E0A79A.access.telenet.be) joined #haskell 10:11:57 --- quit: gour (Read error: 104 (Connection reset by peer)) 10:12:13 halcyon10: its certainly been done 10:12:57 --- join: gour (n=Gour@0-31.dsl.iskon.hr) joined #haskell 10:13:35 dons: my problem is: i am no unix expert so the installation guidelines at http://www.haskell.org/pipermail/glasgow-haskell-users/2007-May/012576.html are too complicated for me 10:13:36 Title: ghc-6.6.1 Mac (Darwin) Binary Dists, http://tinyurl.com/2hya9r 10:14:45 i hoped that someone here has done it before and could help me with the steps 10:16:03 I've done it. Nothing special for the installer. But... 10:16:18 those aren't really installation guidelines 10:16:25 you also need to make sure you have the two required frameworks in 10:17:07 ok, i downloaded and extracted the ghc package and the GMP and readline frameworks, what do i have to do now? 10:17:40 -- /Library/Frameworks first. 10:17:54 --- quit: mrighele ("Ex-Chat") 10:18:07 Drag the two frameworks into /Library/Frameworks. Then run the installer. That's it. 10:18:09 --- quit: jr_ (Read error: 113 (No route to host)) 10:18:09 -- ? 10:18:42 (sorry, my irc client kept eating the / at the beginning of the line, so I put --) :) 10:19:35 ah :) ok i'm in the frameworkfolder now. The GMP framework is already in there, perhaps from some other installation? 10:19:43 /say, yitz :) 10:19:54 Could be, then that's fine. 10:20:03 Hi MyCatSchemes 10:20:20 Ah, that's what I'm supposed to write? 10:20:33 --- quit: mikael () 10:20:36 /say /say 10:20:43 yitz: that's what most IRC clients do, anyway. 10:20:46 Got it! Thanks. 10:21:44 dons: ozzies can make some disgusting commercials 10:21:46 HTH, HAND. 10:21:55 halcyon10: do you happen to have macports installed? 10:21:57 --- nick: Lycurgus_ -> Lycurgus 10:22:06 dons: e.g. the movie in http://www.anti-smoke.com/every-cigarette-is-doing-you-damage-part-1/ 10:22:08 Title: Every Cigarette is Doing you Damage, Part 1Anti-Smoking Blog, http://tinyurl.com/34gdch 10:22:13 i have darwinports and fink installed 10:22:37 halcyon10: ghc is in darwinports IIRC, that is probably the easiest route for you 10:23:19 sjanssen: i already tried that, but portage only seems to have a PowerPC version available :/ 10:23:30 --- nick: Lycurgus -> Lycurgus_ 10:24:39 No, ports is NOT the easiest route. It compiles ghc and a bunch of other stuff. FIne if you want to let your mac churn for a few hours. 10:25:05 cpoucet: pretty big anti smoking movement in .au 10:25:40 yeah, I was surprised to find out I was the only smoker 10:25:44 well except from the guy from valencia 10:25:50 beppe 10:26:16 Oops, forgot, it's not an installer. Or an app (so don't drag it to Applications). Instead: 10:29:12 --- quit: JBGood (Read error: 110 (Connection timed out)) 10:30:10 --- quit: glguy ("leaving") 10:30:21 Unzip the archive (double-click works for me..) Then open a Terminal, type "cd (path to where you unzipped)", and follow the instructions in the file called INSTALL. 10:30:30 dons-> can you update pages of your maintened haskell modules to give the darcs repo in hackageDB ? ie ports repo give not a repository 10:30:39 --- join: mrsolo_ (i=mrsolo@nat/yahoo/x-95b2ecc5d222f5f0) joined #haskell 10:31:13 Which is: type "make install". That's it. (wish it were an installer or app, though). 10:31:30 yitz: do you mean the ghc archive or the readline archive? 10:31:52 ghc. The 2 frameworks you just drag into /Library/Frameworks. 10:32:27 --- quit: hkBst ("Konversation terminated!") 10:32:28 yitz: oh, and where is the readline framework located? 10:33:11 ghc download page says: http://www.haskell.org/ghc/dist/mac_frameworks/GNUreadline-framework.zip 10:33:13 http://tinyurl.com/2gxmur 10:33:52 --- join: DarthJesus (n=Godsmith@ip68-99-90-88.ph.ph.cox.net) joined #haskell 10:34:16 yitz: yes, i downloaded that but i'm not sure if i have to rum some script first to make the framework or if it is already compiled 10:34:35 No, it's all ready to go. 10:35:28 --- part: vaasu left #haskell 10:35:41 mmm, rum! 10:35:55 btw when i compile a module where is the best to install it ? 10:36:01 yitz: the file with the name GNUreadline (540kb,09.03.07) 10:36:07 yitz? 10:36:16 import Jamaica (rum) 10:36:21 Um 10:36:47 canabis* 10:37:21 When I downloaded it with Safari, it got automatically unzipped to GNUreadline.framework (could be the "framework" part doesn't appear for you) 10:37:50 So yeah. Just drag that to /Library/Frameworks. 10:38:04 yitz: ah, now i understand how these frameworks are organized, they are folders, i thought they were files, sorry for the confusion 10:38:24 --- join: olsner (n=salparot@cust.fiber-lan.vnet.lk.85.194.50.194.stunet.se) joined #haskell 10:38:38 yitz:ok, i have the frameworks ready 10:38:40 Apps are also folders, btw, with (sometimes hidden) extension .app 10:38:48 --- join: bos (n=bos@nat.945battery.lindenlab.com) joined #haskell 10:39:09 --- join: z` (n=nine@209-78-110-141.ded.pacbell.net) joined #haskell 10:39:10 --- nick: blarz_ -> blarz 10:39:15 * geocalc should ask again 10:39:16 yitz: yeah, i just didn't know that this applied also to frameworks 10:39:17 I loved it when I upgraded to the next OS X and all hidden .app extensions became visible. 10:39:32 Open a terminal (/Applications/Utilities) 10:39:54 lament: I think that is a Finder preference. 10:40:17 yitz:ok 10:40:33 Yep, the Advanced tab. 10:40:45 yeah, there it is :) 10:41:09 --- quit: lnxz ("Lost terminal") 10:41:21 --- quit: Adamant (Read error: 110 (Connection timed out)) 10:41:24 * geocalc asked : " when i compile a module where is the best to install it ? " 10:41:43 --- quit: doserj ("Leaving") 10:42:03 install it in your home directory? 10:42:13 --- join: lnxz (n=joachim@bjo1-1x-dhcp451.studby.uio.no) joined #haskell 10:42:13 geocalc: make a Cabal package and install it 10:43:33 ùùh happy want user local for exemple 10:43:37 --- nick: ntgrl -> integral 10:45:51 dons-> you saw my question about all your maintened modules ? 10:45:55 --- quit: mrsolo (Connection reset by peer) 10:46:12 --- join: mrsolo__ (n=mrsolo@dsl092-025-194.sfo1.dsl.speakeasy.net) joined #haskell 10:46:39 --- join: dons_ (n=dons@c-24-20-11-213.hsd1.mn.comcast.net) joined #haskell 10:46:50 --- quit: dons_ (Client Quit) 10:47:14 oops 10:47:43 --- join: pp (n=pp@user-0c2ihel.cable.earthlink.net) joined #haskell 10:48:00 geocalc: i don't know about dons, but i vaguely recall some irc clients may only highlight one's nick if it is followed by : 10:48:21 yitz: what do i have to do next? 10:48:57 What are you up to? 10:49:37 Do you have a terminal window yet? 10:50:00 yitz: i have both frameworks in my library/frameworks folder and i have the terminal window with path /Applications/Utilities 10:50:17 geocalc: you were asking about the `ports' package? 10:50:29 how is the speed of compiled haskell versus C ? oerjan didn't know that thanks 10:50:34 Type "cd " 10:50:55 yes dons 10:51:07 ok 10:51:34 type "make install" 10:51:39 and elses too dons 10:52:02 yitz: it says: make: Nothing to be done for `install'. 10:52:49 hmm... 10:53:01 OK. Try this Type "./configure" 10:53:02 do i have to configure first? 10:53:07 --- nick: cladhaire -> clad|away 10:53:42 --help yitz 10:53:46 ok, that worked, now im trying make install 10:54:47 I'm trying to teach my friend quickcheck, but I'm having trouble with polymorphism: propSorted = forAll arbitrary $ \ xs -> sorted(insertionSort(xs)) 10:54:57 insertionSort :: Ord a => [a] -> [a] 10:55:30 --- quit: gkr (Read error: 113 (No route to host)) 10:56:10 yitz: it worked! now it says: To use, add /usr/local/bin to your PATH. 10:56:14 you need concrete types for quickcheck 10:56:24 mrd, how do I get that? 10:56:28 :: [Int] 10:56:30 :t arbitrary 10:56:32 Not in scope: `arbitrary' 10:56:33 where? 10:56:45 somewhere it will annotate xs 10:57:08 I tried arbitrary::(Gen [Int]) and \ xs::[Int] 10:57:13 the forall arbitrary isn't needed 10:57:32 ok 10:57:39 ?check \ xs -> sort (xs :: [Int]) == sort xs 10:57:41 OK, passed 500 tests. 10:57:46 halcyon10: Great! OK. There are two parts to "adding it to your PATH" - once for now, in the current Terminal window, and another for the future. 10:57:52 --- join: lambdaphant (i=mmatuzak@minibar.rackmount.org) joined #haskell 10:58:01 --- join: dons_ (n=dons@c-24-20-11-213.hsd1.or.comcast.net) joined #haskell 10:58:01 prop_blah xs = sort (xs :: [Int]) == sort xs 10:58:04 --- quit: dons_ (Client Quit) 10:58:09 --- part: lambdaphant left #haskell 10:58:22 the elusive lambdaphant! 10:58:30 For now - well, let's see if it's already there. Type "ghci". 10:58:54 yitz: no, it says command not found 10:59:04 ?check \ xs -> (xs :: [Int]) == reverse (reverse xs) 10:59:06 OK, passed 500 tests. 10:59:42 --- quit: swiert () 10:59:44 ?check -> \xs -> reverse (sort xs :: [Int]) == sortBy (flip compare) xs 10:59:44 Parse error 10:59:53 PATH=$PATH:/usr/local 10:59:53 ?check \xs -> reverse (sort xs :: [Int]) == sortBy (flip compare) xs 10:59:54 OK, passed 500 tests. 10:59:54 Alright. Type "export PATH=$PATH:/usr/local/bin" 11:00:00 Then try it again. 11:00:32 --- join: Adamant (n=wtfmonki@unaffiliated/adamant) joined #haskell 11:00:48 why bin ? 11:01:04 --- quit: gour (Read error: 110 (Connection timed out)) 11:01:07 yitz: wow, it works :) 11:01:36 Good, almost done. Now for the future - 11:01:42 "To use, add /usr/local/bin to your PATH." 11:02:01 now put it in your bashrc halcyon10 11:02:56 In your favorite text editor, open the file /Users//.bash_profile 11:03:19 --- join: takamura (n=takamura@80.31.50.246) joined #haskell 11:03:19 --- quit: takamura (Client Quit) 11:03:28 bashrc better 11:03:53 in /etc 11:04:03 --- quit: mrsolo_ (Read error: 110 (Connection timed out)) 11:04:31 yitz: if the file doesnt exist i just create one with that name, right? 11:04:43 now put it in your bashrc halcyon10 11:04:47 in /etc 11:05:08 geocalc: er, /etc/bashrc is certainly not what you mean? 11:05:35 work for all users 11:05:49 geocalc: Hmm, we can do /etc. But PATH is usually done in profile, other variables in bashrc. That's the way it is on most Unixes. 11:05:56 even root 11:06:13 --- join: LunohoD (n=alex@e180076036.adsl.alicedsl.de) joined #haskell 11:06:20 ? 11:06:22 geocalc: my bash manpage says that /etc/bashrc isn't even read by bash 11:06:43 no _profiles here 11:06:53 halcyon10: OK, on geocalc's suggestion we'll look in /etc. So instead, open the file /etc/profile in your text editor. OK? 11:07:30 Bash is non-standard under most unices, as a small side note. 11:07:34 kosmikus: bashrc is usually called from the profile script, not automatically by the shell. 11:08:01 yitz:ok, the file exists, now i just copy the "export PATH=$PATH:/usr/local/bin" in there? 11:08:03 pejo: used to be csh, ksh, and sh were more popular. Not any more. 11:08:37 yitz: yes, but I don't see a point in creating a system-wide bashrc if there isn't one already 11:08:41 yitz: can as well do it in profile 11:08:55 OK, that's fine. Put it near the bottom (after anything else that deals with PATH). 11:08:57 yitz, systems aren't replaced that quickly, even if it might be 'standard' today. 11:08:59 yitz:ah, the path is defined in that file, now i see 11:09:12 You can just add it in there 11:10:04 --- join: jr_ (n=chatzill@f051078001.adsl.alicedsl.de) joined #haskell 11:10:06 --- nick: jr_ -> jr 11:10:11 yitz: ok. Hey, Thanks very much! That helped me alot 11:10:19 Linux users have been using bash almost exclusively for, oh, fifteen years or so. It's also standard on Darwin - which is where we are right now. 11:10:53 halcyon10: final test: close the Terminal window. Open a new one (any folder will do) and type "ghci" 11:11:25 yitz: yup, it works, very nice :) 11:11:28 I think zsh is a strong contender too.. but of course, bash being the default shell in most of the distributions (all non-minimal?), it must be the most used too 11:11:33 --- nick: mrsolo__ -> mrsolo 11:11:56 kosmikus: yes, we did it in /etc/profile. Thanks. 11:12:12 --- join: jbauman (i=jbauman@JBAUMAN.RES.cmu.edu) joined #haskell 11:12:56 * geocalc asked : how is the speed of compiled haskell versus C ? 11:13:06 flux: right zsh is fun. Hey, what about the Haskell shell? But right now I just want halcyon10 to get up and running as fast and easy as possible. (Boy this is a pain, we really need a mac installer for this.) 11:13:13 yitz: now i don't have to rely on hugs anymore... 11:13:36 yitz: ghc compiled haskell programs can be optimised to between twice as fast and twice as slow as C. 11:13:41 geocalc: that's really difficult to answer, because it depends very much on the exact program you're going to compile. 11:13:51 I like ghc - but I'm not trying to encourage anyone to convert or anything :) 11:13:55 typically, 2 or 4x slower for medium ability programmers 11:14:13 yitz, a real programming language in a shell can be fun, but I wonder if a strongly typed language is the right choice for a string-oriented environment, from usability point of view 11:14:14 compared to similar level languages: python, ruby, erlang, ghc haskell is 10+ x faster 11:14:37 comparing haskell to C is not too useful, I think, since the main competitors are the much slower interpreted, dynamic languages 11:14:53 Just mentioned it because someone (forget who) has been working on it... 11:15:00 dons: you're only comparing it to languages without a type system ;) 11:15:00 of course, there's a haskell hacker faction who live soley to defeat gcc 11:15:16 kosmikus: well, our serious competitors, who happen not to do types , yeah :) 11:15:21 much to their cost. 11:15:34 --- join: jfredett (n=jfredett@EULER.WIFI.WPI.EDU) joined #haskell 11:15:46 dons: we won't mention any names from that hacker faction, of course. 11:16:17 dons, supero?-) 11:16:19 --- join: Arnia (n=jgeldart@86.27.147.249) joined #haskell 11:16:21 heh 11:16:30 I love taking other people's arguments and replacing terms in them systematically to derive arguments for more extreme positions. 11:16:38 you can make a reasonable research career trying to outperform C in Haskell 11:16:39 mmh anyway since i discovered haskell i don't want to use else language ! 11:16:45 Cale: :) 11:16:49 http://programming.reddit.com/info/2y9jb/comments/c2yce9 11:16:50 Title: Testing Misconceptions #1: Exploratory Programming (a response to redditors and ... 11:17:08 Cale: then you should run for president 11:17:14 dons, people typically use the 'speed' as an argument against whatever language they don't want to switch to though. 11:17:16 i don't think haskell is 10x faster than lua 11:17:22 maybe with a contrived example 11:17:36 pejo: "ram usage" is also effective against Java ;-) 11:17:39 the problem is mainly that lua allows the programmer so much power, than program analysis doesn't have a leg to stand on 11:17:44 @go language shootout 11:17:46 i'd be surprised if lua could outperform ghc haskell in any area 11:17:46 http://shootout.alioth.debian.org/ 11:17:46 Title: The Computer Language Benchmarks Game 11:17:53 native code wins out every time 11:18:04 * CosmicRay hands dons /usr/bin/as 11:18:09 yeah of course 11:18:25 CosmicRay: :) 11:18:33 CosmicRay: all you need is echo -e 11:18:45 heh 11:18:57 http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=ghc&lang2=lua 11:19:02 Title: Haskell GHC benchmarks | Gentoo : Intel® Pentium® 4 Computer Lang ..., http://tinyurl.com/24lznt 11:19:04 lua v ghc, in heavily optimised code 11:19:07 --- join: Qerub (n=qerub@kr-lun-120-155-233-83.3.cust.bredband2.com) joined #haskell 11:19:13 --- quit: Arnia_ (Connection timed out) 11:19:23 looks like we're only down on meteor-contest, which is a naive haskell entry. 11:19:43 between 34 and 1.1x faster than lua 11:19:52 wha'ts the average, 4x? 11:19:54 --- quit: NichardRixon ("look i'm quitting") 11:20:11 yeah looks that way 11:20:20 i wonder how naive the lua entries are 11:20:33 What's the nicest way to fail hard (with error) when I get a Nothing instead of a Just? 11:20:36 you can certainly give it a kick up the arse by avoiding allocating new objects and that kind of thing 11:20:46 Qerub: fromJust 11:20:59 oerjan: And if I want to specify the error message? 11:21:13 fromMaybe (error "whatever") 11:21:14 fromMaybe (error "woops") ... 11:21:42 --- join: thetallguy (n=beshers@80.187.157.46) joined #haskell 11:21:45 --- quit: LunohoD_ (Read error: 110 (Connection timed out)) 11:21:49 Thank you! 11:22:09 Qerub: failing hard is a bit unhaskelly though :) 11:22:43 dons: I'm just following instructions for this assignment :) 11:23:13 you should write *total* functions! partiality is bad! 11:23:19 yeah! 11:23:29 kosmikus: didn't you hear, 2007 is the year of total haskell :) 11:23:40 Qerub: Of course, you could also just use case 11:23:50 the backlash against IO, fail, error begins *now* 11:23:56 case foo of Nothing -> error "..."; Just x -> ...x... 11:24:06 Cale: That doesn't qualify as nice in my world, I'm afraid, but thanks. 11:24:14 dons: I know that I still have a couple of years until I have to switch to Epigram 2 because I'm not interested in writing programs. 11:24:26 heh 11:24:35 Qerub: It's about the same as using fromMaybe 11:24:54 dons: is Lennart's timeline online? 11:24:59 i'd love to hack in epigram, and extract total haskell from it directly 11:25:06 oh, good question. 11:25:09 ?src fromJust 11:25:09 fromJust Nothing = undefined 11:25:09 fromJust (Just x) = x 11:25:09 augustss: ? 11:25:11 augustss: is your timeline online? 11:25:23 augustss: the one from the "Future" discussion, I mean ... 11:25:37 --- join: FMota_ (n=FMota@dhcp-36-203-57-69.cf-res.cfu.net) joined #haskell 11:25:37 --- quit: FMota (Read error: 104 (Connection reset by peer)) 11:25:45 --- join: snearch (n=snearch@e178044047.adsl.alicedsl.de) joined #haskell 11:26:09 i'd like to see a mirror universe future of haskell, that countered lennart's predictions :) 11:26:14 dons: why not run Epigram directly? 11:26:16 --- join: bluestorm__ (n=bluestor@mna75-1-81-57-39-150.fbx.proxad.net) joined #haskell 11:26:21 dons: not right now, of course. 11:26:29 beginnging with the dumping of the IO monad, integration of the Epigram type system, ... golden age of total haskell around 2012 11:26:42 yeah, i've played around with it. 11:26:46 --- quit: igel ("Leaving") 11:26:59 kosmikus: where was this discussion? 11:27:13 dons: I think the predictions might turn out to be quite accurate. And that doesn't even have to be a bad thing. 11:27:14 easy integration with haskell would be a killer app for any Epigram-2/Agda/.. potential haskell killer language 11:27:26 well, implicit IO is scary :) 11:27:36 but it may well be the golden age we're entering, i suspect. 11:27:40 dons: if Haskell's ideas flow into lots of other languages, I don't think that Haskell itself necessarily has to survive. 11:27:43 we've got 10 years to go. 11:27:58 kosmikus: you've seen the new pure data structures for C#? 11:28:07 if that's the future, i'm sad ;) 11:28:09 no 11:28:13 I haven't 11:28:23 but as you said, we have 10 years or so ;) 11:28:31 "http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx", 11:28:31 http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx" 11:28:32 let's use them 11:28:35 "Immutable data structures are the way of the future in C#" 11:28:47 yeah, we've 10 years. and maybe 5 to get parallelism to work (if that) 11:29:14 --- join: cinema (n=cinema@AMontsouris-151-1-90-94.w86-212.abo.wanadoo.fr) joined #haskell 11:29:16 --- join: Jedai (n=j@ALyon-252-1-64-125.w82-122.abo.wanadoo.fr) joined #haskell 11:29:17 we need to find some compiler hackers for the theorem proving/epigram/agda crowd 11:29:33 to finish the tools, and get them usable by a broader group. 11:30:05 I'm not a compiler hacker, but I'm definitely going to work more on Epigram/Agda from now on. 11:30:23 --- quit: Beelsebob () 11:30:42 yeah, i'd like to experiment a bit more too 11:31:09 I'd love to see proofs of stuff darcs does 11:31:14 proof-driven development 11:31:14 you have to give those languages a couple of years extra. with those languages, we're still in a phase where we don't know ourselves what we can do with them and how. 11:31:19 now there's a worthy buzzword 11:31:23 reminds me of Haskell when I started with it 11:31:32 Cale++ 11:31:41 --- join: tolik (n=Anatoly@zaretsky.apex.dp.ua) joined #haskell 11:31:44 what can i do when ghci gives me a stack overflow? 11:31:55 --- join: swiert (n=Wouter@88-106-135-208.dynamic.dsl.as9105.com) joined #haskell 11:32:16 Heffalump: aren't you trying to already "prove" that stuff by using GADTs? 11:33:16 reworj your code halcyon10 11:33:16 but I guess darcs would really make a nice project for programming in Coq and using code extraction 11:33:45 s/j/k 11:34:04 kosmikus: we're trying to prove a very coarse abstraction 11:34:17 geocalc: the code works fine for a smaller problem, it just gives the stack overflow for a bigger problem size :( 11:34:31 --- quit: pp (Remote closed the connection) 11:34:38 which in effect only operates locally, since we lose any global information once we quantify out one of the type witnesses we use 11:35:01 right 11:35:12 halcyon10: Maybe you rewrite it using tail recursion. 11:35:45 halcyon10: maybe you _think_ you are using tail recursion but are really building up thunks 11:36:14 +can 11:36:17 hm, honestly i don't have a clue what tail recursion is... 11:36:37 are you using foldl without ' ? 11:36:40 --- join: nominolo (n=nominolo@intothevoid.csbnet.se) joined #haskell 11:36:46 hpaste halcyon10 11:36:58 oerjan:yes 11:37:08 always a prime suspect 11:37:13 try adding ' 11:37:31 hehe, prime suspect 11:38:21 --- join: monochrom (n=trebla@red-gw29.cs.toronto.edu) joined #haskell 11:38:34 and if that doesn't help, hpaste 11:38:40 note you'll need to import Data.List to use foldl' 11:39:12 hey folks.. is the source code to lambdabot available? 11:39:25 sure arnar 11:39:28 @where lambdabot 11:39:28 http://www.cse.unsw.edu.au/~dons/lambdabot.html 11:39:36 cool, thanks 11:39:52 --- quit: OceanSpray (Read error: 113 (No route to host)) 11:39:58 --- quit: MyCatSchemes ("Swim, swim, hungry!") 11:40:32 --- join: OceanSpray (n=Shinku@cpe-76-169-78-244.socal.res.rr.com) joined #haskell 11:40:39 oh, brilliant, I can get it in my ghci :) 11:40:41 didn't know that.. 11:41:44 eh, apparently GOA is broken...? 11:41:59 halcyon10 pasted "stack overflow problem (execute command at the bottom)" at http://hpaste.org/3180 11:41:59 malcolmw++ 11:42:06 I haven't tried it but that's what I've heard. 11:42:07 Haskell Workshop videos! 11:42:31 byorgey: i thought i saw someone install it successfully just the other day 11:42:42 oh, really? I stand corrected then 11:42:59 I'll let you know if I try it.. 11:43:02 swiert: yeah, malcolm did a great job! 11:43:11 well, Arnar, at the very least be prepared for some difficulty in getting everything built =) 11:43:19 halcyon10 pasted "stack overflow problem (execute command at the bottom)" at http://hpaste.org/3181 11:43:33 dons: definitely! 11:43:42 crikey `The first location we hosted these at chewed through 100Gb of transfers in 24 hours' 11:43:46 --- join: Arnia_ (n=jgeldart@client-82-27-245-166.glfd.adsl.virgin.net) joined #haskell 11:43:54 i'm the code is too large for hpaste it seems 11:44:00 i'm not sure 'go easy' is going to work :} 11:44:13 - i'm 11:44:19 when compiling with ghc, is there some runtime embedded in the executable? 11:44:23 yeah 11:44:28 the 'rts' package 11:44:34 $ ghc-pkg list rts 11:44:34 /home/dons/lib/ghc-6.9.20070916/package.conf: rts-1.0 11:44:38 i'll post it in 2 parts 11:44:45 dons: ok, thanks 11:45:01 halcyon10 pasted "stack overflow problem (part1)" at http://hpaste.org/3182 11:45:13 halcyon10 pasted "stack overflow problem (part2)" at http://hpaste.org/3183 11:45:59 dons, it slowed down a lot after that, roughly 50G since they came online again. 11:46:00 --- quit: Arnia (Network is unreachable) 11:46:01 halcyon10: strange choice of pred vs. succ for Face... 11:46:11 --- quit: Torment (Read error: 110 (Connection timed out)) 11:46:17 sure you haven't reversed them? 11:46:20 pejo: is your uni happy/aware of this? :) 11:46:28 (or is someone else hosting?) 11:46:31 halcyon10 pasted "stack overflow problem (part3)" at http://hpaste.org/3184 11:46:55 Hm. So if I want fast mutable arrays, which of the bewilderingly large selection in the standard library should I be using? 11:47:43 err. 11:47:50 DRMacIver: there aren't that many selections 11:47:52 I suppose I mean the 'nonstandard library' :) 11:47:52 fast mutable arrays? Data.Array.Unboxed or Foreign.Array 11:47:54 --- join: Mr_Awesome (n=eric@par0442.urh.uiuc.edu) joined #haskell 11:47:54 you want IOUArray 11:47:57 ok 11:47:59 Thanks. 11:48:01 oerjan: ok, i'll replace the foldl's now 11:48:24 dons, lets not hurt the cause with politics. :-) 11:49:42 --- quit: paolino (Read error: 110 (Connection timed out)) 11:50:50 oerjan: ok, i just saw, i don't ave any foldl's in my code, what can i do else? and why strange choice of pred/succ? because Ace comes before King? 11:51:33 dons++ byorgey++ 11:51:45 ^^ is this how to give karma points? 11:52:05 yep :) 11:52:10 ?karma byorgey 11:52:10 byorgey has a karma of 3 11:52:12 --- join: boegel (n=boegel@88.197.160.180) joined #haskell 11:52:13 halcyon10: because pred is usually one smaller, not larger 11:52:18 cool, sorry I didn't know about it before :) 11:52:18 and reverse for succ 11:52:57 EvilTerran++ 11:53:09 oerjan: it bugged me that sort sorted in ascending order, since i needed it in descending order i changed succ and pred 11:53:15 what? 11:53:37 EvilTerran: oh, sorry.. should have privmsgd lambdabot on that, just adding karma for your help yesterday 11:53:48 oh, right. you're welcome. :) 11:54:35 --- join: LunohoD_ (n=alex@e180064142.adsl.alicedsl.de) joined #haskell 11:54:41 halcyon10: er... your Ord uses fromEnum, not succ and pred 11:56:33 oerjan:mmh, you're right, i was a bit confused by the whole ordering i must admit :/ 11:56:34 do we neet .torrent files for the Haskell Workshop Videos? 11:57:02 apparently =) 11:57:08 oerjan: i think it would be good to go through that code again... 11:57:18 --- join: jonathanv (i=jonathan@itt240-02.geog.uni.edu) joined #haskell 11:57:21 byorgey: is that easy to setup? 11:57:30 I have no idea 11:57:41 * roconnor has never run a tracker before 11:58:01 Use The Pirate Bay :) 11:58:16 dons, I liked your xmonad talk from the HW 11:58:19 when I read ``go easy on the server'' as ``get everything while you still can'' 11:58:21 I vote for torrenting the haskell workshop videos too. 11:58:27 halcyon10: what happens if you replace sum by foldl' (+) 0 in mean? 11:58:28 s/when // 11:58:32 * byorgey is going to get around to installing xmonad RSN... 11:59:23 Some torrent clients like Azereus double as trackers too. 11:59:42 oerjan: ghci tells me that foldl' is not in scope 11:59:43 byorgey: cheers :) 11:59:50 halcyon10: import Data.List 11:59:56 --- quit: bluestorm__ (Remote closed the connection) 12:00:01 oerjan: oh, ok 12:01:14 @vote TorrentifyHW2007Videos yes 12:01:14 voted on "yes" 12:01:41 @vote SPJforPrez yes 12:01:42 No such poll:"SPJforPrez" 12:01:44 --- quit: Adamant (Remote closed the connection) 12:01:44 boo 12:01:57 --- join: Eelis- (n=Eelis@unaffiliated/eelis) joined #haskell 12:02:09 @help vote 12:02:09 vote Vote for in 12:02:57 oerjan: it still computing, that's a good sign i suppose :) 12:03:05 's 12:03:15 --- quit: jbauman (Read error: 110 (Connection timed out)) 12:03:28 --- join: ADEpt (n=ADEpt@jabber.hst.ru) joined #haskell 12:03:30 longer than previously? 12:03:32 --- quit: jr (Read error: 113 (No route to host)) 12:04:02 oerjan: yes, before it threw the exception in under a minute 12:04:16 lonf computing on poker ! 12:04:16 guys 12:04:26 i hope you aren't using a naive simple majority vote counting system 12:04:31 how can i grab the nth item in a list? 12:04:36 s/f/g 12:04:40 pizza_: xs !! i 12:04:41 geocalc: lonf? 12:04:53 s/f/g 12:04:58 the only true way to count votes is ranked pairs 12:05:01 swiert: thanks 12:05:13 --- quit: xynn ("Leaving") 12:06:06 > product[48..52]/product[1..5] :: Double 12:06:08 geocalc: hehe, yes, it computes the equity to win in a headsup pokermatch so it has to look at at all possibilities to choose the five community cards out of the 52-3-3 cards 12:06:08 2598960.0 12:06:50 --- quit: LunohoD (Read error: 110 (Connection timed out)) 12:06:57 --- join: jbauman (i=jbauman@JBAUMAN.WV.CC.cmu.edu) joined #haskell 12:07:03 @src product 12:07:03 product = foldl (*) 1 12:07:14 ahhhh, it's lazy 12:07:19 --- join: Arnia (n=jgeldart@client-81-109-209-194.leed.adsl.virgin.net) joined #haskell 12:07:23 --- nick: sior|away -> sioraiocht 12:08:14 --- join: _roconnor (n=roconnor@vhe-540354.sshn.net) joined #haskell 12:08:24 it's strange that foldl' (+) 0 should work better than sum on a list of Doubles 12:08:39 <_roconnor> @show-poll TorrentifyHW2007Videos 12:08:39 Unknown command, try @list 12:08:40 @src sum 12:08:40 sum = foldl (+) 0 12:08:43 Not very strange. 12:08:44 oerjan: why? 12:08:56 @src foldl' 12:08:56 foldl' f a [] = a 12:08:56 foldl' f a (x:xs) = let a' = f a x in a' `seq` foldl' f a' xs 12:08:56 wouldn't ghc's strictness analyser know about Double? 12:09:02 <_roconnor> @poll-show TorrentifyHW2007Videos 12:09:02 ["yes"] 12:09:25 It shouldn't be a problem on -O2, no? 12:09:29 <_roconnor> jonathanv: only one option available, so majority rule is just as good as anything else 12:09:37 OK, that's strange, but I expect strictness analysers to be strange too. (Doesn't that make it unstrange? :) ) 12:10:05 two stranges don't make an unstrange 12:10:16 <_roconnor> @poll-result TorrentifyHW2007Videos 12:10:16 Poll results for TorrentifyHW2007Videos (Open): yes=1 12:10:21 --- join: IanY (n=user@212.183.134.65) joined #haskell 12:10:44 --- join: MarcWeber (n=marc@pD9E09502.dip.t-dialin.net) joined #haskell 12:10:46 (Define "strange" = "unexpected". If you expect it strange, is it still strange? :) ) 12:11:12 (Kind of like: the smallest uninteresting natural number is going to be interesting afterall :) ) 12:11:33 halcyon10: so if you didn't compile with -O2, it is possible that it would have worked without change if you had 12:11:38 why not just do it, rather than making a poll? 12:12:02 and if you actually did, we think it is strange that changing sum improved it 12:12:31 --- quit: Arnia_ (Connection timed out) 12:12:49 of course, condorcet winners are still chosen by people, which of course is a huge flaw 12:12:50 Heffalump: We need to expand the bureaucracy to meet the needs of the expanding bureaucracy. 12:13:36 +more use of the term "of course" 12:13:53 --- quit: jonafan (Read error: 110 (Connection timed out)) 12:14:01 <_roconnor> jonathanv: ? 12:14:15 <_roconnor> should they be selected by robots? 12:14:20 oerjan: ok, i see. At the moment i'm just using ghci but i'll try compiling, it's too slow at the moment anyway... 12:14:30 that's a good question 12:15:51 i lost a lot of faith in people choosing their leaders after we elected certain individuals into our government not once, but twice 12:15:57 --- join: erg0t (n=ergot@r190-64-208-226.dialup.adsl.anteldata.net.uy) joined #haskell 12:17:20 <_roconnor> well clearly by the definition of voting, people should select the winner 12:17:31 <_roconnor> so you are asking if voting is a good idea or not 12:17:44 i guess 12:18:00 <_roconnor> jonathanv: I'm not sure that Bush was a condorcet winner. 12:18:05 <_roconnor> esp. in 2000 12:18:10 that's true 12:18:15 nader was in that election 12:18:40 --- quit: Eelis (Read error: 110 (Connection timed out)) 12:19:12 --- quit: SyntaxNinja (Read error: 110 (Connection timed out)) 12:19:26 --- nick: eddyp_away -> eddyp_ 12:20:16 --- join: gwern (i=gwern@gateway/tor/x-b1141bbc26ccccb0) joined #haskell 12:20:26 since i was bored, i just tested, sum [1..520175] still works on my machine, sum [1..520176] throws an exception, so that seems to be the size of the stack 12:20:41 --- quit: roconnor (Read error: 110 (Connection timed out)) 12:23:56 --- nick: Eelis- -> Eelis 12:24:14 <_roconnor> jonathanv: well, I agree with you. We want anarchy as much as is reasonable 12:25:08 Oh, and the computation with foldl' just finished. The chance to win with a pair of aces vs a pair of kings is 81% :) 12:25:33 > takeWhile even . iterate (`div` 2) $ 520176 12:25:34 [520176,260088,130044,65022] 12:26:21 > 2^19 12:26:22 524288 12:27:02 > sum [1..520175] 12:27:04 135291275400 12:27:15 <_roconnor> halcyon10: go aces 12:27:24 --- nick: _roconnor -> roconnor 12:27:27 > sum [1..520176] 12:27:29 135291795576 12:27:44 geocalc: lambdabot uses -O2 12:28:04 there's also the question of whether bush was actually elected at all 12:28:24 * halcyon10 goes back to the table 12:29:21 is halcyon10 playing poker? 12:29:28 yep 12:29:49 texas holdem??? 12:29:58 yes 12:30:03 \m/ 12:30:53 halcyon10: do your opponents enjoy you going to your computer to compute odds? 12:31:05 i was just interested how good a flop is vs various hands so i thought i'll program something in haskell to get familiar with the language again and do something for my pokerknowledge :) 12:31:06 --- part: jutaro left #haskell 12:31:15 --- join: sendark (n=sendo@82-41-1-74.cable.ubr01.edin.blueyonder.co.uk) joined #haskell 12:31:53 i am trying to compile hat and i get this error: hmake: the compiler 'ghc' is not known. 12:31:56 any ideas? 12:32:01 --- join: _ry (n=ry@cable-81-173-134-106.netcologne.de) joined #haskell 12:32:08 i have ghc installed 12:32:10 roconnor: surely not. But i'll just use it offline i suppose 12:33:03 nevermind, i found a package 12:33:19 --- quit: boegel ("Leaving") 12:34:59 halcyon10: okay. I thought you were in the middle of playing, then went to check the odds of winning with a pair of aces, and then went back to the game with that info. 12:36:14 roconnor: no, i was just kidding. either my code or ghci isn't fast enough for that anyway... 12:36:22 --- quit: Arnia (Read error: 110 (Connection timed out)) 12:36:49 i think it took 20 minutes for that result... 12:37:07 predict which hand you'll have 20 minutes from now! 12:37:32 halcyon10: you'll likely see huge improvements with ghc -O 12:37:49 Botje: hehe, yes, i just have to learn th perfect shuffle 12:38:54 sjanssen: yes, i'll do that, i just have to write a small parser to input the pokerhands on the commandline 12:39:52 --- join: uccus (n=chatzill@bolbb140.dhaka.net) joined #haskell 12:40:59 --- quit: ndm ("CGI:IRC (Session timeout)") 12:41:45 --- join: thorkilnaur (n=thorkiln@0x573a343a.odnqu1.broadband.tele.dk) joined #haskell 12:43:34 --- join: dino-_ (n=dmorelli@adsl-072-148-044-011.sip.rmo.bellsouth.net) joined #haskell 12:44:30 --- join: omnId (n=Nick@node72.34.251.72.1dial.com) joined #haskell 12:46:36 --- join: fritschy (n=x06180@X715f.x.pppool.de) joined #haskell 12:48:28 --- quit: dino- (Read error: 113 (No route to host)) 12:48:39 --- quit: betty (Read error: 113 (No route to host)) 12:49:12 --- nick: dino-_ -> dino- 12:49:30 --- join: dogmaT (n=dogmat@r2aj154.net.upc.cz) joined #haskell 12:53:48 --- quit: thetallguy ("Leaving.") 12:54:21 Is there a simple, known algorithm for dicing a rectangle into N equal-sized pieces, such that the total perimeter length of the pieces is as small as possible? 12:55:13 for a square it'd be easy 12:55:19 not sure about rectangle 12:55:33 It's probably a square. How does it work, then? 12:55:38 well for a square 12:55:39 take N 12:55:43 and find it's prime factors 12:55:54 as we know, the shortest length is when your parts are as close to a square as possible 12:55:57 so 12:56:00 if N = x*y*z*w 12:56:05 where those are prime factors 12:56:17 find such a combination such that you get two divisors of N that are as close as possible to one another 12:56:20 or otherwise said 12:56:21 --- join: Tela (n=Tela@lawn-128-61-28-122.lawn.gatech.edu) joined #haskell 12:56:30 --- join: Arnia (n=jgeldart@client-82-13-28-155.brhm.adsl.virgin.net) joined #haskell 12:56:30 start from sqrt(N) and go downwards until you find a divisor and it's co-divisor 12:56:45 hi 12:56:58 --- quit: snearch ("Nettalk6 - www.ntalk.de") 12:57:00 That was my intuition, but I wasn't entirely sure about the "as we know" bit 12:57:04 Baughn: that sounds like problem of bubbles :) 12:57:17 --- nick: balodja1 -> balodja 12:57:19 balodja1: Bubbles? 12:57:32 it's easy to prove that a square is the shortest perimeter for a given area 12:57:56 cpoucet: a disk 12:57:59 Oh... oh. Yes. That /is/ obvious, since N is constant. 12:58:04 oerjan: Ii meant for rectangular shapes 12:58:04 hi Tela 12:58:30 well must the boundaries be horizontal/vertical lines? 12:58:44 i claim that it's irrelevant where you cut the rectangle as long as the cuts are parallel to one side of the rectangle 12:58:56 given a and b.... a.b=A (fixed... area) hence b = A/a .... perimeter = 2*a+2*b = 2*a + 2*A/a 12:59:08 then just find the minimum by differentiating with respect to a and settingg equal to 0 12:59:12 oerjan: "rectangular shape" 12:59:14 oerjan: I'm dicing a finite element model, so.. no, not necessarily horizontal or vertical, but it'll be quite jagged if not 12:59:25 oh the cuts 13:00:09 Baughn: pieces must be rectangular? 13:00:47 for example, if you divide a square in two, it seems to me a diagonal cut is best 13:00:48 balodja: The length of a diagonal piece would be the horizontal distance *plus* the vertical distance it stretches 13:01:06 balodja: No square roots need apply 13:01:15 so hamming-distance 13:01:28 Baughn: oh, so not ordinary perimeter length? 13:01:37 because if you cut a square in half and shift a vertical cut on the horizontal axis for example, then one of the new rectangles gains in perimeter what the other loses, so it doesn't affect the total perimeter where you start the cut as long as you don't cut diagonal 13:01:41 cpoucet: Wiki says yes 13:01:47 --- join: gour (n=Gour@37-98.dsl.iskon.hr) joined #haskell 13:02:03 oerjan: I prefer to stick with horizontal/vertical for another reason: It makes my code far simpler 13:02:18 halcyon10: yes, but it still matters how many vertical/horizontal cuts you make 13:02:19 it's gonna suck if you have a prime number of elements 13:02:22 oerjan: And the inner loop here is hand-tuned assembly 13:02:40 Baughn: it is easy to simplify code by solving a different problem :) 13:02:40 halcyon10: he did say 'equal sized pieces' 13:02:43 halcyon10: e.g. making one horiz. + one vert. is better than making three vertical cuts 13:02:49 halcyon10: which makes N=prime a pain 13:02:57 ok, i see 13:03:04 --- nick: pgavin-away -> pgavin 13:03:08 N represents computers. It would take a *lot* of communication to make up one node, but if anyone suggests a prime number of nodes I'll accidentally break one. ;) 13:03:12 have you looked into delaunay triangulation? 13:03:35 Baughn: with a hammer? 13:03:51 cpoucet: tail -n -1 should do 13:04:05 Anyone want to help with some monad juggling? 13:04:11 Tela pasted "Making monads look like russian dolls..." at http://hpaste.org/3185 13:04:19 --- join: kscaldef_ (n=kevin@75-164-176-13.ptld.qwest.net) joined #haskell 13:04:32 another question: must the cuts be at integer coordinates? 13:04:39 Tela: easy to fix ;) 13:05:00 cpoucet, halcyon10: Computation time absolutely dwarfs communication time, and the latter can be done simultaneously. Getting this separation perfect isn't that high a priority, I just need to avoid complete horror. 13:05:00 --- quit: dolio (Read error: 104 (Connection reset by peer)) 13:05:19 Getting the sizes /equal/ /is/ a priority, however 13:05:22 --- join: LunohoD (n=alex@e180068044.adsl.alicedsl.de) joined #haskell 13:05:23 (anonymous) annotated "Making monads look like russian dolls..." with "(no title)" at http://hpaste.org/3185#a1 13:05:25 --- join: dolio (n=dolio@nr5-216-196-210-207.fuse.net) joined #haskell 13:05:30 Tela: look at that 13:05:31 That said.. I'll go with counting down from the square root. That should suffice. 13:05:43 Tela: the problem was that 'Maybe' is the outer type, and that's not a MonadState 13:05:53 but, maybe -is- a monad 13:06:11 Baughn: well I have no idea what this is for, you just asked about splitting a rectangle.. 13:06:26 but the map holds FAction () values. 13:06:29 cpoucet: Yes, and it's diced very nicely now, thank you. :) 13:06:30 --- join: Beelsebob (n=tatd2@91.84.210.102) joined #haskell 13:06:36 man, there is always some serious computer science going down in this channel 13:06:41 cpoucet Hm, but that's not the goal. That dict has FAction () values, and lookupVal will maybe return one, if it is stored. 13:06:51 win 28 13:06:54 eiku 13:07:01 Tela: the issue is that you were workingg in monad "Maybe" 13:07:03 * sieni hands himself a / 13:07:07 Tela: monad maybe is not a monadstate 13:07:09 I think you want a type of FVal -> FAction (Maybe (FAction ())) 13:07:13 Tela: and you're using 'get' 13:07:25 --- quit: yitz () 13:07:27 right, that's just a specification of 'a' 13:07:32 russian dolls :) matreshka :) That's closer to monad transformers maybe. 13:07:52 but just saying 'a' isn't correct if it only returns Faction () values. 13:08:08 true 13:08:11 but it's more correct :) 13:09:15 Hmm. Ok, that's something I didn't think of that's more toward what I want it to do. It's still failing to load, but let me play with it for a bit. Thanks :) 13:09:18 Tela: so either 13:09:22 FAction (Faction ()) 13:09:23 or 13:09:28 FAction (Maybe (Faction()) 13:09:31 Stats I test: *do not want* 13:09:32 ni the second case you need a return 13:09:58 I put the return in and it's having problems matching the monotype 13:10:24 Tela annotated "Making monads look like russian dolls..." with "(no title)" at http://hpaste.org/3185#a2 13:10:56 Oh, wait. Is that because Map.lookup doesn't necessarily return in Maybe? 13:11:11 no 13:11:14 it returns in any monad 13:11:15 :t Data.Map.lookup 13:11:17 forall k a (m :: * -> *). (Ord k, Monad m) => k -> Data.Map.Map k a -> m a 13:11:22 --- quit: Rack (Read error: 104 (Connection reset by peer)) 13:11:51 Yeah. But shouldn't the type of lookupVal unify m and Maybe? 13:12:00 I would think so 13:12:05 --- quit: tolik ("Leaving.") 13:12:37 Hm. Then I can't think where the error would be coming from :S 13:12:39 though I have to admit 13:12:44 I would newtype Faction's 13:12:49 your definition is odd 13:13:08 newtype factin and make it an instance of monad 13:13:15 nobody makes monad stacks like that 13:13:19 Heh. I avoid newtype because I'm not sure I fully understand it and I've gotten really weird errors off it 13:13:46 Could you show me what you mean by that? 13:14:38 erk, although, afk 10 minutes. Sorry 13:15:45 type FAction a = (MonadState FState m, MonadIO m) => m a is not a legal declaration, i think 13:15:53 newtype is almost like a special case of data 13:16:15 although why doesn't ghc complain... 13:16:27 vincenz annotated "Making monads look like russian dolls..." with "fix" at http://hpaste.org/3185#a3 13:16:33 Tela: chheck that out 13:16:37 and i can't offhand figure any reason why the differences would elicit weird errors 13:16:37 --- quit: gour ("Quit (Haribol...from xchat)") 13:17:15 Tela: truth be told, storing actions of a certain monad within a state of that monad usually gives problems 13:17:43 --- quit: LunohoD_ (Read error: 110 (Connection timed out)) 13:18:30 (anonymous) annotated "Making monads look like russian dolls..." with "(no title)" at http://hpaste.org/3185#a4 13:18:33 like so 13:18:57 but anyways, I've always encountered problems with storing monadic actions of a state monad within that same monad 13:19:20 cpoucet: you need to pass through a data or newtype definition 13:19:40 oerjan: a second one? 13:19:52 i.e. type MyMonad a = State (MyMonad ()) a won't work 13:19:59 I did newtype 13:20:01 check the latest post 13:20:12 http://hpaste.org/3185#a4 13:20:19 that's why I said it was so odd 13:21:07 --- join: SyntaxNinja (n=ijones@gw-1.galois.com) joined #haskell 13:21:28 There's also a data declaration of FState, unless that's not good enough? 13:21:42 I had FState as a type synonym at first, but GHC refused due to cyclic types 13:21:59 Which is obvious... :) 13:22:20 --- join: Arnia_ (n=jgeldart@client-86-0-113-77.nrth.adsl.virgin.net) joined #haskell 13:22:38 --- join: pp (n=pp@c-71-232-26-86.hsd1.ma.comcast.net) joined #haskell 13:23:27 I feel like this is necessary though. I'm writing an interpreter for False, and I need to be able to define operators outside of the language itself. That makes me think that I need that map to have values of FAction () 13:25:09 --- join: doserj (n=doser@135-173.77-83.cust.bluewin.ch) joined #haskell 13:25:40 Tela: I think FDict should be a Map FName FVal, where FVal also contains FActionTs. 13:25:52 is the constant e programming into haskell anywhere? 13:26:03 > exp 1 13:26:07 2.718281828459045 13:26:08 riiiight 13:26:16 --- quit: Arnia (Success) 13:26:16 --- join: dataangel (n=prophet@146.113.42.153) joined #haskell 13:26:23 How is that going to improve it? I'm still going to have a loop back to FAction, no? 13:26:40 If I'm interested in learning about type theory, where should I start? Preferably free resources :) 13:26:58 Tela: names should also be able to hold Integers. 13:27:38 --- quit: _ry () 13:27:54 I was just going to have such a name hold the action to push some integer on to the stack. FInt is translated into that anyway 13:28:05 oh, okay 13:29:25 * oerjan cannot see anything wrong with FAction (Maybe (FAction ())), if that's what you want 13:29:51 oerjan: FACtion is a transformer 13:29:52 --- quit: IanY (Remote closed the connection) 13:29:56 oerjan: meaning that you need an 'm' 13:30:05 so what m do you place there? 13:30:12 it's not fully free as it depends on the m that called it 13:30:21 unless he makes FAction a specific monad 13:30:21 like 13:30:29 StateT FSTate IO a 13:31:25 I could do that. Hah 13:31:54 It's always amusing when the simpler answer works best... 13:32:37 Tela: you can generalize once everything's working :) 13:33:24 --- quit: chris2 ("Leaving") 13:33:34 --- join: andyjgill (n=andyjgil@c-76-105-238-134.hsd1.or.comcast.net) joined #haskell 13:34:05 I feel like I'm really close. I didn't realize how quickly you could bring a language like this up with a monad like that. I still have to write a parser, but I need to learn more about Parsec anyway. 13:34:37 --- quit: progexp101 (Remote closed the connection) 13:34:37 --- quit: dv^^ (Remote closed the connection) 13:34:38 --- quit: Nshag ("bbl") 13:34:38 Parsec makes it gravy :D 13:34:39 --- quit: gwern (Remote closed the connection) 13:35:07 I went through that Scheme in 48 hours tutorial and have been drooling to play with Parsec again 13:35:50 I have always thought of writing a Parsec parser for bibtex stuff. 13:36:11 --- join: Nshag (i=user@Mix-Orleans-105-2-137.w193-248.abo.wanadoo.fr) joined #haskell 13:36:23 --- join: shachaf (n=shachaf@66.17.178.31) joined #haskell 13:36:30 --- join: JBGood (i=jbauman@JBAUMAN.RES.cmu.edu) joined #haskell 13:36:32 Alternatively, Scheme in 48 hours doesn't do full Scheme. For example it omits the macro language IIRC. You can do that. 13:36:33 --- part: turulu left #haskell 13:36:50 (Coincidentally, the whole reason I ran into this specific problem — though I imagine it was only a matter of time — was because I saw how easy it'd be to add generic name assignment to False) 13:37:07 --- quit: ThePub (Remote closed the connection) 13:37:10 --- quit: dogmaT (Read error: 113 (No route to host)) 13:37:17 --- join: progexp101 (i=progexp@gateway/tor/x-2f601956c71f93fb) joined #haskell 13:37:37 --- quit: cognominal_ (Remote closed the connection) 13:37:51 monochrom, I started on that, but then stopped when I realized I'd rather do the CL Macros instead. 13:38:01 --- quit: phlpp ("Lost terminal") 13:38:05 --- quit: jbauman (Read error: 110 (Connection timed out)) 13:39:01 --- join: fasta (n=fasta@zonnebloem.demon.nl) joined #haskell 13:39:07 * dylan likes schemes that have define-macro 13:41:15 --- join: dv^^ (i=dv@gateway/tor/x-d92e4743ae1b142f) joined #haskell 13:41:28 * cpoucet likes haskell with side-effects :P 13:41:32 --- quit: sendark ("Lost terminal") 13:43:42 --- join: cognominal_ (n=cognomin@cac94-1-82-67-232-89.fbx.proxad.net) joined #haskell 13:43:46 --- join: KatieHuber (n=katie@gibson-cl.actrix.co.nz) joined #haskell 13:44:03 --- quit: kscaldef_ () 13:46:20 --- quit: Mr_Awesome (Read error: 110 (Connection timed out)) 13:46:21 --- join: Arnia (n=jgeldart@82.2.53.210) joined #haskell 13:47:40 --- join: thoughtpolice (n=austin@c75-111-139-176.plaicmtc01.tx.dh.suddenlink.net) joined #haskell 13:48:13 --- join: gour (n=Gour@16-79.dsl.iskon.hr) joined #haskell 13:48:41 --- join: gwern (i=gwern@wikipedia/Gwern) joined #haskell 13:48:53 --- join: jr___ (n=chatzill@f051078001.adsl.alicedsl.de) joined #haskell 13:49:06 --- quit: pgavin (Remote closed the connection) 13:51:38 --- quit: Arnia_ (Read error: 110 (Connection timed out)) 13:54:23 --- quit: progexp101 (Remote closed the connection) 13:54:33 --- quit: QplQyer ("*poef* *roekwolk*") 13:54:37 --- quit: uccus (Read error: 110 (Connection timed out)) 13:54:37 --- join: scodil (n=scodil@c-24-10-28-142.hsd1.ca.comcast.net) joined #haskell 13:54:46 --- join: LunohoD_ (n=alex@e180068245.adsl.alicedsl.de) joined #haskell 13:56:41 --- join: arag0rn (n=arag0rn@61.2.59.114) joined #haskell 13:58:28 --- nick: clad|away -> cladhaire 13:58:42 --- quit: ttfh (Read error: 110 (Connection timed out)) 13:59:04 --- join: Arnia_ (n=jgeldart@client-86-0-85-22.leed.adsl.virgin.net) joined #haskell 14:00:05 --- join: progexp101 (i=progexp@gateway/tor/x-d7c0b3da403c3243) joined #haskell 14:01:11 --- join: jerbear (n=jerbear@216.54.203.74) joined #haskell 14:01:22 i've been looking at fp languages recently, but i don't know anyone who uses any of them... can someone explain to me what the advantage is over procedural languages? 14:01:37 ?users 14:01:37 Maximum users seen in #haskell: 420, currently: 382 (91.0%), active: 13 (3.4%) 14:01:44 you now know 382 people who use them 14:02:10 --- quit: Taejo ("Leaving") 14:02:14 381 14:02:16 @google haskell io for imperative programmers 14:02:18 http://blogs.nubgames.com/code/?p=22 14:02:37 advantages? concise programs, easier to reason about 14:02:39 mrd: 380 14:02:39 jerbear: clarity, easier to do a lot of things 14:02:40 380. I don't really use Haskell. I just hang out here for the chicks. 14:02:41 ^ that shows some nice advantages 14:02:52 minus lambdabot 14:02:57 ah good point 14:02:57 sorry, i wasn't trying to say nobody uses it, just that i don't know anyone personally (and consequently, have nobody to bounce questions off of) 14:02:58 379 now 14:03:06 jerbear: easier to model many different ways to compute things, depending on your application 14:03:14 minus cmeme, clog 14:03:36 and ChanServ 14:03:53 actually, +1 for lambdabot. she's definitely the biggest FP user I know. 14:04:02 hahaha 14:05:21 > map chr [73,32,108,105,118,101,32,70,80] 14:05:23 "I live FP" 14:05:42 > "yes!" >>= replicate 5 14:05:43 "yyyyyeeeeesssss!!!!!" 14:05:49 --- part: ADEpt left #haskell 14:06:02 --- quit: LunohoD (Read error: 110 (Connection timed out)) 14:06:11 hey there.. 14:06:44 --- nick: cpoucet -> vincenz 14:06:46 Stop abusing me 14:06:46 --- join: glguy (n=eric@unaffiliated/glguy) joined #haskell 14:07:47 > "no!" >>= replicate 5 14:07:49 I've installed GOA, but I don't know how to start ghci with it.. 14:08:44 --- quit: cinema ("Ex-Chat") 14:10:02 ?type (^) 14:10:04 forall a b. (Integral b, Num a) => a -> b -> a 14:10:13 doesn't GOA's readme say to copy some commands to your .ghci that shorcut :! lambdabot blah? 14:10:34 Some day lambdabot will pass Turing's test... 14:10:56 * mrd will never pass a Turing test 14:10:56 @vixen are you a bot? 14:10:56 no, why? do i seem "botty"? 14:11:02 oh, omnId you're right, sorry.. 14:11:21 @vixen are you a pot? 14:11:21 i truely am 14:11:46 @spell truely 14:11:49 @vixen can't spell 14:11:49 Does your mommie know you're here, little naughty boy? 14:12:59 @help spell 14:12:59 spell . Show spelling of word 14:13:03 @spell borked 14:13:21 --- quit: matt__r () 14:13:36 --- join: sorear (n=stefan@ip68-6-133-142.sd.sd.cox.net) joined #haskell 14:13:44 --- join: gour_ (n=Gour@19-251.dsl.iskon.hr) joined #haskell 14:14:16 --- quit: sjw (Read error: 110 (Connection timed out)) 14:14:38 --- join: matt__r (n=matt__r@CPE-121-209-185-196.nsw.bigpond.net.au) joined #haskell 14:14:43 --- part: matt__r left #haskell 14:14:58 byorgey, dons: tried GOA, not working like I think it should :/ 14:16:14 --- quit: Arnia (Read error: 110 (Connection timed out)) 14:16:18 as far as I understand, GOA is just lambdabot + ghci commands that shell out to lambdabot. 14:16:35 --- join: Arnia (n=jgeldart@client-82-20-9-159.brhm.adsl.virgin.net) joined #haskell 14:17:26 Arnar: sorry, I don't actually know much about it 14:17:56 --- part: jerbear left #haskell 14:18:05 --- quit: JBGood (Read error: 110 (Connection timed out)) 14:19:02 halcyon10: you might consider the annotate functionality on hpaste when you have a lot of related pastes 14:21:01 glguy: thanks for the tip 14:21:47 If GOA works at all, I'm suprised. Lambdabot is a horrific mess. :( 14:22:07 byorgey: don't worry, sorry for the ping 14:22:07 --- quit: Jaak ("leaving") 14:22:14 no problem 14:22:38 mostly I'm just reporting.. not looking for help :) 14:24:49 --- quit: iblechbot (Read error: 113 (No route to host)) 14:24:53 --- quit: gour (Read error: 110 (Connection timed out)) 14:25:04 --- nick: Lycurgus_ -> Lycurgus 14:26:42 --- quit: Arnia_ (Read error: 110 (Connection timed out)) 14:26:54 --- join: Arnia_ (n=jgeldart@client-86-27-130-100.winn.adsl.virgin.net) joined #haskell 14:30:35 --- quit: ivanm (Remote closed the connection) 14:30:43 --- quit: Daveman () 14:31:15 --- quit: takuan_dozo (Read error: 110 (Connection timed out)) 14:32:06 --- quit: gbeshers ("Leaving") 14:32:32 --- quit: timlarson_ ("Leaving") 14:32:53 --- quit: oerjan ("Good night") 14:33:36 --- join: Daveman (n=dave@pool-138-89-1-77.mad.east.verizon.net) joined #haskell 14:33:57 --- quit: cladhaire ("kthxbai") 14:34:20 --- join: cladhaire (n=cladhair@WoWUIDev/WoWI/Featured/Dongle/cladhaire) joined #haskell 14:35:28 --- quit: gour_ (Read error: 110 (Connection timed out)) 14:36:03 --- part: swiert left #haskell 14:36:13 --- join: nostrademons (n=Jonathan@pool-71-248-164-165.bstnma.fios.verizon.net) joined #haskell 14:38:00 --- quit: rickynils ("Lämnar") 14:38:09 --- join: locomalo (n=leandro@host80.200-117-121.telecom.net.ar) joined #haskell 14:38:23 --- quit: Beelsebob () 14:39:48 --- quit: Tela () 14:40:52 --- quit: Arnia (Read error: 110 (Connection timed out)) 14:42:16 --- join: Philippa (n=flippa@cpc1-clif3-0-0-cust647.nott.cable.ntl.com) joined #haskell 14:42:16 --- quit: Philippa_ (Read error: 104 (Connection reset by peer)) 14:42:21 --- nick: Arnia_ -> Arnia 14:44:26 --- quit: kpreid (Remote closed the connection) 14:44:29 --- join: kpreid___ (n=kpreid@cpe-24-59-154-165.twcny.res.rr.com) joined #haskell 14:45:45 --- quit: jwp_ (Read error: 104 (Connection reset by peer)) 14:46:20 --- join: ddarius (n=derek@74.197.10.104) joined #haskell 14:47:08 --- quit: augustss (Read error: 110 (Connection timed out)) 14:47:50 --- join: jwp_ (n=jwp@mail.icrossing.com) joined #haskell 14:48:02 --- join: phb2 (n=phb2@c213-100-44-22.swipnet.se) joined #haskell 14:48:28 --- join: JBGood (i=jbauman@JBAUMAN.WV.CC.cmu.edu) joined #haskell 14:48:34 --- quit: jwp_ (Client Quit) 14:50:01 --- join: augustss (n=Lennart@63.175.43.10) joined #haskell 14:51:19 --- quit: dcoutts_ (Remote closed the connection) 14:51:49 --- quit: byorgey (Read error: 110 (Connection timed out)) 14:51:54 --- quit: CosmicRay ("Client exiting") 14:52:04 --- join: dcoutts_ (n=duncan@gentoo/developer/dcoutts) joined #haskell 14:52:59 @. elite brain 14:52:59 iT iz0rz HEr3 +h47 /\/\Y (|-|e4p WORKphORCE 0F TRaINED iGUANa$ \/\/ill \/\/0rk ni9h+ anD Day TO /\/\Axe oUR S|-|OES tO mY 3X4(TiN9 sp3cIFIca+IOns! 14:54:02 Is there a substring function for normal Strings? 14:54:23 --- quit: roconnor (Read error: 104 (Connection reset by peer)) 14:54:42 take len . drop index 14:55:25 omnId: ? 14:55:36 > (take 3 . drop 2) "hello, there" 14:55:37 "llo" 14:55:40 --- nick: kpreid___ -> kpreid 14:56:16 --- join: Tela (n=Tela@128.61.90.108) joined #haskell 14:56:24 --- quit: pizza_ (Read error: 110 (Connection timed out)) 14:57:17 * SimonRC goes to bed 14:58:32 --- quit: lnxz ("leaving") 14:59:11 --- join: Beelsebob (n=tatd2@91.84.210.102) joined #haskell 15:00:00 --- join: vwx (n=bwsx@chat.chabotc.nl) joined #haskell 15:01:49 --- join: dibblego (n=nobody@CPE-61-9-214-69.static.qld.bigpond.net.au) joined #haskell 15:01:58 --- quit: ski (Read error: 110 (Connection timed out)) 15:02:01 dibblego pasted "What's going on with the inferencing here?" at http://hpaste.org/3186 15:02:16 --- quit: Japsu (Read error: 110 (Connection timed out)) 15:02:34 --- quit: therp (Read error: 113 (No route to host)) 15:02:38 @pl (\ ((a,b),c) -> If a b c) 15:02:38 uncurry (uncurry If) 15:03:00 dibblego: a name = val definition involves the monomorphism restriction 15:03:19 omnId, thought so, thanks 15:05:00 --- join: ThePub (n=nathan@host-172-160-220-24.midco.net) joined #haskell 15:05:28 --- join: TSC` (n=user@ppp121-44-253-145.lns4.mel4.internode.on.net) joined #haskell 15:06:00 --- quit: piis3141 () 15:07:38 --- quit: seancorfield (Read error: 110 (Connection timed out)) 15:07:50 --- quit: omnId ("Leaving") 15:08:20 --- join: mikael (n=mikael@igloo.olf.sgsnet.se) joined #haskell 15:08:48 --- quit: Lunchy ("leaving") 15:09:15 --- quit: Nshag ("bbl") 15:09:32 --- nick: TSC` -> TSC 15:09:55 hello! how do i convert say a Int32 to little-endian format? 15:13:55 using Data.Bits or Data.Binary 15:14:17 dons: have a good trip home btw? 15:14:33 ?where hackage 15:14:33 http://hackage.haskell.org/trac/hackage 15:14:37 using Data.Binary, you'd say, putWord32le (7 :: Int32) 15:14:40 something like that 15:14:47 dcoutts_: yeah, it was ok. nice and short, anyway 15:14:51 dibblego: hmm, that's not a good link 15:14:59 @where+ hackage http://hackage.haskell.org/ 15:14:59 Done. 15:15:00 we're moving into our new apartment today, which is exciting 15:15:02 dons: i don't want to use Data.Binary because i want to stick with the stuff that already comes with ghc 15:15:05 dcoutts_, indeed, I just want FilePath 15:15:09 dcoutts_, thanks 15:15:15 ok. then Data.Bits, and you'll need to reimplement putWord32le 15:15:44 using shiftR 15:16:01 dons: but how can i implement convert (Int32) into (Word8, Word8, Word8, Word8) ordered in host endianness? 15:16:01 --- quit: xsdg (Connection timed out) 15:16:07 --- join: pizza_ (n=pizza@ool-43564eb6.dyn.optonline.net) joined #haskell 15:16:12 using shifting and masking 15:16:13 --- join: byorgey (n=byorgey@pool-72-75-126-101.washdc.east.verizon.net) joined #haskell 15:16:19 would you know how to do it in C? 15:16:24 (because the operators are basically the same) 15:16:30 --- quit: twanvl ("Good night") 15:16:33 --- quit: waern ("Lämnar") 15:16:43 dons: but how can i tell if the system is big or little endian? 15:16:48 > fromIntegral (7 `shiftR` 24) :: Word8 15:16:56 0 15:17:00 --- join: seancorfield (n=seancorf@c-67-160-202-22.hsd1.ca.comcast.net) joined #haskell 15:17:07 vwx: same way you'd do that in C 15:17:10 are there instructions for using packages of hackage? or do you just download source, compile and install? 15:17:20 dcoutts:_: in C the only way to do it is with a cast 15:17:20 s/of/off 15:17:39 dibblego: you can download, compile and install, or try the experimental 'cabal install' command (but you probably don't want to experiemnt :) 15:17:48 dons, not now, thanks :) 15:17:48 vwx: fromIntegral performs the required cast 15:18:23 ?docs Data.Bits 15:18:23 http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Bits.html 15:18:28 dons: i need to call a c function that wants an array of c ints. i want to make this array in haskell using ByteString 15:18:29 Can I use $HOME in :set -i? 15:18:42 fasta: Try it. 15:18:56 vwx: wouldn't you just write a 32bit int and then read in 4 bytes and check that way if the 32bit write was big or little endian? 15:19:05 ddarius: I don't know how to verify unless I load a file in that directory. 15:19:21 dcoutts_: write to where? 15:19:24 ddarius: i.e. is there a kind of query command? 15:20:00 --- quit: Tac-Tics ("Leaving.") 15:20:24 vwx: you might want to use a Storable array of Int32 15:20:31 vwx: rather than a bytestring 15:20:47 dcoutts_: hm.... 15:20:51 an Array of Int32 is what you really want, not an array of Word8, which is what a ByteString is 15:21:00 http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Array-Storable.html 15:21:02 http://tinyurl.com/ys3foq 15:21:25 vwx: in fact you want a StorableArray Int CInt 15:21:38 that is a 1 dimensional array of C ints 15:21:39 vwx pasted "float" at http://hpaste.org/3187 15:21:45 --- quit: JBGood (Read error: 110 (Connection timed out)) 15:22:04 hm.... also, i need to work with floats. i managed to write that function, but writing the inverse is tricky 15:22:24 vwx: again, use an array of CFloat 15:22:40 and if necessary do the byteswap on the array as a whole first 15:22:58 to convert little/big endian if you're getting data that's not native endian 15:23:21 for now i am only sending data 15:24:01 * dcoutts_ departs 15:24:42 vwx: hmm, Data.Binary would probably make this easdier, vwx, since it is designed for this job 15:24:49 --- join: Ras__ (n=rasmusul@213.237.107.120.adsl.od.worldonline.dk) joined #haskell 15:24:53 is there a convincing reason you can't use it? 15:24:59 since you'll be duplicating the functionality 15:25:03 dons: btw, if you can validate in the ghc-6.8 branch perhaps you can help us push some of those cabal patches into the cabal-1.2 branch 15:25:16 dons: i'll look into it, but Storable and StorableArray look like they will work 15:25:23 yeah 15:25:28 dcoutts_: ah ok. 15:25:37 i'll see if i can set up my tree for that 15:25:45 dons: aye, the conversion via binary looks like it was quite unnecessary anyway 15:26:08 dons: just a case of people having heard of ByteString but not the other nice things like "array"s :-) 15:26:51 and generic storable / foreign arrays at that 15:27:02 they clearly don't get enough press coverage :-) 15:27:11 i've actually used StorableArray before 15:27:20 --- quit: thorkilnaur ("Leaving") 15:27:25 but i didn't think of using it now 15:27:59 since ByteStrings are pure, and i figured that if it's doable in pure ByteStrings then it's preferable then mutable StorableArray 15:28:00 vwx: it's not immediately obvious from the docs that you can do IO using them 15:28:22 vwx: hmm, that's true 15:28:38 vwx: but if you're building ByteStrings bit by bit, you'd really want to use Data.Binary 15:28:58 otherwise it's quite inefficient unless you can write your producer as an unfoldr or something 15:29:30 dons: aye, so that'd be quite helpful, you know the patches we need to get cabal-install working 15:30:08 dons: and there are some others we should move over too, basically all the patches in cabal head that are not related to dynamic libraries 15:30:24 in case you guys are curious i'm working on a quake 2 model viewer: 15:30:24 http://img402.imageshack.us/img402/7205/modelviewerop9.png 15:30:31 vwx: oh, cool 15:30:44 using GL I guess 15:31:03 i'm not sure cabal-install will be ready to go though 15:31:08 yes. i want to make it faster by using opengl vertex buffers. these require me to make a big array of float to upload to the graphics card 15:31:09 we need a firm deadline from Igloo et al 15:31:35 --- join: oscz_ (n=cryo@80-248-251-133.cust.suomicom.fi) joined #haskell 15:31:35 --- quit: oscz (Read error: 104 (Connection reset by peer)) 15:31:42 dons: no, but like we said, we need the patches to cabal-1.2 so that we'll be able to build cabal-install easily with the version of cabal that ghc-6.8 comes with 15:31:48 yep 15:31:57 is there any good stuff to get started on ghc hacking? 15:32:07 --- quit: cmarcelo ("Leaving") 15:32:11 sioraiocht: the ghc developers wiki 15:32:11 the ghc hackers videos from the hackathon? 15:32:14 * sioraiocht might be doing so for his dissertation. 15:32:20 cool! 15:32:24 dcoutts_: thanks 15:32:26 there's the ghc commentary on the ghc wiki 15:32:29 we need more ghc hackers with 4 years of their lives to donate :) 15:32:33 ha 15:32:36 --- quit: Beelsebob () 15:32:38 yes indeed 15:32:41 and if you're looking for jobs, dcoutts_ and I have a list of things we want to go faster 15:32:48 right, I'm really off this time 15:32:54 ghc-6.8 is building again 15:32:57 cool 15:33:02 so time to leave it 'til morning... 15:33:16 g'night folks 15:33:34 night duncan. 15:33:52 @seen Lemmih 15:33:53 Lemmih is in #haskell. I last heard Lemmih speak 1h 31m 12s ago. 15:34:04 Yo. 15:34:21 dons: how far are you into your PhD? 15:34:25 Lemmih: hi. did you get that patch i emailed you for hsSDL? 15:35:49 vwx: Applied and pushed. Thanks. 15:36:03 cool 15:36:34 Lemmih: btw i pasted a few lines up a screenshot of a windows hsSDL application 15:38:10 Neat. 15:39:21 Oh, great...(Text.Regex.Posix.String died: (ReturnCode 11,"Invalid range end")) 15:39:28 @where hsSDL 15:39:29 http://darcs.haskell.org/~lemmih/hsSDL 15:39:32 --- quit: zygen () 15:39:51 I finally thought I had it working, a library function ***** up. 15:40:00 With a function like this: f Nothing = Just 1 ; f (Just x) = Just (x+1) , what's the easiest way to strictify the addition? 15:40:21 Just $! x+1 15:40:33 Ah, thanks 15:40:41 vwx: Is the source for that viewer online? 15:41:01 vwx: If so, it might be used to fix Frag on 64bit systems. 15:41:38 shapr: it's just a little demo, nothing close to the scope of Frag :) but i did write a custom PCX image loader for it =] 15:41:50 shapr: i'll put the source online soon, after i fix it up 15:41:59 --- join: ramza3 (n=Berlin@c-24-98-96-151.hsd1.ga.comcast.net) joined #haskell 15:42:06 Frag crashes on 64 bit systems when loading BSPs, it has some 32bitness hidden somewhere. 15:42:08 vwx: also, it loads quake 2 models. Frag is based on quake 3 assets i believe 15:42:13 Ah 15:42:22 Is there any other functionality besides regex that checks whether a certain string is a substring of another one? 15:42:25 the quake 3 model format is a lot more complicated 15:42:45 --- quit: blarz ("leaving...") 15:42:46 Even so, your model viewer might be used to make something that that doesn't do by-hand memory layout. 15:42:47 fasta: newer version of Data.List have isInfixOf 15:42:55 @src isInfixOf 15:42:55 isInfixOf needle haystack = any (isPrefixOf needle) (tails haystack) 15:43:30 sjanssen: how helpful, thank you 15:43:31 --- quit: BCoppens ("Konversation terminated!") 15:43:34 --- join: blarz (i=simon@blarzwurst.de) joined #haskell 15:43:45 @users 15:43:45 Maximum users seen in #haskell: 420, currently: 356 (84.8%), active: 12 (3.4%) 15:43:55 shapr: i have a few ideas in mind 15:44:04 The efficiency of that prodecure is a joke, but I don't need anything fancy now. 15:44:04 --- quit: erg0t (Remote closed the connection) 15:44:41 --- quit: jmelesky ("Leaving") 15:45:01 Wouldn't it be better to call something like that isInfixOfUltraSlowForLargeStuff? 15:45:09 sioraiocht: finishing up 15:45:24 --- quit: doserj ("Verlassend") 15:45:32 dons: ah, was wondering given you're writing a book and such 15:46:42 --- quit: olsner ("Leaving") 15:47:04 --- quit: boyscared (Read error: 104 (Connection reset by peer)) 15:47:13 which, btw, I can't wait to come out ;) 15:47:23 --- join: Randroid (n=gregory@static-72-91-82-26.tampfl.fios.verizon.net) joined #haskell 15:47:34 --- join: boyscared (n=boy@oh-76-5-125-71.dhcp.embarqhsd.net) joined #haskell 15:48:04 Hmm, is there any way to write ghci commands and reload them all? 15:48:12 Now, I need to exit Emacs and then try again. 15:49:34 Cool, I automated stepping :) 15:49:57 I wonder how ultra slow it will be... 15:50:33 It would be better if I could someone tell ghci not to print anything after a step command. 15:51:14 I guess that's what the GHC API is for? 15:55:13 Cale: re: PDD how serious were you? 15:55:29 @seen Cale 15:55:29 Cale is in #haskell-overflow, #haskell and #ghc. I last heard Cale speak 4h 30m 54s ago. 15:55:54 when I was messing with the API for a lib I've yet to release (mainly out of needing to, well, test it better) you can't capture the output of runStmt in any form 15:56:03 well, I found that out, at least. 15:56:12 --- join: xsdg (n=xsdg@XSDG.MIT.EDU) joined #haskell 15:56:32 i was going to use it for an eval mechanism but instead I just fell back on writing eval in terms of a temp file and loading it. 15:56:53 thoughtpolice: I use emacsclient for that now. 15:57:04 but I don't know what's changed in the new API with the debugger release and all. 15:57:36 But it seems I need a THz machine for it to complete. 15:57:45 i guess i'll have to investigate it when 6.8 hits. it's very soon, is it not? 15:58:10 thoughtpolice: you can better investigate with the rc 15:58:19 thoughtpolice: then things can still be changed. 15:58:50 Hmm, I cannot even switch buffers anymore. 15:59:10 fasta: i'll download a 6.8 snapshot onto openbsd when I have the time. 15:59:34 on a completely different note, my first alex/happy experiance went pretty well. 16:00:05 although I feel the AST is a bit ugly. maybe by the end of the day I can plug harpy into it... 16:00:07 thoughtpolice: my define a ghci macro experience too, too bad it's too slow. 16:00:53 It seems Emacs cannot cope with it. 16:01:04 That's using more than 8 times as much CPU 16:01:26 --- quit: Ras__ (Read error: 110 (Connection timed out)) 16:01:56 what AST is a bit ugly? 16:02:00 the link to the Applicative Programming paper in Control.Applicative gives a 404; anyone know where it is available? 16:02:18 --- nick: cladhaire -> clad|sleep 16:02:48 yay. I am no longer faceless! 16:04:09 SamB_XP: the one my program generates for basic arithmetic expressions. 16:04:56 dibblego: google still gets that 16:04:57 dibblego: try http://www.cs.nott.ac.uk/~ctm/IdiomLite.pdf 16:05:06 cheers! 16:05:13 I found it with Google scholar search 16:05:14 ex: the expression "20 + (30 / 2)" gives a tree of Op (Add (IntT 20) (Brack (Op (Div (IntT 30) (IntT 2))))) 16:05:23 --- join: Pseudonym (n=ajb@lindor.alicorna.net) joined #haskell 16:05:47 which is insanely hideous I would imagine; but I've never done parsing work like this before (i basically wanted an excuse to use harpy) 16:06:15 I find parsing oddly fun. 16:06:23 And I find that oddly disturbing. 16:06:58 you could also have grabbed the copy from the other authors web site 16:08:59 --- join: kscaldef_ (n=kevin@75-164-194-49.ptld.qwest.net) joined #haskell 16:09:25 Brack and Op seem spurious. Otherwise the AST is ok. 16:10:41 --- nick: sioraiocht -> sior|sleep 16:10:44 Pseudonym: You should. 16:11:06 monochrom: Brack isn't so dumb, sometimes. 16:11:22 Fortran's semantics are that parentheses are never "broken". 16:11:33 broken? 16:11:34 So a + b + c could be (a + b) + c or (a + c) + b 16:11:48 oh, that 16:11:48 But a + (b + c) never breaks the (b + c) addition. 16:11:59 It could be (c + b) + a, but never (a + b) + c 16:12:11 this only matters in floating-point right? 16:12:13 Right. 16:12:18 Which is important in Fortran. 16:12:24 Since God is real unless explicitly declared integer. 16:12:44 heh 16:12:47 --- quit: djfroofy ("Lost terminal") 16:13:09 --- quit: Giraph ("It's over 9000!!") 16:14:14 --- join: AtnNn (n=welcome@modemcable085.68-56-74.mc.videotron.ca) joined #haskell 16:14:34 There is no standard priority queue that people use, right? 16:14:46 Data.Set :/ 16:14:57 --- quit: fritschy ("Leaving.") 16:14:58 Which doesn't help. 16:14:59 that's not a real priority queue... 16:15:03 Right. 16:15:09 Pseudonym: I guess not 16:15:10 Data.Multiset might, if we had that. 16:15:30 steal something from okasaki or something 16:15:33 edison 16:15:35 works for me, because the last time i used a pqueue, i needed it to be a Set too 16:15:39 --- join: thou (n=tsmith@67-132-99-226.dia.static.qwest.net) joined #haskell 16:16:00 Yeah, I know about Edison, having briefly been its maintainer. 16:16:30 that's probably the closest you'll get to a standard priority queue :-( 16:16:39 I'm wondering whether collections is the right place for this. 16:16:41 --- join: chessguy (n=chessguy@ip70-187-207-1.dc.dc.cox.net) joined #haskell 16:16:58 * Pseudonym has just re-implemented his own priority queue type for about the 10th time 16:17:00 findMin on Data.Map can be a multiset =) 16:17:21 newtype PQueue p a = PQueue (M.Map p (S.Sequence a)) -- Not the most efficient possible type. 16:17:51 Pseudonym: why don't you use edison? 16:18:01 oh, sorry 16:18:20 didn't read the scrollback, you know about it :) 16:19:18 Pseudonym: I suppose the question still stands, why not edison? 16:19:57 Edison has some problems. 16:20:13 --- join: Giraph (i=Giraph@adsl-68-255-81-54.dsl.lgtpmi.ameritech.net) joined #haskell 16:20:16 --- quit: progexp101 (Read error: 104 (Connection reset by peer)) 16:20:45 Pseudonym: like? 16:20:46 Fewer, since we broke compatibility with H98, but still problems. 16:21:08 The only problem I have with Edison is that it doesn't work in 6.8 16:21:10 One philosophy behind Edison is that every data structure implements every operation. 16:21:21 That makes it very hard to add a new data structure. 16:21:26 That seems an odd philosophy 16:21:37 --- join: qwwqe (n=fluctus@unaffiliated/fluctus) joined #haskell 16:21:42 The point of a data structure is that it does one set of operations very fast. 16:21:44 --- quit: arag0rn (Read error: 113 (No route to host)) 16:21:48 Sure. 16:21:52 But... OK, here's the thing. 16:23:00 But the play's the thing! 16:23:01 why does every type implement every operation? are they hidden behind a typeclass or something? 16:23:12 Yes, typeclass. 16:23:36 [1..] !! 10000 is very slow, but still supported. 16:24:03 Sorry, boss key. 16:24:03 --- join: Eelis- (n=Eelis@unaffiliated/eelis) joined #haskell 16:24:07 haha 16:24:24 Yeah, I've done stuff... say you're implementing a virtual machine. 16:24:27 And you need a stack. 16:24:38 In C++, you'd say "Cool, std::stack it is." 16:24:56 Only to find that std::stack doesn't support peering at the second element. 16:25:45 which is the point of using std::stack 16:25:45 if you want to peer at the elements, you might as well use a deque or something directly 16:25:45 Right. 16:25:47 darcs add -r . should take longer, dammit! 16:25:49 But you don't know that in advance. 16:25:55 Yes, that is why a data structure should support the slow operations too. Document it as slow. But let people use it. 16:25:56 That's the Edison idea. 16:25:59 Right. 16:26:01 Pseudonym: not unless you've ever opened a C++ book 16:26:16 Eelis: No, you might not know in advance that you need to peer at the second element. 16:26:57 oh. yes. fortunately, changing from std::stack to something like std::deque is really easy 16:27:04 Right. 16:27:09 And that's also true in Edison. 16:27:11 Remember we're talking about abstract data types. If you hide the implementation, and your external interface lacks something, the user is SOL. 16:27:16 Bingo. 16:27:30 If you find a performance issue, you change one typedef, and then you're done. 16:27:59 type Arr a e = UArray a e :) 16:28:08 --- join: gravity (n=david@dsl092-079-075.bos1.dsl.speakeasy.net) joined #haskell 16:28:34 --- quit: jr___ (Read error: 113 (No route to host)) 16:28:43 If some nice data structure doesn't really support an operation (not even if you allow slow), perhaps the external type class needs to be factored. 16:29:06 (Like the infamous Num hierarchy! XD) 16:29:11 or just use pointers... 16:29:24 Yeah to peer at the second element you can pop ... 16:29:35 --- quit: thou_ (Read error: 110 (Connection timed out)) 16:29:47 as sucky as that might be 16:30:47 why does flixster assume that just because I want to see a movie I'll think it's good... 16:30:57 This example you can work around. In general there may be no workaround, or the workaround is 100 times more sucky than this example. 16:31:10 SamB_XP: Clearly if you didn't want to see the movie... 16:31:22 SamB_XP: because they might've assumed you aren't a masochist...? 16:31:24 E.g. peer at the 100th element. 16:31:33 haha 16:31:38 I want to see Episode III regardless 16:31:54 SamB_XP: Principle of Revealed Preference 16:32:44 Related OT: I know people who reason like this: "this movie sucks, therefore I'm right in watching a pirated copy" 16:32:56 (I don't actually follow the logic.) 16:33:18 Pseudonym: ok, sounds sensible. 16:33:23 yeah, really 16:33:36 --- quit: Giraph ("It's over 9000!!") 16:33:41 --- quit: Qerub () 16:33:51 --- join: Giraph (i=Giraph@adsl-68-255-81-54.dsl.lgtpmi.ameritech.net) joined #haskell 16:33:58 if you're going to pirate a movie, you might as well do it for a GOOD movie 16:34:38 --- join: felzix (n=felzix@c-69-181-208-216.hsd1.ca.comcast.net) joined #haskell 16:34:41 --- join: _ry (n=ry@cable-81-173-134-53.netcologne.de) joined #haskell 16:34:41 quite. otherwise the mpaa ain't going to loose too much 16:34:50 how embarassed would you be if you were taken to court over a bad movie? 16:34:51 Or do it for a movie that you can't get. 16:34:57 Something rare. 16:35:03 matthew-_: you need to reach the 58 billion of course :P 16:35:07 Like the original theatrical release of Star Wars. 16:35:20 is it available online? 16:35:28 No clue. 16:35:45 --- join: jjore-1 (n=jbenjore@c-24-16-241-176.hsd1.wa.comcast.net) joined #haskell 16:35:47 --- quit: _ry (Client Quit) 16:35:51 or Star Wars Holiday Special 16:35:52 Actually, that'd be a way to get me to pay up. 16:36:06 MPAA: I accuse you of pirating "Dude, Where's My Car"! 16:36:16 Me: I'll pay you $10k if you never repeat that. 16:36:25 Isn't pirating selling a non-retail copy? 16:36:27 they've released the THX remaster of Star Wars IIRC 16:36:44 I've heard of I, II, and III 16:36:46 but not IIRC 16:37:02 SamB_XP: release candidate 16:37:19 hahahaha! 16:37:25 it was great, but they scrapped it and made Attack of the Clones 16:37:36 * Pseudonym laughs 16:37:39 MPAA: We accuse you of pirating "Lord of the Rings" and we congratulate you on your choice of movie 16:38:23 One issue with that is that the better the movie, the less money it's worth, so the less actual damages they incurred. 16:38:34 MPAA: We accuse you of pirating "Adaptation"! 16:38:45 Me: OK, here's your $20. 16:39:32 what movie would they then say "we didn't think we could get that much for the rights!" about? 16:39:34 --- join: Beelsebob (n=tatd2@91.84.210.102) joined #haskell 16:39:47 Glitter. 16:39:52 Pi? 16:40:09 --- quit: Eelis (Read error: 110 (Connection timed out)) 16:41:27 I think this also works for music. 16:41:51 RIAA: We accuse you of pirating Britney! Haha, we can't believe people actually pay for it. 16:41:59 Glitter is my favorite movie, just as Visual Basic is my favorite programming language. 16:42:17 Visual Basic: The Movie 16:42:22 RIAA: How do we sleep at night? On top of a large pile of money with many beautiful ladies. 16:42:57 I'm not sure Visual Basic is bad enough to justify that analogy. 16:43:17 ouch 16:43:27 * Pseudonym is happy to say he has no clue what Glitter is about 16:43:33 All I know is who's in it, and that's enough. 16:43:43 It's like 8 Mile, only with Mariah Carey. 16:43:51 Also haven't seen 8 Mile. 16:44:02 8 Mile was not bad. Never saw Glitter. 16:44:05 I'm guessing that it helps to watch Glitter if you turn the sound down. 16:44:28 I happen to like Eminem, even if most of my musical taste is indie and punk. 16:44:39 Yeah, 8 Mile was actually a decent film. 16:44:44 I've heard that, yeah. 16:45:25 Eminem seems a bit like Enya, though. Quite different at the time, but career not moving in any direction to speak of. 16:45:36 --- join: lekro (n=christop@S01060014513484ae.ss.shawcable.net) joined #haskell 16:46:14 I think that's because he's made his pile of cash and is now enjoying it. Man, that's what I want. As much as I love programming, I'd never write another line if I had a huge pile of cash. 16:46:25 I would. 16:46:26 gah. get out! 16:46:28 But I'd write what I wanted. 16:46:36 Pseudonym: me too. 16:46:47 I'd write games all day long, until I got bored of that 16:46:54 I'd churn out Haskell libraries. 16:47:02 For a while, anyway. 16:47:14 hi. what happened to the Control.Monad.State documentation? The results for "put" don't lead me to the right place (or I didn't see it): http://www.haskell.org/hoogle/?q=put 16:47:15 Title: put - Hoogle 16:47:16 I used to be a nightclub doorman, so I still like that partying lifestyle. 16:47:22 Actually, if I was a musician, I'd go like Radiohead. 16:47:30 Still make music, but not require anyone to pay for it. 16:47:35 http://haskell.org/ghc/docs/latest/html/libraries/mtl/Control-Monad-State.html#v%3Aput is just a nearly empty page 16:47:37 http://tinyurl.com/yy4aqu 16:47:55 Follow the link to .Lazy 16:48:10 if i had all the money i wanted, i would very likely make music. 16:48:18 TSC: still no reference to put and get there 16:48:23 --- quit: cjeris (Read error: 104 (Connection reset by peer)) 16:48:33 Yeah, I see 16:48:35 lament: Cool! Can I be your producer? I'm pretty handy with a mixer. 16:48:38 I'd chase women. Not something I'm proud of, but I know myself. 16:48:52 --- part: misterbeebee_ left #haskell 16:49:30 Pseudonym: sorry, i don't have all the money in the world yet :) 16:49:34 Damn. 16:49:44 *** Exception: Prelude.read: no parse 16:49:46 ghc-6.9.20070927: panic! (the 'impossible' happened 16:49:56 That doesn't sound too good. 16:50:02 lekro: It's in Control.Monad.State.Class: http://haskell.org/ghc/docs/latest/html/libraries/mtl/Control-Monad-State-Class.html#v%3Aput 16:50:02 Randroid: well that goes without saying. 16:50:03 http://tinyurl.com/yuyeqp 16:50:27 Randroid: It's not something to be proud of but it's not something to be ashamed of either. 16:50:35 ddarius: So true. 16:50:48 depending on how good you're at it, you could be proud 16:50:51 --- quit: Axioplase ("leaving") 16:50:53 TSC: thanks. So is it a problem with hoogle that it doesn't link to this place? 16:51:14 I guess so 16:51:15 --- quit: jjore-w (Remote closed the connection) 16:51:23 --- join: stepcut (n=user@gateway.linspire.com) joined #haskell 16:51:30 lament: I generally do well. 16:52:00 My tastes for "doing well" would quickly lead me to not need the skill any longer. 16:52:18 So, I guess by metric, I don't do all that well... 16:52:22 --- join: Mr_Awesome (n=eric@par0442.urh.uiuc.edu) joined #haskell 16:52:22 heh 16:53:23 just marry and get it over with? :) 16:54:51 I almost went down that road. I'm almost 40, so I don't think it's going to happen, but I could be wrong. 16:55:01 lament: My main problem is finding a woman I'd actually be interested in. 16:55:55 --- join: progexp101 (i=progexp@gateway/tor/x-2c5b647ca8e50822) joined #haskell 16:58:22 I generally don't have any problem finding attractive women. It's attractive women who are a bit geeky that are hard to find. That'd be my perfect girl. 16:58:42 A Haskell hottie. Imagine that. 16:58:59 _|_ 16:59:09 --- quit: Giraph ("It's over 9000!!") 16:59:28 that would be, illogical. 16:59:39 pp: Oh, you're more of a "bottom" man than a "(.) . (.)" man? 16:59:39 hehe 16:59:55 dmwit: That made me laugh out lod. 16:59:57 *loud 17:00:13 I'm definitely a _|_ man. 17:00:15 Don't know about pp, though. 17:00:16 Why is it that everytime I try to build something, GHC breaks? 17:00:18 --- quit: monochrom ("Ex-Chat") 17:00:27 fasta: I've never had that problem. 17:00:43 Type errors of all kinds, yes, but I've never broken GHC. 17:00:46 Randroid: that's probably because you don't use extensions. 17:01:02 --- join: seafoodX (n=sseefrie@alphad261.lnk.telstra.net) joined #haskell 17:01:03 Randroid: I lost count, I think I am at about 50. 17:01:09 Wow. 17:01:46 Most of my errors can be fixed by -fallow-overlapping-instances and such. 17:01:56 --- join: gkr (n=notme@201-212-49-41.cab.prima.net.ar) joined #haskell 17:01:59 Simple stuff. 17:02:12 Randroid: I am talking about panics. 17:02:14 fasta: 50 extensions? 17:02:31 dmwit: 50 different GHC panics/crashes. 17:02:35 fasta: I know. I'm saying I don't get them, and the worst I get are simple compilation errors. 17:02:37 aha 17:03:28 is there a function : (Monad m) => m [a] -> [m a] ? 17:03:39 @src read 17:03:40 read s = either error id (readEither s) 17:03:46 @src readEither 17:03:46 Source not found. Sorry about this, I know it's a bit silly. 17:03:53 Yes, it is. 17:04:01 --- quit: ptx_ (Read error: 110 (Connection timed out)) 17:04:32 dibblego: Sounds like that would be a way to escape the monad...? 17:04:49 dmwit, yeah I got it wrong anyway (I don't want that function) 17:04:56 ok =) 17:04:56 --- quit: dolio (Read error: 104 (Connection reset by peer)) 17:05:37 --- join: dolio (n=dolio@nr5-216-196-210-207.fuse.net) joined #haskell 17:05:40 I just wanted fmap :) 17:06:14 --- quit: Randroid () 17:06:56 ?hoogle (Functor f) => (a -> IO ()) -> f a -> IO () 17:06:56 No matches, try a more general search 17:07:13 ?type flip bind 17:07:18 ?type flip (>>=) 17:07:18 Not in scope: `bind' 17:07:20 forall (m :: * -> *) a b. (Monad m) => (a -> m b) -> m a -> m b 17:07:24 of course, cheers 17:07:32 ?hoogle (MonadIO m) => (a -> m ()) -> m a -> IO () 17:07:32 No matches, try a more general search 17:07:35 dibblego: That function is in general impossible, you may be looking for Data.Foldable.mapM_ 17:07:45 dibblego: e.g. consider f = (Double ->) 17:07:49 --- join: Giraph (n=Giraph@adsl-68-255-81-54.dsl.lgtpmi.ameritech.net) joined #haskell 17:07:54 --- quit: seafoodX () 17:07:54 @ty Data.Foldable.mapM_ 17:07:56 forall a (m :: * -> *) b (t :: * -> *). (Monad m, Data.Foldable.Foldable t) => (a -> m b) -> t a -> m () 17:08:01 sorear, agreed 17:08:12 --- join: seafoodX (n=sseefrie@alphad261.lnk.telstra.net) joined #haskell 17:08:20 sorear: < dibblego> dmwit, yeah I got it wrong anyway (I don't want that function) 17:08:38 shachaf, I keep screwing up! 17:08:59 --- quit: seafoodX (Client Quit) 17:09:11 > read ""::Int 17:09:12 Exception: Prelude.read: no parse 17:09:28 Ok, good I found the bug now. 17:09:37 > read "" :: () 17:09:39 Exception: Prelude.read: no parse 17:09:40 --- join: oscz (n=cryo@80-248-251-133.cust.suomicom.fi) joined #haskell 17:09:42 > read "" 17:09:43 Exception: Prelude.read: no parse 17:09:51 GHC panics when you define a command that should take an argument, but don't give it. 17:10:06 read defaults to Integer on lambdabot, right? 17:10:13 So, it's a minor issue, but still should never happen. 17:10:26 At least, that's what I think it is. 17:10:29 Verifying it now 17:10:57 > let argumentless :: Int; argumentless x = 3 in argumentless 5 17:10:58 Couldn't match expected type `t1 -> t' against inferred type `Int' 17:10:59 --- quit: felzix (Read error: 104 (Connection reset by peer)) 17:11:05 > let argumentless :: Int; argumentless x = 3 in argumentless 17:11:06 The equation(s) for `argumentless' have one argument, 17:11:06 but its type `... 17:11:30 > let argumentless :: Int -> Int; argumentless = 3 in argumentless 17:11:31 add an instance declaration for (Num (Int -> Int)) 17:11:31 In the expression: 3... 17:12:06 Hmm, it is somewhat more complicated.. 17:12:55 Does lambdabot also do the :def command? 17:13:02 no. 17:13:13 Too bad, I could crash it easily. 17:13:22 :def foof (\a -> let z = read a::Int in return (show z)) 17:13:25 :foof 17:13:33 That will crash your favorite new GHC. 17:13:33 --- quit: kscaldef_ () 17:14:00 I just get an exception. 17:14:11 dmwit: what version? 17:14:20 6.6.1 17:14:39 dmwit: is :def even implemented in 6.6.1? 17:14:42 ":def foof (return . show . read)" is simpler. :-) 17:14:47 It seems to be. 17:15:01 fasta: of course GHC crashes 17:15:10 > let argumentless :: Int -> Int; argumentless x = 3 in argumentless 5 17:15:12 3 17:15:16 fasta: you just injected a bug! 17:15:24 --- quit: byorgey (Read error: 110 (Connection timed out)) 17:15:26 sorear: I know I miss an argument 17:15:33 sorear: that's no reason for panic 17:15:50 * Olathe panics for no reason. 17:15:51 fasta: yes it is, 'panic' means there was an exception in code called by GHC 17:15:59 Don't Panic. 17:16:00 :def foof (return . undefined) 17:16:02 fasta: which fits your situation perfectly 17:16:02 X <- You are here. 17:16:24 :def foof undefined 17:16:25 mycatverbs pasted "trivial uniq example" at http://hpaste.org/3188 17:16:35 sorear: well, then maybe it should know when it is executing user code? 17:17:03 sorear: and then throw a "you suck"-exception? 17:17:16 MyCatVerbs: How about: interact $ unlines . nub . lines 17:17:17 Or a more nice message, of course. 17:17:20 Pseudonym annotated "trivial uniq example" with "(no title)" at http://hpaste.org/3188#a1 17:17:46 dmwit annotated "trivial uniq example" with "shorter?" at http://hpaste.org/3188#a2 17:17:49 shachaf: that's what I'd do in ghc -e, but I wanted to demonstrate IO. 17:18:01 Or what Pseudonym said, if you don't want interact. 17:18:41 sorear: :def foof undefined does not make GHC manic. 17:18:48 panic* 17:18:58 sorear: so, those cases are not the same. 17:19:05 Pseudonym annotated "trivial uniq example" with "(no title)" at http://hpaste.org/3188#a3 17:19:30 fasta: :def foof return . undefined does. 17:19:33 And, of course, there's no reason for handle I/O in this trivial example. 17:19:52 --- quit: scodil ("Lost terminal") 17:19:52 even better 17:19:53 But I'm going with the flow. 17:20:02 --- quit: lucca (Read error: 110 (Connection timed out)) 17:20:06 shachaf: indeed, it does here too. 17:20:09 --- quit: nothingmuch (Connection timed out) 17:20:11 vincenz annotated "trivial uniq example" with "even nicer" at http://hpaste.org/3188#a4 17:20:44 Hmm, this doesn't happen in 6.6.1. 17:21:12 damn, forgot to remove hPutstr 17:21:16 and replace by simple putStr 17:21:40 We are now ready to thoroughly confuse whoever MyCatVerbs was trying to teach about IO. =D 17:22:01 suffice to say 17:22:02 nub is bad 17:22:05 it's O(n^2) 17:22:07 --- quit: oscz_ (Read error: 110 (Connection timed out)) 17:22:09 --- quit: pp ("noobs") 17:22:28 Pseudonym: Also, this doesn't behave like the UNIX uniq. 17:22:36 s/Pseudonym/MyCatVerbs/ 17:22:38 vincenz annotated "trivial uniq example" with "better" at http://hpaste.org/3188#a5 17:22:39 Yeah, for that you want noDups. 17:23:21 noDups? 17:23:25 Which, I note, isn't in Data.List. 17:23:37 noDups (x1:x2:xs) | x1 == x2 = noDups x2:xs 17:23:43 noDups (x:xs) = x : noDups xs 17:23:46 noDups [] = [] 17:23:51 Pseudonym: so it's only local 17:24:04 --- join: erg0t (n=ergot@r190-64-220-66.dialup.adsl.anteldata.net.uy) joined #haskell 17:24:12 > map head . group $ [1,2,3,3,2,4,1] 17:24:14 [1,2,3,2,4,1] 17:24:16 Maybe? 17:24:18 Left out some parens on that first rule. 17:24:28 @let noDups (x1:x2:xs) | x1 == x2 = noDups (x2:xs) 17:24:31 --- quit: glguy ("leaving") 17:24:32 @let noDups (x:xs) = x : noDups xs 17:24:33 Defined. 17:24:36 Defined. 17:24:36 @let noDups [] = [] 17:24:39 Defined. 17:24:44 > noDups [1,2,3,3,2,4,1] 17:24:45 [1,2,3,2,4,1] 17:24:45 > noDups [1,2,2,3,2,4,4,] 17:24:46 Parse error 17:24:46 > noDups [1,2,2,3,2,4,4,1] 17:24:47 [1,2,3,2,4,1] 17:25:07 * vincenz wishes there were a 2 element foldr 17:25:14 shachaf: I like your version better. =) 17:25:23 vincenz: foldr + zip? 17:25:37 Sachaf's version has the advantage that it gets deforested/stream fused/whatever. 17:25:38 dmwit: No, two elements from the same list (I assume). 17:25:39 dmwit: no, foldr down 1 list 17:25:49 shachaf 17:25:49 sur, I could foldr . zip l (tail l) 17:25:50 vincenz: foldr . uncurry ? 17:25:51 but that sounds nasty 17:25:54 --- join: Randroid (n=gregory@static-72-91-82-26.tampfl.fios.verizon.net) joined #haskell 17:26:05 Oh, nice idea! 17:26:12 vincenz: That's what I meant. 17:26:15 especially since it fails on one element lists 17:26:25 > let l = [1] in zip l (tail l) 17:26:27 [] 17:26:30 oh. yeah a two element foldr would be nice 17:26:32 use drop 1 instead of tail. 17:26:39 that's exactly the same 17:26:43 --- join: lucca (n=lucca@kuu.accela.net) joined #haskell 17:26:44 you don't get a last tuple is my point 17:26:48 vincenz: But... what would you prefer as behavior for 1-element lists? 17:26:49 foldr with lookahead 17:26:59 dmwit: a finial case of course 17:27:07 > map snd . filter (not . (==)) . ap zip id tail $ [1,2,2,3,2,4,4,1] 17:27:08 Couldn't match expected type `Bool' 17:27:13 just like foldr expects something to be done on empty lists (z), you want something for 1 element lists (f) 17:27:19 and then something for whenever you have 2 elements (g) 17:27:21 > map snd . filter (not . uncurry (==)) . ap zip id tail $ [1,2,2,3,2,4,4,1] 17:27:22 Couldn't match expected type `a -> [(a1, a1)]' 17:27:26 Recently I've been showing Haskell to a colleague of mine, who was intrigued but described it as too clever for its own good. According to him, it will never catch on because your average corporate programmer will never get it. However, I imagine the same was said about object-oriented languages when they first debuted. 17:27:32 (I realize functional languages are even older.) 17:27:40 > ap zip tail [1,2,3] 17:27:41 [(1,2),(2,3)] 17:27:47 Maybe? 17:27:53 ?pl \ (x,y) -> not (x == y) 17:27:53 uncurry (/=) 17:27:59 Randroid: And the average corporate programmer still doesn't get OO 17:27:59 > ap zip tail [1] 17:28:01 [] 17:28:02 > map snd . filter (uncurry (/=)) . ap zip id tail $ [1,2,2,3,2,4,4,1] 17:28:02 Couldn't match expected type `a -> [(a1, a1)]' 17:28:15 ?pl \x -> zip x (tail x) 17:28:15 ap zip tail 17:28:20 @let foldr2 z f g [] = z 17:28:20 > map snd . filter (uncurry (/=)) . ap zip tail $ [1,2,2,3,2,4,4,1] 17:28:22 [2,3,2,4,1] 17:28:26 Defined. 17:28:32 @let foldr2 z f g [a] = f a z 17:28:33 Yeah, almost works, apart from the first element. 17:28:36 Defined. 17:28:42 > map snd . filter (uncurry (/=)) . ap zip tail $ [1,1,2,2,3,2,4,4,1] 17:28:43 [2,3,2,4,1] 17:28:52 @let foldr2 z f g (a:b:xs) = foldr 2 (g a b z) f g xs 17:28:52 Couldn't match expected type `[a]' 17:29:03 ddarius: That's so true. I can't tell you how many times I've seen developers simply fail to use inheritance and polymorphism in a dirt-simple language like C#. 17:29:05 @let foldr2 z f g (a:b:xs) = foldr2 (g a b z) f g xs 17:29:08 Defined. 17:29:11 : foldr2 17:29:13 :t foldr2 17:29:15 Not in scope: `foldr2' 17:29:17 :t L.foldr2 17:29:19 Couldn't find qualified module. 17:29:22 * vincenz mutters 17:29:26 foil'd 17:29:56 > typeOf foldl2 17:29:56 foil'dr2? 17:29:57 Not in scope: `foldl2' 17:30:02 > typeOf foldr2 17:30:03 Add a type signature 17:30:09 @unlet 17:30:10 > show (typeOf foldr2) 17:30:11 Add a type signature 17:30:13 Defined. 17:30:15 @unlet foldr2 17:30:15 Parse error 17:30:16 @ty typeOf 17:30:18 forall a. (Typeable a) => a -> TypeRep 17:30:20 there was an error in it 17:30:35 @let foldr2 z f g [] = [] 17:30:35 :9:0: Warning: Pattern match(es) are overlapped In th... 17:30:38 there is no @unlet, only @undefine, which takes everything 17:30:41 @unlet foldr2 17:30:42 Parse error 17:30:44 @undefine foldr2 17:30:46 Undefined. 17:30:49 @let foldr2 z f g [a] = [] 17:30:52 Defined. 17:30:52 @forget foldr2? 17:30:52 Incorrect arguments to quote 17:30:54 @undefine foldr2 17:30:56 Undefined. 17:30:59 it takes everything! it doesn't take a parameter, just resets the whole @let state 17:31:29 @let foldr2 z f g [] = z; foldr2 z f g [a] = f a z; foldr2 z f g (a:b:xs) = foldr2 (g a b z) f g (b:xs) 17:31:30 Defined. 17:31:33 ddarius: I think learning Haskell makes one a better programmer overall, though. I've found my day-to-day corporate code, mostly written in Ruby or C#, has tightened up a bit. 17:31:35 --- join: ChilliX (n=chak@wireless-159.wireless.cse.unsw.EDU.AU) joined #haskell 17:31:48 --- join: Tac-Tics (n=tactics@71.239.99.94) joined #haskell 17:31:52 Randroid: I agree. 17:31:53 > foldr2 [] (:) (\a b l -> if a == b then l else a:l) [1,2,2,3,4,2,1] 17:31:55 [1,2,4,3,2,1] 17:31:58 there w go 17:32:06 Except the answer is wrong. 17:32:13 @src foldl2 17:32:13 Source not found. Take a stress pill and think things over. 17:32:21 Oh, it's backwards. 17:32:23 right, I oughta do this in vim instead of irc 17:32:24 That's okay. 17:32:34 it's foldr, not foldl :) 17:32:44 @src foldr2 17:32:44 Source not found. Take a stress pill and think things over. 17:32:46 > foldr [] (:) [1..10] 17:32:46 Couldn't match expected type `a -> b -> b' 17:32:54 > foldr [] (flip (:)) [1..10] 17:32:55 but vim doesn't talk back 17:32:55 Couldn't match expected type `a -> b -> b' 17:32:58 meh 17:32:58 Tac-Tics: It was ?let a little bit up, scroll back and you'll see it. 17:33:00 ok, emacs then 17:34:15 --- join: _achilles_ (n=acalhoon@74-140-222-133.dhcp.insightbb.com) joined #haskell 17:34:16 --- quit: gkr (Connection timed out) 17:34:23 --- join: gkr (n=notme@201-212-49-41.cab.prima.net.ar) joined #haskell 17:34:29 I am stepping through the code at the speed of snails. 17:35:06 snails...on speed? 17:35:17 A few hundred a second I guess. 17:35:37 But since the code normally executes at probably millions of steps a second... 17:36:06 step fasta! 17:36:11 Sorry, couldn't resist. 17:36:18 lol 17:36:49 If I was just born a few millenia later, I could ignore more constant factors.. 17:37:29 fasta: Well, you were born with a constant factor of that time. 17:37:47 --- quit: joe_hurd () 17:38:33 --- quit: Randroid () 17:38:39 --- quit: ksandstr (Read error: 110 (Connection timed out)) 17:38:53 --- quit: mathrick (Excess Flood) 17:39:04 --- quit: SyntaxNinja (Connection timed out) 17:39:29 LoganCapaldo: It was sort of a haha-only-serious thing. 17:39:35 --- join: mathrick (n=mathrick@users.kollegienet.dk) joined #haskell 17:40:59 --- quit: bos (Read error: 110 (Connection timed out)) 17:41:03 LoganCapaldo: I was pointing out another good approach while mocking their hard-line take on TDD. 17:42:13 --- quit: locomalo (Remote closed the connection) 17:42:19 --- join: agoode (n=agoode@2001:4830:1633:0:212:3fff:fe70:6222) joined #haskell 17:45:44 i just used parsec the first time. Man, i didn't know parsing is soo much fun :) 17:45:56 halcyon10: haha 17:46:18 Cale: that's what i thought but it was so well executed I couldn't tell if it was a _complete_ joke or if you were also throwing in some proof advocacy while you were at it 17:47:37 can you open a file for write, but create it and its parent directories if it doesn't exist? 17:48:08 There might be something in the filepath module for that. 17:48:17 I've been looking for it 17:48:21 But I don't think it's in System.Directory directly. 17:48:45 there is createDirectoryIfMissing; I could putsomething together with that 17:49:44 --- join: Randroid (n=gregory@static-72-91-82-26.tampfl.fios.verizon.net) joined #haskell 17:50:00 :r 17:50:20 *doh* 17:50:32 --- quit: Randroid (Remote closed the connection) 17:50:44 Cale: what comment are you talking about? 17:50:54 --- join: user317 (n=aeyakove@cpe-66-27-71-118.san.res.rr.com) joined #haskell 17:50:57 http://programming.reddit.com/info/2y9jb/comments/c2yce9 17:50:58 Title: Testing Misconceptions #1: Exploratory Programming (a response to redditors and ... 17:51:06 It parodies the article that it's attached to. 17:51:21 --- join: seafoodX (n=sseefrie@sseefried.ken.nicta.com.au) joined #haskell 17:51:28 I basically replaced "unit testing" with "identifying and proving algebraic properties" 17:51:29 --- quit: Plareplane ("Leaving") 17:51:31 --- quit: seafoodX (Read error: 104 (Connection reset by peer)) 17:51:33 a stress pill? 17:51:40 lambdabot: you must be kidding! 17:52:07 --- join: seafoodX (n=sseefrie@sseefried.ken.nicta.com.au) joined #haskell 17:52:51 --- quit: LPhas (Read error: 104 (Connection reset by peer)) 17:52:55 --- join: LPhas (n=Phas@81-208-106-68.ip.fastwebnet.it) joined #haskell 17:53:24 Cale: do you personally ever use unit testing? 17:53:39 Somewhat. 17:53:45 I've used quickcheck. 17:53:56 @src List.(>>=) 17:53:57 Source not found. stty: unknown mode: doofus 17:54:10 quickcheck is haddock on steroids 17:54:12 Most of the time I really do informally prove things in my head. 17:54:37 expressing algebraic properties > writing them in English 17:54:44 --- quit: LPhas (Remote closed the connection) 17:54:45 --- join: pgavin (n=user@c-68-35-209-18.hsd1.fl.comcast.net) joined #haskell 17:55:46 dons talk at the Haskell WS about xmonad and property driven development was excellent 17:56:41 augustss: is there a video online? 17:56:51 I don't know 17:56:51 http://www.ludd.ltu.se/~pj/hw2007/HaskellWorkshop.html 17:56:52 Title: Haskell Workshop 2007 - List of Accepted Papers 17:56:54 yes 17:57:25 There are links there to all the Haskell Workshop talks. I've been watching them on and off all day :) 17:57:31 yes, there seems to be :) 17:57:34 wow super sweet 17:58:11 Cale: did you see my 50 year retrospective? 17:58:34 Not yet, which one is that in? 17:58:50 --- quit: dataangel ("Leaving") 17:58:50 It's a 3 minute intro to the discussion 17:58:54 ah, cool 17:59:06 I mention that 1.3 was the last sane versio 17:59:09 heh 17:59:13 ooh, discussion 17:59:17 I bet that's the most interesting one 17:59:24 hmm anyone know if netbsd linker supports -rpath=\$$ORIGIN ? readelf -d shows that the RPATH is in the binary like on linux, but it doesn't seem to do anything 17:59:26 well, according to Aione in 2035 17:59:37 augustss: What do you think was the problem with 1.4? 18:00:27 Maybe I meant 1.4. I didn't have any internet connection when i prepared the slide 18:00:44 and it was )):30 after 5 beers 18:00:47 00:30 18:01:08 hehe :) 18:03:31 --- quit: fasta ("leaving") 18:05:21 --- join: sch (n=user@host-66-205-120-244.classicnet.net) joined #haskell 18:05:42 dataangel pasted "more newb compile problems :P" at http://hpaste.org/3189 18:05:44 any ideas how to make an inverse of this function? http://hpaste.org/3187 18:06:10 --- join: dataangel (n=prophet@146.113.42.153) joined #haskell 18:06:30 Anyone help with a newb compile problem? http://hpaste.org/3189 18:06:41 dataangel: min (x, y) is a problem 18:06:44 dataangel: min(n,length board - 1) :: (Int, Int) -> (Int, Int) 18:06:52 It's partially applied to a pair. 18:06:54 dataangel: min x y -- is what you want 18:06:55 oh @_@ 18:07:07 blinded by years of C++ 18:07:13 vwx: you can do it with decodeFloat 18:07:26 --- quit: Shimei ("This is an uncreative quit message.") 18:07:30 vwx: deconFloat (F# f#) = Word32# (unsafeCoerce# f#) 18:07:37 Yeah, there's encodeFloat and decodeFloat 18:07:58 i couldn't figure out how to tell how many bits the mantissa has with decodeFloat 18:08:07 W32# rather 18:08:14 vwx: you'd have to know 18:08:29 vwx: you don't need to know 18:08:34 > decodeFloat 1.5 18:08:36 (6755399441055744,-52) 18:08:41 see that -52? 18:08:56 > let (a,b) = decodeFloat 1.5 in a * 2^b 18:08:57 Exception: Prelude.^: negative exponent 18:08:59 vwx: you can figure out the number of bits with some of the other operations of floats 18:09:00 > let (a,b) = decodeFloat 1.5 in a * 2^^b 18:09:01 add an instance declaration for (Fractional Integer) 18:09:05 ** 18:09:10 > let (a,b) = decodeFloat 1.5 in fromInteger a * 2^^b 18:09:11 1.5 18:09:31 @type (^^) 18:09:34 forall a b. (Integral b, Fractional a) => a -> b -> a 18:09:37 --- quit: fox86 ("sleep") 18:09:45 :i RealFloat 18:09:59 er, yeah, not ** :) 18:10:32 I really liked SPJ's response to Harpy :) 18:10:34 vwx: floatRadix, floatDigits, and FloatRange help 18:10:46 but in the end, they don't give you the layout 18:11:00 (At least, I'm pretty sure that was SPJ's voice :) 18:11:16 vwx: if you really want the sequence of bytes, I'd just do some horrible thing with a memory buffer 18:12:18 augustss: but is Float guaranteed to always have the same representation on all haskell systems? and even if yes then there is still the need to deal with endian issues 18:12:38 --- quit: sch ("sleepy") 18:12:38 vwx: No, but decodeFloat always has to produce the same thing. 18:12:49 (or equivalent things) 18:13:31 vwx: it's not guaranteed in the standard, but it is in practice 18:13:31 what unary function always returns the empty list? 18:13:49 halcyon10: const [] 18:13:57 ah thanks! 18:14:47 is there a remote possibility that floatRadix will not be 2? 18:15:11 --- quit: cognominal_ (Remote closed the connection) 18:15:13 if you have a list of lists, is indexing an element: mylist !! x !! y, or is there a better idiom? 18:15:30 --- join: falconair_ (n=shahbaz@c-68-37-205-177.hsd1.nj.comcast.net) joined #haskell 18:15:57 vwx: there's a remote one. IBM360/370 would have 16 18:16:02 @type (!! 1 !! 1) 18:16:04 The operator `!!' [infixl 9] of a section 18:16:04 must have lower precedence than the operand `(!!)' [infixl 9] 18:16:25 augustss: is there a haskell system for that computer? 18:16:29 chessguy: I have no idea what that means 18:16:39 @type ((!! 1) . (!! 1)) 18:16:40 forall a. [[a]] -> a 18:16:46 vwx: I'm sure Hugs could be made to run 18:17:02 ah that makes sense 18:17:05 vwx: I've implemented arbitrary precision floats where I used 10 as a base 18:17:31 @pl \xys x y -> ((xys !! x) !! y) 18:17:31 ((!!) .) . (!!) 18:17:57 @pl \x y xys -> ((xys !! x) !! y) 18:17:57 flip . ((!!) .) . flip (!!) 18:18:06 does CLDouble have the same representation of Double? 18:18:11 lots of ways to do it :) 18:19:05 vwx: on my system, yes 18:19:18 vwx: try :info CLDouble in ghci 18:20:10 sjanssen. yes. so if i copy a "long double" from c into haskell and then back into c, i will lose precision? 18:20:16 --- quit: Jedai ("KVIrc 3.2.6 Anomalies http://www.kvirc.net/") 18:20:38 vwx: CLDouble should be the same as C's 'long double' 18:20:42 --- quit: user317 ("User disconnected") 18:20:52 that's the entire purpose to the Cfoo types 18:21:22 hm... so haskell Double is actually c "long double" and not "double" ? 18:22:09 there are no guarantees on the relation of Foo to CFoo types 18:22:22 > sizeOf (1 :: Float) 18:22:23 Not in scope: `sizeOf' 18:22:47 on my particular platform, Double, CDouble and CLDouble happen to be the same 18:23:12 --- join: cognominal_ (n=cognomin@cac94-1-82-67-232-89.fbx.proxad.net) joined #haskell 18:23:24 sjanssen: yes. this means that precision must be lost when a c "long double" (which is 10 bytes for 8 bytes for CLDouble) passes from c to haskell and back to c 18:23:58 GHC must be wrong, then 18:24:10 CLDouble *should* be the same as a 'long double' 18:25:26 --- quit: stepcut ("home") 18:25:37 maybe a LongDouble type should be added to haskell? 18:25:51 --- quit: cognominal_ (Client Quit) 18:27:38 vwx: this is probably worth a bug report or email to the glasgow-haskell-users mailing list 18:27:57 surely they are already aware of this issue 18:28:13 --- quit: mrsolo (Read error: 110 (Connection timed out)) 18:28:40 vwx: it should at least be documented 18:28:53 "LongDouble" is different on different platforms. 18:29:03 It's 128 bit on Sparc, 80 bit on x86. 18:29:16 And moreover, on Sparc it's software-emulated. 18:34:04 ?type isSuffixOf 18:34:13 forall a. (Eq a) => [a] -> [a] -> Bool 18:35:00 --- quit: jfredett ("Leaving.") 18:35:06 Is there a way to pass the elements of a tuple as the parameters of a function without writing them out? Like apply. 18:35:23 --- join: Randroid (n=gregory@static-72-91-82-26.tampfl.fios.verizon.net) joined #haskell 18:35:29 in python you can write f(*[3, 4, 5]) and it's the same as writing f(3, 4, 5) 18:36:05 dataangel: you can use uncurry for 2-tuples 18:36:59 sjanssen: that's good enough for now but why aren't their n-ary versions? 18:37:04 *there 18:38:21 --- join: earnest (n=earnest@ool-45737408.dyn.optonline.net) joined #haskell 18:38:43 dataangel: Haskell doesn't provide any generic programming for tuples 18:39:42 its just so rarely needed, you use lists and algebraic types instead 18:39:50 particularly the latter 18:40:39 is there a library to recurse down a directory, returning all filepaths? 18:40:46 dataangel: usually 3-tuples or larger are the wrong thing, anyway 18:41:29 dibblego: yeah, bos wrote a lib for this. check hackage 18:41:33 FileSomething 18:41:36 thanks 18:41:41 --- quit: z` ("null") 18:41:42 though its fun to write yourself 18:41:59 FileManip? 18:42:12 yeah I've written it; I just hate writing it twice :) 18:42:34 FileManip, yeah 18:44:01 --- join: jfredett (n=jfredett@EULER.WIFI.WPI.EDU) joined #haskell 18:45:14 --- join: cognominal_ (n=cognomin@cac94-1-82-67-232-89.fbx.proxad.net) joined #haskell 18:46:14 --- join: phs (n=philip@141.155.31.49) joined #haskell 18:46:14 why are some packages missing haddocks on hackage? 18:47:20 --- quit: Randroid () 18:51:30 that library is very well written 18:51:53 I wish the core of Haskell was like that 18:52:10 sjanssen: some didn't generate 18:52:15 ?type find 18:52:17 forall a. (a -> Bool) -> [a] -> Maybe a 18:52:27 dons: I'm especially curious why X11-extras doesn't have haddocks 18:52:38 oh, might not have been regenerated 18:52:41 check an older version 18:53:16 0.2 has haddocks 18:54:12 dons: so, are these manually generated every month or something? 18:54:17 something like that 18:54:21 a cronjob seems like a good idea. 18:54:25 --- quit: vwx ("Remote client closed connection") 18:54:28 or some on-demand script 18:54:34 X11-extras 0.3 has been on hackage for a very long time 18:54:43 did we check it works ? 18:54:59 'Setup haddock' works on my machine 18:55:33 --- quit: Mr_Awesome (Read error: 110 (Connection timed out)) 18:56:13 --- join: fyodor (n=fyodor@c-24-16-186-135.hsd1.wa.comcast.net) joined #haskell 18:56:34 is the ap function named after applicative (function application in a monad) and not its similarity to fmap? 18:56:35 --- join: k_dub (n=k_dub@63-227-5-182.hlrn.qwest.net) joined #haskell 18:57:23 --- join: mrsolo (n=mrsolo@adsl-68-126-209-150.dsl.pltn13.pacbell.net) joined #haskell 18:57:59 dibblego: after 'apply', I think 18:58:08 ah ok cheers 18:58:11 --- join: byorgey (n=byorgey@pool-72-75-126-101.washdc.east.verizon.net) joined #haskell 18:58:28 --- quit: k_dub (Client Quit) 18:58:49 ?hoogle (Monad m) => (a -> b) -> m [a] -> m [b] 18:58:50 No matches, try a more general search 19:01:26 --- join: Lunchy (n=Lunchy@68-114-238-224.dhcp.fdul.wi.charter.com) joined #haskell 19:01:46 --- quit: ac (Read error: 113 (No route to host)) 19:02:38 --- quit: sn ("jah dress") 19:02:39 --- nick: pgavin -> pgavin-away 19:03:02 --- join: pp (n=pp@c-71-232-26-86.hsd1.ma.comcast.net) joined #haskell 19:03:28 --- join: Shimei (i=asumu@sr-35.srtw01.resnet.ubc.ca) joined #haskell 19:04:56 @type liftM . fmap 19:05:01 forall (m :: * -> *) a b (f :: * -> *). (Monad m, Functor f) => (a -> b) -> m (f a) -> m (f b) 19:05:04 erm 19:05:07 @type liftM . map 19:05:09 forall (m :: * -> *) a b. (Monad m) => (a -> b) -> m [a] -> m [b] 19:05:21 dibblego: ^^ 19:05:29 ta 19:05:49 --- quit: byorgey ("Back to the real world...") 19:06:39 --- join: clanehin (n=lane@adsl-065-005-194-047.sip.rdu.bellsouth.net) joined #haskell 19:10:19 --- join: Adamant (n=wtfmonki@unaffiliated/adamant) joined #haskell 19:10:36 I noticed that there was some talk of a library to communicate with erlang's binary protocol...is there actual work being done on it? 19:10:49 --- join: tizoc_ (n=user@r190-0-151-233.dialup.adsl.anteldata.net.uy) joined #haskell 19:11:21 ?type fmap . map 19:11:23 forall (f :: * -> *) a b. (Functor f) => (a -> b) -> f [a] -> f [b] 19:11:34 --- quit: tizoc (Nick collision from services.) 19:11:36 --- nick: tizoc_ -> tizoc 19:12:37 --- join: goalieca (n=ryan@S010600134649440f.vf.shawcable.net) joined #haskell 19:12:46 --- nick: pgavin-away -> pgavin 19:13:30 --- join: ksandstr (i=ksandstr@a88-112-8-251.elisa-laajakaista.fi) joined #haskell 19:14:11 --- quit: qwwqe ("Leaving") 19:15:11 --- join: ski (n=slj@c-7013e055.1149-1-64736c10.cust.bredbandsbolaget.se) joined #haskell 19:15:50 --- part: phs left #haskell 19:17:15 --- quit: jfredett (Read error: 110 (Connection timed out)) 19:19:35 Gwern pasted "xmonad build error" at http://hpaste.org/3190 19:22:20 --- quit: ClaudiusMaximus (Read error: 110 (Connection timed out)) 19:25:25 <3 xmonad 19:25:57 iank: :) 19:25:57 ?hoogle (Functor f) => (a -> f b) -> [a] -> f [b] 19:25:58 No matches, try a more general search 19:26:07 iank: you should join #xmonad :) 19:27:09 why do people use liftM all the time when fmap will do? 19:27:38 it can be more intuitive 19:27:43 liftM (+) 19:27:46 versus fmap (+) 19:28:25 Are there any ICFP videos? 19:29:49 Korollary: everything was filmed, but it may take a while to psot-process 19:30:23 *post 19:30:54 --- join: mfunebre (i=mfunebre@71.231.2.6) joined #haskell 19:31:10 Korollary: http://www.ludd.ltu.se/~pj/hw2007/HaskellWorkshop.html 19:31:10 Title: Haskell Workshop 2007 - List of Accepted Papers 19:31:32 ?hoogle (a -> IO b) -> [a] -> IO [b] 19:31:33 No matches, try a more general search 19:31:35 everything was filmed for the ACM library, so we'll probably never see it again... 19:31:49 it won't be freely available, I guess? 19:33:25 aren't these the ones: http://www.ludd.ltu.se/~pj/hw2007/HaskellWorkshop.html 19:33:26 Title: Haskell Workshop 2007 - List of Accepted Papers 19:33:28 dons: Are you sure that was meant to be exclusive> 19:33:30 ? 19:33:44 I thought its justa way of archiving it 19:34:13 I'm having trouble thinking about how I'd write this function; is it even possible? (a -> IO b) -> [a] -> IO [b] 19:34:32 ChilliX: hmm, well malcolm recorded his own versions. it was only rumour that it was exclusive. it was definitely stated it was for the digital library 19:34:40 which usually means its non-free, doesn't it? 19:34:46 dibblego: mapM 19:34:51 --- join: ac (n=abram@D-69-91-137-134.dhcp4.washington.edu) joined #haskell 19:34:56 dons: But it wasn't on the initiative of the ACM 19:34:59 oh 19:35:01 ?type mapM 19:35:03 forall a (m :: * -> *) b. (Monad m) => (a -> m b) -> [a] -> m [b] 19:35:07 cheers :) 19:35:13 we should ask stefan 19:35:23 ah yes, i saw him changing tapes 19:35:23 which one? 19:35:31 sorear: stefan wehr :) 19:35:32 so maybe the rumours were misguided. 19:35:41 sorear: unless you know the answer? :) 19:35:47 * FMota_ wonders 19:36:04 would you have a turing machine if you had a scanner, a printer, and infinite amounts of paper? 19:36:04 dons: it is supposed to go into the DL; it's just that I assumed it not to be exclusive 19:36:05 :o 19:36:19 FMota_: Not without some logic. 19:36:23 i'd hope its non-exclusive, if ACM didn't do the work 19:36:44 FMota_: You'd also need to find some way to stop the paper from collapsing into a black hole 19:36:49 ddarius: the logic is already there. 19:37:01 sorear: smart-ass. 19:37:07 ;) 19:37:17 sorear: Just do the same thing Turing did with his tape. 19:37:19 FMota_: in general, the maximum amount of matter in a spherical region of space is proportional to the *radius*, not the volume 19:37:30 dons: pirate pirate! 19:37:53 :o 19:38:11 <_achilles_> is there a way to cast a type in a where/let? 19:38:13 hey, it's proportional to the circumference too! ;o 19:40:05 <_achilles_> ? 19:40:06 _achilles_: you mean add type annotations? 19:40:14 <_achilles_> yeah 19:40:24 is there a purely functional computer architecture? 19:40:37 > let { foo :: Int -> Int -> Int ; foo x y = x +y } in foo 2 19:40:39 Int> 19:40:45 > let { foo :: Int -> Int -> Int ; foo x y = x +y } in foo 2 3 19:40:47 5 19:40:59 pgavin: No. You would generate infinite amounts of garbage. :) 19:41:05 in other words, just like you would otherwise 19:41:06 lol 19:41:29 sorear: I think you could get close... at least on a small level 19:41:30 > let f = g where { g :: Int ; g = 3 } in f 19:41:31 3 19:42:11 if you took a normal risc isa and got rid of all the registers 19:42:17 you can use layout of course in an actual file 19:42:51 <_achilles_> ok... 19:43:03 <_achilles_> apparently that doesn't work for my case however 19:43:04 --- join: nothingmuch (n=nothingm@bzq-84-109-58-146.red.bezeqint.net) joined #haskell 19:43:12 Why does List.insert put its argument before the first element which is greater than it? Coming from C++ that seems like odd behavior -- I'd expect you'd give an index for where to insert the element 19:43:27 <_achilles_> but the help is appreciated 19:43:30 :t insert 19:43:32 forall a. (Ord a) => a -> [a] -> [a] 19:43:34 insert means "insert into a sorted list" 19:43:45 It's not a general "add to the list" function 19:43:56 @hoogle Int -> a -> [a] -> [a] 19:43:56 No matches, try a more general search 19:43:57 _achilles_: what's the problem? 19:43:58 --- join: wli (i=wli@DOMINIA.MIT.EDU) joined #haskell 19:44:02 @hoogle a -> [a] -> [a] 19:44:03 List.intersperse :: a -> [a] -> [a] 19:44:03 Prelude.(:) :: a -> [a] -> [a] 19:44:03 List.deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a] 19:44:08 it's just called insert though 19:44:15 Yes, as in insertion sort 19:44:22 <_achilles_> I'm looking to do: timeDiv n d = case n `mod` d of 0->1 + timeDiv (n/d) d; _ -> 0 19:44:28 dataangel: You, usually don't want to be inserting elements into the middle of lists. 19:44:36 true 19:44:39 not in haskell 19:44:44 * sjanssen laughs out loud at augustss's 'Haskell 2037' presentation 19:44:51 I've discovered that there is some interest in NIH'ing IMVU. 19:45:02 <_achilles_> looks like I want quot? 19:45:05 @type mod 19:45:07 forall a. (Integral a) => a -> a -> a 19:45:12 @type (/) 19:45:13 forall a. (Fractional a) => a -> a -> a 19:45:19 <_achilles_> @type quot 19:45:21 forall a. (Integral a) => a -> a -> a 19:45:31 or div 19:45:34 @type div 19:45:36 forall a. (Integral a) => a -> a -> a 19:45:40 <_achilles_> ah 19:45:43 <_achilles_> mk 19:45:50 They may also be interested in using Haskell to speed up program development (they're largely content creators). 19:46:10 (IIRC div quot and rem / mod differ mainly in their behavior with negative numbers) 19:46:34 --- join: Kahdloc (n=Crystals@c-75-66-221-181.hsd1.tn.comcast.net) joined #haskell 19:46:34 --- join: Plareplane (n=Plarepla@216-197-152-148.sktn.hsdb.sasknet.sk.ca) joined #haskell 19:46:38 So you probably want to use quot and rem or div and mod but not mod and quot or rem and div 19:46:52 --- join: clanehin_ (n=lane@adsl-065-005-194-047.sip.rdu.bellsouth.net) joined #haskell 19:47:07 * LoganCapaldo thinks theres a divmod too 19:47:09 oh, somebody had a good blog post on when to use one set over the other...lemme see if I can find it... 19:47:14 @hoogle divmod 19:47:14 Prelude.divMod :: Integral a => a -> a -> (a, a) 19:47:21 @hoogle quotRem 19:47:21 Prelude.quotRem :: Integral a => a -> a -> (a, a) 19:47:39 --- quit: clanehin (Read error: 104 (Connection reset by peer)) 19:47:49 --- join: kig (n=kig@dsl-lprbrasgw1-fe92fa00-192.dhcp.inet.fi) joined #haskell 19:48:21 chessguy pasted "first pass at a generalized class for an interpreter" at http://hpaste.org/3191 19:49:06 here it is: http://praisecurseandrecurse.blogspot.com/2006/12/divisive-aftermath.html 19:49:08 Title: Praise, Curse, and Recurse: The Divisive Aftermath, http://tinyurl.com/269574 19:49:09 --- quit: Pupeno- (Read error: 110 (Connection timed out)) 19:49:10 <_achilles_> I'm planning to use divMod 19:49:20 <_achilles_> appreciate your help! 19:49:51 --- join: blackdog_ (n=mwotton@72.249.104.58) joined #haskell 19:50:56 i wonder how restrictive this class will be in that the code and data types are the same 19:52:34 --- quit: gkr (No route to host) 19:53:25 @seen sorear 19:53:25 sorear is in ##logic, #ghc, #xmonad, #haskell-overflow, #haskell-blah and #haskell. I last heard sorear speak 7m 43s ago. 19:53:28 ? 19:53:39 --- quit: OceanSpray (Remote closed the connection) 19:53:45 hey, you've written some interpreters, haven't you? 19:53:51 yes 19:54:00 @pl (\x -> (take 4 (show x))++" %") 19:54:00 (++ " %") . take 4 . show 19:54:03 i'm curious what you'll think of my idea 19:54:08 --- quit: mattrepl ("This computer has gone to sleep") 19:54:21 i want to have a class like the one i just pasted, and then write a generalized REPL around it 19:54:37 so that writing an interpreter is as easy as implementing this class 19:55:26 so the scheme interpreter would be instantiating Interpret LispVal LispError 19:55:27 --- join: adamjones (n=ajones@c-24-21-100-91.hsd1.mn.comcast.net) joined #haskell 19:55:46 --- quit: wli (Remote closed the connection) 19:56:49 --- join: wli (i=wli@holomorphy.com) joined #haskell 19:56:54 (the scheme interpreter from the 48-hour tutorial, that is) 19:57:15 --- join: z` (n=nine@cpe-76-171-54-166.socal.res.rr.com) joined #haskell 19:59:23 heh. i've stunned him into silence with my brilliance 20:00:17 :) 20:00:25 --- quit: sad0ur (Read error: 110 (Connection timed out)) 20:00:26 I have a function that takes a list and an integer. The function is only valid over a range that is a function of the length of the list. Is there a way to enforce (a C++ style runtime assertion?) this? I figure I add pattern matches for the invalid cases, but I'm not sure what to set the function to then 20:00:52 err, the function is only valid when its integer parameter is within a range that is a function of the length of the list :) 20:00:53 Yes 20:00:58 I'm not too optimistic. What if you have site effects? What if your language isn't homoiconic? What if evaluation can fail? 20:01:06 Check your assertion, use error when it fails. 20:01:11 what the heck is homoiconic? 20:01:34 http://en.wikipedia.org/wiki/Homoiconicity 20:01:37 A weakening of isoiconic. 20:01:40 :) 20:01:52 right, ok 20:02:09 well, i could introduce a third type parameter into the class to handle that 20:02:10 dataangel: by "a function of the length of the list" do you mean within the 1..n bounds of the list or something else? 20:02:47 sorear, as for side effects, the scheme interpreter code allows for that 20:03:18 chessguy: a -> a isn't good enough though. LispVal -> LispVal has no side effects. 20:03:36 chessguy: Something along the lines of Freddie Mercury. 20:03:58 sorear, err, you're right, that type isn't right 20:03:58 Or Alan Turing. 20:04:03 * wli resembles that remark. 20:04:17 chessguy: You're going to need to add more and more and more things to your class, to the point where I think you'd likely be better off with repl :: (String -> IO String) -> IO () 20:04:21 --- join: facundo752 (n=facundo@r200-125-39-240-dialup.adsl.anteldata.net.uy) joined #haskell 20:04:51 adamjones: it's a list of lists representing a grid of squares, and its only valid over the outermost "border" of squares. So for a 3x3 grid, it's valid for 0-7 (eight squares surrounding the middle) and for a 4x4 grid it's valid for 0-11 (12 squares surrounding the inner four) 20:05:06 ?hoogle (Monad m) => ([a] -> b) -> m [a] -> m b 20:05:07 No matches, try a more general search 20:05:20 I was just looking for the Example link from the Haskell Home, the place where the source code for the Prelude and other basic things was. Has it moved? 20:05:53 --- quit: facundo752 (Client Quit) 20:06:28 sorear, fair enough. do you think the idea of a generalized REPL is worth pursuing in a different fashion? 20:06:31 dataangel: wli's suggestion would work pretty well. 20:07:03 --- join: dfeuer (n=David@wikimedia/Dfeuer) joined #haskell 20:07:14 chessguy: maybe... 20:07:15 Anybody remember my suggestion about the fashion design assistant program? 20:07:36 nope. 20:07:48 sorear: uh, what about completion! 20:07:57 --- join: sproingie (n=chuck@64-121-2-24.c3-0.sfrn-ubr8.sfrn.ca.cable.rcn.com) joined #haskell 20:08:10 brb 20:08:13 --- quit: dataangel ("Leaving") 20:09:03 Given that there's only one response and it's "no," I'll take that as "no one remembers and no one cares." 20:09:46 wli: I'm sure I didn't hear it at all and I don't care. 20:10:15 * Korollary pats wli's back 20:10:20 there there 20:10:51 adamjones pasted "(no title)" at http://hpaste.org/3194 20:11:08 --- join: Tela_ (n=Tela@128.61.90.108) joined #haskell 20:11:20 hmm, figures as soon as I contribute an answer the guy leaves. 20:12:06 oh well, I'm still claiming this as "I finally knew enough to answer a question about haskell." Yay me! 20:12:23 Ah, Haskell Home Page history: 18:49, 4 October 2007 DonStewart (I don't think the example code page has value anymore) 20:12:28 Well, boo. 20:12:30 It had value to me. 20:12:49 was it positive? 20:13:20 (anonymous) pasted "(no title)" at http://hpaste.org/3195 20:13:36 I understand it wasn't exactly the true source, but it was good to take a look at how some things were implemented. 20:14:05 dino-: Why not just look at the Report? 20:14:24 ddarius: The report tells you the implementation of, say, reverse or foldl' ? 20:14:31 --- join: bos (n=bos@hierophant.serpentine.com) joined #haskell 20:15:45 --- quit: fyodor (Remote closed the connection) 20:16:42 dino-: It has definitions for every function in the standard libraries that it could define. 20:16:45 --- join: glguy (n=eric@unaffiliated/glguy) joined #haskell 20:17:08 --- quit: pizza_ (Read error: 110 (Connection timed out)) 20:17:30 it's not possible to define things like groups (in the abstract algebra sense) with type classes, is it? 20:17:34 dino-: If that's not enough, you can readily get the source of the actual libraries. 20:17:42 chessguy: No more than monads. 20:18:05 you need something between the scanner and printing (to decide what to print based on what was scanned) 20:18:09 ddarius, you mean the monad laws? 20:18:21 chessguy: Yes. 20:18:24 ddarius: Ah, I see it. Thank you, I didn't know that was in there. 20:19:03 dino-: Also, every (or most?) pages in the hierarchical libraries have a Source Code link at the top that takes you straight to the source. 20:19:06 hmm, perhaps seeing that the scroll bar is not at the bottom before trying to reply to something would be an idea... 20:19:45 chessguy: You can easily write: class Group g where (*) :: g -> g -> g; e :: g; inverse :: g -> g 20:19:59 --- part: Tac-Tics left #haskell 20:20:13 --- nick: pgavin -> pgavin-away 20:20:19 --- part: adamjones left #haskell 20:20:31 :t recip 20:20:37 forall a. (Fractional a) => a -> a 20:20:38 so it's the axioms that they have to satisfy that's the problem 20:21:32 what if you could somehow attach QC properties to a class so that you could instantiate it and then check to see if it's valid 20:21:59 it wouldn't be a proof or a guarantee, but it would be a check 20:22:41 You could add some quickcheck properties as default class members. 20:23:26 it adds an Arbitrary requirement though 20:23:44 an arbitrary one at that :) 20:23:59 ?hoogle (a, a) -> [a] -> [a] 20:23:59 No matches, try a more general search 20:24:02 chessguy: Everyone should be quickchecking all their code anyway! 20:24:06 ?hoogle a -> a -> [a] -> [a] 20:24:06 No matches, try a more general search 20:24:45 chessguy: You could just have some properties in the module that you export. 20:25:32 but you still have no way of enforcing that instances pass the test 20:25:53 If you want that then you need to use a different language. 20:26:24 right, that's what i thought. i was just checking 20:26:30 --- join: mordaunt (n=mordaunt@unaffiliated/mordaunt) joined #haskell 20:26:38 --- quit: Tela (Read error: 110 (Connection timed out)) 20:28:15 ddarius: Ya, hadn't thought of that either, the Source code link. Which even works using the locally-installed copy of the API docs on my system. 20:28:33 it still might be fun to write some classes for such algebraic structures, for instructive purposes 20:29:36 chessguy: One benefit of class Group as sketched above is that with a diagonal :: g -> (g,g) you actually have all you need for group objects in generic categories. 20:30:09 Syzygy-, i have no idea what that means 20:30:13 I'm confused about something. I'm trying to hack some code that's got mplus being called with two IO actions as arguments. But I don't see the docs showing IO as being an instance of MonadPlus. 20:30:23 chessguy: In that case just ignore it. 20:30:24 Syzygy-, i don't know anything about abstract algebra 20:30:34 It's something cool from my corner of mathematics... :) 20:30:35 i would be doing this to learn along the way 20:30:46 A group is essentially a group object in the category of Sets. 20:30:46 @instances MonadPlus 20:30:51 Either e, ErrorT e m, IO, Maybe, RWST r w s m, ReaderT r m, StateT s m, WriterT w m, [] 20:31:07 Syzygy-: You own a corner of mathematics? 20:31:11 Whereas a ring is a Semigroup (or Monoid) object in the category of abelian groups. 20:31:31 ddarius: My corner of mathematics in the same sense of the word my as used in "my country" or "my neighbourhood" 20:31:33 chessguy: Maybe formalize these things in Agda or Yarrow or Coq or Isabelle/HOL or Alf or Twelf or ... 20:31:44 --- quit: Tychom (Read error: 54 (Connection reset by peer)) 20:31:52 chessguy: Speaking of that ... http://blog.mikael.johanssons.org/archive/2007/08/coq-and-simple-group-theory/ 20:31:55 Title: Michi’s blog » Blog Archive » Coq and simple group theory, http://tinyurl.com/yvzdr7 20:31:58 ddarius, i've not even heard of most of those :) 20:32:03 You will recognize the beginning there. 20:32:20 chessguy: Most fo those are proof assistant systems. 20:32:32 Huh. But I don't see it in the instances list here: http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Monad.html#t%3AMonadPlus 20:32:34 http://tinyurl.com/y25qsm 20:32:38 Syzygy-, i guessed as much from the inclusion of Coq 20:32:52 Aaaaanyway. Take a look at my blogpost there. 20:32:56 Where this is going is I don't understand what mplus means applied to IO actions. 20:33:24 @src MonadPlus 20:33:25 Source not found. Wrong! You cheating scum! 20:33:56 @src IO mplus 20:33:56 dino-: Essentially catch 20:33:56 m `mplus` n = m `catch` \_ -> n 20:34:16 * allbery_b *headdesk* 20:34:30 I should be using that... was wondering how to clean that code up 20:35:22 I actually find that mildly ugly. 20:35:46 Well, it's an implementation. 20:35:52 You don't have to see it, exactly. 20:36:04 hm, except I'm not sure when that hit the libs. is it in 6.6.1? 20:36:14 That's been there for a long long time. 20:36:20 ah 20:36:24 by the way, i heard today that lazy expressions are supposedly going to get added to javascript in the near future 20:36:47 * allbery_b has some places where he does an IO actuion and if it fails supplies a default. mplus should clean those up nicely 20:39:43 could even encapsulate it further: flip mplus . return 20:41:05 :t flip mplus . return 20:41:13 forall (m :: * -> *) a. (MonadPlus m) => a -> m a -> m a 20:41:17 allbery_b: I think that pointfreeness is obfuscatory 20:41:58 Sometimes it is, sometimes it isn't. 20:42:10 Pointfreeness does help you avoid names for things that don't need names. 20:42:13 that's why I said "that". 20:42:13 @pl \x y -> x + y -- hardly obfuscatory 20:42:13 (+) 20:42:21 On the other hand, it avoids names for things that should have names. 20:42:22 Oh, sorry. 20:42:30 I think that *that* pointfreeness is obfuscatory. 20:42:46 * kpreid grumbles at English. 20:43:07 * nornagon does likewise. 20:43:23 @pl \m n -> c m \_ -> n 20:43:23 (line 1, column 13): 20:43:23 unexpected "\\" 20:43:23 expecting variable, "(", operator or end of input 20:43:45 @pl \m n -> m `c` \_ -> n 20:43:45 (. const) . c 20:44:00 keep in mind that occurs only once (think withDefault val $ (some IO action)) 20:44:24 @pl \c m n -> m `c` \_ -> n 20:44:24 flip flip const . ((.) .) 20:44:24 --- quit: asl (Read error: 104 (Connection reset by peer)) 20:44:45 a comment will deal well enough, or I can expand it but I'm not sure (f `mplus` return dft) is that much better 20:45:07 (`mplus` return default) 20:45:12 --- quit: chessguy ("Leaving") 20:46:32 What's a good Haskell Workshop video besides the Harpy one, the Debugger one, the HPC one or the Beauty in the Beast one? 20:46:48 --- quit: calvins ("Bye...") 20:46:56 --- join: calvins (n=calvins@c-67-188-118-53.hsd1.ca.comcast.net) joined #haskell 20:47:52 ddarius: that's even worse :) 20:48:06 Does that mean (above with the `catch`) if m results in mzero, it will go on to execute n ? 20:48:34 referring to: m `mplus` n = m `catch` \_ -> n 20:49:11 yes. 20:49:16 @src IO mzero 20:49:16 mzero = ioError (userError "mzero") 20:49:29 Man, I wish that was in the HTML docs. :o 20:49:50 any I/O error is effectively mzero, so mplus gives you a convenient way to catch the error and supply a default 20:50:28 --- join: OceanSpray (n=Shinku@cpe-76-169-78-244.socal.res.rr.com) joined #haskell 20:51:19 ddarius, allbery_b: Ok, thank you. 20:53:46 --- quit: gravity ("sleep") 20:54:28 --- join: dataangel (n=prophet@146.113.42.153) joined #haskell 20:54:51 If I want to list-ify all of the elements of a list, is this the best way to do that?: [ [elem] | elem <- mylist ] 20:55:27 map return 20:55:35 dataangel: your way is fine 20:55:48 map return , map (:[]) work too 20:55:51 map (:[]) is common too 20:56:10 dataangel: but since elem is a function in the Prelude 20:56:15 you'd be better off not shadowing it 20:56:28 k 20:56:34 It's a shame there's no "singleton" function, like Data.Set.singleton 20:57:33 return and :[] are the singleton functions :) 20:57:41 Yeah, but with that name 20:57:47 Why? 20:57:50 ?let singleton = return 20:57:51 :2:12: Ambiguous type variable `m' in the constraint: `Monad... 20:57:56 ?let singleton = return :: [a] 20:57:57 Couldn't match expected type `[a]' 20:58:02 --- quit: KatieHuber () 20:58:04 The operation is usually called "box", BTW. 20:58:16 Though (:[]) is pronounced "the robot ninja monkey operator". 20:58:23 haha 20:58:24 ?let singleton = (:[]) 20:58:25 ?let singleton = return :: a -> [a] 20:58:26 Defined. 20:58:26 :3:0: Multiple declarations of `L.singleton' Declared at: heh 20:58:34 beatcha! 20:58:39 > singleton 3 20:58:40 [3] 20:58:52 --- join: chessguy (n=chessguy@ip70-187-207-1.dc.dc.cox.net) joined #haskell 20:58:54 --- quit: clanehin_ (Read error: 110 (Connection timed out)) 20:59:00 nornagon: looks like it used *my* version 20:59:03 ;) 20:59:23 do any haskell gui toolkits assert at compile-time that e.g. initGUI is called before mainGUI? 20:59:44 glguy: not from here... 21:00:02 --- join: levent (n=lerkok@c-76-115-24-2.hsd1.or.comcast.net) joined #haskell 21:00:43 They are playing a documentary about meth on every channel here 21:01:20 It's the meth channel! All meth, all the time! 21:01:37 That's from the Robert Crumb version of Elmo's World. 21:02:14 --- join: badkins (n=brian@adsl-068-209-204-112.sip.rdu.bellsouth.net) joined #haskell 21:02:21 --- part: ChilliX left #haskell 21:02:55 kig: you can't at compile time, unless the toolkit has its own monad and initGUI is really withGUI $ gui-using-code 21:05:55 --- join: locomalo (n=leandro@host80.200-117-121.telecom.net.ar) joined #haskell 21:07:34 --- quit: Beelsebob () 21:07:57 I switched to a different channel and they have a show on called "Jail" 21:08:14 like cops, but just the part where they put people in jail 21:08:31 I guess this is what you get when you don't pay for cable.. 21:08:42 Well, in the US, such a large fraction of the population goes to jail that it's a shared experience. 21:08:59 You've gone to jail wli? 21:09:06 glguy: No, it's what you get when you don't live on another continent. 21:09:24 ddarius: No, but he was involved in a Milgram experiment. 21:09:27 and you are groomed to think that's ok from an early age, think monopolly "go directly to jail, do not pass go, do not collect $200" 21:09:44 Monopoly* 21:09:46 ddarius: No. 21:10:26 ddarius: But look for statistics on the subject some time, esp. those comparing them between contries. 21:11:05 wli: You feel you have the experience of going to jail? 21:11:13 ddarius: No. 21:11:40 Hey, nobody here knows anything about it. You know what that means... Uninformed Opinion Time! 21:12:26 Well _I_ think some time in jail is character-building. Except for me, of course. 21:13:59 Well -I- think some time in jail would lead to the revocation of my clearance, so I'll refrain. 21:14:46 Ah, but what if it was time in an enemy jail for espionage? 21:14:53 Compare the fraction of the population incarcerated between countries. 21:15:06 Pseudonym: My clearance would at least be suspended for that. 21:15:18 spending time in jail certainly does little good to your employability. 21:15:55 #haskell-blah 21:16:05 Good point. 21:16:09 Or just stop. 21:16:12 Sleep. 21:18:26 reffie: you have to type /join first 21:18:41 ? 21:19:17 glguy: reffie wasn't trying to get to the OT channel, he was trying to send you there! :P 21:19:26 21:20:55 --- nick: pp -> dd 21:21:12 sjanssen: Yeah, IRC needs a /send command. 21:21:28 it exists 21:21:30 * sorear demos 21:22:33 --- quit: wli (Client Quit) 21:22:41 * dmwit doesn't notice anything different 21:23:04 --- quit: dataangel (Nick collision from services.) 21:23:05 hmm. apparently it doesn't work if you're already there? 21:23:17 --- join: dataangel (n=prophet@146.113.42.153) joined #haskell 21:23:19 --- quit: halcyon10 (Read error: 110 (Connection timed out)) 21:23:23 * sorear tries it on glguy 21:23:23 sorear: are you talking about /invite? 21:23:27 --- join: prophet_ (n=prophet@146.113.42.153) joined #haskell 21:23:44 yes 21:23:45 What's the preferred way to strip off the first and last elements of a list? I've written my own func but I dunno if there's something nicer builtin 21:23:57 init.tail 21:25:13 --- quit: dje () 21:26:36 > (init.tail) [] 21:26:38 Exception: Prelude.tail: empty list 21:26:47 > init . drop 1 $ [] 21:26:48 Exception: Prelude.init: empty list 21:26:57 ah, partial functions, how we love thee 21:27:08 > drop 1 . reverse . drop 1 . reverse $ [] 21:27:09 [] 21:27:14 =P 21:27:28 @pl init . drop 1 $ [] 21:27:29 init (drop 1 []) 21:27:35 meh 21:27:39 err, do you need to reverse it twice? 21:27:47 yes? 21:27:56 chessguy: to maintain the order 21:28:00 oh, right 21:28:07 * chessguy shuts up 21:28:23 @pl \xs -> init . drop 1 xs 21:28:23 (init .) . drop 1 21:28:33 sproingie, i think that's what you were looking for 21:28:37 nope 21:28:39 there we go 21:28:40 err 21:28:54 @pl \xs -> (init . drop 1) xs 21:28:54 init . drop 1 21:28:57 ?pl \xs -> init . drop 1 $ xs 21:28:57 init . drop 1 21:29:16 --- join: kscaldef_ (n=kevin@71-222-62-182.ptld.qwest.net) joined #haskell 21:29:18 @type (init .) . drop 1 21:29:20 Couldn't match expected type `a1 -> [a]' 21:29:21 against inferred type `[a2]' 21:29:23 that one was pretty obvious 21:29:25 nice 21:31:05 --- quit: levent (Remote closed the connection) 21:31:29 Is there something I can do to get ghci to work more similarly to ghc? In other words, in other REPL's I'm familiar with, I can feed them input similar to what I'd feed the compiler/interpreter, but ghci seems quite different. I've been able to placate it by prefixing let in places, but I'm sure there's a better way. 21:31:52 no, you can't 21:31:59 badkins: Write a file, and load it with : repeatedly. 21:32:09 you're serious?? 21:32:16 badkins: yes 21:32:20 rats :( 21:32:45 thx for the info. I guess I've been spoiled with irb and clisp 21:32:48 badkins: Haskell is hard to parse and interpret incrementally 21:32:51 emacs has a haskell-mode 21:33:09 emacs' haskell mode isn't too bad 21:33:24 you can reload the buffer with a key 21:33:27 I'm a vim guy, but I'll keep an open mind if it makes Haskelling easier 21:33:29 --- join: user317 (n=aeyakove@cpe-66-27-71-118.san.res.rr.com) joined #haskell 21:33:37 well, two keys 21:33:37
all this fuss about no shared state and you cant inject new functions into a runtime? 21:33:37 shouldn't be too hard to do something in vi 21:33:42 badkins: There's some nice vim things, too. 21:33:42 someone might have already written it 21:33:45 C-c C-r 21:33:54 http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/Vim/ 21:33:56 Title: Haskell mode for Vim 21:33:56 badkins: two terminals with ghci and vim works well for me 21:34:05 badkins: so emacs isn't required by any means :) 21:34:06 i always remap those C-c prefixed commands to something else 21:34:13 well the common ones anyway 21:34:14 I wonder if I have that already, at least it does syntax highlighting. 21:34:34 --- quit: dd ("n8") 21:34:37 No, this is more than syntax highlighting. 21:34:42 ok 21:34:43 two terminals is good too, not too hard to hit up-arrow and enter to reload 21:34:57 badkins: It can create type declarations for you and do some minor introspection. 21:35:00 sproingie: or even : and enter 21:35:39 --- join: c (i=ix@paragon.replic.net) joined #haskell 21:35:49 badkins: It also knows enough about GHC to jump to the position of errors (which is more useful than it sounds like it should be). 21:36:03 --- quit: ddarius (Read error: 110 (Connection timed out)) 21:37:07 Here's another newbie question. Prior to being exposed to Haskell, I was all set to learn Scheme followed by Lisp (I'm a Ruby programmer). After browsing through the Haskell School of Expression the other day, I'm really tempted to learn Haskell first. I'm sure I'll learn all 3 eventually - can anyone who knows Lisp & Haskell comment on a preferred order for ease of learning Lisp -> Haskell vs. Haskell -> Lisp ? 21:37:22 we're partial to haskell :) 21:37:29 ?quote lisp 21:37:29 qwe1234 says: every half-assed dynamically-typed, ass-slow scripting language is Lisp but a bit different 21:37:33 alright, I must be stupid, but no matter of googling is helping me find the difference between (.) and ($) 21:37:35 ?quote lisp 21:37:35 qwe1234 says: sometimes i think lisp is as deadly to programmer competence as java or basic. 21:37:48 * dataangel doesn't know how to search for symbols correctly 21:37:53 :t (.) 21:37:54 :t ($) 21:37:57 dataangel: (.) composes functions; ($) applies functions to arguments 21:37:59 forall b c a. (b -> c) -> (a -> b) -> a -> c 21:37:59 forall a b. (a -> b) -> a -> b 21:38:00 dataangel: (function1 . function2) vs. (function1 $ argument1) 21:39:02 sjannsen: err, what's the difference between function1 $ argument1 and function1 argument1? 21:39:09 Warning, completely off topic: http://xkcd.com/327/ 21:39:10 Title: xkcd - A webcomic of romance, sarcasm, math, and language - By Randall Munroe 21:39:12 dataangel: none 21:39:23 Yeah, I'm sure you're partial to Haskell, that's why I didn't ask a "which is better" question. I was just curious if there would be a natural order i.e. if one direction would have a natural progression of concepts. 21:39:28 sjanssen: Then there must be a little more to it, or that is a totally useless operator ;p 21:39:31 --- join: Mr_Awesome (n=eric@par0442.urh.uiuc.edu) joined #haskell 21:39:38 dataangel: it's a precedence hack 21:39:39 i think it's easiest to think of $ as a grouping operator 21:39:47 what sjanssen said 21:39:52 dataangel: function1 $ function2 argumentToFunction2 21:39:58 dataangel: you can replace (f (g x)) with (f $ g x) 21:39:58 ?quote #lisp 21:39:59 dcnstrct says: even the #lisp people say go with haskell 21:40:01 hee-hee! 21:40:38 dataangel: $ is also useful for sections (e.g. map ($5) [f1, f2, f3]) 21:40:40 everything after the $ is effectively in parens 21:41:03 I see 21:41:21 So is there any diff between f . g x and f $ g x? 21:41:23 i often find myself wishing other languages had a $ operator 21:41:23 TSC: pssh, obviously you use flip sequence 5 instead :P 21:41:35 dataangel: yes, there is a difference 21:41:51 dataangel: f . g x == \y -> f (g x y) 21:41:52 f . g x = \y -> f (g x) y 21:42:03 f $ g x = f (g x) 21:42:29 @unpl f . g x 21:42:29 (\ c -> f (g x c)) 21:42:33 Oh, sjanssen's right. 21:42:52 err, so it thinks you're doing f . (g x) ? 21:43:02 --- join: Eelis (n=Eelis@unaffiliated/eelis) joined #haskell 21:43:10 But f $ g x is equivalent to (f . g) x, right? 21:43:14 dataangel: f . g x and f . (g x) are the same thing 21:43:16 generally speaking, $ is for application, . is for composition 21:43:27 @lambdabot: you're not quite getting it, it's either a then b or b then a not a or b 21:43:27 Unknown command, try @list 21:44:05 sjanssen: I guess I'm still confused then. I don't understand why it becomes a new function that thinks g takes another parameter. 21:44:07 badkins: uh? 21:44:27 dataangel: look at the type: 21:44:29 @type (.) 21:44:31 forall b c a. (b -> c) -> (a -> b) -> a -> c 21:44:39 that's currying for you 21:44:46 dataangel: takes two functions, and produces a function 21:44:50 @type ($) 21:44:50 sjannsen: Right 21:44:52 forall a b. (a -> b) -> a -> b 21:45:02 --- quit: kscaldef_ () 21:45:15 $ takes a function and a value, and yields the result of applying that value to the function 21:45:20 @src init 21:45:20 init [x] = [] 21:45:20 init (x:xs) = x : init xs 21:45:20 init [] = undefined 21:45:20 sjannsen: So f . g x should take f, take g, make a new function (composition) and apply x to it. 21:45:36 That would be (f . g) x 21:45:37 dataangel: no, it doesn't parse that way 21:46:08 dataangel: (f . g x) parses as (f . (g x)). It does *not* parse as ((f . g) x) 21:46:13 sjanssen: ah 21:46:43 sjannsen: But (f $ g x) and ((f . g) x) would be the same? 21:46:49 --- quit: _achilles_ ("Leaving.") 21:46:52 dataangel: application (which is whitespace) binds tighter than any operator 21:46:59 dataangel: yep, those are the same 21:47:07 sjannsen: guess that makes sense :) 21:47:22 think of $ as application, but binding more loosely than anything else 21:47:34 dataangel: and application (which is $) binds looser than any operator. 21:47:39 ;-) 21:48:06 (it's also infixr instead of infixl, but that's another matter) 21:48:14 It shouldn't be. 21:48:25 I'm getting tempted to write a module for euclidean construction in either Haskell or Coq. 21:48:36 Should get my ass back to research work instead though... 21:48:37 damnit, the parentheses were supposed to avoid this old argument! :) 21:48:45 --- quit: ramza3 ("Leaving") 21:54:47 --- quit: Eelis- (Read error: 110 (Connection timed out)) 21:55:43 dimwit: ah, it took me a while 21:58:14 --- quit: sproingie (Read error: 104 (Connection reset by peer)) 22:02:14 --- join: gour (n=Gour@2-202.dsl.iskon.hr) joined #haskell 22:04:20 http://programming.reddit.com/info/2yj08/comments 22:04:21 Title: Using Emacs to remove some of the drudgery of Haskell leak hunting (reddit.com) 22:05:06 hm, now that sounds interesting 22:06:26 > reverse "?olleh" 22:06:28 "hello?" 22:06:42 --- quit: dfeuer (Read error: 113 (No route to host)) 22:06:51 bos++ nice one 22:07:03 --- quit: ThePub (Remote closed the connection) 22:08:25 > map reverse ["olleH", "!dlrow"] 22:08:26 ["Hello","world!"] 22:08:35 --- join: funktio (n=funktio@80-248-242-86.cust.suomicom.fi) joined #haskell 22:09:50 --- quit: tizoc (Remote closed the connection) 22:10:05 --- join: tizoc (n=user@r190-0-151-233.dialup.adsl.anteldata.net.uy) joined #haskell 22:10:52 --- join: ThePub (n=nathan@host-172-160-220-24.midco.net) joined #haskell 22:11:24 --- quit: chessguy ("Leaving") 22:11:46 > sum [sum [1..5] .. sum [1..10]] 22:11:47 1435 22:12:15 cool, a replacement for ghci 22:12:35 you can run lambdabot locally as well 22:12:49 why? 22:13:53 people use some of its features for development, such as @pl, @src, etc. 22:14:11 interesting 22:14:56 ?hoogle is also very nice 22:15:35 Haskell plus Google ? 22:15:57 ?hoogle a -> a 22:15:58 Prelude.id :: a -> a 22:15:58 Control.Monad.Error.throwError :: MonadError e m => e -> m a 22:15:58 Control.Monad.State.put :: MonadState s m => s -> m () 22:16:19 search based on type signature 22:16:23 is it possible to have a variant with type different type variables in each case? 22:16:49 well you can have something like data Maybe a b = Left a | Right b 22:17:21 --- part: funktio left #haskell 22:17:25 more commonly known as Either a b 22:17:29 heh 22:18:26 ah yes 22:18:33 blame it on the morning 22:18:42 --- join: egl (n=egl@c-71-202-96-124.hsd1.ca.comcast.net) joined #haskell 22:19:53 well im trying to do something like this: data X a b = F (a -> b) | G (a -> c, c -> b), but apparently its impossible to get a type like that in haskell 22:20:09 what's c? 22:20:32 you need to give bindings for all variables 22:20:51 yeah, you need to either have "X a b c" or use forall x. 22:20:51 i know, but c can just be anything 22:21:00 maybe you meant an existential, like data X a b = F (a -> b) | forall c. G (a -> c, c -> b) ? 22:21:00 then use forall 22:21:13 think about what type you want for G 22:21:20 oh, is that how you do it? 22:21:27 G :: (a -> c, c -> b) -> X a b -- with the forall 22:21:34 G :: (a -> c, c -> b) -> X a b c -- with the parameter 22:21:35 etc 22:21:38 thats definitely the type i want 22:21:50 X should not know the intermediate type in G 22:22:00 thanks 22:22:11 --- join: serishema (n=serishem@60-234-136-112.bitstream.orcon.net.nz) joined #haskell 22:22:13 --- quit: mrsolo ("Leaving") 22:22:50 also look into GADT syntax, which lets you write the constructor types you want - often much more intuitive than the current layer cake of position-sensitive modifiers 22:23:21 (you don't pay for GADTs unless you make essential use of the flexibility, so go ahead and use where-syntax for normal types) 22:23:48 --- quit: andyjgill () 22:24:32 ok, ill look into i 22:24:34 *it 22:24:54 is it possible to restrict the a and b to be certain types for a variant of X ? 22:25:19 ... yes 22:25:21 Mr_Awesome: yes, this is the 'G' in GADT 22:25:48 so i should basically just use GADT 22:26:25 Mr_Awesome: Why do you want to restrict a and b? 22:26:47 --- join: paolino (n=paolino@151.82.6.148) joined #haskell 22:27:08 for one of the variants, a and b should only be able to be certain types 22:27:43 but for the other variants, they can be anything 22:28:05 --- quit: Tela_ (Remote closed the connection) 22:28:37 --- join: Tela (n=Tela@128.61.90.108) joined #haskell 22:28:45 --- quit: mordaunt (Read error: 104 (Connection reset by peer)) 22:31:08 --- quit: agoode (No route to host) 22:33:36 I've been reading up on the value of Haskell's type system. My exposure to static typing is C++/Java, so I was thrilled when I moved to Ruby. I'm getting the impression that Haskell's type system is quite different and I shouldn't be too influenced from my C++/Java experience. Fair assessment? 22:34:08 badkins: yes 22:34:20 --- quit: thepointer ("Leaving") 22:34:43 badkins: you will find Haskell's to be much more frustrating! And much more liberating... 22:35:05 interesting juxtaposition 22:35:26 * serishema smirks 22:35:45 * serishema until recently said that haskell was incomprehensible goblydegook, or a form of encryption. 22:36:00 --- quit: locomalo ("Saliendo") 22:37:20 Any satisfied customers here from a dynamically typed language background? Difficult transition? 22:37:53 I had same background as you; don't remember the transition 22:38:12 i'm mid ruby->haskell transition 22:38:13 i was (and still am) a Perl guru, haskell took a long time to grasp 22:38:38 but the type system had nothing to do with the mental issues i was having 22:38:40 --- quit: Olathe (Connection timed out) 22:38:47 1. it's true, you don't have to annotate types all the time in haskell 22:39:19 2. for practical purposes, you tend to do it at the function level 22:39:34 the top-level definition level 22:40:06 3. despite (or maybe because of?) the magic auto-inferencing, you'll still fight the compiler from time to time 22:40:24 4. only in haskell, you /get/ something for it -- type safety really is safe 22:40:32 you only fight the compiler when you think it's wrong and you're right 22:40:42 :) 22:41:04 * serishema is investigating haskell as an alternative to php 22:41:12 I had a BASIC->Assembler->C->C++->Java->Ruby, so Haskell would be continuing forward on the functional dimension, but backwards on the static->dynamic dimension. I'm just trying to get a feel for what the static typing is buying me besides having the compiler catch errors since that simply hasn't been a problem with Ruby. 22:41:16 also, all the cool ruby things like closures, haskell has exponentially more of 22:41:48 so it doesn't feel ridiculously verbose like java (quite the opposite) 22:41:51 I found that, for some time, you can nearly pretend Haskell is dynamic. Then you hit the edge cases and once you learn enough to debug them you realize that it's really pretty smart to have types work like they do. 22:41:59 What hooked me while browsing SOE was the beauty of function composition. Quite nice. 22:42:46 ***serishema: are you serious about alternative to php? that seems like quite a jump! Deployment alone sounds painful. 22:42:46 badkins: perhaps an interesting example of a use for static typing is QuickCheck 22:43:05 I found that the type system never got in the way of me wanting to do what i wanted, and later found out how cool it was. 22:43:22 er, 'doing what i wanted' 22:43:33 twifkak: you're aware that there are QuickCheck implementations for dynamically typed languages, yes? 22:43:44 bos: no, i'm not 22:43:48 When using dynamic languages, like Ruby, I found the lack of types more confusing than worth it. I still like Ruby for other reasons though. 22:43:55 http://www.cs.chalmers.se/~rjmh/ErlangQC/ 22:43:57 Title: Erlang QuickCheck 22:43:58 *lack of static typing 22:44:02 badkins: i really hate php 22:44:18 serishema: what language(s) do you like? 22:44:21 badkins: staticly compile, dump in the cgi-bin directory, i don't see the issue with deployment 22:44:34 eheh... 22:44:41 bos: interesting, i'll look :) 22:45:16 in any case, i think it still applies -- QC automatically polymorphs on the statically inferred type of the function you pass it, and determines what random crap to throw at your function 22:45:25 serishema: I can understand hating php, but it seems unlikely that you'll find a Haskell equivalent. 22:45:57 badkins: there seem to be Network.CGI and Text.XHtml packages that can do what i want? 22:46:23 in a VERY different way 22:46:24 hmm, how does this Erlang thing work? 22:46:30 encryptio: for web programming i'm used to asp .net. I like things that abstract all the CGI / HTML rubbish. 22:46:31 explicit types for the generators? 22:46:48 serishema: php is fast because mod_php runs in Apache. If you simply use Haskell as a cgi script, it'll be *way* slow 22:47:07 not necessarily 22:47:13 compiled vs. interpreted 22:47:15 badkins: it's only an assignment, i don't care about real world performance. 22:47:42 apparently there is FastCGI or something where it stays loaded. 22:47:47 yeah, i've been planning on doing my "database application project" (really web programming...) in Haskell too 22:47:58 yeah Fastcgi is nicer with haskell 22:48:04 --- quit: AtnNn ("foobar") 22:48:08 * twifkak is waiting for somebody to mention HappS 22:48:13 you don't have to worry about efficiently storing state so much 22:48:17 I'm doing [ fst full ++ snd full | full <- zip inner outer] where outer and inner are lists of lists, and outer always has 1 more list than inner. Is there an elegant way to append the last list in outer to this comprehension? 22:48:37 opqdonut: even with a compiled app, cgi is not the way to go 22:49:03 I've heard people critique HAppS pretty hard. I haven't really spent enough time with it to know. Is it nice? 22:49:06 badkins: sure enough, but still the speed will be much less of an issue 22:49:28 sjanssen: judging from the first few pages, it's using erlang's pattern matching to specify input types 22:49:30 well if folks are just talking about school assignments, then sure. I do this for a living, so it's a tad different. 22:49:37 badkins: the main problem with CGI was perl scripts which took 2 seconds to load all their modules each time you ran them :) 22:49:47 dataangel: zip (inner ++ []) outer -- hackish, but it will work 22:49:51 Tela: i have no idea -- i haven't heard much about it actually :/ 22:49:58 badkins: compared to that a compiled haskell app launches instantly... 22:50:05 dataangel: also, note that you can rewrite that as (zipWith (++) inner outer) 22:50:06 dataangel: zipWith (++) inner outer 22:50:31 * dataangel looks up zipWidth 22:50:40 badkins, not every, even professional, web service needs high throughput - internal software, which is the majority of written software [citation needed ;)], might not have too many simultaneous users 22:50:42 @type zipWith 22:50:44 forall a b c. (a -> b -> c) -> [a] -> [b] -> [c] 22:50:49 --- join: Olathe (n=Olathe@12-210-82-101.client.mchsi.com) joined #haskell 22:51:13 twifkak: I'm not up on Erlang, what is the significance of ? in ?FORALL? 22:51:29 quicksilver: and db connection pooling, etc. ? The difference between theory and practice is much greater in practice than in theory. 22:51:35 sjanssen: dunno :) 22:51:51 badkins: not every web application needs a database :) 22:52:00 right ;) 22:52:16 badkins: but yes, there may be other resources which take time to acquire, I agree 22:52:36 sjannsen: zipWith works :) 22:52:38 * quicksilver knows whereof he speaks. He's been writing web applications on and off since 1994 22:52:48 i think what quicksilver meant to say was "not every web application needs a *relational* database" 22:52:50 sjannsen: I still have the problem though of tacking the extra element in outerDiag on to the end though 22:52:53 quicksilver: in Haskell? :) 22:53:02 sjannsen: err, nm, get your trick now 22:53:03 --- quit: egl ("Leaving") 22:53:05 ah yes, page 8 finally tells me what I want to know: the generator is an explicit argument to FORALL 22:53:21 --- quit: ac (Read error: 110 (Connection timed out)) 22:53:27 --- quit: erg0t (Remote closed the connection) 22:53:31 sjannsen: I think a lot of this feels hackish sinces I'm using lists to represent a rigid square grid (more like an array :P) 22:53:34 not quite as nice as Haskell, where the generator is implicit, but workable 22:53:35 I'm sure an excellent Haskell web framework can be invented, but it seems like Python before Django/Turbogears and/or Ruby before Rails currently. 22:54:00 badkins: no, back in 1994 it was perl4 and CGI all the way :) 22:54:24 badkins: and if things were too slow we rewrote them in C! Yay! 22:54:49 sjanssen: perhaps ? is a "adverb" on a predicate to mean "return a boolean" rather than "abort if false"? 22:55:06 badkins: But, anyhow, there is hAppS and Hope, which are interesting in different ways 22:55:17 lol, page 9 invents the Gen Monad with Erlang macros ;) 22:55:34 Ooh. I hadn't heard of Hope before... 22:55:45 quicksilver: probably as interesting as the Lisp stuff I dug up. yes it's used in production by a few folks, just not quite ready to abandon Rails for yet. 22:56:01 badkins: of course very few people are using haskell for web apps, either as a proportion of haskell users or of web-app writers 22:56:07 very very few 22:56:13 --- join: takamura (n=takamura@80.31.50.246) joined #haskell 22:56:24 --- part: takamura left #haskell 22:57:40 --- join: andyjgill (n=andyjgil@c-76-105-238-134.hsd1.or.comcast.net) joined #haskell 22:57:45 right. My current research into Scheme,Lisp,Haskell, etc. is for *way* down the road. One *big* plus with Haskell I see is ghc. The open source Lisp compiler market is fragmented and struggling. ghc seems to be a very nice compiler and the fact that it stands out as the leading one should attract more development resources. 22:58:22 I have little doubt that haskell is an excellent language for web application development 22:58:27 in fact, I have no doubt at all 22:58:39 but it doesn't have library maturity in that area yet 22:58:47 agreed 22:58:52 so you'd end up writing (partly) your own libraries on the way 22:59:15 I don't think any language is incapacitated for web apps by its own very nature. It's all about libraries. 22:59:33 Korollary: right, but some languages are pretty poor for it. Like C. 22:59:43 that's why it's a future oriented task for me, in the short run there would be a loss of productivity, but with a language that is productive enough, it would be recouped later (in theory) 23:00:25 Korollary: to some degree yes, but some languages are worth a long term commitment in library development 23:00:28 empirically haskell lets me (makes me?) write code with fewer bugs, and easier to refactor without introducing bugs 23:00:45 that alone is a good reason to find it interesting 23:01:15 I'm watching lectures from Haskell Workshop 2007. are the papers also available online? 23:01:51 I had an interesting experience several hours ago where I did a major refactor of structure of my code. I just changed the most relevant part then let the type-checker tell me all the places that broke. Refactored in like 20 seconds :) 23:02:32 --- quit: mfunebre () 23:03:30 Tela: yes, I was talking about that yesterday 23:03:40 Tela: that's something I was used to doing in the Java world and thought I would miss. So far (18 months) I haven't missed it in Ruby, but I can see how I might possibly get bit by a refactoring at some point (I'm far from 100% test coverage). 23:03:56 Tela: really striking. If code works before, and you refactor something, then by the time it compiles again, it works again 23:04:26 quicksilver: assuming no semantic changes from refactoring ;) 23:04:29 badkins: yes, it's true that Java is so cumbersome you are forced to refactor *often* which makes tool support for refactoring feel really important 23:04:45 --- join: dblhelix (n=dblhelix@stefannb.cs.uu.nl) joined #haskell 23:04:45 --- join: ac (n=abram@dsl231-034-070.sea1.dsl.speakeasy.net) joined #haskell 23:04:49 badkins: right, it's not some magic rule. But in practice if you're using the type system well, it seems to guide you correctly 23:04:49 --- quit: dolio (Read error: 104 (Connection reset by peer)) 23:05:19 --- join: dolio (n=dolio@nr5-216-196-210-207.fuse.net) joined #haskell 23:05:21 quicksilver: I don't miss all the tools! It's been wonderful only needing vim :) 23:07:09 quicksilver: did you try other functional languages prior to Haskell, or come directly here? 23:07:35 I don't think I could ever get used to a dynamic language. How do people cope when simple misspellings are run-time errors? 23:07:41 --- quit: dataangel ("Leaving") 23:07:45 --- quit: prophet_ ("Leaving") 23:08:13 I had done some large ruby refactors before that I couldn't work through. Generally, it led to complete rewrites on large sections of code. I'm not all that familiar with other static typed languages, so when things like that work in Haskell, I get ecstatic 23:08:13 sjanssen: it happens, but it's rare and quickly caught - things tend to not pass tests when they aren't spelled correctly :) 23:08:14 --- quit: serishema ("This computer has gone to sleep") 23:08:16 --- join: dataangel (n=prophet@146.113.42.153) joined #haskell 23:09:00 sjanssen: well at least perl has 'use strict' which catches most mis-spellings and you're a fool if you don't use it. I imagine the others have similar. 23:09:16 badkins: I have used a couple of varieties of ML 23:09:25 --- join: _ry (n=ry@cable-81-173-134-53.netcologne.de) joined #haskell 23:09:25 badkins: I've played with lisps, but never used them for anything serious 23:10:08 Lisp... If you want to talk about crippled libraries... 23:10:55 --- quit: _ry (Read error: 104 (Connection reset by peer)) 23:11:55 Tela: I do find it odd that some very capable languages have poor library support. It doesn't seem like time is the main impediment. Maybe the programmers that are attracted to such languages aren't interested in library development. 23:12:52 badkins: concerning Lisp, I feel like it's in the culture of the language. Everyone wants to do things their own way, so collaborative efforts are terribly scattered and redundant 23:13:34 Tela: how is the situation for Haskell? I would think it might be similar - intelligent, independent programmers, etc. 23:14:35 I'm always reassured by the strength of ghc. There are a lot of language extensions which are well supported because of it being fairly ubiquitous 23:14:47 Tela: I don't mind writing a ton of internal code, but I'd prefer to avoid the external facing stuff: relational db libraries, network protocols, foreign function interfaces, etc. 23:15:28 the haskell library situation is in a period of rapid growth 23:15:38 the rate of haskell library release in teh last 12 months has been impressive 23:16:04 http://hackage.haskell.org/packages/archive/pkg-list.html 23:16:05 Functional languages are getting a big boost, and I expect that to continue indefinitely. 23:16:14 (indeed, not everything is in that list but it's a good start) 23:16:21 'hackage' what a great name :) 23:16:39 --- quit: andyjgill (Read error: 110 (Connection timed out)) 23:16:47 There are a lot of perl modules that implement the same thing. Eventually, one of them wins out. It's a numbers game. 23:16:58 --- join: thepointer (n=thepoint@218.185.80.187) joined #haskell 23:18:35 You guys have been helpful. Before I take off, any book recommendations? I think I'll pick up "The Haskell School of Expression". Any others that come highly recommended? 23:19:26 --- quit: paolino (Read error: 104 (Connection reset by peer)) 23:19:32 Not a book, but I had the biggest "clicking" moment when reading Write Your Own Scheme in 48 Hours 23:19:40 http://halogen.note.amherst.edu/~jdtang/scheme_in_48/tutorial/overview.html 23:19:42 Title: Write Yourself a Scheme in 48 hours, http://tinyurl.com/l986o 23:19:58 --- join: serishema (n=serishem@60-234-136-112.bitstream.orcon.net.nz) joined #haskell 23:20:00 ?quote brain-dead 23:20:00 Pseudonym says: The Scheme programming language is optimised for writing small brain-dead tutorial compilers for. 23:20:16 --- join: levent (n=lerkok@c-76-115-24-2.hsd1.or.comcast.net) joined #haskell 23:20:25 I liked it as a Parsec example :) 23:20:28 Tela: thanks for the link 23:21:08 it's been del.icio.us'ified 23:21:17 wow, we're almost to 2100 comments on the first 4 chapters of the book. 23:21:23 --- quit: nostrademons (Read error: 110 (Connection timed out)) 23:21:52 * sorear derived a great deal of enlightenment from The_Implementation_of_Functional_Programming_Languages, Simon Peyton-Jones, 1984; but I doubt it's "good for beginners" 23:21:53 ah, bos must be Bryan O'Sullivan - I'm in ur blog readin ur codz 23:22:00 --- quit: levent (Client Quit) 23:22:07 badkins: /whois 23:22:23 heh 23:22:28 badkins: I recommend Bryan's book when he's finished it :) 23:22:40 sorear: Actually, that's the first book on functional programming that I read. 23:22:47 badkins: Huttons book programming in haskell comes highly recommended but it may be too basic for you :) 23:23:02 So can total newbies view the pages? 23:23:09 No good for beginner programmers, perhaps, but I didn't understand lazy FP until I read it. 23:23:24 badkins: not yet 23:23:30 --- join: c9s (n=c9s@59-116-162-76.dynamic.hinet.net) joined #haskell 23:23:38 In fact, my first serious Orwell program (yes, Orwell) was a SK combinator compiler/interpreter. 23:23:45 np, with the amount of comments you're getting, you don't need more line noise :) 23:23:47 badkins: Of course they can. This isn't one of those things where the unworthy just see blank papaer. Anyone can read IFPL. 23:24:12 And by "serious" I mean "non-assignment". 23:24:13 --- join: dcwilson (n=dcwilson@62.141.48.57) joined #haskell 23:24:18 --- join: ClaudiusMaximus (n=puredyne@87-194-253-127.bethere.co.uk) joined #haskell 23:24:25 my first non-exercise Haskell program did symbolic differentiation 23:25:06 Purely Functional Data Structures is also a good read. 23:25:07 That's a good one. 23:25:24 PFDS wasn't written in 1992 when I read SPJ's book. 23:25:47 My first one was the Text Munger Ruby Quiz. That was such a bad choice, heheh :) 23:26:16 --- join: ptx (n=ptxmac@0x5550c853.adsl.cybercity.dk) joined #haskell 23:26:54 quicksilver: I don't think a book on Haskell could be too basic for me at this point 23:27:37 badkins: This is called a "keyboard". Don't be frightened by all the buttons! You don't need to press them all at once. 23:27:47 :) 23:27:51 actually you do 23:28:03 the secret omega-combinator is entered by hitting all the buttons at once 23:28:16 SOE is good enough 23:28:16 or, if you use emacs 23:28:22 Only if you need to type the hypothesised unicode replacement for function composition. 23:28:36 Triple-bucky coke bottle, isn't it? 23:28:46 Pseudonym: huh? 23:29:25 badkins: The snarky comment about function composition you don't need to worry about. 23:29:27 However... 23:29:36 http://catb.org/jargon/html/C/cokebottle.html 23:29:37 Title: cokebottle 23:30:28 And the last comment in: http://catb.org/jargon/html/Q/quadruple-bucky.html 23:30:29 Title: quadruple bucky 23:31:18 badkins: seriously, think of Haskell as O'Caml but without the val/fun distinction, the rec/nonrec distinction, the value restriction, or the need for user-defined numeric functions to be monomorphic 23:31:29 badkins: the languages really are very similar 23:31:42 i.e. O'Caml without the arbitrary restrictions. 23:31:51 sorear: thx, if I knew OCaml, that would be helpful I'm sure 23:31:55 Which made some kind of sense in 1976. 23:31:56 Oh, and without that funky ;; 23:32:00 --- join: ChilliX (n=chak@wireless-159.wireless.cse.unsw.EDU.AU) joined #haskell 23:32:01 sorear: funnily enough the thing I like best is that constructors are first-class functions :) 23:32:05 badkins: oh, sorry, I thought you said you came from there 23:32:09 ;; is just in the repl, I know that much :) 23:32:18 sorear: I hate that in ocaml you can't do "map some" 23:32:58 --- quit: tizoc (Remote closed the connection) 23:33:12 --- join: tizoc (n=user@r190-0-151-233.dialup.adsl.anteldata.net.uy) joined #haskell 23:33:18 badkins: I learned juust enough OCaml to realize that ;; is rare, but it's still just so striking that it's the first thing I see whenever I look at OCaml code 23:33:31 How do I get the last two elements from a list? (take 2 $ reverse mylist) seems hackish, and (last mylist) only returns 1 item 23:33:38 Dr. Jon Harrop is reason enough for me to avoid OCaml ;) 23:33:41 --- join: ttfh (n=petter@c-3d6be555.181-3-64736c16.cust.bredbandsbolaget.se) joined #haskell 23:33:49 badkins, he's infiltrated Scala lately 23:34:00 quicksilver: that is interesting, when can you apply constructors? 23:34:01 holy moly 23:34:04 @src (->) loop 23:34:05 Source not found. Do you think like you type? 23:34:17 the hell? 23:34:48 ?quote hell 23:34:48 puusorsa says: do not try this in a shell: :() { :&:; } ;: 23:35:01 --- join: KatieHuber (n=katie@203-97-111-120.cable.telstraclear.net) joined #haskell 23:35:24 @src last 23:35:24 last [x] = x 23:35:25 last (_:xs) = last xs 23:35:25 last [] = undefined 23:35:30 dataangel: hackish: last $ zip xs (tail xs) -- will return the last two elements as a tuple 23:35:45 --- join: therp (n=nil@chello080108077214.34.11.tuwien.teleweb.at) joined #haskell 23:35:45 sjanssen: constructors are only applied to values 23:36:00 sjanssen: 'some 1' is fine and has type 'int option' 23:36:09 sjanssen: but 'some' is not a well-typed term in its own 23:36:11 anyone happen to know offhand how loop is implemented for (->) ? 23:36:35 quicksilver: interesting, I wonder why they have that restriction 23:36:56 sjanssen: they've got constructors in a different syntax class from functions. I don't know why 23:36:59 this is why I need to rewrite this to use an array type later ;p 23:37:04 you have to write "fn x => some x" 23:37:06 annoying 23:37:22 sjanssen: well, of course, I do know why, it's because they can appear in pattern matches ;) 23:37:28 sjanssen: but I don't know why they don't generalise 23:37:39 > last . ap zip tail $ [1,2,3,4,5] 23:37:41 (4,5) 23:37:52 sjanssen: I used to define a constructor-function for each of my constructors. But that's boring. 23:38:00 --- join: takuan (n=takuan@83.101.37.245) joined #haskell 23:38:05 --- quit: tizoc (Remote closed the connection) 23:38:31 * serishema wants to write a simple interpreter for a simple programming language 23:38:37 --- join: olsner (n=salparot@cust.fiber-lan.vnet.lk.85.194.50.194.stunet.se) joined #haskell 23:38:37 --- join: oerjan (n=oerjan@hagbart.nvg.ntnu.no) joined #haskell 23:38:45 unlambda! 23:38:45 not sure how to go about doing it in haskell though 23:38:51 the lack of state is breaking my brain again. 23:38:59 There's allegedly a write your own scheme guide in haskell. 23:39:03 --- quit: sorear ("zzz") 23:39:04 --- join: tizoc (n=user@r190-0-151-233.dialup.adsl.anteldata.net.uy) joined #haskell 23:39:04 * oerjan heard the word unlambda 23:39:19 * Pseudonym respectfully occurs to the "brain-dead" quote above 23:39:23 refers, not occurs 23:39:31 brain-dead, eh? 23:39:32 I'd prefer to see a write your own C compiler in Haskell tutorial ;p 23:39:37 ?quote brain-dead 23:39:37 Pseudonym says: The Scheme programming language is optimised for writing small brain-dead tutorial compilers for. 23:39:52 --- join: int-e (n=noone@t54fc4191.pool.terralink.de) joined #haskell 23:40:13 In fact, a C compiler isn't a dumb idea. 23:40:19 --- quit: mm_freak () 23:40:21 Something about as sophisticated as Allan Holub's book. 23:40:27 * serishema has written both interpters and compilers in C, but her brain just isn't getting around haskell today. 23:40:37 baby steps 23:41:04 serishema: maybe write a state-less interpreter first? then extend it with state 23:41:31 is there a function that separates lists like this: [1,2,3,4] -> [(1, [2,3,4]), (2, [1,3,4]), (3, [1,2,4]), (4, [1,2,3])] 23:41:42 Half the problem is that the answer is probably easier in Haskell than in C. 23:41:48 --- join: drbean (n=greg@momotaro.chinmin.edu.tw) joined #haskell 23:41:48 "all lined up with the the first non-whitespace character after the do" bummer, I thought I left white space sensitivity behind with Python :( 23:41:58 serishema: How simple is your language? 23:42:05 lekro: that looks vaguely similar to List.inits but not the same thing 23:42:15 badkins: the layout-style is optional 23:42:25 My first real interpreter in Haskell was for a subset of Lisp. Essentially an SECD machine. 23:42:26 lekro: actually nm I misread your example, it's not even close ;p 23:42:34 And it was about 20 lines not including parser. 23:42:41 TSC: ghc didn't think so :) 23:43:08 You have to use braces and semicolons instead 23:43:08 no biggy, gotta take the whole package 23:43:17 (like C) 23:43:17 like in C ? 23:43:19 :) 23:43:24 badkins do {x <- foo; y <- bar; return $ fn x y} 23:43:31 lekro: i've heard that question before. here's my solution: 23:44:19 ?whois serishema 23:44:19 Unknown command, try @list 23:44:22 Whoops. 23:44:25 > let extract l = [(x,bef++aft) | (bef,x:aft) <- zip (inits l) (tails l)] in extract [1,2,3,4] 23:44:26 [(1,[2,3,4]),(2,[1,3,4]),(3,[1,2,4]),(4,[1,2,3])] 23:44:28 Ah, now I know! 23:44:34 s/?/\// 23:45:11 > 450! 23:45:12 parse error on input `}' 23:45:34 I thought it might be an idiom. Actually I'm trying to write a function that takes a list and generate a list of successors. A successor is defined as the original list with one element altered. But the elements don't have a meaningful Eq instance 23:45:52 oerjan: thanks, I'll have a look at this 23:46:16 * pjd wrote that one just recently 23:46:28 --- join: roconnor (n=roconnor@vhe-540354.sshn.net) joined #haskell 23:46:29 > zip <*> (zipWith (++) <$> inits <*> tail.tails) $ [1..4] 23:46:31 [(1,[2,3,4]),(2,[1,3,4]),(3,[1,2,4]),(4,[1,2,3])] 23:46:36 the order doesn't need to preserved for the successor 23:46:42 +be 23:47:12 ? <*> 23:47:29 oh, what was the syntax lambdabot likes 23:48:03 lekro: Control.Applicative 23:48:07 ?hoogle <*> 23:48:08 No matches found 23:48:10 lekro: just use my (bef,x:aft) trick and do something different with the result 23:49:13 lekro: hoogle is broken on * and $ 23:49:35 after several hours of painstakingness, I have implemented an obscure recursive algorithm for checking if a given set of queen positions is valid for nqueens 23:49:56 it handles the diagonal case without resorting to +/- 1 iterating ugliness 23:50:00 lekro: http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Applicative.html 23:50:02 http://tinyurl.com/yyo64c 23:50:50 lekro: <$> and <*> is like fmap/liftM and ap, respectively 23:50:54 but nicer! 23:51:07 Wow, that "Write Yourself a Scheme in 48 Hours" tutorial looks great. Is Jonathan Tang now Audrey Tang (associated with pugs) ? 23:53:16 --- join: mm_freak (n=milch@cl-2263.ham-01.de.sixxs.net) joined #haskell 23:53:31 --- join: lstephen666 (n=levi@eth12867.sa.adsl.internode.on.net) joined #haskell 23:53:40 --- quit: dfranke (Read error: 104 (Connection reset by peer)) 23:53:54 badkins: Different person, I think. 23:53:59 lekro: that example is the (e ->) functor 23:54:39 each argument to <*> is a function of [1..4], which is like a shared environment 23:55:00 badkins: why would you even think that??