31 ms·
Emacs is the 2D Command-line Interface
- cheezymoogle 6y agoThis is pretty tangential, but I don't understand why there isn't a roguelike framework available for Emacs. It seems like the perfect roguelike platform for playtesting and hacking on and would on-board a lot of new people into the Emacsen ecology without any real difficulty. The standard roguelike library libtocd has bindings for every other language--why not elisp?
- catern 6y agoI've wondered the same thing! In particular, the highly polished and powerful interfaces of some roguelikes (DCSS comes to mind) strongly remind me of Emacs. It seems like the scriptability and power of Emacs interfaces is a natural fit for roguelikes.
- jordigh 6y agoHm, there's nethack-mode, but that's not what you mean, is it? You want a framework for building roguelikes, not for playing a particular one?
- podiki 6y agoThere is dungeon-mode [0]. (I spotted this over on r/emacs [1], and it's on the FSF directory [2]) [0] https://github.com/dungeon-mode/game https://github.com/dungeon-mode/game [1] https://old.reddit.com/r/emacs/comments/jar7tz/dungeonmode_f https://old.reddit.com/r/emacs/comments/jar7tz/dungeonmode_f... [2] https://directory.fsf.org/wiki/Dungeon-mode https://directory.fsf.org/wiki/Dungeon-mode
- jonnycomputer 6y agoI was thinking about this a couple weeks ago as well.
- QuesnayJr 6y agoThat's funny. I've wondered that too, and from the other replies it seems you and I aren't the only ones. I half-assumed it existed and was just called something-incomprehensible-mode so I never heard of it.
- nonbirithm 6y agoWell, it's not Elisp, but: https://github.com/Ruin0x11/OpenNefia https://github.com/Ruin0x11/OpenNefia It's an engine rewrite of an old roguelike I used to play in Lua. I'm trying to experiment with making a game where the engine is similar in flexibility to Emacs. It has an Emacs frontend, and I designed it with the zealotry of an Emacs user, meaning it has advice, hooks, interactive evaluation and runtime module hotloading. You can run anything the engine can run from a REPL (and cause all the state to become broken easily). To be clear, it's not a general-purpose roguelike engine, but it proves that with enough effort such an iterative developer experience of modding a game can be achieved.
- sachac 6y agoI used to play Nethack within Emacs using nethack-el. It was really useful being able to bind a shortcut to something that could copy the map and append it to a text file with a note. :)
- neolog 6y agoI think specifically, transient.el is the 2d CLI. https://github.com/magit/transient https://github.com/magit/transient
- wayoutthere 6y agoSo is vim? Not to rehash the same battle that’s likely older than most of us are, but both emacs and vim are text editors taken to their logical conclusion. Both can do pretty much the exact same thing as each other, if only because some neckbeard in the 80s wrote that feature to score points in the great vim/emacs saga.
- anschwa 6y agoThe way I see it, emacs is really an idea. Vim is a text editor that grew into an ecosystem of people bolting on additional functionality. While extensibility is possible, it's nowhere near as transparent and consistent as the emacs environment. In fact no system I know of comes even close. Emacs paved the way for the features we take for granted in graphical applications like undo, copy+paste, search, find+replace, spell check, project navigation, code completion, auto-formatting, and of course, plugins. These days, indeed much of the appeal is gone if all you're doing is comparing features at a surface level. Yes, it looks like all editors "do the same thing" but really emacs is quite different in spirit.
- colordrops 6y agoIf emacs adopted vim-like keybindings early on the war would have ended. It's the only reason I stick with vim, and I suspect I'm not alone. Yes, yes, evil mode and whatever, but it's not seamless - you still have to get familiar with emacs keybindings.
- anschwa 6y agoI'm not sure I agree keybindings were/are the significant factor. The editors have a completely different history and their authors come from very different backgrounds.
- colordrops 6y agoI'm talking about the war of usage/mindshare rather than a war between the authors.
- jolux 6y agoI love Emacs, but I think it’s safe to say that it’s a lot harder to use than Visual Studio Code, which is vastly more popular. I think what made VSCode popular was the availability of many high-quality extensions for major languages. Unfortunately, my experience with Elisp packages is that they tend to be much less stable. This is changing some with LSP mode, of course, but I think the Emacs community would do well to focus on improving the story for plug-in stability in the long-term. I already have to install use-package to make handling packages reasonable, which is not something I have to do in other editors. Manually setting up hooks for them is a pain in the ass too. I once submitted a bug to the Emacs mailing list and after determining it was indeed a defect, a flame war ensued between maintainers of different subsystems that were competing over how a specific feature was supposed to be used, which was the source of the bug. It was offputting and felt juvenile. Social problems are inevitable in any open source project, but I can’t help but wonder if the highly dynamic nature of Emacs Lisp causes more problems than a less dynamic language would.
- bachmeier 6y ago> I love Emacs, but I think it’s safe to say that it’s a lot harder to use than Visual Studio Code I actually find the opposite. As much as I dislike the clumsy GUI, I just keep coming back to Emacs for some things, for the sole reason that it's easier in Emacs. I find Emacs to be the easiest way to customize my text editor, and that's what makes it easy to get my work done. I've tried VS Code many times and I just don't see what's special about it.
- dragonwriter 6y agoI first used emacs 25ish years before VSCode existed and VSCode was pretty much immediately easier to use and customize; to be fair, it's not like I was using Emacs heavily in the intervening quarter century, but I was using it fairly regularly. OTOH, I have no problem believing someone using Emacs as a daily driver for years would find it easier (but I think most developers, and particularly newer developers—where the JS to Lisp familiarity ratio is much higher than for, say, those who got into coding in the 1980s or earlier—are going to more productive more quickly with VS Code.)
- ngcc_hk 6y agoIt is still a mono system. An OS is really not care you run c, lisp, VM and another os fundamentally. In this sense emacs is not an OS. And is mono. Just like Common Lisp. An internal “closed” system can have diversity. But not put external as first object, just as OS would not normally running OS task as the most important thing but running user land task. A “closed system” like emacs and Common Lisp is unlike say OS and vs code, they are not the kind that you as the user program of the emacs or Common Lisp can be of a totally different idea of how in addition to what and still co-exist nicely. Can you write a program of c and run under and with emacs and Common Lisp ... Even Api and extension need to be purposed for external interaction as it needs to assume difference that with a totally different approach. Totalitarian can say harmony with difference but in real it is just totalitarian. Democracy can be suppressed but ultimately is a diverse system.
- Jtsummers 6y ago> Can you write a program of c and run under and with emacs and Common Lisp Yes to both.
- podiki 6y agoAs an Emacs and Lisp lover, the description of text-based tools and the power of using text to me just screams why something like Lisp is so powerful: homoiconicity. (And at least one big difference for elisp compared to Bash.) To quote Wikipedia [0] for anyone unfamiliar with the term, as I was until learning some Lisp: "A language is homoiconic if a program written in it can be manipulated as data using the language, and thus the program's internal representation can be inferred just by reading the program itself. This property is often summarized by saying that the language treats "code as data"." [0] https://en.wikipedia.org/wiki/Homoiconicity https://en.wikipedia.org/wiki/Homoiconicity (Edit: and if you want a good terminal emulator, you have eshell (emacs-y), ansi-term, and my current fave vterm [1]) [1] https://github.com/akermu/emacs-libvterm https://github.com/akermu/emacs-libvterm
- foobarian 6y agoI've been hearing the "code is data" mantra often, but the reason I never thought this was a desirable property is that it seems trivial to define any number of languages as their own AST. But there is a good reason that we don't program by writing out ASTs - it's relatively hard to read and manipulate. Does the Lisp implementation just happen to be particularly readable?
- tadfisher 6y agoIn a word, yes. S-expressions are a decent representation for data (lists and hierarchical structures) and the sort of code you write in a language derived from the lambda calculus, which is function calls. This is not by accident, though, since it is very desirable to manipulate code via macros.
- someguy101010 6y agoThe ast of a lisp program is essentially the same as the code of lisp itself. There is no intermediary step. Practically I'm sure there is, but conceptually that is they way it behaves.
- konjin 6y agoThe AST and the parse tree are basically the same. You only need to rename the bracket nodes to their first element.
- exabrial 6y agoVim. That is all haha
- coldtea 6y ago>One of the most popular arguments against Emacs is that it is “a great operating system, lacking only a decent editor” That's false, as it does have the great Evil editor.
- rakoo 6y agoThe author is definitely right in saying that Emacs is an OS, because it runs "programs" that interact with a common datasource. The issue is that those "programs" are not the ones of your baremetal host. The sequel that makes sense would be a text editor that allows host programs to be run seamlessly on the text. Once again the geniuses behind Plan 9 have shown how novel their system was by creating acme (https://www.youtube.com/watch?v=dP1xVpMPn8M https://www.youtube.com/watch?v=dP1xVpMPn8M). It allows any program to interact with whatever is in the text, so it clearly is the 2D cli the author is looking for
- michael-ax 6y agoIts also a daemon that does a lot of work for me from the shell! I meta-click to capture xterm output, call dired, make it give me popup-windows to edit short scripts and long command lines, i query the feed-reader, get my backup-schedule, have it popup for debrief when new voice notes are downloaded, serve as an emergency window manager, capture into multiple bins while browsing, turn into a presentation tool, create pdf reports and write-ups, prompt me to check-in any leftovers at the end of the day, work seamlessly across my machines, provide menus to give access to files, clickable functions, org-summaries, fantastic spreadsheets .. oh wait, that's going beyond shell. so yes, it made my beard grey. big deal, i can shave. sure it not perfect, sure its infuriating, surely i'm insane for continually investing into my future while tweaking something to compound its benefits. but none of this makes emacs anything but a lisp machine -- so well loved and so close to the metal that it will be here after you and me. Call it a general purpose computing shell, not an OS, and please compare it to the living, not the dead!
- Torwald 6y agoThe type of interface of Emacs is not the CLI, but "roguelike" interface. ESR in "Unix Interface Design Patterns": >> The Roguelike Pattern Programs obeying this pattern are legion: The vi(1) text editor in all its variants, and the emacs(1) editor; elm(1), pine(1), mutt(1), and most other Unix mail readers; << http://www.catb.org/esr/writings/taoup/html/ch11s06.html http://www.catb.org/esr/writings/taoup/html/ch11s06.html
- jonnycomputer 6y agoSometimes I think people trick themselves into thinking that all their fiddling with Emacs counts as part of their productivity. Don't hate on me. I use Emacs just about every day. I used to use Emacs as my go to editor for writing code ... and it almost worked. But it was never hassle free, and things often worked more poorly than I would have liked, or ended up requiring too much fiddling to get it to work right, or packages were inadequately maintained. So now, I tend to use it for quick, short code writes, especially when I'm remoted in to a server. I also use it for org-mode, and for writing my book. Now I use Pycharm for python and web development for things that can reasonably be called a "project"; the level of language support, introspection, and intelligent code prediction exceeds anything I ever achieved in Emacs. I use VSCode for quick scripts, and for when I need to do maintenance work on some old php code. I like it fine. It fits in this really nice place between a full IDE and a bare bones text editor like Notepad or even BBEdit (ha!).
- jonnycomputer 6y agoDon't get me wrong, a lot of these problems aren't really Emacs's fault. Jetbrains puts a lot of money and effort into its IDEs. If some commercial or nonprofit entity was actually committed to developing and maintaining elisp packages providing superb language support, then Emacs would have it. Maybe language support will get better with LSP; anyone know how that is going in the emacs world?
- justinlilly 6y agoI use lsp. It's not as good as pycharm, et al, but it's good.
- mplanchard 6y agoI’ve used lsp-mode for python, go, typescript, rust, and haskell. Had to do a little bit of fiddling with settings and trying different servers to get something performant for a very large python codebase, and I did some more fiddling to adjust some delays and whatnot to get everything feeling snappy with the way I edit text. I still find that it feels faster on Linux than on Mac, but I don’t use the latter much anymore anyway. My general impression of lsp-mode is that it’s great, once you get the settings the way you like them. Errors and warnings are nicely integrated into flycheck, and the lsp-ui package provides some niceties like automatically showing function signatures, showing error information inline with the code, and so on.
- Haarisgrey 6y agoOf course we got people like this!. I smoke and I’ve been a smoker for years. Most of the time I am surrounded by people who do not smoke at all. Doesn’t amaze me. I have some close friends, we hangout together international;y and vacation parties but they both have never smoked weed and I am a regular smoker and this thing doesn’t affect our friendship at all. It’s not about something being legal or illegal. If a thing is facilitating you either way it is totally okay for the other person to use it. I started using it for my chronic pain and eventually ended up like this. https://www.weedmarket420.us/ https://www.weedmarket420.us/ Being a marijuana enthusiast I keep on researching for good material and here I came across 5 new researches! Have a good day!
- dmortin 6y agoEmacs is a text UI (though it can show images too) on top of a cross OS programming platform where you can create quick UIs for any kind of task you have (interfacing with APIs, command line programs, editing tasks, etc.). Once you learn how Emacs works and how it can be programmed, you can create interactive tools extremely quickly to make lots of tasks you encounter day to day easier. I do this all the time.
- bmillare 6y agoDo you have any references/tutorials/examples on how to do this?
- kmstout 6y ago"Writing GNU Emacs Extensions" by Bob Glickstein is a solid introduction. After that, the Emacs Lisp reference manual (available as "info elisp" in the shell) gives much more detail. Inside Emacs, you can: - "M-x apropos" to search for commands of interest - "C-h f" to get documentation for particular functions by name - "M-x find-function" to jump to the definition of a particular function - "M-x find-library" to load a library into a buffer so you can read and (depending on your permissions) edit it. The Elisp reference is very good, and most libraries are well documented. Between that, the ability to jump around the code base, and trying things out in the "scratch" buffer (it's an Elisp REPL disguised as an editing buffer), you should be able to get quite far.
- dmortin 6y agoEmacs has built in documentation. Learning emacs lisp is a good start: https://www.gnu.org/software/emacs/manual/html_node/eintr/index.html https://www.gnu.org/software/emacs/manual/html_node/eintr/in... This manual is also the part of the emacs distribution.
- rcdwealth 6y agoUnix philosophy to use single programs for one task has its particular context, and Emacs does not fit into the context, just as no other programming language is made "for single text". Your comparison is out of the context.
- wqsz7xn 6y agoI'm surprised to find no discussion about the fact that emacs is single threaded. You can achieve a lot but at some point (eg: running it as a window manager) it becomes a little less snappy.
- sooheon 6y agoThis is the only reason why emacs is no longer my default editor. I value customization, but I learned I value snappiness more.
- b0afc375b5 6y agoIf you don't mind sharing, what is your current default editor?
- sooheon 6y agoIntellij idea for project based coding, nvim/emacs for quick edits. I've gone from "my life lives in emacs and org mode" to "I use a couple made for purpose apps and live with the fact that not everything is a buffer in a self modifying strange loop."
- 6pac3rings 6y agoI saw a post on hacks to bring video/animations into Emacs using :base_uri svg functionality going in the direction of subwindow glyph functionality.