151 comments

[ 3.3 ms ] story [ 203 ms ] thread
It is absolutely gorgeous, but it is also looking a lot more like a traditional text editor from what i can gather.

I'll download and play with it a bit anyway, to see what i get from it.

It is, but that's because we have to have a solid editing experience for the "simple" stuff before we can do the more interesting things. What good is it to have these awesome function oriented editors when you can't even modify a file efficiently? :)

We use tabs as a simple way of wrapping up a context. In the future they will include all sorts of neat things - and they aren't limited in any way. If we want, we can drop an infinite canvas into one, or a codex (a document made of many parts of different files). So yes, right now we wanted something beautiful and efficient to use while live coding, but as I said in my bit about 0.4.0, the really interesting semantic-oriented stuff (functions and the like) is what's next!

Has anyone started work on an Emacs Lisp to ClojureScript compiler? :)

Speaking of which, are Emacs keybindings coming any time soon?

and ParEdit
Seconded. If you're going to have any success in converting people who write Clojure code away from Emacs, you're going to need to copy its good parts.

Nice redesign though.

"If you're going to have any success in converting people who write Clojure code away from Emacs"

I'd say it would already be great if they could bring newcomers to Clojure: people who are rebutted because of Emacs.

As to me I'd need, at least: ace-jump-mode, paredit, the powerful macro system and the ability to create my own rules for highlighting / overlaying text as easily as from Emacs.

Short of that I'll keep using Emacs. Now what I think: it's probably easier to add LT's "instarepl" to Emacs than to add one million lines of elisp code to LT so...

I fully expect someone to hack a "Clojure instarepl" Emacs mode one of these days.

I for one am glad you're nailing the editor part first. Because if this is ever to replace my usage of emacs, you have to at least get that part right. This hasn't yet replaced my emacs, but i'm more optimistic now. Some editing features missing are paredit, viewing source code of a clojure core function. (Alt-. in emacs.) When you eval something and it never terminates, you need a way to kill that thread. For IDE like features, #1 on my list is refactoring clojure code quickly, e.g. renaming symbols. As someone who's anal about prioritizing time, I don't ever customize the themes, etc, I just want killer useful features that save me time and "just work".
Even getting all of paredit is not essential imo - I'd settle for just slurp and barf support.
+1 for strong editing features. All the fancy stuff came after Emacs became an OS for editing text. Nail that, the rest follows.
There's something weird going on when using the trackpad on OS X. My trackpad is set to "natural scrolling", but if I scroll really fast the editor seems to scroll in the other direction.
I think that might be a bug in CodeMirror[1], does it happen consistently? I'll see what I can track down.

[1]: http://codemirror.net/

Changing the trackpad direction doesn't have any effect, still the same issue.
10.8? and all you're doing is scrolling quickly? If you close the app and bring it back up, it still does it?

EDIT: tracking in this issue: https://github.com/Kodowa/Light-Table-Playground/issues/271

After restarting, I can't reproduce it anymore. Maybe it was a caching issue with the previous version of Light Table I had.

Thanks very much for Light Table! I'm loving it.

I know python support is planned, but will it be integrated alpha/beta or will we have to wait until after the 1.0 release?
It'll definitely be before 1.0, but I'm not exactly sure when. Right now it's still just me on the code side, so it depends a bit on how hiring goes.
How many people are working on this project ?
Currently 2: Robert and I.

I code, Robert makes sure I'm just coding.

Stack Size Exceeded when trying to open a ~3500 line clojure app :(.
Which languages does it support?
It's a general editor and can open most things out there, however the eval stuff is limited to Clojure, ClojureScript, JavaScript, and CSS.
Out of curiosity - I haven't followed this project in technical detail - are you using SWANK or your own backend work?

I would be interested in experimenting with it for Common Lisp, you see. :)

I believe it uses nrepl, not SWANK. (I wrote about the difference here: http://pchristensen.com/blog/articles/clojure-development-ec... )
it actually uses neither, and doesn't rely on any specific implementation. You could fairly easily wrap a swank client to make it work, or an nrepl one (which is something we'll probably get to soon). One of the nice things about the way we architected it is that there are very few assumptions when it comes to "clients" and that will allow a ton of freedom in using established stuff when it exists.
(comment deleted)
I follow LT project since I saw it on kickstarter and it looks great so far. And I cannot wait for promised full Python support to be implemented.
This is a very pretty editor. That said, I have no freaking idea what I'm supposed to do. I've been messing around with it for around 15 minutes now, and I still don't understand it.

I added a PHP website folder and got no code hinting or anything else beyond "here is the match for your parenthesis" for either PHP or Javascript. This also resulted in my "navigate" tab being filled with SVN meta-files. I am quite confused.

Looking around on the site and some of the comments here, it appears you're using Clojure. Does this IDE only support Clojure?

Think of LT as something more akin to an editor in spirit - you won't see watch windows and all the craziness you often see in "big" IDE's. In that regard, you use it like you use any editor. If you're working with Clojure, ClojureScript, or Javascript code, however, you can evaluate a block inline by pressing Cmd-Enter (or Ctrl-Enter).

Now that we have an experience we plan to stick with more documentation and getting started content will be coming in the next few days. :)

EDIT: I didn't think about SVN, we do filter out Git, but this should just be customizable. Added an issue for it [1].

[1]: https://github.com/Kodowa/Light-Table-Playground/issues/266

.pyc files also seem to be showing up.

I've opened a python file, typed 1 + 1 and hit Ctrl+Enter and it doesn't seem to do anything.

eval is only for Clojure, ClojureScript, Javascript, and CSS right now
Evaling CSS? What is computed?
"eval" in the CSS case just means injected into the context. Nothing gets computed :)
You may find the Kickstarter page informative-

http://www.kickstarter.com/projects/306316578/light-table

"What languages will it support?

The first two languages it will support are Javascript and Clojure, but the application will be written in such a way that adding new languages can happen through plugins."

Ah, thank you very much for the context. I guess I've been a bit out of the HN loop.
well too bad it only supports those two. If I get in Clojure/Javascript before it supports others like Python or PHP I'll try it.
Same here. I really WANT to use this, but I added a PHP project and it doesn't seem to do anything. I can't even Ctrl+F to find something in the file. I'm looking everywhere for hotkeys to do things, but there's no documentation I can find. I was expecting some kind of awesome interface like "Ctrl-Left Arrow" to bring up the left bar, then type in your command and press enter and it does magic and hides the bar. But I guess at this point I'd take a find hot key.

To the creator: I love the idea and got enthusiastic after watching the video. Keep up with the hard work! This is a huge undertaking.

Edit* OK, so Ctrl+Space enters the command window. From there you can type "Key" and press enter to view the key bindings. I'm not sure why I had to go three layers deep into a google groups conversation to get that though.

I was wondering the same thing. Neither ctrl+space or cmd+space works on osx for me, maybe because I have alfred installed?
doesnt do anything for me either.. and i dont have alfred installed... guess this isn't quite ready for primetime yet
To be fair, this is an alpha release. I wouldn't expect it to be ready for primetime quite yet.
The website definitely could use a little more info. I had never heard of lighttable until now. Figuring out what it was and what problems it was solving took longer than it should have, imo. I don't want to watch a video. Give me a breakdown, time is precious!
I haven't tried this version yet, but I had the same experience with the previous release.

Why not spending a bit of time releasing a simple tutorial, showcasing the differences with normal editors ?

Right now it's really too "metaphysic".

This is exactly my experience as well. It's not obvious how to get started with it and there is no tutorial that I found explaining how I would go about using it.

At the very least you should record screencasts of you using LT to build LT with you talking people through what you are doing.

I really want to give this a shot, but it needs to be easy to get started.

Besides your feature and bug backlog, I would map out the user journey (i.e. create an experience map) for LT to discover all the pain and frustration points people may have with using LT.

Has anyone started using LT? Is it productive? Should java devs even bother with this? Thank you.
It's not going to be more useful to a Java developer than Eclipse is currently, but that's because we're going after a very different end goal. FWIW, all our work is done in LT and it is far more efficient than I used to be with Vim.
Is there a screencast where I can see you being more efficient in LT than Vim?
I (clojure hobbyist) play around with it regularly but IMHO it's not really ready for prime time yet.
(comment deleted)
Everytime I update LT the syntax highlighting is reducing by the number of colors used. I expect the color theme in the final to be grayscale. Appart from that, awesome job guys.
any reason in particular that this doesn't support osx10.6?
I'm a web designer (PSD -> WordPress) and I started learning programming around the time Light Table was funded on KickStarter. It's been nice to see the project grow with my programming skills. Although I still don't feel like a decent programmer, it's nice to see what my small $15 investment has helped create. :)
What going back over the old demo and looking at this post did was remind me of how nice jsfiddle is when it isn't insanely slow, which then led me to wonder how hard it would be to create something like jsfiddle that lived on top of github would be, or something like jsfiddle that lived inside my favorite editor, or just in a static html page on my desktop.
If you get frustrated with jsfiddle, try out http://cssdeck.com/labs It's nominally oriented toward CSS and all the CSS preprocessors, but it handles JS just fine (and CoffeeScript, too!). I like its layout a lot more than jsfiddle -- it's more aesthetically appealing to me. It also features the ability to do codecasts. I can't recall if jsfiddle has that, but it's a nice feature for demonstrating code to someone.
Looks good (loads fast) and I like the coffeescript support.
I used to be a huge proponent of JSFiddle but it's got so slow and temperamental recently that I've started moving over to codepen.io. It gives instant results (every change is evaluated in real time), supports LESS and SASS on the CSS side, and CoffeeScript on the scripting side. And it's got a nicer UI, giving more space to the output pane and allowing quick switching/expanding of the code panes
I get the error:

"LightTable.app" is damaged and can't be opened.

I'm running OSX 10.8.2.

Anyone else having the same problem?

Are there any dependancies I need to have installed before running the app?

I'm getting the same error.
This is OSX's gatekeeper going crazy because our codesign included the icns file (which then got compressed and no longer verifies). I'm uploading a new package right now. As a workaround you can go to security in system settings, set it to allow anything to run, open LightTable.app, close it and then re-enable the old gatekeeper setting. LT will open fine thereafter. Or you can just redownload in about 2 minutes.
i get this when i visit the mac download link:

<Error> <Code>AccessDenied</Code> <Message>Access Denied</Message> ...

Update: OK, it works now.

I'm getting Access Denied when trying to download the OS X version. Other versions are working fine.
I'd absolutely love to see ruby in Light Table, how are plans looking for this? If there was a kickstarter for adding ruby I'd pony up in a flash. I realise manpower is probably going to be the main issue though...
Python is first. It was already paid for in the kickstarter...
Back of the line Ruby!
(comment deleted)
Manpower is an issue, but we've gotten a lot of requests for Ruby in the future. When and where Ruby support will come is still unknown, but do know that we hear you! :)
I think this would be the right place to bring this up: Is language support backed in or can everyone write a plug-in for his language? Implementing highlighting, completion and repl for all the different languages users could want seems like an enormous task. At the same time this is where Emacs shines: supporting a new language rudimentary is easy to do, adding more advanced support isn't too hard either. Will users be able to define new language modes?
Noooo! So many wasted pixels at the top! Why!? It was so much better before!

Aside from that: neat! :)

You should add mousewheel scrolling of tabs, I'd like that. Also a white theme, because black themes look sort of sketchy at work.
in the command bar, type "skin" and press enter. You can change it to a light skin. :) You can also change the editor theme, by using the "change editor theme" command.
> black themes look sort of sketchy at work

Could you explain that?

I'm curious as well, since most of the programmers I've met prefers a dark theme. :)
It depends on the monitor. Some cheaper displays don't have the contrast to make light on dark work; also color bleeding...

Given a non-IPS display, my older eyes prefer dark on light, even if I think light on dark looks better. Also, light on dark is almost impossible to project for demos and presentations!

But I'm sure grandparent is just referring to the fact that light table looks different enough from the workplace norm to make it standout and his activities more known (but even visual studio has a dark mode these days).

Apart from the other obvious praises, I just want to thank you for making something so beautiful with Clojure as a first class citizen.
I have completely the opposite opinion. Clojure is not as widely used as some other languages. Python springs to mind; I know it was part of the Kickstarter pledge.

Support for compiled languages would be nice, although I realise this is difficult.

That is exactly why this makes me so happy. :) There are already tons of good tools for Python.
There's already an awesome editor that has Python as a first class citizen, Sublime Text 2.
Does anyone know what Light Table is programmed in? It seems to be cross platform, how does it achieve that? I assume some kind of mix between Clojure and using browser technology as a UI, but does anyone know specifics?
In addition to node-webkit, I believe the app code itself is written in ClojureScript (a compile-to-js dialect of Clojure.)
Yep, mostly ClojureScript and a bit of Javascript for boot and setup.
(comment deleted)
(comment deleted)
I love these updates, the tool is looking more awesome every day.

I'm wondering if there's a roadmap for Light Table's release, specifically if there's a point where the code will be available? I have a programming language in progress and I'm interested in potentially hacking LT to support the language. It seems like it would be a good fit.

How are you highlighting the matching characters in the fuzzy search results?

http://www.chris-granger.com/images/030/navigate.png

It looks like the same method I'm using in emacs/ido, which is to turn "la/clj" into

  "(l).*?(a).*?(/).*?(c).*?(l).*?(j).*?"
I've found this technique gives inferior results to whatever SublimeText is doing. For example, in your hits with "langs", such as "lt/objs/langs/js.cljs" I think "lt/objs/langs/js.cljs" is more intuitive than the result you give of "lt/objs/langs/js.cljs". (Sorry for the hard to read italics)

For another example, on a search of "completions" I think your technique will highlight "hacks-completions" as "hacks-completions" instead of "hacks-completions".

Does anyone know if there's an easy way to modify the regex (not LightTable) and get the user-friendly results of Sublime Text?

Turn slashes into

    .*?(/).*?
and leave the rest alone?

If you don't want to treat slashes specially and want to allow "ab" to match "aqqqb" then I don't think you can do it without creating a giant regex. You can go for a modified longest common subsequence algorithm.

Edit: here's how you can do it:

    // gives one point for each letter matched
    // plus an extra point if the next letter is also a match
    let rec scorematch = function
        | true::true::r -> 2 + scorematch (true::r)
        | true::r -> 1 + scorematch r
        | false::r -> scorematch r
        | [] -> 0

    // find the match with best score
    let rec search xs ys =
        match (xs,ys) with
        | (x::xr, y::yr) -> 
            let matches = [false::search xr ys; false::search xs yr]
            let matches = if x=y then (true::search xr yr)::matches else matches
            matches |> List.maxBy scorematch
        | _,ys -> List.map (fun _ -> false) ys

    let underline xs ys = search (List.ofSeq xs) (List.ofSeq ys) 
                          |> List.map (fun b -> if b then "-" else " ") 
                          |> String.Concat

    for x in ["foobarbaz"; "foobaXrbaz"; "foobXaXrbaz"; "foobXaXrbazr"] do
        Console.WriteLine x
        Console.WriteLine (underline "bar" x)
For search term "bar" this outputs:

    foobarbaz
       ---   

    foobaXrbaz
       -- -   

    foobXaXrbaz
       - - -   

    foobXaXrbazr
            -- -
You'll want to memoize this or apply dynamic programming.
(comment deleted)
"I've found this technique gives inferior results to whatever SublimeText is doing."

Oh boy this one we're going to hear for a long time ain't we!?

So how do you see these inline results? I'm told cmd-enter or cmd-shift-enter will evaluate code; on Windows 7, for me, none of ctrl-enter, alt-enter, or windows-enter seem to do anything. ctrl-shift-enter in a .js file creates a checkmark next to my first line, 2+3; (though not the lines I'd written after it). Trying to create a .clj or .cljs file, by 'Create a new file' and then 'Save file', it remains as 'untitled', and ctrl-shift-enter doesn't seem to do anything.

Anyone else on Windows at the moment with tips?

(The 'bindings' command lists things like Cmd Enter; since it lists Ctrl for other keybindings, I'm guessing that's meant to mean Alt.)

Looks like Ctrl+Enter and Ctrl+Shift+Enter start to work after saving the file with a recognised extension. You'll have to use the mouse, as pressing Enter cancels, despite the 'Save' button being highlighted as if it were the default.

Unfortunately, even just (defn id [x] x) gets me "java.lang.RuntimeException: Unable to resolve symbol: defn".

As a game dev guy, I'm looking at the two new Open game platforms, Ouya and GameStick, and thinking that LT might be a great way to get kids into coding.

Getting kids to code games is so much easier than any other project, even if the game is extremely simple.

Anyone care to comment?

Have you messed around with ImpactJS? I'd love to see some LT and ImpactJS lov'n.
I've tried to add a workspace directory from a Samba mount, and it's been stuck for about 10 minutes now.