HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
JuliaLabs
Cassette.jl
Julia2018–2021
JuliaLabs / Cassette.jl

Cassette.jl

Overdub Your Julia Code

8Distinct people
8Mentions
1Explicit recommenders
384GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Overdub Your Julia Code

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

I am confused why you assume I am a "Julia booster" or use such combative language. I love Python and Jax and use it for much of my research work, I just also like learning of…

krastanov used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month8 dated mentions

Observed mentions: 2018-07-18 09:38:55 UTC to 2021-02-14 20:40:10 UTC.

0122018-07-01 00:00:00 UTC to 2018-08-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsJul 20182018-08-01 00:00:00 UTC to 2018-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-09-01 00:00:00 UTC to 2018-10-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-10-01 00:00:00 UTC to 2018-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-11-01 00:00:00 UTC to 2018-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-12-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2019-02-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-02-01 00:00:00 UTC to 2019-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-03-01 00:00:00 UTC to 2019-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-04-01 00:00:00 UTC to 2019-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-05-01 00:00:00 UTC to 2019-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-06-01 00:00:00 UTC to 2019-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-07-01 00:00:00 UTC to 2019-08-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-08-01 00:00:00 UTC to 2019-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-09-01 00:00:00 UTC to 2019-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-10-01 00:00:00 UTC to 2019-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsOct 20192019-11-01 00:00:00 UTC to 2019-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-12-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2020-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-02-01 00:00:00 UTC to 2020-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-03-01 00:00:00 UTC to 2020-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-04-01 00:00:00 UTC to 2020-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-05-01 00:00:00 UTC to 2020-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-01 00:00:00 UTC to 2020-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-07-01 00:00:00 UTC to 2020-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-08-01 00:00:00 UTC to 2020-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-09-01 00:00:00 UTC to 2020-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-10-01 00:00:00 UTC to 2020-11-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-11-01 00:00:00 UTC to 2020-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-12-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2021-02-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-02-01 00:00:00 UTC to 2021-03-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsFeb 2021

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jul 20182018-07-01 00:00:00 UTC2018-08-01 00:00:00 UTC202
Aug 20182018-08-01 00:00:00 UTC2018-09-01 00:00:00 UTC000
Sep 20182018-09-01 00:00:00 UTC2018-10-01 00:00:00 UTC101
Oct 20182018-10-01 00:00:00 UTC2018-11-01 00:00:00 UTC000
Nov 20182018-11-01 00:00:00 UTC2018-12-01 00:00:00 UTC000
Dec 20182018-12-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
Jan 20192019-01-01 00:00:00 UTC2019-02-01 00:00:00 UTC101
Feb 20192019-02-01 00:00:00 UTC2019-03-01 00:00:00 UTC000
Mar 20192019-03-01 00:00:00 UTC2019-04-01 00:00:00 UTC000
Apr 20192019-04-01 00:00:00 UTC2019-05-01 00:00:00 UTC000
May 20192019-05-01 00:00:00 UTC2019-06-01 00:00:00 UTC000
Jun 20192019-06-01 00:00:00 UTC2019-07-01 00:00:00 UTC000
Jul 20192019-07-01 00:00:00 UTC2019-08-01 00:00:00 UTC101
Aug 20192019-08-01 00:00:00 UTC2019-09-01 00:00:00 UTC000
Sep 20192019-09-01 00:00:00 UTC2019-10-01 00:00:00 UTC000
Oct 20192019-10-01 00:00:00 UTC2019-11-01 00:00:00 UTC000
Nov 20192019-11-01 00:00:00 UTC2019-12-01 00:00:00 UTC000
Dec 20192019-12-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
Jan 20202020-01-01 00:00:00 UTC2020-02-01 00:00:00 UTC000
Feb 20202020-02-01 00:00:00 UTC2020-03-01 00:00:00 UTC000
Mar 20202020-03-01 00:00:00 UTC2020-04-01 00:00:00 UTC000
Apr 20202020-04-01 00:00:00 UTC2020-05-01 00:00:00 UTC000
May 20202020-05-01 00:00:00 UTC2020-06-01 00:00:00 UTC000
Jun 20202020-06-01 00:00:00 UTC2020-07-01 00:00:00 UTC000
Jul 20202020-07-01 00:00:00 UTC2020-08-01 00:00:00 UTC000
Aug 20202020-08-01 00:00:00 UTC2020-09-01 00:00:00 UTC000
Sep 20202020-09-01 00:00:00 UTC2020-10-01 00:00:00 UTC000
Oct 20202020-10-01 00:00:00 UTC2020-11-01 00:00:00 UTC101
Nov 20202020-11-01 00:00:00 UTC2020-12-01 00:00:00 UTC000
Dec 20202020-12-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
Jan 20212021-01-01 00:00:00 UTC2021-02-01 00:00:00 UTC101
Feb 20212021-02-01 00:00:00 UTC2021-03-01 00:00:00 UTC110

What Hacker News says

8 sources
Arborist.jl https://github.com/oxinabox/Arborist.jl/ It implements one of the more advanced tricks in JuliaLang. Which is the concept behind Cassette.jl (https://github.com/jrevels/Cassette.jl) and IRTools.jl (https://github.com/MikeInnes/IRTools.jl). which is this notion of a recursive source code tranformation. This is the thing where you tranform code (kind of like a macro but not lexically scoped), including tranforming all function calls to also tranform their code. It's super powerful For example Zygote.jl (https://github.com/FluxML/Zygote.jl) implements reverse mode automatic differentiation, by defining a function that is a generated transformation of the function being differentiated. MagneticReadHead.jl (https://github.com/oxinabox/MagneticReadHead.jl/) implements a debugger by defining a function that has been transformed to in
Read the rest
clude debugger interupts. This stuff also has a bunch of use for probabalistic programming languages etc. The thing is Cassette and IRTools implement this at the lowered code level. It runs on the SSA-form IR. This IR was never really designed for the user to write it. Though IRTools does a noble attempt to make it nice. Arborist instead runs at the Abstract Syntax Tree (AST) level. Just like macros. This is designed to be written and manipulated by users. Users do that all the time by writing macros. I haven't touched it in a while (apparently 2 years). Largely because AFAICT it's not useful outside of pedagogical purposes. AST is not actually that nice for any program tranforms i want to do, since there are so many ways to write the same thing. E.g. different kinds of loops and branches, where as in SSA form IR they all look the same. Probably could be made to work, but i just don't really have a usecase that I can't do easier on IR. (probably people who haven't been deep into IR on the other hand would think of some) There are a bunch of edge cases where it crashes still, for things that are not allowed to appear in generated code. It wouldn't be too hard to make it work though, not really. Particularly since we now have tools like https://github.com/SciML/RuntimeGeneratedFunctions.jl https://github.com/JuliaStaging/GeneralizedGenerated.jl
In Ask HN: Show me your half baked project
krastanov·Oct 21, 2020Recommendation phrase
I am confused why you assume I am a "Julia booster" or use such combative language. I love Python and Jax and use it for much of my research work, I just also like learning of other approaches. Please try to honestly address the sibling comments. We have repeatedly claimed that tools like Zygote.jl can autodifferentiate efficiently things that Jax can not (without a lot of extra special code and hand-defined backprop methods), e.g., an array of structs with scalar and vector properties over which a scalar cost is defined. Just give examples, so that we can both learn something new about these wonderful tools instead of using such offensive language. It is hard to not take your own comments as the ones being dismissive. Also, look from where this conversation started. My claim was that jax does not work with "(scipy ode solvers, special fu
Read the rest
nctions, image processing libraries, special number types (mpmath), domain-specific libraries)". A julia library does not need to know of Zygote.jl to be autodifferentiable. A python library needs to be pure-python numpy-based library to work with jax. In order to try to contribute to the discussion: I think this paper describes relatively well what is so special about the Julia autodiff tools: https://arxiv.org/abs/1810.07951 For a separate approach, which is also very original, check out https://github.com/jrevels/Cassette.jl
In The Accelerating Adoption of Julia
This is why the language creators usually avoid using the word 'homoiconic' because every time one uses that word there's a finite probability of being bogged down in an incredibly uninteresting semantic argument. Instead, people prefer to say that julia code is just another (tree-like) data-structure in the language and it can be manipulated at runtime with functions or compile time with macros or at parse time with string macros and now with Cassette.jl[1] we can even manipulate the form of code that has already been written and shipped by other packages all with first class metaprogamming tools. It seems to me that even if Julia is not 'truly homoiconic', that we seem to get the touted benefits of homoiconicity to the point that it seems like an unimportant distinction. [1] https://github.com/jrevels/Cassette.jl
In Julia Language Co-Creators Win James H. Wilkinson Prize for Numerical Software
The beauty of Julia is in its design as a language. This is what gives people hope that the tooling and ecosystem will emerge -- they all seem easier to develop in Julia than in other languages, thanks to multiple dispatch, the type system, and powerful metaprogramming abilities. As far as fast bare metal languages go, you can write extremely general optimized matrix multiplication libraries in Julia. For matrices that fit in the L2 cache, I achieved performance similar to Intel MKL, but with far more generic code. https://discourse.julialang.org/t/we-can-write-an-optimized-... Writing a kernel in C means using SIMD intrinsics, where function names and types differ for every vector size, and then different numbers/sets of calls for each kernel (you'd want several sizes per architecture). Compare this to Julia, where parametric typing and
Read the rest
multiple dispatch mean you only need one set of functions, and using an @generated function will generate whatever kernels you happen to need at compile time. Looking into the future, awesome projects like Cassete speak to the potential of what's possible: https://github.com/jrevels/Cassette.jl Cassete promises to let you do anything from getting automatic differentiation for arbitrary Julia code, even if it is strictly typed and buried in a chain of dependencies of the library you're using and written by someone who never imagined the idea of autodiff, to injecting custom compiler passes. Also, while I haven't tried it yet, many seem to like: https://github.com/timholy/Rebugger.jl Julia is more promise than practice right now, but that's largely because of just how much it promises. I (and many others) think it has done a great job delivering so far. That's why there's excitement, and why many are starting to embrace it.
In Try OCaml
> As a matter of fact, it's what the compiler devs keep recomending. I definitely agree with them in this matter. Macros might have a role in language development, but they should not be a stand in for compiler optimizations. For safety and speed, the type system should be there. https://github.com/mrakgr/The-Spiral-Language/blob/0741959ac... Here is how the example you've shown could be done in Spiral. Maybe I should add express support for literal testing in pattern matching, but it is not a pattern that comes up too often by itself. > I feel like what Julia does is just more low level right now - And you get pretty far with just multiple dispatch! What you say is exactly right as pattern matching compiles down to those low level operations, so there no reason at all why those low level operations should be done by hand. Pattern matchin
Read the rest
g does not depend on a particular type system or whether the language is dynamic or static. There are only so many good ideas in programming languages and this is one of them. Though there is some overlap between pattern matching and multiple dispatch, the roles are different. The purpose of multiple dispatch is extensibility, but the purpose of pattern matching is destructuring. https://stackoverflow.com/questions/2502354/what-is-pattern-... Note the great disparity in the F# examples that do pattern matching and the C# examples that do manual reflection. https://github.com/mrakgr/The-Spiral-Language/blob/0741959ac... Here are a few very simple examples of it in action in Spiral. I use them as compiler tests. https://github.com/mrakgr/The-Spiral-Language/blob/0741959ac... Here is quite a complex example of how it is used in action. I won't go into detail of this here, but you can see how I repeatedly match on the contents of a module at different times in order to get more generic functionality for the kernel. The particular kernel shown here is the most complex one that exists in the library right now - I am yet to get to things like generic matrix multiplication and convolution, but I'll get there eventually. > I see how it sounds nice, but I can't really imagine right now how it would improve my life. Let me just say that it is really difficult to know ahead of time how a particular language feature would affect your programming life. I could have said the same thing about first class functions back in 2015. I am sure in the future there will be such features I can't even imagine right now. > And if we don't get it as part of the compiler, we can definitely do things like that with https://github.com/jrevels/Cassette.jl/ I'll have to watch the talk on this. Thanks for the link.
In The Spiral Language
>You can in fact get loop unrolling with just standard functions in Spiral. We can do this too actually - and spirals approach sounds very similar to what you'd do in julia :) https://gist.github.com/SimonDanisch/812e01d7183681ed414932c... As a matter of fact, it's what the compiler devs keep recomending. As a developper I must say, that it's pretty relaxing to take a meta programming shortcut from time to time ;) In general, we plan to offer a tool box that employs these kind of patterns for loop unrolling, tiling etc, to make it easier to write GPU code without meta programming and perform certain optimizations/scheduling patterns based on a more trait like system. > Also reflection should be done using pattern matching I feel like what Julia does is just more low level right now - And you get pretty far with just multiple dispatch! If
Read the rest
we needed more than that, we could put the effort into extending the language into that direction. But I think your use cases must get be pretty advanced untill you need something more complex. Can you recommend a nice article that shows off beautiful pattern matching for reflection? I see how it sounds nice, but I can't really imagine right now how it would improve my life. Concerning inlining, I do think we actually force codegen to always inline when compiling for the GPU. I don't remember a 100% anymore, but there might have been some problems with that. But it's definitely the goal, to have a flexible compiler that you can fine tune to specific domains like GPU programming. And if we don't get it as part of the compiler, we can definitely do things like that with https://github.com/jrevels/Cassette.jl/ Appart from that, I'm pretty happy that our GPU compilation infrastructure isn't making Julia less useful as a general purpose language ;) >Is it fully integrated or is it a wrapper style memory management? It's wrapper style. We're playing around with different kind of hacks to make it less worse, but those are hacks you could do in any GC language. The good news is, that the Julia compiler devs take GPU computing seriously and promised to work on a full integration that is aware of the GPU hardware.
In The Spiral Language

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.