[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: programmer.mindset.jpg (87 KB, 1080x1011)
87 KB
87 KB JPG
What are you working on, /g/?

Previous: >>103215223
>>
File: forth.png (13 KB, 959x349)
13 KB
13 KB PNG
I've had this one in my pocket but haven't messed with it in a while.
https://www.ideone.com/uXPtsd
\ Picture words give a flag based on x and y.
0 Value x 0 Value y \ 10000x fixed decimal.

: -squared ( nn-n) - dup 10000 */ ;
: disc ( rxy-f) y -squared swap x -squared + > ;
: udisc ( -f) 10000 0 0 disc ;

: vert ( -f) x -1500 -6000 within ;
: horz ( -f) y -2000 -4000 within ;
: smash ( -f) vert horz and udisc and ;

: top ( r-f) 0 -5000 disc ;
: bot ( r-f) 0 5000 disc ;
: wave ( -f) 2500 bot 2500 top invert x 0< and or ;
: eyes ( -f) 350 bot 350 top or ;
: yinyang ( -f) udisc wave xor eyes xor ;

: pit ( -f) x 7143 1429 within y 1429 < or ;
: turn ( -) x negate y to x to y ;
: manji ( -f) true 4 0 DO pit and turn LOOP ;


\ Given the 8 low bits, emit Braille U+28XX as UTF-8.
: emitb8 ( c-) ?dup-0=-IF $80 THEN $E2 emit
dup 6 rshift $A0 or emit $3F and $80 or emit ;

\ Braille dot row/col for each codepoint bit.
: CVals ( -;i-c) Create does> + c@ ;
CVals dr 0 c, 1 c, 2 c, 0 c, 1 c, 2 c, 3 c, 3 c,
CVals dc 0 c, 0 c, 0 c, 1 c, 1 c, 1 c, 0 c, 1 c,

\ Screen row/col/dot to pic x/y, -10000 to 10000.
0 Value r 0 Value c 0 Value d Defer pic ( -f)
12 dup Constant hgt 2* Constant wid
: toy ( -) r 4 * d dr + -5000 hgt */ 10000 + to y ;
: tox ( -) c 2 * d dc + 10000 wid */ 10000 - to x ;
: dotbit ( -c) toy tox pic 1 and d lshift ;
: calcb8 ( -c) 0 8 0 DO i to d dotbit or LOOP ;
: line ( -) wid 0 DO i to c calcb8 emitb8 LOOP ;
: draw ( x-) hgt 0 DO i to r cr line LOOP ;
\ ' smash is pic draw

: 3pic ( -xxx) ['] smash ['] yinyang ['] manji ;
: 3line ( xxx-) 3 0 DO is pic line 2 spaces LOOP ;
: 3draw ( -) hgt 0 DO i to r cr 3pic 3line LOOP ;
3draw
>>
File: f.png (380 KB, 480x479)
380 KB
380 KB PNG
You know it.
>>
>>103230980
explain that picture
>>
>>103231183
Common coder mindset where we alternate between realizing that deep down we're complete frauds that don't deserve our jobs, let alone the respect of our peers, and realizing that fixing that long standing issue was completely trivial to us as we mog the rest of our team with a glorious and eleganto pull request that instantly passes all checks, leaving the whiniest of PR reviewers with nothing to nitpick on but the name of short scoped variable.
The flip can happen several times a day in severe cases.
>>
File: haskell_uh_no.png (608 KB, 1893x806)
608 KB
608 KB PNG
>>103231182
>>
>>103231062
I find it appropriate that the URL for the Forth program has "Ptsd" in it. UX PTSD, even.
>>
>>103230980
Language learning app, a cross between duolingo, quizlet and tripadvisor. Basically learning specific language for specific situations when traveling/expatting and getting suggestions on how/where to apply it.

Feel like a massive fucking imposter, and my life is currently hell. I'm in way too deep, and still feel there's so much to do.
>>
>>103230980
Take your bipolar meds if that pic is you.
>>
I finally experienced "don't trust a paste solution without verifying it works". String replacement function. Only replaced the string if the replacing string was longer or shorter than the original, not same size. Lost fucking WEEKS of debugging byte code because it wasn't that obvious with other things going on.
>>
>>103231351
AI revolution, everyone
>>
File: 1707802844075498.jpg (48 KB, 690x690)
48 KB
48 KB JPG
i am expeirimenting with AI to help me with my python script. but the code it gives me doesn't work for fibonacci numbers around 2^1 million in size.

when i tell gpt this it says there arent enough atoms in the universe or something and to do the 10,000th fibonacci number instead, which isnt what i want. i have tried to ask it to find other ways to do it but it keeps giving me different messages like there arent enough bytes on earth and then it gives an even smaller fibonacci number than last time.

i thought AI was supposed to be smart?

import numpy as np
from numba import cuda
from collections import defaultdict

# GPU kernel to compute Fibonacci numbers
@cuda.jit
def fib(n, fib_array):
idx = cuda.grid(1)
if idx < n:
a, b = 0, 1
for _ in range(idx):
a, b = b, a + b
fib_array[idx] = a

def create_inverted_index(fib_numbers):
inverted_index = defaultdict(list)
for idx, value in enumerate(fib_numbers):
inverted_index[value].append(idx)
return inverted_index

def main():
n = 2**1000000 # Adjust n as needed (keep it reasonable to prevent long computation times)

# Prepare device arrays
fib_array = np.zeros(n, dtype=np.int64)
d_fib_array = cuda.to_device(fib_array)

threads_per_block = 256
blocks_per_grid = (n + (threads_per_block - 1)) // threads_per_block

# Launch the kernel on the GPU
fib[blocks_per_grid, threads_per_block](n, d_fib_array)

# Copy the result back to the host
fib_numbers = d_fib_array.copy_to_host()

# Create inverted index
inverted_index = create_inverted_index(fib_numbers)

# Save inverted index to file
with open('inverted_index.txt', 'w') as f:
for key in sorted(inverted_index.keys()):
f.write(f"{key}: {inverted_index[key]}\n")

print("Computation complete. Inverted index saved to 'inverted_index.txt'.")

if __name__ == "__main__":
main()
>>
>>103231583
False flag, stop making Python programmers look bad
>>
File: sj.png (4 KB, 737x63)
4 KB
4 KB PNG
>thirty minutes to find and edit two bytes
Yep, definitely in the imposter syndrome pit.
>>
>>103231329
Anon it's just a joke
>>
>>103231062
I never dreamed I would meet another based smash player.
>>
File: file.png (62 KB, 1012x559)
62 KB
62 KB PNG
I'm trying my hand at OpenGL and I must say I am in quite a pickle. It seems that there is some form of undefined behavior regarding the quad that I'm rendering: it sometimes only renders one of the two triangles that forms it. I don't know why it does that. I've tried to search online for it but I can't find anything. I've messed with face culling, winding order, depth buffer, stencil buffer. I can't seem to pin down what's going on. Any ideas?
>>
>>103232652
You didn't post your code you retarded nigger
>>
>>103231583
I think it's shit talking your solution, which from the looks of it, is actually mostly its solution.
>>
>>103232652
Use renderdoc to inspect the geometry in the pipeline
Looks like you probably have the winding order wrong, but if you already checked that then idk
>>
This crawls channels for new videos, downloads them, tags them, adds their titles etc... It runs on my Synology every 5 minutes... I want to make it a docker image but I don't particularly want to learn web design to make the frontend etc.
>>
>>103232060
>>103231320
>>103230980
>imposter syndrome
I'm 99% sure this entirely stems from ingratitude. Someone could be in the middle of designing a mobile app or writing an algorithm to edit RAM and they could feel like an "imposter"... why? they have absolutely no regard for how far they've come already, and they can only see their own expectations of themselves.
>>
File: addresses.png (33 KB, 1058x990)
33 KB
33 KB PNG
>What are you working on
Wondering if posting the address of each element was such a great idea after all.
>>
File: triss.webm (1.01 MB, 720x1072)
1.01 MB
1.01 MB WEBM
>>103231583
This Javascript expression evaluates to a function that can calculate Fibonacci numbers a lot faster, O(log n) instead O(n):
(f => n => f(f)(n)(1n)(0n)(0n)(1n))(
f => n => a => b => p => q => n ? n & 1 ?
f(f)(--n)(b*q + a*q + a*p)(b*p + a*q)(p)(q) :
f(f)(n >> 1)(a)(b)(p*p + q*q)(2n*p*q + q*q) : b)

The AI is right: you are retarded AF because there is not enough matter in the visible universe to store Fibonacci(2 ** 1'000'000).
>>
>>103233043
how come there aren't more fonts like that
>>
>>103231182
I love it.
>>
>>103230980
>Imposter Syndrome
If you actually get those you're an actual imposter.
>>
>>103232875
Would a winding order problem make itself visible only sometimes? The quad renders fine at times, then it gets cut.
>>
If you spell impostor wrong you are a retard and probably also an impostor.
>>
https://grammarist.com/spelling/imposter-impostor/
>Impostor has the edge, and it is the form recommended by most English reference sources, but imposter is not wrong.

In a just world you'd be forced by law to commit suicide now.
>>
Need to implement firmware that talks over usb.
Is there any point in encrypting the communication?
>>
>>103231302
fellow haskell bros... our response?
>>
Today I will remind them.
>Haskell computations produce a lot of memory garbage - much more than conventional imperative languages. It's because data are immutable so the only way to store every next operation's result is to create new values. In particular, every iteration of a recursive computation creates a new value. But GHC is able to efficiently generate garbage, so it's not uncommon to produce 1gb of data per second.
>>
i think we can all agree it's impstr
>>
File: ovr.png (6 KB, 732x190)
6 KB
6 KB PNG
>always complain about quality of modern compiler output
>debug old game
>see this

It's a Turbo Pascal application by the way.
>>
>>103233921
that's almost enough memory to represent ur mom
>>
what i don't like about haskell is that to get decent performance the expectations of the programmer are insanely high. you make a minor mistake that nobody would expect even a senior developer in any other language to understand, and your program is now hellaciously slow
>>
>>103233921
Why doesn't the compiler just internally mutate variables instead of working in a pure way?
>>
File: stupidity.png (22 KB, 620x576)
22 KB
22 KB PNG
>>103234023
>>
>>103234026
"The man who asks a question is a fool for a minute, the man who does not ask is a fool for life"
>>
for me it's sus amogus
>>
i been working on thefastscrolls.neocities.org
>>
>>103231183
An imposter with imposter syndrome.
>>
>>103233921
This is your brain on avoiding memory pools and memory arenas.
>>
>>103234325
that's pretty funny
>>
Scanner scanner = new Scanner();
>>
>>103234514
>this creates garbage and makes Java clean it up constantly when Java compiler knows all types and can just create generational arenas for each type
grim
>>
>>103234514
>there is only ever one instantiation of this class
>>
>>103234529
This is why God invented
Scanner scanner = new Scanner(System.in);
scanner.close();
>>
for me it's
struct car *car = car_new();
>>
i hate c++ so much it's unreal
https://devblogs.microsoft.com/oldnewthing/20241118-00/?p=110535
>>
>>103234581
This still creates garbage, Java GC needs to clean it up. Shit by design.
>>
>>103234586
for me it's just
Car car;
>>
I just started learning C++ this month with previous coding experience so I would say I'm also a beginner with backend. Unity uses C# but it kind of does everything for you in terms of setting up projects.
What do you think of this roadmap in terms of learning? C++:basic External Libraries,basic API/REST >> Start HTML and CSS immediately >> Go back to C++ once basic site is up to get those two to work together.
>>
>>103234664
Um sweaty...
std::auto::decltype<std::type_traits::auto> car {( [this](){ std::boost::type_Inference<std::experimental::dpt_autist_allocator> Car )}
>>
>>103234590
i wish i can understand what any of this means
>>
>>103234811
you don't. stay as far away from the retardation of c++ and its standard library as you can
>>
>>103234807
yeah, it be like that when coding generic libraries. but 99% of the time it's
Car car;
>>
>>103234870
I'm only starting out and I like it so far.
>>
File: Capture.png (9 KB, 509x138)
9 KB
9 KB PNG
Why do you need to declare a const for the array? I was able to make it work with just doing
int numbers[5];
Is it good practice or something?
>>
>>103234948
>Why do you need to declare a const for the array?
you don't need to in C. C++ doesn't have variable length arrays. you can google why.
>>
>>103234986
Thanks
>>
List<String> varName = new ArrayList<>();
Or
ArrayList<String> varName = new ArrayList<>()
I feel like I heard somewhere it's better to do the first
>>
>>103235123
Thats the only way to do it in C# iirc
>>
>>103235127
I'm dumb actually dont look at that post
>>
File: 1714235871381271.png (351 KB, 839x768)
351 KB
351 KB PNG
odd that apple would name their executable format "macho"
>>
>>103235187
https://en.wikipedia.org/wiki/Mach_(kernel)

retarded frogposter
>>
File: 1707526075409407.jpg (79 KB, 708x800)
79 KB
79 KB JPG
>>103235202
problematic and toxic
>>
>>103235123
the entire point of interfaces is not needing to care about the type of the implementation
>>
>>103235308
We all know the point is to break the patheticness that is circular dependencies.
>>
>>103235318
reality is a circular dependency
>>
File: 1708732267494589.gif (2.95 MB, 500x500)
2.95 MB
2.95 MB GIF
>>103235333
>understanding my program structure requires solving the N-body problem
>>
>>103235123
dynamic varName = new Stuff<dynamic>();
>>
>>103235308
Ah so it's for abstraction purposes
>>
>>103235353
Can we make a Taolang where you HAVE to hsve a circular dependency between every single part of your program? Surely that will be most harmonious.
>>
perhaps the worst dependency of all is that between program and programmer
>>
>>103235461
no it's python
>>
>>103235424
I genuinely think this should exist without the forced part. Circular dependencies are the primary element destroying the cleanliness of a codebase. You should be able to put code where it makes sense in as many folders as you want, not having to bizarrely manipulate the code into modules that solely exist to prevent circular dependencies.
>>
>write code
>to earn money
>to buy food
>to stay alive
>to write code
>>
>>103235476
for me it's
>write code
>to write code
t. unemployed
>>
>>103230980
A small lisp/shell since I've never written an interpreter before.
>>
Turns out that swiping on mobile devices does not play well with css' scroll-snap-type when manually setting a scrollLeft value while the screen is still moving after the user has swiped (and released the screen).
For some godforsaken reason it causes a weird rubberbanding effect where onscroll is occasionally triggered with a target.scrollLeft value that does not at all represent what is happening on the screen.
If anyone reading this is trying to make an infinite scrollable list on mobile, you're better off programming the snapping effect manually.
>>
>>103235476
For me it's
>write code
>to learn to code in free time
>so I can make a cute game for my wife and helper apps for the boardgames at play
>>
>>103233043
>go
>docker image
why?
>>
What the fuck even is docker to be honest. I've never had to use it
>>
never used to deploy anything but I used it once to setup a build environment that wouldn't fuck my own system libraries
>>
>>103235814
Encapsulation for servers run by admins that are too dumb to understand users.
>>
>>103235814
Docker in a nutshell is a way to standardize a bundle of software (called a container), which ensures that it can run on ANY platform that is able to run Docker.
Containers are basically very, very efficient virtual machines.
>>
>>103235814
It allows you to create software that will run anywhere on everything the same way. Reliable and predictable.
>>
>>103235839
>it's le Java, but better
>>
>>103235814
it's a workaround for the mess that is dynamic linking
>>
>>103235842
>>103235839
>>103235854
hmm thank bros. Using it to set up a venv does't sound like a bad idea. Might look into it and use it for some specific things
>>
>>103235839
You will never escape Java
>>
love java, me
>>
>>103235814
>>
>>103235911
Unironically me
>>
>>103235916
this actually explains docker in one picture
>>
>>103235850
>>103235907
What the fuck are you niggers on about?
>>
>>103235958
Zoomer detected. The
>bro it runs wherever the VM runs
argument was one of the stronger selling points of Java back in le day.
>the other was "no pointers"
>>
>>103236071
Yes, and both of those points served Java well in popularizing it.
Java isn't a bad language because it can run pretty much everywhere, it's a bad language because it is riddled with the boomerism that is OOP.
>>
>>103232060
bah, that's normal. debugging being twice as hard as programming, and all that...
>>
>>103235814
docker is software that is most commonly used to simulate an actually good distro on top of a host running slop like debian
>>
>>103236096
>Java isn't a bad language because it can run pretty much everywhere
I'm not saying that either. What I'm saying is that I don't trust the quality of the abstractions that allow the VM to run your code in the first place. For example I would be shocked if you told me that Java interally uses NtCreateFile for file accesses on Windows, because that would require them to mess with the Win32 prefix.
>>
>>103236154
>What I'm saying is that I don't trust the quality of the abstractions that allow the VM to run your code in the first place.
That is extremely retarded.
I'd rather have something that works and takes half a milliseconds longer to execute than something rather than something that barely functions because all of the development time has been spent on optimizations.
Java is a terrible language, but when it just came out it was a breath of fresh air compared to the alternatives.
>>
>>103236173
You're extremely retarded.
>>
>>103236173
>I'd rather have something that works
Problem is, they've had over twenty years to make it work. At some point the "it works on my machine" argument doesn't work anymore.
>>
love java, me
OOP? You mean God's gift to man? Yes, I love that too
>>
>>103236264
As long as OOP doesn't include RAII: good for you.
>>
>>103230980
think i may be in love with c# bros...might even do AoC with it this year
>t. sepplesfag for years
>>
I got esp32cam, it works when it's connected to arduino ide but when I try it with minicom it seems to get stuck in boot loop.
The minicom doesn't show anything or just bootloader messages so I think it doesn't even get to the setup function because that printf and tries to flush the serial.
Any idea what's happening?
>>
>>103236120
Doesn't fly.
I've got a buddy over at Rockstar who's 8 years years younger than me and has been reverse-engineering shit for 8 more. I'm nothing compared to him.
>he somehow thinks I'm the better programmer though
>>
>>103236120
rust doesn't have this problem
>>
>>103236976
Does Rust allow me to assign registers to parameters and/or return values?
>>
>>103236999
knock yourself out and see if it does
https://doc.rust-lang.org/reference/inline-assembly.html
>>
>>103237014
I don't know enough Rust to come up with a prototype, but I fear it's going to croak the same way as >>103228416.
>>
>>103236976
but it has many other problems including not having this problem
>>
>>103235123
if it's List<String> varName, you can then assign any implementation of List (ArrayList, LinkedList, Vector or whatever else) to varName and it'll work. if it's declared as ArrayList<String> varName, you can only assign an ArrayList (or a class that extends it) but not a different type of List
if you don't care if it's even a List, you can replace it with Collection<String>, then you can also assign other implementations of Collection, like HashSet, LinkedHashSet, TreeSet in addition to any implementation of List (because it also implements Collection).
on the other hand, if it's declared as List or Collection (or more generally, an interface or superclass), you won't be able to use methods/fields from the specific implementation unless you assigned to it, only those that are declared by List or Collection (eg. you don't have a .get(index) method with just Collection, you need a List)

general rule is to use as generic/abstract interfaces as feasible
>>
sweet, just got my daily dose of Internal Compiler Error in MSVC. I swear, this compiler is so fucking trash.
>>
>>103237277
switch to clang or gcc. ms isn't supporting it anymore
>>
File: 1724921282445266.jpg (31 KB, 654x720)
31 KB
31 KB JPG
I want to unfuck my brain from not being able to do a project without trying to find a tutorial who implement what I want to make.
So I took pic related, generated a random number and landed on project number 4: Brainfuck Interpreter.
Ok my langage is Java, I googled what Brainfuck was. Now what?
>>
File: 1709990092474024.png (160 KB, 1046x746)
160 KB
160 KB PNG
>>103237347
Forgot I was supposed to post this
>>
>>103237322
so far my project supports all the 3 major compilers, but MS isn't making this easy for me.
>>
File: 1077 - SoyBooru.gif (89 KB, 544x503)
89 KB
89 KB GIF
>SQLAlchemy
>>
>>103237406
>support only clang and gcc
>say you don't support MSVC but patches are welcome
>retards who actually care can go through humiliation ritual and do your work for you
>>
>>103237347
Read into what an interpreter and a parser are.
>>
Do academicfags hate writing code or what?
>>
>>103237577
Absolutely. Bootlicking doesn't require skill.
>>
>>103236264
>MainFactoryFactory
>>
>>103237234
Appreciate the spoon feeding
>>
>>103237014
if you inline assembly into any program isn't that a surefire way to make sure it's not cross-compatible with any other architecture...? I seen in the docs it supports many different architecture operands/registers- does it support all of them on all running architectures or just the respective ones?
>>
>>103237667
>I seen
retard
>>
>>103237347
>>103237361
26 minutes left
>>
What's the best way to do C#/Java-style runtime reflection and method hooking in C++
>>
OKAY I've figured out the correspondence between languages
C ~~ C++ {FORTRAN} :: Java
Zig ~~ Rust {Scala} :: Kotlin
Go ~~ Haskell {Erlang} :: OCaml

I've had to invent new notation which is self explanatory
>>
>>103237893
meds
>>
>>103234514
in k this is just 0:1
>>
Cannot thing of a single reason to use Zig
>Oh but have you read https://ziglang.org/learn/why_zig_rust_d_cpp/
Yes....
>Why Zig When There is Already C++, D, and Rust?
Mentions Rust only here
>Rust has operator overloading, so the + operator might call a function.
Oh right so I should use Zig over Rust because of operator overloading?
Just don't use operator overloading. Simple as
>>
>>103236197
>they've had over twenty years to make it work
But it does work?
What problems are you experiencing?
>>
>>103238040
>>103236154
>>
>>103238049
"I don't trust it" sounds like a (you) problem, anon.
>>
File: ntcreatefile.png (23 KB, 1038x724)
23 KB
23 KB PNG
>>103238053
To the contrary.
"I trust it" sounds like a (you) problem, anon. Anyone who's seen the same shit I've seen wouldn't.
>>
>>103238072
why do you keep posting decompiled code? you know that decompilation tells you nothing about how the actual source was written, right?
>>
I've stopped even checking if Rust female developers are actually females. I come across one like https://github.com/lilith and just assume it's a troon
>>
>>103238072
Anon, what the hell are you talking about? Are you a schizo?
>>
>>103238100
Female developers use Ruby like that tripfag Rubyist
>>
>>103238092
shhhh, he just found out about ghidra and thinks he's a h4x0r
>>
>>103238100
Are you slow or something?
Expecting an actual woman in Rust's community is like peering into a beehive and expecting to see a hedgehog.
Just do what I do and ignore the community entirely.
>>
>>103238103
yes, he is
>>
>>103238119
It's just crazy. I probably clicked on literally 100 profiles with a female avatar and there are exactly zero actually female developers

Libs must be confused because now they have to accept that there are enough women even though deep down they know nothing has changed
>>
>>103238092
>he doesn't understand how decompiled code works
Alright, decompliation for retards:
It doesn't show you *exactly* what is going on, but it's generally very good at showing you function calls, like to RtlReleaseRelativeName, RtlFreeHeap, RtlInitUnicodeStringEx (which is a complete fuckfest as it iterates over the entire string), or RtlDosPathNameToRelativeNtPathName_U_WithStatus (which takes close to one million cycles to complete, see picrel).
Guess how many of these function calls are not required if you manage the Win32 prefix yourself.
>>
>>103237893
do lisptards really?
>>
>>103238103
>he doesn't know
I don't know how I can make it anymore obvious other than resorting to toddler speak. Do you want me to talk to you like a toddler?
>>
>>103238161
>Do you want me to talk to you like a toddler?
Yes.
>>
File: CreateFile_internals.png (441 KB, 1448x8685)
441 KB
441 KB PNG
>>103238191
Java uses very slow functions internally because they didn't bother looking at what these functions do, and if there's any alternatives that might be faster.
>functions like what
CreateFileA/W, for example. That do a lot of unnecessary stuff for the sole purpose of backwards compatibility.

>sorry for my poor toddlerspeak, I haven't used it in forty years
>>
>>103238108
One female dev I know works at IBM as an AI engineer, probably involved in text preprocessing (her PHD is an in-depth regex project for LLM training). The other is essentially involved in CSS/html compliance for colorblindness and screen narration. I love them both.
>>
>>103238314
>Java uses very slow functions internally because
Slow against what? Do you have benchmarks available to share?
And what slowdown size are we talking about? Hours? Minutes?

Also, Docker is written in Go, not Java, so your point is completely irrelevant.
>>
I wanna get into "low" level languages. Been doing too much CRUD tier shit in recent years.

Should I start writing C? Or maybe C++?
>>
File: more_proof.png (49 KB, 1894x506)
49 KB
49 KB PNG
>>103238354
>Slow against what?
Slow against code that doesn't need to call RtlDosPathNameToRelativeNtPathName_U_WithStatus and RtlInitUnicodeStringEx. Code that doesn't have to allocate memory for a string copy. Code that doesn't have to release a path copy using RtlReleaseRelativeName. Code that doesn't have to load extended attributes. Code that doesn't have to select a procedure. Code that doesn't have to query file information.

>Do you have benchmarks available to share?
>>103238144
The number after each output line (O:) shows the number of cycles. RtlDosPathNameToRelativeNtPathName_U_WithStatus takes 950,740 cycles, RtlInitUnicodeStringEx 2,240, SbSelectProcedure 3,255.
NtCreateFile is cut off in that post's picrel, but in this post you can see that the actual call usually only takes 70K.

>Also, Docker is written in Go, not Java
Want me to look at what Go uses interally?
>>
>>103238437
>shows the number of cycles
And how much time does a single cycle take?
>>
File: part_of_the_problem.png (397 KB, 828x683)
397 KB
397 KB PNG
>>103238466
~3 billion is usually one second.
>inb4 doesn't matter
Yeah, I've heard that for thirty years now.
>>
>>103238397
C first, C++ after a few months. Assembly while you're doing C. Get IDA/Ghidra/Binja/r2 and disassemble your C programs. Reading and modifying existing code written by more skilled people is also very helpful. Old idTech3 based games are good for this, because they're mostly written in fairly straightforward and readable C, with small sections of C++.
That's how I did it.
>>
>>103238144
holy shit I thought you were just pretending but you're literally retarded and don't know shit about decompilation
>>
File: you.gif (1.43 MB, 288x204)
1.43 MB
1.43 MB GIF
>>103238500
>>y-you're retarded
>doesn't explain how
Nah, I think (you) don't know shit.
>>
>>103238480
...anon, we're talking about a loss of less than 0,3 milliseconds.
How does this make the software "not work"?
>>
>>103238511
I never said it *doesn't* work. What I said was they had over twenty years to make it work. You'd think they used that time to really optimize the shit out of their VM.
>0,3 milliseconds
There's also side effects, like address translations and caches being evicted due to needless allocations and copies. Those I can't measure, but considering that RAM is a couple hundred to a thousand times slower than a CPU ...
>>
>>103238553
write your own faster JVM to prove your point, no one cares about hypothetical improvements

>they had over twenty years to make it work
that implies it doesn't work now
>>
>>103238553
>I never said it *doesn't* work.
I literally asked you: "But it does work? What problems are you experiencing?".
To which you replied with ">>103236154" which is a post about you not trusting the underlying code to be as efficient as humanly possible.
Which has absolutely nothing to do with the software working.
>Those I can't measure, but considering that RAM is a couple hundred to a thousand times slower than a CPU ...
So, the software is at the most 300 milliseconds slower than it could be.
I think I'll stick with my earlier assessment: you're a schizo. I hope your family forces you to seek help.
>>
Linters are distressing. It kept warning me to change things to pointers and now it's slower coz pointers love the heap. And my ocd cannot ignore the messages until it's all clean.
>>
>>103238144
Is this the registry dumper guy
>>
>>103238596
>write your own faster JVM to prove your point
Not worth the effort.

>that implies it doesn't work now
So sorry for your brain damage.

>>103238597
>But it does work? What problems are you experiencing?
It being slower than necessary.
No, you know what, continue writing retarded code, I don't care. You're all so fucking dumb it's not even funny.
>>
>>103238633
yes
>>103238612
go outside without a phone for at least 2 hours and calm down, fag
>>
>>103238635
>Not worth the effort.
well there you have it
>>
File: women in tech.jpg (195 KB, 1024x1024)
195 KB
195 KB JPG
>>103238134
>>
>>103238650
Yeah, it'd just waste time on absolute garbage to prove something a toddler can figure out. There you have it.
>>
>>103238635
>It being slower than necessary.
And how does the code being 300 milliseconds slower than it could be impact how it works?
>No, you know what, continue writing retarded code, I don't care. You're all so fucking dumb it's not even funny.
Anon, you're a fucking retard. You're hyperfocusing on something that literally does not matter.
I will say it again: I'd rather have "slow", functioning software than fast non-functional software.
>>
>>103238691
That's because you're mediocre.
>>
>>103238492
What about Zig or Hare or the new shit
>>
File: cola cat.jpg (85 KB, 720x891)
85 KB
85 KB JPG
>>103238707
Talk about a non sequitur.
>>
I caused a security incident at work because McAfee flagged the WinPython launchers as trojans
Now I have to live with the weight of my mistake (I have to program in PowerShell)
>>
>>103238737
Mediocre mind.
>>
>>103238755
Well, obviously? Wouldn't be here if I was a genius.
But try actually answering the post next time, schizo-kun.
>>
>>103238762
I have no idea how to answer a question like
>And how does the code being 300 milliseconds slower than it could be impact how it works?
without laughing in your face.
>>
>>103238778
Is that because your brain can't come up with an explanation to protect your worldview so it causes you to experience an emotional shock that you don't know how to handle?
>>
>>103238825
No, it's more because I have pride.
>>
>>103238849
How does your pride cause you to fail to come up with an explanation to protect your worldview?
>>
>>103238856
Because I believe every cycle your code takes longer than it needs to is proof you fucked up. You personally.
>>
>>103238872
>Because I believe every cycle your code takes longer than it needs to is proof you fucked up.
How does software being milliseconds slower than it possibly could be make it unusable?
I'll remind you that optimizing software takes time. If you spend time optimizing your software, you won't have time to implement actual functions.
>>
>>103238884
>I'll remind you that optimizing software takes time.
I'll remind you it says a lot about you when it takes you more than twenty years to optimize software.
>>
>>103238893
Why would anyone waste many hours on painstakingly optimizing software only to gain in the absolute best case scenario a mere 300 milliseconds when that same amount of time loss has caused exactly zero problems in the past?
>>
>>103238909
Pride in your craft.
>>
File: file.png (63 KB, 571x464)
63 KB
63 KB PNG
>>103238893
>people should spend weeks tracking down every single inefficiency of a few milliseconds, because... because... THEY JUST SHOULD, OK???
>>
>>103238922
So anyone who doesn't waste days, if not weeks, of their time doesn't take pride in their work?
Okay, sure. How does this relate to the software not working, though?
Java works. Docker works. Why do no perfect alternatives exist?
Are there truly no people in the world that take pride in their work?
>>
File: FindNextFileW.png (176 KB, 1448x3467)
176 KB
176 KB PNG
>>103238923
>50/Day
Now think about how many times software opens or writes a file. How many times software traverses a directory. How many times it allocates memory. In a fucking VM that is deployed on Lord-knows how many devices.

CreateFileW is my go-to example. Other functions are not better.
>>
>>103238960
>Now think about how many times software opens or writes a file. How many times software traverses a directory. How many times it allocates memory. In a fucking VM that is deployed on Lord-knows how many devices.
Unless you mean to claim that the time lost by such inefficiencies is greater than the average human reaction speed, your point is moot.
Again, by your own admission we're talking about a loss of time of around 0.3 milliseconds.
>i-it adds up
No, it does not. Modern computing is mostly concurrent.
>>
>>103238948
>Why do no perfect alternatives exist?
Because people are being fine with being mediocre.
>Are there truly no people in the world that take pride in their work?
Not developers. But then again they don't consider using AI cheating, either.
>>
>>103239023
>Because people are being fine with being mediocre.
>Not developers. But then again they don't consider using AI cheating, either.
I have superpowers.
See? Just by saying something does not make it true.
>>
>>103238994
>No, it does not. Modern computing is mostly concurrent.
How much software have you reviewed? Because the one I got my data from - Factorio, which is lauded as being very well optimized - is doing concurrency only during rendering. File I/O is painfully single-threaded, and so are most engines out there.
>b-but muh out-of-order execution
Did you know that SYSCALL instructions are essentially fences?
>>
File: 1714197118621714.png (136 KB, 809x579)
136 KB
136 KB PNG
>>103238144
Here you go anon, baby's first introduction to compiler optimizations
>>
>>103239056
Why are you ignoring the parts of my posts that show how blatantly retarded you are?
>Unless you mean to claim that the time lost by such inefficiencies is greater than the average human reaction speed, your point is moot.
>Again, by your own admission we're talking about a loss of time of around 0.3 milliseconds.
>>
>>103239030
I've proposed the registry dumper challenge months ago. Thus far no one even attempted a prototype. Nuff said.
>>
>>103239077
I just told the people in my room to tell me if you're not gay.
I didn't hear anything. Need I say more?

See how retarded you sound?
>>
File: compiler_are_garbage_1.png (94 KB, 1920x3200)
94 KB
94 KB PNG
>>103239073
>>Unless you mean to claim that the time lost by such inefficiencies is greater than the average human reaction speed, your point is moot.
OK. They are. I wait twenty seconds for Factorio to boot up, and that's unacceptable. There's also other software that takes forever to boot up, or that has input lag due to fuckups.

>>103239058
Please tell me more about optimizers, the relentless beasts.

Retard.
>>
>>103239090
No. You've solidified that you're a burden to software engineering as a whole, that you're a part of the problem. If that's not enough to kill yourself nothing will.
>>
>>103239106
>I wait twenty seconds for Factorio to boot up
Twenty fucking seconds? Are you running it on a laptop from 2007 or something?
>and that's unacceptable.
Well, alright. Here's your chance to prove that it's possible to speed up this process.
I'd like to see you de-compile the executable, modify it and re-compile it.
Go on, I'll wait for your benchmarks.
>>103239114
"Nuh-uh" is not an argument.
Reality is not limited to your own subjective reality.
>>
File: crystal.png (35 KB, 672x592)
35 KB
35 KB PNG
>>103239129
>Twenty fucking seconds? Are you running it on a laptop from 2007 or something?

>"Nuh-uh" is not an argument.
It is. Period.
>>
>>103238722
Honestly, never tried either of them. Presumably they fix problems with C/C++, so I'd say familiarize yourself with the problem, so you can appreciate the solution. There's also a lot more learning resources and job opportunities with the old shit. But if you're really excited about any of the new shit - go for it. That enthusiasm will help you actually stay on the grind and get shit done.
>>
>>103239144
Now show the actual relevant specs of your PC.
>It is. Period.
Hah! Okay, that was funny.
But seriously, anon. Admitting that you're wrong doesn't make you a lesser man.
It's only when we hold fast to our invalided beliefs that we regress as a person.
>>
File: compiler_are_garbage_2.png (105 KB, 1920x2390)
105 KB
105 KB PNG
>>103239058
Oh, another instance where TWO compilers fucked up miserably.

You want me to continue? Because I've been busy the last couple months.
>>
File: 1407577213360.jpg (186 KB, 500x376)
186 KB
186 KB JPG
>write an autistically-optimized registry dumper, something which no one asked for and no one has any use for? yes, I will dedicate months towards this task
>write a better JVM, something that 3 billion devices use? nah, not worth the effort
>>
>>103239195
NTA, but if you're such a genius then why don't you forward you schizophrenic ideas towards the devs?
I'm sure they'll be thankful!
>>
File: 1718363810805033.png (14 KB, 418x359)
14 KB
14 KB PNG
>-funroll_loops
>>
>>103239210
>nah, not worth the effort
Making pajeet's code faster is, actually, not worth the effort.
Hate to break it to you, pajeet.
>>
File: 1716255926078122.png (143 KB, 533x150)
143 KB
143 KB PNG
holy shit the retarded schizo is still spamming his retarded idea that decompilation regenerates the original source code?
>>
>>103239240
>holy shit the retarded schizo is still spamming his retarded idea that decompilation regenerates the original source
Who ever said that? Are you stupid?
>>
>>103239272
NTA, but that's literally the case here.
In case you're the schizo he's talking about: I want you to know that you are a massive fucking retard who is wasting everyone's time by just existing.
>>
File: compiler_are_garbage_3.png (34 KB, 1920x1290)
34 KB
34 KB PNG
>>103239280
Oh no, I'm wasting the time of retards who don't know what the code they're writing ends up being converted to.

Sucks to be you, I suppose. But hey, that's the price you pay for being mediocre.

>>103239225
What makes you think they're not aware of these fuckups and *chose* not to fix them?
>>
>>103238397
rust
>>
>>103239320
>Oh no, I'm wasting the time of retards who don't know what the code they're writing ends up being converted to.
I hope you know that you're talking about yourself here.
>But hey, that's the price you pay for being mediocre.
Still waiting on you speeding up Factorio's launch time.
>What makes you think they're not aware of these fuckups and *chose* not to fix them?
Occam's razor. You only ever choose to believe in the more complicated option if you have a valid reason for doing so.
Although I guess this doesn't apply to schizoaffective people, as you guys see patterns in things that aren't correlated and will thus see valid reasons anywhere.
>>
File: 1679604874063985.png (205 KB, 383x278)
205 KB
205 KB PNG
>>103239188
>speed of your NVMe is not relevant
>literally the slowest medium, RAM and caches are faster
>>
>>103239391
Fucking hell, anon. Do you not even know how computers work?
Oh, wait, nevermind. This is your schizophrenia again, isn't? "The processor serves as a gateway between the data on the hard drive and the RAM!" or something like that.
>>
>>103239385
>I hope you know that you're talking about yourself here.
But I'm not.

>Still waiting on you speeding up Factorio's launch time.
Or else? Are you going to ignore me?

>You only ever choose to believe in the more complicated option if you have a valid reason for doing so.
Sure. I'd have to assume that the people who're writing the compiler have never bothered with looking at real-world applications, seen their own fuckups, reduced them to a couple lines of code (like I have), and then fixed it on their own accord.

If you want to believe that I've got a bridge to sell to you. On Mars.
>>
File: tard.jpg (3 KB, 125x124)
3 KB
3 KB JPG
>>103238994
>>
>>103233873
there's no haskcels in this thread
only CGODS
>>
>>103239412
>Do you not even know how computers work?
*Do you*?

Because I know what it is that Factorio does that is so motherfucking slow. Hint: it's completely unnecessary. Disk speed is literally the only valid metric here; anything else is yet another sign of their incompetency.
>>
It's crazy to think that all you have to do is load up GHIDRA and you can get the original source code to any program you want.
>>
>>103239450
It's crazy you still can't quote anyone ever saying that.
>>
>>103239450
I just decompiled Windows 12
>>
File: pepe.gif (16 KB, 498x498)
16 KB
16 KB GIF
>>103235202
Not an argument.
>>
>>103239437
>Because I know what it is that Factorio does that is so motherfucking slow.
Holy shit! Ask the Factorio devs to hire you. They'll be glad to have you on board!
>>
you cant get a "stringified" typeof in C23 right?
i was thinking if you can get a ghetto function overloading with it where you glue
something llike
#define StringFrom(type) StringFrom##typeof(type)
?
>>
>>103238922
based
>>103238909
300 milliseconds is noticeable
>>
>>103239468
>They'll be glad to have you on board!
Probably not. The codebase is written in C++ and uses C-style file I/O that has been garbage ever since its inception, probably for portability reasons.

Which really tells you all you need to know. Or at least all *I* need to know.
>>
>>103239479
>300 milliseconds is noticeable
Mind you this is the upper estimate the schizo gave.
His benchmarks only showed a difference of 0.3 milliseconds.
>>
>>103239512
That's still a lot for every single file being opened. Now extrapolate that onto other Win32 calls.
>>
>>103239526
There is literally no way to prove that this does or does not impact user experience.
Only the schizo thinks his decompiled garbage proves anything because of his schizophrenia.
>>
File: smol clock.png (10 KB, 380x164)
10 KB
10 KB PNG
Is this shit safe for a game? A PC can't freeze for a whole second right?
>>
>>103239538
>There is literally no way to prove that this does or does not impact user experience.
Translation:
>code that doesn't run isn't faster and doesn't impact user experience
No wonder so much of /g/ has issues finding jobs.
>>
>>103239540
Anon, what the fuck are you doing.
>>
>>103239554
no multiplication clock diffs
>>
>>103239540
>A PC can't freeze for a whole second right?
Do you know what paging is?
>>
>>103239552
>>code that doesn't run isn't faster and doesn't impact user experience
...yes, that is correct.
0 is smaller than any number that comes after it.
If your software doesn't fucking work, then it is unusable.
I'm not sure why this is such a hard concept for you to grasp.
>>
>>103239540
>not using __rdtsc() directly
NGMI
https://gist.github.com/pmttavara/6f06fc5c7679c07375483b06bb77430c
>>
>>103239568
no, explain how it is related
>>
>>103239581
the function you posted doesn't handle power states
>>
>>103239584
The OS might run out of RAM during whatever it is your game loop does and starts putting pages that haven't been used in a while to the pagefile/swap. That doesn't necessarily take long unless there's a *lot* to swap out, or your swap is on a slow medium (which it should be because it wears down SSDs, and the pagefile/swap is supposed to be cold storage anyway), or both.

Unless you're on a real-time system there's no guarantee when your code is running and when it's being preempted.
>>
>>103239580
Why do you assume that "faster" equals "doesn't work"?
>>
>>103238923
>>103238960
honestly we should seriously be concerned with how much software runs- constantly all the time over and over. even a minor increase in efficiency in windows/ios/linux legitimately adds the equivalent of thousands of homes to the US power grid.
>>
>>103239650
>even a minor increase in efficiency in windows/ios/linux legitimately adds the equivalent of thousands of homes to the US power grid
vice versa but u get the picture. huge energy costs and reductions across the board. im retardedly passionate about this..
>>
>>103239621
I'm not going to handle out of memory scenarios anyways
>>
>>103239667
The kernel will do it for you. Transparently. Maybe even due to something completely unrelated to your code (like the driver doing stupid things again). There are no guarantees.
>>
>>103239678
whoa, nice source code bro!
>>
>>103239686
That's a trace.
>>
>>103238437
>Slow against code that doesn't need to call RtlDosPathNameToRelativeNtPathName_U_WithStatus and RtlInitUnicodeStringEx. Code that doesn't have to allocate memory for a string copy. Code that doesn't have to release a path copy using RtlReleaseRelativeName. Code that doesn't have to load extended attributes. Code that doesn't have to select a procedure. Code that doesn't have to query file information.
How much time does that take relative to fetching filesystem data off disk? What fraction of the syscall time is wasted? (Bonus points: check both SSD and HDD as well as when things are in the FS cache, though that's quite a bit trickier to time. Don't know how to do that reliably, TBQH.)
If this bothers you a lot (and you've got some hard data to back it up about the actual fraction of time wasted) then go to https://github.com/openjdk/jdk and follow the links from there for how to file an issue on this. Or you can fork things to do them "the right way" and show that this is worth the effort to consider in that fashion. Just grumbling about it here isn't going to get you anywhere; if the fix is worth it, over there is where it needs to end up.
>>
>>103239629
Because "faster" does not exist.
Concepts are nice, but they're only really useful when put into practice.
>>103239650
You're right, but you're not going to find those inefficiencies by decompiling binaries.
>>
File: readfile_overhead.png (32 KB, 983x970)
32 KB
32 KB PNG
>>103239716
>How much time does that take relative to fetching filesystem data off disk?

>Or you can fork things to do them "the right way"
>>103239231
>>
>>103239540
>not using rdtsc
>>
it's weird i disassembled a bunch of programs on my computer and it turns out that everything is written in spaghetti code assembly this is nuts
>>
>>103239739
>You're right, but you're not going to find those inefficiencies by decompiling binaries.
I agree to an extent... Decompiling some binary gives a completely unique perspective on source code and removes all layers of abstraction that's added by even so much as variable names... while it's probably a waste of time, I agree (especially compared to simple review), there's still somewhat valuable perspective offered. I also lightly argue doing these things out of passion and curiosity is way more likely to give way to discovery.
>>
>>103239837
>gives a completely unique perspective on source code
If by "unique" you mean "nonsensical", then yes, I agree.
>>
>>103239801
I love how you're trying to pretend to be retarded, but all you end up doing is being retarded.
>>
>>103239800
>CPU throttles
>clocks now run 2x slower
bravo
>>
>>103239853
C'est la vie.
>>
>>103239767
You might want to point out where in that image the amount of time taken is. It's not from a utility that I habitually use so I can't just guess it. (I can see it's all within the same second, lol.)
>>
>>103239865
>the amount of time taken
It's not time, it's "cycles".
What the fuck a cycle is is known only to his schizophrenic mind.
>>
File: o_ew_ea.png (9 KB, 874x306)
9 KB
9 KB PNG
>>103239865
The decimal numbers after every "O:" (earlier versions, output), "EA:" (epilogue ANSI), or "EW:" (epilogue wide, that is, UTF-16). In this case it's 96145 cyles.
>It's not from a utility that I habitually use so I can't just guess it.
It's my utility. I wrote it from the ground up.
>>
>>103239875
I just love how much you're visibly seething. C'mon, show us more.
>>
>>103239888
How are you getting within 5 cycles timing of these functions?
>>
File: popcorn.jpg (88 KB, 700x1225)
88 KB
88 KB JPG
>>103239902
I'm literally doing nothing but pointing out that that anon is visibly schizophrenic.
I'm having the time of my life laughing at this retard. Are you?
>>
>>103239907
RDTSC.
Yes, I know it's not exact, but it doesn't need to for you to get the gist, does it?
>>
>>103239915
There is no schizophrenia. There's your mediocrity and incompetence though - which makes sense. Certified retards laugh at what they don't understand.
>>
>>103239918
And intercepting every function call?
>>
>>103239939
Everything in ntdll.dll. The Rtl* functions via IAT patching, the Nt/Zw* functions via syscall patching (i.e. placing far call instructions into the ntdll.dll stubs).
>>
>>103239934
Anon, I asked you why a program not being perfectly optimized equals to it being non-functional and I've yet to hear a coherent answer.
A recurrent problem with schizophrenia is that schizophrenics do not realize they are schizophrenic. Everything makes sense to you, despite reality saying otherwise.
>>
>>103239988
>I asked you why a program not being perfectly optimized equals to it being non-functional
I never said it's non-functional. I don't know what voices in your head keep screaming at you that I did.
>>
File: file.png (3 KB, 205x71)
3 KB
3 KB PNG
>>103236862
damn it is pretty slow tho..
almost 5x speed diff with basically the same tiny amount of code:
      HashSet<(int, int)> visitedTiles = new HashSet<(int, int)>();
visitedTiles.Add( (0,0) );

input.Aggregate((x: 0, y: 0), (pos, c) =>
{
pos.x += c == '<' ? -1 : c == '>' ? +1 : 0;
pos.y += c == '^' ? +1 : c == 'v' ? -1 : 0;
visitedTiles.Add(pos);

return pos;
});

vs
std::unordered_set< std::tuple<int, int>, TupleHasher200> visitedTiles;
visitedTiles.emplace(0,0);

std::tuple<int, int> position{0,0};

for(char c : input)
{
int& x = std::get<0>(position);
int& y = std::get<1>(position);

if(c == '<') --x;
if(c == '>') ++x;
if(c == '^') ++y;
if(c == 'v') --y;

visitedTiles.emplace(x, y);
}
>>
>>103240000
c# probably uses a ddos resistant hashing algo
>>
>>103239994
>I never said it's non-functional.
I will point you towards >>103236197 and >>103238597, where you said:
>Problem is, they've had over twenty years to make it work.
I then asked you: "But it does work? What problems are you experiencing?".
To which you replied with ">>103236154" which is a post about you not trusting the underlying code to be as efficient as humanly possible.
Which has absolutely nothing to do with the software working.
>>
>>103240000
which puzzle is this?
>>
>>103240045
>Problem is, they've had over twenty years to make it work.
Doesn't say it doesn't work. Only that they had twenty years to make it work.
I accept your concession.
>>
>>103240021
chatgpt told me by default c# simply hashes the primitives and xor's them together, which is what i did in my TupleHasher200

>>103240059
2015 day 3
>>
File: mental gymnastics.png (147 KB, 439x501)
147 KB
147 KB PNG
>>103240070
>>
>>103240086
Not my fault you're dumb.
>>
>>103240000
Quads checked
I wonder if all the copying is the culprit of the slowness, since (int, int) tuples are value tuples
You can try switching to a reference Tuple<> to see if it makes a difference.
Or you can profile the memory allocations to check
>>
File: cup.png (205 KB, 519x617)
205 KB
205 KB PNG
>>103239436
I have to work.
Sucks.
>>
>>103239379
not low level
also not a real lnagugae
>>
File: hero_data.png (18 KB, 1100x610)
18 KB
18 KB PNG
>>103239739
>but you're not going to find those inefficiencies by decompiling binaries.
Yes you are.
>>
>>103240174
Okay, now fix them and recompile the binary.
>>
>>103240170
yes, low level.
yes, a real language
>>
>>103240185
Not my job.
>>
>>103238397
Nim and turn off the garbage collector if you wish to manage your own memory
>>
>>103240193
Thank you for conceding that you can't actually fix inefficiencies by decompiling binaries.
>>
File: evolution.png (1.96 MB, 1920x3260)
1.96 MB
1.96 MB PNG
>>103240202
>Thank you for conceding that you can't actually fix inefficiencies by decompiling binaries.
Wrong.
>>
>>103240215
Feel free to prove it by posting benchmarks of the old vs fixed binaries.
>>
>>103239888
>It's my utility. I wrote it from the ground up.
rare digits for rare passion
>>
>>103240223
>jump through even more goalposts
Lol no. You're been so consistently wrong no one in this thread who's not a complete retard cares anymore. You're through.
>>
>>103240237
>>jump through even more goalposts
I've first asked you for this since post: >>103239129
>>
>>103240249
And you've got plenty of numbers.
>>
>>103240215
>I stretched the output
???
>>
>>103240191
"low level" specifically refers to assembly, even C is a high level programming language
>>
>>103240265
Unrelated numbers, you fucking retard.
When someone asks how much a hamburger costs and you reply with "FIFTEEN KILOGRAMS!" you really have to wonder why he's looking at you as if you have brain damage?
>>
File: lapd_hells_gate.png (265 KB, 1438x1078)
265 KB
265 KB PNG
>>103240266
Also disabled the window frame.

And then there's this game that used to use 100% CPU on one core because they didn't bother to Sleep every now and then. I fixed that too.
>by decompiling
>>
>>103240306
Where can we see your source code?
>>
>>103240304
I don't care what a certified retard like you who doesn't understand that the fastest code is code that doesn't run thinks.
>>
>>103240312
>source code for opcode patching
Just admit you have no idea what I'm talking about.
>>
>>103240322
>the fastest code is code that doesn't run
Nonexistence is not less than existence.
You're literally comparing apples and oranges.
>>103240333
You claim a lot, but have nothing to show for it aside from schizophrenic rambling.
>>
>>103240282
wrongeroni buicko, c is low level
>>
File: lapd_patch.png (14 KB, 754x837)
14 KB
14 KB PNG
>>103240339
OK.
>>
>>103240355
>who cares what words mean, I'll just make up my own definitions
can the code you write be compiled and ran on different architectures? then it's a high level language
>>
>>103235808
Because it's an excellent language, incredibly productive, and I'm trying to actually build working software that lasts long term, rather a cuckold toy project in tranny socks. And must do this while working alone. Which makes Go the best language for this. Not the performance sacrifice of Python, and not the unmaintainability of Rust and all the other garbage with that of course. But something dead in the middle of the two.

Also of course Go is harmonious with Docker, and this software is targeted solely at home server owners. I.e., I literally need the software myself on my own server and just want others to be able to benefit from a Sonarr type app for a different purpose. Docker is very important for the target end user, which is normal people who just wanna hook up YouTube to their Jellyfin or w.e. on their NUC.
>>
>>103240369
...
Anon, how do you expect me to reproduce your results with only an image?
>>
Why is the registry dump noob beginner here 24 7 365. Is this a troll or just autist lol.
>>
>>103240399
The file offsets are there.
The opcodes are there.
The disassembly is there.

That's all you need.
>>
>>103240407
He's schizophrenic. They don't make much sense.
>>
>>103240399
I'M NOT GIVING YOU MY STUFF COR FREE FUCK YOU I GOTTA VO FAST LIKE SANIC THE HEDGEHOG MY HERO
>>
File: final_version.png (35 KB, 1530x968)
35 KB
35 KB PNG
>>103240407
It's because I live rentfree in your head.
>>
>>103240418
What file do apply this on?
Where can I download it?
What tools do you recommend?
What method of benchmarking did you use?
...you did benchmark your results, right?
>>
>>103240434
>What file do apply this on?
It's LITERALLY in the image.

>Where can I download it?
Buy the game.

>What tools do you recommend?
vim, particular the :%!xxd and :%!xxd -r commands.

>What method of benchmarking did you use?
Process hacker.
>>
>>103240434
STUPID BITCH I AM SONIC. GOTTA GO FAZT. I AM LEET PRIGRAMMSD HACKERMAN
>>
I love how I'm mindbreaking mediocre anons in this thread.
>>
>>103240407
kek i've been thinking the same for like a year now since i noticed him
he accounts for a solid ~15-20% of the posts in here as well, singlehandedly
usually its because he keeps saying stupid shit in regards to others code and then wont admit defeat even once he starts to realize he is wrong. I've had a few hour+ long arguments with him in the past.
>>
>>103240407
do you think a guy like that has anything else to do
>>
>>103240470
And your head too.
>>103240430
>>
>>103240467
You're really cool and neurotypical bro. Can you please teach us how to be successful socially accepted people bro
>>
>>103240452
>Buy the game.
Which would be?

Also, post your benchmarks.
>>
>>103240476
yes anon, you are winning
>>
>>103240486
The first step is being born with a functioning brain.
Unfortunately that already filters out 90% of anons on /g/.
>>
>>103240470
This is like legit disabled tier autist probably just lol. Wtf. Imagine how far gone you need to be to be so fucked up as to stand out as a freak even among a majority aspie community.
>>
>>103239888
>It's my utility. I wrote it from the ground up.
OK, that's why you needed to explain it.
With that, we can say (from the image in >>103239767) that the calls to RtlFreeHeap are sometimes expensive (unsurprising if they change the memory map) but are still much less expensive than the call to NtReadFile (as it should be). Full analysis would need to see all the calls relative to the high level call in question. It's detailed work.
It's probably only worth profiling the ...W functions; the ...A variants are always going to suck (because they have to incur extra conversion overhead, and suck in other ways on the all-too-common systems that aren't set to be UTF-8 yet).
>>
>>103240383
I was mostly wondering why would you need docker with a go program, it has a pretty good cross-compilation story after all
>>
File: fcoplapd.png (3 KB, 678x40)
3 KB
3 KB PNG
>>103240489
>Which would be?
Future Cop - LAPD.
>post your benchmarks
>>
File: 1699373371329.webm (1.98 MB, 1024x1024)
1.98 MB
1.98 MB WEBM
>>103240561
>>
>>103240215
>Wrong.
To fix anything, you've got to make a change. Just decompiling doesn't do that (except to wherever you dump the decompiled code to). Literally, decompiling doesn't fix anything. It might give you evidence to decide how to go about fixing something, but that fixing is a later stage.
Right now, you're saying stuff that's like "ejaculating creates babies". It might be involved, but it sure isn't the whole story by itself!
>>
>>103240569
I accept your concession.
>>
>>103240507
I feel so sorry you've never met anyone intelligent.
>inb4 some anecdote about someone who impressed you
Don't care.

>>103240501
I know.
>>
>>103240561
This nigga seriously thinking he's hot shit by spending weeks to improve the load time of some random-ass video game by 0.75 seconds
Bro, go improve actual stuff like llama.cpp or something
>>
>>103240571
>Just decompiling doesn't do that (except to wherever you dump the decompiled code to). Literally, decompiling doesn't fix anything. It might give you evidence to decide how to go about fixing something, but that fixing is a later stage.
I can patch things right up with IDA. For me the two processes are indistinguishable.
>>
File: file.png (114 KB, 400x225)
114 KB
114 KB PNG
>>103240507
i once asking him if he was a spas or disabled IRL and began teasing him about it (just a guess honestly), and he stopped replying to me after that, which i thought was funny. Guessing i hit the spot.
So thats my leading theory. He is basically like the 8ch admin, chronically online because he literally cant go outside and probably even too disabled to play video games and troll on there instead of on here.
>>
>>103240598
>0.75 seconds
Oh, you don't know. Well, let me explain then.
>1.16 and 3.02 are the percentages of time the entire CPU spends in the game
>but it's a CPU with 32 cores, so each core gets 3.125% of the total time
>the second entry is close to these 3.125%
>the first one is down by almost two thirds, to 37% time for the core
>>
>>103240607
>i once asking him if he was a spas or disabled IRL
I must've ignored your question. I tend to do that with people who're obviously ESL.
>>
>>103240634
I don't care, man
Seriously, have at it:
https://github.com/ggerganov/llama.cpp
I feel like you and Justine Tunney would be good friends
>>
>>103240645
>cpp
Lol no.
>>
>>103240648
Plenty of alternatives
https://github.com/karpathy/llama2.c
Just pick one and do something actually useful for once
>>
it wouldn't surprise me if disassembly-dumping malloc sperg and cnile spammer turn out to be the same person
>>
>>103240656
Why would I do something useful *for you*?
>>
>>103240667
>*for you*?
For yourself*
You're wasting your time on trivial problems
Go do something actually useful
>>
>>103240674
>For yourself*
Nah, not interested.
>>
>>103240682
As is the fate of all autists and schizophrenics
A shame
>>
bake you fucks
>>
>>103240685
What, not being useful to parasites? I guess.
>>
>>103240607
So like this:
https://www.youtube.com/watch?v=sHRE_hrUkzU

Like Joey or that weird kid who wrote the fantasy novels about dragons.
>>
>>103240729
I always wonder why they don't just beat the living shit out of these little shits.
>b-but autism
Doesn't matter, I want to see them suffer.
>>
>>103240746
Are you older than 50?
>>
>>103240761
No.
>>
>>103240768
Weird, it's usually the baby-boomers that have all those fantasies about hitting their kids.
>>
>>103240775
I'm not talking about "hitting children".
I mean literally fucking attempted murder.
>>
>>103240746
"hey it's my first day here"
"I'm so happy you're back!"
Just lol.
>>
>>103240746
You are mentally ill. Seek medical attention.
>>
File: file.png (339 KB, 529x548)
339 KB
339 KB PNG
>>103240729
>OH, MY, GOD
My fucking sides
>>
>>103240801
Not my problem, Dr. Internet.
>>
File: aoc2015day3part2.jpg (133 KB, 559x588)
133 KB
133 KB JPG
>>103240000
>>
>>103240883
I thought that was Janet for a second before realizing it's in facot Clojure
>>
>posted benchmark
>posted patch
>no response
I think we can all agree that I won this thread, too? Good.
>>
>>103240946
I'd say so. I always learn a lot when a /dpt/ goes this way.
You should seriously take a break though, so you don't get burned out and leave us for good.
>>
>>103240946
You haven't posted the source code for your utility yet, only some sort of binary patch
Until then you've only won the pissing match, not the thread
>>
>>103240993
>You haven't posted the source code for your utility yet
Which utility? The tracer? Yeah, that one will remained closed source forever. Luckily you don't need it to apply the patch: >>103240452
>>
>>103241020
Link to game? I would love to buy it.
>>
>>103241020
I'm afraid to inform you that you have not in fact won in that case
>>
>>103241064
Luckily no one cares about your singular opinion.
I won.
>>
>>103241105
Sorry buddy, saying you won does not, in fact, mean you won. I don't make the rules.
>>
>>103240946
Still not seeing how any of this matters.
Java works (although better alternatives exist). Docker works.
All of your "issues" are irrelevant.
>>
>>103241033
So the game *might* be abandonware, and since I don't feel like entering legal limbo I'm not going to link it.
But you should find it by its full title - "Future Cop: L.A.P.D.". Came out in 1998.
>>
>>103241114
Me neither. You have the patch, you have all the information you need, and you have the benchmark. I won, plan and simple. Not my problem you can't reproduce (chud).
>>
>>103240946
>I think we can all agree that I won this thread, too?
You only won anything in your own head.
>>
>>103240664
>cnile spammer
who? ...where?
>>
>>103241138
Which is literally the only thing that matters on this board filled with people in dire need of brain pacemakers.
>>
>>103241137
Huh? I'm not that guy you were arguing with.
I just came to say "post source" and then you didn't, so I told you you lost
>>
>>103241158
The source has nothing to do with the patch.
I won.
>>
>>103240664
It is
>>
File: xchud.png (51 KB, 350x301)
51 KB
51 KB PNG
>>103241142
I believe that would be me.
>>
>>103241127
You pick the weirdest of benchmarks. And it's going to have a lot of shit in there from things that aren't worth putting effort into. It's probably the worst thing you could have chosen.
If you're serious about benchmarking things, write some simple code in C or C++ that is obviously how people might start writing things to access the filesystem, perhaps by doing directory listing or some other basic task. Don't try to fight several other wars at the same time; you need to fix one thing at a time. Show that that simple program has problems. Show that what you propose as fixes for those problems will have a significant impact, ideally greater than 5% (chiselling away at 0.05% impact items is a ton of work for little reward). And make sure that people who can actually do something about it get to see your results.
Schizoposting about inefficiencies in an ancient game on /g/ just won't get you anywhere. We simply don't care enough to do anything other than just yank your chain for shits and giggles.
>>
>>103241123
>>103238480
Alright, continue being part of the problem. I'd die of shame, personally, but if the shoe fits ...
>>
File: 1711538281328030.png (4 KB, 2022x75)
4 KB
4 KB PNG
>>
>>103241281
>Schizoposting about inefficiencies in an ancient game on /g/ just won't get you anywhere
I mean, I was specifically asked about things I had fixed personally.
>>
what level of leetcode are you guys on? I'm recently unemployed and doing freelance, so im trying to run through hacker rank starting with the easy ones and running through it all. Wonder if anyone here has done similar and what level they achieved with no math background (I'm using o1 to familiarize myself with the math as I get totally blocked and the need arises.)
>>
>>103241414
>leetcode
lol
lmao
Go get an internship.
>>
File: aoc2015day3goldFaster.jpg (174 KB, 905x627)
174 KB
174 KB JPG
>>103240883
this version is twice as fast (5ms instead of 11ms on my machine)
>>
>>103241463
i think the fastest solution would be to have a 2d array bitboard and just translate the x y to an offset within that array
then in the end you iterate through the board, which should be omega quick with auto vectorization and SIMD, and count the on bits
>>
>>103241414
Depends what kind of job you're going for, but 99% of the time your problems at your job are going to be architectural ones and not anything resembling a leetcode question. You're way better off just building something and looking up best-practices while you're doing it.
>>
>>103241436
I've worked as a senior engineer for over 5 years (10 years since I got my first job) and led teams my man, working as an engineer doesn't teach you algorithms and I'm trying to get good strictly at those
>>
>>103241495
see >>103241502
I actually have a lot of experience and finding a job isn't really an issue. I'm doing this for myself to get better at them
>>
How should I implement runtime reflection (ala C#) in C++?
>>
I just accidentally spent $20 on a month of CLion plus that AI addon
oh well
>>
>>103241502
>>103241507
Depends on your commitment level then. If you're looking to actually understand the math side of algorithms better, consider reading something like The Art of Computer Programming (which is basically the go-to for your exact use-case), or "introduction to algorithms" if you want something less difficult.
>>
>read an 800 page book
>worked through every single example problem
>go to work on my project
>have absolutely no idea where to start
>>
>>103241785
skill issue
>>
File: settled_science.png (5 KB, 1348x84)
5 KB
5 KB PNG
The science is settled.
>always in read-only mode (can use I/O cache)
>bother to measure the initial OBJECT_ATTRIBUTES setup, to be as fair as possible
>force synchronization
>>
>>103241942
Why doesn't Microsoft handle CreateFileW in the kernel without overhead instead of implementing it with a different syscall?
>>
>>103241971
Maybe because they'd then have to move even more shit into the kernel? And they already have like, what, over one thousand syscalls already, not counting the garbage in win32u.dll (may be another 1500, I've forgotten the numbers)?
>>
Advent of Code soon.
>>
399 posts, impressive



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.