HN user

chrisoakman

222 karma

https://chrisoakman.com

[ my public key: https://keybase.io/oakmac; my proof: https://keybase.io/oakmac/sigs/8WLp7XMVn0f1bxKgXfbhu0i7EMfvzpBLKR8mvku6UfE ]

Posts3
Comments40
View on HN

Build tooling stability is one of the great undersold benefits of the ClojureScript ecosystem IMO.

The build process is defined by the compiler (using Google Closure tooling under the hood) and has not significantly changed since the introduction of ClojureScript in 2011.

Since all CLJS projects use the same compiler, the build process works the same everywhere, regardless of which actual build program is being used (Leiningen, shadow-cljs, etc).

This is very similar to https://CheckForCorona.com

The team at Luminare (https://luminaremed.com) has been working with epidemiologists and doctors from Harris County and the City of Houston to build out a screening tool to help prioritize public testing. We are doing about ~10k screenings per day and ready to ramp up as more testing becomes available: https://checkforcorona.com/harris-county

We are providing this tool free for any hospital or public health organization that needs it. Please reach out if you have any connections!

Hi :)

I feel your pain here and just wanted to let you know how common this is for programmers who initially try out Lisp for the first time. As others have alluded to, I promise this initial "parenthesis shock" goes away rather quickly as you read and write Lisp code. In my direct experience, I have hired junior developers straight out of a coding bootcamp who were able to pick up ClojureScript in their first week using Sublime Text with no editor extensions. In other words: you can definitely do this; it's not magic.

I would strongly encourage you to check out Parinfer [1]. Parinfer makes indentation "significant" so you never have to worry about "closing the parens". Basically, if you can handle Python or CoffeeScript indentation, you can handle Lisp. There are no hotkeys to learn and it is available in most common editors today.

For a first project I would recommend rewriting something you have already written and are familiar with. That way you can focus on just the language and not worry about the problem domain or "how to solve it". Just do a 1-to-1 port of something you've already done and compare how the two solutions are the same or different.

I'm sorry you are being downvoted and being told to "just use emacs" or "use the REPL more". IMO, these are not helpful suggestions for someone new to the language.

Good luck. You won't regret learning Clojure. One of the best things I have ever done for my career.

[1] https://shaunlebron.github.io/parinfer/

I totally agree the overhead of learning Emacs is orthogonal from learning Lisp. IMO, it's a shame that there is such a strong association between that tooling ecosystem and Lisp languages. I think it pushes a lot of newcomers away from the learning process.

One of the design goals of Parinfer[1] is to help reduce the cognitive load of Lisp syntax for newcomers. Hopefully more introductory texts adopt it as part of their environment setup.

[1] https://shaunlebron.github.io/parinfer/

I'm not sure when your last exposure to the ClojureScript ecosystem was, but almost nothing you mention is a problem as of 2016: debugging, hot reloading, large JS deps, etc.

I'm biased, but I think ClojureScript is the best way to use the JavaScript platform today. Awesome core library, consistent build process, best of breed tooling, persistent data structures, flexible syntax (JSX is madness compared to hiccups); I could go on.

JavaScript the platform may have it's warts, but ClojureScript is all beauty :)

FYI - the JavaScript output of the ClojureScript compiler is designed to be compatible with the Google Closure Compiler in Advanced mode.

In other words, CLJS users don't have to do anything special to benefit from the power of Google Closure. It just works :)

Not really due to the fundamental difference between Lisp and JavaScript syntax.

You could borrow the idea of indentation inferring function scope structure and make a plugin that would modify JavaScript syntax accordingly, but I'm not sure that would even be desirable when writing JavaScript.

Parinfer is made possible by Lisp's unique syntax.

  they have to make the indentation part of the syntax
The syntax remains unchanged. Parinfer only "infers" the structure of your code based on the same indentation that you typically would do anyway as part of formatting your code to be readable.
  shifts cognitive load from managing parenthesis to managing indentation
Yes, exactly :)

I can speak to this as I've been using Parinfer on existing code for the last week or so.

There can potentially be a "big diff" when you run Paren Mode on a file for the first time, but that's typically a one-time event. The beauty of Parinfer is that most Lisp code already uses these conventions.

Once you start using Parinfer's Indent Mode regularly it feels crazy to write or edit lisp without it.

One of my plans for atom-parinfer[0] is to have a comment flag in a file that will automatically signal "use Parinfer on this file". Similar to JSHint inline configurations [1].

[0] https://github.com/oakmac/atom-parinfer [1] http://jshint.com/docs/#inline-configuration

I can assure you the author of Parinfer is aware of this distinction ;)

That sentence is an oversimplification to give context to the rest of the content in that section. Should probably have an asterisk to clarify.

Never thought this comment would end up on HN when I wrote it ;)

I remember writing this example and being mesmerized watching the games progress. I think I made an alternate version that speed up the time and opened a handful of browser tabs to watch the games. Most of them do end up in insufficient piece draws or the 50-move rule.

Glad to see others are enjoying it :)

Not a huge fan of the class keyword in ES6 either...

I do not use statically typed languages and I have nothing against MSFT; I was solely commenting on TypeScript as a language.