News for hackers. Stuff that matters.
Re:Why is Jepsen written in Clojure? by scotty79 on Wednesday December 06, 2023 @04:19PM (#38549604)
Clojure spits out Java stack trace if you make syntax error. It's equivalent of Python barfing segfault when you put tab in the wrong place.
Re:Why is Jepsen written in Clojure? by fulafel on Saturday December 09, 2023 @05:49AM (#38580707)
This doesn't happen with the normal REPL (or invoking with clj -X) after a couple of first examples that came to mind:

  user=> (defn foo [[a b] (+ a b))
  Syntax error reading source at (REPL:14:26).
  Unmatched delimiter: )
  user=> (defn foo [a b] a/b)
  Syntax error compiling at (REPL:1:1).
  No such namespace: a
  user=>
It will give you a stack trace of the compiler when asked following a syntax error though, with a disclaimer not to confuse it with your own code:

  user=> (pst)
  Note: The following stack trace applies to the reader or   compiler, your code was not executed.
  CompilerException Syntax error compiling at (1:1). #:clojure.error{:phase :compile-syntax-check, :line 1, :column 1, :source "NO_SOURCE_PATH"}
 clojure.lang.Compiler.analyze (Compiler.java:6808)
 clojure.lang.Compiler.analyze (Compiler.java:6745)
  [...]
Possibly you were using tooling that always tried to present the stack trace without discerning between kinds of evaluation errors?
Re:Why is Jepsen written in Clojure? by phyzome on Saturday December 09, 2023 @10:21AM (#38582599)
That does look considerably better than what I used to see.