News for hackers. Stuff that matters.
Re:Why GNU Emacs? by gkya on Sunday February 14, 2016 @06:06PM (#11100440)
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".
Re:Why GNU Emacs? by liotier on Monday February 15, 2016 @05:00AM (#11102491)
So, JSON passed between a bunch of Javascript things from Github means that the browser is the new EMACS ?
Re:Why GNU Emacs? by auganov on Monday February 15, 2016 @06:37AM (#11102771)
As funny as that comparison sounds - browsers are an amazing environment/system. If we ever abandon the Browser for more opaque systems I'm sure it will be remembered the way we remember Lisp machines today.
Re:Why GNU Emacs? by jarcane on Monday February 15, 2016 @05:50AM (#11102640)
The article more or less makes this precise comparison.

"Do everything in Emacs" isn't really so different from "Do everything in the browser."

Arguably, modern browsers are more heavyweight and complex at that. They certainly eat a hell of a lot more RAM than my Emacs ever does.

Re:Why GNU Emacs? by mundanevoice on Monday February 15, 2016 @06:49AM (#11102817)
True, But they also do much more things than Emacs does.
Re:Why GNU Emacs? by tempodox on Monday February 15, 2016 @07:50AM (#11103048)
If you really believe that you haven't understood emacs at all.
Re:Why GNU Emacs? by jarcane on Monday February 15, 2016 @08:14AM (#11103171)
Ironically, the only thing Emacs can't seem to do these days is be a browser. ;)
Re:Why GNU Emacs? by clocksld on Monday February 15, 2016 @11:51AM (#11104327)
The xwidget_mvp branch has been merged into the emacs master branch about a month ago.

It allows you to embed GTK widgets INSIDE an emacs buffer, effectively allowing one to create actual GUIs inside of emacs.

This also allows you to embed a full webkit-based browser (with javascript support!) right into emacs, and use it like a regular browser.

Just clone the emacs repo, build it with gtk3 and xwidget support, and run 'M-x xwidget-webkit-browse-url' to get a full-fledged browser with proper rendering right inside emacs.

https://www.emacswiki.org/pics/static/EmacsXembedScreenshot....

Re:Why GNU Emacs? by nwah1 on Tuesday February 16, 2016 @10:12AM (#11110290)
There's only one question that remains to be answered. Why?
Re:Why GNU Emacs? by gkya on Tuesday February 16, 2016 @04:25PM (#11113230)
Browsing through an environment that's integrated nicely, deeply configurable, and completely programmable. What else would you want as a programmer and an pc user?
Re:Why GNU Emacs? by clocksld on Tuesday February 16, 2016 @02:15PM (#11112361)
Why not? :)
Re:Why GNU Emacs? by to3m on Monday February 15, 2016 @09:14AM (#11103468)
https://en.wikipedia.org/wiki/Emacs/W3

https://en.wikipedia.org/wiki/Eww_%28web_browser%29

I don't believe there is any Javascript support, though, so you'll be out of luck for many modern pages...

Re:Why GNU Emacs? by cema on Monday February 15, 2016 @06:03PM (#11106734)
Well, emacs certainly can be many things, if not all things. But is it? There is a difference.
Re:Why GNU Emacs? by mundanevoice on Tuesday February 16, 2016 @05:27AM (#11108960)
Please make me understand!
Re:Why GNU Emacs? by yvdriess on Monday February 15, 2016 @05:24AM (#11102580)
Maybe if it would be sending AST in JSON, not recommended though :)
Re:Why GNU Emacs? by mveety on Monday February 15, 2016 @07:24PM (#11107076)
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? by tempodox on Monday February 15, 2016 @07:46AM (#11103032)
Emacs has a big flaw: It's just too fucking complicated and inconsistent. Unix, otoh, can do everything emacs does AND it has a half-decent text editor (vim).
Re:Why GNU Emacs? by gkya on Monday February 15, 2016 @09:51AM (#11103629)
Your comment has a big flaw: it assumes that the grandparent comment is comparing emacs and unix, whereas lisp and unix were compared. If your reading skills are like this, anything is complex for you. And afaik emacs is not a sexual being. And if you think that unix is simple, easy and consistent, your unix fu is probably just adding a fancy prompt to your bashrc. Try ls: how do you sort dirs before files? The first thing you ask is whether it is gnu ls or sth else. Try man, the first question is which format. Make? Same story. I want to get notified for changes in a directory: each unix has its own incompatible thing. And these are the very basics.
Re:Why GNU Emacs? by qznc on Monday February 15, 2016 @04:24AM (#11102354)
So Emacs/Lisp gives you a Unix in your Unix.
Re:Why GNU Emacs? by gkya on Monday February 15, 2016 @04:36AM (#11102404)
No it gives me something better than unix in my unix.
Re:Why GNU Emacs? by cema on Monday February 15, 2016 @06:04PM (#11106738)
Rather, it gives you something in many ways similar to Unix and not necessarily in Unix.
Re:Why GNU Emacs? by pjmlp on Monday February 15, 2016 @03:02AM (#11102045)
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.

Re:Why GNU Emacs? by qznc on Monday February 15, 2016 @04:23AM (#11102347)
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?

Re:Why GNU Emacs? by pjmlp on Monday February 15, 2016 @04:59AM (#11102483)
No, every UNIX shell is a poor Read-Eval-Print-Loop when compared to what Xerox PARC machines allowed in terms of interaction with the running OS.

UNIX shells don't allow to call functions declared in .so, execute scripts applied to elements selected with the mouse, apply functional algorithms over data.

Well, you can write external commands in another programming language, but then it isn't a REPL anymore.

Re:Why GNU Emacs? by gkya on Monday February 15, 2016 @06:20PM (#11106819)
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:

  </var/log/my-service.log ag 'Response: 505' | sed 's#(<timestamp>) (<path>) 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.