
Introduction to Clojure (2013) - mariuz
https://www.creativeapplications.net/tutorials/introduction-to-clojure-part-1/
======
todd8
I’ve used Lisp for decades, so it’s hard to remember a time when the
parentheses bothered me, but every new programming language has some surface
syntax that can be off-putting. I used to hate the hard to type curly braces
when I started with C, my fingers didn’t know where they were on the keyboard;
at the time, I was programming with languages that used BEGIN and END. Now I
prefer curly braces or even indented languages like Haskell or Python.

I encourage others to learn lisp. It’s really not a hard language, and the
parentheses don’t get in the way after a brief period of acclimation. It also
opens up the real power of Emacs customization and programming, which is done
in Lisp.

~~~
ofrzeta
> I encourage others to learn lisp. It’s really not a hard language, and the
> parentheses don’t get in the way after a brief period of acclimation.

Every time I try this, like twice a year, I get annoyed while setting up a
development environment that supports the particular Lisp (usually Clojure),
its syntax and the REPL. Last time I tried it was Spacemacs that didn't work
as announced, on both Linux and macOS.

I am a Vi user and I would prefer to use that instead of learning a new
environment such as Emacs. I want to set this up and have it work as
frictionless as possible because learning a new programming language and its
ecosystem is already enough work. However the Vim plugins (e.g. fireplace)
also didn't "just work".

~~~
kazinator
TXR Lisp comes with an accurate syntax definition file for Vim (and only Vim).
Well, not exactly "comes with": _txr.vim_ is in the root directory of the
source tree. Some distros seem to package that, like Arch.

The whole project was developed using Vim.

Vim supports normal Common Lisp out-of-the-box. Just save your file under a
.cl or .lisp suffix.

In 18 years of working with Lisp in Vim, I never had a problem. Never
installed a plugin or did anything special (other than developing that syntax
file for TXR Lisp). At most I played with the content of :lispwords; that's
about it.

------
geokon
By the guy behind the thing/geom library:

[https://github.com/thi-ng/geom/](https://github.com/thi-ng/geom/)

Check out the examples, it's very pretty. The little I've played with it it's
been incredibly ergonomic and fun, in the hiccup-style you see in Clojure.
Haven't come across anything like it in other languages

~~~
dimovich
The geom library is amazing! Client-side and server-side generation of charts
with same code. The documentation is also great.

The project was written in a Literate Programming style. These turned out to
be an obstacle for contributions, so there is an ongoing effort to migrate the
code out of that. You can find the latest version on this branch:
[https://github.com/thi-ng/geom/tree/feature/no-org](https://github.com/thi-
ng/geom/tree/feature/no-org)

------
amitprayal
Doing any Swing UI apps in Clojure is a breeze, and its very interactive
during development, I rarely need to write any java code for any of my
personal apps, also JEdit is a good fit as an editor/ide for Clojure , using
Jedit Macros gives it a Java...ish emacs feel. if only there was debugger.

------
zmmmmm
> Even after a short while, you'll find these brackets seem to become
> automatic and mentally disappear

Is this really true? It's by far the most off-putting thing about Lisp
dialects to me. Trying to get nested parentheses to match is extremely tedious
when I have to do it in non-Lisp languages. It seems horrific if my whole
programming experience is one long exercise in "why doesn't this bracket
match!?!?!!". I know it can't be this bad because too many people have no
problem with it, but it's the only thing I can think when I see some Lisp
source code with 50 nested parentheses ...

~~~
TeMPOraL
> _Is this really true?_

Yes. There comes a moment in which you suddenly stop minding parentheses. For
me it was when I started reading SICP and doing its exercises on paper. After
writing a couple Lisp expressions by hand, something clicked in my brain, and
since then I don't need to count parentheses anymore.

I strongly suspect following the Lisp style of indentation and placing parens
(closing parens go together, instead of one per line like in Algol-derived
languages) is vital to achieving that.

~~~
pixelperfect
After a while the parens became something I enjoy having. I like being able to
structurally edit code, and comment out paren expressions by prepending them
with '#_', I feel like I can edit Clojure code much faster than JavaScript
code.

~~~
TeMPOraL
I have the same feeling. After spending a couple years writing Lisp code (CL
and Clojure), the "normal" Algol-like syntax now feels unwieldy.

