HN user

CupricTea

117 karma

Computer engineer from Wisconsin

Posts0
Comments55
View on HN
No posts found.

I'm honestly a bit shocked this was done entirely using declarative macros. Normally when I see such arbitrary syntax I assume it's implemented as a proc macro.

Bevy 0.19 Released 1 month ago

I cannot overstate how huge and exciting bsn is for bevy. This is as big of news as when bevy itself was first announced six years ago.

I once wrote a pure C project years back that made heavy use of complex numbers and 2D/3D vector math. At one point I got so fed up debugging my expressions under an endless parentheses-hell of `vadd(vmul(vadd(...), vadd(vmul(...))))` that I threw my hands up and changed the file extensions to .cpp just to use std::complex<T> and enough operator overloading to type vector expressions like a human being.

who want zig to "win over rust" for whatever reasons

I don't understand why this mentality is so common. Zig and Rust are both fine languages with markedly different design goals and they can coexist.

Rust has never been about outright eliminating unsafe code, it's about encapsulating that unsafe code within a safe externally usable API.

When creating a dynamic sized array type, it's much simpler to reason about its invariants when you assume only its public methods have access to its size and length fields, rather than trust the user to remember to update those fields themselves.

The above is an analogy which is obviously fixed by using opaque accesor functions, but Rust takes it further by encapsulating raw pointer usage itself.

The whole ethos of unsafe Rust is that you encapsulate usages of things like raw pointers and mutable static variables in smaller, more easily verifiable modules rather than having everyone deal with them directly.

when you a pass a pointer to my function, do I take ownership of your pointer or not?

It's honestly frustrating how prevalent this is in C, and the docs don't even tell you this, and if you guess it does take ownership and make a copy for it and you were wrong, now you just leaked memory, or if you guessed the other way now you have the potential to double-free it, use after free, or have it mutated behind your back.

I remember talking about this concept with my brother a while back. Since LLMs have no neuroplasticity, they are locked in to what they were trained on in the time they were trained in. A model trained in 2026 would stay exactly the same for use by someone in 2126 to gain an insight on our time. Like a book that you can actually talk to.

I've considered this, but the company is small enough that the number of people who would be on GitHub at any moment (instead of our internal git forge) can be counted on one hand, and when I'm the first one there in the morning it still rate limits me.

GitHub is at the point where it immediately rate limits me if I try to look at a project's commit history without being logged in, as in the first time I even open a single URL to the commit history, I get "Too Many Requests" from GitHub thrown at me. I don't know if my work's antivirus stack is causing GitHub to be suspicious of me, but it's definitely egregious.

PCIe is probably the most future proof technology we have right now. Even if it is upheaveled at the hardware level, from the software perspective it just exposes a device's arbitrary registers to some memory mapped location. Software drivers for PCIe devices will continue to work the same.

Further down the article, the author suggests bubbling up the error with a result type, but you can only bubble it up so far before you have to get rid of it one way or another. Unless you bubble everything all the way to the top, but then you've just reinvented unchecked exceptions.

Not necessarily. Result types are explicit and require the function signature to be changed for them.

I would much prefer to see a call to foo()?; where it's explicit that it may bubble up from here, instead of a call to foo(); that may or may not throw an exception my way with no way of knowing.

Rust is absolutely not perfect with this though since any downstream function may panic!() without any indication from its function signature that it could do so.

No strcpy either 7 months ago

every one of them seems to have some huge caveat which makes them useless

They were added into C before enough of the people designing it knew the consequences they would bring. Another fundamentally broken oversight is array-to-pointer demotion in function signatures instead of having fat pointer types.

Alright, I don't agree with half of what he said here, but really? Is that supposed to make him look like some irredeemably bad person?

Are we seriously going to pretend that men and women—on average—do not differ in their general interests, and furthermore get mad at people for pointing that out?

And I'm not fond of the current administration, but it's a bit extreme to write someone off as a person for liking who is president. You would be writing off literally half of the entire country, and no, that's not something to feel virtuous about, that's just nonsense.

Frankly I think I would rather have a conversation with someone like him instead of someone who would get disproportionately upset at those points.

That community has no oversight for what gets posted. It's a free-for-all for anyone to gather (read: cherrypick) low quality information and present it in an overtly sensationalist way and intentionally misrepresent what they quote.

They have no standards, no oversight, no formal methodology, so naturally it attracts gossip-oriented people who want to stir up drama for fun.

Wow, what a nauseating subreddit. They are notorious for poisoning the well, bad faith cherrypicking to misrepresent positions, and blowing their positions completely out of proportion, all for the sole effort of smearing whoever or whatever they make a topic about.

And everything in that post are bad faith links to secondary reactionary sources.

I don't really know much about Jonathan Blow or Jai or really follow it but it's astonishing to me that anyone could possibly take anything from that toxic subreddit with any sort of seriousness.

No Graphics API 7 months ago

Man, how I wish WebGPU didn't go all-in on legacy Vulkan API model

WebGPU doesn't talk to the GPU directly. It requires Vulkan/D3D/Metal underneath to actually implement itself.

Even Vulkan stopped doing pointless boilerplate like bindings and pipelines.

Vulkan did no such thing. As of today (Vulkan 1.4) they added VK_KHR_dynamic_rendering to core and added the VK_EXT_shader_object extension, which are not required to be supported and must be queried for before using. The former gets rid of render pass objects and framebuffer objects in favor of vkCmdBeginRendering(), and WebGPU already abstracts those two away so you don't see or deal with them. The latter gets rid of monolithic pipeline objects.

Many mobile GPUs still do not support VK_KHR_dynamic_rendering or VK_EXT_shader_object. Even my very own Samsung Galaxy S24 Ultra[1] doesn't support shaderObject.

Vulkan did not get rid of pipeline objects, they added extensions for modern desktop GPUs that didn't need them. Even modern mobile GPUs still need them, and WebGPU isn't going to fragment their API to wall off mobile users.

[1] https://vulkan.gpuinfo.org/displayreport.php?id=44583

A few years ago I learned just enough d3 to show an interactive 2D lollipop graph. Later I learned just enough SVG to get a small diagram out for a college class. I think going back if I were to redo that first interactive graph I'd probably just do it in raw SVG.

I got close to this realization after learning barely enough U-Boot to launch my own bare metal program for the JH7110. I could never get into Linux From Scratch because it was more focused on getting an entire system working when I really just wanted to see how it spins up to get going.

Then at some point the other week I realized I could technically have a working Linux "system" with nothing more than a kernel and a dirt simple hello world program in /sbin/init.

I haven't had the time or inclination to scratch that itch but it's nice to see this article confirm it.

The biggest thing for me is the cinematography. 80s/90s movies were filmed as if you're standing alongside the cast.

* Many more shots from eye level

* Significantly less jumpcuts

* People actually cast shadows onto the environment, and filmmakers would fearlessly shoot scenes with full bright or full dark elements in them without trying to make everything dark and bright visible simultaneously

* Waist-up or even full body shots of multiple (3+) characters talking and/or walking around with few if any jump cuts

I'm not even from that era but I find movies from that era to feel the most "real", like I can almost reach into the screen and just "be there" together. This aesthetic is perfectly doable in the modern age, even with digital cameras, it's just not the trend currently.

Steam Machine 8 months ago

I still remember when Valve first showed an early alpha unreleased version of Steam running natively in Ubuntu for the first time in the early 2010s. It blew my mind that a major company, especially an entertainment company, was targeting Linux at this scale.

Of course, Wine was very lackluster in those days, and for a while I was worried they'd eventually give up with the monumental effort that would be involved in getting it up to snuff.

It's now over a decade later and they're still at it and have made monumental leaps. Valve truly was and still is playing the long game here.

Imagine if Microsoft had never threatened their business with the Windows 8 store and the anxiety of Microsoft locking down their platform.