Re: [Haskell-cafe] iPhone/Android and Haskell [Was: Embedded funcional programming?]

2010-04-18 Thread Don Stewart
liamoc: > On 19 April 2010 05:29, Don Stewart wrote: > > That's great info -- we do have an unregisterised ARM port of GHC in > > Debian, iirc. (And the LLVM backend can generate ARM code too) > > > Sounds good. With regards to LLVM, what dependencies does LLVM ARM > code have? Android has gnu l

[Haskell-cafe] Re: Move MonadIO to base

2010-04-18 Thread Isaac Dupree
On 04/19/10 02:15, Anders Kaseorg wrote: I would be very happy to get the simpler interface to work, because it’s Haskell 98. However, if I write joinIO m = morphIO (\w -> m>>= w) morphIO' f = joinIO (f return) and define catch using morphIO' instead of morphIO: m `catch` h = mor

[Haskell-cafe] Re: Move MonadIO to base

2010-04-18 Thread Anders Kaseorg
On Sun, 18 Apr 2010, wren ng thornton wrote: > lift ma = morph (\k -> join (fmap (k . return) ma)) Monad laws simplify that to lift ma = morph (\k -> ma >>= k . return) > The type of morph requires us to Church-encode things needlessly; what > we mean to say is: morph (fmap return ma).

Re: [Haskell-cafe] iPhone/Android and Haskell [Was: Embedded funcional programming?]

2010-04-18 Thread Liam O'Connor
Ah, looks as though we'll have to write a C layer between Java and Haskell.. doing all of this in the FFI seems like hard: http://www.koushikdutta.com/2009/01/jni-in-android-and-foreword-of-why-jni.html Cheers. ~Liam On 19 April 2010 14:33, Liam O'Connor wrote: > Also worth mentioning that t

Re: [Haskell-cafe] ANNOUNCE: Agata-0.2.0

2010-04-18 Thread Jonas Almström Duregård
> If this is to be used with QuickCheck maybe it should be named that way. Certainly worth considering. There seems to be no convenient way of renaming packages on Hackage though, is there? I suppose it would be wrong/impossible to create an alias package (quickcheck-agata) with no modules, just a

Re: [Haskell-cafe] iPhone/Android and Haskell [Was: Embedded funcional programming?]

2010-04-18 Thread Liam O'Connor
Also worth mentioning that the Android docs explicitly warn against "allocating frequently" suggesting reuse of objects is by far more preferable than regularly allocating stuff. If we go the Dalvik/Java route, then we'll have alot of work to do to make the GC work for us nicely, whereas compiling

Re: [Haskell-cafe] iPhone/Android and Haskell [Was: Embedded funcional programming?]

2010-04-18 Thread Liam O'Connor
On 19 April 2010 05:29, Don Stewart wrote: > That's great info -- we do have an unregisterised ARM port of GHC in > Debian, iirc. (And the LLVM backend can generate ARM code too) Sounds good. With regards to LLVM, what dependencies does LLVM ARM code have? Android has gnu libraries not llvm, i d

Re: [Haskell-cafe] Strange error with type classes + associated types

2010-04-18 Thread Brent Yorgey
Conal, Thanks for looking into this! Making (:-*) into a proper type seems promising. I did try wrapping (:-*) in a newtype but that didn't help (although I didn't expect it to). I see you just uploaded a new version of vector-space; what's new in 0.6.2? -Brent On Sat, Apr 17, 2010 at 10:28:4

[Haskell-cafe] Re: Embedded funcional programming?

2010-04-18 Thread Stefan Monnier
> As a side comment, I haven't noticed any reaction in the > Haskell/iPhone community about Apple's recent policy change. The stricter they make it, the better, since it hopefully gets us closer to the point where people will see that they should stay the heel away from any such handcuffs,

[Haskell-cafe] Re: US Patent for the idea of using Haskell to implement UAX #9

2010-04-18 Thread Stefan Monnier
>> revealed a link to a US Patent (7120900) for the idea of implementing >> the Unicode Bidirectional Algorithm (UAX #9 >> http://www.unicode.org/reports/tr9) in Haskell, making use, as far as I >> can tell, of nothing more than the normal approach any functional >> programmer would use, namely sep

Re: [Haskell-cafe] Re: Ocaml for Haskellers tutorial

2010-04-18 Thread Richard O'Keefe
On Apr 19, 2010, at 2:56 PM, Pierre-Etienne Meunier wrote: Then maybe you should try godi. It is the camlist's cabal, but while the authors of cabal have really done a good job, godi is still quite poorly written, and has not gained wide acceptance in the community. No, it is precisely g

Re: [Haskell-cafe] Re: US Patent for the idea ...

2010-04-18 Thread Richard O'Keefe
When it comes to patents, there is less than meets the eye. A review of Intellectual Property in New Zealand a few years ago found that the NZ Intellectual Property Office quite deliberately do not review patent applications for originality. An IP law expert I spoke to about this felt that there w

Re: [Haskell-cafe] Re: Ocaml for Haskellers tutorial

2010-04-18 Thread Pierre-Etienne Meunier
Then maybe you should try godi. It is the camlist's cabal, but while the authors of cabal have really done a good job, godi is still quite poorly written, and has not gained wide acceptance in the community. And, yes, there are cool applications written in ocaml. People claim that the best appl

Re: [Haskell-cafe] Re: Ocaml for Haskellers tutorial

2010-04-18 Thread Richard O'Keefe
There are some really impressive applications done with Ocaml, some of which I have wanted to try out. I have never had any difficulty installing the core Ocaml system, but have never yet succeeded in getting the additional libraries put together. (Home-brew package systems are not _always_ a good

[Haskell-cafe] Re: Move MonadIO to base

2010-04-18 Thread David Menendez
On Sun, Apr 18, 2010 at 5:02 PM, wren ng thornton wrote: > Heinrich Apfelmus wrote: >> >> Anders Kaseorg wrote: >>> >>> This concept can also be generalized to monad transformers: >>> >>> class MonadTrans t => MonadTransMorph t where >>>    morph :: Monad m => (forall b. (t m a -> m b) -> m b) ->

Re: GUI (was: Re: [Haskell-cafe] DLL on Windows)

2010-04-18 Thread Jeremy O'Donoghue
On 18/04/2010, Daniel Fischer wrote: > Am Sonntag 18 April 2010 21:41:06 schrieb Daniel Fischer: >> wx-config should have been installed as part of the wxWidgets package. >> Is that not included in the windows-installer of wxWidgets? > > Seems it's not so. > http://www.haskell.org/haskellwiki/WxHa

Re: [Haskell-cafe] vector recycling

2010-04-18 Thread Roman Leshchinskiy
On 18/04/2010, at 08:07, Ben wrote: > On Fri, Apr 16, 2010 at 11:19 PM, Roman Leshchinskiy > wrote: >> That said, it would be quite possible to provide something like the >> following: >> >> fold_inplace :: Vector v a => (v a -> b -> v a) -> v a -> [b] -> v a > > as far as i understand there

Re: [Haskell-cafe] hamming distance allocation

2010-04-18 Thread Daniel Fischer
Am Montag 19 April 2010 01:03:14 schrieb Arnoldo Muller: > Hello all: > > I want to generate some hamming distance statistics about a set of > strings. As explained in another e-mail in this list, I used the > following code to call the > functions: > (exampl holds the list of strings of size w) >

[Haskell-cafe] ANN: vcd-0.1.0

2010-04-18 Thread Tom Hawkins
The release adds a simple VCD parser (via Parsec) and minor changes to the VCD generation API. http://hackage.haskell.org/package/vcd ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: GUI (was: Re: [Haskell-cafe] DLL on Windows)

2010-04-18 Thread Ivan Miljenovic
On 19 April 2010 06:06, Daniel Fischer wrote: >> > If wxHaskell could be installed with one cabal command that would be >> > incredibly cool :-) > > Well, it's just one cabal command if you have all non-Haskell requirements > installed as needed. Exactly; it's unreasonable to suggest/assume that

Re: [Haskell-cafe] iPhone/Android and Haskell [Was: Embedded funcional programming?]

2010-04-18 Thread Tom Davies
On 18/04/2010, at 1:39 PM, Darrin Chandler wrote: > I recently purchased an Android phone and spent a little time looking > around to see if Haskellers were doing anything there, but no luck so > far. Has anyone here done anything with Android? Not Haskell, but FP on Android: http://www.kablambd

[Haskell-cafe] hamming distance allocation

2010-04-18 Thread Arnoldo Muller
Hello all: I want to generate some hamming distance statistics about a set of strings. As explained in another e-mail in this list, I used the following code to call the functions: (exampl holds the list of strings of size w) filter (\x -> x /= 0) $ map (uncurry hammingX) [(xs, ys) | xs <- exampl,

Re: [Haskell-cafe] Re: cabal: other-modules

2010-04-18 Thread wren ng thornton
Ivan Lazar Miljenovic wrote: Why are people suddenly using the term "morally" when they mean "why doesn't this do what I think it should"? None of its definitions seem to match what you mean: The usage on this thread seems a bit nonstandard, but I'm assuming it's based off the more general id

[Haskell-cafe] Re: Move MonadIO to base

2010-04-18 Thread wren ng thornton
This bounced because I have different emails registered for cafe@ and libraries@, so forwarding it along to the cafe. wren ng thornton wrote: wren ng thornton wrote: Heinrich Apfelmus wrote: Anders Kaseorg wrote: This concept can also be generalized to monad transformers: class MonadTrans

Re: GUI (was: Re: [Haskell-cafe] DLL on Windows)

2010-04-18 Thread Daniel Fischer
Am Sonntag 18 April 2010 21:41:06 schrieb Daniel Fischer: > wx-config should have been installed as part of the wxWidgets package. > Is that not included in the windows-installer of wxWidgets? Seems it's not so. http://www.haskell.org/haskellwiki/WxHaskell/Building says "Windows users should also

Re: GUI (was: Re: [Haskell-cafe] DLL on Windows)

2010-04-18 Thread Daniel Fischer
Am Sonntag 18 April 2010 20:59:25 schrieb Neil Mitchell: > Hi, > > I thought this thread suggested that a cabal install wx would now > work? It does, as far as I can tell. > I just tried it and got: > > ... > generated 2439 constant definitions > ok. > setup.exe: wx-config: does not exist That's

Re: [Haskell-cafe] iPhone/Android and Haskell [Was: Embedded funcional programming?]

2010-04-18 Thread Don Stewart
liamoc: > Our best bet is to compile to ARM native code and then use the NDK to > talk to the Java APIs. > Cheers. > ~Liam That's great info -- we do have an unregisterised ARM port of GHC in Debian, iirc. (And the LLVM backend can generate ARM code too) ___

Re: [Haskell-cafe] ANNOUNCE: Agata-0.2.0

2010-04-18 Thread Jonas Almström Duregård
> Wow, very cool! Thank you :) > This is so helpful I'm surprised it isn't part of > QuickCheck. Why isn't it? Maybe it will be eventually. It would introduce some package dependencies though, and as the version number hints it's not exactly mature code. 2010/4/18 Duane Johnson : > Wow, very co

Re: GUI (was: Re: [Haskell-cafe] DLL on Windows)

2010-04-18 Thread Neil Mitchell
Hi, I thought this thread suggested that a cabal install wx would now work? I just tried it and got: ... generated 2439 constant definitions ok. setup.exe: wx-config: does not exist cabal: Error: some packages failed to install: wx-0.12.1.4 depends on wxcore-0.12.1.4 which failed to install. wxco

Re: [Haskell-cafe] ANNOUNCE: Agata-0.2.0

2010-04-18 Thread Marc Weber
If this is to be used with QuickCheck maybe it should be named that way. eg quickcheck-agatath ? This way its found faster. Marc Weber ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

RE: [Haskell-cafe] GHC Api typechecking

2010-04-18 Thread Phyx
Ah, That's a shame :( I guess for now I'll just write the buffer out to disc first and switch it later on if the feature gets added. Thanks, Phyx -Original Message- From: Thomas Schilling [mailto:nomin...@googlemail.com] Sent: Sunday, April 18, 2010 18:21 To: Phyx Cc: Gwern Branwen; hask

Re: [Haskell-cafe] Re: help with Haskell programming

2010-04-18 Thread Mujtaba Boori
Thanks a lot guys you were really helpful func f1 f2 x = (f1 x) || (f2 x) is working for me On Sun, Apr 18, 2010 at 6:27 PM, Thomas Davie wrote: > To do this, you need not just fmap (composition), but also ap, or the > combined form, liftA2: > > func = liftA2 (||) > > Bob > > On 18 Apr 2010,

Re: [Haskell-cafe] Re: help with Haskell programming

2010-04-18 Thread Thomas Davie
To do this, you need not just fmap (composition), but also ap, or the combined form, liftA2: func = liftA2 (||) Bob On 18 Apr 2010, at 18:21, Keith Sheppard wrote: > Using composition can be tricky with more than one arg. I just want to > be sure you're not really looking for something like: >

Re: [Haskell-cafe] Re: help with Haskell programming

2010-04-18 Thread Sean Leather
> This is the annoying part about Haskell . I can not understand composition > . > One of the ways of understanding composition (and many other functions in Haskell) is by trying to understand its type. Here it is shown by looking at the type in the interpreter GHCi. *Main> :t (.) (.) :: (b -> c)

Re: [Haskell-cafe] Re: help with Haskell programming

2010-04-18 Thread Keith Sheppard
Using composition can be tricky with more than one arg. I just want to be sure you're not really looking for something like: > func :: (a -> Bool) -> (b -> Bool) -> (a -> b -> Bool) keeping with your given type I think you're looking for something like: > func f1 f2 x = (f1 x) || (f2 x) I'm sur

[Haskell-cafe] Re: help with Haskell programming

2010-04-18 Thread Mujtaba Boori
Thanks for helping me but I have another problem (sorry for asking) . I tried to figure it out . how about if I want to compare two kind with (&&) (||) for func :: (a -> Bool) -> (a -> Bool) -> (a -> Bool) I tried some thing like func = ((||) .) This is the annoying part about Haskell . I can

Re: [Haskell-cafe] problem with cabal on snow leopard

2010-04-18 Thread Carter Schonwald
that is good to know! thanks -carter On Sun, Apr 18, 2010 at 1:09 AM, Ivan Lazar Miljenovic < ivan.miljeno...@gmail.com> wrote: > Carter Schonwald writes: > > > the deleting .ghc/ solves that problem, but another problem i've had is > that > > when trying to build gtk2hs, I'm unable to find the

Re: [Haskell-cafe] GHC Api typechecking

2010-04-18 Thread Thomas Schilling
Looking at the code for GHC, it turns out that your use case is not supported. It is not allowed to have in-memory-only files. If you specify a buffer it will still try to find the module file on the disk, but it will (or at least should) use the contents from the specified string buffer. I've b

Re: [Haskell-cafe] Re: US Patent for the idea ...

2010-04-18 Thread Steve Schafer
On Sat, 17 Apr 2010 23:33:48 +0100, you wrote: >I think in all fairness to examiners that in a way they have an >impossible job due to the fact that what is a clever idea to one >programmer will be a trivial idea to another: the field is so huge and >people have such different experiences. In

Re: [Haskell-cafe] help with Haskell programming

2010-04-18 Thread Keith Sheppard
Hello Mujtaba, I wonder is this homework? If that's the case there is nothing wrong with asking homework related questions but they should probably be marked as such. I think the most straight forward solution will use function composition (.) and the (not) function -keith On Sun, Apr 18, 2010

Re: [Haskell-cafe] help with Haskell programming

2010-04-18 Thread Thomas Davie
I'm not certain exactly what you mean, but I *think* you mean: func :: (a -> Bool) -> (a -> Bool) func = (not .) Bob On 18 Apr 2010, at 16:35, Mujtaba Boori wrote: > Hello I am kinda newbie in Haskell you can help help me with some programming > > I am trying to make function like for example

[Haskell-cafe] help with Haskell programming

2010-04-18 Thread Mujtaba Boori
Hello I am kinda newbie in Haskell you can help help me with some programming I am trying to make function like for example func :: (a -> Bool) -> (a -> Bool) this function make calculation and return bool . I want to be able to make bool True when It is False and False when it is True while re

Re: [Haskell-cafe] Functional Dependencies conflicts

2010-04-18 Thread Casey McCann
On Sun, Apr 18, 2010 at 5:01 AM, Limestraël wrote: > There must be some kind of a private joke I don't get... > > BTW, all you've said is pretty scaring... And somewhat exaggerated, of course. Reasonable uses exist for all three extensions, but they're firmly in the category of "avoid unless you

Re: [Haskell-cafe] Functional Dependencies conflicts

2010-04-18 Thread Sebastian Fischer
On Apr 18, 2010, at 11:01 AM, Limestraël wrote: It's strange I can't declare a generic instance for Binary types... I thought I was trying to do something quite common in Haskell. A common workaround is to define a newtype like this newtype GenericBinary a = GB { fromGB :: a } and an i

Re: [Haskell-cafe] Confusions about the Haskell Platform (for Mac)

2010-04-18 Thread Ivan Lazar Miljenovic
Sean Leather writes: > Personally, I prefer to separate the name of the language from the name of > the development tools, because I think that causes unnecessary confusion. > End-users do not need to care about Haskell, unlike Java since they need the > JRE, so potential developers and students a

Re: [Haskell-cafe] Confusions about the Haskell Platform (for Mac)

2010-04-18 Thread Sean Leather
On Sun, Apr 18, 2010 at 01:46, Don Stewart wrote: > leather: > > > > 2. What is the difference between "Haskell" and the "Haskell Platform"? I > see > > one or the other in various places. To get from www.haskell.org to > downloading > > the Mac software, I go through "Download Haskell," "Get the

Re: [Haskell-cafe] Embedded funcional programming?

2010-04-18 Thread Malcolm Wallace
I'm new to this, so the only problems I see are finding a compiler that targets the platform (ARM7, for instance, or others) and uploading the compiled firmware to the device. You might find that the extra RAM requirements for a non-C language becomes a problem - especially when it manifestly t

RE: [Haskell-cafe] GHC Api typechecking

2010-04-18 Thread Phyx
Hi, I checked out how Hint is doing it, but unfortunately they're calling a function in the GHC api's interactive part to typecheck a single statement, much like :t in ghci, So I can't use it to typecheck whole modules. I've tried working around not being able to construct a TargetId but ran int

Re: [Haskell-cafe] Embedded funcional programming?

2010-04-18 Thread Patai Gergely
Hello, > I'm new to this, so the only problems I see are finding a compiler > that targets the platform (ARM7, for instance, or others) and > uploading the compiled firmware to the device. I used Hume [1] to program Mindstorms NXT robots (ARM7) as well as Tmote Sky sensors (MSP430). In both cases

Re: [Haskell-cafe] GHC, odd concurrency space leak

2010-04-18 Thread Bertram Felgenhauer
Bulat Ziganshin wrote: > > This expands as > > > always a = a >> always a > > = a >> a >> always a > > = a >> a >> a >> always a > > ... > > where each >> application is represented by a newly allocated object > > (or several, I have not looked at it in de

Re: [Haskell-cafe] Functional Dependencies conflicts

2010-04-18 Thread Limestraël
There must be some kind of a private joke I don't get... BTW, all you've said is pretty scaring... It's strange I can't declare a generic instance for Binary types... I thought I was trying to do something quite common in Haskell. Apparently I'm still a young padawan with many things to learn. An

Re[2]: [Haskell-cafe] GHC, odd concurrency space leak

2010-04-18 Thread Bulat Ziganshin
Hello Bertram, Sunday, April 18, 2010, 3:36:31 AM, you wrote: > This expands as > always a = a >> always a > = a >> a >> always a > = a >> a >> a >> always a > ... > where each >> application is represented by a newly allocated object > (or several, I ha