Better HN
topnewbestaskshowjobs
Log inSign up

Pannoniae

2,737 karma · joined Jun 19, 2023 (3y ago) · 759 submissions

contact: https://discord.gg/ZVySp5m9N8 or pannoniae

https://pannoniae.net

Submissions

comment 2d ago · link · parent

looks like someone's gotta make a project which just blatantly bundles them into a modpack anyway and says "well, what you gonna do now, huh?" ;)

comment 3d ago · link · parent

This thread feels like a bit of the old Dropbox thread ;)

"what is this useful for" - You want to write native code without a runtime or GC but you also don't want to deal with C++ with its arcane rules, edge cases, an awful dependency management story and complexity in general.

Rust is a good candidate for this as well, although it has quite a learning curve.

"you can already do this in standard C#" - Yes but the ecosystem assumes GC so you need to write everything yourself. There are some low allocation APIs but definitely not for everything. The concept of "C# but even lower level" is something which has a place, IMO. Just like how you can technically add assembly to C#, either by linking it with nativeAOT or emitting at runtime but it's not built-in support for inline assembly, you know.

comment 5d ago · link · parent

I've never really hit them myself (5.5 opus, sonnet and sometimes fable).

I mostly just tell the mfs that today we're going to decompile X game because I want to improve the engine / I'm curious / I want to find out how it works. So get on with it.

comment 5d ago · link · parent

Yup I'm very much aware of path dependence, and that rewriting code has a huge cost. But we have AI now, so it can definitely be slopped out fairly easily....

comment 6d ago · link · parent

these squares aint hip to the jive, I know that!

comment 6d ago · link · parent

I don't think the "centaur" approach will go away any time soon. People like to point out chess as an example where humans are pretty much liabilities for chess engines - but chess is a much simpler game, with only a few possible actions you can take and a fairly limited board ;)

In programming you've got a lot of decisions to take, many aren't verifiable and even more have tradeoffs so you can't hillclimb your way out of architecture design and requirements.

Most of what people call AI slop is literally making AI do design decisions. AI is much faster at executing than you are but making wrong decisions 20x as fast doesn't get you to fulfilling your requirements any faster.

comment 1w ago · link · parent

Yup IMO there's a sorely missing space for a language with very low-level capabilities which doesn't rely on auto-optimisation. C++ is only relatively fast because of the insane amount of optimisations the compilers have + compiler -specific directives.

But I mean more like

- being able to explicitly tell to unroll this loop N times

- native support for builtin SIMD vector types (it can use platform-dependent instructions, whatever)

- specifying aliasing manually, built-in support for range types

- having explicit control over switch statement code generation

- good metaprogramming (doesn't matter if compile-time maths doesn't exactly match runtime behaviour), compile-time code generation/modification

- [[likely]] hints but actually respected i.e. having a guaranteed effect on code layout

- of course no headers, the unit of compilation being a whole library

I don't think it really needs to be single-pass in order to be fast, just cut out most of the heuristic-based optimisations from the backend and make them explicit keywords/attributes in the code...

comment 1w ago · link · parent

This post is so close to getting it ;)

Looks like the author wants to abolish copyright in a very round-about way. They are saying that AI-generated code should be released under CC0 due to complexities around the status of software copyright in various jurisdictions.

But if the concept of copyright was abolished as a whole, then licences such as GPL would also lose their power. Some people say that's a negative thing, but I do not necessarily think so, because it achieves the stated goal of the GPL, software freedom (i.e. you don't need to be granted a licence to copy and modify things)

comment 1w ago · link · parent

One sentence really caught my eye.... "We may still review a plan, design, or result, because if we don't, we just get the same output as everyone else."

Is getting the same output as everyone else bad? I'd say not necessarily. When you're making something, you might want to spend your "innovation tokens" on the core of what you want to do better. Then do a good-enough job at everything else.

To me it feels like the subtext in this is that making things more accessible is bad because then your stuff isn't unique anymore? I do not think this zero-sum / scarcity mindset is really accurate or helpful, IMO.

comment 1w ago · link · parent

how are they irrelevant? Compilers don't even do non-standard calling conventions (unless inlined ofc), very basic optimisations are just not done because the source language doesn't give enough info on memory layout, aliasing and range of inputs....

comment 2w ago · link · parent

There are lots of pyramids around the world.... for example the one in the Louvre, or Memphis, TN and so on...

comment 2w ago · link · parent

A more charitable interpretation is something like royal assent for laws. Yes, the king/queen can always just choose to delay it or even block the law, but that'd be unprecedented and the whole system of parliamentary monarchy would be in a serious crisis.

I think the author is trying to get at like, the actual discussion happens earlier / on the WG21 level, and the ISO vote is treated more of a rubberstamp. And that has changed in this instance.

comment 3w ago · link · parent

I dunno I pretty much always wrote my own logger. Not even a shared library or anything just copypaste into next project or often don't even bother with that, just knock something out on the spot. Even before AI.

The only even slightly tricky part is like "don't mess unicode up", rest is straightforward. Sure it can be complicated with logging sinks, configurability, when to flush, monitoring and so on but in many cases you just don't need all that. You just build it whenever you do need it.

comment 3w ago · link · parent

For historical reference, here is a magnet link for the full Pile. From an ethical perspective, this is ethical because model training should not be monopolised by the incumbent companies who already got access to this data.

magnet:?xt=urn:btih:0d366035664fdf51cfbe9f733953ba325776e667&dn=EleutherAI_ThePile_v1&tr=https%3A%2F%2Facademictorrents.com%2Fannounce.php&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce

comment 3w ago · link · parent

Great article :D The rabbithole actually goes even deeper because buffering on the read side is almost always good, but reads are often way more latency-sensitive than writes. Which leads to the paradox that increasing the buffer size / prefetching more with mmapping can lead to worse performance due to the added latency. And decreasing the buffer size can have the same effect due to issuing more calls, so in order to squeeze in the optimal throughput/latency ratio on reads you have to tune it per workload.... or just try a few different buffer sizes and see which one works better.

Writes are the opposite, they're usually not RAW (read-after-write), they're "fire and forget", so you don't really care about latency, but you do care a whole a lot about your writes actually arriving... again two competing parameters because the more you batch the writes, the faster they are but the bigger chance of a torn write or data loss. And unlike reads, writes are not idempotent on the application level so ideally you'd want some logic to atomically write a meaningful amount of data so it won't get torn, even if it crashes.

Now in practice just about no one actually does any of this but it's a fun thought :D

comment 3w ago · link · parent

it's not like microservices fare better, when you introduce them, you've traded a hard problem for a hard problem and distributed computing...

comment 3w ago · link · parent

From the article: "In a note attached to the files, the Department of Peace wrote, "They have our information, so it's only fair that we have theirs.""

comment 4w ago · link · parent

small nit, that's not true, since GL4.3 the modern debug message callback is core so you can rely on it. Sure that won't save you on MacOS but if you can target modern OpenGL this isn't a problem in practice

comment 4w ago · link · parent

1. monolithic pipelines, pretty much no hardware works like that, the hash-and-cache design makes your design inflexible and adds a ton of overhead

2. WGSL, like come on

3. Hilariously outdated feature set, no mesh shaders, no HWRT, cooperative matrices/tensors, etc.

4. It's security-focused because web untrusted code:tm: so most of the calls are hilariously slow. Yes even the desktop implementations. There's no good webGPU implementation out there

5. it's also not simple to either implement or use. it's basically vulkan's difficulty without any of the advantages....

comment 4w ago · link · parent

IMO it's a bit more nuanced than what the author portrays it as. Broadly, software used to be much worse on the micro-level but better on the macro-level i.e. architecture.

Since it was much harder to make stuff, you really had to architect it well or otherwise it would simply fall apart. For example in assembler you need discipline in your calling conventions, layout and so on, otherwise it just corrupted, you needed to follow sensible naming conventions otherwise it degenerated into unreadable label spaghetti and so on.

Nowadays it's the other way around, the micro level is so much better due to libraries, code reuse, LLMs and better languages/tools, you can use highly sophisticated data structures and functions at your fingertips. In exchange, you can afford to skimp on architecture because computers are fast anyway, and the programming languages don't let you make a huge mess. (Most don't have unstructured goto/jumps, can't corrupt memory accidentally, etc.)

However, this has the cost of making larger programs a nightmare to maintain and systems suffering from a "death of thousand cuts" i.e. on the micro level all is well but when you look at the entire system it's a sprawling unreliable mess. This is where rewrites often happen ;)

comment 4w ago · link · parent

I mean sure you can do a generic layer and common denominator stuff, basically the kinda stuff webgpu or those rendering abstractions do and that's fair enough, it works well for simpler stuff!

The problem really is that if you do that you'll end up with random weird stalls or perf problems you can't really debug sadly :\

Re GL ye glUniform is usually much faster because you just do a lot less, you're writing a small amount of data directly into constant memory, it doesn't need resource tracking. UBOs / constant buffers come back to the theoretically slow but can-be-made-faster-with-driver-heuristics approach...i.e. if you see a small UBO which is only used as a UBO, you get the same direct constant bank upload

On NV it's quite fast, on AMD it's not really optimised, on intel just use buffersubdata because everything else sucks....

comment 4w ago · link · parent

dx11 isn't bad but it has a looot of cruft around it, writing a good constant buffer manager is witchcraft (remember, there's no "loose uniforms" injected into the command stream, it's all constant buffer updates, drivers do all sorts of writecombining magic to mitigate it, but the naive map / unmap cycle without any driver optimisations would absolutely tank....

Look at a GDC talk (https://d29g4g2dyqv443.cloudfront.net/sites/default/files/ak...), efficient dx11 is also "reinvent a diy memory allocator" level except that you don't have much control.

btw you can run dx11 on other platforms because dxvk exists, but while d3d9vk is a solid idea (high-level API, lowering to vulkan often makes it much faster than the crummy MS d3d9 runtime + DDI combo), d3d11vk is just often a wash or even a regression. I've had to debug dxvk-only perf problems a bit too many times...

anyway, point is, it's not really an easy-to-use or intuitive API

comment 4w ago · link · parent

actually yes you could design an alternative API and even implement it....

there's HW references + the linux drivers for AMD (both UMD and KMD), there's refs for NV and their open linux KMD (no UMD though), intel also has HW refs and open drivers for linux

I think it would be possible to put together as long as you don't mind only working for certain hardware, like a prototype you know

I might give it a shot to make a proof-of-concept "high level low level" graphics API ngl if no one else feels like so...

I think there's space for a "two-level" design like have the driver consist of the HW-specific parts, expose things in terms of GPU VAs, explicit sync, explicit memory management, command buffers etc. then have a high-level wrapper over it to provide vaguely GL-ish semantics, and you could intermix the two APIs, obviously you wouldn't be able to get the VA for a high-level object because that'd break the autotracking, if you use low-level you're responsible for syncing, cycling etc.

comment 4w ago · link · parent

Sadly it misses many features in C++, it's not really a replacement:(

Any C++ replacement language should support all the features of C++ to be suitable...

comment 1mo ago · link · parent

You're 100% right...

You can outcode the compiler but ofc that's not a way to go with tens of thousands of instructions and so on. LLMs are just much faster in writing code, just like compilers are much faster at assembling all the functions.

And yes, in a roundabout way, this is Stallman's dream fulfilled to the tip with his printer driver ;)

Many of these people wanted a project to run and gatekeep the people "not worthy enough" to hack on it or to use it. That's changing now, everyone can prompt together a bunch of crap. Fun fact I think I've got like... probably more than ten people into C++ programming simply by helping them prompt AI on how to get started, then they've picked up actual skills along the way. Note, they weren't any kind of programmers before because code is scary, but with a much lower barrier of entry, many more people can do stuff. It's amazing to see.

comment 1mo ago · link · parent

Rc<RefCell<T>> and Arc<Mutex<T>> says hi

anyway this is especially funny because C++ without compiler-specific pragmas/flags is also a bit mechanistically unsympathetic to the hardware, the whole strict-aliasing saga, you turn it on then you'll suffer with UB and has completely different semantics than hw, you turn it off and you have to manually SSA your code to avoid completely unnecessary loads when accessing fields more than once, the STL is slow, idiomatic C++ often allocates like crazy...

then people saw that and decided that we want more of that, so Rust was born;) (yes I'm being sarcastic here)

I guess the reason C++ fares better traditionally is because even though the actual specification is bonkers, you can mostly coax the compiler into "doing the right thing" as long as you don't mind losing portability and ugly stuff...

comment 1mo ago · link · parent

or they were lying...

comment 1mo ago · link · parent

All of those things already got reversed in the past. You just haven't heard of them because they don't really matter without you know, the support, software updates, the ecosystem and so on. What use do you have from one specific version of nvcc or the fw for one specific version of a watch? Your work will be obsolete with the next watch, that's why people haven't bothered so far.

Of course if it's cheaper, someone might, but the real barrier is really the whole first-party support, it's not the technical stuff.

comment 1mo ago · link · parent

what's wrong with any of these things though, both custom memory allocators and handwritten assembly have their place

do you really care if it's working and it's reliable? (i.e. not an overfit to the current data)

comment 1mo ago · link · parent

its a fake steam login! theyll phish you for your login and login into your account, messaging your friends...
12345
26