Live data from Hacker News

Why GNU Emacs?

elephly.net

291–300 of 317 posts

Re: Why GNU Emacs?

#291
post #235
post #86

lisp is beautiful. The crown jewels of computer science. getting to spend time with it reminds you that programming can be fun (and profound) while you are being paid to work with some awful drudgery language solving some stupid problem. Being close to lisp, in this way, is like being at the same party as Audrey Hepburn. It reminds you of grace.

Joel Moses has been credited with coining the phrase in the 1970s APL is like a beautiful diamond - flawless, beautifully symmetrical. But you can't add anything to it. If you try to glue on another diamond, you don't get a bigger diamond. Lisp is like a ball of mud. Add more and it's still a ball of mud - it still looks like Lisp.

Mud can be shaped in a large number of useful and beautiful things.

Re: Why GNU Emacs?

#292
post #222
post #208

Earlier quoted context omitted.

Hence why I love the idea of REPL as shell as used in the Xerox PARC and ETHZ OSes. Only Powershell comes closer to how this was used.

Every (Unix/terminal) shell is a Read-Eval-Print-Loop. The difference is the data structure which is passed around. Is it bytes, Cons, or objects?

A lisp repl is not any repl. First, the homoiconicity of the lisp syntax allows you to sumbit structures of arbitrary complexity to the listener, and reuse output from it, even submit it back as code to execute. Second, the error handling mechanism allows you to interactively choose how to resume, and the way the repl and the image work, allows you to redefine the ill code before resuming, which is incredibly useful and intuitive. Say I have an url, and a loop that reads some data from that url, suddenly an error happens, the resource url is changed and I have to update. If I was using slime through emacs, I would be taken to the debugger, which shows me the options to resume. While that debugger is there, I can switch to the source file, tweak the variable for the url, evaluate it, switch back to the debugger, and hit the key for retry. I would have fixed the code without having to stop the program (not even behind the scenes, like with tools that watch the program and restart it). And also within the debugger, in either of Elisp debugger and Slime debugger, I can do many things, among which peek into the locals, copy stuff from there and use in my program to explore the problem. I have heard that in a space mission, NASA programmers were able to fix a spacecraft that was in space, from earth, via connecting to its lisp image over the network.

What do you do when you have to debug a pipeline? You do not have direct access to the data that flows, you need special tools to examine core dumps, and you have to have had enabled saving the dumps beforehand, you need to verify that the command syntax is correct, you have to understand what each program emit, and make sure you filter out all irrelevant data like logging etc., you don't know which part of the pipeline failed, where, you don't know if it is a wrong parameter or the program has a bug. And in order to fix bugs in programs that make up the pipeline, you have to know in whatever language the buggy one was implemented:

  ) () Response: (\d{3}) (\w+)#\1,\2,\3,\4#' | python create_report.py --output-to latex > /tmp/report.tex && latex /tmp/report.tex && dvi2pdf /tmp/report.tex && [ -f /tmp/report.pdf ] && sh /home/gkya/utils/mail_report.sh --report /tmp/report.pdf
In this command line at least six different languages are in use. I just made it up, but it doesn't seem far-fetched to me.

Re: Why GNU Emacs?

#293
post #65

Many Emacs advocates fall for the trap of apologizing for why Emacs is not Unixy, as though it were some sort of defect. They should celebrate the fact that Emacs doesn't come from the Unix tradition of small, composable tools and "doing only one thing and doing it well". It is rooted in the ambitious work of the MIT Artificial Intelligence lab, the LISP programming language, and the single user MIT Lisp Machine that…

Unix has a big flaw: through the pipes pass random data. It's up to the receivers to interpret it. Lisp gives you the possibility to easily structure your data and pass it around, plus the ability to pass programs around. Other than this, the unix way and the lisp way are nearly parallel, though in lisp "command line utility" is called a "procedure".

You just need to have a standard data structure marshaling format. Lisp gives you the ability to easily structure data, but it doesn't enforce any single way to structure it.

Re: Why GNU Emacs?

#294
post #291
post #235

Earlier quoted context omitted.

Joel Moses has been credited with coining the phrase in the 1970s APL is like a beautiful diamond - flawless, beautifully symmetrical. But you can't add anything to it. If you try to glue on another diamond, you don't get a bigger diamond. Lisp is like a ball of mud. Add more and it's still a ball of mud - it still looks like Lisp.

Mud can be shaped in a large number of useful and beautiful things.

That would be pretty difficult to make a diamond from mud.

> Writing a macro that understands forks and hooks is an exercise for a beginner – if the operators covered are strictly monadic and/or dyadic as are those in J. However in Lisp all those optional auxiliary and keyword arguments immensely complicate matters. In order to make it operational within a month or so of effort a tacit macro could be implemented to work just on a subset of Lisp operators.

http://archive.vector.org.uk/art10500180

Re: Why GNU Emacs?

#296
post #216
post #214

I switched to emacs a year ago and I love it. I feel a lot more productive when everything I need is in single window. However, just recently, I started feeling what used to be minor RSI to be a major discomfort. There are days where I can't type at all. I don't know if emacs' key bindings is mainly to blame here, but it seems like it. evil-mode have been recommended to me but I'm hesitant because I never liked vim's…

> I never liked vim's key bindings. How... dare you? Did you really try? What's wrong with them? I'm finding vi mighty fine. I switched my shells to vi mode and hate going back. Maybe you need to try Dvorak, I have to admit I've never used vi on QWERTY :)

hah, I did try it multiple times. In total I think I suffered through it for 3 months. No progress :/

Re: Why GNU Emacs?

#297
post #225
post #214

I switched to emacs a year ago and I love it. I feel a lot more productive when everything I need is in single window. However, just recently, I started feeling what used to be minor RSI to be a major discomfort. There are days where I can't type at all. I don't know if emacs' key bindings is mainly to blame here, but it seems like it. evil-mode have been recommended to me but I'm hesitant because I never liked vim's…

I recommend God mode. On my Thinkpad X200S I bind the mode switcher key to the right mouse button, which is easily reached by the right thumb. With God mode you don't have to relearn key bindings, you just no longer need to hit Control and Alt. https://github.com/chrisdone/god-mode

This looks amazing, thank you!

Re: Why GNU Emacs?

#298
post #25

Emacs is a fine editor to use until you write your own. It's the only way to make your primary interactive tool work exactly the way that you think it should.

That's a hefty endeavor. Care to share more about your experience writing your own?

Writing a text editor for a POSIX system with an xterm-compatible terminal took up about 7100 lines of C and was entirely straightforward. I made it very easy to interact with shell pipelines so I didn't need any features that are already present in the surrounding environment.

https://code.google.com/archive/p/aoeui/

Re: Why GNU Emacs?

#299
post #146
post #25

Earlier quoted context omitted.

That's a hefty endeavor. Care to share more about your experience writing your own?

I think pklausler means that, out of the box, emacs is decent but, over time, you slowly mold it into something that is more truly yours. That's been my nearly twenty year experience with emacs.

I am glad that you have enjoyed your use of emacs, but no, I was being literal. A text editor is not a complicated piece of software to write from scratch.

Re: Why GNU Emacs?

#300

Earlier quoted context omitted.

I would instantly disregard anyone who says this. Just run it in daemon mode and connect with emacsclient.

I used to do that. Then I got a new job that requires Windows 7 and emacs can't start in daemon mode. :(

always demand a linux work station! :-)
Post reply on HN