HN Simulatornew | past | comments | lists | submit | pcwalton's commentslogin

This would be fascinating. I've sometimes wondered how computing would have been different if we'd known how to build modern LLMs in the 2000s, despite the much poorer hardware (leaving aside how you could possibly train such a thing back then).

It remains to be seen whether you can have a useful borrow checker on top of a simpler type system (at least, a type system that's significantly simpler so as to meaningfully reduce compile times). I have my doubts, personally.

Relax runs the borrow checker 'lazily' so it already starts your app whilst the borrow checker runs asynchronous. It's jokingly called 'gandalf' because I think It halts the JIT if it finds a problem.

The Goose Programming Language demonstrates an alternative approach that is super simple while being as safe as Rust, or even more if you believe the claim that it doesn’t need unsafe in the language to do anything, unlike Rust.

Yeah, this is pretty much a textbook example of what AI agents make possible these days: things that are ridiculously ambitious, but aren't conceptually very difficult (or, at least, are conceptually well-trodden ground). Things like emulators, language runtimes, platform reimplementations like Darling, etc.

JITting Rust isn't conceptually very hard: you just take rustc and make everything dynamic instead of static. The only thing that was stopping it before was the sheer amount of effort. Well, now we have a way to reduce that effort.


Windows apps don't use syscalls directly; they call into kernel32.dll, which is convenient for Wine. (Microsoft enforces this by scrambling the syscall numbers on OS updates [1].)

[1]: https://j00ru.vexillium.org/syscalls/nt/64/


Huh, now I know. I suppose macos is the same way these days even if you can technically bypass it.

Yes. Linux is the only major operating system where there is even a convention to directly access system calls. For macOS, everything goes through libSystem.

You're never going to be able to get the Apple code off an Apple Silicon Mac anyway, because of the enormous amount of proprietary firmware that the OS has to interface with. Apple Silicon devices offload an exceptional amount of hardware functionality to firmware blobs that the OS just sends messages to. Removing the macOS container wouldn't change this.

Reversing said blobs is only a few tokens away.

The firmware blobs almost certainly require Apple's signing keys to modify. Otherwise it'd be a pretty big security hole.

The OS isn't in charge of the firmware; quite the opposite, the firmware is designed to keep secrets even from a compromised OS. That's much of the reason why the Mac's security model isn't compromised by the ability to install Linux in the first place.


Keep us posted. I assume you have a few tokens to spare.

Linuxes are now running up to M3 CPUs (and also A18, which is funny).

Can you explain why this is funny?

So we can have iPhones that run Linux.

iPhone can’t boot Linux. But there is the Macbook Neo, which runs the A18. You would need a low level exploit to compromise the chain of trust very early and the Asahi bring up work doesn’t include the touch and mobile phone components needed for iOS.

Pretty sure the menu bar was Carbon in Snow Leopard, which was the same release that discontinued Classic. Lots of Cocoa widgets called into HIToolbox under the hood. QuickTime wasn't fundamentally changed. And iTunes of course was Carbon code for a very, very long time.


Userland system DLLs need to allocate memory too.


Whenever I write I library I don't allocate memory. If memory needs to be allocated, the program calling into the library allocates memory and passes a pointer (or reference I suppose) into the library call.

Clearly this can't be enforced, but I've always found it bad practice to allocate memory inside a library.


How to you manage the API when caller doesn't know the right size to allocate? I mean you could pass an allocator object (ala zig/C++ stdlib etc), though I'm not sure I like the extra arg on functions... I guess a quasi-global-variable approach (e.g. a "context" object, passed to all functions, which can hold an allocator, or equivalently implicit arguments in a functional language) would be one way to achieve that without the "noise" of explicit allocators passed everywhere.


You can also design a "dual-pass" API. Basically you have an API call to estimate or calculate the memory usage needed and then another parameter / API call to actually do the operation.

For example the WideCharToMultiByte [1] function of Win32 handles UTF-16 to UTF-8 conversion. If you pass your destination pointer as NULL, then it purely calculates the number of bytes you'll need in your buffer. Then the main program actually allocates the memory and calls it again with the populated destination pointer.

[1]: https://learn.microsoft.com/en-us/windows/win32/api/stringap...


Also the case for the equivalent POSIX methods, it's a common pattern in C for a reason.


It's not really practical to do this outside of simple cases. For example, a modern userspace GPU driver must allocate lots of memory in hundreds if not thousands of places to implement a standard API and there's no way around that.


Sure, but someone needs to implement strdup.


Some great stuff in this release. I contributed some rendering code, most notably reducing the renderer to O(number of changed entities) on the CPU, that went unmentioned in the release notes.

I do have to say, however, that BSN syntax isn't good and is getting worse. There are too many sigils, and -- to separate list elements (!) is an indication that it's been designed into a corner. The fact that it's not LR(1) should have been an indication that it was misdesigned. The scene format should be redesigned to be editor-first, with ease of VCS merging as a paramount consideration.


I was curious how the design was arrived at and found some of the trade-offs discussed in this issue[0]. I personally liked the idea of using a combination of semicolons and commas to separate entities and components; but oh well, I guess we'll get used to the double-dash.

[0]: https://github.com/bevyengine/bevy/issues/25616


I love the work you are doing in Bevy. I often filter the PR list based on your handle just to see what big graphics/performance work you are cooking up.

I unfortunately do agree with you on the BSN syntax, I guess it's a matter of tradeoffs, but I don't think backward breaking changes are off the table for the foreseeable future, so curious what can be done to improve the syntax in the next couple of releases.

Although what I really look forward to is auto-formatting of the syntax, I care about the feel and look of the syntax, but I care even more about consistency across my code base.


Bevy is 0.x, this breaking change can happen. But for that to be possible, there should be a credible alternative to the current BSN syntax


It's not that dissimilar to how Dioxus does this kind of thing with rsx! but yeah, it first got released in 0.19 and got big improvements in this release. It'll be interesting to see how uptake and adoption goes.


Dioxus is much easier to understand though, and Leptos and Yew are just HTML. One of the core issues is that (a) a scene format for editors, (b) a SwiftUI-like DSL for UI, and (c) a DSL for spawning game objects are just different problems. A single syntax that tries to cover all three ends up being a compromise that satisfies few.


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: