Live data from Hacker News

Goism – Use Go instead of Emacs Lisp inside Emacs

github.com

51–60 of 78 posts

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

#51
post #45

Earlier quoted context omitted.

> 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,…

The question was in good faith and I sincerely thank you for such a well-written reply.

I think some of your points are valid, although some of them (syntax and static typing vs dynamic typing) are mostly down to preferences or getting used to different ways of working.

I think, for example, that, given the choice between those two, i'd rather have macros (lisp macros) instead of static typing.

As for the beard comment, yes, the longer the beard, the easier is to get into Lisp.

I just wanted to note, however, that Lisp is an imperative programming language, just as C or Python is. (Of course, Lisp also allows functional programming and Common Lisp allows fantastically good object oriented programming). So yes, i agree, "most people are going to be familiar with imperative programming languages based off of C-like syntax". But on the other hand, Lisp syntax is much easier to learn than C-like syntax.

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

#53
post #6
post #5

Another case where it'd be nice to have a "Why are we doing this?" section in the README. If it's just a demo then it's neat. Interesting that it can be done. On the other hand, if it's a real push to get people scripting Emacs with Go, then I don't see the point at all. It's solving a problem people don't really have.

> It's solving a problem people don't really have. Isn’t "I want to script Emacs but I don’t like LISP" a problem to solve?

I'd say the problem in that statement is "I don't like Lisp", and we should solve for that :)

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

#54
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.

and this is why I built an entire business around elisp. Elisp is not perfect but I am betting that it'll be around for at least 30 more years.

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

#55

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).

Why did you get downvoted for this?

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

#56
post #21

Is it possible to have a language transpire/compile to elisp?

It is possible to emit Emacs Lisp instead of bytecode/lapcode. This was the first code generator target actually. Easier to debug, simpler to trust (for the end user) and not that hard to generate. The problem is that it is harder to implement some features of Go in terms of Emacs Lisp without going down to the virtual machine level. Best examples are arbitrary return statements (can be emulated by throw/catch) and g…

Could you implement arbitrary return with cl-block and cl-return-from?

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

#57
post #6
post #5

Another case where it'd be nice to have a "Why are we doing this?" section in the README. If it's just a demo then it's neat. Interesting that it can be done. On the other hand, if it's a real push to get people scripting Emacs with Go, then I don't see the point at all. It's solving a problem people don't really have.

> It's solving a problem people don't really have. Isn’t "I want to script Emacs but I don’t like LISP" a problem to solve?

You're postulating a population that are willing to take on the cognitive burden of learning Emacs but who are unwilling to do the same for ELisp. I think that's a smallish population, almost entirely composed of people who want a Scheme, probably Guile, instead (but, like me, are plugging along in Elisp in anticipation of Emacs-Guile potentially shipping before the Rapture). People who want to script in Go, Common Lisp, Javascript, C, Fortran or the Power of Christ are currently pretty much entirely confined to the immediate teams working on those various projects. More power to them, no one who loves Emacs should ever tell anyone 'no, that's not appropriate for Emacs' (I think we established a pretty long time ago that weird esoteric projects out of left field are basically Emacs' wheelhouse, and often turn into really important sub-projects). But, I'm not interested, and I don't know any regular users of Emacs who would be.

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

#58
post #57
post #6

Earlier quoted context omitted.

> It's solving a problem people don't really have. Isn’t "I want to script Emacs but I don’t like LISP" a problem to solve?

You're postulating a population that are willing to take on the cognitive burden of learning Emacs but who are unwilling to do the same for ELisp. I think that's a smallish population, almost entirely composed of people who want a Scheme, probably Guile, instead (but, like me, are plugging along in Elisp in anticipation of Emacs-Guile potentially shipping before the Rapture). People who want to script in Go, Common L…

I've actually met many programmers who used Emacs but knew zero Lisp of any kind, including Emacs Lisp. They were just happy using the available goods without looking under the hood.

I don't think it's that unusual. Emacs is quite popular. If even 25% of the user base coded in Lisp, it would be ... astonishing.

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

#59
post #6
post #5

Another case where it'd be nice to have a "Why are we doing this?" section in the README. If it's just a demo then it's neat. Interesting that it can be done. On the other hand, if it's a real push to get people scripting Emacs with Go, then I don't see the point at all. It's solving a problem people don't really have.

> It's solving a problem people don't really have. Isn’t "I want to script Emacs but I don’t like LISP" a problem to solve?

[deleted]

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

#60

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?

Emacs only having elispallows me to fix the third party code that I have in my config, and simplifies all the things. Thoemacs already has C too now, there is module support. I guess it could be possible to use Rust via that interface too, and maybe go. But better keep these to a minimum because elisp is one of the things that makes emacs great
Post reply on HN