[Haskell-cafe] Compiling To C And Why Not Compiling To Java Or C#?

2006-08-05 Thread Kaveh Shahbazian
1 & 2 - Maybe this is not a proper question but I think It has a point. Why Not Compiling To Java Or C#? What is the need of implementing a class interoperability between Haskell and other plateforms? Maybe we donot need that. Haskell can be the big infrastructure and code snippets in Java or C# c

Re: [Haskell-cafe] Compiling To C And Why Not Compiling To Java Or C#?

2006-08-05 Thread Kaveh Shahbazian
I do not meant to compile Haskell to MSIL/JVM. I meant to compile Haskell to the Java or C# itself! And GHC will be there for a high performance language (but still O'Caml is better by the time). But Java proves that in enterprise solution, performance is a complex factor of many thing other than

[Haskell-cafe] Re: Type hackery help needed!

2006-08-05 Thread oleg
> A value of any type should be embeddable inside a build expression > of any result type, i.e. a -> b or b -> a cannot hold on Embed in > general. It seems you might benefit from local functional dependencies, which are asserted per instance rather than for the whole class. They are explained in

[Haskell-cafe] Re: Type hackery help needed!

2006-08-05 Thread Niklas Broberg
Yes, this will surely do the trick, thanks a lot! :-) I got as far as defining a TypeEq class myself in one of my attempts, trying to trick the inference engine, but now seeing the full ingenuity of the TypeCast class I realize how far from the solution I really was. Again, thanks a million! /Ni

Re: [Haskell-cafe] Monad Imparative Usage Example

2006-08-05 Thread Brian Hulley
Kaveh Shahbazian wrote: Thanks All This is about my tries to understand monads and handling state - as you perfectly know - is one of them. I have understood a little about monads but that knowledge does not satidfy me. Again Thankyou There are many tutorials available from the wiki at http://w

Re: [Haskell-cafe] Monad Imparative Usage Example

2006-08-05 Thread Brian Hulley
Brian Hulley wrote: q >>= (\x -> p) For example with the State monad, (q) must be some expression which evaluates to something of the form S fq where fq is a function with type s -> (a,s), and similarly, (\x -> p) must have type a ->S ( s -> (a,s)). If we choose names for these values which de

Re: [Haskell-cafe] Compiling To C And Why Not Compiling To Java Or C#?

2006-08-05 Thread Piotr Kalinowski
On 05/08/06, Kaveh Shahbazian <[EMAIL PROTECTED]> wrote: But there must be a way to populize Haskell! What for? Regards, Piotr Kalinowski -- Intelligence is like a river: the deeper it is, the less noise it makes ___ Haskell-Cafe mailing list Haskel

Re: [Haskell-cafe] Monad Imparative Usage Example

2006-08-05 Thread Kaveh Shahbazian
Very Thankyou I am starting to feel it. I think about it as a 'context' that wraps some computations, which are handled by compiler environment (please make me correct if I am wrong). Now I think I need to find out how this 'monads' fit in solving problems. And for that I must go through bigger pr

Re: [Haskell-cafe] Why Not Haskell?

2006-08-05 Thread Bjorn Bringert
On Aug 4, 2006, at 11:10 PM, Bulat Ziganshin wrote: Friday, August 4, 2006, 8:17:42 PM, you wrote: 1) Haskell is too slow for practical use, but the benchmarks I found appear to contradict this. it's an advertisement :D just check yourself 2) Input and output are not good enough, in parti

Re: [Haskell-cafe] Monad Imparative Usage Example

2006-08-05 Thread Brian Hulley
Kaveh Shahbazian wrote: Very Thankyou I am starting to feel it. I think about it as a 'context' that wraps some computations, which are handled by compiler environment (please make me correct if I am wrong). Now I think I need to find out how this 'monads' fit in solving problems. And for that I

Re: [Haskell-cafe] Compiling To C And Why Not Compiling To Java Or C#?

2006-08-05 Thread Antonio Cangiano
On 8/5/06, Piotr Kalinowski wrote: On 05/08/06, Kaveh Shahbazian <[EMAIL PROTECTED]> wrote:> But there must be a way to populize Haskell!What for?Because we are humans and as such, we generally love to share our passions with other people. From a less sociological standpoint, a larger user base imp

Re[2]: [Haskell-cafe] fast image processing in haskell?

2006-08-05 Thread Bulat Ziganshin
Hello Chris, Saturday, August 5, 2006, 3:47:19 AM, you wrote: >> in Haskell before blitting the data (whilst also retaining some >> semblance of functional programming...) the best way to optimize Haskell program (with current technologies) is to rewrite it in strict & imperative manner: >> cam

Re: [Haskell-cafe] fast image processing in haskell?

2006-08-05 Thread Jeff Briggs
On 05/08/06, Chris Kuklewicz <[EMAIL PROTECTED]> wrote: I suggest trying something, using "/usr/bin/ghc -O3 -optc-O3" like this: > {-# OPTIONS_GHC -funbox-strict-fields #-} > > import Foreign > import Control.Monad > > data Cam = Cam { snap_width :: !Int >, snap_height :: !Int

Re[2]: [Haskell-cafe] Compiling To C And Why Not Compiling To Java Or C#?

2006-08-05 Thread Bulat Ziganshin
Hello Antonio, Saturday, August 5, 2006, 7:07:17 PM, you wrote: >>> But there must be a way to populize Haskell! >> What for? > On the other hand, individuals that need to belong to an elite, and > the RTFM crowd, will experience a further frustration to feed their insecure > personality. the

Re[2]: [Haskell-cafe] Compiling To C And Why Not Compiling To Java Or C#?

2006-08-05 Thread Bulat Ziganshin
Hello Kaveh, Saturday, August 5, 2006, 11:52:16 AM, you wrote: > I do not meant to compile Haskell to MSIL/JVM. I meant to compile > Haskell to the Java or C# itself! for what? btw, there is a jhc compiler (http://repetae.net/john/) that translates Haskell to ANSI C which allows to reach OCaml-l

Re[2]: [Haskell-cafe] Why Not Haskell?

2006-08-05 Thread Bulat Ziganshin
Hello Kaveh, Saturday, August 5, 2006, 10:16:06 AM, you wrote: > 1 - monads : there must be something to make a clear tool for a > none-mathematician programmer. (I still have understanding problems > with them). http://haskell.org/haskellwiki/IO_inside and "All about monads" > 2 - there must b

Re[2]: [Haskell-cafe] Why Not Haskell?

2006-08-05 Thread Bulat Ziganshin
Hello Bjorn, Saturday, August 5, 2006, 6:59:33 PM, you wrote: yes, thank you >>> 2) Input and output are not good enough, in particular for graphical >>> user interfacing and/or data base interaction. But it seems there are >>> several user interfaces and SQL and other data base interfaces for >

Re: [Haskell-cafe] Compiling To C And Why Not Compiling To Java Or C#?

2006-08-05 Thread Piotr Kalinowski
On 05/08/06, Antonio Cangiano <[EMAIL PROTECTED]> wrote: Because we are humans and as such, we generally love to share our passions with other people. From a less sociological standpoint, a larger user base implies faster development of interesting projects, more libraries, books, user groups, co

Re: [Haskell-cafe] Monad Imparative Usage Example

2006-08-05 Thread Brian Hulley
Ooops - more bugs in my explanation... Brian Hulley wrote: -- from State.hs newtype State s a = S (s -> (a,s)) I used the source given in ghc-6.4.2\libraries\monads\Monad\State.hs but the version of state monad that comes with the hierarchical libs is in ghc-6.4.2\libraries\mtl\Control\

Re: [Haskell-cafe] Compiling To C And Why Not Compiling To Java Or C#?

2006-08-05 Thread Antonio Cangiano
On 8/5/06, Piotr Kalinowski <[EMAIL PROTECTED]> wrote:> Yes, yes. I'm simply not sure if making changes only to reach more and> more people is good.These changes are good as long as they possibly add something valuable beside popularity and they don't introduce significant downsides. My point was t

Re: [Haskell-cafe] Why Not Haskell?

2006-08-05 Thread Brian Hulley
Henning Thielemann wrote: On Fri, 4 Aug 2006, Brian Hulley wrote: 4) Haskell is open source and licensing restrictions forbid commercial applications. I haven't seen any such restrictions, but is this a problem for the standard modules? You can discover the licensing situation by downloading

Re: [Haskell-cafe] fast image processing in haskell?

2006-08-05 Thread Donald Bruce Stewart
bulat.ziganshin: > Hello Chris, > > Saturday, August 5, 2006, 3:47:19 AM, you wrote: > > >> in Haskell before blitting the data (whilst also retaining some > >> semblance of functional programming...) > > the best way to optimize Haskell program (with current technologies) > is to rewrite it in

Re: [Haskell-cafe] REALLY simple STRef examples

2006-08-05 Thread Chad Scherrer
Thanks, Simon. I've begun putting together some text describing very simple STRef examples, as Bulat suggested earlier. I think I know how to make it work, but I'll still need to work on typing subtleties. I'm headed to bed now, but I'll go through this in detail when I get a chance to try to get