4 ms·
What's the state of other language interpreters for guile? It's one of this things I always wanted to have a play with until I remember how much I hate lisp.
by flukus 10y ago
What's the state of other language interpreters for guile? It's one of this things I always wanted to have a play with until I remember how much I hate lisp.
- chrisseaton 10y agoWhat do you mean? Other languages running on top of the Guile interpreter? Or implementations of Guile in other languages. Why would you want to run Guile if you don't like Lisp?
- flukus 10y ago> Other languages running on top of the Guile interpreter? This one. I've read about various efforts over the years like this one (https://wingolog.org/archives/2009/02/22/ecmascript-for-guile https://wingolog.org/archives/2009/02/22/ecmascript-for-guil...) for javascript and others for python etc. >Why would you want to run Guile if you don't like Lisp? It's the nicest way to embed a high level language in a program I've come across this tutorial is really cool (https://www.gnu.org/software/guile/docs/guile-tut/tutorial.html https://www.gnu.org/software/guile/docs/guile-tut/tutorial.h...). Other there any others that are so simple?
- chrisseaton 10y ago> Other there any others that are so simple? I think the Lua language itself is designed for the implementation to be easy to embed. http://queue.acm.org/detail.cfm?id=1983083 http://queue.acm.org/detail.cfm?id=1983083
- orangeshark 10y agoOne of the features of Guile is different compiler front-ends. I recall one of the original intentions of Guile was to primarily support two languages, a lisp and a more imperative like language. I don't believe this feature is used that much though. You can find the documentation here https://www.gnu.org/software/guile/manual/html_node/Other-Languages.html#Other-Languages https://www.gnu.org/software/guile/manual/html_node/Other-La...
- mwfunk 10y agoTo the degree that open source projects have marketing, one of the things that has historically always come up in Guile marketing is that any language can be expressed in Guile, therefore if only every application adopted Guile as their extension language, those apps could have any extension language they wanted. Do you like C? Then write C and have some hypothetical Guile C front-end run it for you. Do you like Python? Then write Python and have some hypothetical Guile Python front-end run it for yet. Etc. I'm not sure where that came from. Lisp advocates are (perhaps stereotypically more than in reality) known for citing that since any language can supposedly be easily expressed in Lisp, why isn't everyone running everything in Lisp and simply using hypothetical Lisp front ends to their language of choice? This line of reasoning featured heavily in Internet discussions about Guile in the '90s. "Guile should be the universal extension language because Guile can be any language" was a very common perception, at least among many vocal Guile advocates. In the last decade or so, I have not heard much along these lines WRT Guile. But in the '90s the idea that "every language can be a Guile front-end" was very much front and center in many stupid, pointless flamewars about why everyone should drop what they're doing and use Guile for everything. Just to be clear, I like Lisp very very much (and Scheme, and Guile), I'm just super allergic to hyperbole, tribalism, and wishful thinking. Ironically, thanks to Web Assembly, etc., Javascript may turn into the universal backend language that Guile always claimed to be. This is ironic because I don't think even the staunchest Javascript advocates would argue that Javascript is a better language than Scheme in any sort of idealistic, ivory tower sort of totally objective sense. Javascript isn't everywhere because everyone wants to use it, rather Javascript is everywhere because Javascript is everywhere, so that's what everyone uses. Javascript is the programming language equivalent of people who are famous for being famous. It has many admirable and interesting qualities, but it was very much a language born out of necessity than design, that lives on because it was in the right place at the right time. I say that not as a Javascript hater (I'm not) but rather as an aspiring language historian.
- srean 10y agoSigh. I so wish it was Lua and not JavaScript.
- chriswarbo 10y ago> Ironically, thanks to Web Assembly, etc., Javascript may turn into the universal backend language that Guile always claimed to be. Would WebAssembly boost JavaScript's value as a "backend language" (I assume you mean a compiler target, rather than a server-side language?)? I thought the point of WebAssembly was to stop people compiling to JS, by offering an alternative standard language/bytecode which is specifically designed to be a compiler target, rather than a human readable/writable language.
- davexunit 10y agoOther people have mentioned some real languages, but I'd like to point out something different. Xcb, a replacement for Xlib for interacting with an X11 server, has a complete XML spec that describes the API. What's nice about this is that bindings can be programmatically generated based on the spec. You can do this in any language by writing a program that reads in the XML and outputs text that is the source for the target language that the maintainer would check into their repo. Guile's Xcb bindings[0] takes a different approach. It uses Guile's compiler tower to read the XML spec as source code and compiles it to Scheme. From there, the existing Scheme compiler is used to compile to Guile bytecode. I think it's a very elegant solution and a testament to the power of Guile's compiler tower. [0] https://github.com/mwitmer/guile-xcb https://github.com/mwitmer/guile-xcb
- 59nadir 10y agoHow do you even end up wanting to use Guile if you hate Lisp? The value proposition of using Guile is essentially that you're now using Scheme. You'd be hard pressed to find all that many features that are unique to that system that aren't there specifically because it's Scheme, so how do you even end up wanting this if you find the idea of Scheme/Lisp so offensive? Also, what is it that you find so repulsive about Lisps?
- chriswarbo 10y agoI remember a push for JavaScript support a few years ago, but these days I think the most well-supported non-Scheme language is Emacs Lisp, as part of the Guile Emacs project. I suppose that might not help since you "hate lisp", but Emacs Lisp is actually very different from Scheme. In many ways I'd say Emacs Lisp is actually closer to scripting languages like Python or PHP than it is to Scheme, since it has all of those classic Worse Is Better anti-features common to scripting languages from the 80s and 90s: dependence on imperative execution order, heavy reliance on side-effects, emphasising mutation over copying, making awkward distinctions between named and anonymous functions (it's a "2-lisp"), very poor encapsulation and modularity, extensive support for, and use of, monkey-patching, etc. If you only "hate lisp" due to s-expression syntax, then keep in mind that the best feature of s-expressions is how easy they are to generate programmatically, e.g. from alternative syntaxes, such as http://srfi.schemers.org/srfi-49/srfi-49.html http://srfi.schemers.org/srfi-49/srfi-49.html http://breuleux.net/blog/liso.html http://breuleux.net/blog/liso.html http://lambda-the-ultimate.org/node/1646 http://lambda-the-ultimate.org/node/1646 https://en.wikipedia.org/wiki/M-expression https://en.wikipedia.org/wiki/M-expression http://readable.sourceforge.net/ http://readable.sourceforge.net/ http://dustycloud.org/blog/wisp-lisp-alternative/ http://dustycloud.org/blog/wisp-lisp-alternative/ http://xahlee.info/comp/lisp_sans_sexp.html http://xahlee.info/comp/lisp_sans_sexp.html