Live data from Hacker News

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

github.com

81–90 of 112 posts

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

#81
post #77
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…

It's a real shame that FFI-dependent Haskell libraries don't build out of the box on platforms other than Linux. If you really like the language, have you considered some workarounds for this problem directly? It may be a lot easier to do a workaround than to switch to a new language entirely. It sounds like multi-platform support is important to you, how do you intend to deploy your software? In many cases, you can…

I tried to get it to work, but it's really hard. Imagine you barely know the language and you barely understand how binary libraries work in linux and you're getting these errors that you've never seen before. You ask for help but it seems like you're the 2nd person on the planet who's ever experienced this issue. You read the post of the 1st guy, but for some reason his solution doesn't work for you and you don't understand why.

Most people in #haskell told me to switch to linux which seems like a ridiculous solution. I documented my struggle as another HN comment you can read here: https://news.ycombinator.com/item?id=5615683

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

#82

Earlier quoted context omitted.

> 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 proje…

Any data structures on the public API would have to be marshaled from whatever JVM language into fredge. Even sharing code between scala and java can be painful and obvious.

Not true.

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

#83

Earlier quoted context omitted.

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

I imagine the documentation is completely out of date. Anyway, if you don't want to look at it, that's your loss - while I don't think CAL has much of a future a lot of work was invested in it by a very talented team and there is probably something to be learned from it.

> Anyway, if you don't want to look at it, that's your loss

Actually, I did look into it several years back. If I remember correctly, CAL was not pure and still lazy. (An explosive combination, if you ask me.)

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

#84

Earlier quoted context omitted.

> 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 proje…

I suspect the GP is more worried about community support for the language than other people making fun of them for using it. :)

Sure, nothing can replace a big community.

OTOH, it looks like the Poster did have bad experience with Haskell community, though.

A small community is superior insofar as they are more motivated to help, and are more likely to take (critical) feedback into account.

I think it is fair to say that the Frege community (currently about 6 more or less active contributors) does its best, judging from http://stackoverflow.com/questions/tagged/frege and https://groups.google.com/forum/#!forum/frege-programming-la...

Of course, if someone demands, say, to implements GADTs or multi-param type classes by tomorrow, the answer will be gentle, but not affirmative.

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

#85
post #19

I like some of the differences where it was not constrained by Haskell's choices, like splitting up the Monad, Applicative, Functor instances, and namespacing of accessors. I also quite like the • for compose, with then some shims so that . works too if it's not being used for the namespacing.

It turned out that porting Haskell code was a nightmare when the (.) did not work yet. (You can't just replace each . with • unless you don't have any qualifed names.)

Today, it can be quite easy, in the best case you just Ctrl-C Ctrl-V

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

#86
post #29

Earlier quoted context omitted.

What would you prefer? A language that doesn't need a runtime, like C? A language that has only one available runtime, like node.js? A language that has a choice of runtimes but there are incompatibilities between them like Python or Ruby? A language that has a choice of runtimes from a choice of vendors like Java?

"A language that doesn't need a runtime, like C?" The language perhaps doesn't, but most actual programs do. I'm definitely not going to write my own standard library just because I can.

A "Runtime" and a "standard library" are different things. There are a lot of (annoying to install) libraries for C.

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

#87
As an analytic phil PhD dropout and a Haskell lover I can say with confidence that (a) Gottlob Frege (the philosopher) was awesome (I still want a 'morning star != evening star' tattoo) and (b) Frege sounds lovely too. I'd actually considered writing something similar.

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

#88
post #50

Earlier quoted context omitted.

I've been playing with it some. It's nice, but I still prefer Haskell. I want to be able to separate pure from impure code, but F# doesn't seem to enforce that. (Unless I'm missing something?)

It doesn't. In fact, F# feels like it started off as a fairly pure functional language but some Microsoft PM said "it has to support every API in .NET" and so a lot of OOP stuff was bolted on the side. It feels like 2 different worlds in one language. You can easily get by never using the impure stuff but it's still there, taking up space.

F#'s design was almost completely handled by Don Syme, in MS Research Cambridge. It is highly unlikely some PM jumped in and insisted it must do things.

The OOP part is rather coherent; I'm not sure what's bolted on - any examples? In fact, things like object expressions do parts of OOP even better than Java/C#. Overall the syntax for OOP is rather concise and neat.

Having proper interop with .NET and hence the OOP is ... pretty key to making a successful .NET language. Otherwise you lose one major point of being able to use .NET libraries.

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

#89
post #51

Earlier quoted context omitted.

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.

It can compile to a loop. JVM can't optimize it for free at runtime. Scala has tail recursion elimination

Please, scalac performs TCO in fewer cases than g++. Some JVMs are able to perform TCO, which is nice since scalac won't do it.

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

#90
post #79
post #19

I like some of the differences where it was not constrained by Haskell's choices, like splitting up the Monad, Applicative, Functor instances, and namespacing of accessors. I also quite like the • for compose, with then some shims so that . works too if it's not being used for the namespacing.

Yeah, I'd like to see more languages using unicode identifiers. Seems to be a very unpopular approach, though :(

Haskell can do it: there's a library with common Unicode operators[1] (including ∘ for function composition) and an extension allowing you to use Unicode syntax[2] (things like → in place of ->).

I've seen these things used, but they're not super common. People still worry about not being able to input Unicode symbols in their editor! I personally think this is absurd in this day and age. Naturally, it's very easy to do in Emacs; somebody even wrote a Haskell input mode[3].

[1]: http://hackage.haskell.org/package/base-unicode-symbols-0.2....

[2]: http://www.haskell.org/ghc/docs/7.2.1/html/users_guide/synta...

[3]: https://github.com/roelvandijk/emacs-haskell-unicode-input-m...

Post reply on HN