greatest-ape
I don’t know of anybody who runs it in production, but its sister implementation (BitTorrent over UDP) handles 80k responses per second with lower load averages than opentorrent.
[0] https://github.com/greatest-ape/aquatic
[1]: https://github.com/snapview/tungstenite-rs
(I am the developer of aquatic)
Features:
* Works on macOS, Windows and Linux
* GUI with Iced
* Four operators with independent parameters such as volume, panning, modulation index, feedback, three different frequency modifiers (ratio, free and fine) and ADSR volume envelope parameters. The operators can be independently switched to white noise mode
* Flexible routing allowing setting the output operator (with some limitations) as well as the percentage of signal that is simply added to the final output, enabling additive synthesis. By default, operator 4 is routed to operator 3, operator 3 to operator 2 and operator 2 to operator 1.
* Modulation panning (!), not present in FM8
* Master volume and master frequency parameters
* Four LFOs capable of targeting most operator parameters as well as most parameters of lower index LFOs.
* 128 voices
* Fully automatable
* Preset handling
* SIMD-accelerated audio synthesis with runtime feature detection
Thoughts on development:When I came across vst-rs, I realised that I could try out writing an audio plugin. Since I was already familiar with FM synthesis from Elektron Monomachine and FM8, I decided to go with it. It has worked out pretty well.
I though I’d write about some things that happened along the way.
At some point, I decided that I wanted to accelerate the synthesis with SIMD. I started out with using packed_simd, but switched to simdeez to abstract over vector widths and enable runtime detection. However, I wanted more flexibility and the option of splitting SIMD code into multiple functions. My solution was to skip frameworks and instead use custom traits and the duplicate crate to abstract over Rust simd instrinsics for different instruction sets. I use sleef for fast sines.
I eventually decided that I wanted a GUI. The Rust GUI situation is not very mature and special considerations required for vst plugin windows complicate the situation further. I discovered baseview at some point. With the mentoring of wrl and others, I was able to contribute code to get it working on macOS.
I went with iced for the GUI, using the excellent iced_baseview. Iced has been a pretty good experience so far, but the high resource consumption due to how GPU calls are (not) batched is a pain point. If I started over, I might consider other options such as egui.
Preset and parameter handling with VST is tricky since locking must be avoided. It took a while to get there, but I think my current abstraction is workable.
I wrote a BitTorrent tracker in Rust a few years ago. A while ago, I found out about the dashmap crate (providing a concurrent hashmap) and thought that I could use it for a new implementation, which could be both performant and simple. I tried using it, but due to blocking, I had a hard time reaching good performance. My realization was that since BitTorrent tracker requests are highly skewed towards popular torrents, even a map which only locks on accesses to the same key would not scale well when used like this.
I experimented and settled on a design with many threads each opening a socket with SO_REUSEPORT and using mio to wait for requests. The requests are read, parsed and sent through a crossbeam channel to request workers, which collect a number of them before locking the mutexes guarding shared state and doing work required to generate responses. These are sent back to the socket workers, which encode them and send them back over the network.
This solution is quite performant and during heavy load testing, I couldn’t even get a lone request worker to reach full CPU utilization. (Adding more would likely not bring much improvement anyway since they would block each other most of the time). Results in terms of responses per second indicate that aquatic scales a lot better with more threads than the established project opentracker, being able to reach more than twice the throughout at best, at the price of using many more threads. (Benchmarks are available in the README file.)
I’d like to thank (in particular) the authors of mio, crossbeam, hashbrown and indexmap for making this fun project possible.
Show HN: Fast Rust BitTorrent Tracker
1.22434.701, P = 0.028) were risk factor for disease progression [Table 4].”
[1] https://journals.lww.com/cmj/Abstract/publishahead/Analysis_...
I know you left out performance, but it's very nice to have code that can be easily profiled.
A few thoughts of mine:
Pros: - Beautiful, thin, lighter design - Great screen (could of course have been even better) - Fast enough processor for most pro tasks - Judging by Apple's history, very good build quality - Up to 10 hours of battery life - A great OS mixing UNIX and support for professional programs
Neutral: - Touch Bar: might be amazing, might just be an irritation. We don't know yet. I for one think it could be nice for music production and DJing, but likely not for programming. A few people actually use the function keys a lot. As before, they will be available while pressing the fn key. But people might want real keys. Since I use vim a lot, it's irritating that the Esc key won't necessarily always be where I expect it to. Sure, it will be available in the terminal, but in IntelliJ with the vim plugin? I might have to remap Esc to Caps Lock. An irritation but not a major deal breaker for most people. - Only thunderbolt ports. I think this is the right move and in line with expected Apple behavior, but I guess some people want to be able to simply connect old/current generation USB peripherals without any adapters - No more MagSafe. - Faster AMD graphics. This is of course nice, except for CUDA people and people who want to install Linux on their MacBooks (but seriously, why would you want to do that?) Also, positive: good support for external screens. But only for certain ones? I'm not sure about this, has anyone figured out exactly what screens can be used? - New keyboard, which some people will like and some won't.
Negative: - Maximum of 16 GB of RAM, wtf? This is the only major deal breaker I see that applies to many people. - Hefty price. But we're talking about Apple here, folks. Pay to play
To conclude, a great but expensive premium notebook with the major flaw of being limited to 16 GB of RAM. If you really need CUDA support, real function keys or have to be able to plug in various peripherals without adapters, this might not be the right computer for you.
Edit: also, check out The Guardian and The Intercept.