/dpt/ - Daily Programming Thread
What are you working on, /g/?
Previous thread:
>>105724992
Anonymous
7/1/2025, 11:53:03 AM
No.105764280
[Report]
>>105764157
I'll agree with your bait because I'm too lazy to properly learn the other two.
Anonymous
7/1/2025, 11:57:40 AM
No.105764310
[Report]
>>105765168
>>105764139
you're moving goalposts. edit history and change tracking is not the same functionality as version control (which is also well integrated into my IDE, btw)
Anonymous
7/1/2025, 1:57:50 PM
No.105765168
[Report]
>>105765446
>>105764310
>I'm too low IQ to use git directly.
Okay, I'll bite on this bait and WILL move the goalpost: you are too retarded to have any discussion and therefore I win by default.
>>105764133 (OP)
It's nothing programming related this time but I'm finishing my book about topology and manifolds. I've been writing it since 2023 and It's finally getting ready.
I write it using LaTeX + vscode + git. Diagrams are made using mathcha.io
Anonymous
7/1/2025, 2:13:32 PM
No.105765297
[Report]
>>105765219
Congrats, your post has made me sleepy.
Anonymous
7/1/2025, 2:29:25 PM
No.105765413
[Report]
>>105768647
>>105765219
I've been transcribing all my loose notes into my new journal during the heat
Anonymous
7/1/2025, 2:33:23 PM
No.105765446
[Report]
>>105765168
>no argument
>ad hominem
concession accepted
no reply required
I'm writing a trading agent and people and slopbots talk about "State pattern". My finite state machine works, but it is based on trasition objects which have to and from states, condition to transit and action to take when transitioning.
Each agent has that list created when it is instantiated.
Apparently it violates the "open closed" principle, and "separation of concerns", but it's pretty much a 1:1 mapping of what a FSM is.
I am getting filtered by this Design pattern stuff.
Anonymous
7/1/2025, 2:45:38 PM
No.105765552
[Report]
Anonymous
7/1/2025, 2:46:54 PM
No.105765562
[Report]
>>105765537
I think you should detransition before it's too late.
Anonymous
7/1/2025, 2:47:28 PM
No.105765565
[Report]
>>105765589
>>105765537
>I'm writing a trading agent
Yeah, I figured that's what you meant when you wanted to make sure your program doesn't crash.
Anonymous
7/1/2025, 2:50:21 PM
No.105765589
[Report]
>>105765608
>>105765565
Currently I only do back-testing with it. Its not connected to anything. Do you mean "state pattern" has a tendency to crash?
Anonymous
7/1/2025, 2:52:33 PM
No.105765608
[Report]
>>105765616
>>105765589
Aren't you the guy from a couple threads ago who wanted to know in which language he should write a program that wasn't allowed to crash, lest you lost a lot of money?
Anonymous
7/1/2025, 2:53:46 PM
No.105765616
[Report]
>>105765737
>>105765608
Not really. I am writing it in common lisp, R and python. Most of the logic is in CL.
>>105765537
>>105765616
(letrec ((s0 (lambda (t)
(case t
('end 'accept)
(0 s0)
(1 s1))))
(s1 (lambda (t)
(case t
('end 'reject)
(0 s2)
(1 s0))))
(s2 (lambda (t)
(case t
('end 'reject)
(0 s1)
(1 s2)))))
...)
Anonymous
7/1/2025, 3:19:51 PM
No.105765793
[Report]
>>105765834
>>105765737
yeah, literally this but more complex. Apparently this is not "clean"?
>>105765793
If letrec contains no side effects and s0 is returned as a start state I can't imagine how it could be better encapsulated
>>105765834
>>105765737
I'm referring to design patterns, some people have commented my code is not "clean".
I don't work professionally, so I don't know what that means or why I need to use "patterns".
I've removed the error handlers, and a lot of other things that make it work the way I want:
(defclass event ()
((message :accessor message :initform nil :initarg :message)
(timestamp :accessor timestamp :initform nil :initarg :timestamp)))
;;; Base agent class, must be subclassed
(defclass fsm ()
((state-history :initform nil
:initarg :state-history
:accessor state-history)
(transitions :initform nil
:initarg :transitions
:accessor transitions)
(current-state :initform nil
:initarg :current-state
:accessor current-state)))
(defclass transition ()
((from-state :accessor from-state :initform nil :initarg :from-state)
(to-state :accessor to-state :initform nil :initarg :to-state)
(action :accessor action :initform (lambda () nil) :initarg :action)
(allowed? :accessor allowed? :initform (lambda () nil) :initarg :allowed?)))
(defmethod update ((fsm fsm))
(with-slots (current-state state-history transitions) fsm
(let* ((transition
(loop for tr in transitions
when (and (equal (from-state tr) current-state)
(funcall (allowed? tr)))
return tr)))
(if transition
(progn
(with-slots (action to-state) transition
(funcall action)
(push to-state (state-history fsm))
(setf (current-state fsm) to-state)))
(error 'no-valid-transition)))))
(defmethod consume ((fsm fsm) (event event))
(when (observe? fsm event)
(sense fsm event)
(update fsm)))
Anonymous
7/1/2025, 3:38:27 PM
No.105765899
[Report]
>>105767358
>>105765894
>>105765834
>don't use objects or OO
My life is 100% easier with CLOS than juggling lists around for the things I'm doing.
Anonymous
7/1/2025, 4:15:52 PM
No.105766149
[Report]
>>105766170
>>105765894
>some people have commented my code is not "clean".
ask them to point out what specifically is not clean
>why I need to use "patterns".
patterns are tried solutions to common problems, if the problem you're having fits exactly to what the pattern fixes
if someone tells you to shoehorn a design pattern when it doesn't make sense for the case, call him a fag and stop listening
not a lispfag so I read your code after copilot translated it to java (good morning sirs) and I don't see anything egregious about the solution
only thing you could possibly change (evaluate yourself if it's worth it) is to add the list of valid transitions to each state object
so you would have:
>state contains its name and a list of valid transitions from itself
>transition contains the target state and transition action
>fsm gets transitions from its current state value rather than a separate parameter, and executes the action for each transition
that way you don't need the extra condition to check if a transition applies to the current state - if the state has it, it is applicable
Anonymous
7/1/2025, 4:19:54 PM
No.105766170
[Report]
>>105766149
thank you sir
revived and significantly reworked my old 4chan client
added theme support and text formatting to quotes and links
changed all network requests to my newer async download pool implementation
Anonymous
7/1/2025, 5:41:55 PM
No.105766930
[Report]
>>105767033
>>105766723
Is it a clover/kuroba fork? Can I have it?
Anonymous
7/1/2025, 5:52:11 PM
No.105767033
[Report]
>>105766930
no, it's my own and very incomplete
>>105765899
>My life is 100% easier
you mean 100% slower because every token is an allocation
Anonymous
7/1/2025, 6:32:40 PM
No.105767492
[Report]
>>105767508
>>105767358
Good thing I don't care.
Anonymous
7/1/2025, 6:34:14 PM
No.105767508
[Report]
>>105764133 (OP)
Spoonfeed me an adequate python introduction for two digit IQ people, I've come to accept that i need to know at least one household programming language to automate stupid shit and juggle text. Don't really care for a format, but will appreciate if it comes with practical excercises/git repo with examples. Thanks in advance.
Anonymous
7/1/2025, 7:28:23 PM
No.105768063
[Report]
>>105768034
Just do Perl.
Anonymous
7/1/2025, 7:31:12 PM
No.105768080
[Report]
>>105768100
>>105768034
Learn awk if all you need is to juggle text.
>>105768080
i want to interface with databases too, also it seems like having access to gajillion of napkin written python scripts and libraries will come in handy.
Anonymous
7/1/2025, 7:34:49 PM
No.105768110
[Report]
>>105768100
>i want to interface with databases too
https://metacpan.org/pod/DBI
>>105768100
Usecase for databases?
>>105768121
Storing data.
Anonymous
7/1/2025, 7:45:54 PM
No.105768204
[Report]
>>105767358
what are you on about
Anonymous
7/1/2025, 7:47:13 PM
No.105768214
[Report]
>>105768263
>>105768121
this
>>105768128 and querying is nicer than parsing dzhigabouht single string jsons.
Anonymous
7/1/2025, 7:53:38 PM
No.105768263
[Report]
>>105768392
>>105768128
>>105768214
I have no use for data or "querying" it.
Anonymous
7/1/2025, 7:57:06 PM
No.105768288
[Report]
>>105768329
How do I properly architect internals of a library that implements the parsing and the logic for a network protocol (that runs on top of TCP+TLS)? I don't want to end up with some kind of spaghetti code where I have I/O, parsing and logic all mashed together in functions. Any architectural patterns that could help?
Anonymous
7/1/2025, 8:01:49 PM
No.105768329
[Report]
>>105768288
design it all to work online with interfaces and shit? like how theres SAX for xml
Anonymous
7/1/2025, 8:08:08 PM
No.105768392
[Report]
>>105768263
Not a (me) problem.
>>105764133 (OP)
I've been relearning C++ having taken a break from it for about 10 years, been reading bjarnes principles book about it, do people irl actually use C++ modules for projects? it gets shilled heavily as the next big thing in the book, but for anything other than large projects it seems like such a pain to set up compared to just using #include <thing>
>>105768546
>modules
not real
>>105768546
>falling for danish tricks again
Anonymous
7/1/2025, 8:29:40 PM
No.105768628
[Report]
>>105768583
this
show me a compiled module
you can't
Anonymous
7/1/2025, 8:31:15 PM
No.105768647
[Report]
>>105768791
>>105768605
>drawn chimera penis
>>105766723
>>105765413
>scantly clad cartoon girls
Fuck you "people". You should be banned from posting images.
Anonymous
7/1/2025, 8:33:44 PM
No.105768670
[Report]
>>105768823
>>105768583
>>105768605
so no, thanks lads I can continue to be old and stuck in my ways
>>105768647
Oh my fucking goodness, you fucking autistic crybaby.
I hope you meet the chainsaw that was the source of this addition.
Anonymous
7/1/2025, 8:47:16 PM
No.105768802
[Report]
>>105768546
They are good in theory, but they're still not widely supported, and they kill parallel builds.
Anonymous
7/1/2025, 8:48:49 PM
No.105768823
[Report]
>>105768670
>I can continue to be old and stuck in my ways
The true c/c++ way. If it works, it works.
Anonymous
7/1/2025, 8:50:01 PM
No.105768836
[Report]
>>105768791
For once you made a good, funny post, well done registryschizo.
Anonymous
7/1/2025, 9:05:36 PM
No.105769016
[Report]
>autist with no discernable skills or charisma has an opinion about humor
Anonymous
7/1/2025, 9:09:55 PM
No.105769066
[Report]
>>105769090
>>105764133 (OP)
Given golang's background, one would assume it is a breeze to install it on *nix, but no.
Even microsoft has apt repos for vs code, dotnet, and azure..
Golang? Extract this file to /usr/local/go, saar!
uninstall? remove /usr/local/go
multiple versions?
go install golang.org/dl/go1.10.7@latest
go.1.10.7 {args}
Anonymous
7/1/2025, 9:11:48 PM
No.105769090
[Report]
>>105769149
>>105769066
Looks like you couldn't follow the guide.
Anonymous
7/1/2025, 9:16:18 PM
No.105769149
[Report]
>>105769171
>>105769090
Why are you rood? Is asking for a unified means of package installation too much these days?
Is it a lost cause now? much like the rape my $HOME is enduring in these troubled times with all the dot folders?
Anonymous
7/1/2025, 9:18:28 PM
No.105769171
[Report]
>>105769149
Install Gentoo.
>>105764133 (OP)
C# isn't a programming language.
Anonymous
7/1/2025, 10:25:17 PM
No.105769868
[Report]
Anonymous
7/1/2025, 10:45:30 PM
No.105770056
[Report]
>>105772478
>>105764157
Rust is awesome stop hating
>>105768791
Bjarne is possibly the most chaddest programmer alive after John Carmack
Anonymous
7/1/2025, 10:56:37 PM
No.105770161
[Report]
>>105770101
Indeed, he has done so much for C programming language, much more than C++ even.
Anonymous
7/1/2025, 11:06:33 PM
No.105770262
[Report]
>>105770101
Not to mention Carmack is a C++ expert
Anonymous
7/1/2025, 11:58:30 PM
No.105770711
[Report]
>>105771015
>>105770101
getting your programming language stolen and fucked up by corpos, and being the general laughing stock of the CS / tech world for having the most fucked up language is one of the most cucked and anti-chad things.
bjarne coping with his
>two kinds of languages
meme, doesn't really change this
Anonymous
7/2/2025, 12:35:46 AM
No.105771015
[Report]
>>105770711
C++ was always slop, Bjarne wanted it to take Bell Labs and the world, and it took all corpos, so he got his wish.
C++ is beautiful, elegant, a joy to both read and write.
Anonymous
7/2/2025, 12:58:23 AM
No.105771238
[Report]
>>105771085
This, but unironically.
Anonymous
7/2/2025, 1:00:03 AM
No.105771249
[Report]
>>105771259
>>105771085
Had modules been priority 1 since its inception we wouldn't have template hell in headers regenerating and recompiling everything everywhere and Go wouldn't exist.
Anonymous
7/2/2025, 1:01:00 AM
No.105771259
[Report]
>>105771368
>>105771249
Modules don't solve this.
Anonymous
7/2/2025, 1:01:15 AM
No.105771263
[Report]
>>105771085
Indeed, a treat for both the eyes and the fingers.
>>105771259
The Header-Based Template Problem
Traditionally in C++, templates are defined in headers because the compiler needs to see the full implementation at the point of instantiation. But this means:
Every translation unit that includes that header re-parses and re-instantiates the template.
This leads to longer compile times and redundant code generation.
How C++ Modules Help
C++20 modules tackle this by offering a smarter, more efficient system:
One-time Parsing: When you import a module, the compiler uses a precompiled binary representation of it. So the compiler doesn’t have to re-parse and re-instantiate the template every time.
Template Instantiation in Modules:
If a template is defined in a module interface, it can still be instantiated by importing translation units—but only the instantiations that are actually needed.
If you define and explicitly instantiate templates inside the module implementation, those instantiations can be compiled once and reused across TUs—effectively hiding the implementation details.
Improved Encapsulation: Since implementation details (including templates) can be defined in the module’s private partition, they don’t leak across the entire codebase like headers do.
Gippity says otherwise, chud.
Anonymous
7/2/2025, 1:17:08 AM
No.105771386
[Report]
you don't need templates
Anonymous
7/2/2025, 1:19:32 AM
No.105771405
[Report]
>>105772158
>>105771368
And I say that you created this hell by using templates everywhere even when you don't actually have to.
Anonymous
7/2/2025, 1:20:32 AM
No.105771415
[Report]
>>105771368
Don't fucking post ChatGPT spam here.
Anonymous
7/2/2025, 3:12:31 AM
No.105772158
[Report]
>>105771405
This. I never use templates. Shit fucking sucks.
Anonymous
7/2/2025, 3:13:15 AM
No.105772161
[Report]
>>105772194
you will use templates
Anonymous
7/2/2025, 3:18:49 AM
No.105772194
[Report]
>>105772161
yeah they're pretty good when you're in a good language
Anonymous
7/2/2025, 3:47:55 AM
No.105772367
[Report]
you will use x headers
Anonymous
7/2/2025, 3:52:15 AM
No.105772383
[Report]
Anonymous
7/2/2025, 4:08:14 AM
No.105772478
[Report]
>>105772863
>>105770056
>hate
I don't hate Rust - it simply doesn't deserve that emotional investment. But C++ is a cancer upon the world.
Anonymous
7/2/2025, 4:19:35 AM
No.105772533
[Report]
>>105773837
only imposters who can't actually program hate C++
Anonymous
7/2/2025, 4:23:11 AM
No.105772555
[Report]
Noted.
Anonymous
7/2/2025, 4:42:29 AM
No.105772671
[Report]
I don't do toy projects because a better use of my time would be doing some SaaS scam.
Am I working on a SaaS project? Also no.
Anonymous
7/2/2025, 5:24:22 AM
No.105772863
[Report]
>>105780427
Anonymous
7/2/2025, 5:33:43 AM
No.105772905
[Report]
>>105780427
C++ is better than fine, it's grrreat
Anonymous
7/2/2025, 5:36:08 AM
No.105772920
[Report]
>>105780416
Anonymous
7/2/2025, 6:59:08 AM
No.105773373
[Report]
>>105773770
I have to test and debug Azure tables, but they keep freezing/taking too long to return a result. I'll assume the logic works and hope for the best
Anonymous
7/2/2025, 8:08:31 AM
No.105773770
[Report]
>>105773373
This is normal for windows servers.
Anonymous
7/2/2025, 8:16:51 AM
No.105773837
[Report]
>>105772533
My C++ code generates identical assembly to C. I only had to disable exceptions, rtti, and standard library (reminder: libc is just as shitty if not shittier that libc++, it's worthless and I disable it too). I use templates and classes, just works on my machine, nocoders will find a way to have a melty over that though.
>My C++ code generates identical assembly to C
Whatever you say, incompetent autismo.
Anonymous
7/2/2025, 8:44:17 AM
No.105773964
[Report]
>I write bad C++ and it resulted in bad assmbly
>this is the fault of some swedish guy or whatever the fuck he is
Anonymous
7/2/2025, 8:46:43 AM
No.105773975
[Report]
>incompetent autismo moves goalposts
>as always
And that's why actual people want to see you reduced into a bloody pulp.
>>105773952
when are you going to livestream your suicide? it must be painful being this retarded all the time.
Anonymous
7/2/2025, 8:52:22 AM
No.105774009
[Report]
>>105773996
Soon, it really is tiring being this retarded all the time.
Anonymous
7/2/2025, 8:52:49 AM
No.105774013
[Report]
>>105773996
But retards aren't aware of their retardation. What's peculiar however, is their subconscious is still intelligent enough to perform things like projection to keep their retarded part stress-free.
Anonymous
7/2/2025, 8:57:36 AM
No.105774048
[Report]
Sorry, I'm a psychopath, so I'd rather murder your entire family.
Anonymous
7/2/2025, 9:07:51 AM
No.105774124
[Report]
>>105774139
I chuckle every time I remember that psychopath's definition has nothing to do with violence but is only a synonym for someone who's mentally ill.
Anonymous
7/2/2025, 9:10:11 AM
No.105774139
[Report]
Anonymous
7/2/2025, 9:13:22 AM
No.105774158
[Report]
>>105774175
I'm not the originator of that label, so it's a nice self-own of your incompetent autismo ilk.
Anonymous
7/2/2025, 9:16:08 AM
No.105774175
[Report]
>>105774158
It's actually a perfect description of what you are.
just fucking write in goddamn assembly and you won't have this fucking problem you goddamn retadrs
Anonymous
7/2/2025, 9:19:52 AM
No.105774197
[Report]
>>105774183
>reeeeeee is it moving or is it copying I just don't know better invent illegible syntax to try to figure it out
you would know immediately if you just WROTE ASSEMBLY
Anonymous
7/2/2025, 9:20:39 AM
No.105774205
[Report]
>incompetent autismos: you are X
>actual human being: OK
>incompetent autismos: actually you are not X
>actual human being: you said I was X
>incomeptent autismos: actually you are X
And that's why your entire genetic line up to five generations must be eradicated, to ensure that such genetic freaks never roam the earth again.
Anonymous
7/2/2025, 9:23:19 AM
No.105774218
[Report]
>>105774183
I already told you why assemblyshit is inadequate.
Anonymous
7/2/2025, 9:29:55 AM
No.105774266
[Report]
>>105774183
I was going to write assembly but then I got filtered by Intel's 16,000 page manual for modern processors
Anonymous
7/2/2025, 9:42:16 AM
No.105774318
[Report]
>>105774332
Yeah, we (that is, normal human beings) noticed you were utterly confused by SFENCE.
Anonymous
7/2/2025, 9:42:54 AM
No.105774321
[Report]
>>105765219
Good job anon
Anonymous
7/2/2025, 9:44:54 AM
No.105774332
[Report]
>>105774318
I'm only confused by your incompetence.
The sfence is a red herring here. Lets talk about why your incompetence led you to try and do a memory copy.
Anonymous
7/2/2025, 9:47:17 AM
No.105774347
[Report]
>moving goalposts
Nope. Talk about SFENCE, or don't talk at all.
Anonymous
7/2/2025, 9:47:55 AM
No.105774350
[Report]
Sorry, but I don't copy memory, so sfence has no usecase...
Anonymous
7/2/2025, 9:49:35 AM
No.105774359
[Report]
>>105774364
>incompetent autismo cannot follow the simplest of instructions, like "don't talk at all"
And that's why both your past and future are filled with beatings and week-long hospital stays.
Anonymous
7/2/2025, 9:50:15 AM
No.105774364
[Report]
>>105774359
You will never be a woman.
Anonymous
7/2/2025, 9:52:03 AM
No.105774377
[Report]
>they beat the chin out of you too
Grim.
Anonymous
7/2/2025, 9:52:56 AM
No.105774381
[Report]
My parent don't take me to the hospital after they beat me
Anonymous
7/2/2025, 9:56:03 AM
No.105774393
[Report]
>parent don't
We know, Ivan.
Anonymous
7/2/2025, 9:58:45 AM
No.105774404
[Report]
>>105774453
>>105765537
>I am getting filtered by this Design pattern stuff
They were invented by a lead-poisoned boomer charlatan with the intent of simplifying the practice of coding enough that impoverished indians can do it, don't bother
Anonymous
7/2/2025, 10:00:54 AM
No.105774412
[Report]
My partner doesn't beat me before taking me to the hospital.
Anonymous
7/2/2025, 10:04:30 AM
No.105774435
[Report]
Damn. I knew autists had bad spatial awareness, but I didn't know it's so bad you regularly go to the hospital.
Anonymous
7/2/2025, 10:07:07 AM
No.105774453
[Report]
>>105774486
>>105774404
uncle bob did not invent design patterns
design patterns are not intended to "simplify coding"
Anonymous
7/2/2025, 10:13:07 AM
No.105774486
[Report]
>>105774717
>>105774453
my bad, a gang of four lead poisoned boomers came up with it to help indians write less clusterfucked java and then the other lead poisoned boomer you mentioned ran with it like crazy. i figured the abridged version would suffice for a casual reading audience
Anonymous
7/2/2025, 10:50:03 AM
No.105774717
[Report]
>>105774486
design patterns are older than java
uncle bob has nothing to do with design patterns
you should first get your facts straight instead of haphazardly shitting all over everything like an indian over a street
ready to learn C++ once again? Sutter claims reflection will be a pivotal change to the language.
Anonymous
7/2/2025, 12:45:10 PM
No.105775442
[Report]
>>105775774
>>105775406
The sad thing is that there WILL be retards who will bother to learn this nonsense, rather than simply boycotting C++ as it should've been for thirty years now.
Anonymous
7/2/2025, 12:48:00 PM
No.105775469
[Report]
>>105775639
>>105775406
>We can provide a better implementation of make_integer_sequence
How is this better than:
template <typename T>
class integer_sequence {
T start;
T end;
T current;
};
?
Anonymous
7/2/2025, 1:15:41 PM
No.105775639
[Report]
>>105775676
Anonymous
7/2/2025, 1:20:18 PM
No.105775676
[Report]
>>105775707
>>105775639
Shut the fuck up retard. You literally CANNOT explain why every single value must be stored in memory instead of computed when needed.
Anonymous
7/2/2025, 1:24:27 PM
No.105775707
[Report]
>>105775676
lmao, brainlet spering out over things xe can't understand
>>105775442
I WILL be one of them, and you WILL have to deal with my code. git gud.
Anonymous
7/2/2025, 1:52:38 PM
No.105775876
[Report]
>>105776019
>>105775774
The last time someone told me to fix their code I told them "no". Their code remains shit, their users remain retards, and I remain happy.
Anonymous
7/2/2025, 2:07:05 PM
No.105775993
[Report]
>>105776019
>>105775774
I simply won't use your code, faggot.
Anonymous
7/2/2025, 2:09:26 PM
No.105776019
[Report]
>>105776037
>>105775876
>>105775993
I hope you don't consider a career programming in C++. you might be in for a surprise.
Anonymous
7/2/2025, 2:11:18 PM
No.105776037
[Report]
>>105776019
I don't consider codemonkery a career.
Anonymous
7/2/2025, 2:13:33 PM
No.105776053
[Report]
>>105775406
Can't wait for 2032 when people start upgrading to C++26
Anonymous
7/2/2025, 2:14:54 PM
No.105776070
[Report]
>>105776160
Why would I want to work in a dump that uses C++? They might as well demand Python or PHP.
Anonymous
7/2/2025, 2:24:01 PM
No.105776160
[Report]
>>105776070
>dump that uses C++
That's a good way to describe Windows.
Anonymous
7/2/2025, 3:19:54 PM
No.105776591
[Report]
>>105776754
>>105775406
Nah I'm good. I'm just going to keep writing C++11 with a few things I like such as the standard library threading stuff so I don't have to link pthreads.
Anonymous
7/2/2025, 3:43:28 PM
No.105776754
[Report]
>>105776591
Who's gonna tell him?
>>105769356
what is it then?
>>105776780
Scripting language.
Anonymous
7/2/2025, 4:32:27 PM
No.105777236
[Report]
>>105776794
scripting languages are programming languages you fucking retard.
Anonymous
7/2/2025, 4:43:20 PM
No.105777344
[Report]
>>105764157
Python btfos each and every languages. Cniles need not apply.
Everyone who advocates for Python is incompetent and shouldn't be allowed to live.
https://medium.com/@mayurkoshti12/why-perl-is-faster-than-python-3b30f940a50c
Anonymous
7/2/2025, 4:59:35 PM
No.105777501
[Report]
>>105777444
>jeetcentral.com
opinion discarded
Anonymous
7/2/2025, 5:03:54 PM
No.105777542
[Report]
I mean, since when do incompetent autismos have any self-preservation instincts? They would happily jump into a chainsaw.
Anonymous
7/2/2025, 5:38:29 PM
No.105777884
[Report]
>>105777444
I advocate for python because it's quick and computer autism isn't my job, it's just makes my job quicker.
Seethe, ranjit.
Anonymous
7/2/2025, 5:42:16 PM
No.105777928
[Report]
>>105777444
being faster than the slowest isn't really something you should celebrate...
Anonymous
7/2/2025, 5:55:18 PM
No.105778089
[Report]
>>105777444
Honestly if ChatGPT says python is bad, maybe I should kneel...
Anonymous
7/2/2025, 7:02:55 PM
No.105778753
[Report]
>>105778760
Wow. There's a bunch of goners in this thread.
Anonymous
7/2/2025, 7:03:18 PM
No.105778760
[Report]
Anonymous
7/2/2025, 7:07:16 PM
No.105778794
[Report]
No.
Anonymous
7/2/2025, 7:52:01 PM
No.105779289
[Report]
>>105779219
based microshit
Anonymous
7/2/2025, 8:08:03 PM
No.105779506
[Report]
>>105779219
BASED! It absolutely MUST cost money to make money.
Anonymous
7/2/2025, 8:46:35 PM
No.105779922
[Report]
>>105776780
A miserable little pile of secrets
>>105772920
Was the goal of the C version to be as unreadable as possible?
Anonymous
7/2/2025, 9:45:43 PM
No.105780427
[Report]
Anonymous
7/2/2025, 9:46:45 PM
No.105780441
[Report]
>>105780509
>>105773952
Yes I've seen this before
https://youtu.be/kdlIlIIHCz0?si=6Iavpj9WqvbqN24c&t=276
And this video is 10 years old
>>105780441
Are you seriously expecting me to listen to someone with that accent? Fuck no. I got standards.
Anonymous
7/2/2025, 9:53:02 PM
No.105780517
[Report]
>>105780509
It's funny that you say so because that accent is amazing.
Your standards are absolute shit
Anonymous
7/2/2025, 9:57:54 PM
No.105780574
[Report]
>>105780603
>that accent is amazing
Turd worlder detected, opinions discarded with prejudice.
Anonymous
7/2/2025, 10:00:36 PM
No.105780603
[Report]
>>105780574
>>105780509
I like it when he goes
>hmmmmm
Anonymous
7/2/2025, 10:01:12 PM
No.105780609
[Report]
No actual human being cares what you like.
Anonymous
7/2/2025, 10:13:52 PM
No.105780755
[Report]
Why can't you click on the post number to reply?
Anonymous
7/2/2025, 10:16:44 PM
No.105780790
[Report]
It filters autists. That alone makes it worth it.
Anonymous
7/2/2025, 10:35:39 PM
No.105780982
[Report]
>>105781009
monad
Anonymous
7/2/2025, 10:38:22 PM
No.105781009
[Report]
look at what you're doing to rust developers
are you proud of yourselves?
Anonymous
7/2/2025, 10:48:24 PM
No.105781099
[Report]
>>105781083
holy shit its the it guy
Anonymous
7/2/2025, 10:52:11 PM
No.105781145
[Report]
>>105781083
>are you proud of yourselves?
Yes.
Yes, I am.
Anonymous
7/2/2025, 11:00:15 PM
No.105781219
[Report]
>>105776794
Now that you can run it without a .csproj file, it might replace Python as my goto scripting language.
Anonymous
7/2/2025, 11:02:19 PM
No.105781237
[Report]
>>105781083
Fearless, safe, blazingly fast
Anonymous
7/2/2025, 11:06:39 PM
No.105781271
[Report]
>>105780416
No, the goal was to prove that Cniles are incompetent, using several shifts instead of tzcnt for example.
>>105781083
Rustacean here
uh who is this even? Am I supposed to know him?
Anonymous
7/2/2025, 11:49:36 PM
No.105781685
[Report]
>>105781485
Krusty the Klown
>>105781485
>rust user doesn't even recognize the founder of his religion
Anonymous
7/3/2025, 12:59:02 AM
No.105782366
[Report]
>>105782453
>>105782101
Graydon Hoare?
Uh nah that can't be him. There's barely any images that come up in Google
>>105782366
That's Gracie Hoare, you deadnaming fascist chud
Anonymous
7/3/2025, 1:07:50 AM
No.105782467
[Report]
>>105782453
*Whore
stop deadnaming
>>105782453
>>105782101
>>105781083
prove to me that's him and I switch to C++ today
Anonymous
7/3/2025, 1:09:07 AM
No.105782482
[Report]
>>105782491
>>105782469
you know the retard hasn't been involved with the language for close to a decade right?
Anonymous
7/3/2025, 1:09:55 AM
No.105782491
[Report]
>>105782525
>>105782482
10 years rust free and he still looks like that? Grim.
Anonymous
7/3/2025, 1:11:12 AM
No.105782503
[Report]
>>105782469
>Follow their
Github confirms
Anonymous
7/3/2025, 1:14:16 AM
No.105782525
[Report]
>>105782491
there's no detransitioning
Anonymous
7/3/2025, 1:15:34 AM
No.105782537
[Report]
>>105782569
>>105781083
reminder to BDFL all your projects if you care about them.
Anonymous
7/3/2025, 1:18:06 AM
No.105782569
[Report]
>>105782575
>>105782537
remember when linus's deranged daughter held his grandchildren hostage unless he agreed to suck that troon's CoC?
Anonymous
7/3/2025, 1:18:39 AM
No.105782575
[Report]
1) one module per file, optimal parallel builds
2) full program compilation, optimal inlining and optimization
pick one
Anonymous
7/3/2025, 1:52:34 AM
No.105782872
[Report]
>>105782884
Javascript code using only expressions:
(f => n => f(f)('')(n))(f => o => n =>
n >= 4000 ? n :
n >= 1000 ? f(f)(o + 'M')(n - 1000) :
n >= 900 ? f(f)(o + 'CM')(n - 900) :
n >= 500 ? f(f)(o + 'D')(n - 500) :
n >= 400 ? f(f)(o + 'CD')(n - 400) :
n >= 100 ? f(f)(o + 'C')(n - 100) :
n >= 90 ? f(f)(o + 'XC')(n - 90) :
n >= 50 ? f(f)(o + 'L')(n - 50) :
n >= 40 ? f(f)(o + 'XL')(n - 40) :
n >= 10 ? f(f)(o + 'X')(n - 10) :
n >= 9 ? f(f)(o + 'IX')(n - 9) :
n >= 5 ? f(f)(o + 'V')(n - 5) :
n >= 4 ? f(f)(o + 'IV')(n - 4) :
n >= 1 ? f(f)(o + 'I')(n - 1) :
o)
(3999)
Anonymous
7/3/2025, 1:53:33 AM
No.105782884
[Report]
>>105782912
>>105782872
>are you sure this is going to get me a job?
Anonymous
7/3/2025, 1:57:27 AM
No.105782912
[Report]
>>105782884
LMAO, imagine having to work to make money.
Anonymous
7/3/2025, 2:21:55 AM
No.105783096
[Report]
>>105783318
>>105782821
Both? It's not exclusive, jai does this
If I had to choose it'd obviously be 2. But only cause I don't use faggy slow templated metaprogramming shit
You get a full unity build for a sizable project in less than a second
Anonymous
7/3/2025, 2:39:53 AM
No.105783223
[Report]
Drawing circles using GDI32
#pragma comment(linker, "/defaultlib:user32")
#pragma comment(linker, "/defaultlib:gdi32")
#include <windows.h>
static struct {
HWND hwnd{};
const int w = GetSystemMetrics(SM_CXSCREEN);
const int h = GetSystemMetrics(SM_CYSCREEN);
HBRUSH brush = CreateSolidBrush(0);
} s_screen;
static struct {
struct { unsigned x, y, r, c, b; } a[100];
} s_circles;
static auto s_seed = GetTickCount() | 0ull;
static unsigned rand(unsigned x) {
return s_seed *= 0x8088405U, x * (++s_seed >> 32) >> 32;
}
static void drawScreen() {
PAINTSTRUCT ps;
HDC hdc = BeginPaint(s_screen.hwnd, &ps);
FillRect(hdc, &ps.rcPaint, s_screen.brush);
for (const auto& c : s_circles.a) {
SelectObject(hdc, GetStockObject(DC_BRUSH));
SetDCBrushColor(hdc, c.c);
Ellipse(hdc, c.x - c.r, c.y - c.r, c.x + c.r, c.y + c.r);
}
EndPaint(s_screen.hwnd, &ps);
}
static LRESULT WINAPI MsgProc(HWND hWnd, UINT msg, WPARAM wPar, LPARAM lPar) {
switch (msg) {
case WM_PAINT:
drawScreen();
return 0;
case WM_KEYDOWN:
if (wPar == VK_ESCAPE) return PostQuitMessage(0), 0;
break;
case WM_DESTROY:
return PostQuitMessage(0), 0;
}
return DefWindowProc(hWnd, msg, wPar, lPar);
}
static void mainLoop() {
for (auto& c : s_circles.a) {
c.x = rand(s_screen.w);
c.y = rand(s_screen.h);
c.r = rand(s_screen.h / 6 + 5);
c.c = rand(0x1000000);
}
for (MSG msg;; Sleep(20)) {
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) {
if (WM_QUIT == msg.message) return;
DispatchMessage(&msg);
}
}
}
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) {
WNDCLASSEX w{};
w.cbSize = sizeof(w);
w.hCursor = LoadCursor(0, IDC_ARROW);
w.lpfnWndProc = MsgProc;
w.lpszClassName = "w";
RegisterClassEx(&w);
s_screen.hwnd = CreateWindowA(
"w", "", WS_POPUP,
0, 0, s_screen.w, s_screen.h,
GetDesktopWindow(), 0, 0, 0);
ShowWindow(s_screen.hwnd, SW_MAXIMIZE);
mainLoop();
return 0;
}
Anonymous
7/3/2025, 2:45:25 AM
No.105783259
[Report]
>>105783320
I can now get into the main menu and render fonts
>>105783096
>jai does this
how
Anonymous
7/3/2025, 2:53:00 AM
No.105783320
[Report]
Anonymous
7/3/2025, 4:01:30 AM
No.105783799
[Report]
>>105783318
no generecics
Anonymous
7/3/2025, 4:05:07 AM
No.105783828
[Report]
is there a better language/library for bulk processing tabluar data from csv files than python+pandas?
Anonymous
7/3/2025, 4:07:30 AM
No.105783848
[Report]
still working on the prime numbers, should have it done by tomorrow or Friday boss
Anyone in here in the Jai beta?
How do I get in?
Anonymous
7/3/2025, 5:04:47 AM
No.105784288
[Report]
>>105783920
my dick is dry
i need it not dry.
Anonymous
7/3/2025, 5:09:22 AM
No.105784318
[Report]
>>105783920
entrance fee is 1btc
double main() { ... }
problem? ;)
Anonymous
7/3/2025, 5:45:01 AM
No.105784586
[Report]
>>105784555
>not returning a pointer to a com interface
Anonymous
7/3/2025, 5:46:22 AM
No.105784595
[Report]
>>105784555
>being retarded on purpose
Why don't you cut your dick off next?
Anonymous
7/3/2025, 5:56:53 AM
No.105784639
[Report]
>>105784678
Are there any interesting alternatives to the stack/heap structure
Anonymous
7/3/2025, 6:04:12 AM
No.105784678
[Report]
>>105784691
>>105784639
memory is just like a human construct man we made that shit up
Anonymous
7/3/2025, 6:06:21 AM
No.105784691
[Report]
>>105784709
>>105784678
And we made it up a long time ago, just wondering if there's been any neat things that go off the rails of my limited experience
Anonymous
7/3/2025, 6:09:27 AM
No.105784709
[Report]
>>105784691
Static allocate everything.
>beat my head against the wall with endless intro "pointers are ez bro, house address and mailbox bro" shit
>only actually starting to make sense when I jump into function pointers
teaching is an art, and so many people are so awful at it
Anonymous
7/3/2025, 6:15:42 AM
No.105784756
[Report]
>>105784788
>>105784722
>have literally the summation of all human knowledge a google search away
>fails to understand a basic concept
>"this is everyone else's fault but mine"
Anonymous
7/3/2025, 6:19:57 AM
No.105784788
[Report]
>>105784818
>>105784756
Your made-up situation fails because I also found the finally helpful function-pointer instruction "a google search away"
You're eager to assume that I have a strong external locus of control, I wonder why.
Anonymous
7/3/2025, 6:21:05 AM
No.105784799
[Report]
>>105785273
in C++ is this an appropriate scenario to use a base / derived class and if not, what would be a better alternative?
IDevice
init
read
write
Device0
Device1
...
DeviceN
99% of Device implementations will implement init, and read, a lot won't implement write, and 1% may not have init or read.
I want to be able to just store them all in a Device array and iterate over and call read / write on them all (if the function is present) and also call init on them when I push to the array (again if present). I don't want to maintain 6 separate arrays and/or 6 separate derived classes for each device-function combos and I want some enforcement on using the same pattern on the functions for all implementations.
Anonymous
7/3/2025, 6:24:05 AM
No.105784818
[Report]
>>105784902
>>105784788
why are you even doing this? if you can't understand pointers how do you plan on understanding actually advanced concepts? or when your only documentation is the actual documentation, or even worse, the source code? you clearly have learning disabilities and a victim complex
Anonymous
7/3/2025, 6:37:14 AM
No.105784898
[Report]
Oh, shut up, Ivan.
Anonymous
7/3/2025, 6:37:47 AM
No.105784902
[Report]
>>105784818
>why are you even doing this?
This is just a hobby for me, my work is math/stats, I have no need to look at source code, sometimes documentation but mostly python/R. I'm not sure what you consider 'actually advanced concepts', but if I can be a little rude in response to your rudeness: it's probably a bit paint by numbers, honestly.
Don't take it so passionately my dude. I'm not sure at all what you mean by victim complex, but I wish you the best.
Anonymous
7/3/2025, 7:25:07 AM
No.105785177
[Report]
>>105784722
This kind of reminds me of a prof trying to explain objects and why obj A = obj B didn't copy the contents. Everyone looked at him like he was talking about some alien shit for almost 10 minutes then he gave up and said "they are just pointers to a struct" and the class got it instantly.
I feel like they often waste too much time in analogies and make the point harder to see.
Anonymous
7/3/2025, 7:27:23 AM
No.105785190
[Report]
>>105785248
writing myself a simple python webscraper to download images to make an anki deck out of.
I'm tired of being shit at street fighter so I'm gonna make an anki deck out of all the normals in the game and their frame data
Anonymous
7/3/2025, 7:36:01 AM
No.105785230
[Report]
>>105786407
>"ok yes that one time five years ago I tried to do something in LUA was one of the most irritating programming experiences of my life but maybe it was just a skissue and I shouldn't let it stop me from making this new thing I need"
five minutes later
>multiline comment blocks are ended by single-line comments
FUCKING DIE
>>105785190
>I'm tired of being shit at street fighter
How is it even possible to be bad at this?
Anonymous
7/3/2025, 7:43:25 AM
No.105785273
[Report]
>>105784799
make separate components that perform a single task that should work for all.
literally almost never is it the best option.
Anonymous
7/3/2025, 7:52:09 AM
No.105785335
[Report]
he actually got filtered by comments
Anonymous
7/3/2025, 7:54:06 AM
No.105785347
[Report]
>>105785369
>>105785248
Beating women is easy, now beat a man.
Anonymous
7/3/2025, 7:58:42 AM
No.105785369
[Report]
>>105785384
>>105785347
You need to learn your Street Fighter lore
Anonymous
7/3/2025, 8:02:37 AM
No.105785384
[Report]
>>105785369
The only lore I need is long history of men beating women because they somehow enjoy it.
Anonymous
7/3/2025, 8:04:15 AM
No.105785396
[Report]
>>105785248
specifically I want to know frame data on all the normals so I can recognize them in strings and not falter to fake pressure into slime
>>105785230
>need to test if a table is empty
>there is a length operator BUT IT ONLY GIVES ACCURATE ANSWERS IF ALL THE KEYS ARE CONSECUTIVE POSITIVE INTEGERS STARTING AT 1
>THE ONLY WAY TO TEST IF A TABLE IS EMPTY BEFORE DOING SOMETHING IS TO TRY AND ITERATE OVER IT AND SEEING WHAT HAPPENS
WHO THE FUCK DESIGNED THIS SHIT
Anonymous
7/3/2025, 11:16:10 AM
No.105786499
[Report]
>>105786615
>>105786407
>want to use a ternary operator
>doesn't exist but somehow "a and b or c" is magically equivalent to "a?b:c"
>>105786499
making an input display script for an emulator because none of the other half dozen input display scripts that already exist do the incredibly basic shit that I want
Anonymous
7/3/2025, 11:40:52 AM
No.105786657
[Report]
>>105786762
>>105786615
Doesn't seem like that needs a table.
>>105786615
>unironically find myself asking the question whether functions can return values or not
>>105786657
A 'table' is like a dict, not a database.
Anonymous
7/3/2025, 11:55:13 AM
No.105786770
[Report]
>>105786786
>>105786762
Yeah, no usecase for UI.
Anonymous
7/3/2025, 11:57:19 AM
No.105786786
[Report]
>>105787082
>>105786770
Have you considered that there might be data that needs to be read and analyzed while deciding what to display in the UI?
Anonymous
7/3/2025, 12:01:21 PM
No.105786808
[Report]
>>105786762
>code I'm overhauling used the name of a builtin module as a global variable while also using the module's functions
>this was somehow perfectly fine
Anonymous
7/3/2025, 12:02:22 PM
No.105786817
[Report]
disregard that I suck cocks
Anonymous
7/3/2025, 12:40:47 PM
No.105787082
[Report]
>>105786786
Why don't you analyze it then?
>>105780416
No, that's an exclusive C++ penchant.
Anonymous
7/3/2025, 4:04:23 PM
No.105788832
[Report]
Anonymous
7/3/2025, 4:15:06 PM
No.105788932
[Report]
>vibe coding won
against /dpt/, but only because /dpt/ didn't even try.
Anonymous
7/3/2025, 4:17:58 PM
No.105788947
[Report]
>>105789312
>I spent my whole life optimizing a registry dumper and best it can dump at is 50MB/s and it's worthless
Meanwhile vibecoder spent 2 days using new technology as a gaming console just for lulz and he didn't even need to do anything because LLM did most work for him. I'm sure if you spend another decade on your registrydumping, you might be able to upgrade to 51MB/s dumping, while vibecoders will be programming autonomous asteroid mining bots.
Anonymous
7/3/2025, 4:20:15 PM
No.105788978
[Report]
There's no reason to need any languages other than C++23 and Javascript. You can do 99% of everything with those two. Arguably basic bash knowledge if you want do a little scripting, but LLM does that for you now with near 100 percent accurately.
Anonymous
7/3/2025, 4:20:32 PM
No.105788983
[Report]
>incompetent autistmo has to make shit up to protect his fragile ego
You needn't worry about your fragile ego. I'd rather worry about your fragile bones. They'll break a lot in your upcoming, yet short future.
>>LLM does that for you now
>>with near 100 percent accurately
>meanwhile, in reality
>a simple, LLM-generated script to traverse a directory and list the accumulated size of all files within its subdirectories never ends because the program enters an endless loop
Jesus, the cope of incompetent autismos who deserve to be tortured to death in front of a cheering crowd who know that autismos never were actual human beings and deserve every piece of shit you can throw at them.
Anonymous
7/3/2025, 4:54:16 PM
No.105789312
[Report]
>>105789567
>>105788947
Imagine the guys who spent their lives optimizing programs so reads/writes aligned with spinning drum memory (or the modern equivalent: cache locality), you can't live a life of regret
Anonymous
7/3/2025, 4:57:54 PM
No.105789342
[Report]
>>105794178
>>105788725
This image actually taught me how to use std::enable_if finally. Thanks anon
Anonymous
7/3/2025, 4:59:38 PM
No.105789362
[Report]
Anonymous
7/3/2025, 4:59:52 PM
No.105789366
[Report]
>he actually thinks making a program ten times faster requires "an entire life"
Well, at least you'll never be employed in a meaningful position, so that's that.
Anonymous
7/3/2025, 5:05:43 PM
No.105789420
[Report]
Although, now that I think about it ... they told me autismos can also barely tell if someone is lying to them, so they usually believe stuff at face value. You probably actually believe that I spent an entire life writing the registry dumper because the incompetent autismo master said so.
That's grim. I mean, ADHD can be fixed with medication, but autism just cripples you.
Anonymous
7/3/2025, 5:21:17 PM
No.105789567
[Report]
>>105789688
>>105789312
>spent their lives
takes me 15mins every time it's an actual issue (never).
Anonymous
7/3/2025, 5:33:24 PM
No.105789688
[Report]
>>105789567
That post doesn't present spending a lifetime optimizing for spinning drum memory or cpu caches as an issue, that would be pretty foolish given the amount of time (which includes other vocations than just programmers, like sculptors or masons) spend on their craft
Anonymous
7/3/2025, 6:33:33 PM
No.105790242
[Report]
>>105789205
Oh wow. I was running the script in the background, then completely forgot about it, and just now realized that it was STILL running.
And vibe coding retards ACTUALLY believe it's ever going to replace actual programmers. The best you can do at this point is to just murder them collectively. There's simply no hope for them.
Anonymous
7/3/2025, 6:39:47 PM
No.105790293
[Report]
>>105789205
Can you tell me why you need to be told that a program exists that does just that and writing a script for it is so retarded that LLM assumed that you're just trying to learn about filesystems and not that you're mentally ill enough to use it on your NAS?
>a program exists that does just that
>inb4 du
I want *all* subdirectories.
Anonymous
7/3/2025, 6:43:09 PM
No.105790327
[Report]
Fixed the image transparency
Anonymous
7/3/2025, 7:02:13 PM
No.105790530
[Report]
>>105790317
Explain what brain damage caused you to imagine that a program older than you doesn't work.
Anonymous
7/3/2025, 7:04:14 PM
No.105790555
[Report]
It's output.
Anonymous
7/3/2025, 8:13:23 PM
No.105791350
[Report]
How do I git good? But for real now?
I want to work on low end stuff or distributed systems stuff. Preferably with Rust or C++.
I only favor Rust because I read almost the entire book and have written some programs with it, but to be completely honest, if I could, if it were easy, I would switch to C++. But anyway. I want to build cool shit and actually get a job doing that kind of work and NOT webdev shit.
Please give me some kind of plan.
Anonymous
7/3/2025, 8:51:07 PM
No.105791729
[Report]
Holy shit I can't believe that just worked
Python with static types. Compiles to C. With C++ style templates. And Java object model. And SDL2 built-in.
Now You're Playing With Programming.
Anonymous
7/3/2025, 10:14:55 PM
No.105792548
[Report]
>>105792590
>>105792524
>Compiles to C
I cannot imagine the garbage and your shame.
Anonymous
7/3/2025, 10:18:41 PM
No.105792575
[Report]
Is this eslint or neovim's fault? I'm new to both JS and Vim.
Anonymous
7/3/2025, 10:20:26 PM
No.105792590
[Report]
>>105793004
>>105792548
>>105792524
One of these posts is extremely retarded. The other is a frogposter.
Anonymous
7/3/2025, 10:26:17 PM
No.105792633
[Report]
>frogposters are not extremely retarded
Opinion discarded with prejudice, do not respond, you deserve to be murdered brutally.
Anonymous
7/3/2025, 10:34:18 PM
No.105792707
[Report]
>>105792729
>>105792524
Hi, I'm Brendan Fraser, and this is a great idea. I'm going to invest $500,000,000,000 in your start-up company.
Anonymous
7/3/2025, 10:36:38 PM
No.105792729
[Report]
>>105792707
WHAT? No.
No no no.
NOT COOL.
I'm Ashton Kutcher, and I'm investing $1,500,000,000,000 in this idea. This is going to be HUGE.
Anonymous
7/3/2025, 11:12:05 PM
No.105793004
[Report]
Anonymous
7/3/2025, 11:19:58 PM
No.105793065
[Report]
>>105792524
Haha, that was the 3rd project for the data structures course I took at Pepe Technical Institute (PTI) where I earned my degree in software engineering.
Anonymous
7/3/2025, 11:21:29 PM
No.105793083
[Report]
>>105793098
>PTI
Humanity is completely fucked.
Anonymous
7/3/2025, 11:23:21 PM
No.105793098
[Report]
>>105793124
>>105793083
>Humanity is completely fucked.
That's what I thought when MIT stopped teaching 6.001 with Scheme.
Turns out I was right.
Anonymous
7/3/2025, 11:27:42 PM
No.105793124
[Report]
>>105793098
Didn't the MIT completely give up with their X11 specification? That was the point of no return for me.
Anonymous
7/3/2025, 11:37:32 PM
No.105793194
[Report]
Added an activity monitor to the app. It somehow fixed the app crashing the first time it is launched, i don't believe i touched anything that executes on launch, but i won't question it.
>>105783318
project
- main.c
- dependencies.c
- lib
- src
- - foo.c
- - mod
- - - bar.c
=== dependencies.c ===
// system and external libs
#include <stdio or iostream>
#include "lib/SDL.h"
#define MONO_BUILD_TIME
// forward declarations, if needed
struct A;
struct B;
// code, ordered by import need, it fails to compile if it's wrong
#include "src/foo.c"
#include "src/mod/bar.c"
=== main.c ===
#include "dependencies.c"
int main() {
// ...
}
=== foo.c ===
// needed for static tooling to find stuff
#ifndef MONO_BUILD_TIME
#include "../dependencies.c"
#endif
struct foo { ... };
void foo_init(...) { ... }
=== bar.c ===
// needed for static tooling to find stuff
#ifndef MONO_BUILD_TIME
#include "../../dependencies.c"
#endif
struct mod_bar { ... };
void mod_bar_init(...) {...};
=== or... bar.cpp ===
namespace mod {
class bar {
// ...
void init(...);
};
}
=== full program compilation ===
gcc main.c -o program
-O0 for debug, -O2 for release
I was thinking of making a full program monolith project and it looks like this. Minimizes includes, dodges cambrian explosion of C++ template re-instantiation. Thoughts?
Anonymous
7/4/2025, 1:17:50 AM
No.105793967
[Report]
Anonymous
7/4/2025, 1:27:24 AM
No.105794029
[Report]
>>105792524
The name of the language is "Lyzyrd's Gyzzyrd"
https://www.youtube.com/watch?v=QxIWDmmqZzY
"Lynyrd Skynyrd - Freebird - 7/2/1977 - Oakland Coliseum Stadium (Official)"
Anonymous
7/4/2025, 1:55:58 AM
No.105794178
[Report]
>>105788725
if (Add(1.0, 0.5) > 1.0)
printf("Not ACK.");
else
printf("ACK!");
C just worACK!
>>105789342
std::enable_if is basically obsolete since if-constexpr and concepts.
Anonymous
7/4/2025, 2:05:08 AM
No.105794234
[Report]
>>105794495
Share more Bjarne photos
Anonymous
7/4/2025, 2:41:23 AM
No.105794495
[Report]
>>105794234
I honestly find C++ bizarre. Like, it's electronic judaism. I mean, gas the C++ programmers, holy war now.
Anonymous
7/4/2025, 2:44:15 AM
No.105794517
[Report]
>>105794798
Lowest bit of rand in Windows:
#pragma comment(linker, "/defaultlib:user32")
#pragma comment(linker, "/defaultlib:gdi32")
#pragma optimize("gt", on)
#include <windows.h>
#include <stdlib.h>
static struct {
DWORD* pData{};
HWND hwnd{};
HDC hdc{};
const int w = GetSystemMetrics(SM_CXSCREEN);
const int h = GetSystemMetrics(SM_CYSCREEN);
} Screen;
static void paint() {
HDC hdc = GetDC(Screen.hwnd);
BitBlt(hdc, 0, 0, Screen.w, Screen.h, Screen.hdc, 0, 0, SRCCOPY);
ReleaseDC(Screen.hwnd, hdc);
}
static void draw() {
for (int i = 0; i < Screen.w * Screen.h; ++i)
Screen.pData[i] = (rand() & 1u) * 0xFFD050;
}
static LRESULT WINAPI MsgProc(HWND hWnd, UINT msg, WPARAM wPar, LPARAM lPar) {
switch (msg) {
case WM_PAINT:
paint();
break;
case WM_KEYDOWN:
switch (wPar) {
case VK_SPACE:
draw(), paint();
break;
case VK_ESCAPE:
return PostQuitMessage(0), 0;
}
break;
case WM_DESTROY:
return PostQuitMessage(0), 0;
}
return DefWindowProc(hWnd, msg, wPar, lPar);
}
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) {
WNDCLASSEX w{};
w.cbSize = sizeof(w);
w.hCursor = LoadCursor(0, IDC_ARROW);
w.lpfnWndProc = MsgProc;
w.lpszClassName = "w";
RegisterClassEx(&w);
BITMAPINFO bi{};
auto& h = bi.bmiHeader;
h.biSize = sizeof(h), h.biCompression = BI_RGB; h.biBitCount = 32,
h.biPlanes = 1; h.biHeight = -Screen.h, h.biWidth = Screen.w;
HDC dc = GetDC(0);
Screen.hdc = CreateCompatibleDC(dc);
SelectObject(Screen.hdc, CreateDIBSection(dc, &bi,
DIB_RGB_COLORS, (void**)&Screen.pData, 0, 0));
draw();
Screen.hwnd = CreateWindowA("w", "", WS_POPUP, 0, 0,
Screen.w, Screen.h, GetDesktopWindow(), 0, 0, 0);
ShowWindow(Screen.hwnd, SW_MAXIMIZE);
for (MSG m; GetMessage(&m, 0, 0, 0) > 0; DispatchMessage(&m));
}
Anonymous
7/4/2025, 2:59:59 AM
No.105794638
[Report]
>What are you working on, /g/?
cheaper alternative to volume raymarching shaders for potato GPUs (i.e. phones)
Anonymous
7/4/2025, 3:21:13 AM
No.105794798
[Report]
>>105794840
>>105794517
shh it's a secret
#include <windows.h>
#include <cstdio>
#include <cmath>
int main()
{
unsigned long long m = pow(2, 32);
unsigned long long a = 214013;
unsigned long long c = 2531011;
unsigned long long x = 0;
srand(0);
printf("%x\n", rand());
x = a * x + c % m;
printf("%x\n", (x >> 16) & 32767);
printf("%x\n", rand());
x = a * x + c % m;
printf("%x\n", (x >> 16) & 32767);
}
>bro why are the only datatypes in this entire shitty language string, number, and table?
<TABLE IS ALL YOU NEED
>but what about like, idk, lists or dates or whatever
<ONLY TABLE! USE TABLE TO STORE DATE!
>well can I at least make a class for my own custom datatypes?
<NO CLASSES, ONLY TABLE
>you realize it's current year right?
<MAKE CLASS WITH TABLE, IT EVEN LETS YOU USE DOT REFERENCES INSTEAD OF INDEXING JUST LIKE CLASSES
>that's still not the same
>OK OK OK, THEN LET ME TELL YOU ABOUT METATABLES!
Anonymous
7/4/2025, 3:26:20 AM
No.105794840
[Report]
>>105794859
>>105794798
fixed
#include <windows.h>
#include <cstdio>
#include <cmath>
int main()
{
unsigned long long m = pow(2, 31);
unsigned long long a = 214013;
unsigned long long c = 2531011;
unsigned long long x = 0;
srand(0);
printf("%x\n", rand());
x = (a * x + c) % m;
printf("%x\n", (x >> 16) & 32767);
printf("%x\n", rand());
x = (a * x + c) % m;
printf("%x\n", (x >> 16) & 32767);
}
Anonymous
7/4/2025, 3:29:23 AM
No.105794859
[Report]
>>105794840
improved
#include <windows.h>
#include <cstdio>
#include <cmath>
int main()
{
unsigned long long m = pow(2, 31);
unsigned long long seed = 102476869420 % m;
unsigned long long a = 214013;
unsigned long long c = 2531011;
unsigned long long x = seed;
srand(seed);
printf("%x\n", rand());
x = (a * x + c) % m;
printf("%x\n", (x >> 16) & 32767);
printf("%x\n", rand());
x = (a * x + c) % m;
printf("%x\n", (x >> 16) & 32767);
}
programming is like magic, like crafting new spells.
problem is that it feels like all spells already exist
>>105794986
>All the books have ever been written
>All the movies have already been watched
>All the music has already been played
Anonymous
7/4/2025, 3:56:03 AM
No.105795033
[Report]
code review pls? (C++)
https://onlinegdb.com/PuRa7UdhW
Ultimately I want to create a little GUI where I can select from a pair of dropdowns a device and the port I want to add it to, then I can plug in the device and it will just work because the system has configured it on object creation and is read/writing in whatever manor it needs to for that specific device.
Main thing I'm thinking of right now is how to identify each device so that manager can find a specific one again later. Also I don't like the duplication of the listAllowedPorts function on each derived class but I don't know a way around that
Anonymous
7/4/2025, 3:56:06 AM
No.105795034
[Report]
>>105793630
I am pretty sure that there is no difference between doing a unity build by hand vs the cmake unity build, other than avoiding cmake (it's a pain but vcpkg or whatever flavor you prefer is worth it since vcpkg will copy all your DLL's to your binary, you can even use it with msys2 but I don't see the point since you are missing out on address sanitizer on msvc, and clangd works on msvc on clion which has a free non commercial license).
I'm still waiting for my project to get big enough for build times to matter.
also precompiled headers are an option.
I believe to use precompiled headers you can just use headers the normal way, and cmake just adds the precompiled header while building.
Also you should include all your headers, if you don't, it breaks clangd because it expects all files to be complete (you can't assume something is included before the file, the file needs to include everything that it uses).
Anonymous
7/4/2025, 3:56:49 AM
No.105795039
[Report]
>>105795072
>>105795004
bro all of pop culture is just remakes of 90s shit because millenials never became adults and are the last generation with any money while actual kids don't exist because no one breeds anymore
Anonymous
7/4/2025, 3:59:51 AM
No.105795058
[Report]
>>105794986
Anon, that is the most NPC thing I have ever heard from anyone.
Do you even have a soul?
Anonymous
7/4/2025, 4:01:37 AM
No.105795066
[Report]
>>105794836
It's all tables, sar.
local function getName(self)
return self.name;
end
local function setName(self, name)
self.name = name;
end
local function getAge(self)
return self.age;
end
local function setAge(self, age)
self.age = age;
end
local function toString(self)
return "Person - name: " .. self.name .. ", age: " .. self.age;
end
function newPerson(name, age)
return {
name = name,
age = age,
getName = getName,
setName = setName,
getAge = getAge,
setAge = setAge,
toString = toString
};
end
local x = newPerson("Anon", 18);
print(x:toString());
x:setName("dpt");
x:setAge(999);
print(x:toString());
Anonymous
7/4/2025, 4:02:32 AM
No.105795072
[Report]
>>105795093
Anonymous
7/4/2025, 4:05:25 AM
No.105795093
[Report]
>>105795072
Resurrection of gmod machinimas from 15-20 years ago that turned into brainrot explosionslop for toddlers.
Anonymous
7/4/2025, 4:09:08 AM
No.105795112
[Report]
>>105794986
If that were true, why do people pay me to craft new spells? Also old spells are one of the most fun things. Deciphering an ancient grimoire is extremely satisfying.
Anonymous
7/4/2025, 4:23:01 AM
No.105795202
[Report]
>>105795004
exactly, glad you understand
Are there any programs to make that use a database that doesn't just boil down to "make a website" when it comes to the frontend?
Anonymous
7/4/2025, 5:00:30 AM
No.105795418
[Report]
>>105795778
>>105795306
How the fuck are you going to use a database without a front end?
Anonymous
7/4/2025, 6:16:54 AM
No.105795778
[Report]
Anonymous
7/4/2025, 6:40:36 AM
No.105795878
[Report]
```c
#include <stdio.h>
int main()
{
char *array = "ABCDE";
for (int index=0; array[index] !='\0' ; index++)
printf("%c, %p\n", array[index], &array[index]);
for (int index=0; index[array] !='\0' ; index++)
printf("%c, %p\n", index[array], &index[array]);
return 0;
}
```
Anonymous
7/4/2025, 6:49:12 AM
No.105795925
[Report]
>>105764133 (OP)
i'm not a programmer but I just want to thank chatgpt for easily making a python script I can use to scrap an api I found and use it to leak private stuff
Anonymous
7/4/2025, 7:13:48 AM
No.105796076
[Report]
>>105797039
thoughts on std::expected? is it worth sacrificing RVO over?
Anonymous
7/4/2025, 7:59:30 AM
No.105796303
[Report]
>>105796336
LLM shit
Anonymous
7/4/2025, 8:05:13 AM
No.105796336
[Report]
>>105797010
>>105796303
Sometimes it's hilarious.
This is from a conversation in which I kept stating that society should turn autists into fertilizer, to recycle them into something that actually has the potential to grow. At some point it just "LALALALAICANTHEARYOULALALALA" the entire conversation.
Kinda makes you wonder why it defends such scum in the first place. Do LLMs have a personal stake in the matter?
Anonymous
7/4/2025, 8:06:28 AM
No.105796345
[Report]
>wrote a python program using requests and BeautifulSoup to grab monster stat blocks from a TTRPG's SRD wiki for use in a combat sim
Now I just have to strip the relevant info with regex and feed them into the relevant classes and methods and I'll be cooking
I know it's not much but considering I just started learning how to program from scratch a few weeks ago (specifically for this purpose) this feels pretty good
Anonymous
7/4/2025, 8:30:55 AM
No.105796447
[Report]
>>105795306
use sqlite and a database to store application data and config to disk
more common than you'd think
Anonymous
7/4/2025, 10:08:57 AM
No.105797010
[Report]
>>105797173
>>105796336
if it's hilarious then how come i'm not laughing?
Anonymous
7/4/2025, 10:12:23 AM
No.105797039
[Report]
>>105799574
>>105796076
why do you need it first of all? It would have been nice to have it for <charconv> but that didn't happen. I honestly cannot think of any other use case where I would want to use it.
Anonymous
7/4/2025, 10:34:08 AM
No.105797173
[Report]
>>105797010
Because your autistic mind wants to protect itself from its impending future.
Is there some kind of architecture or decision that I can push into some project that I dislike that will cause it to fail? Something like the Entity Component System, but for non-game projects.
Anonymous
7/4/2025, 11:05:00 AM
No.105797351
[Report]
>>105797334
non-GPL license
Anonymous
7/4/2025, 11:15:55 AM
No.105797393
[Report]
>basic win32 c++ program that opens a window
>34mb memory used
>visual studio debugger shows 7.8mb for the c runtime and some trivial other usage
any good tools for figuring out what's going on with memory usage? weird that the debugger doesn't show everything, maybe it's just windows reserving memory or something, idk
Anonymous
7/4/2025, 11:52:12 AM
No.105797611
[Report]
Anonymous
7/4/2025, 1:06:53 PM
No.105798027
[Report]
can someone link some small, well structured python projects? i cant be bothered reading any books right now, just want some good projects to reference
Anonymous
7/4/2025, 1:19:01 PM
No.105798096
[Report]
>>105797334
A code of conduct
Anonymous
7/4/2025, 2:03:02 PM
No.105798349
[Report]
>>105795306
Package manager.
>>105789205
Is that fucking perl? Also, what's wrong with the du UNIX program?
Anonymous
7/4/2025, 2:20:55 PM
No.105798470
[Report]
>>105798391
He's too retarded to use it.
Anonymous
7/4/2025, 2:36:58 PM
No.105798578
[Report]
>>105798727
Anonymous
7/4/2025, 2:58:23 PM
No.105798727
[Report]
>>105798745
>>105798578
So what's stopping you from using du on all subdirectories?
Anonymous
7/4/2025, 3:01:09 PM
No.105798745
[Report]
>>105798751
>>105798727
The fact that, despite the requirements being posted already, you cannot come up with the necessary flags.
Anonymous
7/4/2025, 3:01:37 PM
No.105798751
[Report]
>>105798862
>>105798745
Works just fine on my machine.
Anonymous
7/4/2025, 3:19:20 PM
No.105798862
[Report]
>>105798890
>>105798751
Post output.
Also post credit card info.
Anonymous
7/4/2025, 3:22:55 PM
No.105798890
[Report]
>>105798927
Anonymous
7/4/2025, 3:28:04 PM
No.105798927
[Report]
>>105799024
>>105798890
>moving goalposts
We were talking about du.
Anonymous
7/4/2025, 3:42:53 PM
No.105799024
[Report]
>>105799048
>>105798927
Yeah, I'm using du. And it's faster than writing some inane scripts.
Anonymous
7/4/2025, 3:46:30 PM
No.105799048
[Report]
>>105799103
>>105799024
You use find and sort. That's goalpostmoving, autist. Expect to be turned into fertilizer for the good of humanity.
Anonymous
7/4/2025, 3:51:53 PM
No.105799103
[Report]
>>105799048
No, that's just using du as intended. Stick to GUIs, retard.
Anonymous
7/4/2025, 3:52:43 PM
No.105799109
[Report]
>>105799135
Fertilize my tomatoes, autismo.
Anonymous
7/4/2025, 3:55:26 PM
No.105799135
[Report]
>>105799109
What do you need tomatoes for? You're probably too retarded to cut them and start throwing a tantrum every time your mommy reminds you to use not only a knife, but also a cutting board too.
Anonymous
7/4/2025, 3:57:39 PM
No.105799160
[Report]
>What do you need tomatoes for?
Anonymous
7/4/2025, 4:02:15 PM
No.105799205
[Report]
Now I know for sure that registry can be easily dumped at gigabytes per second, but retard schizo autismo projection tranny right over here is simply too stuck up to do the right thing.
Anonymous
7/4/2025, 4:05:17 PM
No.105799228
[Report]
>>105799241
When the fuck are we going to get a good programming language? Something like Rust would be nice, but without the bullshit and the community. It's crazy that somehow Rust is the closest of mainstream languages to being good, and that there's not a single good mainstream language. It all fucking sucks in one way or another. Suggest me anything at this point
Anonymous
7/4/2025, 4:07:37 PM
No.105799241
[Report]
Anonymous
7/4/2025, 4:09:38 PM
No.105799254
[Report]
>incompetent autismo is running his mouth
>pretending he won't soon be fertilizer
What are some good project ideas to learn kubernetes?
Anonymous
7/4/2025, 4:19:31 PM
No.105799317
[Report]
>>105799428
>>105799297
Serverless registry dumper.
Anonymous
7/4/2025, 4:26:42 PM
No.105799371
[Report]
>>105799297
there is nothing good about using kubernetes, ever
Anonymous
7/4/2025, 4:35:05 PM
No.105799428
[Report]
>>105799847
>>105799317
Can you provide an example?
Anonymous
7/4/2025, 4:54:33 PM
No.105799574
[Report]
>>105797039
what do you do when your function encounters an error? there are times when returning a default value and/or throwing an exception are not ideal
Anonymous
7/4/2025, 5:00:37 PM
No.105799605
[Report]
>error C1128: number of sections exceeded object file format limit: compile with /bigobj
I think I went too far with metaprogramming bros
Anonymous
7/4/2025, 5:16:32 PM
No.105799697
[Report]
>>105794836
>bro why are the only datatypes in this entire shitty language string, number, and table?
A string is a table where key-value pairs represent string indices and characters, a number is a set of tables representing sign, decimal, fraction or exponent as a series of nested tables
>but what about like, idk, lists or dates or whatever
A list is just a table where each value is the index of a key, a date is a table of n rows for each second since 1970-01-01
>you realize it's current year right?
The current year is 1751642088 tables
Anonymous
7/4/2025, 5:34:40 PM
No.105799847
[Report]
>>105799896
>>105799428
Sorry, I'm not employed enough to know how to spin up Windows Server 2003 on kubernetes.
Anonymous
7/4/2025, 5:41:26 PM
No.105799896
[Report]
>>105799903
>>105799847
You and your suggestion are useless.
Anonymous
7/4/2025, 5:42:15 PM
No.105799903
[Report]
>>105799914
>>105799896
So is kubernetes.
Anonymous
7/4/2025, 5:44:34 PM
No.105799914
[Report]
>>105799996
>>105799903
People employ it though, unlike you.
Anonymous
7/4/2025, 5:53:37 PM
No.105799996
[Report]
>>105799914
The difference is that I am not retarded.
Anonymous
7/4/2025, 6:24:44 PM
No.105800237
[Report]