Readit News logoReadit News
maximilianburke commented on Super Mario 64 for the PS1   github.com/malucard/sm64-... · Posted by u/LaserDiscMan
giancarlostoro · 8 days ago
Interesting, I'm wondering if the GBA could handle a light version of a Minecraft style game, but the N64 looks like it could be great at it too. I need to get me a SummerCart64 one of these days and experiment with my old N64.
maximilianburke · 8 days ago
Probably. There's Tomb Raider for the GBA via OpenLara: https://www.youtube.com/watch?v=_GVSLcqGP7g
maximilianburke commented on Rust in the kernel is no longer experimental   lwn.net/Articles/1049831/... · Posted by u/rascul
menaerus · 9 days ago
Sorry but what have I said wrong? The nature of code written in kernel development is such that using unsafe is inevitable. Low-level code with memory juggling and patterns that you usually don't find in application code.

And yes, I have had a look into the examples - maybe one or two years there was a significant patch submitted to the kernel and number of unsafe sections made me realize at that moment that Rust, in terms of kernel development, might not be what it is advertised for.

> https://git.kernel.org/pub/scm/linux/kernel/git/a.hindborg/l..

Right? Thank you for the example. Let's first start by saying the obvious - this is not an upstream driver but a fork and it is also considered by its author to be a PoC at best. You can see this acknowledged by its very web page, https://rust-for-linux.com/nvme-driver, by saying "The driver is not currently suitable for general use.". So, I am not sure what point did you try to make by giving something that is not even a production quality code?

Now let's move to the analysis of the code. The whole code, without crates, counts only 1500 LoC (?). Quite small but ok. Let's see the unsafe sections:

rnvme.rs - 8x unsafe sections, 1x SyncUnsafeCell used for NvmeRequest::cmd (why?)

nvme_mq/nvme_prp.rs - 1x unsafe section

nvme_queue.rs - 6x unsafe not sections but complete traits

nvme_mq.rs - 5x unsafe sections, 2x SyncUnsafeCell used, one for IoQueueOperations::cmd second for AdminQueueOperations::cmd

In total, this is 23x unsafe sections/traits over 1500LoC, for a driver that is not even a production quality driver. I don't have time but I wonder how large this number would become if all crates this driver is using were pulled in into the analysis too.

Sorry, I am not buying that argument.

maximilianburke · 8 days ago
Unsafe doesn't mean a wild-west free-for-all. Unsafe Rust still has more safety guarantees than C or C++.

Have you written any Rust?

maximilianburke commented on Rust in the kernel is no longer experimental   lwn.net/Articles/1049831/... · Posted by u/rascul
pjmlp · 9 days ago
Why should they?

Other platforms don't have a leader that hates C++, and then accepts a language that is also quite complex, even has two macro systems of Lisp like wizardy, see Serde.

OSes have been being written with C++ on the kernel, since the late 1990's, and AI is being powered by hardware (CUDA) that was designed specifically to accomodate C++ memory model.

Also Rust compiler depends on a compiler framework written in C++, without it there is no Rust compiler, and apparently they are in no hurry to bootstrap it.

maximilianburke · 8 days ago
> Also Rust compiler depends on a compiler framework written in C++

As does the GCC C compiler.

maximilianburke commented on Rust in the kernel is no longer experimental   lwn.net/Articles/1049831/... · Posted by u/rascul
weebull · 9 days ago
I don't understand why. Working with hardware you're going to have to do various things with `unsafe`. Interfacing to C (the rest of the kernel) you'll have to be using `unsafe`.

In my mind, the reasoning for rust in this situation seems flawed.

maximilianburke · 9 days ago
Unsafe in Rust doesn't mean anything goes. Specifically it means that you are going to 1) dereference a raw pointer; or 2) call an unsafe function/method; or 3) access/modify a mutable static variable; or 4) implement an unsafe trait; or 5) access fields of a union.

You still get the safety guarantees of Rust in unsafe code like bounds checking and lifetimes.

maximilianburke commented on Let's put Tailscale on a jailbroken Kindle   tailscale.com/blog/tailsc... · Posted by u/Quizzical4230
jsheard · 10 days ago
If you want a cheap rooted eReader I think you're better off getting a Kobo instead, they don't officially support rooting but AFAICT they make basically no effort to prevent it.
maximilianburke · 10 days ago
I used to like my Kobo a lot but recently it's got some pretty severe unreliability issues, usually around reading non-Kobo epubs and PDFs. Like, if I open of those files, the device usually crashes and when it recovers after a reboot, the file disappears.
maximilianburke commented on Flight disruption warning as Airbus requests modifications to 6k planes   bbc.com/news/live/cvg4y6g... · Posted by u/nrhrjrjrjtntbt
captainkrtek · 20 days ago
Do you think they're using the guise of "its solar radiation" as cover to do a software update to fix a more problematic "bug", and perhaps tangentially there are some changes in said-update to improve some error correcting type code (eg: related to detecting spurious bit flips).
maximilianburke · 20 days ago
Not in aviation.
maximilianburke commented on APT Rust requirement raises questions   lwn.net/SubscriberLink/10... · Posted by u/todsacerdoti
teunispeters · 23 days ago
Honestly, rust is slightly more readable than obfuscated perl. I think I prefer K&R C, and I don't like K&R C. In terms of readability, maybe equivalent to early Win32 API? [3000 lines to set up API, then call to activate].

With C++ you have a range of readable from - easy and very approachable - to 2000s era Microsoft STL. (where not only is it close to unreadable, many many hidden bugs are ... somewhere. And behaviour is not consistent).

I will admit I don't find Rust quite as unreadable as the 2000s era Microsoft STL, but the latter's one of the things that pushed me far more into Linux dev.

Rust is the kind of language that would push me to write a new language that isn't rust. And maybe work on supporting all the zillion platforms rust doesn't support. Or maybe just stick to C. I'm not a fan, but there are worse, and yeah - there are some C++ libraries out there that are worse. Lots that are better, too, eg llvm source.

maximilianburke · 23 days ago
How much Rust have you written?
maximilianburke commented on APT Rust requirement raises questions   lwn.net/SubscriberLink/10... · Posted by u/todsacerdoti
adastra22 · 23 days ago
C++ is vastly more readable. I will never go back to writing or maintaining C++ projects, but drop me into a C++ file to review something and it is usually very easy to grok.

Part of this is style and conventions though. I have implemented an STL container before, and that templating hell is far worse than anything I’ve ever seen in the Rust ecosystem. But someone following modern C++ conventions (e.g. a Google library) produces very clean and readable code.

maximilianburke · 23 days ago
How do you handle understanding the semantics in the presence of custom overloaded operators?
maximilianburke commented on APT Rust requirement raises questions   lwn.net/SubscriberLink/10... · Posted by u/todsacerdoti
dv35z · 24 days ago
Every time I consider learning Rust, I am thrown back by how... "janky" the syntax is. It seems to me that we ought to have a system-level language which builds upon the learnings of the past 20+ years. Can someone help me understand this? Why are we pushing forward with a language that has a Perl-esque unreadability...?

Comparison: I often program in Python (and teach it) - and while it has its own syntax warts & frustrations - overall the language has a "pseudocode which compiles" approach, which I appreciate. Similarly, I appreciate what Kotlin has done with Java. Is there a "Kotlin for Rust"? or another high quality system language we ought to be investing in? I genuinely believe that languages ought to start with "newbie friendliness", and would love to hear challenges to that idea.

maximilianburke · 24 days ago
In your opinion how does Rust compare to C++ for readability?
maximilianburke commented on What Killed Perl?   entropicthoughts.com/what... · Posted by u/speckx
maximilianburke · a month ago
One thing I miss to this day is how ergonomic regular expressions are in Perl 5.

u/maximilianburke

KarmaCake day2186September 5, 2010
About
@max@av8r.ca

http://ca.linkedin.com/in/maxburke https://github.com/maxburke

CTO @ UrbanLogiq

View Original