Re: [Haskell-cafe] Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language ...

2012-11-20 Thread Ilya Portnov
Hi all. JP Moresmau писал 20.11.2012 13:01: You may want to have a look at my little HJVM project on Github ( https://github.com/JPMoresmau/HJVM). Promise, I'll put in on Hackage some day. Basically it provides FFI wrappers and some c code to be able to start a JVM and call Java methods, etc

[Haskell-cafe] Compilers: Why do we need a core language?

2012-11-20 Thread citb
Hello, I know nothing about compilers and interpreters. I checked several books, but none of them explained why we have to translate a high-level language into a small (core) language. Is it impossible (very hard) to directly translate high-level language into machine code?

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-20 Thread José Lopes
Hey, Here are some interesting links you that might help answer your question. http://www.aosabook.org/en/ghc.html http://www.youtube.com/watch?v=7NPBrWDzO2A Regards, José On 11/20/2012 12:54 PM, c...@lavabit.com wrote: Hello, I know nothing about compilers and interpreters. I checked

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Andres Löh
Hi Johan. I haven't looked in detail at the overall problem, but: Flags chosen: base3=True, base4=True Why is Cabal setting both base3 and base4 to True? This looks completely fine to me. The Cabal .cabal file is stating: if flag(base4) { build-depends: base = 4 } else { build-depends:

Re: [Haskell-cafe] code length in Haskell, a comparison

2012-11-20 Thread Gregory Guthrie
They also have other comparisons at the referenced site, including for different sizes of programs, and for counting characters or tokens instead of lines over each of these program example groups. The data source does include APL REBOL ( 483 different languages!), so one could run this

Re: [Haskell-cafe] code length in Haskell, a comparison

2012-11-20 Thread Feng, Boqun
Why C++ appears twice in the Overall rank? 2012/11/20 Gregory Guthrie guth...@mum.edu There is some interesting data in the article at: Code Length Measured in 14 Languages http://blog.wolfram.com/2012/11/14/code-length-measured-in-14-languages/ basically comparing program lengths in

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Gregory Guthrie
Thanks to all for the comparisons between apt cabal. Your reply basically explains why it is broken, and gives a rationale (cost and trouble to do it), but no prognosis for repair. My interest is in using Haskell for teaching, and so far the package system failures often present problems that

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-20 Thread AUGER Cédric
Le Tue, 20 Nov 2012 06:54:25 -0500 (EST), c...@lavabit.com a écrit : Hello, I know nothing about compilers and interpreters. I checked several books, but none of them explained why we have to translate a high-level language into a small (core) language. Is it impossible (very hard) to

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Alexander Solla
Thanks to all for the comparisons between apt cabal. Your reply basically explains why it is broken, and gives a rationale (cost and trouble to do it), but no prognosis for repair. It's an open problem. I make do with disposable sand-boxes, using cabal-dev to build them. In this way, I can

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-20 Thread citb
What would be the point in doing so? Well, I don't know. Would it save some time? Why bother with a core language? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-20 Thread AUGER Cédric
Le Tue, 20 Nov 2012 10:49:01 -0500 (EST), c...@lavabit.com a écrit : What would be the point in doing so? Well, I don't know. Would it save some time? Why bother with a core language? The compilation process might be slightly faster, but I guess it wouldn't be much noticeable. Also I

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-20 Thread Joachim Breitner
Hi, Am Dienstag, den 20.11.2012, 06:54 -0500 schrieb c...@lavabit.com: I know nothing about compilers and interpreters. I checked several books, but none of them explained why we have to translate a high-level language into a small (core) language. Is it impossible (very hard) to directly

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Albert Y. C. Lai
On 12-11-20 08:48 AM, Gregory Guthrie wrote: It was also interesting to note a comment that most developers don't have access to a Windows machine for testing. With Windows at 90% of the computing market (Linux = 1.6%), this seems like a problem which might limit growth of Haskell usage.

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-20 Thread Brandon Allbery
On Tue, Nov 20, 2012 at 6:54 AM, c...@lavabit.com wrote: I know nothing about compilers and interpreters. I checked several books, but none of them explained why we have to translate a high-level language into a small (core) language. Is it impossible (very hard) to directly translate

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-20 Thread Kim-Ee Yeoh
Is it impossible (very hard) to directly translate high-level language into machine code? There's a context to your question I don't understand, so let me ask: Wouldn't it be easier to break a big step into smaller baby steps? And if it's indeed easier why wouldn't you choose that route? --

Re: [Haskell-cafe] Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language ...

2012-11-20 Thread Stephen Tetley
There has been, as Antony Courtney was using Java2D for vector graphics called from Haskell in his Haven system. The FFI was GCJNI (Green Card JNI) - I'm not sure where it exists now or how much it has bit rotted. On 20 November 2012 05:36, KC kc1...@gmail.com wrote: Instead of Haskell running

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-20 Thread Albert Y. C. Lai
On 12-11-20 06:54 AM, c...@lavabit.com wrote: I know nothing about compilers and interpreters. I checked several books, but none of them explained why we have to translate a high-level language into a small (core) language. Is it impossible (very hard) to directly translate high-level language

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-20 Thread Sturdy, Ian
* It can also be easier to apply high level optimization techniques; if you go straight from the highest level code to the lowest level, you are likely to miss optimization opportunities that are only revealed (or only sanely implementable) at intermediate levels. Not to mention that since

[Haskell-cafe] ANN: NY Haskell presents Edward Kmett on Lenses, Folds, and Traversals -- Wed., December 12

2012-11-20 Thread Gershom B
The first NY Haskell Users Group meetup was a great success -- with roughly sixty attendees and conversations that stretched far too late for a weekday night. Video and slides are available for both the Practical Data Processing and Cloud Haskell talks: Video: http://vimeo.com/53906049 Slides on

[Haskell-cafe] QuickCheck Generators

2012-11-20 Thread graham
I have data Tweet = Tweet { user :: String, text :: String, retweets :: Double } deriving (Show) data TweetSet = NoTweets | SomeTweets Tweet TweetSet TweetSet and trying to create some generators for testing, with instance Arbitrary Tweet where arbitrary = liftM3 Tweet

[Haskell-cafe] cabal install...

2012-11-20 Thread Gregory Guthrie
Hmm, Now when I tried to run Leksah, I get not only some broken packages (which I can avoid for my current project), but: command line: cannot satisfy -package-id base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917: base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917 is unusable due to missing or

Re: [Haskell-cafe] cabal install...

2012-11-20 Thread Brandon Allbery
On Tue, Nov 20, 2012 at 4:10 PM, Gregory Guthrie guth...@mum.edu wrote: Hmm, Now when I tried to run Leksah, I get not only some broken packages (which I can avoid for my current project), but: ** ** command line: cannot satisfy -package-id

Re: [Haskell-cafe] code length in Haskell, a comparison

2012-11-20 Thread Richard O'Keefe
On 20/11/2012, at 4:55 PM, Gregory Guthrie wrote: There is some interesting data in the article at: Code Length Measured in 14 Languages http://blog.wolfram.com/2012/11/14/code-length-measured-in-14-languages/ basically comparing program lengths in various languages, and some

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Gregory Guthrie
No; the first sentence says that someone else had reported that testing on Windows was hard to do because of (a perceived) lack of access to Windows by Haskell developers... The implication is that Haskell developers (only/mainly) use *nix. I commented that if true this lack of Windows testing

Re: [Haskell-cafe] Instead of Haskell running on the JVM is there a way for Haskell to call a JVM language ...

2012-11-20 Thread Bernhard Urban
On Tue, Nov 20, 2012 at 11:01 AM, Ilya Portnov port...@iportnov.ru wrote: Please take a look at http://hackage.haskell.org/package/hs-java also. It's an assembler/disassembler of Java bytecode and *.class files. Moreover, there is https://github.com/MateVM/MateVM — an (experimental) Java VM on

Re: [Haskell-cafe] cabal install...

2012-11-20 Thread Johan Tibell
On Tue, Nov 20, 2012 at 1:10 PM, Gregory Guthrie guth...@mum.edu wrote: Hmm, Now when I tried to run Leksah, I get not only some broken packages (which I can avoid for my current project), but: ** ** command line: cannot satisfy -package-id

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-20 Thread Richard O'Keefe
On 21/11/2012, at 4:49 AM, c...@lavabit.com wrote: What would be the point in doing so? Well, I don't know. Would it save some time? Why bother with a core language? For a high level language (and for this purpose, even Fortran 66 counts as high level) you really don't _want_ a direct

[Haskell-cafe] AST Rewriting

2012-11-20 Thread Steve Severance
Hi Everyone, I am trying to build a function to rewrite and AST. I have and AST which is designed to represent a computation graph. I will present a simplified version here designed to illustrate the problem. I have tried numerous ways of rewriting it including uniplate, recursion and Edward

Re: [Haskell-cafe] Hackage dependencies problem.

2012-11-20 Thread Albert Y. C. Lai
On 12-11-19 09:39 PM, Magicloud Magiclouds wrote: And, the key point is that using upgrade-dependencies with cabal-install. I am using git (current) version of cabal-install. Without that argument, things could be fine. With it, it must fail. Therefore, don't use upgrade-dependencies.

Re: [Haskell-cafe] cabal install...

2012-11-20 Thread Eric Velten de Melo
I have a dream of one day being able to install leksah without having to downgrade ghc. Right now I can't even install cabal-dev with cabal. It will break ghc if I do. 2012/11/20 Johan Tibell johan.tib...@gmail.com: On Tue, Nov 20, 2012 at 1:10 PM, Gregory Guthrie guth...@mum.edu wrote: Hmm,

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Albert Y. C. Lai
On 12-11-20 05:37 PM, Gregory Guthrie wrote: No; the first sentence says that someone else had reported that testing on Windows was hard to do because of (a perceived) lack of access to Windows by Haskell developers... The implication is that Haskell developers (only/mainly) use *nix. I

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Johan Tibell
On Tue, Nov 20, 2012 at 5:14 PM, Albert Y. C. Lai tre...@vex.net wrote: On 12-11-20 05:37 PM, Gregory Guthrie wrote: No; the first sentence says that someone else had reported that testing on Windows was hard to do because of (a perceived) lack of access to Windows by Haskell developers...

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Darren Grant
Why not? Either way, I am chiming in as a programmer of many years. Unless using osx I stick with windows to avoid half-day forays into nettling technical issues that are not related to the work I am paid to perform. I would love for Haskell to work better there. On Nov 20, 2012 5:21 PM, Johan

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Albert Y. C. Lai
On 12-11-20 08:20 PM, Johan Tibell wrote: This logic is flawed. More than 90% of computers having Windows doesn't imply that 90% of all computers in a given household runs Windows. What's the probability that your household has a Windows computer if you're a programmer that don't live with your

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Johan Tibell
On Tue, Nov 20, 2012 at 5:34 PM, Albert Y. C. Lai tre...@vex.net wrote: This counter-argument is flawed. Why limit oneself to one's own household? (Garage? Basement?) Get out more! Visit a friend. Talk to an internet cafe owner for a special deal to run one's own programs. Rent virtual machine

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Erik de Castro Lopo
Albert Y. C. Lai wrote: Clearly, since 90% of computers have Windows, it should be trivial to find one to test on, if a programmer wants to. Surely every programmer is surrounded by Windows-using family and friends? (Perhaps to the programmer's dismay, too, because the perpetual I've got a

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Erik de Castro Lopo
Albert Y. C. Lai wrote: This counter-argument is flawed. Why limit oneself to one's own household? (Garage? Basement?) Get out more! Visit a friend. If that friend is not a coder, they are unlikely to have the dev tools installed. Talk to an internet cafe owner for a special deal to run

Re: [Haskell-cafe] Cabal failures...

2012-11-20 Thread Clark Gaebel
+1 to this. The friction of finding, setting up, and using Windows isn't even comparable to just sshing into another unix box and testing something quickly. As a university student, I also find it relatively rare that I get to test on a Windows machine. My personal computer runs linux, my

[Haskell-cafe] Windows Build Boxes (was Cabal failures...)

2012-11-20 Thread Gershom Bazerman
If some person or group of people is willing to administer and maintain windows build/testing boxes for the good of the Haskell community (perhaps even just for core infrastructure and an extended set of blessed libraries), I would be willing to contribute a decent sum to the procurement of

Re: [Haskell-cafe] AST Rewriting

2012-11-20 Thread Alexander Solla
Have you read Data types a la carte? The 'syntactic' package implements the ideas, but it was a little dense for my purposes when I looked (I just wanted data types, a la carte; it focuses on manipulating ASTs defined a la carte). It might be what you need, or you can roll your own based on the

Re: [Haskell-cafe] AST Rewriting

2012-11-20 Thread Gershom Bazerman
On 11/20/12 6:21 PM, Steve Severance wrote: class (ReflectDescriptor a, Typeable a, Wire a) = ProtoBuf a data Expression a b where OpenTable :: (ProtoBuf b) = Int - Table - Expression () b OpenFile :: (ProtoBuf b) = Int - String - Expression () b WriteFile :: (Typeable a, ProtoBuf b) =