[Haskell-cafe] definitive list of editline bindings anywhere?
All -- Anyone have a definitive list of editline keybindings available? I find myself missing some of the capabilities of readline, and there doesn't seem to be documentation. -- Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The state of database libraries
On Jul 4, 2008, at 7:54 AM, Chris Eidhof wrote: 1. hdbc. I'd like to connect to MySQL, so I need the ODBC backend. I couldn't get this to work under OS X, while I installed myodbc, which seems to be broken. FWIW, I've had good luck with the SQLite3 bindings for HDBC on MacOS X. I had a bit of a hiccup with Linux, but that was only because the version of SQLite on the Linux box was a bit too old. (3.2.x versus 3.4.x on the MacOS box.) With 3.5.9 on the Linux box, everything worked swimmingly. I haven't tried the MySQL support, but I don't need it. The timestamps on the other packages were old enough (~2007 IIRC) that I didn't even try 'em. Depending on what your application is, you might get more mileage out of a binding to CouchDB or some other post-relational storage system. -- Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: HXT 7.4/7.5 leaking TCP connections
Hi, Bjorn and Uwe -- > > this is a known problem with HTTP package (version 3001.0.4). > > Paul Brown has described this somewere in his blog. > > (http://mult.ifario.us/t/haskell), but my firefox only shows > > an incomplete page of this blog, the solution is missing. > > Paul promissed in his blog to send a patch to Björn Bringert. Here's the link to the article about SimpleHTTP; for some reason, it wasn't showing up. (Guess I have a bug to fix there...) http://mult.ifario.us/p/a-short-adventure-with-simplehttp > > P.S. to Björn: It would be nice, if you could include this change into the > > HTTP module and upload a new version to hackage. > Thank you Daniel and Uwe for reporting this (again). Strangely, I > thought that I had already applied Paul's patch, but it seems I > haven't. Paul: I seem to recall us talking about this, but can't > remember the conclusion, nor find any e-mail about it. Do you remember > anything about this? I can't remember either; I'm sure that the darcs patch is lurking on one of my boxes. I'll track it down and send it your way so we can squash this one. Best. -- Paul -- [EMAIL PROTECTED] http://mult.ifario.us/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HTTP client libraries
On Thu, Mar 27, 2008 at 12:08 PM, John Goerzen <[EMAIL PROTECTED]> wrote: > * Bjorn's String-based HTTP > It eats RAM. Does not appear to read data lazily, returns a String, > and may have a memory leak as well. Does not appear to be suited > for anything except very small file downloads. Do you know why it's eating RAM? With the issue with open sockets resolved (I know, I have to send that patch to Bjorn...), I haven't had observable stability or leaking issues. I'm using it to hit JSON/XML services like Twitter, del.icio.us, Google reader, etc. Laziness here is a bit of a mixed bag, since if you're too lazy, you'll try to read the stream after it's long gone. (Principle of Least Surprise) We do need a real (HTTPS, support for encoding, possibility to be lazy) HTTP client library, and a binding for libcurl may be the short path. -- [EMAIL PROTECTED] http://mult.ifario.us/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Web server libraries
On Thu, Mar 27, 2008 at 12:26 PM, John Goerzen <[EMAIL PROTECTED]> wrote: > What I really want is some sort of simple tool that supports FastCGI > or some such, has basic support for form data input validation and > marshalling to/from Haskell types, and basic control flow. > So I've looked around a bit at the landscape. Any recommendations? Your assessment of FastCGI is on, but it's not that difficult to get the validation/unmarshalling that you want out of a little work with Read/Show, since the flow would be something like this on every pass: bag of name/value pairs -> Haskell structure -> IO (e.g., to db) -> Html The HAppS approach to laying out URL space is nice, and I whipped up something relatively ugly but quick using Parsec. -- [EMAIL PROTECTED] http://mult.ifario.us/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN / CFC: minimalistic haskell blogging web application (perpubplat)
All -- I've spent some time on cleaning up my hobby blog publishing software and setting up a darcs repository, so I'll throw it out there for criticism or suggestions: darcs get http://datapr0n.com/repos/perpubplat It's running my blog (http://mult.ifario.us). It's relatively lightweight in that it doesn't use a framework but still weighs in at <1500 LOC with comments, but it does rely on the (Thanks, Bjorn!) FastCGI and XHTML combinator libraries. I have some plans for handling comments and the like, but things I'd like to figure out: - Turn the blog data model into a monad. - An idiomatic approach to handling conditional GET and E-Tag, i.e., send a 304 response if things aren't modified. Thanks in advance. -- [EMAIL PROTECTED] http://mult.ifario.us/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Do you trust Wikipedia?
On 10/17/07, PR Stanley <[EMAIL PROTECTED]> wrote: > Do you trust mathematical materials on Wikipedia? I trust most of them to not be wrong, but I don't trust them to be right. Mathematical concepts are bit like binary search -- getting the flavor right isn't that difficult, but being concise, complete, and correct is very difficult even for experts. In non-mathematics books that I've read (econometrics, operations research, etc.), some of the bits of exposition on fundamentals (multi-var calc, stats/probability, etc.) are not wrong but not quite right. For lay purposes, wikipedia is probably fine, and any resource *that people use* that makes an effort to educate and inform on mathematical concepts deserves some thanks and support. My $0.02. -- [EMAIL PROTECTED] http://mult.ifario.us/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: help getting happy
On 9/13/07, Greg Meredith <[EMAIL PROTECTED]> wrote: > Cheers. i solved the problem before i saw your email. The Happy i got was a > result of invoking > > port install happy > > What's the drift between macports and happy versions? Is there a way of > using Happy without being on or even near the cutting edge of development? You can freely intermix bits and pieces installed via port and via traditional (e.g., runghc Setup.hs install or make install) means, provided that you have the paths set up properly. -- [EMAIL PROTECTED] http://mult.ifario.us/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell and a new web developement mailinglist?
On 3/20/07, David House <[EMAIL PROTECTED]> wrote: On 20/03/07, Marc Weber <[EMAIL PROTECTED]> wrote: > I've been talking to Chris Eidhof the last days and we'd like to suggest adding > another specialized haskell mailinglist: Haskell and web developement. I'd love to contribute here. You should be able to find an appropriate email to ask for this mailing list on the haskell.org site. Me, three. -- [EMAIL PROTECTED] http://mult.ifario.us/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: problems installing ghc 6.6 with extralibs (bad interface file)
On 2/27/07, Seth Gordon <[EMAIL PROTECTED]> wrote: Thomas Hartman wrote: > Thanks. I incorporated these changes, and it cranks longer now before > failing. But still fails, now with a seg fault. According to conventional wisdom, when gcc segfaults on a big compilation job (e.g., the Linux kernel), it could be a sign of a transient memory error; gcc exercises the RAM so much that the error rate on a typical computer's memory chips can have a practical effect. I believe that you're probably correct in this case: I was able to get ghc 6.6 + optional packages built on a linode virtual host (guessing from the original poster's prompt) but only after expanding the amount of memory available. -- Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How did you stumble on Haskell?
On 1/28/07, Alexy Khrabrov <[EMAIL PROTECTED]> wrote: How do people stumble on Haskell? I came at it from two angles: General interest in actor languages led me to Io (http://www.iolanguage.com), which used Darcs for its RCS at the time, which led me to look at the source code for it, which got me interested in Haskell. General interest in lightweight concurrency led me to STM, which is a short trip. -- Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] "Secret Santas" in Haskell / better data structure?
Cafe Crew -- I posted my simple-but-slow solution to Ruby Quiz problem #2: http://mult.ifario.us/articles/2006/12/22/secret-santas-in-haskell-iii-collect-reap-repeat (Or http://tinyurl.com/y3l2re if your mail client messes up the URL...) It's more than practically fast enough unless you have, say 10^8 friends to do secret Santa with, but the problem just cries out for a well-chosen data structure. (One obvious improvement over the approach I posted is to sort the list first, but maybe there's something even better...) As I'm learning, critiques of syntax and usage welcome. I'll collect the source and post to the Haskell Quiz wiki as well. -- Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Solitaire cipher
I brute-forced my way through a solution to the Solitaire cipher quiz challenge last night: http://mult.ifario.us/articles/2006/10/25/solitaire-cipher-in-haskell Full source is linked from the entry, or look here: http://mult.ifario.us/files/solitaire.hs I think (i.e., know) that my list-based implementation of the shuffling is somewhat inelegant, and I can imagine one that uses a monad to encapsulate the state of the deck. Nonetheless, I think I'm happy with the data structure for the deck. Comments / criticism welcome. --- Paul R Brown [EMAIL PROTECTED] http://mult.ifario.us/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] split string into n parts
I want to split a string into 5 parts of equal length, with the last fifth padded if necessary, but can't get it right - here's what I've got - > fifths :: String -> String > fifths s = fifths' "" 0 s > where l = (length s) `div` 5 [... snip ...] Any thoughts? Thanks! This isn't homework BTW, I'm having a go at the ruby quiz puzzles in haskell, which seems to be a nice way to learn. Cool idea! Can you post a link for the puzzles? As for this one, don't you want the first multiple of five larger than the length of the string? You should be able to make things simpler if you auto-pad the string from the get-go (forgive any syntax errors, as I'm just composing in a browser here...): prepad :: Integer -> String -> String prepad n s | (length s) `mod` n == 0 = s prepad n s = prepad n (s ++ ' ') And now you can be sneaky: nths :: Integer -> String -> String nths n s = [first_nth n s] ++ nths (n-1) (after_first_nth n s) nths 1 s = s Where first takes the first n chars (e.g., take ((length s) `div` n)) and after_first_nth returns the tail of the list.. -- [EMAIL PROTECTED] http://mult.ifario.us/ -- [EMAIL PROTECTED] http://mult.ifario.us/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe