Thread #108042427 | Image & Video Expansion | Click to Play
File: 1755676106687147.mp4 (83.3 KB)
83.3 KB MP4
previous >>108012888
202 RepliesView Thread
>>
>>
>>
>>
>>
>>
>>108043073
it seems theyre trying to teach you how to work with paper
apparently they want you to draw flowcharts.
*shrug*
i write my shit from top-down
first a an outline of the general functionality of the program
then i expand on each functionality, separately
first a description, then pseudocode
working with paper is crucial because it allows you to offload information from your brain, onto paper
you odnt forget it, and you dont need to keep everything in your mind at once.
flowcharts are gay shit but working with paper is a very important skill
>>
>>108043073
Like most shit they teach you in school it's something you might need a few times in your life and when you do it, it's gonna be some ad-hoc system you develop yourself and not exactly what they taught you. But because school is school you have to learn the formal system that they can grade you on.
>>
>>108043121
>>108043203
Thank God it seems to be something abstract and not precise with rules set in stone.
Using flowcharts feels to me like decomposition in math, where they take a trick smart kids do and try to bureaucracy it and chug it to the NPCs and it doesn't work because it tries to transform something abstract into rules.
>>
>>
File: case statement.png (44.2 KB)
44.2 KB PNG
thoughts on this? is this true?
vb script is the most powerful language in the world
>>
>>
>>
>>
>>108043392
https://learn.microsoft.com/en-us/dotnet/visual-basic/language-referen ce/statements/select-case-statement
scroll down to the Example and you will see that you don't use Or to do the thing
I know I know, reading the documentation? In the age of AI? Wow. Amazing. What a concept.
>>
>>108043446
nah even the AI said that you dont use OR
you do case 1, 2
its pretty cool that in the age of AI I can learn about something new by putting my mistakes into it. this is better than never making the misakes...
>>
>>
>>
>>
>>
File: 1769971533794806.png (225.2 KB)
225.2 KB PNG
Did Epstein use the same software as you do?
>>
File: Untitled.png (352.5 KB)
352.5 KB PNG
>>108043571
Finally trying my hand at C++ again after 20 years.
There's not enough time in the day. I don't want to go to work tomorrow.
Visual Studio is missing so many features that VSCode have spoiled me with.
Document Outline
Go to end of word
Go to references
Display reference count
>>
>>
>>
>>
File: images (1).jpg (9.5 KB)
9.5 KB JPG
did you know that in vbscript a msgbox("") returns "1" to the script? this is useful is obfuscation because binary (as hex) + &1 (hex "1") can be math... I mean,
&h8 = 1000 in binary, and &h1 = 0001
vbscript fills in hex values at the right and creates trailing "0"s to fill it up
this means that you can:
make your binary, convert to hex. if the binary the hex converts back to starts with "0" then you can change it to "1" and convert it back to hex and go again... (obfuscates)
to get it back, you can do: varThingsinbracketsprocessfirstBTW = &[obfhex+1] ' I mean to say that it is your actual target hex
select case varThingsinbracketsprocessfirstBTW : case [&hex] AND hex(msgbox("returns 1"))
the above line (to the CPU) takes your obfuscated hex number and applies bitwise logic to it and then does a cmp to the select case, essentially making it cmp the hex value of the binary + 1000 (8 in hex) after returning it back to 0
I have done it in a var here because it is to use Mid([&hex], 4, 1) to get the first 4 values the first nibble
what I want to make it do now is I want to intercept the CPU cmp instruction and make it execute code, but there is DAP, but yeah
>>
it is more useful, though, to use
CreateObject("WScript.Shell").popup
with a timeout of 0 or 1 (idk which it can yet)
the popup function returns "-1" to the script. this is useful because you can use a var like:
switchVar = Array("-", "*") ' to add or multiply it
this is useful because using math it can do
[popup result] switchVar [popup result]
you can have setVar conditionally = "-" or "*" to make "1" (using * or multiply) or "0" (using - or subtract) using the negative number
>>
>>108044766
>>108044806
@grok summarize this
>>
>>
>>
>>108042427
Is this how it feels using Rust?
https://www.youtube.com/watch?v=yAbtte_zZvQ
>when we were at war (with the Rust compiler)
>>
File: __happy_meek_and_kiryuin_aoi_umamusume_drawn_by_myticalcat__sample-0b78aefe896c252c491af24c83be26b5.jpg (73.8 KB)
73.8 KB JPG
>>108044822
you can + &h8 to the (hex converted) binary, which changes the language! China has all those 1xxxx hex binary values of a string in binary (or some other reserved codes)
this obfuscates the code and I saw on an Eric Parker video that some people (in a vbscript) have put in a (string) poem to convert to binary so that if they reverse it themselves, they will read a poem - actually they encoded a poem in base64, but its the same thing. you would just not add a "1" in the 1st position of the binary to the binary-to-hex coded poem string
when they convert the hex to binary, binary to string, they will get a poem and some useless garbage, unless the logic (AND) is followed to un-obfuscate the binary
>>
>>
>>
I'm in the middle of making a GUI app and its getting messy, it has a plugin system that has an event bus injected so users has access this this to react to events.
Question, is it bad practice to inject the Event Bus to most of my classes that needs cross communication to other classes?
Example classA imports an item, classB needs to know so it can run it's logic to do additional processing on the item. With event bus they both get it injected, classA after it imports tells event bus "itemImported" then classB listens, to "itemImported" and reacts to it
One thing I worry is if I do this a lot across my classes it becomes like a cobweb hard to reason where its going
>>
>>
>>
>>
you know what is retarded? my computer has 25GB of SSD space, and windows 11 keeps putting out security updates, and the IDE for visualbasic is 20GB and comes with a bunch of shit that I dont want. I only want visualbasic! Visual Basic 6.0 IDE!
>>
File: Screenshot 2026-01-22 064055.png (45.7 KB)
45.7 KB PNG
I asked AI and it gave me an answer. you know what cant do that? you...
https://github.com/twinbasic
>>
>>
File: file.png (279.6 KB)
279.6 KB PNG
Not much progress since yesterday. Today I spent most of my time:
>refactoring code to make views reusable
>fixing layout issues
>wasting time trying to get claude to shit out ANYTHING usable (spoiler: it failed)
fucking incredible that the AI which is supposedly replacing me can't even make a UI that doesn't collapse when you try to resize the window
>>
>>
>>
>>
>>108046671
>This shit is never hitting 1.0
because they now try to reimplement libc?
>Furthermore, when this work is combined with the recent std.Io changes, there is potential for users to seamlessly control how libc performs I/O - for example forcing all calls to read and write to participate in an io_uring event loop, even though that code was not written with such use case in mind. Or, resource leak detection could be enabled for third-party C code. For now this is only a vaporware idea which has not been experimented with, but the idea intrigues me.
He is such a fucking retard for figuring this out only now, ffs. This really shows that Zig was designed without giving two fucks about correctness in general.
>>
>>
>>
>>
>>
File: 33830-v0-2li9oh7ez6hg1.jpg (75.7 KB)
75.7 KB JPG
>>108046868
i am trans and love coding, but most everyone else (so far as i can tell) at my workplace is cis !
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>108048652
It stands out as redundant which is weird considering this language feels like it has 3 syntax sugars for each construct.
>>108049110
It's a double-edged sword that killed this language's adoption.
There's too much language, too many idioms and possibilities and its all so high in the abstraction (functional abstractions on top of object abstractions on top of JVM) that it's hard to decide which option to choose.
It's really fun to "play" with this language, but I can't imagine working on a big codebase with multiple devs who all are into slightly different flavours of the language.
>>
>>
>>
>>
>>
File: 456.webm (1.2 MB)
1.2 MB WEBM
Been (((vibecoding))) my soil mechanics simulator web app whiel listening to NHH by Kanye. My heatmap textures are jittering and I am running out of tokens, Chinese LLMs please save me
>>
>>108050422
>What's difficult about it? Just scan and set some booleans as you go?
Yeah, thats exactly the solve. I think I have pattern brain or something. I was sure it was BS or some junk to speed it up, but nah.
>>
>>108050308with Ada.Containers.Indefinite_Vectors;
with Ada.Text_IO;
procedure Trionic is
type Int_Values is array (Positive range <>) of Integer;
function Pedestrian_Is_Trionic (Values : Int_Values) return Boolean is
I : Positive;
Mono_Changed : Boolean;
begin
I := Values'First;
Mono_Changed := False;
loop
exit when Mono_Changed or I = Values'Last;
if Values (I) < Values (I+1) then
I := I + 1;
else
Mono_Changed := True;
end if;
end loop;
if I = Values'Last then
return False;
end if;
Mono_Changed := False;
loop
exit when Mono_Changed or I = Values'Last;
if Values (I) > Values (I+1) then
I := I + 1;
else
Mono_Changed := True;
end if;
end loop;
if I = Values'Last then
return False;
end if;
Mono_Changed := False;
loop
exit when Mono_Changed or I = Values'Last;
if Values (I) < Values (I+1) then
I := I + 1;
else
Mono_Changed := True;
end if;
end loop;
if I = Values'Last then
return True;
else
return False;
end if;
end Pedestrian_Is_Trionic;
package Bool_IO is new Ada.Text_IO.Enumeration_IO (Boolean);
package Case_Vectors is new Ada.Containers.Indefinite_Vectors
(Element_Type => Int_Values,
Index_Type => Positive);
use Case_Vectors;
Cases : Case_Vectors.Vector;
begin
-- positives
Cases.Append ((1,3,5,4,2,6));
Cases.Append ((2,3,4,3,2,3));
-- negatives
Cases.Append ((3,3,5,4,2,6));
Cases.Append ((1,3,5,4,2,2));
Cases.Append ((1,3,5,6,2,1));
for C of Cases loop
Bool_IO.Put (Pedestrian_Is_Trionic (C));
Ada.Text_IO.New_Line;
end loop;
end Trionic;
>>
File: visualized.png (7.9 KB)
7.9 KB PNG
>>108050308
It's just poorly presented
>>
>>
File: ocaml-ada-trionic.png (195.7 KB)
195.7 KB PNG
>>108050706
in OCaml this is just ... too large to paste. Ada is a higher level language, of course. OCaml can't compete with its terse syntax and batteries-included stdlib :(
>>
>>
>>108050308isTrionic(nums) {
n = nums.length
p = 0, q = 0
for (i = 0 + 1; i < n; i++)
if (nums[i] < nums[i - 1])
p = i - 1
break
for (i = p + 1; i < n; i++)
if (nums[i] > nums[i - 1])
q = i - 1
break
for (i = q + 1; i < n; i++)
if (nums[i] < nums[i - 1]) {
return false
return (0 < p && p < q && q < n - 1)
}
>>
>>
>>
>>
>>108051303
Which language? Pick a textbook that gives a bunch of mini-projects at the end of each chapter. Or ask chapgpt for mini-projects designed to help you learn idiomatic design patterns and deepen or solidify your knowledge on X concept.
And yeah, >>108051594 this. Have a reason you're learning, will help narrow your focus.
Keep in mind that any time you start working with a new system or library you are still going to have to do some reading and learning. That part doesn't end.
>>
>>
>>
>>
>>
>>
>>
>>
>>108052277
so all these would allow me to use python libs without touching that trash?
rustpython and matlab seem an interesting suggestion, rpy2 seems to be the opposite of what i want though? unless im missing something
i'd want to call pythom from R not the other way around
>>
File: 1756042670543777.png (19.6 KB)
19.6 KB PNG
>messing around in gimp
>realize there's something off with the gaussian blur filter, the numbers aren't adding up
>dig through the source code
>the basic gaussian implementation you would expect
>doesn't make sense no matter how many times I run the numbers
>trace everything back from when you press the button
>it does some weird gamma shenanigans before and after applying the filter which created the discrepencies
my fault for treating a graphics application like a calculator I guess
>>
>>
>>
>>
>>108052784
this is one of the reasons why i use my autistic ass CLI modal text editor and then just build it plugin by plugin into IDE
it runs perfectly on both of my mobile devices so most of the automation that ive build for myself i wrote while shitting or riding on a public transport
in fact it will run on anything even remotely computer shaped
and i can use it over ssh so that i can imitate that distributed OS dream of mine
how epic chungus 420 would that be to be able to access any function of any device from any other device hm? and never have to copy files from one device to another
cant imitate that shit with you slop ass IDE, it sure as fuck aint text nor will it fit into the ssh connection
>>
File: done.png (90.7 KB)
90.7 KB PNG
>>108050308
>>
>>
>>
>>
File: thumbnail.jpg (175.4 KB)
175.4 KB JPG
I mainly code in python
>>
>>
>>
>>
>>
>>
File: 1747474746824726.png (529.6 KB)
529.6 KB PNG
struct SomeView: View {
private var somevariable: String
private var somevariable2: String
var body: some View { }
private func prepareBodyData() -> [String] { }
private func mutateVariable2() { }
struct SomeViewCustomTextField: View {
var somevariable2: String (repeated)
var body: some View { }
}
struct SomeViewCustomTextFieldStyle: TextFieldStyle { }
struct SomeViewCustomButton: Button { }
}
>>
File: compilers_are_garbage_cpp_printf.png (411.8 KB)
411.8 KB PNG
>>108054434
>implying the compiler is less confused than you are
>>
>>
File: compilers_are_garbage_padding_1.png (413.1 KB)
413.1 KB PNG
>>108054577
Why not both?
>>
>>
File: compilers_are_garbage_stack.png (441 KB)
441 KB PNG
>>108054632
>he didn't even read the "is this code perfect? Fuck no" section
I mean compilers in general.
>>
>>108054686
>>he didn't even read the "is this code perfect? Fuck no" section
I did, but the C++ code being garbage is the biggest problem here.
>mov rcx, rax
There is no problem at all.
Are you saying the compiler should change the calling conventions just to eliminate one mov? that's retarded.
>>
>>108054890
>There is no problem at all.
Sure is. RCX is considered volatile, rather than not. Failure of the ABI, especially for subsequent calls that use the same first objects (like C++ does via this).
>Are you saying the compiler should change the calling conventions
It can't. Which is why this should've been inlined.
>>
Just got 4chanX working relatively okay on mobile. It' s not perfect, but feels good now that I can filter on iOS.
https://github.com/r3av/4chan-x-dHash/tree/feature/dHash-v1
>>
>>
>>
I spent some time trying to improve the speed of my text generator's heap allocators since my first implementations were unusably slow. For reference, using the malloc/free on my system, training on text was able to consume ~20 MB/s, my initial implementation was only able to do ~50 kB/s, so ~400x slower. I gave up on best fit allocation entirely, which is tolerable because I can do compactification when needed. I'm only coalescing the list pool when the pool fails to allocate, and only if it's "dirty" (something has been free'd since last coalesce). List pool coalescing is still way too slow because the worst case is O(N^2), I think I need to use a red-black tree to do this efficiently. A red-black tree will have more memory overhead (only an issue under fragmentation) than the SLL I'm using currently but the current performance is unacceptable. Not doing best fit means that I don't need to maintain any kind of ordering in the vector of pools, but it's also made me realize a vector is probably not how I want to be storing these things anyway since I do want to reorder them. I think using a circular DLL might make sense, since I want to check pools unlikely to allocate last and pools likely to allocate first, so I want to move recently free'd from pools up and recently allocated from pools down (roughly speaking). I'm also using a few other heuristics to avoid trying to allocate from pools that are likely to fail: checking the total unused space is sufficient and that the last failed allocation (reset on free) is > the current allocation requested. I still need to implement recording the last allocation position for the bitmap allocator which should help a bit to avoid scanning the same bits over and over. Current performance is ~3.5 MB/s (until the list pool coalescing becomes an issue), which is slower than I would like but at least tolerable, and I think ~10-15 MB/s should be achievable with less fragmentation than the system allocator.
>>
>>
>>
>>
>>108057037
get inspiration from malloc:
https://sourceware.org/glibc/wiki/MallocInternals
I've read previous posts you've made and you the first thing you need to do is round up your allocations to multiples of 8.
You don't need to restrict yourself to a single free list, you can have many segregated free list of different sizes.
When allocating, round up the allocation, look up into the correspond free list if a chunk is available (if so then great because it will be a good fit), otherwise bump allocate into the current big block. If it's full, try to see if a free list of bigger chunks contains a chunk and split it. If not, mmap a new big block and bump allocate from it.
You do coalescing when a big block is full, I think that's what "deferred coalescing" is.
>>
>>108057097
Elaborate. I don't think this will work very well because it will trigger compaction too frequently, which is very expensive.
>>108057234
Thanks for the link, I will look at it more carefully tomorrow, but it's nice seeing a description of the things beyond the individual allocators they're doing to make it fast (caching in particular). Glibc's allocator is much better than whatever Windows defaults to based on past experience. Rounding up to 8 bytes has too much overhead, there are many many entries that are < 8 bytes, so alignment requirements would be wasteful, and paying the unaligned access penalty is acceptable in my case. Size segregated free lists across pools does seem better to reduce fragmentation.
>>
>>108057432
>Rounding up to 8 bytes has too much overhead
>Glibc's allocator is much better than whatever Windows defaults to based on past experience
Yeah, because either allocator totally doesn't have 8 bytes of internal allocation state plus 16-32 byte padding: https://godbolt.org/z/a57MY8zon
I'm having a stroke here.
>>
>>108057155
cmp is fast though (bitwise calculation)
or you could set a pointer to that address and write 1s to an offset... in vbscript you can get a ptr value (with activeX) but you cant write to it or get the value at the mem address
>>
File: 1733758303525032.jpg (429.9 KB)
429.9 KB JPG
>>108057534
>cmp is fast though (bitwise calculation)
You are *severely* overestimating the costs of in-register operations and *severely* underestimating the costs of memory operations.
>>
>>
>>108057743
Marvelous idea. Let's ignore all the compiler fuckups on the most popular consumer architecture and move everyone to RISC-V.
I'm not sure if you're autistic for suggesting this, or I am for not picking up the sarcasm.
>>
>>108057780
>I'm not sure if you're autistic
I am not sure either, but my psychiatrist thinks so. Sadly no official autism certificate yet.
> or I am for not picking up the sarcasm.
I don't know. I am just obsessed with risc-v and don't even want to dive deep into x86. It just works for me
>>
>>108057944
>I am just obsessed with risc-v
Well, what's the reason? Because I see all these kernels and programs for x64 that, aside from their normal and obvious semantic nonsense, also don't experience good code generation. I see a tremendous amount of waste both in terms of power and human lifetime, and it repulses me on a fundamental level.
So if anything I have too much empathy - exactly what you'd not expect from autism.
>>
>>
AI is so fucking retarded. I hate it so much. I don't and I should not use it ever again.
>copy/translate some verilog code into vhdl
>i missed something
>ask AI what the difference between vhdl and verilog code is
>it tells me something about naming conventions
>Can't even see that 1 out of 3 entities has a synchronous reset and I made all 3 of them asynchronous.
Fucking hell man.
Note: Do not ever use AI again. Do. Not. Use. AI. It's stupid. It can't do anything. It only costs time
>>
>>
>>
>>108057432
do you have to have your data chunks next to each other all the time?
if not just keep allocate some chunk on arena
write to that chunk
if chunk runs out of the space get new chunk and write to that
keep a freelist with the chunks
>>
>>108058375
>>108058553
just did 4 pomo meme sessions 50/10 without AI. Feels really good. Was fucking fun.
8 hours done total today. Lets have another 4.
>>
>>
>>
>>
>>
>>108045770
clion is fine if you are OK with the non-commercial license and you need to disable some sort of option to disable something related to AI.
but you will use cmake.
Visual Studio is the best option if you want something that gives you a GUI to manage your build options (windows only)
To use libraries, you should use vcpkg (BUT I believe QT in vcpkg is cursed because Vcpkg likes to build all libraries from source, and you probably don't need any other libraries other than QT since QT is a everything library).
Imgui is good if you want your code to run on the web using emscriptpen, but imgui is mainly for games/tech demos, and it does not have a good unicode / translation system if you know more than 1 language (QT probably has the best translation tools for C++ especially for CJK languages, since QT uses utf-16 for all strings, I think imgui has forks that support unicode better maybe).
If you don't mind being windows only, I think there was some XAML format "win ui 3" whatever that is (works with C++). Apparently some sort of C# UI is cross platform (I didn't read why they need C#):
https://decovar.dev/blog/2025/11/11/cpp-library-in-csharp/
Also turn on address sanitizer, it's pretty much the only way to debug C++.
cmake is a meta build system, which generates a build system, it also relies heavily on caches which might confuse you (delete the cache when changing values). You might get compile / linker errors (or warnings), and you need to understand the compile / link flags (building stuff without cmake helps).
Mingw does work (vcpkg requires msys), and if you use clang (gcc-mingw does not support address sanitizer), you can use undefined behavior sanitizer (has false positives). But mingw requires 2-3 DLL's to be manually copied...(if it's not in PATH which is bad practice), unlike msvc (other than the asan dll...). Vcpkg copies library DLL's when building. You can use vcpkg without cmake or VS studio in classic mode, but it won't copy DLL's for you.
>>
>>
>>
>>
File: Screenshot_2026-02-04_22-09-14.png (90.3 KB)
90.3 KB PNG
I usually have a bunch of terminals with various python scripts running, so now I made a central app with python/curses to handle
1) playing ambient tracks
2) run regular scheduled tasks
3) take commands
4) monitor certain apis and give me alerts under certain conditions
Used .desktop shortcut to style it with a custom icon etc. I think it's cool and useful but maybe I'm slightly autistic
My only regret is I'm not on windows so I can't easily make it sit in tray and not take up space on the same task bar as browser, folders, ect
>>
>>
>>
>>
>>108061977
If you wanna talk about compiler optimisations you should probably know that on the JVM you can get better performing long-running applications than C because of the JIT compiler. This is after 30 years of optimisations. Rust has been popular for less than 10 years and performance for applications that run on a static binary is almost the same.
>>
>>108062037
>you can get better performing long-running applications than C
I need to see the specific program and the explanation for why. Sure, if it's a matter of
>we simply don't return memory to the kernel that's been freed, but keep it mapped in
, then that's not so much a code optimization fuckup and a it's-shit-code fuckup.
>>
>>108062037
The JVM tends to beat badly written applications in other languages, as it's got a really good memory management system and the base classes on top have had a lot of effort invested. Provided the program is long-running; it's nothing like so optimized for short processes.
A well-written C codebase tends to beat almost everything else, as it does fewer copies of data (and Fortran is very good for some things). C++ and Rust are theoretically capable of getting up to those speeds, but almost nobody manages it as it's very very easy to lose sight of where the copies are happening. Copies of things like data structures and strings (especially in a loop) are where the costs mount up.
>>
>>108061977
given you don't have void* slop and vtable dispatch for your nih-faux-oop-framework everywhere, ya, probably.
in practice, I write something in C++ or Rust, check asm, and it's nearly identical in many cases. I don't care about C because it isn't a real language outside of babby tier problems.
>>
>>
>>
>>
>>
>>108062152
no, not really. anything you can do in C, you can do better in C++. The only use-case left for C is shitty nonfree compilers for meme platforms no one cares about.
cope if you want, but since C11+, C has just cribbed everything from C++.
>>
>>
>>
>>108062132
>void* slop
And that's relevant because ...?
>vtable
C++ issue.
>>108062146
>programming languages
Now you're talking about programming languages and standard libraries, but I can easily envision some incompetent C programmer who directly uses kernel interfaces (which the compiler will not optimize away) and thus fucks up his performance.
And on the other hand I can easily envision a competent C programmer who bypasses a lot of userspace crap to get exactly the resources that he needs from the kernel, and mogs every other programming language and library out there in the process.
Which is why, when I talk about compiler performance, I don't talk about wholesale program optimizations that make a program run slower or faster than another language or VM. I talk about the actual machine code.
>>
>>108062128
is the difference significant though? especially today? we have game engines written in c++ that perform well enough. ML is done in c++. these are probably the two most intensive things apart from extremely fringe stuff.
if i had to take a very minor performance hit and get rust's safety it's not even a question
>>
>>108062220
>minor performance hit
it's not even a real hit outside of 10+ year fringe, mostly handwritten ASM, ""C.""
on the C++, it more comes down to million man-hours than anything else. I honestly think with time Rust will get all the same bells-and-whistles because it really is that good.
>>
File: normies_get_frustrated.png (77.5 KB)
77.5 KB PNG
>>108062198
I mean, how many benchmarks are there in which people """""prove""""" that C is not the fastest language of them all, and then you look at the actual code, and it's a complete fucking mess no one who actually knows what's going on behind the scenes would've actually written like that?
It goes back to something this random anon wrote years ago.
>>
>>
File: hero_data.png (17.7 KB)
17.7 KB PNG
>>108062220
>we have game engines written in c++ that perform well enough
As someone who's *actually* looked at C++ games ... let's just say that learning how directory iterators work has completely disillusioned me about C++, and that's completely ignoring file I/O and memory layout (which the Factorio devs found out about approximately nine years ago, and which they still haven't fixed, thus locking their game in to a single thread).
And that's a well-optimized game. I can bring out some real stinkers, if you insist.
>>
>>
>>108062303
exposing myself as somone who isn't retarded?
what happens when your sentinel value is a valid value?
in C, you write tagged unions. This insane garbage you posted sounds like the deranged ramblings of a go cuck because only such a shit language would deny the basic understanding of unions, let alone tagged ones. ML fucks were using tagged unions forever, Rust does, most old languages add support for them in some fashion or another.
how retarded are you anon?
>>
>>
>>108062326
>no argument
I accept your concession.
seems like /g/ is still /g/eet central.
learn what a tagged union is, retard. maybe learn why virtually every language also has length prefixed strings too since your shitty screenshot of (You)r post mentioned strings for some insane reason.
>>
>>
>>
How is pathfinding done in games with large maps and hundreds of units moving simultaenously? I made a simple simulation with A* euclidian heuristic (8 directions) in a 1000x1000 grid with random obstacles and it slows to halt when the number of units reach double digits
>>
>>
>>
>>108062585
>How is pathfinding done in games with large maps and hundreds of units moving simultaenously? I made a simple simulation with A* euclidian heuristic (8 directions) in a 1000x1000 grid with random obstacles and it slows to halt when the number of units reach double digits
This is interesting let me know how you solve it. Hypothetically what I assume you're doing is for all 10 unit's you'd be adding 1 mil grid positions and sorting them. But that's way too much. I would personally give them a small radius and then they path find within that radius. So instead of 1 million grid positions its 100 or whatever. The next thing is A* is a heap so maybe what I'd try is to limit my max heap size. So as your units progress they keep adding another 100 grid positions. But if you keep it trimmed such that maybe only the top 500 best positions or whatever and drop the rest that should keep the memory from getting too crazy, but they should still be able to continue path finding. I hope that makes sense. Good luck!
>>
>>
>>
>>
I know people prefer all sorts of different languages, but in my years as a shitty web dev I've come to think that the best languages have a few things in common.
They have a hindley-milner type system, they are immutable, they are functional or able to be functional and are eagerly executed instead of lazily...
What am I missing? I think languages like Haskell have too much overhead to be widespread enough and easily implementable for trivial things, and I'm not convinced that OCaml is able to avoid the pitfalls of not enforcing monads when implementing side effects.
>>
>>108063148
>They have a hindley-milner type system, they are immutable, they are functional or able to be functional and are eagerly executed instead of lazily...
>What am I missing?
That's it? that's not much as far as language wish lists go
>immutable, functional
easy to think that when all you're doing is traverse the DOM, send requests and don't write any library
>>
>>108063290
I was just being self deprecating when mentioning web dev. I want a general purpose programming language.
As for functional, I'm not 100% on wanting a pure functional language or not. I like Elm, but it's obviously limited to front end. I like the looks to Roc, but I could be sold on something like OCaml I guess. PureScript is a pain in the ass. Haskell seems good, but is a bit archaic. I'm not sure if I could dispense with purity and enjoy something like Gleam or OCaml without worrying about the mess they might make down the line... But maybe I can, idk I'm just spitballing on what language to try next I guess.
>>
>>108042427
Why do we need dynamic memory? Couldn't we just glue more pages onto the current stack frame when we are about to stack overflow and force all values that need to be kept alive to be returned from the current stack frame?
>>
>>108063362
>force all values that need to be kept alive to be returned from the current stack frame?
Returning requires the stack pointer to point towards the return address at the moment of the return. Anything beyond the stack pointer is up for grabs by the kernel, signals/APCs, or debuggers, meaning you have to copy your values around. And where do you copy it to in the first place?
>>
>>
>>
File: ebussACK.jpg (41.4 KB)
41.4 KB JPG
>>108062174
>Year of our lord 2026
>C++ STILL does not have array designated initializers
>C++ STILL requires struct designated initializers to be in the order fields were declared
>Reading from the wrong union field is STILL undefined behavior in C++
>C++ is better
ahahahaha
>>
>>
>>
>>108063148
no, that's all correct, you should just get over that fixation with monads. There's much more to correctness than fussing about with side effects, and with a real module system you can enforce monadic style if you want.
>>
>>
>>
File: goalpost_moving.gif (2.3 MB)
2.3 MB GIF
>>108063539
>anything you can do in C, you can do better in C++
>actually not those things
>>
>>
File: mqdefault.jpg (6.2 KB)
6.2 KB JPG
Dim subKey : subKey = "HKEY_CURRENT_USER\Console\CincoTerminal\"
' 1. Create the "Second" registry key (isolated from global CMD)
' This sets a large font and Lucida Console that works on monitors small as 800x600 for "CincoTerminal"
shell.RegWrite subKey & "FontSize", &H0018000C, "REG_DWORD"
shell.RegWrite subKey & "FaceName", "Consolas", "REG_SZ"
shell.RegWrite subKey & "FontFamily", 54, "REG_DWORD"
shell.RegWrite subKey & "FontWeight", 700, "REG_DWORD"
' CreateObject("WScript.Shell").Run CincoDir
Select Case Cinco_Computer_Greeting
Case True
' Whatever AI did here to make the CMD be colored this way, I suppose. It works. IDK
Dim esc : esc = Chr(27)
' THE PALETTE
Dim blueBG : blueBG = esc & "[40m" ' Sets background to Blue
Dim blackBox : blackBox = esc & "[40m" ' Sets background to Black
Dim whiteText : whiteText = esc & "[37m" ' Sets text to White
' This command sets the whole window blue, then prints "TIMER" with a black highlight
CincoConsole = "cmd.exe /c start " & q & "CincoTerminal" & q & " /max " & _
q & CincoDir & q & " cmd.exe /k " & _
q & "color 90 && cls && echo " & _
whiteText & blackBox & blueBG & " (The only one I care about is Celery Man, sorry.) && " & _
"prompt Cinco $G " & q
CreateObject("WScript.Shell").Run CincoConsole, 3, false
Case Else
' Do Nothing
end Select
anything you can do, you can do in visualbasic script
CMD.exe can also do << >> and other bitwise logic
>>
>>
>>
I forgot to demonstrate the actual message (not caring about others)
>>108063689
change console part:CincoConsole = "cmd.exe /c start " & q & "CincoTerminal" & q & " /max " & _
q & CincoDir & q & " cmd.exe /k " & _
q & "color 90 && cls && echo " & _
whiteText & blackBox & blueBG & " (The only one I care about is Celery Man, sorry.) && " & _
"echo. Good morning Paul. " & "&& pause &&" & "&& " & _
"echo. What will your first sequence of the day be?" & _
"cls && prompt Cinco $G " & q
CreateObject("WScript.Shell").Run CincoConsole, 3, false
Case Else
' Do Nothing
end Select
later on I pause (with WIndows XP compatibility) with this but the whole thing didnt fit indim Cinco : Cinco = " Self=127.0.0.1 " ' Computer is Cinco.
Sub Window_onLoad
call celeryMan(1)
CreateObject("WScript.Shell").Run "cmd /V:ON /k echo Cinco Timer Generator && " _
&"set"&Cinco &"&& ping !self! -n 5" _
&" &&EXIT", 7, true
call celeryMan(2)
>>108063749
the only part was the CMD colors and I would never have known it could do that without AI
>>
File: loop.png (109.1 KB)
109.1 KB PNG
Self taught and very new. I'm making a very simple deck stat tracker in python. This is what I have right now and it works fine but I wanted to add protection in case I'm retarded and put in the wrong number or something. My first thought was just to have it break the loop if I give an invalid option (as seen in pic rel) but then I realized that while it works for the first option it'd be annoying to have to restart later on. My first thought it to make each step a nested loop so I can break and just go up a level if I'm retarded but something tells me there's a better way than just making a bunch of nested loops so I figured I'd ask here before I do that
>>
>>
I'm asking here because I have no clue what to search and minimal knowledge
Recently interested in a unity game that has a dll mod that injects some changes, it has "plugin support" where you can load your own dlls, however I've never done this and worse it's in rust
reading up examples, it opens the game itself and reads a "vtable", and whatever code you write you hook to an il2cpp function so that it runs whenever the game calls the function
where can I learn more about this?
>>
File: 1750864978456235.gif (1.8 MB)
1.8 MB GIF
>The compiler is unable to type-check this expression in reasonable time.
>>
>>108064068
>il2cpp
https://www.ntcore.com/files/dotnetformat.htm
https://learn.microsoft.com/en-us/windows/win32/debug/pe-format
>>
>>
>>108064210
unfortunately I'm not knowledgeable enough to know what's going on. I usually get that shit when working with ternary expressions or when a statement is dependent on a variable shared amongst multiple structures / classes....
It just lets me know that I need to fix my shit or try something different
>>
>>
File: dfwefesf.webm (627.5 KB)
627.5 KB WEBM
>>108061774
I was able to make a pseudo tray app with just default tkinter. This is gonna save me so much clutter, awesome
>>
>>108061774
>>108064601
>let me spend all of my free time developing useless scripts on an obscure, dated, straight out of 2007 operating system that 10 people across the world use
how do you retards pay bills?
>>