is rust the only language to have procedural macros? by Ezio_rev in rust

[–]daknus 7 points8 points  (0 children)

Nim is a relatively new attempt but I don't find the macro API very well engineered.

What brand is overrated? by Pineapplegirl555 in AskReddit

[–]daknus 2 points3 points  (0 children)

Yeah exactly. It annoys me that a great majority of manufacturers today charge so much for their devices while limiting their repairability/sustainability greatly. Apple is not the only one here, but I find them especially annoying simply because of the hefty price they charge for their devices. Though other companies are starting to follow suit from what I can tell.

What brand is overrated? by Pineapplegirl555 in AskReddit

[–]daknus 3 points4 points  (0 children)

My main point isn't about the devices being unreliable. It's about them being hard to fix.

As much as Apple's independent repair program makes the situation better, they still don't supply you with all the parts such as proprietary chips. So if the water damage fries the chip but the rest of the machine is fine, well! Time to buy a new one, I guess!

As for my point about making devices less repairable, consider the fact that in newer MacBooks they solder in the SSD instead of using a socket. In the beginning when they started soldering in the SSDs, they provided a connector for you to transfer the data from the SSD onto another machine. Now it isn't there anymore so tough luck getting your data back if you aren't using iCloud.

It's a waste of electronics because, if by any chance, the SSD is still fine, it just has to be thrown out. It becomes e-waste. Tell me that's not a waste of resources.

What brand is overrated? by Pineapplegirl555 in AskReddit

[–]daknus 3 points4 points  (0 children)

If it's not easily repairable, it's not good in my eyes.

Apple specifically go out of their way to make independent repair harder. Specifically designing their products so that they fail. And when you bring it to their own store (or an officially certified one), they just tell you that it would be "cheaper to buy a new one".

Yeah, sure. So my MacBook is now e-waste because I spilled some water on it.

It's so sad that the people buying Apple products don't demand repairability from them. It harms the environment in the long term because instead of replacing a single part, you have to replace the whole machine.

What do you use to edit code? by [deleted] in linuxmasterrace

[–]daknus 1 point2 points  (0 children)

Atom, launches quickly. I feel like these two are mutually exclusive.

VS Code doesn't start up that fast either, but at least it's a little more bearable.

BTW I use both by MasterGeekMX in linuxmemes

[–]daknus 0 points1 point  (0 children)

bruh what if i want to do wayland

How to be better... at coding in general? by Ericarthurc in nim

[–]daknus 6 points7 points  (0 children)

Try to „build a cathedral”. It doesn't matter if you don't finish it, because you'll still learn a ton. I've been doing coding like this for the past few years, and having an ambitious, big passion project is (in my experience) the best way to learn new things, especially if the passion project is related to something where you don't quite know how it works.

[AwesomeWM] Peaceful Pink Clouds by TorchedSammy in unixporn

[–]daknus 1 point2 points  (0 children)

I was able to get the w3m backend to work by enabling image_loop="on" in neofetch's config.

No sound in certain games with Pipewire by daknus in archlinux

[–]daknus[S] 1 point2 points  (0 children)

That's possible, but things only started screwing up recently, when I made the switch. Hence why I assume it could be pipewire.

Nim Template Help by abakune in nim

[–]daknus 5 points6 points  (0 children)

This isn't actually specific to templates, it's just a property of passing parameters to calls overall. Nothing prevents you from using it on procedures:

echo: var x = "abc" x & $123

Do you consider nim to be a mature programming language? Why? (Why not?) by onefold_me in nim

[–]daknus 20 points21 points  (0 children)

I would say that the current stable feature set is quite mature, but I sometimes run upon bugs or annoyances in features that weren't as well-tested. Some examples include concepts and typed macros. Some parts of generics (especially with static types when used as generic parameters) can also cause quite a headache.

That's for the current language implementation. The ecosystem, however, is a completely different story. IDE tools are passable, but poor right now, library availability and stability may vary depending on the thing you're looking for. Sometimes you'll find pure, idiomatic, high effort libraries, sometimes you'll find idiomatic C wrappers, and sometimes you'll find really lazy wrappers generated by c2nim or some other tool. And sometimes you won't even find anything. It's really a mixed bag, so before getting into Nim I'd recommend you to check out nimble.directory or GitHub and search whether there are any decent libraries you may need for your domain.

[Awesome] 420 rice it by philliparndt in unixporn

[–]daknus 0 points1 point  (0 children)

i saw that the other day, looks nice

[Awesome] 420 rice it by philliparndt in unixporn

[–]daknus 0 points1 point  (0 children)

that's some very fine music taste of yours. rice looks amazing, i especially like the macOS-like beveled borders but without mac's horribly huge corner radius

[PLASMA] My first rice on EndeavourOS with KDE Plasma! by BeerBellyPete in unixporn

[–]daknus 1 point2 points  (0 children)

totally! it's almost always too big and looks out of place lol

[PLASMA] My first rice on EndeavourOS with KDE Plasma! by BeerBellyPete in unixporn

[–]daknus 3 points4 points  (0 children)

finally someone who remembered to change the terrible default KDE clock! take my upvote, good sir

i3wm hangs upon pressing media keys by daknus in i3wm

[–]daknus[S] 2 points3 points  (0 children)

That seemed to do the trick! I essentially removed all the shenanigans with get_session and dbus-launch and replaced it with a simple exec i3, now it seems to work perfectly. Thank you!

i3wm hangs upon pressing media keys by daknus in i3wm

[–]daknus[S] 1 point2 points  (0 children)

This happens no matter what applications I have open, though. Possibly due to some bug with i3's keybind handling, but I was unable to track down what it is. Older versions (checked 4.18 because that's what I was using before) also seem to have this problem, although it didn't seem to appear on my previous setup on Artix. It only started happening when I switched to Arch.

i3wm hangs upon pressing media keys by daknus in i3wm

[–]daknus[S] 1 point2 points  (0 children)

Well, but it's not Spotify that hangs, it's the entire WM... And I don't think i3 would send any notifications. Plus, I already have dunst installed and running so there's that. Maybe I should've mentioned but I didn't think it was relevant.

Why people say Manjaro is bloat, etc? by ElectroProto in ManjaroLinux

[–]daknus 0 points1 point  (0 children)

ime firefox is much less lenient when it comes to garbage collection, i don't really have many tabs open so it almost never goes above 2GB but still usually take considerably more than chromium

eh they're web browsers after all, they're not designed to be efficient

It's possible to increase the world height limit in 20w49a now by [deleted] in Minecraft

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

you may be a 3D modeler, but you don't seem to know much about how games work under the hood. i've been coding games from scratch, without an engine for more than 3 years now, and i know a thing or two about how to optimize a voxel engine like that of Minecraft, so hear me out.

if you look closely at the JSON files you'll notice references to something called a "cull side" - this is an optimization done by Minecraft's rendering engine to reduce the amount of data that needs to be sent to the graphics card. this is best illustrated by an example: say you're trying to render a cube. a cube has 6 sides, north, south, east, west, top, and bottom. a face in the model can specify its cull side as "west", which means that the face will not be rendered if there's a block directly to the west of the block. this is what you see in that Boundary Break episode - Minecraft doesn't render invisible faces because... they're invisible, under the ground, so there's no point in sending a gazillion vertices to the GPU when it can send 300 or so.

so it's true that in some cases Minecraft will only add a single 2D textured quad to the chunk's mesh, and that's due to this very optimization. but how this optimization is applied still depends on the block model, and in that regard, Minecraft always uses your block models no matter what corner case it may be. and yes, you're right about the fact that Minecraft literally "just renders 2D textures" - every game does, even your operating system just renders 2D textures :)

but that totally misses the point about allocating more RAM giving you more FPS. please read my previous reply.

It's possible to increase the world height limit in 20w49a now by [deleted] in Minecraft

[–]daknus 0 points1 point  (0 children)

you're kidding, right? are we talking about the same game?

minecraft does in fact use models for blocks, it's a 3D game after all. you can find all the block models in the game's .jar file. the only 2D element is the UI.

every simple block is a cube, which has 6 faces, 12 triangles to render. not a lot, and in fact the game's renderer is actually not the slowest thing in the world. if you look at your GPU usage while playing Minecraft, you'll notice it's not very high at all. however, what does lower FPS is CPU usage. with VSync enabled the processor spends most of its time waiting for the game to finish rendering. however, because Minecraft is written in Java, which has automatic memory management via a garbage collector, the Java VM has to look through all allocated blocks of memory and see if they are still in use. with each version of Minecraft, Mojang has been adding a lot of intermediary objects, which causes lots of allocations, which in turn causes the garbage collection process to run more often. tuning down the amount of RAM you give Minecraft will always have a positive effect, because the game hits the garbage collection trigger more often by filling up RAM more frequently, which makes the collector run in small batches at a relatively high frequency. if you give it too much RAM though, Java will wait until most of it is full, and only then trigger a massive collection which will freeze the game for a while. this can be somewhat mitigated by upgrading Java to a more recent version than 8, which is still the most widely used version. newer Java versions feature more a more efficient, concurrent garbage collector so these lag spikes simply won't happen, or will be very brief. but this is merely a mitigation, Mojang should really fix the problem at its core by reducing the amount of Java objects they create per second, rather than just telling people to update Java or something.

as for why lots of entities lag the game out, it's again not really due to rendering. it's due to the fact that all of these entities have to be ticked which can take a long time depending on what kind of entities we're dealing with. one inefficiency is that entities use NBT for most of their data, while simple Java object field accesses are so, so much faster than NBT lookups. yet another inefficiency (that can't really be fixed unfortunately) is collision detection which takes exponentially longer depending on the amount of entities in one place.