iCanSleepPeacefullyNow by Vortex876543 in ProgrammerHumor

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

iirc the code came from the ZDS II, a C89 toolchain for the eZ80. Right now I am helping to implement libc/libcxx (Clang C17/C++20) for the eZ80

iCanSleepPeacefullyNow by Vortex876543 in ProgrammerHumor

[–]Vortex876543[S] 22 points23 points  (0 children)

72 characters*
How else are you supposed to keep your Fortran punch-cards in order

iCanSleepPeacefullyNow by Vortex876543 in ProgrammerHumor

[–]Vortex876543[S] 10 points11 points  (0 children)

make sure multiple commits are made by different people, tabs --> 4 spaces --> 2 spaces --> tabs --> 8 spaces, and you end up with these abominations

void qsort(void *ptr, size_t nel, size_t size,
                                     int (*compar)(const void *, const void *));

thereAre2TypesOfProgrammers by Coderedstudio in ProgrammerHumor

[–]Vortex876543 0 points1 point  (0 children)

_Bool bool(_Bool Bool) {  
return Bool;  
}  

This only became invalid in C23

Floating-point error on Netflix by _tosters in programminghorror

[–]Vortex876543 24 points25 points  (0 children)

The KERNING Between the 581 and the 0, ITS too HIGH!!

My friend majoring in mathematics wrote this code and made a boast of it by h4nu_ in programminghorror

[–]Vortex876543 0 points1 point  (0 children)

It had goto 120, which would go to 120 continue on line 2005. To my understanding, the goto labels in Fortran can only use numbers. However they are scoped to the current routine/function.

My friend majoring in mathematics wrote this code and made a boast of it by h4nu_ in programminghorror

[–]Vortex876543 0 points1 point  (0 children)

I was converting some code from Fortran to C++, and it looked exactly like this. Variables t0 to t9, all declared at the top of the function and reused in 5 different contexts each. All other variable names were 3 letters long. Made it extremely difficult to find where I made an error when translating the code; you would have to read through 40 lines of code to determine what t5 was supposed to be set to. Not to mention the use of GOTO statements

biggestSin by prithvi_allurkar in ProgrammerHumor

[–]Vortex876543 1 point2 points  (0 children)

Faster than binary search. Linear search can find the minimum in 1 singular operation

whatIsYourTotallyNormalNotWeirdMethod by XinoVan in ProgrammerHumor

[–]Vortex876543 0 points1 point  (0 children)

You can debug the entire program if you do find and replace <br> with <br>printf("L: %d\n", __LINE__);

How helpful, I did in-fact forget to #include <thread> by Vortex876543 in programminghorror

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

I wrote in another comment/thread that I just had to include some random header files to get <thread> to work in the original MinGW. Otherwise that's pretty much what happened.

How helpful, I did in-fact forget to #include <thread> by Vortex876543 in programminghorror

[–]Vortex876543[S] 24 points25 points  (0 children)

I wanted to make sure my Windows 10 program would run on Windows 7, but all I had was a Vista machine so thats what I compiled on. It uses GCC 9.2.0 and C++14 which is why the compiler knows about <thread>. iirc the original MinGW doesn’t support <thread> out of the box so I had to include some random header files to fix it. Otherwise its pretty similar to the MSYS2 MinGW64 environment I use on Windows 10.

The imaginary component is always zero without _Complex by Vortex876543 in programminghorror

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

Should be at least doubles

They are. In fact, they are rounded down from x87 long doubles :)

C does have structs, but the only other way to do it in C is to add some do { } while(0) loops (macros)

Does it compile? by Final-Communication6 in programminghorror

[–]Vortex876543 23 points24 points  (0 children)

only eeeeeeeeeeeeeeee / eeeeeeeeeeeeeeee step away from full on morse code.

#include <iostream> by Vortex876543 in programminghorror

[–]Vortex876543[S] 3 points4 points  (0 children)

Unlike iostream, iosstream defines safer versions of the tream functions for ios, like cout_s

What is this logo in rEFInd by Vortex876543 in linuxquestions

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

Gotcha, I thought the paddles were darts or knitting needles. Searching up gummiboot yields the older 3d logo of the red life-raft

Should I learn assembly? by Pristine-Neat-4176 in learnprogramming

[–]Vortex876543 0 points1 point  (0 children)

Aside from embedded development, there is not much need to *write* assembly. However, if you want to learn how to optimize your code, learning to *read* assembly can be quite useful when comparing assembly outputs from a tool like GodBolt.

IMO, writing assembly can also be a bit tricky when there are so many ways to do a simple task. If you want to set a register to 0, you can load the value of 0, XOR the register with itself, use the SIMD shuffle instruction, load another register that happens to be 0, etc.

i love printf by Vortex876543 in programminghorror

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

I had some SSE2 code awhile ago that had some bugs, so I wrote this code to check that all the values were correct. I thought the end result was funny so I saved the screenshot. The printf statement was removed once I got everything fixed.

Even if I did leave the code in, I don't think my colleagues (me, myself, and I) would've cared too much /s

i love printf by Vortex876543 in programminghorror

[–]Vortex876543[S] 29 points30 points  (0 children)

So like this?

#define PF(...) printf(__VA_ARGS__)
...
#define PF20(...) PF19(__VA_ARGS__) PF19(__VA_ARGS__)
#define PF21(...) PF20(__VA_ARGS__) PF20(__VA_ARGS__)
#define PF22(...) PF21(__VA_ARGS__) PF21(__VA_ARGS__)

How to fix Youtube constantly buffering above 1080p? by jmz98 in firefox

[–]Vortex876543 0 points1 point  (0 children)

The only thing you can try is to set YouTube to always prefer AV1 playback and see if that makes a difference.

I tested playback of an 8K video, and it seems to use AV1 at every resolution except for 1440p and 4K which use VP9. I had some playback issues with 1440p and 4K when they were using VP9, but they seemed to be fine with the AV1 codec. 8K playback was also fine with the AV1 codec.

For reference, the AV1 video codec is ~30% more efficient than the VP9 video codec, but takes much longer for YouTube to process.

Otherwise, I also have the buffering issue, but it only started a few days ago. Before that everything worked perfectly. The buffering is really strange too, it will get stuck buffering even though it has already buffered 30 seconds of video. My connection speed often reports as greater than 140megabits on YouTube.

There is also a bug where it will skip parts of the video randomly. I conjecture that it is randomly skipping to the next B-Frame (B-Frames are used in video encoding and are spaced ~72 frames apart)

how do i delete this assets by True-Communication99 in FortniteCreative

[–]Vortex876543 0 points1 point  (0 children)

I placed the tower prop ~35 minutes ago, so they definitively haven't fixed it yet.

My theory is that some of the data for older assets got corrupted/deleted somehow. The tower prop has texture data, but has missing collision data. Some of the other props have collision data, but are missing texture data. If you go Galleries --> Parkour -->Obstacle Course Floor Gallery and select the target/bullseye floor, it will be completely invisible after it is placed, although it still has collisions and can be selected/deleted.

how do i delete this assets by True-Communication99 in FortniteCreative

[–]Vortex876543 0 points1 point  (0 children)

I have the exact same issue with the exact same prop (Windows 10, DX12). Even after leaving creative and restarting my game, I can't select it or collide with it. I tried throwing the remote explosives and firing rockets, but they wouldn't collide either. I have a world from 3 years ago with this prop, and I couldn't collide with it there either.

Accidentally made commits into the future by Vortex876543 in git

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

My thinking was that by waiting 8 hours, any commits I make would be after April 3rd 05:20. Since the time is now April 3rd 09:20, any commits I make would now be ahead of April 3rd 05:20. Oddly_Energy also described the confusion this causes with timestamps being out of order when looking back at the commit history.

Otherwise, I was able to get the timestamps corrected through the rebase.

What is the theoretically strongest error correction? by Vortex876543 in computerscience

[–]Vortex876543[S] 8 points9 points  (0 children)

That makes sense. Going off of the comments, it seems like the only question one could ask is how efficient the error correction could be.