"Frege is thought as a substitute for this missing GHC port. While not derived from any existing Haskell implementation, it is more or less equivalent to Haskell 2010. Please see the wiki page that details the differences." So now Haskell can produce native executable code, run in a JVM and as subset of it ( https://github.com/faylang/fay/wiki ) run in the browser. Now there is no excuse for me to NOT using Haskell ;…
If you look at the differences page, it is equivalent in power, but does not have the same expression. Pragmas now sorta start with @, and type classes are (in my opinion) kinda funky coming from Haskell.
Frege: A JVM pure functional programming language in the spirit of Haskell
51–60 of 112 posts
Re: Frege: A JVM pure functional programming language in the spirit of Haskell
#52Earlier quoted context omitted.
If you look at the differences page, it is equivalent in power, but does not have the same expression. Pragmas now sorta start with @, and type classes are (in my opinion) kinda funky coming from Haskell.
Another difference not mentioned is given the use of recursion in Haskell and the JVM's lack of tail-call optimisation, I have to wonder how dangerous this is. I know Clojure has recur (I'm not a Clojure programmer) but unless Frege has something similar, I predict many an exploding stack.
Re: Frege: A JVM pure functional programming language in the spirit of Haskell
#53Cute name. I wonder to what extent the language has anything to do with Frege's work in logic. I mean Haskell's last name was Curry, and currying is a big deal in FP. Thankfully that wasn't named after Moses Schoenfinkel.
That said, I always felt that "Finkel" would be a cute name for an FP language, service or library... I call dibs!
Disclaimer: I had the privilege of meeting Dr. Finkel here at university a few times before I stumbled across his name in Wikipedia and in the front of a book in the library. Totally not biased.
Re: Frege: A JVM pure functional programming language in the spirit of Haskell
#54Earlier quoted context omitted.
> And building Twitter [1], Web server. > and big-data next-generation databases [2] Daemon. > and android apps No, Android doesn't have a JVM. > and desktop apps If you say so, I see very few of these in production. > and big data Daemon. > Why do you feel that the JVM is limited in its applications as a development platform? You can't write cli applications in a JVM language because the start-up time is too slow. W…
> You can't write cli applications in a JVM language because the start-up time is too slow. Which means you can't compose scripts that call Java apps. You're right. In the case of small, fast applications designed to be called as part of shell scripts, the JVM does suffer start-up costs. Some testing on my personal machine shows the JVM to be 2x to 8x slower than a comparable Ruby or Python script in startup time. [1…
When you embrace this philosophy it doesn't particularly matter how good a language's ecosystem is, you have all of unix to interop with. For example, I don't care if a language has a good JSON parsing because jq[1] exists and is probably faster and easier to work with than just about any language's built in tools, even better than JavaScript itself.
With JVM you can't participate in writing software this way. Everything must revolve around the JVM and it's ecosystem.
Re: Frege: A JVM pure functional programming language in the spirit of Haskell
#55It's interesting to compare this to CAL - an earlier Haskell-like language on the JVM that was a project of some of my former colleagues at Crystal Decisions/Business Objects back in the 00's: http://openquark.org/Welcome.html I've worked quite a bit with CAL over the years and it has been used for some serious work. One of my big frustrations with it though has been the clunkiness of the Java interop, especially sin…
Indeed. Do you have some CAL installation somewhere to make a comparison? (The links I find are all broken.)
Re: Frege: A JVM pure functional programming language in the spirit of Haskell
#56Earlier quoted context omitted.
Your comment would be more useful if you elaborated on these claims.
The section on forkIO vs forkOS is interesting because the author does not mention implementing green threads atop the JVM. It would be feasible for Frege and its core libraries to use an implementation of "green threads" based on Promises or CPS under the covers in order to implement a concurrency model indistinguishable from Haskell's. While it is true that the vast majority of JVM code you interact with is blockin…
This is not quite true (I am the author). Yet I know my limits. Every contribution from the community is welcome, OTOH.
The point of the blog posts was only to explore how far one can get with what Java has.
Re: Frege: A JVM pure functional programming language in the spirit of Haskell
#57Cute name. I wonder to what extent the language has anything to do with Frege's work in logic. I mean Haskell's last name was Curry, and currying is a big deal in FP. Thankfully that wasn't named after Moses Schoenfinkel.
In other words: higher order functions.
Re: Frege: A JVM pure functional programming language in the spirit of Haskell
#58It's interesting to compare this to CAL - an earlier Haskell-like language on the JVM that was a project of some of my former colleagues at Crystal Decisions/Business Objects back in the 00's: http://openquark.org/Welcome.html I've worked quite a bit with CAL over the years and it has been used for some serious work. One of my big frustrations with it though has been the clunkiness of the Java interop, especially sin…
> Would be interesting to see how this performs relative to CAL, in terms of both speed and space. Indeed. Do you have some CAL installation somewhere to make a comparison? (The links I find are all broken.)
Re: Frege: A JVM pure functional programming language in the spirit of Haskell
#59Re: Frege: A JVM pure functional programming language in the spirit of Haskell
#60I loved Haskell the language. What I don't is third party libraries are usually directly or indirectly (through a dependency) tied to an OS. I've heard, even on irc's #haskell, that it's hard to reuse code unless you're on linux. Coming from Java, this is a deal breaker for me.
Then I tried Clojure. I liked it, but I found it very challenging to refactor and mentally debug my code. I missed all the benefits of static typing. core.typed seemed like an answer, but when you compare it to other languages it seems to triple the verbosity which is a real turn off.
JavaScript (via CoffeeScript) is a pretty good middle ground, but immutable state is nearly impossible. If I get lazy, it's so easy to go back to a OO/procedural style and I don't like that. That probably does have its benefits, but not when you're trying to learn a new programming paradigm.
I know very little about Scala, but I get a terrible impression from it. Where Clojure is about simplicity, Scala seems to be about complexity.
Since I learned Haskell, I wished there was a way I could use it and have it "just work" when I decide to use a library. Frege may be the answer. I've heard of it a long time ago. My concern is that I'd be 1 of 3 people who'd be using it. But nothing's perfect.