Re: [Haskell-cafe] ANN: interval and polynomial enclosure arithmetics
* Michal Konecny [EMAIL PROTECTED] [2008-08-08 13:38:56+0100] and members of the KEG research group at Aston University have used it for reliably solving differential equations and numerical constraint satisfaction problems. This's very interesting. Do you have any published papers (or other sources of information) about it? -- Roman I. Cheplyaka :: http://ro-che.info/ kzm: My program contains a bug. How ungrateful, after all I've done for it. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] please help me to find errors from my first app
On 2008 August 08 Friday, Changying Li wrote: I want to write a reverse proxy like perlbal to practive haskell. Now I just write a very simple script to forward any request to www.google.com. but it dosn't work. I run command ' runhaskell Proxy.hs' and 'wget http://localhost:8080/'. but wget just wait forever and runhaskkell can get request. when I break wget, the 'runhaskell' can print response returned from www.google.com. The problem is with request - hGetContents hRequest which blocks until wget closes the connection. Using lazy bytestrings just defers the problem slightly. Your processRequest blocks when the 'request' string is used. For some insight into how this can be avoided, see hGetBufNonBlocking. I'm not familiar enough with the Haskell libraries to point you to the ideal solution. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: Haskore tutorial (programming music using Haskell)
On Thu, 7 Aug 2008, Henk-Jan van Tuyl wrote: On Tue, 05 Aug 2008 10:59:10 +0200, jinjing [EMAIL PROTECTED] wrote: Hi there, Here's the project link: http://github.com/nfjinjing/haskore-guide/tree/master/doc/index.markdown I found Haskore pretty fun :) so I'm documenting it while learning it. Please don't hesitate to give suggestions / corrections. About the installation section: I think beginners will be grateful if you write down the full darcs get commands and explain the --global parameter of the cabal install command. There are two more packages that need to be downloaded: - package hosc depends on package binary - package haskore depends on package unix Windows users will be grateful if you tell them that Haskore cannot be built on Windows, because of the dependance on the unix package. It would have saved me a lot of time if I knew that beforehand. 'unix' is only one of the dependencies, that is there due to Haskore's monolithic nature. I see you have found the offending places yourself. As a first hack you can hide them with Cabal flags and CPP, as you did, but in the long run, there should be small packages that allow the user to install the things that work for him. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: Tutorial on information visualization and visual analytics in Haskell
This is the tutorial I'll be presenting at DEFUN 2008. I'll be building a site around it until then, complete with compilable code examples, but I thought I would let everyone get a sneak peek at the long version of the tutorial before I'm done with it. The code is as yet untested, and keep in mind, advanced Haskellers, that I'm purposefully simplifying some things to be understood by the beginner to the intermediate Haskeller. Comments and questions are welcome and encouraged. Please do ignore typos in the inline code for now, though, as I'll be spending this week testing it out and making sure everything works. The link is: http://bluheron.europa.renci.org/docs/BeautifulCode.pdf -- Jeff ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] xmonad on the openmoko mobile phone
Haskell fans might be impressed by the good work of Joachim Breitner, who got xmonad running on his openmoko phone, http://www.joachim-breitner.de/blog/archives/300-Xmonad-on-my-mobile-phone.html You can see a photo here, http://galois.com/~dons/images/openmoko-nomeata.jpg Haskell on the iphone next? -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] self-referential data
From https://secure.wikimedia.org/wikipedia/en/wiki/Bencoding , I think I should code data BValue = BString String | BIntegerInteger | BList [BValue] | BDictionary (M.Map BString BValue) but: Not in scope: type constructor or class `BString' The implementations I've found just implemented BDictionary's map key as String, but I think that's kind of wrong. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] self-referential data
On Sat, Aug 09, 2008 at 05:09:06PM -0500, brian wrote: From https://secure.wikimedia.org/wikipedia/en/wiki/Bencoding , I think I should code data BValue = BString String | BIntegerInteger | BList [BValue] | BDictionary (M.Map BString BValue) but: Not in scope: type constructor or class `BString' The implementations I've found just implemented BDictionary's map key as String, but I think that's kind of wrong. The problem is that BString is not a type, it is a data constructor. You could use M.Map BValue BValue, but of course that's probably not what you want either. What's wrong with just using 'String' as the Map key? -Brent ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] self-referential data
On Sat, Aug 9, 2008 at 5:18 PM, Brent Yorgey [EMAIL PROTECTED] wrote: The problem is that BString is not a type, it is a data constructor. I know. You could use M.Map BValue BValue, but of course that's probably not what you want either. Right. That wouldn't be according to spec either. What's wrong with just using 'String' as the Map key? It seems wrong. Yeah, it's just a String, but we're being all abstract because that's better practice. It happens that when you parse bencoded data, the length of the string is given. Maybe I want to store that in BString, too. But mainly I want to know how to think about it differently so that I know what to do when it comes up again and actually matters. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] self-referential data
brian wrote: On Sat, Aug 9, 2008 at 5:18 PM, Brent Yorgey [EMAIL PROTECTED] wrote: The problem is that BString is not a type, it is a data constructor. I know. You could use M.Map BValue BValue, but of course that's probably not what you want either. Right. That wouldn't be according to spec either. What's wrong with just using 'String' as the Map key? It seems wrong. Yeah, it's just a String, but we're being all abstract because that's better practice. It happens that when you parse bencoded data, the length of the string is given. Maybe I want to store that in BString, too. But mainly I want to know how to think about it differently so that I know what to do when it comes up again and actually matters. What about using a type parameter: data BValue bString = BString bString | BIntegerInteger | BList [BValue bString] | BDictionary (Map bString (BValue bString)) Regards, Maciej ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Future of Darcs: Thanks for the poll responses and increase in contributors
Hello, I just wanted to thank everyone that has shown their support for darcs recently by either stopping by #darcs on freenode or joining in discussions on the darcs-user mailing list. I'm cross posting to haskell-cafe because I suspect many of you came from there. There has been a lot of enthusiasm from people, a lot of discussion about patch theory and excitement about fixing bugs and performance issues. Several people have taken an interest in making darcs work flawlessly on the GHC repository (yes, I know they have already commited to switching, but it gives a great test case to improve on). Eric Kow and myself have been working on a roadmap for future darcs improvements, and we plan to annouce an official version soon. The tentative one can be found here: http://wiki.darcs.net/DarcsWiki/Roadmap Mainly I just wanted to say, Thanks! We're considering the feedback we received from the poll and the future of darcs is not uncertain and we'll do a better job of communicating that message in the future. Now, back to hacking on darcs! Thanks, Jason ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] self-referential data
brian wrote: From https://secure.wikimedia.org/wikipedia/en/wiki/Bencoding , I think I should code data BValue = BString String | BIntegerInteger | BList [BValue] | BDictionary (M.Map BString BValue) but: Not in scope: type constructor or class `BString' The implementations I've found just implemented BDictionary's map key as String, but I think that's kind of wrong. Data Types a la Carte[1] seems like a good fit: newtype BString e = BString String newtype BIntegere = BIntegerInteger newtype BList e = BList [Bvalue] newtype BDictionary e = BDictionary (M.Map (BString e) BValue) newtype Y f = Y { unY :: f (Y f) } data(f :+: g) e = Inl (f e) | Inr (g e) type BValue = Y (BString :+: BInteger :+: BList :+: BDictionary ) ...with the necessary Functor instances. Or, since BString is the only member of the coproduct that needs special treatment, you could squash things a bit more: newtype BString e = BString String dataBValue_ e = BIntegerInteger | BList [Bvalue] | BDictionary (M.Map (BString e) BValue) type BValue = Y (BString :+: BValue_) The former is more homogeneous and so would probably look prettier in code, but the latter is a bit more efficient since it needs less coproduct tagging and function indirection. Of course, another approach is to just go with your first approach and doubly wrap String. So there's a newtype BString_ = BString_ String, and BValue has a constructor (BString BString_) and the dictionary uses the BString_ data type. [1] With added discussion: http://wadler.blogspot.com/2008/02/data-types-la-carte.html -- Live well, ~wren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: Tutorial on information visualization and visual analytics in Haskell
On Sat, Aug 9, 2008 at 11:30 AM, Jefferson Heard [EMAIL PROTECTED] wrote: I'll be building a site around it until then, complete with compilable code examples, but I thought I would let everyone get a sneak peek at the long version of the tutorial before I'm done with it. That's a beautiful piece of work. I'm looking forward to seeing the talk! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: Tutorial on information visualization and visual analytics in Haskell
jefferson.r.heard: This is the tutorial I'll be presenting at DEFUN 2008. I'll be building a site around it until then, complete with compilable code examples, but I thought I would let everyone get a sneak peek at the long version of the tutorial before I'm done with it. The code is as yet untested, and keep in mind, advanced Haskellers, that I'm purposefully simplifying some things to be understood by the beginner to the intermediate Haskeller. Comments and questions are welcome and encouraged. Please do ignore typos in the inline code for now, though, as I'll be spending this week testing it out and making sure everything works. The link is: http://bluheron.europa.renci.org/docs/BeautifulCode.pdf This is a beautiful piece of work, Jefferson! And maybe a nice time to mention that Jefferson will be presenting, along with some other leading lights in the community, at DEFUN, our first developer-oriented workshop at ICFP. http://www.deinprogramm.de/defun-2008/ So if the ICFP theory-heavy schedule seems a bit dry to you, consider registering for the DEFUN tutorials, and come away having built some beautiful code in Haskell. -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe