Hacker News new | past | comments | ask | show | jobs | submit login
Shen is a portable functional programming language (shenlanguage.org)
65 points by curtis on Aug 31, 2014 | hide | past | favorite | 34 comments



Is anyone using this, despite the license?

I have seen this here on HN and elsewhere. The only reason I avoid is the weird not-so-FOSS license and key-to-the-chest mentality.

I would love to hear semi-detailed experiences using it. And are there any more open alternatives built on CL? I am very interested in this idea.


"And are there any more open alternatives built on CL?" Shen's predecessor Qi runs on CL, and the first version was released under the GPL... http://en.wikipedia.org/wiki/Qi_%28programming_language%29


I am aware of Qi but the fact that the second version went completely commerical kind of sounded like a non-starter to me.

Have you used it?


A little bit off topic: Does anybody else dislike the word "portable [...] language"? I never met a truly portable language. Examples: You can use Java on all platforms, but if you are not on Windows it sucks. You can use Python on all platforms, but if you are on Windows it sucks. It's always that the language might be able to run on different platforms, but as a coder you need more, and most of the standard tooling often is only taken care off well enough on one or two platforms.


How does Java suck when not on Windows?


He probably means Eclipse, not Java. Most Java EE application I know run on Unix/Linux.


strange, I never had any trouble with Eclipse on Mac, except for Eclipse being Eclipse.


What? Java and Python are great portable languages, and they definitely do not suck on Mac or Linux. The only languages that does not suck on Windows (i'm biased, I really hate development on Windows) is the .NET family of languages.


.NET might suck in general. But try to get pip and virtualenv running on windows (without a Linux VM). That's what I mean.


I don't have any experience with Python sucking on Windows? The only thing that's a bit of a hassle is distributing the interpreter, but this is no harder than a VC++ redistributable.


I've had good luck using cx_Freeze to "build" Python applications on Windows (and on Linux, for that matter). It bundles the bytecode of your Python app with a Python interpreter stub and any necessary shared libraries. On Windows, it can even build an MSI package. Users can't tell the difference from other applications.


Python on Windows works mainly fine for me - it took me a while to get IIS to work with Flask, but other than that I had few issues.


Prior discussion, mostly of the restrictive license: https://news.ycombinator.com/item?id=4730535


What are the functional languages that are in common usage that are not portable?


I think the question is what does portable mean, or is there a better word to use than portable. It clearly doesn't just mean written in C or C++. From the linked page -- "It currently runs under CLisp and SBCL, Clojure, Scheme, Ruby, Python, the JVM and Javascript."


In the sense that they run under CLisp, SBCL, Clojure, Scheme, Ruby, Python, the JVM and Javascript? I can't think of any that are portable in that sense.


Haxe seems to be portable in a similar way, and probably more popular than Shen at the moment.


Is Haxe functional? I didn't think it was.


Definitely seems to be -- they claim it's been used by a lot of different people (including, notably, the now-famous indie game Papers, Please) and is somewhere deep into version 3.something -- it's been around for quite some time.


the creator of ats has recently demonstrated proof of concept python, javascript and php backends.

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/...


Can shen be embedded in the host language?


That depends on the port. The Clojure port allows this:

https://github.com/hraberg/shen.clj#神-define-prolog-and-defp...


From[0], the answer appears to be yes, but it greatly depends on the host. One can write Common Lisp code by using uppercase. Using $native will execute the following code as Scheme code. For Clojure, it looks like Shen provides a FFI for basic interactions.

[0] http://www.shenlanguage.org/learn-shen/native.html


Looks interesting. However, does the following not mean that it's not portable?

> Note that if Shen is not running on a Lisp platform, then function may be needed to disambiguate those symbol arguments that denote functions.


It means that to be portable you have to wrap symbols that represent functions in (function <the-symbol>) when passing them as arguments. Not doing so will work on some ports but not on others, and should be considered "undefined behaviour".

Portable:

(foldl (function +) 0 [1 2 3])

May work depending on the backend:

(foldl + 0 [1 2 3])


The "Shin in 15 minutes" tutorial [1] is really nice (I would even say it's more 5 minutes than 15). Once you read the beginning of it you can appreciate the example on the front page.

http://www.shenlanguage.org/learn-shen/tutorials/shen_in_15m...


Interesting but I wish there were more functional languages that omit braces. I only know of F# and the js preprocessor livescript.

Seems like embracing lisp style is a must do for many lang-creators. Or is it just for the sake of parsing simplicity and dislike of whitespace significance?


Parentheses are rarely needed in Haskell. You can even use the $ operator to specify the order of evaluation, eg. concat $ replicate 3 "foo" == concat (replicate 3 "foo").


You can add erlang/elixir to the list of paren-free functional languages.


No you cannot.


Mind expanding?

edit: wait, are we talking about no parentheses at all? If so, I'm wrong. I meant lisp-like.


What is the use case of being portable to other languages ? I can vaguely surmise that being portable to other language might provide more traction for using Shen in existing project.


But the question remains, has anyone used this language?


Does the language support concurrency primitives as part of the core?




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

Search: