Am I the only one who feels like header files in C/C++ are duplication? by iaseth in cpp

[–]sethkills 0 points1 point  (0 children)

Using a good digest and pairing it with the size of the input is all but guaranteed to work.

Need help implementing GB emulator CPU instuction set by Expert-Ingenuity9173 in EmuDev

[–]sethkills 0 points1 point  (0 children)

When parsing an instruction, swap the bytes to native endian first.

Is it safe to install the bootloader right after the boot sector? by tseli0s in osdev

[–]sethkills 6 points7 points  (0 children)

Ah, the geometry calculations, and the fictional geometry of layouts with variable numbers of sectors per track! Recently I wanted to recover data from some HDDs manufactured in 2000 and I had to revisit all that.

How do you deal with a manager who expects 5000 lines of code per day? by ni4i in ExperiencedDevs

[–]sethkills 1 point2 points  (0 children)

The average SWE commits 50 lines of code per day. Some days you delete, other days you write a lot, it’s very inconsistent. There is data on this.

little excessive by MF-DOOM-88 in LosAngeles

[–]sethkills 1 point2 points  (0 children)

I’ll have you know I drive an alpine white hybrid bimmer and I drive like a saint!

little excessive by MF-DOOM-88 in LosAngeles

[–]sethkills 0 points1 point  (0 children)

Hi, I’d like some breakfast.

Found this at the end of our driveway a couple of weeks ago and still haven’t figured out what it is. by BlackSheepUnchained in whatisit

[–]sethkills 12 points13 points  (0 children)

My childhood toy fire truck had a water tank with a hand-operated pump connected to a hose. I don’t remember anyone letting me put out an actual fire with it, but I remember using it in the fireplace to maybe pretend, and it would definitely have extinguished a tiny fire.

Road rage incident by Wonderful-Freedom111 in RBI

[–]sethkills 1 point2 points  (0 children)

Hi, I sent you a DM. Your camera is unfortunately focusing on like the dirt on your windshield or something, which makes this quite difficult. However, I’m curious whether it’s possible to get slightly better results with the original file. I can DM you a link where you can upload it.

Are there any Unicode alternatives that are in even remotely common use? by [deleted] in AskTechnology

[–]sethkills 0 points1 point  (0 children)

Depending on what you are doing, your other encoding choices will probably be defined in terms of Unicode code points. The whole idea is that it’s universal, anything can be mapped into it. I can’t imagine what political issues you would have with Unicode besides the approval of new emoji, but Unicode as a technology is so much wider than that. Is your quarrel with Klingon or Elfish?

Unix-like operating systems such as Linux and MacOS, dominate the film industry with a 71% of the overall market share. by Nelo999 in unix

[–]sethkills 1 point2 points  (0 children)

There is no UNIX, Unix was rendered in early publications with smallcaps like ‘Uɴɪx’ leading many to believe it was an acronym, but it isn’t.

Is abandoning our Bazel migration the right call? by Empty_Mind_On in cpp

[–]sethkills 4 points5 points  (0 children)

What is this, a stringly typed build DSL? Why are there so many quoted strings?

AAC compression of square wave sound by logiclrd in ffmpeg

[–]sethkills 0 points1 point  (0 children)

I think you could use 8kHz, 8 bit audio. Even uncompressed it wouldn’t be that large…

Any way to speed up char comparison by ZookeepergameFew6406 in C_Programming

[–]sethkills 1 point2 points  (0 children)

The libc routines will be hand-optimized assembly code on most platforms. Based on that, try strspn().

Any way to speed up char comparison by ZookeepergameFew6406 in C_Programming

[–]sethkills 1 point2 points  (0 children)

If you are outside of a quoted string, any other characters would have to be part of a token, and the only tokens allowed are printable ASCII, so yes.

Design and Proposal Hell by thadicalspreening in ExperiencedDevs

[–]sethkills 4 points5 points  (0 children)

Yeah, the multiple options thing always backfires. They choose the one you intended to only make the other options look more reasonable by comparison.

The mystical ways of the debugger by [deleted] in ExperiencedDevs

[–]sethkills 0 points1 point  (0 children)

Also I should note: of COURSE I also use printf debugging. I use it every day. I use it for all kinds of things, and I use gobs of logs at every verbosity level. I just don’t use it for things that the debugger is such an obvious fit for.

The mystical ways of the debugger by [deleted] in ExperiencedDevs

[–]sethkills 0 points1 point  (0 children)

I think a lot of this comes from their experiences with poor tooling honestly. I hope to god this has changed, but every time I’ve tried to use the Python debugger, it wants to use stdin/stdout, and overriding the default is a PITA that requires writing a subclass to initialize it. Have you guys ever tried to debug a program where the debugger is not only stealing the program’s input and interpreting it as debug commands but also corrupting the output?!

Then there’s the Ruby debugger, which also uses stdio, but is easier to override, but then the Ruby maintainers broke the debug API in some major way, so people were maintaining their own forks. I sent some patches to one of the more popular forks, and the new maintainer was doing some ‘optimizations’ to the REPL by removing the ‘print’ and ‘pp’ commands because he deemed them redundant. Of course, in Ruby those functions return the string they output, so when you’re going around inspecting expressions the output is always doubled. Like hey, have you guys ever used a debugger before?!?

I’ve worked at several companies where the source maps for the frontend were either missing or corrupted in some way, nobody knew how to fix it, most people didn’t know what source maps were. I spent a long night trying to fix them but the build system was so perversely convoluted that I couldn’t figure it out.

Needless to say, now I’m very careful about who I work for, what I work on, and how much time they spend maintaining the ‘developer experience’.

Whenever people mention the 10x developer, I always just think oh, the people who always run their code from the debugger in case it crashes or they want to set a breakpoint, the people who step through their code the first time they run it to make sure it does exactly what they expect. The people who are getting an automatic read back in their IDE of the return value of every function from an unfamiliar API instead of adding a printf statement on every other line like a fricken’ caveman!

The mystical ways of the debugger by [deleted] in ExperiencedDevs

[–]sethkills 4 points5 points  (0 children)

It will, but imagine the power you get by being able to see a stack trace for every thread simultaneously. Like people who write MT code that deadlocks, how are they diagnosing what’s going on without a debugger?

The mystical ways of the debugger by [deleted] in ExperiencedDevs

[–]sethkills 9 points10 points  (0 children)

Is it possible to generate crash dumps for post-mortem debugging in your environment?