Live data from Hacker News

Frege: A JVM pure functional programming language in the spirit of Haskell

github.com

61–70 of 112 posts

Re: Frege: A JVM pure functional programming language in the spirit of Haskell

#61

Earlier quoted context omitted.

> 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.)

Unfortunately it looks like you would have to build from source. The best place for that would be Rich Webster's fork - https://github.com/rdwebster/Open-Quark - which is the version maintained by Indicee.

In the "How to build..." document it says I need Eclipse exactly 3.3.0

I am not going to install this, even if I would find it somewhere, hence ....

Re: Frege: A JVM pure functional programming language in the spirit of Haskell

#62
post #60

As a programmer who's getting annoyed and tired of Java's boilerplate, I welcome this. I went from Haskell to Clojure to JavaScript. I 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…

I'm confused as to how javascript is a good middle ground. What does it give you that Clojure doesn't? You do mention the fact that it encourages imperative code and loses immutability. How does it improve refactoring or debugging?

Re: Frege: A JVM pure functional programming language in the spirit of Haskell

#63
post #41

Earlier quoted context omitted.

Not technically, but practically speaking, you compile to JVM code & then it gets translated. This makes targeting the JVM & Android trivial.

It's not trivial, this is why there are no JVM languages that really run well on Android.

What do you mean by that?

I would say compiled Scala runs well on the Dalvik VM.

All languages that do not need to generate (or load) class files at runtime should work well on Android. And that is because Dalvik does not run class files.

Re: Frege: A JVM pure functional programming language in the spirit of Haskell

#64
post #26

Earlier quoted context omitted.

> A language that has a choice of runtimes from a choice of vendors like Java? That is like saying that we should developer Windows apps because you can always deploy using wine on other systems.

I'm not sure what you're saying. If you're calling into question the portability of Java, then I can run the same bytecode on Windows, Mac, Linux, the browser (in theory) and, with a little transpiling, my Android. If you're saying that that priority of decision drivers is backward, then I disagree: If you want to develop a Windows app you start by saying "I want to develop something on Windows because my clients/cus…

I believe he's trying to criticize Java for being owned by Oracle. The implication appears to be that alternative implementations are just compatibility layers for Oracle's technology like WINE is for Windows.

(For the record, I don't particularly agree with this. It seems like you could level the same criticism at nearly any language that has one person or stable group controlling it — for example, you could just as validly call Rubinius "WINE for Ruby".)

Re: Frege: A JVM pure functional programming language in the spirit of Haskell

#65
post #60

As a programmer who's getting annoyed and tired of Java's boilerplate, I welcome this. I went from Haskell to Clojure to JavaScript. I 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…

> My concern is that I'd be 1 of 3 people who'd be using it.

This concern is probably well founded. :)

And yet. Remember, you get Java source code from the Frege compiler, and once you pack up your JAR with Proguard, say, nobody will be able to tell you didn't write it in Java. (Well, slightly exaggerated, but you could have used some obscure library, who knows?)

So, if you have a small project, or some Haskell project without too many GHC extensions you want for some reason on the JVM, give it a try.

Re: Frege: A JVM pure functional programming language in the spirit of Haskell

#66
post #63
post #41

Earlier quoted context omitted.

It's not trivial, this is why there are no JVM languages that really run well on Android.

What do you mean by that? I would say compiled Scala runs well on the Dalvik VM. All languages that do not need to generate (or load) class files at runtime should work well on Android. And that is because Dalvik does not run class files.

So then why don't we see more non-Java Android apps in the wild? We can only go off of open source apps, I've looked at quite a bit of those and have ran across only a couple that don't use Java.

Re: Frege: A JVM pure functional programming language in the spirit of Haskell

#67
I really wish this was strict.

I feel like most regular programmers could understand and benefit from using ML (or some similar language).

In Haskell, laziness kept the language pure while it was developing but now I'm not sure it should be the default. I like OCaml style opt in laziness.

For most people, they could get a lot of pretty vanilla typed functional programming language. Polymorphic type inference, algebraic data-types, pattern matching. That gets you really far.

Re: Frege: A JVM pure functional programming language in the spirit of Haskell

#68
post #13

Looks really cool! Oh, it runs on the JVM. Hm, too bad.

If you don't need the JVM, you don't need Frege either, because there is Haskell.

The whole point of the Frege project is to make up (insofar this is possible for a single person who is not SPJ) for the missing Haskell-JVM port.

Re: Frege: A JVM pure functional programming language in the spirit of Haskell

#69
post #62
post #60

As a programmer who's getting annoyed and tired of Java's boilerplate, I welcome this. I went from Haskell to Clojure to JavaScript. I 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…

I'm confused as to how javascript is a good middle ground. What does it give you that Clojure doesn't? You do mention the fact that it encourages imperative code and loses immutability. How does it improve refactoring or debugging?

That's a fair question and I don't understand it myself. Perhaps it's because the Firefox/Chrome dev tools are so useful. Perhaps its because I understand what the errors are trying to tell me. In JS I usually have a good mental model of the data I'm dealing with. I didn't have that with Clojure. I didn't have it in Haskell either, but the Haskell compiler would immediately get in my face about it until I fixed it.

Re: Frege: A JVM pure functional programming language in the spirit of Haskell

#70
post #38
post #24

Earlier quoted context omitted.

A runtime that can be used for a wide-variety of types of applications. JVM can really only be used for writing web servers and possibly daemons.

Really? Plenty of apps run on the JVM (everything from enterprise apps to games to IDEs etc...). I'm no JVM evangelist (I use Haskell with the GHC), but this is just a false statement.

"Enterprise apps" generally means "enterprise web apps", not standalone, deployed applications.

I've never seen a AAA game written in Java. The non-deterministic GC is a dealbreaker as is the speed and space constraints of eg consoles.

The OP is generally correct: the JVM is a niche technology in a way. The Java ecosystem basically specialises in web apps and backend ESB-type stuff (shuttling data very quickly between heterogeneous applications). Of course, this is a very big, well-paying "niche" so it's not something to be afraid of.

Post reply on HN