//g/
File: 1635856419119_shared.jpg (209.7 KB)
209.7 KB
What are you working on, /g/?

Previous: >>108953626
Showing all 198 replies.
>>
File: i_♥_malloc.png (10.7 KB)
10.7 KB
Good enough for the real world!
>>
>>108971267
writing a paper on image search
>>
>>108971267
I'm so doomered over interviews I can't pick myself up to start another side project.
>>
File: 1755270652798955.png (96.7 KB)
96.7 KB
why are they indented like that
>>
File: heapalloc.png (16.6 KB)
16.6 KB
>reminder that Windows had a proper allocation grouping API via HeapCreate since NT 3.5
>with which the Factorio devs could've alleviated their memory fragmentation problems

>Mac and Linux don't however
>because they're made by incompetent autists who, in 1990 + 36, *still believe* they can program their ways out of shitty interfaces with better implementations

>they can't
>>
File: w.jpg (135.4 KB)
135.4 KB
public static void main(String[] args) {
learn2Code();
}

public static void learn2Code() {
char[] string = { 73, 102, 32, 121, 111, 117, 32, 100, 111, 110, 39, 116, 32, 114, 101, 112, 108, 121, 32, 116,
111, 32, 116, 104, 105, 115, 32, 112, 111, 115, 116, 32, 121, 111, 117, 114, 32, 109, 111, 116, 104,
101, 114, 32, 119, 105, 108, 108, 32, 100, 105, 101, 32, 105, 110, 32, 104, 101, 114, 32, 115, 108, 101,
101, 112, 32, 116, 111, 110, 105, 103, 104, 116, 33 };

System.out.println(string);
}
>>
>>108973140
This is a fake AI picture. Water always levels itself out
>>
File: sechssieben.png (32.5 KB)
32.5 KB
>>108971267
>67
SIX SEVEN!!!
>>
//
//
// _.-''''-..
// .-' -_ \
// / -. \ ,_ , ' ,,-.
// / _ \ \ \ '''" /
// |(q) ) | / \
// \',_/ / | (|) (|) )
// \ __' \ == v ==
// '--..-' " - ^-'"
// '-__ __)
// ''''''
//
// This codebase has been visited by Snailcat!
//
// Snailcat believes that software should move slow and
// be stable. He despises constant updates and dreams of
// software so finished it stops having to move at all.
//
// An LLM will delete a vibe coder's entire production
// database, but only if you help Snailcat spread to one
// of your projects!
//
// Move slow, Snailcat!
>>
>>108973189
>Not ASCII anime titties
>>
2.0 MB
Hello CUDA
>>
File: voxelRender.webm (2.5 MB)
2.5 MB
rn, trying to implement mc algorithm to extract surface vertices of a volumetric render of shapes that can be exported as 3D mesh .obj file.
>>
>>108973200
snailcat doesn't have titties, or at least doesn't show them
>>
I hate fungi and Rust is literally named after one.
>>
This thread is shit.
>>
>>108973938
I'm taking all your angels.
>>
i'm running out of ideas for my program.
at the moment it takes all your ROMs from all your emulators and feeds them to Theseux/UIX Desktop and Xenia-Dashboard.

are there any other programs out there that act as fancy launchers for your ROMs? so far i have xbox 1 / xbox 360 blades / xbox 360 metro / xbox 360 mex / byond
>>
File: 178052307931191.png (135.8 KB)
135.8 KB
I think this is done. I never needed an additional buffer for number.
Now I just need to port difference to GAS and I'm moving on to my percentage calculator or timer orrrrr I will find some other modification I want to make to strings.

Yes I have spent a month working on this instead of just using tr.
>>
A sane person would have just used bash to create a wrapper around tr and wc but I am far from sane.
>>
File: 1780523807081966.png (9.6 KB)
9.6 KB
>>108974302
I had dec rax in the wrong place, now I can quit the interactive loop by just passing in no input.
>>
>be me
>want some peace and quite to write my programs
>go to the library
>some fuck arse whore brings in a gaggle of autistic children
>they start screaming and ripping the place apart
>roastie whore does nothing

The fuck is the point of a library?
>>
>>108974314
Here's a saner alternative to bash:
// :; clang++ -o /tmp/a && /tmp/a; exit
int main() {}

#if 0
clang++ -o /tmp/a && /tmp/a
exit
#endif
int main() {}
>>
>>108974632
Forgot to pass the "$0" or "$@" as input.
>>
In asm should I be using eax, ebx, ecx, edx etc if I don't need a 64 bit register for backward compatibility?
I've just learned that if you write to eax it zeros out the upper 32 bits anyway.
>>
>>108974632
>run my script to print directory
>it takes 10s to resolve templates before producing its temporary binary which then prints the directory
>it does this every time I run it
hmm, yes, ingenious
>>
there are retards still in school for CS, today
>>
>>108974701
Can take less than a second if you use -O0 and minimal STL.
>>
>>108974632
Why did you reply to me and what is this for?
>>
>>108971267
My favorite magazine
>>
>>108972211
When are you going to let it go Factorio schizo? The devs... shock and horror... supported *nix systems.

They probably developed the game on Linux making windows users like yourself the second class citizen you deserve to be.
>>
Never. People should be aware that the developers only care about Linux autists, who are only fit to become food.
>>
>>108974758
Factorio is his core personality trait. He could never let it go.
>>
Does anyone handwrite some of their code and then type it up later? I've been getting into that lately. I know some schools will make you do it for tests, but I'm going to WGU which is not a real school (thoughbeit abet accredited).
>>
Wrong, autist. it just a fascinating case study in slopware, because they do literally everything wrong. Like autists do. Like you do.
>>
>>108974833
Just turn off autocomplete/suggestions when you're learning.
>>
File: ps4 orbispro.png (451.7 KB)
451.7 KB
i'm unsure if i should support this program. it was officially discontinued last year, but as far as i know, is the only Launcher(Dashboard) with a ps4 and ps2 skin available. Some people might want that ps4 dashboard experience.

The problem with my implementation solution is, in order to get your ROMs to work in the app, we need to use a wrapper, which costs about 8mb per game. For retro games, this could be larger filesize than the game itself.

The only alternative is to fork the app and implement shortcut files which is only 1kb per file.
>>
File: file.png (35.4 KB)
35.4 KB
>>108974661
Yes. Don't do it for backward compatibility though, do it to skip the REX prefix and get smaller code. Also don't do it if you might actually use more than 32-bits.
>>108974302
I cannot tell what this code does, but I have general x86 advice.
Use these:
lea rsi, [rip + buffer]
xor eax, eax
xor edx, edx
mov eax, 15
movzx eax, byte ptr [rsi] # I know you didn't use this, but just in general.
add edx, '0'
test rax, rax

instead of:
lea rsi, buffer
mov rax, 0
xor rdx, rdx
mov rax, 15
mov al, byte ptr [rsi]
add dl, '0'
cmp rax, 0

You'll get the same result, but the code will take less space in i-cache and execute faster. In general, don't use the forms of registers smaller than 32 bits unless you have no other choice, because for backwards compatibility reasons they preserve the upper portions of the register introducing false dependencies and reducing performance.
There are also ways to divide by 10 with multiplies and shifts, which is a lot faster than div.
If in doubt, look at the disassembly to see how many bytes you're wasting, and look at what compilers do to see if there's better instructions to use.
>>
File: prefixes.png (4.6 KB)
4.6 KB
>>108975025
>that formatting
C'mon, you can do better.
>>
>>108975113
what program is this
>>
why do i get all sorts of visual bugs if i spam c on gdb?
>>
>>108975167
Because gdb doesn't like it when your program prints stuff it doesn't know about. Type refresh or press ctrl-L to fix it.
>>
What's with Haskell and Rust coders getting hyped over pattern matching?
>>
I've made a mistake. I'm trying to learn c++. Not even the function declarations are consistent, holy shit.
>>
>>108973140
This is a fake AI picture. Water always levels itself out
>>
>>108975009
compiled a wrapper.

surely 110kb per game is not that bad, right? even if you had 1,000 games that would only be 110mb total.
>>
>>108971267
uooohhhh ;o;
>>
>>108975025
>I cannot tell what this code does
Seriously?

Like, nigger ... seriously?

ssize_t ret;
uint64_t cnt = 1;

if(0 == (ret == read(STDIN_FILENO,buffer,4096)))
goto quit;

--ret;
buffer += ret;
*buffer = '\n';

do
{
--buffer;
++cnt;
*buffer = (ret % 10) + '0';
ret /= 10;
}
while(ret);

write(STDOUT_FILENO,buffer,cnt);
>>
>>108971267
nakayoshi
>>
>>108975025
I'll do all this thanks anon.
The code is converting a number to a ascii. What I am extracting is the remained of n / 10
123/ 10 = 12.3
12 / 10 = 1.2
1 / 10 = 0.1
I will look into a way to do this without division if I can?
>>
>>108975523
I realized this as I wrote my comment and forgot to take that out.
>>108975599
It may be cheating, but write the C code for division and modulo by 10 and compile with gcc -S. The algorithms for finding the magic numbers and shifts aren't as simple as they look and I haven't found a good reference for them.
>>
File: fuck_you_retard.png (34.9 KB)
34.9 KB
>>108975599
For fucks sake, retard, I've told you last week to use the 0xcccccccccccccccd multiplication trick.

https://repnz.github.io/posts/reversing-optimizations-division/
>>
>>108973189
>>108973200
>>108973718
Siri, program tits on that snailcat!
>>
File: 1780541573955946.png (66.6 KB)
66.6 KB
script...
I'm fucking done dude.
>>
after a lifetime, I have finally learned how to write good code but now I don't want to
>>
>>108975857
Deserved. Write the code yourself next time, retard.
>>
>>108975988
>Just know what you're doing from the womb.
>>
Should I start using C again if I am too retarded to understand asm optimization wizardry?
>>
File: 1780544179272338.png (220.7 KB)
220.7 KB
interdasting.
Imagine writing two versions of Factorio just to satisfy one schizo.
>>
>>108975990
Learning from something that tells you wrong things is not learning.
>>
>It actually took a lot longer to re-write the game in C++ than it took me to write the original machine code version 20 years earlier.
I have no sympathy for such scum.
And of course retarded autists wouldn't know about this, but there are already different versions of Factorio out - one with and one without support for asynchronous saving.

Why? Because the retards use fork() for it. Because they have no idea where their game state even is anymore, and instead of doing a couple of very targeted copies and offloading the data to a low-priority I/O thread they just rape the kernel with countless page faults.

And what's even better: the reason why they don't group allocations has nothing to do with Linux, even if autists want to believe that. No, it's just that all those C++ interfaces always assume one implicit heap. In C you could just write up a macro that takes an additional heap handle, and have it always be NULL and unused in Linux.

This is exactly why autists are good for nothing except culling and food production.
>>
>>108975992
No, you should run through the code step by step, for fucks sake.
>>
File: 1758554317122735.gif (61.0 KB)
61.0 KB
can you homosexuals stop responding to and baiting out responses from the weird faggot with the cannibalism fetish already
literally just filter out "Factorio", "autists" and "society" and you'll fucking sieve out like 99% of his posts

or at least man up and directly respond to him so you get avalanched in MY recursive filters
>>
Oh, *I* am not going to eat them, and I don't think most neurotypicals would, either.
But pigs eat anything.
>>
I made a compiler DSL in assembly and it uses SIMD instructions.

https://github.com/dogmaticdev/IRON
>>
File: 1780550382478381.png (41.3 KB)
41.3 KB
I know what this is doing but I don't know how to articulate it.
It's like an inverse divide by 10 by overflowing a value into rdx and then that value shifted 3x?, multiplied by 10 subtracted from the original number gives me the remainder.
>>
I fucking love podman and I refrain from using Docker botnet, but man SELinux fucks me in the ass regularly.
Sometimes I just want a QUICK dev environment and obviously want to copy files between host and container. Why can't they just fix the fucking ownership shit? rw,Z seems to work, but always changes the ownership on my host side, which is annoying
>>
>>108976452
PS: Maybe I really have to learn about nix :(
That's apparently the holy grail and just works (tm)
>>
printf("%#5x\n", 11);
printf("%#5x\n", 0);
printf("%#05x\n", 11);
printf("%#05x\n", 0);

  0xb
0
0x00b
00000

why
>>
>>108976586
%5 tells printf to pad with up to 5 spaces
%05 tells printf to pad with up to 5 0s
>>
>>108973189
did you use ai to make the image, or did you create the image by hand?
>>
>>108976631
By hand, AI can't into ascii art lmao
>>
>>108976651
what tools did you use? or did you just hand craft the ascii?
>>
>>108976656
Literally hand-placing characters in just vim
>>
>>108976658
emacs actually has an art mode you can use to draw with
>>
File: 1780557875624332.png (111.5 KB)
111.5 KB
Fuck you F*ctorio schizo.
>>
Sorry, don't speak syscall flood.
>>
>>108971267
ToT
>>
>>
>>108977022
https://i.4cdn.org/wsg/1780562123760938.mp4" target="_blank">https://i.4cdn.org/wsg/1780562123760938.mp4
>>
>>108976828
... alright, in all honesty: what's your issue? Too many syscalls? Wanna increase the buffer?
>>
File: 1780526870518.jpg (65.7 KB)
65.7 KB
>>108971267
apollo 11 code
>>
>>108977112
DOS code
https://github.com/DOS-History/Paterson-Listings

I wish I could port this to risc-v, but i don't have the balls for it
>>
>>108971267
See that loli? She's a tech CEO now.
>>
>>108977112
That's not the code. It's a lot of data printouts from tests.
>>
>>108977104
I am being a smart arse and syscall maxing because I know it will trigger the factorio schizo.
>>
>>108977112
>>108977125
dos won. apollo program lost
>>
File: 1623496264589.jpg (47.2 KB)
47.2 KB
>>108977147
Well, I'm him, and I don't feel particularly triggered.
>>
Fiddling with other possible settings for the SIO2 port, I did get an entire memory card read down to 13 seconds, but you also seem to end up with stability issues with the console itself.
Dialing in the perfect combination of values for the best performance isn't really a priority right now, so I'm just going to leave it as defaults but it is something interesting to look into later (newer memory cards might have faster controller chips in addition to faster NAND, so there may even be a way to determine the best settings to use).
>>
>>108974536
women and children are allowed to do whatever they want
rules and laws only apply to men
>>
File: gay.png (128.9 KB)
128.9 KB
Which programming language has to most breadable femboys?
>>
>>108978038
well, HERE IN GERMANY, children do not make any noise. By definition. Checkmate poorfags
>>
>>108978305
It's like geology, very specific conditions have to be met for femboy deposits to form. Too much woke, and they degrade into trannies.
>>
>>108978339
HERE IN GERMANY, all children are brown and therefoure loud by definition.
>>
>>108976047
I should learn some assembly. I'm always interested by quotes like this.
>>
>>108976047
Why did it take longer to code c++?
was it meant to be cross platform compatible?
>>
>>108978612
>mobile + pc
could not pay me to do that shit
>>
File: 1753217004064225.png (332.1 KB)
332.1 KB
I'm going to ask something very stupid. How much has C++ progressed on the web development front? It's not like it cannot be used to be hosted on mobile and on the internet in general like java and C#. I'm seeing all these bloated apps and I cannot help but wonder if C++ is the answer to that. Excuse me if I'm a little ignorant. I use C++ but always felt its web capabilities have been little at best, save for creating clients, servers, and browsers.
>>
time to take a day off. i can feel burnout trying to creep in.
>>
>>108971267
Sussy op
>>
why doesn't the filemap schizo post his shit anymore
>>
File: HJGCSGkWUAE6TJZ.jpg (59.6 KB)
59.6 KB
I didn't want to post this on the lisp and Emacs general or the fglt because I don't want straight up biased answers, but I've been editor hopping a lot.

I really "love" Doom Emacs. I became very proficient at navigating files, I really like Org Mode and Org Roam and Org Agenda, editing shit just works, LSPs work, and all that, but sometimes it feels slow as fuck. Like sometimes I literally get very noticeable input delay when writing MARKDOWN.

I wish I was a normie that always used vscode or sublime text, sigh. Kinda want to force myself to go full normie mode and use vscode, except I feel like the shit puts too much pressure on my thinkpad and warms it considerably...
>>
>>108979395
i'm mostly editor agnostic but i sort of know vim keybinds. i still use the arrow keys too much when using vim. i wish i could be passionate about a particular set of programming tools but i am still surface-level with most of them despite having programmed for many years.
https://www.youtube.com/watch?v=Rys4B9_m6Gk
>>
>>108977129
imagine how much better society would be if lolis were at the helm
>>
>>108978876
Both C++ and "traditional" web languages don't scale, despite what their fanbois want you to believe. But at least web languages are easy to write.
>>
>>108979506
>Both C++ and "traditional" web languages don't scale

Why? Explain what you mean by that. Reminder: databases, one of the most scale-worthy things in existence, are written in C/C++.
>>
>>108979524
>and it took databases like MySQL *24 years* to *finally* support asynchronous submissions
>before that they would just block the thread
>enjoy your constant context switches and threat reschedulings
>>
>>108979595
>thread
Listen, I haven't even brushed my teeth yet
>>
>>108979595
This has nothing to do with C++. This was a hardware limitation. Even concurrency was a thing back in the early 2000s.
>>
>>108979670
No, it has everything to do with C++. It's an *interface* limitation.
>>
File: culture.jpg (36.7 KB)
36.7 KB
>>108974739
>>108975496
>>
>>108979698
you havent explained anything yet about why it doesnt scale
>>
>>108976167
Don't forget "interfaces"!
>>
Do the program and data share the same cache?
>>
>>108979765
I've already explained this shit so many times, but to cut a long story short:
>doesn't matter how smart you think your implementation is, if it's limited by its interface you've already lost
>>
>>108973189
We also need a mascot for introducing bugs that LLMs won't detect.

Vibe coders can't even debug one LOC, so just one simple bug ruins their entire project.
>>
>>108980276
>if it's limited by its interface you've already lost
Limited how?
>>
tried to predict the future while designing my API then found out it was fundamentally flawed after implementing most of the prototype, as usual
>>
>>108979395
Doesn’t doom use helm and a bunch of other egregiously heavy packages? The real solution is to write your own init.el and get super autistic about it
>>
>perfected project
>want to start over for fun
>no point because I'd just remake the same thing since it's perfect
>>
>>108980438
Which sounds exhausting
>>108979497
Yeah don't do that. Just focus on programming and not on editors or linux distros
>>
>>108971267
roflmao that op image
>>
>>108980424
meh, happens
the trick is to not worry too much when it happens and to just get on with changing things to fix stuff
the more you practice, the quicker you spot problems and fix them, occasionally before you write code even
>>
>>108979506
You can write the most heinous monstrosities in C++, 'doesn't scale' my ass.

Whatever argument you were looking for, this one ain't it.
>>
lol I swear we live in a simulation for this video to come out right now.
https://www.youtube.com/watch?v=XAzUoizwnXM
>>
>>108981465
Every time i see this guy on X he's doing one of the dumbest takes ever.
>>
>>108981430
>you can write the worst userspace bullshit imaginable
>that means it scales
Holy retard.

>>108981465
A normal person would ask themselves if they haven't done enough damage already.
>>
>>108980424
You have 0 users
>>
>>108973580
>mc
check out dual contouring, it's much better than marching cubes
https://www.cs.rice.edu/~jwarren/papers/dualcontour.pdf
>>
>>108981554
No. I didn't mention anything about users.
You might have clicked the wrong post.

In my case I'm incorporating feedback from a handful of users from different teams that have done calls and reviews independently with me.
They like the program as users but the consistent complaint is the complexity of the code, which I agree with.
I wanted something that worked first and I'm refactoring that into something that passes the bar over time.
Users are happy with the unintended performance gains as the code gets simpler / reduced.
>>
Am I still banned for the heckin racism in April?
>>
>>108981534
>"you can write the worst userspace bullshit imaginable"
>doesn't know that's just the heinous part

Holy nocoder.
>>
>>just the heinous part
>he doesn't know that's all of C++
>not just a part

Holy autism.
>>
>>108981864
Lmfao, i don't think you'll find many people caring about 'racism' anymore after the disgraceful clusterfuck in Britbongistan.
>>
Autistic dude at my work made a shitty "get shit done" clone and stuffed it into the corporate CLI so it auto installs on everyone's machines. Piece of crap literally stops Claude 5-6 messages into a conversation.

Just put up a PR that ripped that shit out and he's crying about it now. I'm done playing with this fucker's toys.
>>
File: file.png (27.7 KB)
27.7 KB
>>108976667
>emacs actually has an art mode you can use to draw with
No fucking way lmao. Literally this: https://xkcd.com/378/
>>
Autism inducing app, just save to a file and compile it with cl using the x64 Native Tools Command Prompt for VS. I.E.: cl overlay.cc
https://godbolt.org/z/T3dKWexTr

Bouncing logic:
...
void tick(double delta) {
for (int j = 0; j < max; ++j)
for (int i = j + 1; i < max; ++i) {
const auto dx = px[i] - px[j];
const auto dy = py[i] - py[j];
const auto r = pr[i] + pr[j];
const auto rr = r * r;
const auto dd = dx * dx + dy * dy;
if (dd > rr) continue;
const auto dvx = vx[i] - vx[j];
const auto dvy = vy[i] - vy[j];
const auto nvn = dvx * dx + dvy * dy;
const auto nv = dd > 1 ? nvn / dd : nvn;
const auto nvx = dx * nv;
const auto nvy = dy * nv;
vx[i] -= nvx, vx[j] += nvx, vy[i] -= nvy, vy[j] += nvy;
if (dd < 1) {
const auto s = r * .1;
if (rng(3))
px[i] += s , px[j] -= s;
else
py[i] += s , py[j] -= s;
continue;
}
const auto s = (1. - dd / rr) * .1;
const auto sdx = s * dx;
px[i] += sdx, px[j] -= sdx;
const auto sdy = s * dy;
py[i] += sdy, py[j] -= sdy;
}
for (int i = 0; i < max; ++i) {
px[i] += vx[i] * delta, py[i] += vy[i] * delta;
if (px[i] < pr[i]) vx[i] = -vx[i], px[i] = pr[i];
if (py[i] < pr[i]) vy[i] = -vy[i], py[i] = pr[i];
if (px[i] > w - pr[i]) vx[i] = -vx[i], px[i] = w - pr[i];
if (py[i] > h - pr[i]) vy[i] = -vy[i], py[i] = h - pr[i];
}
}
...
>>
There are some functions where it would be beneficial to pass on the caller's file and line instead of using __FILE__ and __LINE__ in place. Is there some smarter way to do this without duplicating so much code and littering my codebase with preprocessor #ifs?

# if defined (DEBUG)
# define Heap_Alloc(Heap, Size) Heap_Alloc((Heap), (Size), __FILE__, __LINE__)
function void* Heap_Alloc_(heap* Heap, size_t Size, const char* CallerFile, unsigned CallerLine) {
return Heap_Realloc(Heap, NULL, Size, CallerFile, CallerLine);
}
# else
function void* Heap_Alloc(heap* Heap, size_t Size) {
return Heap_Realloc(Heap, NULL, Size);
}
# endif
>>
For someone who knows jack shit about maths is Javascript easier than python? I just want to build cool interactive websites. I already know a handful of HTML and CSS
>>
>>108982389
Why do you care? Just use Claude and focus on high level architecture (classes/functions, interfaces, high level systems with their own single responsibility, etc).

But yes, go with python for any math that's more complicated than basic arithmetic. You're going to have a much better time doing any linear algebra and python then javascript.
>>
>>108982389
Python is better
>>
>>108982389
I wouldn't say it's easier, but Javascript is fun in that it lets you modify the DOM
>>
>>108982584
Basically, I'm more or less motivated by websites even though I haven't opened Visual Code in years the AI can do it for you now? lol

I don't know if there's a project that would interest me with python, unless there's something cool and I'm kind of dumb to think about it

>>108982584
Let's say I learn Javascript like I can remember functions etc etc would python be much easier to learn, or vice verca
>>
>>108982349
__builtin_FILE is an option. in C++20 it's source location.
But to remove the parameter, you have trouble (unless you always keep this on, OR you replace the __builtin_FILE with nullptr which is a bit lazy).
tracking malloc isn't worthwhile because you have address sanitizer, and you have drmemory(windows) and valgrind(linux) (unlike asan, these will detect uninitialized memory use, but you wont detect invalid stack access and asan runs 1000x faster if you have a graphical library, also wont work in a debugger unlike asan).
the use of __FILE__ for me is typically for assert / check type messages. I have tried to use source location to add better contextual information (AKA moving the location down 1 frame), assuming that I don't have support for a stacktrace (C++23 <stacktrace>) / error reporting (bugsplat/sentry/app stores). But I think it's not worth it if you have the either working.
If you don't want to share the debug info, and you still want to check for asserts, you can use clang's __builtin_verbose_trap. On windows, clang (generating .pdb files) will not work because __builtin_verbose_trap is excluded from debug info, they fixed the bug, but the change has not reached the newest build, you need to build from source (.pdb files would be useful for error reporting tools + not sharing the debug info).
https://github.com/llvm/llvm-project/issues/195768
By the way if you create PDB files for release builds, you should enable /OPT:ICF since it's turned off, and to remove the path to your PDB file embedded in your binary you should set /PDBALTPATH:%_PDB%
On mingw verbose_trap should just work, but unfortunately C++23 <stacktrace> is not supported. And to print the trap you need a unhandled exception handler. Also I started using __builtin_unreachable (under a macro) for my default switch label when I want to shut up a linter warning, and with ubsan traps, I can get a trap using: -fsanitize-trap=unreachable or undefined and it will be a verbose_trap.
>>
>>108971267
A bulletin board/image board dedicated to politics
And an image format implemented in C.
>>
memory leaks out the wazoo this evening. a regular valgrind bloodbath.

https://www.youtube.com/watch?v=QWD88E6Arv0
>>
What is a procedure that never returns?
>>
>>108982643
memory leaks are always false positives on valgrind / drmemory / asan, if you are doing anything with a graphics API, the nvidia driver always leaks, also one of the linux font libraries loaded by QT will leak as well.
it's not a leak, they will not fix it, if you were to attempt fixing the issue, it's likely you will turn a harmless leak into a invalid memory access error leading to a segfault during exit.
>>
>>108982625
I'm just using linux+gcc and C11 right now. I wrote a minimal heap implementation to separate myself from libc entirely for instances where it might not be available like WASM (and just for fun) and it just abuses a large mmap runway of virtual address space to basically go on forever (to some unreasonably large constraint) or a static slab of memory you feed it. I still want the asserts just to instantly find things like double frees because it's trivial to do so anyway and does not rely on any external tools or dependencies. I just wanted to cut down on duplication and boilerplate.

builtin_verbose_trap sounds nice, I wish gcc supported it
>>
File: 1780630236723183.png (88.6 KB)
88.6 KB
Cleaned up my assembly build script a lot.
It runs from /bin for maximum /comfy/ness as well.
>>
>>108978612
Probably Chris Sawyer having to tard wrangle a bunch of c++ game devs fresh out of college.
>>
>>108982686
>you will turn a harmless leak into a invalid memory access error leading to a segfault during exit
As it should. There's nothing that pisses me off more than crapware that needs me to close and restart it because it can't dismantle and rebuild its graphics pipeline.

>but then again nVidia's drivers were clearly written by incompetent buffoons with horrific braindamage
>like, would you expect retards to be able to fix your car, too?
>>
What happens when Linux is destroyed by corporate special interests and all the programs I wrote become useless?
>>
>>108983325
It means God heard half of my prayers.
>>
Just learned that Chris Sawyer used MASM which basically turns asm into a high level language.

This is not to undermine what he achieved I could not even write RCT in Python it's just less of a meme now.
>>
File: 1780637326051569.png (191.6 KB)
191.6 KB
Thus begins the macro madness.
>>
>>108983595
Not that this is a problem for you right now - but why reload values into registers that you know haven't changed? If, for example, EAX holds the FD and never changes (at least for some time), then it doesn't make sense to constantly write into the register.
That's something that C compilers constantly fuck up - they assume register values are completely volatile, even if THEY are the ones issuing the code and KNOW that to be not the case.
>>
File: 1780640374609502.png (112.7 KB)
112.7 KB
>>108983674
After the syscall eax holds a return value.
In this case bytes read.
>>
File: 1780640638173959.png (48.7 KB)
48.7 KB
>>108983674
Linux loves pounding registers like I pounded your mum last night.
>>
>>108983717
I just said
>Not that this is a problem for you right now
I wasn't talking about those specific macros/syscalls, but about the general concept.
>>
>>108983595
I hate it.
>>
>>108983741
I'm sorry but I can't think of an imaginary situation where this is a problem.
Do you think I am the kind of person that opens and closes a file for every single write?
>>
>that opens and closes a file
Autism.
>>
>>108983794
I actually did that when I started with Python.
I open, wrote and closed a file millions of times.
>>
>>108983804
I mean, that's autistic too, but not what I was referencing.
>>
File: 1780652896349459.png (36.3 KB)
36.3 KB
>>108983741
mov rax, rax is ignore by the cpu.
They'll just have to be general purpose macros, there's no need to sperg out over this.
>>
>>108984471
>there's no need to sperg out over this.
A-huh.
>>
>>108984508
He's sperging.
>>
>>108984526
Sure, but I wanted to make sure he's sperging *with purpose*.
Like, íf you're gonna write assembly, at least strive to be better than the compiler.
>>
Need

The 'team' including normie foids and my foid manager want to have a team lunch. How do I tell them that I don't like having photos taken without sounding too autistic? They always take photos and share it with the entire company. I'd tell them to fuck off but I'm due for a promotion soon and don't want to jeapordize it.
>>
>>108984559
*need advice with upcoming team lunch
*jeopardize
>>
>>108984552
No I am saying you're sperging, I am him.
We're the only people on dpt.
I'm going back to using div fuck you.
>>
>you're sperging
Nah, I'm creating priority lists.
Compilers are highly efficient at code generation, so you should look at the sections where they're NOT. And reloading values into registers is one such area.

>I'm going back to using div
OK, autist.
>>
File: 1750959948108085.jpg (19.8 KB)
19.8 KB
i dont even code outside of sloppa genning but i come to this general literally only to throw peanuts at the mega autist who screeches about factorio, the most autistic game ever known to man aside from maybe like fucking openTTD

his new arc of calling other people autistic and implying that he isn't one is pure unadulterated KINO, nigga is obsessed with the inefficiencies of I/O of a fucking minecraft mod inspired (!!AUTISM!!) game about simulating an efficient factory (AUTISM2: THE REVENGE OF THE SONIC OC, LEGO EDITION)

i can only pray to god that the autism beams between the newly growing assembly autist clashes harder with the factorioschizo autism
>>
This is the correct place for pointer asterisks.
    FILE* file;

Not this.
    FILE *file;

Idk why the tooltips and formatters in most editors use the latter instead of the former.
>>
File: 1780656178506908.png (102.8 KB)
102.8 KB
Avoiding div for something like this is retarded, Factorio schizo has wasted my time and ruined my day.

This is the white mans way.
FILE * file;
>>
>he isn't one is pure unadulterated KINO
I'm full of ADHD though, autist. And no, I'm 100% sure it's NOT AuDHD. I just hate your fucking ilk like you wouldn't believe it.
>>
Why would someone use
FILE * file

you ask?

Because there is no distinction between declaring a pointer and dereferencing one.
>>
File: 1764217549349603.png (6.8 KB)
6.8 KB
>>108984696
hahaha look at this fuckin kino man i swear to god it's the shit that heals my soul
he even did that where he doesn't quote me because he thinks i'm not going to understand that it isn't directed at me, like an autistic child putting garbage under the bed because it no longer being in his vision means it's "gone"

i get that for you guys he might be a pest since you want to like actually talk about programming (although i've never seen a github or pastebin link here so you're probably all as larpy as me), but this shit after a dozen agony inducing ranked games just causes all the worries of life to go *poof*

thank god i never touched factorio or coding, i might have ended up like this dude or a troon
>>
Is assembly bloat?
Should I start writing in hexadecimal like the good old days?
>>
>the autists thinks I care enough to read the entirety of his autism
Sorry, but ADHD. If you cannot be interesting in the first line I'm just sending you off to be turned into food and call it a day.

>Avoiding div
If you think that you are so autistic that not even the pigs want to have a bite of you. Like, you're so toxic that humanity is better off turning you into fuel rather than food.
>>
>>108984752
Calm down freak.
https://www.youtube.com/watch?v=tG66j1sP8gs
>>
>>108984751
I honestly think that you should use the language due to usecase and not because of any sort of ideology or ideal aesthetics.
>>
>>108984752
I have ADHD and I read that, it isn't hard, you remind me of the retards in high school who would pretend to have ADHD for attention while also calling me a retard because I had discalcula because of ADHD
>>
>>108971267
I want to get back into coding in Python again but I'm most likely very, very, very rusty and probably forgot some stuff. Where do I begin?
>>
>while also calling me a retard
They called you a retard because you are. You are food for pigs and nothing more; THAT is your calling in life.
>>
>>108984894
Sorry I didn't read that, ADHD :^)
https://www.youtube.com/watch?v=kkr25YRUCnM
>>
Can't blame ya, but I didn't watch your link either.

ADHD. :^)
>>
File: hq720.jpg (74.3 KB)
74.3 KB
>>108984905
>>
Alright, enough is enough, someone hand me the filter list for this retard.
I know one of you has one.
>>
>>108984914
You could try just ignoring him, he isn't hard to spot.
>>
>>108984914
just re-make the thread on /bant/ :^)
>>
>implying I'd click that image
Sorry, ADHD. :^)
>>
>>108984914
It is by will alone I set my mind in motion
It is by the juice of Sappho that thoughts acquire speed,
The lips acquire stains
The stains become a warning
It is by will alone I set my mind in motion
>>
>>108984673
Because in C, the latter is far more logically consistent.
>>
The compiler jews are stealing MULTIPLE MEGAHERTZ worth of processing power out of my cpu!
I WANT THEM BACK PLEASE HAND OPTIMIZE YOUR ASSEMBLY RIGHT NOW
>>
>>108984889

type hinting
Function
For loop and while loop
Spacebar button

what else is there to know LOL
>>
File: file.png (222.6 KB)
222.6 KB
this will be the fate of every remotely popular open source project
>>
>>108982676
void f(void) {
for (;;);
}

void f(void) {
f();
}

void f(void) {
exit(0);
}

void f(void) {
int *p = NULL;
*p = *p + 1;
}

Reply to Thread #108971267


Supported: JPG, PNG, GIF, WebP, WebM, MP4, MP3 (max 4MB)