[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [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

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor applications are now open. Apply here!


[Advertise on 4chan]


File: 1635856419119_shared.jpg (210 KB, 1280x1807)
210 KB JPG
What are you working on, /g/?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Like, nigger ... seriously?

ssize_t ret;
uint64_t cnt = 1;

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

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

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

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

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

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

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

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

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

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

  0xb
0
0x00b
00000

why
>>
>>108976586
%5 tells printf to pad with up to 5 spaces
%05 tells printf to pad with up to 5 0s



[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.