Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-21 Thread Sam Martin
Yes, this seems to be a separate disease.  Not just using low-level langs, per se, but using them for *everything*.  I have worked at places in industry where teams automatically use C++ for everything.  For example, they use it for building all complete GUI applications, which

Re: [Haskell-cafe] Status of Haskell + Mac + GUIs graphics

2011-05-19 Thread Sam Martin
My conclusion was that GLFW-b (on hackage) is the best we have right now. I think we could do even better than the C libraries out there by writing the GLUT/GLFW/etc implementation purely in Haskell. We already have x11 and gtk bindings for the linux support. We have win32 api bindings for

Re: [Haskell-cafe] Status of Haskell + Mac + GUIs graphics

2011-05-18 Thread Sam Martin
Is there a library that satisfies 2 of your 3 points? * Works with ghci * Supports OpenGL. I've struggled to get: * A window with opengl * Running interactively from ghci * Working cross platform Anyone know of a solution for that? If there's a library that handles that, then there's at least

RE: [Haskell-cafe] Re: Float instance of Data.Bits

2010-07-10 Thread Sam Martin
Note that the Haskell report does not require IEEE 754 binary encodings. In fact, it permits 'Float' to be a decimal floating point type. True. Although I don't really understand why? Or rather, I don't understand why it can't be at least slightly more specific and at least state that Float

[Haskell-cafe] Float instance of Data.Bits

2010-07-09 Thread Sam Martin
Hi, Is there a particular reason Float, Double, etc do not have instances of Data.Bits in the standard libraries? I note the Haskell 2010 report doesn't include them either. In fact, I'm not actually sure how you'd implement the instance for floating point types without having some kind of

RE: [Haskell-cafe] Re: Float instance of Data.Bits

2010-07-09 Thread Sam Martin
Some operations wouldn't make much sense with Float, for instance the 'complement' function. What should it return? Also note that bit manipulation functions could cover only a small window of the value range. So it could happen that x .|. y = x, even though y is nonzero. Also rotation

RE: [Haskell-cafe] [reactive] A pong and integrate

2010-05-26 Thread Sam Martin
I work in the games industry and I'm also not convinced of the Haskell+FRP path for games, but for different reasons. I am very fond of Haskell for games however, and think it is achievable. Regarding FRP, I don't think it is the right framework to base a game on. It's great for some

RE: [Haskell-cafe] Best way to instance Fix?

2010-05-24 Thread Sam Martin
- From: Reid Barton [mailto:rwbar...@math.harvard.edu] Sent: Mon 24/05/2010 02:28 To: Sam Martin Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Best way to instance Fix? On Mon, May 24, 2010 at 02:13:32AM +0100, Sam Martin wrote: Hi! I'm trying to work out the best way to generate

[Haskell-cafe] Best way to instance Fix?

2010-05-23 Thread Sam Martin
Hi! I'm trying to work out the best way to generate (ideally derive) instances for the Fix type. Here's a cut down example: data Greet x = AlloAllo x x | AuRevoir deriving Show newtype Fix f = In { out :: f (Fix f) } -- deriving Show -- DOESN'T COMPILE -- workaround instance Show (Fix Greet)

RE: [Haskell-cafe] Re: Idea for a very simple GUI llibrary

2009-11-23 Thread Sam Martin
Thinking of a parallel with Java for a second, is there a GUI library out there that's structured like Java Swing? Meaning, there is a GUI library that has a small platform-specific GUI foundation (e.g. a per platform implementation of the core AWT functionality) and the rest of the

RE: [Haskell-cafe] Cabal upload issue

2009-11-12 Thread Sam Martin
Although it might be a pain in the arse to some degree, is there any reason why 'base' is considered special? As an example, I've come across a fair number of libraries/apps that (presumably) compile against a previous version of OpenGL, but not the current latest. Given it's impossible to test

RE: [Haskell-cafe] Anglohaskell?

2009-05-26 Thread Sam Martin
I agree, I'd love to see this happen. Like everyone else, I don't have much time, but can do grunt work if there's any to be done, and will happily support anyone who does take up the mantel. Cheers, Sam -Original Message- From: haskell-cafe-boun...@haskell.org on behalf of Neil

[Haskell-cafe] de-sugared code? (branch from: fast Eucl. dist. - Haskell vs C)

2009-05-18 Thread Sam Martin
Hi Don (and cafe), Given the example you just posted, is there a simple way to generate the de-sugared haskell / core / STG / labelled-assembly versions of a piece of haskell code? For instance, how did you generate the content below? I guess this is the core language version? I'm a C/C++

[Haskell-cafe] RE: de-sugared code? (branch from: fast Eucl. dist. - Haskell vs C)

2009-05-18 Thread Sam Martin
Brilliant! Thanks. -Original Message- From: Don Stewart [mailto:d...@galois.com] Sent: Mon 18/05/2009 16:21 To: Sam Martin Cc: Kenneth Hoste; Haskell Cafe mailing list Subject: Re: de-sugared code? (branch from: fast Eucl. dist. - Haskell vs C) Yes, I use the ghc-core tool: http

RE: [Haskell-cafe] compilation to C, not via-C

2009-04-25 Thread Sam Martin
language. I want to find something to eat into the vast swath of C++ written for games that lua/python/unrealscript/homebrew scripting can't touch. Say, for instance, writing a procedural LOD generator. Cheers, Sam Martin ps. As a disclaimer - I'm emailing from my work address, but this is all

RE: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Sam Martin
Message- From: Bulat Ziganshin [mailto:bulat.zigans...@gmail.com] Sent: 24 April 2009 17:53 To: Sam Martin Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] compilation to C, not via-C Hello Sam, Friday, April 24, 2009, 8:36:50 PM, you wrote: I work in Games middleware, and am very