7 ms·
Shen is a portable functional programming language
- moron4hire 12y agoWhat are the functional languages that are in common usage that are not portable?
- alayne 12y agoI 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."
- chc 12y agoIn 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.
- CMCDragonkai 12y agoCan shen be embedded in the host language?
- tizoc 12y agoThat depends on the port. The Clojure port allows this: https://github.com/hraberg/shen.clj#神-define-prolog-and-defprolog-macros https://github.com/hraberg/shen.clj#神-define-prolog-and-defp...
- malisper 12y agoFrom[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 http://www.shenlanguage.org/learn-shen/native.html
- hawkice 12y agoHaxe seems to be portable in a similar way, and probably more popular than Shen at the moment.
- zem 12y agothe creator of ats has recently demonstrated proof of concept python, javascript and php backends. https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/ATS-parse-emit https://github.com/githwxi/ATS-Postiats-contrib/tree/master/...
- mp8 12y agoLooks 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.
- tizoc 12y agoIt 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])
- p4bl0 12y agoThe "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_15mins.html#shen-in-15mins http://www.shenlanguage.org/learn-shen/tutorials/shen_in_15m...
- 616c 12y agoIs 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.
- ZenoArrow 12y ago"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 http://en.wikipedia.org/wiki/Qi_%28programming_language%29
- 616c 12y agoI 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?
- __Joker 12y agoWhat 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.
- jopython 12y agoDoes the language support concurrency primitives as part of the core?
- prodigal_erik 12y agoPrior discussion, mostly of the restrictive license: https://news.ycombinator.com/item?id=4730535 https://news.ycombinator.com/item?id=4730535
- igl 12y agoInteresting 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?
- erikb 12y agoA 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.
- g8gggu89 12y agoHow does Java suck when not on Windows?
- ExpiredLink 12y agoHe probably means Eclipse, not Java. Most Java EE application I know run on Unix/Linux.
- m_mueller 12y agostrange, I never had any trouble with Eclipse on Mac, except for Eclipse being Eclipse.
- nightcracker 12y agoI 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.
- amouat 12y agoPython 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.
- groovy2shoes 12y agoI'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.
- fithisux 12y agoBut the question remains, has anyone used this language?