104 comments

[ 3.1 ms ] story [ 103 ms ] thread
Any idea when we can expect first traces of python support?
...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

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.
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?

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).

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.
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?

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

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'd expect that instead of eval, you'd want to run some sort of unit test for effectful code.
Even GHC's (Haskell) REPL executes side-effects.
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.

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.

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.

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)
This project makes me happy. Can't wait for it to be extended to other languages.
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?
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!

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?
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.

(comment deleted)
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 :)

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.
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.

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. :-/
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
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.

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

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 :)
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?
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.
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.
(comment deleted)
I tried to dismiss the warning and it just deleted the file on me.
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 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.

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?

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.
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 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.