Live data from Hacker News

A new Light Table experience

chris-granger.com

51–60 of 152 posts

Re: A new Light Table experience

#51
post #41
post #35

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

[deleted]

Re: A new Light Table experience

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

Re: A new Light Table experience

#53
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?

Re: A new Light Table experience

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

Re: A new Light Table experience

#56
post #34
post #23

Earlier quoted context omitted.

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.

Re: A new Light Table experience

#57

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 "l…

it's not currently configurable, but I agree that the highlighting should be more like that. Filed an issue to track it: https://github.com/Kodowa/Light-Table-Playground/issues/277

Re: A new Light Table experience

#59

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 "l…

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.

Re: A new Light Table experience

#60
post #4

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…

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

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

Post reply on HN