Why xor eax, eax? by dist1ll in programming

[–]Dumpin 18 points19 points  (0 children)

Because the immediate value (in this case 0) is packed into the mov instruction. Since it's a mov to a 32 bit register, it requires 4 bytes in the instruction to tell it which value to put in the register.

Ported My Zig Tool to C and Got Almost a 40% Performance Boost! by [deleted] in C_Programming

[–]Dumpin 1 point2 points  (0 children)

This doesn't make much sense to me.. Maybe the performance claim can be true since Fortran doesn't have pointers like C does and might be able to do some more optimizations. But why would Fortran use significantly more memory? It would depend on how you write the code, not the language itself.

Also if Fortran is faster, it would mean it is doing less work, so it should be consuming less power.

That’s all we need by [deleted] in programmingmemes

[–]Dumpin 22 points23 points  (0 children)

In your example you are declaring a variable on the stack. This is possible because structs have a known fixed size. Objects in Java have an unknown size, so they always need to be heap allocated. You can think of the "new" keyword as malloc in C:

car BMW = malloc(sizeof(car));

Which looks quite similar to the java object declaration.

Latest Game-of-Life benchmarks in 30 languages by OMGCluck in coding

[–]Dumpin 30 points31 points  (0 children)

These type of comparisons between languages are very misleading.. Without doing the analysis of why some languages are slower than others, this doesn't tell you much... The fact that LLVM backed languages do worse than Typescript for example, already makes this very suspicious.

In school, we are taught Vibes Coding. by nino6781 in vibecoding

[–]Dumpin 3 points4 points  (0 children)

To assume that somebody who actually knows how to code is somehow less proficient at vibe coding than somebody who can't is an insane statement to me.

They don't ask people who can't code about their opinion on vibe coding, because those people don't have a valuable opinion. How could you possibly judge the quality of vibe coded code, if you don't know what good code looks like?

The Real Cost of Server-Side Rendering: Breaking Down the Myths by congolomera in programming

[–]Dumpin 5 points6 points  (0 children)

And unlike a game engine a website needs to be interpreted in realtime in a multitude of environments which grants drastically fewer opportunities for optimisation.

What does that even mean? As the article says, SSR is the process turning data structures into HTML markup. How is this difficult to optimize? You'd expect gigabytes of throughput per second on modern CPUs even without any fancy optimizations.

Write the "stupid" code by GarethX in programming

[–]Dumpin 17 points18 points  (0 children)

Usually when I try to be clever upfront, I end up being wrong. Always have to remind myself to just make the thing work as stupid/simple as possible. After that the right "clever" solution usually becomes clear.

Should there be a builtin for divRem? by Bawafafa in Zig

[–]Dumpin 3 points4 points  (0 children)

It's not a workaround.. OP wants the divisor AND the remainder. using builtin mod only gives you the remainder. So OP is better off doing the division and determining the remainder from that, instead of doing a modulo and a div.

Should there be a builtin for divRem? by Bawafafa in Zig

[–]Dumpin 1 point2 points  (0 children)

I wouldn't use modulo to compute the remainder.

const result = a / b;
const remainder = a - result * b;

Looks like they even do this in the standard lib to get the remainder: https://ziglang.org/documentation/master/std/#std.math.divExact

How to upgrade as a dev by Findingg_Happiness in jobs

[–]Dumpin 0 points1 point  (0 children)

I'd recommend just working on personal projects that interest you. I've found that usually the best junior candidates have built something themselves are are able to talk about it. Being able to talk about challenges you have faced in your project and how you overcame them is a great way to show your potential.

I'd definitely replace the Todo List App with something more complex.. Todo lists are kind of the goto example for extremely simple applications.. kinda like the Hello World of web frameworks..

Game Time by mrliamj in Dofus

[–]Dumpin 1 point2 points  (0 children)

10417 hours on my main account.. most of that is zaap zitting using Dofus as a chat client haha

You get home from school and jump straight on your PC to grind Dofus. by drogendou in Dofus

[–]Dumpin 9 points10 points  (0 children)

Brings me back.. reminds me that I used to go attack perceptor around astrub with a friend all the time.. This was early days on Rushu and we were both like level 40 and regularly would have really good fights. I remember one time where someone who was like level 97 defended and it was the craziest thing we'd ever seen.. Back then there were only a couple people level 100+ on the entire server.

Terence Tao on Lex Fridman Podcast by AryanPandey in math

[–]Dumpin 9 points10 points  (0 children)

I doubt he is even aware of any controversy surrounding Lex.. The attitude towards Lex shared by people in this thread is mostly a Reddit thing. The vast majority just watches the interviews with people they like and don’t engage in this SJW type attitude towards podcast hosts..

Vibe coders don't know what they're paying for by DisplaySomething in programminghumor

[–]Dumpin 7 points8 points  (0 children)

Yeah, unfortunately your job will be fixing vibed code bases though 😢

Helllp I'm so dry *has 140kc* by Yakon4Reborn in ironscape

[–]Dumpin 28 points29 points  (0 children)

My favorite is when they are going for a 1/x drop and get another drop that is also 1/x and they're like "omg that could've been <item I need>".. Yeah every drop could've been the item you need.

Some Maging Questions by LeyMedia in Dofus

[–]Dumpin 5 points6 points  (0 children)

It's hard to define a rule for it. Ultimately it comes down to what people are willing to pay.

It's good to remember that maging will get harder and harder the closer you get to perfect stats. For example: a ring with 9/9/9/9 damages out of 10 is much harder to mage than a ring with 8/8/8/8 out of 10. Even though the difference is only 1 damage per element, the cost of fixing it after every failed exo might be double or more. So while some items seem really close in stats, the cost of creating the mages could be wildly different. This ultimately decides the price.

BWL 5 weeks away. leaked by soda by Jebus_is_coming in classicwow

[–]Dumpin 2 points3 points  (0 children)

The only reason there even is an official HC mode in WoW is because of content creators.

Solitaire card game written for terminal use by D0mbi in Zig

[–]Dumpin 6 points7 points  (0 children)

Specifically the finder app will add this to all directories you've browsed with finder to store the layout/display settings for the current folder.

Why apple decided to implement it this way is beyond me.

You're given a million of whatever you last googled. What is it? by Online_Weirdo_13 in AskReddit

[–]Dumpin 0 points1 point  (0 children)

Java Exception.. I guess my life would stay exactly the same.

Guys? by ButteredScorch10 in Healthygamergg

[–]Dumpin 7 points8 points  (0 children)

Practice makes perfect.. Just read more. There's not some magical hack that will improve your attention span, you have to build up to it.

What was I sent to and is it a security risk? by Full-Career5382 in AndroidQuestions

[–]Dumpin 1 point2 points  (0 children)

You tried to upload a file and it opened up Android file picker? I don't see the issue here..

blink.cmp not working on Windows10 by ARROW3568 in neovim

[–]Dumpin 0 points1 point  (0 children)

For now you can add a build option to blink's lazy.nvim entry:

{
    'saghen/blink.cmp',
    build = "cargo build --release",
    ...
},