[Haskell-cafe] Re: Sequencing Operations in a Monad

2007-09-21 Thread Al Falloon
SevenThunders wrote: Well it certainly requires some thought here. As I see it, I now have two reasonable choices. Either I pull all my matrix operations back inside the IO monad and avoid the matrix action as a matrix variable paradigm (due to the loss of referential transparency) or I

[Haskell-cafe] Re: I'm stuck in my thought experiment

2007-08-21 Thread Al Falloon
Levi Stephen wrote: Al Falloon wrote: This code seems to indicate that you want to be able to extend the widget types without changing this source file. This is a good goal, but it may not be worth the extra complexity. Ideally, I'd like Widgets to be added through hs-plugins or similar

[Haskell-cafe] Re: I'm stuck in my thought experiment

2007-08-17 Thread Al Falloon
Levi Stephen wrote: Hi, Apologies for a long post that may not be totally clear. I was thinking through a problem and how the data might be represented in Haskell. I'm now stuck and frustrated. Now, I'm not even sure whether I'm on the right track (I might still be thinking too OO).

[Haskell-cafe] Re: defining last using foldr

2007-08-16 Thread Al Falloon
Kurt Hutchinson wrote: On 8/15/07, Alexteslin [EMAIL PROTECTED] wrote: I am really sorry, but i still can't define the function. The chapter the exercise is in precedes algebraic types or Maybe a types. And is seems that must being easy to define. I answered some exercises on using foldr such

[Haskell-cafe] The problem with abstraction (Was: monte carlo trouble)

2007-08-16 Thread Al Falloon
Chad Scherrer wrote: I'm starting to think the power of abstraction is a blessing and a curse. Haskell's abstraction mechanisms are so powerful that it's generally possible to come up with a way to solve a given problem elegantly and efficiently. On the other hand, if a problem isn't so well

[Haskell-cafe] Re: Pattern matching articles/explanations

2007-08-16 Thread Al Falloon
Ian Duncan wrote: Hello everyone, I've been working on improving my Haskell knowledge, and in doing so, I have read a little about as-patterns as well as some form of pattern that uses ~ that I don't really understand. I suspect there are even more lesser-known pattern matching expressions

[Haskell-cafe] Re: Polymorphic variants

2007-08-10 Thread Al Falloon
The proposal that I like the most is this one: Open Data Types and Open Functions http://lambda-the-ultimate.org/node/1453 However, it doesn't readily admit using the variants as overlapping enumerations like John suggested in a previous thread:

[Haskell-cafe] Re: Interval Arithmetics

2007-08-10 Thread Al Falloon
Mitar wrote: Hi! First, disclaimer: everything I know about interval arithmetics comes from this video: http://video.google.com/videoplay?docid=-2285617608766742834 The discussion in the implementation of the Boost Interval Arithmetic Library is also useful.

[Haskell-cafe] Re: Very freaky

2007-07-13 Thread Al Falloon
This is the best intro to category theory I have ever heard. I finally understand. Thank you. Dan Piponi wrote: I thought I'd dive in with a comment to explain why category theory is an important subject and why it often crops up in Haskell programming. The key thing is this: in many branches

[Haskell-cafe] Re: I just don't get it (data structures and OO)

2007-06-05 Thread Al Falloon
Phlex wrote: Christopher Lane Hinson wrote: Where InsidenessMap a b c represents a relationship where b's are inside a's, and b's have a state of c. Then, you need to declare a separate InsidenessMap for each possible relationship, but this ensures that you'll never put a galaxy inside a

[Haskell-cafe] Re: Hardware

2007-06-04 Thread Al Falloon
Bulat Ziganshin wrote: it seems that now we move right into this direction with GPUs I was just thinking that GPUs might make a good target for a reduction language like Haskell. They are hugely parallel, and they have the commercial momentum to keep them current. It also occurred to me that

[Haskell-cafe] Re: Implementing Mathematica

2007-05-31 Thread Al Falloon
Jon Harrop wrote: On Wednesday 30 May 2007 22:15:55 Andrew Coppin wrote: Note that (as I understand it) GHC implements Haskell's Integer type using the GMP. And for some reason or other, they want to remove this feature... Arbitrary precision integers are quite a performance burden and they

[Haskell-cafe] Has anyone looked into adding subtyping to Haskell?

2007-05-31 Thread Al Falloon
OCaml has been getting a lot of mileage from its polymorphic variants (which allow structural subtyping on sum types) especially on problems relating to AST transformations and the infamous expression problem. Has there been any work on extending Haskell's type system with structural

Re: [Haskell-cafe] Has anyone looked into adding subtyping to Haskell?

2007-05-31 Thread Al Falloon
Mark T.B. Carroll wrote: I don't know what the infamous expression problem is, nor am I familiar with polymorphic variants or structural subtyping, but have you looked at the Data.Generics.* stuff and Scrap Your Boilerplate papers? They may be relevant. The expression problem is a new name

[Haskell-cafe] Re: Has anyone looked into adding subtyping to Haskell?

2007-05-31 Thread Al Falloon
apfelmus wrote: Al Falloon wrote: OCaml has been getting a lot of mileage from its polymorphic variants (which allow structural subtyping on sum types) especially on problems relating to AST transformations and the infamous expression problem. Has there been any work on extending Haskell's

[Haskell-cafe] Re: Has anyone looked into adding subtyping to Haskell?

2007-05-31 Thread Al Falloon
Thomas Schilling wrote: I bring this up because I have been working on a Scheme compiler in Haskell for fun, and something like polymorphic variants would be quite convinent to allow you to specify versions of the AST (input ast, after closure conversion, after CPS transform, etc.), but allow

[Haskell-cafe] Re: Has anyone looked into adding subtyping to Haskell?

2007-05-31 Thread Al Falloon
Jon Harrop wrote: On Thursday 31 May 2007 15:36:13 Al Falloon wrote: I bring this up because I have been working on a Scheme compiler in Haskell for fun, and something like polymorphic variants would be quite convinent to allow you to specify versions of the AST (input ast, after closure

[Haskell-cafe] Re: Has anyone looked into adding subtyping to Haskell?

2007-05-31 Thread Al Falloon
Stefan Holdermans wrote: Al, Has there been any work on extending Haskell's type system with structural subtyping? Koji Kagawaga. Polymorphic variants in Haskell. In Andres Loeh, editor, Proceedings of the 2006 ACM SIGPLAN Workshop on Haskell, Portland, Oregon, USA, September 17, 2006,

[Haskell-cafe] Re: Parsec beginners problem

2007-04-27 Thread Al Falloon
Jim Burton wrote: After posting I realised the difference between parsing (a) | (b) and parsing a | aa ... so Parsec doesn't do the latter well or at all? It should do (try aa) | a just fine. If you mean a general sequence of as then (many1 (char a)) should do. The Morse Code problem is a

[Haskell-cafe] Re: fftw bindings

2007-04-19 Thread Al Falloon
Magnus Therning wrote: On Thu, Apr 19, 2007 at 09:20:36 -0700, David Roundy wrote: On Thu, Apr 19, 2007 at 05:37:05PM +0200, Fawzi Mohamed wrote: I was wondering if someone had fftw bindings for haskell, or if I should roll my own. Not that I'm aware of, but if you roll your own, please make

[Haskell-cafe] Re: Takusen - error handling and DBM monad

2007-02-01 Thread Al Falloon
Bayley, Alistair wrote: Al Falloon wrote: what does withSession return if there is a DBException? Well, whatever the handler returns, same as with any other exception handler. Note that this must have the same type as whatever withSession returns, and this constraint is enforced by the type

[Haskell-cafe] Re: Boost equivalent

2007-02-01 Thread Al Falloon
Boost.Python is for extending Python with C++, or embedding Python in C++. This is especially useful because it allows you to use Python as an extension language for a C++ program. Presumably Boost.Haskell would be for integrating Haskell code with C++, which would of course be useful, but

[Haskell-cafe] Re: State of OOP in Haskell

2007-01-31 Thread Al Falloon
Bulat Ziganshin wrote: Hello Al, Tuesday, January 30, 2007, 6:01:16 PM, you wrote: Design of functional programs is very bottom-up. The general plan is to identify the primitives for your domain and embed them in the language, oh, really? may be i'm using Haskell in OOP way? :) i strongly

[Haskell-cafe] Re: Takusen - error handling and DBM monad

2007-01-31 Thread Al Falloon
Paul Moore wrote: Now, I can protect my query with something like main = do withSession (connect ... ... ...) ( do catchDB (do -- simple query, returning reversed list of rows. r - doQuery (sql select username from all_users) query1Iteratee [] liftIO $ putStrLn $ show r

[Haskell-cafe] Re: State of OOP in Haskell

2007-01-30 Thread Al Falloon
Alexy Khrabrov wrote: Well, I'm thinking in terms of OOD/OOA/OOP -- Design, Architecture, Programming. That's about the only way to model a bog system. Say I have a stock market model -- I'll have a database of tickers, a simulator to backtest things, a trading strategy, etc. Do Haskell

[Haskell-cafe] Re: proposal: HaBench, a Haskell Benchmark Suite

2007-01-26 Thread Al Falloon
Kenneth Hoste wrote: The idea is to gather a bunch of programs written in Haskell, and which are representative for the Haskell community (i.e. apps, libraries, ...). A While ago I tried to write a Haskell version of John Harrops ray-tracer benchmark

[Haskell-cafe] Re: proposal: HaBench, a Haskell Benchmark Suite

2007-01-26 Thread Al Falloon
David Roundy wrote: On Fri, Jan 26, 2007 at 10:17:28AM -0500, Al Falloon wrote: Kenneth Hoste wrote: The idea is to gather a bunch of programs written in Haskell, and which are representative for the Haskell community (i.e. apps, libraries, ...). A While ago I tried to write a Haskell version

[Haskell-cafe] Re: A function for Maybes

2007-01-25 Thread Al Falloon
John Ky wrote: Is there a built-in function that already does this? Usually, when I have a question like this, I try Hoogle first: http://www.haskell.org/hoogle/?q=%28a+-%3E+b%29+-%3E+Maybe+a+-%3E+Maybe+b Unfortunatly, the right answer (fmap) is on the second page of results. (I am really