The resident C/C++ experts here would have you believe that the same is possible in C/C++. Is that true?
In C++? Maybe, but you’d need to make sure you stay on top of using thread safe structures and smart pointers.
What Rust does is flip this. The default is the safe path. So instead of risking forgetting smart pointers and thread safe containers, the compiler keeps you honest.
So you’re not spending time chasing oddities because you missed a variable initialisation, or you’re hitting a race condition or some kind of use after free.
While there’s a lot of people who say that this slows you down and a good programmer doesn’t need it, my experience is even the best programmers forget and (at least for me), I spend more time trying to reason about C++ code than rust, because I can trust my rust code more.
Put another way, Rust helps with reducing how much of the codebase I need to consider at any given time to just the most local scope. I work in many heavy graphics C and C++ libraries , and have never had that level of comfort or mental locality.
For me it isn't even that it catches these problems when I forget. It is that I can stop worrying about these problems when writing the vast majority of code. I just take references and use variables to get the business logic implemented without the need to worry about lifetimes the entire time. Then once the business logic is done I switch to dealing with compiler errors and fixing these problems that I was ignoring the first time around.
When writing C and C++ I feel like I need to spend half of my brainpower tracking lifetimes for every line of code I touch. If I touch a single line of code in a function I need to read and understand the relevant lifetimes in that function before changing a single line. Even if I don't make any mistakes doing this consumes a lot of time and mental energy. With Rust I can generally just change the relevant line and the compiler will let me know what other parts of the function need to be updated. It is a huge mental relief and time saver.
Smart pointers are no panacea for memory safety in C++ though: even if you use them fastidiously, avoiding raw pointer access, iterator invalidation or OOB access will come for you. The minute you allocate and have to resize, you're exposed.
Rust isn’t perfect but it gives me so much more trust in everything I do.
For what it’s worth, the same is true of Swift. But since much of the original Rust team was also involved with Swift language development, I guess it’s not too much of a surprise. The “unsafe” api requires some deliberate effort to use, no accidents are possible there. It’s all very verbose through a very narrow window of opportunity if you do anything unsafe.
I just wish it was more cross platform (I know it technically works on Linux and windows…but it’s not a great experience) and that it didn’t have so much churn (though they’ve stopped futzing with the core components as much with Swift 4+).
I also wish it was faster. I did an Advent of Code against some friends. I picked Rust, they picked Swift. The rust code was running circles around their Swift ones even when we tried to keep implementations the same.
Anyway, that’s a rant, but I think to your point, I feel like Swift could have been as big as Rust..or bigger given the easier use, with many of the same guarantees. I just wish the early years were more measured.
In NeXTStep they were written in ObjC, and probably should've stayed that way.
Plus there’s something to be said for cargo being a killer feature for rust. Easy build configuration , easy package management and access to a large ecosystem of libraries.
Between that and the book..:As steep a learning curve as the language itself has, the actual on-boarding process is way more accessible than many other compiled languages.
When I’ve written lower level components the things that have really been godsends outside the safety features are things like enums (much more powerful than C/C++ unions/enums and much more ergonomic than variants).
And even though I said traits don’t offer too much more than C++, one thing I think they do really offer is when combined with generics. Rust generics let you define trait requirements better (though not as extremely flexible) as C++ concepts/constraints.
Talking of C++ it can be really solid to work with your own data structures where you control code on both ends. Using templates with something like boost::serialization or protobuf for the first time is like magic. E.g you can serialize whole state of your super complex app and restore it on other node easily.
Unfortunately it's just not the case when you actually trying to work with someone else API / ABI that you have no contol over. Even worse when it's moving target and you need to maintain several different adapters for different client / server versions.
>In 2021, society is driven by a virtual Internet, which has created a degenerate effect called "nerve attenuation syndrome" or NAS. Megacorporations control much of the world, intensifying the class hostility already created by NAS.
from Johnny Mnemonic
What can we do to make it more utopian?
If you stream without a face camera at all it generally hurts your ability to grow an audience, and unfortunately our society is still pretty focused on appearance so if you don't look great you're going to potentially get a lot of toxicity in your chat. A vtuber avatar acts as an equalizer in this sense and also lets people express their personality and aesthetics visually in a way that might not otherwise be easy - they can pick eye and hair colors they think represent them without having to use colored contacts or hair dyes, etc.
A few different people I know found that having a vtuber avatar made it much easier for them to get into streaming regularly and it did grow their audience, so I'm happy to see the technology catch on and improve.
That's not the reason most of the popular ones do it. (Ironmouse, sure, but not anyone else.)
Most of the bigger ones are corporate characters, so they're actually forced to hide themselves and it's more like they're uncredited actors. Besides that, it gives you privacy, avoids stalkers, means you don't have to do your makeup or get dressed (up or at all), things like that. Appearance still definitely matters though, but now it's your voice carrying you and not your face.
I don't think someone sharing their craft through a virtual avatar is any more responsible for these things than the flying cars from Blade Runner would be.
Is it?
It's basically forums & avatars brought in the medium of audio and video communication.
OMG CYBERPUNK DYSTOPIA PHILIP K DICK
> What can we do to make it more utopian?
A polity with an outmost shell of no bs ic spooks in a ratio of twenty to one cybersec defense to offense. There is the problem of sciengineers conceiving in the labs photonic computing but the committee member wage/salary slave cuts cost corners (or not but bloats up on unnecessary complexity) and we get the worsest join on the venn diagram in the industry spec.Move to Mars and start over.
I have no hope that would work or is what Elon wants. I know he wants to set up the world’s most exclusive gated community there.
What would really push it into cyberpunk territory is if it turns out this is not an actual human but an AI-controlled virtual person.
I don't have the impression that in Marcan's case it was ever about anonymity, it is more about a creative expression.
Up until Lina's introduction on April 1st, I had never seen a vTuber stream, and I must say it is quite fun to watch. Though personally I wish Lina's voice is tweaked a bit, because it can be hard to understand what she is saying.
As your get more low level, less visual and more niche, there's less and less diversity of software developers. And everyone should feel welcomed into hacking the kernel.
A persistent avatar/alias as an internet persona seems to match the real-life to internet-life relationship better. IE, for many, they’re different and rather separable aspects of life.
It’s not fooling anyone to pretend like this is normal self expression.
Although some of them are designing “virtual worlds” as an excuse to get around YouTube moderation and taking 30% of superchats.
VR/AR just hasn't been done right as of now, but its getting close. Demand is there. Imagine virtual schooling during time like Covid, but instead of Zoom, kids actually see each other in VR and can interact with each other.
More recently, it's fairly common to use a hypervisor or simulator for kernel debugging in device driver development on Windows via Hyper-V.
A lot of Linux driver development is done using qemu as well, although this is usually more targeted and isn't quite the same "put a thin shim over the OS running on the hardware" approach.
The flexibility and I/O tracing framework in m1n1 are pretty uniquely powerful, though, since it was built for reverse engineering specifically.
But the modern day these development is crazy.
How can yo manage a 100+ structure in a language you just learnt (Rust) for a secret GPU the vendor does not share info.
Back in the day I owned machines that did it both ways, but not a C64. My Atari computer also had a smart disk drive. Worked over something Atari called SIO, which is an early ancestor of modern USB. Back then, the Atari machine was device independent and that turned out to be great engineering!
Today we have Fuji Net devices that basically put Atari and other computers on the Internet, even to the point of being able to write BASIC programs that do meaningful things online.
The C64 approach was not much different, working via RS-232. But for a bug, it would have performed nicely.
Now, my other machine was an Apple ][, and that disk was all software. And it was fast! And being all software meant people did all sorts of crazy stuff on those disk drives ranging from more capacity to crazy copy protection.
But... That machine could do nothing else during disk access.
The Atari and C64 machines could do stuff and access their disks.
Today, that Fuji Net device works via the SIO on the Atari, with the Internet being the N: device! On the Apple, it works via the SmartPort, which worked with disk drives that contained? Wait for it!!
A CPU :)
Seriously, your point is valid. But, it's not really valid in the sense you intended.
https://www.linusakesson.net/programming/gcr-decoding/index....
Basically commodore was gonna use an ieee-488 bus for the drive and then decided it was too expensive late in the design and switched to this hacks serial bus that bottlenecked everything.
… I miss my NeXTs..
- C64 shipped with 6526, a fixed version of 6522
- C64 is incompatible with 1540 anyway
They crippled C64 for no reason other than to sell more Commodore manufactured chips inside a pointless box. C128 was similar trick of stuffing C64 with garbage leftover from failed projects and selling computer with 2 CPUs and 2 graphic chips at twice the price. Before slow serial devices they were perfectly capable of making fast and cheaper to manufacture floppies for PET/CBM systems.
The fact they are running entire OSes themselves isn’t that big of a deal. I just hate having no control.
It's about the dominant unholistic approach to modern operating system design, which is reflected in the vast number of independent, proprietary, under-documented RTOSes running in tandem on a single system, and eventually leading to uninspiring and lackluster OS research (e.g. Linux monoculture).
I'm guessing that hardware and software industries just don't have well-aligned interests, which unfortunately leaks into OS R&D.
https://www.osfc.io/2022/talks/i-have-come-to-bury-the-bios-...
As for the components, at least their interfaces are standardized. You can remove memory sticks by manufacturer A and replace them with memory sticks from manufacturer B without problem. Same goes for SATA SSDs or mice or keyboards.
Note that I'm all in favour of creating OSS firmware for devices, that's amazing. But one should not destroy the fundamental boundary between the OS and the firmware that runs the hardware.
And furthermore, OS research is not only about building Linux alternatives. There are a lot of operating systems that have a much narrower focus than full-blown multi-tenant GPOS. So building holistic systems with a narrower focus is a much more achievable goal.
> As for the components, at least their interfaces are standardized
That's not true once you step into SoC land. Components are running walled-garden firmware and binary blobs that are undocumented. There's just no incentive to provide a developer platform if no one gives a shit about holistic OSes in the first place.
DNA is the worst spaghetti code imaginable.
The design is such a hack, that it's easier to let the unit die and just create new ones every few years.
the human body can scale from 1 cell to several trillion without going down for maintenance even once all while differentiating to different functions
it can take a high level of damage and heal without needing a shutdown as well, most software crashes completely at the first exception
cells give you that highly scalable and fault tolerant system that we all want
Cattle, not pets
For example, Intel's ME could be a really useful feature if we could do what we want with it. Instead they lock it down so it's just built-in spyware.
And remote management isn't bad if it's entirely under my control. It's the closed nature that makes me distrust it.
The Unix ‘everything is a file’ has done well because it works pretty well.
It also isn’t generally a security issue, because it allows application of the natural and well developed things we use for files (ACLs, permissions, etc), without having to come up with some new bespoke idea, with all it’s associated gaps, unimplemented features, etc.
Hell, most people don’t even use posix ACLs, because they don’t need it.
(Especially because wall clock time is not the only kind of performance that matters.)
I'm totally fine with it (I'm grateful the story is being told at all), but it is surreal tone for technical writing.
Vinesauce has been streaming since well before twitch, and their content got significantly more "Twitch"-y after they embraced the current system. It's obvious why, because if you play into the chat begging, the surface level """interaction""", then you get more money from the parasocial twelve year olds with mom's credit card.
But I don't want my content full of ten second interruptions as a robot voice reads off the same tired joke somebody paid ten dollars to get read off.
Well, when those people put months of their lives into reverse-engineering a reliable stack of code for an undocumented platform, and want to do presentations and write-ups of their work, those people can decide to present however they want.
In the meantime maybe people who are contributing precisely nothing can STFU about the people who are.
Doubly so the twitch chat is going to mirror the streamer. So if the streamer is being a goon and playing up the twitch culture, you'll get twitch chat. But you can also have a very different chat experience if you establish from the get go that chat is to behave a specific way.
Couldn't they just not show themselves on camera at all?
When every statement is exciting and special, then none of them are.
But perhaps I'm biased: I write how I talk too, and use and abuse punctuation to attempt to mimic my own voice.
I find it hard to analyze these things by numbers alone. It's context that really matters and if there truly is a baseline excitement, there really should be a high number of exclamations.
>A bunch of shader cores, which process triangles (vertex data) and pixels (fragment data) by running user-defined programs. These use different custom instruction sets for every GPU!
Why are different instruction sets exciting to the author? What does exclaiming that fact really mean for me as the reader? What I got out of it was the author was so surprised by this basic fact, that it was so out of this world unbelievable, that we also must be surprised by it. I'd rather read technical explanations with leadership/competence.
[1] https://www.linkedin.com/pulse/women-exclamation-points-emil...
[2] https://onlinelibrary.wiley.com/doi/full/10.1111/j.1083-6101...
https://youtu.be/SDJCzJ1ETsM?t=1179
How can people watch this?
Not in a good way. The write up wasn't so bad but the entire package is too much for me.
The other thing too, watching other people code is kind of not fun like George or Rene. More fun to see some screeching video with no actual info just the end result of a robot pissing in a cup.
Also goes to show how much work goes into writing code/having some end result. Maybe it will get more exposure since there is a growing trend for vtuber stuff.
Mario Brothers would make more sense though. Whoever created this is a plumber par excellence.
> The compiler is very picky, but once code compiles it gives you the confidence that it will work reliably.
> Sometimes I had trouble making the compiler happy with the design I was trying to use, and then I realized the design had fundamental issues!
I experience a similar sentiment all the time when writing Rust code (which for now is admittedly just toy projects). So far it's felt like the compiler gives you just enough freedom to write programs in a "correct" way.
I don't really do unsafe/lower-level coding, so I can't speak to much there however.
The 2015MBP one was the last one that was passable for me, what came after is horrible. Even the new MBP that has real ports again is still not as good as the 2015 in terms of keyboard.
And the coprocessor called “ASC” also have similarities with Python, where the GPU is doing the heavy lifting, but the ASC (like Python) interact using shared memory. The same Python is doing with a lot of its libraries (written in C/C++)
It's a processor, not a programming language :) The team has essentially strapped the API into something that you can poke with Python instead of with a native driver.
Awesome job.
For one example, Windows ARM kernels are pretty tied to the GIC (ARM's reference interrupt controller), but Apple has its own interrupt controller. Normally on ntoskrnl this distinction would simply need hal.dll swapped out, but I've heard from those who've looked into it that the clean separation has broken down a bit and you'd have to binary patch a windows kernel now if you don't have source access.
What you can do is having a small hypervisor to simulate the needed bits…
"Apple designed their own interrupt controller, the Apple Interrupt Controller (AIC), not compatible with either of the major ARM GIC standards. And not only that: the timer interrupts - normally connected to a regular per-CPU interrupt on ARM - are instead routed to the FIQ, an abstruse architectural feature, seen more frequently in the old 32-bit ARM days. Naturally, Linux kernel did not support delivering any interrupts via the FIQ path, so we had to add that."
https://news.ycombinator.com/item?id=25862077
TL;DR: No standard ARM interrupt controller, custom controller requires quirky architectural features
My next point was about how the NT kernel was designed to handle exactly this kind of change pretty cleanly, but that clean barrier has been allowed to stagnate. So way back, NT kernels for weird systems like SGI workstations that had x86 CPUs but were decidedly not PCs otherwise simply needed hal.dll swapped out with a version written by the hardware vendor to paper over those system differences like how interrupts are routed around and how to access PCI devices. That's no longer really an option however.
Windows has some behavior that is hard-coded and cannot be changed except by Microsoft. This behavior can fairly easily be bent on Linux, but Windows drivers can't bend the rules for some of these issues.
The biggest issue that immediately comes to mind is that the M1 MMU (Memory Management Unit) only can handle 16K pages. Linux can easily be built for 16K, and most programs work on 16K, but Windows currently only supports 4K on ARM. No driver can fix that - only Microsoft. Of course, if Microsoft joins the Apple Silicon train (which Apple has said they are more than welcome to do), then they probably will have official Apple documentation and not need the Asahi Linux findings.
Who is Asahi Lina? Is that an actual person?
Apple don't have linux drivers. It would be great if they wrote some, but it's never going to happen.
> Who is Asahi Lina? Is that an actual person?
The virtual persona of an actual person who has chosen to remain anonymous (hence the name which would be a crazy coincidence otherwise).
They are Canadian born, currently studying in Japan, so that explains some of the cultural mix.
Man... if I was a conspiracy theorist who believed Apple was genuinely evil, what if Asahi Lina is an Apple employee? ;)
Asahi Linux has been upstreaming, but of course it's ongoing. The GPU driver in particular depends on some rust inside the kernel bits which aren't in the mainline kernel, yet. The 6.1 kernel has some Rust bits, 6.2 will have more, but I don't believe that will be enough for the GPU driver ... yet.
Yes
> Is Asahi Linux named after her?
Other way around, it’s a pseudonym created to work on the project, IIRC Lina got involved early-mid 2022 while Hector Martin started the project in late 2020 / early 2021.
This one.
Check out the Asahi Lina channel to see what I mean.
From what I have gleaned, vTuber is a virtual YouTuber. The streams use an anime model a s behaviour.
So we've no idea who it is.
And for some reason I feel creeped out now. There is something perturbing about the saccharin persona coupled with the pseudonym.
Like Pennywise (It) vibes?
Anime = Japanese cartoon style
Apple's drivers are upstreamed, in Darwin. I'm not aware of any reason to believe that Apple has any Linux drivers that they could upstream.
To what upstream project?