Python mainly uses reference counting for garbage collction, and the reference cycle breaking full-program gc can be manually controlled.
For RC, each "kick in" of the GC is usually small amount of work, triggered by the reference count of an object going to 0. In this program's case I'd guess you don't hear any artifacts.
Interpreted is not a problem from the predictable behaviour point of view. You may get less absolute performance. Though with Python you can do the heavy lifting in numpy etc which are in native code. And this is what is done here, see eg https://github.com/gpasquero/voog/blob/main/synth/dsp/envelo...
Languages that have garbage collection: not going to rehash the standard back-and-forth here, suffice it to say that the devil is in the details.
I was speaking in broad generalities (and did mention Lua as a counter-example).
If you want realtime safe behavior, your first port of call is rarely going to be an interpreted language, even though, sure, it is true that some of them are or can be made safe.
It compiles and sends bytecode to the server, no? I'm quite sure the server at least does not run a plain interpreter, and I know for sure you build a graph there. That's why you can also use it with other languages (Saw a clojure example I think I wanted to give a try)
It has nothing to do with cpu cycles, and everything to do with realtime safety. You must be able to guarantee that nothing will block the realtime audio thread(s), and that's hard to do in a variety of "modern" languages (because they are not designed for this).
I know you are an audio guy, I also wrote low-latency audio software. I was just saying that setting HIGH_PRIORITY on the audio running thread and it's feeding threads is enough, you don't need QNX. Python has the GIL problem, but that is another story.
For a simple audio app like this synth on a modern CPU it's kind of trivial to do it in any language if the buffer is >40 ms. I'm talking about managing the buffers. Running the synth/filter math in pure Python is still probably not doable.
Glaciers wouldn't get inifinitely thick anyway since they're of finite age, but also they flow out to sea. It happens at a very slow, one might even say glacially slow, pace.
From safety point of view that's actually good enough for "perfect is the enemy of good" to apply here.
Cryptographic primitives are much much safer in C (and assembly) than protocol handling, certificates etc.
They are basically just "fixed size data block in, fixed size data block out". You can't overflow a buffer, you can't use-after-free etc, you can't confuse inner protocol serialization semantics with outer protocol serialization semantics, you can't confuse a state machine, you can't have a concurrency bug[1] etc.
C memory safety vulnerabilities arise from trying to handle these dynamic things which rustls fixes.
(Also, there are third party crypto providers implemented in Rust)
[1] from memory safety pov; for side channels rust doesn't have advantages anyway
My point is that the article this thread is attached to starts out with how BoringSSL and AWS-LC won't cut it. And when rustls is suggested as an alternative, it's important to point out that it requires precisely those two (either one of them).
The article is about TLS. The arguments against those libs don't apply if using them just for the low level crypto algorithms. (Also of course rustls can use other crypto providers besides those)
More or less, yes. Of course, defects are not evenly distributed, so you get a lot of chips with different grades of brokenness. Normally the more broken chips gets sold off as lower tier products. A six core CPU is probably an eight core with two broken cores.
Though in this case, it seems [1] that Cerebras just has so many small cores they can expect a fairly consistent level of broken cores and route around them
A lot of this seems to deal with unreliable electricity infrastructure and effects thereof. Is it just normal in the US and people in warmer places don't mind so much, or does it somehow correlate with snow?
Rural areas are much more common in the US than in other countries and much more likely to lose power in a storm, due to the long lengths of power line needed and the lack of redundancy from being too sparse to have multiple feed-ins to the local substation.
It's not the cold that knocks out power, it's the wet and saturated ground and high winds knocking trees into the power lines.
I live in literally the middle of nowhere and get very bad winters but I lose power less often than I ever did living in the center of Chicago which often lost power for days at a time due to the weather.
I grew up in Canadian snowbelt (Great Lakes) and never lost power. If there is an ice storm - then we all freak out. I'm not saying it can't happen if a lot of snow falls and then there is wind but we lose power in summer more often from squirrels trying to nest in transformers. The biggest blackout I experienced was in Toronto in a summer heatwave.
I live on the metric side of the Atlantic. Winter means extra tension on wires, extra load on trees leading to higher risk of air lines broken. At the same time you have decreased number of man-hours in a day, decreased efficiency in those hours and difficulty reaching points of failure physically. This leads to high stress on maintenance in an event of a snowstorm. Depending how inclined your country is to vote for the MBA-style policies, there are chances your maintenance crews are already at near-capacity and therefore such an "adversary" event can easily lead to some a bit more remote areas left without electricity for a week at -20°C. Having A+++ house with photovoltaic cells will not help in that case.
I live in the back woods of Canada. We get a lot of snow. Our electrical supply (we call it "hydro") can disappear for long periods of time. The usual suspects are:
1. Ice storms. 3 inches (8 cm) of ice build up on trees can cause them to either drop limbs or deadfall into wires. It can be spectacular to see. Sparky.
2. The first heavy snowfall of the year can cause problems because although trees are trimmed every few years, they can grow pretty fast and either arch over the wires or are now tall enough to deadfall on the wires. By the time the later heavy snowfalls have come the danger trees have already dangered. The worst trees for this are the pines and spruces (and hemlocks and cedars but don't tend to grow as tall) since their boughs catch the snow and their new wood is actually pretty weak.
3. Drivers losing control. Doing 20 over the posted limit and passing a plow while the roads are greasy and visibility poor often results in taking out one or more poles while converting yourself into a casualty.
One large factor here is not that it takes a crew long to restore the lines, it's that the problems tend to occur in many sports over a large geographic region. There are only so many crews on shift and more remote places can be forced to wait for days while the townies get services right away. Our power was off one spring for three weeks a few years back after a derecho passed through a strip about 100 miles long by 20 miles wide. I'm still burning the wood for heat.
So, yeah, it's normal. Doesn't matter how good your make your infrastructure, nature is harsher.
Trees fall down due to combination of heavy snow and wind. They probably don't cut sufficiently around power lines. It is extra bad if the ground hasn't frozen properly yet.
In some places it may be cheaper to dig down the cable than facing storms.
Makes them a lot easier to get to. Buried infrastructure is fantastic until it breaks. Then it really sucks ass.
A lineman can fix anything on a pole within a few hours. Probably before lunch if they start first thing in the AM. Fixing a buried line can take days or worse depending on what's above it.
> Buried infrastructure is fantastic until it breaks. Then it really sucks ass.
Or if you want to upgrade it. My local electricity provider charges an order of magnitude more for upgrading home electrical service for more amperage if your service line is buried.
When you build a home in the middle of nowhere, you actually have to pay for the power line to be run out to you. Burying utilities is tremendously expensive if you are footing the bill on your own.
I don't have enough data to generalize across the US, but I grew up in a cold, snowy state (Wisconsin) and we almost never lost power. It happened, but it was pretty rare. We did have a generator for such instances, but that was because we had a dairy farm and the cooling unit for the milk tank needed to be kept running even if utility power was down.
Snow and ice builds up on overhead powerlines. It can cause issues. States with tornados or hurricanes are more likely to build underground which avoids this. My location in SE Michigan is all overhead and, while we rarely lose power, I see tons of issues every ice storm that some unlucky few suffer through.
I live very near a hospital and suspect I branch off their higher-SLA lines so that may be a factor.
Warmer places that don't experience cold much absolutely suffer during a cold spell. Texas (with its independent grid) has been absolutely wrecked every time it gets too cold.
Yeah, you won’t lose power much. That’s prioritized.
I don’t get as many power outages in the winter as I do in the warmer months (in fall it’s not unusual to have some weeks without grid power). I did however get a freak outage before the last round of storms and cold. The overhead lines coming up the mountain to me have wetlands at the bottom, it appears a sudden extreme drop in temperature caused the wires to contract and tilted a pole enough (before ground could refreeze) to disconnect the lines. This is in NJ. JCP&L/firstenergy utility just does a shit job here.
> in fall it’s not unusual to have some weeks without grid power
This blows my mind. The last time I lost power was ~2 years ago and it lasted maybe 5 days. I know others in my area were out for longer. I suffered for a few days but ended up going down to Toledo and getting a hotel, thankfully only for one night as it was on the next day.
Outside of that, I can only thing of maybe ~100 hours total my power was out over the last ~5-8 years.
Aside, I do think I'm lucky in some way. I live off a semi-major road (40mph) and like I said earlier, less than 1 mile as the crow flies from a major regional hospital. But still most of my street will lose power and only me and a few neighbors will still have lights on. I always thought I was on some random spoke off the hospital grid but based on the surrounding outages it never made sense. There is a creek nearby to complicate things. One day I'll research/track the lines and see what's really up.
Yeah, it’s true though. The most annoying outages we’ve had are when poles get damaged and need a full replacement.
A couple years ago we had a black locust tree split and break the T on the top of telephone pole across street. It didn’t take the power out itself, but the utility felt it was safer to shut it off until the pole was replaced. Took 3 days as they sent the crew from texas to NJ.
My parents place had 2 pole replacements on their driveway, each time in different years it was same guy sent up from Alabama. Each time took days.
This area I just don’t think they prioritize getting power restored quickly, population density too low, most own generators, and we don’t have medical stuff nearby. Better to send workers from regions where pay is lower, that’s my guess. I had to file complaints with BPU last year as they fired the meter readers and estimated the bills for like 7 months before installing smart meters.
For RC, each "kick in" of the GC is usually small amount of work, triggered by the reference count of an object going to 0. In this program's case I'd guess you don't hear any artifacts.
reply