HNHacker News
TopNewBestAskShowJobs

puredanger

4,983 karma · joined June 23, 2010

  Name:    Alex Miller
  Tweets:  @puredanger
  Blog:    http://tech.puredanger.com
  Job:     Nubank - Clojure dev
  I made:  Strange Loop conference - https://thestrangeloop.com
  Nachos:  yes, have some
submissionscomments
puredanger··on Java 21 VirtualThreads vs. Clojure Lazy Seqs
The other thing I didn't mention is that the change to remove biased locking a while back has also had an impact in some places that do almost always uncontended locking, so we're kind of considering that too.
puredanger··on Java 21 VirtualThreads vs. Clojure Lazy Seqs
We are aware, and that is one of the options. :)
puredanger··on Datomic is Free
Working on Clojure and Datomic!
puredanger··on Clojure Turns 15 panel discussion video
It's been kept up to parity but a complete rewrite is currently under way - watch https://dmiller.github.io/clojure-clr-next/
puredanger··on Clojure Turns 15 panel discussion video
How do we ever move the world forward if we are only allowed to have one thing?
puredanger··on Clojure Turns 15 panel discussion video
These are useful comments and issues are welcome at https://github.com/clojure/clojure-site/issues
puredanger··on Clojure needs a Rails
I think this is insightful and probably an unconscious bias of the core team (who have all used Java for decades) and have a good sense of that.
puredanger··on Using SBCL Common Lisp as a Dynamic Library
There are a number of companies with 100s of Clojure developers and I know of several Clojure companies with 100ks of LOC. Most larger projects I know of use ancillary systems to validate map attributes via spec, Schema, Malli, etc.

Statically typed libs and programs seem to still have issue trackers full of lots of bugs, and issue trackers for dynamically typed programs are not (in my experience) mostly type-related problems. That is, static types don't actually help you as much as you might first assume at writing correct programs.

puredanger··on Clojure builds as an amalgamation of orthogonal parts
add-libs is definitely still on the future list!
puredanger··on Clojure builds as an amalgamation of orthogonal parts
To get started with clj, you need 0 files. From a project directory, you can just type `clj` and get a REPL that includes Clojure and source files in src/. You can add new source files and immediately invoke them with `clj -X`. You can push that project to github and others can immediately use it from another project using a github url/sha. This is far "easier" than leiningen for getting started. The comparative experience there requires creating a project.clj with a bunch of keys, building a jar, getting an account and keys on clojars to deploy it, etc.

There's lots of other things you can do with clj - these are all additive. At some point, you might (possibly) need a build script. When you do, it's written in Clojure using a pretty straightforward set of functions and you can copy/paste in a starting point. You can grow that build file forever.

puredanger··on Clojure builds as an amalgamation of orthogonal parts
Clojure projects can start with literally no files (not even a deps.edn). By default, you get Clojure as a dep and src/ as a directory. Run `clj` to get a repl. If you make a function, you can call it with `clj -X my.ns/foo`. If you push it to github, others can consume it immediately by using your git url + sha.

There are lots of other things - they are all additive. Many Clojure libraries and tools don't need a build.clj or tools.build at all.

My experience is that deps.edn is much easier to get started with. With a template from something like clj-new you can get testing, a basic jar building script, etc to get started with and it's all there for you to muck with if needed.

puredanger··on Clojure builds as an amalgamation of orthogonal parts
These are good points and I'd welcome feedback at https://github.com/clojure/clojure-site/issues
puredanger··on Clojure builds as an amalgamation of orthogonal parts
gists are git repos and can contain multiple files. Since clj supports git deps, you've been able to use them as deps for a long time.

Example gist: https://gist.github.com/puredanger/cbcdd9f54deb7fb7309fdd632...

Run it: clj -Sdeps '{:deps {a/gist {:git/url "https://gist.github.com/puredanger/cbcdd9f54deb7fb7309fdd632..." :sha "116ac594c922be6ed9d3366f5ac89ed2b0a082f5"}}}' -X foo/bar :name '"Alex"'

puredanger··on Why Clojure? (2018)
That would be a good story if it were true, except it's not.
puredanger··on Sponsoring Open Source Developers
Thanks! After Cognitect joined Nubank we have mostly wound down that part of our business. But if you're in the market for a database, please check out https://www.datomic.com/ !
puredanger··on Sponsoring Open Source Developers
FYI, the creator of Elixir, José Valim, was at Platformatec, but then formed Dashbit.
puredanger··on Sponsoring Open Source Developers
Clojurists Together is an independent effort with different goals and funding model.
puredanger··on The Future of Clojure
Lots of data on this from the annual survey: https://clojure.org/news/2020/02/20/state-of-clojure-2020
puredanger··on The Future of Clojure
Lots of good questions here. https://building.nubank.com.br/welcoming-cognitect-nubank/ from Ed Wible, CTO at Nubank is a good read that answers many of them btw. Also see https://cognitect.com/blog/2020/07/23/Cognitect-Joins-Nubank.

> What are the new resources (for Clojure? or just Datomic?), how are they being used? Does Nubank have opinions / direction on these resources.

Since Cognitect joined Nubank, several people have joined the Datomic team, both new hires and internal moves from Nubank and the rate of development has increased. We are also looking at expanding the Clojure team in the near future.

> Has an open sourced Datomic been discussed?

No changes planned.

> Who owns the Clojure trademarks and IP going forward. Any talk of a Clojure Foundation?

Clojure was and is an independent project and Rich Hickey is a joint owner (along with contributors) to the Clojure copyrights. From Rich's announcement on the Clojure mailing list: "Clojure remains independent, and development and stewardship will continue as it has, with more resources and a much larger sponsoring organization in Nubank."

> Alex Miller does an awesome job but boy he has a lot to cover.

Thanks and indeed! As above, we are likely to expand the Clojure team in the future.

> There was talk a few years ago of facilitating community involvement with a PEP type process

We created https://ask.clojure.org as a way for Clojure users to discuss problems important for them and to allow voting on those problems for their importance. We use that information to inform decisions about what to work on so I encourage all Clojure users to express their needs there!

> Clojurescript has left Core. Is Nubank likely to want to get involved here?

Cognitect was, and Nubank now is, the primary sponsor for ClojureScript (funding both David Nolen and Mike Fikes).

puredanger··on The Future of Clojure
Lots of jobs in this recent job thread btw: https://www.reddit.com/r/Clojure/comments/k937mc/who_is_hiri...
puredanger··on The Future of Clojure
Well, it's not a necessity, and it exists a library that anyone can use, so I don't understand any reason to be salty.
puredanger··on The Future of Clojure
NPEs exist but I probably go months or even years between encountering them. Most Clojure functions are polymorphic on nil and provide safe default behavior. You primarily encounter them when invoking Java APIs via interop.
puredanger··on The Future of Clojure
This is a pretty good talk about this (don't think it's the same company): https://www.youtube.com/watch?v=7E4gF3KEwZ0
puredanger··on The Future of Clojure
Using Java libraries from Clojure is often easier than using them from Java. You say this as a negative but the ability to tap that ecosystem easily when needed is a huge benefit. Having worked in many Clojure projects, needing to do so is not that common in my experience.
puredanger··on The Future of Clojure
If anything, I'd say that Clojure discourages the creation of DSLs through macros compared to most other Lisps, and encourages the use of plain data and functions first.
puredanger··on The Future of Clojure
I think "needs strict static type systems" is a hypothesis but one with certainly many anecdotal examples to refute it. Most of the studies that have been done (and admittedly these studies are extremely difficult to do well) show lower or similar bug counts in dynamic languages vs static languages.

If you've built large scale system with statically type checked languages that solve all these problems, I assume you never had any bugs right? Never needed to write any unit tests?

puredanger··on The Future of Clojure
Both devs and jobs exist but they are mismatched in terms of geography and experience expectations. I don't think it's specific to Clojure, it's common to any narrow technology. Certainly things have gotten far better over the last 10 years and there are more companies hiring in Clojure more actively now than I've ever seen. Fixing it requires a feedback cycle that takes a long time to grow into an active market.

When I first started in Java in 1997, there were few companies doing Java and few devs who knew it and it was much the same. Sun spent like a billion dollars marketing Java to create that ecosystem.

puredanger··on The Future of Clojure
Clojure was designed to be applicable where Java is applicable. Fortunately that space of programs is enormous and the market is enormous. Clojure does not need to "win" against Java (or anything). It is unlikely (for many reasons that have nothing to do with its value as a language) to ever be more than a fraction as popular as Java, but that's irrelevant. It has a thriving sustainable ecosystem with 10k's of devs in 100's of companies. That is sufficient to call it a success.
puredanger··on The Future of Clojure
I use Clojure because I am not a particularly wise programmer (I have been fortunate to work with many actually wise programmers).

I like to write dumb, obvious code. Most Clojure code is about taking your data, representing it a sequence of maps, and transforming them into different sequences of maps. The maps are open (easy to change over time), immutable (impossible to encounter data races, weird equality semantics, or concurrency issues), dynamic (no pre-definition or ceremony required), concise (thanks to a literal representation that does not even require commas between elements), and have a generic access api (no custom functions/accessors/etc).

Because I use the exact same transformation functions on EVERY PROBLEM, there is an enormous amount of reuse of generic operations both within and across Clojure code (even Clojure code that manipulates Clojure code, which is after all, just data).

Because the center of our code is open data, coupled with generic functions open to later extension (multimethods, protocols), Clojure is notably good at handling information systems that evolve over time in requirements (a feature of essentially all of them).

The core constructs are not hard, certainly they are easier to learn and use than complicated things like mutable classes and locking. The unlearning from other languages is often bigger than the learning. Nubank for example is certainly not hiring 100s of Clojure developers - in most cases they are hiring good people and teaching them Clojure. There are other successful companies doing the same.

Large Clojure programs can be hard to reason about because large programs are hard to reason about. One benefit of Clojure programs is that they are often 100x smaller than the equivalent program in a popular OO language. They are also trivial to interact with live in your REPL so that you can inspect the data flowing through them. I will happily take live data and interactive function execution over 1000 classes with custom methods. Both require time to learn but I'm much happier changing the smaller, simpler one.

The idea that "Clojure requires wise developers" is completely backwards. Enormous modern class/annotation based OO programs are the ones that require the smartest developers because that's what it takes to understand them. Clojure is accessible to all.

puredanger··on The Future of Clojure
Just as one example, Nubank did not hire 600 Clojure developers. They hired 600 developers who learned Clojure.
← PreviousPage 2 of 14Next →