> Our codebase consists of 250k lines of Clojure split evenly between source and test code. It’s one of the largest Clojure codebases in the world. Aren't there many Clojure projects out there, or is the language generally not used for large projects? I have a JavaScript frontend written in Vue that is 150k+ lines of code, without any tests. Which would be 25k lines of code more than they have, disregarding their tes…
Tour of our 250k line Clojure codebase
121–130 of 237 posts
Re: Tour of our 250k line Clojure codebase
#122Earlier quoted context omitted.
My understanding is that the company is a few years younger than Spec, but perhaps the code base is very very old.
Schema is a good library. Everyone seems to use spec today, but Schema easier to use than spec IMO. Spec is also still in alpha, with spec2 still under development.
Re: Tour of our 250k line Clojure codebase
#123Earlier quoted context omitted.
You're writing more code than you have to though. More code = more bugs.
I don’t agree there. Most of these extra classes are just type declarations with no methods at all. While the total LoC written might be higher, the amount of written logic in which you can introduce bugs is less.
Re: Tour of our 250k line Clojure codebase
#124Earlier quoted context omitted.
It's not difficult to write imperative code in Clojure; [1] is an example. Immutability-by-default makes you work to mutate things, for sure, but that in itself doesn't make the language inherently functional. [1] https://clojuredocs.org/clojure.core/let#example-542692c7c02...
Your link might be pointing to the wrong example. I assume you wanted to show an example of an atom.
Re: Tour of our 250k line Clojure codebase
#125Earlier quoted context omitted.
I've heard from investors that it is similar to Darklang. It certainly has the same goals, but dunno if it's the same approach in any way. Will be interesting to see
In that case, I wouldn't go near it with a ten foot pole.
Re: Tour of our 250k line Clojure codebase
#126> One of the coolest parts of our codebase is the new general purpose language at its foundation. Though the semantics of the language are substantially different than Clojure, it’s defined entirely within Clojure using macros to express the differing behavior. It compiles directly to bytecode using the ASM library. The rest of our system is built using both this language and vanilla Clojure, interoperating seamlessl…
what a company needs is good leadership at every level. not unique tools, and not "10x engineers".
Re: Tour of our 250k line Clojure codebase
#127> One of the coolest parts of our codebase is the new general purpose language at its foundation. Though the semantics of the language are substantially different than Clojure, it’s defined entirely within Clojure using macros to express the differing behavior. It compiles directly to bytecode using the ASM library. The rest of our system is built using both this language and vanilla Clojure, interoperating seamlessl…
I concur. I think it's nuts when companies do this. There's another well know SaaS that basically invented their own language but I can't recall who. It's the ultimate ego food for the lead engineer imho. what a company needs is good leadership at every level. not unique tools, and not "10x engineers".
Re: Tour of our 250k line Clojure codebase
#128Earlier quoted context omitted.
Taken literally the claim isn’t true - a Turing complete type system can enforce any constraint that a Turing complete programming language can. But your everyday type systems typically can’t express concepts like “a list of at least 3 elements” or “a number which is a power of 2”.
Pardon my ignorance, but can this spec thing automatically deduce that 8^n evaluates to "a number which is a power of 2" or log(2, "a number which is a power of 2") is an integer? If yes, then I agree this is super helpful (and magical). If not, how is this different from a normal constrcutor (with runtime input validation)?
Re: Tour of our 250k line Clojure codebase
#129Earlier quoted context omitted.
I concur. I think it's nuts when companies do this. There's another well know SaaS that basically invented their own language but I can't recall who. It's the ultimate ego food for the lead engineer imho. what a company needs is good leadership at every level. not unique tools, and not "10x engineers".
Are you thinking of https://www.joelonsoftware.com/2006/09/01/wasabi/ perhaps?
a complete head case, nevertheless he's a million times more successful than I so perhaps I'm the one who's nuts.
Re: Tour of our 250k line Clojure codebase
#130If I want to learn Clojure, where is the best place to start? I have a lot of experience with Python/Javascript now, and spent many years in C/C++/Objective C and Java. Also have some Go.
One of the best "why Clojure" talks that I've seen, especially for somebody coming from an OOP perspective, like myself.