Hacker News new | past | comments | ask | show | jobs | submit login
Frege (code.google.com)
40 points by netvarun on Feb 10, 2013 | hide | past | favorite | 16 comments



Its been moved to github - https://github.com/Frege/frege

Can anyone explain the interest of this to someone unfamiliar?


you can run your haskell code on any platform with java installed.

android, desktop, web are some examples.


It would only run a subset of Haskell since there is some divergence between the 2 implementations. Frege has a lot fewer advanced features but has also made some improvements on the base Haskell language.


basically the haskell equivalent of the clojure jar?


Looks cool.

But (the following point applying beyond the scope of Frege, and not intended to say anything negative about Frege) it is disappointing that there isn't better interop between JVM and non-JVM languages, so that people are so frequently forced to choose and to duplicate effort between the two worlds. For example, Frege being similar to Haskell, but using Java APIs - it is disappointing that there can't be a cleaner join between the worlds.


> but using Java APIs - it is disappointing that there can't be a cleaner join between the worlds.

Maybe it can. But does it make sense? For example, you'd need a library that emulates the C stdlib functionality that is used in Haskell.

There are more subtle points. For example, in Haskell, you can throw an exception in another thread. You can't do that with JVM threads. I am not sure what it would take to make a JVM runtime system that supports this.

But observe that the more runtime code you have that keeps up the illusion of running a Haskell-RTS, POSIX, C stdlib world, the less you will be able to interact with the rest of the JVM. For, your Strings are not Strings, but lists of characters, your Boolean is a sum type, your Filedescriptors are some abstractions nobody else understands, your threads are not JVM threads, but something that can be interrupted form other such somethings, ... and so on and on.


> Frege being similar to Haskell, but using Java APIs

Surely the whole point of being on the JVM is that you can use the vast amount of software written for java.


I am always disappointed that these Haskell-alikes don't just follow the Haskell spec -- too often they diverge for no good reason, and then there's no point.


If there is no non-strict, purely functional programming language on platform X, nobody is apparently disappointed.

If there is one, and if it were very different from Haskell, people would complain: Couldn't you make it more like Haskell, so that people don't need to learn the many differences?

If there is one, and if it is not very different from Haskell (so much so, in fact, that many Haskell sources will just compile), people will be disappointed because it is not standard Haskell. In fact, the fewer differences there are, the more complaints.

If it were fully fledged Haskell-2010, people would complain: Where is GHC extension XY? How is Haskell-2010 any good these days?

You never can make everyone happy, no matter what you do.


Diverging for good reason is ok. Diverging for pointless reasons is not.


One cannot deny this.

It just so happens that what one sees as a good reason is pointless for somebody else.


If you could wave a magic wand and have a haskell derivative spring into existence with whatever divergences you choose, what would you choose? I think while learning haskell, a lot of people wish there was a strict-by-default version, for example, but we can't all see the full consequences, I expect you can see more than most hence would be interested to know what you'd consider a worthy experiment.


there are some examples on the wikipedia page - http://en.wikipedia.org/wiki/Frege_(programming_language)


Unfortunately, the Wiki page is a bit outdated.

The repo contains an example folder: https://github.com/Frege/frege/tree/master/examples

And, of course, the compiler is itself written in Frege.


Why is it hard to port Haskell to Java?


http://research.microsoft.com/en-us/events/sscli2005/perry-h...

This mentions Odersky's pizza, which (I think) was the first implementation of generics on the JVM.

I think there other things talking about MSR's effort to port haskell to the CLR




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: