clojure VS CPython

Compare clojure vs CPython and see what are their differences.

clojure

The Clojure programming language (by clojure)

CPython

The Python programming language (by python)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
clojure CPython
97 1302
10,268 59,047
0.5% 1.7%
7.9 10.0
about 21 hours ago 2 days ago
Java Python
- GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

clojure

Posts with mentions or reviews of clojure. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-06.
  • Top Paying Programming Technologies 2024
    19 projects | dev.to | 6 Mar 2024
    5. Clojure - $96,381
  • A new F# compiler feature: graph-based type-checking
    9 projects | news.ycombinator.com | 5 Nov 2023
    I have a tangential question that is related to this cool new feature.

    Warning: the question I ask comes from a part of my brain that is currently melted due to heavy thinking.

    Context: I write a fair amount of Clojure, and in Lisps the code itself is a tree. Just like this F# parallel graph type-checker. In Lisps, one would use Macros to perform compile-time computation to accomplish something like this, I think.

    More context: Idris2 allows for first class type-driven development, where the types are passed around and used to formally specify program behavior, even down to the value of a particular definition.

    Given that this F# feature enables parallel analysis, wouldn't it make sense to do all of our development in a Lisp-like Trie structure where the types are simply part of the program itself, like in Idris2?

    Also related, is this similar to how HVM works with their "Interaction nets"?

    https://github.com/HigherOrderCO/HVM

    https://www.idris-lang.org/

    https://clojure.org/

    I'm afraid I don't even understand what the difference between code, data, and types are anymore... it used to make sense, but these new languages have dissolved those boundaries in my mind, and I am not sure how to build it back up again.

  • Ask HN: Why does the Clojure ecosystem feel like such a wasteland?
    3 projects | news.ycombinator.com | 2 Sep 2023
    As an analogy - my face hasn't changed all that much in a past few years, and I haven't changed my profile picture in those few years. Does it really mean that I'm unmaintained/dead?

    > Where can I find latest documentation [...]?

    The answer is still https://clojure.org/. And https://clojuredocs.org/ but it's community-maintained so might occasionally be missing some things right after they're released. E.g. as of this moment Clojure 1.11 is still not there since the maintainer of the website has some technical issues deploying the updated version of the website.

    For me personally, the best API-level documentation is the source code.

    > Where can I find [...] tools / libraries in a easy to use page or section?

    There's no central repository of all the available things since they can be loaded from many places (Clojars, Maven Central, other Maven repositories, S3, Git, local files).

    But there are community-maintained lists, like the one you've mentioned at https://www.clojure-toolbox.com (fully manual, AFAIK) or the one at https://phronmophobic.github.io/dewey/search.html (automated but only for GitHub). Perhaps there are others but I'm not familiar with them - most of the time, I myself don't find that much value in such services as I'm usually able to find things with a regular web search engine or ask the community when I need something in particular.

  • Why Lisp Syntax Works
    5 projects | news.ycombinator.com | 5 Jun 2023
    They are written in Java, and implement a bunch of interfaces, so the implementation looks complicated, but they are basically just classes with head and tail fields.

    https://github.com/clojure/clojure/blob/master/src/jvm/cloju...

  • Best implementation of CL for learning purposes
    3 projects | /r/lisp | 28 Mar 2023
    As a Java/Scala user you should check out Clojure! It is highly recommended (https://clojure.org)
  • Why I decided to learn (and teach) Clojure
    5 projects | dev.to | 20 Mar 2023
    Lisp is not a programming language, but a family of languages ​​with many dialects. The most famous dialects include Common Lisp, Clojure, Scheme and Racket. So after deciding that I was going to learn Lisp, I had to choose one of its dialects.
  • Clojure Turns 15 panel discussion video
    24 projects | news.ycombinator.com | 13 Feb 2023
    I thought you might be trolling. But then when I looked at the Clojure repo on Github https://github.com/clojure/clojure the last commit was 2 months back. There is some merit in your arguments.
  • Advent of Clojure - looking for feedback
    5 projects | /r/Clojure | 12 Jan 2023
    1 - partial is defining a new function that ignores the type hints from func, and would introduce boxing. It also can introduce a performance hit for (remaining) argument arities > 3, since it automatically invokes a varargs variant instead of providing a concrete arity. With the varargs version, in profiling you may see RestFn showing up on hot paths, which is the varargs implementation having to munge seqs every invocation instead of being able to use concrete args matching discrete arities. Depending on the frequency of invocation this may impact performance.
  • The Holy Trinity of Clojure
    7 projects | news.ycombinator.com | 12 Dec 2022
    I love Clojure, but the Java source is oddly formatted which I never understood: https://github.com/clojure/clojure/blob/527b330045ef35b47a96...
  • Is there any currently working way to import a local Java .jar library into a Clojure project?
    3 projects | /r/Clojure | 1 Dec 2022
    I'm using Leiningen to set up the project, so it seems that the guide on clojure.org does not apply. And in the Leiningen Docs I couldn't find anything...

CPython

Posts with mentions or reviews of CPython. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-15.
  • Open source at Fastly is getting opener
    10 projects | dev.to | 15 Mar 2024
    Through the Fast Forward program, we give free services and support to open source projects and the nonprofits that support them. We support many of the world’s top programming languages (like Python, Rust, Ruby, and the wonderful Scratch), foundational technologies (cURL, the Linux kernel, Kubernetes, OpenStreetMap), and projects that make the internet better and more fun for everyone (Inkscape, Mastodon, Electronic Frontier Foundation, Terms of Service; Didn’t Read).
  • C++ Safety, in Context
    8 projects | news.ycombinator.com | 12 Mar 2024
    In my understanding, no. I believe it was bpo-4489 [1], and I couldn't find a matching advisory from the PSF's database [2] which should contain all historical advisories as well.

    [1] https://github.com/python/cpython/issues/48739

    [2] https://github.com/psf/advisory-database/

  • The GIL can now be disabled in Python's main branch
    8 projects | news.ycombinator.com | 11 Mar 2024
  • Eloquent JavaScript 4th edition (2024)
    10 projects | news.ycombinator.com | 7 Mar 2024
    How do you mean? CPython uses karatsuba's for large numbers which should be asymptotically fast

    https://github.com/python/cpython/blob/d864b0094f9875c5613cb...

  • Top Paying Programming Technologies 2024
    19 projects | dev.to | 6 Mar 2024
    24. Python - $78,331
  • What is really an API? Examples, Code + History
    3 projects | dev.to | 3 Mar 2024
    a. Setting Up: Make sure you have Python and pip (package installer) installed. If you do not have Python, you can install the latest version from the Python ecosystem here
  • How to make a turtle racing game in Python
    2 projects | dev.to | 29 Feb 2024
    First, if you don't have Python installed on your machine, go to python.org to download the latest version of Python and then install it right away.
  • PySimpleGUI 4 will be sunsetted in Q2 2024
    7 projects | news.ycombinator.com | 14 Feb 2024
    You missed that they gave an example that does work—Java Swing is bundled with the JVM, making it more or less part of the standard library. Python itself also has Tkinter, which exists inside the cpython repo and is installed with Python [0].

    C++ may not work, but most other languages (especially VM-based) can and many do.

    [0] https://github.com/python/cpython/blob/3.12/Lib/tkinter/__in...

  • Memray – A Memory Profiler for Python
    10 projects | news.ycombinator.com | 10 Feb 2024
    I collected a list of profilers (also memory profilers, also specifically for Python) here: https://github.com/albertz/wiki/blob/master/profiling.md

    Currently I actually need a Python memory profiler, because I want to figure out whether there is some memory leak in my application (PyTorch based training script), and where exactly (in this case, it's not a problem of GPU memory, but CPU memory).

    I tried Scalene (https://github.com/plasma-umass/scalene), which seems to be powerful, but somehow the output it gives me is not useful at all? It doesn't really give me a flamegraph, or a list of the top lines with memory allocations, but instead it gives me a listing of all source code lines, and prints some (very sparse) information on each line. So I need to search through that listing now by hand to find the spots? Maybe I just don't know how to use it properly.

    I tried Memray, but first ran into an issue (https://github.com/bloomberg/memray/issues/212), but after using some workaround, it worked now. I get a flamegraph out, but it doesn't really seem accurate? After a while, there don't seem to be any new memory allocations at all anymore, and I don't quite trust that this is correct.

    There is also Austin (https://github.com/P403n1x87/austin), which I also wanted to try (have not yet).

    Somehow this experience so far was very disappointing.

    (Side node, I debugged some very strange memory allocation behavior of Python before, where all local variables were kept around after an exception, even though I made sure there is no reference anymore to the exception object, to the traceback, etc, and I even called frame.clear() for all frames to really clear it. It turns out, frame.f_locals will create another copy of all the local variables, and the exception object and all the locals in the other frame still stay alive until you access frame.f_locals again. At that point, it will sync the f_locals again with the real (fast) locals, and then it can finally free everything. It was quite annoying to find the source of this problem and to find workarounds for it. https://github.com/python/cpython/issues/113939)

  • Setting Up the Environment
    2 projects | dev.to | 15 Jan 2024
    Python, a versatile and powerful programming language, can be easily installed from its official website: https://www.python.org/. This section will guide you through the installation process on various operating systems, including Windows, macOS, and Linux.

What are some alternatives?

When comparing clojure and CPython you can also consider the following projects:

RustPython - A Python Interpreter written in Rust

ipython - Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.

Vulpix - Fast, unopinionated, minimalist web framework for .NET core inspired by express.js

Visual Studio Code - Visual Studio Code

racket - The Racket repository

Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE - Do you want to LEARN NEW STUFF for FREE? Don't worry, with the power of web-scraping and automation, this script will find the necessary Udemy coupons & enroll you for PAID UDEMY COURSES, ABSOLUTELY FREE!

Pandas - Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more

malli - High-performance data-driven data specification library for Clojure/Script.

Camunda BPM - Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.

Django - The Web framework for perfectionists with deadlines.

go - The Go programming language

Plex-Meta-Manager - Python script to update metadata information for items in plex as well as automatically build collections and playlists. The Wiki Documentation is linked below.