top | item 29549392

Sublime Clojure

169 points| rcarmo | 4 years ago |tonsky.me | reply

44 comments

order
[+] ReleaseCandidat|4 years ago|reply
> get rid of the extra “REPL” panel for good. Why do you need it if you can see your results inline?

But I do not want them inline. I want to use the REPL as a _interactive_ REPL, where I can write my code and later copy that to the file. That's actually one of the reasons I still use Emacs: Common Lisp with Sly and Clojurescript with Cider.

[+] dunefox|4 years ago|reply
Why do you write code in the REPL directly? Write it in a buffer and send it to the REPL.
[+] coldtea|4 years ago|reply
>I want to use the REPL as a _interactive_ REPL, where I can write my code and later copy that to the file

Just write in the normal editor, and evaluate interactively code from there. Emacs does that too

[+] GGfpc|4 years ago|reply
Why do you want to code in the repl when you can code in the editor and eval in the repl?
[+] rajandatta|4 years ago|reply
This is an exceptionally well thought out set of points on REPL use for a lang like Clojure. I'm playing with Scheme but the ideas here are great. Love the timing of each command if it takes longer than a threshold!
[+] whalesalad|4 years ago|reply
Sublime is my favorite editor and I’m so glad to see that there is still enthusiasm in the community. Stoked to try this out!
[+] nop_slide|4 years ago|reply
I've never done any Lisp before, is Clojure a good starting candidate?
[+] Arcanum-XIII|4 years ago|reply
Yes, no.

Yes because it's a very nice language, with lot of bells and whistles. Javascript and Java integration are nearly perfect, allowing you to have a access huge ecosystem. No because even though there's progress regarding the error reporting, it's not always simple to parse them. No because you'll have to understand way more Java than you may be willing to. No because it's not Lisp per se. It's nearly a different beast.

Would I recommend it? YES. But know that "Here be dragons"

[+] gradys|4 years ago|reply
Definitely. It's got great learning resources like Clojure for the Brave and True, and it's very practical. There is good support for using it in server-side work, web apps, both frontend and backend, and now even lightweight scripting.
[+] kitd|4 years ago|reply
Further to other replies, you can dabble with Clojure using Babashka [1], a Clojure runtime compiled to native code that allows you to execute scripts without a full JVM.

It also has support for defining & running 'tasks', which makes it useful as a simple build system.

[1] https://babashka.org/

[+] medo-bear|4 years ago|reply
if you want to learn the power of lisp and learn a very powerful language check out Common Lisp. if you are a solid programmer, learn the syntax on youtube or by completing Common Lisp Koans (should take you a day or two). then pick up Norvig's Paradigms of AI Programming, which is a classic in and of itself. if you don't know emacs, choose Portacle to get you started
[+] llovan|4 years ago|reply
I got my start in Clojure with ClojureScript. If you do front end web development it's a great way to jump in. I think I actually now prefer ClojureScript with the Reagent and Re-frame libraries more than standard React using js/TypeScript.
[+] dunefox|4 years ago|reply
Only if you know the JVM and a bit of Java, otherwise I would look at Scheme or Racket tbh.
[+] recov|4 years ago|reply
Really cool plugin, although a bit sad to see how long it's taking to get approved - It makes sense to want to do a thorough review, although taking a month+ not something I like seeing in my favorite editor :(
[+] jmchuster|4 years ago|reply
> It’s been two weeks since I started using Sublime Clojure REPL myself. And you know what? I started to really enjoy Clojure exceptions! Short, concise, pointing directly to the error, formatted in Clojure naming convention, not in Java munged style which you need to decypher back to Clojure. It’s a fantastic experience, even if on paper it doesn’t sound as much.

Aren't bad exceptions one of the top issues for new (and old) users? I think solving this is a much bigger deal than you're making it out to be.

[+] gavinray|4 years ago|reply
This is stellar work from Tonsky as usual, nice to see the innovation here.

Though I made the same point about inline real-time evaluation being better than a REPL recently, and my comment received no such fanfare =(

https://news.ycombinator.com/item?id=29217815

[+] simongray|4 years ago|reply
It can be confusing.

For instance, when people speak about "the REPL" in the Clojure community they are talking about a live application thats is integrated with the editor like 99% of the time, they don't mean a command-line prompt. All Lisps use REPLs for interactive development in this manner.

[+] panick21_|4 years ago|reply
This is real neat. However, I tend to use Cursive and REBL. I think that's some of the coolest development environment I ever used.

People who have not heard of the REBL, can check out this video:

https://www.youtube.com/watch?v=c52QhiXsmyI

> REBL is a graphical, interactive tool for browsing Clojure data.

[+] leobg|4 years ago|reply
Was wondering if you could coach me through setting this up? I keep getting Java errors. Would be happy to pay you for your time (if I can afford it, that is :))
[+] oxalorg|4 years ago|reply
These were some refreshing ideas to solve UX problems in the clojure REPL driven development flow (especially the REPL panel which I always keep hidden).

I've been frustrated a bit with the general UX of using emacs, clojure, and REPL since a while now. I keep tweaking my emacs config to improve it one bit at a time, hopefully one day I'll be happy :)

[+] tut-urut-utut|4 years ago|reply
Which part of the Emacs Clojure workflow you find annoying, and what is your proposed fix?

Asking because I still flow somewhere between Emacs/Cider and IntelliJ/Cursive.

[+] tophattom|4 years ago|reply
This looks really nice! I recently started learning Clojure and picked up Tutkain as my editor plugin. This, however, looks like it would better fit my workflow and I will definitely check it out later!
[+] claytn|4 years ago|reply
Unrelated to the plugin: I love the dark mode on your site.
[+] shaftoe444|4 years ago|reply
This looks great. I've been using Calva and VS code for Clojure and it works but lacks a bit of polish.
[+] sedivy94|4 years ago|reply
That website is STUNNING. WOW.
[+] ithrow|4 years ago|reply
REPL is Clojure’s superpower.

This is the only community were I keep seeing the word 'superpower' used repeatedly in most blog posts and forums.

[+] Lev1a|4 years ago|reply
Wow, that is certainly one way of making a website color scheme (and alienating potential readers). Either searing the reader's eyes with that gaudy yellow OR making the reader wave around their mouse as a "flashlight" instead of changing or even just switching the BG and FG colors.

I suspect accessability didn't factor that much into the thought process behind designing that website.

[+] thom|4 years ago|reply
I think people have reacted to this comment as pure snark, but I did take a moment to look at your comment history and you're actually describing a physical reaction you're having, not just a matter of taste. I'd love to hear how general this problem is for you on the web, and how one might go around testing for these sorts of accessibility issues during development. I know of the various colour blindness 'simulation' tools available but other than the option of a dark mode (a proper one, not a gimmicky one like here) I wouldn't know how to address this issue.
[+] the_other|4 years ago|reply
I have poor eyesight and am fairly sensitive to contrast problems. I found this site very pleasant to read and have bookmarked it for later design “inspiration”.

Yellow on black tends to make the writing “shrink” for me, lowering the readability.