
A new Light Table experience - falava
http://www.chris-granger.com/2013/02/27/light-table-030-experience/
======
pixelbath
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?

~~~
ibdknox
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>

~~~
shurcooL
Chris, are you planning to submit a demo for LIVE 2013?

~~~
ibdknox
rumor has it I'll be keynoting :)

~~~
shurcooL
Awesome, looking forward to that!

I'm doing my best to bring my IDE demo up to speed, it's just a month left now
but still so much to do... >.<

------
manaskarekar
Apart from the other obvious praises, I just want to thank you for making
something so beautiful with Clojure as a first class citizen.

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

~~~
manaskarekar
That is exactly why this makes me so happy. :) There are already tons of good
tools for Python.

------
Sandman
Every time a new version of LT playground gets released I feel like a kid in a
candy store, looking for all the cool new stuff Chris and the rest of the team
put in :). Awesome work, and it just keeps getting better. To be honest, since
there weren't any updates in a while, I started having doubts about whether
they'll be able to deliver, but I'm glad to see that the project is alive and
well.

Judging by the comments I see that there's a lot of people who haven't yet
heard of Light Table, which surprised me a bit because posts about LT
frequently hit the front page of HN. If you're one of those people, you should
take a look at their kickstarter page:
<http://www.kickstarter.com/projects/306316578/light-table>

Finally, while there's a lot of people bemoaning the fact that some more
popular languages (than Clojure) aren't supported out of the box, I, for one,
am glad that somebody's developing such an awesome tool with Clojure in mind.

~~~
nilkn
The current version of LT seems very different from what I see on that
Kickstarter page.

I'm going to have to join the people who simply don't understand how to use
this. It doesn't help that it seems heavily biased towards Clojure and I have
no interesting Clojure codebases to play around with.

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

~~~
ibdknox
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!

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

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

~~~
alexkehayias
+1 for Emacs keybindings

~~~
centro
(+ 1 1)

~~~
nordsieck
(partial (+ 1))

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

~~~
lrem
Python is first. It was already paid for in the kickstarter...

~~~
relic
Back of the line Ruby!

------
pjbrunet
Would be nice if font size changed by control+scrolling mouse wheel, most code
editors do that. I can't imagine really needing (or wanting) to evaluate
things in realtime (like the videos demonstrate) unless I was writing cryptic,
mind-numbing algorithms all day every day. I like the idea in one of your
videos, every function can have its own little window, but I wouldn't want
that to create new files for me automatically in the background and it would
have to be more useful than a straightforward "split window" editor function,
which is already something I rarely use. The colors are cool but not as cool
as my hacked Crunchbang+Geany colors. Maybe one day Light Table will be like a
more graphical, user-friendly Emacs? I don't know. The videos are really eye-
catching but realistically I can't imagine why I'd use Light Table. I realize
there's already a lot of interest in this, but I would like to see more videos
showing how this is actually more useful than Gedit or whatever.

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

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

~~~
podperson
Looks good (loads fast) and I like the coffeescript support.

------
sudowork
Small bug I found: When I change the editor theme to something other than
`default`, the next time I start up the editor, the theme isn't loaded.
Instead, I just get some light grey text on a dark grey background.

UX Annoyance: When clicking on an exception, there's no visual indication that
it's been clicked on. I found that Shift+Tabbing brings you back to the editor
pane (other than using the mouse).

A couple more things that could just be me being stupid. When I try to eval
using Ctrl+Shift+Enter, nothing happens. Instead, I have to eval each line
one-by-one. I tried creating a new key binding, but couldn't figure out how to
delimit my keys to allow modifiers. I also can't figure out how to pop up
documentation or data flow as demo'd in the original light table (this is my
first time using any version of light table). I tried `(doc <foo>)`, but it
just evaluates to `nil`.

Anyways, hope these comments might be useful in terms of my user experience as
a first time user.

~~~
ibdknox
Created an issue for the first [1]

Not sure about the ctrl+shift+enter not working, I'll see if I can come up
with a repro. Keys are delimited with -, so Ctrl-Shift-Enter

For (doc ..) take a look at the bottom console, click the little arrow which
should be blue when there's new content in there. All prints go to that
console.

Thanks for the report! :)

[1]: <https://github.com/Kodowa/Light-Table-Playground/issues/281>

~~~
sudowork
Thanks for the fast response! I'm really hopeful for the future of Light
Table, and I appreciate the work you've put it.

------
scottjad
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/ _la_ ngs/js. _clj_ s" is more intuitive than the result you
give of " _l_ t/objs/l _a_ ngs/js. _clj_ s". (Sorry for the hard to read
italics)

For another example, on a search of "completions" I think your technique will
highlight "hacks-completions" as "ha _c_ ks-c _ompletions_ " 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?

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

~~~
scottjad
Thank you!

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

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

~~~
learningram
How many people are working on this project ?

~~~
ibdknox
Currently 2: Robert and I.

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

------
eaxbin
I'm getting Access Denied when trying to download the OS X version. Other
versions are working fine.

~~~
ibdknox
fixed, sorry about that.

~~~
eaxbin
Cool, thanks.

------
DigitalTurk
It just so happens that I started playing with Clojure yesterday! I didn't
quite manage to get anything to work in LT, however.

E.g. if I do Cmd+Enter on a definition, I get this:

    
    
      clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to
      resolve symbol: defn in this context, compiling:…
    

If I click 'Make current editor and instarepl' I get errors like this:

    
    
      clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to
      resolve symbol: subs in this context, compiling:(NO_SOURCE_PATH:9)
    

It's all rather confusing. Maybe there's a manual somewhere I should read, but
I couldn't find it.

~~~
ibdknox
All files in Clojure require a namespace form at the top:

    
    
       (ns foo.bar)
    

Since you don't have one, clojure.core isn't available and it freaks out. I'll
look into setting the default namespace of file so that it's a little nicer
for newcomers :)

~~~
DigitalTurk
oh. Thanks.

It's not a problem when using 'clj' from the command line.

Here are some other issues I ran into (FWIW):

\- println works, but print doesn't. \- I was expecting cmd+A and then
cmd+enter to evaluate everything. \- Why are there (seemingly) no shortcuts
for the command bar? \- Activating 'Make current editor and instarepl' twice
in a row, clears all the text in the editor… that's weird \- The text cursor
got confused at some point

But I guess it's an alpha version. :)

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

~~~
alepper
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".

~~~
DigitalJack
Take a look here: <http://news.ycombinator.com/item?id=5300653>

------
null_pointer
I've been playing with this editor, except it seems Syntax Highlighting
doesn't work (Linux x64). Which is kind of a killing point for me. Does
anybody know of a forum / mailing list I can get on to figure out
configuration and such? I have heard so much about this IDE, but it kills me
that it doesn't seem to be working properly.

EDIT: Restarting twice seemed to fix the problem.

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

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

------
fnordfnordfnord
If you're going to make it vi-like, please put some effort into introducing
the modal-concept, and lots of help for new users. There are reasons that many
people avoid vi. You may not think that you need to make it a teaching tool,
but everything else about lighttable makes it well-suited as a teaching tool.

~~~
ibdknox
You have to toggle Vim mode - then it is modal.

------
bbq
This looks great! It's getting more and more usable.

It would be nice if, when a computation is running in the instarepl, the
computation indicator would display inline e.g. with the previous result -
perhaps graying the result out?

How would I go about implementing this myself? Or is LightTable reflection not
yet publicly available?

------
octix
Has anyone started using LT? Is it productive? Should java devs even bother
with this? Thank you.

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

~~~
josh-j
Is there a screencast where I can see you being more efficient in LT than Vim?

------
btipling
You gotta be kidding on the sideways text as an important part of the UI. Also
adding the vim integration is a waste of time as long as you don't have
buffers, registers, ranges and can't parse my .vimrc nor use my modules you
might as well not do it.

~~~
jhchabran
Well parsing the vimrc might be too much as it would require a full
compatibility layer and I highly doubt it'll ever happen. Using vanilla
lighttable config wouldn't bother me, even if I have to rewrite most of it.
It's a different editor after all.

But yeah, all the "vim" layers around are basically just the bindings, in
normal and insert mode which just half of vim. If we can't change buffers with
:b, :A or anything, it's just painful as a vim user. Same goes for what you
listed.

I have great respect for the guys at code mirror, it's just that I view it as
just a quick hack to add vim bindings that a real vim like solution. If
LightTable advertises about being vim friendly, there should be an
implementation that keeps the vim workflow, not just small bindings.

As a vim user, I'll just skip the "vim" mode if it's done like that (and sadly
I'll stick to Vim even if I really crave for a modern "vim" with a decent
scripting language).

Is there any plan to address that in the future ?

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

~~~
shawndumas
Have you messed around with ImpactJS? I'd love to see some LT and ImpactJS
lov'n.

------
andreyf
Noooo! So many wasted pixels at the top! Why!? It was so much better before!

Aside from that: neat! :)

~~~
manaskarekar
Toggle Fullscreen should fix that.

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

~~~
joshuacc
In addition to node-webkit, I believe the app code itself is written in
ClojureScript (a compile-to-js dialect of Clojure.)

~~~
fstephany
Yep, mostly ClojureScript and a bit of Javascript for boot and setup.

------
marizmelo
Small drag and drop problem.... On OSX I can drag the divisor for
files/texteditor OVER the option of tabs (left options)... if I drop the
editor there I cannot resize the view anymore and have to restart the program.

------
glesperance
What is the project direction in relation to complex JS apps?

i.e.: How do you guys expect the instarepl idea to be used in apps made of
serveral node.js modules/libs or several files meant to be loaded together via
RequireJS ?

------
pjbrunet
I downloaded Linux 64 and it doesn't work in Debian. No readme either?

~~~
pjbrunet
Just tried Linux32 download and it seems to be working :-)

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

~~~
ibdknox
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/>

~~~
fdb
Changing the trackpad direction doesn't have any effect, still the same issue.

~~~
ibdknox
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>

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

------
dpick
Stack Size Exceeded when trying to open a ~3500 line clojure app :(.

~~~
ibdknox
a ~3500 line file? What do you mean by open? Could you put up an issue [1]
with a bit more information so we can track it down?

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

~~~
dpick
It's a project with a bunch of files, totals around 3500 lines. I'll post an
issue.

------
edoloughlin
Currently downloading at 9-10KB/s. Anyone seeding a torrent?

------
almost_usual
Awesome, really nice to have such great Clojure support

------
sc0rb
I can't wait for this to support Java so I can at least have some beautiful
tools to get me through the soul sucking days of Spring development :-)

------
Meai
You should add mousewheel scrolling of tabs, I'd like that. Also a white
theme, because black themes look sort of sketchy at work.

~~~
lucian1900
> black themes look sort of sketchy at work

Could you explain that?

~~~
ibdknox
I'm curious as well, since most of the programmers I've met prefers a dark
theme. :)

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

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

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

~~~
karlokeeffe
Great, that's fixed it for me.

------
pjmlp
Eventually the editors of Smalltalk and Lisp environments of the early days
will be rediscovered by youth generations it seems.

~~~
centro
Well don't keep it a secret. Where should we look?

~~~
pjmlp
Use your favorite search engine and you will be enlightened.

------
truncate
It still depends upon on libudev.so.0. Hence can't use it on ArchLinux (unless
I fool it by linking it with latest so). :(

------
rsamvit
Beautiful Editor. I'd switch to it completely if it supported a more complete
vim emulation -- for now I use it as a repl

------
programnature
Congrats, the improvements are quality.

Would love to switch to light table, but I need paredit. Can't switch without
paredit.

------
cheald
I've tried to add a workspace directory from a Samba mount, and it's been
stuck for about 10 minutes now.

------
devy
How do I open a new client like what Chris demo'd in the video to eval
JavaScript & CSS?

------
agentultra
Nice work.

Seems to me like it's becoming emacs (which is a good thing, you should poach
more ideas from it).

------
shuma
Which languages does it support?

~~~
ibdknox
It's a general editor and can open most things out there, however the eval
stuff is limited to Clojure, ClojureScript, JavaScript, and CSS.

~~~
pnathan
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. :)

~~~
pchristensen
I believe it uses nrepl, not SWANK. (I wrote about the difference here:
[http://pchristensen.com/blog/articles/clojure-development-
ec...](http://pchristensen.com/blog/articles/clojure-development-
ecosystem/#nrepl) )

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

------
dimitris99
Looks really nice. I want to use it. I also like vim.

BUT could do with some more documentation.

------
baby
More than 300k raised? Isn't that way too much? How much is a developer
getting paid in the valley?

------
billyvg
How do I go into vim mode?

~~~
billyvg
Nevermind, there's a "Toggle vim mode" command

------
arrakeen
any reason in particular that this doesn't support osx10.6?

------
ttty
how to open those cells like they do in the video?

------
zenbowman
Beautiful stuff

------
tapichu
great, happy to see the vim mode!

