Re: [Haskell-cafe] Lifting IO actions into Applicatives

2013-10-01 Thread Oliver Charles
On 10/01/2013 07:58 AM, Michael Snoyman wrote: I'm wondering if anyone's run into this problem before, and if there's a common solution. In Yesod, we have applicative forms (based originally on formlets). These forms are instances of Applicative, but not of Monad. Let's consider a situation

Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell

2013-09-27 Thread Oliver Charles
On 09/27/2013 04:32 AM, Conal Elliott wrote: I'm polling to see whether there are will and expertise to reboot graphics and GUIs work in Haskell. I miss working on functional graphics and GUIs in Haskell, as I've been blocked for several years (eight?) due to the absence of low-level

Re: [Haskell-cafe] Readable GHC 7.6.3 docs (Bootstrapped)

2013-09-11 Thread Oliver Charles
On 09/11/2013 03:45 PM, Twan van Laarhoven wrote: Why does every section have a title=1.2.3 foo on the outer div? In Firefox this shows up as a useless tooltip when moving the mouse over the text. That's the same with the official document. I think it's a feature of whatever tool is used to

Re: [Haskell-cafe] Lenses: Should I declare Getters?

2013-09-10 Thread Oliver Charles
On 09/10/2013 06:31 AM, Charlie Paul wrote: I've been looking through Edward Kmett's lens library, and I'm a bit befuddled about Getters. In my own code, why would I want to have something be a Getter instead of a plain function? As far as I can see, a plain function is simpler to use, and can

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Oliver Charles
On 08/08/2013 05:05 PM, Tom Ellis wrote: On Thu, Aug 08, 2013 at 03:38:41PM +0200, Jerzy Karczmarczuk wrote: One could simply implement IO as a free monad Interesting. I wonder how. See [1] for an explanation of free monads in general You're lacking a matching definition of [1] :)

Re: [Haskell-cafe] Wrapping all fields of a data type in e.g. Maybe

2013-07-16 Thread Oliver Charles
On 07/16/2013 09:57 PM, Michael Orlitzky wrote: I have a common pattern in my command-line programs; I start out with a configuration data type, which over-simplified looks like: data Cfg = Cfg { verbose :: Bool } Now, there's usually a default configuration, default :: Cfg

Re: [Haskell-cafe] Netwire bouncing ball

2013-07-11 Thread Oliver Charles
On 07/11/2013 05:52 PM, Just wrote: On 07/10/2013 11:44 PM, Ertugrul Söylemez wrote: A very simple way to do this is to use integralLim_ instead of integral_. It allows the ball itself to handle the bouncing. A less invasive way (i.e. you can add it to your example) is to use the (--)

Re: [Haskell-cafe] ANNOUNCE: module-management-0.9.3 - clean import lists, split and merge modules

2013-07-01 Thread Oliver Charles
On 07/01/2013 08:38 PM, David Fox wrote: Should I keep posting updates in this thread? Yes please, I'm interested in following this development! That, or get yourself a blog and let us all know where to point our RSS readers. - Ollie signature.asc Description: OpenPGP digital signature

Re: [Haskell-cafe] [haskell.org Google Summer of Code] The Summer of Code is officially under way.

2013-06-18 Thread Oliver Charles
On 18 Jun 2013 15:34, Edward Kmett ekm...@gmail.com wrote: I'm looking forward to seeing what we can accomplish together this year! +1 - best of luck, students ! Ollie ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] ANN: Angel 0.4.2

2013-06-13 Thread Oliver Charles
On 13 Jun 2013 06:51, Michael Xavier mich...@michaelxavier.net wrote: I'm pleased to announce the release of Angel 0.4.2 and that I have officially taken over maintainership of this project. Thanks to Jamie Turner for starting such a great project and allowing me to take over this project. Hi

Re: [Haskell-cafe] What symbol / atom/ interned-string package is currently preferred?

2013-05-09 Thread Oliver Charles
On 05/09/2013 12:56 PM, Johannes Waldmann wrote: http://hackage.haskell.org/package/intern what does this package do? OK, I can read efficient hash consing but what does it mean exactly? and how would I actually use it? I can't tell you what it does, but there is an example -

Re: [Haskell-cafe] ANN: rematch, an library for composable assertions with human readable failure messages

2013-04-16 Thread Oliver Charles
On 04/16/2013 11:24 AM, Tom Ellis wrote: On Tue, Apr 16, 2013 at 10:17:48AM +0100, Tom Crayford wrote: I kept on running into this thing where I was calling error in quickcheck to get good error messages about the things I was comparing. In Java land, this stuff is handled by Hamcrest: a

Re: [Haskell-cafe] Monad fold

2013-04-16 Thread Oliver Charles
On 04/16/2013 01:47 PM, Lyndon Maydwell wrote: You could do: runKleisli . mconcat . map Kleisli :: Monoid (Kleisli m a b) = [a - m b] - a - m b Would that work for you? I can't find an instance for Monoid (Kleisli m a b) in `base`, so presumably the author would also have to write this

Re: [Haskell-cafe] Vector Fabrics is hiring!

2013-04-08 Thread Oliver Charles
On 04/08/2013 06:30 AM, Stefan Holdermans wrote: * Your friends and colleagues describe you as a rockstar programmer; your programming ability is way above average; Good luck hiring smart people. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Fwd: Now Accepting Applications for Mentoring Organizations for GSoC 2013

2013-03-19 Thread Oliver Charles
On 03/18/2013 08:49 PM, Johan Tibell wrote: [bcc: hask...@haskell.org mailto:hask...@haskell.org] We should make sure that we apply for Google Summer of Code this year as well. It's been very successful in the previous year, where we have gotten several projects funded every year. Definitely

Re: [Haskell-cafe] ANN: lazy-csv - the fastest and most space-efficient parser for CSV

2013-02-25 Thread Oliver Charles
On 02/25/2013 10:47 AM, Malcolm Wallace wrote: There are lots of Haskell CSV parsers out there. Most have poor error-reporting, and do not scale to large inputs. I am pleased to announce an industrial-strength library that is robust, fast, space-efficient, lazy, and scales to gigantic

Re: [Haskell-cafe] JSON querying

2013-02-17 Thread Oliver Charles
On 02/17/2013 03:01 PM, Sergey Mironov wrote: Hi folks. Hackage contains several JSON packages but as far as I see, they all provide 'static' conversion from JSON format to Haskell data type. Is there a method of converting object containing optional filed 'a' to for example Maybe a. Assuming

[Haskell-cafe] Optimizing performance problems with Aeson rendering large Text arrays

2013-02-01 Thread Oliver Charles
Hello, In summary, i'm working on an application that responds to a users query, a sequence index, with the union of a list of UUIDs that have changed since that same sequence index, split into 6 sections. I wish to respond to these queries via JSON to provide an easy to use web service, and

Re: [Haskell-cafe] Optimizing performance problems with Aeson rendering large Text arrays

2013-02-01 Thread Oliver Charles
Urgh, the formatting got totally destroyed in sending, I think. If so, here's a paste of my email as I intended it to be sent: http://hpaste.org/81648 Sorry about that! - Ocharles ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Optimizing performance problems with Aeson rendering large Text arrays

2013-02-01 Thread Oliver Charles
On 02/01/2013 01:44 PM, Bas van Dijk wrote: If I make a special case for text based UUIDs in aeson: data Value = ... | UUID Text | ... Data.Aeson.Encode.fromValue (UUID s) = singleton '' fromText s singleton '' Then encoding time improves by 20%. So a big part of the time is spent

[Haskell-cafe] Looking for advice on modelling a 3-way merge (with varying strategies)

2012-10-31 Thread Oliver Charles
Hello, I'm currently trying to implement a way 3 way merge, that is dispatched on type. Essentially, I want to be able to say I have this large data type which is a product of various other types - here's how to merge it. By 3 way merge, I mean that I have a 'new' value, a 'current' value and a

[Haskell-cafe] Is it possible to create an instance of MonadBaseControl for PropertyM (QuickCheck)/continuations?

2012-01-14 Thread Oliver Charles
Hi I'm working on a little experiment at the moment: using monadic QuickCheck to test the integration of my code and the database. I see some of my functions having properties like - given a database in this state, selectAll should return all rows, and so on. My initial attempt has worked nicely,

Re: [Haskell-cafe] Idiomatic Aeson

2011-12-19 Thread Oliver Charles
Hi, I'm not sure it directly helps, but I had a bit of trouble getting off the ground with Aeson too. Here's some of my code using Aeson, maybe there will be something in here that helps you? https://github.com/ocharles/BookBrainz/blob/master/src/BookBrainz/Search.hs - Ollie

Re: [Haskell-cafe] indentation blues

2011-12-14 Thread Oliver Charles
Paul Koerbitz paul.koerb...@gmail.com writes: Hello, TL;DR: If you have some time try emacs, the viper / vimpulse plugins are pretty good and the editor is awesome in general. Haskell indentation is good. Not to go too off topic, but I'm not sure people are aware there's another Vim

[Haskell-cafe] Using QuickCheck to test against a database

2011-12-01 Thread Oliver Charles
Hi! I've just spent my evening trying to use QuickCheck properties to test the database accessing functions in a project I'm working on at the moment. I've got some stuff that's working, and I wanted to see what the cafe thought about it, and if anyone had any suggestions or critiscm that can

[Haskell-cafe] Please review my Xapian foreign function interface

2011-02-18 Thread Oliver Charles
everything being in the IO monad, but as I said - Haskell is new to me. All of my work is at [3], and I'd love any advice you have. Haddock documents have been exported to ocharles.org.uk [4]. Thanks for your time, Oliver Charles / ocharles -- [1]: http://xapian.org/docs/apidoc/html