10 ms·
Emacs Symbolic Integration
- choeger 6y agoThat is certainly impressive. But why does emacs have that functionality?
- patrec 6y agoWho in his right mind would use an editor that cannot even do symbolic integration? Joking aside, I suspect that this is mostly due to two factors: 1. Emacs was used by a lot of smart people, and one of them, David Gillespie got carried away a bit. 2. Thirty years ago, when David Gillespie first started working on calc, emacs lisp (despite at the time lacking even floating points numbers IIRC!), was probably one of the most expressive fairly widely deployed languages around, particularly for the type of symbolic manipulation you need to do for computer algebra. And unlike other things that were used by smart people 30 years ago, emacs still sticks around, so survivorship bias also plays a role.
- monsieurbanana 6y agoBecause it can... don't underestimate the amount of unrelated things you can crame into a 40 year old software. Interestingly, nowadays it's really difficult to convince people to add new features, like enabling mouse scrolling by default [1]. [1] https://lwn.net/ml/emacs-devel/20200906133719.cu6yaldvenxubcqq@Ergus/ https://lwn.net/ml/emacs-devel/20200906133719.cu6yaldvenxubc...
- linspace 6y agoI don't think it's a valid example. The discussion is about the default configuration, not about removing mouse scrolling from the code. It's a really big thread nevertheless...
- TeMPOraL 6y agoIt's a bit like asking why Windows has a calculator :). Emacs is best viewed a Lisp execution platform with a built-in text UI. Much like it has a "c++ app", "terminal app" and "compile this" app, it also ships with a "calc app" (literally called "calc"). Since it was being used by lot of mathy people for lot of mathy stuff, it ended up being a proper scientific calculator application. (Also, Lisps are inherently friendly for doing any kind of symbolic calculations. A Lisp system is one of the least surprising places to find a symbolic integrator in.)
- JadeNB 6y ago> Emacs is best viewed a Lisp execution platform with a built-in text UI. Hence the old joke "Emacs is a fine OS, but its text editor sucks."
- avar 6y agoHave you tried asking your local psychotherapist? M-x doctor RET I am the psychotherapist. Please, describe your problems. Each time you are finished talking, type RET twice. Why does Emacs need Symbolic Integration? What do you think? I don't know, just answer the question! Why do you say you do not know just answer the question? [...] Maybe you'll have better luck than I did with mine.
- TeMPOraL 6y agoCan't wait for someone to do a M-x doctor over GPT-3, AiDungeon style.
- sillysaurusx 6y agoOh my gosh, someone please add an M-x gpt-doctor. Hmm.. I wonder how we'd build the training dataset... How many other meme modes exist? I dug up the earliest commits I could find, and apparently one of the earliest hooks was "protect-innocence-hook": https://twitter.com/theshawwn/status/1327459335245422597 https://twitter.com/theshawwn/status/1327459335245422597 If the buffer's filename is "sex.6", it asks whether the user is over 18. If so, it renames the buffer to "celibacy.1". Apparently it was in the file lisp/play/meese.el. Emacs archaeology is more fun than it should be.
- TeMPOraL 6y agoThere's M-x zone, a bunch of games - anything from Tetris and Bubbles to Zork, morse code handling (M-x morse-region, unmorse-region), inserting interesting phrases for NSA spooks... There's a lot. There's also nyan-mode, made by yours truly, but unfortunately it does not ship with Emacs by default :).
- sillysaurusx 6y agoWho do we have to lobby to get nyan-mode into emacs mainline? Happy to send a recommendation email. Was surprised how high quality the repo is, too! https://github.com/TeMPOraL/nyan-mode https://github.com/TeMPOraL/nyan-mode It even has an accompanying blog post, which I found informative. http://jacek.zlydach.pl/blog/2011-08-25-introducing-nyan-mode-el-turn-your-emacs-into-nyanmacs.html http://jacek.zlydach.pl/blog/2011-08-25-introducing-nyan-mod... And even a Show HN. https://news.ycombinator.com/item?id=2906632 https://news.ycombinator.com/item?id=2906632
- ssivark 6y agoEmacs is best understood not just as an editor, but as an integrated computing environment promoting user freedoms to the fullest extent possible in a manner naturally integrated with its user interface and extensibility. In that sense, it shouldn’t be the least bit surprising to see the kind of in-built application suite one would expect from an operating system or desktop environment. One must also remember that historically the most common computer (power) users were academics, and not “software developers” — so expect a lot of scratches for their itches. It’s a bit like asking why does bash come with a utility like awk or bc; it’s equally natural.
- pjmlp 6y agoBecause awk and bc are UNIX programs that precede bash and are part of any POSIX certified UNIX, whereas bash is not. https://pubs.opengroup.org/onlinepubs/9699919799/ https://pubs.opengroup.org/onlinepubs/9699919799/
- vifon 6y agoThe manual actually answers this very question: https://www.gnu.org/software/emacs/manual/html_node/calc/History-and-Acknowledgments.html https://www.gnu.org/software/emacs/manual/html_node/calc/His...
- TeMPOraL 6y agoThanks for posting this. Not only it's an amazing story of scope creep, it also revealed a bunch of features I didn't know calc had (e.g. unit handling, arbitrary-size math).
- funkaster 6y agothanks for the reference! love the final acknowledgement in there: > Final thanks go to Richard Stallman, without whose fine implementations of the Emacs editor, language, and environment, Calc would have been finished in two weeks. :D
- worik 6y agoI often find it useful t do a calculation while I am editing. For example when I write a invoice I have to calculate taxes. I have not had to use the more advanced features. I did not know that they were there. Now I know, perhaps I do need them?
- melling 6y agoEmacs is a big Lisp interpreter. Elisp is the most popular Lisp in the world. Why wouldn’t you want to improve it?
- mschaef 6y ago> But why does emacs have that functionality? GNU Emacs is a 36 year old tool that's been targeted at programmers its entire life, is built on an interactive Lisp environment, and actively encourages external improvements and contributions. The more interesting question is why _wouldn't_ it have that functionality.
- a-nikolaev 6y agoA healthier approach is to have a separate non-Emacs app that can do symbolic integration, which can be run seamlessly from within Emacs. Otherwise, with all its extensions Emacs starts giving the impression of an Apple-like walled garden, which is not a good comparison for a free software, no?
- thotsBgone 6y agoHow is it a walled garden if it's free, open-source software?
- a-nikolaev 6y agoEmacs is its own ecosystem, you either buy it all, and grow to use it more and more, or don't get to use it all. So in a way it separates itself from the rest of Unix ecosystem.
- thotsBgone 6y agoOnly because much of what emacs does is cumbersome or impossible as regular software.
- a-nikolaev 6y agoa lock-in is a lock-in, even if with free software, it incurs certain costs on you, even if it provides convenience.
- ojnabieoot 6y agoIn general - developers use calculators all the time (most frequently via Google these days, but also via REPLs) so a dedicated calculator is a self-evidently useful widget for any editor. It’s is not essential fir a new editor in 2021 but considering emacs has had Calc for some time, it is worthwhile to make improvements to widely-used legacy software. Many emacs users have used Calc in lieu of alternative “developer calculators” like Octave, the R REPL, etc, so it’s not like Calc is an extraneous feature. It’s uncommon for developers to deal with integral equations in their day-to-day work. But it’s obviously not unheard of - integral equations show up naturally in many domains of finance and engineering. I’ve had to deal with numeric integration on .NET in one of my jobs. Sometimes an exact symbolic solution is easier for the developer and the CPU than a numeric technique, so for a small handful of developers a symbolic integral calculator is a handy (if somewhat specialized) tool, and not just some bell-and-whistle.
- legends2k 6y agoBecause enough of its users use it? I'm a graphics programmer and I use Emacs' in-built RPN calc for its linear algebra capabilities almost daily.
- sachdevap 6y agoOne amazing use of symbolic integration: https://github.com/johnbcoughlin/calctex https://github.com/johnbcoughlin/calctex Create latex equations in calc! :D
- iib 6y agoThis looks interesting and I want to use it. It seems to not be available on melpa, and the installation instructions for linux are missing, though. Are there any instructions for installation on linux that I miss? Apart from the cloning and tinkering that I will inevitably do if there is no easier way.
- submeta 6y agoEmacs has got to be one of the most misunderstood pieces of technology. It's often made fun of [1], just because of this misunderstanding. Saying Emacs is an editor (mostly), is like saying a smartphone is a phone (mostly). Emacs is actually an appliction framework (and a Lisp machine) with a unified interface where one application can share data with other applications via "buffers" very easily because the basic data is text (no proprietary or fancy datastructures that can get outdated at some time). With this underlying structure (plus with the integrated programming language Lisp) you can connect, combine, configure (to your liking) every application within Emacs easily. In non-Emacs world, using isolated apps (islands), I'd "beg" the dev teams to add this or that feature to make it more productive [3]. Not so in Emacs-land, where I can change every aspect of an app within minutes. I have legacy tools / apps that were discontinued, and my data is stuck in those formats [2], and I don't have the time to migrate those documents. Emacs is here to stay. And offers many apps (packages) for many use-cases: org-mode for project management, task-management, taking notes, writing complex documents, creating technical documentation with inline images, ascii tables, with embedded code (that can get run via org-babel); lsp-mode which transforms Emacs into a decent IDE; calc for doing basic to complex calculations within Emacs (documents); org-babel for doing literate programming; eshell for using your shell within emacs; mu4e which is a very good email client (says someone who used to use MailMate and was thrilled I could use keyboard shortcuts to control lots of aspects of my email client), and many more. Emacs is the tool that will grow on you, and it will get better the more you learn about how to configure it. --- [1]: "a great operating system, lacking only a decent editor" [2]: EccoPro PIM from the 90s, AskSam (full text database) from the 90s, NoteMap (outliner), MS Access databases (from the 90s/2000s) with old format, and many many more. [3]: Whenever I liked an app, I'd quickly start writing with dev teams back and forth in forums or via email. Bear.app, Ulysses.app, iA Writer, DevonThink, etc. Constantly writing to the dev teams, asking to include this or that feature.
- TeMPOraL 6y agoYup. All this. Emacs being a platform within a platform is a feature. It comes with an extra benefit: it's a free (libre) platform. Completely shielded from corporate interests. There's no bullshit inside. No proprietary formats, no unnecessary network dependencies, no "X as a Service". Just a community of folks maintaining and expanding a parasitic OS that embraces interoperability and personal productivity above all.
- Koshkin 6y agoSure, emacs is an OS [1], you can write any kind of programs for it. On the other hand, you can do symbolic calculus in Scheme - see, for example, MIT Scheme-based Structure and Interpretation of Classical Mechanics (which, incidentally, is perfectly usable from inside emacs). [1] http://www.informatimago.com/linux/emacs-on-user-mode-linux.html http://www.informatimago.com/linux/emacs-on-user-mode-linux....
- fooofw 6y agoOf course, in this example, the symbolic calculus functionality is distributed with the OS, or arguably even as part of it, which I guess is a bit more rare than simply having the option of installing it.
- contravariant 6y agoDamn I'd been searching for ages to find a proper calculator. Turns out it's Emacs. Now I just need to get it on my phone somehow.
- agumonkey 6y agoAs a palliative you can always use some hp48 emulator.. you get some forth and some lisp all at once.
- brlewis 6y agoAndroid? Termux will run it, even the Termux in the Play Store.
- sea6ear 6y agoWhat kind of phone are you using? If it's Android you can at least for the moment get Emacs on there using Termux. That's what I do - and it works pretty well. It might also be possible via UserLAnd, although I have not tried UserLAnd personally. It seems like iSH on iPhone may provide similar ability (again do not have direct experience) although it seems unclear at the moment how long it will be able to remain available.
- jnxx 6y agoYou can run emacs on sailfish.
- agumonkey 6y agoOh yeah.. of course it calc. On the tinier lib side there's bindat, to fiddle with binary data straight from elisp.
- sandinmyjoints 6y agoNice, didn't know about this!