JATtho

joined 1 year ago
[–] JATtho@sopuli.xyz 7 points 6 months ago* (last edited 6 months ago)

C++: you sure you want to do this? This will either: a) blow your foot off b) be too fast to be measured in micro-benchmarks.

b. B. B. a. then B.

You have chosen to simultaneously blow your arm off and be the fastest code thing on the planet. Congrats. Yes.

[–] JATtho@sopuli.xyz 16 points 6 months ago

name your function as malloc() and see to world burn and generate bugs at factorial rate.

[–] JATtho@sopuli.xyz 1 points 7 months ago

After 362879 wrong answers you will pass. Or after 2,0922789888×10¹³ tries if it's a fancy 4x4 grid.

[–] JATtho@sopuli.xyz 1 points 7 months ago* (last edited 7 months ago)

To produce 1 commit, I end up rebasing the damm thing at least 3 times. If there is an problem, it's at least 2³ times.

[–] JATtho@sopuli.xyz 2 points 7 months ago
volatile int blackhole;
blackhole = 1;
const int X = blackhole;
const int Y = blackhole;

Compiler is forbidden to assume that X == 1 would be true. It's also forbidden to assume that X == Y. const just means the address and/or the data at the address is read only. const volatile int* const hwreg; -> "read only volatile value at read only address hwreg". Compiler can assume the hwreg address won't magically change, but can't assume the value read from that address won't.

[–] JATtho@sopuli.xyz 13 points 7 months ago

Please, no, I get flashbacks from my 6-month journey (still ongoing...) of the code review process I caused/did. Keeping PR scope contained and small is hard.

From this experience, I wish GitLab had a "Draft of Draft" to tell the reviewer what the quality of the pushed code is at: "NAK", "It maybe compiles", "The logic is broken" and "Missing 50% of the code", "This should be split into N PRs". This would allow openly co-develop, discuss, and steer the design, before moving to nitpicking on the naming, formatting, and/or documentation details of the code, which is likely to drastically change. Drafts do work for this, but the discussions can get uncomfortably long and convolute the actual finishing of the review process.

Once both reviewer(s) and the author agree on the code design, the "DraftDraft" could be collapsed into a link in an normal Draft to be mocked next. The scope of such draft would be limited by the earlier "DraftDraft".

[–] JATtho@sopuli.xyz 3 points 8 months ago

The day I configured git to use Geany for commit messages with a separate config specifically tuned for this, it improved my life by 300%

~$ cat ~/bin/gitedit
#!/bin/sh
exec /usr/bin/geany -i -s -t -c ~/.config/gitgeany $@

Then in git config: git config --global core.editor "gitedit"

[–] JATtho@sopuli.xyz 3 points 8 months ago

Bugs that have existed for +3 years in a component and are nearly immediately visible to the end user. Oldest source line I touched was from before 2010.

 

Have a good day.

3
Stubb. (sopuli.xyz)
 

Haavisto.

[–] JATtho@sopuli.xyz 7 points 9 months ago

That's because people are now aware of all of this shit happening, and some discreet day, just flip off the power from the house, doing indescribable things, and listens to the voices in their heads. And nobody will know.

[–] JATtho@sopuli.xyz 3 points 9 months ago

I had a similar debacle, when I managed to corrupt a btrfs file system to point it wouldn't mount again...

I was preparing it to have as my main system on bare hardware. I had accidentally mounted the same block device simultaneously in the host and guest: kablamo silent corruption and all 5 hours of progress lost.^*^ :(

*shred the guest VM, host was ok.

[–] JATtho@sopuli.xyz 3 points 9 months ago

On arch, UEFI boot vars are mounted at /sys/firmware/efi/efivars. It's unwise to rm -rf them....

[–] JATtho@sopuli.xyz 1 points 10 months ago

I fckd up a git rebase -i today with git commit -a --amend...

Thankfully git reflog allowed me to assemble the branch again ... from pieces.

 

I replaced the equivalent of floor in a code base and I was surprised it didn't break. Yet.

 

I have nothing to add.

view more: next ›