beginners

David H 2025-12-21T20:41:43.489279Z

Hey all, is Clojure-dart still actively maintained?

David H 2025-12-22T11:28:03.487129Z

@seancorfield thank you so much

Harold 2025-12-21T20:45:15.024929Z

yes

✅ 1
seancorfield 2025-12-21T21:20:03.160009Z

There was a talk at Conj this year (last month): "ClojureDart: still alive, kicking harder - Grand & Dupuch" - so keep an eye out for that video being released (in January, I think).

lread 2025-12-21T22:20:18.688399Z

Also see: #clojuredart

David H 2025-12-21T22:49:24.737229Z

@Iread thanks, why don't I see this channel by default?

seancorfield 2025-12-21T22:51:11.394409Z

There are hundreds of channels here -- we only auto-join new members to about a dozen of them, so folks aren't overwhelmed. New channels are being created all the time. The expectation is that as folks settle in here and figure out their interests, they can join more channels that go deeper on those topics.

seancorfield 2025-12-21T22:52:40.048539Z

You can find all available channels here (desktop app):

seancorfield 2025-12-21T22:53:10.178979Z

Feel free to ask in #slack-help if you need pointers on how to navigate the various Slack incarnations.

seancorfield 2025-12-21T22:56:16.904299Z

There are channels for pretty much all of the Clojure dialects, but we only auto-join new members to #clojure and #clojurescript -- but there are also #jank #babashka #squint #cherry #clojerl #basilisp and probably others I'm forgetting. There are channels for all the various editors and their plugins too, in case you need them @lifeainteasy #emacs #vscode #neovim #cider #calva #conjure #cursive #clojure-repl-intellij etc etc.

Ramin Soltanzadeh 2025-12-21T22:01:11.333889Z

I have two slightly weird questions. Sometimes the first argument of an expression gets special indentation treatment, such as with if:

(if foo
  bar
  baz)
as opposed to treating all arguments equally, such as with comp:
(comp foo
      baz
      baz)
Obviously it makes sense, but what is the rule? Is this considered OK because if is a special form? That doesn't make sense because I could define my own non-special homegrown-if with the same semantics. Is this considered OK for a defined set of forms? If so, which ones? Intuitively it feels like this slightly conflicts with the code-as-data philosophy behind structural editing and Lisp in general. I realize I should probably ask the second question in a separate message, so I'll do just that.

solf 2025-12-22T09:57:24.311069Z

To answer one of your questions, if you make a homegrown-if macro and you want it indented as an if it's possible, at least on emacs: https://docs.cider.mx/cider/config/indentation.html#macro-indentation Similarly I'm pretty sure you can tell linters like clj-kondo to "treat this macro as this other macro". Not sure about other editors

solf 2025-12-22T09:59:35.743219Z

For cljfmt: https://github.com/weavejester/cljfmt/blob/master/docs/INDENTS.md

p-himik 2025-12-21T22:05:41.659059Z

No rules. It's just how someone formats their code. In some projects, it's (if ...) as you quoted it, in others it would be

(if foo
    bar
    baz)

Ramin Soltanzadeh 2025-12-21T22:12:33.890629Z

It seems like this has a name, even. The Clojure Style Guide has a section called "Semantic Indentation vs Fixed Indentation". I guess I'm rubber-ducking right now.

👍 1
seancorfield 2025-12-21T22:58:18.314249Z

FWIW, most folk just live with whatever their editor/Clojure plugin does by default, but the Clojure Style Guide will give you a good sense of how folks expect Clojure code to look.

Harold 2025-12-21T23:08:40.623179Z

We use https://github.com/weavejester/cljfmt and really enjoy it - one of the main benefits is not expending effort wondering such things. But yes, the style guide is very helpful for such questions.

❤️ 1
seancorfield 2025-12-21T23:33:33.684889Z

What editor are you using @soltanzadehramin?

Ramin Soltanzadeh 2025-12-21T23:33:40.959629Z

I'm sure I'm not able to properly steelman the argument for semantic indentation, so my criticism is probably partially valid at best. It seems like semantic indentation only is relevant when the first argument is "special enough", which seems like something that is difficult to define. Also, none of your own code would be semantically indentable by default, causing conflicting styles in the same code base. I'm sure I'm missing something here. Is there anywhere I can read more in-depth discussions on this topic? Maybe what I'm discounting too much is the fact that the first argument is in fact often special in FP (e.g. apply, conj).

Ramin Soltanzadeh 2025-12-21T23:34:35.554209Z

I use emacs with CIDER. I don't remember how I set it up now, but I have clojure-mode that does formatting out of the box. I was just curious about the reason behind the choices.

seancorfield 2025-12-21T23:34:51.615269Z

There is a specific difference between "special forms" -- https://clojure.org/reference/special_forms -- and regular function calls.

seancorfield 2025-12-21T23:35:56.575339Z

Ah, it's been years since I last used Emacs so I'm not up-to-date on how the Clojure packages handle formatting...

Ramin Soltanzadeh 2025-12-21T23:39:01.467999Z

> The default indentation rules in clojure-mode are derived from the https://guide.clojure.style. Please, refer to the guide for the general Clojure indentation rules. I remember clojure-mode being a CIDER thing and then emacs releasing their own (essentially hijacking the name). Now I don't know which one I have, haha. But if it's the official emacs one it should be based on Clojure Style Guide. I have semantic indentation in my emacs right now.

2025-12-22T05:16:51.229589Z

the indentation conventions date back to common lisp, if not further back to the original lisp itself

Ramin Soltanzadeh 2025-12-21T22:04:01.601879Z

Trying to figure out the answer to my previous question on my own, I decided to look at the docs for if and I see this:

-------------------------
if
  (if test then else?)
Special Form
  Evaluates test. If not the singular values nil or false,
  evaluates and yields then, otherwise, evaluates and yields else. If
  else is not supplied it defaults to nil.

  Please see 
-------------------------
Here the question mark seems to mean "nillable", but from what I've gathered it's supposed to denote booleans or predicates in clojure. I would have expected it to say the following:
(if test? then else)
What's going on here?

p-himik 2025-12-21T22:06:29.472019Z

The question mark there is like ? in regular expressions, meaning "could be present exactly once, could be omitted".

Ramin Soltanzadeh 2025-12-21T22:14:13.407809Z

Is this how the docs are generally written?

Ramin Soltanzadeh 2025-12-21T22:16:31.851079Z

Hmm. Makes sense, I suppose. It's showing how the form is used (i.e. text in other people's source code), not the source code for the special form itself.

p-himik 2025-12-21T22:19:09.270269Z

At least the docstrings and the :arglists metadata in clojure.core, yes.

daveliepmann 2025-12-22T07:38:18.642229Z

it's explicitly mentioned on the https://clojure.org/reference/special_forms > Headings for the special forms informally describe the special form grammar using regular expression syntax: ? (optional), * (0 or more), and + (1 or more). Non-terminals are denoted by italics.

p-himik 2025-12-22T07:39:28.557679Z

That description is only for that page, not for the code in clojure/core.clj. But yea, the same grammar is used there as well, just in wider contexts. Except for italics, of course.