Understanding Clojure's Persistent Vectors (2013)

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • immutable-js

    Immutable persistent data collections for Javascript which increase efficiency and simplicity.

  • Persistent data structures are, in my opinion, underrated. Not so much for every day programming tasks, but specifically for code that resembles planning/searching.

    Here is one library I've heard of https://immutable-js.com/ . I don't know of others.

  • mori

    ClojureScript's persistent data structures and supporting API from the comfort of vanilla JavaScript

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • nim-persistent-vector

    Implementation of Clojures persistent vector in Nim for easy immutable lists.

  • Great series of articles. I used this to write a persistent vector library in Nim: https://github.com/PMunch/nim-persistent-vector

  • vector

    A persistent list experiment (by tomprimozic)

  • voila.. took a bit longer, the code was "too slow"... turns out I was using the wrong branching factor!

    https://github.com/tomprimozic/vector

  • react-matchstick

    Matchstick game solver implemented in browser-side JavaScript. React front end.

  • My experience with ImmutableJS was to remove it and see performance go up by a factor of 100-200.

    https://github.com/mschaef/react-matchstick/commit/070802b69...

    This was something of a worst case scenario (and it was five years ago, so presumably things have gotten better) but it still underscores the need to carefully consider these tools before adopting them. Do they really offer enough (to your application) to be worth the associated costs in readability, performance, etc.

    If the goal is to prevent mutation, maybe there are better ways to do that. If the goal is to really accelerate, it's worth testing. (At the very least, Clojure's vectors seem unlikely to provide a benefit if you're working with vectors of len<32.)

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts