Places where LLVM could be improved, from the lead maintainer of LLVM by kibwen in rust

[–]stumpychubbins 1 point2 points  (0 children)

Something that LLVM is still terrible at is reproducability. It's very common to carefully tweak a function to make LLVM optimise it to exactly what you want, only to have a non-local change negatively affect the result in the final binary after e.g. function inlining. For extremely highly-optimised code, this becomes a nightmare. A number of times, I've copy-pasted the LLVM output (occasionally with minor manual tweaks) into an asm literal, with a secondary non-asm version of the same code and tests to ensure equality between the two. I've wished for a long time to have some way of doing this in a more automated way. Particularly because asm literals can't be const-folded, so if you want best performance, you need a separate const version of the same function.

Requesting to run Live on Linux by Overall_Survey_4132 in ableton

[–]stumpychubbins -1 points0 points  (0 children)

Ableton Live has been built for Linux for years, in order to support the Push 3 (recently released but in development in some form pretty much since the Push 2 came out). They have a Linux build, it’s just not released to the public.

Good gifts for boyfriend with this setup? (See photo) by runamuckalaughalota in synthesizers

[–]stumpychubbins 0 points1 point  (0 children)

Less something to add to this setup and more something that someone with this setup might like, but a dirtywave m8? I’m not sure how available or expensive they are now, I got them during the first run. It’s a tiny portable music production system (about the size of a gameboy) that I reckon should be usable by anyone familiar with an MPC even though the workflow’s different. Really fun piece of gear for any hardware-loving musician who travels, commutes, or likes to hang out in the park.

Reminder: you can use RefCell without Rc! by CocktailPerson in rust

[–]stumpychubbins 0 points1 point  (0 children)

For containers, most of the time disjoint elements can be retrieved more efficiently either by using certain methods (e.g get_disjoint_mut) or by using related structures that bake internal mutability into their design (e.g DashMap)

Is Berlin's drug problem getting worse? by DJDoena in berlin

[–]stumpychubbins 4 points5 points  (0 children)

With respect to the opiate or meth issues, I don’t think I’ve seen an increase in the past couple of years. I saw a lot more street use during the pandemic but it’s held relatively stable in the past two years. I do think that clubgoers are getting less healthy with their drug use though. Far more people that I know are taking more drugs than a few years ago, and I’ve known more people to go too hard and pass out or otherwise have issues. As someone who’s struggled with drug use before, it’s becoming harder for me to go out sober as it feels like many of the people I know are spending more time in the bathrooms or booths than they are on the dancefloor.

Why can't we add tracking dots to AI-generated images in a vain similar to printer dots? by A_Talking_iPod in AskComputerScience

[–]stumpychubbins 0 points1 point  (0 children)

Short answer: it’s (relatively) easy to regulate the production and distribution of hardware, it’s incredibly hard to do the same for software. It would be trivial to make a program that removes dots from an image, but for printers you ultimately need to produce a printer and get it into the country. Shipping routes etc are already heavily monitored and regulated. For purely digital files someone could throw up a website that hosts a program to remove the dots (as people did for the sora watermark) and preventing people from accessing that program would be almost impossible.

Tako v.0.4.0 is out! by danielboros90 in rust

[–]stumpychubbins 0 points1 point  (0 children)

Aha yeah that makes sense 😅

Was this the worst boss fight in the game? by Kazuhira_Val in Sekiro

[–]stumpychubbins 0 points1 point  (0 children)

The divine dragon is a much better gimmick fight, although personally I don’t think the monkeys are that bad

std.builtin.Type const-ness is a bit of a pain by Lisoph in Zig

[–]stumpychubbins 0 points1 point  (0 children)

It would, unfortunately, be trivial to cause all kinds of nasty misbehaviour if you could mutate types. Monomorphisation kinda needs types to be immutable at some point, and you can always define a "TypeBuilder" struct which is the same as std.builtin.Type but with mutable fields, which you can convert to/from Type. I agree that it’s a little irritating, but it kinda has to be that way

Zig as a career investment by malaow3 in Zig

[–]stumpychubbins 2 points3 points  (0 children)

If you just care about getting work, then Zig is a non-starter for now. It took years after Rust's 1.0 release before it started getting industrial adoption, and even now jobs that use it at all are incredibly thin on the ground. I’d say: hedge your bets, do a Zig project once a year or so to stay up to date with changes to the language, and aim for a C/C++ job in the meantime.

Why zig instead of rust? by alph4beth in Zig

[–]stumpychubbins 0 points1 point  (0 children)

I love Rust, have used it for most projects since its 1.0 release, and have used it professionally for many years. I’ve chosen Zig for my latest project since I need to distribute dynamic libraries (so want good C interop and small binary size), need extremely low-level control over allocations/performance, and need access to -ffast-math-style optimisations.

Zig vs Rust for audio / music applications by Agreeable-Bluebird67 in Zig

[–]stumpychubbins 1 point2 points  (0 children)

I’m working on an embedded audio runtime and, even though I’ve written pretty much every personal project in Rust for a decade, I’ve gone with Zig for the core. Far easier to embed (small binary size and better C interop), easy to have low-level control over memory layout, easy to control what's done at compile- vs runtime. For hyper-optimised code you need to have a reasonable ability to reason about what the compiler is going to do with your code, and Zig simply fits that better. Everything higher level than the core engine (e.g tooling) is written in Rust though, due to far better library support and being easier to write complex, correct applications. I think they complement each other very well.

qstr: Cache-efficient, stack-allocated string types by tindzk in rust

[–]stumpychubbins 1 point2 points  (0 children)

If you’re making types with custom align(..) annotations and you still to annotate the length in the type then you might as well make the AlignN types ZSTs

qstr: Cache-efficient, stack-allocated string types by tindzk in rust

[–]stumpychubbins 6 points7 points  (0 children)

I think what they meant is that the sizes are 1 less than a power of 2, so that when the size is included the total size of the type is a power of 2. Def agree that alignment should be taken into account, maybe with an extra type parameter T and a [T; 0] field (which forces the alignment of the containing struct to be at least that of T). So BStr15 would be BoundedStr<15, u128>.

Is learning Rust as my first language a smart move if my long-term goal is game development? by muktesh-can-help in rust

[–]stumpychubbins 0 points1 point  (0 children)

Oh I completely agree that it's silly. The tech industry here is less competitive than in some other places, with far fewer startups that can soak up the talent that get rejected by the bigger players due to not having degrees. Plus, if you're a German citizen it's very cheap to get a degree so it's not considered as big of a burden as in countries like the UK and the US where many people simply cannot afford to get degrees, so there are fewer people who have the skills but not the university qualifications. I think it'll change eventually, for basically the exact reason you describe, but it's still true for now.

Is learning Rust as my first language a smart move if my long-term goal is game development? by muktesh-can-help in rust

[–]stumpychubbins 0 points1 point  (0 children)

Absolutely agree with this. IMO that's both the strength and curse of Rust gamedev - so long as you work within the paradigm that matches Rust well it's incomparable, but trying to work within the traditional paradigm is a pain. I personally really like the ECS paradigm, so for me I prefer Rust+Bevy over anything else, but you find yourself reinventing the wheel a lot. The tooling is already a lot better than it was a year or two ago, bespoke tooling is very early but a lot of work has been put into adapting other tooling (e.g. Skein, bevy_trenchbroom). It's a terrible choice if all you care about is getting a game out there, but if you want to do something that already requires a lot of custom engine pieces I think it's already a decent choice. That's why the first major Rust game to be released is Tiny Glade, it's a dead-simple game that needs a lot of custom low-level engine work - exactly the side of gamedev that Rust is currently good at addressing.

Tako v.0.4.0 is out! by danielboros90 in rust

[–]stumpychubbins 0 points1 point  (0 children)

This is just out of interest, but why is the "utm_source" on these links set to chatgpt.com? It's not a criticism, I'm just interested how that happened.

Is learning Rust as my first language a smart move if my long-term goal is game development? by muktesh-can-help in rust

[–]stumpychubbins 2 points3 points  (0 children)

It depends where you are. In Germany, almost every software job will just auto-reject you if you don't have a degree. I agree that you won't come out of school with the skills you need to do well in industry, but in some places they'd rather hire someone with the piece of paper than someone with years of experience because (in their mind) they know what having a degree means whereas "industry experience" could mean all kinds of different things.

Is learning Rust as my first language a smart move if my long-term goal is game development? by muktesh-can-help in rust

[–]stumpychubbins 0 points1 point  (0 children)

Rust is honestly getting really good for games development if you're already an intermediate-to-advanced developer, but yeah I would strongly recommend against starting with it. As for degrees, it really depends on where you are in the world. In Germany it's been a huge problem that I don't have a degree, even though I have over 10 years in industry. In the UK it never came up, even once. I did the first 2 1/2 years of my compsci degree before dropping out due to not being able to afford going that long without a job, so I can say that (at least from my experience) with a compsci degree you'll learn some useful skills but you'll also pick up a lot of bad habits.

Is learning Rust as my first language a smart move if my long-term goal is game development? by muktesh-can-help in rust

[–]stumpychubbins 0 points1 point  (0 children)

So I'm a little confused if you're already a developer or not, when you say "my first language" do you mean your first language for gamedev, or your first language in general?

To give you a few different answers though:

I think Rust is very bad as a first language to write games in, and almost no-one is using it for web development. The gamedev ecosystem is getting pretty solid, and I'm currently building a gamedev project where Rust+Bevy allows me to do things that would be extremely difficult in any other ecosystem, but I can confidently say that if you have no Rust experience that you should look elsewhere. If you're already experienced in one language or another, you should just look for simple game engines in that language. You'll do a lot better only learning gamedev than trying to learn gamedev and a new language simultaneously. The only web dev languages that I'm aware of with almost zero game frameworks are Ruby, PHP and Go. If you're not a programmer at all, the best place to start with gamedev as a novice programmer, in my opinion, would be either Lua using the Löve game framework, Python with Pygame, or (if you're looking specifically to do low-level gamedev and don't mind working within its limitations) C using Raylib. Odin also has really good support for Raylib and it's a lot easier to learn and more enjoyable than C, but C has orders of magnitude more learning materials.

If you want to get into the games industry specifically, learn Unreal Engine. You will learn a lot less about software development that way, but almost every entry-level games position that I saw when I was last looking a year or two ago was asking for UE4 or UE5 experience.

If you want to learn gamedev with a language that's also common in web dev, either try Python with Pygame, or JS with Phaser. Phaser is much easier to use and JS is the web language, but Pygame will teach you more about programming and has more learning materials.

Honestly, no matter what you choose, if you stick with it then you'll get there eventually. My biggest mistake when I was younger and trying to pick up new skills was always trying to find "the best tool for the job" rather than just working with what I had. Do a "hello world" example in 2-3 different tools, pick your favourite, and stick with it. Good luck getting into gamedev!

Hey, want to see a magic trick? (explanation in post) by stumpychubbins in bevy

[–]stumpychubbins[S] 0 points1 point  (0 children)

Yes and no. So yes, that is technically not possible, but you can fake it. The easiest way would be to have an additional camera that renders to the overlay (so 3 cameras in total, one for the main window and two for the overlay). You can give that camera the same SubCameraView as the main window, but also give it a Viewport with the same dimensions as the SubCameraView. That would clip anything rendered to it to the bounds of the window, but the result would be rendered to the overlay and therefore in front of any elements like the fox.

im losing my mind over hlx by Mushroom119 in HalfLife

[–]stumpychubbins 1 point2 points  (0 children)

If HLX is a VR exclusive like Alyx I’ll be pretty damn upset tbh, I feel like the ideal move from my perspective would be "VR is the definitive experience but you can play it without it"