8 ms·
Show HN: Hydrogen Brings Light Table to Atom
- ibdknox 11y agoThis is very cool work. :) Great job Will! When Atom was first launched I mentioned that it might make sense to port the interesting parts of LT over to it since the core editor isn't what's important (and it's also a ton of work to get right). LT has found its way into lots of projects, from the Chrome Dev Tools to XCode and IntelliJ, which is a tremendous honor for us - it's great to see it coming to Atom as well.
- willwhitney 11y agoThanks for the support! I've been thinking a lot about what makes for a good development experience, and how to properly "factorize" an IDE to provide a consistent experience across different languages. The monolithic IDE experience can be great (once you get it set up) if all your work is in a single language. But for people like me, having a confusingly different development environment for each project is a nightmare. This is a tiny step toward the dream of having a consistent core editor but with powerful tools for each language that allow introspection into the state of the running machine.
- wferrell 11y agoWill -- Nice work! Been hoping for something like this and an excuse to use Atom
- willwhitney 11y agoThanks Bill! Atom has been improving really fast - it's my editor of choice now.
- azeirah 11y ago"Nice work Will", "Thanks Bill"!
- stuaxo 11y agoThis is great, I've been thinking in a similar about something like this for 'visual debugging', for a livecoding tool. It would be great if this could recognise some common image formats in memory (cairo surfaces, PIL) and visualise those on mouseover. Possibly similar for arrays - be able to visualise it as a wave or even playback as audio. Is there any chance of factoring out the support for the popouts? - It would be great if this could appear in other editors.
- willwhitney 11y agoI'd love to do live variable inspection (like the Chrome Dev Tools) — it's something I'm thinking about for the future. There's a (nascent) project called `jmp` (for Jupyter Messaging Protocol) that implements kernel communication in JS: https://github.com/n-riesco/jmp https://github.com/n-riesco/jmp. I'll probably contribute to that and factor out my kernel communication.
- lambdaops 11y agoI'm starting up a way to do this with an Electron app (the base of Atom), called Jupyter side car. It's not ready yet, but will share some of the same components. All this is pretty exciting for the Jupyter project.
- revenz 11y agoCan you expand on where I might find details on LT in intellij?
- redtuesday 11y agoWould be interested in this as well. I only know the "Scala Worksheet" which is similar: https://confluence.jetbrains.com/display/IntelliJIDEA/Working+with+Scala+Worksheet https://confluence.jetbrains.com/display/IntelliJIDEA/Workin... and apeared first in Scala-Ide.
- lemming 11y agoI think he's referring to the in-editor debug values in IntelliJ v14.
- bryanjos 11y agoThat looks so cool! I'm not an Atom user anymore (jumped back to Sublime), but this is the kind of thing that makes me want to jump back again. Wondering if there is an equivalent for Sublime.
- dethstar 11y agoThere's plugins for different languages e.g RubyEval
- wldcordeiro 11y agoSublimeREPL exists as well and it does a great job for many languages.
- rattray 11y agoSublimeCodeIntel doesn't do quite the same thing, but does at least provide intelligent code completion for languages including Python. I think it can be a bit buggy, though - and this actually has the autocompletes come from the kernel, which is clearly better. In short, I'm in the same boat about wanting to jump back to Atom. Just want to wait on improved performance, which I hear is in the works.
- jinxedID 11y agoI wonder if they know their logo is also the Ionic logo?
- willwhitney 11y agoShit, really? <Googles> Huh. I just banged this out in ten minutes when I needed an icon for autocomplete. I'll change it.
- gabeio 11y agoI feel like it's not/shouldn't be possible to copyright/trademark/etc an element/element's atomic structure unless it's man made.
- joshuapants 11y agoRegardless of whether that's the case, it's probably best to avoid having a logo that looks very similar to another, if only to avoid confusion. That said, the atomic structure isn't the concern but rather a specific artistic visualization of it which may be protected.
- zyxley 11y agoBut the copyright (if there is one in this case) isn't on the element, it's on the specific visual interpretation of it for branding purposes.
- gabeio 11y agoI still feel like that's basically "copyrighting"/or otherwise the atomic structure of the element...
- weego 11y agoA filled circle with a ring round it that has an intersecting filled circle is not an accurate representation of how a hydrogen atom looks. It is an artistic simplification. There are any number of ways of interpreting it.
- shepardrtc 11y agoVery cool is an understatement. I can't imagine the amount of work that is going on behind the scenes to orchestrate this.
- willwhitney 11y agoMost of the credit goes to the Jupyter team and the people who have implemented the kernels for various languages. The Jupyter API spec is what has made this possible. I'm really looking forward to what can be done next (hint: https://github.com/jupyter/notebook/issues/99 https://github.com/jupyter/notebook/issues/99)
- RangerScience 11y agoWhat's the state of using this with non-Python languages?
- willwhitney 11y agoI'm actively using it with Julia and Torch. It should work with any Jupyter kernel (and there are lots: https://github.com/ipython/ipython/wiki/IPython-kernels-for-other-languages https://github.com/ipython/ipython/wiki/IPython-kernels-for-...). In practice, different kernels have various oddities or holes in their implementation of the spec. I'm accommodating them when I can and posting issues when I can't. Let me know if you find a kernel that doesn't work!
- bronson 11y agoWow, that's a lot of languages! How is the Ruby support? A Rails console in the file I'm writing sounds epic. No longer would I need to clumsily suck the interesting lines back out of irb history using copy/paste. Looks active: https://github.com/SciRuby/iruby https://github.com/SciRuby/iruby I'll have to try it.
- willwhitney 11y agoI haven't tried the Ruby kernel - let me know how it works, and post an issue if anything breaks!
- bronson 11y agoPretty dismal for now. :( https://github.com/SciRuby/iruby/issues/1 https://github.com/SciRuby/iruby/issues/1 It looks like they got it working with python2, then the switch to python3 broke everything. Hopefully in a few months the python3 version will work better than the python2 version.
- outworlder 11y agoI was thinking about the same thing yesterday! Glad to know it already exists. My own Emacs feels... inadequate right know. But I guess something like this could be done for it too.
- jscottmiller 11y agoNice work. Question for anyone using light table or similar environments on a day-to-day basis: does this statement-by-statement eval and output scale to larger projects? It makes a nice demo for contained scripts, in particular those working with a concrete dataset (image, samples). I have trouble imagining what it is like for larger, more abstract stretches of code.
- willwhitney 11y agoI like to break my code up into little functions that are easy to test, so that flow works well for me. Even more powerful, though, is autocomplete from the running environment. It means that (just like in the Chrome Dev Tools) when you start typing something, the autocomplete suggestions include all of the valid names that are defined. It really helps in navigating complex APIs like Torch: https://www.dropbox.com/s/e6hriw5quwct65a/Screenshot%202015-05-20%2016.37.51.png?dl=0 https://www.dropbox.com/s/e6hriw5quwct65a/Screenshot%202015-...
- nawitus 11y agoHow powerful is autocomplete, when statically typed languages also provide it?
- willwhitney 11y agoThe development experience for statically typed languages is often _amazing_ compared to that of dynamically typed ones; we sometimes choose dynamically typed ones anyway because of the flexibility and speed of development they give. I'd be very happy with an environment that provided dynamically typed languages the same analysis, checking, completion, etc that statically typed languages take for granted.
- seanmcdirmid 11y agoI'm working a type system called type-less that is oriented in this direction; check out: https://www.youtube.com/watch?v=II1PgYTPW_U https://www.youtube.com/watch?v=II1PgYTPW_U I need to do another video soon, the work has progressed a bit further since then.
- sherbondy 11y agoCongrats on the release, Will! This would make for a killer default env for MIT's 6.815 course (http://ocw.mit.edu/courses/media-arts-and-sciences/mas-531-computational-camera-and-photography-fall-2009/syllabus/ http://ocw.mit.edu/courses/media-arts-and-sciences/mas-531-c...) (presently taught in Python). Also, ahem, I believe it is now time to JUPYTER ALL THE REPLS.
- willwhitney 11y agoI'm looking forward to that Elixir kernel!
- lambdaops 11y agoYes please, Jupyter all the REPLs.
- philipn 11y agoFor a vim version(ish) of this, be sure to check out vim-ipython: https://github.com/ivanov/vim-ipython https://github.com/ivanov/vim-ipython
- jarpineh 11y agoYes! I like this very much. This is the favorite feature I used in LT (though I've wished to delve more in its architecture), I never really got the hang of external REPLs and browser sessions. I recently tested Wallaby.js, which brings LT approach to testing. Now I wonder if the logic in Hydrogen could be extended to call module's tests and bring results just like the evaluation messages come. I think both immediate coding and testing might make coding more intuitive and reliable. Is there an Atom to Jypyter bridge or something? How does Hydgoren and Atom communicate with Jypyter kernel?
- willwhitney 11y agoJupyter provides a spec for a ZeroMQ-based messaging API, which kernels in each language have implemented. Hydrogen acts as a client to those kernels the same way that the Jupyter frontend does, sending execution requests to the kernel and displaying responses. I'd love to see live test results in Atom too! It would make it so much easier to be confident in your code's correctness.
- jarpineh 11y agoThank you. I managed to miss that when reading the first time. I'm currently learning testing with the TAP protocol [1], which might be simple enough to bring into Atom or Oxygen and also use in Jypyter languages. I know that Python and JavaScript supports it. Just had another thought. Regular Jypyter kernel supports multiple connections. Have you tested connecting to Oxygen's Python kernel from Notebook or IPython session? I'm thinking that console + Atom is nicer environment for a coder than Notebook. Afterwards the session could then be saved as a Notebook. Anyways, I must now find time to dig into this! I don't like to leave my editor just to look at code execute nor tests run, there is more than enough context switching in programming. [1] http://en.wikipedia.org/wiki/Test_Anything_Protocol http://en.wikipedia.org/wiki/Test_Anything_Protocol
- dimino 11y agoAs recently as today I thought IPython might be worth looking into -- I've heard too many good things about IPython to ignore it, but I didn't really know how to get started. I guess I don't have that excuse any longer! My only concern is that my mind will have trouble adjusting to the evolving state of the "app" I'm working on -- it seems like values in lines above others change, which then change values at other places, not just below the code? Will take some getting used to.
- knicholes 11y agoWhile this is very cool, it seems like this type of development supplants TDD by running the intermediate results manually once and is forgotten.
- saidajigumi 11y agoI find this a surprising reaction, just because for so many devs I've known, it's common to keep a "sketchpad" interpreter open to mess about with code ideas. And these are all dedicated TDD folks. Perhaps if the dev(s) in question don't really understand TDD, but I think that's a cultural problem rather than a tooling problem. In my experience, "getting" TDD is about two main things. First, internalizing what to test & why to test. (Fortunately, we've got a lot of help these days on the "how to test" front.) Second, having that moment when having tests makes your life-as-developer easier, or perhaps just possible. (Re: "possible", I recently upgraded a mature, legacy Rails 2.3 app to Rails 4.2. My blessings upon the devs prior to me who saw fit to create a comprehensive and well-maintained test suite. Without that, there would have needed to be a "throw it away and start afresh" discussion. Perhaps even project cancellation.)
- lewisl9029 11y agoI have a question for those who are either still using Light Table or have switched away from it: I've been meaning to start a project in ClojureScript and was thinking of using Light Table as my editor. I vaguely recall seeing news about development of Light Table slowing down, but despite this, would you guys still recommend Light Table today for Clojure/ClojureScript development? In its current state, how does it compare to editors like Atom/Sublime and whatever other options that are out there for Clojure development?
- mattdeboard 11y agoI would recommend Emacs or vim. I know for sure that both of these have really great development environments.
- _halgari 11y agoSupport for ClojureScript recently got a lot better in Cursive Clojure. I recommend giving it a shot.
- mattdeboard 11y agoI don't understand how people use Atom for Python. Indentation in language-python is broken. https://github.com/atom/language-python/issues/64 https://github.com/atom/language-python/issues/64 https://github.com/atom/language-python/issues/22 https://github.com/atom/language-python/issues/22 There are also several syntax highlighting issues but those aren't deal-breakers like broken indentation. I'm sympathetic, I help maintain elixir-mode for emacs. I know it's hard to get this stuff right. But all things considered, Atom is unusable for Python for me. I was using it for working with JS & React but now that web-mode seems to have ironed at many kinks, I'm back to Emacs.
- chc 11y agoPython indentation in Emacs was awful for a long time too, wasn't it?
- mattdeboard 11y agoDoesn't matter, it works now. This isn't a moral question about which project has had the fewest bugs in their respective lifetimes. It's a practical question about which mode gets auto-indentation right right now. edit: I don't know the answer to your question. What I do know is that it's really hard to get indentation right in Emacs for languages with significant whitespace where new lines are the only marker, and I assume the same is true for TextMate (which Atom piggybacks on for indentation). I'm not an expert on emacs, emacs lisp or creating language modes for emacs, but I do have a decent amount of experience[1]. So when I say I'm sympathetic I mean it down in my bones. But still, if an editor can't get auto-indentation right, it's a deal-breaker. [1] https://github.com/elixir-lang/emacs-elixir/blob/master/elixir-smie.el https://github.com/elixir-lang/emacs-elixir/blob/master/elix...
- chc 11y agoOh, I didn't mean it as a moral question or smack-talk or anything like that. I was just noticing that Python seems to be neglected by a lot of editors. I'm normally an Emacs user, but I gave up on it for Python because I had to spend too much time fighting it on indentation, so I was kind of surprised to see it mentioned in your comment and it made me think.
- billwilliams 11y agoThank you for bringing us the future.
- billwilliams 11y agoAny easy way to run remote kernels?
- willwhitney 11y agoRight now it only works with local kernels, but that's on the to do list for sure.
- billwilliams 11y agoAwesome, great work. This is one of those situations where I wish massive bribes were part of the open source ethos.
- willwhitney 11y ago:D I mean, if you're offering...
- rando3826 11y agoI clicked the link and then my browser (firefox) froze. Thanks.
- rando3826 11y agoAnd it repros.
- hysan 11y agoIf you're on the latest Firefox (38), then it has been insanely crashy. Even with the 38.0.1 update that supposedly fixed a crash bug, the browser still crashes on a lot of websites. I'm not sure why Mozilla felt the need to push a suboptimal version out, but it is making me think of leaving Firefox again (been very unstable for me the past few versions).
- ajtulloch 11y agoAwesome - and very cool to see ITorch getting some love. Thanks very much @willwhitney.
- spv 11y agoThis is cool but I am eagerly waiting for this though https://github.com/atom/atom/issues/307 https://github.com/atom/atom/issues/307