Improving ClojureScript eval on Light Table

221 views
Skip to first unread message

cldwalker

unread,
Nov 6, 2014, 8:48:00 AM11/6/14
to clojur...@googlegroups.com

Hi,
As part of the LT core team, I'm looking to improve it for ClojureScript users. Since LT
is open source and written in ClojureScript I would love to get more of the community involved. :)

The first thing I'd like to get the community's feedback on is streamlining the eval experience.
Currently there are 3 different ways to eval ClojureScript [1] and some can be somewhat manual for
your ClojureScript project. I have a proof of concept pull that would make a browser-based connection
the default and as easy as pressing an eval keystroke [2]. Thoughts?

After this we're looking to tackle improving autocompletion [3] and paredit [4]. Also, jump-to-source for dependencies and core fns was recently fixed.

Cheers,
Gabriel


[1] https://github.com/LightTable/Clojure#clojurescript-eval
[2] https://github.com/LightTable/Clojure/pull/29
[3] https://github.com/LightTable/Clojure/issues/25
[4] https://github.com/LightTable/Paredit/issues/18

Rory Douglas

unread,
Nov 7, 2014, 8:58:43 AM11/7/14
to clojur...@googlegroups.com
I'd love it if external browser connection could automatically update the websocket port in my index.html so I don't have to. Or perhaps manage the port lifecycle and assign a stable port per project.

I personally really like the utility of CLJS debugging via Chrome DevTools so external browser is my preferred connection method.

cldwalker

unread,
Nov 7, 2014, 7:37:05 PM11/7/14
to clojur...@googlegroups.com
On Friday, November 7, 2014 8:58:43 AM UTC-5, Rory Douglas wrote:
> I'd love it if external browser connection could automatically update the websocket port in my index.html so I don't have to. Or perhaps manage the port lifecycle and assign a stable port per project.

Yep. We're considering assigning a default port.

>
> I personally really like the utility of CLJS debugging via Chrome DevTools so external browser is my preferred connection method.

You can pull up devtools within LightTable itself which allows you to inspect the editor or a browser tab [1]. But I hear you, an external browser usually has better dev tools.

[1] https://github.com/LightTable/LightTable/wiki/Developer-FAQ#how-do-i-inspect-any-html-element-in-light-table

Yehonathan Sharvit

unread,
Nov 9, 2014, 8:23:40 AM11/9/14
to clojur...@googlegroups.com
On Friday, 7 November 2014 15:58:43 UTC+2, Rory Douglas wrote:
> I'd love it if external browser connection could automatically update the websocket port in my index.html so I don't have to. Or perhaps manage the port lifecycle and assign a stable port per project.
>
> I personally really like the utility of CLJS debugging via Chrome DevTools so external browser is my preferred connection method.

What do you mean by CLJS debugging via Chrome DevTools ?

Rory Douglas

unread,
Nov 9, 2014, 9:21:19 AM11/9/14
to clojur...@googlegroups.com
-What do you mean by CLJS debugging via Chrome DevTools ?

You can use the Source tab to set breakpoints on the CLJS files (works thanks to the source maps), and step through your code. A similar tool for Clojure itself would be awesome :-)

Aleš Roubíček

unread,
Nov 9, 2014, 11:05:04 AM11/9/14
to clojur...@googlegroups.com
On Sunday, November 9, 2014 3:21:19 PM UTC+1, Rory Douglas wrote:
> -What do you mean by CLJS debugging via Chrome DevTools ?
>
>
> You can use the Source tab to set breakpoints on the CLJS files (works thanks to the source maps), and step through your code. A similar tool for Clojure itself would be awesome :-)

The need for debugging with InstaRepl and watches is a bit weird for me.

Rory Douglas

unread,
Nov 9, 2014, 4:22:39 PM11/9/14
to clojur...@googlegroups.com
Not sure if I'm going something wrong, bit watches rarely work for me. As for debugging, there are times when it's just easier to click through your app to the point it breaks and see the function params than manually replicate the app state at that point via REPL. I also find identifying bugs in recursive calls easier in a debugger.

--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/RKO3YH0dQnk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojurescript+unsubscribe@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

Gabriel Horner

unread,
Nov 10, 2014, 5:37:06 PM11/10/14
to clojur...@googlegroups.com
On Sun, Nov 9, 2014 at 4:22 PM, Rory Douglas <rory1d...@gmail.com> wrote:
Not sure if I'm going something wrong, bit watches rarely work for me. As for debugging, there are times when it's just easier to click through your app to the point it breaks and see the function params than manually replicate the app state at that point via REPL. I also find identifying bugs in recursive calls easier in a debugger.
 
This guide on watches may help in understanding them [1]. If you've come across a reproducible issue, happy to take them up on github [2].



On Sun, Nov 9, 2014, 11:14 AM Aleš Roubíček <rar...@gmail.com> wrote:
On Sunday, November 9, 2014 3:21:19 PM UTC+1, Rory Douglas wrote:
> -What do you mean by CLJS debugging via Chrome DevTools ?
>
>
> You can use the Source tab to set breakpoints on the CLJS files (works thanks to the source maps), and step through your code.   A similar tool for Clojure itself would be awesome :-)

The need for debugging with InstaRepl and watches is a bit weird for me.

--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/RKO3YH0dQnk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojurescript+unsubscribe@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescrip...@googlegroups.com.

Rory Douglas

unread,
Nov 11, 2014, 8:20:54 AM11/11/14
to clojur...@googlegroups.com

Thanks, that article was great! I tried out watches again and they seem to work fine - probably user error on my part during my previous tries.  Also looks like I can use the Rolex plugin to inspect a trace of recent values (for recursive call debugging) - I'll that today.


To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages