00:00:00 --- log: started haskell/07.07.30 00:00:57 --- join: doserj (n=doserj@dewey.inf.ethz.ch) joined #haskell 00:02:10 --- join: gogonkt (i=gogonkt@220.205.95.11) joined #haskell 00:03:09 meh, so much for sleeping, is there a darcs hosting place around, for my code? 00:03:20 or am I stuck finding some other solution? 00:03:55 yeah, community.haskell.org 00:04:01 cool 00:04:16 let me find the log in page 00:04:28 --- join: johanj (n=johanj@jonagold.cs.uu.nl) joined #haskell 00:04:33 ... 00:04:36 lol, "IT WORKS!" 00:04:50 see the repos on code.haskell.org 00:06:01 Igloo: where's the login /register page to point people to , who need darcs repo hosting? 00:06:14 heh, i dunno- I just don't want to have to hack through setting up a webserver on my desktop box, I'll be moving back to school in a couple weeks, 00:06:41 only 2 more years, I'm getting old. 00:06:49 I should start looking at grad schools, :/ 00:08:38 its funny- I think that haskell has probably made me better at math, than it has at programming. :/ 00:08:56 --- quit: gwillen () 00:09:17 I've started to think about things on this "How is that datatype really some obscure bit of algebra" level, its enlightening 00:09:23 --- quit: kfish (Remote closed the connection) 00:10:17 or "how can I use those functions to prove some type is an instance of foo?" Haskell is awesome like that 00:10:35 --- join: amiddelk (n=arie@melinda.cs.uu.nl) joined #haskell 00:10:47 --- join: MarcWebe1 (n=marc@pD9E0B6FD.dip.t-dialin.net) joined #haskell 00:11:30 jfredett: math and programming are closely related. Especially with Haskell. 00:11:47 ohub: yah, I know, and I knew that before- 00:12:14 attempting to install solaris has so far been fruitless :-( 00:12:18 the install "worked 00:12:26 Doing lambda calculus with pen&paper is cool "programming" :) 00:12:27 whats funny, is even before haskell, I was the one telling everyone "Proofs are Programs!" (I even remember making a comment like that when doing 11th grade geometry 00:12:30 but upon booting, it promptly reboots 00:12:44 I told my father that the two-column proof "felt" like writing lisp 00:12:51 ... how right I was. :) ) 00:13:09 --- join: iblechbot (n=iblechbo@ppp-62-216-216-149.dynamic.mnet-online.de) joined #haskell 00:13:16 yes, and a proof is valid iff the corresponding program type checks 00:13:31 its just before, I still, in some way, thought of programming as being programming, and as math as being math 00:13:42 and that they were related, even isomorphic 00:13:47 but not _quite_ the same 00:14:02 anyone: if I enter "return 42" in ghci, which monad instance is used then? 00:14:07 Haskell has done one of those "holy crap, they really _ARE_ the same thing" things 00:14:10 > return 42 00:14:17 add an instance declaration for (Show (m t)) 00:14:20 jfredett: What kind of notion of "really the same" do you have is isomorphic isn't enough? 00:14:21 dblhelix: well obviously the hitchhiker monad 00:14:29 dblhelix: IO, probably 00:14:29 dblhelix, IO 00:14:34 jfredett: :-) 00:14:38 --- join: kfish (n=conrad@61.194.21.25) joined #haskell 00:14:46 slava32: thnx 00:14:55 Syzygy-: well, every group is isomorphic to a group of permutations 00:15:05 that doesn't mean that every group _IS_ a group of permutations 00:15:11 it just means they have the same structure 00:15:15 the same quality 00:15:17 etc 00:15:25 jfredett: I do not understand your use of is. 00:15:49 Syzygy-: it means that a Matrix group is fundamentally a Matrix group 00:15:59 but it shares the same structure as a permutation group 00:16:06 so apparently there is a game called "road ball" in Ireland? 00:16:14 where you throw a steel ball down the road 00:16:19 in the spirit of golf 00:16:27 --- quit: gogonkt- (Read error: 110 (Connection timed out)) 00:16:41 Syzygy-, because there's no such thing as "an isomorphism" 00:16:50 you can only talk of isomorphisms in a given category 00:16:52 --- quit: gogonkt_ (Read error: 104 (Connection reset by peer)) 00:16:57 like a brick house and a wood house may share the same design, but that doesn't mean they're the same house 00:17:00 my function is wrong. 00:17:04 for example, R^4 and End(R^2) are isomorphic as vector spaces 00:17:05 isomorphisms! geeeeeeeeeeet your isomorphisms heeere! 00:17:17 jfredett: You still aren't making sense to me on a pretty darn deep level. I need you to tell me what you mean by is - preferably without resorting to analogies, since all the analogies you'll come up with will only point out to me yet again that the underlying terminology is still too fuzzy. 00:17:18 up until this may (when I started w/ this stuff) programming was a brick house, math was a wood house 00:17:19 get them while they're hot 'n steamy! 00:17:23 slava32: Good point. 00:17:28 bad example 00:17:33 Syzygy-: Mu. 00:17:33 how about this 00:17:39 jfredett: Thank you. 00:17:45 * Pseudonym huffs and he puffs and he blows your house in 00:17:54 No, really, theres no good way to describe it 00:17:55 R^2 with pointwise multiplication, and C viewed as R^2, are isomorphic as real vector spaces 00:17:58 but are not isomorphic as rings 00:18:07 at least not that I can think of 00:18:21 --- quit: sfultong (Remote closed the connection) 00:18:28 jfredett: You hit on a pretty damn good point though. This is at the core of some of the more interesting mathematical philosophy I almost come close to looking at myself. 00:18:29 --- part: bct left #haskell 00:18:33 slava32: Right. 00:18:38 before, programming and math had a different- smell, almost. 00:18:47 slava32: But that only means that C and R^2 are different objects - as rings. 00:18:49 R and R^2 are isomorphic as sets 00:19:01 And not with the "normal" vectorspace structure 00:19:02 Sure. 00:19:06 but are not isomorphic as vector spaces, or topological spaces 00:19:32 dons: is there any good way to avoid having the tag bytes not duplicated between the get and the put of a Binary instance? 00:19:52 --- join: doublef (n=doublef@85.172.95.82) joined #haskell 00:19:53 Syzygy-, when you say two objects are equivalent up to isomorphism, its like beer goggles 00:19:57 --- quit: reitblatt (Read error: 110 (Connection timed out)) 00:20:03 RyanT5000: ? 00:20:29 dons: did we ever figure out the register site for community.haskell.org? 00:20:35 or should I check back tomorrow? 00:20:41 * glguy has thte link if it is need 00:20:43 ed 00:20:49 dons: so i have a datastructure with a couple of constructors, and i output a different byte for each one, then proceed to (de)serializing their arguments 00:21:01 glguy: i think it is:/ 00:21:03 dons: just like in all the examples 00:21:15 jfredett: yeah, its all set up and ready to go, i just don't have the link 00:21:24 imo, the c.h.o front page should have the register link 00:21:25 slava32: I'm inclined to want to state it the other way around: if you only care about isomorphisms as your best tool for equality (and I claim we can and should), then you have too narrow a concept of equality: more and more isomorphism ends up being WAY too strict, and equivalence is what you want. 00:21:34 Especially since Cat is such a nice category to discuss in. 00:21:36 glguy: link please 00:21:45 RyanT5000: I believe there is a SYB script for generating Binary instances of that form 00:22:14 yeah, just use the script in util/* if you need to derive these guys 00:22:20 hm, alright 00:22:23 does it work with GADTs? 00:22:28 no idea. 00:22:32 probably not 00:22:34 Syzygy-, 'equality' doesn't really exist, though 00:22:41 * wli has now generated giant data declarations from grepped C headers. 00:22:43 you need to derive Data for your type. 00:22:47 slava32: Explain. 00:22:49 there's no category of all 'objects' with all possible structure 00:22:56 dons: i'll look into it 00:22:57 Ah. 00:23:02 --- quit: scook0 (Read error: 104 (Connection reset by peer)) 00:23:15 slava32: Sure. You'll want to limit your field of study for basically any single statement you make. 00:23:31 --- join: scook0 (n=scook0@ppp121-44-211-3.lns1.hba1.internode.on.net) joined #haskell 00:23:32 equality does make sense in one context 00:23:33 --- join: seancorfield (n=seancorf@c-67-160-202-22.hsd1.ca.comcast.net) joined #haskell 00:23:38 suppose you have a group G, with subgroups H and K 00:23:43 ?src liftM 00:23:44 liftM f m1 = do { x1 <- m1; return (f x1) } 00:23:45 there is as huge difference in saying "H and K are equal" 00:23:49 and saying "H and K are isomorphic" 00:24:01 * Syzygy- feels a more and more pressing need to push people towards what David Corfield writes - both on his own blog and on the n-category cafe 00:24:04 slava32: Sure, sure. 00:24:13 data Exp env a where 00:24:14 Lit :: Binary a => a -> Exp env a 00:24:19 --- join: fishkandy (n=conrad@61.194.21.25) joined #haskell 00:24:20 --- quit: kfish (Read error: 104 (Connection reset by peer)) 00:24:21 Syzygy: What's that? 00:24:22 is that constraint not effective? 00:24:26 slava32: However, selecting your category well makes the difference clear. 00:24:29 slava32, there isn't a huge difference as _groups_, but as _subgroups. 00:24:34 --- nick: fishkandy -> kfish 00:24:37 indeed 00:24:39 slava32: In the po-set of subgroups, they are different. Not even isomorphic. 00:24:45 it's telling me (later) that it's unable to deduce Binary a 00:24:49 once you start working with sub-anything, you have element-wise equality in the parent object 00:24:50 wli: The n-category cafe? 00:24:53 which brings more structure 00:25:13 --- part: seancorfield left #haskell 00:25:14 slava32: Actually, when you start working with sub-thingies, you end up working with morphisms, really. 00:25:15 thanks glguy, dons 00:25:19 Syzygy: yeah 00:25:20 So you change categories. 00:25:22 Syzygy-, elements of po-sets have no 'isomorphic to' relation 00:25:25 I'm going to bed now, gnite again 00:25:32 --- join: seancorfield (n=seancorf@c-67-160-202-22.hsd1.ca.comcast.net) joined #haskell 00:25:39 wli: A group blog run by John Baez, David Corfield and Urs Schneider. 00:25:49 slava32: Of course they do. Po-sets are categories. 00:25:54 @go n-category cafe 00:25:56 http://golem.ph.utexas.edu/category/ 00:25:56 Title: The n-Category Café 00:26:00 ah, ok 00:26:03 David Corfield? 00:26:11 i'm not a big fan of non-concrete categories 00:26:18 we're a small family... i wonder if he's related? 00:26:22 slava32, isomorphic just means that there's a bijection which is monotone in both directions, i think 00:26:27 slava32: What's a concrete category, exactly? 00:26:36 --- join: bonfyre (n=bonfyre@ppp121-44-207-6.lns3.mel4.internode.on.net) joined #haskell 00:26:44 objects are sets 00:26:50 psykotic: I'm not talking about iso's of posets. I'm talking about iso's IN posets. 00:26:52 and there's a forgetful functor from your category to the category of sets 00:26:55 which obeys certain laws 00:27:01 slava32: Ah. Then you're ignoring Hask while you're at it. 00:27:11 --- join: roma2 (n=shkoder@ll-226.216.82.212.sovam.net.ua) joined #haskell 00:27:13 (at least I think you do) 00:27:14 i don't like it when people define groupoids, groups, posets and so on as 'categories'. 00:27:17 Syzygy-, isos in the poset cat, gotcha 00:27:27 it just obfuscates the matter without adding any additional insight. 00:27:46 slava32, i think it's actually particularly illuminating as a way to contrast groups and groupoids. 00:27:51 slava32: My entire field of research builds on the recognition that a group can be viewed as a one-object category, and that therefore certain constructions work. 00:27:57 slava32, in the group case you just have one "kind" of object. 00:27:59 --- quit: MarcWeber (Read error: 110 (Connection timed out)) 00:28:18 psykotic, i think the fundamental groupoid -vs- fundamental group in algebraic topology illustrates the difference in a very intuitive way 00:28:43 oh, one more thing, Syzygy-: you'll have to tell me about that really deep concept sometime- I'm probably too tired to full comprehend it now, but you've piqued my interest 00:28:51 slava32: If you want to discuss groupoids without calling them categories, you make yourself reconstruct category theory just to build your terminology. 00:28:55 jfredett: Sure. :) 00:29:11 gnite! 00:29:16 perhaps, but then i don't discuss groupoids, usually :) 00:29:47 blasphemy! aren't you a homotopy terrorist? :) 00:29:56 slava32: Which might explain your disdain for non-concrete categories. ;) 00:30:17 * Syzygy- taught alg.top. over the fundamental groupoid to a bunch of 9th graders this spring. 00:30:28 I like them thingies. :) 00:30:47 Syzygy: I haven't the first clue wrt. algebraic topology. 00:30:50 Syzygy-, that reminds me, have you seen that "children's book" on algebraic topology by a japanese gentlemen? 00:30:59 Syzygy-, galois's dream i think it's called. 00:31:19 wli: It's not THAT hard, and has awesomely weird applications 00:31:21 psykotic: Nope. 00:31:29 Syzygy: Frankly I've no idea how I ever graduated in pure math. I basically remember nothing except bonehead calc anymore. 00:31:48 wli: I don't remember bonehad calc. And I'm still working in mathematics. ;) 00:32:15 --- quit: dblhelix ("...") 00:32:22 Syzygy-, it had a cute exposition of some basic results for middle schoolers. 00:32:29 Syzygy: I could write a CAS to completely replace myself wrt. mathematical ability/functionality. 00:32:34 Syzygy-, using an analogy of train tracks laid out on an island with various lakes, and so on 00:33:21 --- join: ptx (n=ptxmac@0x5550c853.adsl.cybercity.dk) joined #haskell 00:33:24 and as the name suggests, i think it eventually turned back to algebra and demonstrated the relationship to galois theory 00:33:43 Cale: so, I was wrong 00:34:14 note to self: QuickCheck works much better on [Bool] than on [Int] 00:34:38 --- join: sharkk (n=sharkk@adsl-ull-68-234.41-151.net24.it) joined #haskell 00:35:08 Syzygy: I'm so lame I'm having trouble solving systems of integer linear equations (integer coefficients, integer unknowns). 00:35:11 desp pasted "KMP isSubstringOf and findSubstringIn" at http://hpaste.org/1956 00:35:23 wli - so this CAS would have the ability to write itself? :D 00:35:49 Syzygy-, by the way, have you tried to teach categorical thinking to people who already know haskell enough? 00:35:58 mgsloan: I suppose it could be quined. 00:36:36 Syzygy-, i was making the point the other way, by example, that experienced haskellers are probably better at thinking about naturality than a lot of non-specialist mathematicians :) 00:36:40 *the other day 00:36:55 I don't know Haskell very well. I'm a monad moron. 00:37:13 --- quit: Pseudonym ("using sirc version 2.211+ssfe") 00:38:09 --- join: drrho (n=rho@chello213047112079.11.11.vie.surfer.at) joined #haskell 00:38:36 --- join: oerjan (n=oerjan@hagbart.nvg.ntnu.no) joined #haskell 00:38:44 --- join: dibblego (n=nobody@CPE-61-9-214-69.static.qld.bigpond.net.au) joined #haskell 00:40:04 ?msg lambdabot Either a b -> a 00:40:04 Not enough privileges 00:40:09 oops 00:40:15 .msg lambdabot ?hoogle Either a b -> a 00:40:18 cripes 00:40:27 * dibblego wipes brow 00:40:32 :t left 00:40:34 forall (a :: * -> * -> *) b c d. (ArrowChoice a) => a b c -> a (Either b d) (Either c d) 00:40:42 dibblego: either id undefined 00:41:07 got it now, thanks :) 00:42:07 cute, psykotic 00:42:08 "either id undefined", sounds like Haskell poetry... 00:42:34 dons: what? where? :) 00:42:45 --- join: Jaak (n=Jaak@193.40.10.179) joined #haskell 00:42:55 'left' isn't seen here very often 00:43:15 :t left 00:43:17 forall (a :: * -> * -> *) b c d. (ArrowChoice a) => a b c -> a (Either b d) (Either c d) 00:43:22 :t right 00:43:24 forall (a :: * -> * -> *) b c d. (ArrowChoice a) => a b c -> a (Either d b) (Either d c) 00:43:27 @pl should support them 00:43:27 should support them 00:43:55 @src ArrowChoice 00:43:55 Source not found. The more you drive -- the dumber you get. 00:44:03 :t up 00:44:05 Not in scope: `up' 00:44:09 :t down 00:44:10 Not in scope: `down' 00:44:23 :t allaround 00:44:25 Not in scope: `allaround' 00:44:39 Sorry, wli and psykotic - I was looking at another window for a few moments.... 00:45:09 psykotic: Sounds like a book I'm going to want to read. 00:45:25 --- quit: iblechbot (Read error: 113 (No route to host)) 00:45:27 wli: diophantic systems are HARD though. 00:45:42 --- join: mauke_ (n=mauke@d83-191-167-190.cust.tele2.de) joined #haskell 00:45:42 --- join: ejt (n=ejt@85-211-149-22.dyn.gotadsl.co.uk) joined #haskell 00:45:43 Syzygy-, it's actually fairly terrible due to the translation from japanese to english. but i thought the idea was nice. it's a very, very old fashioned exposition. 00:45:52 psykotic: I haven't done -that- much teaching, and haskellites are hard to come by around my parts. 00:45:53 Syzygy-, very riemann :) 00:45:56 I seem to be the only one. :P 00:46:00 morning 00:46:25 has anyone got any reccomendations for a balance tree like structure that has fast merges ? 00:46:43 sooo... uh... is it possible to serialize GADTs? 00:46:44 Syzygy-, if you're looking for interesting reads... 00:46:49 moin 00:46:51 i'm having a hell of a time figuring it out 00:46:52 --- join: Alneyan (n=Hush@2001:618:400:0:0:0:575a:dce7) joined #haskell 00:46:54 dons: why the grrr? 00:47:03 Syzygy-, klein's on riemann's theory of algebraic functions and their integrals 00:47:06 vincenz: no ops on oasisbot :) 00:47:16 Oh 00:47:20 psykotic: Yech. Integrals!? 00:47:29 Syzygy-, cohomology! :) 00:47:34 Ah. 00:47:38 But still. Integrals!? 00:47:44 well, that's how cohomology was invented :) 00:47:52 if you integrate around a circle, etc 00:48:11 if you haven't seen a lot of that classical stuff, it's very nice 00:48:12 I know. However, I'm doing my work in the Noetherian tradition rather ;) 00:48:29 * Syzygy- managed to avoid anything remotely similar to calculus / analysis for his entire study. 00:48:31 right, it's not explained anymore, it's in the garbage bin of history. 00:48:32 * psykotic sobs 00:48:48 actually this stuff is still seen in algebraic geometry, kinda 00:49:07 psykotic: I know about the history of my field. I'm just not particularily interested in the bits and pieces that don't translate immediately to pretty-pretty algebraic structures. 00:49:34 And I know that the de Rham-, sheaf- and other geometric cohomology theories -- basically anywhere where cohomology is more natural than homology -- have their origin in this kind of ideas. 00:49:52 Syzygy-, have you read dieudonne's history of algebraic topology? 00:49:57 Nope. 00:50:01 oh man, you'd love that, i think 00:50:05 I haven't read very much of the Large Writers at all. 00:50:06 Alas. 00:50:31 you should check that one out. it also gets into fancy, recent developments 00:50:49 Yeah. 00:50:49 and it very directly relates classical ideas of riemann and poincare to their modern developments 00:50:59 Do you have a reference for me? 00:51:03 --- join: therp (n=nil@chello080108077214.34.11.tuwien.teleweb.at) joined #haskell 00:51:03 hang on 00:51:04 --- quit: ergot (Read error: 104 (Connection reset by peer)) 00:51:22 --- quit: oerjan ("leaving") 00:51:22 Dieudonné, Jean, "A history of algebraic and differential topology. 1900--1960", Birkhäuser Boston, Inc. 00:51:42 Thanks. 00:52:05 i also like his history of functional analysis, but given your preferences... :) 00:52:05 Oooooh. We have three copies here at the library. 00:52:26 psykotic: I actually Really Liked functional analysis. It was linear algebra on 'shrooms. :) 00:52:38 At least the way I learned it. 00:52:40 that's also where grothendieck got started. 00:52:44 nuclear spaces, etc 00:53:04 --- join: fnord123 (n=fnord123@91.104.229.110) joined #haskell 00:53:05 Differential geometry on the other hand was taught without mentioning manifolds, and while ignoring completely any algebra that might be available. I dropped that course twice. 00:53:42 it would be a shame to drag in too much algebraic machinery for a first course in that 00:53:46 Large coproducts seem to run slow in ghc. 00:54:06 psykotic: If it had used the algebraic machinery, I would have learned something from it. 00:54:10 although it seems silly to not use the notion of manifold unless you're trying to do an explicitly historical/classical exposition 00:54:11 60.49user 0.99system 1:04.93elapsed 94%CPU (0avgtext+0avgdata 0maxresident)k 00:54:11 0inputs+0outputs (60major+153001minor)pagefaults 0swaps 00:54:41 Syzygy-, there's a (terrible) book by do carmo, differential geometry of curves and surfaces, which not only doesn't mention manifolds, but screws up his definition of his sort of replacement. 00:54:45 --- join: the_dormant (n=ramzi@freeway.rd.francetelecom.com) joined #haskell 00:54:48 Hehehe 00:54:51 Syzygy-, basically the maps go in the wrong direction, if i remember correctly, for the coordinate charts. 00:54:54 it's a mess. 00:54:55 if i have some Monad m, and i have m (Maybe a), is there a way to cleanly use that as if it were a single monad? 00:54:57 We did it from a horrible dover book by Kreyszig. 00:55:07 instead of having to manually deal with the nesting 00:55:13 Which is weird, since the functional analysis was lovely - and also based on a book by Kreyszig. 00:55:22 (does MTL do this?) 00:55:56 dons: I get an error message when doing @google on #bioclipse 00:56:16 "Plugin `search' failed with: IRCRaised thread killed" 00:56:24 ?google haskell 00:56:26 http://www.haskell.org/ 00:56:26 Title: Haskell - HaskellWiki 00:56:30 can you try aggain? 00:56:34 maybe the network just timed out 00:56:36 --- quit: the_dormant (Remote closed the connection) 00:56:47 trying again 00:57:04 now it worked :) 00:57:05 --- join: the_dormant (n=ramzi@freeway.rd.francetelecom.com) joined #haskell 00:57:16 temporary network silliness :) 00:57:45 this is perhaps on topic - I just wrote a thingamabob to figure out the winding number of a point in a piecewise path 00:57:50 efficiently too 00:58:09 though sadly C++, so it took ~100 lines 00:58:19 --- join: qatal (n=chatzill@203.173.169.118) joined #haskell 00:58:23 --- quit: qatal (Client Quit) 00:59:01 RyanT5000, if you had a monad transformer, you could do something like that. but not with just a monad (i think). 00:59:03 I'd probably benefit from a background in topology in this 00:59:10 RyanT5000: that's like MaybeT m but without the newtype, but you can't define an instance Monad m => Monad (\a -> m (Maybe a)) 00:59:19 (working on booleans for two-dimensional regions) 00:59:38 uhm 00:59:40 --- join: JaffaCake (n=simonmar@213.199.145.11) joined #haskell 01:00:04 --- quit: mauke (Read error: 110 (Connection timed out)) 01:00:05 is there an extension to use partially applyied type synonyms in an instance head? 01:00:21 mgsloan: I don't even know what a winding number of a point in a piecewise path is. 01:00:40 wli: you just count the number of net times the path winds around a point. 01:00:48 Saizan: No, and it's probably not even possible. 01:00:54 --- join: alneyan` (n=alneyan@i05m-87-90-220-231.d4.club-internet.fr) joined #haskell 01:00:55 psykotic: That sounds tricky. 01:01:02 wli: there's a nice theorem for it. 01:01:26 Saizan: Higher order unification (with lambdas) is undecidable. 01:01:32 yeah, basically you just cast a ray and sum the signs of the derivatives 01:01:32 You just integrate 1/(z-p) around the path, and looks at the result. :) 01:01:36 or that :P 01:01:38 right 01:01:43 it'll be 2pi * the winding number 01:01:44 sorear: heh, supposed so 01:01:50 We don't know if it applies in this case, though. 01:02:19 probably i forgot an i 01:02:29 psykotic: Yeah, I think you did. 01:02:32 yyeah 01:02:42 my uncle told me about that an hour or two ago 01:02:52 well, 5 or 6 hours ago 01:02:54 for piecewise linear paths you don't need this, though 01:02:59 not linear 01:03:00 you can just calculate the net angle directly 01:03:05 piecewise bezier :P 01:03:07 ah 01:03:24 well, actually it's something more exotic, but i won't go into that.. 01:03:29 weird - i ported my app to ByteStrings and it actually got slower 01:03:38 in that case you could also just approximate it by a piecewise linear path between inflection points 01:03:42 which will give the same winding number 01:04:18 hmm, I'm not sure if calculating inflection points is very fast or stable 01:04:32 true 01:04:36 a cubic bezier can actually have cusps 01:04:40 yep 01:05:32 my strategy is first to check the bounding box, and see if the point is behind it, or in it 01:05:38 --- quit: alneyan` (Client Quit) 01:05:40 --- nick: mauke_ -> mauke 01:05:52 if it's behind, it checks the initial point, and final point, and if those are on opposite sides, we have a winding inc/dec 01:05:53 you could also use the theorem syzygy mentioned. you can calculate the integral in closed form, due to its being a polynomial curve. 01:06:15 basically 1/(z-p) will be integrable in closed form since it breaks up via partial fractions, which can then be integrated separately 01:06:23 if it's inside it uses a previously created roots algorithm 01:06:40 --- quit: glguy () 01:07:03 hmm 01:07:16 psykotic: See? There still is some intuition for analysis left. Deeep, deeeep inside. 01:07:17 could be handy for the inside-bbox case 01:07:31 mgsloan: The theorem holds without case checking. 01:07:39 If the point isn't enclosed by the curve, the integral vanishes. 01:07:45 of course, but i need efficiency :P 01:07:50 Bah! 01:07:59 that's why this is C++! 01:08:10 if I wanted theoretical sweetness I'd be writing it in haskell :) 01:08:18 Precalculate the closed form of the integral from your bezier coefficients. Then you just need to insert the point in the end. 01:08:22 :) 01:09:17 mgsloan: I was wondering about that, actually.... 01:09:23 hmm, that's a good idea. Too bad I don't need a huge volume of winding checks. I wonder if anyone's ever drawn pixels like that. 01:09:35 <|Steve|> 1/(z-p), integrated with respect to what? 01:09:42 steve: z is a function of t 01:09:47 it's a closed curve 01:09:56 it's sloppy notation :) 01:09:59 --- quit: Alneyan ("ERC Version 5.2 (IRC client for Emacs)") 01:09:59 <|Steve|> Oh, I see. I didn't read far enough back. Doing a path integral? 01:10:02 --- join: Alneyan (n=Hush@2001:618:400:0:0:0:575a:dce7) joined #haskell 01:10:07 |Steve|: Exactly. 01:10:11 yes. that is in the complex plane, by the way 01:10:20 \int_\gamma dt/(z-p) is what I was talking about. 01:10:38 Or ... at least I think it is. 01:10:39 --- quit: Alneyan (Client Quit) 01:10:59 you mean \int_\gamma dt/(\gamma(t) - p) 01:11:07 wait, heh 01:11:15 i guess you can just say z there since your domain of integration is \gamma 01:11:30 equivalently, \int_0^1 dt/(\gamma(t) - p) 01:11:49 --- join: Alneyan (n=alneyan@2001:618:400:0:0:0:575a:dce7) joined #haskell 01:12:31 rest assured though, at some point I'd like to implement some geom stuff for haskell. maybe in half a year or so... 01:12:45 psykotic: Exactly. 01:12:51 mgsloan: Looking forward to that. 01:13:44 --- join: dV_ (n=poly@193.77.153.149) joined #haskell 01:14:25 yeah, me too :) though don't expect too much - I don't have much formal experience (haven't even applied to any colleges yet :P ) 01:14:48 It'll probably be more like a dedicated 2d lib 01:15:31 how does -fallow-undecidable-instances choose between instances? does it use a "more specific" kind of criterion? 01:15:35 or does it just kind of pick at random? 01:15:42 Okay, I'm further along on terminfo 01:16:09 perhaps it's best that way, though, as I think haskell needs 2d prims that are used throughout 01:16:21 --- quit: Alneyan (Remote closed the connection) 01:16:24 --- join: Alneyan (n=alneyan@2001:618:400:0:0:0:575a:dce7) joined #haskell 01:16:25 (and for that, they must be simple) 01:16:27 mgsloan: What do you mean by "2D prims"? 01:16:42 points, matrices, rectangles, that sort of thing 01:17:30 a separate lib would implement more in depth geometric objects 01:17:30 mgsloan: Well, what would you do with them? 01:17:50 well, use them! 01:19:13 FWIW solving integer linear equations is meaningful for constraints arising in various contexts (logic language interpreters if nothing else)... I don't know how 2D things fit into graphics/etc. unless they're very sophisticated. 01:19:13 for example, xmonad could certainly find uses for them throughout 01:19:22 --- join: osfameron (n=osfamero@www.greenokapi.net) joined #haskell 01:20:04 yeah, I know some people who are very involved in constraints 01:20:04 --- quit: dxl_ (Read error: 110 (Connection timed out)) 01:20:06 I may be wrong about sophistication then. 01:21:02 RyanT5000: it just kills ghc if your instances are truly undecidable afaiu, -fallow-overlapping-instances chooses the more specific one 01:21:28 --- quit: Pupeno2 (Read error: 60 (Operation timed out)) 01:21:28 Saizan: thanks 01:21:31 --- quit: enolan (Read error: 104 (Connection reset by peer)) 01:21:42 (StringCapSetForeground,"\ESC[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m") 01:21:47 wtf is that? 01:21:58 --- join: gkr (n=notme@200-127-242-48.cab.prima.net.ar) joined #haskell 01:26:59 --- quit: base_16 (Remote closed the connection) 01:30:02 --- quit: seancorfield (Read error: 104 (Connection reset by peer)) 01:30:14 Okay, terminfo manpage says it's a fscking language. 01:30:34 --- join: seancorfield (n=seancorf@c-67-160-202-22.hsd1.ca.comcast.net) joined #haskell 01:30:53 dons: http://community.haskell.org/admin/project_request.html 01:30:54 Title: Project Request 01:31:03 --- quit: roma2 (Read error: 110 (Connection timed out)) 01:31:22 "It is possible to form else-if's a la Algol 68: %? c1 %t b1 %e c2 %t b2 %e c3 %t b3 %e c4 %t b4 %e %; where ci are conditions, bi are bodies." 01:32:49 lookup True [(c,b),...] -- :) 01:32:54 * osfameron squees at zippers 01:33:40 Igloo: do you think it should be linked from the front page? 01:33:45 --- join: Eelis_ (n=Eelis@any.xs4all.nl) joined #haskell 01:33:49 'Need an account? Sign up here' 01:34:40 dons: We need to write a front page :-) 01:34:45 And other doc 01:34:46 s 01:35:19 --- join: base_16 (n=base16@c-67-161-37-205.hsd1.ca.comcast.net) joined #haskell 01:36:22 dons/Igloo: Is there something like a "we wish someone would do this" page? 01:36:56 wli: Do you mean "I wish someone would write this library"? 01:37:12 Igloo: Yes. 01:37:18 No 01:37:40 http://www.haskell.org/haskellwiki/Wanted_libraries could use some work 01:37:41 Title: Wanted libraries - HaskellWiki 01:38:12 * Igloo is dubious about the usefulness of such a page. People generally write libraries because they want to use them, not because someone else wanted to use them a year ago 01:38:22 yeah, doesn't seem to be working 01:38:32 individuals keeping a private list of ideas seems to be more useful 01:38:42 i had 'window manager' on my list for about 4 years 01:39:01 the main issue is that people propose infeasibly large tasks 01:39:05 when you need small ones. 01:39:09 Write me a pony. 01:39:23 see. like that. 01:39:31 --- quit: JBGood (Read error: 110 (Connection timed out)) 01:39:32 no, seriously. I want a pony. :) 01:40:07 oh, ok then. put it on the hackathon todo list 01:40:21 given enough oktoberfest beer, we just might pull it off 01:40:22 And then come to the Hackathon and do it :-) 01:40:49 * therp wonders how we should check in a pony into darcs? 01:41:33 Carefully. 01:41:49 * wli is getting closer to vaguely functional termcap. 01:42:01 Er, rather, terminfo. 01:42:34 --- join: mr_tenor (n=nick@c220-239-33-150.rivrw7.nsw.optusnet.com.au) joined #haskell 01:42:46 --- join: hkBst (n=hkBst@gentoo/developer/hkbst) joined #haskell 01:43:08 "foldl is like foldl, but strict in the accumulator. Though actually foldl is also strict in the accumulator." 01:43:11 --- quit: sorear ("zzz") 01:43:13 * desp groans 01:43:30 There's something a bit odd going on with these string capabilities. They're basically in an odd programming language that probably wants translation to something in terms of a Haskell data structure but maybe more functional in character. 01:43:45 --- join: dxl (n=svens@i3ED6FC3A.versanet.de) joined #haskell 01:43:54 --- quit: dibblego (Read error: 113 (No route to host)) 01:43:58 --- join: jbauman (n=jbauman@c-71-198-7-182.hsd1.ca.comcast.net) joined #haskell 01:44:00 It's basically a sort of imperative stack language. 01:44:18 desp hmm? 01:44:22 ?src foldl 01:44:22 foldl f z xs = lgo z xs 01:44:22 where lgo z [] = z 01:44:22 lgo z (x:xs) = lgo (f z x) xs 01:44:24 ?src foldl' 01:44:24 foldl' f a [] = a 01:44:24 foldl' f a (x:xs) = let a' = f a x in a' `seq` foldl' f a' xs 01:44:33 foldl' is only partially strict in its accumulator 01:44:38 ?src Data.ByteString.foldl' 01:44:39 Source not found. Do you think like you type? 01:44:46 Igloo: Freiburg's a little far for me, alas. 01:44:56 dons: http://haskell.org/ghc/docs/latest/html/libraries/base/Data-ByteString.html#v%3Afoldl%27 01:44:58 http://tinyurl.com/wn5rt 01:45:05 desp, oh yes. for bytestrings :) 01:45:26 dons: that comment ought to be taken behind the bike shed and shot :) 01:45:41 its all strict baby 01:45:44 --- join: kuser (n=kuser@e177024021.adsl.alicedsl.de) joined #haskell 01:45:46 foldl' :: (a -> Word8 -> a) -> a -> ByteString -> a 01:45:46 foldl' = foldl 01:45:50 dons: especially since the missing ' makes it extra funny 01:46:03 ah yes, the typo 01:46:05 well spotted 01:46:20 dons: I'd just say that foldl' is an alias for foldl 01:46:22 --- join: filz (n=filz@ip-168-248.sn2.eutelia.it) joined #haskell 01:46:27 fixed in darcs 01:46:34 ty :) 01:46:52 -- | 'foldl\'' is an alias for 'foldl', for strict ByteStrings. 01:46:52 foldl' :: (a -> Word8 -> a) -> a -> ByteString -> a 01:46:52 foldl' = foldl 01:47:01 yay 01:47:03 --- quit: Eelis (Read error: 110 (Connection timed out)) 01:47:07 probably shouldn't bother providing it though. 01:47:34 ... why not? 01:47:38 * blackdog is using it right now 01:47:42 dons: how should I submit a patch providing KMP search to fps? 01:48:42 --- join: swiert (n=wss@sneezy.cs.nott.ac.uk) joined #haskell 01:49:10 --- quit: dataangel ("Ex-Chat") 01:49:31 desp, oh. ok. so you know about the findSubstring function? 01:49:43 which already provides a poor KMP search for strict bytestrings 01:49:51 dons: yeah, you said it was quite poor 01:50:00 so what I suggest is to entirely reimplement it, benchmark that, and also do one for lazy bytestrings 01:50:07 then darcs send that, along with its QuickCheck properties 01:50:10 --- join: niksnut (n=chatzill@a80-126-17-187.adsl.xs4all.nl) joined #haskell 01:50:13 yes, I'm about to benchmark that. ok. 01:50:17 and patch against the 'bytestring' repo on darcs.haskell.org/bytestring 01:50:22 --- join: dxl_ (n=svens@i3ED6FDB4.versanet.de) joined #haskell 01:50:23 --- join: mnislaih (n=pepe@monad.dsic.upv.es) joined #haskell 01:50:25 aha 01:50:27 yes, thanks for doing this. 01:50:36 you might even want to benchmark against kmp.c 01:50:39 ?go kmp.c 01:50:43 http://barnyard.syr.edu/quickies/kmp.c 01:50:45 since we should be pretty damn close for a good impl 01:50:49 dons: fold on bytestrings is 97% of my runtime at the moment - any tips on speeding it up? 01:50:54 ok 01:50:57 write a manual recursion, blackdog ? 01:51:05 it could be hmm, not fusing 01:51:05 was hoping you wouldn't say that :) 01:51:08 oh well. 01:51:15 foldl f v (PS x s l) = inlinePerformIO $ withForeignPtr x $ \ptr -> 01:51:15 lgo v (ptr `plusPtr` s) (ptr `plusPtr` (s+l)) 01:51:15 where 01:51:15 STRICT3(lgo) 01:51:17 lgo z p q | p == q = return z 01:51:20 | otherwise = do c <- peek p 01:51:22 lgo (f z c) (p `plusPtr` 1) q 01:51:25 try that, then specialise it for your use 01:51:33 ok, cheers 01:51:54 sounds like an interesting project, blackdog . i'd be happy to have a look 01:52:25 one issue in the current code is that we don't rewrite unfused foldls back to fast loops like the above 01:52:36 so its using array fusion loops, unfused, which would be a 2x hit 01:52:41 this is just me winding down at the moment - writing a fast target solver. it's pretty quick once it's read in the dictionary, but the thing's damn slow to build... 01:52:42 foldl f z = loopAcc . loopUp (foldEFL f) z 01:53:09 maybe it'd be faster to build it once then compress & serialise it. 01:53:09 is what you get, and if it doesn't fuse with anything, then it'll be slower than the low level loop above 01:53:13 yeah 01:53:17 that's a good idea 01:53:47 i'll hunt down that page you wrote on it 01:59:19 --- quit: beelsebob (Connection timed out) 02:00:25 --- part: drbean left #haskell 02:00:30 Okay, I've got the terminfo things assembled into a structure with discriminated unions and all that jazz. 02:00:52 http://holomorphy.com/~wli/Terminfo.lhs 02:01:05 http://holomorphy.com/~wli/TermCapDecls.hs 02:01:22 add .txt if the content type affair is bugging you 02:01:39 (http://holomorphy.com/~wli/Terminfo.lhs.txt and http://holomorphy.com/~wli/TermCapDecls.hs.txt) 02:02:56 The next step is to get the extended capability table parsed and dumped into there. 02:02:57 --- quit: _roconnor (Read error: 104 (Connection reset by peer)) 02:04:29 The step after that to get the string attributes parsed into something a mini-interpreter can handle. 02:05:06 --- join: mrchebas (n=alexey@ster.cs.uu.nl) joined #haskell 02:05:26 --- quit: dxl (Read error: 110 (Connection timed out)) 02:06:29 --- nick: dxl_ -> dxl 02:09:45 --- join: Igel (n=Igel@brsg-4db2d555.pool.einsundeins.de) joined #haskell 02:11:08 --- join: iblechbot (n=iblechbo@ppp-62-216-205-128.dynamic.mnet-online.de) joined #haskell 02:13:57 you know you're doing something right (or very, very wrong) when you realise you need a list of prime numbers when doing a word puzzle 02:14:02 * blackdog hums happily 02:15:55 blackdog: What have you hit? 02:16:17 --- quit: gour ("Quit (http://www.xchat.org)") 02:16:20 well, i want to represent strings more compactly 02:16:27 i don't care about ordering, so i was just sorting them 02:16:47 then it occurred to me that multiplication was commutative 02:17:15 so if i represent the letters from a to z by a prime, i can multiply them together and get a unique hash 02:17:16 blackdog: Are you referring to sets of strings? 02:17:30 blackdog: Did you ever look at Conway's FRACTRAN? 02:17:33 no, individual strings 02:17:44 No, I haven't heard of it. 02:17:57 blackdog: Yet it appears that you want to sort sets of strings, correct? 02:17:57 blackdog: He uses that primes trick to build a turing machine working with multiplying fractions onto an accumulator. 02:18:08 oh, that's cute 02:18:15 http://scienceblogs.com/goodmath/2006/10/prime_number_pathology_fractra.php 02:18:17 Title: Good Math, Bad Math : Prime Number Pathology: Fractran, http://tinyurl.com/vxjge 02:18:19 That's a good overview 02:18:43 --- join: _roconnor (n=roconnor@n138223.science.ru.nl) joined #haskell 02:18:44 cheers, i'll check it out 02:18:56 wli: i may be missing something - where does sorting come into it? 02:19:15 i just want to make sure that strings that have the same letters (irrespective of order) hash to the same value 02:19:20 blackdog: Trie/Tree structures that achieve sorting. 02:20:06 blackdog: Irrespective of order of appearance in the string is different. 02:20:17 --- join: gour (n=Gour@18-153.dsl.iskon.hr) joined #haskell 02:20:32 yeah. sorry, i may not have explained myself well earlier. 02:21:49 sounds like compressing sets of chars 02:22:04 blackdog: My first thought is Data.Array.Array or Data.Map.Map of counts of individual characters if they're non-unicode. 02:22:45 blackdog: Data.Map would actually work for unicode. 02:23:17 blackdog: I'd be very hesitant to form giant arbitrary-precision numbers. 02:23:28 well, i had a Map of String -> [String] 02:23:56 I'd use Data.Map Char Int to represent the multiset. 02:24:21 oh, i see. one map for each string, then? 02:25:05 but then i need to index based on that - can i use a Map as a key into another Map? 02:25:24 RyanT5000 pasted "Is there any way to serialize/deserialize this?" at http://hpaste.org/1957 02:25:48 blackdog: This represent-strings-as-HUGE-numbers scheme of yours is something that ends up being very pretty in theory and horrible in practice. 02:25:53 blackdog: I think so yes. 02:26:03 swanky. :) 02:26:06 in re that post, i suppose i'm trying to finesse haskell into doing a typecheck at runtime 02:26:09 ?instances Ord 02:26:10 (), All, Any, Bool, Char, Double, Either a b, Float, Int, Integer, Maybe a, Ordering, Product a, Sum a, [a] 02:26:22 so it may not be possible; but i'd love it if someone could take a look 02:26:26 ?instances-importing Data.Map Ord 02:26:26 would be fun to stash the whole state of some game or something in a single Integer :) 02:26:27 (), All, Any, Bool, Char, Double, Either a b, Float, Int, Integer, Map k v, Maybe a, Ordering, Product a, Sum a, [a] 02:26:36 ok, i'll try my insane prime number version first, and if it blows up in my face, i'll try that approach :) 02:26:45 blackdog: It will. But go ahead. 02:27:16 > 'z'-'a' 02:27:16 add an instance declaration for (Num Char) 02:27:17 In the expression: 'z' - 'a'... 02:27:24 blackdog: you want some prime number generators, btw? 02:27:27 > toInteger 'z'-toInteger 'a' 02:27:28 add an instance declaration for (Integral Char) 02:27:30 i got a sample bag of good ones 02:27:35 dons: it's ok, i'm using the sieve 02:27:38 i only need 26 :) 02:27:38 > (toInteger 'z')-(toInteger 'a') 02:27:39 add an instance declaration for (Integral Char) 02:27:41 ah ok 02:27:49 cause i got some fine prime warez.. 02:27:54 > (fromEnum 'z')-( fromEnum 'a') 02:27:55 25 02:27:56 import Data.Map as Map ; Map.toList $ foldr (flip (Data.Map.insertWith' (+)) 1) Map.empty "blackdog: I'd be very hesitant to form giant arbitrary-precision numbers." 02:27:57 you can hook me up? :) 02:27:57 There we go. 02:28:04 > (ord 'z') - (ord 'a') 02:28:06 25 02:28:20 > primes = nubBy (((>1).).gcd) [2..] in primes !! 26 02:28:20 Parse error 02:28:29 > let primes = nubBy (((>1).).gcd) [2..] in primes !! 26 02:28:30 103 02:28:58 > nubBy (((>1).).gcd) [2..] 02:29:00 [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,... 02:29:19 http://holomorphy.com/~wli/Runciman.lhs 02:30:02 That should be relatively swift. 02:30:36 I must be getting tired. That tinyurl link in the title is starting to look like "tinyurl.com/RRavoy" instead of "tinyurl.com/22avoy" 02:31:27 --- join: fmardini (n=fmardini@80.90.161.5) joined #haskell 02:31:44 --- join: gimbo (i=gimbo@mini.theravensnest.org) joined #haskell 02:32:07 --- join: BCoppens (n=bartcopp@kde/coppens) joined #haskell 02:32:07 --- part: mgsloan left #haskell 02:32:56 --- join: Pupeno2 (n=Pupeno@cl-241.dub-01.ie.sixxs.net) joined #haskell 02:33:46 --- quit: Arnia () 02:35:44 --- join: dxl_ (n=svens@i3ED6E73F.versanet.de) joined #haskell 02:35:58 anyone have thoughts on serializing that GADT? 02:36:22 i can figure out how to serialize it in what i think is an unambiguous way, but i can't figure out how to deserialize it 02:36:53 RyanT5000: Looks to me like you've got to have an MVar outside it. 02:37:09 wli: an MVar? how would that help? 02:37:41 --- quit: slipstream (Read error: 104 (Connection reset by peer)) 02:37:43 RyanT5000: I'm not sure why it'd be mutable, but they can basically act as locks. 02:38:03 wli: sorry, i'm totally confused; i'm not talking about anything mutable 02:38:19 i'm just talking about a GADT that i can't figure out how to serialize 02:38:24 (deserialize) 02:38:29 because of type errors 02:38:40 RyanT5000: If there's nothing mutable why would you have to serialize it 02:38:50 because i need to ship it across the network 02:40:01 the problem is with t, right? 02:40:13 --- join: moonlite_ (n=mben@ttmlmfw.tactel.se) joined #haskell 02:40:18 well the problem is with the last 3 (out of 4) cases 02:41:27 let me paste up my serialization routine 02:41:29 --- quit: cmhh (Read error: 104 (Connection reset by peer)) 02:41:35 so you can see what i'm trying to deserialize from 02:41:41 --- join: cmhh (n=cmhh@82.153.238.161) joined #haskell 02:41:43 yeah 02:42:23 RyanT5000 annotated "Is there any way to serialize/deserialize this?" with "serialization routine" at http://hpaste.org/1957#a1 02:42:26 --- join: slipstream (n=irssi@ppp85-140-72-54.pppoe.mtu-net.ru) joined #haskell 02:43:08 BigInt is just a wrapped Integer that serializes differently 02:43:22 --- quit: fmardini () 02:43:32 well, that serialization forgets about (t,env) 02:43:41 doesn't it? 02:43:48 well that's a phantom type anyway 02:43:49 --- quit: cmhh (Read error: 104 (Connection reset by peer)) 02:44:09 so there's no real way it *can* serialize that, right? 02:44:10 blackdog: Are you looking for anagrams? 02:44:16 --- join: cmhh (n=cmhh@82.153.238.161) joined #haskell 02:44:31 Maybe you need Typeable and to serialize a TypeRep along with the data? 02:44:42 dons: poke 02:44:43 --- join: fmardini (n=fmardini@80.90.161.5) joined #haskell 02:44:59 RyanT5000: you need a representation of it as well if you want to reconstruct the original phatom type deserializing 02:45:48 and to go from value to type you need a typeclass 02:45:48 --- quit: dolio (Read error: 104 (Connection reset by peer)) 02:46:02 dons: have you considered making both lazy and strict ByteStrings instances of some type class that'd offer the common operations? 02:46:05 Saizan: how would i do that? 02:46:11 dons: or is that a stupid idea? 02:46:18 ?go functional pearl implicit configurations 02:46:20 http://www.cs.rutgers.edu/~ccshan/prepose/prepose.pdf 02:46:26 --- quit: cmhh (Read error: 104 (Connection reset by peer)) 02:46:39 --- join: cmhh (n=cmhh@82.153.238.161) joined #haskell 02:46:54 RyanT5000: i can find you a very related paper 02:47:05 Saizan: cool 02:47:10 --- quit: noj (SendQ exceeded) 02:47:11 i thought typeclasses would be involved somehow 02:47:15 but i couldn't figure out how to do it 02:47:44 http://www.cs.rutgers.edu/~ccshan/prepose/p1214-kiselyov.pdf 02:48:09 thanks 02:48:39 --- quit: lomeo ("bye!") 02:49:46 --- join: dolio (n=dolio@216.68.188.68) joined #haskell 02:50:26 what do you actually use for t? 02:50:43 t is basically in there to typecheck the language 02:51:29 --- join: beelsebob (n=tatd2@82.153.143.132) joined #haskell 02:51:36 --- quit: dxl (Read error: 110 (Connection timed out)) 02:51:38 yes, but do you instance it with anything? 02:53:34 well, at some point i had a Literal in there as well (it will need to come back in some form), and i could do something like (Lambda (App (App (Lit (==)) Top) (Pop Top))) 02:53:51 which is a function that compares its first argument to the first thing in the environment outside the Lambda 02:53:54 so if you ran 02:54:07 eval (that) (5, ()) 5 02:54:10 you would get True 02:56:01 desp, the type class is too big 02:57:27 RyanT5000 annotated "Is there any way to serialize/deserialize this?" with "all the interesting bits so far" at http://hpaste.org/1957#a2 02:58:14 does ghc work on arm? 02:59:09 Debian has it unregisterised on Arm Linux 02:59:22 we're working on leg, for now 02:59:30 Igloo: ok 02:59:41 --- join: matt__r (n=matt__r@CPE-121-209-187-24.nsw.bigpond.net.au) joined #haskell 03:02:47 --- join: alar (n=alar@62.140.253.8) joined #haskell 03:03:14 --- quit: alar (Client Quit) 03:04:34 --- quit: fmardini () 03:06:33 --- quit: Shimei ("This is an uncreative quit message.") 03:06:53 --- join: Shimei (n=kamikaze@c-71-59-198-127.hsd1.or.comcast.net) joined #haskell 03:08:46 --- join: alar (n=username@62.140.253.8) joined #haskell 03:08:59 --- join: bonfyre_ (n=bonfyre@ppp121-44-207-6.lns3.mel4.internode.on.net) joined #haskell 03:09:01 --- quit: bonfyre (Read error: 104 (Connection reset by peer)) 03:09:17 --- quit: alar (Client Quit) 03:09:30 --- join: alar (n=username@62.140.253.8) joined #haskell 03:12:52 --- join: vortex (n=dbhpwwhx@201.40.162.233) joined #haskell 03:15:06 --- quit: Alneyan (Read error: 60 (Operation timed out)) 03:15:08 --- quit: vortex ("CyberScript - not made by microsoft (www.cyberscript.org)") 03:15:28 --- quit: MarcWebe1 (Read error: 110 (Connection timed out)) 03:17:30 --- join: bgeron (n=brammo@cl-938.ams-05.nl.sixxs.net) joined #haskell 03:20:15 --- quit: BCoppens ("Konversation terminated!") 03:22:44 --- join: pesco (n=pesco@d131059.adsl.hansenet.de) joined #haskell 03:25:30 --- join: der_eq (n=eq@dslc-082-082-065-036.pools.arcor-ip.net) joined #haskell 03:25:38 haskell quiz time! 03:25:45 who can name this function: 03:25:47 (. (,)) . (.) 03:26:01 misaligned boobies! 03:26:13 no no. its a prelude function... 03:26:17 curry 03:26:21 * matthew-_ claims the prize 03:26:23 matthew-_: wins. 03:26:23 @unpl (. (,)) . (.) 03:26:23 (\ g j d -> g (((,)) j d)) 03:26:34 next! 03:26:50 we should collect these quiz-questions 03:26:52 ok, this one: 03:26:53 (<*> snd) . (<$> fst) 03:26:54 * earthy always misremembers curry and uncurry 03:27:05 <|Steve|> What are <*> and <$>? 03:27:08 quite 03:27:12 Control.Applicative 03:27:14 Applicative stuyy 03:27:19 *stuf 03:27:25 * matthew-_ guesses (&&&) 03:27:32 nope. 03:27:36 uncurry? 03:27:41 yes! 03:27:43 Lemmih wins 03:27:49 I'm going to have to read that library now 03:28:01 matthew-_: read the paper 03:28:09 it's very nice 03:28:21 nominolo: well, given this is haskell, I'm sure the former will require the latter! 03:28:43 yes, but it's worth it 03:29:09 hm. that's a nasty one 03:29:41 \f -> f <$> fst <*> snd is clearer, in my mind 03:29:52 --- join: ndm (n=chatzill@pc163.ad.cs.york.ac.uk) joined #haskell 03:29:55 yeah, leaving the 'f' is much clearer 03:30:00 earthy: it was a quiz! 03:30:03 uncurry f = f <$> fst <*> snd 03:30:06 true :) 03:30:18 sort of obfuscating haskell 03:30:24 IOHCC? :) 03:30:58 --- join: Soliah- (n=soliah@120.168.233.220.exetel.com.au) joined #haskell 03:31:10 what I've found lately is that programming Haskell *really* depends on finding the right datastructure to represent the stuff you want to deal with 03:31:18 once you have that it's easy cakes 03:31:23 but until that point... ouch. :) 03:31:31 sometimes pattern matching obfuscates 03:31:40 like in Okasaki's code for Red-Black tree rotations 03:31:50 earthy: a formal approach help a lot 03:31:51 there are 4 cases, done with very dense pattern matches 03:32:03 --- nick: Eelis_ -> Eelis 03:32:17 nominolo: yeah, but even then. 03:32:21 earthy: see hughes' pretty printer paper for a (long) example 03:32:26 but really the intent would be more clearly expressed as Black->Red->Red down any combination of paths instead 03:32:27 * earthy knows 03:32:31 --- join: chris2 (n=chris@p549D356F.dip0.t-ipconnect.de) joined #haskell 03:32:35 --- join: Alneyan (n=alneyan@2001:618:400:0:0:0:575a:dce7) joined #haskell 03:32:48 * earthy thought he'd type up a HTML gallery generator in a couple of hours 03:32:51 earthy: would it be easier in other languages? 03:33:12 however, devising a good datastructure to capture all the detail that you *want* to capture... that's tricky. :) 03:33:45 (Data.Tree helps, ofcourse, but what to put in it? :)) 03:34:01 * earthy must've redesigned the node datatype at least 5 tiems already :) 03:34:27 earthy: start by trying to define some features, find primitives, and specify them 03:34:40 oh 03:35:04 yeah, I find that data structures tend to grow over time 03:35:14 like weeds 03:35:19 which is fine, until you hit something that clearly needs to be "cross" structure 03:35:31 a "creeper" ! 03:36:09 --- quit: gkr (Read error: 113 (No route to host)) 03:36:21 matthew-: exactly 03:36:37 well, in haskell you start redigning, in other languages you start to hack .. 03:36:47 complicated data, the bane of neat code. :) 03:36:51 <|Steve|> How do you deal with the immutability of data structures? Do you just give up and use the IO monad? 03:37:09 |Steve|: depends 03:37:18 |Steve|: what's the problem? 03:37:18 s/redigning/redesigning/ ? 03:37:19 |Steve|: nope. The only time when MVars come into it is when it's cross-threads 03:37:36 fnord123: uh, yeah 03:37:45 --- quit: Alneyan ("rcirc on GNU Emacs 22.1.1") 03:37:55 --- join: Alneyan (n=alneyan@2001:618:400:0:0:0:575a:dce7) joined #haskell 03:37:56 if there's no inter-thread communication going on, there's normally not much need to use IO for data 03:37:57 imho 03:38:03 <|Steve|> I don't have a problem in particular. 03:38:06 Steve: usually you just generate a new datastructure from the old 03:38:19 --- join: dozer (n=nmrp3@81-179-137-126.dsl.pipex.com) joined #haskell 03:38:25 <|Steve|> I just don't want my insert operation to take linear time. 03:38:35 --- join: MarcWeber (n=marc@pD9E08F7E.dip.t-dialin.net) joined #haskell 03:38:41 and trust the compiler to not keep old stuff around too long 03:38:46 Steve: then use a zipper... 03:39:01 or an array 03:39:25 |Steve|: Seq has O(1) access to both ends 03:39:28 <|Steve|> It's not an issue of keeping old stuff around, it's that you can't change the structure. 03:39:40 <|Steve|> What if I want to change the middle element? 03:39:43 |Steve|: and O(log n) concat 03:39:51 --- quit: Cale (Read error: 104 (Connection reset by peer)) 03:40:01 steve: what would that cost in a linked list in C? 03:40:03 |Steve|: think differently ;) 03:40:14 <|Steve|> earthy: I don't use a linked list in C in most cases. 03:40:21 |Steve|: or, as suggested, use a zipper 03:40:32 |Steve|: there are also arrays in haskell with O(1) lookups 03:40:36 --- quit: Soliah (Read error: 110 (Connection timed out)) 03:40:37 <|Steve|> Who said I wanted it to be an array like structure though? 03:41:01 |Steve|: well, you didn't say anything. so we have to assume 03:41:03 <|Steve|> What if I want to run Ford-Folkersen on a graph. 03:41:13 wli pasted "anagrams for blackdog" at http://hpaste.org/1958 03:41:18 Steve: if you have a complex structure you're doing to have to navigate to the point where you want to put the new element *anyway* 03:41:25 --- join: qatal (n=chatzill@203.173.169.118) joined #haskell 03:41:58 with purity and laziness, the new structure can be generated during that navigation and the parts you haven't touched can be shared 03:41:58 <|Steve|> earthy: So? 03:42:16 <|Steve|> I see. 03:42:22 <|Steve|> But what if I don't have to? 03:42:36 don't have to what? 03:42:47 <|Steve|> What if I don't have to navigate to where I want to change it. 03:42:52 @where hackport 03:42:52 http://haskell.org/~gentoo/hackport/ 03:43:09 then you basically have a block of memory with pointers into it 03:43:15 <|Steve|> Right. 03:43:20 or even a structure with pointers into it 03:43:26 <|Steve|> Right. 03:43:33 |Steve|: this kind of thing is always much easier to discuss with a concrete example 03:43:35 the first is available in haskell 03:43:39 the second is just a zipper 03:44:00 (each derivation adds another pointer) 03:44:09 does any Gentoo user know when 6.6.1 will make it into Portage? or is it already in some overlay? 03:44:10 <|Steve|> matthew-_: Fair enough, how about a DP algorithm? 03:44:56 <|Steve|> earthy: But doesn't that adding of layers destroy your access complexity completely? 03:45:45 Adamant: afaik, it's there (i moved to arch two days ago), but check on #gentoo-haskell 03:46:01 steve: nope. 03:46:12 <|Steve|> Why not? 03:46:42 gour, thanks, I'll try syncing and reemerging 03:46:43 Adamant: yes, it's in portage now with ~arch keyword 03:46:46 because you have constant time access to the pointers and amortized identical access to the other parts 03:46:53 guh, fscking insomnia. 03:46:54 +cost 03:47:08 Okay, De Bello Gallico these anagrams can handle in ghci; Don Quijote, OTOH... 03:47:10 --- join: lomeo (n=Just_lom@81.5.68.2) joined #haskell 03:47:29 <|Steve|> If I make n changes to my structure of size n and I have constant time lookup in nonpure languages. Then I have amortized O(n) lookup in my pure language. 03:47:55 Adamant: but yes, there is a haskell overlay with 50 more haskell packages than the 50 in portage 03:48:06 <|Steve|> Worse, what if I make n^k changes to my structure? Now I have O(n^k) lookup instead of O(1). 03:48:13 nope. 03:48:35 because the internal links get updated as well 03:48:45 you don't have to walk the changes 03:48:49 -fallow-overlapping-instances decides at compile-time, right? 03:49:02 <|Steve|> How do the internal links get changed? It's supposed to be a pure language. 03:49:12 you make a new structure 03:49:20 that contains the changed links 03:49:20 <|Steve|> So that takes linear time. 03:49:24 no :) 03:49:43 that takes as much time as needed to navigate to the changepoint 03:49:43 * |Steve| is clearly just not getting it. 03:49:59 |Steve|: you can reuse large parts of a tree 03:50:01 all the rest can be freely shared, so need not be looked at 03:50:11 |Steve|: when inserting or deleting elements 03:50:17 --- join: cognominal_ (n=cognomin@191.208.64-86.rev.gaoland.net) joined #haskell 03:50:21 <|Steve|> But that's just it, what if I don't have a tree or something of this structure? 03:50:37 <|Steve|> What if it's a hashtable? 03:50:43 earthy: that's much more challenging for an arbitrary graph 03:50:45 --- join: twanvl (n=twanvl@ip5451f037.direct-adsl.nl) joined #haskell 03:50:51 the purely functional data structures tend to be trees. 03:51:04 that's no help, then 03:51:05 jbauman: true enough 03:51:11 a hashtable will not support efficient updates with a pure interface 03:51:15 challenging, but not impossible 03:51:25 <|Steve|> int-e: That seems like a severe limitation. 03:51:55 in place updates are overrated, but yes it is a limitation. you can get around that with the ST and IO monads. 03:51:58 ah, but you can always make impure interfaces as well 03:52:00 gosh, the wikipedia page on Zippers is terrible 03:52:02 <|Steve|> My data structure students had a project due a few days ago where they had to read in something like 800,000 data points and build a database to support lookup etc. 03:52:12 i don't know if you're interested, |Steve|, but there is a related solution; look up DiffArray 03:52:13 that's easy 03:52:17 > log 800000 03:52:18 it's impure, but has a pure interface 03:52:19 13.592367006650065 03:52:26 <|Steve|> Those that used a tree took hours and I killed them before they finished. Those that used a hashtable took a few minutes. 03:52:45 |Steve|: 14 isn't a massive constant, did they use a binary tree, or a red black tree? 03:52:46 --- nick: filz -> phip 03:53:04 --- nick: phip -> philp 03:53:06 --- join: slipstream-- (n=irssi@ppp85-140-72-92.pppoe.mtu-net.ru) joined #haskell 03:53:25 |Steve|, the best bit of advice I have ever gotten on programming was "forget all the fancy trees, just use a hashtable" 03:53:28 <|Steve|> RyanT5000: That seems to imply that the answer to my original question is give up and use the IO monad. 03:53:45 Adamant: allow me to reverse that: forget all the fancy hashtables, just use a decent tree :) 03:53:46 |Steve|: i marked a very similar assignment, those that did unbalanced treees failed, as did those who used a hash table of size 100 (or 11, in one case), but a nice red-black tree was just fine 03:53:47 <|Steve|> ndm: It was in java so whatever the TreeMap uses. My guess is red-black trees. 03:54:03 |Steve|: not necessarily, but it is one case in which the implementer *did* end up giving up 03:54:14 |Steve|: Haskell is designed for this kind of thing, so i suspect Haskell will outperform TreeMap 03:54:14 it's all impure if you dig deep enough :) 03:54:15 --- join: Stinger (n=Stinger@219-90-162-51.ip.adam.com.au) joined #haskell 03:54:37 Adamant: can i rephrase that, "forget all the fancy data types, just use whatever suits your language best" 03:54:53 ndm, that's pretty much what the guy was saying. :) 03:54:53 in most scripting language, that is a hash table, but in Haskell its not 03:54:56 Haskell's Data.Map actually is implemented as a tree 03:55:00 <|Steve|> And the constant is closer to 20 there. 03:55:00 I agree 03:55:08 --- join: greendale (n=p@1-1-5-3a.asp.sth.bostream.se) joined #haskell 03:55:23 for the language he was talking about, hash tables made sense. 03:56:00 i use them all the time when doing javascript work, and have never used them once when doing Haskell 03:56:02 <|Steve|> RyanT5000: And that depresses me about pure languages. They aren't because they can't be. 03:56:48 I bet a haskell tree would run faster than a Java hash table ;) 03:56:58 |Steve|: well, the universe is stateful; c'est la vie 03:57:00 |Steve|: was the hash table keyed on String's by any chance? in which case a Trie would probably woop both the hash table and binary tree, and is entirely pure 03:57:00 Hashtables suck anyway. 03:57:34 ndm: At which point you get into hash tries etc. 03:57:40 --- nick: alar -> alar_away 03:57:52 the beauty of Haskell is that it very clearly specifies where the impurities are 03:58:09 and enforces strict hygiene around them 03:58:34 <|Steve|> ndm: Yes, it was, and you are, of course, correct about a Trie. 03:58:42 |Steve|: with languages like haskell we're just trying to carve out a little enclave of purity, because it's nicer to work with 03:58:53 (better for proving things, etc.) 03:59:01 RyanT5000, except when it isn't nicer to work with :) 03:59:12 jbauman: right :P 03:59:14 i think that one day someone will figure out how to do a nice pure Hash table 03:59:18 but then we drop down to stateful computation 03:59:25 that Haskell also provides nice tools for 03:59:25 its not been done yet, but it will be 03:59:41 I don't know. I'm finding that monads regiment statefulness in such a fashion that it's quite good for formal verification purposes. 03:59:45 yeah, besides being a beautiful functional programming language, haskell is a darn goo imperative one 03:59:59 *good 04:00:05 Pure hashtables aren't to be bothered with; use the MArray garbage etc. 04:00:07 <|Steve|> I find that everyone talks about wrapping up the stateful stuff in a monad, but that doesn't really happen given that main is in the IO monad so everything would seem to be. 04:00:36 ah. ;) 04:00:39 almost. :) 04:00:58 |Steve|: not really sure what you mean about 'doesn't really happen' 04:01:03 |Steve|: it does... 04:01:09 |Steve|: the good thing about monads is that you can escape them with for example liftM 04:01:15 pure operations on monadic values 04:01:26 it's just that not all calculations need to be concerned with side-effects 04:01:47 |Steve|: a function isn't considered "in" IO if it doesn't take or return IO ;) 04:01:50 and those that aren't are clearly marked, and are ensured not to suffer from them 04:02:08 (barring other processes mucking around in the haskell program's memory space, ofcourse) 04:02:24 <|Steve|> quicksilver: Remind me where I said "doesn't really happen." 04:02:28 Well, the point isn't to "escape" monads, it's to work with them in an effective fashion. 04:02:37 <|Steve|> I scrolled up a bit, but I seem to have already forgotten what I said. =) 04:02:58 wli: yes, of course 04:03:18 your previous sentence, |Steve! 04:03:28 but escape in the sense that a haskell program have parts that are not operations in the IO Monad 04:03:33 <|Steve|> Haha, oh that one. =) 04:03:58 :) 04:04:13 <|Steve|> Haskell's use of encapsulate doesn't coincide with my understanding of the word. 04:05:02 |Steve|: How good are you with monad transformers? 04:05:07 <|Steve|> Not at all. 04:05:11 <|Steve|> I know nothing about them. 04:05:27 you need not 04:05:29 |Steve|: Okay, the "big deal" in this area appears to be them. 04:06:32 Steve, what is your understanding of the word? 04:06:47 <|Steve|> To keep separate. 04:07:20 Steve, and what is the Haskell use, from your point of view? 04:07:34 --- quit: slipstream (Read error: 110 (Connection timed out)) 04:07:58 --- join: fmardini (n=fmardini@80.90.161.5) joined #haskell 04:08:27 --- join: tcr (n=tcr@p54873182.dip0.t-ipconnect.de) joined #haskell 04:09:01 <|Steve|> In terms of other languages, such as OO languages, one would encapsulate some related operations into a class, for example. That class shouldn't be making calls back out or you have a layering violation (I'm generalizing here). So basically, the encapsulated part is self-contained. In Haskell, you start out in the IO monad with main and go from there. There is no encapsulation in that sense. 04:09:24 yes, there is 04:09:27 yes, there is 04:09:30 <|Steve|> Heh 04:09:31 you don't make calls back out 04:09:32 :) 04:09:38 your intuition is quite right 04:09:46 it's good style to have most of your program 'pure' 04:09:53 and that part doesn't "make calls back out" to the IO monad 04:09:54 <|Steve|> Right, you're stuck in the IO monad for the duration. 04:09:58 it's IO code that calls pure code, not the other way around :) 04:10:00 <|Steve|> There's no encapsulation of IO. 04:10:08 there is complete encapsulation of IO 04:10:19 <|Steve|> Fine, that I can accept, but that isn't how it's described in what I've read. 04:10:19 yes there is, you can have pure operations 04:10:27 It is true of all languages/paradigms that it is a good idea to have the core logic "pure" (hence MVC etc. in OO style coding) 04:10:46 main = let a = pure_fun 42 in do {putStrLn "Cool program starting"; putStrLn $ "Result was "++ show a } 04:10:57 |Steve|: ^^ see? pure_fun contains no IO 04:11:04 yep 04:11:08 so the IO is completely encapsulatied 04:11:22 the type system *guarantees* that pure_fun can't do any IO 04:11:34 |Steve| think of your program as a snow capped mountain - the snow is IO, non-snowy is pure 04:11:38 just look at the type sig, if there is no IO something, it can't have side-effects 04:11:42 so not only do you have encapsulation, you have encapsulation statically guaranteed by the compiler 04:11:49 yep 04:11:53 this is a much stronger encapsulation than most languages can attain 04:12:06 <|Steve|> But it's reverse encapsulation. 04:12:16 how so? 04:12:17 it only looks that way to you because your brain is inside out 04:12:19 <|Steve|> The pure code is encapsulated. 04:12:30 <|Steve|> Heh, no one has ever made that claim before. 04:12:31 no, side-effects are encapsulated 04:12:44 i'm not sure encapsulation is directional 04:12:48 steve: the encapsulation defines a barrier, right? 04:12:49 Heh. "The sentence isn't reversed, you're reading it backwards". 04:13:01 <|Steve|> I think of it as a container. 04:13:02 if the pure is encapsulated, doesn't that kind of mean the impure is also encapsulated? 04:13:07 --- quit: ChilliX () 04:13:10 is it really necessary to determine which side of the barrier things are on? 04:13:31 <|Steve|> Maybe not, but you see now why it doesn't coincide with my understanding of the word, right? 04:14:08 <|Steve|> My complaint is that it seems like the pure code is encapsulated, it doesn't care about the IO at all. The reverse cannot be said. 04:14:36 ah, but that's the thing, really 04:14:36 well the point is that "caring about pure code" is not a problem 04:14:45 the 'side effects' are encapsulated 04:14:48 whereas "caring about IO code in non-IO code" is 04:14:50 |Steve|: that's like saying that "my graphics code isn't encapsulated from the sine function" 04:15:17 there's no layering violation; if the situation you described were reversed, *then* there would be a layering violation 04:15:22 and only code that is explicitly in the IO monad is subject to the side effects 04:15:30 all other code isn't 04:15:30 --- join: QplQyer (n=jeroen@dD5E09C0D.access.telenet.be) joined #haskell 04:15:49 (barring, once again, nastiness such as mucking about in memory spaces) 04:15:59 (and unsafePerformIO) 04:16:17 (barring a high-energy cosmic ray hitting your processor) 04:16:43 <|Steve|> RyanT5000: I wouldn't say that it was. I'd say that the sine function is encapsulated from your graphics code though. 04:16:46 <|Steve|> I think you just made my point. 04:16:57 |Steve|: no, you just made my point 04:17:16 |Steve|: well in the same way the pure code is encapsulated from the IO code! 04:17:18 |Steve|: that's the point: your whole program is a utility function (like sine) that main uses 04:17:42 ok maybe i understand you a little better now 04:17:47 why do you want IO to be encapsulated? 04:17:56 --- join: zx]treads (n=root@83.212.85.169) joined #haskell 04:18:04 <|Steve|> I don't. But I also don't describe it that way. 04:18:19 <|Steve|> opqdonut: Yes, that was my point. 04:18:49 wasn't your claim that pure code is _not_ sufficiently encapsulated 04:19:02 <|Steve|> Nope. 04:19:13 you're saying that *we* say that IO is encapsulated 04:19:18 <|Steve|> Yes. 04:19:45 so, here's what i'd say 04:19:48 in haskell 04:19:56 IO is encapsulated 04:19:58 main is not 04:20:08 buh? 04:20:17 so, the concepts that IO uses 04:20:27 or, the concept of Input/Output 04:20:30 is in System.IO 04:20:38 and doesn't depend on too much other stuff 04:20:45 --- quit: cognominal_ (Read error: 104 (Connection reset by peer)) 04:20:49 i.e.: the *type* IO is fairly well encapsulated 04:20:56 <|Steve|> I agree with that. 04:21:08 <|Steve|> As was pointed out, the compiler guarantees it. 04:21:10 the function main - or any other function - is only encapsulated with respect to the things you don't import 04:21:57 then again, in pretty much any language, pretty much anything you import can violate encapsulation 04:22:29 in fact, anything your main function is encapsulated from *doesn't exist* (for the purposes of the produced binary) 04:23:08 so i don't think anyone is trying to say that a particular IO function, or that IO functions in general, are generically "encapsulated" 04:23:20 just that the concept of Input/Output is encapsulated in the type IO 04:23:29 At some point I'll have to clean up the brutally hacked together terminfo parser. 04:23:31 and that we have all these guarantees that ensure it can't escape 04:24:24 <|Steve|> I don't disagree with you. I'm only objecting to the description I usually see. 04:24:44 URL? 04:25:13 * wli looks at Reed-Solomon coding for less crappy of file formats. 04:25:19 --- quit: mr_tenor (Remote closed the connection) 04:25:40 wli: those are pretty cool; i'm going to use them in a project i'm working on right now 04:25:54 --- quit: qatal (Connection timed out) 04:25:55 <|Steve|> RyanT5000: If the request was to me, it's 4:30 and I don't have one now. 04:26:00 i *still* can't figure out how i'm supposed to deserialize this damn GADT 04:26:00 <|Steve|> In fact, I'm off to bed. 04:26:04 --- quit: dancor ("brb") 04:26:07 RyanT5000: Is the Reed-Solomon code going to be in Haskell? 04:26:09 |Steve|: alirght, cya 04:26:13 <|Steve|> Goodnight. 04:26:15 wli: certainly :) 04:26:25 and probably GPLv3 04:26:26 RyanT5000: unlock the MVar? 04:26:40 wli: i still don't understand what you mean about MVars 04:26:55 i need to extract my datatype from a ByteString (or equivalent) 04:26:58 RyanT5000: Well, whatever kind of lock you're using to serialize access to it. 04:27:03 no no 04:27:10 not *that* kind of serialize 04:27:24 the kind that means the same thing as "marshal" and "pickle" 04:27:42 Marshalling doesn't sound so involved. 04:27:45 sorry, i didn't even think of that meaning of the word 04:27:59 --- part: lomeo left #haskell 04:28:04 wli: maybe you could point me in the right direction? i'm getting ridiculous type errors 04:28:20 http://hpaste.org/1957#a2 04:28:22 RyanT5000: hpaste? 04:28:57 those three snippets of code aren't the most coherent 04:29:11 but i'll welcome any way of reading and writing this gadt 04:29:28 There's no attempt to parse values of your type. Why not derive Read? 04:29:40 you can't derive things on GADTs 04:29:52 Oh, that's irritating. 04:30:23 Well, what do your attempt at defining read instances look like thus far? 04:30:40 well, i haven't been attempting to define a read instance 04:30:40 @pl writeFile f r = L.writeFile f (fromRope r) 04:30:40 writeFile = fix ((((L .) .) .) . flip flip fromRope . ((.) .)) 04:30:46 writeFile f r = writeFile f (fromRope r) 04:30:50 @pl writeFile f r = writeFile f (fromRope r) 04:30:50 writeFile = fix (flip flip fromRope . ((.) .)) 04:30:53 hrm 04:30:54 the stuff i've been trying is pasted below 04:31:05 --- nick: _roconnor -> roconnor 04:31:08 really no better way to pl that? 04:31:12 Does YHC have a GHC backend? 04:31:13 it's a binary serialization routine 04:31:26 RyanT5000: the problem i think is that you want to know your env type statically when in reality you reconstruct it from stack of constructors, right? 04:31:51 --- quit: nominolo ("bye") 04:31:53 Saizan: yeah, that sounds like it could be it 04:32:07 @pl hPut h r = hPut h (fromRope r) 04:32:07 hPut = fix (flip flip fromRope . ((.) .)) 04:32:09 ugh 04:32:27 --- join: whoppix (n=whoppix@193.91.240.166) joined #haskell 04:32:35 flip flip flip flip ... 04:33:04 desp: why not just "hPut h = hPut h . fromRope" 04:33:09 --- quit: ski (Read error: 104 (Connection reset by peer)) 04:33:15 RyanT5000: Binary? 04:33:18 opqdonut: indeed, why not 04:33:26 wli: yes, that's what i was attempting to use 04:33:32 ahh. 04:33:36 however, i realized that Binary can't actually be used 04:33:42 I am freaking lambdabot out with the recursion 04:33:42 --- join: ski (n=slj@c-9813e055.1149-1-64736c10.cust.bredbandsbolaget.se) joined #haskell 04:33:46 because the get function can fail 04:33:50 RyanT5000: Well, it shouldn't matter so long as it's all there. 04:33:50 RyanT5000: when you deserialize it, do you know which is the env type in advance? 04:33:53 @pl newhPut h r = hPut h (fromRope r) 04:33:53 newhPut = (. fromRope) . hPut 04:33:58 Saizan: yeah 04:34:00 ahhh 04:34:14 @unpl newhPut h = hPut h . fromRope 04:34:14 newhPut h c = hPut h (fromRope c) 04:34:23 opqdonut++ 04:34:28 This looks so bizarre. All these people are saying stuff about locking when they mean parsing and printing etc. 04:34:35 lambdabot-- 04:35:45 Saizan: maybe i should try factoring out the env thing? 04:35:49 i'm not sure if that could work 04:36:09 actually, no, it definitely couldn't 04:36:15 oh wait, maybe 04:36:17 i'll give it a shot 04:36:50 I'm not sure how you're supposed to capture typeclass constraints on some of these type variables not mentioned as parameters of the type. 04:36:59 Lambda :: Exp (t, env) a -> Exp env (t -> a) 04:37:05 What the heck is that? 04:37:13 wli: do you know what GADTs are? 04:37:20 it's a declaration of a GADT constructor 04:37:40 Only env and a are mentioned in the signature. There's no way to put a typeclass constraint on t. 04:37:54 gadts arent standard haskell 04:37:58 wli: why are typeclasses involved? 04:37:59 RyanT5000: "That" referred to the loose type parameter t 04:38:10 RyanT5000: no, but i think you need to have more than one Get instance, so you can have type-level recursion 04:38:11 how is it loose? 04:38:16 as far as I know anyway :P 04:39:00 RyanT5000: Because you can't marshal the arguments to the data constructor unless the types of the arguments are all parameters of the type constructor or derived from them. 04:39:13 wli: t is not loose, and the top env and a are not tied to the others 04:39:42 wli: you could have written data Exp :: * -> * -> * where .. 04:39:54 Saizan: There's no way to have an instance. 04:39:57 --- join: Arnia (n=jgeldart@client-82-9-16-218.manc.adsl.virgin.net) joined #haskell 04:40:44 wli: i still don't see what your problem is? 04:41:28 instance (Read env, Read a) => Read (Exp env a) where ... 04:42:34 wli: the env is never stored in the Exp 04:42:40 Ugh, no scope for the fscking type variables. 04:42:52 you can write that, but you probably need instance Read (Exp env a), Read a => Read (Exp (t,env) a) ... 04:43:27 Saizan: the main problem, i think, is that i don't know how to make the instances not overlap 04:44:17 * wli is beginning to suspect he may not entirely understand GADT's. 04:44:40 so, the only point of env is to let me build up a heterogeneous list 04:44:41 you env looks like (Foo,(Bar,())) ? 04:44:45 yeah 04:45:10 so you can do something like set the environment as (5, ("Hello", ())) 04:45:24 then Top would evaluate to 5 04:45:31 tuples as lists? 04:45:40 (Pop Top) would evaluate to "Hello" 04:45:47 Stinger: yes 04:45:47 --- quit: dolio (Read error: 104 (Connection reset by peer)) 04:45:53 so that they can be heterogeneous 04:46:02 and so that it can all be done statically 04:46:22 so Get (Exp env a) => Get (Exp (t,env) a), and Get (Exp () a)? 04:46:54 Saizan: that's one route i haven't gone down yet; it looks like it might work 04:47:02 --- join: ADEpt (n=ADEpt@jabber.hst.ru) joined #haskell 04:47:24 you'll need Get context on a also, for Lit 04:47:33 yeah 04:47:39 (is the class called Get? i vaguely remember) 04:47:40 right now i'm ignoring lit 04:47:58 well i can't use the classes from Data.Binary 04:48:01 well, the class 04:48:04 which is called Binary 04:48:15 because i want to return Nothing when it *isn't* a legitimate expression 04:48:48 right 04:49:32 --- join: dolio (n=dolio@216.68.188.68) joined #haskell 04:49:42 --- part: doublef left #haskell 04:50:04 --- join: laziest (n=abhay@pratapgad.unipune.ernet.in) joined #haskell 04:50:14 * wli is clueless on the existential type front. 04:50:27 there's no existential here 04:50:33 --- join: Saul_ (n=Saul@10-15-ftth.onsnetstudenten.nl) joined #haskell 04:50:53 yeah, also they seem to be broken 04:51:11 if i put an existential qualifier in Lit, e.g. Lit :: Show a => a -> Exp env a 04:51:18 i still can't unpack the lit and use show 04:51:26 i'm pretty sure that's wrong 04:51:36 that's fixed in 6.7 04:51:41 sweet 04:51:43 There appears to be some relation between existential types and GADT's that I'm unaware of, or so the GADT wiki page says in its parsing example (which is a naive example that doesn't compile, then they mention existential types and never show a working version). 04:51:45 bzlib won't build - any idea how you tell a cabalised program where to find extra headers? 04:51:48 i need to start using the "unstable" builds 04:51:50 --- quit: laziest (Client Quit) 04:52:14 i'm sure haskell's "unstable" will still be the most stable piece of software on my machine 04:52:18 -q 04:52:37 (special "thanks" to atheros' wireless driver >:-|) 04:52:43 RyanT5000: i'm not so sure :) it's not guaranteed to build 04:52:46 blackdog: http://hpaste.org/1958 04:53:02 Saizan: well, if i get one that builds, anyway 04:53:51 --- part: matt__r left #haskell 04:54:08 there are also nightly builds 04:54:13 any SIB fans? i wonder if it's possible to do something like mkQ :: r -> (b -> r) -> a -> r, but rather than having b be a particular type, have it be existentially quantified. mkQ :: r -> ((forall b. Num b => b) -> r) -> a -> r, for example. 04:54:28 also, it seems as though GHC's release cycle is picking up the pace? 04:54:32 I suspect I'm not really understanding GADT's at all. 04:54:46 wli: they're pretty tricky; this is my first time using one other than for fun 04:54:51 wli: what's up with GADTs and existentials? 04:55:12 matthew-: I have no idea. I suspect I don't understand a bloody thing. 04:55:25 Saizan: i am pretty sure i have to use overlapping classes here 04:55:54 RyanT5000: instances you mean? well i use them quite liberally.. 04:55:54 Saizan: if i instance Deserializable (Exp (t, env) a), then i can't deserialize Top, because it requires t == a 04:56:04 Saizan: yeah, that's what i mean 04:56:15 wli: ok, so GADTs are really quite nice in that they allow you a lot of control over type parameters and so forth 04:57:22 Saizan: what's the class that determines the equality of two types usually called? 04:57:33 Saizan: i know i've seen it in papers a bunch 04:57:33 --- join: cognominal_ (n=cognomin@191.208.64-86.rev.gaoland.net) joined #haskell 04:57:43 --- quit: cognominal_ (Remote closed the connection) 04:57:54 wli: existentials allow you to "hide" type variables, which generally leads to extreme pain, but there are a few very useful cases 04:57:56 --- join: cognominal_ (n=cognomin@191.208.64-86.rev.gaoland.net) joined #haskell 04:58:24 the main use case of existentials is to enable OO-style "programming against interfaces", via type classes 04:58:29 --- join: Arnia_ (n=jgeldart@client-86-27-142-213.winn.adsl.virgin.net) joined #haskell 04:58:30 RyanT5000: something like Teq? 04:58:44 Saizan: yeah, although i thought i remembered seeing a catchier name :P 04:58:49 i'm just calling it SameType :P 04:58:52 psykotic: I can see why you'd say that, but I don't think I've ever used them for that! 04:59:05 the "problem" with type classes is that the dictionaries that implement the class operations are packaged with the type, rather than with values of the type. you can fix that with existentials, since an existential value is essentially a "package", consisting of a type T and a value x :: T. 04:59:31 so a value of an existential type that's quantified over a type class carries the dictionary around with it 05:00:03 Saizan: actually, i can't think of a way to cleanly separate it; i'm going to have to use a special version of that 05:00:05 matthew-_, that's how i use them, and they're very useful that way. 05:00:16 psykotic: yeah, I can see that 05:00:37 --- join: paolino (n=paolino@151.82.3.156) joined #haskell 05:00:49 psykotic: have you got a neat little example of that style in use that you can paste? 05:01:02 ola folks, I have my daily doubt :) 05:01:03 matthew-_, http://programming.reddit.com/info/2aioh/comments/c2alre 05:01:04 Title: 37 Reasons to Love Haskell (playing off the Ruby article) (reddit.com) 05:01:37 --- quit: Arnia (Read error: 110 (Connection timed out)) 05:02:06 dispositions k xs = [x:d | t@(x:_) <- tails xs , d <- dispositions (k-1) t] -- isn't equivalent to 05:02:07 dispositions k xs = [head t:d | t <- tails xs , d <- dispositions (k-1) t] -- ? 05:02:10 --- quit: seafoodX () 05:02:16 matthew-_, clear enough? 05:02:25 psykotic: indeed 05:02:26 --- join: qatal (n=chatzill@203.173.169.118) joined #haskell 05:02:31 --- quit: qatal (Client Quit) 05:03:08 matthew-_, you actually don't technically need type classes; you can existentially quantify over a record, and instead of having types implement type class, you can have a "constructor" that converts from a value of the type to that record type. 05:03:18 matthew_-, but i find this style cleaner and more convenient. 05:03:56 psykotic: I find that when unpacking values like Intersectable, I always have to use case .. of in order to stop GHC exploding (either "My Brain Exploded" or "Existential type escapes"). Your snippet almosts suggest you can do it in the pattern match? 05:04:19 paolino: because the first filters out empty lists 05:04:45 matthew-_, in this example you don't have to do anything. the only thing you can do instances of Intersectable is to kill intersect on them, and that works easily. 05:04:56 paolino: when a pattern match fails in a list comprehension that element is ignored 05:05:05 Saizan: now it's asking me to turn on -fallow-incoherent-instances :( 05:05:07 that sounds bad 05:05:22 that's usually bad 05:05:35 0_O, Saizan thanks and nice to see you 05:05:37 http://holomorphy.com/~wli/GADT.hs is my first thought of how to use the things. 05:05:44 --- join: slipstream (n=irssi@ppp85-140-75-246.pppoe.mtu-net.ru) joined #haskell 05:05:53 well right now i have instances for DeserializableTop (Exp (t, env) t) 05:05:54 and for 05:06:04 psykotic: ahh, ok. 05:06:04 DeserializableTop (Exp (t, env) a) 05:06:15 because Top only makes sense if those types are the same 05:06:47 (top retrieves the top value from this heterogeneous stack) 05:08:00 Saizan: how bad is -fallow-undecidable-instances? 05:08:04 that one's ok, right? 05:08:09 mmhh.. why tails return an empty list as last element ? 05:08:34 RyanT5000: yes 05:08:44 paolino: if it wouldn't, you couldn't run it on an empty list 05:09:04 RyanT5000: turning on incoherent instances is normally a step too far - you can get "the wrong answer" with that, whereas undecideable and overlapping are "safe" (other than potential non-termination of type checking) 05:09:33 wli: have you seen the classical use case of GADTs, like a LC interpreter? 05:09:33 ok, I see it's a goat's wool question :) 05:09:36 matthew-_: is there any other way to return one value if the two types are the same and another value if they're different? 05:09:45 --- quit: alar_away (Read error: 110 (Connection timed out)) 05:09:53 wli: oh wait, that's what your example is :) 05:09:55 i want different things for: (Exp (t, env') t) and (Exp (t, env') a) 05:10:25 matthew-_: To answer your question from 24 hours ago (I think. Crossing the pond screws up my sense of time), I start next week. :) 05:10:32 RyanT5000 - create a class over a, b and give it a member function foo :: a -> b, then make those two things instances of the function 05:10:47 wli: you have to leave out the t parameter when using the data ... where ... definition style. basically instead of the parameter being "bound" at the top, it can vary on a per-constructor basis, and that's what gives GADTs additional power over plain old ADTs. 05:11:26 psykotic: Greek to me. 05:11:34 wli: okay, quick example then. 05:11:55 dozer: i'm not sure how i'm supposed to provide values, or even properly-typed bottoms for that parameter though 05:12:54 wli: a plain old ADT: data Triple a = T a a a. written in the data/when style: data Triple a where T :: a -> a -> a -> Triple a. 05:12:58 and i think the fact that it doesn't take an argument is what's giving me the incoherent-instances thing 05:13:07 wli: those are exactly the same. 05:13:38 RyanT5000: can you paste some example code into patebin? Just so I can get a feel for what you're up to 05:13:43 --- join: decaf (n=mehmet@88.250.170.121) joined #haskell 05:13:47 dozer: yeah, just a sec 05:14:02 --- part: tjm1983 left #haskell 05:14:20 wli: it's an interesting implementation. given that the primes method uses your other one, and that (in my implementation at least) almost all of the time was spent in encoding, it's not terribly surprising that the primes method is slower... 05:14:21 RyanT5000 pasted "The newest version" at http://hpaste.org/1959 05:14:22 wli: the additional power of GADTs comes from the fact that the return type of the constructors doesn't have to be Triple a. you could have a constructor Foo :: Int -> Triple Int. 05:14:40 DRMacIver: eek, you're on the wrong side of the pond now? 05:14:56 psykotic: sucked into haskell? :) 05:15:22 wli: in that GADT.hs thing you posted, this is used in the LitChar, LitInt, LitFloat constructors. 05:15:27 vincenz, yeah :) 05:15:30 can I get a link? 05:15:44 matthew-_: Well, I'm on the right side of the pond now. 05:15:45 psykotic: I'm clueless as to what to do for the other cases. 05:15:50 matthew-_: But I was on the wrong side of the pond. 05:15:56 wli: link? 05:16:23 dozer: basically, Exp uses env to build up a list of types, which describes a heterogeneous list which is the environment 05:16:26 it's used as a stack 05:16:38 right RyanT5000, I had the exact same problem with my negative-normal-form rewriter post to haskell-cafe 05:16:53 did you manage to solve it? 05:17:06 psykotic: there's fancier tricks than that 05:17:11 bsically 05:17:18 you an define a bunch of tags 05:17:18 if you make eval something like: 05:17:18 class a b | a -> b where eval :: Expr env a -> Expr env b 05:17:20 data Exp_ 05:17:22 data Stm_ 05:17:27 then you an have 05:17:39 IfThenElse :: Exp -> Stm -> Stm -> Stm 05:17:41 where 05:17:49 --- nick: xinming_ -> xinming 05:17:50 type Stm = AST Stm_ 05:17:50 dozer: how can i get the result out, then? 05:17:54 Saizan annotated "Is there any way to serialize/deserialize this?" with "this compiles, may it work?" at http://hpaste.org/1957#a3 05:18:04 * roconnor tries to install JHC. 05:18:08 RyanT5000: basically, you need to have a class representing equality of type parameters. You can then use membership of that class in the context of your instances for the function you wish to override 05:18:25 vincenz, i was talking about his specific example. 05:18:39 psykotic: I don't have a link yet : 05:18:41 :| 05:18:48 so the class acts as proof that the two type params are equal 05:18:48 Saizan: i'll try it 05:18:50 --- join: doublef (n=doublef@85.172.95.82) joined #haskell 05:19:03 RyanT5000: ah, so something more like class a b | a -> b where eval :: Expr env a -> env -> b 05:19:47 dozer: yeah 05:19:59 dozer: although a should always be equal to b 05:20:04 --- quit: slipstream-- (Read error: 110 (Connection timed out)) 05:20:06 that's its purpose 05:20:13 @shapr 05:20:13 * lambdabot smacks about with a large trout 05:20:18 No, that's not it. 05:20:22 it works really well for everything but deserialization 05:20:27 @call-sh 05:20:27 Unknown command, try @list 05:20:29 @list 05:20:29 http://www.cse.unsw.edu.au/~dons/lambdabot/COMMANDS 05:20:46 @get-shapr 05:20:47 shapr!! 05:20:58 you can do, e.g.: (Lambda (App (App (Lit (==)) Top) (Pop Top))) 05:21:21 eval (that) ("Hello", ()) "Hello" 05:21:26 that returns true 05:21:34 etc. 05:21:36 hmm, sounds prologish 05:22:20 --- quit: gimbo ("Leaving") 05:23:58 opqdonut: not so much; it's not exploring trees or anything 05:24:04 it's just a language that isn't designed for humans at all :P 05:24:15 (does that make it prologish? :P) 05:24:57 RyanT5000: just annotating that post a bit... 05:25:05 dozer: thanks 05:25:15 psykotic pasted "gadts for theorem proving - for wli" at http://hpaste.org/1960 05:25:22 --- join: arjanb (i=borganis@borganism.student.utwente.nl) joined #haskell 05:25:37 Hmmm JHC seems out of date. 05:25:39 wli: you might find that interesting if you like the curry-howard isomorphism. 05:25:43 --- quit: ski (Remote closed the connection) 05:25:46 --- join: gimbo (i=gimbo@mini.theravensnest.org) joined #haskell 05:25:47 --- join: ski (n=slj@c-9813e055.1149-1-64736c10.cust.bredbandsbolaget.se) joined #haskell 05:26:16 --- join: sad0ur (n=sad0ur@rb1a240.net.upc.cz) joined #haskell 05:26:21 (anonymous) annotated "The newest version" with "(no title)" at http://hpaste.org/1959#a1 05:26:32 wli: you can read types as proof obligations and the GADT constructors as axioms/inference rules. 05:26:50 I can't make sense of any of it yet. 05:27:03 not done a very good job - basically, you parameterise Exp over one type for each kind of expression, and you capture in that extra type the 'shape' of the expression tree 05:27:04 --- quit: noj_ ("leaving") 05:27:04 * roconnor gives up trying to build JHC. 05:27:14 --- join: MarcWebe1 (n=marc@pD9E0BFA8.dip.t-dialin.net) joined #haskell 05:27:38 --- join: nominolo (n=nominolo@intothevoid.csbnet.se) joined #haskell 05:27:40 --- join: noj (i=jon@gonzo.vexed.se) joined #haskell 05:27:41 --- quit: cognominal_ (Client Quit) 05:28:39 @localtime dons 05:28:40 Local time for dons is Mon Jul 30 22:27:26 2007 05:28:50 --- join: EvilTerran (n=Irrel@cpc5-broo4-0-0-cust230.renf.cable.ntl.com) joined #haskell 05:28:53 tcr pasted "GHC: uninformative error message" at http://hpaste.org/1961 05:29:30 dozer: hm, ok 05:29:52 GHC hackers around? 05:29:54 audreyt_: Thanks for the perl fix! 05:29:55 tcr: I think that was fixed recently. 05:30:05 wli pasted "Not understanding GADT's" at http://hpaste.org/1962 05:30:37 Lemmih: Nice. That's the kind of information I wanted to hear before bothering complaining officially. :) 05:31:02 dozer: Not sure what you mean wrt. one type for each kind of expression. 05:31:58 hum, one for each constructor (or group of constructors that behave the same in eval and friends) 05:32:30 let it be known that i think this is ridiculous 05:32:32 dozer: Constructors are just strings, as are primitives. I've no idea what arity they really are. 05:32:37 and that we should give up on having a "total" type system 05:32:42 and just let me program the damn thing 05:32:44 lol 05:32:48 dozer: Never mind the types of the arguments. 05:33:14 wli: Drop the kind signatures. 05:33:28 wli: And then fix 'Maybe Pattern t'. 05:34:00 Lemmih: That did it. 05:34:09 RyanT5000: i'll post this con haskell-cafe, maybe Oleg is around :) 05:34:15 *i'd 05:34:25 --- join: daniel_larsson (n=danilo@sd-rlas.servicefactory.se) joined #haskell 05:34:26 Saizan: thanks 05:34:48 dozer: Well, I could always do the Either and (,) anonymous coproduct and anonymous tupling -only semantics. 05:34:54 (i mean, if i were you ..) 05:35:11 wli: 05:35:12 Saizan: that sounds more reasonable :P 05:35:16 data Exp :: * -> * where 05:35:23 dozer: is this shape type going to lock me into a particular shape when i deserialize? because that would not really work so much 05:35:32 vincenz: Lemmih seems to have covered it. 05:35:38 the whole point is to let any program be provided 05:36:01 ok 05:36:09 * vincenz shrugs 05:36:09 RyanT5000: it will capture only those shapes of program that are well-formed 05:36:12 I've done exactly something like this in the past 05:36:20 dozer: well, that's exactly what i want :P 05:36:35 yea :) 05:37:09 dozer: what's the deal with the return value of Top? is that a mistake? 05:37:21 Exp (t, env) u -> Top_ 05:37:29 so, make a load of dummy data types like App_, one for each constructor, and give them a type parameter for each expr the constructor chews on 05:37:29 you mean Exp (t, env) u Top_, right? 05:37:32 yup, my bad 05:37:42 dozer: alright 05:37:58 so you capture the 'shape' of the expression in these data things 05:38:02 right, i get that 05:38:09 and thread the state in the 'real' language constructors 05:38:19 oops - thread the types 05:38:21 --- quit: MarcWeber (Read error: 110 (Connection timed out)) 05:38:36 vincenz: How did you get it to do anything meaningful? 05:38:39 i just didn't know whether that could be built bottom-up or whether the shape had to be pre-known 05:38:50 wli: using ComposOp (bringert's paper) 05:38:59 I extended it to multi-parameters 05:39:28 --- join: timlarson_ (n=timlarso@65.116.199.19) joined #haskell 05:40:18 --- join: johanj_ (n=johanj@jonagold.cs.uu.nl) joined #haskell 05:40:59 --- quit: binary42 () 05:41:28 (what that gets you isvery easy travelling to modify types inside your AST) 05:41:32 (but in a meeting..) 05:41:38 --- quit: johanj (Read error: 104 (Connection reset by peer)) 05:41:48 vincez: Okay, I'll check it out. 05:41:59 --- join: MarcWeber (n=marc@pD9E0AB70.dip.t-dialin.net) joined #haskell 05:43:37 vincenz: did you write a paper on that, in the end? 05:43:49 ndm: No, I did not 05:44:23 Haskell stuff is free time stuff, which is somewhat limited by my phd work :/ 05:44:27 ?users 05:44:27 Maximum users seen in #haskell: 353, currently: 353 (100.0%), active: 22 (6.2%) 05:46:06 if you wanted to do research on using languages like Haskell to increase safety and security of programs, where would you go? 05:46:13 --- join: mnislaih_ (n=pepe@monad.dsic.upv.es) joined #haskell 05:46:17 (college-wise) 05:46:21 --- join: chumphries (n=christop@pdpc/supporter/monthlybronze/chumphries) joined #haskell 05:47:23 --- quit: MarcWebe1 (Read error: 110 (Connection timed out)) 05:48:12 --- quit: johanj_ () 05:49:11 --- join: johanj (n=johanj@jonagold.cs.uu.nl) joined #haskell 05:50:09 --- join: ddarius (n=derek@74.197.12.46) joined #haskell 05:50:59 --- join: progexp (i=ariel@gateway/tor/x-ffd3e550bec15ad0) joined #haskell 05:51:16 andyjgill's movie not up yet? 05:51:57 @seen bringert 05:51:57 I haven't seen bringert. 05:52:00 lhs2TeX and arXiv submissions make for an amusing combination. 05:52:12 @tell bringert Regarding those extra instances I made about ComposOp, mind if I write a blog article about those? 05:52:12 Consider it noted. 05:52:44 I sometimes wonder if I could publish random Haskell code I've written by just lhs2TeX'ing it. 05:53:54 RyanT5000 annotated "The newest version" with "(no title)" at http://hpaste.org/1959#a2 05:54:10 dozer: so i made the changes, but it doesn't like my instance 05:54:15 wli: I use hscolour for my blog 05:54:31 ndm: why did you ask? 05:54:38 dozer: it complains that it can't deduce Deserializable (Exp shapeX env a1) 05:54:49 wli pasted "GADT's take 2" at http://hpaste.org/1963 05:54:51 from 05:55:05 Deserializable (Exp shapeX env a) 05:55:21 wli: typically, if you use GADT, ,you stick all your stuff in one 05:55:22 GADT 05:55:28 including the pattern stuff 05:55:35 and then you type with a tag 05:55:51 type Exp t = AST Exp_ t 05:55:54 vincenz: Hmm. I'm not 100% sure how to deal with patterns there. 05:55:57 type Pattern t = AST Pattern_ t 05:56:21 vincenz: I'm missing too many pieces for that. 05:56:30 vincenz: just to read, once its done 05:56:36 I'll take a look at it in a bit (post meeting) 05:56:42 wli: what are you trying to do? 05:57:19 ndm: Work through a vanilla and/or canonical GADT example (lambda calculus stuff as a GADT). 05:58:02 there was a paper at TFP 2007, by the Oxford people, that had some good stuff in it 05:58:18 I have to write to understand it. 05:58:59 --- quit: mnislaih (Read error: 110 (Connection timed out)) 05:59:06 --- quit: kpreid () 05:59:41 vincenz: I could always shoehorn them in directly as Either constructors. 05:59:49 --- join: kpreid (n=kpreid@cpe-24-59-154-165.twcny.res.rr.com) joined #haskell 06:01:32 vincenz: Maybe not, actually. Patterns recurse. 06:01:36 Suppose I wanted to compile Haskell to an odd target (another high-level language). Is there a Haskell compiler with a useful-for-that pluggable backend? 06:03:01 wli: hmm..wow.. 06:03:05 wli: I see the issue 06:03:32 kpreid: I'm doing that by using Language.Haskell.Hsx as a parser and Text.PrettyPrint as output generator of my converted AST. 06:03:38 wli: your 't' is way off, you can not determine this until type-checking, so it's not something completely static, so it's really hard to encode this into your data-type as you do 06:03:49 wli: your 't' should stand for the syntactic type of the construct 06:03:53 tcr: I was hoping not to implement my own type inference & optimization 06:03:55 "is it an expression, a pattern, ..." 06:04:01 vincenz: Hmm. Okay. 06:04:07 --- quit: amiddelk ("Cya later") 06:04:14 vincenz: Maybe something simpler at first. 06:04:38 kpreid: Yhc is the answer 06:04:43 kpreid: Ah yeah, I'd have liked to have type inference, too, but then cut that out and solely relied on the type system of my target language. 06:04:52 kpreid: we have back ends for Java, Javascript, a Python interpetter 06:06:10 --- join: njbartlett (n=njbartle@dsl21093.fip.synapse.ne.jp) joined #haskell 06:06:23 kpreid: another approach might be to use ghc's C-- backend, and write a C-- frontend for your language 06:06:34 kpreid: however, yhc is proabbly a better answer 06:06:37 * blackdog is too tired to debug stack overflows. nytol! 06:06:42 wli: modifying 06:06:55 --- join: sciolizer__ (n=jball@adsl-68-74-67-233.dsl.emhril.ameritech.net) joined #haskell 06:06:55 ndm: is the output high-level enough that e.g. top-level decls (data, constructors, functions) could be exported (with translation of course) to users of a translated-module in the target language? 06:07:12 kpreid: yes 06:07:21 --- quit: paolino (Read error: 110 (Connection timed out)) 06:07:27 nice 06:07:35 kpreid: you can go in at the Core level, its pretty easy then 06:07:40 I wouldn't call that property 'high-level', I'd call it 'structure preserving' 06:07:45 but it's definitely nifty 06:08:04 indeed, the output is pretty low-level, cases and lets, but has the high level entry points preserved 06:08:06 --- join: steele_ (n=steele@e180073121.adsl.alicedsl.de) joined #haskell 06:08:23 ndm: I want an actionscript backend for writing flash applets in haskell :) 06:08:47 wli: explaiing assigmeent? 06:08:47 quicksilver: we have a javascript back end, which is also actionscript 06:08:48 the motivation for this is that somebody posted to 's list mentioning finger trees, and I was thinking of writing them in but it would be much more fun to reuse the Haskell impl 06:08:53 wli: I'm rewriting your code 06:08:58 hrm 06:08:59 ndm: right, that's why I thought it must be quite close 06:09:05 how do I install a cabal package as user? 06:09:05 vincenz: Basically it just encodes guards. 06:09:06 ndm: since they're both ECMAscript I believe 06:09:09 kpreid: for which 06:09:14 ndm: E 06:09:16 quicksilver: indeed, its just different API's 06:09:17 Setup --user --with-prefix=$HOME ? 06:09:23 vincenz: So an unguarded assignment is a plain = 06:09:25 kpreid: is E functional/imperative, lazy/strict ? 06:09:33 higher order/first order 06:09:35 make that Setup configure --user --with-prefix=$HOME 06:09:42 vincenz: So a guarded assignment is a | ... = ... | ... = ... etc. 06:09:46 wli: ok 06:10:08 desp - Setup.lhs --user --prefix=$HOME configure && Setup.lhs install 06:10:18 right. 06:10:24 Build it too (: 06:10:25 thanks, thought I was missing a step 06:10:28 ;) 06:10:33 ndm: it is object-graph, with function-like objects, run-time typed, strict (but I'm going to add a transparent laziness primitive), optionally restricted side-effects 06:10:48 --- join: jgrimes (n=jgrimes@rrcs-24-199-235-37.midsouth.biz.rr.com) joined #haskell 06:11:10 vincenz: Well, when I started hammering it out I wanted t to be the type of the variable/constructor ID's so I could tag them with the results of type inference etc. 06:11:33 ndm: (did that make sense?) 06:11:45 vincenz: I didn't give myself very long to sort that out, though. 06:12:02 Syzygy-: is using lhs2TeX with arXiv a problem? can't you just submit the generated file, and add polytable.sty and lazylist.sty to the submitted file bundle? 06:12:09 kpreid: kind of, you may have some reasonable success with the convertor - run-time typed and laziness transparently make it much easier 06:12:23 kosmikus: Yeah, sure. It took a while to figure out that polytable and lazylist were the ones to be added. 06:12:24 --- quit: sciolizer__ (Read error: 104 (Connection reset by peer)) 06:12:40 kosmikus: And right now I'm waiting for them to tell me why the resulting file gets truncated to a single page in both PS and PDF. 06:12:56 (i.e. with the .tex, the .sty's all submitted...) 06:13:04 It gets accepted so they won't show me a buildlog. 06:13:15 But the resulting preprint only has a single page. 06:13:21 Out of 16. 06:13:24 can't you look at the log file output? 06:13:35 No, it doesn't show me a log file output. 06:13:43 And in all environ's I can access, it builds fine. 06:13:58 my wife (she's a mathematician) sitting next to me tells me you usually do 06:14:18 Hmmmm. Does she know how I find that? 06:14:19 --- join: svref (n=dm@dsl093-230-014.lou1.dsl.speakeasy.net) joined #haskell 06:14:55 --- join: binary42 (n=binary42@mail.backchannelmedia.com) joined #haskell 06:15:12 Syzygy-: she says you usually can see the output during the submission process. 06:15:14 wli: it won't be clean 06:15:36 I could see output during submission as long as it went wrong. Once it went through cleanly, it stopped showing me output. 06:15:52 hmmm 06:17:25 vincenz: Beggars can't be choosers. 06:17:38 wli: nearly done 06:17:54 Syzygy-: do you get to see a partial PDF/PS when it goes wrong? 06:18:00 wli: explain pattern 06:18:06 the Either stuff 06:18:07 --- join: rj45 (n=chatzill@c220-239-157-193.eburwd1.vic.optusnet.com.au) joined #haskell 06:18:15 Syzygy-: if you resubmit a file with a deliberate error, say, on page 10, would you get back more than 1 page? 06:18:19 vincenz: Either won't work for Pattern; it's recursive. 06:18:31 wli: so what does pattern need to look like? 06:18:33 --- quit: bonfyre_ (Remote closed the connection) 06:18:38 wli: I'll just do it without records, if that's ok 06:18:50 vincenz: patternConstructor is the constructor head 06:18:51 --- part: rj45 left #haskell 06:19:05 --- quit: kfish ("nagasomen!") 06:19:23 --- join: rj459 (n=chatzill@c220-239-157-193.eburwd1.vic.optusnet.com.au) joined #haskell 06:19:28 vincenz annotated "GADT's take 2" with "better" at http://hpaste.org/1963#a1 06:19:48 --- quit: iblechbot (Read error: 110 (Connection timed out)) 06:19:55 --- join: sudoer (n=jtoy@mail.backchannelmedia.com) joined #haskell 06:20:03 ack 06:20:03 mistake 06:20:26 --- quit: sciolizer_ (Read error: 110 (Connection timed out)) 06:20:54 vincenz annotated "GADT's take 2" with "fixed a bug in Ta" at http://hpaste.org/1963#a2 06:21:11 kosmikus: Trying that now.... 06:21:14 Ta..g 06:21:33 wli: use Tag to attach info to your AST tree 06:21:42 note that you can only have one type of Tag in your tree 06:21:49 Ok. Now it generates 9 pages before bombing. 06:21:57 (with the error some 9-odd pages in) 06:22:02 --- quit: beschmi (Read error: 104 (Connection reset by peer)) 06:22:25 ... and on second run through it bombs on page 1 with "LaTeX Error: Environment code undefined" .... *hmmmmmmmm* 06:22:32 OOOOOOH! 06:22:42 How do I tell it not to try to generate things from my .lhs? 06:22:44 --- join: maskd (n=quo@unaffiliated/maskd) joined #haskell 06:22:49 vincenz: So "Constr x y z" would get Pattern { patternConstructor"Constr", patternConstructorArgument=Left [(Just "x",Nothing),(Just "y",Nothing),(Just "z", Nothing)] 06:22:50 (which I want to distribute along with the rest.... but not compile) 06:22:53 --- nick: tizoc_ -> tizoc 06:23:11 --- part: zbrown left #haskell 06:23:13 Ah! 06:23:16 %auto-ignore 06:23:24 --- quit: svref ("Client exiting") 06:23:26 vincenz: What on earth are Exp_, Lit_ Const_, Guarded_ and Pattern_??? 06:23:48 wli: tags 06:23:57 vincenz: What happened to as-patterns and record patterns? 06:23:57 to make ite cleaner 06:24:09 type Exp t = AST Exp_ t 06:24:15 kosmikus: Thanks! 06:24:36 --- join: Nshag (i=user@Mix-Orleans-106-4-45.w193-248.abo.wanadoo.fr) joined #haskell 06:24:38 --- join: amiddelk (n=arie@melinda.cs.uu.nl) joined #haskell 06:24:39 And now the bloody thing complains about me timetraveling. :-/ 06:25:27 --- quit: ddarius (Read error: 110 (Connection timed out)) 06:25:41 vincenz: What's Tag? 06:25:42 Syzygy-: what are you doing!? 06:26:00 --- quit: necroforest (Remote closed the connection) 06:26:14 * roconnor thinks timetraveling should be left to the experts. 06:26:45 Syzygy, causality is not to be messed around with! 06:27:00 --- join: nerdalert (n=wargolem@149.48.161.10) joined #haskell 06:27:17 * xerox still doesn't see time travellers around him. 06:27:32 roconnor: Submitting a preprint to arXiv. 06:29:38 Syzygy-: so all fixed now? 06:29:57 WOOOOOOT! 06:29:59 It works! 06:30:25 --- join: alar (n=username@62.140.253.8) joined #haskell 06:31:16 --- quit: borism (Read error: 145 (Connection timed out)) 06:31:47 Does C-t work for anybody in Emacs' haskell-mode? 06:33:58 If you're supposed to represent the types of terms directly, how do you do that for lambdas? 06:34:32 xerox: Yes, it does for me. Emacs22 w/ haskell-mode v2_1 06:36:20 --- join: MyCatVerbs (n=rb6822@sevkil.cs.bris.ac.uk) joined #haskell 06:36:40 --- join: Syzygy-_ (n=mik@unseen-university.ankh-morpork.se) joined #haskell 06:37:04 Err, I mean C-c C-t. 06:37:14 wli: to attach information 06:37:23 Tag "This is a note" (ExpLit (LitInt 1)) 06:37:24 :: 06:37:28 AST Exp_ String 06:37:48 Okay. 06:37:57 --- quit: xian (Read error: 104 (Connection reset by peer)) 06:38:08 --- quit: Syzygy- (Read error: 104 (Connection reset by peer)) 06:38:08 I could fix up a few missing arguments to types. 06:38:09 you can use this to attach type-checking info 06:38:11 --- nick: Syzygy-_ -> Syzygy- 06:38:19 (or source-code location iinfo) 06:38:48 --- join: falseep (n=falseep@218.242.117.249) joined #haskell 06:39:07 vincenz: Other examples seem to make it look like the type of the term in the represented language is supposed to be mirrored in the code somehow but I don't see how to do it for lambdas. 06:39:33 wli: I don't think this is feasible in any language excecpt ultra simple ones 06:39:48 --- join: seafoodX (n=sseefrie@CPE-143-238-248-235.nsw.bigpond.net.au) joined #haskell 06:40:42 --- join: IvdSangen (n=ivdsange@s55914d08.adsl.wanadoo.nl) joined #haskell 06:40:50 --- join: iblechbot (n=iblechbo@ppp-62-216-196-200.dynamic.mnet-online.de) joined #haskell 06:40:53 --- join: xian (i=xian@nconc.de) joined #haskell 06:40:53 --- join: rashakil (n=rashakil@pool-68-236-47-194.phil.east.verizon.net) joined #haskell 06:43:47 --- quit: moonlite_ (Read error: 113 (No route to host)) 06:46:23 --- join: msouth (i=msouth@nat/mcclatchy-interactive/x-5e26b7cc4a775e4a) joined #haskell 06:48:15 --- quit: Tychom () 06:49:05 is Data.Graph.Inductive.DynGraph good? 06:49:29 I heard it once punched a baby. 06:49:51 That's a 'yes' then? 06:49:52 did the baby punch back? 06:50:00 it's better than Data.Graph, I'm sure 06:50:06 Plus there's that vaguely brimstone-ish smell. And weirdly placed bony spikes on its head. Might be evil. 06:50:11 Data.Graph has punched many many babies 06:51:03 I need to implement an alg that recursively expands and labels a graph, backtracking when it hits stopping rules 06:51:12 --- join: edwardk (n=edwardk@pdpc/supporter/base/edwardk) joined #haskell 06:52:06 --- join: ivant (n=ivan@89.163.58.200) joined #haskell 06:53:35 --- join: Tychom (i=Tychom@195.101.42.33) joined #haskell 06:55:31 @doc Data.Graph.Inductive.DynGraph 06:55:31 Data.Graph.Inductive.DynGraph not available 06:55:47 @google Data.Graph.Inductive.DynGraph 06:55:48 No Result Found. 06:55:56 --- quit: orbitz (Read error: 110 (Connection timed out)) 06:56:01 just hoogle it the old fashioned way 06:57:25 heh @ crappy poetry: "Roses are red. Violets are blue. Google rocks. Homage to you." 06:57:45 :) 06:58:11 --- join: moonlite__ (n=moonlite@90-224-120-80-no119.tbcn.telia.com) joined #haskell 06:58:16 @remember Hoogle "Roses are Red, Violets are Blue, Hoogle rocks, Homage to you" 06:58:16 Done. 06:58:16 --- part: ivant left #haskell 06:58:20 :) 06:58:23 @botsnack 06:58:24 :) 06:58:30 @quote 06:58:31 reddi says: and now i know: IT DOES NOT WORK ALWAYS ;-) 06:58:54 okay, so DynGraph is a *class*, not a module? 06:58:54 Hahaha! I just got an email from the tunneling provider I use telling me why I lost connection previously! 06:59:00 Heh, google must like haskell, I just realized there was a 'work at google' link popping up in the ad sense stuff at comonad.com. 06:59:03 no wonder @source didn't work 07:01:35 is there a reader comonod? 07:02:14 --- join: adaptable (n=wampa@12.26.87.168) joined #haskell 07:02:19 --- join: mattrepl (n=mattrepl@hedgehog.integrity-apps.com) joined #haskell 07:02:47 edwardk: well it says right here that "Google is hiring expert computer scientists" 07:02:55 they know where to look, apparantly 07:03:08 (as if that's at all surprising!) 07:03:17 SamB_XP_: that was originally on the OS X google page, which Apple sued them over, and got taken down 07:03:58 its a kind of interesting, "remember when you got sued over interface similarity? please don't sue me" 07:04:01 samb: yeah there is a reader comonad, its the (,)e comonad adjoint to the (->)e reader 07:04:20 --- join: ihope (n=ihope@c-71-205-100-59.hsd1.mi.comcast.net) joined #haskell 07:04:21 ndm: huh? 07:04:32 what did it say on this "OS X google" page? 07:04:43 ask copies the value out of the pair, local generates a new pair. 07:05:13 SamB_XP_: http://news.com.com/Googles+X+files+vanish/2100-1032_3-5621247.html 07:05:15 Title: Google's X files vanish | CNET News.com, http://tinyurl.com/5wq26 07:05:25 wli pasted "GADT's take 3: value types need help" at http://hpaste.org/1964 07:05:53 --- quit: nominolo (Read error: 104 (Connection reset by peer)) 07:06:04 ask = fst; local = first 07:06:14 kinda clean like that 07:06:18 :t first 07:06:20 forall (a :: * -> * -> *) b c d. (Arrow a) => a b c -> a (b, d) (c, d) 07:06:33 o.O 07:06:37 What does that mean? 07:06:46 first f (a,b) = (f a, b) 07:06:52 Ahhhh. 07:06:54 when used on the (->) arrow 07:06:59 I don't know about the rest of arrows, but first, second, and *** are bloody useful. 07:07:12 > first (+3) (2,4) 07:07:14 (5,4) 07:07:19 @type (***) 07:07:20 --- join: tayloj_ (n=tayloj@wright.mm.rpi.edu) joined #haskell 07:07:21 forall (a :: * -> * -> *) b c b' c'. (Arrow a) => a b c -> a b' c' -> a (b, b') (c, c') 07:07:22 > (-2) *** (+3) (2,4) 07:07:23 add an instance declaration for (Num (b', c')) 07:07:28 i like &&& as well 07:07:33 i have to agree, i use arrows as useful tuple combinators, nothing more 07:07:35 > join (***) (+1) $ (2,3) 07:07:36 (3,4) 07:07:37 > (-2) *** (+3) $ (2,4) 07:07:37 add an instance declaration for (Num (b -> c)) 07:07:38 its useful for pointfree work 07:07:58 > (id &&& (+1)) 2 07:07:59 (2,3) 07:08:03 > (subtract 2) *** (+3) $ (2,4) 07:08:05 (0,7) 07:08:05 edwardk: Ahhh. 07:08:09 Don't you love -? 07:08:11 ihope: RIGHT! 07:08:15 *grmbl* 07:08:32 id &&& f = second f, surely? 07:08:42 dozer: any idea why it claims it can't deduce Deserializable (Exp TLit env (a -> b)) from Deserializable (Exp shapeF env (a -> b)) ? 07:08:43 EvilTerran: No. 07:08:50 > second (+2) (2,3) 07:08:51 (2,5) 07:08:59 wait... sorry, that'd be id *** f. 07:09:00 > (id &&& (+3)) 2 07:09:01 (2,5) 07:09:03 Yeah. 07:09:09 For *** it holds. 07:09:22 To my knowledge at least. :PÃ… 07:09:37 I've not quite smoked out what &&& does. 07:09:37 --- join: nominolo (n=nominolo@intothevoid.csbnet.se) joined #haskell 07:09:42 ndm: google seems cooler about that kind of thing somehow. also there is the fact that you aren't a for-profit company and you don't *have* a brand ;-) 07:09:45 @src (->) (&&&) 07:09:46 Source not found. I feel much better now. 07:09:50 (+1) &&& (*2) $ 3 07:09:50 (4,6) 07:09:55 @src (&&&) (->) 07:09:55 Source not found. Sorry about this, I know it's a bit silly. 07:09:58 anyone? any idea why ghc is complaining that it can't deduce Deserializable (Exp TLit env (a -> b)) from Deserializable (Exp shapeF env (a -> b)) ? shapeF *only* appears there 07:09:58 bah. 07:10:18 SamB_XP_: yeah, plus i no longer use their logo, following in the footsteps of booble 07:10:32 ndm: so I noticed 07:10:46 there is a similar construction for a state comonad as well. instead of (s -> (a,s)) you need (s -> a,s), then you can define get, set and modify 07:10:48 does OS X even have a logo? 07:11:12 i figured with them dontating $50000 to Haskell, i should remove it 07:11:32 Ah, (&&&) is my old zipF 07:11:45 hey you're no longer the top link for hoogle. 07:12:10 @google hoogle 07:12:11 http://haskell.org/hoogle/ 07:12:11 Title: Hoogle 07:12:20 its hard to tell, as i have personalised search, but it seems i am 07:12:23 i got http://www.cims.nyu.edu/~dhu/ 07:12:24 Title: Hoogle 07:12:26 for a long time it was hoogle.net 07:12:31 quite handy indeed 07:12:44 edwardk: me too 07:13:00 maybe they're giving lambdabot doctored results? 07:13:04 hm... f &&& g = join $ curry $ f *** g --? (for Reader, anyway...) 07:13:09 but the haskell hoogle and info about it comes up for the next 5-6 links below that 07:13:40 --- quit: iblechbot (Read error: 110 (Connection timed out)) 07:13:52 i can't even figure out what that other Hoogle is 07:13:57 EvilTerran: Yeah. 07:14:04 hmm. ndm's page links to www.haskell.org/hoogle 07:14:33 google returns haskell.org/hoogle sooner though 07:14:59 and I don't believe goole knows that they are the same thing :-( 07:15:14 I think someone who has access to the web root on haskell.org could rectify this, however 07:15:31 * wli has struggled with terminfo decoding and GADT's 07:15:44 wli: seperately, I hope? 07:15:56 SamB_XP_: Fortunately yes. 07:16:14 hrmm, in the interest of providing a more general reader interface that can handle the reader comonad, would FunctorReader or ReaderFunctor be a better name for the class? 07:16:15 --- join: oerjan (n=oerjan@hagbart.nvg.ntnu.no) joined #haskell 07:16:39 (to provide traditional ask and local functionality without biasing to Monad or Comonad) 07:16:48 MoreGeneralThanThouReader 07:16:52 wli: =) 07:17:25 edwardk: ReaderFunctor, assuming you mean Functor that Reads? 07:17:28 <_Nucleo> @pl \x -> (head x) /= '0' 07:17:29 ('0' /=) . head 07:18:27 MyCatVerb: i mean class Functor f => ReaderFunctor f r where ask :: f a; local :: (r -> r) -> f a -> f a 07:18:59 --- join: cjeris (n=Jeris@140.247.124.140) joined #haskell 07:19:06 basically MonadReader without the requirement that it be a monad. 07:19:07 Would that be ask :: f r? 07:19:14 er yeah 07:19:36 --- quit: rretzbach ("WeeChat 0.2.6-cvs") 07:19:50 guess it should be FunctorReader unless I want to rename all of MonadFoo classes to FooMonad classes. 07:20:05 bit of a bikeshed i guess 07:20:26 huh 07:20:47 we need those typeclass aliases 07:21:03 samb: yeah, my current approach is to hack it together with template haskell magic. =/ 07:22:07 I am completely unable to write a globbing function faster than a simple concat 07:22:12 * desp pasted http://pastie.textmate.org/83464 07:22:13 any ideas? 07:22:29 The idea being that you'd just say something like $(mk "Foo" [''Monad] [d| return = ...; (>>=) = ... ]) instead of providing several instance declarations 07:22:57 and then I can take advantage of extensive defaulting for unspecified items in the Q [Dec] that is the last argument. 07:24:19 --- quit: RyanT5000 (Remote closed the connection) 07:24:53 I don't know. I think avoiding unsafe idioms in the core libraries is a higher priority, though apart from changing the signature of things like (!!), head, tail, etc. to involve Maybe (or MonadPlus), I've NFI how that's done. 07:25:16 how do I build Yhc with additional include/library paths? 07:25:19 so with that basically you define the classes in one module along with all of the default methods with weights indicating implementation preference in a second, then you just instantiate them then define the instances for them in a second. 07:25:22 And maybe to ban inexhaustive pattern matches. 07:25:24 --- nick: Arnia_ -> Arnia 07:26:05 wli: if you do that, we need a syntax for expressing a single match expression as a 1st class thing 07:26:15 --- join: essiene (n=essiene@196.220.25.177) joined #haskell 07:26:21 dozer: Not sure what you mean by that. 07:26:52 --- part: tayloj_ left #haskell 07:26:54 wli: there are good efficiency arguments against removing the unsafe methods though. =/ though i'd like to see a more standardized set of phantom types to allow you to safely prove that your particular list isn't empty, etc. 07:26:55 wli: if you ban inexhasutive matches, then we need so me way to symbolically pass arround one of the cases independently of others 07:27:38 --- join: sjanssen (n=sjanssen@pcp031174pcs.unl.edu) joined #haskell 07:27:55 ndm: how do I build Yhc with additional include/library paths? 07:28:20 edwardk: I'm not convinced. All the case analysis is still there, you just get a default "crap your pants and exit, side effects be damned" case alternative implicitly inserted. 07:28:51 dozer: Like variables that hold patterns? 07:29:18 wli: just a need for a way to name polymorphic variants 07:29:20 wli: yeah 07:29:35 sjanssen: Would you like to write something about XMonad for the Monad.Reader? 07:29:43 Does Haskell have anything like Common Lisp's "condition" system? 07:29:47 swiert: what is the due date? 07:29:59 sjanssen: Last Friday ;) 07:29:59 <_Nucleo> @src inits 07:29:59 inits [] = [[]] 07:29:59 inits (x:xs) = [[]] ++ map (x:) (inits xs) 07:30:21 sjanssen: I haven't had enough submissions, so I'm trying to get a few more in over the coming weeks. 07:30:30 edwardk: Polymorphic variants? Like the subtyping bits where you can make a subtype of a coproduct type by adding more alternatives? 07:30:36 > inits [1..4] 07:30:38 [[],[1],[1,2],[1,2,3],[1,2,3,4]] 07:30:39 sjanssen: I'd like to set an extended deadline over a month or so. 07:30:45 dozer pasted "problem with lists" at http://hpaste.org/1965 07:31:13 swiert: yes, I think I can do that 07:31:30 hmm, how come we don't have Word4 and Word2 types? 07:31:36 swiert: I'll check with dons, see if he's available as well 07:31:51 sjanssen: I reckon dons is busy writing up his thesis... 07:31:53 any idea how in that paste I can get something functionally equivalent to the problem line working? 07:32:04 sjanssen: But his blog entries would make a great starting point. 07:32:04 swiert: oh, good point 07:32:10 wli: yeah some way to say vs. vs. as the type of subtypes of Maybe Int, which plays havoc with typeclass system in Haskell. 07:32:20 @seen yaxu 07:32:20 I saw yaxu leaving #haskell 22h 22m 16s ago, and . 07:33:29 Probably not then. 07:33:31 re 07:33:31 --- join: jfredet1 (n=jfredett@c-76-19-232-14.hsd1.ma.comcast.net) joined #haskell 07:33:35 swiert: sure, put me down 07:33:36 sjanssen: Thanks very much for the offer. I need to get in touch with a few other (potential) authors. I'll get back to you with a definitive deadline then. 07:33:42 wli: more or less clear? 07:34:31 vincenz: Not entirely. Did you see the GADT's take 3 (enough of a rearrangement that I've had to figure out something, though what I have no idea.) 07:34:51 --- quit: jfredett (Read error: 104 (Connection reset by peer)) 07:35:52 wli: link? 07:36:01 * vincenz was afk 07:36:06 hrmm, ok, harder bullet to bite, in a more general monad setting, does it make sense to merge 'get' and 'ask'? and 'tell' and 'put'? pro: they have the same type signatures. con: it mucks up the existing RWS monad paradigm. 07:36:11 vincenz: http://hpaste.org/1964 07:36:55 edwardk: and ReaderT r (StateT s) 07:36:58 wli: I doubt that syntactic level of typing will work well 07:36:59 yeah 07:37:06 wli: that only works for very primitive languages 07:37:11 wli: I noticed the same when I was working with IMP 07:37:26 as soon as your language becomes more complex, you can not statically type your language purely based on syntactical construction 07:37:37 --- quit: mrchebas () 07:37:43 vincenz: I'm almost completely clueless as to what to shove into the value types even for simpler examples. 07:37:45 edwardk: what's the distinction between the two in each pair, please? 07:38:07 --- join: dieJana (n=diana@host137.natpool.mwn.de) joined #haskell 07:38:21 wli: the 'value' type 07:38:23 mycatverb: well, 'get' reads state from a State monad, 'ask' reads the environment from a reader monad, which is kinda like a state monad without the ability to change it. 07:38:26 --- quit: dufflebunk (Read error: 104 (Connection reset by peer)) 07:38:29 is typically used for the type of annotation your AST has 07:38:34 for insttance 07:38:35 wli pasted "GADT for simply-typed lambda calculus" at http://hpaste.org/1966 07:38:35 it could be 07:38:42 vincenz: For instance, that. 07:38:46 'tell' writes to a writer monad, while, 'put' changes the state in a state monad. 07:39:11 wli: you see how you basically force the encoding of your data constructors into your language? 07:39:13 you can view tell as changing a 'write-only' resource, and 'ask' as reading a 'read-only' resource, while get and put access a 'read-write' resource 07:39:18 wli: it does not scale to more complex langaues 07:39:30 edwardk: I'd keep 'em seperate, personally, then. 07:39:48 vincenz: Well, surely there is *something* it makes sense to keep there. 07:40:05 mycatverbs: in the process of debating about if merging them allows other things to generalize, but i'm kinda leaning that way myself 07:40:16 wli: yes 07:40:36 wli: you can put a tag 'type' in there 07:40:38 and then something like 07:40:47 data Type = Char | Int | Type :-> Type | ... 07:41:10 or more simply 07:41:17 --- quit: ClaudiusMaximus ("electrician needs to monkey with my meter") 07:41:19 vincenz: So basically instead of shoving values in there, shove representations of types in there. 07:41:30 ... | :[] Type | ... ;) 07:41:33 data Type = Basic PrimitiveType | Type :-> Type | TyConst Const [Type] 07:41:46 edwardk: I'm leaning that way because it's identical to the difference between different types of sockets. 07:41:51 I use :-> explicitly, even though it's just a tyconst 07:42:12 then 07:42:13 you can do 07:42:20 edwardk: actully, MonadState takes anything but MonadWriter need a Moniod (i.e. something tht can be glues together, like a set or a list) 07:42:20 edwardk: put footnotes in the docs saying that tell x is equivalent to put x for certain types of x? 07:42:23 typeCheck :: AST t () -> AST t Type 07:42:24 kpreid: how do you mean "additional include paths"? 07:42:32 sjannsen: am wondering if the StateT wrapped ReaderT should in the most general setting return the outermost shell, or rather an HList of values or something. 07:42:33 kpreid: if you just type "scons" it should build it for you 07:42:34 vincenz: Primitives are supposed to be function symbols resolved to runtime system things like "+", "-", etc. 07:42:50 wli: I figured :) 07:42:51 --- part: dieJana left #haskell 07:42:56 wli: hence why you can not statically type the thing in haskell 07:43:01 --- quit: ttmrichter (Connection timed out) 07:43:02 wli: and why you must use "data Type = ..." 07:43:04 ndm: "scons" => "Error. libgmp must be installed and gmp.h made accessible before you can compile Yhc." -- how do I tell it where to look for gmp.h? 07:43:11 wli: it's in a sense "input" dependent 07:43:24 (namely your input AST and your input 'prelude' of primitiveS) 07:43:32 mycatverbs: well, right now they mean totally different things, if merged i'd prefer to keep only one name. 07:43:37 kpreid: no idea, what platform? 07:43:44 ndm: Mac OS X + MacPorts 07:43:53 vincenz: Plus constructors defined in external type signatures. 07:43:59 simonrc: that i can reflect in the typeclass hackery behind all of this. in the emd MonadWriter would look pretty much the same 07:44:02 ndm: and a custom MP install prefix, so it's *not* going to work by defailt 07:44:04 er end 07:44:09 wli: I did exactly that when I wrote a miniML compiler 07:44:11 kpreid: its been known to be hard to build Yhc on Mac, because of libgmp, perhaps email the mailing list yhc -at- haskell.org 07:44:28 except for the fact that it like everything else in my toy prelude would require a bunch of TH to instantiate without pain. 07:44:39 ndm: I have libgmp, that's not the problem; I just need to specify an include path 07:44:40 edwardk: this is rather outside the bounds of my experience, so... instinctively, don't merge. 07:44:58 kpreid: i don't know how, does "scons help" tell you? 07:45:01 --- join: cognominal_ (n=cognomin@191.208.64-86.rev.gaoland.net) joined #haskell 07:45:11 Otherwise you might end up with one function that's a (derogatory term for human genitalia) to write and use in place of two simple functions. 07:45:16 vincenz: So even the simply-typed lambda GADT is too complex to represent the values of? Are there conditions for representability here? 07:45:31 it mentions a variable for libraries, which I tried setting, but not one for includes 07:45:31 kpreid: i can't see any options that would allow that 07:45:49 wli: no I think perhaps it can be done to simply-typed lambdacalclus 07:46:00 mycatverbs: am still toying with it. i do like the notion of being able to build up reader/writer/state towers, just curious what happens when you start to merge the ideas. i.e. anything written to accept a Reader can then accept a State monad, etc. 07:46:08 wli: but do you see how you can in general only find types after typecheck, so it's hard to define what to stick in those 't's prior to that? 07:46:26 (you can only do it if you constructively build up your AST in haskell code) 07:46:41 (or if the type of an expression can be directly derived from the parsing of that syntactical piece) 07:46:46 vincenz: Well I noticed it was not tractable. 07:47:00 I used a non-GADT version for the miniml 07:47:04 but transforming that would be rather trivial 07:47:08 the only reason to use GADT encoding 07:47:15 is so you can reuse the ComposOp idea from bringert's paper 07:47:17 edwardk: well, I'm lazy, I would just steal the ideas from Unix - file descriptors being sockets, files, character devices or block devices. 07:47:26 so you can easily traverse through your AST, even though it's polytyped 07:47:31 (you have expressions, patterns, guards..) 07:47:53 vincenz: Shall I throw in modules? 07:47:56 here 'type' refers to the type of AST, not the type of what it represens 07:47:58 edwardk: then provide a central class analogous to an FD, plus specific implementations analogous to sockets, files, chardevs and blockdevs. 07:48:01 wli: I had modules 07:48:04 mycatverbs: well, in unix you have 'read' and 'write' it doesn't change based on the permissions you have. not a very good argument for separation =) 07:48:05 wli: it's more hassle, but sure 07:48:12 vincenz: heh, yes, MiniML indeed 07:48:13 wli: you need to then make sure there's no circular dependencies 07:48:25 wli: well.. miniml + modules + top-level lazy constructs :) 07:48:54 vincenz: Is it possible to avoid the type parameter altogether or are literals lost that way? 07:49:09 why are they lost?/ 07:49:10 --- join: steinbeck (n=steinbec@u-172-c080.cs.uni-tuebingen.de) joined #haskell 07:49:12 they're still encoded, no? 07:49:38 how I did my compilation: I compiled to ANF 07:49:56 vincenz: I guess LitChar :: Char -> Term is equivalent to LitChar { litChar :: Char } :: Term still. 07:50:02 yes 07:50:09 edwardk: you also have, "you can(not)? seek on this" and "any changes you make to this are (not)? guaranteed to exist if you write and then read the data back" 07:50:10 you just add a getter-function 07:50:20 it would be nice if QuickCheck had a === which defaults to =='s behavior but works on functions too 07:50:35 vincenz: So basically if I don't have a real use for it, the parameter beyond the subexpression type is not worth having. 07:50:36 mycatverbs: yes, but you go through the same api methods in each case ;) 07:50:39 --- quit: zx]treads (Remote closed the connection) 07:50:44 psykotic: -fallow-overloaded-instances ;) 07:50:50 wli: no, it is 07:50:57 wli: you can use it to hang decorations on your AST 07:51:01 so prop_foo = out . in === id would work out for testing the same as prop_foo x = (out . in) x == x, etc 07:51:11 vincenz, what does that do? 07:51:15 wli: like information from the parser (source code loc) 07:51:22 wli: or information like the type after typechecking 07:51:26 where type != haskell type 07:51:28 but some data const from 07:51:30 data Type = ... blabla 07:51:34 wli: you can get some fun inferences by defining classes that capture structural constraints, but they are exactly those things that can be read off from the nesting of the constructors 07:51:38 psykotic: get you what you want :) 07:51:45 instance Whatever a where a === b = a == b 07:51:52 vincenz, wow, also icecream? :) 07:51:54 instance Whatever (a -> b) where a === b = useFunctionlogic 07:52:08 --- join: genneth (n=genneth@5ac933e1.bb.sky.com) joined #haskell 07:52:10 they're overloaded instances 07:52:14 (a subsumes (a->b) 07:52:15 ) 07:52:21 oh, overlapping? 07:52:24 right 07:52:26 i'm trying to figure out if doing it the alternative, unexplored way gives any benefits, like being able to spot commutable accesses to a state monad whereever you just require the MonadReader instance rather than a full MonadState. 07:52:28 sorry, forgot the name 07:52:41 --- quit: doctormach ("Leaving") 07:52:43 vincenz, i was confused :) 07:52:52 psykotic: not as much as when you said "SIB" :) 07:52:55 haha 07:53:04 vincenz: I'll have to see if I can flesh it out with some module constructs. ;) 07:53:13 wli: adding modules just makes it nastier 07:53:15 --- quit: cognominal_ (Client Quit) 07:53:26 edwardk: send(2), recv(2) being specialised for sockets, and seek(2) being supported on some objects but not others. 07:53:27 and that when you transform from an environment to a mutable state you don't have to rewrite all of the code that uses it 07:53:28 wli: a lot of of my glue code has to deal correctly with those, and it doesn't really add anything 07:53:31 --- join: cognominal_ (n=cognomin@191.208.64-86.rev.gaoland.net) joined #haskell 07:53:42 I might refactor my miniml compiler to not use modules 07:53:46 then I can pour it into a blog article 07:54:07 mycatverb: send and recv are more of an accident of history than careful API design ;) 07:54:08 vincenz: Well, it's a toy, so I can cripple the module system as much as I want to make it doable. 07:54:18 it's not so nice, atm, I overgeneralize, which makes my code yucky :( 07:55:01 I wonder about these things people talk about with the relationship between records and first-class modules. 07:55:09 but no time atm to clean it up and poor into blog 07:55:15 edwardk: who cares? They work beautifully, don't they? 07:55:28 meh 07:56:11 --- quit: essiene ("Lost terminal") 07:56:19 Until you need to toss a LOT of data around and then the bottleneck of moving in and out of kernel-space gets excessive. ;) 07:56:42 --- part: cognominal_ left #haskell 07:56:47 --- part: steinbeck left #haskell 07:56:50 --- join: cognominal_ (n=cognomin@191.208.64-86.rev.gaoland.net) joined #haskell 07:57:41 --- quit: amiddelk ("Cya later") 07:58:31 Does anyone know if the new GHC will have lexically-scoped types? 07:58:44 foo :: a -> b 07:58:45 foo a = 07:58:49 vincenz: That's one huge thing I've wanted. 07:58:52 foo a = plunk a 07:58:55 where plunk :: a -> b 07:58:59 vincenz: it does now 07:59:00 plunk a = bar b 07:59:03 vincenz: use forall 07:59:06 I hate it when it complains plunk is too general 07:59:23 sjanssen: on the outer or the inner? 07:59:28 vincenz: the outer 07:59:32 * vincenz nosd 07:59:37 vincenz: doesn't it keep them in scope with that weird type declarations only implicitly rebind type names that aren't in scope rule? 08:00:04 edwardk: can not parse 08:00:05 GHC does have lexically scoped types 08:00:18 they're introduced by the binder forall 08:00:20 ndm: I found options that worked, guessed at a bugfix in configure.py, and it's now doing darcs gets of various things 08:00:48 http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#scoped-type-variables 08:00:51 Title: 7.4. Type system extensions, http://tinyurl.com/uxvor 08:00:54 kpreid: neat, is it a change that can be merged in, to help everyone? 08:01:08 sjanssen: still not wokring 08:01:40 vincenz pasted "scoped types" at http://hpaste.org/1967 08:01:52 http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#scoped-type-variables 08:01:54 Title: 7.4. Type system extensions, http://tinyurl.com/uxvor 08:01:59 ndm: it's a "I know zilch about Yhc or SCons, but it dies here, and this is unlike the other things so I'll make it the same and, yes, it's making more progress now" thing 08:02:03 heh doh, just realized it was already pasted 08:02:28 ndm: I would think that it's a general bug, but I wonder why no one else has hit it 08:02:30 kpreid: can you hpaste a darcs whatsnew 08:02:31 --- part: JaffaCake left #haskell 08:02:40 kpreid: you'd be surprised how little we know about scons 08:02:41 vincenz: which version of GHC? 08:02:41 --- quit: jfredet1 (Success) 08:02:42 edwardk: I just posted that :) 08:02:50 sjanssen: ah was missing "-fglasgow-exts" 08:02:58 quicksilver: i was off in another window =) 08:03:09 vincenz: it still parsed/compiled without -fglasgow-exts? 08:03:17 kpreid pasted "yhc build patch" at http://hpaste.org/1968 08:03:23 sjanssen: no 08:03:25 sjanssen: oddly, if I put 08:03:25 --- join: ClaudiusMaximus (n=puredyne@87-194-253-127.bethere.co.uk) joined #haskell 08:03:28 {-# GHC_OPTIONS=-fglasgow-exts #-} 08:03:30 and then do 08:03:32 ghci Test.hs 08:03:36 it complains about with that error 08:03:43 I need to do "ghci -fglasgow-exts Test.hs" 08:03:53 vincenz: drop the = 08:03:53 (GHC options are not passed to GHCI?) 08:04:01 sjanssen: idem 08:04:10 ndm: without it scons died with an error that I eventually found was "Only one SConf object may be active at one time" 08:04:11 idem? 08:04:15 the same 08:04:27 kpreid: with it, it gets further? 08:04:34 oh 08:04:36 ndm: yes 08:04:37 "OPTIONS_GHC" 08:04:57 ndm: at the moment it's building various Yhc/Core/*.hs 08:05:18 --- join: fasta (n=fasta@zonnebloem.demon.nl) joined #haskell 08:05:21 sjanssen: ok, thanks :) 08:05:28 Syzygy-: You called? 08:05:36 sjanssen++ 08:05:49 ndm: want a darcs send? 08:05:54 --- quit: progexp (Remote closed the connection) 08:06:06 kpreid: either than, or i'll push directly (giving you credit), what suits you? 08:06:15 Anyone who understands openssl here? I want to use fetchmail to read email from as imaps server, but the only certificates I have are self-signed. I have no idea how to turn them into something that fetchmail accepts. 08:06:36 kpreid: i wrote that code, on a win32 machine, never trying the large branch, which probably doesn't stress it too much 08:06:59 ndm: what suits you? 08:07:01 fasta: add it to /etc/ssl/certs/ ? 08:07:11 kpreid: small enough just to patch, no need to darcs send 08:07:15 shapr: Wanted to verify how you spell your name before I submitted my paper. 08:07:21 Is "Shae Erisson" correct? 08:07:23 kpreid: btw, it appears people may have been hitting this for the last week! 08:07:29 dcoutts: what do you mean by that? Just copy the file? 08:07:45 definately looks like it "breaks the pattern" otherwise 08:07:52 fasta: that's my guess, look about at the stuff in /ets/ssl/ 08:07:54 ndm: ok. in case our line 108s are different: this is going in as the *last* line of def gmp_configure( 08:07:58 --- join: basti_ (n=basti@p54AEBE40.dip0.t-ipconnect.de) joined #haskell 08:08:12 --- join: Shurique (n=generic@cs181023225.pp.htv.fi) joined #haskell 08:08:12 kpreid: yeah, thats where i've put it 08:08:16 dcoutts: AFAIK, doing openssl verify gives OK (error 18 self-signed ) 08:08:19 --- join: AdamantX (n=wtfmonki@c-69-181-160-107.hsd1.ca.comcast.net) joined #haskell 08:08:30 compile's still going; I'm off to do other things 08:08:30 --- quit: fmardini () 08:08:49 Syzygy-: Yes, it's correct... is my name going to show up in your paper?? 08:08:53 Yes. 08:08:57 In the acknowledgments. 08:09:03 * shapr boings cheerfully 08:09:05 Yay! 08:09:06 The Haskell section has enjoyed the benefits of several experienced 08:09:06 Haskell programmers, most notably Shae Erisson. 08:09:09 That's the quote. 08:09:11 :) 08:09:15 * shapr feels very cool 08:09:25 --- quit: andyjgill () 08:09:45 Syzygy-: What's the paper, OOI? 08:09:45 --- join: progexp (i=ariel@gateway/tor/x-725d5f4f8b49d058) joined #haskell 08:09:59 "Enumerating the Saneblidze-Umble diagonal terms" 08:10:04 fasta: dunno then, google self-signed certs 08:10:08 http://mpc723.mati.uni-jena.de/~mik/SaneblidzeUmbleSigns.pdf 08:10:15 i.e. "Really scary computational algebra"? :) 08:10:19 dcoutts: what do you think I did in the last hours? 08:10:22 --- quit: Adamant (Connection timed out) 08:10:24 Yeah, basically. 08:10:31 Cool. 08:10:45 DRMacIver: Today I submitted the second paper to JHRS this summer. 08:10:59 dcoutts: It seems easier to implement a complete PKI tool chain myself then to figure out the crap that is openssl 08:11:00 Hope they'll both get published with reasonable lack of headaches... 08:11:21 fasta: that seems unlikely :-) sorry I can't help. 08:11:37 Syzygy-: Describing Haskell as one of the stricter functional languages amuses me. 08:11:42 Oh? 08:11:42 Syzygy-: The GHCi banner on the last page is messed up 08:11:52 Igloo: It is? *grumble* Hang on... 08:11:58 Syzygy-: Given that the Haskell specification requires it to be non-strict. ;) 08:12:00 --- join: sciolizer (n=jball@adsl-68-74-154-179.dsl.emhril.ameritech.net) joined #haskell 08:12:06 (Yes, I know that's not the sense in which you meant it) 08:12:19 DRMacIver: I'm talking to algebraists, mm'kay? 08:12:37 Mmhmm. :) 08:12:40 Igloo: Oh bugger, yeah it is. 08:12:53 Igloo: It was decent once 08:12:55 Hmmmm.... 08:12:57 Syzygy-: I didn't say it was wrong. Just that it amused me. :) 08:13:23 --- quit: falseep ("Segmentation fault.") 08:13:24 @karma+ kpreid -- patch submitted, thanks! 08:13:24 kpreid's karma raised to 1. 08:13:44 Igloo: Reload now. 08:13:57 Igloo: Apparently using amsart instead of the journal style messed up my verbatims. 08:15:07 --- quit: oerjan ("leaving") 08:15:17 --- join: yaxu (n=alex@146.101.142.38) joined #haskell 08:15:19 I keep getting: error 18 at 0 depth lookup:self signed certificate Nobody who has done this before here? 08:15:52 Syzygy-: Section 4 is suddenly after the GHCi page instead of before. 08:15:54 --- join: GeoBesh (i=gbeshers@nat/redhat/x-cb0c236b529d4795) joined #haskell 08:16:11 ndm: scons: done building targets. 08:16:12 shapr: Yup. I blame amsart. 08:16:25 kpreid: that should be everyting done now 08:16:25 shapr: This is the way I did write it originally - the GHCi page belongs to section 3. 08:16:45 For the arXiv preprint, I did a minimal code change - and among the things that happened was a float-dance. 08:16:48 kpreid: yhc --linkcore File.hs should generate a .ycr file, you probably want to read our Yhc.Core paper to get a flavour of Yhc.Core 08:16:58 ndm: oh, and what worked to build: CCFLAGS="-I/Stuff/dp/include" LIBPATH=/Stuff/dp/lib scons 08:17:00 --- quit: cognominal_ (Client Quit) 08:17:29 --- join: Eidolos_ (n=sartak@c-75-67-53-71.hsd1.ma.comcast.net) joined #haskell 08:17:41 --- quit: fasta ("leaving") 08:17:43 --- join: tayloj_ (n=tayloj@wright.mm.rpi.edu) joined #haskell 08:17:43 --- part: tayloj_ left #haskell 08:18:08 kpreid: that probably wants to go on the wiki, or a help page, somewhere 08:18:20 --- quit: johanj () 08:18:27 http://haskell.org/haskellwiki/Yhc/Building - there looks like a good place 08:18:28 Title: Yhc/Building - HaskellWiki 08:18:45 --- join: tayloj_ (n=tayloj@wright.mm.rpi.edu) joined #haskell 08:18:46 --- part: tayloj_ left #haskell 08:19:12 it wants me to create an account. 08:19:13 --- join: tayloj_ (n=tayloj@wright.mm.rpi.edu) joined #haskell 08:28:01 --- join: borism (n=boris@195-50-205-66-dsl.krw.estpak.ee) joined #haskell 08:28:04 --- join: littledan (n=littleda@70-101-64-218.dsl1-field.roc.ny.frontiernet.net) joined #haskell 08:28:18 ndm: done. please polish! 08:28:33 --- quit: Eidolos (Read error: 110 (Connection timed out)) 08:29:19 kpreid: thanks! 08:29:34 --- quit: pesco ("leaving") 08:31:03 so the difference between -core and -linkcore is that -linkcore pulls in other modules? 08:31:51 what's the reason newtypes and existentials aren't allowed together? 08:32:01 because newtypes don't do any "wrapping"? 08:32:18 existentials carry a dictionary, so they have runtime cost, which newtype isn't allowed to have. or so I understand 08:32:38 the reason i ask--newtypes in ghc have a nice feature for auto-deriving certain type classes 08:32:39 i.e. an existential isn't pointer-sized 08:32:55 so you can do... newtype MyInt = MyInt Int deriving Num 08:33:10 --- join: cmarcelo (n=cmarcelo@201-92-74-156.dsl.telesp.net.br) joined #haskell 08:33:40 and it would be mighty nice to do something like that when you have, say, data Intersectable = forall a. IsIntersectable a => Intersectable a. i always end up defining the instance manually, by forwarding. 08:33:44 psykotic: there's something in the area of deriving and existentials or so that will prompt GHC to tell you its brain exploded, anyway; I don't think it'd work if you could say it anyway 08:33:57 --- quit: the_dormant ("Lost terminal") 08:34:01 psykotic: I've wanted to do that too 08:34:21 kpreid: exactly, -linkcore produces a .yca (core, all), -core produces a .ycr (core of that module only) 08:34:39 ok. 08:36:03 --- join: ihope_ (n=ihope@c-71-205-100-59.hsd1.mi.comcast.net) joined #haskell 08:36:51 --- join: BCoppens (n=bartcopp@kde/coppens) joined #haskell 08:37:45 ndm: http://haskell.org/haskellwiki/Yhc/Options appears to be stale/wrong: it shows options like -foo but yhc only seems to accept --foo 08:37:46 Title: Yhc/Options - HaskellWiki 08:38:01 kpreid: oh yes, that changed, feel free to update 08:38:20 all the non-single-letter options? 08:38:28 yes 08:38:37 we now use the standard GNU style options 08:38:39 ok, mass edit coming up 08:38:47 what package provides MonadPlus? 08:39:03 dozer: mtl 08:39:18 aaim pasted "easier without lambda ?" at http://hpaste.org/1969 08:40:09 sjanssen: weird - I've got that in build-depends and I'm getting Could not find module `Control.Monad.MonadPlus' 08:40:54 dozer: it's defined in Control.Monad 08:41:01 ndm: done 08:41:15 sjanssen: dho! 08:42:43 ndm: I was going to ask, typeclasses get resolved in Core, right? then I saw Prelude.Prelude.Enum.Prelude.Char.fromEnum 08:43:06 kpreid: they do, as tuples of higher order functions 08:43:22 I assume readable-Core is not an unambiguous format, then 08:43:50 (which is ok; I wouldn't want to parse it anyway!) 08:43:50 --- quit: MyCatVerbs ("Swim, swim, hungry!") 08:44:27 * kpreid is *really* off doing other things now 08:44:45 no, its not, we have a binary Core format, which we can then render 08:48:49 --- quit: ikegami-- (Read error: 110 (Connection timed out)) 08:52:45 --- quit: ihope (Read error: 110 (Connection timed out)) 08:59:14 --- join: jwp (n=jwp@mail.icrossing.com) joined #haskell 08:59:29 --- join: iblechbot (n=iblechbo@62.216.217.162) joined #haskell 08:59:51 --- join: mrchebas (n=alexey@53532F4D.cable.casema.nl) joined #haskell 09:00:38 ndm: hey, does YHC compile to GHC core? 09:00:59 --- quit: boyscared (Read error: 104 (Connection reset by peer)) 09:01:12 --- join: boyscared (n=boy@oh-76-6-177-221.dhcp.embarqhsd.net) joined #haskell 09:02:24 --- join: bct (n=bct@S01060013463ece73.ed.shawcable.net) joined #haskell 09:04:21 --- join: mcnster (n=mcnster@S01060012c9115fe3.cg.shawcable.net) joined #haskell 09:04:37 --- join: icarroll (n=icarroll@66.249.86.71) joined #haskell 09:04:40 --- join: viblo (n=hejsan@88.25.95.91.static.ras.siw.siwnet.net) joined #haskell 09:05:41 --- join: bos (n=bos@nat.945battery.lindenlab.com) joined #haskell 09:06:23 @pl \xs -> let (ys, zs) = splitAt 2 in reverse ys ++ zs 09:06:24 (line 1, column 12): 09:06:24 unexpected "(" 09:06:24 expecting natural, identifier or "in" 09:06:28 bah 09:07:12 gm. fgl newbie q. when i make "gmap (\(ins, node, label, outs) -> ... )", outs does not contain all the edges leaving the node. i'm not sure why? 09:07:52 --- join: SyntaxNinja (n=ijones@gw-1.galois.com) joined #haskell 09:08:10 --- quit: edwardk (Remote closed the connection) 09:08:13 !hoogle gmap 09:08:17 --- quit: fnord123 (Read error: 110 (Connection timed out)) 09:09:02 anyone? 09:09:46 --- join: fnord123 (n=fnord123@91.104.232.118) joined #haskell 09:10:22 --- quit: masak ("tests rock!") 09:11:11 --- part: mcnster left #haskell 09:11:52 --- join: sjm (n=sjm@78.32.64.213) joined #haskell 09:15:57 --- quit: stepcut (Remote closed the connection) 09:16:02 --- quit: seafoodX () 09:17:41 --- join: dmead (n=dan@c-76-116-154-79.hsd1.pa.comcast.net) joined #haskell 09:17:55 --- join: kosmikus_ (i=andres@gentoo/developer/kosmikus) joined #haskell 09:17:57 --- join: edwardk (n=edwardk@pdpc/supporter/base/edwardk) joined #haskell 09:18:26 --- join: Muad_Dib (n=muad_dib@sd511609f.adsl.wanadoo.nl) joined #haskell 09:19:06 --- join: andyjgill (n=andyjgil@gw-1.galois.com) joined #haskell 09:19:13 --- quit: kosmikus (Read error: 104 (Connection reset by peer)) 09:20:44 --- part: dozer left #haskell 09:23:55 --- quit: sad0ur ("leaving") 09:25:13 --- quit: whoppix (Read error: 104 (Connection reset by peer)) 09:25:50 --- quit: philp ("Bye") 09:26:35 --- quit: doserj ("Leaving") 09:27:42 --- join: nich (n=nich@unaffiliated/nich) joined #haskell 09:29:26 --- quit: slipstream (Read error: 104 (Connection reset by peer)) 09:29:38 --- join: whoppix (n=whoppix@193.91.240.166) joined #haskell 09:29:52 --- join: slipstream (n=irssi@ppp85-140-75-246.pppoe.mtu-net.ru) joined #haskell 09:32:28 ndm: http://haskell.org/haskellwiki/Yhc/API/Core links to http://www.cs.york.ac.uk/fp/yhc/snapshot/docs/Yhc-Core.html which is blank 09:32:29 Title: Yhc/API/Core - HaskellWiki 09:33:02 --- part: edwardk left #haskell 09:33:08 Is there a recent FGL tutorial? 09:33:10 --- nick: kosmikus_ -> kosmikus 09:36:04 --- quit: ramki ("Leaving") 09:40:39 --- join: cr (n=ix@c-76-19-22-178.hsd1.ma.comcast.net) joined #haskell 09:42:21 --- join: bluestorm_ (n=bluestor@AMarseille-252-1-177-220.w86-219.abo.wanadoo.fr) joined #haskell 09:42:29 --- quit: sjm ("leaving") 09:42:41 --- join: ivant (n=ivan@89.163.58.200) joined #haskell 09:43:35 --- join: mboes (n=mboes@APuteaux-153-1-36-244.w82-124.abo.wanadoo.fr) joined #haskell 09:43:52 Hmm, I added a bunch of specialization pragmas for handleing Int's, and it runs faster when using Int64s. WTF? 09:44:03 This optimization stuff is magical. 09:44:26 oh wait 09:44:36 I also separated out two dictionaries. 09:44:45 I suppose that could cause some effect. 09:45:13 roconnor: still working on ropes? 09:45:22 sjanssen: more or less. 09:45:35 sjanssen: GHC sucks at using abstract code. 09:45:53 --- quit: swiert ("leaving.") 09:45:55 but I couldn't figure out how to install JHC. 09:46:05 JHC is probably not the answer 09:46:20 oh, what is the answer? 09:46:20 it's still pretty buggy/slow/memory hungry 09:46:28 :( 09:46:30 --- quit: borism (Read error: 145 (Connection timed out)) 09:46:33 guys, how do I output unicode string to the console (which is actually in utf8)? 09:46:55 @go UTF8.hs 09:46:57 ivant: sadly, this ability isn't built in to the standard library 09:46:58 http://ogi.altocumulus.org/~hallgren/Talks/LHiH/base/lib/UTF8.hs 09:46:58 Title: UTF8.hs 09:47:09 ivant: you might check out the UTF-8 library on hackage.haskell.org 09:47:11 roconnor: it can, or rather to low-level Haskell which GHC can then compile 09:47:18 sjanssen, thanks a lot 09:47:43 oh, roconnor, thank you too :-) 09:47:46 kpreid: thanks for spotting that, thats a Haddock bug, i'll fix our code to work around it 09:48:06 ndm: Will YHC specialize these totally abstract modules? 09:48:17 roconnor: Supero will#] 09:48:24 Sold 09:48:28 where do I sign up? 09:49:05 roconnor: are you coming to AngloHaskell? 09:49:17 --- join: dozer (n=nmrp3@81-179-137-126.dsl.pipex.com) joined #haskell 09:49:25 I try to avoid travelling to England whenever possible. 09:49:35 its not worth travelling from abroad for 09:49:53 Well, the netherlands isn't very far away. 09:50:05 i hope to finish the code this week, i have a paper to submit in about 6 hours, then want to get the Haskell Workshop one submitted tomorrow, then i'll have time for Supero once more 09:50:19 ndm: is there a yhci? 09:50:29 I'm on ubuntu, getting "Setup.lhs: cannot satisfy dependency network-any" and have installed libghc6-network-dev via apt - any ideas? 09:50:41 kpreid: there was, i don't think its built, or works, anymore 09:50:48 Existentials are fun: http://programming.reddit.com/info/2al0d/comments/c2aq8e 09:50:49 Title: On the value of strong static typing: "make illegal states unrepresentable" (red ... 09:50:51 ndm: or, can I process Core from ghc(i)? 09:50:53 dozer: does 'ghc-pkg list' show network? 09:50:53 If epigram is using all this foldable traversable stuff, it must be dog slow. 09:51:07 kpreid: do yhc File.hs --linkcore, that generates File.yca 09:51:14 --- join: kowey (n=kowey@4aa54-4-82-234-151-151.fbx.proxad.net) joined #haskell 09:51:30 roconnor: foldable and traversable are slow? 09:51:36 kpreid: then use the Yhc.Core library, from Hugs, GHCi, GHC or Yhc (i use Hugs) 09:51:44 roconnor: what are you doing with foldable/traversable? 09:51:49 roconnor: there's no reason the stuff from foldable should be any slower than foldr and friends 09:51:58 sjanssen: because they have to lookup the monoid operation every friggin' time. 09:52:11 ndm: fingertrees use foldable. 09:52:12 roconnor: thats just poor optimisation, Supero definately fixes that 09:52:21 roconnor: is looking up a tuple that slow? 09:52:45 ndm: it's slower that Prim.Int.+, or whatever it is called. 09:52:50 roconnor: are you sure that's the bottleneck? 09:52:53 +# 09:53:20 instead I have to box up integers, look up the function call it, unbox the integers add them, box them up, only for them to be unboxed moments later. 09:53:21 roconnor: these are constant overheads, are you sure they are worth bothering with? i would have thought it would only give you 25% speed up at most 09:53:45 sjanssen: I'm not certain these are the bottlenecks. 09:53:49 possibly more in a dead tight loop, but those loops never occur in real life 09:53:57 --- quit: littledan () 09:54:17 ndm: 25% sounds like a lot to me. 09:54:29 kpreid: i use the page at http://www.cs.york.ac.uk/fp/yhc/snapshot/docs/index.html, then browse under Yhc.Core, its all there 09:54:30 sjanssen: no, it shows some stuff, but not network or gfl, both of which I've apt-get'ted 09:54:45 --- quit: Laney (Connection reset by peer) 09:54:51 ndm: I had found that 09:55:04 Lemmih made a specialied version of Fingertrees working on Ints, and if I recall got a 20% speed boost or so. 09:55:09 dozer: have more than one ghc installed? 09:55:28 kpreid: i'm just reporting the haddock bug, then will check in a fix 09:55:31 roconnor: most of that is probably from unpacking the length into the tree leaves 09:55:45 roconnor: instead of boxing them, that is 09:56:13 yeah, but wouldn't the values have to be boxed in order to call the monoid function. 09:56:15 daniel_larson: possible, as I built from trunk last week, but then switched back to the packaged version - do libs get registered to particular installations of ghc? 09:56:54 ndm: can Supero specialize the representation of data types? 09:57:28 roconnor: depends. The Int specialization might have allowed more inlining 09:57:33 --- quit: decaf ("Leaving") 09:57:43 sjanssen: no, not generally, although if you give me a more concrete example? 09:57:58 --- join: johanj (n=johanj@ip146-190-173-82.adsl2.versatel.nl) joined #haskell 09:57:59 * dcoutts thinks specialising data type representations is an important optimisation 09:58:04 dozer: I believe so yes. I had that problem, when I had a HEAD installed in /usr/local. Check which ghc-pkg you're running (which ghc-pkg) 09:58:18 ndm: Data.FingerTree keeps a measurement of subtrees in each node 09:58:24 --- nick: Eidolos_ -> Eidolos 09:58:35 daniel_larson: yup - ghc-pkg is pointing at 6.6.1 where as ghc is pointing at 6.6 - dang, now to fix all those sym-links 09:58:45 ndm: this measurement is automatically obtained from the data (via a Measure class) 09:58:55 --- quit: tayloj_ () 09:59:08 sjanssen: thats cacheing extra information, which is pretty hard to do automatically, and can introduce space leaks 09:59:25 ndm: ideally, when our measurement is something like Int, we want to unpack the Int into the tree constructors 09:59:41 --- quit: z` ("null") 09:59:46 i don't deal with unboxed'ness 09:59:47 --- quit: Alneyan (Read error: 60 (Operation timed out)) 10:00:19 dcoutts: I agree. Any idea on how to get it in GHC? :) 10:00:34 ndm: yhc --viewcore seems to want two arguments; what's the second one mean? 10:00:46 kpreid: yhc --viewcore file.yca 10:00:54 --- join: Laney (n=your@cpc4-basf4-0-0-cust113.nott.cable.ntl.com) joined #haskell 10:00:58 sjanssen: newtype wrappers and pragmas 10:01:04 kpreid: you can do the same in Hugs with: loadCore "file.yca" >>= print 10:01:13 ndm: that yields "yhc: Prelude.tail: empty list" 10:01:17 sjanssen: using a newtype gives us a convenient point for doing representation changes 10:01:31 ndm: if I "yhc --viewcore HETest.yca foo" it works and ignores foo 10:01:38 sjanssen: and then we want to specify what to change, but have it be done automatically, like UNPACK 10:01:41 kpreid: try it in Hugs/GHCi, i'll just check the viewcore 10:01:41 dcoutts: how could we apply this to the fingertree example above? 10:01:44 --- quit: Stinger (Read error: 104 (Connection reset by peer)) 10:01:53 kpreid: thats a bug then, must have been when the command line parsing changed 10:02:16 sjanssen: so assuming the finger tree is strict in its measurements, there's no reason we could not specialise it to Int and then unbox those ints 10:02:54 sjanssen: it would be very hard to tell automatically that a data structure is strict in one particular field 10:03:09 ndm: we already have annotations for that 10:03:41 data FingerTree v a 10:03:41 = Empty 10:03:41 | Single a 10:03:41 | Deep !v !(Digit a) (FingerTree v (Node v a)) !(Digit a) 10:03:45 sjanssen: true, but they are annotations that change the semantics, its much more polite to infer that stuff 10:04:47 ndm: sure, inference is good. But I don't think adding ! to strict components is a major issue 10:04:54 ndm: it's already established practice 10:05:03 roconnor: \o/ 10:05:08 fingertrees 10:05:16 vincenz: ? 10:05:22 vincenz: I didn't write it. 10:05:24 sjanssen: i honestly can't see why its even slightly hard to make that change automatically, if the user went as far as to annotate it for you 10:05:25 I know 10:05:27 Data.Sequence 10:05:56 ndm: I disagree, I think it's much nicer to state it up front, that way I don't have to go hunting around my code to find out where I'm being slightly too lazy, so the analysis infers that it's lazy overall. 10:06:18 thanks for the help - got everything going now 10:06:33 ndm: how do you generate code for 'forall a b. FingerTree a b -> foo' if there is data specialization? 10:06:43 ndm: the representations are fundamentally different 10:07:03 sjanssen: in that case you no longer have forall, its different already 10:08:07 ndm: working in ghci 10:08:38 ndm: you mean that I can't apply a 'FingerTree Int Int' to that polymorphic function? 10:08:57 sjanssen: exactly, that's why I think the newtypes are important 10:09:32 sjanssen: with my methods you can't do data specialisation at the moment, but i know how it would be possible, but requires type information (which mine doesn't have) 10:10:47 this seems similar to parallel arrays, which use associated data types 10:11:28 they use class overloading to handle representation overloading 10:11:40 yeah, if there was a class constraint, mine would have a chance 10:13:20 --- nick: araujo -> araujoIsNotarmin 10:13:42 dcoutts: so you suggest something like 'newtype SpecialFT = SFT (FingerTree Int) {#- SPECIALIZE SpecialFT -#}'? 10:14:03 sjanssen: something like that 10:14:25 FingerTree (Sum (Int)) 10:14:47 roconnor: or anything, really 10:14:51 sjanssen: I'd particularly like to do things like that for heavily layered monad transformers 10:15:56 dcoutts: what happens with 'case x of (SFT y) ->'? Then you've got 'y :: FingerTree Int' 10:16:24 dcoutts: that 'y' with a special representation can't be passed to polymorhpic functions, can it? 10:17:24 sjanssen: right, one has to do conversions on newtype wrapping/unwrapping or something 10:17:49 sjanssen: as an aside, am I right in thinking this woudln't be a problem in JHC where he does case analysis on types? 10:18:05 roconnor: I have no idea 10:18:14 --- join: gkr (n=notme@200-127-242-48.cab.prima.net.ar) joined #haskell 10:19:02 --- quit: hkBst (Connection timed out) 10:19:28 --- quit: adaptable () 10:22:19 Is MissingH broken? 10:22:29 Hi shapr! 10:22:43 * shapr smacks himself for making silly mistakes. 10:22:46 hiya Nafai! 10:24:02 --- join: eno__ (n=eno@adsl-70-137-154-166.dsl.snfc21.sbcglobal.net) joined #haskell 10:24:10 --- quit: alar (Remote closed the connection) 10:24:46 perhaps Data.FingerTree should ship as a TH function that generates the specialized code? :P 10:25:34 --- join: ihope__ (n=ihope@c-71-205-100-59.hsd1.mi.comcast.net) joined #haskell 10:25:36 --- nick: ihope__ -> ihope 10:25:58 --- join: Maddas (n=maddas@65.39.81.217) joined #haskell 10:27:44 --- quit: Averell (Read error: 110 (Connection timed out)) 10:27:46 --- join: doctormach (n=Doc_Mach@lin-dsl-static-209-50-22-033.inetnebr.com) joined #haskell 10:29:00 --- join: borism (n=boris@195-50-205-66-dsl.krw.estpak.ee) joined #haskell 10:30:17 --- join: Averell (n=averell@p3m/member/Averell) joined #haskell 10:31:07 sjanssen: are you reinventing C++ templates? and if so, do you need a lesson on how evil they are? 10:31:25 :D 10:31:39 ndm: be fair, ML modules are substantially nicer than C++ templates... 10:31:52 Philippa: Sure, until you use functors 10:31:58 Foo.Bar.blabla 10:32:02 Philippa: but TH doesn't let you implement those does it? 10:32:30 vincenz: nah, even with functors 10:32:59 SamB: it's pretty damn close and you could get a fairly simple encoding 10:33:34 Philippa: but doesn't TH give you the same "too-late typechecking" that C++ templates give you? 10:33:55 --- quit: bluestorm_ ("Konversation terminated!") 10:34:13 point 10:34:22 I suppose it would be somewhat nicer too-late typechecking, though 10:34:35 though you could do more to typecheck an encoded functor than you can do to typecheck a C++ template 10:34:38 it also gives you a turing complete compile time language (number 2, in haskell's case) 10:34:50 yes, but TH is /meant/ to do that 10:34:58 true 10:35:17 nothing wrong with it per se, and you know when you're using it 10:35:30 but if the only reason for permitting these "evil templates" is for performance, then the optimisers aren't good enough 10:35:35 hell, I always meant to play with loading TH code in hs-plugins 10:36:00 if a mechanism gives you more power, good, if it gives you more speed, fix the optimiser 10:36:09 I suspect the optimisers can't be made good enough 10:36:10 TH gives you both 10:36:24 well. 10:36:27 if only because the TH gives you power equivalent to arbitrary annotations 10:36:31 lets you have them. 10:36:39 but yes, it's more power too 10:36:40 --- quit: roconnor (Read error: 110 (Connection timed out)) 10:36:45 --- quit: chris2 ("Leaving") 10:36:47 --- join: roconnor (n=roconnor@vhe-540354.sshn.net) joined #haskell 10:37:10 --- quit: ihope_ (Read error: 110 (Connection timed out)) 10:37:12 --- quit: int-e ("leaving") 10:37:13 for example, you could use TH to have a database table declared in code and build the thing in the database when you compile the module and provide a suite of admin functions straight from the definition 10:37:38 if you're running a sufficiently big and long-lived system, coupling that with dynamic code loading is a very nice thing indeed 10:37:45 yeah, and i'd say that would be a good thing 10:37:46 Philippa: that sounds like a bad idea 10:37:56 but if you use it for performance, i'd say you are going down a slippery slope 10:37:58 functors are a key feature of the module system 10:38:03 maybe generate the SQL to make the table or something 10:38:22 the functionality of type classes is wrought with functors and modules in ML instead 10:38:24 ndm: or maybe you are prototyping 10:38:47 I loved ML's functors. 10:38:49 --- quit: eno (Read error: 110 (Connection timed out)) 10:39:02 i did too, my only problem was the obscure syntax and special cases 10:39:25 I love functors too 10:39:32 especially when they provided infix ops :D 10:39:37 a Foo.+ b 10:39:46 SamB: sure. OTOH, logging assorted aspects of the compilation process becomes a good thing when it's part of a larger system 10:39:52 The way I think of it is that Haskell's typeclasss plus ML's functors would be a fearsome combination. 10:39:53 the ability to do compile-time IO's useful 10:40:07 wli: you're not the first person to think that :-) 10:40:12 hell, there're papers on unifying them 10:40:14 wli: fearsome to who? 10:40:21 you? me? 10:40:25 Oleg? 10:40:40 the average Python programmer? 10:40:45 SamB: All programming problems that fear being solved. 10:40:49 ah. 10:40:54 wli: afaik, they're not combinablea 10:40:59 http://ttic.uchicago.edu/~dreyer/papers/mtc/main-short.pdf 10:41:05 modular type classes 10:41:15 --- quit: niksnut (Read error: 110 (Connection timed out)) 10:41:41 vincenz: uh, it didn't take me long to dream up one approach to it, and it turned out to be somewhat different to the approach being taken in research 10:41:44 ?losers 10:41:44 Maximum users seen in #haskell: 368, currently: 358 (97.3%), active: 14 (3.9%) 10:41:55 (it's also not particularly interesting as an alternative, it just goes the "obvious" PTS route) 10:42:16 PTS? 10:42:40 Philippa: I remember reading something in regards to that a while back, but yes, I've seen (at a glance) Harper's paper 10:42:56 --- join: cognominal_ (n=cognomin@cac94-1-82-67-232-89.fbx.proxad.net) joined #haskell 10:43:21 --- quit: cognominal_ (Remote closed the connection) 10:43:38 --- join: cognominal_ (n=cognomin@cac94-1-82-67-232-89.fbx.proxad.net) joined #haskell 10:44:00 @. pl djinn f::(a,b) -> (b,a) 10:44:00 Cannot parse command 10:44:11 @. pl djinn (a,b) -> (b,a) 10:44:11 f = uncurry (flip (,)) 10:45:00 --- quit: kowey () 10:45:47 @type (snd *** fst) 10:45:50 forall a b a1 b1. ((a, b), (a1, b1)) -> (b, a1) 10:45:54 @type (snd &&& fst) 10:45:56 forall a b. (a, b) -> (b, a) 10:46:13 nice 10:46:46 --- quit: sjanssen (Read error: 110 (Connection timed out)) 10:50:57 okay, what was that function to generate ["","a","b","aa","ab","ba","bb"...] or whatever? 10:51:31 SamB: oh that one? 10:51:34 let me get it 10:51:55 --- join: paolino (n=paolino@151.82.5.179) joined #haskell 10:52:00 --- part: paolino left #haskell 10:52:03 --- join: paolino (n=paolino@151.82.5.179) joined #haskell 10:52:20 > let makeSupply inits tails = let vars = inits ++ (map concat . sequence $ [vars, tails]) in vars in makeSupply [""] ["a", "b"] 10:52:22 ["","a","b","aa","ab","ba","bb","aaa","aab","aba","abb","baa","bab","bba","b... 10:53:07 you could simplify it if you know your elements are always single characters 10:53:16 --- join: mdmkolbe|ubuntu (n=adamsmd@dhcp-cs-244-184.cs.indiana.edu) joined #haskell 10:53:19 --- quit: QplQyer ("*poef* *roekwolk*") 10:54:01 --- join: CosmicRay (n=jgoerzen@gatekeeper.excelhustler.com) joined #haskell 10:54:19 --- quit: ivant (Read error: 110 (Connection timed out)) 10:55:16 You can probably do something cunning with [1..] and Data.Bits. But I can't figure it out at the moment. :) 10:55:38 --- join: kowey (n=kowey@4aa54-4-82-234-151-151.fbx.proxad.net) joined #haskell 10:58:52 --- quit: borism (Read error: 145 (Connection timed out)) 11:00:19 --- join: z` (n=nine@209-78-110-141.ded.pacbell.net) joined #haskell 11:01:50 when I -ddump-simp, what do all the @'s mean? 11:02:06 Data.FingerTree.appendTree01 11:02:06 @ Data.ByteString.Rope.Chunk Data.ByteString.length ds_d2s2 ds1_d2s3 11:02:15 roconnor: type application 11:02:43 --- quit: Pupeno2 (Read error: 60 (Operation timed out)) 11:02:57 --- quit: flux (Remote closed the connection) 11:03:03 So Data.ByteString.Rope.Chunk is a type rather than a constructor? 11:03:17 seems so 11:03:17 > map (\x -> showIntAtBase 2 (\x -> case x of; 0 -> '0'; 1 -> '1'; _ -> undefined) x "") [1..] 11:03:26 ["1","10","11","100","101","110","111","1000","1001","1010","1011","1100","1... 11:03:37 dcoutts: the have the same name, so I guess it is confusing :) 11:03:47 roconnor: core is typed lambda calculus, so the type lambdas and applications are explicit 11:04:19 roconnor: yeah, it is confusing, we need a better presentation of core 11:04:24 --- quit: whoppix ("Leaving") 11:04:32 dcoutts: colours!! 11:04:45 roconnor: yes, and hyperlinks :-) 11:04:48 --- nick: kenn_ -> kenn 11:04:53 perfect! 11:05:35 --- quit: gkr (Connection timed out) 11:05:54 Is there any point in adding "_ -> undefined" in a case? 11:06:03 --- quit: desp () 11:06:10 shachaf: warning suppression? 11:06:13 shachaf: avoiding warnings 11:06:28 In lambdabot? 11:06:33 --- nick: araujoIsNotarmin -> araujo 11:06:35 > map (\x -> showIntAtBase 2 (\x -> case x of; 0 -> '0'; 1 -> '1') x "") [1..] 11:06:37 ["1","10","11","100","101","110","111","1000","1001","1010","1011","1100","1... 11:06:46 not in lambdabot obviously, but you get used to it 11:06:47 --- join: borism (n=boris@195-50-205-66-dsl.krw.estpak.ee) joined #haskell 11:07:05 I guess. 11:08:28 --- join: SuperIronBob (n=chatzill@sbs.nextcentury.com) joined #haskell 11:10:08 > map (\x -> showIntAtBase 2 (last.show) x "") [1..] 11:10:09 ["1","10","11","100","101","110","111","1000","1001","1010","1011","1100","1... 11:10:44 right 11:11:20 > map (\x -> showIntAtBase 2 intToDigit x "") [1..] 11:11:22 ["1","10","11","100","101","110","111","1000","1001","1010","1011","1100","1... 11:14:06 --- join: doserj (n=doserj@80-155.0-85.cust.bluewin.ch) joined #haskell 11:15:17 --- join: zx]treads (n=root@83.212.85.178) joined #haskell 11:15:33 --- quit: ndm ("ChatZilla 0.9.78.1 [Firefox 2.0.0.5/2007071317]") 11:16:44 --- part: johanj left #haskell 11:19:22 --- join: whoppix (n=whoppix@193.91.240.166) joined #haskell 11:26:11 --- quit: drrho ("using sirc version 2.211+KSIRC/1.3.12") 11:26:47 --- join: Alneyan (n=alneyan@2001:618:400:0:0:0:575a:dce7) joined #haskell 11:28:39 > showIntAtBase 5 [1..] 11:28:40 Couldn't match expected type `Int -> Char' 11:28:53 how do I go about implementing Eq for: 11:28:53 --- join: sjanssen (n=sjanssen@pcp031187pcs.unl.edu) joined #haskell 11:28:53 data Any s where Any :: s t -> Any s 11:29:22 you don't want to using derriving? 11:29:38 :t showIntAtBase 11:29:40 forall a. (Integral a) => a -> (Int -> Char) -> a -> String -> String 11:30:16 dmead: love to, but ghc says: Can't make a derived instance of `Eq (Any s)' (`Any' has non-Haskell-98 constructor(s)) 11:30:40 ahh 11:31:02 right so you have to declare an instance manually 11:31:32 ndm: re. C++ templates: yes, I want C++ templates that don't suck :) 11:31:59 yup - and I'm not sure how to go about it, since the type of t is hidden 11:34:12 hey, rehges in #oasis says he learned more about monads by reading the Prelude than from tutorials ;-) 11:34:20 this doesn't work: instance Eq (Any s) where (Any a) == (Any b) = a == b 11:34:26 --- join: zbrown (n=rufius@unaffiliated/zbrown) joined #haskell 11:34:39 or at least more about the connection between Haskell monads and actual monads 11:34:44 samb: i said the four lines in the prelude made me understand what they are 11:34:57 samb: not quite the same as what you say :-) 11:35:12 hmm. 11:35:20 well I thought you said that 11:35:36 monads aren't that hard 11:35:44 no, they aren't ;-) 11:35:48 we need to stop saying they are! 11:36:22 maybe people wouldn't be scared if there weren't so many different tutorials ;-) 11:36:25 dozer: don't you need s t to be an instance of Eq? 11:37:14 roconnor: well, yes, but (s t) is hidden inside the Any constructor 11:37:45 learning about monads by starting with IO is a really bad plan i think 11:38:21 dozer: then maybe you want Any :: forall t. (Eq s t) => s t -> Any s ? 11:38:43 rehges: which monad made you "get it"? 11:38:48 maybe withe more parenthesis. 11:38:58 just the abstract definition 11:39:01 I think Maybe might be a good one to start with 11:39:06 roconnor: that's fine, but in the definition for Eq (Any s) it can't work out if the two Any instances are over the same t or a different t 11:39:13 yeah, Maybe is nice 11:39:16 you mean... 11:39:18 @src Monad 11:39:19 class Monad m where 11:39:19 (>>=) :: forall a b. m a -> (a -> m b) -> m b 11:39:19 (>>) :: forall a b. m a -> m b -> m b 11:39:19 return :: a -> m a 11:39:19 fail :: String -> m a 11:39:23 yes 11:39:32 hmm. 11:39:34 without that forall nonsense 11:39:40 rehges: hmm. 11:39:59 @ask dons what is the point of the foralls in @src Monad 11:39:59 Consider it noted. 11:40:23 samb: that's just because the bot runs with extensions on 11:40:44 rehges: No, @src is differenet. 11:40:49 rehges: I think it is actually a case of user error 11:40:50 rehges: (I think). 11:40:58 --- join: gkr (n=notme@200-127-242-48.cab.prima.net.ar) joined #haskell 11:41:03 where "user" probably means "dons" 11:41:07 well ghci does the exact same thing with -fglasgow-extensions 11:41:10 dozer: oh, that's a bit of a problem. 11:41:19 If I want small binaries, does that mean I should probably use jhc? 11:41:20 rehges: notice that fail and return don't have that nonsense 11:41:32 @instances Monad 11:41:40 ((->) r), ArrowMonad a, Cont r, ContT r m, Either e, ErrorT e m, IO, Maybe, RWS r w s, RWST r w s m, Reader r, ReaderT r m, ST s, State s, StateT s m, Writer w, WriterT w m, [] 11:41:58 is there a tutorial somewhere on actually using haskell for writing programs? 11:42:17 it's a bit hard to do a single tutorial on that 11:42:23 it depends rather a lot on what you want to do 11:42:49 @wiki How to write a Haskell program 11:42:49 http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program 11:42:51 lament: Write Yourself a Scheme in 48 Hours? 11:42:56 --- join: tizoc_ (n=user@r190-0-155-103.dialup.adsl.anteldata.net.uy) joined #haskell 11:43:13 lament: what do you reckon you're missing how to do? 11:43:23 shachaf: thanks, looks interesting 11:44:00 --- join: erg0t (n=ergot@r190-64-195-186.dialup.adsl.anteldata.net.uy) joined #haskell 11:44:19 rconnor: yeah, it is 11:44:40 rconnor: I keep hitting effectively this same problem 11:45:48 well, given that a and b might not have the same type, there is very little you can do with two of them. 11:46:13 roconnor: well, they are clearly not equal if they are of different type, and if they are the same type then the normal Eq operator will work 11:46:38 dozer: maybe you want to use this typeable crazy stuff. 11:47:55 roconnor: all I realy want is to be able to use GADTs and stuff the datastructures into homogeneous lists and maps and things, like I would normal data types 11:47:55 dozer: do undefined and 5 have the same type? 11:48:16 roconnor: I'm guessing undefined::Int and 5::Int do 11:48:39 dozer: what about undefined :: forall a. a 11:50:13 roconnor: good question - I'm guessing not 11:50:32 dozer: once you stuff random datastructures in to lists, what do you intend to do with them? 11:51:14 roconnor: they are all productions in a logic language, and there are standard re-write rules that implement a decision procedure to see if the productions are mutually consistent 11:51:54 Is this valid: class Foo a where foo :: Integer 11:52:02 So why don't you make a list of productions rather than a list of anys? 11:52:21 maybe I don't understand what you are trying to do. 11:52:24 ihope: class (Integer a) => Foo a 11:52:30 --- join: ohmega (n=ohmega@sonata.csbnet.se) joined #haskell 11:53:13 roconnor: I can't do a list of productions directly as they are in a GADT, so all have incompattible types :( 11:53:17 --- join: sorear (n=stefan@ip68-6-133-142.sd.sd.cox.net) joined #haskell 11:53:17 ihope: no 11:53:38 dozer: what types do productions have? 11:53:48 ihope, i think any attempt to do that will result in a compiletime error, as the system can't tell which instance of Foo to use when the code says "foo 1" 11:54:08 * roconnor begins to understand. 11:54:55 dozer pasted "logic concepts" at http://hpaste.org/1970 11:55:10 so the GADT is Concept 11:56:18 --- quit: doublef (Success) 11:56:41 dozer: and you want to take a list of things and decide if they are mutually consistent? 11:57:12 @where GADT 11:57:12 http://www.haskell.org/ghc/docs/latest/html/users_guide/gadt.html 11:59:36 --- quit: doserj ("Verlassend") 11:59:47 dozer: I'm not an expert, but I'm not convinced you should be using GADTs here like that. 11:59:53 roconnor: so, a rewrite rule may spot (CConjunction a b) and add both a and b to the current set of working concepts 12:00:13 --- quit: tizoc (No route to host) 12:00:14 dozer: because all your constructors are polymorphic in their recursive argument. 12:00:37 dozer: the GADTs don't rule out illegal productions (which I would think of as the main use of GADTs). 12:01:09 roconnor: doing that let me write ToNNF in a way that's checked as being sane by the compiler 12:01:24 dozer: okay, I see that now. 12:01:51 --- join: ednarofi (n=nate@adsl-71-150-251-117.dsl.mdsnwi.sbcglobal.net) joined #haskell 12:01:53 --- quit: mnislaih_ (Read error: 110 (Connection timed out)) 12:03:09 dozer: Concept t can be an instance of Eq right? 12:03:44 roconnor: yeah, but then it would be Concept t that's the instance, so I can't get out neq for e.g. CNamed vs CEqual 12:03:57 dozer: isn't that good enough? 12:04:04 st andrews are on university challenge tonight 12:04:31 dozer: I mean you'd take a concept out of a list 12:04:40 dozer: then do a case analysis on it. 12:04:55 and in each branch you would do something. 12:05:01 back up a bit - how do I get a CNamed and a CEqual into the list in the first place? 12:05:02 --- join: mnislaih (n=pepe@81.202.140.24.dyn.user.ono.com) joined #haskell 12:05:28 dozer: existental types. I think your Any t thing is pretty close. 12:05:42 [forall t. Concept t] 12:05:59 but you probably need to wrap that type up in a data constructor. 12:06:08 (the inner part) 12:06:29 surely you'd want [exists t. Concept t] 12:06:34 (this isn't really haskell) 12:06:45 EvilTerran: ah, right 12:07:00 so let's see 12:07:56 data AnyConcept where AnyConcept :: forall t. Concept t -> AnyConcept 12:08:09 --- join: monochrom (n=trebla@toronto-hs-216-138-220-146.s-ip.magma.ca) joined #haskell 12:08:10 which is pretty much the same as your Any type 12:08:16 except I threw in a forall t. 12:08:35 I'm not sure if that is necessary, it could be implied. 12:08:58 @seen jyp 12:08:59 I saw jyp leaving #xmonad, #oasis and #haskell 1d 5h 57m 47s ago, and . 12:09:04 dozer: anyhow, let's assume your Any type works. 12:09:14 So now you can have your list [Any Concept] 12:09:56 --- quit: gimbo ("Leaving") 12:10:17 Now, you probably cannot make Any t an instance of Eq 12:10:27 but it is easy to make Any Concept an instance of Eq. 12:10:41 @seen Lemmih 12:10:42 Lemmih is in #haskell. I last heard Lemmih speak 6h 37m 12s ago. 12:11:31 data Any s where Any :: s t -> Any sinstance Eq (Any Concept) where (Any a) == (Any b) = a == b 12:11:37 oops - try again... 12:12:16 data Any s where Any :: s t -> Any s 12:12:16 instance Eq (Any Concept) where (Any a) == (Any b) = a == b 12:12:16 Couldn't match expected type `t' (a rigid variable) against inferred type `t1' (a rigid variable) 12:12:25 dcoutts: Yo. 12:12:32 dozer: you will have to do a case analysis on a and b. 12:12:50 dozer: What may be better is to just make AnyConcept directly. 12:12:51 Lemmih: I'm having trouble building SDL-ttf, seems to be a missing .h file 12:13:01 dozer: because then maybe deriving Eq will work. 12:13:06 --- join: swiert (n=Wouter@88-106-128-17.dynamic.dsl.as9105.com) joined #haskell 12:13:06 --- quit: zx]treads (Remote closed the connection) 12:13:08 dcoutts: Have you installed libsdl-ttf? 12:13:13 Lemmih: the SDL-ttf.cabal file specifies Includes: Graphics/UI/SDL/TTF/Wrapper.h 12:13:25 --- join: Cale (n=cale@CPE004854805910-CM000e5cdd834a.cpe.net.cable.rogers.com) joined #haskell 12:13:32 Lemmih: but that file does not seem to exist. Yes, I installed the C lib. 12:13:52 roconnor: gotcha - plumbing that through now 12:14:46 Lemmih: is that file supposed to be generated? The Wrapper.c file is in the tarball, but the Wrapper.h is not. 12:16:00 dcoutts: Ah, I need to mention the .h file in the cabal file. 12:16:21 Lemmih: it is mentioned in the .cabal file, but it doesn't exist. 12:16:35 Lemmih: the file itself is missing, though it's referenced and needed. 12:17:06 dcoutts: Right, 'cabal-setup sdist' needs to be aware of it. 12:17:18 Lemmih: ah, I see what you mean. 12:17:27 Is there a nice way to access the entire Win32 API from Haskell? 12:17:35 ihope: the Win32 package 12:17:47 That offers the whole thing? 12:18:00 most of it 12:18:33 ihope: you're planning on using the whole thing? :) 12:19:03 Hmm... indeed, there might be a part or two I won't be using. :-) 12:19:47 dcoutts: Fixed, pushed and uploaded. 12:20:11 --- join: doserj (n=doserj@80-155.0-85.cust.bluewin.ch) joined #haskell 12:20:13 Lemmih: thanks! :-) it'll be appearing in a gentoo near you shortly... 12:20:44 --- join: puchacz (n=puchacz@87-194-5-99.bethere.co.uk) joined #haskell 12:21:01 --- join: edwardk (n=edwardk@pdpc/supporter/base/edwardk) joined #haskell 12:22:05 Lemmih: new version number? I wonder how long it takes for it to appear on hackage 12:22:53 * Lemmih was too lazy to bump the version number. 12:23:14 Lemmih: it doesn't appear to have updated as far as I can see 12:23:28 * edwardk smacks himself upside the head as he realizes that the writer monad is just the reader comonad with a monoidal environment, to uniquely provide bind and return. 12:23:37 dcoutts: First item on the What's New list. 12:23:45 --- join: ihope__ (n=ihope@c-71-205-100-59.hsd1.mi.comcast.net) joined #haskell 12:23:51 Lemmih: I know, but the tarball does not appear to have changed 12:24:17 unless it's just some web cache in the way 12:24:23 --- quit: ihope (Nick collision from services.) 12:24:25 --- nick: ihope__ -> ihope 12:24:28 noting that censor = local gave it away to me 12:24:39 :t censor 12:24:42 forall w (m :: * -> *) a. (MonadWriter w m) => (w -> w) -> m a -> m a 12:24:44 :t local 12:24:45 forall r (m :: * -> *) a. (MonadReader r m) => (r -> r) -> m a -> m a 12:25:01 edwardk: yes, but ask /= tell... 12:25:28 edwardk: Writer is like a co-Reader... how is it like a Reader? 12:25:36 --- quit: ohmega (Remote closed the connection) 12:25:37 dcoutts: Must be a cache issue. 12:25:50 sorear: per the earlier discussion about conflating Reader/Writer/State, ask = get, tell = put 12:25:57 --- join: ohmega (n=ohmega@sonata.csbnet.se) joined #haskell 12:26:09 Lemmih: aaaaah, the fact that Int64 runs faster than Int is driving me insane! 12:26:26 Lemmih: yep, seems so 12:26:32 roconnor: what the heck? 12:26:32 sorear: the reader comonad is the (,)e comonad. where ask = fst, local = first 12:26:43 roconnor: You're not on a 64bit box by any chance? 12:26:53 Lemmih: I sure hope he is! 12:26:59 who isnt? 12:27:03 me 12:27:04 Me. 12:27:09 ha-ha 12:27:17 but I'd be scared if Int64 was faster than Int on a 32-bit box 12:27:41 Lemmih: my laptop isn't 64 bit as far as I know. 12:27:58 if you look at writer its newtype Writer w a = Writer { runWriter :: (a,w) } which is just a flipped (,)e comonad with constructor baggage 12:28:00 Lemmih: but now that you mention it, the other computer is 64 bit. ... It's just running in 32 bit mode. 12:28:10 roconnor: WHen you switch to Int, how many fromIntegrals do you add? 12:28:12 roconnor: Int64 should be hugely expensive in that case. 12:28:20 sorear: one. 12:28:40 roconnor: fromIntegral is extremely slow normally, since in the absense of RULES it goes via Integer 12:28:41 So one Win32 API call I'm after, SetConsoleCursorPosition, doesn't seem to be in System.Win32 or System.Win32.Console. 12:28:54 roconnor: How many times do you call it? 12:28:57 sorear: It appears to be optimized away. 12:29:31 Could not deduce (Monoid (a, c)) 12:29:31 from the context (Monoid a, Monoid c) 12:29:47 but... there is only one law-satisfying instance! 12:29:58 sorear: more than 121462671 times 12:30:03 roconnor: Are you on windows? 12:30:10 Lemmih: ubuntu 12:30:25 sorear: two, the one you expect, and flip mappend 12:30:29 roconnor: Why are you running in 32bit mode, then? 12:30:38 sorear: is my profiler misleading me? 12:30:59 sorear: does putting in a call center stop it from being optimized away? 12:31:04 even if the parameter isn't a monoid you can implement the comonad interface over 'Writer e' or equivalently (,)e. extract = snd; extend wa@(w,_) f = (w,f wa) 12:31:07 roconnor: yes 12:31:10 roconnor: Yes. 12:31:14 sorear: of course I agree there should be an instance in Data.Monoid :) 12:31:25 --- join: filz (n=filz@host247-167-dynamic.61-82-r.retail.telecomitalia.it) joined #haskell 12:31:28 but to derive return you need an identity for the the left side of the pair (mempty) and an operation to glue them together (mappend), you don't need those to build the comonad. 12:31:53 er you only need mappend to derive (>>=) 12:32:36 --- quit: icarroll ("ChatZilla 0.9.78.1 [Firefox 2.0.0.4/2007051502]") 12:32:51 god damn profiler. 12:33:09 --- nick: zbrown -> rufius 12:33:10 --- join: MarcWebe1 (n=marc@pD9E0AED3.dip.t-dialin.net) joined #haskell 12:33:27 --- nick: filz -> phip 12:33:56 Lemmih: I don't know. It's a university computer. 12:34:02 CosmicRay: ping 12:34:07 pong 12:34:07 Lemmih: I suppose it is there for backwards compatability for somethng. 12:34:08 --- join: flux-_ (i=flux@jolt.modeemi.cs.tut.fi) joined #haskell 12:34:15 Lemmih: I could chroot to 64 bit mode. 12:34:23 Lemmih: I'd have to install new ghc I suppose. 12:34:23 CosmicRay: the hpodder package you uploaded to hackage is missing all the other-modules: files 12:34:24 --- join: suifur (i=rufius@unaffiliated/zbrown) joined #haskell 12:34:33 --- quit: pierre- ("WeeChat 0.2.3") 12:34:37 --- nick: suifur -> zbrown 12:34:41 hrm. why, I wonder? 12:34:46 cabal bug? 12:34:53 or am I misunderstanding something? 12:34:55 CosmicRay: because they're not listed in other-modules: in the executable section cabal does not know about them, so does not include them into the sdist tarball. 12:35:23 --- quit: cr (Nick collision from services.) 12:35:27 --- join: cr_ (n=ix@c-76-19-22-178.hsd1.ma.comcast.net) joined #haskell 12:35:28 ah. 12:35:31 the solution is to list all the other module in the other-modules: field in the .cabal file 12:35:32 --- part: ohmega left #haskell 12:35:33 <_Nucleo> @src intersect 12:35:34 intersect = intersectBy (==) 12:35:36 ugh, that's annoying. 12:35:39 but ok. 12:35:47 @paste 12:35:48 Haskell pastebin: http://hpaste.org/new 12:35:56 --- quit: bitrot (Connection timed out) 12:35:56 CosmicRay: one day cabal will get dep chasing and be able to warn you about that problem. 12:36:00 There is a way to remove a call centre right? 12:36:18 --- nick: phip -> ffp 12:36:40 --- join: mjl69 (n=mjl69@h46087e57.area4.spcsdns.net) joined #haskell 12:36:40 roconnor: I can't make the pattern-match approach work 12:36:41 roconnor: with a well-placed laser and air support 12:37:02 (Any e1@(CEqual (_::Concept a) (_::Concept b))) == (Any e2@(CEqual (_::Concept a) (_::Concept b))) = e1 == e2 12:37:16 dcoutts: is there a way in hackage to see all the packages that depend upon another package? 12:37:21 for instance, so I can see everything that uses hdbc? 12:37:29 Expected type: Concept a1 Inferred type: Concept a 12:37:41 CosmicRay: not yet, only direct deps, not reverse deps. But you're not the only one to ask for it. 12:38:30 roconnor: Perhaps GHC is already in 64bit mode. 12:38:30 edwardk pasted "implicit configurations for numerical type classes? worth implementing in general?" at http://hpaste.org/1971 12:38:46 dozer: that doesn't look right 12:39:11 --- quit: MarcWeber (Read error: 110 (Connection timed out)) 12:39:54 (Any (CEqual x0 y0)) == (Any (CEqual x1 y1)) = (Any x0) == (Any x1) && (Any y0) == (Any y1) 12:40:24 toying with the idea pasted there to use the Oleg/Shan implicit configuration trick to transform a user supplied function as a magma or monoids, or pretty much any type class. the approach is formulaic enough i could add it to the template haskell generator for my painful typeclass structure. 12:40:53 link to trick: http://www.cs.rutgers.edu/~ccshan/prepose/prepose.pdf 12:41:30 edwardk: is this the lifting types to constraints idea we were commenting last week ? 12:41:40 --- join: conal (n=Conal@misc-148-78-62-234.pool.starband.net) joined #haskell 12:42:23 --- join: rretzbach (n=robert@dslb-084-062-008-178.pools.arcor-ip.net) joined #haskell 12:42:36 Lemmih: but then wouldn't Int == Int64? 12:42:51 mnislaih: something a little different. its lifting terms into types through stable pointers, then using that fact and universal quantification to basically ensure that you use the same functions and notion of zero throughout the computation. 12:43:07 --- nick: ffp -> hordf 12:43:51 i.e. normally if you wanted to define a new Monoid you'd go through the trouble of defining a newtype for it and defining an instance of Monoid for it, right? 12:43:52 roconnor: Yeah. Maybe the speed difference is random noice. 12:44:53 edwardk: yep 12:45:01 but say you wanted one for modular arithmetic (to hit the example from Oleg's paper), then you don't want to carry around the modulus at the term level it has to be carried at the type level so you can ensure that you always use the same modulus across the computation. so it should be a phantom type argument. 12:45:29 so one way to handle that is to define type level integers or something and carry it that way 12:45:31 What happened to all the @karma? 12:45:46 shachaf: I heard something about a power outage 12:45:53 Lemmih: it is both consistent and signifigant. 10% or 20% 12:45:54 the funny thing is that here you are doing the same thing, but at the constraint level 12:46:06 The quotes seems to be there. 12:46:07 @quote 12:46:07 gFunk says: [the main advantage of functional programs are that they're] incorrect the first 1000 times you try to compile it! 12:46:16 dozer: did my case work? 12:46:21 s/seems/seem/ 12:47:09 another way is to come up with a way to reify terms into types using some typeclass hackery and rank-2 types, then rely on unification to ensure that you always use the same parameter for the thing you quantify over, like the ST monad. 12:47:43 then by abusing the notion of a stable pointer you can lift anything to the type level, functions, etc. not just integers. 12:47:48 and ensure that its used consistently 12:47:57 roconnor: just a sec - having trouble with brackets or something... 12:48:18 edwardk I dont' understand the role of stable pointers here. Are they used just to unsafeCoerce things ? 12:48:40 mnislaih: the idea is this, a stable pointer can be converted to an integer and back safely no? 12:48:50 even if its a stable pointer to a function or something scary. 12:49:02 edwardk: I thought the idea was that it can be converted to a Ptr and back 12:49:12 though the Ptr won't point at anything interesting 12:49:23 (necessarily) 12:49:34 samb: well, to marshal it through the type system using the oleg trick. 12:49:43 the oleg trick? 12:49:46 roconnor: yup, that's behaving 12:49:57 samb: http://www.cs.rutgers.edu/~ccshan/prepose/prepose.pdf 12:51:02 --- join: olsner (n=salparot@c-d18fe155.710-8-64736c10.cust.bredbandsbolaget.se) joined #haskell 12:51:06 dozer: \o/ 12:51:28 so you take your term, transform it into a stable pointer, then reify that as an integer into a type-level integer, then you can reflect that integer down to the term level, and transform it back into a stable pointer, giving you a way to basically force 'term-level' unification in limited contexts. 12:52:21 add a little bit of magic so you don't leak memory each time you round-trip a term and you're done 12:53:02 ouch, that's a lot of magic 12:53:48 edwardk: I don't remember the FFI addendum saying you can cass them to integers safely 12:54:07 er. cast. 12:54:24 cuss them to integers? :) 12:54:41 anyways with it you can do something like define a withMonoid :: (a -> a -> a) -> a -> (forall s. ReflectMonoid s a => MkMonoid s w) -> w, where you provide the function and 'zero' and the forall ensures that the same function and zero are used throughout the computation. 12:54:56 --- join: ihope__ (n=ihope@c-71-205-100-59.hsd1.mi.comcast.net) joined #haskell 12:55:36 SamB: they don't cast, they go through Storable :-) 12:55:46 which gives you a string, which is a list of integers 12:55:59 um. 12:56:01 okay. 12:56:06 samb: iirc Stable is Storable, so you can transform it into an array of characters, then reify that 12:56:14 --- join: mrsolo (n=mrsolo@dsl092-025-194.sfo1.dsl.speakeasy.net) joined #haskell 12:56:18 --- quit: gour ("Quit (http://www.xchat.org)") 12:56:20 that sounds pretty damn sick! 12:56:24 @instances Storable 12:56:25 Couldn't find class `Storable'. Try @instances-importing 12:56:26 it is! 12:56:33 how is that useful AT ALL? 12:56:49 read the paper, it has examples and stuff 12:57:18 samb: because you can carry around arbitrary term level functions and things in the form of phantom type parameters. 12:57:31 --- join: mascht (n=martin@ppp-82-135-89-24.dynamic.mnet-online.de) joined #haskell 12:57:34 --- join: QplQyer (n=jeroen@dD5E09C0D.access.telenet.be) joined #haskell 12:57:37 it's quite useful. but I think it's also quite slow 12:58:06 it seems like it is only slow on the first round trip. after that the way its implemented in the paper the thunk is evaluated and its generally free. 12:58:08 and it sounds leaky too 12:58:27 or very very constraining 12:58:48 but you can do some very cool stuff with it. 12:59:01 it leaks only if you don't subsequently reflect the type at least once. 12:59:17 roconnor: thanks for your patience and help :) I think I can get my stuff coded up from here 12:59:19 --- join: sam__ (n=sam@c-69-143-48-69.hsd1.va.comcast.net) joined #haskell 12:59:38 --- quit: hordf ("Bye") 12:59:56 --- join: reffie (i=refugee@elvis.mu.org) joined #haskell 13:00:04 dozer: I enjoyed the puzzle. 13:00:05 Being able to do typed modular arithmetic where the modulus is only specified at runtime is neat, at the very least. 13:00:05 how do you make circular lists in haskell? 13:00:19 reffie: cycle 13:00:21 In my toy prelude I have to use template haskell hackery to generate almost all of my instances anyways, so i'm debating about while I'm at it automatically generating the machinery to reify and reflect term-level dictionaries into instances of the typeclass in question. 13:00:30 > cycle [1,2,3] 13:00:32 [1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2... 13:00:38 toy prelude? 13:00:40 that makes an infinite list by tying the end to the start 13:00:44 opqdonut but how is it implemented? :) 13:00:56 ?src cycle 13:00:56 cycle [] = undefined 13:00:56 cycle xs = xs' where xs' = xs ++ xs' 13:01:03 ?wiki tying the knot 13:01:03 http://www.haskell.org/haskellwiki/tying_the_knot 13:01:27 http://www.haskell.org/haskellwiki/Tying_the_Knot <-- this rather 13:01:28 Title: Tying the Knot - HaskellWiki 13:01:34 matthew-_: basically going through kind of in the spirit of 'The Other Prelude' and making painful sweeping generalizations to the existing prelude that maybe aren't really practical in Haskel but let me explore language features i want to play with. 13:01:36 laziness makes it happen as if by magic 13:01:36 thanks 13:01:39 nw 13:01:40 quit 13:01:40 there's no absolute guarantee it will be implemented as a circular list though. 13:01:54 --- quit: sam__ (Client Quit) 13:02:03 even if most implementations do 13:03:11 --- quit: daniel_larsson (Read error: 110 (Connection timed out)) 13:03:17 --- join: niksnut (n=chatzill@a80-126-17-187.adsl.xs4all.nl) joined #haskell 13:04:15 @kind [] 13:04:16 * -> * 13:04:20 @kind Prelude.[] 13:04:22 parse error on input `.' 13:04:25 Bah. 13:04:34 @kind Prelude.Maybe 13:04:36 * -> * 13:04:39 Yup... 13:04:50 --- quit: ihope (Nick collision from services.) 13:04:53 --- nick: ihope__ -> ihope 13:04:57 matthew: so, breaking out mathematical operators into magmas, monoids, groups, etc. breaking up monad into parts and putting it back together to get functor and applicative in the chain with some TH machinery to glue in the default method declarations so I don't go insane, etc. (.) as fmap, 13:04:59 potentially conflating the APIs for reader/writer/state monads, possibly mnislaih's parameterized exception monad 13:05:00 etc 13:05:22 hm, anyone remember that paper where they used type classes to carry environmental information? e.g. which modulus to use for some arithmetic operation? 13:05:33 nominolo: its that paper i linked to above 13:05:56 --- join: lekro (n=lekro@drms-590d5afb.pool.einsundeins.de) joined #haskell 13:06:21 --- quit: erg0t (Remote closed the connection) 13:06:40 --- join: AtnNn (n=welcome@modemcable085.68-56-74.mc.videotron.ca) joined #haskell 13:06:46 The problem with this is the eg in Haskell it's impossible to distinguish between magmas and semilattices, since the laws are erased. 13:07:11 Is class Foo a | -> a where . . . valid? :-) 13:07:22 ihope: yep 13:07:34 --- join: benny__ (n=benny@p57B574B8.dip.t-dialin.net) joined #haskell 13:07:36 ihope: i've used it a few times to ensure that a typeclass isn't extended outside of the module it is defined in 13:07:45 Does that only allow one instance? 13:07:52 edwardk: heh, thanks 13:08:00 yeah 13:08:49 http://comonad.com/haskell/type-int/src/Data/Type/Boolean.hs uses it to ensure that you don't extend the type level Booleans types to more than T and F. 13:09:58 --- join: filz (n=hordf@host247-167-dynamic.61-82-r.retail.telecomitalia.it) joined #haskell 13:11:35 data Closure; class Closed a | -> a; instance Closed Closure; .... then you can use that in the LHS of a class definition class (Closed c) => ClosedFoo c x | x -> c; ... and then derive from that to finish concealing it, class (ClosedFoo Closure x) => Foo x; ... to make a closed typeclass that can't be extended outside of the module where 'Closure' is defined unless you export Closure. 13:12:53 --- join: sam__ (n=sam@c-69-143-48-69.hsd1.va.comcast.net) joined #haskell 13:13:07 --- quit: shapr ("restart X") 13:13:37 --- quit: careo (Read error: 113 (No route to host)) 13:13:49 --- part: sam__ left #haskell 13:15:07 ihope: i use that trick a lot actually, any time I want to make sure that someone won't subvert the correctness of a closed set of instances by extending it on me. 13:15:24 It's a little hackish, though, no? 13:15:39 ihope: well, there isn't a good alternative is there? 13:15:52 Apart from extending the language, I don't see one. 13:16:00 yep =) 13:16:05 I'm working in MonadPlus, and have a list of items in 'toAdd'. What do I do to toAdd to make it behave as if I've mplus-ed them all together (e.g. forked execution on each one)? 13:16:13 Though extending the language is not an impossible thing to do. 13:16:40 ...does "|-> a" having those semantics fall out naturally, or is it a special case? 13:16:44 dozer: apply msum to the list? 13:16:51 @type msum 13:16:53 forall (m :: * -> *) a. (MonadPlus m) => [m a] -> m a 13:16:54 --- join: mejja (n=user@c-2a2472d5.023-82-73746f38.cust.bredbandsbolaget.se) joined #haskell 13:16:55 @type msum 13:16:56 @src msum 13:16:57 forall (m :: * -> *) a. (MonadPlus m) => [m a] -> m a 13:16:57 msum = foldr mplus mzero 13:17:03 ah, sweet 13:17:04 EvilTerran: I think it pretty much does it all naturally. 13:17:36 seems to me that " -> a" shouldn't do anything 13:17:40 class Foo a b | a -> b requires that every a does with only one b. 13:17:53 s/does/goes/ 13:18:02 --- quit: Igel ("Leaving") 13:18:05 *slightly offtopic* How do I ask lhs2Tex to use a tt font in poly style ? 13:18:23 That is, it doesn't allow b to be different if a is the same. 13:18:25 ah... "a b -> c" means c is unique, given any a and b 13:18:27 EvilTerran: it says that a can be uniquely determined with no additional information 13:18:30 Yes. 13:18:44 And -> a means that a is unique given nothing at all. 13:18:48 and "| -> a" means a is unique, always 13:19:05 err... I wish the author (kosmikus) was around ...ahem.. 13:19:18 I am 13:19:35 * ihope nods 13:19:46 :) So how do I replicate example 4.6 ? 13:20:03 I can't find a directive to change the font used 13:20:23 I think it requires to change a number of things 13:20:26 Cale: preference quiz, should I call it 'foldr' or 'cata'? = 13:20:28 er =) 13:20:43 I don't want to change the keywords, only the font, and only if there is an easy way to do it 13:20:43 I don't mind foldr 13:20:56 it's like a, er, whaddayacallit... \vdash with nothing on the left... 13:21:04 cata should be more general than that 13:21:06 mnislaih: what do you mean, not change the keywords? 13:21:07 yeah 13:21:12 mnislaih: the keywords should not be in tt? 13:21:15 well, i'm thinking in the Data.Foldable sense 13:21:33 kosmikus: I meant the symbols. I don't want to mimic tt style, I just want the typewriter font 13:21:35 Even the foldr in Data.Foldable isn't what I'd usually call cata 13:21:43 cale: true 13:21:56 i guess i'll stick to the fixpoint signature for cata 13:22:05 then keep a separate Foldable around 13:22:06 kosmikus: it is probably easier to use --tt and non parameterized directives instead of --poly, right ? 13:22:19 Some futuristic Haskell ought to provide some automatic way to get at the type behind the fixed point :) 13:22:25 --- quit: benny_ (Read error: 110 (Connection timed out)) 13:22:33 (maybe) 13:23:16 mnislaih: well, depends on how perfect you want to get it 13:23:29 --- quit: timlarson_ ("Leaving") 13:23:35 mnislaih: the documentation example is typeset using polytt.fmt from the doc/ subdirectory 13:23:56 kosmikus: of course, as perfect as possible. I will take a look at that file 13:23:58 mnislaih: you can try to %include polytt.fmt and see if it does what you want 13:24:09 kosmikus: sounds like a great idea, thanks 13:24:09 cale: i kind of like dave menendez's version of cata in his little Control.Recursion module: http://www.eyrie.org/~zednenem/2004/hsce/Control/Recursion.hs. where you can use the fundep in his Fixpoint class to extract the underlying functor. 13:24:27 --- quit: SuperIronBob ("ChatZilla 0.9.78.1 [Firefox 2.0.0.4/2007051502]") 13:24:41 mnislaih: but it might have some nasty side-effects; I've only ever tested it on the one example and whether it works for the docs 13:25:04 kosmikus: I will let you know 13:25:20 maybe not right now, but I'll send you an email 13:25:41 the only problem I have with it is, as implemented it can't be extended to handle exponential functors, ala meijer/hutton or fegaras/sheard. 13:25:42 mnislaih: ok. if you really need it, I can also try to hack up a better .fmt file for you. 13:26:00 --- quit: Kahdloc ("May teh source be with you.") 13:26:04 mnislaih: I'll probably do some work on lhs2TeX during the next few days anyway; got a couple of bug reports recently 13:26:13 --- quit: rashakil ("Leaving") 13:26:47 --- join: shapr (n=user@73-150.175-24.bham.res.rr.com) joined #haskell 13:27:02 kosmikus: do you receive privs ? 13:27:11 --- join: daniel_larsson (n=danilo@c80-217-182-58.bredband.comhem.se) joined #haskell 13:29:29 --- quit: paolino (Read error: 110 (Connection timed out)) 13:30:07 --- quit: kowey () 13:33:57 --- join: dmhouse (n=user@host86-132-138-230.range86-132.btcentralplus.com) joined #haskell 13:35:02 * dmhouse runs fetchmail after a month without reading his email 13:35:33 in ghci, how do I import a module as if I'd done "import Foo.Bar"? 13:35:39 :m + 13:36:54 --- join: blackdog_ (n=mwotton@202-137-100-157.dial.usertools.net) joined #haskell 13:37:12 ah, thanks 13:38:33 even after removing fromIntegral I still get: 13:38:36 bsLength Data.ByteString.Rope 33.1 37.7 13:38:39 in my profile. 13:38:52 37.7% of the allocations. 13:38:55 what is it doing? 13:39:04 the profiler must be lying to me. 13:39:11 roconnor: forcing things into memory that were previously lazily suspended 13:39:37 dcoutts: the length of a bytestring? 13:39:38 length itself allocates nothing, but if it's the thing that did the forcing... 13:40:16 --- quit: mnislaih () 13:40:38 --- quit: eno__ ("leaving") 13:40:39 --- quit: filz ("Bye") 13:40:48 --- quit: ejt (Read error: 113 (No route to host)) 13:40:49 --- join: eno (n=eno@nslu2-linux/eno) joined #haskell 13:40:52 how could calling the length of a bytestring force anything... well other than the bytestring itself. 13:41:00 exactly 13:41:23 I thought the profiler was less confusing than that. 13:41:50 but that would explain things 13:42:48 making a bytestring probably does big memory allocations. 13:45:19 roconnor: You're not using my updated uncons? 13:45:47 --- join: Eelis_ (n=Eelis@any.xs4all.nl) joined #haskell 13:45:54 Lemmih: ah no, not yet. 13:45:59 @pl \m k c -> m c >>= k 13:45:59 flip . ((>>=) .) 13:46:03 blech 13:46:16 Lemmih: I haven't decided if I want break the rule that there are no short bytestrings next to each other. 13:46:58 dang - Data.Graph.Inductive.Graph doesn't let you alter the label for a node :( 13:48:23 roconnor: Why would you break that rule? 13:48:52 edwardk: ok, i guess i just stick with my reader monad :) 13:49:41 edwardk: the code is monadic anyways. but the paper is pretty readable 13:50:05 --- join: Khoth (n=khoth@cpc3-cmbg5-0-0-cust69.cmbg.cable.ntl.com) joined #haskell 13:50:11 --- part: swiert left #haskell 13:50:22 Lemmih: do you check during uncons how long the second element in the tree is? 13:51:03 --- join: pf_moore (n=chatzill@arkenstone.demon.co.uk) joined #haskell 13:51:23 roconnor: Did the previous uncons check that? 13:51:38 Lemmih: it called append and then append did that check. 13:52:26 map ("super " ++) ["Awesome] 13:52:32 > map ("super " ++) ["Awesome] 13:52:32 Improperly terminated string 13:52:36 oof 13:52:38 > map ("super " ++) ["Awesome"] 13:52:41 ["super Awesome"] 13:52:42 I'd like to include a library that contains a module Foo.Bar in my source base. I placed that library into a directory called Lib; unfortunately importing Lib.Foo.Bar doesn't work as the module is defined to have the name "Foo.Bar" and not "Lib.Foo.Bar." How can foreign source be included in one's project without having to change the foreign source? 13:52:49 and there goes my haskell practice for the day 13:52:54 --- quit: blackdog (Read error: 110 (Connection timed out)) 13:53:03 tcr: Don't change the names. 13:53:43 sorear: This would mean I have to splice the whole directory layout of the library into my source directory. 13:54:01 tcr: -iLib then 13:54:43 --- nick: dxl_ -> dxl 13:55:20 tcr: and for Cabal "hs-source-dir: . Lib" (i think) 13:56:28 tcr: but why can't you install the extra lib outside of your source tree? 13:58:34 tcr: what you want to do is install the foreign sourced 'package' on your machine using cabal or something, then compile with an additional -package option on the command line naming it 13:58:44 How would I go about using a Windows API call that doesn't seem to be in System.Win32? 13:58:58 nominolo: Self-containness of the source package. 13:59:12 tcr: thats how Haskell is meant to be distributed these days. what chunk of source code do you want to import? 13:59:51 ihope: Short term: foreign import stdacll Long term: whine to eivuokko 13:59:57 tcr: and even if the original source isn't in a cabal package you can put one together around it pretty quickly. 14:00:02 tcr: but when that library is on hackage, then cabal-install takes care of the rest 14:01:27 --- quit: MarcWebe1 (Read error: 110 (Connection timed out)) 14:01:53 oh 14:02:08 when i run cabal-install update i get: 14:02:24 --- quit: Eelis (Read error: 110 (Connection timed out)) 14:02:28 sorear: do you know what file to import from? 14:02:34 It's not entirely my decision, and it's not decided as of yet; just wanted to test out how smoothlessly it could be done. 14:03:12 ihope: Huh? You just said it's not in System.Win32.* 14:03:19 tcr: if you need it all to be one package and not cabal-installed from fragments, then the hs-source-dirs: src other-lib-src approach is the cleanest 14:03:29 nominolo pasted "cabal-install update error" at http://hpaste.org/1975 14:03:43 --- join: doublef (n=doublef@85.172.95.5) joined #haskell 14:03:54 --- join: ikegami-- (n=ikegami@29.41.138.210.xn.2iij.net) joined #haskell 14:04:07 edwardk: I'm not using Cabal as of now, but it certainly looks nifty. :) 14:04:08 sorear: you said to use foreign import. Do I have to specify the file I'm importing from? 14:04:22 so if i want an HTTP library that supports SSL, am I out of luck? 14:04:40 anyone tried cabal-install update in the last couple weeks? 14:04:47 ihope: Only at link time. 14:04:48 bct: have you tried HaskellNet? 14:05:03 nominolo: that's a very old version of cabal-install you're using 14:05:16 bct: it comes with support for HsGnuTLS, which is a binding to gnutls, a library for TLS (previously known as SSL). 14:05:18 tcr: i converted fairly recently, makes life a LOT easier 14:05:19 nominolo: hackage hasn't used xmlrpc for ages 14:05:21 ihope: foreign import will get it directly from user32.dll or wherever. I'm not very familiar with Windows linkeres, however 14:05:33 dmwit, no i have not. i'll take a look, thanks 14:05:57 dcoutts: interesting .. i wonder why i have it then 14:06:19 my oldest ghc is 6.5.xxxx 14:06:26 ihope: Make very very sure to use the correct prototype, getting it wrong could produce segfault bugs that stay dormant for most of a decade (cf X11 on unix) 14:06:30 (one of the first mac builds) 14:07:00 Yes, I'll see how far I can take this. 14:07:18 --- join: dibblego (n=nobody@220-245-107-64.static.tpgi.com.au) joined #haskell 14:07:28 --- part: doublef left #haskell 14:08:07 nominolo: where did you get your cabal-install from? I'd suggest using the latest darcs version. 14:08:20 dcoutts: what is the cabal-install version from ghc-6.6.1? 14:09:30 nominolo: cabal-install does not come with ghc. yet. 14:10:02 i think i isstalled the one from /Users/nominolo/sw/ghc-6.6.1/libraries/Cabal/cabal-install/ 14:10:12 ie, my self-built ghc-6.6.1 14:11:07 --- join: delYsid (n=user@chello084115136207.3.graz.surfer.at) joined #haskell 14:11:21 grussgott delYsid! 14:12:03 Ooh the darcs.net website is working again. 14:12:36 nominolo: ah ok. the source was included in Cabal at that time, but it was never built or installed by default. 14:12:49 nominolo: it's changed significantly since that code 14:13:22 the whole hackage client/server protocol is different 14:13:27 it's now much simpler 14:13:31 so, do i have to darcs get http://darcs.haskell.org/cabal/cabal-install? 14:13:40 --- quit: mattrepl ("This computer has gone to sleep") 14:13:43 --- quit: Choko (Remote closed the connection) 14:13:44 dcoutts: yeah, it needed lots of deps 14:13:45 --- nick: tizoc_ -> tizoc 14:13:47 --- join: Choko (n=choko@0x503e3923.hsnxx4.adsl-dhcp.tele.dk) joined #haskell 14:14:15 --- join: fasta (n=fasta@zonnebloem.demon.nl) joined #haskell 14:14:17 nominolo: yep, got to get it from darcs atm, I should upload a tarball to hackage 14:14:24 dcoutts: which is kind of ironic, since that's what cabal-install is supposed to sole 14:14:32 I know :-) 14:14:38 dcoutts: yes please :) 14:14:43 eventually it will be bundled with ghc to solve the bootstrapping 14:14:48 nominolo: use --partial or you'll have to wait a long time 14:15:13 nominolo: tell me how you get on, if there are any major issues you run into. if it's ok I'll upload a tarball 14:15:16 that'd be awesomnest 14:16:19 --- quit: Cale (Read error: 104 (Connection reset by peer)) 14:17:16 dcoutts: er .. where *is* the current version? 14:17:23 --- join: Cale (n=cale@CPE004854805910-CM000e5cdd834a.cpe.net.cable.rogers.com) joined #haskell 14:18:02 shapr: i am much for darcs (transparently) sending a tar-ball instead of lots of small changes 14:18:56 nominolo: http://darcs.haskell.org/cabal-install/ 14:18:58 Title: Index of /cabal-install 14:19:09 --- quit: lekro ("cu") 14:19:10 --- quit: jgrimes (Read error: 110 (Connection timed out)) 14:19:16 ah, found it http://darcs.haskell.org/packages/cabal-install/ 14:19:16 Title: Index of /packages/cabal-install 14:19:37 oh, seems to be an alias 14:19:39 nominolo: that's a symlink to the top level one 14:24:58 --- quit: doserj ("Verlassend") 14:25:20 --- nick: benny__ -> benny 14:25:21 --- quit: puchacz (Read error: 104 (Connection reset by peer)) 14:25:44 --- quit: dmhouse (Remote closed the connection) 14:28:03 ~tell cheeser about evil 14:28:07 Oops 14:28:10 Wrong window 14:28:17 hah 14:28:37 cheeser? Haskell? 14:28:50 --- quit: SamB (Remote closed the connection) 14:28:50 Like I said. Wrong window. 14:29:02 haskevil 14:29:26 Looks like a bot-command. Probably to a different server 14:29:39 It is a bot command. javabot factoid syntax. 14:29:48 DRMacIver was spying on us! 14:29:58 is using the word evil, evil? 14:30:20 dcoutts: ok, as of right now cabal-install is broken 14:30:23 I spy on everyone. 14:30:50 dcoutts: with the latest Cabal, that is 14:31:30 dibblego: Work out how evil your question was, and divide by two 14:32:06 Khoth, no Num instance for Question was found 14:32:14 dibblego: The relevant factoid is that using the word evil (for programming practices) is stupid. :) 14:32:24 --- join: Zeroth404 (n=zeorth@71-89-151-121.dhcp.aldl.mi.charter.com) joined #haskell 14:32:37 DRMacIver, typical Java bible stuff 14:33:03 * DRMacIver disagrees. 14:33:09 * dibblego as always :) 14:33:24 Labelling something as evil is not a useful activity. Explaining the harm that it can cause is. 14:33:43 is labelling something a useful activity, useful? 14:33:52 evil will always triumph because good is dumb 14:33:54 (or not) 14:33:55 yeah, labelling something as evil is itself an evil activity since it isn't useful 14:34:10 what if "evil" is a metaphor for "contradictory" or "not useful"/ 14:34:11 ? 14:34:15 evil considered harmful considered harmful 14:34:18 murder is evil 14:34:19 * Maddas lurks harder :-) 14:34:29 --- join: gnuvince_ (n=vince@modemcable109.93-59-74.mc.videotron.ca) joined #haskell 14:34:31 dibblego: What if "evil" is a metaphor for "pink fluffy bunnies"? :) 14:34:32 SamB_XP_, many moral philosophers have derived that 14:34:37 --- join: pastorn (n=pastorn@h90n3c1o968.bredband.skanova.com) joined #haskell 14:35:03 Is there a short term for what MonadPlus is other than a Monad where m a is a Monoid forall a? A monoidal monad seems to be a beast of a different color. 14:35:03 DRMacIver, what if you remove all the religious connotation of the word, "evil"? it's not a metaphor anymore 14:35:56 But it's still a moral judgement. Judging programming on moral criteria is silly. :) 14:36:04 nominolo: ok, I'm taking a look 14:36:04 edwardk: well, for one thing, m a is usually not a Monaid 14:36:06 er. 14:36:09 Monoid 14:36:18 dcoutts: no, i'm on it 14:36:26 nominolo: oh ok, thanks 14:36:28 I don't see it, or use it, as a moral criteria - I expect my audience not to as well (unless they are Java ninnies of course with religious convictions) 14:36:34 class Evil a; instance Evil Java. happy? 14:36:41 DRMacIver: not in safety-critical code 14:36:50 arguably, not in code that has any significant effect on people at all 14:36:51 samb: mzero and mplus, ignoring the vagaries of haskell's type system, I mean't Monoid in the mathematical sense =) 14:36:51 nominolo: you can send patches directly to me if you like 14:36:56 er meant 14:37:05 --- quit: lokadin (Read error: 104 (Connection reset by peer)) 14:37:11 edwardk: your mistake was in capitalizing the word monoid 14:37:23 --- quit: Zeroth404 ("Plik") 14:37:25 dcoutts: do you get them if i do darcs send? 14:37:48 samb: fair enough 14:37:48 nominolo: I'm just checking that actually 14:38:03 --- quit: mascht (Remote closed the connection) 14:38:09 nominolo: it goes to cabal-devel@haskell.org 14:38:33 samb: just trying to figure out what the nice short name for that would be. MonadPlus always struck me as a bit hackish 14:38:37 @quote evil 14:38:37 Igloo says: Did hugs' ./configure always end with "config.status: executing ultra-evil commands"? 14:38:38 nominolo: so if you want quick fixes applied send them to me this evening, in general sending to cabal-devel is fine though 14:38:42 oh, I see GHC has a bug in it's typechecking of "do" 14:38:57 > do 'X' 14:39:04 dcoutts: i'll just try to make it work. i'll add flag support later 14:39:05 Couldn't match expected type `t t1' against inferred type `Char' 14:39:10 mauke: not that one 14:39:19 samb: what bug is that? 14:39:19 --- join: erg0t (n=ergot@243-4.dedicado.com.uy) joined #haskell 14:39:23 nominolo: ok 14:39:31 edwardk: you wrote about it in your blog ;-) 14:39:41 samb: ok, thought that was the one 14:39:47 samb: was curious if you found another 14:40:01 --- join: lokadin (n=loki@209-161-213-211.dsl.look.ca) joined #haskell 14:40:38 Philippa: I think I disagree. The quality of the code is still purely a question of utility. Providing code you know to be poor quality can usefully have moral judgements passed on it, but the code itself is not good or evil. 14:40:43 edwardk: It is definately a bug. GHC is only supposed to be picky about the types of the arrow methods... 14:41:13 --- quit: kilimanjaro (Read error: 104 (Connection reset by peer)) 14:41:32 samb: well, the documentation does say the weakest type that monad can be presumed to have if i recall, and in that setting it has the same monad in each position. 14:41:41 samb: a shame, because i rather like my version =) 14:42:18 any tips for CLP with backtracking on ghc? 14:42:27 CLP? 14:42:32 @go CLP 14:42:33 constraint logic... 14:42:34 http://www.clpgroup.com/ 14:42:34 Title: CLP Group - China Light and Power 14:42:58 have you read Spivey+Seres' work? 14:43:15 (it's about LP rather than CLP, but still of some relevance) 14:43:15 --- quit: delYsid (Remote closed the connection) 14:43:19 um, an easy way to make [a..b] work where b < a ? 14:43:26 samb: plus it opens up type-indexed monads like type-changeable state monads (>>=) :: m i j a -> (a -> m j k b) -> m i k b 14:43:32 matthew-_: what do you expect it to do? 14:43:51 go downwards 14:43:56 matthew-_: reverse [b..a] ? 14:44:00 --- quit: iblechbot (Read error: 113 (No route to host)) 14:44:02 > [9, 8 .. 1] 14:44:03 matthew: [a,pred a..b] 14:44:03 DRMacIver++ 14:44:07 [9,8,7,6,5,4,3,2,1] 14:44:28 Thanks. :) 14:44:39 Heffalump: no, but I just found http://www.cs.rutgers.edu/~ccshan/logicprog/LogicT-icfp2005.pdf but I still thought I'd ask here for tips. 14:44:41 nominolo: the current Cabal doesn't seem to be able to parse it's own Cabal.cabal file 14:44:43 > [9..1] 14:44:45 [] 14:44:47 Hm 14:44:49 nominolo: setup: Cabal.cabal:27: Invalid syntax (no colon after field name) 14:44:55 --- quit: der_eq (Remote closed the connection) 14:45:03 edwardk: what is this about the monad types in the documentation? I don't see it in http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#rebindable-syntax 14:45:05 Title: 7.3. Syntactic extensions, http://tinyurl.com/y6v6by 14:45:29 dcoutts: that's new 14:45:48 matthew, if you're dealing with Num types, [a, a + signum (b-a) .. b] works regardless of whether you want to go up or down 14:45:49 nominolo: I'm not sure what you mean 14:46:01 dcoutts: that error 14:46:17 samb: old docs: http://haskell.org/ghc/docs/5.04.2/html/users_guide/syntax-extns.html#REBINDABLE-SYNTAX here mention it 14:46:18 http://tinyurl.com/25jzfb 14:46:24 not sure where it is in the current ones 14:46:26 --- join: gluon (n=chatzill@pD9EE7B0B.dip.t-dialin.net) joined #haskell 14:46:30 edwardk: yes but those are old docs 14:46:34 it's got to be a bug 14:46:36 --- join: delYsid (n=user@chello084115136207.3.graz.surfer.at) joined #haskell 14:46:37 report it as such 14:46:49 mnislaih and i have an open bug report for it 14:46:55 as a bug? 14:46:59 and i think someeone else spoke up on it 14:47:00 checking 14:47:02 not as a missing feature? 14:47:07 dcoutts: can you paste your Cabal.cabal? 14:47:18 dcoutts: i can build HEAD cabal with itself 14:47:31 nominolo: it's the current latest darcs version of Cabal with no local changes 14:47:40 nominolo: I do: ghc --make Setup.lhs -o setup; ./setup clean 14:47:42 dcoutts: did you build using make? 14:47:49 samb: http://hackage.haskell.org/trac/ghc/ticket/1537 14:47:50 Title: #1537 (do notation translation) - GHC - Trac 14:48:43 dcoutts: yes, that means your building it with your old version of cabal as includes 14:48:55 --- quit: msouth ("This narcoleptic computer has gone to sleep") 14:49:00 dcoutts: you need -i. or sth. 14:49:16 --- quit: nerdalert () 14:49:17 nominolo: no, it's using the current source, current files are taken in preference to packages 14:49:20 local files 14:49:46 nominolo: I can see ghc --make compiling the correct files, ie all of them 14:50:10 not just compiling Setup.lhs, but all the Cabal modules from the source tree 14:50:11 dcoutts: yes. but it uses the install cabal to resolve its deps 14:50:21 *installed 14:51:07 just try using make 14:51:19 --- nick: steele_ -> beschmi 14:52:47 --- part: kuser left #haskell 14:53:34 <_Nucleo> @src (\x -> gcd x 10 == 1) 14:53:34 Source not found. This mission is too important for me to allow you to jeopardize it. 14:53:39 <_Nucleo> @pl (\x -> gcd x 10 == 1) 14:53:39 (1 ==) . flip gcd 10 14:53:46 --- join: ddarius (n=derek@74.197.12.46) joined #haskell 14:54:35 --- quit: CosmicRay ("Client exiting") 14:55:11 nominolo: hmm, I'm surprised, I was sure local files were taken in preference to ones from packages, and they were all compiled, so I don't understand what the difference is. 14:55:52 nominolo: so no parse error, just lots of warning about unknown fields, ghc-options, cc-options, and several others. 14:56:02 dcoutts: yes, actually it shouldn't if it didn't. 14:56:14 dcoutts: oh, is that new? 14:56:28 nominolo: I've not seen that before certainly 14:56:31 --- quit: olsner () 14:57:01 dcoutts: hm. maybe Igloo knows 14:57:05 --- quit: fnord123 ("Leaving.") 14:57:08 --- join: SamB (i=naesten@216-15-104-38.c3-0.upd-ubr7.trpr-upd.pa.cable.rcn.com) joined #haskell 14:57:21 --- quit: chumphries (Remote closed the connection) 14:58:17 --- join: shillelagh (n=alex@unaffiliated/shillelagh) joined #haskell 14:58:20 nominolo: Knows what? 14:58:41 why we get lot's of unknown field warnings 14:58:45 Igloo: I'm getting several warning about unknown fields in Cabal's own .cabal file when it's building itself 14:58:56 setup: Warning: Unknown field 'extra-source-files' 14:58:56 setup: Warning: Unknown field 'nhc98-options' 14:58:56 setup: Warning: Unknown field 'nhc-options' 14:58:56 setup: Warning: Unknown field 'cc-options' 14:58:56 setup: Warning: Unknown field 'ghc-options' 14:59:04 this is bad :-) 14:59:38 I get that too 14:59:55 well I'm glad it's not just me this time :-) 15:00:13 me too 15:00:31 have we broken the parser somehow? 15:00:32 doesn't cabal work anymore? 15:00:43 SamB_XP_: darcs version, fear not 15:00:59 You didn't make it case sensitive did you, nominolo? 15:01:09 ah i know 15:01:12 --- quit: gluon ("ChatZilla 0.9.78.1 [Firefox 2.0.0.4/2007051502]") 15:01:14 Oh, it's lower cased them in the warning, so that's unlikely 15:01:16 they are in the wrong section 15:01:27 they have to go into the library section 15:01:40 Oh, yes, and extra-source files has to go in the top section 15:01:48 nominolo: ok glad you know :-) send me your patches when you're done 15:01:52 That makes sense; I was thrown by some being in library and some not 15:02:16 maybe we should have a better warning there 15:03:06 --- join: blarz (i=blarz@ist.keine.zielschei.be) joined #haskell 15:03:19 Igloo: you know that we've got this situation where some progs are handled explicitly (happy, hsc2hs, and 4 others) and some are handled through the ProgramConfiguration mechanism. 15:03:39 Igloo: I'm going to try and convert them all to go via ProgramConfiguration 15:03:47 dcoutts: Sounds good 15:04:06 Igloo: just wondering if you knew of anything for those progs that needs to be handled separately 15:04:16 dcoutts: Wait, I shouldn't be encouraging you to hack on Cabal when I want bytestring fixed :-) 15:04:24 I don't know of anything, no 15:04:25 hah 15:04:27 ok 15:04:45 --- join: chessguy (n=chessguy@ip68-227-192-233.dc.dc.cox.net) joined #haskell 15:05:22 --- quit: sjanssen (Read error: 110 (Connection timed out)) 15:05:34 --- quit: Alneyan (Read error: 60 (Operation timed out)) 15:06:25 edwardk: I think your Blog instance needs work 15:06:28 --- quit: binary42 () 15:06:43 --- quit: ivanm (Remote closed the connection) 15:07:16 unless Reader is exported from Control.Comonad, anyway 15:07:32 --- join: enolan (n=hellish@c-24-22-123-71.hsd1.mn.comcast.net) joined #haskell 15:07:36 dcoutts: Igloo: patch sent 15:08:14 Igloo: oh, and nothing is case sensitive in .cabal files 15:08:58 what about module names? 15:08:59 'evening ya'all 15:09:17 SamB_XP_: ok, all non-data 15:10:38 cabal field names and configuration flags are all not case-sensitive 15:11:33 --- join: jfredett (n=jfredett@c-76-19-232-14.hsd1.ma.comcast.net) joined #haskell 15:12:09 --- quit: erg0t (Remote closed the connection) 15:12:17 --- join: kaimmanalavu (n=sara@122.167.224.254) joined #haskell 15:14:10 --- quit: kaimmanalavu (Client Quit) 15:15:40 --- quit: sudoer () 15:15:54 --- join: thorat (n=doddi@194-144-13-100.du.xdsl.is) joined #haskell 15:16:18 --- quit: Nshag (Read error: 110 (Connection timed out)) 15:16:37 --- quit: therp (Read error: 113 (No route to host)) 15:19:05 --- quit: viblo (Read error: 104 (Connection reset by peer)) 15:20:43 samb: hrmm 15:20:47 samb: checking 15:21:35 nominolo: I'm not sure I understand the change, what was wrong? 15:21:55 samb: well, since there isn't a Control.Comonad I can pretend it has whatever it needs ;) 15:22:07 dcoutts: the compiler related fields are not allowed in the top part 15:22:31 dcoutts: conversely, the extra-src-dirs have to be in that section 15:22:38 nominolo: only in a library or executable stanza 15:22:53 --- quit: conal (Read error: 104 (Connection reset by peer)) 15:22:56 dcoutts: i'm fixing to have a more helpful error message 15:23:01 dcoutts: right 15:23:03 nominolo: ok 15:23:29 it'll show which fields are allowed in which section if an error occured 15:23:34 --- join: _dolio (n=dolio@216.68.188.68) joined #haskell 15:23:36 (or warning) 15:25:39 edwardk: Monadoid? :) 15:25:46 Ok, I think MonadPlus is when the subcategory of types that the monad injects types into is a symmetric monoidal category built off of coproduct and the initial object. of course that doesn't shorten the way of saying what it is any more than saying every m a is a monoid =) 15:25:46 --- quit: dolio (Nick collision from services.) 15:25:50 --- nick: _dolio -> dolio 15:26:10 class MandoDiao 15:26:12 --- join: chumphries (n=christop@labs.niroze.net) joined #haskell 15:26:34 pjd: =) 15:26:51 --- quit: tcr (Read error: 110 (Connection timed out)) 15:26:59 Monadois 15:27:50 --- join: Randroid (n=gregory@static-72-91-82-26.tampfl.fios.verizon.net) joined #haskell 15:28:21 pjd: right now I just gutted it and turned it into a set of classes for FAdd, FZero, FAddMonoid and added FMul, FOne, FMulMonoid for the terminal/product case, which i'm not sure is useful yet 15:28:41 (and built it over Functor rather than Monad) 15:28:45 when would (MonadPlus m) and (Monad m, Monoid (m a)) differ? 15:29:09 FZero? awesome! 15:29:24 hm, who is Sebastian Sylvan? 15:29:38 --- quit: Khoth () 15:29:43 edwardk: what are those classes in Control.Applicative-speak? 15:29:44 pjd, currently they don't, unfortunately, there is no way to roll Monad m, Monoid (m a) into a single typeclass other than to duplicate the functionality of Monoid 15:30:15 how do you mean duplicate? 15:30:15 --- quit: sharkk ("Royale With Cheese") 15:31:08 class Functor f => FAdd f where fadd :: f a -> f a -> f a; class Functor f => FZero f where fzero :: f a; class (FAdd f, FZero f) => FAddMonoid f; instance (FAdd f, FZero f) => FAddMonoid f 15:31:08 Anyone knows if the O'Reilly Haskell book is still being worked on? 15:31:35 gnuvince_: Real World Haskell? 15:31:50 shachaf: yes 15:31:51 chessguy: Sebastian Sylvan is Sebastian Sylvan. What kind of answer did you want? 15:31:57 gnuvince_: As far as I know. 15:32:09 There has been no bad news. 15:32:09 an IRC nickname 15:32:16 ah! 15:32:21 --- quit: GeoBesh (Read error: 110 (Connection timed out)) 15:33:25 gnuvince_: It might still be a while before anything is online, though. 15:33:30 fadd = <|> or mplus in applicative and monad terms. fzero = empty or mempty in applicative or monad terms., so FAddMonoid would be a 'weaker Alternative' that doesn't necessarily have return and ap. 15:33:34 edwardk: so FAdd + FZero are basically Applicative? 15:33:44 gnuvince_: I'm not sure. Last I heard they had ~5 chapters, I think? 15:33:50 FAdd + FZero is almost alternative 15:34:13 @hoogle unfoldr 15:34:14 List.unfoldr :: (a -> Maybe (b, a)) -> a -> [b] 15:34:14 Data.List.unfoldr :: (b -> Maybe (a, b)) -> b -> [a] 15:34:14 shachaf: they did mention they were gonna do like the Django book and put it online, didn't they? 15:34:29 add Return and Ap to flesh out the existing Alternative 15:34:34 chessguy: He's a graphics maniac. His master's thesis was on particle systems. 15:34:37 gnuvince_: Yes, it'll ne Creative Commons, I think. 15:34:42 --- quit: mrchebas () 15:34:45 pjd: i've piecemealed everything 15:34:48 edwardk: oh, sorry, braino; i read fzero as a -> f a 15:34:54 sorear, does he come on here? 15:34:55 gnuvince_: http://book.realworldhaskell.org/ 15:34:57 Title: Real-World Haskell 15:34:57 i see, yeah 15:35:12 chessguy: I don't know 15:35:14 shachaf: thanks. 15:35:25 * gnuvince_ should really start investing in learning Haskell. 15:35:35 edwardk: so i'm guessing FOne has a -> f a ? 15:35:38 pjd: mainly so when its done you should be able to safely pass any monad to anything expecting an applicative, etc. 15:35:43 --- quit: fasta ("Lost terminal") 15:36:00 ./05.08.14:18:48:59 --- join: sylvan (i=sebastia@c83-248-109-251.bredband.comhem.se) joined #haskell 15:36:07 chessguy: looks like a "yes" 15:36:13 pjd: haven't done FOne yet =) 15:36:17 @seen sylvan 15:36:18 I haven't seen sylvan. 15:36:30 edwardk: intended to be, i mean :) 15:36:36 Most recent sighting Feb 17 2007 15:36:39 s/be/have/ 15:36:54 gnuvince_: Yes, you should. :-) 15:37:02 gnuvince_: I'm sure #haskell will be glad to help. 15:37:05 pjd: right now I have class Return m where return :: a -> m a with that signature 15:37:29 shachaf: I downloaded yaht.pdf at home and at work 15:37:38 @where wikibook 15:37:38 http://en.wikibooks.org/wiki/Haskell 15:37:42 That might also help. 15:37:43 I just need to take the time to read it and play around 15:37:56 edwardk: ah, ok 15:38:12 --- join: ttmrichter (n=ttmricht@221.234.213.202) joined #haskell 15:38:22 shachaf: thanks 15:38:24 gnuvince_: How far have you gotten in Haskell? 15:40:07 gnuvince_: yaht is nice. i also found that dons little tutorials on his blog helped a lot: http://cgi.cse.unsw.edu.au/~dons/blog/2006/12/16 15:40:07 Title: Haskell hacking 15:40:41 Would the "A taste of Haskell" PDF be good to point people to? 15:40:48 Or does it not work well stand-alone? 15:42:17 shachaf: In Haskell, not much. I'm familiar with functional programming, I did some O'Caml a few years ago, Scheme and Common Lisp and some Erlang recently. For the "traditional" stuff (map, filter, recursion, lambda etc.) I'm okay. The more modern features of Haskell such as monads, type classes (I'm a dynamic typing kind of guy) are the part I'm less comfortable with. And there's the whole Haskell culture and some minor poin 15:42:20 dcoutts: patch is out 15:42:26 ok 15:42:30 `prefix`, the $ operator, etc.) 15:42:36 dcoutts: it'll now list all allowed fields 15:42:50 gnuvince_: Cut off after "minor poin". 15:42:56 nominolo: ok 15:43:24 shachaf: using the `function` syntax, the $ operator, etc. 15:43:31 nominolo pasted "new cabal error message" at http://hpaste.org/1977 15:43:39 for some reason i get an extreme sense of dislike when i look at ocaml. 15:43:47 shachaf: I'm also kind of uncomfortable with static typing 15:43:51 gnuvince_: $ is simple. 15:43:54 --- join: mluffel (n=chatzill@adsl-224-84-56.asm.bellsouth.net) joined #haskell 15:43:59 gnuvince_: f $ x = f x. 15:44:05 thoughtpolice: it's the ';' and lack of layout 15:44:11 it is for me 15:44:17 shachaf: I think I figured it out. f (g x) = f $ g x 15:44:18 gnuvince_: f $ g y === f (g y) 15:44:26 gnuvince_: Exactly. 15:44:27 dcoutts: hm. might be. i think i'll just trust my feelings on this one though and stick with haskell :p 15:44:41 gnuvince_: It just lets you get rid of parentheses. 15:44:41 dcoutts: oh, maybe a line number would be even more helpful 15:44:44 thoughtpolice: good choice 15:44:46 :) 15:44:50 nominolo: true 15:45:04 > let f x y = (x,y) in 1 `f` 2 15:45:09 (1,2) 15:45:10 > let f x y = (x,y) in f 1 2 15:45:11 (1,2) 15:45:22 That's all `infix` means. 15:45:59 Along with a few precedence and associativity rules that you can usually ignore. 15:46:00 shachaf: Another thing that might be difficult at first is the whole immutability thing. I didn't think I had a problem with it, but since O'Caml and Scheme and all have assignments, I never thought about it too much. 15:46:03 let subtract = (-) in 3 `subtract` 1 15:46:03 > let f = (,) in 1 `f` 2 15:46:04 (1,2) 15:46:14 * chessguy golfs schachaf 15:46:17 chessguy: I decided not to do that. :-) 15:46:19 gnuvince_: you get around it pretty easily in principle 15:46:22 chessguy: Though I did think about it. 15:46:23 --- quit: mjl69 (Read error: 110 (Connection timed out)) 15:46:57 gnuvince_: it seems like you could never write a program in such a way, if you play around a little you'll be writing the same stuff you were in say, scheme/lisp in no time with no destructive updates. :) 15:46:59 gnuvince_: Haskell is good in that respect -- you HAVE to think functionally, rather than cheating like Scheme lets you. 15:47:11 hi, is there a way (in ghci) to show all the typeclass instances that a data type has? 15:47:19 :i 15:47:25 thoughtpolice: I imagine. I was thinking about updating a hash table (Data.Map in Haskell?): in most imperative languages, you modify the the hash table directly. I imagine it's just a question of having the right frame of mind 15:47:51 first, think about binary operator as a function with two arguments. `function` just lets you use any two-argument function as binary operator 15:47:52 gnuvince_: with Data.Map you get returned an updated map, fyi :) 15:47:59 gnuvince_: http://haskell.org/ghc/docs/latest/html/libraries/base/Data-HashTable.html 15:48:01 http://tinyurl.com/y47x6e 15:48:07 thoughtpolice: yeah, I saw 15:48:22 thanks shachaf 15:48:39 mauke: cute, thanks. 15:48:52 gnuvince_: it may seem foreign at first (i know it did to me,) but I found you get around the 'no mutable state' thing with a lot less mental effort than you'd think at first. 15:48:59 --- quit: Randroid () 15:49:38 --- quit: pf_moore ("ChatZilla 0.9.78.1 [Firefox 2.0.0.5/2007071317]") 15:50:03 nominolo annotated "new cabal error message" with "now with line numbers" at http://hpaste.org/1977#a1 15:50:07 --- quit: ddarius (Read error: 110 (Connection timed out)) 15:50:17 gnuvince_: that's general pattern - instead of modifing in place, the modified value is returned 15:50:18 thoughtpolice: I'm sure with some practice I'll be all right. 15:50:32 gnuvince_: spend a little time writing some basic stuff (I did the somewhat classic reimplementation of several unix utilities) and you'll be up on your feet in no time. :) 15:50:52 thoughtpolice: I rewrote a bunch of List functions 15:51:01 main = interact id -- simple implementation of cat. :-) 15:51:18 map, filter, zip, reverse, append, member, etc. 15:51:50 gnuvince_: That's probably pretty easy if you've used Scheme. 15:51:52 main = interact $ unlines . reverse . lines -- tac ftw! 15:52:54 gnuvince_: Though you don't write some functions tail-recursively in Haskell. 15:53:22 --- quit: roconnor (Read error: 104 (Connection reset by peer)) 15:55:09 shachaf: I imagine GHC optimizes tail recursion? 15:55:17 gnuvince_: of course 15:55:50 (what do you think this is ... C? though GCC does that anyway...) 15:56:00 there's a Data.Array.IO. Why is there no Data.Map.IO? 15:56:11 --- join: chessguy_ (n=chessguy@ip68-227-192-233.dc.dc.cox.net) joined #haskell 15:56:16 (the lazyness means that non-tail-recursive functions don't have to grow stack always) 15:56:27 SamB: Lot of languages don't do it, just checking ;-) 15:56:28 thorat: Data.Map is a purely functional datastructure 15:56:37 ok 15:57:12 does ghc just optimize tail recursion or tail calls in general? 15:57:13 --- quit: mdmkolbe|ubuntu (Read error: 110 (Connection timed out)) 15:57:19 gnuvince_: The report doesn't say anything about it, but the implementors aren't stupid ;-) 15:57:21 LoganCapaldo: All tail calls. 15:57:27 neato 15:57:47 I guess the Cont monad would be kind of lame if it didn't 15:57:57 LoganCapaldo: it would be too tricky to work out whether something was potentially recursive or not ;-) 15:58:03 gnuvince_: Compare to scheme, which mandates general tail calls, and as a consequence most of the compilers aren't. :) 15:58:07 sorear: is that because it does cps conversion? (and cps conversion implies "free" tail call optimization?) 15:58:13 --- join: Binkley (n=krc@lolcopter.cs.pdx.edu) joined #haskell 15:58:19 Excedrin: No. 15:58:33 SamB: can't imagine Haskell programmers in general being stupid. It'd probably be a fun thing to watch an ASP/VBScript programmer trying the language :) 15:58:41 --- join: roconnor (n=roconnor@vhe-540354.sshn.net) joined #haskell 15:58:42 --- quit: Binkley (Client Quit) 15:58:42 (No offense to the ASP programmers in here) 15:59:03 Excedrin: Haskell compilers use a jumping scheme for calls in tail position; our scoping rules make it safe. 15:59:09 SamB, wel I was thinking of the naive tail recursive optimization (mutate arguments go to top of function body) but I guess laziness kinda of kills that lame way of doing it 15:59:13 Unlike C, which is tail-call-proof. 16:00:03 sorear: um. only if you have a &d variable! 16:00:11 --- quit: roconnor (Read error: 104 (Connection reset by peer)) 16:00:34 SamB: Sure, only if you take the address of a local variable, yeah. 16:00:40 But if you *do*... 16:00:45 @go Cheney on the MTA 16:00:47 http://home.pipeline.com/~hbaker1/CheneyMTA.html 16:00:47 Title: Cheney on the M.T.A. 16:01:11 one of the cleverest hacks I've seen. 16:01:33 is there any monad out there with sensible separate mplus and morelse implementations that differ? 16:01:51 what the heck is morelse? 16:01:55 --- join: Zeroth404 (n=zeorth@71-89-151-121.dhcp.aldl.mi.charter.com) joined #haskell 16:02:02 samb: http://haskell.org/haskellwiki/MonadPlus_reform_proposal 16:02:03 Title: MonadPlus reform proposal - HaskellWiki 16:02:24 samb: its a cale thing iirc 16:02:48 Oh Gosh, garbage-collect the stack?! :) 16:02:56 monochrom: works well 16:03:19 It's clever and crazy. :) 16:03:23 --- join: mjl69 (n=mjl69@h46087e57.area4.spcsdns.net) joined #haskell 16:03:27 is that the one where you jump off of the empire state building every so often? 16:03:49 --- join: binary42 (n=binary42@pool-72-85-210-146.bstnma.east.verizon.net) joined #haskell 16:03:53 monochrom: you just accumulate all the temporaries on the stack, then when you run out of space you rely on the fact that you are CPS transformed so need never return to anything below you on the stack, walk it for stuff to promote to the heap and them longjmp to the bottom 16:03:55 samb: yeah 16:04:10 samb: i used it in my javascript recompiler =) 16:04:10 yeah I always thought that was a neat hack 16:04:27 --- quit: QplQyer (Read error: 110 (Connection timed out)) 16:04:50 it of course has some terrible cache coherence issues, but its a very fast allocator 16:05:02 what cache coherence issues? 16:05:25 well, you rarely access the same portion of the cache 16:05:38 locality is killed... you always wonder to new places in the stack 16:05:40 coz you lack normal stack-head locality 16:05:46 well, when the stack grows very large, and useful stuff is scattered randomly. 16:05:49 you mean the CPU is treating the stack specially? 16:06:07 there should be a way to tell the CPU "empire state building ru 16:06:09 samb: no, but normally its around the same general place so its always in cache 16:06:11 les are in play" 16:06:20 But, it is no worse than doing everything in the heap. 16:06:37 ah. 16:06:58 --- quit: gkr (Read error: 113 (No route to host)) 16:07:09 --- join: mrsolo_ (n=mrsolo@dsl092-025-194.sfo1.dsl.speakeasy.net) joined #haskell 16:07:16 --- quit: mrsolo (Read error: 104 (Connection reset by peer)) 16:07:18 so normally writing a temporary to the stack isn't much worse than register access, (er that got pretty bad with x86-64) in the cheney on the MTA approach it almost always is. 16:07:46 monochrom: yeah but you lost the use of the stack for temporary spills 16:07:59 True. 16:08:26 so, my ghci (with -fglasgow-exts) doesn't think there is a "Data Float" instance, but the docs claim there should be: http://www.haskell.org/ghc/docs/6.6/html/libraries/base/Prelude.html#i:Float 16:08:28 http://tinyurl.com/2zqw9f 16:09:15 did you import Data.Generics.Basics? 16:09:22 i did 16:09:27 did you import Data.Generics? 16:09:46 --- quit: doctormach ("Leaving") 16:09:49 the main module imports everything, incl .Instances 16:10:23 ah 16:10:23 --- quit: rj459 (Read error: 110 (Connection timed out)) 16:11:07 ha, wow, thanks sorear 16:11:39 --- quit: chessguy (Connection timed out) 16:11:41 i was just importing data.Generics.Basics, lesson learned 16:12:03 --- quit: niksnut (Read error: 110 (Connection timed out)) 16:12:23 --- quit: moonlite__ (Connection timed out) 16:12:45 @djinn (a -> Bool) -> [a] -> (a -> b) -> b -> b 16:12:48 f _ _ _ a = a 16:12:52 heh 16:13:04 OPTOMIZED 16:13:21 mluffel: It's haddock's fault. It really should tell you when you need to import additional modules. 16:14:22 --- quit: rretzbach (Remote closed the connection) 16:14:27 --- quit: basti_ ("n8") 16:14:50 sorear: is there a reason why someone would want to only import .Basics? 16:14:56 --- join: rretzbach (n=robert@dslb-084-062-030-197.pools.arcor-ip.net) joined #haskell 16:16:04 mluffel: I don't think so, it's probably just for implementation splitting... but Haddock does have a way to mark internal modules, and it wasn't used 16:16:17 --- join: chessguy (n=chessguy@ip68-227-192-233.dc.dc.cox.net) joined #haskell 16:16:25 @type \p xs t d -> case filter p xs of { [] -> d ; (x:_) -> t x } 16:16:30 forall t a. (a -> Bool) -> [a] -> (a -> t) -> t -> t 16:16:59 --- join: sudoer (n=jtoy@c-24-60-25-28.hsd1.ma.comcast.net) joined #haskell 16:17:20 To be continued... 16:17:32 @bot 16:17:32 :) 16:18:05 @type \p xs t d -> maybe d t . listToMaybe $ filter p xs 16:18:06 --- quit: mluffel ("ChatZilla 0.9.78.1 [Firefox 2.0.0.5/2007071317]") 16:18:07 forall b a. (a -> Bool) -> [a] -> (a -> b) -> b -> b 16:18:20 @pl \p xs t d -> maybe d t . listToMaybe $ filter p xs 16:18:21 (flip (flip . flip flip listToMaybe . ((.) .) . flip maybe) .) . filter 16:18:44 so i'm wondering, what are string-rewriting systems (like endo's dna, but less obfuscated) good for? 16:19:29 @type \p xs t d -> maybe d t $ find p xs 16:19:31 forall b a. (a -> Bool) -> [a] -> (a -> b) -> b -> b 16:19:33 --- quit: nich (Read error: 113 (No route to host)) 16:19:58 (if anything) 16:20:01 --- join: RyanT5000 (n=ryan@76.24.22.253) joined #haskell 16:20:38 --- join: rashakil (n=rashakil@pool-68-236-47-194.phil.east.verizon.net) joined #haskell 16:22:03 --- join: seafoodX (n=sseefrie@CPE-143-238-248-235.nsw.bigpond.net.au) joined #haskell 16:22:11 @seen oleg 16:22:12 I haven't seen oleg. 16:22:45 --- quit: thorkilnaur ("Leaving") 16:23:13 @seen oleg 16:23:13 I haven't seen oleg. 16:23:53 what's oleg's nick? 16:23:56 --- join: nich (n=nich@unaffiliated/nich) joined #haskell 16:24:01 does he IRC? 16:24:14 i thought i had seen him in here before 16:24:16 but i'm not sure 16:24:16 --- quit: chessguy (Read error: 104 (Connection reset by peer)) 16:24:22 --- quit: Jaak ("Lost terminal") 16:25:13 --- quit: xinming (Connection timed out) 16:26:19 --- quit: chessguy_ (Connection timed out) 16:27:43 --- join: scorfield (n=seancorf@c-67-160-202-22.hsd1.ca.comcast.net) joined #haskell 16:28:32 ccshan DOES come, however 16:28:57 @seen ccshan 16:28:57 I haven't seen ccshan. 16:30:34 --- join: thorkilnaur (n=thorkiln@0x573a343a.odnqu1.broadband.tele.dk) joined #haskell 16:32:31 --- quit: chumphries (Remote closed the connection) 16:32:50 --- join: chumphries (n=christop@labs.niroze.net) joined #haskell 16:33:44 --- join: chessguy (n=chessguy@ip68-227-192-233.dc.dc.cox.net) joined #haskell 16:37:00 --- quit: seafoodX () 16:38:37 --- quit: seancorfield (Read error: 110 (Connection timed out)) 16:41:51 --- quit: bos (Read error: 110 (Connection timed out)) 16:44:35 The stack is magic on x86(-64). Pushing and popping variables on the stack is hardwired to L1 caching logic, doing arithmetic on it is weirdly slow, switching stacks likewise, and so on. 16:46:01 You're not really given a choice in the matter about temporary spilling etc.; if you don't make effective use of the stack you'll be dogslow. 16:46:12 --- join: ddarius (n=derek@74.197.12.46) joined #haskell 16:46:41 GHC doesn't use the stack at all, though. 16:47:00 wli: it shouldn't be so hardwired 16:47:29 SamB_XP_: x86 sucks 16:47:30 --- quit: binary42 (Read error: 104 (Connection reset by peer)) 16:47:35 I've looked at the generated code. It's not doing all that much different from C programs wrt. pushing and popping on the stack. 16:47:38 --- quit: cjeris (Read error: 104 (Connection reset by peer)) 16:47:40 --- join: MarcWeber (n=marc@pD9E0ABED.dip.t-dialin.net) joined #haskell 16:47:50 wli: doesn't it use a different register? 16:47:57 @paste 16:47:57 Haskell pastebin: http://hpaste.org/new 16:48:02 wli: esi /= esp 16:48:16 chessguy pasted "better way to do this?" at http://hpaste.org/1978 16:48:31 is it possible to declare an infix constructor, but still allow for field accessors? 16:48:37 chessguy: Yes. 16:48:54 anyway, it would be better if the CPU would let you say "okay, so I'm using ESI and ESP as stack pointers. please cache accordingly." 16:49:12 sorear annotated "better way to do this?" with "with record syntax" at http://hpaste.org/1978#a1 16:49:44 currently, ghc doesn't use esp at all, except for foreign calls. 16:50:03 ah, duh 16:50:11 sorear: Has this changed? 16:50:19 the rationale is that setting up a signal stack would be too much work, and running signals on the Haskell stack would impose unreasonable free space requirements 16:50:24 --- quit: dje () 16:50:36 wli: ghc has used its own stack for a very long time 16:50:40 --- join: gravity (n=david@dsl092-079-075.bos1.dsl.speakeasy.net) joined #haskell 16:51:09 --- join: uebayasi (n=Masao@i60-34-153-150.s02.a014.ap.plala.or.jp) joined #haskell 16:51:36 --- quit: gravity (Client Quit) 16:51:49 sorear: ca. 2000 timeframe? 16:52:56 any one know if the main haskell tutorial video from OSCON (the one with xmonad) is available yet? 16:53:00 --- join: gravity_ (n=david@dsl092-079-075.bos1.dsl.speakeasy.net) joined #haskell 16:53:06 wli: It's described in the paper I'm reading right now (Peyton Jones et al 1992, Implementing lazy functional languages on stock hardware: the spineless tagless G-machine) 16:53:11 What I'm looking at now is not remotely familiar. 16:53:27 falconair: it is, I forget exactly where though 16:54:04 (now with spines and tags!) 16:54:05 07.07.27:18:22:12 16:45 < CosmicRay_> woohoo! http://blip.tv/file/get/OSCON-OSCON2007SimonPeytonJones914.mov 16:54:30 sorear: Yes, I remember it was described there. 16:54:32 --- nick: gravity_ -> gravity 16:54:47 sorear: That's the Transactional Memory one. 16:55:16 oh. 16:55:22 @wiki Video tutorials 16:55:22 http://www.haskell.org/haskellwiki/Video_tutorials 16:55:28 sorear, ddarius, yeah, i saw the TM one already 16:55:51 what happened to the S? 16:56:04 STM :) 16:56:09 SamB_XP_: I guess that one is implemented in the hardware. :-) 16:56:26 It doesn't specify how it's implemented. 16:56:36 oh. I was thinking the S was for Simple for some reason 16:58:10 --- join: shoffsta (n=shoffsta@c-24-61-59-58.hsd1.ma.comcast.net) joined #haskell 16:59:14 sorear: Actually it's not. 16:59:28 sorear: But it's described somewhere. 16:59:45 --- quit: BCoppens ("Konversation terminated!") 16:59:57 @hoogle delete 16:59:57 List.delete :: Eq a => a -> [a] -> [a] 16:59:57 Data.HashTable.delete :: HashTable key val -> key -> IO () 16:59:57 Data.IntMap.delete :: Key -> IntMap a -> IntMap a 17:00:48 wli: It is too! Second paragraph of page 42 17:02:23 sorear: That underspecifies it. 17:02:51 --- join: ChilliX (n=chak@wireless-123.wireless.cse.unsw.EDU.AU) joined #haskell 17:03:12 'lo ChilliX 17:03:29 Hi :) 17:03:49 sorear: I seem to remember disassembling Haskell programs with vastly different results from what I now see at some point in the past. 17:04:26 maybe you were using -unreg back then? 17:04:33 * SamB_XP_ tried to say that 17:04:39 sorear: Very possible. 17:04:53 but I couldn't decide on an s or a z in spelling unregisterized fast enough :-( 17:05:17 --- quit: mjl69 (Connection timed out) 17:05:30 * wli wonders when 6.7 will hit the Debian package archives. 17:05:57 wli: Will it ever? 17:06:05 wli: I'd think they'd wait for 6.8. 17:06:22 6.8 is good enough for me. 17:06:24 they've had CVS builds with a different package name before, I think 17:06:40 back before GHC moved to darcs, obviously 17:06:58 When did it move to darcs? 17:07:42 ghc-cvs IIRC 17:07:49 which is still there, just ancient :) 17:08:13 Yeah, ISTR ghc-cvs being less recent than plain old ghc6. 17:08:26 of course it is 17:08:26 --- quit: RyanT5000 (Connection timed out) 17:09:28 --- join: rj459 (n=chatzill@128.250.36.30) joined #haskell 17:09:32 ghc-cvs 20060905-1 17:09:46 --- join: sambo357 (n=sam@c-69-143-48-69.hsd1.va.comcast.net) joined #haskell 17:11:20 I'd usually go bleeding edge but there was a reason I dumped it. 17:13:04 --- quit: sambo357 (Client Quit) 17:13:17 @type unfoldtree 17:13:18 Not in scope: `unfoldtree' 17:13:28 --- part: dozer left #haskell 17:13:45 ?users 17:13:45 Maximum users seen in #haskell: 374, currently: 339 (90.6%), active: 17 (5.0%) 17:13:51 cool 17:13:51 dons: You have 1 new message. '/msg lambdabot @messages' to read it. 17:14:07 @type unfoldTree 17:14:09 forall b a. (b -> (a, [b])) -> b -> Tree a 17:15:27 --- join: kilimanjaro (n=erik@cpe-66-25-133-18.austin.res.rr.com) joined #haskell 17:16:55 @pl m a t = N a t 17:16:55 m = N 17:17:13 dons: we're up to #13 17:17:29 just ~25 more people and we pass RoR 17:18:17 ouch! 17:18:33 ouch? 17:18:56 we don't want their spot. it, um, has cooties. 17:19:09 and only 58 to pass #ruby-lang 17:20:10 Think of it this way. Get 13 people to leave RoR and join here, that will put us ahead of them. :) 17:20:50 @users 17:20:50 Maximum users seen in #haskell: 374, currently: 340 (90.9%), active: 19 (5.6%) 17:21:17 * LoganCapaldo wonders what the stats would look like if you compared the "active" numbers 17:22:18 374!? 17:23:03 --- join: bitwize (n=user@c-24-147-83-177.hsd1.ma.comcast.net) joined #haskell 17:24:15 cool stuff 17:25:28 @type foldr ((+) . const 1) 0 17:25:30 forall b a. (Num b) => [a] -> b 17:26:16 @type genericLength 17:26:18 forall b i. (Num i) => [b] -> i 17:26:21 > foldr ((+) . const 1) 0 "abc" 17:26:22 3 17:26:44 * LoganCapaldo doubts the source to genericLength is written like that... 17:26:46 --- quit: sciolizer (Read error: 104 (Connection reset by peer)) 17:26:50 @src genericLength 17:26:50 genericLength [] = 0 17:26:50 genericLength (_:l) = 1 + genericLength l 17:29:12 @src length 17:29:13 Source not found. My mind is going. I can feel it. 17:29:28 dons: What happened to lambdabot's @karma? 17:30:39 @seen lambdabot 17:30:39 Yes, I'm here. I'm in #gentoo-haskell, #haskell, ##logic, #xmonad, #unicycling, #perl6, #parrot, #oasis, #jtiger, #haskell-soc, #haskell-overflow, #haskell-blah, #ghc, #darcs and #scannedinavian 17:31:00 @karma lambdabot 17:31:00 lambdabot has a karma of -1 17:33:42 --- quit: ptx (Read error: 110 (Connection timed out)) 17:34:58 @hoogle OrderedSet 17:34:58 No matches found 17:35:26 --- quit: ikegami-- (Remote closed the connection) 17:35:31 @hoogle readInt 17:35:31 Numeric.readInt :: Integral a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a 17:35:31 Numeric.readInt :: Num a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a 17:35:31 Text.Read.Lex.readIntP :: Num a => a -> (Char -> Bool) -> (Char -> Int) -> ReadP a 17:37:05 Here, slight off-topic-ness: http://xkcd.com/156/ 17:37:06 Title: xkcd - A webcomic of romance, sarcasm, math, and language - By Randall Munroe 17:37:10 How would that work for Haskell comics? 17:37:13 Er, comments. 17:37:18 --- quit: chumphries (Remote closed the connection) 17:37:25 --- join: chumphries (n=christop@labs.niroze.net) joined #haskell 17:37:46 --- quit: chumphries (Remote closed the connection) 17:37:53 --- join: chumphries (n=christop@labs.niroze.net) joined #haskell 17:38:42 hmm, does haskell have an ADT like an OrderedSet? 17:39:04 --- join: seafoodX (n=sseefrie@research-remote.nicta.com.au) joined #haskell 17:39:23 --- quit: SyntaxNinja ("Leaving.") 17:39:27 --- quit: arjanb ("zzz") 17:39:54 Data.Set works as an ordered set. 17:41:08 @seen dons 17:41:09 dons is in #xmonad and #haskell. I last heard dons speak 16m 53s ago. 17:41:31 monochrom, it's guaranteed to keep the members in order? 17:41:55 That's why most of the operations have an Ord => context. :) 17:41:57 dons: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/plugins-1.0 doesn't build, missing ../../../config.h when building src/Language/Hi/Parser.hs 17:42:00 http://tinyurl.com/2mxmrt 17:42:41 dons: and it looks like you're missing a .h file from the tarball which will be because you didn't tell cabal about the .h file so it did not include it in the sdist 17:43:37 --- quit: bgeron ("good night") 17:44:17 It is an open secret that Data.Set is a balanced binary search tree. To answer your question, the members are not stored "in order" - it is a nonlinear tree, not a linear list - but it is not too much work for the computer to enumerate them in the < order. 17:44:37 --- join: chessguy_ (n=chessguy@ip68-227-192-233.dc.dc.cox.net) joined #haskell 17:44:59 --- quit: chessguy (Nick collision from services.) 17:45:03 --- nick: chessguy_ -> chessguy 17:46:29 The implementation of Set is based on size balanced binary trees (or trees of bounded balance) as described by: 17:46:33 17:46:37 * Stephen Adams, "Efficient sets: a balancing act", Journal of Functional Programming 3(4):553-562, October 1993, http://www.swiss.ai.mit.edu/~adams/BB. 17:46:39 Title: Weight balanced binary trees 17:46:42 * J. Nievergelt and E.M. Reingold, "Binary search trees of bounded balance", SIAM journal of computing 2(1), March 1973. 17:46:45 from @docs Data.Set 17:48:33 dcoutts: hmm. we should tag and upload the darcs version anyway 17:48:39 or take down the one on hackage. 17:48:59 i use minView in Set sometimes 17:49:23 --- join: binary42 (n=binary42@pool-72-85-210-146.bstnma.east.verizon.net) joined #haskell 17:49:28 dons: the former would be easier for us :-) 17:49:44 ok 17:49:46 dons: today I decided hackage has come of age 17:49:53 yes, i saw the post. wonderful news! 17:50:04 dons: I was able to merge ~60 packages into our overlay 17:50:08 you should write something about the gentoo merge process 17:50:13 and all but 6 or 7 built first time 17:50:14 to inspire other distros 17:50:20 cool. that's good news 17:50:30 i'd imagine it was the old /demo packages, like plugins1.0 that failed? 17:50:43 and can we improve checks on hackage to prevent even those failing? 17:50:52 (from being uploaded) 17:50:58 I didn't test absolutely every package 17:51:33 I expected plugins to not work, but I tried it since I noticed it was 1.0 rather than 1.0_rc1 17:51:50 ok 17:51:57 I am starting to get totally hooked on this Haskell thing... 17:52:01 i think it was just put up there in the very early days to test packages 17:52:02 dons: I just had a user bemoaning the lack of lambdabot in portage 17:52:08 heh 17:52:10 bitwize: Run, run while you have a chance! 17:52:14 bitwize: :) 17:52:27 dons: and I said I'd love to, but it doesn't build with 6.6.x 17:52:33 ddarius: I wouldn't want my programming license revoked, would I? 17:52:56 dcoutts: ok. i'll note that. we might be able to upload it. and i can certainly tag/upload the darcs plugins package 17:53:07 dons: or am I wrong? can you build with 6.6.x with suitable versions of hs-plugins? 17:53:11 --- join: doctormach (n=Doc_Mach@h4.42.213.151.ip.alltel.net) joined #haskell 17:53:19 you can build the darcs version 17:53:28 i doubt the 4.0 version would build though 17:53:32 its a few years old now 17:53:37 dons: ah ok 17:53:52 dons: we'll try anything on hackage :-) we've got the automation 17:54:01 if it's not on hackage it doesn't exist 17:54:08 http://www.deviantart.com/deviation/60799166/ this came out of my recent hackery; I'm still a bit surprised I produced it 17:54:08 Title: Beautiful Mandelbrot Set by ~bitwize on deviantART 17:54:18 --- quit: fxr (Read error: 104 (Connection reset by peer)) 17:54:19 --- quit: v0|d (Read error: 104 (Connection reset by peer)) 17:54:36 dons: that's what we've got to tell package authors, apply the pressure, if it's not on hackage it doesn't exist. 17:54:55 right! 17:55:00 dons: although then we've got to make cabal-install work :-) 17:55:24 --- join: littledan (n=littleda@70-101-64-218.dsl1-field.roc.ny.frontiernet.net) joined #haskell 17:55:25 nice work bitwize 17:55:33 --- join: fxr (n=aycan@88.249.13.201) joined #haskell 17:55:35 bitwize: cool! 17:55:41 dcoutts: yes, that's the next thing. packages like lambdabot have ~20 dependencies on hackage 17:55:43 *downloads source* 17:55:58 dons: no probs 17:56:08 data Color = Color Word8 Word8 Word8 Word8 17:56:13 * monochrom contemplates a monster package that depends on all other packages. 17:56:16 bitwize: no need to add an extra tuple unnecessarily 17:56:20 its always good to see haskell art stuff 17:56:21 :) 17:56:21 Acme::All 17:56:33 !!!! 17:56:42 monochrom: you could call it 'testing' or 'unstable' :-) 17:56:50 --- quit: twanvl ("Good night") 17:56:52 --- join: chessguy_ (n=chessguy@ip68-227-192-233.dc.dc.cox.net) joined #haskell 17:57:05 ah that would be fun. cabal-install everything 17:57:18 for QA purposes, we should do just that 17:57:21 No. I want the monster to do something useful. Maybe a web browser written in Haskell. 17:57:23 regularly. 17:57:34 monochrom: oh, heh 17:57:49 monochrom: I've actually been considering ways to do that 17:57:59 Yes! A web browser with lambdabot built in! 17:58:01 "How about we tear the house down and grow root all over the backyard?" 17:58:02 just kind of passive back of the mind stuff 17:58:08 ddarius: thats not a bad idea 17:58:15 a webbrowser/irc client 17:58:17 monochrom: jfredett: using cairo for the drawing and the layout done in pure Haskell :-) 17:58:18 --- join: emm- (n=none@209.60.12.24) joined #haskell 17:58:41 the crucial question is: what will it be called? 17:58:43 dcoutts: I dunno, I figure after I'm done hacking around in my Finite Automata library 17:58:50 Havigator? 17:58:51 pjd: Horizon? 17:58:58 jfredett: nice 17:59:00 as in, looking out on the? 17:59:03 --- join: O1athe (n=Olathe@12-210-82-101.client.mchsi.com) joined #haskell 17:59:08 jfredett: omg awesome. 17:59:12 haszilla 17:59:16 heh, HaskTML? 17:59:34 --- quit: ednarofi (Read error: 110 (Connection timed out)) 17:59:36 jfredett: That's what we call the WYSIWYG editor. 17:59:37 * mrd ponders a gigantic monster in the form of a Lambda 17:59:46 lol 18:00:02 Horizon would be a good name for a browser 18:00:11 a great name! 18:00:16 probably taken 18:00:22 Horizon is a pert-near ideal name. 18:00:43 doesn't look like it 18:00:47 Well now that we have a name for it, it must be implemented. 18:00:49 theres an image browser named horizon 18:00:53 ddarius: lol 18:01:00 someone set us up the Repo. :) 18:01:10 I'll hack at it when I have time 18:01:11 :) 18:01:30 mrd: besides, who cares if it's taken, we'll take it back 18:01:30 Name it after a species of spider with a nice-sounding name. 18:01:32 s/us up/up us/ 18:01:36 I am accountable for a few crazy ideas here. 18:01:45 A performance question -- given an infinite list, if I do sum $ take 100000 myList in GHCi... 18:01:51 pjd: righto, my bad 18:02:01 Alleria: yeah? 18:02:02 :) 18:02:05 if I then re-run the same command, how come it's still taking a few seconds? 18:02:10 > sum $ take 100000 [1..] 18:02:12 5000050000 18:02:17 because you've not memoised the result 18:02:31 dons: the list isn't persistent? 18:02:32 Alleria: I dont think GHCI memoizes automatically, like hugs seems to 18:02:37 not in this case 18:03:04 Alleria: now, if it took a while to compute each list element in turn, then that would be memoized 18:03:08 Alleria: You won't have to reforce the evaluation of the first 100000 elements, but you will need to rebuild that list and sum it. 18:03:13 because the list structure would be updated with the values 18:03:34 ddarius: so the first 100,000 elements *are* evaled for good, but it's the rebuilding of the list and summing it that's taking time? 18:04:05 do you see any difference if you let s = [1..] ; then sum (take n s) ? 18:04:08 --- join: GeoBesh (n=root@ip68-14-78-176.ri.ri.cox.net) joined #haskell 18:04:21 lazy evaluation promises memoization, but only insofar as things bound to variable names and the variable names are still in scope. 18:04:25 ddarius: it's actually consistently taking 1.6 seconds or so to sum the first 10,000 elements on a MacBook pro, which seems awfully slow. 18:04:29 which will share the evaluated prefix of s, but given you're using ghci, it would be hard to notice any difference i think 18:04:37 Alleria: compile it! 18:05:12 dons: I'm loading the list definition in via :l, and then playing around with it. Is that good enough or no? 18:05:32 that's ok, but you're not allowed to complain about speed :) 18:05:37 let s = [trace "1" 1, trace "2" 2, trace "3" 3]; sum (take 2 s) 18:05:40 sum (take 2 s) 18:05:46 main = print . sum $ take 10000 [1..] 18:05:49 $ ghc -O2 A.hs 18:05:53 $ time ./a.out 18:05:53 50005000 18:05:53 ./a.out 0.01s user 0.01s system 127% cpu 0.012 total 18:05:56 Alleria: :!ghc -O2 --make foo.hs 18:05:59 :l foo 18:06:02 --- join: Ol4the (n=Olathe@12-210-82-101.client.mchsi.com) joined #haskell 18:06:08 Okay, I'll go compile it and then see. Thanks everyone. :) 18:06:09 --- quit: Olathe (Nick collision from services.) 18:06:11 --- nick: Ol4the -> Olathe 18:06:17 :) 18:06:30 nice idea SamB ! 18:06:36 that's a cute trick we can suggest to people 18:06:42 you might need a "module Main where" 18:06:53 nah, you could add a -c though 18:06:57 if you don't already export all the stuff 18:07:01 but that works fine as long as 'main' is defined 18:07:23 dons: if you don't add "module Main where", nothing but "main" gets exported 18:07:29 yep 18:07:48 --- quit: mornfall (Remote closed the connection) 18:07:57 --- join: dje_ (n=dje@S0106000d9324c457.vc.shawcable.net) joined #haskell 18:08:41 --- join: mornfall (n=mornfall@rb4b151.net.upc.cz) joined #haskell 18:10:16 Hmm. Yep, compiling fixed it! 18:10:30 I wonder why GHCi was (I think) re-calculating the first 100,000 elements. 18:10:46 as opposed to just taking them from the infinite list, building a new one, and summing them. 18:13:08 ghci does'nt try very hard to be fast. it happens to do pretty well, (it wipes hugs off the map), but still, we just compile when speed is required 18:14:29 ahhh, I see. 18:14:53 dons, any word on when the xmonad OSCON video will be available? 18:15:30 glguy is in charge of that. i hope soon 18:15:41 ok, thanks 18:15:42 hmm, nice, http://blog.businessofsoftware.org/2007/07/the-curse-of-pl.html 18:15:43 Title: Business of Software Blog: The curse of plenty: what El Mariachi tells us about ... 18:16:13 small open source teams can produce good software, and they don't get sucked into writing bloat as easily :) 18:16:21 --- quit: Saul_ (Remote closed the connection) 18:16:59 or get prodded out of it ;-) 18:17:40 --- join: wchogg (n=wchogg@216.165.151.199) joined #haskell 18:18:23 dons: Hmm, your nobench numbers really suggest that compiling is a massive win. 18:18:29 --- quit: MarcWeber (Read error: 110 (Connection timed out)) 18:18:36 Alleria: Using Debug.Trace.trace you could verify whether or not the list was being reevaluated. 18:19:52 --- quit: O1athe (Read error: 110 (Connection timed out)) 18:19:55 ddarius: thanks for pointing that out. I didn't realize such the module existed. 18:20:52 dons: hey 18:21:14 dons: did you see the thing i privmsged you last night while you were asleep? curious if you think something like that is feasible 18:21:31 edwardk: It's not just a me-thing, actually I didn't come up with it, but I fully support it. There really should be a way to distinguish between the different behaviours. (and in many cases, both behaviours are reasonable to want in different situations) 18:21:46 --- join: glguy (n=nobody@unaffiliated/glguy) joined #haskell 18:22:27 does any one know if there is a normal way to include man pages with a cabalized program? 18:22:47 --- part: GeoBesh left #haskell 18:22:52 dons: hey, darcs-graph is nice, fairly easy to use, though lacks a -o --output flag :-) 18:23:01 dgriffi3: there is no standard way 18:23:01 --- quit: chessguy (Read error: 110 (Connection timed out)) 18:23:19 --- join: visage (n=shad0an@66-189-14-217.dhcp.oxfr.ma.charter.com) joined #haskell 18:23:23 --- quit: GNU\caust1c (Read error: 113 (No route to host)) 18:23:42 dgriffi3: cabal has no specific support for man pages, or indeed any non-haddock docs 18:23:58 --- quit: fxr (Read error: 110 (Connection timed out)) 18:24:11 --- join: GeoBesh (n=root@ip68-14-78-176.ri.ri.cox.net) joined #haskell 18:24:18 dcoutts: thanks 18:24:46 dcoutts: oh, that's a good idea. 18:24:56 its more like `mktemp` currently 18:24:56 --- quit: dolio (Read error: 104 (Connection reset by peer)) 18:24:56 --- quit: mejja ("*bork bork*") 18:25:07 you're expected to run it from a shell script, and save the output result 18:25:23 dgriffi3: if you're feeling energetic you could add man page building support to Cabal 18:25:42 dgriffi3: we're always happy to review patches to Cabal 18:25:44 --- quit: nich (Remote closed the connection) 18:25:47 --- join: prb (n=prb@c-24-22-188-196.hsd1.mn.comcast.net) joined #haskell 18:25:49 psykotic: ah, just waiting on my coffee to kick in first 18:25:49 > length "internationalization" 18:25:51 20 18:26:11 Did everyone else already know that i18n meant: i, 18 letters, n 18:26:11 ? 18:26:14 glguy: yep 18:26:18 yes 18:26:22 dons: don't feel obliged to answer. :) 18:26:22 man... I'm late to the party 18:26:31 Alleria: yeah, compiling is what, 30x better on average. and maybe a lot more for some particular data structures (such as bytestrings) 18:26:41 I think I learned that in #twisted or something 18:26:47 cale: oh, so what i was asking dons about yesterday... 18:26:51 dons: sure, I was just naively running it and got the slightly odd result of: Output written to: /tmp/.-commits.png 18:26:53 :-) 18:27:06 psykotic: Hey, I remember reading a comment of yours on reddit that you worked for a company that developed a game engine...was it Garage Games? 18:27:38 cale: i'm tired of writing prop_Foo xs = out (in x) == x it'd be like to do prop_Foo = out . in === id instead. so i was thinking of having class EqProp a where (===) :: a -> a -> Property. 18:28:00 cale: then having a default instance for Eq-implementing types, and an implementation for a -> b that does pointwise testing using forAll or something. 18:28:04 --- quit: andyjgill () 18:28:29 --- join: dolio (n=dolio@216.68.188.68) joined #haskell 18:28:38 psykotic: why would that merit a new typeclass? 18:28:38 nafai: no, epic gams. 18:28:46 psykotic: Ah, okay. 18:28:50 psykotic: rather than a simple function definition? 18:29:14 dcoutts: ah ok. you were running it in `.' ? :) 18:29:22 dons: right 18:29:24 yeah, it could be more unix-ish 18:29:54 glguy, i don't see how you can have it work otherwise. you need something like instance (Arbitrary a, Show a, EqProp b) => EqProp (a -> b) where f === g = forAll ... (\x -> f x === g x) 18:30:06 --- quit: acura (Read error: 113 (No route to host)) 18:31:04 nice variation on variadic functions 18:31:06 psykotic: I didn't see the "xs" vs "x" in the code above 18:31:11 glguy, sorry typo. 18:31:19 glguy, the point is that there's no == implementation for functions. 18:31:27 glguy, but you can implement one that returns Property instead of Bool, using forAll 18:31:28 psykotic: I mean: 18:31:35 glguy: i'm dying to see the haskell OSCON tutorial, any ETA on when it might be available? 18:31:48 falconair: next week at minimum 18:32:07 glguy, i basically want to be able to "eta reduce" prop x = f x == g x to prop = f === g 18:32:11 The person whose desk it is on at the video editing company is on vacation 18:32:37 psykotic: I just didn't know why you couldn't write: (===) f g x = f (g x) == x 18:32:38 --- part: visage left #haskell 18:32:40 glguy: oh...I'll be impatiently waiting ;) 18:33:10 glguy, i wanted === to subsume ==, first of all 18:33:34 --- join: kilimanj4ro (n=erik@cpe-66-25-133-18.austin.res.rr.com) joined #haskell 18:33:40 dons: my only problem with darcs-graph is that it gets in the way of bash tab-completion for darcs :-) 18:35:03 --- quit: GeoBesh ("Leaving.") 18:35:06 --- quit: EvilTerran (Read error: 110 (Connection timed out)) 18:35:58 --- join: GNU\caust1c (n=caust1c@a207.wh-wieland.uni-ulm.de) joined #haskell 18:36:08 dcoutts: hah. graph-darcs eh/ 18:36:28 heh 18:37:34 --- join: GeoBesh (n=root@ip68-14-78-176.ri.ri.cox.net) joined #haskell 18:40:36 --- quit: glguy ("leaving") 18:40:40 dcoutts: you could set show-all-if-ambiguous 18:40:55 that should make it complete as much as it can 18:41:15 dgriffi3: oh it does, but when it's unambiguous it adds a space after the command 18:41:28 ahh 18:41:46 --- join: olliej (n=oliver@17.203.15.227) joined #haskell 18:41:48 so I can type "dar\tre\t" and get "darcs record " 18:41:58 saves me several keystrokes :-) 18:42:01 --- join: acura (n=rickard@derby.johanneberg.com) joined #haskell 18:42:09 darcs's bash-completion is excellent actually 18:42:12 --- join: DeliQ (n=deliq@ip3e83a7ad.speed.planet.nl) joined #haskell 18:42:25 completes darcs command, flags and file arguments 18:42:45 cabal needs bash completion imho 18:43:29 --- quit: thorat ("leaving") 18:44:32 --- quit: dolio (Remote closed the connection) 18:46:07 --- quit: Liskni_si (Read error: 110 (Connection timed out)) 18:48:04 i have a 9G darcs repo 18:48:11 i found a haskell book in an actual bookstore :) 18:48:16 cool! 18:48:18 which book? 18:48:22 hudak 18:48:25 school of expression 18:48:30 --- join: sambo357 (n=sambo@c-69-143-48-69.hsd1.va.comcast.net) joined #haskell 18:48:42 --- join: LunohoD_ (n=alex@e180065254.adsl.alicedsl.de) joined #haskell 18:48:46 nice. just in the usual computer languages section? or in philosophy and spirituality? 18:48:51 haha 18:49:10 under computer languages, but i actually hid it until i could come back with the coupon they email me 18:49:21 hehe good plan! 18:49:22 i've done that thing before too :) 18:49:24 under "music guides" (hey, it has multimedia in it) 18:50:02 --- quit: DeliQ (Remote closed the connection) 18:50:20 hahahaha 18:50:42 dons: a 9G darcs repo? what is that? 18:50:42 they won't let you use a coupon on books they order for you? 18:50:50 --- quit: dje_ (Read error: 113 (No route to host)) 18:50:52 --- join: dje_ (n=dje@S0106000d9324c457.vc.shawcable.net) joined #haskell 18:50:54 never tried, but somehow i think not 18:50:58 . 18:51:05 lots of fine print 18:51:13 --- nick: chessguy_ -> chessguy 18:51:18 --- quit: kilimanjaro (Read error: 110 (Connection timed out)) 18:51:25 anyway, i suspect a haskell sympathiser was ordering books for them or something 18:51:27 well, all you have to do is get them to accidentally shelve it ;-) 18:51:32 or maybe they just liked the pretty colours 18:52:11 dcoutts: darcs repo of irc logs. 256M of pristine, 9G of daily tags 18:52:14 :( 18:52:24 dons, SamB: In recent versions of GHC you can just use -fobject-code 18:52:37 are there any gotchas with -funbox-strict-fields? 18:52:40 dons: ahh, perhaps don't checkpoint those daily tags 18:52:53 aside from less potential for sharing i guess 18:52:55 dons, SamB: that tells GHCi to generate native code and save it, and works with -O2 18:53:03 sorear: huh 18:53:07 dons: tags are cheap, so long as you don't make a checkpoint file 18:53:10 interesting 18:53:23 psykotic: No, but "less potential for sharing" can be important 18:53:33 dons: you could probably get away with checkpointing only every couple weeks 18:53:35 sorear, clearly, i just wanted to make sure i had an idea of the range of gotchas 18:53:37 dons: checkpoint monthly 18:54:03 yeah 18:54:09 don't checkpoint. backup! 18:54:18 i'm just not putting it in darcs currently 18:54:21 or just use a more intelligent copy script 18:54:23 you can wget if you want the files 18:54:36 since its already on a backed up system 18:55:04 sorear pasted "simple, fast, incremental. beats darcs easily in the irc-logs nice." at http://hpaste.org/1979 18:55:14 --- part: gnuvince_ left #haskell 18:55:29 plain wget is nice, but it's not incremental 18:55:36 s/nice/niche/ 18:55:41 dons: use fossil 18:55:41 yep 18:56:32 http://gnuvince.net/?p=405 :} 18:56:34 Title: :gnuvince.net » Blog Archive » programming.reddit’s top 10 posters (karma- ... 18:56:35 --- quit: dcoutts ("Leaving") 18:57:05 all due to the rss feed I (and linuxer-script) use, ensuring nothing gets missed. 18:57:32 dons: http://programming.reddit.com/info/2au21/comments/c2aurs :) 18:57:33 Title: :gnuvince.net » Blog Archive » programming.reddit’s top 10 posters (karma-wh ... 18:57:50 --- join: MarcWeber (n=marc@pD9E0ABED.dip.t-dialin.net) joined #haskell 18:57:55 --- join: nich (n=nich@unaffiliated/nich) joined #haskell 18:58:17 hhah 18:58:28 i just submit the links, I don't write all of them :) 18:58:59 The linuxer script is also pushing down the signal to noise ratio heavily 18:59:13 I wonder who is in charge of that 18:59:13 --- part: GeoBesh left #haskell 18:59:23 cale: quit whining :) 18:59:25 --- quit: GNU\caust1c (Read error: 113 (No route to host)) 18:59:26 I wonder what would happen if I just started clicking the report button. 18:59:29 cale: enough people apparently like his submissions 18:59:52 psykotic: its 19:00:01 yeah, i note linuxer submits maybe 20 a day, of which 2/20 get >0 19:00:02 i don't believe it's fully automated. 19:00:13 i think i've only had a handful of links ever score 0 19:00:24 right now he has three good links on the front page 19:00:29 the fact that cale doesn't like them has no bearing :) 19:00:34 Most of its links score 0 19:00:34 heh 19:00:36 --- quit: LunohoD (Read error: 110 (Connection timed out)) 19:00:48 it's hit or miss, but i wouldn't call that spam 19:00:58 i've got 1/4 of linuxers karma, from 1/20th the submission. i rock :) 19:01:06 maybe a lot less than 1/20th 19:01:27 --- join: Liskni_si (i=pytt_l@ackle.nomi.cz) joined #haskell 19:01:33 so now can we trade in karma for extra down mods? 19:01:47 psykotic: I currently mod down 90% of everything which gets posted to programming.reddit. 19:02:02 currently? haven't you always done that? :) 19:02:13 Well, I have been for the last few months. 19:02:17 --- join: natasan (n=sam@c-69-143-48-69.hsd1.va.comcast.net) joined #haskell 19:02:19 --- join: Puelo (n=Puelo@host201.190-136-153.telecom.net.ar) joined #haskell 19:02:24 I mod everything up, so it balances out 19:02:26 Before that, it was actually better :) 19:02:31 heh 19:02:44 --- part: natasan left #haskell 19:02:47 actually, let's look at my 'new' 19:02:59 1,9,43,92,101,105,117,... 19:03:07 --- join: Razumikhin (n=Fyodor@doc-24-206-176-13.kw.tx.cebridge.net) joined #haskell 19:03:09 hah 19:03:14 (this is a list of not-modded-down articles) 19:03:17 yeah, martinbishop is back. 19:03:28 ` The Pict Programming Language (neat language based on pi-calculus) ' 19:03:35 with his ML-ish flavour 19:04:10 linuxer-script just has rss feeds for keywords, i often see all the same links as he later submits.-- but he does no quality filtering 19:04:30 so often if you see a haskell link get submitted by linuxer, that was one i thought wasn't very interesting 19:04:32 --- join: gkr (n=notme@200-127-242-48.cab.prima.net.ar) joined #haskell 19:04:54 --- quit: mrsolo_ (Read error: 110 (Connection timed out)) 19:04:56 he also doesn't follow threads, or find on-topic material :/ 19:05:09 It's just random crap. 19:05:12 So he finds off-topic material? :) 19:05:26 yeah, keywords for erlang,haskell,python,scala, ruby, revision control 19:05:48 darcs seems to have pretty good zsh completion too 19:06:05 monochrom: more that people submit articles providing background info about stuff discussed in comments 19:06:26 so you get a nice feedback, an enriching of the discourse :) 19:06:27 dons: you can't explain his submission patterns by that. counterexamples: 19:06:38 he does spot some themes, and adds new keywords 19:06:41 --- quit: julian_ (Remote closed the connection) 19:06:43 --- join: chessguy_ (n=chessguy@ip68-227-192-233.dc.dc.cox.net) joined #haskell 19:06:44 revision control was one that he suddnely picked up on 19:06:45 --- quit: Puelo () 19:06:49 --- join: julian_ (n=julian@201-213-153-24.net.prima.net.ar) joined #haskell 19:07:19 also, at about the same time everyday 30 links land by linuxer. so probably morning rss feeds (rather than a script running) 19:07:20 http://www.eurekalert.org/pub_releases/2007-07/uor-hgd072507.php, http://blogs.zdnet.com/emergingtech/?p=645, http://blogs.msdn.com/fontblog/archive/2005/11/08/490490.aspx, http://www.linuxjournal.com/article/8035 19:07:21 Title: Hand gestures dramatically improve learning 19:07:26 just from the last 30 submissions 19:07:43 --- quit: daniel_larsson ("Leaving.") 19:07:49 interesting. so what's the pattern there? you think he chases content manually as well? 19:07:52 --- join: andyjgill (n=andyjgil@c-71-193-175-218.hsd1.or.comcast.net) joined #haskell 19:07:54 yes 19:08:03 But he clearly doesn't respond to comments 19:08:04 so there's feeds, and then tech news he reads 19:08:19 i'm sure he uses a blog reader with filtering and so on 19:08:25 yeah 19:08:32 i even do that, when there are blogs i don't care about 90% except for specific topics 19:09:00 I use the following feeds in snownews, a console rss reader: 19:09:01 http://www.google.com.au/blogsearch_feeds?hl=en&c2coff=1&lr=lang_en&safe=off&scoring=d&q=haskell+programming+OR+language&ie=utf-8&num=50&output=rss||| 19:09:01 http://www.google.com.au/blogsearch_feeds?hl=en&c2coff=1&lr=lang_en&safe=off&scoring=d&q=haskell+programming+OR+language&ie=utf-8&num=50&output=rss||| 19:09:04 http://planet.haskell.org/rss20.xml||| 19:09:14 hah lambdabot. 19:09:39 "An Australian computer scientist says that the next generation of search engines will be able to retrieve music for you when you sing a song to your computer. She said that ‘in the next three or four years it should be on the computer of everyone who is a music fanatic." 19:09:43 but planet.haskell.org is becoming increasingly better, while the google rss feed is getting worse 19:09:44 this is high quality stuff 19:09:59 * psykotic laughs 19:10:11 --- join: chessguy__ (n=chessguy@ip68-227-192-233.dc.dc.cox.net) joined #haskell 19:10:19 yeah, googles rss is getting spammed more regularly now 19:10:52 --- join: v0|d (n=user@88.249.13.201) joined #haskell 19:11:08 And video search too? You pose some postures or actions in front of your webcam, and the search engine replies "that's in the Matrix movies"? :) 19:11:08 i should add feeds for ML programming and other PL theory 19:11:09 The next generation of search engines will be able to clone beef muscle tissue when I search for cheeseburger. 19:11:23 no one submits Isabelle/ theorem proving blogs 'cept alphecar 19:11:48 * dons tries finding some other nice feeds 19:11:57 in the eternal battle against linuxer 19:12:33 You sound like someone playing poker against a computer. :) 19:12:36 dons: I don't think there's enough haskell in the world to compete with that guy 19:12:42 --- quit: Razumikhin ("Leaving") 19:12:47 * sorear should start blogging about theorem proving 19:12:58 that's why dons is adding ML and other PL stuff now :) 19:13:03 gravity: no no, just good prog. language theory feeds. 19:13:14 ha! 19:13:15 what does someone playing poker against a computer sound like? 19:13:17 there's enough haskell for 1/4 of linuxer's feeds, so we need to bring in the other stuff 19:13:53 > 25/364 19:13:55 6.868131868131869e-2 19:14:31 > (1 - 25/364) * 100 19:14:32 93.13186813186813 19:14:58 93% of recent articles have been modded down by me :) 19:16:22 heh 19:16:30 ruthless 19:17:21 --- quit: chessguy (Nick collision from services.) 19:17:23 --- nick: chessguy__ -> chessguy 19:18:18 i've managed to go reddit-free since March 19:18:28 --- quit: whoppix (Remote closed the connection) 19:18:57 > (1 - 0) * 100 19:18:58 100 19:19:51 It's not hard with articles like "a collection of startup stories" 19:20:06 I don't even have to look at that to mod it down 19:20:19 so i've got feeds for isabelle, theorem proving, epigram, SML and OCaml now :) 19:20:25 that should provide some material 19:20:47 I wish there was a way to turn my current view of reddit into an RSS feed for others to use :) 19:21:04 hmm. nice idea 19:21:19 since you went to a bit of effort to post-process linuxer et al 19:21:21 a cale-subscription 19:21:26 Indeed. 19:21:39 you should suggest it to the reddit ppl 19:21:40 the blog tsar 19:21:41 :) 19:21:41 you should ask reddit for rss access to your recommendations :) 19:22:07 it would be nice if you could subscribe to someone else's "filter" for sure 19:22:13 i wonder if that's part of the new features coming in the next release 19:22:20 i wouldn't mind reading some of the articles i hear about, but i won't touch reddit 19:22:42 mrd, so you missed out on the SPJ videos over the weekend? 19:22:51 sadly. but were they posted elsewhere? 19:22:56 --- join: mjl69 (n=mjl69@h4608b226.area4.spcsdns.net) joined #haskell 19:22:58 Maybe I should just learn HAppS or something and code up something similar to Reddit. 19:23:01 they often get posted here too 19:23:08 and eventually make the HWN 19:23:22 i like the blog article list on hwn 19:23:28 * monochrom contemplates the notion of "Internet Users as Communicating RSS Processors (CRP)". Let's hope Hoare doesn't hear about it, lest he has a heart attack and then we will also need CPR. 19:23:31 i usually open a bunch of tabs to read those 19:23:35 yeah, that's basically everything that was on reddit anyway 19:23:52 but you get it without qwe1234's comments :) 19:24:10 or the temptation to blow the entire day surfing reddit 19:24:18 yeah 19:24:31 http://programming.reddit.com/info/2aw07/comments 19:24:32 :) 19:24:32 Title: Choosing a Proof Assistant (reddit.com) 19:24:45 * mrd resists 19:25:18 * sorear reads, s/comments/article 19:25:25 --- quit: chessguy_ (Connection timed out) 19:25:54 dons: VALYOO SUMMANTIKS 19:26:14 :) 19:26:15 did you get a chance to peek at my email yet? 19:26:17 * pjd falls over at CRP 19:26:35 mrd, i've peeked, not looked at the code yet 19:26:39 IN THE NAME OF STROUSTRUP I REVOAK YUOR PORGAMMING LISCENCE 19:26:39 sounds like the right approach 19:26:39 Haha, that guy is scared by using extensions written in Lisp, and not extensions written in Java? :) 19:26:41 --- join: dolio (n=dolio@216.68.188.68) joined #haskell 19:27:32 it's that PairLevel thing which feels awkward 19:28:02 if only I had more oleg 19:28:07 monochrom: No kidding...has he read the code for most Java stuff? *shudders* 19:28:35 so those video presentations were linked on haskell.org 19:29:00 --- quit: rashakil (Remote closed the connection) 19:29:08 another nice one, http://programming.reddit.com/info/2aw1a/comments 19:29:09 Title: Strong specifications in Coq: the type says everything (reddit.com) 19:30:41 argh! 19:30:43 " A case for proof assistants, and a comparison (syntheticabstractions.blogspot.com) 19:30:46 11 points posted 3 months ago by linuxer save hide 19:30:46 --- join: nich_ (n=nich@unaffiliated/nich) joined #haskell 19:30:48 report " 19:30:50 hey I was about to paste that! 19:30:59 I was just reading it, and linuxer already has it hmm. 19:31:13 maybe he grabs blog feeds to a private aggregator? 19:31:21 I want to ask nicely if anyone is willing to answer. How configurable is reddit for a human reader such as me? For example can I tell it to "show only stuff posted by cale and dons"? 19:31:24 dunno, but he gets stuff from *everywhere* 19:31:26 dibblego: got your kid onto Isabelle or Coq yet? 19:31:31 :) 19:31:35 bitwize: YUOR MOM USES HOARE SEMANTICS 19:31:37 dons, I think that'll be a while :) 19:31:40 monochrom: not yet 19:31:44 Cale: hah 19:32:02 @remember Cale YOUR MOM USES HOARE SEMANTICS 19:32:02 Done. 19:32:07 A foolish question: what kind of logic does something like Coq use? 19:32:15 monochrom: YUOR 19:32:21 OK, sorry. 19:32:47 Coq uses a constructivist logic with stratified dependent type. 19:32:47 there's a lot less blogs comig up for theorem proving, epigram, isabelle than for haskell 19:32:59 No point in writing all caps if you're not going to imitate B1FF/JeffK 19:33:04 Coq uses the calculus of inductive constructions 19:33:10 Well when epigram 2 is done that may change 19:33:15 * sorear recently started learning Coq 19:33:21 there's a great chart somewhere, can't recall now 19:33:29 * sorear is trying to prove his unlambda compiler correct 19:33:38 sorear: might be a job for twelf? 19:33:49 mrd: Ah...I'll be honest that doesn't mean anything to me yet, is there a good place to start? 19:33:51 coq is nice, but is rather read-only 19:33:52 since you can just write down your implementation almost directly in twelf. 19:34:02 it has a nice declarative language, which should be nicer and closer to twelf in spirit 19:34:09 Monadic IO is very, very useful. I can't imagine doing it any other way within logical confines :) 19:34:11 (its tuned specifically for proving stuff about compilers and languages) 19:34:19 (i think that hasn't been released yet, it's in cvs head) 19:34:24 ok, the SML feed is useless too 19:34:26 yea twelf is pretty good for PLs, but i miss the interactive prover 19:34:39 wchogg: admittedly, i picked up the Coq'art book from the library 19:34:45 --- join: int-e (n=noone@t54fc41a4.pool.terralink.de) joined #haskell 19:34:53 Coq implements the Curry-Howard isomorphism. 19:34:56 @google berkeley coq course 19:34:57 http://www.cs.berkeley.edu/~adamc/itp/ 19:34:58 Title: Interactive Computer Theorem Proving 19:35:08 if you don't mind reading something Smerdy prepared =) 19:35:16 --- join: Ol4the (n=Olathe@12-210-82-101.client.mchsi.com) joined #haskell 19:35:19 monochrom: So it comes down to an intuitionist logic? 19:35:21 smerdy's lambdatamer code is also very nice 19:35:29 despite him being the biggest asshole on earth 19:35:32 Yes. 19:35:52 wchogg, you can do classical logic if you want. 19:36:06 Yes. 19:36:09 he doesn't seem to know what an asshole is 19:37:09 apparantly they don't teach that at University or something 19:37:20 The Coq manual or tutorial or something is worth a read. It shows you how to do stuff and what its type system feels like. 19:37:23 Now, this is something that I'm still fuzzy on: the set of intuitionist logics include classical logic as a subset? I read one thing that made the two sound incompatible. 19:37:29 --- join: erg0t (n=ergot@r190-64-199-192.dialup.adsl.anteldata.net.uy) joined #haskell 19:37:39 SamB_XP_: He's the most helpful person in #coq. (Multiple meanings deliberate) 19:37:48 <|Steve|> heh 19:37:50 wchogg: Classical logic embeds into intuitionist logic in a funny way 19:37:53 wchogg: the difference really comes down to th elaw of excluded middle 19:37:56 how many people are there in #coq? 19:37:59 sorear, he will answer your question, while insulting your intelligence. but yes, he knows Coq well. 19:38:14 Cale: How funny? 19:38:19 wchogg: (The classical proposition A can be represented by ~~A) 19:38:22 If you take intuitionistic logic and add a few more axioms, you get classical logic. That's their relation. Coq is natively intuitionistic, but you can also add your own axioms unquestioned. 19:38:25 he doesn't seem to know how to not insult your intelligence 19:38:47 psykotic: I didn't notice, unlike the time I tried to get help from #debian 19:38:57 also: Require Import Classical or something if you don't want to do it yourself 19:38:59 Okay. So it really just comes down to how ~~ works as an operator, and if you assume that it's the identity then it's classical logic? 19:39:05 sorear: It's gotten better 19:39:11 #debian that is 19:39:12 Yeah, I think so. 19:39:17 wchogg, at the level of proof theory, there's a bigger difference, unless you choose your proof theory well. 19:39:24 but constructive logic is where it's at -- extracting certified programs 19:39:42 wchogg, for example, one of the great benefits of gentzen's sequent calculus is that there really is just a difference between the proof system for classical and intuitionist logic. 19:39:55 Yeah, I'm only giving consideration to entailment, not actually how you prove the things. 19:39:58 err, is just a difference -> is just a difference of a single inference rule 19:40:22 (i'm thinking of LK vs LJ) 19:40:27 psykotic: Whoo boy...I'm not sure if I understand what you mean by proof theory here. I'm a total newb when it comes to logic, just started getting interested because via topoi. 19:40:49 wchogg, it's the study of proofs as first class objects, essentially. 19:40:52 You know more topoi then I do. :) 19:41:09 wchogg, when you consider the curry-howard isomorphism, that shouldn't sound too outlandish. 19:42:02 psykotic: No, it doesn't. ...still trying to picture a categoric structure for it though. 19:42:14 I will now prove that a thing implies itself! 19:42:24 Madness! 19:42:30 @djinn a -> a 19:42:30 f a = a 19:42:47 proof by djinni! 19:42:49 --- quit: nich (Read error: 113 (No route to host)) 19:42:55 djinn only implements quantifier-free first order intuitionistic logic 19:42:59 wchogg, no need, it's very simple. the common conception is that a proof is a tree, with leaves labeled by assumptions and the root labeled by the conclusion. 19:43:15 wchogg, the edges are labeled by inference rules. 19:43:23 sorear: it still demonstrates proofs as first class objects though ;-) 19:43:34 wchogg, trees as first class objects is a very CS idea :) 19:43:49 @djinn a -> [(a,b)] -> Maybe b 19:43:49 f _ _ = Nothing 19:43:56 now, I'll prove that a implies a or b 19:43:57 So inference rules are constructors that take in propositions and spit out new propositions? 19:43:58 mm proof irrelevance 19:44:06 wchogg, now, once you have this notion you can ask all sorts of natural questions. for example, we know that there are many proofs of the same proposition. there's a notion of "normalized" or "canonical" proof and that turns out to be interesting. 19:44:08 @djinn a -> Either a b 19:44:08 f = Left 19:44:22 @djinn a -> [(a,b)] -> b -> b 19:44:23 f _ _ a = a 19:44:31 --- quit: Olathe (Connection timed out) 19:44:39 psykotic: Is it like an initial algebra in some way? The "canonical" proof? 19:44:42 http://members.cox.net/stefanor/hanoi.v <- have a tower of hanoi program of type forall s1 s2, length s1 = length s2 -> reach s1 s2 19:44:46 mrd: djinn isn't clever about recursive types like lists 19:44:55 well in any case, this is a good demonstration of why that fellow used the big old refine tactic in that blog article dons posted 19:45:16 Durr...my head a splode. 19:45:43 I always find it funny when people try to apply proof assistants to classical mathematics :) 19:45:57 wchogg, well, there can be multiple unrelated normal proofs of a given prop. normality has to do with eliminating certain kinds of steps. for example, in haskell consider the equivalence between id :: (a,b) -> (a,b), id x = x and id' :: (a,b) -> (a,b), id' x= (fst x, snd x). 19:45:57 Cale: hmm? 19:45:58 Cale: ToH is classical? 19:45:59 oooooo. canonical proofs... 19:46:22 wchogg, you can see that the second in some sense normalizes to the first, since the (,) constructor and the fst and snd deconstructors "cancel out". 19:46:25 For some reason it always ends up being ridiculously unconvincing. 19:46:39 (Compared to the usual proof.) 19:46:39 sorear: that coq code is remarkably clear. most example code I see is a giant mess :/ 19:46:50 psykotic: Yeah, that does make sense. 19:47:10 wchogg, you have a similar cancellation going on with lambda abstraction followed immediately by lambda application. 19:47:14 mrd: my hanoi.v is clear!? it was the very first thing I did, as a learning exercise, without a book! 19:47:15 --- quit: chessguy ("Leaving") 19:47:31 sorear: maybe that's why it's clear 19:47:32 sorear: yea, i think that helps -- the more things you know, the more fancy tricks you play =) 19:47:54 psykotic: So do we get some notion of "length" by considering proofs by the depth of their tree, and the canonical is the least deep? 19:48:15 wchogg, it's not canonical in that sense. 19:48:18 wchogg, it's a more local property. 19:48:46 psykotic: Are you talking about the CH counterpart to beta-normal forms? 19:48:55 wchogg, it has to do with being able to eliminate, for example, all lambda abstractions followed immediately by application. it might seem obvious that these can always be eliminated--just do the substitution corresponding to their "Fusion". 19:49:38 wchogg, but the problem is that application can cause certain terms to be multiplied in existence, so naively considered, the "complexity" of a term can actually increase. 19:50:14 wchogg, so the fact that you can eliminate all these pairings is actually the same as the result that all terms can be fully evaluated (i.e. "everything terminates"). 19:50:19 sorear, yep 19:50:34 sorear: do you use any theorem proving for high school math problems? 19:50:36 So if not everything terminates... 19:50:43 (do you do proofs in high school maths in the US?) 19:50:52 ha 19:50:53 of course dons. 19:50:59 ah ok :) 19:51:04 dons: Err, usually only in freshman geometry from what I've seen. 19:51:05 I did some in geometry 19:51:13 but I was homeschooled, so... 19:51:16 dons: I don't have high school math anymore, the headmaster has given up on finding a qualified teacher. 19:51:17 wchogg, then you don't have anything like this, right. so, the theorem that all terms in simply-typed lambda calculus "terminate" is equivalent to the theorem that all proofs in natural deduction are normalizable. 19:51:25 sorear: how about you teach it? ;) 19:51:31 make the kids learn coq 19:51:39 mrd: That's actually been proposed. :/ 19:51:48 :( 19:51:49 actually I think I may have proved the extension of the pytagorean theorem to 3-space... 19:51:51 coq seems poor for that 19:51:59 you can get yourself a pretty easy interactive natural deduction in coq actually 19:52:02 sorear: for me they brought an instructor in from the local community college. 19:52:07 it encourages random mucking about to an extent that i think would be damaging to someone first learning proofs 19:52:18 --- join: Olathe (n=Olathe@12-210-82-101.client.mchsi.com) joined #haskell 19:52:25 (seperately. because I wanted it.) 19:52:30 SamB_XP_: I've proved it for arbitrary n-space. it's a pretty simple inductuion 19:52:40 http://au.metamath.org/mpegif/blcntr.html -- here's a proof that a ball in a metric space contains its centre. 19:52:42 Title: blcntr - Metamath Proof Explorer 19:52:44 sorear: well I didn't even bother after 3-space 19:52:58 --- quit: z` ("null") 19:52:59 sorear: i did extended classes in the mornings and afternoons, before/after school. that was fun. 19:53:06 but you need a good teacher, who's motiivated 19:53:09 cale: god i hate linear hilbert-style proof systems. :) 19:53:12 I think I saw how one would procede, and decided it wasn't worth the bother 19:53:36 --- quit: Soliah- (Success) 19:53:46 btw i remember a niec paper by leslie lamport, he of distributed systems and late xfame 19:53:52 psykotic: Okay, now do we get bitten by Goedel at some point and have proof systems where we can't always normalize the proof, i.e. correspond to termination? 19:53:59 they were able to get someone for one year. linear algebra and metric therory. 19:54:07 he basically proposes a less formal version of proof trees in the style of natural deduction for proofs in papers and such 19:54:10 http://au.metamath.org/mpegif/cnpmet.html -- equivalence of two definitions of continuity :) 19:54:10 let me find it, it's really niec 19:54:11 Title: cnpmet - Metamath Proof Explorer 19:54:18 which probably helped a lot with my bootstrapping 19:54:20 sorear: aare you near any unis? you could just hang out in the uni library :) 19:54:45 or any chance to get into an accelerated program, to get to uni a year early? 19:54:47 http://research.microsoft.com/users/lamport/pubs/lamport-how-to-write.pdf 19:54:49 http://tinyurl.com/3bwou2 19:55:05 (how to write a proof) 19:55:43 ooooo. 19:57:33 --- join: gnuvince_ (n=vince@modemcable109.93-59-74.mc.videotron.ca) joined #haskell 19:57:49 hi gnuvince_ :) 19:58:42 http://au.metamath.org/mpegif/cmms.html -- Proof that a complete metric space is a metric space. (Sure, it's trivial, but it's still kind of silly that they had to generate it.) 19:58:44 Title: cmms - Metamath Proof Explorer 19:59:33 --- quit: bct (Connection timed out) 19:59:56 jfredett pasted "Type not carrying over" at http://hpaste.org/1980 20:00:00 :/ 20:00:04 Cale: Not entirely sure I understand what these links are of? 20:00:22 wchogg, proofs of results in ZF. 20:00:50 Well, extra-formal versions of them 20:00:53 wchogg, that whole site is a like a database of theorems and proofs. the idea is that you can chase anything back to the ZF axioms + the theory-specific axioms. 20:00:56 right :) 20:01:09 Huh. 20:01:15 jfredett: ! doesn't operate on tuples. 20:01:16 They're being uselessly formal. 20:01:24 ddarius: damn 20:01:26 cale: i assume they do machine checking 20:01:28 but why ZF? :) 20:01:33 perhaps one day they will show that all of mathematics is consistent! 20:01:35 psykotic: I think they do. 20:01:36 oh wait 20:01:36 --- quit: Ol4the (Connection timed out) 20:01:42 sorear: because it's what mathematicians use? 20:01:42 --- join: Razumikhin (n=Fyodor@doc-24-206-176-13.kw.tx.cebridge.net) joined #haskell 20:01:44 is there any kind of map that will operate on a tuple like that? 20:01:50 Actually, it's ZFC 20:01:54 its for a DFA delta function- :/ 20:02:08 cale: what about CH? :) 20:02:08 mrd: you think they are going to prove that math is incomplete sometime? 20:02:10 go figure! 20:02:18 SamB_XP_: perhaps in this century! 20:02:21 I'd really like to use a map, for speed, in big automata, that'll matter, Linear search is a pain. :/ 20:02:46 jfredett: flip the arguments to M.! 20:02:48 psykotic: They have a little section where they assume GCH. 20:03:05 jfredett: yea what sorear said 20:03:10 Cale: That is confusing. Call me "that's just semantics", but formal and detailed are still orthogonal. Metamath may be uselessly detailed. That does not imply uselessly formal. 20:03:15 you were thinking of M.lookup 20:03:20 sorear, ? you mean make the map be Map State a (State a, Symbol a) 20:03:29 and then just use flip M.! ? 20:03:34 or do i even need to do that? 20:03:34 jfredett: Don't change the types. 20:03:34 mp M.! (st,sym) 20:03:44 jfredett: the map is the first argument to M.! 20:03:48 NOT the second 20:03:49 ? 20:03:53 i misread the type 20:03:55 Cale: What area of math have you been doing, anyway? 20:04:03 damn, I'm dumb as hell 20:04:13 wchogg: I'm mostly into algebraic combinatorics. 20:04:36 jfredett: i never used M.! always lookup. didn't realize it existed 20:04:45 wchogg: I also like algebraic topology. Generally, things with algebra and something else. 20:05:01 well, mrd, I didn't want to deal with Maybe in the delta function 20:05:01 Cale: I'll agree with you on algebraic topology, definitely. 20:05:02 (I don't care *too* much for pure algebra though.) 20:05:22 I've just been using error, I prefer to fail loudly 20:05:25 I'm trying to get into some programs that do both diff geo and category theory, myself. 20:06:25 When your proofs are so formal that it starts becoming unconvincing that they would work in any formalisation but yours, that's when I think you've gone too far. 20:06:44 --- join: dxl_ (n=svens@i3ED6E720.versanet.de) joined #haskell 20:06:59 What's algebraic combinatorics, anyway? Don't think I ever dug enough into combinatorics to see it. 20:07:40 wchogg: Basically, forming correspondences between sets of combinatorial objects and algebraic objects. 20:07:55 Did you get as far as generating series? 20:08:09 i guess a good example is polya-burnside counting 20:08:11 ? 20:08:21 OK, that means Metamath is too tied up with ZFC. There are ways, even formal ways, of abstracting way from particular foundations. 20:08:29 Sounds familiar, but I don't really remember what it means. 20:09:00 As programmers we know how to play that game of being formal and still versatile. 20:09:41 Okay, so if you have a set of combinatorial objects A, and a weight function: w:A -> N, then the (ordinary) generating series for A with respect to the weight w is: sum over a in A of x^w(a) 20:09:54 This is a sum in the ring of formal power series. 20:10:03 (over some suitable field) 20:11:04 So for example, if your set is binary strings of length 3 with respect to the number of 1's, that is {000,001,010,100,011,101,110,111}, its generating series is 1 + 3x + 3x^2 + x^3 20:11:14 Note that this is (1 + x)^3 20:11:38 and that (1+x) is the generating series for the set of binary strings of length 1 with respect to the number of 1's 20:11:50 So it looks like there's something interesting going on there :) 20:12:05 --- quit: nominolo (Remote closed the connection) 20:12:17 --- join: nominolo (n=nominolo@intothevoid.csbnet.se) joined #haskell 20:12:45 say i am reading raw bytes off a network using bytestrings, what is the best way for me to: convert the first 4 bytes to an integer 'x', convert another set of bytes to integer 'y', separate out 'x' number of bytes and convert them to a tuple (or record) of haskell primitive types (integer, char, double, etc.) according to some scheme defined in 'y' ? 20:13:15 basically i am trying to access a real-world protocol using haskell 20:13:24 Of course, there is: if f(x) is the g.s. for the set A with respect to the weight u, and g(x) is the g.s. for the set B with respect to the weight v, then f(x)g(x) is the g.s. for AxB with respect to the weight w((a,b)) = u(a) + v(b) 20:14:13 according to Data.Binary docs, when dealing with complex protocols, it is better to work directly with Get/Put monads ... but while getWord8 is obvious, how can I 'getInt' or 'getChar' ? 20:14:17 So there's a simple correspondence here between the combinatorial structure of forming pairs and the algebraic structure of multiplication in the ring of formal power series. 20:14:21 --- quit: rehges (Read error: 110 (Connection timed out)) 20:14:28 Huh, okay. 20:14:42 getWord8, then use "fromIntegral" to convert to Int. 20:15:24 monochrom: how can I get chars, double, strings of specific length, etc.? 20:15:33 So forming strings can be considered quotient of the free monoid on the set, and then you have some kind of functor that maps that into a ring... 20:15:36 Addition corresponds to disjoint union, multiplication to Cartesian product 20:16:18 what a strange juxtaposition 20:16:25 you never see that anywhere else 20:16:34 do you? 20:16:45 SamB_XP_: are you being sarcastic? 20:16:52 Cale: no! 20:16:55 SamB_XP_: Which juxtaposition? 20:17:06 falconair, for floats, see encodeFloat, i think 20:17:20 I think he's talking about practical programming adjacent to geeking out about math. 20:17:24 oh 20:17:34 wchogg: That's what I was thinking too. 20:17:40 I thought he was talking about the particular juxtaposition that I was talking about :) 20:17:44 Cale's talking about combinatorics and so on while falconair and monochrom discuss the nitty-gritty of implementing binary protocols 20:17:46 You definitely see it elsewhere. 20:17:46 @hoogle encodeFloat 20:17:46 Prelude.encodeFloat :: RealFloat a => Integer -> Int -> a 20:18:08 --- quit: Razumikhin ("Leaving") 20:18:24 bitwize, it takes an exponent and mantissa. so if have an IEEE float as a bunch of bits, you just extract the parts you need as integers and feed them to encodeFloat. 20:18:58 noice. 20:19:13 chr :: Int->Char. getBytes :: Int -> Get ByteString (then you convert ByteString to string, paying attention to encoding). I have not known a real-world network protocol needing double. 20:19:22 --- quit: dxl (Read error: 110 (Connection timed out)) 20:19:54 wchogg: There are more operations too... if f(x) is the g.s. for a set of objects having no objects with weight 0, then 1/(1-f(x)) is the g.s. for strings of those objects, with additive weight. 20:20:28 monochrom, encodeFloat/decodeFloat works with the RealFloat type class, so it works for both Floats and Doubles, IIRC 20:20:46 This is a special case of a lemma that can be proved about composition, and the fact that 1/(1-x) is the g.s. for natural numbers with the identity function as weight. 20:20:53 OKay...although I assume there's some caveats about the ability to form 1/(1-f(x)) since we're just working over a ring? 20:21:00 ddarius: okay, like where? 20:21:05 this protocol is for subscribing to stock market data, so I expect all kinds of numbers 20:21:07 Right, that's what the condition I stated was about. 20:21:18 Oh! Right, got it now. 20:22:38 You can actually do quite a lot just with this. You can also generalise to using multiple indeterminates in order to count with respect to multiple weights at the same time. 20:23:24 Financial world unlikely to use IEEE 754. More likely to use binary-coded decimal. Either way, read/write a fixed number of words and do your own bit fiddling. 20:23:30 Sometimes, algebraic identities are simpler to prove by way of combinatorics than the other way around, as well. 20:23:53 Really? Can you throw out an example of something algebraic that's easier in combinatorics? 20:23:58 SamB_XP_: LtU for one, and many places that discuss programming theory since theorist definitely deal with real code. 20:24:01 cale: in some sense "baby combinatorics" is the basis for most good proofs of simple group theory :) 20:24:12 cale: like, lagrange's theorem 20:24:44 you show that all cosets are isomorphic as sets, and that they partition the group, and presto 20:24:57 product over k >= 1 of (1 + x^(2k-1)) = sum over m >= 0 of x^(m^2) / product over k = 1 to m of (1 - x^(2k)) 20:25:10 Data.Binary docs have an example with the following line: "do t <- get :: Get Word8" , since Binary is implemented by so many data types, couldn't I just do "do x <- get :: Get Char" , Get Double, etc.? 20:25:22 This would be absolutely brutal to approach analytically :) 20:26:06 But it turns into an almost obvious result when the two sides are interpreted as generating series for specific sets of partitions. 20:26:32 http://hackage.haskell.org/packages/archive/binary/0.2/doc/html/Data-Binary.html 20:26:35 http://tinyurl.com/38jl8b 20:26:35 falconair: yep 20:26:43 the type decides which parser is used by 'get' 20:26:47 I suppose you can. 20:26:54 Cale: Have you played with Dirichlet series? 20:26:55 if there is no other type information 20:26:58 although if you're expecting a wire protocol using specific encodings... 20:26:59 Do mind endian issues. 20:27:03 ddarius: A little bit. 20:27:13 i don't know if it'll match up to how Data.Binary does its thing 20:27:22 You use Dirichlet series when you want multiplication to result in a product of weights. 20:27:28 yes, the key thing is that you're reading some bits, and it will be interpreted according to the get instance you ask for. 20:27:33 I do wonder what the Char instance does. 8-bit? 16-bit? 32-bit? which encoding? 20:27:36 so you better ask for the right thing, if not to get garbage bits 20:27:37 Extracting coefficients of Dirichlet series is ridiculously hard. 20:27:52 --- quit: cmarcelo ("Sto andando via") 20:27:56 -- Char is serialised as UTF-8 20:27:56 instance Binary Char where 20:27:59 (note that ordinary generating series resulted in a sum of weights) 20:28:03 monochrom: UTF-8, but if you care you shouldn't be using the high-level iface 20:28:06 Cale: Yes, but you tend to play with them in a different way for different ends. 20:28:12 ddarius: right. 20:28:35 ddarius: Though, if it was easy to extract coefficients, number theory would be solved :) 20:29:03 is there a way I can just get a list of Word8, and convert them to whatever type I want? Is there a standard class for doing this? (the way Show converts types to a displayable string)? 20:29:12 --- join: bos (n=bos@hierophant.serpentine.com) joined #haskell 20:29:33 falconair: There's no standard class, but you can make one. 20:29:49 falconair: I thought that Data.Binary was an attempt at that though. 20:29:59 --- quit: mjl69 (Connection timed out) 20:30:00 whose standard? 20:30:14 little endian is standard? big endian is standard? 20:30:18 eh...this is my first haskell project, i'm trying to do as little as possible, otherwise I'll just drown in haskell ;) 20:30:23 --- join: rashakil (n=rashakil@pool-68-236-47-194.phil.east.verizon.net) joined #haskell 20:30:39 falconair: data.binary is a bytestring of Word8s, that you can pick or pack data to, anyway you want 20:31:11 falconair: You just write an instance of Binary for your specific types, and then use encode and decode. 20:31:15 --- join: desp (n=desp@c140-36.icpnet.pl) joined #haskell 20:31:36 dons: right, i saw the function which converts bytestrings to/from Word8, but I'm not sure if I can convert Word8 to haskell types (char, int, double...) 20:31:45 If you just write two Hasekll programs and have them talk to each other, you can be as naive as you like. 20:31:58 falconair, you can just stick pack them into a bytestring and call encode/decode 20:31:58 falconair: Word8 is an instance of Integral, so fromIntegral works 20:32:11 Does Haskell support UTF-8? 20:32:24 falconair: but that's not what you want. 20:32:26 wchogg: There are a bunch of other kinds of series for dealing with other kinds of structures -- for example, objects where all the weight-generating subparts are labelled from 1 up to n in some way. 20:32:27 Magic word "converts", answer fromIntegral 20:32:27 gnuvince_: Yes. All programming language do. 20:32:40 If your Haskell program talks to some other program, using someone else's protocol, you cannot do as little as possible. Too many marshalling issues. 20:32:43 gnuvince_: yeah 20:32:55 Thank you. 20:33:01 > maxBound :: Char 20:33:02 gnuvince_: If you meant IO, then you'll need the utf8-string package 20:33:03 '\1114111' 20:33:09 dons: hey, our favorite Haskell pimper over at programming.reddit :) 20:33:29 well, i just submit links. i'll try to find some more on theorem proving too 20:33:45 wchogg: Those are counted using exponential generating series, whose definition is similar to ordinary generating series, but you have f(x) = sum over a in A of x^w(a) / w(a)! 20:34:13 And it's the coefficient of x^n/n! which counts the number of objects of weight n. 20:34:24 gnuvince_: i think martinbiship was disappointed he didn't rank so highly :) 20:34:47 I think I'll first attempt "x <- get :: Get Whatever" ... and hope it works ;) ... I looked at the source code for Get.hs, lots of it is way over my head 20:34:55 --- quit: AtnNn ("foobar") 20:35:03 Cale: I think I got lost on what other kinds of structures would use an exponential generating series. 20:35:13 thanks all! 20:35:13 Okay 20:35:22 --- quit: sudoer () 20:35:41 --- quit: njbartlett () 20:36:01 wchogg: Some simple examples are permutations, and specific kinds of permutations, such as derangements (those with no fixed points) 20:36:17 Functions on finite sets of various types (injections, and so on) 20:36:18 dons: Data.ByteString isn't accessible with lambdabot? i can access it with @type but not > seemingly. 20:36:38 @type Data.ByteString.pack 20:36:40 [Word8] -> Data.ByteString.Base.ByteString 20:36:44 > Data.ByteString.pack 20:36:45 Not in scope: `Data.ByteString.pack' 20:36:54 @type Data.ByteString.Lazy.pack 20:36:56 [Word8] -> Data.ByteString.Lazy.ByteString 20:36:57 psykotic: yeah, i probably haven't exposed it yet 20:37:01 perhaps i should 20:37:09 dons: no big deal, i was too lazy to bring up ghci :) 20:37:35 Also, things like binary matrices can be treated as labelled structures with row and column labellings, as well as labelling 1's. 20:38:25 (with which you can solve the problem of how many {0,1} matrices are there with m rows, n columns, and e ones, with no row or column consisting entirely of 0's. 20:38:26 a quick question: where can I find the implementation of "Binary Char" instance? grep doesn't find it in Get.hs, Put.hs or Builder.hs! 20:38:28 ) 20:38:49 Cale: But for all these things the generating sets are a way of mapping these to some ring of formal power series? So for the permutations, we're mapping the action of a group on the set to a ring? 20:38:50 sorear: you should look into Haskell extraction from Coq 20:38:55 sorear: some tuts on that would be fun 20:39:08 wchogg: Oh, not even that yet. 20:39:10 falconair: the implementation is in the file Binary.hs in the src 20:39:18 wchogg: Just mapping sets of permutations... for example 20:39:26 Perhaps in Binary.hs 20:39:41 The set of all permutations with respect to the number of things being permuted. There are n! of each weight. 20:40:06 So the e.g.s is sum over k >= 0 of k! x^k / k! = sum over k >= 0 of x^k = 1/(1-x) 20:40:13 dons: sorry, didn't realize there was an hs file in the Data directory...thanks 20:40:50 The funny part that I haven't described is what happens when you multiply generating series of this type. 20:41:01 ...what does happen? 20:41:15 That is the fun part. :) 20:41:17 --- join: sudoer (n=jtoy@c-24-60-25-28.hsd1.ma.comcast.net) joined #haskell 20:41:26 here's a nice course people might like to follow, https://cgi.cse.unsw.edu.au/~cs4181/07s2/cgi-bin/moin.cgi/Schedule 20:41:27 http://tinyurl.com/2kt7qz 20:41:37 `Language-based Software Safety' (Haskell) 20:41:44 Well, in ordinary generating series, we counted the Cartesian product... all pairs (a,b) for a in A and b in B 20:41:55 Cale: Do you have a reference to a good online source for algebraic combinatorics? 20:42:17 ... I want to have a module with lots and lots of quickCheck functions, and I want to be able to execute them on the fly (preferably by saying "runTests" and waiting) is there any good way to do this? 20:42:22 But in this case, there's no natural way to treat such a pair (a,b) as being labelled from 1 up to n + m (where there are n labels on a and m labels on b) 20:42:37 ddarius: Unfortunately not. 20:42:41 --- quit: kilimanj4ro (Read error: 104 (Connection reset by peer)) 20:42:54 --- join: kilimanjaro (n=erik@cpe-66-25-133-18.austin.res.rr.com) joined #haskell 20:43:02 ddarius: I've even gone so far as to ship course notes from Waterloo to Australia :) 20:43:18 I guess I should read generatingfunctionology through then at some time and just ignore the terminology. 20:43:30 --- quit: ariks (Read error: 110 (Connection timed out)) 20:43:33 Yeah, but since N x N still has cardinality Aleph_0 why is the product of two infinite series so different than just one? 20:43:37 ddarius: The problem is that it does lots of things in totally brain-dead ways. 20:43:54 @index isPrefixOf 20:43:54 Data.List 20:44:00 Cale: I can easily believe that. There is a reason I never got much past the first chapter or so. 20:44:26 wchogg: it's not? 20:44:39 --- quit: gkr (No route to host) 20:44:43 Cale: Oh, I thought you were trying to say it was...maybe I'm just tired. 20:44:46 Okay, so I didn't finish explaining this labelling thing :) 20:45:16 So we want to relabel the pair (a,b), where a has weight n and b has weight m 20:45:39 Hmm, why can't I define the operator (=>)? 20:45:50 nornagon: It's part of the syntax? 20:45:55 Oh, right. 20:45:56 There are n+m choose n ways to separate the labels from 1 up to n+m into two appropriately sized sets 20:45:59 Duh. :) 20:46:00 let (=>) a b = a+b 20:46:04 nornagon, use ==> 20:46:08 > let (=>) a b = a+b in 3 => 3 20:46:09 Parse error 20:46:09 ?type (==>) 20:46:09 dibblego: yeah, that's what I did 20:46:11 Not in scope: `==>' 20:46:12 just wondering 20:46:19 ⇒ 20:46:22 Darn. Is there any possible ambiguity? 20:46:23 :D 20:46:36 Once we pick such a partition of the labels, we can just apply the ones in the first half to a (in order) and the ones in the second half to b. 20:46:48 > let (⇒) = (+) in 3 ⇒ 4 20:46:49 Illegal character ''\135'' 20:46:52 boo, hiss. 20:47:11 ddarius: Well since => is only used in type signatures, I imagine it *could* be used if anyone wanted to change it so. 20:47:14 > undefined :: Num a => a -- is that ambiguous enough? 20:47:16 Undefined 20:47:49 For example, to relabel the permutation 5 1 3 2 4 with the set of labels {6,12,13,24,37}, you'd end up with the permutation 37 6 13 12 24 20:47:52 ?let x => y = y 20:47:52 Parse error 20:47:59 ?let x ==> y = y 20:47:59 int-e: I don't think so. 20:48:02 if => were a possible infix operator this might confuse humans at least. 20:48:03 wchogg: make sense? 20:48:05 Defined. 20:48:09 > 1 ==> 2 20:48:10 2 20:48:20 (with lesser known type classes) 20:48:34 (=>) :: Num a => a -> a -> a. This is going to be fun. 20:48:56 Cale: Sure. 20:49:12 wchogg: So what we do is to form the "star product" of the sets of labelled objects A and B, which is formed by taking the Cartesian product, and then for each pair, distributing the n+m labels between the factors in all possible ways. 20:49:25 in any case with an infinity of infix operators available I'm not too unhappy about => being forbidden, although it's a pretty one. 20:49:25 And this is what the product of exponential generating series counts. 20:50:18 --- quit: desp () 20:50:45 This seems like a rather baroque operation at first, but eventually it becomes quite natural. 20:50:54 Let me give a small example 20:51:07 What is it categorically! 20:51:09 Cale: Yeah, to be honest I'm not seeing the punchline, the point, very well. 20:51:55 Suppose we're interested in obtaining the exponential generating series for derangements with respect to the number of things being permuted. 20:52:03 That is, the set of permutations with no fixed points. 20:52:19 --- quit: sudoer () 20:52:20 Thank you, I was just about to look it up on wikipedia. 20:52:46 If we have a permutation, for example (in two-line form) 20:52:50 1 2 3 4 5 6 7 20:52:58 4 2 1 7 5 6 3 20:53:14 We can separate it into an identity permutation and a derangement: 20:53:16 2 5 6 20:53:18 2 5 6 20:53:22 1 3 4 7 20:53:26 4 1 7 3 20:53:33 hey! disjoint cycle notation! 20:53:46 wheres my disjoint bits! 20:54:04 I could have used disjoint cycle notation, but this is actually better at representing the identity portion clearly :) 20:54:09 and the labelling :) 20:54:13 yeh 20:54:32 So the identity portion there is just [1,2,3;1,2,3] relabelled with the set {2,5,6} 20:54:39 Right. 20:55:01 and the derangement was [1,2,3,4;3,1,4,2] relabelled with {1,3,4,7} 20:55:18 So this is an element of the star product of the set of identity permutations with the set of derangements. 20:55:48 Ah, okay. 20:55:50 In fact, the set of all permutations is in natural bijection with the star product of identity permutations and derangements. 20:56:05 The e.g.s. for all permutations, I mentioned before, was 1/(1-x) 20:56:19 there's only one identity permutation of each weight, so its e.g.s. is exp(x) 20:56:37 So whatever D(x), the e.g.s for derangements is, it satisfies: 20:56:46 1/(1-x) = exp(x) D(x) 20:57:06 and so D(x) = exp(-x)/(1-x) 20:57:16 has there been much talk/work on making ghc's frontEnd->Core more [trivially] pluggable? 20:57:36 and if we had a copy of mathematica handy, I could extract a list of coefficients of that rather easily (or I could do it on paper, but that's less fun) 20:58:00 Okay, that example helped a lot. 20:58:12 That's pretty slick, actually. 20:58:16 Z transform! 20:58:21 actually, it's not that hard to pull out the coefficient 20:58:29 Actually, I guess Laplace would be better 20:58:33 --- join: z` (n=nine@cpe-76-171-54-166.socal.res.rr.com) joined #haskell 20:59:17 d_n = [x^n/n!] e^(-x)/(1-x) = n! sum over k = 0 to n of (-1)^k/k! 20:59:20 ... I want to have a module with lots and lots of quickCheck tests, and I want to be able to execute them on the fly (preferably by saying "runTests" and waiting) is there any good way to do this? 21:00:22 --- join: ivanm (n=8266662a@2001:388:f000:0:0:0:0:279) joined #haskell 21:00:37 jfredett: The script designed to do this... 21:00:45 Also, from that it follows immediately that the limit as n -> infinity of d_n/n! is e^(-1), which is the probability as the number of people at a party increases that they all get the wrong hats back from the blind cloakroom-attendant. 21:00:50 * wli points to Wilf's generatingfunctionology 21:00:54 theres a script for that? 21:01:09 Cale: Hah, that's a cute way to describe it. 21:01:13 does it come w/ quickCheck, and if so, where can i find docs on how to use it? 21:01:41 With the concurrency stuff in Haskell, is there a good tutorial on how to use it (especially seeing as how I've never done any concurrency before) ? 21:01:50 --- quit: littledan () 21:02:04 It's also possible to compose generating series meaningfully in all cases where the composition is algebraically defined. 21:02:49 jfredett: http://www.cs.chalmers.se/~rjmh/QuickCheck/ 21:02:51 Title: QuickCheck: An Automatic Testing Tool for Haskell 21:03:10 http://www.haskell.org/haskellwiki/GHC/Concurrency 21:03:11 Title: GHC/Concurrency - HaskellWiki 21:03:17 brilliant? 21:03:26 --- quit: blackdog_ (Remote closed the connection) 21:03:46 There's a "quickCheck" program described on that page. 21:03:47 --- join: blackdog (n=mwotton@202-137-100-157.dial.usertools.net) joined #haskell 21:03:54 --- quit: ivanm ("CGI:IRC") 21:03:54 --- quit: gnuvince_ ("Lost terminal") 21:04:00 --- quit: bitwize (Remote closed the connection) 21:04:05 has any one ever thought of generating a giant (visual) chart of haskell data types and function to/from those types, allowing users to type in an expression such as "Word8->Double" and see if the Word8 and Double nodes are connected? 21:04:05 wchogg: So basically, you build up a wide variety of objects with known generating series, and operations for acting on combinatorial structure and algebraic structure simultaneously. 21:04:13 perhaps something nice looking like this: http://www.visualcomplexity.com/vc/project.cfm?id=442 21:04:15 Title: visualcomplexity.com | Mammal Supertree 21:04:22 --- join: ivanm (n=82666629@2001:388:f000:0:0:0:0:279) joined #haskell 21:04:29 (the picture is not exact, but you should get the idea) 21:04:31 @slap CGI IRC clients 21:04:31 why on earth would I slap CGI IRC clients 21:04:44 wchogg: The derivative also has meaning -- it typically turns into a kind of deletion of weight-associated subobjects in all possible ways. 21:04:48 Cale: missed that somehow... didn't think it had any tutorials or the like there :s 21:04:54 falconair: you could use hoogle 21:05:01 @hoogle Word8 -> Double 21:05:01 No matches, try a more general search 21:05:12 one obvious pain point for newbies is to find all the functions and types...it is true of any language but haskell should be able to solve it much more nicely 21:05:17 well, fromIntegral works 21:05:29 sorear: hoogle seems to do a simple text search! 21:05:39 falconair: Not even close. 21:05:45 ivanm: What parts of haskell's concurrency did you want to know about? 21:05:51 falconair: Hoogle has done all kinds of things. Hoogle 4 will do all kinds of things. 21:05:52 falconair: it's based on type refinement 21:05:55 @where hoogle 21:05:55 http://haskell.org/hoogle 21:06:05 wchogg: how to use it? :p 21:06:09 wchogg: as a cute example, x^3 = x*x*x -- there are three ways to delete an x and each way gives x^2, so the derivative is 3x^2 :) 21:06:21 --- join: rvalverde (n=Ruben@166.114.122.165) joined #haskell 21:06:29 ivanm: with forkIO 21:06:36 ivanm: Well, I meant like if you specifically wanted to know how to use STM or something else. 21:06:37 :t forkIO 21:06:39 Not in scope: `forkIO' 21:06:46 sorear: re. haskell-src, we could just use our own branch, since i needs the expression parser 21:06:47 :t Control.Concurrent.forkIO 21:06:48 IO () -> IO GHC.Conc.ThreadId 21:06:50 I was using hoogle, that's what made me think of it, for example "Ord a => [a] -> [a]" shows List deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a] 21:07:09 dons: I'm hacking up a much simpler solution. 21:07:27 wchogg: what's the difference? I'm wanting to learn how for a scientific computation project... 21:07:50 Cale: I find it odd how many different structures seem to admit a formal derivative without any analysis in sight. McBride's "clowns on the left, jokers on the right" paper blew my mind that way. 21:07:58 --- quit: vaste_ ("Lost terminal") 21:08:05 --- join: dcoutts (n=duncan@gentoo/developer/dcoutts) joined #haskell 21:08:25 There are algebraic properties that the derivative has that can easily be applied elsewhere. 21:08:34 ivanm: There's concurrency, and then there's parallelism -- with concurrency, you have many code pointers to keep track of (processes doing different things), with parallelism, you have one (but work is shared between processors). 21:08:59 --- quit: blackdog (Remote closed the connection) 21:09:01 i didn't find anything useful regarding type refinement on google, is that what i need to read up on to build some sort of visualization tool for haskell? (something similar to what UML does for the OO world) 21:09:17 --- part: rvalverde left #haskell 21:09:21 ddarius: Exactly. I just have never seen a real common thread between them though, and it's a product rule that looks strange enought it's just conceptually surprisng how common it is. 21:09:36 wchogg: This view also helps to generalise the derivative to noncommutative power series rings. 21:09:51 Cale: no, I want concurrency... its going to be run on my single processor laptop! :p 21:09:53 --- join: blackdog (n=mwotton@202-137-100-157.dial.usertools.net) joined #haskell 21:10:11 --- join: bct (n=bct@S01060013463ece73.ed.shawcable.net) joined #haskell 21:10:19 so, forkIO. everything else follows from that 21:10:21 Noncommutative rings are generally used to maintain information about order as structures are built up. 21:10:38 Cale: I guess I can see how you'd use that in combinatorics. 21:10:51 wchogg: Parts of the idea of the derivative (the change in something w.r.t. something) are held in those algebraic identities. 21:11:30 mauke: I was hoping for something along the lines of tutorials/simple examples of forkIO (still getting confused by some of the monadic/IO stuff) 21:11:33 Is x = y a function binding or a pattern binding? 21:11:42 wchogg: The trouble is that noncommutative rings are hairy, so you usually end up taking commutative images at some point. But at that point, you can also try to extract a little extra information, for instance, by adding a factor of q for each transposition made while normalising terms. 21:11:47 ddarius: I suppose...but often the notion of "change" seems to be a white-lie, like in the case of derivatives of regular expressions that sigfpe wrote about. 21:12:12 ivanm: there's not much to it. you give it an action, and it spawns a new thread and runs the action in it 21:12:24 wchogg: Which gives you information akin to counting permutations with respect to inversion number. 21:12:35 ...inversion number? 21:12:55 wchogg: Lookup the behavioural derivative stuff I mentioned earlier (which includes derivates of a regular expression). 21:13:50 --- join: brad (n=brad@ppp-71-139-168-211.dsl.snfc21.pacbell.net) joined #haskell 21:13:56 wchogg: an inversion in a permutation sigma is a pair of indices (i,j) with i < j but sigma(i) > sigma(j) 21:14:01 ddarius: Sure. I can't tell if we're talking past each other or if I've just completely missed the point you were making. 21:14:14 and the inversion number of a permutation is the number of inversions it has 21:14:47 --- join: mvanier (n=chatzill@netblock-208-127-159-231.dslextreme.com) joined #haskell 21:14:51 Even and odd permutations have even and odd numbers of inversions. 21:14:57 (respectively) 21:15:04 cale - if i am correct, periodically here i will overhear you tell someone that monads are like "little languages", dsls if you will. the more i think about it the more interesting and correct this seems. do you have a blog post etc where you expand on this? 21:15:14 brad: hmm... 21:15:27 Okay, I've got to go to bed now. In any case, Cale, thanks for giving me a crash course in a bit of algebraic combinatorics. 21:15:35 wchogg: no problem :) 21:15:39 wchogg: The behavioural differential equations do describe how the automaton changes as it processes input. 21:15:46 brad: The closest thing I have is a little article I wrote about the correct way to use monad transformers. 21:15:54 brad: And my sudoku solver :) 21:16:01 I'm trying to compile lambdabot with GHC 6.6.1 but it fails because Language.Haskell.Syntax doesn't export various names. 21:16:07 --- quit: wchogg (Remote closed the connection) 21:16:11 @where sudoku 21:16:11 http://www.haskell.org/haskellwiki/Sudoku 21:16:17 do you have a link for the transformers article? 21:16:35 yep 21:16:37 ... 21:16:41 http://cale.yi.org/index.php/How_To_Use_Monad_Transformers 21:16:42 Title: How To Use Monad Transformers - CaleWiki 21:16:45 thanks! 21:16:47 @google Wadler The essence of functional programming 21:16:49 http://homepages.inf.ed.ac.uk/wadler/topics/monads.html 21:16:49 Title: Wadler: Monads 21:17:03 It doesn't explain how monad transformers work -- it sort of assumes you already know the basics about them. 21:17:28 Oh, I was thinking things which I wrote :) 21:17:42 Yeah, there's papers which take that view all over the place :) 21:18:18 anyone have news on the SoC HTTP library project? 21:18:34 the curl bindings one? 21:19:32 there's a new curl library on code.haskell.org 21:19:37 provided , kindly, by galois.com 21:19:43 oh, i should check it out! 21:19:47 haha, Hank Aaron is given an Erdös number of 1 because they both autographed the same baseball! 21:19:55 --- join: msouth (n=msouth@user-0c8hpob.cable.mindspring.com) joined #haskell 21:19:56 which was developed without knowledge of the soc project, unfortuately 21:20:12 --- join: glguy (n=nobody@unaffiliated/glguy) joined #haskell 21:20:21 ah, just the person i was looking for, glguy 21:20:29 glguy: is the 'curl' package ready to go? should i get on hackage? 21:20:39 brad here is looking for a curl binding. 21:21:02 mvanier: hey 21:21:08 hey 21:21:12 sorear is looking at a general solution to the import problem 21:21:18 yes, in code.haskell.org i see some files but no tarball 21:21:22 OK, I'm not in a huge rush ;-) 21:21:25 is this a "work in progress"?? 21:21:27 right, brad, that's a darcs repo 21:21:35 i think its done, just not tarred up 21:21:38 glguy: ? 21:22:03 mvanier: Yeah. I'm making it more robust and deleting 4000 lines of code in the process :) 21:22:09 :) 21:22:17 --- quit: emm- (Connection timed out) 21:22:26 Funny how often that's the case. 21:22:34 you could just expose the expression parser in the haskell-src package 21:22:35 spj closes his eyes a lot while speaking 21:22:39 --- join: njbartlett (n=njbartle@dsl21093.fip.synapse.ne.jp) joined #haskell 21:22:46 Less code, less chance for errors. 21:22:48 or is it just the camera perspective 21:24:20 --- quit: njbartlett (Client Quit) 21:26:18 is there a way of getting a stack trace when you've blown the stack? i'm unsure which function's causing the space leak... 21:26:37 try +RTS -xc 21:27:03 after compiling with profiling using --auto-all 21:28:17 Linking dist/build/lambdabot/lambdabot ... 21:28:22 ok, cheers. 21:29:10 hm, the profiling report only includes heap allocated stuff, right? but -xc seems to give me what i want... thanks. 21:30:00 -xc uses the cost centres to construct the stack trace. 21:30:20 mvanier: my local lambdabot just built successfully on 6.6.1, I'll test it minimally then darcs send --cc you the patch 21:30:36 oh, i see. so -xc doesn't make any sense unless profiling is enabled. thanks. 21:30:56 sorear: OK, I'll have to read up on darcs send though (sorry). 21:31:21 psykotic pasted "=== for quickcheck properties" at http://hpaste.org/1981 21:31:26 mvanier: no, you want darcs apply. I'm sending *you* the patch. :) 21:31:35 blackdog: +RTS --help will tell you what you can do with any given binary 21:31:36 sorear: OK, I think I've got it :-) 21:32:04 actually, I think darcs send bundles a copy of the relevant section of the manual. compared to 40k patches, it's not that big :( 21:32:23 sorear: it DOES? 21:32:24 @version 21:32:24 lambdabot 4p534, GHC 6.6 (Linux i686 2.66GHz) 21:32:24 darcs get http://www.cse.unsw.edu.au/~dons/lambdabot 21:32:32 sorear: in what version of darcs does it do that? 21:32:33 This gives a whole new meaning to "bleeding edge". 21:32:36 SamB_XP_: Emphasis on think. 21:32:51 ARGH! 21:32:52 cheers SamB 21:32:59 scripts/ShowQ.hs:46:0: 21:32:59 Duplicate instance declarations: 21:32:59 instance (Arbitrary a) => Arbitrary (Maybe a) 21:32:59 -- Defined at scripts/ShowQ.hs:46:0 21:32:59 instance (Arbitrary a) => Arbitrary (Maybe a) 21:33:01 -- Defined in Test.QuickCheck 21:33:09 sorear: it *might* be possible but I've never seen it happen 21:33:12 ?src lex 21:33:13 Source not found. Wrong! You cheating scum! 21:33:25 ?src List.lex 21:33:25 Source not found. stty: unknown mode: doofus 21:33:30 what 21:33:32 :( 21:33:48 lex might be complex. 21:33:51 @source GHC.Read 21:33:52 GHC.Read not available 21:33:58 what exactly does lex do? 21:34:00 dons: What do you say about removing the Arbitrary (Maybe) instance? I've never seen it used here and it breaks the 6.6.1 build 21:34:00 @source Text.Read 21:34:01 http://darcs.haskell.org/packages/base/Text/Read.hs 21:34:06 reffie: Lexes haskell. 21:34:11 doh 21:34:20 (more or less) 21:34:34 sorear: hmm. ok. 21:34:44 yeap, that's fine 21:35:19 reffie: http://darcs.haskell.org/packages/base/Text/Read/Lex.hs 21:35:24 Installing: /usr/local/src/lambdabot/lib/lambdabot-4.0/ghc-6.6.1 & /usr/local/src/lambdabot lambdabot-4.0... 21:35:25 thanks 21:35:27 stefan@stefans:/usr/local/src/lambdabot$ echo $? 21:35:29 0 21:35:32 Lambdabot builds on GHC 6.6.1 21:35:49 by default, btw? 21:35:54 with an unmodified cabal file? 21:36:04 yes 21:36:08 cool 21:36:16 lambdabot> > 2 + 2 21:36:16 Failed to load interface for `Control.Parallel': 21:36:16 Use -v to see a list of the files searched for. 21:36:25 I guess that means it's okay to release 6.6.1 now ;-P 21:36:54 otoh, hs-plugins doesn't work very nicely when you have multiple ghc's installed. 21:36:55 * SamB_XP_ thinks lambdabot building from unmodified sources should be part of the acceptance tests for GHC releases 21:37:26 yeah, hs-plugins needs to be built against 'ghc' , whatever that is 21:37:28 SamB_XP_: No, it should be part of the tests for lambdabot releases. We can't have Igloo suffering every time I break the build 21:37:42 sorear: if you've got time, can you port the hs-plugins api to ghc-api ? 21:37:45 dons: 'ghc' changes every week around here :) 21:37:48 just 'eval' would do 21:37:58 but we'd need sandboxing too, which is a little harder 21:38:04 sorear: but they have to stop changing API incompatibly on minor releases! 21:38:12 it MUST END 21:38:18 SamB_XP_: Excuse me? 21:38:19 yeah, internal stuffs shouldn't be exposed from cabal files. 21:38:30 since its too tempting to hack 21:38:39 SamB_XP_: Are you honestly proposing a freeze on undocumented apis? 21:38:45 i've done that twice, in 2 years. so its not that scary, SamB_XP_. but you like yelling :) 21:38:47 sorear: not those, no 21:38:51 --- join: sfultong (n=sfultong@c-71-232-76-253.hsd1.ma.comcast.net) joined #haskell 21:39:22 only undocumented .Internal apis change on minor releases, and they'll be hidden in the cabal file in future 21:39:22 blackdog pasted "stack go boom!" at http://hpaste.org/1982 21:39:30 lambdabot> > )2 + 2 Unbalanced parenthesis 21:40:17 ... so, anyone wanna help me out with what egregious screwup I'm making here? 21:40:29 sorear: I seem to remember many of these breakages being non-internal things... 21:40:53 that's probably because you're doing it wrong, sorear 21:40:55 SamB_XP_: 21:41:08 heh. tab completion breaks more often than it works 21:41:09 blackdog: Define boom 21:41:20 stack space overflow 21:41:25 dons: who was doing what wrong? 21:41:32 blackdog: hmm. 21:41:42 foldWithKey eh? 21:41:43 i'm sure it's hideously non-idiomatic 21:42:01 ... are you going to say manual recursion again? 21:42:07 --- quit: beschmi (Remote closed the connection) 21:42:26 nah, but that Map fold is probably terribly unstrict 21:42:27 --- quit: brad ("leaving") 21:42:33 and the append looks dicey, complexity wise 21:42:43 what's Lazy? D.B.Lazy.Char8 ? 21:42:51 yep 21:42:57 oops, sorry, should have mentioned that 21:43:07 and B is data.bytestring.char8 21:43:29 what' the Map doing here? 21:43:53 it's my map of all the words in the SOWPODS list 21:43:56 maybe you can use insertWith' somehow? 21:44:07 ?src tails 21:44:08 tails [] = [[]] 21:44:08 tails xxs@(_:xs) = xxs : tails xs 21:44:09 or insertWithKey' 21:44:15 isn't better to return a [String] from the fold and fromChunks later? 21:44:18 i'm using insertWith'' to create it... 21:44:40 do you have a complete program that illustrates the issue, that we could play with? 21:44:47 just wrap that in a readfile and main? 21:44:47 sure. hold on. 21:45:34 mvanier: done. 21:45:43 Awesome! 21:46:40 blackdog pasted "whole grungy target solver" at http://hpaste.org/1983 21:47:07 dons: sorry, wrap what in a readfile? 21:47:19 oh, whatever was necessary to run it locally 21:47:26 the dictionary gets built ok if i don't try to cache it in a simpler form 21:47:45 oh, it needs a file called "sowpods.txt" in the local directory 21:47:59 symlink words or something, it just expects one word each line 21:47:59 containing what? 21:48:01 ok 21:48:29 apologies for grunginess. it's not exactly a model of clarity. 21:49:07 my eyes are greatly offended 21:50:06 the gzip encode$ ./A 21:50:06 Reading textfile 21:50:07 A: Ix{Char}.index: Index ('A') out of range (('a','z')) 21:50:11 ? 21:50:38 with sowpods.txt just symlinked to /usr/share/dict/words 21:50:56 oops - that's right, i lowercased it 21:51:08 probably shoulda done that at runtime too 21:51:09 ah, ok. 21:52:46 looks like a bit of a spaace leak 21:53:06 ok, so it built, and runs: 26599 dons 2 10 147M 129M sleep select 0:23 42.53% A 21:53:15 $ ./A 21:53:15 Reading textfile 21:53:15 Enter a target 21:53:19 is should enter a target? 21:53:27 i can has target, plz? 21:53:30 sure 21:53:36 type cheezburger 21:53:43 kthx 21:53:44 or, y'know 21:53:46 any word 21:53:49 cool 21:54:02 so i got a bunch of words. when does the stack oflow happen? 21:54:22 when i do dumpCache 21:54:23 hm 21:54:41 maybe i'm running it with different compile flags - -prof etc 21:54:57 I used -O2 --make 21:55:04 it builds a 140M dictionary, I think 21:55:08 --- join: brad (n=brad@ppp-71-139-168-211.dsl.snfc21.pacbell.net) joined #haskell 21:55:09 but otherwise, hmm, no stack overflow 21:55:15 any hxt users here? 21:55:21 Cale is 21:55:23 Cale: around? 21:55:33 * Saizan is too 21:55:48 heh. maybe it's only crashing because i turned profiling on... is that an anti-heisenbug? 21:56:09 blackdog: I suppose 21:56:10 blackdog: so you manually compress the Map first? 21:56:17 here is my question, succinctly - "xread" barfs on xml docs with a valid xml decl () 21:56:19 i'm a QA, we have it fairly often that a bug appears only in the QA environment 21:56:20 anyone know why? 21:56:38 dons: um, no, i don't think so. 21:56:39 could you not just use the native instance Binary for Dict? 21:56:48 ... you can do that? 21:56:54 oh yes, my goodness 21:56:59 let me see.. 21:57:04 type Dict = Map.Map Integer [B.ByteString] 21:57:07 already derives Binary 21:57:12 i'm thinking way too low-level, aren't I... 21:57:32 blackdog: http://hpaste.org/1958 21:57:34 blackdog: Are you trying to find anagrams within a dictionary? 21:57:56 :t Data.Binary.encodeFile 21:57:58 forall a. (Data.Binary.Binary a) => FilePath -> a -> IO () 21:58:01 that guy 21:58:02 wli: yeah. 21:58:04 I don't know anything about these binary instances. Interesting. 21:58:13 dumpCache :: Dict -> IO () 21:58:13 dumpCache = encodeFile cacheFile 21:58:23 wli: isn't an ordinary heisenbug one that goes away when you try to catch it? 21:58:41 SamB_XP: Oh, point. 21:58:46 --- quit: rashakil ("Leaving") 21:59:08 or at least doesn't happen when you want it to 21:59:16 Data.Binary sounds useful. 21:59:20 i will try my question on cafe, maybe someone will know. thanks anyway! 21:59:24 wli: had a look at your code - will chuck it in and benchmark it in a minute 21:59:27 --- quit: brad (Client Quit) 21:59:28 blackdog: or to encode, then compress, then write: 21:59:29 dumpCache = Lazy.writeFile cacheFile . BZ.compress . encode 21:59:48 encodes to a lazy bytestring, sets up a lazy compression, as the chunks are written to disk 22:00:40 runs in 80M, the above code 22:00:49 and seems to get to the "enter a target" prompt a bit faster 22:00:59 nice 22:00:59 $ du -hs sowpods.cache 22:01:00 2.5M sowpods.cache 22:01:16 you'll need to import Data.Binary for encodeFile and encode 22:01:22 --- quit: ddarius (Read error: 110 (Connection timed out)) 22:01:56 then readCache also simplifies 22:02:04 yep 22:02:33 --- join: Stinger (n=Stinger@219-90-162-51.ip.adam.com.au) joined #haskell 22:02:57 --- join: qatal (n=chatzill@203-97-223-50.cable.telstraclear.net) joined #haskell 22:03:19 --- join: kenta (n=kenta@KD124208246004.ppp-bb.dion.ne.jp) joined #haskell 22:03:40 thanks don - always nice to see kilos dropping off your programs 22:03:52 --- quit: AdamantX (Read error: 110 (Connection timed out)) 22:04:15 yeah 22:04:17 --- join: AdamantX (n=wtfmonki@c-69-181-160-107.hsd1.ca.comcast.net) joined #haskell 22:04:23 --- quit: gravity ("sleep") 22:04:25 --- part: kenta left #haskell 22:04:35 btw, i'd also like to give some props to the cabal guys and cabal-install. so much smoother than it used to be. 22:05:28 mvanier: any new problems yet, or does the patch work for you? 22:05:32 runs in 64M if you use GZip instead of BZzip 22:05:43 $ du -hs *.cache 22:05:43 3.0M sowpods.cache 22:05:45 sorear: Yes, it compiles and works fine -- thanks! 22:05:48 marginally larger, but much faster 22:06:00 sorear: I just need to learn how to use the thing. 22:06:05 and loads the cache faster 22:06:22 blackdog: 22:06:23 dumpCache :: Dict -> IO () 22:06:23 dumpCache = Lazy.writeFile cacheFile . GZ.compress . encode 22:06:23 readCache :: IO Dict 22:06:23 readCache = return . decode . GZ.decompress =<< Lazy.readFile cacheFile 22:06:25 and to integrate it into ghci 22:06:35 using : import Codec.Compression.GZip as GZ 22:06:35 import Data.Binary 22:06:35 import Control.Monad 22:07:30 still haven't quite got used to the whole point-free thing. 22:08:06 ?unpl dumpCache = Lazy.writeFile cacheFile . GZ.compress . encode 22:08:06 dumpCache c = Lazy.writeFile cacheFile (GZ.compress (encode c)) 22:08:09 ah, so you still worship at the church of the bound variable 22:08:26 i'm decadent and luxurious. :) 22:08:30 --- join: kfish (n=conrad@60-56-92-70.eonet.ne.jp) joined #haskell 22:08:44 dons: I thought that ended millions of years ago or around there 22:08:53 * wli snarfs the libghc6-binary-dev deb 22:08:53 at least 10s of thousands 22:08:56 that's the cult of the bound variable, an early sect. 22:09:01 is there a way to write png images from haskell? 22:09:05 --- join: narain (n=narain@adsl-75-62-125-218.dsl.pltn13.sbcglobal.net) joined #haskell 22:09:09 reffie: Yes. 22:09:13 reffie: Yeah, there's a lib for it. 22:09:14 reffie: yeah, the gtk bindings can happily do it, there may be other libs 22:09:19 reffie: I think the cairo binding will do it 22:09:26 * SamB_XP_ personally just uses PPM and pnmtopng 22:09:44 reffie: I strongly recommend pnmtopng. 22:09:47 dons: surprising that gzip runs faster - i thought bzip was meant to be the bees knees... 22:10:11 blackdog: in compression ratio, yes 22:10:12 --- join: wy (n=wy@r253211120.resnet.cornell.edu) joined #haskell 22:10:12 is it easy to append two pngs? 22:10:15 it is supposed to be 22:10:16 hm, ppm seems simple 22:10:18 blackdog: bzip2 is meant to be the best compression program that isnt' 100x slower than bzip. 22:10:20 Saizan: what? 22:10:24 * reffie likes simple 22:10:29 Saizan: Yes, but it won't do anything useful 22:10:33 If igloo gets his deflate encoding things out, it should be easy to write a png encoder in 100% Haskell. 22:10:35 reffie: yes, that's the idea ;-) 22:10:44 --- join: gour (n=Gour@18-153.dsl.iskon.hr) joined #haskell 22:11:19 Who was it that was working on Reed-Solomon coding? 22:12:12 dons: hey, you busy this afternoon? am having birthday drinks at the courthouse if you have time.. 22:12:16 --- join: Eidolos_ (n=sartak@c-75-67-53-71.hsd1.ma.comcast.net) joined #haskell 22:13:35 oh, too busy with the simultaneous move/phd write up. but we should catch up before i head off 22:13:59 * dons tries to juggle too many chainsaws 22:15:00 no dramas. let me know when you're free, i wouldn't want to distract you from the chainsaws :) 22:15:52 --- join: gour_ (n=Gour@35-188.dsl.iskon.hr) joined #haskell 22:17:28 blackdog: btw, I think 22:17:29 buildDict l = foldr 22:17:29 (\str m -> 22:17:33 dammit, don, you've made me dissatisfied with the rest of my program now. :) Must be shorter! 22:17:35 uses a bit less space 22:17:51 cheers 22:17:52 yeah, you can probably golf it down to half the size 22:18:11 there's another lazy foldl in there that could stand to be a foldl' i suspect 22:18:14 i don't really want to golf it 22:18:20 i still want it to be readable 22:18:31 but that dumpCache/readCache is a big win 22:18:32 would make a nice blog post, btw :) 22:18:35 you haven't played readable-golf before? 22:18:47 blackdog's a past master of golf 22:19:03 ... i think that was an anagram program too :) 22:19:05 it twas he, I and patrykz who came up with the nefarious pretty.hs originanlly, iirc 22:19:09 :) 22:19:31 nefarious? 22:19:32 --- quit: gour (Nick collision from services.) 22:19:32 * blackdog is prodded by dons and goes off to writeup 22:19:36 --- nick: gour_ -> gour 22:19:37 is it wanted in ten systems? 22:20:06 dons: there aren't any other foldls in there, are there? 22:20:24 you could probably profile now, and get finer info on the algo itself. 22:20:39 true. i'll hold off on the post 22:20:41 but otherwise, should be fairly clean, i think 22:20:42 convertS xs = List.foldl' (\x y -> x * (plookup ! y)) 22:20:56 for a post you could probably leave off most of the type signatures too 22:21:09 hm, that one's a foldr in mine. wonder when i changed that. 22:21:31 lenCompare a b = compare (length a) (length b) 22:21:40 ?pl lenCompare a b = compare (length a) (length b) 22:21:41 lenCompare = (. length) . compare . length 22:21:43 heh 22:22:08 lenCompare = on compare length 22:22:09 i'm tempted to rejig the subset stuff as well - it's not so easy to do with ByteStrings, so i kept it in String 22:22:31 i'd fix that to be less awful, but the loop is really quick anyway. 22:22:32 compare `on` length, yeah 22:22:50 --- quit: Eidolos (Read error: 110 (Connection timed out)) 22:22:57 oh, but length is O(1) in ByteStrings, right? 22:23:05 lenCompare = comparing length -- works without any extras on base <2.1 22:23:48 yeah 22:24:05 @hoogle on 22:24:09 Test.QuickCheck.oneof :: [Gen a] -> Gen a 22:24:09 System.Console.Readline.onNewLine :: IO () 22:24:09 Text.ParserCombinators.Parsec.Char.oneOf :: [Char] -> CharParser st Char 22:24:16 on f g x y = g x `f` g y 22:24:38 cheers. not in standard lib? 22:24:44 import Data.Ord, lenCompare = comparing length 22:24:45 @ty let on f g x y = g x `f` g y in on 22:24:50 forall t t1 t2. (t -> t -> t1) -> (t2 -> t) -> t2 -> t2 -> t1 22:24:50 --- quit: dolio (Read error: 104 (Connection reset by peer)) 22:24:53 its in Data.Function, in ghc head 22:25:35 * wli briefly notes that he seems to be able to rapidly tabulate anagrams in Shakespeare's first folio, Don Quijote, Confessio Amantis, Vanity Fair, the complete plays of Gilbert and Sullivan, the Lives of the Noble Grecians and Romans, and de bello Gallico without resorting to too much optimization. 22:26:08 wli: about how big is your corpus? 22:26:23 --- quit: execlp (Remote closed the connection) 22:26:36 wli: I don't think it's faire to use shakesbeer 22:27:00 blackdog: Individually, Shakespeare's First Folio is the largest at 4.5MB. 22:27:26 shakesbeer didn't even know how to spell his own name! 22:28:01 --- quit: AdamantX (Connection timed out) 22:28:04 dons: I'm now trying to get GOA to work, but I can't load the module. 22:28:25 --- part: bct left #haskell 22:28:50 --- join: dolio (n=dolio@216.68.188.68) joined #haskell 22:29:00 SamB_XP_: Spelling was not standardized then as it is today. 22:29:09 dons: I get "GOA is not loaded" when I do :m +GOA 22:29:14 wli: yes, I know 22:29:18 --- join: AdamantX (n=wtfmonki@c-69-181-160-107.hsd1.ca.comcast.net) joined #haskell 22:29:18 $ /usr/bin/time ./blackdog ~/books/English/Shakespeare/First_Folio 22:29:18 (805,[("'ist",2),("'tis",692),("i'st",2),("is't",82),("it's",27)]) 22:29:18 105.62user 0.54system 1:46.17elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 22:29:18 0inputs+0outputs (0major+68174minor)pagefaults 0swaps 22:29:23 i think goa is known to be broken, but i've not looked into how to fix it 22:29:33 Oh, OK then. Too bad. 22:29:38 blackdog: My driver isn't equivalent, though. 22:29:40 --- join: magnus__ (n=magnus@pool-71-185-83-92.phlapa.east.verizon.net) joined #haskell 22:29:43 the point is that it's not fair to find anagrams in something written before the invention of spelling 22:30:19 SamB_XP_: The translation of Plutarch is modern. 22:30:49 --- join: gkr (n=notme@200-127-242-48.cab.prima.net.ar) joined #haskell 22:30:57 --- quit: wy ("Leaving") 22:31:07 SamB_XP_: (Don Quijote obviously has similar issues to Shakespeare if you're dealing with that. 22:32:30 82.90user 0.42system 1:23.32elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 22:32:34 0inputs+0outputs (0major+55226minor)pagefaults 0swaps 22:32:39 For Plutarch. 22:32:50 742247 words. 22:33:11 4.2MB text file. 22:33:15 --- join: ramki (i=ramki@unaffiliated/ramkrsna) joined #haskell 22:33:20 sorear: lambdabot is working great. Thanks! 22:33:37 mine was running in about 15 seconds over SOWPODS, or 6 seconds over the cache 22:33:53 on my emulated openBSD box. now it seems to be completely stuck. *sigh* 22:34:12 * blackdog promises himself he'll start using source control even on his little muckaround projects. real soon now 22:34:24 --- quit: narain ("Ex-Chat") 22:34:36 blackdog: What's SOWPODS? 22:34:37 --- join: execlp (n=execlp@ppp-81-25-50-76.ultranet.ru) joined #haskell 22:35:11 wli: the official list of scrabble words 22:35:17 --- join: mrsolo (n=mrsolo@adsl-68-126-199-167.dsl.pltn13.pacbell.net) joined #haskell 22:35:26 There's an official list ? 22:35:45 blackdog: Well, they're not really trying to do the same things. I'm not sure what your driver is doing. 22:36:04 --- join: olsner (n=salparot@c-ed8ee155.710-8-64736c10.cust.bredbandsbolaget.se) joined #haskell 22:36:54 --- quit: mvanier ("ChatZilla 0.9.78.1 [Firefox 2.0.0.5/2007071317]") 22:37:08 wli: probably not. mine builds the dictionary then looks for all words that you can form from the substrings 22:37:29 i was more comparing my before-and-after times and wondering what i changed 22:38:01 PBS is doing a show now on how great this artist that paints solid colored walls and single squares on canvas is great 22:38:19 \_o-< 22:38:27 blackdog: it looks like you're querying the user and returning a number of anagrams or something on that order. I'm not sure what the wildcard business is, though. 22:38:27 I call that "Man with a sword" 22:38:36 and expect to be showered with gifts and praise 22:38:43 --- quit: ihope (Connection timed out) 22:39:08 wli: oh, right. yeah, it's for scrabble - looking at how many words you can form if you have one wildcard that can be anything. 22:39:49 blackdog: So it's a set of letters and some specified number of unknown letters? 22:40:08 blackdog: And you want all possible words formable in a dictionary from that? 22:40:14 yep. although mine currently works only on one wildcard. 22:40:16 --- join: gmw (n=chaos@M630P019.adsl.highway.telekom.at) joined #haskell 22:40:24 morning 22:40:52 blackdog: Let me think about the algorithm a little bit. 22:41:02 --- quit: magnus (Read error: 110 (Connection timed out)) 22:41:09 little question: does +++ have any meaning in haskell? 22:41:14 --- quit: chumphries (Remote closed the connection) 22:41:37 Yes. It's an operator symbol, like + or == or / 22:41:52 remember that operator-symbols are just another kind of name 22:42:07 there is no *predefined* function named +++, but you can define one yourself 22:42:33 gmw: that was for you 22:42:38 ?hoogle (+++) 22:42:39 Did you mean: (+++) 22:42:39 Prelude.undefined :: a 22:42:39 Control.Monad.Reader.ask :: MonadReader r m => m r 22:42:40 ?hoogle +++ 22:42:41 Control.Arrow.(+++) :: ArrowChoice a => a b c -> a b' c' -> a (Either b b') (Either c c') 22:42:41 Text.Html.(+++) :: (HTML a, HTML b) => a -> b -> Html 22:42:41 Text.ParserCombinators.ReadP.(+++) :: ReadP a -> ReadP a -> ReadP a 22:43:08 thx guys! now i have something to think about :) 22:43:22 > (+1) +++ (*2) $ Left 3 22:43:24 Left 4 22:43:32 > (+1) +++ (*2) $ Right 3 22:43:34 Right 6 22:44:05 ok this is very confusing^^ 22:44:49 i just read through most of the yet another haskell tutorial and understand it for the most part, but this is strange^^ 22:44:52 > (+1) +++ (*2) $ (3,3) 22:44:53 Couldn't match expected type `Either b b'' 22:44:53 gmw: That's one of the stantdard +++'s, namely the one from Control.Arrow on functions 22:45:01 @src (->) (+++) 22:45:01 Source not found. Have you considered trying to match wits with a rutabaga? 22:45:04 @src (->)(+++ 22:45:04 Source not found. Do you think like you type? 22:45:06 @src (->) +++ 22:45:07 Source not found. That's something I cannot allow to happen. 22:45:18 @src (+++) 22:45:18 Source not found. Your mind just hasn't been the same since the electro-shock, has it? 22:45:31 @source Control.Arrow 22:45:31 http://darcs.haskell.org/packages/base/Control/Arrow.hs 22:46:11 f +++ g = left f >>> right g 22:46:35 @src (->) left 22:46:36 Source not found. Maybe if you used more than just two fingers... 22:47:14 f +++ g = (Left . f) ||| (Right . g); (|||) = either 22:47:22 For (->). 22:48:48 hmm well i'm not sure if the +++ i have here is related to control arrows, it wouldn't make sense^^ 22:49:05 gmw: What +++ do you have? 22:49:30 see, you probably are already annoyed, but yep, here is another mod-x player who quite can't figure out how to solve lvl 7^^ but i think i got the code right, except the +++ section 22:50:13 ah, hehe 22:50:19 erm, well and if you don't know what i'm talking about: that lvl is about having an obscurifcated haskell code which must be fixed in order to get the single correct code out of 3500 22:50:33 gmw: You should learn Haskell :) 22:50:48 * shachaf has never heard of mod-x. 22:50:50 --- quit: kscaldef () 22:50:52 gmw: The extra funny bit is that their Haskell code is rather broken :) 22:50:53 cale as a matter of fact i'm really trying hard, i just don't get the +++ thingie^^ 22:51:06 gmw: But it's written in such a way to make sense to Haskell users :) 22:52:09 well after intensive reading i think i figured out what it does, for the most part, but i won't get a single code out of it and it must be because i "fixed" the +++ part wrong 22:52:15 gmw: It's choice between parsers 22:52:28 If I recall correctlu 22:52:30 y* 22:52:47 yes i thought so that it was some kind of "OR" but i'm not sure how to implement that correctly 22:53:27 blackdog: Okay, there are two things happening here. 22:53:37 but instead of parsing either of the code, atm it parses all of it 22:53:44 That is, the parse succeeds if the left parser succeeds, or the second succeeds. 22:53:45 which probalby leads to problem^^ 22:54:01 its mildly annoying that you have to unregister a package just to install a version with profiling... 22:54:05 wli: hm? 22:54:05 blackdog: The first is that the length of your string is specified, so you basically want an array of string indices, one for each possible string length. 22:54:06 Can you paste the code? I forget how it goes :) 22:54:11 --- join: drrho (n=rho@chello213047112079.11.11.vie.surfer.at) joined #haskell 22:54:20 trying to understand the basis of Haskell's concurrency: is it a bit like how darcs has patches, where the data being read by different threads have version numbers that can be rolled back if something occurs? 22:54:20 blackdog: The second is that you have a multidimensional range query. 22:54:25 yeah i'll qry it in order to not annoy anyone, ok? 22:54:31 !paste 22:54:31 Haskell paste bin: http://hpaste.org/ 22:55:10 blackdog: You can view each string as a vector of natural numbers, one coordinate for each possible character. 22:55:16 ok wait a sec, i'll make it extra nice to read and delete all my debugging tryout staff^ 22:55:51 Just the original code will do :) 22:55:54 blackdog: For each non-wildcard character in your string, you have a constraint that there must be at least that many instances of that character. 22:56:23 ivanm: No, haskell's concurrency is thouroughly conventional. You have a bunch of threads, connected via pipes. 22:56:27 wli: yes, that makes sense. 22:56:30 blackdog: So you get x_1 >= v_1, x_2 >= v_2, ..., x_n >= v_n, x_1 + x_2 + ... + x_n = c 22:57:04 blackdog: There are standard data structures to support this kind of search, things like R trees, X trees, and the like. They're multidimensional search structures. 22:57:18 blackdog: in particular ones optimized for high dimensionality. 22:57:39 --- join: codedivine (n=rahul@S0106004005486520.ed.shawcable.net) joined #haskell 22:57:40 gmw pasted "original "broken" code" at http://hpaste.org/1984 22:58:19 gmw pasted "my own "almost fixed" code" at http://hpaste.org/1985 22:58:38 sorear: OK, I must have completely misunderstood the article on wikipedia about STM 22:59:01 as you can see i removed the +++ alltogether which must be clearly wrong, but i don't know how to do it properly 22:59:07 --- quit: dje_ () 22:59:09 the rest of the code should hopefully be correct :) 22:59:13 --- join: roconnor (n=roconnor@vhe-540354.sshn.net) joined #haskell 22:59:17 gmw: yeah, you've interpreted +++ incorrectly -- it joins the top level do block of that definition with the following one. 22:59:22 blackdog: So the new algorithm is to construct one of those multidimensional search trees for each string length, then to consult the appropriate tree for a given string length to respond to a query. 22:59:23 wli: ok, that could be useful. 22:59:42 and it forms the parser which parses either of the two 22:59:44 ivanm: Oh, if you were talking about STM (ask opposed to plain haskell concurrency) you were much closer to the truth. 22:59:56 So if you're interested in a string which satisfies the parser, just pick one :) 23:00:22 sorear: OK, I didn't realise there was a difference 23:00:38 blackdog: Basically you add up the number of characters (whether wildcard or no) to determine the string length and so which tree to query. Then the non-wildcard characters' instance counts serve as lower bounds in one-sided multidimensional range queries. 23:00:50 so what would be better/easier for a beginner to pick up and run with? standard concurrency or STM? 23:01:10 ivanm: How familiar are you with conventional multiprocessor programming, and the use of atomic exchange instructions? 23:01:18 gmw: Is this your first encounter with Haskell? 23:01:21 well the funny thing is, as long as i comment - out the call for code 4, this code 3 will actually still be able to parse (so i didn't immediately found the error, i thought it was code 4, but the error obviously occors because of the repeadet call for the not correct code 3 23:01:21 blackdog: The big downside is that these data structures for multidimensional range queries are quite involved. 23:01:23 cale yes 23:01:26 ivanm: STM builds on conventional concurrency 23:01:49 omg my typing, i've been up quite a while now^^ 23:01:50 > sum [product (1..4), product (2..4), 1] 23:01:50 Parse error 23:01:53 I haven't really done much concurrency before... :s 23:01:57 > sum [product [1..4], product [2..4], 1] 23:01:59 49 23:02:10 did look at atomic stuff, etc a few years ago, but have mainly forgotten :s 23:02:11 cale and my first encounter with functional programming^^ 23:02:15 So we're looking for a string of length 48 23:02:25 which matches the parser given 23:02:33 no, if the string has length 49 it will be immediately declared as "failed" 23:02:56 sorear, ivanm, STM is probably a simpler abstraction to learn (?) 23:02:57 Are you sure? 23:03:00 yes 23:03:12 after that, any of the remaing codes will be given as an argument to code 2 23:03:12 wli: pragmatically, once i've built the dictionary, even the primes-based one, it's quick as hell. 23:03:27 (length (check (x ++ "p")) == (sum [product [1..4], product [2..4], 1])) == False -- it fails if this is true. 23:03:36 which starts parsing (it works really well, i did it step-by-step by slowly putting comments away) 23:03:42 So it fails if (length (check (x ++ "p")) == (sum [product [1..4], product [2..4], 1])) is false 23:03:56 wli: even if it's not optimal. 23:04:07 the code is valid if my source can parse the entire code string 23:04:21 kfish: OK 23:04:29 (sum [product [1..4], product [2..4], 1]) is 49 23:04:38 So it fails if (length (check (x ++ "p")) == 49) is false 23:05:01 ah, check is init, which removes the last character from the string 23:05:04 > init "Hello" 23:05:06 "Hell" 23:05:16 So it fails if (length x == 49) is false 23:05:33 --- part: codedivine left #haskell 23:05:34 no, it fails if length == 49 23:05:53 So where did my logic break? 23:06:11 its because of "then "Failed" 23:06:13 Note that in the guard it's testing whether the condition is False. 23:06:19 ... sh ./ghci not found? the quickcheck script is all screwy 23:06:20 :/ 23:06:29 faied is a string given back to main to tell me that this is not the correct code 23:06:31 *failed 23:06:35 (though it mistakenly does so with = and not ==) 23:06:44 gmw: I know. 23:06:46 this string is given back if the length is 49 23:07:03 gmw: So you have a running copy of the program? 23:07:22 if the length is other than 49, then it gets passed to code 2 23:07:26 this code is actually working 23:07:36 it just results in an empty file foo 23:07:45 oh, in your 'runIt' you made a mistake 23:07:58 look at the original runIt 23:08:21 In the first guard, it looks to see if the condition is actually False 23:08:38 --- quit: sfultong (Remote closed the connection) 23:08:45 (or it would, if there were == instead of =, which is the obvious intent 23:08:47 ) 23:09:00 oh, you're right 23:09:12 blackdog: I think natural languages are too small to really need it. 23:09:29 if the length is 49 the code gets parsed, not vice versa 23:09:30 hmm 23:09:31 blackdog: Too small an alphabet and too small a data set. 23:10:13 gmw: You should just be able to roughly read the parser in the original code and figure out a string of length 49 which it will accept 23:10:22 yes 23:10:26 i actually tried that 23:10:31 but with codes not of length 49 lol 23:10:33 blackdog: Is the text file available anywhere? 23:11:15 i parsed the first and the last chars from code 2 and tried to figur it out with my brain, but none of the remaining codes seemed valid 23:11:25 i feel stupid now -.- 23:14:24 allright, with length 49 and parsing right before the +++ i have 4 codes left^^ 23:15:39 hmmm..... someone thinks STM is bad... "Software Transactional Memory, or STM, is the last bastion of hope for people who, for whatever reason, must still use shared mutable state in concurrency." 23:15:48 of which 2 are obviously wrong, but i'm not sure about the remaining 2 ones 23:16:10 * wli is not entirely clear on how to define new instances of Binary. 23:16:12 gmw: There are a ridiculously large number of possible solutions 23:16:55 yes 23:16:56 wli, there should be some good eample docs on the hackage page? 23:17:00 am i understanding wrong that when ghc is building, it tries to link against the OLD RTS library? 23:17:06 but out of 3500, only one is correct in this case :) 23:17:15 wli, and there's a util in binary/util that will derive them for you 23:17:22 gmw: 3500? 23:17:25 dons: Sorry about that, I only found it just now. 23:17:33 yes, i have a file here with 3500 codes 23:17:41 and only one is correct 23:17:51 gmw: Oh, hehe, there's way more than 3500 strings which that parser will accept 23:18:06 wli, http://hackage.haskell.org/packages/archive/binary/0.3/doc/html/Data-Binary.html 23:18:10 http://tinyurl.com/3cx6qr 23:18:25 i'm having a problem because the ghc used for bootstrapping was compiled using gcc 3.x while my system only has gcc 4.2.x whose libgcc doesnt' have the __eprintf symbol (which rts/Linker.c needs for some obscure reason) 23:18:47 ivanm: sounds like something a Erlang advocate (in the Why I Hate Advocacy sense) would say 23:18:47 yes, but from those 3500 codes in that file, that parser will only accept one :) 23:19:02 h8 bootstrapping. 23:19:12 --- join: Randroid (n=gregory@static-72-91-82-26.tampfl.fios.verizon.net) joined #haskell 23:19:27 sorear: yeah, it is... so what is the default (i.e. non STM) concurrency in Haskell? is it possible to have an erlang-like concurrency in haskell (i.e. message passing only)? 23:19:46 yes, Control.Concurrent.Chan 23:20:24 ok, i'm quite sure i picked the right one from the two, now trying to input into mod-x solution form (if that works, i owe you a beer) :) 23:20:28 thanks dons 23:20:34 ivanm, you've got the full list on that page, start at the bottom with forkIO :: IO () -> ThreadId , and work up through channels, mvars, tvars, stm, Control.Parallel and ndp arrays 23:21:14 Looks like I need to define Generics instances on it. 23:21:14 wli, if Data.Binary doesn't rock your world, do let me know. that would count as a bug report 23:21:27 dons: which page? the ghc/concurrency page? 23:21:29 wli, yeah , you need to derive Data to get the auto-deriving script 23:21:55 ivanm: http://haskell.org/haskellwiki/Applications_and_libraries/Concurrency_and_parallelism 23:21:56 Title: Applications and libraries/Concurrency and parallelism - HaskellWiki, http://tinyurl.com/2u95za 23:22:12 --- quit: nich_ (Read error: 110 (Connection timed out)) 23:22:30 --- quit: Randroid (Client Quit) 23:23:16 cale: you are my hero :) 23:23:23 thanks again dons... for some reason, when googling concurrency and haskell, the only page I got was concurrency demos :s 23:23:38 weird 23:23:45 oh, due to the wiki not being indexed prviously 23:24:12 i've been trying to figure out exactly how phantom types are used and came across the wikibook entry; however, I don't quite get how for example if you go from 'data T = X Int | Y String' to 'data T a = X Int | Y String' ensures any more safety; the entry only shows that you can at that point define a function like, say, "addition :: T Int -> T Int -> T Int", but how does this ensure more 'safety' at the type level? 23:24:21 With NetBSD 3.0, GHC 6.6.1 and latest lambdabot from Darcs I get: ''Initialising plugins ................Memory fault (core dumped)'' 23:24:31 wow 23:24:41 try removing State/seen 23:24:49 gmw: Make sure you keep learning Haskell, it's a fun language :) 23:24:55 it could be bugs in the ghc port to netbsd, possibly, ohub 23:25:07 ohub: you're not using the `plugins' package are you? 23:25:18 hmm 23:25:27 ohub: I'd like to know how you managed to compile lambdabot on GHC 6.6.1 23:25:35 it hasn't been tested on netbsd, which would require some checking of the linker. 23:25:36 cale: yes it really wasn't too hard.. at first i had no clue what that code was doing, but now, a night later after that tut i understood all of the code except the +++ thingie, and of course i had that conditional error ;) 23:25:43 sorear: patches already pushed. 23:26:07 oh. that was fast :) 23:26:11 --- quit: monochrom ("Ex-Chat") 23:26:13 dons: How do I see if I'm using plugins or not? 23:26:28 ohub: Did you use the lambdabot.cabal.plugins file? 23:26:36 i especially like the concept that there are no destructive updates, and that the error msgs given by (hugs in my case) compiler are meaningful^^ 23:26:39 sorear: nope 23:26:41 what packages did you install before you built lambdabot? 23:27:00 ok, so maybe you're not using the plugins lib. hmm. try removing the state files, and try again 23:27:13 the files in State/* 23:27:26 dons: Oh, that helped 23:27:31 ah interesting! 23:27:37 lambdabot> version 23:27:37 lambdabot 4p545, GHC 6.6.1 (NetBSD i386 (586-class)) 23:27:41 cool 23:28:03 good work. 23:28:07 but that really shouldn't cause a segfault. 23:28:33 memory safety and all that 23:28:41 dons: Does the deriving stuff work for cases where there are multiple data structures defined in terms of each other? 23:28:49 wli: Yes. 23:28:49 yeah, but its an unchecked parser. so if the data was mangled somehow wrt. the parser ohub is using (version changes or what have you..) 23:28:55 lol 23:29:05 sorear: This being for the binary data encoding and decoding? 23:29:08 dons: I ^D'ed out from lambdabot and got "Memory fault (core dumped)". Now State has two files: fact and seen and I get memory fault again while trying to start up. 23:29:10 wli: yeah 23:29:20 hex-editing the old, bootstrap library built with gcc 3.x to replace instances of "__eprintf" with "wcsrtombs" makes it link!!! 23:29:29 dons: Erm, GHC.Base.error *really* shouldn't crash. 23:29:30 ohuh, ok, so its serialising the data in some broken way. or the ghc runtime doesn't like what Data.Binary is doing 23:29:34 sorear: So it'll parse and print unambiguously etc.? 23:29:34 dons: when you said to start at the bottom of that page with forkIO, etc... the only mentions of forkIO I find on that page are at the top... 23:29:46 wli: yeah 23:30:00 ivanm: right, its the basic mecahnism in Control.Concurrent 23:30:05 why the hell does rts/Linker.c claim to need __eprintf anyway? it doesn't use it afaics! 23:30:09 ohub: wht version of Data.Binary did you install? 23:30:11 --- join: amiddelk (n=arie@melinda.cs.uu.nl) joined #haskell 23:30:12 Removing 0 byte State/fact and lambdabot can run again 23:30:22 reffie: GCC inlines code from header files 23:30:40 doh 23:30:44 dons: binary-0.3, from Darcs some weeks/months ago. 23:31:04 i guess we'l lsee if the resulting binaries will work 23:31:06 ok hmm. you could try updating that (there were a couple of fixes recently), if it happens a gain 23:31:15 dons: ok, trying that now. 23:31:25 yep, my binary seems to be 3 patches old. 23:31:26 dons: OK, so you meant start at the top and work down then? 23:31:29 sorear how does it work with newer gcc versions whose libgcc don't export that symbol? 23:31:38 ivanm, yes, it is in order of abstractoin level 23:31:42 least abstract at the top 23:32:14 --- quit: olsner () 23:32:30 reffie: You're supposed to upgrade libgcc and gcc in lockstep, and always statically link libgcc. 23:32:44 reffie: did you not make clean? 23:32:44 --- quit: erg0t (Read error: 104 (Connection reset by peer)) 23:32:48 --- join: jsnx (n=jsnx@c-69-181-185-3.hsd1.ca.comcast.net) joined #haskell 23:33:18 is (liftM foo) args just like return (foo args) ? 23:33:30 sorear i'm trying to build ghc using ghc binaries that were built with an older gcc 23:33:31 :t return 23:33:33 forall a (m :: * -> *). (Monad m) => a -> m a 23:33:37 dons: OK, I thought you meant work from the bottom of the page :p 23:33:41 :t liftM 23:33:42 forall a1 r (m :: * -> *). (Monad m) => (a1 -> r) -> m a1 -> m r 23:34:04 liftM = fmap 23:34:04 reffie: I think it would be easier just to use the binary distribution. :) 23:34:21 liftM f x = x >>= return . f 23:34:22 sorear i tried, but ghc wouldn't be able to link 23:34:39 sorear apparently libgcc doesn't get statically linked to libHSrts.a on freebsd 23:34:44 or something 23:34:47 So args >>= (\x -> return (foo x)) 23:34:48 reffie: erm, you don't link a binary version of ghc 23:34:58 reffie: you just run it 23:35:04 sorear what do you mean? 23:35:09 $ ghc 23:35:14 don 23:35:20 't run ld on anything. 23:35:33 ghc runs ld 23:35:53 OH! you meant that ghc wouldn't be able to link YOUR PROGRAMS! 23:35:55 yes! 23:35:56 sorry 23:36:03 I misunderstood. 23:36:05 --make ? 23:36:21 that's when i tried to use the prebuilt ghc for freebsd 6.0 on freebsd 7.0 (which has a different libgcc) 23:36:28 reffie: -optl-lgcc ? 23:36:34 hmm, ok, or you have something broken 23:36:48 dons: No change with new Data.Binary 23:36:57 i think the problem is that libgcc isn't being statically linked 23:37:33 but i could be wrong 23:37:39 ohuh, so a crash when it tries to write the state out on exit? 23:37:41 i don't really understand anything about this linking crap 23:38:07 ohub: so ^D should produce: lambdabot> Exception: all servers detached 23:38:43 reffie: AFAIK, you need to link the libraries into the main executable to make one big executable file (as opposed to a java-like layout where you need to tell it where to find the libraries at run-time) 23:38:45 dons: yes. two lines: ''lambdabot: user error ()'' ''Exception: all servers detached'' and then memory fault 23:38:55 reffie: I could be wrong though :p 23:39:18 hmm 23:42:12 --- join: tizoc_ (n=user@r190-0-155-225.dialup.adsl.anteldata.net.uy) joined #haskell 23:44:36 --- join: roman (n=shkoder@ll-226.216.82.212.sovam.net.ua) joined #haskell 23:45:35 --- join: careo (n=careo@208.71.31.193) joined #haskell 23:45:57 * ivanm heads off home 23:46:07 --- quit: ivanm ("CGI:IRC 0.5.9 (2006/06/06)") 23:47:17 --- join: [gmw] (n=chaos@M585P019.adsl.highway.telekom.at) joined #haskell 23:48:14 --- join: filz (n=hordf@ip-168-248.sn2.eutelia.it) joined #haskell 23:48:17 --- part: [gmw] left #haskell 23:54:09 --- join: audreyt (n=audrey@220-130-166-8.HINET-IP.hinet.net) joined #haskell 23:55:47 --- join: zak_ (n=zak@CPE-124-184-142-200.nsw.bigpond.net.au) joined #haskell