00:00:00 --- log: started haskell/07.03.30 00:00:14 --- join: Thunder (n=Thunder@rhiannon-e0.net.iks-jena.de) joined #haskell 00:01:43 --- join: therp (n=nil@chello080108077214.34.11.tuwien.teleweb.at) joined #haskell 00:04:07 --- part: fuzan left #haskell 00:06:41 --- join: phb2 (n=phb2@c213-100-46-125.swipnet.se) joined #haskell 00:08:32 --- quit: fantasma ("Leaving") 00:11:14 --- quit: gour (Read error: 104 (Connection reset by peer)) 00:11:28 --- join: gour_ (n=Gour@34-64.dsl.iskon.hr) joined #haskell 00:12:51 --- nick: gour_ -> gour 00:24:13 --- join: jtoy (n=jtoy@c-24-60-178-47.hsd1.ma.comcast.net) joined #haskell 00:26:36 --- join: Ademan (n=dan@h-67-101-145-200.snfccasy.dynamic.covad.net) joined #haskell 00:27:53 ?uptime 00:27:53 uptime: 6d 13h 30m 4s, longest uptime: 6d 13h 30m 4s 00:27:55 ?users 00:27:55 Maximum users seen in #haskell: 337, currently: 289 (85.8%), active: 28 (9.7%) 00:31:30 --- quit: ramkrsna ("Leaving") 00:31:41 --- quit: AtnNn_ ("foobar") 00:34:26 --- quit: mjk ("KVIrc 3.2.6 Anomalies http://www.kvirc.net/") 00:34:28 --- quit: triplah_ (Read error: 110 (Connection timed out)) 00:34:57 --- join: LoganCapaldo (n=logan@ool-457a8e39.dyn.optonline.net) joined #haskell 00:35:44 --- quit: Jaak ("Leaving") 00:39:52 --- join: x0FDA5E (n=mpi@88.119.37.217) joined #haskell 00:40:38 --- part: x0FDA5E left #haskell 00:41:04 --- join: bringert (n=bringert@dynamic-46-62.chl.chalmers.se) joined #haskell 00:41:10 --- quit: jtoy (Connection timed out) 00:41:23 --- join: jgrimes_ (n=sinfinit@Lee-15-155.rh.ncsu.edu) joined #haskell 00:43:56 --- quit: xinming (Read error: 104 (Connection reset by peer)) 00:44:16 --- quit: nominolo ("bye") 00:47:45 --- quit: nornagon_ ("IRC is like a revolving door!") 00:47:49 --- quit: Pseudonym ("using sirc version 2.211+ssfe") 00:48:38 > time 00:48:39 Not in scope: `time' 00:48:46 lol, there's no way to get the current time in haskell? 00:48:49 > now 00:48:50 Not in scope: `now' 00:48:50 --- join: xinming (n=xinming@222.212.0.14) joined #haskell 00:48:59 ah, probably a module 00:49:18 ?hoogle time 00:49:19 System.Time :: module 00:49:19 Time :: module 00:49:19 System.Locale.time12Fmt :: TimeLocale -> String 00:49:59 ?docs System.Time 00:49:59 http://haskell.org/ghc/docs/latest/html/libraries/base/System-Time.html 00:55:04 --- join: Jaak (n=Jaak@193.40.10.181) joined #haskell 00:56:50 --- quit: jgrimes (Read error: 110 (Connection timed out)) 01:06:27 --- quit: Ademan ("Leaving") 01:06:35 --- join: pstickne (n=pstickne@c-71-236-176-94.hsd1.or.comcast.net) joined #haskell 01:09:34 ?uptime 01:09:35 uptime: 6d 14h 11m 45s, longest uptime: 6d 14h 11m 45s 01:09:55 so clearly its possible to find out the current time using the haskell language... 01:12:48 --- quit: prb_ () 01:13:39 Even if the way to get the current time were named 'time', lambdabot wouldn't let you use it, because it'd have to live in the icky IO monad. 01:13:44 do { t <- getCurrentTime; show t } 01:14:06 oh, and that's Data.Time 01:14:11 which is *much* nicer than System.Time 01:14:14 > toCalendarTime =<< getClockTime 01:14:15 Not in scope: `getClockTime' 01:20:10 what's that lib that's a unicode wrapper around bytestrings called? 01:20:15 the* 01:20:54 Data.CompactString I think 01:23:43 thanks 01:24:16 --- quit: pstickne (Read error: 110 (Connection timed out)) 01:24:27 --- join: pstickne_ (n=pstickne@c-71-236-176-94.hsd1.or.comcast.net) joined #haskell 01:27:44 --- join: ikegami-- (n=ikegami@29.41.138.210.xn.2iij.net) joined #haskell 01:35:11 --- quit: shawn_ ("This computer has gone to sleep") 01:35:46 --- join: Dybber (n=Dybber@192.38.109.188) joined #haskell 01:35:53 --- join: beelsebob (n=tatd2@194-247-233-62.dynamic.dsl.as9105.com) joined #haskell 01:35:56 --- quit: kombinator (Read error: 113 (No route to host)) 01:39:54 --- join: chris2 (n=chris@p549d2da3.dip0.t-ipconnect.de) joined #haskell 01:43:24 --- join: mr_tenor (n=nick@c220-239-37-8.rivrw7.nsw.optusnet.com.au) joined #haskell 01:43:47 --- join: boegel (n=boegel@86-39-27-222.customer.fulladsl.be) joined #haskell 01:43:49 gour pasted "test" at http://hpaste.org/1192 01:44:03 hmm 01:44:21 glguy: how to direct hpaste to #haskell.hr ? 01:44:26 --- join: kombinator (n=michal@wifi160.wlan.ens-lyon.fr) joined #haskell 01:45:32 (if it's invoked from there) 01:47:18 @seen glguy 01:47:19 glguy is in #haskell. I last heard glguy speak 3h 28m 41s ago. 01:48:02 gour: what about making the announcement yourself instead of using the announce function in the bot? 01:48:33 Vq^: ? 01:50:17 --- quit: boegel ("Leaving") 01:50:17 --- quit: diffbavis (Read error: 104 (Connection reset by peer)) 01:50:41 maybe i misunderstood your question 01:51:08 Vq^: i pasted from #haskell.hr, but bot reported paste here 01:51:25 how do you paste from a channel? 01:53:05 Vq^: well, previously there was separate paste for #haskell.hr, now @paste in #haskell.hr gives http://hpaste.org/new which is disturbing for #haskell users, so question is how to get separate paste for #haskell.hr & similar channels 01:54:08 --- join: nominolo (n=nominolo@dhcp-246-14.nomad.chalmers.se) joined #haskell 01:55:17 ok, then i understand 01:55:23 hej nominolo 01:57:02 --- quit: beelsebob (Client Quit) 01:58:43 --- join: shawn (n=shawn@adsl-70-231-255-214.dsl.snfc21.sbcglobal.net) joined #haskell 01:58:45 --- quit: scw (Read error: 110 (Connection timed out)) 02:00:37 hi Vq^ 02:07:48 --- join: malcolmw (n=malcolm@venice.cs.york.ac.uk) joined #haskell 02:12:14 --- nick: [vincenz] -> vincenz 02:12:24 --- join: the_dormant (n=on@freeway.rd.francetelecom.com) joined #haskell 02:15:32 --- quit: Forn (Remote closed the connection) 02:16:37 --- quit: shawn (Read error: 110 (Connection timed out)) 02:17:07 --- quit: brooks (Read error: 110 (Connection timed out)) 02:25:40 --- join: mrchebas (n=alexey@53532F4D.cable.casema.nl) joined #haskell 02:31:20 --- join: triplah_ (n=tripped@121.45.226.201) joined #haskell 02:31:31 @seen augustss 02:31:31 augustss is in #haskell. I don't know when augustss last spoke. 02:31:34 @seen augustss_ 02:31:34 I saw augustss_ leaving #haskell 14h 13m 30s ago, and . 02:31:56 @seen ddarius 02:31:56 I saw ddarius leaving #haskell, #haskell-overflow and #haskell-blah 2h 46m 27s ago, and . 02:31:57 --- join: brooks (n=chatzill@218.1.118.69) joined #haskell 02:32:18 @tell ddarius wasn't around last night, but am now if you have any questions - or feel free to email them in 02:32:18 Consider it noted. 02:32:22 --- quit: MarcWebe1 ("leaving") 02:32:48 @tell sorear either is fine by me, probably avoiding conflicts is a priority, given a low number of users 02:32:48 Consider it noted. 02:33:37 @where logs 02:33:37 http://tunes.org/~nef/logs/haskell/ http://meme.b9.com/cdates.html?channel=haskell 02:34:47 --- join: guenni (n=guenni@HSI-KBW-091-089-067-034.hsi2.kabelbw.de) joined #haskell 02:41:26 @where isPrefixOf 02:41:27 I know nothing about isprefixof. 02:41:35 it's in Data.List 02:41:41 thanks 02:41:43 @hoogle isPrefixOf 02:41:44 List.isPrefixOf :: Eq a => [a] -> [a] -> Bool 02:42:01 '@where' is for websites, not functions, really 02:42:09 @index isPrefixOf 02:42:10 Data.List 02:42:57 --- quit: kombinator (Read error: 113 (No route to host)) 02:44:30 --- join: diffbavis (i=dv@193.77.153.149) joined #haskell 02:45:52 --- join: wilx|wrk (n=Miranda@gw.eccam.com) joined #haskell 02:48:14 --- quit: bringert () 02:48:49 --- join: kombinator (n=michal@grue.residence.ens-lyon.fr) joined #haskell 02:52:59 tsp pasted "replaceString problem" at http://hpaste.org/1193 02:53:15 I tried to rewrite that, but I know I"m missing something 02:53:30 I worked through the logic, but it still gives an exception at the end 02:55:20 tsp: you don't want that 'do' 02:55:31 tsp: do is for monads, this code is not monadic :) 02:55:34 --- join: LPhas (n=Phas@81-208-106-68.ip.fastwebnet.it) joined #haskell 02:56:13 --- quit: savor (Remote closed the connection) 02:56:15 does that matter? it'll just run them in sequence 02:56:59 tsp: yes, it does matter 02:57:10 tsp: 'just run them in sequence' doesn't really mean anything 02:57:24 tsp: do returns something in some monad; it works out which monad by type inference 02:57:51 you don't want to use any monad here 02:57:54 what can I replace the do with? I tried {, didn't work. I tried nothing, didn't work 02:59:16 Oh, interesting 02:59:26 actually the 'do' isn't your problem, although it's not needed 02:59:35 the problem is you called it replaceINString once 02:59:36 taking it out wouldn't even let it compile 02:59:37 --- join: dfeuer (n=topolog@wikimedia/Dfeuer) joined #haskell 02:59:40 and replaceString the other time 02:59:45 oh 02:59:52 and the compiler didn't warn me about this 03:00:16 ah, that's why 03:00:22 the empty list base case 03:00:25 * quicksilver nods 03:00:34 how can I get it to compile without the do {} in there? 03:00:49 * mux lifts self into the morning monad 03:01:27 tsp: trying to work that out for you. I'm not totally familiar with non-layout code :) 03:01:55 quicksilver: what will happen when I start writing larger projects? noone will be able to read my code 03:02:07 I had that problem with perl :) 03:02:32 heh 03:02:53 I like the fact that I can write a replace in string function by calling it from itself 03:03:07 I imagine it'll be slow as crap though 03:03:35 @src words 03:03:35 words s = case dropWhile isSpace s of 03:03:36 "" -> [] 03:03:36 s' -> w : words s'' where (w, s'') = break isSpace s' 03:04:07 --- quit: brooks (Read error: 110 (Connection timed out)) 03:04:24 dropWhile isSpace s? 03:04:31 tsp: there are some things you could do to speed it up -- computing the length of the thing being replaced over and over is a bit of a waste 03:04:34 does that trim spaces from the beginning of the string? 03:04:53 Cale: but I'd need to keep passing the length around 03:04:53 tsp: yeah 03:04:56 --- join: der_igel (n=der_igel@brsg-4db2d38b.pool.einsundeins.de) joined #haskell 03:05:11 tsp: indeed you would, though you could do that in an internally defined function 03:05:13 er 03:05:15 actually, no 03:05:25 it'd still need to be passed around :) 03:05:29 and recomputed 03:05:33 You'd define a function internally which used it as a constant bound by the outer function 03:05:45 you can define functions inside functions? 03:05:50 absolutely 03:05:51 neat 03:05:53 with where and let 03:05:56 tsp: the only way I can get it parse without layout is to add a module Main where {} around the whole thing 03:06:00 You can make local definitions 03:06:08 quicksilver: heh 03:06:11 Cale: have you ever tried turning off layout for the toplevel? 03:06:26 Cale: I can't seem to do with without an explicit 'module' 03:06:46 quicksilver: Yeah, you probably need that. 03:07:29 is layout itself written in haskell? 03:07:55 quicksilver annotated "replaceString problem" with "remove the 'do'" at http://hpaste.org/1193#a1 03:08:10 tsp: there is my version with no 'do' 03:08:56 Cale: the report appears to be incorrect. the report has the grammar reductions : module -> body and body -> { impdecls; topdecls; } 03:08:58 got it 03:08:59 neat 03:09:07 I think I'm slowly starting to figure this out :) 03:09:16 Cale: but that isn't accepted by ghci with explicit {}s 03:09:57 --- join: edwardk (n=edwardk@pdpc/supporter/base/edwardk) joined #haskell 03:10:07 tsp: the reason your do code worked, is that lists are a monad. And because you only had one statement in the 'do' it wasn't actually doing anything monadic. It was an odd way to write it, though :) 03:10:13 Cale annotated "replaceString problem" with "my version of your idea" at http://hpaste.org/1193#a2 03:10:34 Cale: he's using a screen reader, layout isn't convenient for him :) 03:10:40 oh 03:10:43 okay... 03:11:48 Cale annotated "replaceString problem" with "without layout." at http://hpaste.org/1193#a3 03:11:52 interesting, perhaps that's a good justification to provide explicit layout as an option 03:12:06 dcoutts: ? 03:12:14 not, 'perhaps' is is a good justification 03:12:21 quicksilver: accessibility 03:12:40 dcoutts: what does explicit layout mean? 03:12:43 dcoutts: but your phrasing suggested that explicit layout wasn't an option currently 03:12:44 That's a good point, I wonder how accessible python is. 03:12:44 and a tool to convert implicit to explicit for people who want to read code that way 03:12:48 dcoutts: that's what confused me 03:12:58 Cale: someonw rote me a brace processor for python :) 03:13:05 tsp: nice :) 03:13:08 else i have to use l in ed with tabs 03:13:14 quicksilver: well few people use it, that's what I mean and some people wonder why it's provided as an option 03:13:20 dcoutts: right, yes :) 03:13:40 dcoutts: I just discovered an odd bug, too; it seems you can use explicit at the top level, unless you use the module Main where {} form 03:13:45 dcoutts: s/can/can't/ 03:14:00 quicksilver: report it as a bug 03:14:02 dcoutts: so 'quick scripts' can't use explicit at the top level 03:14:09 dcoutts: in what? ghc? 03:14:12 right 03:14:24 though check what hugs does too 03:14:42 clear 03:14:44 might be a bug in both or our misunderstanding 03:14:56 if they differ it's a bug 03:15:40 dcoutts: I don't have hugs here 03:15:49 dcoutts: I checked the grammar the haskell report 03:15:52 quicksilver: what's the example, I'll try it 03:15:57 dcoutts: it's fairly clear to me that it should work 03:16:02 I'll paste it 03:16:15 --- quit: tizoc (Connection timed out) 03:16:27 --- quit: dfeuer (No route to host) 03:16:35 quicksilver pasted "simple top-level explicit layout (not accepted by ghci)" at http://hpaste.org/1194 03:17:56 quicksilver: ok, hugs accepts that so it must be a ghc bug 03:18:09 so go ahead and report it 03:18:38 and cite the example of users with screen readers as an extra motivation to fix it 03:20:23 --- join: tizoc (n=user@r190-64-207-192.dialup.adsl.anteldata.net.uy) joined #haskell 03:21:42 quicksilver: what if you drop the braces? 03:22:02 Cale: then it doesn't like the '3' on its own 03:22:11 Cale: it believes that to be the start of a new topdecl 03:22:14 ah, okay 03:22:33 Cale: the real example was fun x = \nif 03:22:38 Yeah, so I suppose you need to include an explicit module declaration. 03:22:44 yes, that's the workaround 03:22:49 but it should work :) 03:23:01 which is just module Main where { ... } 03:25:17 Cale: yes, that's what I did :) Note that line in the code I pasted for tsp just before you did :) 03:25:20 http://hackage.haskell.org/trac/ghc/ticket/1253 03:25:22 Title: #1253 (Can't use explicit braces/semicolons (i.e. non-layout) at top level with ... 03:26:39 quicksilver: good bug report 03:26:57 thanks :) 03:27:03 --- quit: noclouds (Remote closed the connection) 03:28:19 --- join: DukeDave (n=DukeDave@146.227.5.194) joined #haskell 03:31:15 --- join: robreim (n=bobstopp@luckynet229060.luckynet.jp) joined #haskell 03:34:05 --- join: cptchaos (n=cptchaos@e182068137.adsl.alicedsl.de) joined #haskell 03:44:05 --- join: meester (n=meester@e248078.upc-e.chello.nl) joined #haskell 03:44:09 btw, do ghc and gtk2hs work on windows? 03:44:51 arcatan: yes, perfectly 03:45:41 --- join: daniel_larsson (n=danilo@sd-rlas.servicefactory.se) joined #haskell 03:46:12 --- join: der_eq (n=eq@dslc-082-082-069-211.pools.arcor-ip.net) joined #haskell 03:47:43 --- join: BCoppens (n=bartcopp@kde/developer/coppens) joined #haskell 03:49:54 --- quit: iblechbot (Read error: 110 (Connection timed out)) 03:50:44 --- quit: mrchebas () 03:52:58 @pl \x f -> f x 03:52:58 flip id 03:53:44 @pl \x fs -> map (\f -> f x) fs 03:53:44 map . flip id 03:56:17 --- quit: LoganCapaldo (Read error: 110 (Connection timed out)) 03:57:10 --- join: gh_ (n=gh@geh.loria.fr) joined #haskell 03:57:18 nominolo: or simply map ($x) fs 03:57:34 nominolo: sometimes going all-the-way pointfree isn't worth it :) 03:57:45 lol, Trac - which hackage.org uses - is written in python? 03:57:52 tsp: yup :) 03:58:04 quicksilver: oh, yes. thanks. that looks more readable :) 03:58:05 tsp: the world is a big place, it takes a while to rewrite it *all* in haskell :) 03:58:38 quicksilver: good to know python still has a place :) 03:59:13 one of haskell's major weaknesses is object orientation - e.g. in my replaceString function, I have to explicitly specify the string 03:59:25 --- quit: gh_ (Remote closed the connection) 03:59:26 where in an OO language I would say string.replace(old,new) 03:59:44 so now you write replace string old new 03:59:47 even shorter 03:59:53 ah 04:00:03 hmm, the string object wouldn't change anyway 04:00:06 tsp: maybe that's because haskell is not an object oriented language? :) 04:00:13 tsp: there are no objects in haskell 04:00:26 data Object; 04:00:37 ibid: objects make it significantly easy to encapsulte stuff 04:00:48 s/easy/easier 04:00:50 tsp: so do modules 04:01:08 or data-types 04:01:09 tsp: haskell has quite a different approach, though. that's certainly true 04:01:24 The object.thingInsideObject syntax is just a kluge to make not having multiple dispatch look natural ;) 04:01:25 tsp: maybe so, but that does not make haskell an oo language. for information hiding, use modules 04:01:36 --- part: edwardk left #haskell 04:01:52 LPhas annotated "happs learning" with "(no title)" at http://hpaste.org/1195#a1 04:01:57 for encapsulation, use data-types with record-syntax 04:02:04 tsp: you can encapsulate data and behavior by putting functions inside the data 04:02:07 --- join: dfeuer (n=topolog@wikimedia/Dfeuer) joined #haskell 04:02:09 for templates use higher-order tycons 04:02:22 tsp: hm .. if you use haskell the right way, things are even nicer encapsulated 04:02:33 tsp: haskell offers all the abstractions that OO offers, but they are actually more fine-grained 04:02:43 tsp: so you can pick and choose the appropriate ones for the circumstance 04:02:59 e.g. you start by defining some data type, then the primitives. then you implementation is quite easy to substitute 04:03:00 quicksilver: that's not true. there is no object abstraction in haskell 04:03:21 ibid: I was going to make the same comment, though existentials help 04:03:27 an existential is just an object. 04:03:37 --- join: dirkjanh (i=83d35341@gateway/web/cgi-irc/ircatwork.com/x-9cc47c243aa5dfe3) joined #haskell 04:03:42 full type abstraction, statically checked. 04:03:42 * vincenz beeps dons 04:03:46 dons: an existenial IORef i could buy as an object :) 04:03:48 Subtyping! Emacs! Vim! Ed! 04:04:00 * vincenz peers at pejo 04:04:01 ibid: hehe. ok. state-boy ;-) 04:04:25 dons: oject = identity + STATE + beavior 04:04:31 ibid: not true 04:04:34 Objects don't need to be mutable. For instance, strings aren't in Java. 04:04:36 hmm, could a state help me maintain all the lists I would need in writing, say, an irc client? 04:04:41 or would I still have ot pass it to everything 04:04:42 ibid: what about languages that have non-mutable objects, like ocaml? 04:04:51 vincenz: they are not true objects 04:05:01 ibid: according to *your* definition 04:05:06 vincenz: of course, this is very much a matter of definition :) 04:05:09 tsp,any state you need, you pass in a monad. see e.g. lambdabot or xmonad. 04:05:24 vincenz: according to a definition that makes a lot of sense to me :) ... not mine by any measure, btw 04:05:37 ibid: many people consider it objects hence the little o' in o'caml 04:05:49 mutability is orthogonal and that's what 'ref's are for 04:05:53 vincenz: yes, they do, and they're wrong from my pov :) 04:05:58 but I'd need to make everything a monad - in the case of an irc client, ignore user, etc 04:06:04 but this is a fruitless debate 04:06:07 --> goes 04:06:08 mutability `isOrthogonalTo` objects 04:06:27 > True 04:06:28 True 04:06:28 --- join: gh_ (n=gh@geh.loria.fr) joined #haskell 04:06:30 tsp: no, everything will live in the same monad 04:06:50 nominolo: would that allow me to do something like addToList ignored_users user? 04:07:03 nominolo: or would the one-use-per-variable apply 04:07:17 dons: how hard is it to grow arrays? 04:07:23 tsp: yes, something like: ignoreUser :: Username -> IrcM () 04:07:42 ah 04:07:49 or simply 04:07:55 ignoreNominolo :: IrcM () 04:07:56 :P 04:08:17 I thought that once a variable was set, I couldn't reset it - so if my monad had an ignoreList, I couldn't add to it 04:08:20 tsp: yeah, i think you'll just need some experience writing apps in haskell. none of this is terribly hard, you just have to learn how to do it. 04:08:29 tsp: and ignoreUser u = do s <- get; put (returnNewStateWithUserIgnoredAdded s u) 04:08:32 tsp: that's only true in a sense 04:08:37 ah, return the state 04:08:46 tsp: you can explicitly pass a state around 04:08:54 tsp: and when it changes, you just pass the new state around, instead 04:09:02 tsp: then, that becomes a bit of a hassle 04:09:02 --- quit: dirkjanh ("CGI:IRC (Ping timeout)") 04:09:05 > runState (do x <- get ; put (x+1) ; return () ) 7 04:09:06 ((),8) 04:09:06 tsp: and that's where monads come in 04:09:09 vincenz: yes, but that is just api-sugar ;) 04:09:14 tsp: monads are a way to 'hide plumbing' 04:09:20 tsp: in this case, passing state around all the time 04:09:26 quicksilver: ah, so I can change the monad and it'll get passed around 04:09:27 nominolo: :) 04:09:28 tsp: the state is still being passed but it's hidden away 04:09:31 tsp: right 04:10:22 * nominolo has class now 04:10:23 monads are confusing - I've read docs on them etc but they still get me for a loop, I just know how to read a file now :) 04:10:42 tsp: well you don't need to try to understand them up front 04:10:52 --- quit: nominolo ("Get MacIrssi - http://www.g1m0.se/macirssi/") 04:10:53 tsp: experiement with some general programming and pick them up gradually 04:11:23 I don't want to be stuck writing string parsers :) I want to hack a text editor, but again can't pass the list of lines around 04:11:35 and don't know where to look for easy docs on this stuff 04:11:56 what do you consider easy? 04:11:59 Yay for amazon: 04:11:59 Yay for amazon: As someone who has expressed interest in books by Douglas R. Hofstadter, 04:12:02 you might like to know that "I Am a Strange Loop" will be released on 5 04:12:05 April 2007. You can pre-order your copy for just £14.24 by following the 04:12:07 link below. 04:12:14 grr, damn newlines 04:12:50 tsp: fair enough, but nobody writes a text editor in a new language on their 3rd day :) 04:12:54 http://www.cs.uu.nl/docs/vakken/gont/diktaat.pdf is a reasonable introduction to grammars and parsing e.g. 04:12:57 tsp: it takes a while for it to filter in 04:13:27 * earthy agrees with quicksilver there 04:13:31 earthy: does it deal with GLR? 04:13:34 give it time to gestate 04:13:48 vincenz: it's a bachelor's course... 04:14:08 GLR has matrured enough... 04:14:42 --- quit: Dybber ("Leaving") 04:14:45 yeah, but from 'barely knows fp' up to 'understands glr 04:14:50 ' is quite some ways 04:15:13 you won't get students that far in a mere 200 hours 04:15:15 oh, it's a bacherlor course on FP, I thought it was a bachelor course on parsing 04:15:21 it is on parsing 04:15:39 but it als has to introduce regular languages and grammars and such 04:16:01 isn't GLR just a nondeterministic interpretation of LR tables? 04:16:11 psykotic: you're alive 04:16:34 psykotic: yes, but 'just' is a matter of definitioin 04:17:23 well i mean a naive nondeterministic interpretation, as opposed to something like that algorithm named after a japanese guy which tries to merge "threads" of execution 04:18:21 tomita 04:18:52 ghe. tomita is cool 04:19:01 from a webpage "Tomita's Algorithm amounts to a simple generalisation of the standard LR algorithm. " 04:19:14 parseforests in less than exponential time 04:20:46 vincenz, tomita is glr except that it uses dynamic programming to share as much as possible 04:21:28 basically suppose you have an LR parsing that in one part splits off two ways due to a potential ambiguity and later continues normally. in that case tomita would share the last common part between the two split off parsings 04:21:40 * vincenz nods 04:22:41 so, tomita is a little tricky but just interpreting an LR table nondeterministically is really basic, especially in a functional language 04:23:18 you could write it in a backtracking monad and the code would be the same as a normal LR table machine/driver 04:23:38 --- join: Averell- (n=averell@i577B52F0.versanet.de) joined #haskell 04:23:54 --- quit: Averell (Nick collision from services.) 04:23:56 --- nick: Averell- -> Averell 04:24:28 --- join: kuribas (n=user@108.3-200-80.adsl-dyn.isp.belgacom.be) joined #haskell 04:24:57 --- join: LoganCapaldo (n=logan@ool-457a8e39.dyn.optonline.net) joined #haskell 04:25:01 --- join: Alneyan (n=Hush@i05m-87-90-220-231.d4.club-internet.fr) joined #haskell 04:27:28 vincenz, btw one nice thing about GLR is that you can use the extremely simple LR(0) table generating algorithm and still get something with full generality 04:27:49 psykotic: does it hold the same propertiers as tomita that it improves if you use a 'better' grammar table? 04:27:51 LR? 04:27:54 from that point of view the purpose of the other algorithms is efficiency, not generality 04:28:14 right 04:28:17 which answers my Q 04:28:52 --- join: doserj (n=doserj@dewey.inf.ethz.ch) joined #haskell 04:29:29 Saizan, its a class of bottom-up parsing algorithms. LR stands for left-to-right parse, rightmost derivation 04:30:42 --- join: eddyp_ (n=eddy@ns.bitdefender.com) joined #haskell 04:30:43 ah, so the table is the one with Not-terminal symbols on one side and terminals on the other? 04:32:17 actually the states (one of the "dimensions") is made up of item sets, where an item is a right-hand-side/rule with a "position" inside the rule indicated, and the item sets are closed with respect to an operation thats similar to epsilon closure in regular expressions 04:34:21 so for instance, suppose you have a production expr <- expr + expr 04:34:25 --- quit: ikegami-- (Remote closed the connection) 04:35:15 the possible items for that production would be _ expr + expr, expr _ + expr, expr + _ expr and expr + expr _, where the _ is a position/marker 04:35:39 it basically says how much of that rule has already been matched and how much has to be matched 04:36:08 oh 04:36:31 ok, is something i've never seen :) 04:36:33 so a set of those items corresponds to a bunch of different rules being explored in parallel 04:38:14 i think this is usually covered in compiler courses. most people seem much more comfortable with topdown parsing ala LL(k) 04:38:35 --- quit: bolrod (Read error: 110 (Connection timed out)) 04:39:00 anyway this is the kind of thing that yacc does 04:39:47 --- join: peddro (n=peddro@212.203.31.1) joined #haskell 04:44:14 --- join: bolrod (n=Tim@84-104-179-208.cable.quicknet.nl) joined #haskell 04:47:18 i'm following one this semester, only 48 hours though :\ 04:48:17 --- join: YayikAyran06 (n=YayikAyr@81.214.18.171) joined #haskell 04:50:07 anybody has a code for burrows-wheeler transform? 04:50:40 --- quit: balodja (Read error: 113 (No route to host)) 04:50:46 YayikAyran06, try searching the haskell-cafe archives, i remember someone posted code for BWT there 04:53:00 --- join: chub (n=Chubbuck@195.90.13.83) joined #haskell 04:53:42 --- join: bringert (n=bringert@dhcp-248-145.nomad.chalmers.se) joined #haskell 04:58:11 --- quit: wilx|wrk ("Miranda IM! Smaller, Faster, Easier. http://miranda-im.org") 04:58:41 --- quit: the_dormant ("This computer has gone to sleep") 05:00:34 --- join: the_dormant (n=on@freeway.rd.francetelecom.com) joined #haskell 05:00:37 --- join: twanvl (n=twanvl@ip5451f037.direct-adsl.nl) joined #haskell 05:02:28 --- quit: the_dormant (Client Quit) 05:04:17 --- quit: ski (Read error: 110 (Connection timed out)) 05:05:07 --- join: uccus (n=chatzill@60.225.79.76) joined #haskell 05:15:58 --- join: int-e (n=noone@t54fc41f1.pool.terralink.de) joined #haskell 05:16:38 --- quit: a-priori_ (Read error: 110 (Connection timed out)) 05:18:24 --- join: iblechbot (n=iblechbo@62.216.217.252) joined #haskell 05:19:13 anybody willin to help for a college homework :) ? 05:20:14 --- join: balodja (n=noname@62.117.85.97) joined #haskell 05:20:23 sure 05:21:15 @quote homework 05:21:16 vincenz says: sure, give us your homework and we'll email it straight to your teacher :) 05:21:28 great ;) 05:22:21 bothead make me pass wif A+ ;) 05:22:23 notice how the sarcasm drips off of that like the oil from a philly chees steak 05:23:35 --- join: beelsebob (n=tatd2@82.153.3.179) joined #haskell 05:24:45 I found some funny things today: My last Xmas lecture ... http://www.iks-jena.de/mitarb/lutz/vortrag/weihnacht2004.hs ... Script: http://www.iks-jena.de/mitarb/lutz/vortrag/weihnacht2004.ps.bz2 it's about rautavistic computer science. Have fun or ignore it. 05:29:49 I think Andrzej 05:30:05 aworksi is taking the path to trollhood 05:30:11 Thunder: who uses postscript? 05:30:20 Woo 05:30:21 gtk2hs+= 05:30:23 gtk2hs++ 05:30:28 Gotta love software that builds so smoothly 05:30:29 how did you write that in postscript? I thought it was binary 05:30:34 --- quit: kfish ("pike!") 05:30:45 tsp: You can get the tex source, too. 05:30:57 vincenz: does the haskell gtk api support the accessibility interfaces? 05:31:13 tsp: no idea 05:31:38 Thunder: that reminds me - another thing I want is a way to read tex documents - hearing all the symbols drives me nuts 05:31:45 http://www.haskell.org/gtk2hs/docs/gtk2hs-docs-0.9.11/ 05:32:29 tsp, is pdf significantly better than postscript from an accessibility pov? 05:32:37 pejo: lol 05:32:41 pejo: some would say yes 05:32:48 but adobe reader is so slow its almost unusable 05:33:06 wtf is accessibility? 05:33:09 pdftotext screws up -everything-, including indentation for a python book I found 05:33:27 tsp: Stick to the haskell source and you get the idea. 05:33:33 --- join: dirkjah (i=83d35272@gateway/web/cgi-irc/ircatwork.com/x-e20b838b01e3ae23) joined #haskell 05:33:36 vincenz: it helps screen reader users 05:33:45 tsp: by doing ...what? 05:34:01 vincenz: providing hooks and api's so that we can use the programs 05:34:07 contrast settings help screen reader users 05:34:29 oh, wait, I parsed 'screen reader user' wrongly 05:34:36 vincenz: how so? Contrast is some sort of monitor setting 05:34:37 you mean for TTS 05:34:39 vincenz: yeah 05:34:41 * vincenz nods 05:35:00 I thoguht you meant users that read from screen at first 05:35:13 vincenz: I don't even have a monitor - its in a closet for when I need to pull out the webcam and the other box for some obstenent piece of software that won't talk 05:35:28 --- join: MarcWeber (n=marc@pd9e0bcb7.dip.t-dialin.net) joined #haskell 05:35:37 tsp: you're blind? 05:35:50 vincenz: yup 05:35:53 --- quit: uccus ("Chatzilla 0.9.77 [Firefox 2.0.0.3/2007030919]") 05:36:08 funny enough, I can never configure X properly enough that it'll work 05:36:17 :-) 05:36:24 work = be able to take a screenshot of it to see what breaks 05:36:46 --- quit: dfeuer (Read error: 110 (Connection timed out)) 05:36:49 so I went back to windows as the talking terminal - it has a good vmware setup for the linux box I need for haskell hacking :) 05:37:35 accessibility isn't just the os - I want to buy a new computer, and am 99% positive that I'll have to get a pile of people on irc and the webcam to configure its bios 05:38:33 --- join: mkhl (i=mkhl@200-153-181-164.dsl.telesp.net.br) joined #haskell 05:38:48 --- join: tizoc[w] (n=user@r190-64-32-122.dialup.adsl.anteldata.net.uy) joined #haskell 05:41:52 tsp, are there any text editors with good support for the blind? 05:42:20 --- quit: ClaudiusMaximus ("->") 05:42:29 i remember hearing about emacspeak but wasn't sure about how well it works 05:43:18 --- join: xeroxuni (i=82c0d142@gateway/web/cgi-irc/ircatwork.com/x-b9d29ec9d10686a9) joined #haskell 05:43:19 --- join: nominolo (n=nominolo@intothevoid.csbnet.se) joined #haskell 05:44:03 emacspeak works, but I don't like it much 05:44:24 I don't like the whole arrow keys and cursor movement style of editing 05:44:44 --- join: lordrat (n=lordrat@r2aj154.net.upc.cz) joined #haskell 05:44:49 for example, if you have the mistyped line "this is a test on the #haskel channel on freenode" 05:45:19 you have to hit next-word over the "this is a test of the", then find the l to add an extra l 05:45:45 tsp: you prefer raskin-style leap-keys? 05:45:45 where I can just type out s/haskel/haskell and get it the first time, with ed reprinting the line due to the lack of a trailing / 05:45:45 couldnt you use incremental search to position the point? 05:46:02 this reminds me of the video in which somebody tries to code perl with windows vista speech recognition 05:46:11 psykotic: incremental search might get me somewhere else 05:46:16 arcatan: that was .... sad 05:46:29 tsp: you have ed running on irc? 05:46:40 vincenz: ed on irc? no 05:47:02 but it's become so much of a habbit to type s/x/y without even thinking about it now that I may as well write an ed interface to irc with a scrollback and all 05:47:51 or :quit 05:47:55 --- quit: lordrat (Client Quit) 05:48:10 for example, in emacs's dired mode, emacspeak would speak files, directories and links in different voices - that's all well and good, but it uses a dectalk speech synth which I have. The problem with that is that the speech server lags 05:48:38 --- join: benny (n=benny@p57b564d5.dip.t-dialin.net) joined #haskell 05:48:42 no-one else on the emacspeak mailing list thinks it lags. I think that they're so used to slow speech response that it's natural to them 05:48:50 * quicksilver nods 05:49:14 real screenreader experts have their voices up so fast that unskilled people have no chance of understanding :) 05:49:27 I listened to a podcast of a fast screenreader once 05:49:29 case in point: http://silenceisdefeat.org/~tspivey/eloquence.flac 05:49:40 quicksilver: podcasts are pretty slow 05:49:57 that flac file was my normal speed as of a month or two ago - I think I sped it up a bit since then 05:50:02 woot, after a slightly wrong unification algorithm and a typo, my embedded prolog finally solves the zebra problem. 05:50:15 tsp: but this podcast contained a recording of someones screenreader at high speed 05:50:19 quicksilver: ah 05:50:28 high speed is subjective though :) 05:50:47 tsp: indeed. I don't claim to be experienced, but it was fast enough that I couldn't understand it :) 05:51:04 I can listen at high speed, but most of the info I get is useless - for example in windows 05:51:17 --- quit: YayikAyran06 () 05:51:19 like "Please reboot" 05:51:49 run dialog type the name of a ... control desktop list view not selected my documents 1 of 67 control panel blah blah blah 05:52:06 I don't care that my desktop reappeared for a second and a half 05:53:08 how do you deal with special characters? (non-alphabetical ones) 05:53:20 vincenz: ah, punctuation? it reads them, if I set it to 05:53:33 doesn't that get overly verbose/ 05:53:39 yup 05:53:47 every time I speak, it says less tsp greater 05:54:03 I could turn that off, but I'd need to keep tweaking it for everything I did 05:54:11 does it use a different voice to make it clear it's punctuation? 05:54:20 and under windows I need to go through a cupple of menus to get to it 05:54:30 vincenz: nope 05:54:31 vincenz: that would be highly annoying 05:54:39 quicksilver, apparently you get used to listening quickly quite soon if you do it a lot. I visited a company that monitors tv/radio/newspapers for companies and all they listened to souded like chip and dale. 05:54:43 alphabetical backslash symbol \ 05:54:43 --- quit: xeroxuni ("Stoka--") 05:54:54 heh 05:54:58 for a \, it just says back slash 05:55:10 I typed back slash 05:55:15 yeah 05:55:17 it read that too 05:55:25 well they must sound similar 05:55:32 it does 05:55:33 can it read 05:56:17 err 05:56:19 simpleMonadFunction :: (Monad m) => String -> m String 05:56:22 ouch 05:56:25 can it read λ ? 05:56:32 mux: it read that 05:56:39 as lambda? :) 05:56:43 but its my job to figure out what it does, it doesn't tell me its a function 05:56:49 that's very nice 05:56:56 it said 05:57:16 tsp: no he typed a lambda symbol, he wasn't referring to my code 05:57:19 ah 05:57:21 the ? 05:57:24 no 05:57:28 prior to that was a lambda symbol 05:57:29 only ? if you don't have utf-8 05:57:30 it's extend UTF 05:57:32 damnit 05:57:39 tera term doesn't support utf-8 :) 05:57:42 ok 05:57:48 if it did, it probably would have read something 05:57:54 but yeah, my function signature would be a haskell function signature 05:57:55 λx.x 05:58:03 --- join: vstranger (n=stranger@p57B83FC6.dip0.t-ipconnect.de) joined #haskell 05:58:11 vincenz: it made no sense of that - reading the punctuation literally 05:58:23 even the parentheses? 05:58:27 yup 05:58:37 good :) they 05:58:41 they're maeningfunl 05:58:47 it also doesn't distinguish between 2 of the 3 possible letter "a"s in swedish 05:59:08 * dylan wonders how a braile combination input/output device would be. 05:59:29 dylan: I have a braille display, but that thing is impossible to use when I"m lying in a bed where I do most of my work these days :) 05:59:38 besides, they suck with ed 06:00:00 you use ed and not vi? 06:00:06 --- join: miez (n=g@241-120-16-213.pandsl.hu) joined #haskell 06:00:10 ed and edbrowse 06:00:10 --- nick: peddro -> Peddro 06:00:17 vi displays too much information I guess 06:00:21 probably 06:00:23 edbrowse mostly, but fall back to ed if edbrowse doesn't work 06:00:28 im impressed that you can get anything done at all this way. you must have a very good memory--as a programmer i rely on the screen extensively as a sort of ultra short term memory, i cannot imagine not having that. 06:00:31 --- join: russo (n=russo@dslb-088-074-006-166.pools.arcor-ip.net) joined #haskell 06:00:53 --- quit: mr_tenor (Remote closed the connection) 06:00:58 psykotic: memory wise, its not that great - I have to keep going back up to previous functions/classes 06:00:59 psykotic: I was thinking the same thing, getting the structure of code must require very good memory 06:01:07 haskell is truely annoying 06:01:10 tsp: were you born blind or did it happen later in life? 06:01:13 dylan: born this way 06:01:26 I doubt that I'd want to be able to see - too much new learning 06:01:33 tsp: how do you visualize the relationship between parts of a text} 06:01:41 psykotic: how so? 06:01:43 i feel bad using the term visualize 06:01:48 psykotic: text wise 06:01:48 how do you organize it in your head 06:01:52 psykotic: no idea, I just do 06:01:59 psykotic: I'm stuck in the ed lines mindset 06:02:21 I know that haskell is going to give me problems when I go beyond 1 or 2 functions 06:02:26 tsp: what about such things as matching braces in a java-like language? 06:02:37 vincenz: edbrowse has a B command that solves that, mostly 06:02:49 and it also browses the web which is a plus 06:03:01 but I want to rewrite that is a true talking app 06:03:34 tsp: I guess you also try to minimize what is displayed in whatever windowing system you use? 06:03:34 vincenz: for tsp, haskell has braces :P 06:03:52 I use mutt to read mail, but it's too big and bulky - it takes up an entire screen for its index, when I could use the previous lines of output to display something else 06:03:53 quicksilver: yeah, layout rule would suck 06:03:57 I can imagine that if you keep your function definitions short, haskell might be better than e.g. Java for comprehension. 06:04:12 the best language I've found so far is python - oddly enough 06:04:18 write a brace parser for it and there we go 06:04:18 tsp: with the indent?? 06:04:42 vincenz: I strugled around with tabs and ed's \t\t\t, tried to memorize my level (mostly worked), but someone wrote me a brace parser that helps alot 06:04:56 so I can write def f(x): { 06:04:58 if you like python, try ruby, it's much like python but it has explicit end's 06:05:08 vincenz: ruby and edbrowse's brace matching didn't get along 06:05:15 since it uses end, and no explicit begin 06:05:43 I think it should be easy to persuade any haskell compiler to convert layout to explicit braces and give you the result 06:05:58 yes, that's actually purely a lexer thing 06:06:09 malcolmw: if I start learning haskell, I guess someone will be annoyed enough to write one that goes the other way 06:06:14 tsp: and although haskell has indent rules, it's just a short cut for internal brace-style coding 06:06:17 malcolmw: contributing to it, that is 06:06:17 after all, the compiler it doing it internally anyway, so making it available to the user should be simple 06:06:25 tsp: braces are standard syntax as well 06:07:11 tsp: the lexer replaces the start of an indentiation with a hidden brace, so you can program with explicit braces, but it would be nice if the lexer could reoutput code so you could easily bracify other people's code 06:07:19 vincenz: that would be cool 06:07:36 vincenz: how about going the other way? would people really be able to read, say, a hundred line program written in my style? 06:08:04 tsp: sure, it's somorphic 06:08:10 I do the equivalent of ,s/^\s*//g and it's almost a g/^$/d 06:08:11 isomorphic even 06:08:21 vincenz: isomorphic? 06:08:24 tsp: maybe with some preprocessing (namely, indenting it) 06:08:35 although it would be a little more difficult, I'm sure a tool to convert braces to layout would not take long to write 06:08:37 --- join: jewel (n=jewel@61.247.251.10) joined #haskell 06:08:58 in fact, a compiler can probably do that already as well 06:09:01 tsp: a flat view can be highly confusing if you're not used to it. 06:09:18 tsp: if one line is indented more than a previous line, the lexer inserts a brace for the parser. But you acn progam with explicit braces 06:09:31 vincenz: that part is easy 06:09:39 --- join: the_dormant (n=on@freeway.rd.francetelecom.com) joined #haskell 06:09:45 * malcolmw notes that the Hat parser can read explicit braces and output nicely indented layout style instead 06:09:59 malcolmw: I think the reverse direction would be more interesting for tsp 06:10:27 in theory the Language.Haskell lib can do that 06:10:27 hmm. I wonder how hard it is to write a tool that adds the explicit braces. does something like this exist already? 06:10:37 int-e: it's the lexer that does it... 06:10:38 in practise it misses a bunch of stuff 06:10:40 --- nick: sioraiocht|sleep -> sioraiocht 06:10:51 int-e: pretty much every compiler does layout to braces 06:10:55 int-e: any h98 compatible lexer that keeps comments could do it 06:11:06 the Language.Haskell pretty printer can produce both styles 06:11:15 well, sort of 06:11:17 dcoutts: nice, though what of comments? 06:11:21 oh yeah, I forgot about the comments - compilers tend to strip those away 06:11:24 a h98 lexer would typically remove newlines and blanklines, though 06:11:28 however it does other stupid things like miss out (..)parens 06:11:30 --- join: ddarius (n=Derek@208.180.182.107) joined #haskell 06:11:32 quicksilver: indeed, and comments 06:11:50 which is not the end of the world 06:11:54 but just making that point :) 06:11:59 the HaRe stuff keeps the comments 06:12:02 you'd want to add back newlines between different functions, at least 06:12:10 and possibly around multi-line comment blocks 06:12:16 the whole idea of this tool would be to ease code reading of other people's code for tsp , removing the comments sort of defeats that purpose 06:12:17 since it's a refactorer it tries to keep existing stuff as much as possible 06:12:28 quicksilver: haskell has no way for, say, an editor to find the next/previous function :) 06:12:44 in python, I can just do /^\s*def / 06:12:49 at least with ed 06:12:57 tsp: you can do /^[^\s]/ 06:13:13 what good would that be? 06:13:21 --- quit: vstranger ("BitchX: causing all sorts of havok!") 06:13:23 that woudl search for anything that wasn't indented 06:13:28 --- join: ekidd (n=emk@pool-72-92-149-224.burl.east.verizon.net) joined #haskell 06:13:39 tsp: yes, whic can only be comments or top level deifnitions 06:13:46 * vincenz mutters at the lag induced by his ssh connection 06:13:49 vincenz: unles you're not using layout 06:13:55 --- quit: execlp (Read error: 113 (No route to host)) 06:13:57 vincenz: in which case, any line can be non-indented :P 06:14:01 in layout that holds true, I think 06:14:01 quicksilver: which is rare 06:14:06 vincenz: but not for tsp 06:14:10 vincenz: for him, it's universal 06:14:13 vincenz: in my case, I need a way to jump between elements 06:14:17 quicksilver: n but he can look for braces instead 06:14:24 not for functions 06:14:30 vincenz: toplevels don't get braces 06:14:35 although I could just code with the x = do { thing I did earlier 06:14:43 what you need to look for is 'top-level semicolons' 06:14:53 heh, ;'s could be anywhere 06:14:58 but that implies your editor can match braces 06:15:03 and know which semicolonos are top-level 06:15:09 lol, edbrowse can match braces 06:15:16 but that's it 06:15:21 --- join: execlp (n=execlp@ppp-81-25-50-76.ultranet.ru) joined #haskell 06:15:21 tsp: yes, but match braces and then exclude semicolons inside them 06:15:22 tsp: why not use something custom, namely place a little marker in a comment? 06:15:25 tsp: which is slightly more :) 06:15:38 vincenz: I'll probably end up doing that 06:15:40 /=$/ 06:15:49 {-function-} 06:15:56 /=$/ is pretty good 06:15:59 Why not just add top level type declarations and search for those. 06:16:00 ddarius: You have 1 new message. '/msg lambdabot @messages' to read it. 06:16:06 as long as you make that a convention 06:16:15 quicksilver: what's /=$/? 06:16:25 tsp: regexp for equals at the end of a line? 06:16:29 ah 06:16:30 yeah 06:16:51 that would bork as soon as you have trailing spaces or one-line functions 06:16:59 indeed 06:17:00 foo x = x + x 06:17:06 I was thinking - can I make a function that does nothing, then put it at the beginning? 06:17:09 trailing spaces is just /=\s*$/ 06:17:10 e.g. 06:17:25 f x = func $ x+1; 06:17:31 tsp: id? 06:17:35 where func is something that does nothing 06:17:40 id does nothing 06:17:47 --- join: zarvok (i=ccasingh@BEANCOUNTER.RES.cmu.edu) joined #haskell 06:17:55 whatever = undefined; 06:18:00 tsp: sure you can define func x = x and that will work. 06:18:02 > let foo x = id $ x + x in foo 2 06:18:03 4 06:18:03 (great for prototyping, too) 06:18:11 --- join: shawn (n=shawn@adsl-70-231-255-214.dsl.snfc21.sbcglobal.net) joined #haskell 06:18:23 @src id 06:18:24 id x = x 06:18:26 ah 06:18:44 @src undefined 06:18:44 undefined = error "Prelude.undefined" 06:19:13 what I love doing in haskell, is making everything undefined, making sure my top-level type signuatres are correct and then incrmenentally code, usinig the compiler to tell me when I have bugs :) 06:19:34 sigh, this ssh lag is really annoying, I only see what I type like a second after I type it, all these stupid typos :/ 06:19:35 --- join: shawn_ (n=shawn@adsl-70-231-255-214.dsl.snfc21.sbcglobal.net) joined #haskell 06:20:14 tsp: why do you use X or windows, why not a plain term? 06:20:14 vincenz: are you sshing from a cellphone or something? 06:20:30 tsp: no, but for some reason the box I'm sshing to has a laggy connection 06:20:41 vincenz: I can't use X - I just use it for qemu or vmware since orca nd gnome can speak it :) otherwise, its windows and tera term 06:20:58 the plain terms works, until someone asks me to call them on skype 06:20:59 why not a plain linux tty? 06:21:04 ah 06:21:29 besides, bsd on a sparc box atm, and linux on a vmware box under win for haskell 06:21:32 well X ONLY for skype and then linux tty's 06:21:35 --- join: Ytinasni_ (n=a@203.109.208.201) joined #haskell 06:21:36 ghc doesn't like sparc64 06:22:20 --- quit: Ytinasni (Nick collision from services.) 06:22:25 --- nick: Ytinasni_ -> Ytinasni 06:23:28 tsp: ghc-6.4.1 builds and works fine on sparc, 6.4.2 is ok except for some issues in ghci and 6.6 fails to work for me on sparc64 06:23:53 dcoutts: what does 6.6 do? 06:23:54 tsp: mind you I'm using 32bit user space (as I believe is common) 06:23:59 you could probably use 6.4.2 to compile 6.6 06:24:07 tsp: I've tried 06:24:07 --- join: jmelesky (n=jmelesky@dsl081-136-068.chi1.dsl.speakeasy.net) joined #haskell 06:25:19 tsp: it build the ghc stage2 ghc binary (I think it was stage2 not just stage1) but when run that fails immediately with an error message like "schedule: re-entered unsafely. perhaps you forgot to make a foreign export as 'safe'? " 06:25:47 unsafeMakeStage2 06:25:51 dcoutts: is this on bsd? 06:25:54 tsp: there's a full bug report in the ghc trac somewhere, I think solaris had the same issue. I'm using linux. 06:25:54 weird 06:25:58 ah 06:25:59 linx 06:26:01 s/x/ux 06:26:32 tsp: debian have a build but they build unregisterised, without ghci and without the threaded rts :-( 06:26:42 tsp: which is a shame since 6.4.1 worked just perfectly 06:27:00 * dcoutts -> bed 06:27:05 g'night folks 06:27:09 cya dcoutts 06:27:48 hmm 06:28:11 @tell dons I implemented the new desugarer, see the code in darcs 06:28:12 Consider it noted. 06:34:13 --- quit: shawn (Read error: 110 (Connection timed out)) 06:36:02 --- quit: beelsebob (Client Quit) 06:36:31 ghc not working on sparc64? 06:36:42 --- quit: JohnMeacham (Read error: 104 (Connection reset by peer)) 06:36:43 Naive question of the day: is it considered bad style to use parallel list comprehensions? 06:36:47 * mux ponders booting his netra X1 06:37:00 --- quit: DukeDave (Remote closed the connection) 06:37:05 Alneyan: they're rather nice, imo. 06:37:06 dons: You have 1 new message. '/msg lambdabot @messages' to read it. 06:37:12 Alneyan: though you can always use a zip. 06:37:20 maybe if more people used them, they'd be standardised :-) 06:37:35 Alneyan: certainly not bad style. maybe a bit obscure. 06:38:07 --- join: rashakil (n=rashakil@shocking-pink-21.dynamic2.rpi.edu) joined #haskell 06:39:01 dons: Yeah, I quite like them too, so I reckon I'll stick with them. Thanks! 06:39:14 parallel as in Control.Parallel? 06:39:37 > [x+y | x <- [0,1,2] | y <- [10,30,50]] 06:39:37 Parse error 06:39:44 > [(x, y) | x <- [1..3], y <- [1..3]] 06:39:46 [(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3)] 06:40:28 oh, i tought that was a common use.. 06:40:39 the former, not the latter. 06:41:23 > [[x+y | x <- [0,1,2]] | y <- [10,30,50]] -- this? 06:41:24 [[10,11,12],[30,31,32],[50,51,52]] 06:41:29 no 06:41:33 not nested 06:41:47 parallel / lock-step / zipping 06:42:13 liftM2? 06:42:15 malcolmw: What is the good reason hmake doesn't do macros? 06:42:31 (Saizan : for certain values of 'm', yes ..) 06:42:55 > liftM2 (+) [1..3] [1..3] -- not this 'm', e.g. 06:42:57 [2,3,4,3,4,5,4,5,6] 06:43:03 Igloo: macros are not required for conditional imports 06:44:00 > liftM2 (,) [1..2] [1..2] 06:44:01 [(1,1),(1,2),(2,1),(2,2)] 06:44:05 hunh. 06:44:20 you want the stream monad .. 06:44:24 Igloo: at least, I can't think of a good use of macros that couldn't just be placed directly into the conditional 06:44:31 the stream monad? 06:44:38 --- quit: ddarius (Read error: 110 (Connection timed out)) 06:45:01 merus ; 'return' is 'repeat', and 'join' takes the diagonal 06:45:20 Oho. 06:45:25 Igloo: also, this is the first time anyone ever has tried it :-) which is good evidence that it isn't needed 06:45:41 (merus : and if you want, you can use potentiall-finite streams) 06:45:57 * merus `ap` class -- :( 06:46:20 malcolmw : isn't it evidence that it was needed right here ? 06:46:41 ski_: no, because it was trivially easy to replace the macro with a pure conditional 06:47:30 malcolmw : (heh, was not following your conv.) .. where is this example showed ? 06:47:37 ski_: (it even made the code shorter) 06:47:53 :t repeat 06:47:56 forall a. a -> [a] 06:48:01 :t return 06:48:03 forall a (m :: * -> *). (Monad m) => a -> m a 06:48:11 --- join: Gu1 (n=mwheelen@72.14.22.104) joined #haskell 06:48:12 ski_: in a patch I just pushed to the filepath package repo 06:48:14 > repeat 1 06:48:15 [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... 06:48:36 quicksilver,merus : so 'liftM2' basically is 'zipWith' in that monad 06:48:38 --- quit: zarvok ("BitchX-1.1-final -- just do it.") 06:48:39 ah, gotcha 06:48:41 * quicksilver nods 06:48:45 yes, I worked it out now :) 06:49:03 so parallel list comprehensions are in fact zipWith comprehensions? 06:49:10 hm 06:49:22 [x+y | x <- [0,1,2] | y <- [10,30,50]] 06:49:24 is 06:49:36 zipWith (+) [0,1,2] [10,30,50] 06:49:38 * quicksilver nods 06:49:42 yes, that's what I meant 06:49:46 --- join: erg0t (n=ergot@200.69.210.29) joined #haskell 06:49:53 is this syntax provided by some actual compiler extension? 06:49:59 and, assuming '[]' here is our zipping monad (assuming we can hide the standard one .. or something) 06:50:06 --- join: JohnMeacham (n=JohnMeac@h-69-3-118-110.lsanca54.dynamic.covad.net) joined #haskell 06:50:14 quicksilver : you can always make a newtype, or new datatype 06:50:27 liftM2 (+) [0,1,2] [10,30,50] 06:50:37 http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#parallel-list-comprehensions <-- 06:50:39 Title: 7.3. Syntactic extensions, http://tinyurl.com/y6v6by 06:50:44 do x <- [0,1,2]; y <- [10,30,50]; return (x+y) 06:50:59 [x+y | x <- [0,1,2] , y <- [10,30,50]] 06:51:06 QED 06:51:38 quicksilver : it looks like you're right .. amazing discovery :) 06:52:11 > do {x <- [0,1,2]; y <- [10,30,50]; return (x+y)} 06:52:12 ski_: well this converstaion started 06:52:12 [10,30,50,11,31,51,12,32,52] 06:52:17 ski_: with someone talking about using them :) 06:52:18 ? 06:52:29 sioraiocht: yes, but that uses the standard List monad 06:52:38 sioraiocht: ski_ is talking about a different way of making lists into moands 06:52:41 sioraiocht : that uses the ordinary list monad instance, not the one we were considering here 06:52:48 ah, sorry 06:53:02 --- quit: kosmikus ("leaving") 06:53:03 * sioraiocht just joined the convo 06:53:37 good morning 06:53:59 hm .. so this is strange .. the '|' in parallel list comprehensions is actually like ',', just for another monad 06:54:20 hm, what about guards in list comprehensions 06:54:24 ? 06:54:38 in the ordinary list monad we have 06:55:02 --- join: ihope_ (n=ihope@c-71-205-100-59.hsd1.mi.comcast.net) joined #haskell 06:55:10 --- nick: ihope_ -> ihope 06:55:17 [x+y | x <- [0,3,6,9] , y <- [1,5,8] , x < y] 06:55:21 is the same as 06:55:43 do x <- [0,3,6,9]; y <- [1,5,8]; guard (x < y); return (x+y) 06:55:46 :t guard 06:55:48 forall (m :: * -> *). (MonadPlus m) => Bool -> m () 06:56:04 --- join: johnnowak (n=johnnowa@207-38-246-119.c3-0.wsd-ubr2.qens-wsd.ny.cable.rcn.com) joined #haskell 06:56:25 so, the obvious question is : can one make out other monad an instance of 'MonadPlus', and what does guards mean there ? 06:56:33 (s/out/our/) 06:56:49 --- join: nornagon_ (n=nornagon@203-219-165-210.static.tpgi.com.au) joined #haskell 06:56:49 --- quit: dolio (Read error: 104 (Connection reset by peer)) 06:56:53 :t mzero 06:56:55 forall (m :: * -> *) a. (MonadPlus m) => m a 06:58:27 hm .. which laws should hold ? 06:59:11 i guess 'mzero' must be '[]', if anything at all .. (otherwise we get to partial values, and i don't think we should need to do that) 06:59:49 do (x,y) <- zip [0,3,6,9] [1,5,8]; guard (x < y); return (x+y) <-- it should behave like this one in the list monad, right? 07:00:03 i'm not sure 07:00:17 --- join: crathman_ (n=chatzill@69.15.198.171) joined #haskell 07:00:27 i still don't know what 'guard' would do in the (potentially finite) stream monad 07:00:37 I don't think it can work 07:00:42 --- join: dolio (n=dolio@nr10-216-68-185-39.fuse.net) joined #haskell 07:00:56 the semantics saizan wants is to 'miss out' some elements of the zip 07:01:04 but that's a complete change to the monad 07:01:16 that effect can't be acheived with a monadplus instance 07:01:17 --- quit: MarcWeber ("leaving") 07:01:34 left_mzero :: forall ma. mzero >> ma = mzero 07:02:00 would 'mzero = []' satisfy that ? 07:02:25 (>>) = liftM2 (flip const) -- i think 07:02:53 so that means zipping with the empty list .. and that gives an empty list ! 07:02:58 does there exist some builtin function which would do: (f ["ad", "be", "cg"] ", ") == ["ad, be, cg"] 07:02:59 ski_: mzero = [] would kill everything 07:03:01 ski_: right 07:03:04 I was trying to get readFile behavior to be both strict and faster, so I tried Data.ByteStream.Char8 07:03:05 --- quit: kpreid () 07:03:05 ägh, something like that 07:03:12 Cheery: Data.List.intersperse 07:03:17 quicksilver : so that law holds, at least .. yay ! 07:03:24 :t intersperse 07:03:26 forall a. a -> [a] -> [a] 07:03:30 It seems super slower just doing a B.readFile and then length . B.words on the result 07:03:33 --- join: kpreid (n=kpreid@cpe-24-59-154-165.twcny.res.rr.com) joined #haskell 07:03:35 @src guard 07:03:36 guard True = return () 07:03:36 guard False = mzero 07:03:46 > concat . intersperse ", " $ ["ad","be","cg"] 07:03:47 "ad, be, cg" 07:03:58 Cheery: see? :) 07:04:04 foo = do x <- [0,3,6,9]; y <- [1,5,8]; guard (x < y); return (x+y) 07:04:08 Like more than twice as slow. :o 07:04:36 'foo' zips three lists, and maps '(\(x,y,_) -> x+y)' 07:04:38 I see, I need to concat it myself later then 07:04:43 hm 07:04:43 I wonder if I'm doing something wrong. Maybe using the wong module. 07:04:45 Cheery: yes but that's not very hard :) 07:04:45 well 07:05:00 --- quit: bringert () 07:05:03 --- quit: sioraiocht () 07:05:13 concat $ intersperse ", " ["a", "b", "c"] 07:06:05 > concatMap (++ ", ") ["a","b","c"] 07:06:06 "a, b, c, " 07:07:29 Saizan: similar but not the same :) 07:07:46 yeah 07:08:48 > let return = repeat; join ((a:_):ass) = a : join (map tail . takeWhile (not . null) $ ass); join _ = []; (>>= f) = join . map f; guard b = if b then return () else [] in [0,3,6,9] >>= \x -> [1,5,8] >>= \y -> guard (x < y) >>= \_ -> return (x+y) 07:08:48 Parse error in pattern 07:09:20 Saizan, thanks about that too. 07:09:26 it's also a bit useful. :) 07:10:30 Cheery: so many different ways to do stuff :) 07:11:31 > let return = repeat; join ((a:_):ass) = a : join (map tail . takeWhile (not . null) $ ass); join _ = []; ma >>= f = join . map f $ ma; guard b = if b then return () else [] in [0,3,6,9] >>= \x -> [1,5,8] >>= \y -> guard (x < y) >>= \_ -> return (x+y) 07:11:33 [1] 07:11:43 --- join: HairyDude (n=pwb@cpc4-sket1-0-0-cust922.swan.cable.ntl.com) joined #haskell 07:12:05 is it possible to use DrIFT to make types? 07:12:42 Does that sound normal to anyone? That let l = B.readFile "bigassfile" >>= length . B.words should be horrendously slower than using the Prelude readFile/words ? (where B is Data.ByteString.Char8) 07:13:09 not lazy enough? 07:15:38 dino-: depends how big bigass is 07:15:41 1M 07:15:48 1M? now that is odd 07:15:49 972K or something. 07:15:51 hmm 07:15:55 that's not bigass at all 07:15:59 that's like really tiny :) 07:16:25 there are differences, though 07:16:38 B.readFile keeps around the whole file in a big chunk 07:16:42 --- part: Gu1 left #haskell 07:16:54 whereas the prelude version lets it be GC'ed bit by bit 07:17:02 dino-: try Lazy Bytestring? 07:17:19 Part of why I went for ByteString in the first place is I want it strict. 07:17:37 nod 07:17:38 I want to be able to output '.' chars to stderr as each file is being processed of a large group. 07:17:52 Which, of course, doesn't sequence nice for me with the lazy read. 07:18:12 I think 07:18:13 well depends what you mean by processed 07:18:21 if processed actually does something and uses the result 07:18:28 then that will sequence just fine 07:18:45 if it doesn't then strictifying the file doesn't really help :P 07:18:48 I have a list of FilePath's, I want to get the number of words in each one. Each time one is done, print a '.' 07:18:53 all that does is sequence the file reads 07:19:02 it doesn't sequence the processing :) 07:19:17 so then it has to hold all the files in memory 07:19:24 until you get around to actually doing the counting 07:19:40 ok 07:19:53 --- join: mjk (i=kvirc@218.59.115.234) joined #haskell 07:22:04 I'm trying to gather up all the results of this counting into a list. Later I'll need to see them all to figure out column width for output. 07:22:21 --- join: obsethryl (n=opus@unaffiliated/obsethryl) joined #haskell 07:25:40 --- quit: der_igel ("Leaving") 07:26:09 > let return = repeat; join ((a:_):ass) = a : join (map tail . takeWhile (not . null) $ ass); join _ = []; ma >>= f = join . map f $ ma; guard b = if b then return () else [] in [1,5,8] >>= \y -> [0,3,6,9] >>= \x -> guard (x>= \() -> return (x+y) 07:26:10 [1,8,14] 07:26:28 hm .. so order seems to matter for some reason .. 07:27:10 --- quit: mjk ("KVIrc 3.2.6 Anomalies http://www.kvirc.net/") 07:27:33 --- part: Peddro left #haskell 07:29:20 --- join: scw (i=b92103@bsd5.csie.ntu.edu.tw) joined #haskell 07:29:41 --- join: der_igel (n=der_igel@brsg-4db2d38b.pool.einsundeins.de) joined #haskell 07:31:42 my simply and stupid unification is presumable doing redundant work too often, any off-the-shell unification "libraries" I can use instead? 07:31:47 --- quit: kuribas ("ERC Version 5.0.2 $Revision: 1.726.2.11 $ (IRC client for Emacs)") 07:33:23 I guess I can't use this in any case. It's like 2.5x slower 07:34:24 --- quit: der_igel ("Leaving") 07:42:41 --- quit: dirkjah ("CGI:IRC (Ping timeout)") 07:45:43 Would anyone happen to know of an existing functional doubly connected edge list library? 07:46:18 --- join: lizhn (n=chatzill@222-23.dorm.ccu.edu.tw) joined #haskell 07:47:27 --- part: Thunder left #haskell 07:47:45 I wonder if there's any value in using openFile, hGetContents, hClose for this. 07:48:55 --- join: der_igel (n=der_igel@brsg-4db2d38b.pool.einsundeins.de) joined #haskell 07:50:47 Wow! When I do { h <- openFile "bigtext" ReadMode; content <- hGetContents h; let l = length . words $ content; hClose h; putStrLn $ show l } ... 07:50:57 I get 0 07:50:58 bah 07:51:08 don't use 'hClose' on a handle you've used 'hGetContents' on .. 07:51:50 'hGetContents' will do a 'hClose' itself, lazily .. so you shouldn't do it yourself 07:51:52 *unless* you've forced the contents 07:52:16 --- join: kosmikus (n=andres@gentoo/developer/kosmikus) joined #haskell 07:52:23 I see. 07:52:23 hmm, how much does it cost to buy a trusted SSL certificate? 07:52:35 dylan: depends 07:53:03 http://www.cacert.org/ is fairly cheap 07:53:03 earthy : if you force the whole contents, doesn't the forcing of the final '[]' 'hClose' the handle ? 07:53:05 Title: Welcome to CAcert.org 07:53:25 ski: yeah, and that is exactly when the extra hClose doesn't kill you :) 07:53:44 Ok, I get similar time as with Prelude.readFile now. I wonder if that's what's really going on in there anyway: (\x -> openFile x ReadMode >>= hGetContents) or similar. 07:54:00 better to avoid extra 'hClose', imo .. 07:54:08 ski_: thank you 07:54:31 dylan: however, a 'commercial' license is pricey 07:55:11 (if copy-on-write semantics was implemented in 'hGetContents', it would probably be an error to use 'hClose' then, i think ..) 07:55:14 --- quit: amiddelk ("Cya later") 07:55:49 dylan: bout $100, in practice 07:55:52 ski: hm. yah 07:56:01 dylan: some places will give them for free to opensource organisation, though 07:56:03 (anyway, one should think of 'hGetContents' as calling 'hClose', so that's why one doen't need to do it oneself .. only complication is that it call it lazilly :) 07:56:07 @spell lazilly 07:56:09 lazily Lilly lazuli labially hazily 07:56:30 ofcourse, there are other contexts in which forcing the result garnered from hGetContents is useful 07:56:52 in most of those cases you're probably better of not using it in the first place 07:56:57 such as when you get from a child process and want to wait for it ending 07:57:02 quicksilver: Where readFile will do, you mean? 07:57:04 * quicksilver is deeply suspicious of unsafe lazy IO 07:57:08 dino-: readFile is as bad/worse 07:57:16 oh, when you don't want the lazy at all 07:57:30 --- quit: rashakil ("Leaving") 07:57:44 dino-: basically, you never want IO to be lazy at all 07:58:00 * therp just recognizes how important strictness actually is for the performance of Haskell. 07:58:43 if I was writing an app that didn't care about performance, I'd use strict whole-file IO 07:58:55 if I was writing an app that did care, I'd do my own IO 07:59:06 and make my own decisions about when to read the next chunk 07:59:22 * earthy nods 08:00:26 having said that, readFile getContents are convenient in throwaway programs and shortlived scripts, if you understand the caveats 08:00:45 --- join: Muad_Dib (n=muad_dib@sd511609f.adsl.wanadoo.nl) joined #haskell 08:01:20 Ok, but that brings me back to using Data.ByteString.Char8's readFile. When I want to call words on the result of that: unbelievably slow. 08:02:18 dino-: I"m a bit baffled by that, I must admit 08:02:20 Any alternative to that? 08:02:24 dino-: I suggest a haskell-cafe posting 08:02:27 --- quit: malcolmw ("got to go...") 08:02:33 dino-: you could ask dons or dcoutts, but I think they're asleep :) 08:02:39 hmmm, bytestring is strict so the method of reading it in shouldn't matter, right? 08:03:01 norpan: that doesn't really follow 08:03:09 "don't care but want sane memory usage" is the main use case for lazy IO 08:03:09 That's what I should be using, right? The Char8 sub-module? 08:03:16 * ski_ wonders whether the file is huge .. 08:03:22 ski_: 1M, roughly 08:03:28 ski_: not very big really 08:03:29 quicksilver: well, it' 08:03:41 it will allocate an array for all of it and read it in strictly 08:03:42 ski_: 952k 08:03:48 for values of sane where running a 10 gigabyte file through your code on a 32bit system is viable 08:03:49 norpan: but only once it starts 08:04:07 norpan: it might not read in when you thing it does 08:04:15 try a lazy bytestring? 08:04:18 norpan: it will read in (all at once) once you try to do something with it 08:04:24 yes, exatcly 08:04:26 exactly 08:04:41 Philippa: yeah, I'll try that. Someone else mentioned that earlier as well. I forget whom. 08:04:44 so try another operation, like length 08:05:20 --- join: hrgh (n=ulf@nl-219-237.netlogon.liu.se) joined #haskell 08:05:50 quicksilver: what places have them for $100? 08:06:10 dylan: godaddy.com 08:06:17 ah. 08:06:19 dylan: (probably not the only place) 08:06:49 godaddy is somewhat expensive on the renewals by the way, usually 08:06:54 at least, with domain names they are 08:07:03 mm, very fast, B.length 08:07:04 --- part: chub left #haskell 08:07:16 dylan: IIRC, comodo is cheap-ish, too 08:07:40 dino-: B.length is O(1) for strict bytestrings, yes :) 08:07:42 dino-: it knows how long its buffers are... 08:07:46 Maybe I should try B.split ' ' 08:08:15 I see, yeah. 08:09:16 --- join: ikegami-- (n=ikegami@29.41.138.210.xn.2iij.net) joined #haskell 08:10:01 --- quit: jewel (Read error: 110 (Connection timed out)) 08:10:22 Also much faster than B.words. Interesting. 08:14:31 now that's very off 08:14:32 odd 08:14:40 I thought B.words *was* split ' ' 08:15:24 > words "foo\tbar" 08:15:26 ["foo","bar"] 08:15:27 Actually, split gives me a bigger list. Probably because adjacent spaces are counted separately. Where words is looking for space breaks between things of any length. 08:15:32 split ' ' probably treats "a b" differently 08:15:38 exactly 08:15:54 I'm still surprised by "much faster" though 08:16:23 10x faster 08:16:54 if you can produce a relatively small demonstration of that, I think you should post it to the -cafe 08:17:05 I certainly can. 08:19:00 does 'B' mean ByteString? 08:19:22 lizhn: Yes import qualified Data.ByteString.Char8 as B 08:19:42 --- join: brannon (n=brannon@lnc.usc.edu) joined #haskell 08:19:45 dino: thx 08:19:47 So it doesn't collide with the same-named functions in the Prelude. 08:20:00 --- join: chessguy (n=chessguy@66.33.255.68) joined #haskell 08:20:18 --- quit: Botje (Read error: 54 (Connection reset by peer)) 08:20:19 --- quit: meester (Remote closed the connection) 08:20:25 --- quit: brannon (Remote closed the connection) 08:20:58 hi haskellers 08:21:26 --- join: Plareplane (n=Plarepla@69-11-115-214.sktn.hsdb.sasknet.sk.ca) joined #haskell 08:23:26 --- join: Botje (n=Brownies@dD576403D.access.telenet.be) joined #haskell 08:24:31 --- join: cptchao1 (n=cptchaos@d115152.adsl.hansenet.de) joined #haskell 08:26:36 --- join: laz0r (n=laz0r@port-87-234-144-134.dynamic.qsc.de) joined #haskell 08:27:16 hi, erm, if i would like to see the definition of foldl, where would i look? 08:27:23 @src foldl 08:27:24 foldl f z xs = lgo z xs 08:27:24 where lgo z [] = z 08:27:24 lgo z (x:xs) = lgo (f z x) xs 08:27:31 ah, thank you 08:27:45 @src Data.List 08:27:45 Source not found. And you call yourself a Rocket Scientist! 08:27:57 @source Data.List 08:27:57 http://darcs.haskell.org/packages/base/Data/List.hs 08:28:29 Also http://haskell.org/onlinereport/ , in this case http://haskell.org/onlinereport/list.html 08:28:30 Title: The Haskell 98 Language Report 08:28:30 oh right. 08:28:34 thanks Saizan 08:29:25 laz0r: although, that's a rather odd way to define it, incidentally :) 08:29:47 laz0r: most of us probably wouldn't bother with 'lgo' especially if the purpose was just to explain how it works 08:30:04 --- quit: the_dormant ("Leaving") 08:32:01 --- join: swiert (n=saonteu@dslb-084-063-006-212.pools.arcor-ip.net) joined #haskell 08:32:19 --- quit: seancorfield () 08:34:20 --- part: ADEpt left #haskell 08:34:37 I'm asked to not walk on the grass in an organization email of a conference. I guess the only place where such a conference could be is England. And so it is. 08:35:02 quicksilver, actually i wondered about that too, but its ok, i figured it out... i just wanted to compare it to a definition of foldr in the wikibook im currently reading 08:35:08 laz0r: :) 08:35:36 --- quit: der_eq (Read error: 104 (Connection reset by peer)) 08:35:45 --- join: der_eq (n=eq@dslb-088-070-018-056.pools.arcor-ip.net) joined #haskell 08:36:24 --- quit: hrgh ("leaving") 08:36:47 --- nick: lizhn -> lazist 08:40:41 --- quit: cptchaos (Read error: 110 (Connection timed out)) 08:43:08 --- join: prb (n=prb@c-24-22-188-196.hsd1.wa.comcast.net) joined #haskell 08:48:05 --- quit: der_igel ("Leaving") 08:50:26 --- quit: dvekravy (Read error: 104 (Connection reset by peer)) 08:50:30 --- join: dvekravy (i=dvekravy@real.wilbury.sk) joined #haskell 08:52:47 --- nick: pstickne_ -> pstickne 08:58:10 --- join: bos (n=bos@adsl-69-107-67-47.dsl.pltn13.pacbell.net) joined #haskell 09:00:08 --- quit: lazist (Remote closed the connection) 09:00:10 --- join: der_igel (n=der_igel@brsg-4db2d38b.pool.einsundeins.de) joined #haskell 09:01:33 --- quit: shawn_ ("This computer has gone to sleep") 09:03:33 ?seen kolmodin 09:03:33 kolmodin is in #darcs, #gentoo-haskell and #haskell. I last heard kolmodin speak 1d 9h 35m 48s ago. 09:05:53 --- quit: xs (Remote closed the connection) 09:06:20 --- join: korcs (n=g@241-120-16-213.pandsl.hu) joined #haskell 09:06:33 hello 09:07:48 i notice that ghc's POSIX library of Haskell may not have a feature of 'sticky bit' 09:09:07 actually, ghc's System.Posix has a datatype 'FileMode', but i couldn't find stickyMode::FileMode 09:09:54 --- quit: ihope (Read error: 104 (Connection reset by peer)) 09:10:07 therefore I wrote a short FFI snippet and, my problem was solved 09:10:37 maybe POSIX does not support sticky bit, i don't know 09:11:30 --- join: __xs__ (n=pi@82.152.216.238) joined #haskell 09:11:56 --- join: sm (n=sm@pool-71-104-94-179.lsanca.dsl-w.verizon.net) joined #haskell 09:12:05 anyone has an interest about sticky bit issue? :-) 09:12:14 --- nick: __xs__ -> xs 09:13:13 foldl f = lgo 09:13:16 where ... 09:13:35 foldl f z [] = z 09:13:52 foldl f z (x:xs) = foldl f (f z x) xs 09:14:48 --- quit: xs (Remote closed the connection) 09:15:42 --- join: sioraiocht (n=rtharper@syru197-007.syr.edu) joined #haskell 09:16:26 --- quit: sioraiocht (Client Quit) 09:16:37 --- join: sioraiocht (n=rtharper@syru197-007.syr.edu) joined #haskell 09:20:27 --- quit: Excedrin (Remote closed the connection) 09:20:47 --- quit: der_igel (Read error: 104 (Connection reset by peer)) 09:22:20 ikegami--: pretty sure stick bits aren't in POSIX 09:22:32 --- join: der_igel (n=der_igel@brsg-4db2d38b.pool.einsundeins.de) joined #haskell 09:22:44 quicksilver: good point! 09:22:56 I didn't know it 09:23:02 --- quit: tstewart () 09:23:21 thanks 09:24:10 --- join: Excedrin (i=Excedrin@gateway/tor/x-201d799d923befc9) joined #haskell 09:24:11 --- quit: miez (Read error: 110 (Connection timed out)) 09:24:24 now I rewrite /bin/test in Haskell for a joke on April Fool 09:24:35 --- join: __xs__ (n=pi@82.152.216.238) joined #haskell 09:25:09 --- nick: __xs__ -> xs 09:26:43 and the '-k' option of /bin/test, which tests whether file is sticky or not, is not easy to write in Haskell (needs FFI) 09:27:09 --- quit: crathman_ ("Chatzilla 0.9.77 [Firefox 2.0.0.3/2007030919]") 09:27:39 i need a small C function: mode_t stickyMode (void) { return S_ISVTX; } 09:28:28 however, Haskell FFI is very useful! 09:29:09 haskell FFI is nice and simple 09:29:10 for simple things 09:29:13 I like that very much 09:30:33 --- join: zarvok (i=ccasingh@ENIACONWIRES.RES.cmu.edu) joined #haskell 09:30:55 --- join: crathman (n=chatzill@69.15.198.171) joined #haskell 09:31:35 now I can add some options to /bin/Test, which is written in Haskell 09:31:59 even /bin/test has over 30 options 09:32:53 --- join: reilly (n=rfh@66.159.231.18) joined #haskell 09:33:08 I think it's interesting idea that every commands in /bin is rewritten in Haskell 09:33:52 ikegami--: Is there not even a function for it in System.Posix somewher? 09:34:49 when I looked, there wasn't one 09:35:45 Igloo: I refer /bin/test of GNU coreutils 6.9, and only '-k option (check sticky bit)' needs FFI 09:36:38 Igloo: other options can be written with System.Posix and some with System.IO, System.Directory 09:36:39 Hmm, it would be nice to propose a patch for the unix package in that case 09:37:35 Why am I still here? 09:37:37 --- part: twb left #haskell 09:37:47 > let poly_eval = flip foldl 0 . (((+) .) . (*)) in poly_eval 3 [2,2,1] 09:37:49 25 09:38:16 --- quit: der_igel (Read error: 104 (Connection reset by peer)) 09:39:43 ikegami--: you could use hsc2hs 09:40:14 glguy: that's a nice one 09:40:18 zomg TOO MANY EMAILS 09:40:23 took me a minute to figure out what you were doing 09:40:25 ...wrong window 09:40:26 sorry 09:40:41 @pl \x l -> sum (zipWith (*) (repeat x) l) 09:40:42 (sum .) . zipWith (*) . repeat 09:40:43 (and i still have no idea how it works) 09:41:07 argh 09:41:31 @type (sum .) . zipWith (*) . repeat 09:41:34 forall a. (Num a) => a -> [a] -> a 09:41:44 > let poly_eval x cs = foldr ((. (* x)) . (+)) 0 cs in poly_eval 3 [1,2,2] 09:41:46 25 09:41:46 repeat is wrong anyway. 09:41:58 I"m still not happy enough with the (f .) . g . h idiom to use it in real code 09:42:06 I suppose it's all familiarity and subjective 09:42:09 mauke: thanks, now I'm looking the manual of hsc2hs 09:42:15 @pl \x l -> sum (zipWith (*) (repeat iterate (x*) 1) l) 09:42:16 (sum .) . zipWith (*) . flip (repeat iterate . (*)) 1 09:42:21 but I'm quite happy with f x . g y . h z 09:42:25 and don't much like (f .) . 09:43:09 ikegami--: basically, you use stickyMode = #{const S_ISVTX} 09:43:20 :t \x -> repeat iterate x 09:43:23 Couldn't match expected type `t1 -> t' 09:43:23 against inferred type `[(a -> a) -> a -> [a]]' 09:43:36 morning 09:43:42 actually, in general, I suppose I'm not all that happy with pointfree forms which take more than one paramter in any but the most obvious way 09:44:15 araujo! 09:44:22 chessguy, hola! 09:44:29 --- join: PupenoR (n=pupeno@2002:c87b:b75b:0:240:f4ff:fe6b:7650) joined #haskell 09:44:33 que hay? 09:44:59 I generally dont use pointfree code like the above outside of #haskell 09:45:01 @type (f .) . 09:45:03 parse error (possibly incorrect indentation) 09:45:12 @type (?f .) . 09:45:15 parse error (possibly incorrect indentation) 09:45:20 ?type ((f .) .) 09:45:23 Not in scope: `f' 09:45:26 :t \f -> ((f .) .) 09:45:29 forall b c a a1. (b -> c) -> (a1 -> a -> b) -> a1 -> a -> c 09:45:32 chessguy: (f .) . composes in the second paramter, in some sense 09:45:35 chessguy, no mucho ... despertandome :-) 09:45:40 @pl \f -> ((f .) .) 09:45:41 (.) . (.) 09:45:50 araujo: hola, que tal 09:45:52 tis the famous boobie combinator 09:45:56 vincenz, hola! 09:46:04 @quote casado 09:46:05 chessguy says: mejor cansado que casado! 09:46:06 de donde eres? 09:46:10 haha 09:46:13 mauke: aha, very short! 09:46:20 vincenz, venezuela :-) 09:47:11 me gusta isla marguertia 09:47:53 ugh, I can't focus today 09:48:04 I think that my allergy medicine is affecting me 09:48:11 vincenz cree que puede conversar con nosotros :) 09:48:27 --- join: ddarius (n=Derek@208.180.182.107) joined #haskell 09:49:28 vincenz, haha 09:49:34 vincenz, have you been there? 09:49:41 araujo: indeed I have 09:49:45 --- join: clanehin (n=clanehin@cpe-069-134-236-134.nc.res.rr.com) joined #haskell 09:49:48 Remember we have #haskell.es 09:49:52 --- join: eamelink (i=eamelink@opaal.eamtec.nl) joined #haskell 09:49:54 chessguy: I thought you didn't know me 09:50:46 vincenz, hah, nice 09:52:26 vincenz: i don't 09:52:50 Then refrain from the personal comments 09:52:51 :) 09:53:37 mauke: it works. thanks. I prefer to hsc2hs 09:53:57 --- quit: johnnowak () 09:55:44 --- join: russo_ (n=russo@dslb-088-073-104-153.pools.arcor-ip.net) joined #haskell 09:56:55 --- quit: sioraiocht () 09:59:33 Does anyone know a pwd-equivalent for cygwin that will give a path starting c:/? 10:00:03 \cygdrive\c 10:00:03 ? 10:00:14 something to that extent 10:00:21 Igloo: can't you write one in haskell in about a line? 10:00:40 i had to re-implement which in Haskell, since the one that comes with cygwin always goes barmy for me 10:01:06 ndm: I guess I'll have to 10:01:19 Igloo: oh sorry, I misinterpreted your question, I thought you were asking where c:/ was located in cygwin 10:01:27 * ndm thinks a complete set of console utilities in Haskell would be handy 10:01:55 i currently use unix-tools, but a haskell reimplementation of most would be trivial 10:02:22 is there any way to create a NaN in haskell without divide by zero? 10:02:39 --- quit: russo (Connection timed out) 10:02:41 or alternatively, are there any other predefined Haskell values which have Ord which isn't a proper ordering? 10:05:54 ndm: Why without division by zero? 10:06:12 --- join: MarcWeber (n=marc@pD9E0BED3.dip.t-dialin.net) joined #haskell 10:06:15 Igloo: catch models division by zero as a pattern match failure 10:06:19 sqrt (-1) 10:06:22 > (1/0) < 1 10:06:23 False 10:06:23 break2 = sizeFM $ delFromFM (unitFM nan ()) nan 10:06:25 where nan = 0 / 0 10:06:34 --- join: delYsid (n=user@debian/developer/mlang) joined #haskell 10:06:36 > let x = 2**100000; y = 3**10000 in x-y 10:06:37 NaN 10:06:41 > sqrt (-1.0) 10:06:42 NaN 10:06:43 Igloo: that above example causes finite map to crash with a pattern match error 10:06:51 > let x = 2**100000 in x-x -- tsk, gets optimized to 0. 10:06:52 0.0 10:07:12 doserj: hmm, thats still not great (catch demands non-negative for square root), but may be better 10:07:50 * ndm likes the fact that he can crash FiniteMap :) 10:08:26 Oh, ndm. One thing that struck me is that it seems that you should be citing quite a bit of abstract interpretation work. 10:08:46 --- join: sioraiocht (n=rtharper@syru197-007.syr.edu) joined #haskell 10:08:51 ddarius: ah, quite possibly - do you have any particular reference for Haskell/functional languages? 10:09:30 there is plenty of strictness stuff, but i haven't seen anything on shape analysis or anything in a functional language 10:09:40 ndm: The only paper I can think of off hand that I think directly uses Haskell and abstract interpretation is too specific for you (I think it's a strictness analysis thing.) 10:09:52 Exactly. 10:09:56 ddarius: if you have the name of that paper, i can follow up its references 10:10:14 ddarius: probably worth mentioning strictness analysis in the paper anyway, as it is _the_ analysis for haskell 10:10:41 For abstract interpretation in general you could, among others, cite Cousot Cousot. 10:11:02 Actually, I think there's a paper that relates type checking and abstract interpretation that may use Haskell or another functional language. 10:11:13 --- join: savor (n=savor@unaffiliated/savor) joined #haskell 10:11:38 ddarius: remember anything names/authors of that? 10:12:25 I think I may be able to find it. I only have about 20 more minutes, so if I don't find it now I'll email or @tell you it if I find it later. 10:13:02 Cousot & Cousot paper if you want to cite that http://www.di.ens.fr/~cousot/COUSOTpapers/POPL77.shtml 10:13:05 Title: P. Cousot & R. Cousot, Abstract interpretation: a unified lattice model for stat ... 10:13:38 ddarius: thanks :) 10:14:10 i read the neilsen*2 and hankin book on static analysis - so i know plenty of static anlaysis, but it does definately need a citation for abstract analysis 10:14:46 --- quit: prb () 10:14:56 --- join: seancorfield (n=seancorf@corp.macromedia.com) joined #haskell 10:15:15 not (diagonal . map diagonal . transpose = diagonal . map diagonal) 10:17:00 * sioraiocht o.O 10:17:10 --- join: Excedrin_ (i=Excedrin@gateway/tor/x-f5038aedc9ee62e3) joined #haskell 10:17:43 ndm: http://www.haskell.org/haskellwiki/Research_papers/Compilation#Strictness probably includes the paper I was thinking of for strictness analysis, if not it definitely includes some. 10:17:46 Title: Research papers/Compilation - HaskellWiki, http://tinyurl.com/yst9wl 10:18:13 --- join: whaleofconfusion (n=whaleofc@pool-151-203-148-154.wma.east.verizon.net) joined #haskell 10:18:28 --- join: mnislaih (n=pepe@81.202.139.46) joined #haskell 10:18:35 ddarius: thanks 10:18:49 it also has one on strictness analysis 10:19:07 @check let diag ((a:_):ass) = a : diag (map tail . takeWhile (not . null) $ ass); diag _ = [] in \asss -> (diag . map diag . transpose $ asss) == (diag . map diag $ asss :: [Int]) 10:19:09 Falsifiable, after 13 tests: [[[-5,-7,-4,-1,1,7,5],[]],[[-4,-7,-3,-2,-1],[-7... 10:19:19 --- join: monochrom (n=trebla@toronto-hs-216-138-220-146.s-ip.magma.ca) joined #haskell 10:19:32 --- join: acpx (n=ac@s55920c51.adsl.wanadoo.nl) joined #haskell 10:20:17 this is why the (potentially finite) stream monad is not commutative 10:20:51 --- join: sebell (i=sebell@nat/ibm/x-80ad8fd1d4c4f0fa) joined #haskell 10:20:54 http://www.di.ens.fr/~cousot/COUSOTpapers/POPL97.shtml 10:20:55 Title: P. Cousot, Types as Abstract Interpretations 10:21:27 I haven't read this, but it may also be good, it uses ML http://citeseer.ist.psu.edu/602127.html 10:21:31 Title: An Experiment in Type Inference and Veri (ResearchIndex) 10:22:07 ddarius: perfect 10:22:15 its mostly unreadable 10:22:22 Anyways, I'm off. 10:22:24 ddarius: a recent paper, on a functional language - i'll definately cite it - i may read the abstract ;) 10:22:49 Types as Abstract Interpretation is pretty relevant and uses the (eager) lambda calculus. 10:23:24 neat, thats a good one 10:23:44 really this one shouldn't be referenced, just have a look at it :) 10:24:03 ddarius : hm, which paper was about strictness analysis ? 10:24:09 if you have to explain it you will be in deep trouble 10:24:32 --- quit: sabakas1 (Remote closed the connection) 10:24:51 mattam: i'll take a brief look, but you never have to explain a reference in a conference paper 10:25:15 in a thesis its a different matter 10:25:18 well, you may have to if you meet cousot 10:25:39 hehe, i'm sure he understands his paper ;) 10:25:41 that's what i meant 10:25:52 yeah, exactly :) 10:25:56 --- join: sabakas1 (n=solapus@66.90.121.129) joined #haskell 10:26:55 i'll print a copy now, and see if it does the goods or not 10:27:23 --- quit: swiert () 10:28:45 --- quit: Excedrin (Remote closed the connection) 10:29:57 --- quit: kosmikus ("leaving") 10:30:01 --- quit: gh_ (Remote closed the connection) 10:31:55 --- join: prb (n=prb@c-24-22-188-196.hsd1.mn.comcast.net) joined #haskell 10:31:57 what's the emacs setup of choice for haskell? 10:32:15 haskell-mode with shim? 10:40:32 --- quit: eamelink ("Leaving") 10:41:28 how is shim doing 10:42:32 mattam: that paper is entirely impenetrable, it just goes silly quite quicly 10:43:20 indeed 10:43:36 i'll cite the older one, at least that made sense 10:43:43 this one may be some cryptic code for a joke 10:44:05 --- quit: ddarius (Read error: 110 (Connection timed out)) 10:44:05 try to know the content of what you cite. maybe you don't read it directly but you have to learn its content from somewhere. 10:44:13 well, it's surely a code for "all your types are belong to us" 10:44:56 submitting to ICFP ? 10:45:20 e.g., one may cite the original monad papers, never read it but learned monad somewhere else. 10:47:15 There is a joke among the community of digital signal processing. Everyone cites the original paper that gave the fast fourier transform algorithm, but how many have read it :) They all learned the algorithm from textbooks written after that paper. 10:47:23 --- quit: vincenz ("leaving") 10:47:23 --- quit: ekidd () 10:47:38 --- join: vincenz (n=vincenz@pc-david.dacya.ucm.es) joined #haskell 10:47:41 --- quit: chris2 ("Leaving") 10:48:08 --- nick: vincenz -> [vincenz] 10:49:06 Cousot's papers and talks are quite cryptic. Dialogues in person are normal. Someone who has met him told me this. 10:49:19 it is certainly best this way. source papers are as often badly written as others in my small experience 10:50:03 --- join: stepcut (n=user@ip68-107-76-154.sd.sd.cox.net) joined #haskell 10:50:34 man, ghc takes ages to compile 10:51:09 --- join: dfeuer (n=topolog@wikimedia/Dfeuer) joined #haskell 10:53:11 The Cousot experience is quite surreal, I'm told. Talks are cryptics but dialogues are fine. So, you go to his talk, it's all unreadable math. Then you ask a question, and suddenly he makes a lot of sense. Then he continues the talk, and it's back to Martian. The mode switch is quite surreal. 10:54:04 Yes i've seen that happen :-) 10:54:59 --- join: dataangel (n=prophet@146.113.67.54) joined #haskell 10:55:16 mattam: yes, i am submitting to ICFP 10:56:30 --- join: arjanb (i=borganis@borganism.student.utwente.nl) joined #haskell 10:56:34 hmm, are there any Haskell types that are in Eq but not Ord? 10:56:52 no. 10:56:56 Ord requires Eq 10:57:09 int-e: my question is the other way round 10:57:13 The point is that he's the abstract one and his students do the concretion of his ideas somehow. That's how his course on AI is done: he does the theory, they show how it can be applied successfully (which require that you have grasped the theory too). 10:58:10 ndm: hah. hmmm. 10:58:19 ndm: Bool? 10:58:27 @instances Bool 10:58:28 Couldn't find class `Bool'. Try @instances-importing 10:58:45 bos: it is an instance of ord, for example the <= operator is implies ;) 10:58:52 oh, huh. 10:58:59 ndm: Complex 10:59:06 "haskell types" as in those provided by the standard? 10:59:18 yes, looks like all standard types in Eq are also in Ord 10:59:28 even () is in Ord, which is just weird. 10:59:36 > () > () 10:59:38 False 10:59:47 --- join: ddarius (n=Derek@208.180.182.107) joined #haskell 10:59:51 int-e: well found, thanks :) 11:00:03 so you can sort lists of units :) 11:00:08 int-e: is that the only one? 11:00:24 Complex is a bit different because it's a typeclass 11:00:36 LPhas pasted "(no title)" at http://hpaste.org/1198 11:00:52 If you allow the FFI, certain pointer types are Eq but not Ord 11:00:52 Option has one ? 11:01:11 err Maybe 11:01:12 monochrom: thats a good one, comlex numbers are quite difficult 11:01:59 Oh damn I misread, the pointer types are Ord. 11:02:54 But yeah, Complex Double is Eq but not Ord. 11:02:55 --- quit: michiel (Remote closed the connection) 11:02:56 ndm: it's the only one I can think of (aside from obvious derivatives like [Complex] or Array i Complex) 11:03:10 int-e: thanks 11:04:06 Handle is Eq and not Ord :) 11:04:14 (and I realize that Complex is missing a type argument there) 11:04:14 * monochrom is doing an exhaustive search :) 11:04:31 exhausted eyt? 11:04:49 --- quit: roconnor (Read error: 104 (Connection reset by peer)) 11:04:55 IOException 11:04:56 i'm just doing an exhaustive hoogle database manip 11:05:15 do you guys have some method for chaining things? like: a ++ b ++ c, without the (++)s 11:05:25 Cheery: concat 11:05:43 --- join: meester (n=meester@a80-100-23-153.adsl.xs4all.nl) joined #haskell 11:05:49 Cheery: most operators have list versions when appropriate 11:05:50 Is there a good explanation somewhere of haskell's memory model? Like how long does it keep the results of lazy evaluation of a list before it drops it to let it be recomputed the next time it comes up, etc.? 11:06:21 ndm: IORef is Eq but not Ord 11:06:39 i have a list now, i'll just post it 11:07:08 Fun. 11:07:46 --- join: Orphi (n=chatzill@host86-130-27-118.range86-130.btcentralplus.com) joined #haskell 11:08:38 * monochrom is an organic Hoogle :) 11:08:49 brb 11:08:50 --- quit: dataangel (Remote closed the connection) 11:09:10 --- quit: dfeuer (No route to host) 11:09:11 is there a way to make GHCi / a GHC-compiled program crash if it uses for than X bytes of RAM? 11:09:37 I just ran a program and it almost killed my PC by exhausting all available virtual memory :-} 11:09:52 well, I guess the program just aborts if it runs out of memory 11:10:03 Yes. There is a way of "+RTS something" to say the heap must never exceed X. 11:10:21 I see... any idea what the 'something' is? 11:10:25 --- join: bluestorm_ (n=bluestor@mna75-1-81-57-39-150.fbx.proxad.net) joined #haskell 11:10:25 Orphi: or you could use your OS's memory limit 11:10:29 * Orphi starts flicking through the GHC manual 11:10:29 --- join: wy (i=wy@rrdhcp216-537.redrover.cornell.edu) joined #haskell 11:10:33 http://neilmitchell.blogspot.com/2007/03/eq-but-not-ord.html 11:10:35 Title: Neil Mitchell's Haskell Blog: Eq but not Ord 11:10:38 Orphi: what about ulimit -v? 11:10:47 --- nick: Excedrin_ -> Excedrin 11:11:05 what's ulimit? 11:11:20 -M Sets the maximum heap size (default unlimited) Egs: -M256k -M1G 11:11:23 I'm trying to switch to Windows version of Haskell. But I got the error the 'impossible' happens when I tried to run the program wrote in Linux 11:11:47 Excedrin: ah... that sounds like what I want. 11:12:01 ./somebinary +RTS '-?' will spit out all of the valid RTS options 11:12:12 also worth knowing :) 11:12:29 FWIW... I did a sorting benchmark 11:12:39 quicksort took 500 ms... insertion sort almost killed the PC o_O 11:12:58 wy: from the compiler? can you give the full error message 11:13:00 @paste 11:13:01 Haskell pastebin: http://hpaste.org/new 11:13:01 Thou hast very leaky insertion sort indeed. 11:13:10 er... yeah 11:13:13 I'm wondering if it's possible to use Haskell under Windows 11:13:14 wy: ^^^ paste it if its too long 11:13:21 wy: yes, i do all the time, and am right now 11:13:27 I'm not completely convinced I shouldn't have used the strict version of fold... 11:13:31 --- join: kowey (n=kowey@4aa54-4-82-234-151-151.fbx.proxad.net) joined #haskell 11:13:31 : panic! (the 'impossible' happened) 11:13:31 (GHC version 6.6 for i386-unknown-mingw32): 11:13:31 loadObj: failed 11:13:31 wy: Haskell is 100% supported on windows 11:13:50 wy: is that running a linux binrary? or compiling? 11:13:59 wy: how do you provoke that? 11:14:06 I'm using emacs and running ghci just on the source 11:14:33 I don't have the source with me, but it was something like > isort = foldl insert [] 11:14:47 --- join: dataangel (n=prophet@146.113.67.54) joined #haskell 11:14:49 ndm, I'm wondering if my set up is wrong. I just unzipped the package of ghc6.6 11:14:58 wy: why not use the installer? 11:15:03 @src sort 11:15:04 :t insert 11:15:04 sort = sortBy compare 11:15:06 forall a. (Ord a) => a -> [a] -> [a] 11:15:08 thats what i do, and its very reliable 11:15:25 ndm, Maybe I should try the installer 11:15:29 > foldl' insert [] [100,99..0] 11:15:29 @src sortBy 11:15:30 Occurs check: cannot construct the infinite type: a = [a] 11:15:30 Expected... 11:15:31 sortBy cmp = foldr (insertBy cmp) [] 11:15:36 there 11:15:42 ndm, does it set some environment variable other than PATH? 11:15:47 okay 11:15:55 wy: no 11:16:00 --- quit: chessguy ("Leaving") 11:16:04 ghci runs my code, but when i try and compile, i get 11:16:05 usr/bin/ld: Undefined symbols: 11:16:05 _stmzm2zi0_ControlziMonadziSTM_check_closure 11:16:06 wy: but it may play with the registry slightly, although i didn't think so 11:16:08 ...why? 11:16:17 sioraiocht: did you pass --make ? 11:16:40 no... 11:16:43 anyhow... a while back a wrote a quicksort that swaps to insert sort when the list becomes "small" 11:16:48 ndm, I'm installing 11:16:54 but my mistake: using the length function ;) 11:16:57 and it's just one script, with 3 imports 11:17:09 ndm: that worked 11:17:14 ndm: what does that do? 11:17:26 it links the packages you imported in the binary 11:17:29 ah 11:17:34 sioraiocht: that makes it link properly, always do --make (Yhc is always in --make mode) 11:17:50 Orphi: merge sort works better for linked lists 11:18:16 int-e: I had expected this... but a benchmark showed it as SLOWER than quicksort... for no obvious reason 11:18:25 > foldl' (flip insert) [] [100,99..0] 11:18:26 [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2... 11:18:27 @src FilePath 11:18:28 type FilePath = String 11:18:58 @src Data.List.sort 11:18:58 Source not found. I've seen penguins that can type better than that. 11:19:05 ...?! o_O 11:19:07 thanks guys, I'm not used to compiling my code :) 11:19:22 ndm, the same problem... 11:19:34 ndm, do you use emacs ? 11:19:42 wy: no, i use textpad and winhugs 11:19:50 wy: does it work when you run things from the command line? 11:20:33 ndm, I haven't tried yet 11:21:02 ndm, too bad. emacs froze 11:21:24 wy: try the command line, if it seems to not be Emacs fault, then report it as a bug 11:21:28 is there anyway I get a function to loop forever so that its thread doesn't die? 11:21:32 possibly report it as a bug anyway 11:21:37 ndm: The relevance of the Eq not Ord... ? 11:21:44 ?src forever 11:21:44 Source not found. The more you drive -- the dumber you get. 11:21:48 ddarius: I can crash FiniteMap 11:21:58 instance Ord Errno where compare _ _ = EQ 11:22:00 break3 = sizeFM $ delFromFM (unitFM (Errno 1) ()) (Errno 2) 11:22:01 why does it yell when I do something like this? > instance StyleElement [Import] where 11:22:05 Is it possible to use guards to tokenize strings? 11:22:15 class StyleElement a 11:22:17 sioraiocht, just call it again at the end 11:22:22 You can get a function to block forever so that its thread doesn't die. Create an MVar and wait on it. 11:22:26 ddarius: you just have to prevert the Ord function, and the example is shorter if you don't have to introduce a new data type 11:22:38 block forever is cheaper than loop forever 11:22:47 So, why can't I give such instance of my class StyleElement for a list of type Import? 11:22:55 anyway, me off home - bye 11:22:58 Saizan: it forks off threads, I want 20, not an infinite number ;) 11:23:36 --- quit: ndm ("Chatzilla 0.9.77 [Firefox 2.0.0.3/2007030919]") 11:24:31 --- join: longarms2 (n=jumperjm@A027243.N1.Vanderbilt.Edu) joined #haskell 11:24:31 Cheery: AFAIK, you can write an instance for ALL lists, not just not for one specific type of list... 11:24:50 --- quit: obsethryl (Read error: 110 (Connection timed out)) 11:24:53 * Orphi waits to be contradicted 11:25:13 If you do, you can't make an instance for any particular list of X 11:25:40 > instance StyleElement a => StyleElement [a] where 11:25:41 Parse error 11:25:49 that works. 11:26:00 but it does not do exactly what I'm looking for 11:26:24 Import requires to be handled differently than say, other instance of the same class 11:26:51 mmh, what's the error? 11:27:13 Illegal instance declaration for `StyleElement [Import]' 11:27:27 (The instance type must be of form (T a b c) 11:27:36 where T is not a synonym, and a,b,c are distinct type variables) 11:27:36 In the instance declaration for `StyleElement [Import]' 11:27:39 instance Foo (Tree a) where -- should work 11:27:49 instance Foo (Tree Int) where -- wont' work 11:27:50 --- join: SyntaxNinja (n=ijones@gw-1.galois.com) joined #haskell 11:28:11 Orphi: why? 11:28:26 that's apparently how the rules work 11:28:26 --- quit: wy ("Leaving") 11:28:30 if I'm remembering this right... 11:28:43 i think it's a restrictive rule to make type inference decidable 11:28:49 or something like that 11:29:07 have you tried with -fglasgow-exts? 11:29:07 in fact yeah - it says in right there in the error message; T a b c, where a, b and c are type VARIABLES, not specific types 11:29:23 you'll probably have to play with newtype :( 11:29:24 tried, said same 11:29:48 newtype Foo = Bah Int and then instance Thing Bah might work 11:30:03 are you sure? 11:30:10 no 11:30:12 lol 11:30:12 instance Thing Foo 11:30:15 Cheery: You may want -fundecidable-instances (or one of the other two -fblah-instances flags) 11:30:35 --- quit: jgrimes_ ("Leaving") 11:30:41 ...uh, yeah, what Saizan said :$ 11:30:43 heha, maybe that Foo -thing goes. :) 11:31:46 so in your case, it's... let me see.... newtype ListImport = [Import], and then instance StyleElement ListImport where... 11:32:15 gah... newtype ListImport = MkListImport [Import] 11:32:24 but it's quite ugly 11:32:28 indeed 11:32:36 -fallow-undecideable-instances ftw 11:32:44 unnamed.lhs:25:21: parse error in data/newtype declaration 11:32:50 and it won't magically make [Import] behave differently; you have to manually tag on MkListImport to get the different behaviour. 11:32:51 s/undecideable/undecidable/ 11:33:17 otherwise, yeah, bring on the experimental type system extensions! :-} 11:33:24 :P 11:33:55 {-# OPTIONS -fallow-undecideable-instances #-} 11:33:59 Cheery: You can also say (roughly) class HasListStyleElement ; instance HasListStyleElement Import; instance HasListStyleElement a => StyleElement [a] where ...; 11:34:05 hmm... rank-2 polymorphism, multiparameter type classes, functional dependencies, GADTs, polymorphic components, existantial quanitification... 11:34:08 * Orphi feels ill 11:35:15 ...now that's what I call thinking! heh 11:35:15 MPTC are in mtl, i won't count them as "experimental" or anything 11:35:31 except the option -thing does not fix it 11:35:33 mtl? 11:35:40 See http://www.haskell.org/ghc/docs/latest/html/libraries/base/Text-Printf.html#t%3AIsChar 11:35:42 http://tinyurl.com/2gflfv 11:35:55 Orphi: Control.Monad and co. 11:36:21 --- quit: Laney ("( www.nnscript.de :: NoNameScript 4.02 :: www.XLhost.de )") 11:36:21 to me, anything not in Haskell 98 is "experimental" ;) 11:36:31 let's face it, Haskell 98 is pretty powerful on its own... 11:36:43 Particularly the "instance IsChar c => PrintfArg [c]" 11:37:19 * Orphi destroys a priceless ELO classic with his bad singing 11:37:25 I think I stop hitting myself to head with a keyboard and go on, it's not too big trouble to not be able to do that 11:37:30 Orphi: yeah, but it requires some strange class encoding like in this case 11:37:45 Orphi: Sure, and sed is Turing complete :-) 11:38:09 POV-Ray is Turing complete... I'm still trying to replace it's language with Haskell 98 ;) 11:38:32 Orphi: cool 11:38:50 Postscript can do ray-tracing. 11:39:02 I've been wondering in what sense it is turing complete 11:39:08 seriously... Haskell seems to attract bizzare type system extensions like anything. I've yet to see much explanation of what all this stuff is for! 11:39:40 Postscript can most certainly do ray-tracing. Now try to rasterise it on a HP LaserJet 6P...! 11:39:58 (the users weren't amused) 11:40:00 I think it's due to a combination of the two Simons and the one Oleg. 11:40:47 orphi, ofr example, if Monad was a MPTC we could have a Set monad 11:41:21 I now think the idea of type classes attracts lots of extension dreams. 11:41:41 I have a Haskell book here, and virtually everybody involved in its production works at Oxford Uni. I should get over there! lol 11:42:09 Study under Richard Bird. You will come out reborn. 11:42:22 3 guesses who edited this book :P 11:42:53 and then 3 guesses what the book is... after all, the Haskell bookshelf is hasn't "large" 11:43:07 grr... my typing sucks tonight :( 11:43:16 --- quit: Ytinasni (Read error: 111 (Connection refused)) 11:43:37 monochrom: It doesn't help that the Haskell masses swarm upon new extensions like vultures as soon as they are available. 11:44:10 --- quit: eddyp_ ("Leaving") 11:44:38 ...there are Haskell masses? 11:45:48 --- quit: bos (Read error: 110 (Connection timed out)) 11:46:30 random question: if I somehow succeeded in writing a Haskell to Java compiler, would anybody care? 11:46:51 Haskell extensions are more conservative than other community's extensions. By this I mean the former receives quite some rigour while the latter are just based on delusive intuition. Consequently the mass feels more confident, and objective there is less grey area ==> less need to debate. 11:46:57 Orphi : java or jvm bytecode ? 11:47:06 Java source 11:47:09 s/objective/objectively/ 11:47:49 * SamB wonders why his system is writing to disk so much... 11:47:50 monochrom: I gather the Haskell' guys are currently debating FDs vs ATs 11:48:13 Orphi: really? 11:48:21 apparently... 11:48:33 I was kinda just waiting to get the chance to run them head to head ;-) 11:48:34 myself I like ATs more... but no one has ever implemented them 11:48:57 [...although if my Haskell to Java compiler ever happens... muhuhuhuh!] 11:49:14 That thing I was talking about earlier, hideous Data.ByteStream.Char8.words performance. Seems like it all stems from the B.splitWith isSpace 11:49:15 we have ATs, but ATs are not so great compared to AT synonyms 11:49:27 If I change that to B.split ' ', tremendously faster. 11:49:35 (only in GHC 6.7, mind you, but still...) 11:49:46 and AT synoyms we haven't got yet 11:49:53 I found that out the hard way 11:50:00 There are some debates. Note that the level is higher. We don't debate "should we have GC? should we have foldl?". The Python people use only subjective intuition and therefore they debate obvious things, for example. 11:50:01 ...and again I'm feeling hopelessly lost... 11:50:04 AT? 11:50:12 ah, associated types? 11:50:16 Saizan: yes 11:51:01 Orphi: For jvm bytecode, yes. Being able to integrate with the large number of existing libraries there would be really handy. 11:51:13 personally, I am in the "both for now" camp, but I'm fine with fundeps not being standardized for at least the near future 11:51:30 jyasskin: my plan was to make a program that dumps out Java source code 11:51:37 then you compile it with javac as normal 11:51:44 (i.e., until we get a feel for what AT Synonyms let us do and what they do not let us do) 11:51:49 and if I can make a clean way to call existing Java code - and backwards... 11:52:11 i think there's yet some project to build to jvm bytecode 11:52:21 Orphi: it is called the FFI 11:52:35 Saizan: yeah, probably... 11:52:49 my main motivation is to be able to experiment with running stuff an parallel and so on 11:53:06 can't you already do that in Haskell? 11:53:13 SamB: I'll be very surprised if you can call *Java* with FFI 11:53:36 GHC threading may be more efficient than Java threading. 11:53:42 Orphi: oh, well, you probably need to write an addendum to the FFI addendum 11:53:53 to talk about the Java-specific aspects of it 11:54:08 SamB: I'm thinking more it's probably fundamentally impossible to call Java from *any* natively compiled language... 11:54:16 heh 11:54:20 Orphi: have you seen lambdavm? http://www.cs.rit.edu/~bja8464/lambdavm/ 11:54:21 of course it isn't 11:54:23 Title: LambdaVM - The Haskell to Java Translator 11:54:33 nope 11:54:36 * Orphi checks it out 11:54:54 anyway I was assuming you'd be doing this with your hs2java compiler 11:55:22 that doesn't seem like a very nice name 11:55:27 "lambdavm" 11:55:38 it in no way indicates that JVM is involved 11:55:39 I was thinking "Haskell over Java" - HoJ 11:56:18 * SamB wonders whether JNI would permit calling Java from Haskell directly 11:56:44 * Orphi wonders what JNI is - and then quickly decides it's probably better not to know 11:56:45 (that is, without having to have "main" implemented in Java) 11:56:45 --- quit: dolio (Read error: 104 (Connection reset by peer)) 11:56:52 Orphi: Java Native Interface 11:57:07 that sounds kinda relevant, doesn't it? 11:57:15 I used to program stuff in Java... but it's just such an annoying language to use. heh. 11:57:21 so many flaws to work round 11:57:32 --- quit: tsmith__ ("Leaving") 11:57:37 I haven't kept up to date with the technology much 11:57:45 well JNI is, afaik, a C API 11:58:11 I know you can call C (and probably others) *from* Java. I'd just be surprised if you can go the other way... 11:58:47 --- join: maskd (n=int@unaffiliated/maskd) joined #haskell 11:59:13 anyway, Haskell is a wonderful language, but there's an annoying amount of stuff it can't do. 11:59:18 Java can do most of that stuff 11:59:24 so if I could convert one to the other... 11:59:33 --- quit: mahogny (Read error: 60 (Operation timed out)) 11:59:44 you can call java from c 11:59:56 [of course, whether this project will ever get beyond an early draft is another matter entirely. lol!] 12:00:01 what can Java do that Haskell cannot do? 12:00:10 Orphi: there's an annoying amount of stuff you don't actually need when toying with haskell 12:00:25 well, let me see... graphics, sound, database access... 12:00:34 SamB: run in a browser? 12:00:48 --- join: dolio (n=dolio@nr10-216-68-185-39.fuse.net) joined #haskell 12:00:49 sure, you lack those 12:00:53 Excedrin: what browser does Java run in? 12:00:57 Orphi: heh 12:01:07 SamB: IE? 12:01:17 Orphi: but those who have them lacks higher level stuff from some reason 12:01:19 sound might be nice 12:01:19 Orphi: Haskell has GLUT/Gtk2, ALUT, and various database libraries 12:01:26 I'd like it if Linux would support that 12:01:38 well, I mean, it can go boing and such 12:01:50 maybe ALUT works 12:02:01 I'm currently attempting to survive Gtk2hs 12:02:05 it's very hard work 12:02:14 * SamB blames GTK 12:02:18 (mind you, GUI programming usually is...) 12:02:33 game deployment systems, proper web tools, proper UI programming tools, etc. 12:02:50 I want Qt bindings so that gtk2hs will have some competition... 12:03:01 Cheery: games? you don't write games in Java afaik. 12:03:06 I'm told somebody implemented Quake in Haskell... I don't know how that's physically possible ;) 12:03:17 SamB: What issues does gtk2hs have that you think cmpetition would solve? 12:03:17 and what are "UI programming tools"? 12:03:18 --- join: procyon112 (i=Procyon@nat/microsoft/x-84894ca181f79786) joined #haskell 12:03:24 --- join: crathman_ (n=chatzill@69.15.198.171) joined #haskell 12:03:34 Orphi: Googling for frag Haskell should find it 12:03:39 haskell can run in the browser at end of http://www.cs.chalmers.se/Cs/Research/Functional/Fudgets/demoform.html, iirc 12:03:42 Title: Fudgets - Demo Form, http://tinyurl.com/yt4eg4 12:03:47 SamB: well, java has simple set of stuff you can use to describe GUIs 12:04:05 yeah, Ive seen the web page for frag; I still don't 'get' how it works. 12:04:07 but most other languages do have much more limited and primitive 12:04:12 Igloo: well, the part where I feel resentful about not being able to compare it with Qt maybe. 12:04:32 @where frag 12:04:32 Cheery: explain it? 12:04:33 http://www.haskell.org/haskellwiki/Frag 12:04:48 Procyon112 pasted "Is there an idiom to simplify this?" at http://hpaste.org/1199 12:05:06 --- quit: crathman (Connection timed out) 12:05:11 --- nick: crathman_ -> crathman 12:05:12 Any pointers? ^^^ 12:05:37 no - this is Haskell, not C 12:05:41 ;) ;) 12:05:42 SamB: Just swing yourself to tree with java and you'll see. 12:06:02 sorry about that... lol 12:06:21 Cheery: you lost me at "swing" 12:06:39 --- quit: crathman (Client Quit) 12:06:42 last I tried using programs that used that, it took a ton of RAM 12:06:49 --- join: pierre- (n=pierre@89.112.11.108) joined #haskell 12:06:51 --- join: lekro (i=lekro@pd9e0346f.dip0.t-ipconnect.de) joined #haskell 12:07:25 procyon112: there is a sort of idiom 12:08:16 SamB: I figured there was :) 12:08:38 --- quit: Orphi ("Chatzilla 0.9.77 [Firefox 2.0.0.3/2007030919]") 12:09:01 procyon112: but, you better handle the case where neither is simple *before* that part 12:09:12 the Yampa in that frag -thing seems to be the key point on making it reasonable to write a game on haskell 12:09:29 I guess I should look into it since I'm interested about doing games in general 12:09:51 --- join: ohmega- (n=ohmega@sonata.csbnet.se) joined #haskell 12:09:58 SamB: Yes.. I left that out. I wanted to express the root of the question only. 12:10:02 SamB annotated "Is there an idiom to simplify this?" with "a sort of idiom, maybe not so great *here*" at http://hpaste.org/1199#a1 12:10:19 uuh, arrows 12:10:21 procyon112: the important part being to do that above this 12:10:49 There are plenty of ways of doing games in Haskell. Games aren't especially special programs. 12:11:10 is there anyway to convert IO () to STM a 12:11:20 SamB: ahh... I figured the solution would be obvious ;) 12:11:25 SamB++ 12:11:32 sioraiocht: Not safely. 12:11:34 arrows are not scary! 12:11:37 ddarius: do you know how many ways there has been used? 12:11:46 ddarius: thanks.. 12:11:50 And what do they commonly involve? 12:11:52 yeah, I think games are some of the least-special programs 12:12:08 though I suppose if you have some kind of reasonable AI they are a lot more special 12:12:22 procyon112: You could also use case as well, but overall, there probably isn't a reason not to use your current version if the case analysis is this simple. 12:12:54 Cheery: You can more or less write them the way you would in any other language to begin with. 12:13:27 I don't know, you can do, but what's the point of doing it exactly like with imperative languages? 12:13:28 --- join: gh_ (n=gh@4va54-5-88-163-244-1.fbx.proxad.net) joined #haskell 12:13:40 ddarius: Case just moves the pattern match... doesn't really simplify the problem. In my example, the call is simple enough to ignore factoring it out, but in my real problem, that call to "func" is actually a few lines of code. 12:13:45 ddarius: the lack of global mutable state may have a dramatic effect on the style of the code 12:13:48 --- join: alec (i=alec@139.140.174.142) joined #haskell 12:13:53 Haskell tends to be nicer than them. 12:14:18 --- join: tizoc_[w] (n=user@r190-64-42-247.dialup.adsl.anteldata.net.uy) joined #haskell 12:14:19 Cheery: Haskell lets you make your own imperative language to write your game in ;-P 12:14:21 SamB: If only Haskell was actually lacking global mutable state, but even without it that's not all that significant an effect. 12:14:31 you can even use more than one, and they can be related 12:14:42 ddarius: well, it does so, but it amplifying if one finds out better ways while doing that :-) 12:14:44 procyon112: It leads to func x y being written only once. 12:15:09 procyon112 : one possibility could be to factor out 'func', i.e. '.. where func x y = ..x..y..' 12:15:40 --- quit: doserj ("Leaving") 12:15:59 But I only mentioned that because there's nothing that makes programming games in Haskell harder than programming them in other languages, because at the very least you can program them the same way. 12:16:15 well, one thing does 12:16:30 Yampa and related FRP techniques often have (small) games as examples. 12:16:39 you require more from them, since after you've learnt haskell, you get a weird attitude 12:16:42 ski_: Yeah, I did that. I'll paste the real code to give an example of how it scales up to messiness :) 12:16:43 There was a game writing library FunGen 12:17:05 FRP? 12:17:16 Functional Reactive Programming 12:18:25 procyon112 annotated "Is there an idiom to simplify this?" with "Example of real world case" at http://hpaste.org/1199#a2 12:19:02 is something like http://www.terracotta.org/ easy in Haskell? 12:19:03 Title: Home - Open Terracotta - Terracotta 12:19:51 (it's obviously easy in Erlang, and apparently possible with Java) 12:20:00 --- quit: sioraiocht () 12:20:01 ddarius: what does it mean in practise? 12:20:53 Excedrin: What is it? 12:21:14 procyon112 : i believe one often calls a simpler 'unifyVar :: Var -> Expr -> M Expr' (or whatever types you are using) 12:21:23 Cheery: Reify time, and process events as streams of signals, reacting to them. 12:21:48 --- join: GeoBes1 (n=root@ip72-195-130-215.ri.ri.cox.net) joined #haskell 12:21:56 --- quit: GeoBes1 (Client Quit) 12:22:29 There used to be GUM. It's GHC patched to spread over a cluster, i.e., Control.Parallel.par calls PVM to spawn a process elsewhere. 12:23:13 seems and looks like interesting. 12:23:26 --- quit: mnislaih () 12:23:37 And, it actually looks like something I were going at myself on my own workbench :-) 12:23:43 ddarius: distributed clustering stuff for Java, lets any Java app be distributed across a cluster 12:23:59 I'd like to use CAL with Terracotta to get a sort of Haskell meets Erlang meets Java thing... 12:24:03 ddarius annotated "Is there an idiom to simplify this?" with "my unify" at http://hpaste.org/1199#a3 12:24:18 The upshot was that the GUM people also came up with Control.Parallel.Strategies so you never call par yourself. 12:24:56 procyon112 annotated "Is there an idiom to simplify this?" with "Prettier Code" at http://hpaste.org/1199#a4 12:24:59 @google Haskell Ports distributed 12:25:01 http://citeseer.ist.psu.edu/479359.html 12:25:02 Title: Implementation of Port-based Distributed Haskell - Huch, Stolz (ResearchIndex) 12:25:43 that sounds great, is it usable? 12:26:19 ddarius++ Thanks... I'll look at that. 12:27:32 --- join: beelsebob (n=tatd2@82.152.206.196) joined #haskell 12:29:00 --- quit: Excedrin (Remote closed the connection) 12:29:17 --- quit: pierre- (Read error: 104 (Connection reset by peer)) 12:30:37 --- quit: tizoc[w] (Connection timed out) 12:31:24 --- nick: tizoc_[w] -> tizoc[w] 12:31:34 --- join: Excedrin (i=Excedrin@gateway/tor/x-a13c362cfadb63c6) joined #haskell 12:34:32 --- join: abcde` (n=hello@host86-149-57-108.range86-149.btcentralplus.com) joined #haskell 12:37:05 ddarius annotated "Is there an idiom to simplify this?" with "more complete code" at http://hpaste.org/1199#a5 12:40:02 --- join: LordBrain (n=jc@71.16.211.2) joined #haskell 12:40:02 --- join: JoshTriplett (n=josh@unaffiliated/joshtriplett) joined #haskell 12:40:33 Does any good Haskell physics engine exist? I've searched around, and I can't find anything other than hODE. 12:40:58 (Not implying that hODE doesn't qualify as "good"; I just want to evaluate multiple options.) 12:41:58 hmmmm 12:42:03 I've not found any 12:42:30 i have only found version 1 of the FFI, is there any later relavent documents? 12:42:52 if you don't need it too soon, I'd propose you toy with the idea of doing it yourself 12:43:23 maybe FFI 2 sneak peeks? 12:43:25 haha 12:43:47 LordBrain: that does seem to be the version you get to from http://haskell.org/haskellwiki/Definition 12:43:48 Title: Language and library specification - HaskellWiki 12:43:48 Cheery: Yeah, I thought about that. 12:44:28 JoshTriplett: what kind of physics stuff you'd need to do? 12:44:53 We at #haskell don't pee on our hands. Thus: version 1 of the FFI is already perfect. 12:45:24 Cheery: I've looked at Jiggle with an eye towards a Haskell implementation of those concepts. 12:45:33 Cheery: I don't need deformable body physics. 12:45:45 Cheery: Rigid bodies with some joints/constraints would do the trick. 12:45:46 --- join: Zr40 (n=Zr40@zr40.xs4all.nl) joined #haskell 12:45:57 Cheery: And the ability to apply forces. 12:46:27 what kind of program you have which needs it all? 12:46:33 --- join: mnislaih (n=pepe@81.202.139.46.dyn.user.ono.com) joined #haskell 12:46:46 "Version 1" means "Version Right". 12:47:04 Cheery: A few different applications. I'd like to use it to write a rocket simulator, and I'd like to use it to implement a game idea I've had for a while. 12:47:11 ddarius : bah, untyped :) 12:47:36 ic. 12:47:56 this seems to be a good start page for FFI stuff http://haskell.org/haskellwiki/GHC/Using_the_FFI 12:47:56 --- join: digitaleric (n=eric@wireless.acm.jhu.edu) joined #haskell 12:47:58 Title: GHC/Using the FFI - HaskellWiki 12:48:19 Cheery: The former for http://psas.pdx.edu ; the latter just for fun. :) 12:48:21 Title: PsasHome - Portland State Aerospace Society 12:48:34 Useful bot. 12:48:46 ski_: It's for a Prolog interpreter. 12:49:18 But a dash of GADTs (which were not available at the time) and *boom* you have a typed logic language. 12:49:19 basically those things you mention, if you aren't doing serious simulation, I guess they are about something I did in C some years ago, it'd may be interesting to see such algorithms written in haskell. :) 12:49:39 Cheery: Depends on what you mean by "serious simulation". 12:50:35 --- quit: mkhl (Client Quit) 12:50:39 --- join: cinema (n=cinema@AMontsouris-151-1-14-222.w82-123.abo.wanadoo.fr) joined #haskell 12:50:46 ddarius : hm .. i've not used GADTs .. /me did an extension of Claessens et al embedding og logic programming into haskell 12:51:34 for games, one dares to use less physically correct approximations, since they are easier to implement and faster? in practise 12:51:53 (ddarius : basically the equivalent of '?- L = [(_,9),(_,25)],(member((X,Y),L) => square(X,Y))' works :) 12:51:59 I need to switch the code to use Data.Map instead of FiniteMap, then I should have a Prolog interpreter again. But what I want to do is make a LolliMon interpreter or a language similar to that. 12:52:09 ddarius : what did you use GADTs for, and how ? 12:52:24 ski_: I didn't. I'm just saying one could make it typed very easily. 12:52:28 via GADTs 12:52:28 ah 12:52:40 * ski_ would like to see that 12:53:18 'LolliMon' ? 'Mon' meaning ? 12:53:18 ski_: What if you did square(X,10) say? 12:53:52 X = 3.16227766016838 ; X = -3.16227766016838 12:53:55 Monadic. It uses monads to separate the additive and multiplicative linear parts. Monads look a bit different in Logic programming languages. 12:54:12 (just for the example .. the cool stuff was '=>') 12:54:33 very interesting 12:55:04 ski_: Lookup the Concurrent Logic Framework or browse Frank Pfenning's site. 12:55:15 ddarius : are you referring to something like http://logic.csci.unt.edu/tarau/research/PapersHTML/monadic.html, or something else ? 12:55:16 Title: Monadic Constructs for Logic Programming 12:55:25 ty 12:55:52 --- join: mwc (n=matt@CPE001310b2e737-CM0011ae929276.cpe.net.cable.rogers.com) joined #haskell 12:55:57 From the looks of that (just a glance) something else. 12:56:20 Cheery: True. I'd prefer correct over fast, as long as I can get real-time simulation of relatively few bodies and forces. 12:56:22 At the very least, the particular monad they talk about is a builtin one. 12:56:32 "Type Directed Concurrency" is also another related paper. 12:57:12 --- quit: jcrigby (Remote closed the connection) 12:57:30 ski_: But for your "Prologesque" code above, you mean HOL? 12:57:37 --- join: jcrigby (n=jrigby@64.58.225.62) joined #haskell 13:00:47 --- quit: erg0t ("Mejor una cabeza hueca a una llena de mierda") 13:00:54 Cheery: I rather like the approach from the "Nonconvex Rigid Bodies with Stacking" paper for various reasons. In particular, it uses a simulation algorithm that avoids the usual "penetrate the surface and then restore" approach, a common cause of instability. 13:01:02 --- join: doserj (n=doserj@228-150.1-85.cust.bluewin.ch) joined #haskell 13:01:07 Cheery: With that algorithm, an object on a surface just doesn't move. 13:01:15 ddarius : i don't know HOL 13:01:45 Cheery: With ODE, if you sit a block on a flat surface with no friction, it will vibrate and start moving along the surface as though on an air hockey table. 13:01:46 Higher Order Logic 13:02:03 Cheery: http://web.archive.org/web/20030930141006/http://graphics.stanford.edu/courses/cs448a-03-spring/tmp/rigid_bodies_talk.pdf 13:02:07 http://tinyurl.com/2dfs64 13:02:09 ddarius : basically, what i implemented is an implication, like the usual checking one in prolog, but mine can export instantiations 13:02:28 so e.g. 13:02:35 Hmmm, I didn't know lambdabot did tinyurls; why does it do that? 13:02:41 --- quit: kowey () 13:02:51 ?- L = [(3,_),(4,_)],(member((X,Y),L) => square(X,Y)). 13:02:52 Maybe you meant: . v 13:03:02 L = [(3,9),(4,16)] ; 13:03:02 NO 13:03:49 (the usual definition of (=>)/2 being 'A => B :- not (A, not B).') 13:04:13 also, i can also get 13:04:25 --- quit: ohmega- ("Leaving") 13:04:27 ?- L = [(_,9),(_,16)],(member((X,Y),L) => square(X,Y)). 13:04:27 Maybe you meant: . v 13:04:31 L = [(3,9),(4,16)] ; 13:04:33 L = [(3,9),(-4,16)] ; 13:04:35 L = [(-3,9),(4,16)] ; 13:04:37 L = [(-3,9),(-4,16)] ; 13:04:38 No 13:04:48 ddarius : understand ? 13:05:17 I started to after I said "Higher Order Logic". I wasn't looking at what you wrote clearly enough. 13:06:11 A => B runs B with the bindings of A ? 13:06:12 (the above is of course translated into prolog syntax .. i just have an embedding into haskell) 13:06:21 @hoogle Typeable 13:06:22 Data.Typeable :: module 13:06:22 Data.Typeable.Typeable :: class Typeable a 13:06:22 Data.Typeable.Typeable1 :: class Typeable1 t 13:06:35 procyon112: It's for Data.Dynamic. 13:06:36 the prolog translation is maybe a bit ambiguous 13:06:49 JoshTriplett: thanks 13:07:13 i implemented both universal quantifier and implication .. the universal implication is implicit in the above prolog translation 13:07:23 --- quit: EvilTerran ("moving room") 13:07:42 ?type *** 13:07:45 parse error on input `***' 13:07:53 the goal 'A => B' succeeds if for every way that 'A' can succeed, 'B' succeeds 13:07:54 ddarius: Just trying to make some sense of this. It's a bit beyond my level of Haskel-fu. 13:07:55 ?type (***) 13:07:58 forall (a :: * -> * -> *) b c b' c'. (Arrow a) => a b c -> a b' c' -> a (b, b') (c, c') 13:08:18 @hoogle BacktrT 13:08:19 No matches found 13:08:24 ddarius : 'A' can be an arbitrary goal, including arbitrary nesting of implications 13:08:47 ski_: Yes, I'm wondering how it's implemented. 13:08:50 ddarius : and instantiations made by 'B' are retained by the whole construct 13:09:06 ski_: And yes, I think that is more or less an implementation of Higher Order Logic. 13:09:10 ddarius : deep scary levels of continuation machinery ;) 13:09:33 ddarius : ok, interesting, ty for the ref. i'll have to look that up 13:09:36 Speaking of which, BacktrT is Ralf Hinze's Backtracking Monad. Google Ralf Hinze and browse his papers. 13:09:43 --- part: sebell left #haskell 13:10:18 ddarius: Yeah.. I read his paper, and my lack of Prolog really hurt my comprehension. 13:10:39 (basically i started from 'type Foo m o a = ((a -> m o -> m o) -> m o -> m o)' ..) 13:10:45 procyon112: The code is still incomplete. In particular, writeLPRef is not what you would first guess. 13:11:53 ddarius: I really like that combo language with concurrency and proof search. 13:12:16 --- join: ohmega- (n=ohmega@sonata.csbnet.se) joined #haskell 13:12:16 The example "programs" for LolliMon/CLF are extremely slick. 13:12:38 It sure is prettyier than mine ;) I think I'll stick to what I have for now, which I understand and it works, and revisit this file in a few months, when Haskell itself is more natural to me. 13:13:17 --- join: DukeDave (n=DukeDave@host-87-74-59-59.bulldogdsl.com) joined #haskell 13:13:21 ddarius : in aforementioned papers ? 13:13:37 --- quit: gh_ (Remote closed the connection) 13:14:03 --- join: obsethryl (n=opus@unaffiliated/obsethryl) joined #haskell 13:14:05 --- join: gh_ (n=gh@4va54-5-88-163-244-1.fbx.proxad.net) joined #haskell 13:14:39 ddarius : (re 'BackTrackT') Prolog's control constructs in a functional setting - Axioms and implementation ? Deriving Backtracking Monad Transformers ? 13:14:40 ski_: A few are in the papers, e.g. the pi calculus implementation. Also, the source code has some interesting examples. 13:14:49 mhm 13:14:55 Deriving Backtracking Monad Transformers. 13:14:58 ty 13:15:05 Yay abstraction. 13:16:18 ddarius: Do you know if there's a working implementation? 13:16:38 --- join: psi` (n=psi@c-de7e71d5.015-127-6c756c1.cust.bredbandsbolaget.se) joined #haskell 13:17:19 shapr: There's a buggy O'Caml version of LolliMon. I have half a mind to rewrite it into Haskell or implement the very similar language from "Type Directed Concurrency" 13:18:34 --- quit: daniel_larsson (Read error: 110 (Connection timed out)) 13:18:54 (hm 'http://www.informatik.uni-bonn.de/~ralf/' seems to be down atm .. this is his current, yes ?) 13:19:14 --- join: Ademan (n=dan@h-67-101-145-200.snfccasy.dynamic.covad.net) joined #haskell 13:19:58 Yeah, Type Directed Concurrency is way nifty. 13:19:59 --- quit: pstickne (Read error: 110 (Connection timed out)) 13:20:30 ski_: I believe so. It's down for me as well, but I did go to it about a week or two ago. 13:21:34 The saturating parser example in the lollimon examples is pretty slick. 13:22:23 lollimon is in the fp papers you mentioned above ? 13:22:33 --- join: pstickne (n=pstickne@c-71-236-176-94.hsd1.or.comcast.net) joined #haskell 13:23:00 --- join: michaelr (n=no@S010600184d82fd75.cg.shawcable.net) joined #haskell 13:23:54 --- join: Ytinasni (n=a@203.109.208.201) joined #haskell 13:24:07 http://www.cs.cmu.edu/~fp/lollimon/ 13:24:08 Title: Index of /~fp/lollimon 13:24:20 > reverse "Ytinasni" 13:24:21 "insanitY" 13:27:02 Has anyone tried keeping patches in darcs (not darcs patches, but diff -u patches)? 13:27:25 --- join: Laney (n=your@81-179-203-255.dsl.pipex.com) joined #haskell 13:27:26 And did you have any trouble? 13:29:33 --- nick: Ademan -> Ademan_brb 13:31:32 --- join: rashakil (n=rashakil@hot-magenta-02.dynamic2.rpi.edu) joined #haskell 13:33:18 A few slight changes and now GHCi is a Prolog interpreter as well. 13:34:31 > reverse "Cheery" 13:34:33 "yreehC" 13:34:43 gn 13:34:52 ddarius: lol 13:35:01 --- join: EvilTerran (n=Irrel@stu0335.keble.ox.ac.uk) joined #haskell 13:35:02 can I see it? 13:35:09 or is it that lollimon? 13:35:51 It's just a Prolog interpreter I wrote running in GHCi. I needed to change FiniteMap -> Data.Map since the code is like 3 years old or something. 13:36:11 But since I wisely named all uses of the Map code, it was very easy. 13:36:27 you didn't invent any less LOL name? 13:36:32 :P 13:37:56 or wait, it's not lollimon 13:38:05 lolimon sounds like a cartoon series of underage monsters 13:38:21 --- join: crathman (n=chatzill@69.15.198.171) joined #haskell 13:38:39 roflcopter 13:39:02 roflcopter vs. lollimon 13:39:47 * Cheery is happy, he got his CSS -low level stuff done 13:39:47 FIGHT 13:40:31 --- join: gh__ (n=gh@4va54-5-88-163-244-1.fbx.proxad.net) joined #haskell 13:40:31 --- quit: gh_ (Read error: 104 (Connection reset by peer)) 13:40:38 here were some guy who wanted to see them when they are done, I guess I put them up to hpaste.org for now 13:42:18 Cheery pasted "unnamed stuff for generating CSS" at http://hpaste.org/1200 13:42:48 Perhaps I will use arrows in my lollimon implementation that I'll start sooner or later so I can have runLolA 13:43:00 * Gwern groans 13:43:14 "lollimon - gotta rape'em all..." 13:43:23 :-/ 13:43:45 Cheery: yay! 13:44:06 --- quit: araujo ("Leaving") 13:44:27 like the thing says, they aren't complete, but close of being completent on the way they are 13:44:37 *complete 13:45:17 Gwern-comment appeared too hilarious. me goes to bed 13:45:57 --- quit: Cheery ("Download Gaim: http://gaim.sourceforge.net/") 13:47:12 I want to ask Cheery what the hell does he mean by "WTF-8". 13:47:53 heh 13:48:20 monochrom: it's Worldwide Transformation Format number 8 13:48:41 it's doubly-encoded UTF-8 13:49:10 haha all of you are funny 13:51:19 motörhead 13:52:56 --- join: gh___ (n=gh@4va54-5-88-163-244-1.fbx.proxad.net) joined #haskell 13:53:07 --- quit: gh__ (Read error: 104 (Connection reset by peer)) 13:54:42 --- join: kep (i=kep@faithless.questioner.volia.net) joined #haskell 13:56:09 --- quit: gour ("Quit (http://xchat-gnome.navi.cx/)") 13:56:40 --- join: Tigge (n=tigge@bacchus.olf.sgsnet.se) joined #haskell 13:56:46 --- part: JoshTriplett left #haskell 14:00:01 --- join: Zr40_ (n=Zr40@zr40.xs4all.nl) joined #haskell 14:03:38 --- join: chessguy (n=chessguy@66.33.255.68) joined #haskell 14:03:57 --- quit: _frederik_ (Read error: 113 (No route to host)) 14:04:26 hi haskellers 14:05:34 --- quit: SyntaxNinja ("Download Gaim: http://gaim.sourceforge.net/") 14:05:46 Why do we use "realToFrac" here? Wouldn't something like "fromRealFrac" be more consistent --> http://haskell.org/haskellwiki/FFI_Introduction 14:05:47 Title: FFI Introduction - HaskellWiki 14:06:12 --- quit: gh___ (Remote closed the connection) 14:06:13 not that there is a fromRealFrac... 14:06:30 --- quit: kep ("leaving") 14:06:35 :t realToFrac 14:06:38 forall a b. (Fractional b, Real a) => a -> b 14:06:42 maybe toDouble 14:06:58 :t fromIntegral 14:07:01 forall a b. (Num b, Integral a) => a -> b 14:07:02 :t toDouble 14:07:05 --- join: gh___ (n=gh@4va54-5-88-163-244-1.fbx.proxad.net) joined #haskell 14:07:05 Not in scope: `toDouble' 14:07:17 there is no fromRealFrac 14:07:22 yeah i know 14:07:24 --- quit: clanehin (Read error: 104 (Connection reset by peer)) 14:07:26 toDouble would be ugly 14:07:35 :t fromReal 14:07:37 Not in scope: `fromReal' 14:07:40 --- join: clanehin (n=clanehin@cpe-069-134-236-134.nc.res.rr.com) joined #haskell 14:07:46 fromReal would be the consistent naming 14:07:55 oh ok 14:07:57 You may suggest renaming realToFrac to fromRealFrac. There are a few issues. 14:07:57 :t fromRational 14:08:00 forall a. (Fractional a) => Rational -> a 14:08:00 :t toRational 14:08:03 forall a. (Real a) => a -> Rational 14:08:13 fromReal, that seems consistent 14:08:34 --- quit: Zr40 (Read error: 60 (Operation timed out)) 14:11:01 fromIntegral earns its name by returning any Num at all. This is because Num is a ring, and for every ring there is a homomorphism from the integers to the ring. 14:11:19 There is, however, no such generic homomorphism from realfrac's (e.g., the rationals) to rings. the name fromRealFrac will inevitably mean something else. it will actually be inconsistent. 14:11:29 --- quit: gh___ (Remote closed the connection) 14:11:43 --- join: gh___ (n=gh@4va54-5-88-163-244-1.fbx.proxad.net) joined #haskell 14:12:44 But I'm ignoring the established name fromRational. Oh well. 14:14:02 does ghc optimize it away, if i set athunk = bthunk? 14:14:22 cthunk = athunk ... 14:15:06 Presumably there would be nothing to optimize. 14:15:12 well 14:15:15 --- quit: doserj ("Verlassend") 14:16:06 i would think if you dont do any kind of elimination or anything, there would be extra indirections 14:16:22 Yes. 14:16:46 yes you think that too monochrom ? or yes it does optimize it away? 14:17:07 optimizes 14:17:22 --- join: sebell (i=sebell@nat/ibm/x-05240f5adac680f2) joined #haskell 14:17:40 --- quit: savor (Read error: 104 (Connection reset by peer)) 14:18:28 --- quit: obsethryl (Read error: 113 (No route to host)) 14:20:25 --- join: thoughtpolice (n=austin@c75-111-145-138.plaicmtc01.tx.dh.suddenlink.net) joined #haskell 14:20:37 --- nick: russo_ -> russo 14:20:42 --- quit: chessguy ("Leaving") 14:21:01 --- join: mnislaih_ (n=pepe@81.202.139.46.dyn.user.ono.com) joined #haskell 14:23:49 --- quit: erider (Read error: 110 (Connection timed out)) 14:24:34 --- join: erider (n=erider@unaffiliated/erider) joined #haskell 14:24:55 thats good, because its nice to be able to rename things 14:25:05 :) 14:25:49 --- join: [1]acp (n=ac@s55920c51.adsl.wanadoo.nl) joined #haskell 14:25:50 --- quit: acpx (Read error: 104 (Connection reset by peer)) 14:28:22 --- join: ndm (n=chatzill@pc163.ad.cs.york.ac.uk) joined #haskell 14:29:50 --- quit: iblechbot (Read error: 110 (Connection timed out)) 14:30:22 @seen augustss 14:30:22 augustss is in #haskell. I don't know when augustss last spoke. 14:30:57 --- join: wy (n=wy@r253211120.resnet.cornell.edu) joined #haskell 14:31:11 ndm, I'm back from classes. 14:31:24 wy: succeeded with Haskell running yet? 14:31:33 ndm, I tried running from command line. The same problem. 14:31:43 wy: report it as a bug to the GHC people 14:31:53 wy: i can't think of any reason it should do that 14:31:56 @where ghc-bugs 14:31:57 http://www.haskell.org/ghc/reportabug 14:32:02 It's strange that it can run with simple a program but not this one 14:32:30 wy: do you have a complete transcript for your bug, i.e how to reproduce it? 14:32:35 wy: code and command lines? 14:32:44 ddarius: haha, runLolA 14:32:57 ndm, I need to sort things out. The code is a bit messy 14:32:58 What's the problem? 14:33:28 wy: explain your issue to Igloo 14:33:33 ndm, maybe I should submit the messy program? 14:33:37 Igloo: he appears to be getting "impossible happened" 14:33:47 Igloo, I've got problem running Haskell on Windows XP 14:33:58 wy: hpaste the bug you would report, Igloo will know exactly what to do 14:34:37 I wrote some program under Linux this winter. Now I took them out and run in windows. I got something like ": panic! (the 'impossible' happened)" 14:34:39 ndm: I won't hav a clue know you've built me up like that :-) 14:34:45 loadObj: failed 14:34:57 Is this using hs-plugins? 14:35:28 It's just some code from Simon Peyton Jone's book 14:35:58 Oh, well, if you can put the code somewhere I'll take a look 14:36:30 --- quit: therp (Read error: 113 (No route to host)) 14:36:57 Igloo, Thank you very much! I'll make it less messy and paste it. 14:37:03 --- quit: mnislaih_ (Read error: 104 (Connection reset by peer)) 14:37:37 --- join: mnislaih_ (n=pepe@81.202.139.46.dyn.user.ono.com) joined #haskell 14:37:42 wy: messy should be fine, impossible happened shouldn't be a result of the code really... 14:37:55 --- quit: DukeDave (Read error: 110 (Connection timed out)) 14:37:58 --- quit: mnislaih (Read error: 110 (Connection timed out)) 14:38:30 --- join: beelsebob_ (n=tatd2@82.152.214.109) joined #haskell 14:39:29 --- join: merus_ (n=merus@vlan-127-189.onu.edu) joined #haskell 14:40:29 ndm, so I'll paste the code now. It can be compiled and run with ghc, but ghci crashes if main is called 14:40:46 wy: that should be plenty for Igloo to work with 14:41:11 ndm, Haha! Could you point me to a paste bin? 14:41:20 hpaste.org 14:41:21 @paste 14:41:22 Haskell pastebin: http://hpaste.org/new 14:41:26 wy: ^^^ 14:41:32 --- join: Excedrin_ (i=Excedrin@gateway/tor/x-56f04a29c295315d) joined #haskell 14:41:36 we have one written in Hsakell 14:41:59 wy pasted "(no title)" at http://hpaste.org/1201 14:42:06 --- quit: merus_ (Client Quit) 14:42:38 wy: there is no main in that code? 14:42:43 --- quit: tizoc[w] (Remote closed the connection) 14:42:52 That doesn't seem to be complete... 14:43:06 wy: it has a limit to 5000 charcters 14:43:07 something is wrong with the paste bin 14:43:11 Oh... 14:43:29 --- quit: [1]acp (Read error: 60 (Operation timed out)) 14:43:32 Let me try to cut it down 14:44:00 --- quit: ndm ("Chatzilla 0.9.77 [Firefox 2.0.0.3/2007030919]") 14:44:31 --- join: kscaldef (n=kevin@71-222-63-245.ptld.qwest.net) joined #haskell 14:46:13 --- quit: beelsebob (Read error: 60 (Operation timed out)) 14:46:24 --- quit: sebell ("rcirc on GNU Emacs 22.0.96.1") 14:47:55 --- quit: mwc ("Leaving") 14:49:49 --- part: wy left #haskell 14:50:06 --- join: wy (n=wy@r253211120.resnet.cornell.edu) joined #haskell 14:50:42 Igloo, I tried to shorten the program. But then I can't reproduce the bug 14:51:04 Igloo, is there a way to paste a long program ? 14:52:46 As said by ndm, this should never happen however messy the code is. So I need to paste the messy code 14:54:19 --- join: Guest922 (n=Guest922@cpe-72-134-44-224.socal.res.rr.com) joined #haskell 14:54:32 wy pasted "part2" at http://hpaste.org/1202 14:55:05 Hmmm. finish 14:55:07 --- quit: Guest922 (Client Quit) 14:55:28 --- quit: cinema ("Ex-Chat") 14:56:27 --- quit: gh___ (Remote closed the connection) 14:56:28 --- quit: psi` (Read error: 60 (Operation timed out)) 14:57:41 --- quit: Excedrin (Remote closed the connection) 14:57:58 --- join: trane (n=robertsc@wl-194.eburg.com) joined #haskell 14:58:22 --- join: bringert (n=bringert@3-1-5-7a.gva.gbg.bostream.se) joined #haskell 14:58:57 wy: What version of ghc do you have? 14:59:05 --- quit: Zr40_ ("Leaving") 14:59:12 Igloo: 6.6 14:59:33 wy: And the problem is just opening it in ghci and typing main? 14:59:59 --- join: pragma_ (n=pragma@blackshell.com) joined #haskell 15:00:05 Igloo: wait... why doesn't it crash now... 15:00:05 --- quit: PupenoR (Read error: 60 (Operation timed out)) 15:00:18 I was building up to that question :-) 15:01:13 --- join: ndm (i=90208070@gateway/web/cgi-irc/ircatwork.com/x-b8443f134b80e1ae) joined #haskell 15:01:25 Igloo: I've re-unpacked my file. Let's see... 15:02:51 Igloo: I need to restore the whole directory. I'm happier, although I'm still trying to reproduce it. 15:03:36 --- quit: thoughtpolice (Read error: 104 (Connection reset by peer)) 15:03:37 --- join: yetAnotherOne (n=i@e179196127.adsl.alicedsl.de) joined #haskell 15:04:08 --- quit: bluestorm_ ("Konversation terminated!") 15:04:19 --- quit: yetAnotherOne (Client Quit) 15:04:26 installation glitch? fixed by re-installing? 15:05:16 Voodoo bug. 15:07:59 Igloo: I found the problem! 15:08:41 Igloo: There was a .hi in my directory which is produced by the Linux version of GHC several month ago. I deleted this file and everything is fine now! 15:10:00 --- join: thoughtpolice (n=austin@c75-111-145-138.plaicmtc01.tx.dh.suddenlink.net) joined #haskell 15:11:07 --- join: mr_tenor (n=nick@c220-239-37-8.rivrw7.nsw.optusnet.com.au) joined #haskell 15:11:42 Igloo: I think this should still be regarded as a bug, because this troubled me for a whole afternoon. It should be able to deal with this gracefully. 15:14:51 wy: Right, I agree; if you have a way to reproduce it then please file a bug report 15:15:00 --- join: gh_ (n=gh@4va54-5-88-163-244-1.fbx.proxad.net) joined #haskell 15:15:04 --- join: a-priori_ (n=a-priori@CPE0013104b215d-CM0013718c365e.cpe.net.cable.rogers.com) joined #haskell 15:15:09 --- join: sorear (n=user@ip68-7-248-101.sd.sd.cox.net) joined #haskell 15:15:29 Igloo: I can package the directory up but I'm not sure if I can use such attachments for bug report 15:16:01 --- join: sioraiocht (n=rtharper@cpe-74-71-116-245.twcny.res.rr.com) joined #haskell 15:16:02 hi! 15:16:03 sorear: You have 1 new message. '/msg lambdabot @messages' to read it. 15:16:52 --- part: abcde` left #haskell 15:16:58 sorear: long time no see! 15:17:09 sorear, hi - thanks for the patches :) 15:17:12 --- quit: bringert () 15:17:20 wy: What do you mean by package it up? You shouldn't need to include .hi files in teh report 15:17:45 Igloo: so I just need to say something and don't even need to provide code? 15:18:02 --- quit: tizoc (Connection timed out) 15:18:14 Igloo: If the hi files are not present, this can't be reproduced. 15:18:41 HI ndm ! I've found the cause of the problem 15:18:58 wy: No provide code, commands to run on Linux, then commands to run on Windows 15:19:03 wy, i saw, well done :) 15:19:18 wy: Sorry, missing comma after "No" 15:19:18 --- join: crathman_ (n=chatzill@69.15.198.171) joined #haskell 15:19:25 --- join: tizoc (n=user@r190-64-205-108.dialup.adsl.anteldata.net.uy) joined #haskell 15:19:46 wy: eh? I'm pretty often here :) 15:19:48 corrupted hi files? 15:19:53 @clear-messages 15:19:53 Messages cleared. 15:19:58 --- quit: sioraiocht (Client Quit) 15:20:10 --- join: sioraiocht (n=rtharper@cpe-74-71-116-245.twcny.res.rr.com) joined #haskell 15:20:13 --- quit: crathman_ (Remote closed the connection) 15:20:16 Igloo: I don't know how was the hi files generated. I'm always using emacs to interact 15:20:46 sorear: I haven't been here for several months. Really dulled by my classes. 15:24:25 --- join: thorat (n=doddi@194-144-13-100.du.xdsl.is) joined #haskell 15:24:45 --- quit: gh_ (Read error: 104 (Connection reset by peer)) 15:24:55 --- join: gh_ (n=gh@4va54-5-88-163-244-1.fbx.proxad.net) joined #haskell 15:25:20 --- join: liquidengineer (n=moe@66.112.241.23) joined #haskell 15:25:25 Yo 15:25:29 Is there darcs for windows? 15:25:34 yes 15:25:38 hi. 15:26:52 sorear: to get that O(n log k) "select n random distinct elements from a set of size k" i added elemAtDel :: Int -> Set a -> (a,Set a) to my Data.Set, is there some hope to get this in base in your opinion? 15:27:03 --- quit: ddarius (Read error: 110 (Connection timed out)) 15:27:11 sorear: where can I get it? 15:27:54 Windows can do a lot these days... it might be ready for the desktop soon. 15:28:18 http://darcs.net/DarcsWiki/CategoryBinaries#head-c7910dd98302946c671cf63cb62712589b392074 <-- wy 15:28:20 Title: CategoryBinaries - DarcsWiki, http://tinyurl.com/luaqp 15:28:34 --- join: thoughtp1lice (n=austin@c75-111-145-138.plaicmtc01.tx.dh.suddenlink.net) joined #haskell 15:28:34 --- quit: thoughtpolice (Read error: 104 (Connection reset by peer)) 15:28:54 wy, everything is available for Windows, pretty much - i use it as my main program 15:28:58 Thanks! Do you recommend using it under cygwin? 15:29:03 procyon112, yeah, it's wuite amazing the haskell support for windows 15:29:16 @quote windows 15:29:16 wy, eek - no - thats horrible, just run native windows, its plenty nice enough 15:29:17 shapr says: I encourage my competitors to use Windows. 15:29:18 @quote windows 15:29:19 mikaeli says: hmm, one national tv station I was watching while eating breakfast crashed with bsod. I guess that's what you get for running windows in production use 15:29:22 i used it on cmd.exe without problems 15:29:25 @quote windows 15:29:25 --- quit: thoughtp1lice (Client Quit) 15:29:26 shapr says: I encourage my competitors to use Windows. 15:29:36 @remember procyon112 Windows can do a lot these days... it might be ready for the desktop soon. 15:29:36 Done. 15:30:22 I'm joking of course. It will never be ready for the desktop. 15:30:48 I've cygwin already. But I don't know how to install it yet 15:30:59 --- join: tao36 (n=silvioal@89-180-143-37.net.novis.pt) joined #haskell 15:31:03 I don't know how to install the tar.gz into cygwin 15:32:00 --- quit: gh_ (Remote closed the connection) 15:32:03 cygwin is decent, but it doesn't ever quite pull off the illusion that it's not just a hack. :( 15:32:05 i think i've just untarred it in some directory which is in my %Path% 15:32:16 --- join: gh_ (n=gh@4va54-5-88-163-244-1.fbx.proxad.net) joined #haskell 15:32:31 cygwin is quite ugly, i like mingw+msys a lot more 15:32:42 --- quit: Gwern (Remote closed the connection) 15:32:46 --- join: bogdano (n=bogdano@201-24-233-230.ctame704.dsl.brasiltelecom.net.br) joined #haskell 15:32:47 anyone solved the ghc "not buit for interactive use " bug ? 15:32:56 *built 15:33:46 /who 15:34:10 Saizan: I forgo the emulators on Windows, and let Windows be what it was designed to be: A game console. 15:34:17 :) 15:35:08 --- quit: wy ("Leaving") 15:35:29 --- join: [1]acp (n=ac@s55920c51.adsl.wanadoo.nl) joined #haskell 15:36:03 :P 15:36:41 --- quit: trane () 15:36:49 anyone solved the ghc "not built for interactive use " bug ? 15:36:57 I forgo the emulators and let Windows be what it should be, perfect :) 15:37:06 --- quit: crathman (Read error: 113 (No route to host)) 15:37:17 Saizan: Of course, I'm biased... I'm sitting here hacking C++ writing a Vista Wizard.. it probably makes me a bit jaded. 15:37:58 procyon112, its the C++ bit that would make me cry most... - the windows C API is horrid, but part of that is C's fault 15:38:05 use Gtk2Hs and its perfectly fine 15:39:20 tao36: doesn't sound like a bug to me 15:39:47 tao36: it sounds like your GHC wasn't built for interactive use 15:40:03 tao36: re-check your mk/config.mk, and make sure you are using stage2 15:40:25 procyon112, well i don't like windows, and now i've finally switched to linux where everything builds just fine! (after you get the dependencies) 15:41:00 ndm: The problem I have develping under windows is that things just never want to work nicely together. Add to that the lack of native development tools and the kludgie way of getting development tools, and it's a big headache. 15:41:01 sorear: thanx , will try 15:41:04 :) 15:42:11 isn't windows designed such that all problems can be fixed (only) by paying more? 15:43:03 sorear: using the word "designed" is giving the system alot of questionably deserved credit. 15:43:26 don't know, paying more would prevent my PATH to have half of my directories inside it? 15:43:27 I always figured it was designed. 15:43:43 Not necessarily by programmers. 15:44:17 --- quit: Alneyan (Remote closed the connection) 15:44:56 sorear: It's organized to be a game console and internet browser, with the ability to accept 3rd party plugins to run custom applications... Much like a palm pilot, but a whole lot more pricey. 15:45:13 --- quit: bogdano (Remote closed the connection) 15:45:25 --- join: bogdano (n=bogdano@201-24-233-230.ctame704.dsl.brasiltelecom.net.br) joined #haskell 15:45:45 ndm: what do you find less clean about the new Eq deriver? 15:46:20 ndm: I'm hoping that an AST approach could be cleaner, since we needn't worry about the quirks of the haskell syntax. 15:50:06 sorear: snarkiness aside, "Windows" isn't really centrally designed any more than Linux is... it's a competitive bazaar of groups trying to get their projects accepted into the mainline branch. Individual sections are designed well, like the explorer shell, the file system (one of the best), etc..., but having things work well together is mostly a job of retrospect design after dealing with customer complaints. 15:50:21 --- join: metaperl (n=metaperl@pool-72-94-205-58.phlapa.east.verizon.net) joined #haskell 15:50:22 sorear, i guess you have to learn the AST, where as everyone knows Haskell 15:50:39 any bored Haskellers wanna crack out a quickie: http://sequence.complete.org/node/269 ... i'd like to see it! 15:50:41 Title: I've seen the J and the C, how about the Haskell? | The Haskell Sequence 15:50:41 sorear, i don't think its important - your and', etc combinators make it better 15:51:44 --- quit: dataangel (Connection timed out) 15:52:07 step up to the plate? does that mean to be eaten? 15:52:25 --- join: JoshTriplett (n=josh@unaffiliated/joshtriplett) joined #haskell 15:52:48 What Haskell library (preferably standard) should I use to get vectors and matrices with math operations? 15:52:50 sorear: (I've worked at MS for going on 10 years.. I've been to war room.) 15:53:17 metaperl: do you have a matrix representation in mind? 15:53:19 monochrom: It's a metaphor relating to some tedious sport only the colonials play. :) 15:53:22 metaperl: maximumBy (comparing maximum) will do the trick 15:53:25 fst . maximumBy (compare `on` snd) . zip [1..] . map maximum 15:53:36 metaperl, thast my attempt ^^^ 15:53:49 wanna post to the blog? 15:53:57 > maximumBy (comparing maximum) [[1,2,3],[2,9,4],[5,6,7]] 15:53:59 [2,9,4] 15:53:59 sorear, you seem to want to get the index of the maximum, i think 15:54:03 Oh! Baseball. 15:54:17 metaperl, post them for us :) 15:54:26 yes, the spec was for the column index of the maximum entry... cant imagine why that would be more important than the value 15:55:04 the actual value is trivial 15:55:08 maximum . concat 15:55:20 * sorear 's mind boggles ... metaperl == CosmicRay? can't be... 15:55:35 no I am not him 15:55:39 maximumBy (comparing maximum) -- just as easy to get the whole column 15:55:57 --- join: ski (n=slj@c-7b13e055.1149-1-64736c10.cust.bredbandsbolaget.se) joined #haskell 15:57:58 --- quit: jmelesky ("Leaving") 16:00:01 --- quit: michaelr ("Leaving") 16:01:25 I want to ask a converse question. How would you write a parser in J? :) 16:02:12 ... ghc -e ... 16:02:18 With great pain. :) 16:02:25 (I still don't understand J) 16:02:39 J is not that hard to understand. 16:02:50 It's just a matter of understanding the symbology. 16:02:52 sorear: i have config.mk open and it seems a bit criptic.. where is stage 2 selector?.. only one place an its under if condition.. its there wher i have to modify? 16:02:56 And that is learnt by actually hacking on it. 16:03:13 tao36: what version are you using? 16:03:16 Yeah, I've not really done much with it. 16:03:17 I think there is a straightforward way of implementing each J operator in Haskell. The end result is an isomorphic set of Haskell operators. 16:03:20 6.6 16:03:34 tao36: normally, if you just build and install, the installed version will be a stage 2 build 16:03:38 I should write a book "J for Haskell programmers" 16:03:42 --- quit: seancorfield () 16:03:42 monochrom: Wouldn't you run into typing issues? 16:03:53 The other thing for learning J is simple: use spaces. :) 16:03:57 tao36: you have to go out of your way to run a stage-1 compiler. 16:04:06 Everyone always says, "Don't use spaces! It makes for ugly code!" 16:04:16 Maybe. But one can restrict the types or use tricks. 16:04:22 And it does, sometimes. But on the average, that's nonsensical. 16:04:30 and how can i do it? 16:04:55 tao36: ./configure && make && make install should have just worked 16:05:14 i did that already. 16:05:17 what platform is tao36 building on? 16:05:21 i think.. 16:05:25 ppc 16:05:27 debian 16:05:33 tao36: And you are using the installed version? 16:05:37 nope 16:05:40 tao36: ie NOT a ghc-inplace? 16:05:42 source 16:06:01 tao36: after you made install, you should have a working /usr/local/bin/ghc 16:06:09 yes 16:06:22 which installed ghc do you use to build the attempted ghc? 16:06:23 monochrom: True; however, it won't run as fast (lists aren't vectors. You'd need to code a Haskell extension in C for using vectors, kind of like ByteString is for 8-bit characters) 16:06:33 tao36: if you have a working ghc, what's the problem? 16:06:40 I'm thinking the operators work for arrays, kc5tja 16:06:43 the prob is the interactive mode needed for the hsc 16:06:45 tao36: /usr/local/bin/ghc --interactive doesn't work? 16:06:56 yes 16:07:05 monochrom: Well, yes, the operators themselves only care about collections. Arrays and lists are both collections. 16:07:15 sorear: ghci doesnt work 16:07:41 Hm. I've just encountered Liskell. 16:07:42 ok, some typeclasses can cover the general case. specific implementations have specific performance. 16:07:43 im trying to use haskell to controll supercollider 16:07:45 tao36: if the build succeeded, and ghc --interactive fails, you've got a pretty unusual problem, complain on the ML 16:07:49 I can't decide whether it's an awesome or horrific idea. :) 16:08:12 i know sorear :) 16:08:27 that why ive come here :P 16:08:59 tao36: the real GHC gurus (except for Igloo) don't hang out here, the ML is a better avenue for obscure build problems 16:09:13 --- part: ndm left #haskell 16:09:16 ok 16:09:35 is debian-ppc known to be hard to build for? 16:09:40 sorear: thankx anyway for the effort 16:09:43 :D 16:09:48 --- join: chessguy (n=chessguy@c-69-242-13-143.hsd1.pa.comcast.net) joined #haskell 16:09:52 ghci isn't supported on PPC/Linux yet 16:09:55 hello chessguy 16:10:06 ok, that kills the conversation :) 16:10:07 'evening 16:10:11 thank you igloo: 16:10:12 --- quit: twanvl ("Good night") 16:10:31 * monochrom was prophetic in asking "what platform" 16:10:33 --- quit: cptchao1 ("Leaving.") 16:11:03 so .. using hsc in ppc/linux is on stall...:( 16:11:12 hsc? 16:11:17 anyone us 16:11:26 * sorear ran a ^AVERSION^A before advising configure... and got the amazingly helpful teply of 16:11:27 haskell with supercollider 16:11:38 Gaim IRC 16:12:03 --- quit: gh_ (Read error: 110 (Connection timed out)) 16:12:15 It'll be waay slow, but you might be able to use hi 16:12:18 @where hi 16:12:19 I know nothing about hi. 16:12:19 It is fashionable to abstract away the platform :) 16:12:22 @where hmake 16:12:23 http://haskell.org/hmake 16:12:30 hi == hmake interactive 16:12:37 igloo: using haskell to control sound synthesis ..kool at least 2 me :) 16:12:48 @where bye 16:12:49 I know nothing about bye. 16:13:00 naughty chessguy 16:13:29 @seen ndm 16:13:29 I saw ndm leaving #haskell 4m 16s ago, and . 16:13:40 Igloo: about how hard is it to get the interactive interpreter running on a new platform? 16:14:46 tao36: Why do you need ghci for that? 16:15:06 http://doc.gold.ac.uk/~ma503am/alex/node/24 16:15:10 Title: Haskell supercollider tutorial | Alex McLean 16:15:18 the author requires it 16:15:29 sorear: I have some patches that I need to tidy up to make ghci work for unregisterised ghci. Then it should work everywhere ghci does 16:15:48 Igloo: that conclusion is already true 16:15:57 Igloo: indeed, it is tautological 16:16:03 --- quit: lekro ("cu") 16:16:15 Sorry, last ghci should be ghc 16:16:49 ok. 16:17:26 @where hsc 16:17:27 I know nothing about hsc. 16:18:52 You can drop the supercollider emacs mode and ghci. Write code in file then compile and execute. It is less convenient but same expressive power. 16:20:48 monochrome: im a newbie in haskell and interactive mode is really convenient.. but its a good advice :) 16:21:01 --- join: seancorfield (n=seancorf@adsl-69-236-152-214.dsl.pltn13.pacbell.net) joined #haskell 16:21:31 --- quit: sioraiocht () 16:21:47 @hoogle cross 16:21:48 No matches found 16:21:50 @hoogle dot 16:21:52 Text.ParserCombinators.Parsec.Token.dot :: TokenParser st -> CharParser st String 16:21:52 GHC.Dotnet :: module 16:21:56 @hoogle dotproduct 16:21:57 No matches found 16:22:00 @hoogle dotProduct 16:22:01 No matches found 16:22:21 > zipWith (*) [1, 2, 3] [4, 5, 6] 16:22:23 [4,10,18] 16:22:30 > sum $ zipWith (*) [1, 2, 3] [4, 5, 6] 16:22:31 32 16:22:44 dolio: Looking for a more general vector and matrix library, actually. :) 16:22:44 --- join: mjk (i=kvirc@218.59.99.203) joined #haskell 16:22:49 I admit inconvenience is annoying :) 16:22:52 dolio: Hoping that would find it. 16:23:11 Yeah. I don't think there is one in the standard libs... 16:23:24 dolio: Noticing that. 16:23:58 There's probably one floating out on the internet somewhere. 16:24:07 Probably the subject of a paper or something. :) 16:24:20 dolio: No, probably 5. Hence my problem. :) 16:24:36 Heh. 16:25:48 * JoshTriplett would like to avoid making it 6. 16:26:26 --- join: ddarius (n=Derek@208.180.182.107) joined #haskell 16:26:29 --- join: wy (n=wy@r253211120.resnet.cornell.edu) joined #haskell 16:26:53 --- quit: prb () 16:27:29 --- join: wchogg (n=wchogg@216.165.132.250) joined #haskell 16:27:49 --- quit: seancorfield () 16:27:59 http://www.haskell.org/haskellwiki/Libraries_and_tools/Mathematics 16:28:01 Title: Libraries and tools/Mathematics - HaskellWiki, http://tinyurl.com/hq4t3 16:28:29 That has two different descriptions using the word "matrix." 16:29:40 Although I suppose any of the linear algebra ones might qualify. 16:33:12 --- join: sioraiocht (n=rtharper@cpe-74-71-116-245.twcny.res.rr.com) joined #haskell 16:39:05 --- quit: [1]acp (Read error: 113 (No route to host)) 16:39:55 --- part: kscaldef left #haskell 16:46:31 --- join: ajonat (i=ajonat@190.48.96.233) joined #haskell 16:46:37 @yow! 16:46:37 The Korean War must have been fun. 16:51:26 JoshTriplett: do I know your name from the xcb mailing list? 16:51:59 or maybe the C2 wiki? :) 16:53:07 @quote 16:53:07 edwinb says: I think I'd panic if I had to write something that wasn't a compiler. 16:53:23 heh 16:53:39 --- quit: Jaak ("Leaving") 16:54:50 --- quit: augustss () 16:55:42 <- 5 min lag 16:56:04 ping 16:56:11 pong! 16:56:22 funny how lag is so bursty 16:57:15 --- join: ndm (i=90208070@gateway/web/cgi-irc/ircatwork.com/x-a1bd78d3e7043463) joined #haskell 17:03:08 ndm: I'm going to consider the AST move complete after binary + eq +binarydefer, since Functor didn't work to begin with. 17:03:38 sjanssen: I'm beginning to think we don't need "refocus" after all, we can just do all that in setFocus 17:03:39 sorear, did it not work at all? 17:04:24 sjanssen: elementary google stalking shows JoshTriplett active on LKML, freedesktop.org, debian-legal, and Wikipedia. so probably "yes" 17:04:27 sorear, the original version at least worked for some data types 17:04:33 (and maybe make borders actually work at the same time) 17:04:51 ndm: oh... didn't notice in my earlier testing :) 17:04:59 ndm: thanks 17:05:16 sjanssen: Yes, you do. 17:05:28 sjanssen: Hi. 17:05:40 ERC> /wois JoshTriplett 17:05:40 *** wois: Unknown command 17:05:40 jcreigh: that sounds reasonable 17:05:48 I wish erc was more like lb :) 17:06:35 sorear, i think its restricted to certain data types possibly - the last two in the examples file allow functor to be derived 17:06:39 JoshTriplett: just curious. Seems to be disproportionate interest in Haskell among xcb hackers :) 17:07:15 sorear, which means that deriving things should possibly return a Maybe AST - which makes sense (you can't define Eq over functions etc) 17:07:37 sjanssen: all interest in Haskell is disproportionate. :) 17:07:42 sorear: hav you tried circe? It has flyspell support... maybe that would help ? 17:07:58 sjanssen: One of those correlation versus causation problems. A disproportionate number of XCB hackers come from the various Open Source work at Portland State, and a disproportionate number of Haskell users come from the Open Source work at Portland State. :) 17:08:08 sjanssen: They overlap heavily. 17:08:20 sjanssen: Hence fun projects like xhsb. 17:08:22 --- join: johnnowak (n=johnnowa@207-38-246-119.c3-0.wsd-ubr2.qens-wsd.ny.cable.rcn.com) joined #haskell 17:09:55 What does Managed vs UnManaged Code mean in the context of Windows DLLs ? 17:10:03 anyone know? 17:10:08 sjanssen: Also participating as a mentor for Summer of Code, so you might see me through that as well. 17:10:25 --- quit: sorear ("ERC Version 5.2 stable pre-release (IRC client for Emacs)") 17:10:34 --- quit: meester (Read error: 110 (Connection timed out)) 17:10:35 JoshTriplett, for Haskell, or X? 17:10:40 LordBrain, .NET vs C 17:10:45 LordBrain: ISTR that refers to .NET/CLR stuff 17:10:51 LordBrain: Relates to the use of the .NET runtime. Managed code doesn't bypass the runtime and do things like pointer manipulation. 17:10:51 Managed = .NET ? 17:11:02 ndm: X, and PSU, and ikiwiki, and sparse. :) 17:11:10 ah 17:11:44 so if i'm mixing haskell and c++, using ghc, i have no choice really but to make it unmanaged right? 17:11:55 LordBrain, yes - managed would be a nightmare 17:12:03 managed c++ == c# with ugly syntax 17:12:19 LordBrain, but c++ is likely to be hard too, C would be best (certainly for the haskell interface) 17:12:41 i don't know personally, but if it has to be .net people seem to think c# is the way to go 17:12:49 isn't there a haskell compiler that does .net stuff? 17:13:19 well i'm following a tutorial which makes a DLL project in VS C++.. 17:13:58 .net was only designed for imperative and statically typed languages 17:13:59 ray, Yhc generates .NET bytecode, GHC/Hugs could at one point link to .NET code, but it may well have bit rotted 17:14:03 running haskell on it is a hack 17:14:07 yhc was what i was thinking of 17:14:10 siti, you can translate Haskell to it 17:14:17 it's a hack :p 17:14:22 siti, not as much of a hack as java, at least they have tail call! 17:14:27 lol 17:14:56 native code is so much better :D 17:15:30 a custom haskell bytecode is the best solution though ;) 17:15:45 hey procyon112, you around? 17:15:57 yeah the combination of both would be good 17:16:25 doesn't the latest ghc let you mix ghci bytecode in? 17:16:45 i recall reading something like that... 17:16:47 LordBrain, only when running ghci, hs-plugins does some trickery, but it isn't a proper solution 17:17:02 to running as bytecode, it is for doing plugins, of course 17:17:48 @pl \x -> case x of (Just _) -> True; Nothing -> False 17:17:48 (line 1, column 23): 17:17:48 unexpected "_" 17:17:48 expecting variable, "(", operator or ")" 17:17:56 @pl \x -> case x of (Just y) -> True; Nothing -> False 17:17:57 (line 1, column 26): 17:17:58 unexpected ">" or "-" 17:17:58 expecting variable, "(", operator or end of input 17:18:35 > maybe False (const True) (Just 5) 17:18:38 --- quit: mnislaih_ () 17:18:39 True 17:18:48 > maybe False (const True) (Nothing) 17:18:51 --- quit: mr_ank (Read error: 110 (Connection timed out)) 17:18:52 False 17:19:00 --- quit: wchogg (Read error: 104 (Connection reset by peer)) 17:19:07 ?src maybe 17:19:10 maybe n _ Nothing = n 17:19:10 maybe _ f (Just x) = f x 17:19:51 chessguy, isJust 17:19:59 ?src isJust 17:20:00 isJust Nothing = False 17:20:00 isJust _ = True 17:20:03 @hoogle Maybe a -> Bool 17:20:04 Maybe.isJust :: Maybe a -> Bool 17:20:04 Maybe.isNothing :: Maybe a -> Bool 17:20:16 I am beaten. 17:20:27 --- join: mnislaih (n=pepe@81.202.139.46.dyn.user.ono.com) joined #haskell 17:20:31 now i've got to remember what i wanted it for :) 17:20:45 I recommend everyone read through Data.Maybe, and probably Data.List as well - it will save you time in the long run 17:21:29 --- quit: windows_kills (Read error: 110 (Connection timed out)) 17:22:04 --- quit: zarvok ("BitchX-1.1-final -- just do it.") 17:22:16 In general RTFM 17:22:43 ATFH 17:22:54 --- join: trane (n=robertsc@elltel-dsl-p994.elltel.net) joined #haskell 17:22:56 ?vera ATFH 17:22:57 ask the * hoogle 17:23:00 No match for "ATFH". 17:23:07 lol 17:23:22 that's one of the fun things about Haskell: Once you figure what type of function you need, you're halfwaythere. 17:23:30 s/way/& / 17:23:35 @arr 17:23:36 Yeh scurvy dog... 17:23:41 @remember ndm ATFH: ask the * hoogle 17:23:42 Done. 17:23:52 I practice type-oriented programming. 17:24:06 --- join: zarvok (i=ccasingh@BEANCOUNTER.RES.cmu.edu) joined #haskell 17:24:23 @remember jcreigh that's one of the fun things about Haskell: Once you figure what type of function you need, you're halfwaythere. 17:24:23 Done. 17:24:38 ...and now my typo is recorded forever. :) 17:24:47 hi dcoutts, i'll be in Oxford on monday :) 17:24:53 Pretend it's German. 17:25:11 monochrom: gehalfenwayther? 17:25:15 Not to mention that halfwaythere is shorter than half way there. :) 17:25:48 halfwaythere seems Orwellian... 17:25:55 hehe 17:25:57 @djinn a -> (b -> a) -> Maybe b -> a 17:25:58 f a b c = 17:25:58 case c of 17:25:58 Nothing -> a 17:25:58 Just d -> b d 17:26:32 * JoshTriplett tries to think of a real application of a function with that signature... 17:26:42 @hoogle a -> (b -> a) -> Maybe b -> a 17:26:43 Prelude.maybe :: b -> (a -> b) -> Maybe a -> b 17:26:46 @src maybe 17:26:47 maybe n _ Nothing = n 17:26:47 maybe _ f (Just x) = f x 17:26:54 nm. :) 17:26:54 Nice, djinn knows a handful of common types 17:27:13 JoshTriplett: it's like foldr 17:27:23 It is the foldr of Maybe. 17:27:29 'maybe default id (lookup map key)' is common, I think. 17:27:36 monochrom: I knew about maybe, I just didn't immediately connect it to that type signature. 17:27:49 dolio: fromMaybe seems better there 17:27:55 @pl \x -> let y = f x in if (isJust y) then y else g x 17:27:55 Did I say something? 17:27:55 ap (flip (if' =<< isJust) . g) f 17:28:34 @type if' 17:28:36 SamB: I think the main issue with C++ GUI libs (wx/qt) is that they don't play nicely with GC'd languages, they expect you to know when to free things and not free them too early (which is hard if you do not know which other things have references to said object/widget). 17:28:37 Not in scope: `if'' 17:28:42 ?hoogle if 17:28:43 Prelude.if :: keyword 17:28:43 Foreign.C.Error.throwErrnoIf :: (a -> Bool) -> String -> IO a -> IO a 17:28:43 Foreign.Marshal.Error.throwIf :: (a -> Bool) -> (a -> String) -> IO a -> IO a 17:28:53 ?hoogle+ 17:28:53 Language.Haskell.Syntax.HsIf :: HsExp -> HsExp -> HsExp -> HsExp 17:28:54 System.Win32.Types.failIf :: (a -> Bool) -> String -> IO a -> IO a 17:28:54 Language.Haskell.TH.Ppr.parensIf :: Bool -> Doc -> Doc 17:28:56 ?hoogle+ 17:28:56 Data.Array.Diff :: module 17:28:57 Directory.getModificationTime :: FilePath -> IO ClockTime 17:28:57 Monad.liftM :: Monad a => (b -> c) -> a b -> a c 17:28:59 ?hoogle+ 17:28:59 Monad.liftM2 :: Monad a => (b -> c -> d) -> a b -> a c -> a d 17:28:59 Monad.liftM3 :: Monad a => (b -> c -> d -> e) -> a b -> a c -> a d -> a e 17:29:01 Monad.liftM4 :: Monad a => (b -> c -> d -> e -> f) -> a b -> a c -> a d -> a e -> a f 17:29:05 bah 17:29:15 ?hoogle if' 17:29:15 No matches found 17:29:15 chessguy: /msg lambdabot for stuff like that, please. :) 17:29:22 @hoogle Bool -> a -> a -> a 17:29:24 No matches, try a more general search 17:29:33 chessguy, hoogle isn't silly - if if' was there, it would have been second - its not 17:29:42 chessguy: I think you want mplus 17:29:44 don't use lambdabot, use the hoogle website if you want many results 17:29:48 jcreigh: I suppose. The catamorphism subsumes all the more specific ones, though. 17:29:52 plus pretty colours and haddock documentation links etc. 17:29:55 @where hoogle 17:29:55 http://www.haskell.org/hoogle 17:29:58 how does pl use if', when it's not in scope 17:30:13 kpreid: how so? 17:30:17 chessguy, who said pl code will run 17:30:20 --- quit: wy (Read error: 110 (Connection timed out)) 17:30:26 wait, not mplus, but rather the Kliesli arrow equivalent 17:30:26 dolio: errr...what? Does that translate roughly to "fromMaybe is a special case of maybe"? 17:30:28 --- join: windows_kills (i=vjt@openssl.it) joined #haskell 17:30:30 or something like that 17:30:58 --- quit: BCoppens ("Konversation terminated!") 17:31:01 ?type fromMaybe 17:31:04 forall a. a -> Maybe a -> a 17:31:08 jcreigh: Yeah. maybe is the function you can write everything else in terms of. Like foldr with lists. 17:31:14 Roughly speaking. 17:32:20 catamorphism! 17:32:37 catamorphism is not scary. 17:32:49 Although I can't figure out how to write a lazy tail with the list catamorphism. 17:33:08 sjanssen: btw, do you recall your 'build' in terms of streams hack ? 17:33:17 dcoutts: yeah, what about it? 17:33:19 chessguy: \x -> f x `mplus` g x 17:33:29 sjanssen: I can't remember how it worked :-) 17:33:31 I was playing around the other day with 'newtype List a = Build { foldr' :: forall b. (a -> b -> b) -> b -> b }', and that was one sticking point. 17:33:37 chessguy: that's the same as \f g x -> let y = f x in if (isJust y) then y else g x 17:33:42 And suchlike. 17:33:44 @type \x -> ?f ?x `mplus` ?g ?x 17:33:47 forall t (m :: * -> *) a t1. (MonadPlus m, ?g::t1 -> m a, ?x::t1, ?f::t1 -> m a) => t -> m a 17:33:53 dcoutts: hmm, give me a couple minutes 17:34:03 er, where'd those ?s come from? 17:34:36 implicit parameters 17:34:50 I know, but why did ...oh 17:34:59 dcoutts: what does your Stream data type look like nowadays? 17:35:00 you might want to take them off the xes 17:35:06 sjanssen: pretty much the same 17:35:35 sjanssen: different class constraints and different smatterings of ! but basically the same 17:35:46 dolio: Tail is ugly, add para morphisms, or better read and apply "Recursion Schemes from Comonads" 17:36:06 @type \f g x -> f x `mplus` g x 17:36:06 sjanssen: we've got this cool Unlifted class of strict unlifted types that we use for stream states :-) 17:36:08 forall t (m :: * -> *) a. (MonadPlus m) => (t -> m a) -> (t -> m a) -> t -> m a 17:36:09 chessguy: mplus on Maybes just takes the first Just of its arguments 17:36:12 does that make you feel better? :) 17:36:28 How do I import a module from the ghci repl 17:36:29 ? 17:36:36 procyon112: :m + Module 17:36:40 danke 17:36:41 procyon112! 17:36:47 --- join: laziest (n=Laziest@pratapgad.unipune.ernet.in) joined #haskell 17:37:18 ddarius: I didn't really want tail specifically, but without it it's not immediately clear to me how to define zip(With) in terms of foldr, though it may well be possible. 17:37:41 kpreid++ nice solution 17:38:19 and if you ever want both answers, just switch it to the list monad :) 17:38:32 Tree! 17:38:33 heh. that wouldn't make much sense in this case :) 17:39:32 sjanssen: refocus -> setFocus patch sent. Borders actually follow mod-{j,k} around now. 17:40:06 hey procyon112, do you have koza's (first) GP book? from '92? 17:40:32 > snd $ foldr (\x (xs,txs) -> (x:xs,txs)) ([],error "tail of empty list") [1..] 17:40:34 Exception: stack overflow 17:40:46 > snd $ foldr (\x ~(xs,txs) -> (x:xs,txs)) ([],error "tail of empty list") [1..] 17:40:51 Terminated 17:41:00 > snd $ foldr (\x ~(xs,txs) -> (x:xs,txs)) ([],error "tail of empty list") [1..10] 17:41:02 Exception: tail of empty list 17:41:13 > snd $ foldr (\x ~(xs,txs) -> (x:xs,xs)) ([],error "tail of empty list") [1..10] 17:41:15 [2,3,4,5,6,7,8,9,10] 17:41:20 > snd $ foldr (\x ~(xs,txs) -> (x:xs,xs)) ([],error "tail of empty list") [1..] 17:41:21 [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29... 17:41:27 Ah, well, there we are. 17:41:38 I guess I needed the irrefutable pattern match. 17:41:45 negative LOC patches are fun...too bad they're harder to make. 17:42:00 jcreigh: They are quite easy to make. 17:42:10 ...while maintaining functionality. :) 17:42:15 ddarius++ 17:42:20 A might trickier. 17:42:24 s/might/mite 17:42:28 sjanssen pasted "streaming and build" at http://hpaste.org/1203 17:42:44 dcoutts: that's how I remember it 17:42:55 sjanssen: ta 17:43:23 sjanssen: ah yes and the wrap was because we were strict in the stream state 17:43:32 sjanssen: while build required it to be lazy 17:43:55 dcoutts: actually, this wrap is to make the type finite 17:44:11 sjanssen: oh, that's more exciting :-) 17:44:36 @type GHC.Base.build 17:44:39 forall a. (forall b. (a -> b -> b) -> b -> b) -> [a] 17:45:00 though if the defn. of Step had Yield a !s you'd need data 17:45:17 right 17:46:12 @src build 17:46:13 build g = g (:) [] 17:46:15 I think the RULE is forall f. build f = unstream (streamFoldr f), or something 17:46:18 chessguy: My typeof is broken :/ 17:46:32 procyon112: uh-oh! 17:46:37 I just found a case where it gives a non-simplified answer. 17:46:39 --- join: rhz_ (n=rhz@c211-30-66-150.carlnfd4.nsw.optusnet.com.au) joined #haskell 17:46:50 sjanssen: yes, that makes sense 17:47:24 I am getting this runtime error using GLUT in a ghc compiled program: "user error (unknown GLUT call glutSolidCylinder, check for freeglut)". Is this a bug in the GLUT module? 17:47:39 I don't think it's a big deal... but damn, It's hard to debug an algorithm that I wrote, but I'm not sure how it works. 17:48:37 lol 17:51:08 --- quit: mjk ("KVIrc 3.2.6 Anomalies http://www.kvirc.net/") 17:51:40 jcreigh: pushed, cheers 17:51:43 --- quit: russo () 17:51:48 chessguy: typeof const (+ $ ap const const 1 2) 3) -- is giving me the equivelent of type "a" instead of "Int" because it infers that the type is b, and b == a and a == int, but it only substitutes 1 level 17:52:49 And I'm not sure how to fix it... Oh well, It's not used in my tree generator, so I guess I can let it slide for now. 17:54:12 Damn Haskell typechecker... It lets me write code I don't understand, but can verify correct. 17:54:35 --- quit: trane (Connection timed out) 17:54:40 sjanssen: cool. focus handling still seems a little weird...seems like we have lots of functions that try to deal with it. I don't know...can't quite put my finger on it. seems like there must be a better way. 17:55:03 yeah, there needs to be some simplification 17:55:49 --- quit: Ademan_brb (Success) 17:55:51 but I think moving that to setFocus is a step in the right direction, anyway. 17:56:16 --- join: Ademan_brb (n=dan@h-67-101-145-200.snfccasy.dynamic.covad.net) joined #haskell 17:56:41 I should try the selectInput changes in refresh. At that point we might be able to have every focus and window changing function call refresh 17:56:53 --- quit: laziest ("Leaving") 17:57:44 and that would be "ignore enter/leave window... do refresh...unignore enter/leave window"? 17:58:07 jcreigh: correct 17:58:50 @pl \x y z = (x,y,z) 17:58:50 (line 1, column 8): 17:58:50 unexpected "=" 17:58:50 expecting pattern or "->" 17:58:59 @pl \x y z -> (x,y,z) 17:59:00 (,,) 17:59:19 > (,,,,) 1 2 3 4 17:59:21 Add a type signature 17:59:24 grr... 17:59:36 but anyway, there's a bunch of (,,,) functions for various tuple sizes... 17:59:38 > (,,,) 1 2 3 4 17:59:40 (1,2,3,4) 17:59:49 neato 17:59:49 oh, right. 18:00:08 procyon112? 18:00:21 but most tuples bigger than 2-tuples want to be datatypes. 18:00:28 yes? 18:00:38 do you have koza's first GP book? 18:00:43 i like the 3 tuple, but there are no standard functions to extract elements from it :( 18:00:58 chessguy: no.. I digested that years and years ago. 18:01:23 ah. i was thinking of modelling the GUI for our library after the interface he talks about 18:01:27 ndm: yeah.. we were talking about that the other night. 18:01:46 chessguy: I don't remember his interface. :( 18:02:08 ?pl \a as -> if' (p a) (a:as) as 18:02:09 join . ap ((.) . if' . p) (:) 18:04:08 ndm: we had an amusing naming convention. fst,snd; frst,scnd,thrd; first,secnd,third,forth;.... fiiirst, seecond, thiiird, foourth, fiiifth, siiixth... 18:04:35 procyon113, i have the convention: fst3, snd3, thd3 18:04:51 procyon112, and of course this can extend equally 18:05:12 ndm: that's not anywhere near as amusing though. Sometimes amusement trumps scalability ;) 18:05:37 ?src if' 18:05:37 Source not found. Wrong! You cheating scum! 18:06:28 ?pl x y z = (nonexistant x) + y + z 18:06:29 x = fix (((+) .) . (+) . nonexistant) 18:06:46 ahh.. I didn't know it worked for undefined functions... kool! 18:06:57 --- join: Zeroth404 (n=zeorth@24-176-12-252.dhcp.klmz.mi.charter.com) joined #haskell 18:08:57 --- part: tao36 left #haskell 18:09:00 --- quit: thedward ("leaving") 18:09:19 ?pl myfunc t c = foldl (\s (x,y) -> func x y s) t c 18:09:20 myfunc = foldl ((`ap` snd) . (. fst) . flip (flip . func)) 18:10:42 I want an implant that lets me do ?pl in my head. 18:11:23 With enough practice, it's not too hard to do the useful pointless transforms in your head. 18:11:54 I hope to get there eventually then. 18:12:14 Where I'd probably categorize the above one as useless (too much flipping and such). 18:12:31 --- quit: liquidengineer ("Leaving") 18:12:42 yeah 18:12:46 --- part: JoshTriplett left #haskell 18:13:27 ?pl x y x = m where m = y 18:13:27 (line 1, column 19): 18:13:27 unexpected "=" 18:13:27 expecting variable, "(", operator or end of input 18:13:53 ?pl x y x = m; where m = y 18:13:53 (line 1, column 10): 18:13:54 unexpected ";" 18:13:54 expecting letter or digit, variable, "(", operator or end of input 18:14:17 procyon112: I don't think pl parses where 18:14:26 just checking 18:14:30 it's got an ugly little parser for a subset of Haskell 18:14:45 --- quit: guenni ("Nettalk6 - www.ntalk.de") 18:14:49 --- quit: der_eq (Remote closed the connection) 18:15:42 --- join: sorear (n=user@ip68-7-248-101.sd.sd.cox.net) joined #haskell 18:15:45 ?pl scnd (_,s,_) = s 18:15:46 (line 1, column 7): 18:15:46 unexpected "_" 18:15:46 expecting lambda abstraction or expression 18:16:00 ?pl scnd (a,s,b) = s 18:16:00 (line 1, column 14): 18:16:00 unexpected "=" 18:16:00 expecting variable, "(", operator or end of input 18:16:06 it doesn't know 3 tuples either 18:16:11 IC 18:16:24 I'm always breakin stuff 18:16:38 hello! 18:16:42 yo 18:16:43 that can't be point freed anyway with the standard libs anyway 18:17:06 I didn't figure it could, but I was wondering if I'd be suprised. 18:17:19 > (\ (x,y,z) -> y) . Foreign.free -- Point freed! 18:17:21 Not in scope: `Foreign.free' 18:18:29 hmm, is there really no way to point free it? 18:18:38 I wonder if Data.Generics can do it 18:18:45 cheating :) 18:18:49 @hoogle uncurry3 18:18:49 No matches found 18:19:35 @seen dons 18:19:36 dons is in #haskell-soc, #haskell-overflow and #haskell. I last heard dons speak 11h 41m 59s ago. 18:20:09 ?pl x y c = fmap (++ [(x,y)]) (u $ s x y c) 18:20:10 x = fix (ap (ap . (((.) . fmap . flip (++)) .) . flip flip [] . ((:) .) . (,)) (((u .) .) . s)) 18:20:50 ...BWAHAHAHA! 18:20:57 Beautiful. 18:21:10 I think I like the pointfull version. 18:21:31 ?pl ua x y c = fmap (++ [(x,y)]) (u $ s x y c) 18:21:32 ua = ap (ap . (((.) . fmap . flip (++)) .) . flip flip [] . ((:) .) . (,)) (((u .) .) . s) 18:21:43 Prelude GHC.Exts> (snd . unsafeCoerce# :: (a,b,c) -> b) (1,2,3) 18:21:43 2 18:21:47 procyon112: ^^^ 18:21:59 lol 18:22:03 mwahaha 18:22:25 Somehow, I alse prefer a pattern match to an unsafeCoerce :) 18:23:08 Unsafecoerce is GREAT for pfholics! 18:23:44 phholism can lead to unsafe coding. 18:23:52 pfholism can lead to unsafe coding. 18:24:33 sorear: I don't like the points in the type signature 18:25:09 @pl \x -> f x x x 18:25:10 join (join f) 18:25:37 @type join (join (,,)) undefined 18:25:39 forall a. (a, a, a) 18:27:25 ?src join 18:27:25 join x = x >>= id 18:27:30 --- join: thedward (n=thedward@diamond.thirdchimp.com) joined #haskell 18:28:04 That definition is too pointy. 18:28:13 you should add arrows. 18:28:17 or possibly spears 18:28:26 ?pl j x = x >>= id 18:28:26 j = join 18:28:29 lol 18:28:50 :t (>>= id) 18:28:51 I was thinking (>>= ap const const) 18:28:52 forall (m :: * -> *) b. (Monad m) => m (m b) -> m b 18:29:04 :t ap return return 18:29:07 forall a (m :: * -> *). (Monad m) => a -> a 18:29:18 :t (>>= ap return return) 18:29:21 forall (m :: * -> *) b (m1 :: * -> *). (Monad m1, Monad m) => m (m b) -> m b 18:29:29 wtf? 18:29:37 --- join: chadronius (n=chad@71.93.3.167) joined #haskell 18:29:38 This isn't System F! 18:29:41 --- part: chadronius left #haskell 18:29:42 :t (>>= ap const const) 18:29:45 forall (m :: * -> *) b. (Monad m) => m (m b) -> m b 18:29:50 :t join 18:29:53 forall (m :: * -> *) a. (Monad m) => m (m a) -> m a 18:30:02 return != const 18:30:15 bzzt 18:30:19 @src (->) return 18:30:20 return = const 18:30:25 s/!=//= 18:30:43 Invalid substitution flag: = 18:30:48 lpl 18:30:49 ;) 18:30:53 lol even 18:30:54 lpl? 18:31:09 Can't assign to substitution (s///) at .. 18:31:09 Lazy Perl? 18:31:57 ((*) >>= ap const const) 5 18:31:59 > ((*) >>= ap const const) 5 18:32:00 ... and augustsson's amazing Chalmers Lazy Perl Compiler ... 18:32:01 25 18:32:06 it weven works. 18:32:25 obfuscation is too easy :( 18:32:27 > ((*) >>= ap return return) 5 18:32:28 Add a type signature 18:32:45 > (((*) >>= ap return return) 5) :: Int 18:32:45 Add a type signature 18:32:51 Haskell is not System F, unfortunately. 18:33:20 We pay a lot of sanity for our conciseness. 18:33:58 sanity is for java programmers. 18:34:18 --- join: dfeuer (n=topolog@wikimedia/Dfeuer) joined #haskell 18:34:39 Java is not sane... Java is structured to the point of autistic 18:34:51 funny. 18:34:59 so why can't you put ints in a Map ? 18:35:07 Because you can't 18:35:28 Don't argue with the sun god, for he is all powerful! 18:35:29 > map +1 [1,2,3] 18:35:30 add an instance declaration for 18:35:30 (Num ([t] -> (a -> b) -> [a] -> ... 18:35:38 You can these days, no? Since they added auto-boxing? 18:35:40 > map (+1) [1,2,3] 18:35:41 [2,3,4] 18:35:57 Oh... THAT kinda map. 18:36:05 I guess that's cheating, though. 18:36:11 dolio: it still fails horribly on java 1.5 18:36:25 I should check out the new java sometime 18:36:33 C#? 18:36:36 procyon112: is the 112 constant? 18:36:38 Ah. I haven't actually used Java in a while. 18:36:47 Because Int's aren't an object.. They are a java hack for performance. 18:37:10 They are a Java hack for implementation simplicity. 18:37:15 {- deliberate leading space -} @remember procyon112 Java is not sane... Java is structured to the point of autistic 18:37:17 but surely the compiler could auto-promote ints to Integers? 18:37:24 sorear: yes. It's a number I picked years ago for times when people steal "procyon" ;) 18:37:27 autism 18:37:42 Botje: aren't ints fixnums? 18:38:04 Botje: Oh, wait, Java Integers aren't? 18:38:04 sorear: think so 18:38:12 BigInt 18:38:16 oh. that kind of Integer. 18:38:18 no. 18:38:22 * sorear is spoiled 18:38:35 @remember procyon112 Java is not sane... Java is structured to the point of autism 18:38:36 Done. 18:38:38 Integer (in java) is an object representation of the native int data type 18:38:52 because eg a Map takes Objects 18:38:54 I imagine it's waay slower than Int :) 18:39:02 Really sorear, how often do you truly take advantage of (Haskell's) Integer? 18:39:02 (haskell Int) 18:39:08 and Since An Int Is Not An Object, You Can't Put It In A Map. 18:39:08 All the primitives have wrapper classes like that. 18:39:26 (emphasis by the sun god) 18:39:28 But, but, but everything is an object! 18:39:38 not in Java. 18:39:38 ddarius: normally I don't. but it gives my complete freedom from integer overflow 18:39:56 ddarius: and really, integer overflow is something the compiler should worry about for me 18:40:08 java maintains a small pool of constant Integers to map to small ints, primarily to cushion the performance blow of their implementation of autoboxing. 18:40:42 everything is an object, until you want performance. then you introduce non-objects for performance. then you keep converting between the two and lose performance. 18:40:44 Glasgow haskell interns Ints too, but lazily at GC time. 18:40:56 Int# anyone? 18:40:59 It does come in handy though. E.g. the hardest part about writing many cryptographic algorithms is implementing Integers. 18:41:13 *yawn* 18:41:15 time for sleep 18:41:20 03:39 18:41:42 sorear, Yhc's C back end will have lazy unboxed Int's 18:41:59 ... why? 18:42:01 * lambdabot /kicks Botje 18:42:18 ndm: aren't unboxed types unpointed by definition? 18:42:32 No... 18:42:43 sorear: Java:Haskell int:Int# Integer:Int BigInt:Integer.. pretty similar performance between the 2 languages. 18:42:45 ndm: or can you get around that by using catch to eliminate the need for pointedness 18:43:23 procyon112: so heavy java.whatever.Integer code is automatically unboxed with -O ? 18:43:27 sorear, you can put the "point" in as a tag 18:43:51 --- join: foxy_ (n=chatzill@125-238-83-34.broadband-telecom.global-gateway.net.nz) joined #haskell 18:44:05 ndm: you can't detect the point, unless you have a hypercomputer 18:44:16 ndm: so we need some kind of thunk! 18:44:26 sorear: I don't think there Is an -O in javac.. but yeah. 18:44:28 0|ptrtothunk 1|int# 18:44:44 ndm: I can see inlining that, but it can't be a raw int32_t 18:44:49 soear, we have values so that we can tell if its a thunk, or a value 18:44:58 sorear - not a raw int, but a raw int with a tag 18:45:16 ?yow 18:45:16 Everywhere I look I see NEGATIVITY and ASPHALT ... 18:45:29 i hope to go for full unboxing once -O11 is done, from initial investigations it seems that -O11 might actually make nearly all the code strict 18:45:45 not something I'd expected at all! 18:46:04 g'morning dons 18:46:09 hiya dons 18:46:22 night all. gotta run. 18:46:25 --- quit: procyon112 () 18:46:32 dons: there's a message on -cafe wrt lambdabot that has just passed outside my field. 18:46:33 That'll please the people who ask for eager haskell every so often. :) 18:46:42 ndm: I think you should call it -O11!!11! 18:46:43 --- quit: mnislaih () 18:46:44 Everywhere you looked there was confusion, violence, drama, and drugs 18:46:56 dons, Hi! Did you get my email about unresolved links (_free) wrt hs-plugins 18:46:58 * sorear /whois ddarius 18:47:10 dcoutts, currently -Ovarpourware is more appropriate 18:47:15 ndm: or even better: -OMG!!!1 18:47:39 Heh, I like that one. 18:47:45 ndm: I think a spinal tap reference would be even funnier still. How does "-O11" sound? 18:48:44 sorear, -O11 is the current name :) 18:49:08 ndm: I know, I just like it better than -OMG 18:49:48 i can support both flags :) 18:49:58 (supporting flags is easy, writing the optimiser might be harder...) 18:50:09 --- nick: foxy_ -> foxy 18:51:13 Is it still just conditional rewrite rules with Catch to eliminate the preconditions, or is there more unpublished fanciness? 18:51:56 how do you mean? 18:52:00 for -O11? 18:52:06 yeah 18:52:16 i don't really focus on eliminating preconditions with that, the Catch stuff is mainly unused 18:52:39 --- join: mr_ank (n=ank@108-170-89-200.fibertel.com.ar) joined #haskell 18:52:40 i have a small set of rules and a strategy for applying them - entirely unpublished so far 18:53:08 a side effect is that a lot of error calls are eliminated, but then so is a lot of stuff 18:53:09 * sorear has mad dreams of writing an uber-optimizer based on GP, profiler feedback, and interpretation using an abstract trace+data cache model 18:53:44 that kind of stuff is very low level however 18:53:52 my optimiser assumes that C is the level to optimise for - no profiler hints or cache stuff 18:54:06 might grind icc to a pulp, but would be helpless at deforestation 18:54:10 once i've done that though, someone else could easily play low level 18:55:12 So where does -O11 fit in? UnoptimizedCore -> C? OptimizedCore -> C? 18:55:52 ndm: The "EXE: Automatically Generating Inputs of Death" paper I keep talking about may be a decent paper for related work. 18:56:22 sorear, unoptimised Core -> super-optimised Core 18:56:50 sorear, then i have stage 2, which is super-optmised first-order Core + strictness analysis -> C 18:57:08 stage 1 is actually upoptimised first-order Core -> super-optimised first-order Core 18:57:28 ddarius, months away yet, remind me later :) 18:58:01 ddarius, unless you are talking about the Catch paper? 18:58:08 ndm: Catch paper 18:58:35 --- join: zeeeee (i=zeeeee@ASHDOWN-FIFTY.MIT.EDU) joined #haskell 18:59:04 ndm: is -O11 Just A Shiny OSS Project or does it have academic implications? 18:59:26 ndm: Urban Boquist got a Phd for something not extremely different... 18:59:33 sorear, its chapter 5 of my PhD thesis 18:59:59 i have: Play, First-Order Haskell, -O11, Catch as the chapters in my thesis 19:00:47 zeeeee pasted "help, i'm getting a compiler error when trying to building my simple app" at http://hpaste.org/1204 19:01:00 --maek 19:01:30 --- join: mnislaih (n=pepe@81.202.139.46.dyn.user.ono.com) joined #haskell 19:01:43 I have read some of Boquist's PhD, and i realise its similar stuff 19:01:49 * ddarius should email Goguen. 19:01:55 but I want -O11 to be fast at compile time as well 19:01:59 --- join: neomagus00 (n=dhuston@NEOMAGUS00.RES.cmu.edu) joined #haskell 19:02:09 How fast is GRIN? 19:02:24 I would assume it's much much much faster than jhc 19:02:25 ddarius, not quite appropriate for Catch, esp as I'm trying not to change too much now - but perfect for the guy who sits next to me! 19:02:37 same side? 19:02:45 --- nick: windows_kills -> windows_causes_c 19:02:50 sorear, i'm not sure there was ever an available implementation, but pretty slow i thought 19:02:54 --- nick: windows_causes_c -> vjt 19:03:39 --- part: neomagus00 left #haskell 19:03:39 It does similar things albeit in a rather different context and with different vocabulary. It even works and very roughly the same way. 19:04:08 ddarius: pronoun resolution error 19:04:08 Windows Causes C? 19:04:13 ddarius, it seems quite different - esp in mode of operation - but very similar to the guy who sits next to me 19:04:22 ndm: still talking about m.naylor? 19:04:29 As long as it's useful. It's a good paper. 19:04:31 sorear, yep 19:04:43 ndm: How many people sit next to you? 8? 26? 4? 2? 1? 19:04:51 very useful, he'll love it 19:04:54 3^^^^3 19:05:02 one sits directly next to me, matt naylor 19:05:08 ooh, bignum 19:05:16 tom shackell sits next to me, but through a thin divider 19:05:29 malcolm wallace is the other side of the corridor 19:05:49 tom davie? :) 19:05:53 kent 19:06:07 one person in my area only comes in about once a month for a few hours 19:06:18 one guy left and moved to columbia with his wife 19:07:14 my office is currently pretty much desserted 19:07:22 Yum. 19:07:45 sorry :) 19:07:48 sorear: thanks 19:09:08 sorry, was hungry 19:09:20 --- quit: int-e ("Bye!") 19:09:31 --- join: theCore (n=alex@ubuntu/member/theCore) joined #haskell 19:09:43 had a sorbet for desert, another word for "flavoured ice" 19:10:23 yeah, people look at me funny when I eat unflavoured ice ;-) 19:11:06 chewing ice is fun 19:11:08 --- join: alexj (n=chatzill@63.170.71.162) joined #haskell 19:12:02 is -O11 mostly ideas-hard or code-hard? (cloning difficulty) 19:13:42 sorear, i have an initial version implemented, and the theory is mainly done - i would say ideas-hard and code-easy 19:14:12 i need to work on the code, from a theory point of view, but once its done I suspect it will be very easy to replicate 19:14:14 I worry I may not be able to resist adding an optimizer to my compiler :) 19:15:27 HV is on hold until derive is unbroken and drift-for-C is finished, I suspect this means "forever" :( 19:15:44 sorear, once i've got the details, i'll let you know - shouldn't be too hard 19:15:50 although will require whole-program compilation 19:16:36 Whole program is no problem. Ghc --make is whole program. Albiet with a lot of memoization. 19:16:42 @spell albiet 19:16:44 albeit Albert Albie alibied Ailbert 19:17:41 anyway, i'm going to head to bed now 19:17:49 night 19:18:32 How bad would it be for derive to generate dumb code like "return 0 >>= \tag -> case tag of 0 -> ..." 19:18:49 In the spirit of "let the optimizer do all the hard work" 19:18:50 Damn Goguen and being interesting. 19:19:05 --- quit: rashakil ("Leaving") 19:20:08 sorear: Premature optimizers are the roots of all evil. 19:20:41 ddarius: have you seen what ghc desugars listcomps into ... :| 19:21:02 yee gow! 19:21:18 ghci -ddump-ds gives results for code not even entired 19:21:19 sorear, let the optimiser do the work, if it is an issue, someone will patch it later 19:21:52 * sorear sighs relieffully 19:21:55 thanks 19:21:55 however, do remebmer that only 1 in 4 current haskell compilers come with an optimiser 19:22:03 anyway, rael sleep now 19:22:07 --- part: ndm left #haskell 19:23:20 Oh, my. 19:23:35 ghci -ddump-ds uses unsafeCoerce# in the handling of '2' 19:25:59 --- quit: mnislaih () 19:27:26 --- join: mnislaih (n=pepe@81.202.139.46.dyn.user.ono.com) joined #haskell 19:30:03 Hmm, apparently the Haskell sudoku solver community has to watch out. Some people are writing faster solvers in XSLT. 19:30:55 heh. seriously? 19:31:12 how many pages? 19:31:23 http://dnovatchev.spaces.live.com/Blog/cns!44B0A32C2CCF7488!355.entry 19:31:25 http://tinyurl.com/yvpyqg 19:31:35 Be careful, your eyes might bleed. 19:32:11 yeah, that's a hideous yellow 19:32:34 * sorear doesn't care! 19:32:36 --- quit: alexj (Read error: 110 (Connection timed out)) 19:32:50 Only one I've tried definitely beats those. 19:33:02 man I'm dump 19:33:04 Although all the haskell solutions are way shorter, I think. :) 19:33:05 *dumb 19:33:10 stefan@stefans:/usr/local/src/derive$ links 'http://dnovatchev.spaces.live.com/Blog/cnscd ../filepathB0A32C2CCF7488ghc -ddump-simpl -O2 -fno-code -fglasgow-exts A.hs.entry' 19:33:51 @quote page 19:33:51 chessguy says: heh. i think i'm officially addicted. i'm chatting in #haskell, helping hack on a haskellwiki page, browing a reddit thread about haskell, while playing a haskell video lecture in the 19:33:51 background 19:34:01 @quote one.page 19:34:01 darius says: I imagine XSLT programmers say "It's a one pager" the way most other programmers say "It's a one liner". 19:34:04 there we go 19:34:10 The background color is a very pretty shade of gray. 19:34:24 And the text is a pleasantly darker shade. 19:35:34 Strangely enough, the smart solver on the haskell page solves the 'real hardest problem' in the update slower than their original 'hardest problem'. 19:36:04 In fact, it solves their original one in 0.15 seconds on my machine, where theirs took over a second (on a faster machine, I think). 19:36:22 --- quit: beelsebob_ (Client Quit) 19:36:41 And, on the other hand, the one in the update takes a little over 2 seconds on my machine, while theirs takes between one and two seconds. 19:37:46 dolio: did you see the sudoku solver written with regular expressions ? 19:38:03 Heh. I saw the story, but I didn't look at it. 19:42:54 * sorear considers writing a sudoku solver in p4 asm as an exercise in optimization 19:43:08 --- quit: johnnowak () 19:43:50 Worst paper title ever: "Objects" 19:43:52 --- part: zeeeee left #haskell 19:44:12 Tells you just what the paper is about, doesn't it? 19:44:50 wadler papers tell you just what they're about 19:44:52 funnily 19:45:25 Yeah. He has a knack. 19:46:13 sorear: what is ayhi, btw ? 19:46:44 Ask you haskell interpreter? 19:46:55 One of my indefinitely on hold projects. 19:47:19 I'm rewriting yhi in asm to control every aspect of the calling convention. 19:47:19 but, after eternity, what will it do ? 19:47:24 heh 19:47:46 This lets me play with stuff that's hard to do in languages like C that do things behind your back. 19:47:50 Dumping, for instance. 19:47:59 JIT is also on the TODO. 19:48:14 In practice most of ayhi will be written in haskell... 19:48:28 but as long as I control the interpreter that's fine 19:48:55 --- quit: monochrom ("Ex-Chat") 19:49:11 I also do a MUCH better job than gcc at optimizing for size. 19:49:24 I have most of the intepreter already written ... in 4k 19:49:34 yhi compiled with gcc -Os is 100k 19:49:36 --- join: AtnNn (n=welcome@dsl-150-37.aei.ca) joined #haskell 19:49:46 :p 19:50:22 ayhi, a yhc-bytecode interpreter in under 4096 bytes :p 19:50:56 ?seen procyon112 19:50:57 I saw procyon112 leaving #haskell 1h 4m 31s ago, and . 19:51:04 heh. actually there's a good chance I'll be using Core, too much info is erased at the bytecode level 19:51:42 fex. it is impossible to statically reconstruct the stack depth at an arbitrary point in a bytecode function 19:51:58 thus making it impossible for the JIT to do register allocation 19:52:06 or even -fomit-frame-pointer 19:52:14 * sorear wants EBP as a temporary 19:52:33 heh 19:53:09 yhc.core of course :) 19:53:16 right 19:53:42 --- join: araujo (n=araujo@gentoo/developer/araujo) joined #haskell 19:54:06 --- join: Pupeno5 (n=Pupeno@cl-77.ewr-01.us.sixxs.net) joined #haskell 19:54:11 hello! 19:54:14 * sorear begs araujo for a lambda 19:54:31 * araujo throws a sugar-lambda at sorear 19:54:40 :) 19:54:53 :-) 19:54:57 sorear, how you doing?! 19:55:00 good. 19:55:04 --- nick: jyasskin -> jyasskin_weekend 19:55:15 spring breaking! 19:56:40 --- join: AtnNn_ (n=welcome@dsl-145-34.aei.ca) joined #haskell 19:56:55 yay! 19:57:03 * araujo has one week of vacation 19:57:33 * sorear does too, starting tomorrow 19:57:35 --- quit: Pupeno3 (Read error: 110 (Connection timed out)) 20:05:01 i woner if i can have a working chess engine by the end of the day tomorrow 20:05:09 s/one/onde/ 20:05:28 I just had one of those moments where you realize that "who is me" is proper grammar 20:06:35 whaleofconfusion: still curious what a branch point is? 20:07:43 well if you know a good definition I would like to hear it 20:07:52 http://tunes.org/~nef/logs/haskell/07.03.29 , 19:17:55 -- good? 20:07:59 a guy in #math knew some, but it wasn't too practical for immediate calculation 20:08:16 although it seemed to make sense 20:08:28 I think mine makes calculatory sense. 20:10:34 --- quit: Zeroth404 (Remote closed the connection) 20:11:02 --- join: bos (n=bos@hierophant.serpentine.com) joined #haskell 20:11:20 whaleofconfusion: whadya think? 20:12:54 --- quit: AtnNn (Read error: 110 (Connection timed out)) 20:15:35 --- join: stefanha (n=stefan@pcd550149.netvigator.com) joined #haskell 20:15:44 * ddarius pulls out his notebook that contains instructions on how to crochet to look for something in the section on complex analysis. 20:16:44 * sorear imagines said section is quite short 20:17:33 Depending on how it's measured, it's probably about as long as the section on generating functions, which may actually be the section I want. 20:18:42 --- quit: sad0ur (Read error: 110 (Connection timed out)) 20:19:52 "f(z) has an algebraic singularity, or branch point, at z_0 if f(z) = (z-z_0)^a * g(z) where g is analytic at z_0 and a is not an integer." 20:24:14 @seen bos 20:24:14 You are in #haskell-soc and #haskell. I last heard you speak just now. 20:24:17 @seen dons 20:24:18 dons is in #haskell-soc, #haskell-overflow and #haskell. I last heard dons speak 1h 39m 1s ago. 20:24:32 Hi! 20:24:57 aloha. 20:30:27 --- join: triple_ (n=triple@203-173-50-140.dyn.iinet.net.au) joined #haskell 20:30:30 --- join: jfoutz (n=jfoutz@c-68-84-150-246.hsd1.nm.comcast.net) joined #haskell 20:30:42 --- join: thoughtpolice (n=austin@c75-111-145-138.plaicmtc01.tx.dh.suddenlink.net) joined #haskell 20:30:47 > 5.0 / (length [1,2,3]) 20:30:48 add an instance declaration for (Fractional Int) 20:30:48 In the expression: 5.0... 20:31:14 how do i promote length [1,2,3] to a fractional? 20:31:34 genericLength 20:31:40 ooo! I know this... 20:31:45 bah. Too slow 20:31:46 > 5.0 / genericLength [1,2,3] 20:31:48 1.6666666666666667 20:31:51 --- quit: LordBrain ("Leaving") 20:31:56 you're awesome. thanks. 20:32:11 hey, just wondering, what editors do you guys use for haskell? i've been using emacs' haskell-mode, but I was just wondering what some other people here's preferences are 20:32:13 :t length 20:32:15 forall a. [a] -> Int 20:32:17 :t genericLength 20:32:20 forall b i. (Num i) => [b] -> i 20:32:34 <- emacs + haskell-mode 20:32:38 thoughtpolice: Emacs here 20:32:43 me three 20:32:53 <- used to use shim, but decided it didn't do anything useful 20:33:11 --- join: seancorfield (n=seancorf@c-67-180-229-145.hsd1.ca.comcast.net) joined #haskell 20:33:13 I've been using vim. But emacs + haskell mode is probably nicer for haskell 20:33:33 Well, that's a bit redundant. 20:33:57 --- quit: Ademan_brb (Read error: 110 (Connection timed out)) 20:34:06 Actually, *clarifies* 20:34:16 <- emacs + emu's fork of haskell-mode 20:34:29 --- join: nostrademons (n=Jonathan@pool-71-248-164-21.bstnma.fios.verizon.net) joined #haskell 20:34:37 I think. :( 20:34:53 I wish the changes would be fully merged 20:34:59 Your choices are: 20:35:00 well at least now i feel like i made a venerable choice, or, something 20:35:15 (a) Upstream haskell-mode, with extra dumb intendation 20:35:43 (b) Forked haskell-mode, with good indentation but two versions behind in every other way 20:36:01 @seen emu 20:36:02 emu is in #haskell-blah and #haskell. I last heard emu speak 9h 54m 33s ago. 20:36:25 Choose wisely. 20:36:28 --- join: int80_h (n=wonko@64-79-127-126.static.wiline.com) joined #haskell 20:37:11 --- join: Ademan_brb (n=dan@h-67-101-145-200.snfccasy.dynamic.covad.net) joined #haskell 20:37:42 hm well i'm comfortable with haskell-mode. i need to get it on my other linux box since i like to just write little things on it from time to time, and no major mode sucks 20:39:22 you might consider keeping your emacs config in darcs or subversion or cvs. version control has turned out to be pretty handy for those kinds of things. 20:40:10 --- quit: mnislaih () 20:41:44 The Haskell community primarily uses emacs or vim and then a spread of other editors. 20:42:36 Yi! 20:42:49 @where yi 20:42:49 http://www.cse.unsw.edu.au/~dons/yi.html 20:43:19 i was thinking of looking at yi 20:43:21 looks cool 20:43:46 apparently the development is going well, patches keep flowing in 20:44:17 --- join: karmakillernz (i=karmakil@121-73-16-206.cable.telstraclear.net) joined #haskell 20:44:29 Yeah, it's going way faster now that jyp has taken over from dons :) 20:44:44 yep 20:44:53 dons is very pleased with the hand over :-) 20:45:02 much more work is getting done 20:45:18 I intend to try it again soon 20:45:29 it wouldn't take much to get me to switch from nedit or vim 20:45:55 and the fact that it has both curses and gui modes is rather nice 20:46:04 * ddarius wouldn't mind using Yi if he could get it vimy enough for his purposes. 20:46:06 vim has both too :) 20:46:27 ddarius: you think it's an emacs clone? 20:46:28 sorear: yeah vim is magnificent but it's also vim 20:46:38 sorear: No I don't. 20:46:46 ddarius: it's Yet Another Skinnable (yukk!) Editor 20:46:49 ok. 20:46:54 nm then 20:46:55 --- join: johnnowak (n=johnnowa@207-38-246-119.c3-0.wsd-ubr2.qens-wsd.ny.cable.rcn.com) joined #haskell 20:47:10 --- join: rashakil (n=rashakil@shocking-pink-54.dynamic2.rpi.edu) joined #haskell 20:47:36 --- join: mauke_ (n=mauke@d83-189-42-24.cust.tele2.de) joined #haskell 20:47:46 Now we just need xmonad integration :) 20:48:15 --- quit: theCore ("Leaving") 20:49:27 ls 20:49:32 damnit what the hell :( 20:49:39 hehe. 20:49:41 thoughtpolice: Fille Not found 20:50:11 ugh i'm just getting frusterated. this system update is totally taking forever. 20:50:16 From http://tunes.org/~nef/logs/haskell/07.03.26 20:50:16 17:18:55 su root 20:50:16 17:19:00 --- quit: MarcWeber ("leaving") 20:50:16 17:19:03 wow, wrong window ;_; 20:50:58 thinkpol: feel better now? 20:51:47 sorta i guess 20:52:40 --- quit: HairyDude ("Ex-Chat") 20:52:47 i need something fun to hack on. 20:53:00 it's the weekend and it's going to be a rainy one :( 20:53:00 * stepcut is waiting for Yi to have a good haskell editing mode 20:53:05 What are you good at? 20:53:12 stepcut: it has synhl. 20:53:47 sorear: does that just syntax highlight? or does it assist with indentation ? 20:53:58 just synhl 20:54:18 sorear: i dunno, i want to try and figure out monad transformers, but i can't find any great tutorials. the latetst thing i've been working on is pretty much in a beta right now and i don't feel like workin' on it. 20:54:22 I'm too spoiled by emacs' haskell-mode, as broken as it is 20:54:49 stepcut: try emu's fork, the indentation is completely non-broken 20:55:10 fork of haskell-mode ? 20:55:13 yeah 20:55:24 @whereis haskell-mode 20:55:24 Maybe you meant: where where+ 20:55:30 @where haskell-mode 20:55:30 http://haskell.org/haskellwiki/Haskell_mode_for_Emacs 20:55:56 http://mapcar.org/~mrd/emacs/haskell-mode/haskell-mode-2.0.tar.gz 20:56:19 or just darcs get the whole ...emacs/ 20:57:25 --- quit: mauke (Read error: 110 (Connection timed out)) 20:57:34 --- nick: mauke_ -> mauke 20:58:02 sorear: spiffy, I'll take a look at that later 21:01:45 --- quit: stefanha ("leaving") 21:02:10 --- quit: dfeuer (Read error: 110 (Connection timed out)) 21:02:33 --- quit: bd_ ("power failure") 21:04:31 This is going to be a crappy weekend. 21:04:34 --- quit: thorat ("leaving") 21:04:55 No, it'll be great. 21:05:15 --- join: mwc (n=matt@CPE001310b2e737-CM0011ae929276.cpe.net.cable.rogers.com) joined #haskell 21:06:22 Yay, mrd-haskell-mode indentation brokenness. In a layed-out source file, how many valid indentations of an instance stmt are there? 21:08:11 --- join: therp (n=nil@chello080108077214.34.11.tuwien.teleweb.at) joined #haskell 21:10:03 --- join: bd_ (n=foo@donlanbj3.umeres.maine.edu) joined #haskell 21:11:22 --- quit: jethrotc1 (Read error: 110 (Connection timed out)) 21:11:23 has anybody else every noticed that 21:11:29 I have the curse of tending to be right. 21:11:32 s/every/ever .... 21:12:13 --- quit: chessguy ("Leaving") 21:12:32 --- join: chessguy (n=chessguy@c-69-242-13-143.hsd1.pa.comcast.net) joined #haskell 21:13:02 newtype Bar = Bar (Ptr Bar) ; data Foo = Foo { x :: {-# UNPACK #-} !Bar } causes GHC 6.6 to have the impossible happen? 21:13:24 rashakil: you know how to check trac? 21:13:40 I have; didn't see anything, but don't know about my searching abilities 21:13:47 rashakil: that is by definition a bug 21:14:03 rashakil: remember that bugs can always be closed as duplicate-of-XYZ 21:14:15 rashakil: so err on the side of too-often 21:14:36 --- quit: chessguy (Client Quit) 21:14:42 okay okay... was wondering since XState in xmonad seems to avoid it with the display field 21:14:44 --- join: chessguy (n=chessguy@c-69-242-13-143.hsd1.pa.comcast.net) joined #haskell 21:15:05 probably because the newtype isn't recursive? 21:15:21 recursive newtypes have a long history of triggering bugs in ghc 21:17:19 --- join: dfeuer (n=topolog@wikimedia/Dfeuer) joined #haskell 21:17:30 FWIW head doesn't bomb even with -dcore-lint 21:17:42 head has a very different approach for handling newtypes 21:18:03 but 6.6 needs to be supported for a while, so for the benefit of everyone who will use 6.6.2 21:18:32 * mwc didn't even know 6.6.2 was out 21:18:43 sorear, do you run head snapshots, or pull daily from darcs? 21:18:50 mwc: pull weekly 21:18:56 mwc: actually I pull hourly 21:19:00 Hah 21:19:01 mwc: recompile weekly 21:19:16 mwc: 6.6.2 isn't out, but 6.6.1 is 21:19:32 I started doing that until I ran into build borkedness, now I just grab the head snapshot that's released every week or so 21:19:37 mwc: ergo if rashakil's bug is fixed, only people who use 6.6.2 or later will have the fix 21:19:53 or more clearly, every week I get the latest head snapshot 21:22:06 rashakil: I'm not finding it in the trac. 21:22:15 rashakil: go ahead and report it 21:22:39 --- quit: mwc ("Leaving") 21:30:07 "Of course there are difficulties, and perhaps there are successes. But commitment to our art and craft, to our profession, to our own integrity, and to other people, are far more important; life occurs as it is lived, and to live it fully is to appreciate joys and pains as they are, rather than in the light of ambitions that can only intensify pain and confusion." 21:31:35 --- part: HexCat left #haskell 21:34:04 alright, it's reported, thanks for holding my hand :-) 21:37:54 hehe. 21:38:01 hey, in xmonad, would anybody like the ability to shrink/grow right-hand tiled windows vertically, with the ability to toggle size-as-fixed-number-of-pixels and size-as-ratio-of-available-space on a window-by-window basis? 21:38:03 yay! 21:38:08 binary TH working! 21:38:17 now, binarydefer 21:38:48 --- quit: bogdano ("sono") 21:39:05 or is there a better design? 21:39:19 rashakil: i'd like to be able to grow them vertically, yes. 21:39:19 dons: You have 2 new messages. '/msg lambdabot @messages' to read them. 21:39:39 in fact, i'd like an entire vertical tiling mode somehow. since my screen isn't wide enough for the horizontal mode relaly. 21:40:35 okay. 21:41:26 --- quit: dfeuer (Read error: 113 (No route to host)) 21:41:36 dons: did I remember to tell you about the lambdabot/XP mail I can't handle? 21:43:30 --- quit: arjanb ("bbl") 21:49:09 --- quit: clanehin (Remote closed the connection) 21:50:36 --- join: sciolizer (n=jball@adsl-76-203-9-173.dsl.emhril.sbcglobal.net) joined #haskell 21:52:18 --- quit: int80_h ("leaving") 21:58:15 --- quit: chessguy ("Leaving") 22:00:38 --- quit: AtnNn_ ("foobar") 22:00:58 --- join: wy (n=wy@r253211120.resnet.cornell.edu) joined #haskell 22:01:35 Is there a standard way to deal with lookup tables? 22:01:44 Map 22:01:50 don't use lookup 22:02:00 Prelude.lookup that is 22:02:07 use Data.Map.* instead 22:02:10 @docs Data.Map 22:02:11 http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Map.html 22:03:46 sorear: so many functions. Which are the main two? 22:04:12 wy: fromList, lookup, (!!) 22:04:16 fromList and lookup 22:04:26 / insert and empty 22:04:41 / update and delete 22:04:52 As you need other things, you'll look them up to see if they're there. 22:04:56 (They are. ;-) 22:05:08 What does "import qualified Data.Map as Map" mean? 22:05:13 findMin, split, etc are very rarely used, but are invaluable when you need them 22:05:22 wy: uh, that's an import statement 22:05:32 wy: in practice most people just use 22:05:41 "import qualified Data.Map as M" 22:05:57 wy: you know about the haskell module system? 22:06:11 I often use "import Data.Map hiding (map)". 22:06:33 bad! 22:06:42 Why? 22:06:50 it shadows waay too much other stuff 22:07:08 No, the compiler complains. 22:07:12 sorear: I know about it somewhat 22:07:19 or just use ross' collections :) 22:07:27 do I just start by inserting into empty? 22:07:35 wy: yes 22:07:51 wy: or use fromList if you have a list of inital data 22:09:17 It says "empty" is not in scope. I did have imported the module 22:09:43 names aren't always imported under the original names 22:09:55 since you used the qualified ... as ... form of import 22:10:08 you want M.insert, M.empty, M.Map, M.fromList, etc 22:10:25 --- join: jethrotcs (n=jethro@12-226-16-86.client.mchsi.com) joined #haskell 22:10:45 http://haskell.org/onlinereport/modules.html#sect5.3.2 for all the gory details 22:10:47 Title: The Haskell 98 Report: Modules 22:12:10 Oh, do people actually read the Report? 22:12:20 yes! 22:12:35 I don't count however, since I'm an implementor. 22:12:41 Not a person. 22:13:10 ah 22:13:20 sorear: It seems I need something else. It requires the first thing to be able to get ordered. 22:13:24 Actually, that section of the report is relatively readable. 22:13:53 But the first thing I want to put into the map is some arithmetic operators 22:13:54 wy: no, you want to impose a total order on the first argument 22:14:03 wy: Yes, maps have the (Ord a) => Map k a restriction. 22:14:23 Err... 22:14:24 wy: fixing Ord is much easier than the alternatives 22:14:29 (Ord k) => Map k a 22:14:33 wy: remember strings are ordered 22:14:37 > "+" > "-" 22:14:38 False 22:14:57 I defined some datatype like data Expr = EVar String | ... 22:15:04 ... deriving(Ord) 22:15:25 Why are you using expressions as keys? 22:15:37 and what dmwit said :) 22:15:39 (Out of curiosity.) 22:16:43 --- quit: dolio (Remote closed the connection) 22:16:53 --- join: dolio (n=dolio@nr10-216-68-185-39.fuse.net) joined #haskell 22:18:44 I have a type variable in my definition. So first I have Expr a = EVar a |.... Then I used type CoreExpr = Expr String. How can I derive Ord in this situation? 22:18:48 --- quit: johnnowak () 22:19:14 Just try it, it will work. 22:19:32 Internally haskell makes an instance of the form Ord a => Ord (Expr a) 22:19:44 since Ord [Char], we derive Ord (Expr [Char]) 22:19:55 and of course synonyms don't matter here 22:20:25 but I'm still curious why you use exprs as keys ... sounds like some very fun algorithm 22:20:34 It says Could not deduce (Eq (Expr a)) from the context (Ord a) 22:20:51 --- join: gour (n=Gour@34-64.dsl.iskon.hr) joined #haskell 22:20:55 ok, deriving(Eq,Ord) 22:20:59 sorear: It's just a precedence table... 22:21:10 wy: "precedence table"? 22:22:05 sorear: yes. EVar "+" has precedence 3, EVar "*" has precedence 5, etc. 22:22:39 wy: what's the precedence of a non-variable? 22:23:00 * sorear suspects "meaningless" 22:23:09 sorear: applications has precedence 6. 22:23:41 ah, so this is sorta like showsPrec 22:23:52 it gives the precedence level of the top constructor 22:23:57 sorear: Ah!! Maybe I should strip EVar and only put the Strings into the table 22:24:07 so 3 * 5 has precedence 5 22:24:07 ? 22:24:24 wy: that would probably work 22:25:08 wy: also note that maps can only be finite, so if you need precedences for an infinite number of expr's a map is definitely wrong 22:25:10 sorear: yeah! This works. 22:26:26 sorear: This is just a chance that I only need to make the strings work. But if somehow I need to give every Expr an attribute, how can I put them into a map? Can I use hashtables? 22:27:24 *every* expr? As in an infinite number of assocs? 22:27:55 Is Data.Map backed by a hash? 22:28:05 btw, you generally don't want HashTables 22:28:06 dino-: no 22:28:10 --- quit: thoughtpolice ("peace out") 22:28:27 --- quit: Plareplane ("Leaving") 22:28:27 I see, so not the quickest retrieval. 22:28:36 no method of implementing hashtables is known to be simulataneously fast and pure 22:28:56 you can make a fast pure hashtable for lookups, but it would be O(n) update 22:29:24 dino-: Data.Map uses self balancing binary search trees 22:29:27 sorear: Some Expr contains strings, some contains numbers, some contains other objects. How can I put them in? 22:29:35 (not to be confused with btrees!) 22:29:39 they can't be said to have a total order 22:29:58 wy: are you sure your map will only need a finite number of them? 22:30:02 I see. 22:30:18 wy: you can't invent some contrived order? 22:30:46 wy: it doesn't matter what the order is, as long as there is one Data.Map will work fine 22:30:54 rashakil: but that will take me some extra code 22:31:04 it's not 'extra' if you need to do it :) 22:31:09 wy: nah, just add deriving(Ord,Eq) 22:31:21 wy: then the compiler will invent an order for you 22:31:29 sorear: I tried this just now and it didn't work 22:31:38 --- quit: seancorfield (Read error: 104 (Connection reset by peer)) 22:31:40 --- join: scorfield (n=seancorf@c-67-180-229-145.hsd1.ca.comcast.net) joined #haskell 22:31:41 wy: note that this won't work if your structure contains functions 22:32:10 wy: if you reference another user-defined structure, you will need to add derivings to the others probably 22:32:17 * sorear washes sorear's mouth 22:32:36 --- join: _dolio (n=dolio@nr10-216-68-185-39.fuse.net) joined #haskell 22:33:51 sorear: It's not very economical to modify all the related code just for some order 22:34:46 well, haskell needs some way to tell your values apart 22:35:41 if you can have Eq for your keys, you can probably contrive some kind of Ord. 22:36:19 --- quit: jacobian (Read error: 110 (Connection timed out)) 22:36:27 Maybe that's better way theorectically 22:37:16 Hmm... could one do a DiffHashTable the same way as a DiffArray 22:37:46 sorear: in GHC.List there is a lookup. What's the difference between this one? 22:38:30 wy: GHC.List.lookup == Prelude.lookup 22:38:33 --- quit: sioraiocht () 22:38:44 wy: but ghc doesn't correctly implement recursive modules 22:38:44 --- join: sioraiocht (n=rtharper@cpe-74-71-116-245.twcny.res.rr.com) joined #haskell 22:38:58 wy: so they had to fudge the definition locations 22:39:03 --- quit: dolio (Read error: 110 (Connection timed out)) 22:39:09 wy: and it still requires a class (Eq here) 22:39:19 wy: and it's VASTLY slower 22:39:41 Is the one in Map using balanced trees? 22:39:44 yeah 22:40:06 --- join: dolio_ (n=dolio@nr10-216-68-185-39.fuse.net) joined #haskell 22:40:13 GHC.List.lookup == Prelude.lookup == Data.List.lookup uses linear search 22:40:15 --- quit: dolio_ (Read error: 104 (Connection reset by peer)) 22:40:19 O(n) v. O(log n) 22:40:31 assoc 22:40:54 :t assoc -- huh? 22:40:57 Not in scope: `assoc' 22:41:00 ?hoogle assoc 22:41:01 Control.Parallel.Strategies.Assoc :: data Assoc a b 22:41:02 Text.ParserCombinators.Parsec.Expr.Assoc :: data Assoc 22:41:02 Array.assocs :: Ix a => Array a b -> [(a, b)] 22:41:07 ?hoogle+ 22:41:07 Data.Array.assocs :: Ix i => Array i e -> [(i, e)] 22:41:08 Data.IntMap.assocs :: IntMap a -> [(Key, a)] 22:41:08 Data.Map.assocs :: Map k a -> [(k, a)] 22:41:09 ?hoogle+ 22:41:10 Data.Array.IArray.assocs :: (IArray a e, Ix i) => a i e -> [(i, e)] 22:41:10 Text.ParserCombinators.Parsec.Expr.AssocLeft :: Assoc 22:41:10 Text.ParserCombinators.Parsec.Expr.AssocNone :: Assoc 22:42:19 @seen waern 22:42:20 I saw waern leaving #haskell 1d 3h 58m 31s ago, and . 22:43:35 assoc is lookup in CL if I remember correctly 22:44:16 *sigh* somehow I'd the impression CL used uppercase, glad I was wrong :) 22:44:28 --- join: dolio_ (n=dolio@nr10-216-68-185-39.fuse.net) joined #haskell 22:44:45 CL is case insensitive (or rather it doesn't specify that, again if I remember correctly) 22:44:53 * sorear IS NOT A BIG FAN OF UPPERCASE ONLY PROGRAMMING LANGUAGES 22:45:42 Like Intercal? 22:45:43 ANS FORTH ANYONE P 22:46:04 It seems Haskell lacks some support. I still feel I can't do all the things with it. For example to create something like Photoshop. 22:46:05 Or INTERCAL, I guess. 22:46:06 IIRC even intercal is case-insensitive. 22:46:27 gwbasic 22:46:29 No, I think that's mostly a capital issue. 22:46:31 wy: You feel you could create Photoshop in another language? 22:46:50 If you could clone photoshop all by yourself I would have heard of you already. 22:47:00 --- nick: dolio_ -> dolio 22:47:01 Now, I invoke the law of the contrapositive. 22:47:25 heh 22:47:40 dmwit: Which language did they use to create photoshop? 22:47:54 sorear: You're missing the warrant; you need to say, "I haven't heard of you." 22:48:09 It's probably C. 22:48:10 wy: Is that relevant? 22:48:10 @all-dicts warrant 22:48:13 *** "Warrant" gcide "The Collaborative International Dictionary of English v.0.48" 22:48:13 Warrant \War"rant\, v. t. [imp. & p. p. {Warranted}; p. pr. & 22:48:13 vb. n. {Warranting}.] [OE. waranten, OF. warantir, garantir, 22:48:13 guarantir, garentir, garandir, F. garantir to warrant, fr. 22:48:13 OF. warant, garant, guarant, a warrant, a protector, a 22:48:15 [300 @more lines] 22:48:24 ... @more? :) 22:48:50 Or C++, maybe. 22:48:56 sorear: It's the "hidden assumption" of any given argument. 22:48:58 --- quit: sm (Read error: 110 (Connection timed out)) 22:49:04 As soon as you say it, it is no longer a warrant. =) 22:50:02 Nah, I think I'll leave it unstated and invoke modus inferens instead :) 22:50:02 --- part: dmwit left #haskell 22:50:03 dolio: It seems that just because of support. C and C++ have more large corporations' support and they put money to hire people. So although they suck, a lot of people can only use them just because of the libraries. 22:50:18 --- join: dmwit (n=dmwit@buckwheat.Stanford.EDU) joined #haskell 22:50:50 dmwit: Did you get my "Nah ..."? 22:50:57 sorear: Nope. 22:50:59 Nah, I think I'll leave it unstated and invoke modus inferens instead :) 22:51:04 =) 22:51:36 I got your Nah 22:51:47 wy: you didn't leave, dmwit did 22:51:54 *** dmwit (n=dmwit@buckwheat.Stanford.EDU) has left channel #haskell: "Leaving" 22:52:08 --- quit: _dolio (Read error: 110 (Connection timed out)) 22:52:16 Sometimes my Ctrl-W goes here instead of Firefox by mistake. =P 22:52:46 My web browser closes tabs with cy 22:52:55 My irc client uses C-x k RET 22:52:55 What's buckwheat? dmwit 22:53:06 stanford! :) 22:53:15 there's something to be said for incompatible interfaces :) 22:53:23 yah 22:53:26 inconsistent, even 22:53:29 wy: just the name of my computer. 22:53:48 Gonna hack me now? 22:53:54 --- quit: zarvok ("BitchX-1.1-final -- just do it.") 22:53:59 * sorear <3 hacking 22:53:59 good we got another college student. You are lucky to have a real name. 22:54:18 dmwit: hack may be a transitive noun, but it doesn't apply to people 22:54:30 dmwit: here, it only applies to projects 22:54:41 dmwit: or it can be used intransitively 22:54:44 sorear: yeah I've put the code into precedence tables. It's much nicer now. 22:54:44 You're right, I should have said: 22:54:53 dmwit: in which case it is an unspecified project. 22:55:00 --- quit: korcs ("access ibolyation") 22:55:06 "j00 g01|\|g to h4xx0rz m3 n0\/\/?" 22:55:22 dmwit: teh bot can help you 22:55:31 ?elite You going to hack me now? 22:55:32 @elite you going to hack me now? 22:55:32 YOu GOiNg +O H4(K /\/\e NOW? 22:55:33 YOu goInG TO HAxx Me n0w? 22:55:38 yay! 22:55:56 It's more fun doing it by hand. 22:56:05 @elite you going to hack me now? 22:56:05 YOu 9oInG T0 |-|Ack M3 NO\/\/? 22:56:19 haha! This is fun 22:56:33 ?. elite quote 22:56:33 L0ganCapalDo 5Ay5: I am Not |-|a\/In9 4nY LuCk ConVEr7IN9 c|-|Ri$ KUx1e\/\/ICZ :( <10GaNC4p4ldo> dO3z |-|3 iMpLem3N+ 7yp34B1E? 22:56:53 Does anyone actually still talk this way? did any group ever really? 22:57:09 ddarius: I don't know, and yes. 22:57:39 ?. elite elite this might be dun 22:57:39 ThiZ /\/\IG|-|+ 83 DUN 22:57:43 ? 22:58:06 or then again, not 22:58:12 sieni: As all the conversions tend to punctuation and numbers, less transformations tend to happen. 22:58:32 #haskell 22:58:32 :P 22:58:35 ?fix elite A sentence 22:58:36 Maybe you meant: faq ft id 22:59:28 ?. elite elite face melting guitar solo! 22:59:28 ph4C3 /\/\317IN9 9ui+4r $O|0! 22:59:32 heheh 22:59:57 ?. elite . elite . elite elite face melting guitar solo! 22:59:58 F4c3 /\/\3L+in9 9uI74R 5010! 23:00:18 I think the government should use this as an encryption technique. 23:00:37 What, one way hashes? 23:01:10 They could hire "leet-speakers" on the other end to decrypt... 23:01:15 --- quit: sioraiocht () 23:01:17 Is there a program to decode this? 23:01:36 @remember dmwit [on leetspeek] I think the government should use this as an encryption technique. 23:01:37 Done. 23:01:58 or is there a function in the bot to reverse this thing? 23:02:30 wy: It's impossible without the encryption key. 23:03:16 haha 23:04:02 It seems every symbol has only one corresponding letter 23:04:21 * ddarius can take limits of forgetful functors in his head. 23:04:57 * sorear can take FIXPOINTS of forgetful functors in his head! 23:05:08 wy: V -> \/, W -> \/\/ -> VV 23:05:29 @. elite elite VW 23:05:30 V\/\/ 23:05:32 @. elite elite VW 23:05:32 \/w 23:05:40 @. elite . elite elite VW 23:05:41 V\/\/ 23:05:46 @. elite . elite . elite elite VW 23:05:47 Vw 23:05:49 @. elite . elite . elite elite VW 23:05:50 \/\/\/ 23:06:48 ... why does TH have to come with a worthless ppr? 23:08:27 sorear: is import Data.Map (Map) and import qualified Data.Map as Map both necessary? 23:08:32 --- join: sioraiocht (n=rtharper@cpe-74-71-116-245.twcny.res.rr.com) joined #haskell 23:08:57 wy: no, the docs are quite different from actual usage 23:09:14 wy: normally people just do "import qualified Data.Map as M" 23:09:34 what if I use both? 23:09:46 Then you can access the Map type as either Map or Map.Map 23:11:26 sorear: I see. The first line imported the datatype Map. But the rest of Data.Map is qualified under Map. right? 23:11:41 right! 23:13:20 > (Prelude.+ 1) Prelude.. (Prelude.* 2) Prelude.$ 4 23:13:22 9 23:13:31 Yay qualified operators. 23:13:37 Just don't try Prelude.( :) 23:14:04 * sorear likes haskell's qop syntax, oddly enough 23:14:15 @type (Prelude.:) 23:14:18 Not in scope: data constructor `Prelude.:' 23:14:22 :-( 23:14:58 > 3 Prelude.: [] 23:14:59 Not in scope: data constructor `Prelude.:' 23:15:08 oh, builtin 23:15:31 --- join: iblechbot (n=iblechbo@ppp-62-216-204-49.dynamic.mnet-online.de) joined #haskell 23:16:02 dcoutts: that's not a qconop, that's a reservedop that happens to behave like an ADT constr in every way 23:16:19 sorear: yeah I know, it's upsetting 23:24:04 --- quit: reilly () 23:24:34 --- quit: dolio (Read error: 104 (Connection reset by peer)) 23:24:44 "For instance, the Grub boot menu in NixOS allows the user to boot into any previous system configuration that hasn’t been garbage collected yet." 23:24:46 What. 23:25:20 NixOs is a unix/linux OS that uses Nix for package management 23:25:21 yay, sounds fun. 23:25:35 But what if I want to use a RC operation other than unpull? 23:25:37 ...garbage collected boot options? 23:25:53 dmwit: sounds more like weak pointers 23:25:55 Nix can keep multiple copies of packages around and manage multiple configurations/environments 23:26:11 it GC's packages when you ask it to 23:26:27 which means it looks at all the active configurations and finds packages that are used by none of them 23:26:43 Actually, that sounds pretty nice. 23:26:52 Is nix related to nnix? :p 23:27:03 --- join: kowey (n=kowey@4aa54-4-82-234-151-151.fbx.proxad.net) joined #haskell 23:27:50 --- join: dolio (n=dolio@nr10-216-68-185-39.fuse.net) joined #haskell 23:27:55 @users 23:27:56 Maximum users seen in #haskell: 337, currently: 290 (86.1%), active: 23 (7.9%) 23:28:14 Friday night, low activity. 23:30:15 it's saturday here :p 23:30:27 "Consider a comfortable leather armchair C." 23:30:38 Best night of the week for hacking? 23:31:08 How usable is NixOS as a desktop, so far? 23:31:36 I downloaded an ISO earlier today but am hesitant to try it. 23:31:56 put it in vmware then! 23:32:18 shachaf: or use a chroot 23:32:37 siti, dcoutts: I could do that. 23:33:12 * shachaf realizes he has an unused 10GB partition set aside for such purposes. 23:35:09 --- quit: dmead (Remote closed the connection) 23:36:57 * sorear cleans up and cabalizes daan-pp 23:38:14 --- join: benny_ (n=benny@p57b54b62.dip.t-dialin.net) joined #haskell 23:39:00 --- join: loud- (n=none@c-69-252-159-95.hsd1.ga.comcast.net) joined #haskell 23:42:41 --- join: kfish (n=conrad@61.194.21.25) joined #haskell 23:45:11 Show of hands: 23:45:31 Who would be interested in a prettyprinting lib supporting proportional fonts? 23:46:32 how would that even work? 23:47:12 It knows character widths by asking the output function? 23:48:05 Yay, I'm back at #2 23:48:08 by 42 lines 23:48:31 sorear: you can't take a span of text and measure its length by summing the lengths of the component chars 23:48:46 you have to ask the output function for each span you want to output 23:49:05 oh, due to kerning? (if that's the right term...) 23:49:09 due to kerning, ligatures and other more funky stuff in other languages 23:49:34 combining characters and probably more exotic things in other languages 23:49:43 Of course, I'll also need to find a way to handle non-horizontal fonts :) 23:50:09 ... long piece of haskell code {- one line Chinese comment -} ... 23:50:17 how should that lay out? 23:50:22 sorear: check the pango docs, this stuff is rather tricky to do in full generality 23:51:11 dcoutts: ok. (this is a HughesPJ tpye thing) 23:51:42 sorear: actually vertical layout should be easy in a HughesPJ setting 23:51:53 they already have combinators for similar things 23:52:23 but you might want the output of the pretty printer to be more of a block model thing 23:52:38 rather than a string with '\n's in it 23:52:52 right, yeah 23:53:01 then you can render the block output directly on some surface using pango 23:53:11 This is looking a Bit Too Hard For Right Now. 23:53:16 :-) 23:53:24 TeX 23:53:26 I'll just fix any obvious anachronisms and release. 23:53:35 archaisms? 23:53:54 sorear: now now don't be rude about TeX ;-) 23:54:06 anyway, I'm cleaning up JohnMeacham's implementations of Daan's pretty printer 23:54:19 it is a *lot* nicer on the inside 23:54:42 fewer comments of "I've been trying to track down such-and-such-crash-bug for years" 23:54:47 (than HughesPJ) 23:55:02 actually satisfies its invariants (a plus over HughesPJ) 23:55:10 --- quit: benny (Read error: 110 (Connection timed out)) 23:55:33 > replicate (-1) ' ' 23:55:35 "" 23:56:21 --- quit: digitaleric (Read error: 113 (No route to host)) 23:56:57 --- join: steven_ashley (n=steven_a@203.109.183.91) joined #haskell 23:57:02 --- quit: nornagon_ (Read error: 110 (Connection timed out)) 23:58:26 Did Haskell learn the way to parse in layout from Python? 23:58:34 heh, no. 23:58:36 wy: I don't think so 23:58:51 does Haskell predate Python? 23:58:51 Haskell is older than python iirc 23:58:55 oh, okay 23:59:05 but it's independent 23:59:07 wy: it's from the way computer scientists and mathematicians write mathematics and code on paper 23:59:44 The first time I saw this kind of formatting is in Python. So I guessed. Maybe I was wrong. 23:59:45 Haskell derives from Landin's offside rule, which was in one of the early lazy fpls (KRC era, not sure which specifically) 23:59:59 --- log: ended haskell/07.03.30