Hacker News new | past | comments | ask | show | jobs | submit login
Emacs for Data Science (insightdatascience.com)
127 points by re_jena on June 23, 2015 | hide | past | favorite | 36 comments



I recently discovered org-mode. Honestly, it is by far the best note-taking application I've ever used, especially in any math-heavy field, since it supports cross-references and most math symbols. And unlike LaTeX which ends up filled with markup, org stays very clean. However the basic export (to HTML and pdf) is not that good.

There's also support for basic spreadsheeting, but it gets very slow as soon as you have more than a couple hundred rows with auto-computed column values.

Sample look and feel of one of my notebooks: http://i.imgur.com/SZTxQ6v.png


I use org on Github to maintain my notes. A lot of times I'll just edit directly in the browser and commit. GitHub renders with org-ruby:

https://github.com/bdewey/org-ruby


"However the basic export (to HTML and pdf) is not that good."

What are you referring to here? It's easy enough to customize the export formatting to whatever you want it to be, e.g., change LaTeX document class, switch to xetex for better font support, etc.


My biggest gripe is that it won't recognize that a block of text is math, unless I enclose it with $, which would then clutter the org file.


I am between asciidoc and org-mode. Org-mode has nice note-taking features. Asciidoc has the best export (html and pdf) I've seen.

With the calc package, emacs can even do basic symbolic math (e.g calculate a derivative function)!


Can you use auctex shortcuts when writing LaTeX code in orgmode?


What kind of shortcuts? Most LaTeX symbols will be replaced with their unicode counterpart, eg. \theta will become θ inline, once you toggle `entitiespretty' with C-c C-x \. Likewise for superscript and index, it changes as you type.

My equation blocks are created with M-o M-s which centers the current line in the buffer (when in fill-mode), so no need for C-c C-e equation.


Wait...I don't get how M-o M-s can replace C-c C-e. Am I missing something? That was the main one I was thinking of...


As a recent Emacs convert I was able to develop happily for Android/Java, Ruby, Rails, Web, WordPress and ChucK, Octave music language, a lot of CSV/Data import tasks, and minor C/C++ edits. For each one I had used a lot of IDEs earlier.


As a long time emacs user, it's great to know that it can grow to support new languages and environments. I wasn't aware that it supports Octave (the music language). Welcome to emacs, we hope you enjoy your stay!


http://www.gnu.org/software/emacs/manual/html_node/elisp/Der...

One of my favorite things in emacs. When confronted with an arcane, custom "language" developed 30 years ago because of some immediate need without serious care taken. You can create a custom mode that gives you syntax highlighting, indentation support and other things fairly quickly. And it beats the built-in "editors" present in a lot of tools, especially those that don't let you directly edit the text file but insist on making you click through wizards and dropdown menus.


This sort of thing is where I've found emacs most valuable. For proprietary or product-specific configuration and scripting languages, particularly ones where no decent editor is provided at all (or there's some terrible builtin editor, based on SciTE at the very best), being able to quickly put together an emacs major mode is very handy.

Once you've got the basics written, you can start to work. Then add imenu support, and you have file browsing. Then add your language to exuberant ctags - which has a line-based regexp mode that you can pretty much reuse your imenu regexps for - and get it to generate emacs-compatible tags files, and you've got basic cross-file symbol navigation.

(The quality of ctags-based symbol browsing can be hit or miss - for languages like Java or C++, where many mechanisms require symbols to be identically-named, it's not that great. But not-that-great is still a lot more convenient than nothing.)


Huh? Which Octave music language?

Do you mean this?

http://wiki.octave.org/FAQ#Why_.22Octave.22.3F


I can't find "octave music language" anywhere on Google either. But maybe the commentor was thinking of abc-mode and misspoke? That one is for a music language.

http://www.emacswiki.org/emacs/AbcMode


I bet he probably meant "Overtone" the music programming language / environment based on Clojure.

Though octave was originally a music term too.


The people named Octave are not named after music. It's just a variation of Octavius.


Actually Octavius itself derives from the latin for "eight" (octavus, which is were the music term also got it name).


Yes, of course, but the number eight means more than just music.

Sorry, it's a pet peeve of mine that people keep thinking that GNU Octave has something to do with music.


Out of curiosity, what do you use for Android Development with Emacs? I haven't tried for a while but last time I did I couldn't create a setup comparable to Android Studio.


I use the command line Android tools as well as Java and xml text editors and android mode . I have put a setup guide at emacs https://www.reddit.com/r/emacs/comments/22c916/any_android_d...


I m sorry. Chuck was the music language. Octave was the matrix lang and environment.


Yeah emacs is a very useful tool as part of your data science workflow.

So is IPython notebook.

So is vim along with tmux, a good tiling window manager, and shell-tools.

However none of them are without flaws. None of them are free from requiring you to peek under the hood, and start a path towards becoming a hacker of your own tools, be it vim-scripting using python, or emacs scripting using elisp or guile. And once you have a turing-complete language under your tools, everything a programming language can do your tool can. But if there's a missing feature set requiring non trivial amount of code and no one on the internet has developed that code, you have to either take a long detour from your main project to develop that feature, or keep working the hard way, without that feature.

And most importantly, none of them should get you under the impression that yours is the final tool you'll ever need and it'll solve all your problems!


Besides ready to use packages, main advantage of Emacs - its extensibility - I'm writing a lot of custom code in ELisp that helps me analyze files with results, interactively work with data in multiple databases (using some Clojure code executing via CIDER), etc.


That, and it's really good as an editor.

A lot of commercial IDEs are very well integrated with language and toolset, but often they're really not very good text editors (Visual Studio, I'm looking at you)


Talking about VS, I haven't done a lot of research but has anyone had some luck using emacs on windows for C#?


I don't program C#, but there is OmniSharp for Emacs: https://github.com/OmniSharp/omnisharp-emacs & you can look to csharp-mode page on emacswiki: http://www.emacswiki.org/emacs/CSharpMode (and this post: https://bbbscarter.wordpress.com/2013/08/17/c-autocompletion...)

P.S. There were C# parser for CEDET (in contrib), but it wasn't updated for a long time


This SciPy presentation (Kitchin, John Carnegie Mellon University) on Emacs + org-mode + python in reproducible research is worth a watch: https://www.youtube.com/watch?v=1-dUkyn_fZA


I have been using Sublimetext since few years. Its extremely productive.

Could anyone explain the advantage of Emacs over Sublime?


1) Available on most platforms (editing a file on the server.. emacs) 2) Its programable. You can store and replay key commands. I use this frequently to reformat data.. 3) Steep Learning curve, but its fast once learned. Its hard to learn and takes a while. The basics are pretty straight forward, but not entirely intuitive. 4) Its extensible. Though I find it hard to manage add ons. I use Org mode, but sometime have trouble remembering all the key commands. 5)Dired. Look up files and open.

For large projects I end up using the JetBrains IDEs. I think the "knowledge" of the project provides good insight. I think there are add ons to Emacs that will do the same thing. I haven't tried them. If I have to just open a file and edit, I'm happier in Emacs. I wish the IDE's would let you "bring your own editor"

If your happy with sublime keep using it.


Sublime doesn't interact very nicely with the terminal. There is a repl plugin, but it is slow and outdated. Is ctr-enter to send text to ipython that much to ask for?

If you use multiple platforms, you're gonna have a tough time remembering the keyboard shortcuts as some of them are totally different.

I haven't switched from sublime to Emacs, but it promises to fix all those things in exchange for more complexity.


Basic code editors like Sublime and Atom are great for web development. They have nice linting plugins, snippet resources and are easy to get up and running. As another poster mentioned, other editors are much more powerful and can make you very productive. I use vim and nano to do simple edits, in SSH (emacs can be used as well).

However, you really need to assess what you are doing. If you are a webdev sublime and atom are great. You can use an IDE like rubymine if you want more language centric features. If you are doing compiled stuff (not my area), it probably makes sense to learn VIM or Emacs because you can fly through your coding and have access to the compiler and all of your files quickly from one place.


I have been using emacs for over 15 years. I still discover new things. I am working on a distributed project and found tramp mode about a year ago. Its amazing for multi-hop remote editing. Worth the price of admission alone.


I love emacs but for mixing languages you are better off with a UI made for exactly that: the Beaker Notebook http://BeakerNotebook.com

note: we are hiring!


What does beaker offer in terms of text editing?


org-mode is great. I really like deft (http://jblevins.org/projects/deft/) in tandem with Notational Velocity and SimpleNote.


Not written by the 'real' Robert Vesco... https://en.wikipedia.org/wiki/Robert_Vesco

I've used Emacs for years, but never delved into org-mode.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: