Hacker News new | past | comments | ask | show | jobs | submit login
Meet the new Light Table (chris-granger.com)
362 points by bergie on Nov 6, 2012 | hide | past | web | favorite | 101 comments



It looks awesome but the new user experience was a little rough for me. Here’s what I did:

1. Click in the command bar. The autocomplete menu popped up.

2. Click "new". The menu disappeared and the command bar loses focus.

3. Click in the command bar again and type "new", hit enter (it’s pretty common to be able to create new, unnamed files in editors). This message shows up in the upper right hand corner of the window:

    Uncaught Error: Doesn't support name: (file:///Users/sidney/.lighttable/js/bootstrap.js:10616)
4. Click in the command bar again and type new, then hit space. Ah, OK, I’m supposed to pick a filename. Type one ("foo.clj") and hit return. A tab opens up with the file.

5. Type some code. Nothing’s happening on the right. Isn’t that supposed to be the big thing about Light Table? (Also, the error message from the beginning is still hanging around. Huh.

6. I go to the command bar again, find the `connect` command. "Connect to a project", sounds right. I type "connect" and hit return. "Connecting" shows up in the bottom right of the window for a few seconds, and then this message pops up over on the left:

    Could not find project.clj file at ""
7. Okay. I run "connect" again with my filename. Similar message.

8. I go back to the welcome page and notice the command+shift+enter command, ah, OK. I hit it and a dialog shows up.

9. I don’t have a project so I click "start a local client". The "connecting" message shows up for a few seconds, followed by "Connected to Light Table server". Awesome!

10. …nothing's showing up on the right side of the window, the "connected…" message disappears. Huh. I type command+shift+enter again, and get the same "You're not connected" dialog as before.

11. I relaunch and try again, same result. I’m stuck. I look at the screencast again and try the instarepl command. Everything works, nice!


Thanks for this, it's a wonderfully detailed explanation of what you went through - mind putting it into a bug report for me? We have a ton of user testing to do and this is the first breath of air this particularly set up has seen (it didn't even really exist two weeks ago!)

Some of these are things that just completely slipped my mind (e.g. clicking on the helpers), some are things that are just that the platform is so new it doesn't have any documentation, and some are just flat out busted assumptions on our part.


If someone goes to that much trouble to explain a bug, I generally expect the developer to file it. It is really a let down when someone has gone to that much trouble and is asked to do more work.


It wasn't a matter of the work involved, it's a matter of wanting to keep in touch with the person.


Absolutely... how difficult is it to copy and paste?


The problem is the developer might want to get feedback from the user (eg: some bugs can't be reproduced). If the developer just copy & paste into the bugtracker then he/she will have a hard time communicating with the user.


Then you should reply with the bug ID and a URL to the bug that you filed and then the reporter can add themselves if they feel like they want to keep track of it.


For the developer, or the bug reporter?


I hit the same issues as above. Once I found a project created with the last version of LightTable that loaded I was up and running. One thing I've noticed is evaluating an expression with Cmd-Enter seemed buggy until I realized it automatically evaluates the outermost expression rather than the previous expression which I expected due to my emacs C-x e experience.

Finally, I love the color theme and feel of this in general, great stuff!


I can open the command menu, that's it. "Enter" should execute the cmd? Nope, nothing in the main cmd window works.

But the shortcuts do work! Creating a PHP works, does correct coloring, spacing. Executing ... "not connected" -- "Start a local client" -> "Connected!" -> Executing -> "Not connected, connect your project".

I am disapoint ;(


You got a lot further than me I got frustrated around number 6. Isn't useful for me to know my clj file is missing if no one ever tells me about it. I gave up.

Looked cool but I'll just stick to Vim / Sublime / etc.


Looks like a good concept, but I really cannot see how this would work for functions with side effects? What if I write `File.rm("something")` and press enter?

And how would this work with, say, Ruby on Rails development?

Can anyone throw some light?


This is an issue[1] that SublimeLinter ran into when syntax checking Perl modules. Code in a BEGIN block (which gets executed at compile-time) could actually delete files when using `perl -c` to handle syntax checking:

BEGIN { `rm -rf $ENV{HOME}` }

They had to switch to using static analysis rather than relying on Perl's built in syntax checking to avoid executing code in BEGIN blocks.

[1] https://github.com/SublimeLinter/SublimeLinter/issues/77


As with all tools you have to consider if it's the right place to use it. Things like the instarepl aren't very valuable in highly side-effecting code, but being able to evaluate some block on command still is. You still have to test if that code that removes a file is doing what you think it is as you write it. That being said, you have full control over what does and doesn't end up eval'd - just don't press cmd-enter :)


just don't press cmd-enter

That seems like a dangerous approach. People could get in the habit of hitting cmd-enter, and accidentally run some destructive code.

Perhaps you could sandbox the execution environment so destructive operations are logged but not actually performed.


There are environments that have been behaving just this way for decades (emacs elisp buffers, Satimage Smile for AppleScript text windows) and no one complains or claims it's not well worth the risks. How is typing in any destructive code anywhere or command lines at the shell and just hitting enter different? If you don't know approximately what your functions are doing, you should never call them under any circumstances.

In practice, this has just not been a legitimate concern. Yes, you have to look both ways before you cross a busy street; people are pretty good at looking both ways.


Yes, in SQL and filesystems, such security relies on permissions at a lower level than your shell/REPL.

(BTW, this post is written using Light Table, rather than the usual emacs. Nice feel! :)


> If you don't know approximately what your functions are doing, you should never call them under any circumstances.

Then why would I use an editor that its main selling point is how easy it is to do that?


Well, if you really want to be on the safe side of that particular power vs. safety tradeoff, the repl code could run from (say) clojail. (https://github.com/flatland/clojail)


But why would you do that? Press enter only where it makes sense. It's just like with other tools, you can cut your finger with knife, but that doesn't make knives less useful.


If I can do it only when it makes sense, I would default to "don't do it". So what's the point of binding it to oh-so-convenient shortcut key, when I have to think about when I can do it? What's the different from using terminal or Makefile to run it then?


You can't do it only for very specific cases. And even `File.rm("something")` usually works because if you are removing something, you have code for creating it too, and can quickly test both with command+enter, instead of opening whole application and trying to invoke that through your gui or something.


If File.rm("something") is undoable, then its not a problem right? We are talking about developer tools anyways, its not inconceivable that a mock environment would be setup for the program with undoable side effects or what not. However, this would require serious programming model changes, which are probably not in the scope of Light Table.


Which is a shame. As joesb points out above, this severely reduces the benefits of the "instant execution&feedback" features.

Given that this is an alpha release, maybe it's still time to rethink that approach and allow for sandboxed environments.


There's absolutely nothing preventing a sandboxed environment :) Connections are just processes that talk over tcp, if the client wants to sandbox whatever it evals, it can definitely do that.


Sorry I wasn't clear, but the ability to "undo" an operation definitely requires a programming model change. The sandbox is only one part of that.

Rolling your own magic sandbox isn't going to help much without more buy in from the environment (though, I'm sure most of us test in sandboxes anyways).


Even GHC's (Haskell) REPL executes side-effects.


I'd expect that instead of eval, you'd want to run some sort of unit test for effectful code.


The child process could be run inside a chroot jail, or a virtual machine.


To that end the developer could anticipate that their code has a lot of side effects and just run light table in a test vm with snapshots to hop back to in case they really mess up. Setting one up isn't hard, and you only pay the overhead cost of a vm or separate test machine if your use case demands it that way.


I'm really curious about the architecture and stack of lighttable. Please Chris if you could answer some questions it would be great.

How does it work internally?

What are the 'under the hood' differences between 0.2 and 0.1 and why?

Could you share some of those things learnt through all this time building this interactive platform?

How are you doing to get a cross platform desktop app with web tech? (I guess you still use cljs for it)

I'm really curious, and I wonder myself why nobody asks this kind of questions


It uses node-webkit as the host, which combines Chromium and node.js: https://github.com/rogerwang/node-webkit


From what I can tell it looks like it's using the Chromium Embedded Framework

http://code.google.com/p/chromiumembedded/wiki/GeneralUsage


I am also really curious about these points and would like to hear what Chris has to say about them.


These are all things I plan to talk about in my next blog post :)


I love what Chris is doing, but I have yet to understand what Light Table does differently from say Emacs's own lisp evaluation mechanism.


My opinion is it's time for a UI-driven developer framework with the hackable spirit of Emacs. I hope LT goes in this direction.


One diffrence is these data flow stuff threw the code. I have not seen that anywhere else. There are some otherthing that are diffrent. The way they want to handle files for example.

I would say that Light Table is nothing revolutionary but it is long awaited evolutionary. Finally a modern envoierment that is really easibly extensible.

Emacs is great but you have to admit that it is truly aged. Things like eclipse are diffrent from these dynamic smalltalk IDEs that LT trieds to be like (without having the same weaknesses).


At the very least, Emacs + WebKit would be a cool project. Emacs is great but one thing it doesn't have is bindings to modern graphics libraries. Can you imagine what people could do with that kind of lisp environment + a canvas element?


Any idea when we can expect first traces of python support?


You might want to check out ipython notebook: http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.... and http://ipython.org/videos.html

It's a pretty awesome interactive Python environment.


I have IPython. I want Light Table as well :)


In fact, IPython has a notion of a kernel, a process speaking a documented protocol over ZeroMQ to execute code, provide tab completions, and so on. The way LightTable talks about 'starting a client' makes me wonder if it could use IPython to provide some of those features.


...or JavaScript support, for that matter. Editing JS files seems to work, including syntax highlighting, but I didn't find any way to connect the instarepl to other "projects" than Clojure


From memory python was the last item on the roadmap. Wasn't it an added extra if they got over a certain amount in the kickstarter project (which I think they reached).

Ah, actually, looking at the project [0] it says "Python will be the third language to be supported out of the gate"

[0] http://www.kickstarter.com/projects/ibdknox/light-table


Competition is good and benefits the consumer (us developers) greatly! While I cannot see how this would work and be useful for languages like Ruby/Python/PHP, maybe the Light Table creator does - and I'm excited to see what's coming.

I can't wait to try the finished product!


Chrome alerted me that this file is not commonly downloaded and may be dangerous. Might want to look into why Chrome is flagging your Windows download as potentially hazardous.


It's probably just because the file consists of an unsigned executable inside a zip file, which has to be one of the most common ways that viruses are distributed.


I tried to dismiss the warning and it just deleted the file on me.


I like the idea of Light Table but what is a deal breaker for me is that it feels like there is an ever so slight lag between pressing a key on my keyboard and the character appearing in the Light Table editing area.

I am very picky about the way typing feels in an editor, and if it feels slightly laggy or slow then that editor is not an option for me, even if it does have all sorts of other awesome features.

Does anyone else feel this or is it just a problem with the app on my MacBook?


I don't notice anything unless I have my machine doing some crazy stuff. That being said we haven't done any real performance tuning yet. Out of curiosity what macbook do you have? I run one of the 2011 airs.


I have an old 2009 white plastic MacBook, running Mountain Lion. This is definitely an underpowered setup given its age, but I generally feel that it is fast enough for the programs I use, including Sublime Text 2.

I've had the typing lag feeling with Coda 2 before, but that is to be expected because Coda is such a bloated piece of software with so many features, trying to run on my old MacBook. But I guess I expected Light Table to be a lighter piece of software like Sublime Text 2, so I was surprised to find that when typing in it I felt the same lag as I do when typing in Coda.


Well, it's HTML/JS. Doesn't mean you can't make it fast, but it's a slightly uphill battle, especially with large files.


Perfect, now edit that T in the lettering to match the reversed L in the logo ;)

EDIT: name -> lettering


Like this? http://d.pr/i/SJhg

I thought the same as you until I mocked it up. Perhaps they tried it too and thought it looked a little too much like a seven: LIGHT 7ABLE


I see what you mean. I'm not sure if the current lettering is better or not than yours.

Surely it's easier to read, but the reversed L is a lot more iconic.


First of all, I love this project and await vim keybindings with bated breath. Light Table + Clojure make me feel like I'm programming in the future.

One issue in this new build, the stacktrace/error widget feels a bit awkward e.g. http://i.imgur.com/RVYHU.png Is this likely to become 'dockable' at some point?


Yeah, I'm not happy with how that works yet. I ended up compromising on what it does now, because I couldn't seem to get CSS to cooperate with me on how I really wanted it to work. There will definitely be improvements to that bit.


I think you need to be more direct with what Light Table does. I tried creating a C file and executing it, it prompts me to start a "local client" (whatever that is). Obviously I could be doing more to inform myself but skimming the first few paragraphs of this article didn't give me a better idea, neither did the software. The scrollbar is also very hard to click on. The minimize and maximize buttons look to have the same color on my screen. I'm assuming I have a cheap setup, but that's how it is in the real world (I hope I'm not adding snark here, but it really is). A tooltip on what they do would be nice as well. If you get this working with a language like C# or Golang, you'll probably get a customer with me because I like the general idea of working with functions instead of files. Maybe you can add powerful addon functionality if you don't plan to do this yourself.


I'm pretty sure the plan is to have support for all of the languages be addon-type things.


How do I open files in a project after connecting to it?

Nothing seems to happen after I get the pop-up that the connection succeeded, and if I open the files manually I still get an error when I try to evaluate them (missing connection).

This is on Windows 8, I'll try from a mac later.

Btw, drag-and-dropping a file into the window breaks the program.


On 10.8.2 it works. Is there any shortcut for opening files by namespace names? Or of exploring the namespaces in a connected project?


I get the following error:

  $ ./LightTable: error while loading shared libraries: libsmime3.so: cannot open shared object file: No such file or directory
Instruction in how build/install LightTable on Linux? What the the dependencies or configuration directives?


Got this error too. I think you need the 32bits version of `nss`.

EDIT 1: Also, lib32-gconf.

EDIT 2: Finally, you might need to create a link to /usr/lib32/libudev.so called `libudev.so.0`. My system (arch) provided the .1 version of it.


On a 64 bit Fedora 17 machine, I needed to install the following packages before getting LightTable to run:

  glibc.i686 libX11.i686 libXrandr.i686 glib2.i686 gtk2.i686 alsa-lib.i686 nss.i686 GConf2.i686


Same problem here.

Edit: Arch x86_64


From what I'm getting:

    ./LightTable: error while loading shared libraries: libudev.so.0: wrong ELF class: ELFCLASS64
It appears that the linux version is 32bit only. :-/



Awesome Chris - thank you!


actually I am only able to get a 64bit version of lighttable, can you post the link of the 32bit version?

Edit: It seems I am only able to get the 64bit version, if you remove the 64 from the link it gives you the 32bit version, ie, http://temp2.kodowa.com.s3.amazonaws.com/playground/bins/Lig...


I've been using the instarepl to learn clojure and I'm liking it a lot so far for that purpose. However I still can't grasp how to use the project features. I'd like to humbly suggest you do some hallway usability testing and work on the learnability of the UI.


That's convenient. I was just looking up Light Table last night when seeking a decent IDE for my Chromebook.

I see that it's moved to a native app now, which makes it Chromebook-incompatible. Is there still a way to access the browser prototype that it started as?


This project makes me happy. Can't wait for it to be extended to other languages.


Looks good, one suggestion: the 3 circles in the top left corner need icons. It is non-obvious to me what they do, even after testing them out.


We'll likely do some more work to make it a bit more platform flavored - those are specifically a mac convention. From left to right:

Close - Minimize - Maxmize

The one on the far right is fullscreen.


Could you leave an option for using the native system windowing toolkit? I prefer programs to feel as native as possible.

Keep up the awesome work though! I'm using Sublime while the project shapes up but I'm still glad I helped fund on Kickstarter.


I figured that's what they were, but generally Mac apps will restore to their original size after you click "maximize" the second time. I'm using Windows right now and Maximize didn't restore on the second click.

Also, noticing in Clojure it doesn't keep your parens in order, is that something you see being done in modules?

Overall, I really enjoy it though. Going to take a little break from Emacs and give this a go.


As someone who is red-green colorblind, I cannot tell the difference between the middle and right circles when I mouseover them. And the leftmost circle is green to me (I have a feeling that it should be red)


How can I buy the shirt?


vim keybinding support?


+1. To quote the article: " I realized the other day that the only time I actually open vim now is when I manage to hose my instance of Light Table. "

True vim users can't work without their muscle-memory, so there's gotta be a vim-mode for light table, right?


A such mode had been advertised. You can read on http://www.chris-granger.com/2012/04/15/light-tables-numbers... that Chris is a vim user and they'll use CodeMirror to provides such keybindings.

My main concern is that being vim'ish isn't just about the keybindings, it's way more than that. For example, commands, like :map <leader>r :!bundle exec rake spec %<cr> or in Vjj to select two lines then :'<,'>Tabularize/=>/ to align the hashrockets on two selected lines.

Same goes for splitting panes, with C-w s and so on.

I'd kill for a "modern vim" and I'm really eager to see Light Table released. As Chris is a vim user, I have good hopes for LT's usability in a vim way. If it requires some changes in my vim habits and I can still control everything without too much chordings, I'll happily deal with it :)


Thank you Chris!


Is a plugin API available yet? After using SublimeText 2, I want the fuzzy search, the ST2 "Goto Anything" search box, in every IDE I use.


I liked the post "All ideas are old ideas." Looking forward to seeing how you've been inspired and what the result will be in Light Table.

Happy hacking.


Wonderful, I'm using it to learn Clojure and work on 4clojure problems.

What I really miss for this purpose is having some kind of live doc feature.


Please consider increasing the brightness of your text. It's dark grey on light grey background is very straining to read.


There are other themes, but they didn't get packaged in this release. The next release will have a bunch of new themes (and I think I've convinced Chris to add my own tomorrow-night theme from https://www.refheap.coms codemirror editor to it, woot) that you can set in the command bar with 'set theme sometheme'. Solarized dark is included, but the codemirror version of that is just as bad as the default theme.


On Windows 7, I'm getting:

CreateProcessW: The system cannot find the file specified.

after C-k instarepl -> Start a local client.


Did you by chance have the old one before? There may be some weird conflict with the directories. Try removing HOME/.lighttable and restarting.


Nope, I tried removing HOME/.lighttable with LT turned off, it got regenerated back upon restart and I'm getting the same error.

I'm behind a proxy; not sure if it makes a difference.


Ah, the proxy is probably it. Does your proxy bypass 127.0.0.1?


Quickly scanning the configuration, looks like it does. I've tried temporarily disabling the proxy in Control Panel, but no luck; I'm not sure this is the correct way to override proxy settings for Light Table, though. Where does it pick its proxy settings from?


My I dare asking where we can get those awesome tshirts?


Its standalone, now I call it a real IDE... I am happy.


Crashes on open for my Mac OS 10.7.2 Anyone else?


Out of curiosity why aren't you at least on the latest 10.7? Which is 10.7.5


Laziness? But if that will get Light Table to work, then I can overcome it.


Is it writern in clojure or clojurescript?


awesome!


Could Light Table, from the start, think about a "server mode"? Eclipse can be run in server mode (even headless if you want) and you can then connect to Eclipse using, say, vim + eclim or emacs + emacs-eclim.

This would be great because I don't doubt there are going to be features from Light Table that I'm going to love and that I'm going to want.

But I also don't doubt that there's no way that the "text editor" part of Light Table will come anywhere close to what vim and/or Emacs do provide.




Applications are open for YC Winter 2020

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

Search: