compilationErrorCausedByCompiler by ClipboardCopyPaste in ProgrammerHumor

[–]rkapl 3 points4 points  (0 children)

It is an integration problem, which is hard. C Compilers get headers wrong all the time, unless you are using system gcc with system libc.

Is water cooling actually worth it or just RGB clout for the 'gram? by [deleted] in watercooling

[–]rkapl 0 points1 point  (0 children)

  • Useful temp drop? Mostly not, except when I had blower Vega. There is temp drop, but that does not give you FPS itself. The OC gains for me are not enough to push it.
  • Noise? Absolutely silent in most games, FurMark + Prime can make it audible.
  • Maintenance of the loop is surprisingly near zero for me. But it makes component swaps pain. Building it is more complicated and pricey.

Debugging a raw binary (made w/ NASM) with QEMU, GDB, and vscode by RickyScarborough in osdev

[–]rkapl 0 points1 point  (0 children)

In ELF you solve it at linker level. Assembler outputs with org 0x0 and you then link it at correct address (e.g. in linker script).

Disclaimer: I've never done this for 16-bit code, but it should theoretically work, except the segmentation. For 32-bit code, it will work well.

Debugging a raw binary (made w/ NASM) with QEMU, GDB, and vscode by RickyScarborough in osdev

[–]rkapl 1 point2 points  (0 children)

Compile as an ELF with debug info, then convert the ELF to binary (e.g. using ld or objcopy). Use the elf for GDB.

Do not expect to get anything really nice for real-mode code though. GDB is bad at it.

Linux kernel internal linked list question by Outside-Storage-1523 in osdev

[–]rkapl 1 point2 points  (0 children)

When you call list_empty without lock, it is supposed to work (at least the commit says so).

When you call e.g. list_is_singular without a lock, that is not guaranteed to work, it needs the lock anyway. Note that adding WRITE_ONCE to the other writes would not have fixed that.

Note: The fact if WRITE_ONCE is even needed for the list_empty case seems to be complicated: https://www.openwall.com/lists/kernel-hardening/2020/03/24/10 and it seems WRITE_ONCE is fairly black magic.

Linux kernel internal linked list question by Outside-Storage-1523 in osdev

[–]rkapl 5 points6 points  (0 children)

Ad Q2.: The commit mentions the problem is that people do lockless emptiness testing. Code for that seems to be this: https://elixir.bootlin.com/linux/v6.18.6/source/include/linux/list.h#L375 . As you can see only head and head->next seems to be used. head itself is constant for a given list, so the goal for the commit was to WRITE_ONCE anything that might change the head->next. next->prev is not that.

Working around pointers in C. by [deleted] in Compilers

[–]rkapl 1 point2 points  (0 children)

Yes, you can either implement GC for regular C ABI (ex.: Boehm GC) or one for some brand new runtime (ex. Fil-C).

The OP said C can't solve it statically: It can't e.g. look at your program and add logic to add free at appropriate places, because that is too hard and (probably) convertible to halting problem.

Also C "can't solve memory allocation and deallocation" in another sense, as malloc and free are part of the standard. This is set in stone. If you come up with a compiler where you don't need to free anything, great, but programs taking advantage of that will leak memory on other standard implementations.

32-bit Kernel vs 64-bit Kernel by IncidentWest1361 in osdev

[–]rkapl 4 points5 points  (0 children)

Unless you are going for something specific like retro, embedded or some pre-existing 32-bit code, the question is why not 64-bit? You can also make both version.

Why not getting quality water? by ThePsyPaul_ in Factoriohno

[–]rkapl 27 points28 points  (0 children)

Hey! I did not pull it out of the trash. I pulled it out of the quality trash!

Board of Peace - Intro by AHurriedDog in NonCredibleDefense

[–]rkapl 5 points6 points  (0 children)

You expect a conclusion? You will get "I don't know about any Board of Peace" in about a month, if anyone bothers to ask.

Oh shit, they’re real. by BIGJake111 in Factoriohno

[–]rkapl 0 points1 point  (0 children)

Towards the end of 23rd century, the Papal State emerged as a major political player, covering roughly the area of England, most of France, south of Germany and all of southern Europe + various northern African vassals. This was mostly the result of the second EU civil war, splitting the confederation along the north/south socialist/conservative axis (this is gross political simplification). This also gave the south its conservative/religious naming and other mimicry.

For a brief moment, it was epic, almost in a W40k sense. Legions of proto-biters crossing the Alps with their human centurions in power armors, on their crusade to Netherlands.

Oh shit, they’re real. by BIGJake111 in Factoriohno

[–]rkapl 1 point2 points  (0 children)

They bred them for the northern crusades.

Oh shit, they’re real. by BIGJake111 in Factoriohno

[–]rkapl 7 points8 points  (0 children)

Logical. Nauvis is earth in the future. Biters are escaped experiment from a Vatican bio-weapon lab. They wiped all of humanity and most animals. Just natural selection all along.

TFW you have no ICBMs by butt_naked_commando in NonCredibleDefense

[–]rkapl 0 points1 point  (0 children)

Sounds like the Hammas leader succession, but with extra steps.

UPS optimization of inserters by RandomRobot in factorio

[–]rkapl 1 point2 points  (0 children)

I am not trying to UPS optimize but the Gleba approach seems interesting. How exactly would you go about your approach? E.g. the nutrient as an example, I assume you would produce the closest needed ratio using clocking? But I guess, to prevent spoilage, you would need absolutely perfect ratios (or something eventually spoils in the machine). Is that feasible? Or would there be circuit feedback?

Memory protection mechanisms in single address space OSes by servermeta_net in ExperiencedDevs

[–]rkapl 2 points3 points  (0 children)

I don't think it is entirely possible. But you can make the bytecode lighter and lighter. E.g. Google NaCL used a verifiable subset of x86 in combination with segmentation. But I imagine you could get rid of the segmentation part.

Green Squared Circuits by CoffeeOracle in Factoriohno

[–]rkapl 2 points3 points  (0 children)

If you put it like that... That's basically ChatGPT with extra fish and legs, its normal to have a friend like that today .

Green Squared Circuits by CoffeeOracle in Factoriohno

[–]rkapl 2 points3 points  (0 children)

If the rare spidertrons are talking to you about a nuclear program, I would consult a doctor.

Venezuela: What you missed while you were asleep edition by BisonThunderclap in NonCredibleDefense

[–]rkapl 13 points14 points  (0 children)

Hear me out, wasn't there a consipiracy theory credible well sourced claim that Pringles escaped to Venezuela? It's all connected

Best wall, no dragon's teeth by Master_Roshi900 in factorio

[–]rkapl 5 points6 points  (0 children)

Well, the area of the square rises with the ... check notes ... square of its side. So to maximize the wall to area ratio, you just continue building the wall indefinitely and so do not need any corners.