multiversion-concurrency-contro
DISCONTINUED
supercollider
Our great sponsors
multiversion-concurrency-contro | supercollider | |
---|---|---|
16 | 64 | |
- | 5,157 | |
- | 1.5% | |
- | 8.5 | |
- | 5 days ago | |
C++ | ||
- | GNU General Public License v3.0 only |
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.
multiversion-concurrency-contro
-
CRDT-richtext: Rust implementation of Peritext and Fugue
https://github.com/samsquire/multiversion-concurrency-contro...
And I implemented a 3 way text diff with myers algorithm based on https://blog.jcoglan.com/2017/02/12/the-myers-diff-algorithm...
https://github.com/samsquire/text-diff
I implemented an eventually consistent mesh protocol that uses timestamps to provide last write wins
-
A collection of lock-free data structures written in standard C++11
I think I lean towards per-thread sharding instead of mutex based or lock free data structures except for lockfree ringbuffers.
You can get embarassingly parallel performance if you split your data by thread and aggregate periodically.
If you need a consistent view of your entire set of data, that is slow path with sharding.
In my experiments with multithreaded software I simulate a bank where many bankaccounts are randomly withdrawn from and deposited to. https://github.com/samsquire/multiversion-concurrency-contro...
I get 700 million requests per second due to the sharding of money over accounts.
-
The “Build Your Own Database” book is finished
If you want some sample code to implement MVCC, I implemented MVCC in multithreaded Java as a toy example
https://github.com/samsquire/multiversion-concurrency-contro...
First read TransactionC.java then read MVCC.java
-
Let's write a setjmp
I wrote an unrolled switch statement in Java to simulate eager async/await across treads.
https://github.com/samsquire/multiversion-concurrency-contro...
The goal is that a compiler should generate this for you. This code is equivalent to the following:
task1:
-
Structured Concurrency Definition
https://doc.rust-lang.org/book/ch16-00-concurrency.html
I've been working on implementing Java async/await state machine with switch statements and a scheduling loop. If the user doesn't await the async task handle, then the task's returnvalue is never handled. This is similar to the Go problem with the go statement.
https://github.com/samsquire/multiversion-concurrency-contro...
If your async call returns a handle and
-
Small VMs and Coroutines
yield value2++
https://github.com/samsquire/multiversion-concurrency-contro...
I am still working on allowing multiple coroutines to be in flight in parallel at the same time. At the moment the tasks share the same background thread.
I asked this stackoverflow question regarding C++ coroutines, as I wanted to use coroutines with a thread pool.
https://stackoverflow.com/questions/74520133/how-can-i-pass-...
-
Hctree is an experimental high-concurrency database back end for SQLite
This is very interesting. Thank you for submitting this and thank you for working on this.
I am highly interested in parallelism and high concurrency. I implemented multiversion concurrency control in Java.
https://github.com/samsquire/multiversion-concurrency-contro...
I am curious how to handle replication with high concurrency. I'm not sure how you detect dangerous reads+writes to the same key (tuples/fields) across different replica machines. In other words, multiple master.
I am aware Google uses truetime and some form of timestamp ordering and detection of interfering timestamps. But I'm not sure how to replicate that.
I began working on an algorithm to synchronize database records, do a sort, then a hash for each row where hash(row) = hash(previous_row.hash + row.data)
Then do a binary search on hashes matching/not matching. This is a synchronization algorithm I'm designing that requires minimal data transfer but multiple round trips.
The binary search would check the end of the data set for hash(replica_a.row[last]) == hash(replica_b.row[last]) then split the hash list in half and check the middle item, this shall tell you which row and which columns are different.
-
Tail Call Optimization: The Musical
https://github.com/samsquire/multiversion-concurrency-contro...
I want to redesign the architecture of the async/await to be easier to understand. I want to use a state machine somehow.
-
Rust Atomics and Locks: Low-Level Concurrency in Practice
I wrote an unrolled state machine for my async/await in Java. This models a simple async/await program and runs tasks on other threads - without locks. I use a design I call token ring parallelism, where threads take turns and are linked together in a ring structure.
https://github.com/samsquire/multiversion-concurrency-contro...
I wrote a own lock free algorithm here that I use to do message passing between actor threads. My goal is high throughput performance and low latency.
https://github.com/samsquire/multiversion-concurrency-contro...
With 11 threads (on a 12 core processor, deliberately left one core for Windows)
-
A Compiler Writing Playground
I then started writing a parser for a high level language and then code generation from the AST to the imaginary assembly. My interpreter is multithreaded and can send integers between interpreters. It is very early and doesn't do much.
Code is at https://github.com/samsquire/multiversion-concurrency-contro...
The high level language looks similar to Javascript except I tried to parse everything as an expression. I need to parse functions as expressions.
I was experimenting with Protothreads in C recently to try understand how it worked and I wrote a giant switch statement and a while loop in Java to simulate async/await. It would be interesting to do codegen for coroutines.
here's that giant switch statement and scheduler https://github.com/samsquire/multiversion-concurrency-contro...
One idea for a stackless design I had was to preallocate memory for each method call for a call to that function and avoid a stack altogether. This would allow coroutines between methods and avoid the function colour problem because everything is a coroutine.
Is there any communities for programming language developers? Where do all the language developers meet up and talk theory and implementation? I am on eatonphil's discord and we talk there.
One problem I am trying to understand how to solve is how you would write a multithreaded interpreter and language that allowed parallel interpretation similar to C# and Java. If the allocator is thread safe and you share an object pool between interpreters and you hash object equality by sourcecode, then you could send objects between threads with only a synchronization cost.
I believe Python has the problem that object identity is different in each subinterpreter so you need to marshall the data.
supercollider
-
Recreating the THX Deep Note (2009)
Link to the audio programming language / server they're using in the article: https://github.com/supercollider/supercollider
-
supercollider VS midica - a user suggested alternative
2 projects | 12 Aug 2023
-
MuseScore 4.1 is now available
For the intrepid, especially those annoyed with the purported input-sluggishness of musescore et al, an interesting text-based alternative is LilyPond https://lilypond.org/
My dad wrote an opera using LilyPond in vim, though I believe these days he's actually doing more with supercollider, which skips sheetmusic and goes right to sounds: https://supercollider.github.io/
-
13 Years of History Teaching - Now Thrown Into CS.
So you’re wondering what would making music with code look like? The tools I’m familiar with are TidalCycles, Sonic Pi, and SuperCollider. I’m having a hard time describing what it’s like to make music with tools like these so here’s a video of a performance. One person is live coding the music and the other is live coding the visuals. I think it’s super cool how the music is improvised and built over time by layering commands. Some keywords you could search to see more examples would be Algorave and Livecoding.
- Ask HN: What audio/sound-related OSS projects can I contribute to?
- Interests in Generative, Electronic, Loop-Based, Computer Music?
-
Cheapest way to make music
Pure Data, cSound, and SuperCollider are all free and opensource. Incredible possibility, though the learning curb can be steep.
-
Ask HN: Alternatives to Scratch for a Blind Child?
My comment won't really be helpful, but it feels like an interesting question to spitball some thoughts...
1. The domain is super important for children's programming. Logo started out doing list processing and word-based games and kids just weren't that into it; it's the turtle that really made it feel real and exciting. Scratch similarly has a really concrete and fun domain (moving sprites). The exact things that good learning environments have (lots of visuals and movement) don't seem very fun when you are blind (though maybe there's ways to experience that output that I'm not aware of).
2. My natural intuition is that voice and music are fun. Maybe there's tactile things I am unaware of. Maybe Lego Mindstorms?
3. FoxDot is a really fun programming environment for creating live music: https://github.com/Qirky/FoxDot – it's very textual, and I'm not sure how easy that is (especially if you are trying to interact while the music is playing). It's based on Supercollider: https://supercollider.github.io/ – it's possible there's other more accessible frontends for Supercollider.
4. Here's something someone did with Supercollider: https://www.researchgate.net/figure/The-technology-set-up-a-...
5. That reminds me of Makey Makey, which is very tactile and very affordable. But it's basically just an input device. https://makeymakey.com/ – really you can't go wrong getting that and hooking it up to a sound player or having the kid find new and inventive ways to create tactile frontends to it. I'm sure other kids will be impressed with what this kid comes up with. Here's a page on using it with blind kids: https://www.perkins.org/resource/makey-makey-stem-activities...
6. It's OK if it's not "programming" IMHO. Building things with computers is fun and good learning. Giving the kid a new medium to build things is important, with or without complicated logic. I think there is a benefit to what I'll call more inclusively "coding" which is representing your goals and thoughts in some special format, like HTML or music notation or whatever.
7. Speech input and output in the browser is pretty easy and accessible. But I don't know of anything that brings all that together in a programming-like experience. Using GPT I bet there's something possible and not super complicated that could be created today that couldn't have happened a year ago.
-
Live coding languages
For sound live coding/algorave sonic pi and tidal cycles are great, both based on supercollider.
- Sonic Pi – The Live Coding Music Synth for Everyone
What are some alternatives?
Sonic Pi - Code. Music. Live.
faust - Functional programming language for signal processing and sound synthesis
Viper4Android-presets - This repository finds a collection of preset for viper4android 2.7+
csound - Main repository for Csound
pure-data - Pure Data - a free real-time computer music system
glicol - Graph-oriented live coding language and music/audio DSP library written in Rust
JUCE - JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins.
yummyDSP - An Arduino audio DSP library for the Espressif ESP32 and probably other 32 bit machines
DaisySP - A Powerful DSP Library in C++
FoxDot - Python driven environment for Live Coding
purr-data - Purr Data - Jonathan Wilkes' cross-platform Pd-l2ork version
DFPlayerMini_Fast - Fast and easy to understand Arduino library to use the DFPlayer Mini MP3 module from DFRobot.com. This is a huge improvement (both in terms of execution speed and simplicity) to the standard library provided by DFRobot.com.