Re: [Haskell-cafe] Using lenses

2013-10-03 Thread Mike Ledger
Hi, In a game I made recently, I had to load OBJ formatted models into an OpenGL-friendly format. To do that, I'd parse the .obj, into a simple ADT, and build the model into a vector. Here's where lens comes in: we want to build separate vectors for the vertices, normals, UVs and faces indices.

Re: [Haskell-cafe] One-element tuple

2013-08-19 Thread Mike Ledger
It seems to me that this is Identity given a different name. A bonus of using Identity is that it won't introduce any new packages to the majority of installations. On 20/08/2013 1:17 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 20 August 2013 11:07, AntC

Re: [Haskell-cafe] Array, Vector, Bytestring

2013-06-04 Thread Mike Ledger
On 05/06/13 02:49, silvio wrote: Just to clarify for those on the sidelines, the issue is duplication of implementation details, rather than duplication of functionality? Well to me, that is not the main issue. The main issue is that you have to study all of them and depending on which

Re: [Haskell-cafe] Array, Vector, Bytestring

2013-06-04 Thread Mike Ledger
On 05/06/13 07:01, silvio wrote: array does provide folding functions, found in its Foldable and Traversable instances. Where can I find this? I can neither in the array package nor with google nor with hoogle. Silvio ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Remove redundancy with Template Haskell

2013-03-28 Thread Mike Ledger
argh, always forget to reply to all It's possible, just somewhat painful because TH /requires/ you to build an AST -- you can't just return a string representing what you want to splice in. Here's one using haskell-src-meta: {-# LANGUAGE TemplateHaskell #-} import Language.Haskell.TH import

Re: [Haskell-cafe] GHC for mobile devices?

2012-11-09 Thread Mike Ledger
I would be so very happy to be able to program Haskell Android programs. I think the steps we'd need are to 1. Port GHC to ARM (done already?) and 2. Create a JVM calling convention for GHC (using JNI? I have no idea). Short of actually making a new calling convention for the JVM, maybe we could

Re: [Haskell-cafe] How to waitForProcess?

2012-09-04 Thread Mike Ledger
You might have to use hGetContents, then waitForProcess, and then terminateProcess -- you can then check if the process is indeed terminated using getProcessExitCode. On Wed, Sep 5, 2012 at 1:45 PM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi, I have code like this and it

Re: [Haskell-cafe] Template Haskell antiquotation in user-defined quasiquoters

2012-05-25 Thread Mike Ledger
(oops, sorry, didn't do reply to all) I use haskell-src-meta in QuasiText (on hackage) also. It would certainly be nice to have native anti-quotations, but for now haskell-src-meta does a very good job. Mike On Sat, May 26, 2012 at 8:31 AM, Geoffrey Mainland mainl...@apeiron.netwrote: On