Live data from Hacker News

Goism – Use Go instead of Emacs Lisp inside Emacs

github.com

41–50 of 78 posts

Re: Goism – Use Go instead of Emacs Lisp inside Emacs

#41
post #28

Earlier quoted context omitted.

In practice, it's close to useless. A lot of the power of Emacs comes from the homogeneity and that Emacs itself is mostly written in Emacs Lisp. There have been attempts in the past to do similar bridges to Python and Javascript IIRC, but they ended up nowhere since they didn't mesh well with the existing ecosystem. No matter how bad people think Emacs Lisp is (an incorrect impression, Emacs Lisp has improved tremen…

I don't think the author is challenging most of the notions here. In fact, it seems pretty well inline with this. I think language bridges suck, but this isn't one. It transpiles Go to Lisp bytecode, making it much closer to a first class citizen. But more importantly, the tagline of the project isn't "Let's write Emacs in Go," nor is it "Emacs Lisp is bad," it's "Not a fan of Emacs Lisp? Hack Emacs in Go!" -- that s…

> There are plenty of reasons to not like Lisp

Would you please list those reasons?

Re: Goism – Use Go instead of Emacs Lisp inside Emacs

#42
post #29

Earlier quoted context omitted.

In practice, it's close to useless. A lot of the power of Emacs comes from the homogeneity and that Emacs itself is mostly written in Emacs Lisp. There have been attempts in the past to do similar bridges to Python and Javascript IIRC, but they ended up nowhere since they didn't mesh well with the existing ecosystem. No matter how bad people think Emacs Lisp is (an incorrect impression, Emacs Lisp has improved tremen…

It's a lisp. That is enough for a lot of us to want to use another language, irrespective of how much Emacs lisp improves.

You should try digging deeper into Lisp before disqualifying in such a frivolous way.

Re: Goism – Use Go instead of Emacs Lisp inside Emacs

#43
post #31
post #24

Earlier quoted context omitted.

I don't actually see the advantages for JavaScript. Seems every other month there is a new way to package it. So, everyone might know how to build with it, but few people know the same way of building. Similarly, the package repository is not exactly inspiring. Similar patterns of many packages doing the same thing. Often not bringing new advantages to the table, so much as revising old weaknesses. Many rooted in cho…

Trust me, I get it. I'm not a fan of JS for the exact stated reasons. It's fragmented and full of holes. But the way I see it, JavaScript is like today's BASIC. In a very fragmented computer market, it seemed like BASIC was the one thing that ran common between a lot of home computers in the 80s. While it's not a perfect parallel, it seems with all of the different platforms that are around today it's hard to find a…

That is actually a great comparison and a very strong argument for not using JavaScript. BASIC was big in the 1980s; where is BASIC today? Elisp code from the 1980s still runs or can be trivially ported to Emacs 25. Lisp is not a fad and Lisp never goes away.

Re: Goism – Use Go instead of Emacs Lisp inside Emacs

#44
Being able to script the editor in something other than Lisp seems good to me (despite the objections of others in this thread). After all, many people are just scripting settings and stuff for themselves. Might as well not make them jump through hoops to do so.

I wonder about the implementation strategy -- why compile to Emacs LISP instead of doing a plugin (FFI) or RPC style setup?

Re: Goism – Use Go instead of Emacs Lisp inside Emacs

#45
post #28

Earlier quoted context omitted.

I don't think the author is challenging most of the notions here. In fact, it seems pretty well inline with this. I think language bridges suck, but this isn't one. It transpiles Go to Lisp bytecode, making it much closer to a first class citizen. But more importantly, the tagline of the project isn't "Let's write Emacs in Go," nor is it "Emacs Lisp is bad," it's "Not a fan of Emacs Lisp? Hack Emacs in Go!" -- that s…

> There are plenty of reasons to not like Lisp Would you please list those reasons?

I hope you're asking in good faith and don't really think Lisp is actually the best at everything.

Since you asked though, I'll go into my personal list. You'll note that much of these can just as easily be advantages depending on the situation and I'm by no means saying that this list applies to all things and all people (in fact it objectively doesn't.)

- The syntax: duh. Its elegant in how it mixes code and data, and unifies so much functionality into one syntax. But it has a number of disadvantages. One, the number of parens is cumbersome. You can get used to it, but it's still cumbersome. Two, it isn't always intuitive; sometimes infix syntax just plain feels ergonomically better, all flaws aside. This can absolutely be said about math. Lisp takes order of operations out of the picture, but the same would be true if you threw a shit to of parens into any language, so I feel that doesn't count.

- It's absolutely magical. It's so powerful that I wouldn't trust most programmers to wield it. It's so powerful I wouldn't trust me to wield it. I like programs that are obvious. One of Go's strengths is that it is very stupid, for example, leading to stupid code that is stupid readable by anyone (even if they're.. you get the idea.)

- Lisp feels like the world of wheel reinvention. I don't​ know if that's due to the language or the community that surrounds it, but I'd guess it's at least a little bit of both.

- Lisp is a dynamic language. By nature this is going to mean you can do less things with code statically. I'm a big fan of static typing for the obvious advantages it brings to larger projects.

- Finally, comfort. Lisp is obviously a language that has stood the test of time, but even despite that Lisp programmers are far and few in the industry. Most people are going to be familiar with imperative programming languages based off of C like syntax, or maybe something closer to Python. Either way, if you pick a random programmer off the street, you wouldn't assume they knew Lisp. (Unless their beard was really long.)

Re: Goism – Use Go instead of Emacs Lisp inside Emacs

#46
post #43
post #31

Earlier quoted context omitted.

Trust me, I get it. I'm not a fan of JS for the exact stated reasons. It's fragmented and full of holes. But the way I see it, JavaScript is like today's BASIC. In a very fragmented computer market, it seemed like BASIC was the one thing that ran common between a lot of home computers in the 80s. While it's not a perfect parallel, it seems with all of the different platforms that are around today it's hard to find a…

That is actually a great comparison and a very strong argument for not using JavaScript. BASIC was big in the 1980s; where is BASIC today? Elisp code from the 1980s still runs or can be trivially ported to Emacs 25. Lisp is not a fad and Lisp never goes away.

Well, to be fair, I don't think JavaScript is at risk of dying the way BASIC did, for a lot of reasons that aren't really worth going into. If it is going to die, though, then WebAssembly is the writing on the wall.

Still, I think you're looking at this from a different angle than I am. I haven't seen one person suggest that it would be a good idea to take the Lisp out of Emacs; simply that having the option to script it with other languages would be nice.

Re: Goism – Use Go instead of Emacs Lisp inside Emacs

#47
post #9

I haven't taken an incredibly close look at this, but it seems like a pretty bad idea. Elisp is definitely not a great language, and I'd like an alternative as much as the next Emacs user. But I feel pretty strongly that any alternative has to be a Lisp, or very close to one. Code-is-data/data-is-code is very important for the more "config-file" aspects of configuring Emacs. Being able to use and write DSLs to succin…

I used Emacs Lisp for scripting tasks like code and data generation. It is great to have an ability to evaluate form right inside the spot you want results to be inserted. This kind of code does not require AST manipulations or macro. Also, some of my projects that become bigger than 1000 LoC could benefit from static typing and (subjectively) better tooling. By the way, I think extending Emacs in Racket would be gre…

I use elisp for scripting occasionally (very handy when you need to script on some server but the administrator does not want to install a Lisp compiler, and quite usable with the cl- libraries), and the biggest annoyance is that you need to use buffers to do file IO. That is another layer of boilerplate on top of the Lisp file IO facilities, compared to Bourne shell-style scripting.

Re: Goism – Use Go instead of Emacs Lisp inside Emacs

#48
post #9

I haven't taken an incredibly close look at this, but it seems like a pretty bad idea. Elisp is definitely not a great language, and I'd like an alternative as much as the next Emacs user. But I feel pretty strongly that any alternative has to be a Lisp, or very close to one. Code-is-data/data-is-code is very important for the more "config-file" aspects of configuring Emacs. Being able to use and write DSLs to succin…

I used Emacs Lisp for scripting tasks like code and data generation. It is great to have an ability to evaluate form right inside the spot you want results to be inserted. This kind of code does not require AST manipulations or macro. Also, some of my projects that become bigger than 1000 LoC could benefit from static typing and (subjectively) better tooling. By the way, I think extending Emacs in Racket would be gre…

    ;;; -*- lexical-binding: t -*-

Re: Goism – Use Go instead of Emacs Lisp inside Emacs

#49

The idea of using a language without Map/Reduce/Filter as a substitute for a Lisp, in an editor built around Lisp...seems vaguely antithetical to me.

You can call map/reduce/filter from Go code: `xs := lisp.Mapcar(f, ys)`.

Mapconcat is already used inside runtime implementation: https://github.com/Quasilyte/goism/blob/master/src/emacs/rt/... (Print and Println functions).

Re: Goism – Use Go instead of Emacs Lisp inside Emacs

#50

What a sad idea. Seriosuly, is that hard to learn Emacs Lisp? Even if one is using Go or Rust (etc) at work, any programmer worth his salt should at least already be familiar with Lisp syntax. It is one of the easiest languages to learn!!

I love Emacs Lisp.

Emacs has really good support for it which continues to improve over time.

But.. I love more than one language (and more than one Lisp for sure). Will you try to persuade me that I am wrong in that regard?

Post reply on HN