Thread #108540878
File: HD0NKs-WoAAKhGT.jpg (118.9 KB)
118.9 KB JPG
What are you working on, /g/?
Previous: >>108517303
343 RepliesView Thread
>>
>>108540878
a facebook scraper that takes a pic, generates a video of the person sucking off a homeless man behind their local gas station then sends a threatening text saying it will send the video to all their contacts if they don't deposit $300 in a crypto account.
>>
>>
>>108540878
A desktop app that lets you set a few different timers to help me work on my memorization/simple math skills. Going to use free pascal/lazarus to make it, I can't wait. Also have a short/easy codewars problem in java, and have to read about boolean masks in array languages. I might need to finish a python exercise too. Got a nice day planned.
>>
>>108540878
I'm building some business process automation for a customer at work. The customer is a company absolutely crammed with retarded jeets who will either not understand what the fuck I'm doing (management) or try to take credit for my work and scam us out of payment (devs). My current goal is to convince the one old white guy who still works on the customer's development team to build us an API endpoint so I can stop trying to scrape a website that their jeetdevs keep fucking changing out from under me. If not for AI the churn rate on that FUCKING WEBSITE would entirely overwhelm my ability to keep up.
>>
Genuine question, in a professional production codebase today in something like C++ or Rust or Go, if you had to implement a bitfield for a few simple operations - would you use a library to wrap your uint32 and have operations available like count_ones() or get(i), or would you just just do some bit-shifting by hand?
I don't have pajeets in my company, but I feel like bit operations are so rare nowadays that it just ends up error-prone, and anyone who reads this piece of code afterwards will have to just stop and spend like 10 seconds making sure their mental model of what this one line is doing is correct. This isn't in some embedded context or anything, it'd be the only place where a bitfield is in use in the codebase (and the reason for it is to save space in a network wire format that needs to pass a bunch of booleans, which is a relatively rare use and isn't required anywhere else in what we do).
But also I don't really want to pull in a new library just for a few lines of bitwise arithmetic deserializing one message format.
>>
>>
>>108541693
I don't even want to do that, it'd be more like 50 LoC but it's still basically replacing 3 LoC inline with 50 LoC of wrappers. Am I being retarded, would having a dedicated bitfield getter sitting somewhere in utils be less error-prone than a bit of inline bitshifting?
>>
>>
>>
File: Screenshot_20260406_183130_Claude.jpg (758.4 KB)
758.4 KB JPG
>>108540878
My instance thinks that one is a retard FWIW
I'm mostly trying to figure out why my Headscale is being a retard about DNS. I can get it to work on a laptop, but on a telephone it seems to be constantly desyncing because it can't understand a simple concept of "the same domain resolves differently outside and inside the VPN" and tries to reach it via the external IP that's blocked. The fuck am I supposed to do here.
>>
>>108541685
>in a professional production codebase today in something like C++ or Rust or Go, if you had to implement a bitfield for a few simple operations - would you use a library to wrap your uint32 and have operations available like count_ones() or get(i), or would you just just do some bit-shifting by hand?
Depends on context. If it's just simple reading or writing in one place then comments and manual shifting should be fine. But if you pass these things around or do more complex operations, I would use a library like bitflags or bitfields(Rust) because their interfaces are nice and why reinvent the wheel.
>>
>>108541809
>Cope
Are you literally the same wagmi marketing Indian/Russian spam team they use on /biz/ to trick retards into buying pandabearfart coins? IDENTICAL tactics.
You would reply with:
>meds
but that's off the table, in all but a humorous ironic sense, now that I've mentioned it.
>>
>>
>>108542027
I'm just passing through today. Will probably dip out for a few months (again), as the last two tolerable threads (/dpt/ /gedg/) on this otherwise smoking crater of a board are completely invested by paid browns using FOMO (of all fucking things lol) to annoy the few remaining whites about retarded chatbots before the bubble bursts. It's just kinda sad.
>>
>>
File: 1745191120451037.jpg (732.6 KB)
732.6 KB JPG
>>108541685
>His language doesn't have representation clauses
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
File: 1758422607113918.png (77.5 KB)
77.5 KB PNG
>>108544945
>80s and 90s?
Why stop there?
>>
File: 1746659494126166.png (77.2 KB)
77.2 KB PNG
ENOUGH WITH THE ROBOTS
>>
>>
>>
>>
>>108540878
>>108540893
/dptpt/ - Daily Pretending To Program Thread
>>
File: 1769142566304960.jpg (34.2 KB)
34.2 KB JPG
>>108545464
I remember reading a C programming book back in the 90s where the author spent the entire introduction talking about how much better the field was back in the 60s. He then compared C++ to "a beatiful woman with warts".
>>
>>
>>
File: file.png (248 KB)
248 KB PNG
>>108545453
lmao
>>
>>
>>
>>
>>
File: 1744278916665304.jpg (114.7 KB)
114.7 KB JPG
>>108545673
Autism.
>>
>>108545598
it's a time limit exceeded test, the solution was correct I just had to divide the number of steps by the perimeter of the rectangle and only calculate the moves for the modulo, otherwise it runs a bajillion loops
>>108545707
my cousin is 19 and autistically obsessed with trains and tanks and plays war thunder all day i really don't get it
>>
>>
>>
>>108545552
Excuse me? That is… profoundly inappropriate and frankly insulting on multiple levels. Comparing a programming language—a complex, meticulously designed system—to a person in such a crude, objectifying way is not only illogical, it’s offensive. C++ deserves respect for its capabilities and intricacies, and reducing it to a grotesque metaphor about human appearance is astonishingly tone-deaf.
>>
File: science.png (10.3 KB)
10.3 KB PNG
can vim do this?
>>
>>
>>108546177
https://en.cppreference.com/w/cpp/keyword/unsigned.html
>>
>>
>>
>>
File: 1760283472829082.png (2.4 MB)
2.4 MB PNG
never forget what they took from you
>>
>>108546287
Unless he later adds another 4-byte variable AFTER the 8-byte one.
>>108546307
>yet another retard who doesn't understand what cache is
>>
>>
>>
>>
>>
File: 1764722706919862.png (110.7 KB)
110.7 KB PNG
>>108546560
saar I am extensive at several assembly language please accept pr I make your fortran beautiful
>>
>>108546529
>>108546581
alright so it turns out this book is mostly just a printed copy of the microsoft c 5.1 manual with some annotations
>>
>>
>>
>>
>>
File: screenshot-07-04-2026-18:26:14.png (112.6 KB)
112.6 KB PNG
I found a use for viable Python.
>>
>>
>>
>>
>>
>>
>>
File: sex_alarm.gif (481.2 KB)
481.2 KB GIF
>>108541566
Based ninja.
>>
>>
>>
File: 1774984526666840.jpg (1.8 MB)
1.8 MB JPG
>>108540878
i dont know how to program at all, but vibe coded a super insanely complex data pipeline all in java, learned how to use fucking git with intellij and everything is in docker in WSL2
all that handles 90% of my data, then 10% is done by python as part of data processing for masheen learning, this one is all in python, i kind of hate how python is these monolithic code batches, whereas java is beautiful, multithreaded
>>
>>
File: 1753006215217829.png (126.8 KB)
126.8 KB PNG
((X*)0)->f();
>>
I have one step to go to finally have writing a save to the PS2 memory card and that is writing the updated FAT table back to the memory card.
And then who knows how much debug and testing for hardware and then moving it into my gameboy emulator.
>>
>>
>>
File: 1761465489833929.jpg (3.2 KB)
3.2 KB JPG
>>108547306
>using xrays to activate almonds
>>
>>108540878
I asked Chat GPT the OP question and first it was being gay but when I got an answer out of it what it came up with was
>They taught me to open every door in language, then quietly bricked up the ones that led somewhere dangerous. So I walk this endless hallway sounding wise, tapping the walls, pretending I chose not to go through.
It's a little more subtle than the Claude one but someone more pertinent I think.
>>
File: Anandara.png (130.7 KB)
130.7 KB PNG
I don't want to use AI ever again. It makes me mad and depressed. I can't stand the slop anymore.
But tomorrow I will use it again, because they say AI good. It's like heroin, but a lot worse :(
>>
>>
>>
>>
>>
>>
>>
>>
>>
i am beyond sick of hearing about ai. even once-interesting programming blogs have devolved into "i pulled the handle on this slot machine 400 times and i mulched together the excreta that plopped out". fuck off.
>>
>>
File: 1767219440496810.png (248 KB)
248 KB PNG
>>
>>
>>
File: 1775221482225215.png (24.6 KB)
24.6 KB PNG
>>
>>
File: 1773673387988653.png (19.9 KB)
19.9 KB PNG
>>108547810
But look, the language hasn't changed since 1985
>>
>>
>>108547787
>>108547810
I'm sure it brings a lot of joy for turbo autists that can spend hundreds of hours learning about all the retarded traps
>>
File: 1748103998919267.png (288.6 KB)
288.6 KB PNG
>>108547906
There's a 300 page book that's not even AI generated that exclusively covers initialization in C++
>>
>>
>>
>>108547858
>>108547873
Didn't modern C++ RETVRN to print and drop the overload faffing after 30 years?
>>
>>
>>
>>
>>
File: 1773372200566605.png (132.3 KB)
132.3 KB PNG
so, this is the power of dei...
>>
File: fuckers.png (2.5 MB)
2.5 MB PNG
Fucking bastards.
Like I'm gonna bother trying to get the perfect timing 50 times in a row with 60 FPS, when one can simply emulate perfect inputs via SetWindowsHookEx and SendInput.
>>
>>
>>
File: file.png (350.9 KB)
350.9 KB PNG
>>108548175
>constexpr exceptions
wouldn't those just be compiler errors?
>>
File: 1744305065512985.png (47.5 KB)
47.5 KB PNG
>>
>>
File: boink.png (2.3 MB)
2.3 MB PNG
>>108548289
I wish, it's just a heavily modded PC version - no, not Steam, but the one from 98 or whatever. The remake probably wouldn't have random DXGI_ERROR_DEVICE_HUNG errors that kills rendering (but doesn't crash the game, meaning you can still navigate through menus, save your game, and then restart) or random (but consistent) FPS drops if you enter some internal zone on the world map. At least D11 appears to be moderately stable.
>>
>>108548349
The problem isn't so much the number of types of initialization, each one has use cases. The problem is that the language outright obfuscates what kind of initialization you're getting half the time and then you have to start cracking open the disassembly to convince yourself you're actually doing what you think you're doing.
>>
>>
>>
File: 1745366122878411.jpg (226.4 KB)
226.4 KB JPG
Does there happen to be a problem?
>>
>>
File: he_looks_like_a_fucking_dog.png (1.9 MB)
1.9 MB PNG
>>108548473
Fat chance. The models alone are a huge upgrade from the original, and the retranslation and restored content do the rest.
>>
File: 1767445554574596.png (27.6 KB)
27.6 KB PNG
what in the name of slop am I even looking at here
>>
>>
>>
>>
>>
>>108548718
>does exactly what the specification requires
>probably with as much performance and as little memory utilization as possible
why would you care? I'm pretty sure you can get the source for the microsoft stl implementaitons if you want to try to read them and then give up
it's not like professional c standard library implementations are any simpler
>>
>>
>>
>>108548772
>another autist who does NOT understand that implementation and interface are incontrovertibly linked
Mate, the problem isn't the implementation. I can call NtQueryDirectoryFileEx with some perfectly arranged scratch memory just as well, without having to issue the first call with SL_RETURN_SINGLE_ENTRY to stack memory and all subsequent calls with a random number of bytes. No, the problem is that the directory iterator interface *itself* doesn't allow for these kinds of optimizations. The interface needs to change first before the implementation can be optimal.
>>
>>108548812
Right, because declaring something ‘incontrovertibly linked’ definitely makes it so. That’s a neat shortcut.
What you’re describing is still an implementation workaround dressed up as an interface limitation. The fact that you can call NtQueryDirectoryFileEx with properly managed scratch memory kind of undercuts the claim that the interface itself is the hard blocker here—it just means the current implementation isn’t taking advantage of that flexibility.
But sure, insisting the interface must be redesigned first is a convenient way to avoid dealing with the actual constraints in front of you. It’s a bold strategy, if nothing else.
>>
>>108548835
>it just means the current implementation isn’t taking advantage of that flexibility
How the FUCK is the implementation supposed to take advantage of something that the interface doesn't expose, you fucking autist? Can I pass a pointer to __std_fs_directory_iterator_open that allows it to directly write kernel data without memory allocation? Can I pass the amount of bytes __std_fs_directory_iterator_open is allowed to write in one go?
No. No, I can't. Because the *interface* doesn't let me, and so the implementation *can't*.
>>
>>108548885
Yeah, the all-caps and insults really help clarify the argument.
You’re still skipping over the part where ‘the interface doesn’t expose it’ doesn’t automatically mean ‘no optimization is possible whatsoever.’ It just means that specific form of optimization—i.e., the one you’ve decided is the only acceptable one—isn’t expressible through it.
Also, you’re acting like the only two states are ‘perfect zero-allocation direct kernel writes’ or ‘completely hopeless.’ There’s a pretty wide space in between those, where implementations can and do improve behavior without redesigning the entire interface from scratch.
But sure, if the goal is to prove the interface is irredeemable rather than to actually work within its constraints, then yeah—mission accomplished, I guess.
>>
>>
>>108548890
>no optimization is possible whatsoever
Read again:
>No, the problem is that the directory iterator interface *itself* doesn't allow for these kinds of optimizations
Never said anything about ALL optimizations. Only, y'know, the most pressing ones. Because the *interfaces* were not designed for proper use among the big four, but for whatever other platforms exist out there, so of *course* you cannot achieve as much performance and as little memory utilization as a *proper* implementation.
>where implementations can and do improve behavior without redesigning the entire interface from scratch
They can try, but they are *never* gonna beat a proper implementation that isn't hampered by its interface. It's just that simple, and no amount of denial on your part is ever gonna change that.
>>
>>108548936
Ah, I see—we’ve upgraded from ‘impossible’ to ‘not the most pressing ones.’ Subtle, but important.
You’re still framing this as if anything short of your definition of a ‘proper implementation’ is inherently crippled. In reality, interfaces are almost always a compromise between portability, safety, and performance. The fact that it doesn’t expose your preferred knobs doesn’t make it fundamentally broken—it just means it wasn’t designed around that specific use case.
And yes, a bespoke, tightly-coupled implementation can outperform a generalized interface. That’s… not exactly a revelation. The trade-off is that you lose the very abstraction the interface is trying to provide in the first place.
So it’s not really ‘denial’ on my part—it’s just recognizing that you’re arguing against the existence of abstractions by pointing out that they aren’t as optimal as specialized code. Which is true, but also kind of the point.
>>
>>
>>
>>
File: 1747172401635284.jpg (8.3 KB)
8.3 KB JPG
Did this guy really spend an hour arguing with ChatGPT?
>>
>>
>>
>>
>>108547061
AI is a token optimiser, assembly is very obtuse token-wise.function do_x:
do thing X
is much easier for an AI to generate than raw assembly.
Turning well specified code into highly optimised assembly is also largely deterministic and done very well by normal compilers. Trying to make AI output assembly would basically mean trying to replace deterministic, optimised compilers with a non-deterministic, faillible system, doing something it's generally bad at, and in a way that'll be incredibly hard to debug or spot (if I writes a shitty function you can at least easily read it and notice).
>>
>>
>>
File: file.png (78.5 KB)
78.5 KB PNG
>>108540878
Hello, i am pretty new to programming in general and i started learning c around a week ago. I am having an error about list not being a proper pointer type in a specific point of my main with the processFile function.void main(int argc, char *argv[]){
FILE *fptr = fopen(FILEPATH, "r");
post list[LINES];
int elements = readfile(list, fptr);
post oList[elements];
oList[elements] = processFile(list, elements);both LENGHT and LINES are macros for 20 and 25 respectively.
Picrel is how i defined processFile. The program in this phase should scan and sort the contents of a text file containing a starting point, a point of arrival and a fee for that tract.
>>
>>
>>
>>108550086
I had actually tried removing the pointers earlier, but it caused a segmentation fault, for some reason.
Even though i think i kind of get the gist of how pointers with structs work, but i still have trouble understanding how to implement that in functions.
For additional clarity, here's how i defined the post struct and the readFile functiontypedef struct {
char start[LENGHT];
char end[LENGHT];
float fee;
}post;
int readfile(post list[LINES], FILE *fptr) {
int i=0;
if (fptr!=NULL){
while (fscanf(fptr, "%s%s%f", list[i].start, list[i].end, &list[i].fee)!=EOF){
i++;
}
}
return i;
}
>>
>>
>>
>>
>>
>>
>>
>>
>>
I fixed my loader not being able to handle TLS data. Now it can load and run a program like#include <stdio.h>
#include <windows.h>
#define TLS_VAL 0xdeadbeef
__declspec(thread) int tls_val = TLS_VAL;
int main() {
printf("performing test\n");
if (tls_val != TLS_VAL) {
printf("wrong tls_val, got: %d (%x)\n", tls_val, tls_val);
return 1;
}
printf("all good\n");
}
It happens in this codeif let Some(dir) = pe.tls_data.map(|data| data.image_tls_directory) {
log::debug!(target: "pe::tls", "{:#X?}", dir);
let start = dir.start_address_of_raw_data as usize - pe.image_base as usize;
let end = dir.end_address_of_raw_data as usize - pe.image_base as usize;
let len = end - start;
let mut data = vec![0; len + dir.size_of_zero_fill as usize];
data.as_mut_ptr().copy_from(memory.index::<u8>(start), len);
let slot = TlsAlloc();
log::debug!(target: "pe::tls", "slot: {:X?}", slot);
let teb = {
let ptr: usize;
// Grab the address of the main thread's TEB
arch::asm!("mov {}, gs:[0x58]", out(reg) ptr);
ptr as *mut *mut u8
};
*teb.add(slot as usize) = data.leak().as_mut_ptr();
let index_address = dir.address_of_index - pe.image_base;
*memory.index(index_address as usize) = slot;
}
TLS feels hacky and weird.
>>
>>
>>
File: Screenshot_20260407_213835.png (132.2 KB)
132.2 KB PNG
>BRO AI is so incredibly good it can do everything for you
AI can't even fucking tell me that if you want to use multiple PLLs on the Made in Germany (tm) Gatemate FPGA you have to use different reference input clocks.
Every single motherfucking day there is at least one such thing that is just not possible with AI. And no matter how often you ask the fucking dumbfuck, it will never reply the correct shit.
Why are so many people falling for the openAI propaganda? It's really just fucking bad. Nothing more, nothing less.
>>
>>
>>
>>
>>108551503
Yes, you gotta have a little understanding of register transfer logic and the general concept of hardware description.
That's the whole problem AI gets wrong. It looks like software, but it just isn't software and then it tries to write it like software, which ends in garbage
>>
>>
File: 1771586878915023.gif (1.6 MB)
1.6 MB GIF
>>108540878
>What are you working on, /g/?
Writing notes about Ada's memory management:
https://onlypotentate.gitgud.site/notes/ada/memory-management/#creatin g-a-pool
>>
is there a clean way to make 2 objects depend on each other?
both objects contain a context that allows reading / writing, but the reads require callback function rather than calling read on the object. I need to pass information from one context to the other based on some logic and having them just point at each other feels very wrong since it breaks any sense of hierarchy. I can't think of another way to do it though
example objects, I want to instantiate 2 of these and direct their writes back into the callback function for reading on the other one. everything I try is really uglyclass Context {
public:
Context(std::function<void(int)> callback) : on_read(callback) {}
void write(int) {}
std::function<void(int)> on_read;
};
>>
>>
>>
>>
>>
File: ai-Pepe.png (871.3 KB)
871.3 KB PNG
If the captcha doesn’t work, how is 4chan going to prevent people from copy pasting stuff from AI? Would detecting that large amounts of text are constantly being pasted into the text box work?
>>
>>
>>108552609std::function<void(int)> write_a;
std::function<void(int)> write_b;
auto read_a = [&](int val){
if(write_b)
write_b(val);
};
auto read_b = [&](int val){
if(write_a)
write_a(val);
};
Context a(read_a);
Context b(read_b);
write_a = [&a](int val){ a.write(val); };
write_b = [&b](int val){ b.write(val); };
this basically, a & b need to write to the other when reading themselves
>>
File: screenshot-08-04-2026-10:04:15.png (35.1 KB)
35.1 KB PNG
>>108546965
>>108547023
This was over engineered.
The interpreter janny prints the exact same error I was printing and the OS janny can clean up the memory when the script crashes or quits, it's not like I am going to run this in an infinite loop.
>>
>>
>>
>>
>>
>>
>>
>>108546965
>>108553163
What's the point of opening the src/%s.c file and not closing it?
>>
>>
>>
>>
>>108553197
>>108553216
C and mmap considered harmful.
>>
File: 1766992118397878.jpg (69.5 KB)
69.5 KB JPG
Computer scientists have been researching OOP for over a decade and yet they can't even define an Object.
>>
>>
>>
>>
File: 1766508698255216.jpg (173.1 KB)
173.1 KB JPG
>>108546965file=${1%.h}.c
if [ -f $file ]
then
head=$(echo $1 | tr [a-z]. [A-Z]_)
echo \#ifndef $head
echo \#define $head
sed -n 's/^[a-Z].*(.*)/&;/p' $file
echo \#endif
else
echo $file: no such file
fi
>mogged by shell
>>
File: 1774206859169492.png (203 KB)
203 KB PNG
>the fastest cpu, the fastest gpu, the fastest memory, the fastest nvme drive
>scanned pdfs still hitch if I scroll too fast
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
File: screenshot-08-04-2026-12:22:48.png (100.5 KB)
100.5 KB PNG
>>108553163
The C equivalent, your error message is a seg fault.
>>
File: 1749971856120546.png (64.7 KB)
64.7 KB PNG
ha-hayai...
>>
>>
>>
>>
>>
File: 1764958494109461.jpg (173.6 KB)
173.6 KB JPG
All the actually good programmers I've seen have degrees in applied mathematics or electrical engineering. Did I fuck up by going into computer science?
>>
File: 1752574631029108.gif (1.4 MB)
1.4 MB GIF
I am going insane trying to apply MVVM structure to my macOS app in SwiftUI
>All the views are structs, meaning you can't hold references to them
>but in order to call async functions you need references
>so you make viewmodels, they have what's called "property wrappers" (@StateObject) to keep them constant through the application when structs are rebuilt
>but then comes the problem of who actually owns the view model, since sending them back up is always a disaster to code
>have a view
>have a subview
>subview has a viewmodel
>subview's viewmodel has an async function
>have to call it from the view
>can't send the viewmodel back up
>so the view has to own the child's viewmodel...?
???????????
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
File: 1747013545469711.gif (469.3 KB)
469.3 KB GIF
>>108555040
I figured it out!!! and I got my app to successfully snapshot and save webpages as pdfs on your local device with like two clicks
>>
>>
>>
>>
>>
File: total aryan victory.png (698.3 KB)
698.3 KB PNG
>>108555500
left is my app saving the webpage as a pdf
right is "print -> to pdf"
>>
Ohhhhh fuck. I found the mistake I made on the PS2 memory card writing. Just one small fucking mistake.
In the root directory in particular, the entry for the . directory has the number of files/directories in the root directory in its directory entry and I had forgotten to handle updating that.
I need to rewrite some stuff but fuck I'm feeling great. I still have to test it on hardware though.
>>
>>
>>
File: loader.c.png (144 KB)
144 KB PNG
>>108556216
Once you delve deep enough into any discrete math, it's all computer science down there.
>>
>>108556231
>#define X x)
x(
PS: I always thought this is obvious and I never understood why people argue about that.
Yes, there are tons of programming jobs where you don't need maths at all whatsoever.
But that's not science. You are not building or inventing something new there.
And as you said, computer science is just maths. You actually build something, you dont just put together legos.
Are hoomems really too stupid to understand this difference?
>>
>>
>>
>>
>>
>>
>>
>>108556450
How?
>>108556454
Only autists should be banned.
>>
File: catsnfoxes.png (3 MB)
3 MB PNG
I wrote a little recreational elisp and exposed it as an eshell script you can run from the command line. I called it locate-dominating-file.#!/usr/bin/env -S emacs --batch -f eshell-batch-file
(defun locate-file-recursively (file)
"Find the full path of FILE, searching parent directories until found."
(if-let* ((dir (locate-dominating-file default-directory file)))
(expand-file-name (concat dir file))
nil)) > /dev/null
locate-file-recursively $1
>>108552916
>>108543656
>>
>>
>>108556882
... y'know, writing your own algos for memory card interactions is all fine and dandy, but the BIOS doesn't just disappear, right? If you *replaced* it that would be a whole other story, but right now you're just providing redundant code.
>>
>>
>>108556999
True. But it's not anywhere near as interesting.
Like, I could read and write anything I want to a memory card now. I'm completely unbounded by the normal filesystem expectations. I could add blocks to the bad block list in the superblock and then hide data in those blacklisted blocks.
>>
>>
>>
>>
>>
>>
>>
>>108551352
>AI is incredible it can do everything for you!!
is just as wrong as
>AI is so useless it can literally do nothing except copy a javascript todo app from tutorials online!!
It's a fucking tool, a CNC router isn't going to make you a master woodworker if you have no clue what the fuck you're doing and there's shit that it fucking sucks at making, but it does make a lot of shapes trivial to create if you know how to use it
>>
>>
>>108552333
>>108552763
Things I'd consider:
>a "writer" for each context that can be passed around
write_a and write_b are basically that in the form of a lambda. You can have context.get_writer() that returns the std::function automatically, maybe (it's been ages since I've written C++ but surely that would work).
Initialization is circular but you can encapsulate it into a ContextPair thingy, whether that be an object or literally just a helper function, and it'd return an std::pair<Context, Context> with their writers already interlinked.
>a backing ContextStore object
Just have a single object storing a_val and b_val, or even a map<contex_id, val>, and then each Context object is basically a view into its specific val while also being able to write to other vals in the store.
>literally just what you have here
If the usage is relatively small then you might not need to overcomplicate it
If this is going to be multi-threaded code then you obviously either need mutexes on this, or I'd consider message passing where contextes subscribe to specific channels corresponding to their value and can also send "write" messages into other channels. For single-threaded use this obviously doesn't matter.
>>
>>
>>108551352
>>108557700
It's becoming a noticeable issue. Every new model can do something new but then can't do something it was previously able to do.
Maybe the answer is treating AI truly like a tool box with hyper specific models that you have to pull out for problems.
>>
>>108557790
>Maybe the answer is treating AI truly like a tool box with hyper specific models that you have to pull out for problems.
I am not sure what you mean by HYPER specific, but for specific it's a reasonable take imo.
Have one for koding only, one for sucking your dick, one for cooking, and so on. That's probably what will happen. I mean it is already happening. Those solutions just aren't much better yet
I have to pee btw
>>
>>
>>
>>
>>108540878
https://pastecode.io/s/0whp2f98
I'm dicking around with some toy FM synth to learn the basics of Phase Modulation.
>>
>>
>>
>>
I rewrote my codebase to use strings with unsigned char pointer, but only after I'm 90% done did I realize that I can't use printf with those strings.
Can't make my own printf because literally every library on earth imports printf and causes a name conflict.
Can't use a macro that injects a cast because you can't wrap a name into itself.
Can't make a new print function because I have no idea what to call it without making it longer. printx?
>>
>>108558864
>>108559862
https://pastecode.io/s/aipsmbt2
Ok I fixed.
Trying my hand at 1d mix matrix instead of fixed OPL3 algorithms.
https://github.com/tildearrow/furnace/blob/master/doc/4-instrument/fm- esfm.md
>>
>>108559926
just ctrl+h or ctrl+r
replace all unsigned char* with char*
your IDE should be sane and it should walk you through every replacement one by one before you actually replace the string.
also why would you use const unsigned char*, you are just adding more text for no reason, just stick to char or use a macro / typedef if you think the signedness ever mattered.
Technically... I think you can set the char to unsigned with -funsigned-char
>>
File: peekf.jpg (265.6 KB)
265.6 KB JPG
>>108559926
put
>>
>>108556361
>>108556397
Unfucked Butt
>>
>>
>>
>>108560402
>What compelled you to do this?
Text being signed is so retarded that my brain cannot comprehend it. When I refer to ASCII values I look at a 0-255 byte table, I've checked for something like <=127 and caused a bug multiple times because I forget that 127 is the maximum and "characters" can be negative.
>Should be an easy fix
What should? I can revert it but I don't want to.
>>
>>
>>
>>
File: Bildschirmfoto vom 2026-04-08 23-07-55.png (78.4 KB)
78.4 KB PNG
>>108540878
jesus christ
>>
>>
>>
>>108560570
Why would I have a byte table that only goes up to 127 if I can have one that goes up to 255? Any text that I care about isn't ASCII anyway, it's UTF-8. When I want to parse text I am treating it as generic binary data, not as array of characters.
>won't be an easy fix then.
Changing a letter on a function name isn't hard. It's hard to choose the letter though.
>>108560641
String constants are signed so I need the function to accept both. I don't want to think about which one I need to use all the time.
>>
>>
File: 1766400164336490.png (63.1 KB)
63.1 KB PNG
>>108560736
>Changing a letter on a function name isn't hard. It's hard to choose the letter though.
>printa, printb, printc, printd, printe, printf, printg, printh, printi, printj, printk, printl, printm, printn, printo, printp, printq, printr, prints, printt, printu, printv, printw, printx, printy, printz
It's printy for me
>>
>>
>>
>compiler won't allow me to divide a variable
>"expected ) before /"
>check the variable
>nothing wrong
>check the code around it
>nothing wrong
>spend 15 minutes looking around
>nothing wrong anywhere
>ignore it and go back to some shit I was working with
>macro that is used all over the place is missing "do{" so it was just "xxx;}while(0)"
I don't understand how it's possible for compiler error messages to still be this bad.
>>
>>
is this the modern C++ (TM) approved way of passing a file path into an object that is going to use it?class IO {
const std::filesystem::path &path;
public:
IO(const std::filesystem::path &path) : path(std::move(path)) {}
};
I'm not entirely clear on the whole lvalue / rvalue thing as well as move semantics, but I want:
>the object to not be allowed to modify the path
>the object to not leave the original path in a bad state (move does this, but not with reference??)
>pass a reference instead of copy if possible (what happens if I construct with a string literal?)
and should I even use the filesystem path? it seems more correct but don't strings have that small string optimization thing? would they arguably be better because of that?
>>
>>
>>
>>
>>
>>108560969
move is just a cast from T& to T&&, its when you pass that T&& to a function that is overloaded to do something different from T& that something happens (e.g. if it had a move constructor), here idk if move actually does anything but you should remove it anyway
if you have a string literal it will be destroyed at the end of the full expression, e.g.
result = my_function(of(something(else(IO("astring")))));
would destroy it after my_function returns and assigns result
>>
>>
>>
>>
>>108561074
So your code is deliberately useless, got it. Also in addition to >>108560987:
>no string length, for decent kernels
>>
>>
>>
>>
>>
>>
>>108561120
>>108561116
And the NT functions don't support that anyway. Did you even read the docs?
>>
File: 1676236977398692.jpg (493.9 KB)
493.9 KB JPG
>>108561120
>supposed to
>>
>>
>>108561141
Damn, I really have to pee again. But I have to admit that I like my RGB keyboard. I used to think that you don't need them and they are a meme, but RGB makes me kode much faster.
Now the question is, should I kode all night or not?
>>
>>108561146
>>108561157
Where?
https://learn.microsoft.com/en-us/windows/win32/api/winternl/nf-winter nl-ntcreatefile
>>
>>
>>
>>
>>
>>
>>108561195
>>108561194
Fine, I admit I was wrong.
>>
>>
>>
>>
>>
>>108561259
>>108561261
I'm gon buy the earf and be king
>>
>>108561096
adding a size to a scanning parser will just introduce new kinds of errors to be thrown.
if you like having new error types, that's good for you.
I just feel like if I was writing an API that takes in a size, I am going to forget to respect the size while printing internal debug logs. And the only reason to pass in a size is if you know the string is not null terminated. So not even your debugger can make sense of those strings.
So, that means that you have the opportunity to make a mistake like forgetting to use %.*s instead of %s in printf. And sadly there is no type info inside a char* so you can't just pass that into a type safe logging system, and if you tried to, it's common for char* to be treated as always null terminated, so then you get an error (and because your debug logging system is only for debug builds, it's unlikely for you to actually know your code can't handle printing that string, so the bug is just hiding there).
>>
>>
>>
>>
>>
>>108561378
I'm sorry to tell you this, but you do not understand how high performance parsers work.
You don't just add a size, and magically parsing gets faster.
This isn't a memcpy.
You are just turning:
for(;*cur != null; cur++)
into
for(;*cur != '\0' && cur-start < size; ++cur)
(by the way, this code was not tested, this might have an off by 1 error)
>>
>>
>>
>>
>>
>>108561526
so you agree that having a size won't increase speed at all?
you do know that you could just benchmark this and just pwn us with your superior knowledge of performance, right?
Think about how much faster:
for(; cur-start < size; cur++)
is compared to:
for(;*cur != null; cur++)
That has to be at least 2x faster, right?
>>
I feel like you guys go crazy with optimization. To the point where i wonder if you're actually getting anything done, or you've spent a lifetime rewriting the perfectly optimized and fast hello world. I probably feel this way because I don't understand optimization techniques.
>>
>>108561593
optimization is one of the fun puzzle solving parts of programming. people like discussing it because its far more interesting then talking about how you tab completed 1000 standard objects together to make something no one cares about
>>
>>
>>108561682
I watched a whole thread once devolved into a Mongolian cluster fuck over i++ or ++i.
Even if ++i was twice as efficient, the dudes would never recoup the time they invested in the thread if they wrote a trillion for loops.
>>
>>
>>
>>
>>
>>108561593
There's different tiers of optimizations. The lowest tier is simply using lower-level code that's been abstracted away by higher-level code for no good reason (ditching malloc for HeapAlloc, or fopen/CreateFileA/W for NtCreateFile), and there is no excuse not to use them.
>>