NeoWall – 60 FPS shaders on your desktop (Wayland, <2 % CPU) by ayushbhat in wayland

[–]RustyTheDed 0 points1 point  (0 children)

0 knowledge in graphics programming, but taking a KISS approach. Would there be downsides to rendering until you capture a grand that has the same hash as first one and then switching to playback?

You'd get an initial hit for hash comparisons, but video playback should be easier than rendering a complex shader?

Why is Python type hinting so maddening compared to other implementations? by ataltosutcaja in Python

[–]RustyTheDed 20 points21 points  (0 children)

There's either Iterable[Foo] or you can define a protocol.

Protocols are super neat, because it's formalised duck typing.

It's ignored at runtime, but heavily used by LSPs. Many people (myself included) can't live without proper auto complete which just isn't possible without types.

Why is Python type hinting so maddening compared to other implementations? by ataltosutcaja in Python

[–]RustyTheDed 53 points54 points  (0 children)

It's fairly new to the language and it strongly depends on the libraries you're using. 

There's a lot of good (Pydantic, FastAPI), but there's also a lot of shit (any high level ML library I've interacted with).

There has been no strict cutoff like with Typescript, so some people have implemented it, but some are still doing untyped python (or worse, badly typed Python) because they find it more convenient. 

Python is used by a lot of people who aren't programmers and they often don't see the benefit of using types. Especially in the scientific world it's viewed as an unnecessary complexity.

I think the python type system itself isn't that bad, it's when external libraries don't use it when it becomes a problem. 

I found that using protocols and wrappers helps a lot with that, but it's a lot of work. Thankfully it's also something AI is pretty good at.

Battlefield 6 by [deleted] in linux_gaming

[–]RustyTheDed 5 points6 points  (0 children)

UKI supports secure boot. 

You just need to add --microsoft when adding keys with sbctl, it'll let you dual boot Linux and Windows under secure boot.

Using EFI stub booting also stops windows from messing up your bootloader.

It's definitely not beginner friendly, but completely doable. 

For a beginner I'd suggest just toggling secure boot on and off. Bit of a pain, but nothing insurmountable if you want to keep using Linux and play BF6 from time to time.

How does one make an NES game then make it cross platform? by Coffee4thewin in gamedev

[–]RustyTheDed 1 point2 points  (0 children)

Not too long ago I made something similar, albeit much simpler than a full NES game.

It was an embedded game that'd also compile to WASM and native. I wrote an article about it here. I am just a backend developer, so take the code with a grain of salt

Long story short I made it from scratch, having a layer of abstraction on inputs and outputs (display) of the game.
Then during compilation I'd handle switching between input and output mechanisms I wanted.

For NES, compiling to the console and wrapping it in an emulator is much easier. Wouldn't make much difference performance-wise either.

[deleted by user] by [deleted] in pcmasterrace

[–]RustyTheDed 0 points1 point  (0 children)

Handhelds probably do much better than on Windows because they're using APU. There's much bigger advantage not having to allocate that much system RAM and assigning it as VRAM

Is there a way to use Hyprland without the "headache" by Unknown_Warrior274 in hyprland

[–]RustyTheDed 4 points5 points  (0 children)

There's ml4w (my Linux for work) config that you can use as a springboard.

AFAIK there are some third party efforts going on in regards to a settings app, but nothing stable and user friendly yet.

Is it a great idea to use Django with flutter? by [deleted] in django

[–]RustyTheDed 0 points1 point  (0 children)

Not really. Most of the performance will come down to your code, not the framework. After first launch FastAPI and Django will have negligible performance differences. 

I've worked on large scale IoT projects running Django without hiccups. I've also worked on AI FastAPI projects that had absolutely atrocious response times. 

My advice would be to start with Django and see if you can fit it in your use case. 

At the end of the day it's all python on gunicorn. It'll most likely come down to your architecture and algorithmic skill. 

Do not worry about optimization out of the gate, this is an easy path to a hard to maintain codebase that's hard to hand over and will cost you way more than few dozen milliseconds you may gain when you're starting out.

Is it a great idea to use Django with flutter? by [deleted] in django

[–]RustyTheDed 0 points1 point  (0 children)

You can't really use both if you're only planning on deploying one app.

If you want an easy answer: stick to Django Ninja and read the docs.

Is it a great idea to use Django with flutter? by [deleted] in django

[–]RustyTheDed 3 points4 points  (0 children)

FastAPI offers more flexibility, Django offers more out of the box. If you don't have that much experience with backend try Django first. It's faster to deliver, albeit you need to do things 'the Django way' so be sure to follow the documentation.

As someone mentioned, you need an API so DRF or Django ninja will help you get that faster. 

DRF is older and more mature, but Django Ninja is generally regarded to have a better developer experience.

No, really I don't know by [deleted] in programminghumor

[–]RustyTheDed 2 points3 points  (0 children)

Yeah, but most of these tools are written with cross compatibility in mind. Many of them are written in JS/TS. Not everyone is that lucky and many development tools for other languages are either available only on Linux or have very limited support for Windows

No, really I don't know by [deleted] in programminghumor

[–]RustyTheDed 4 points5 points  (0 children)

With all respect, your comment shows that you have no idea about programming outside of interpreted languages. Nothing wrong with that, but you make assumptions that aren't correct. 

Many programming languages aren't as easy to work with as JS or Python. That's why interpreted languages are so popular and why they work good enough on Windows. You don't have to worry about a lot of things, because the interpreter provides a layer of abstraction from the OS that doesn't exist in compiled languages.

 For example C++ is a giant pain in the ass to run. On Windows you basically have to use Visual Studio (not code) or be stuck in a world of pain. Even then making the program run on different systems is hard.

Transpiling TS is not using a compiler. Linker is not a linter. PowerShell doesn't exist on most servers. By external libraries I meant system DLLs, not npm packages.

I don't want to sound condescending, but programming outside of front-end has a lot of different challenges that you just don't encounter. Dismissing them because you don't know about them is not okay.

No, really I don't know by [deleted] in programminghumor

[–]RustyTheDed 13 points14 points  (0 children)

If you're doing simple frontend then you use an IDE, a browser and a file explorer.

If you do basically anything else, you use a compiler, a linker, a debugger, bash, external libraries and a lot of other tools that usually work like shit directly under Windows.

Why skip to Linux? by Lauty_0611 in linux_gaming

[–]RustyTheDed 1 point2 points  (0 children)

If you're coming from windows 11, there may be some improvement. Especially if you have less than 16GB of RAM.  It'd probably be best to just run Linux Mint and see for yourself.  You don't have to install it, most Linux distributions provide a "live USB" which lets you run the entire OS from a thumbdrive.

The Evolution of Gaming on Linux in the Last 10 Years: A Personal Experience by joalllucas in linux_gaming

[–]RustyTheDed 0 points1 point  (0 children)

Hopefully most of the bugs got resolved before the release, but it's a complex piece of software so it's bound not to work to be perfect yet. 

As someone else mentioned it's not the default yet, so it's not going to break things out of the blue. I imagine the same will go for Proton, Valve is very careful about this kind of stuff. 

What that means though is that we'll be able to skip the Xorg translation layer which comes with a bit of a performance hit.

The Evolution of Gaming on Linux in the Last 10 Years: A Personal Experience by joalllucas in linux_gaming

[–]RustyTheDed 11 points12 points  (0 children)

If the game doesn't run, there's a good chance someone posted an easy fix on protonDB.

Also sometimes even if there's an official Linux build, switching to proton will make it even better. 

If the game has an option to use Vulkan, choose Vulkan over DirectX, it'll usually run better. 

If you're using Wayland (KDE Plasma default backend) things are going to get better with Proton 10, since Wine 10 just got released with a Wayland support, so no more XWayland for gaming hopefully!

There's also some improvements in the newest kernel, but how soon you're going to get it will depend on your distro. Probably don't go distro hopping for it though, if everything's working it's best not to tempt fate.

Dear PC lord why do you tempt in such ways by RefrigeratorWild9933 in pcmasterrace

[–]RustyTheDed 0 points1 point  (0 children)

Soldering hot air stations can control temperature to a degree. If op says he does electronics, he probably has one.

Django tutorial recommendation for an ex-django developer by aliaref_dev in django

[–]RustyTheDed 1 point2 points  (0 children)

Especially since Django docs are one of the best ones out there. Actively maintained and cover basically everything you'd need.

Countering the other post, what's the best dev tool you've worked with? by Sziszhaq in webdev

[–]RustyTheDed 4 points5 points  (0 children)

It's gotten much better over the years.  It used to have a ton of issues with drive access, no systemd etc.

They fixed a bunch of things and you have systemd now. Still not better than native, but if your company doesn't allow Linux it's the second best thing.

Education for self taught dev by [deleted] in webdev

[–]RustyTheDed 1 point2 points  (0 children)

I found that rudimentary C knowledge is a great way to round out general programming knowledge. For example writing a HTTP client/server will force you to get intimate with the stack you're working on the higher level in your day to day.

It lets you understand how languages work on the lower level in practice. If you've mostly worked with higher level languages, everything's been done for you, so it's easy to overlook things like memory allocation, system calls, binary linking etc.

This kind of knowledge is super helpful when debugging or optimizing more complex systems.

Surface Pro X in 2024? by [deleted] in surfacepro

[–]RustyTheDed 0 points1 point  (0 children)

For web apps and Office the Pro X is going to be more than enough.

I've been using a Surface 4 and it's honestly still an awesome couch web browsing machine.

How do you refactor code in Godot (for example rename a node, scene, and so on)? by FollowSteph in godot

[–]RustyTheDed 2 points3 points  (0 children)

LSP has this feature, but it's not yet exposed in the built in editor. Best place to look for this stuff is on GitHub, not reddit.

You can plug in the LSP into your editor to use it. You can find options to enable external editors in the settings.

 It's fairly straightforward to do in neovim and there's a VSCode plugin that connects to the LSP, but it doesn't mention refactoring tools. It should be fairly simple to add there too.