Ask HN: What are some of the most elegant codebases in your favorite language?

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

Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. desktop

    Focus on what matters instead of fighting with Git. (by desktop)

    At the beginning of the year I was rewriting a SPA and looking for ideas on how to structure a web app. One project I looked at was Github Desktop and I think it has very clean code for an app.

    https://github.com/desktop/desktop

  2. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  3. cl-ppcre

    Common Lisp regular expression library

  4. FS2

    Compositional, streaming I/O library for Scala

    fs2 (reactive streaming, https://github.com/typelevel/fs2) written in Scala. It shows how nicely things can compose in a typesafe way if the language supports it.

    And then, the opposite is Monix (https://monix.io/). It's also about reactive streaming and the API is great, but the inner code is ugly because it sacrifices readability/composability for performance.

  5. Monix

    Asynchronous, Reactive Programming for Scala and Scala.js.

    fs2 (reactive streaming, https://github.com/typelevel/fs2) written in Scala. It shows how nicely things can compose in a typesafe way if the language supports it.

    And then, the opposite is Monix (https://monix.io/). It's also about reactive streaming and the API is great, but the inner code is ugly because it sacrifices readability/composability for performance.

  6. ajqvue

    Discontinued Ajqvue is a Java based GUI frontend for accessing data in several mainstream databases. [GET https://api.github.com/repos/csanyipal/ajqvue: 404 - Not Found // See: https://docs.github.com/rest/repos/repos#get-a-repository]

    Do this and your documentation will be easy.

    "https://github.com/csanyipal/ajqvue/blob/master/src/com/dand..."

  7. Redis

    For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.

  8. ruby

    The Ruby Programming Language

  9. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  10. Botan

    Cryptography Toolkit

  11. ClickHouse

    ClickHouse® is a real-time analytics database management system

  12. Elm

    Compiler for Elm, a functional language for reliable webapps.

  13. Mezzano

    An operating system written in Common Lisp

  14. Carbon

    A simple PHP API extension for DateTime. (by briannesbitt)

  15. Laravel

    Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation for your next big idea — freeing you to create without sweating the small things.

  16. pytudes

    Python programs, usually short, of considerable difficulty, to perfect particular skills.

  17. sf

    Simple Features for R

  18. Sequel

    Sequel: The Database Toolkit for Ruby

  19. Sidekiq

    Simple, efficient background processing for Ruby

  20. ripgrep

    ripgrep recursively searches directories for a regex pattern while respecting your gitignore

  21. Backbone.js

    Give your JS App some Backbone with Models, Views, Collections, and Events

  22. solvespace

    Parametric 2d/3d CAD

    C++ this file covers all the math for working with NURBS curves and surfaces:

    https://github.com/solvespace/solvespace/blob/master/src/srf...

    There is a lot more in other files - triangulation, booleans, creation - but the core math functions are there in very readable form.

  23. toucan

    A classy high-level Clojure library for defining application models and retrieving them from a DB (by metabase)

    Metabase's toucan (https://github.com/metabase/toucan) has some elegantly annotated source code: https://rawgit.com/metabase/toucan/master/docs/uberdoc.html

  24. gitfs

    FUSE filesystem to mount git repos. (by gravypod)

  25. FizzBuzz Enterprise Edition

    FizzBuzz Enterprise Edition is a no-nonsense implementation of FizzBuzz made by serious businessmen for serious business purposes.

  26. Folly

    An open-source C++ library developed and used at Facebook.

    Not sure if it's still the case but about 6 years ago Facebook's folly C++ library was something I'd point to for my junior engineers to get a sense of "good" C++ https://github.com/facebook/folly

  27. Bitwarden

    Bitwarden infrastructure/backend (API, database, Docker, etc). (by bitwarden)

    [C#] Bitwarden server repository is probably one of the cleanest (non-novel) solution architectures I have seen so far. I always point people to it as learning material for structuring the code. It is not the most minimalistic but I feel like it strikes very good balance and does not follow blindly all the """fancy""" OOP patterns people should never use anyway.

    https://github.com/bitwarden/server

    Otherwise, I can see why people are burned, average Java/C# codebases look abysmal and written without understanding of (not) using heaps of mediator/factory/adapter/provider classes.

  28. hattery

    Java library for making HTTP requests with a fluent, immutable API

    While I think there's a lot to love about Java, I think the standard library itself is not an especially great role model. Most of it was written a long time ago and has a fairly antiquated style - lots of mutable state, nullability, and checked exceptions. Not that the library isn't an incredible asset - it's luxuriously rich compared to working in Node.js - but if it were written from scratch today, I suspect it would look fairly different. Eg, the collection classes would use Optional and have separate read/write interfaces.

    For an example of "modern Java" I would point at something like this (which I wrote, sorry about the hubris):

    https://github.com/stickfigure/hattery

  29. Stellar

    A Tetrahedral Mesh Improvement Program (by ctlee)

  30. Lua

    Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.

    https://github.com/lua/lua

    Everything is nicely documented and pretty easy to read.

    It's a great companion if you want to learn more about how languages are implemented.

  31. pandoc

    Universal markup converter

    I really like Pandoc codebase [0]. It is a document converter written in Haskell.

    Reading it’s source code a decade ago was a turning point for me. Prior to that, I always felt an insurmountable gap between my toy codebases and real projects. All those open source software written in C++ etc. looked so unapproachable that I felt like I could not write production ready software.

    Pandoc however, was written in a language I didn’t know and did something very complicated very thoroughly, yet remained accessible. It was very nicely laid out and I could easily follow how it constructs it’s internal representation of documents and converts between them. I think this made me catch the functional programming bug for the next decade that let me build way bigger things than I had any right to, without getting crushed underneath all the complexity. Putting together something in Java or even contributing to OOP Python codebases was still like an exercise in frustration, no matter how much better I thought I’m getting at programming I would feel stupid trying to wrap my head around those abstractions and hierarchies. Somehow FP just clicked for me and made me see how I could start from a simple library call and little by little build the complete program.

    Today I am comfortable with all kinds of paradigms and levels of abstraction, but I definitely owe a lot to Pandoc for showing me I was smart enough to understand and modify real world software I did not build myself.

    [0] https://github.com/jgm/pandoc

  32. Phoenix

    Peace of mind from prototype to production

    I’m surprised that nobody has posted about Elixir yet. I nominate the excellently written Phoenix library. Not only is the code well organized and easy to find, the documentation is expansive and right next to the code.

    https://github.com/phoenixframework/phoenix

  33. Programming-Language-Benchmarks

    Yet another implementation of computer language benchmarks game

    I found Zig implementation of json parsing is interesting. The code is free from hidden control flow !.

    https://github.com/hanabi1224/Programming-Language-Benchmark...

  34. I found Zig implementation of json parsing is interesting. The code is free from hidden control flow !.

    https://github.com/hanabi1224/Programming-Language-Benchmark...

  35. freebsd-src

    The FreeBSD src tree publish-only repository. Experimenting with 'simple' pull requests....

  36. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub 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

  • Show HN: Build you own SQL query planner/optimizer guide

    1 project | news.ycombinator.com | 27 Nov 2024
  • 3 useful VS Code extensions for testing Ruby code

    2 projects | dev.to | 8 Nov 2024
  • SQLite on Rails: The how and why of optimal performance

    6 projects | news.ycombinator.com | 11 Sep 2024
  • Show HN: Node.js ORM to query SQL database through an array-like API

    2 projects | news.ycombinator.com | 5 Sep 2024
  • The 4-chan Go programmer

    6 projects | news.ycombinator.com | 28 Aug 2024

Did you know that C++ is
the 7th most popular programming language
based on number of references?