[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: CZK3HG3UEAAHqbD.jpg (186 KB, 1024x1024)
186 KB JPG
What are you working on, /g/?

Previous: >>108912856
>>
File: 1780045670243690.png (230 KB, 1314x1031)
230 KB PNG
I've got some cleaning up to do ie the 3 syscalls but I now have feature parity.
>>
File: 1780046079675820.png (12 KB, 505x100)
12 KB PNG
>>108932464
The newline is because I resized the terminal not the program fucking up.
>>
File: happy-pepe.png (685 KB, 1080x1110)
685 KB PNG
>>108932455
>What are you working on, /g/?
Today I created a pull request on github.
Only adjusted some example sketch to use a different toolchain (because the vendor toolchain is deprecated), but feels good. Tfw real open source contributor now.
>>
>>108932455
Are any of those books worth reading?
>>
>>108932761
Read catcher in the rye instead
>>
>>108932768
What about A Wrinkle in Time?
>>
File: 1772895264310781.jpg (3.63 MB, 4284x4853)
3.63 MB JPG
I am working on JavaScript, am doing some functional programming today, had OOP yesterday and learned that JS has real private since ES2022 with "#", they used "_" before but it wasn't real private
>>
File: 1765768921023430.png (460 KB, 640x360)
460 KB PNG
>>108932547
>Tfw real open source contributor now.
I haven't done it yet because I feel too dumb and don't want to get laughed at or shit or screw something up lol.
but I'm happy for you anon
>>
>>108932796
>Son schinken für JS
Mein Beileid
>>
>>108932902
liest sich aber echt gut, habe nur den jquery teil überflogen aber ansonsten echt gut.
>>
>>108932902
>>108932913
Friendly reminder this is an English Image Board
>>
>>108932999
good trips
>>
>>108932999
okay boss
>>
>>108932811
Jeets are flooding open source projects into oblivion with their ai generated slop so they update their shitty resumes.
You'll be fine.
>>
>>108933105
but they only do python and javascript. These languages are irrelevant
>>
Assembly has been fun but it is a real head fuck after a while.
I am sticking with my beloved C.
>>
>>108933152
You haven't even *begun* to actually explore it - i.e. do where compilers fail spectacularly. All you did was trim some foreign fat while introducing your own.
>>
>>108933249
I've begun enough to see it's not something I am going to pursue and I am going to use fwrite and fread()
>>
>>108933284
>I've begun enough to see it's not something I am going to pursue
Then you've just wasted your time. What's the point in never being better than the compiler?
>>
File: Zminok06.png (255 KB, 1076x827)
255 KB PNG
>>108933249
>>
File: 1780061280298222.png (169 KB, 1898x1031)
169 KB PNG
>>108933249
>>108933320
>>
>>108933584
>uses c++
>wonders why the assembly output is trash.

THERE'S YOUR FUCKING PROBLEM SCHIZO.
>>
>>108933584
>>"you'd be healthier if you just lost 30 pounds"
>*points at 600 lbs person* "I'M HEALTHY COMPARED TO THEM!!!"
I mean ... that's not hard.
>>
>>108933584
>>
>>108933320
>What's the point in never being better than the compiler?
Fun, have you heard about it?
>>
Making "bad" blocks on a PS2 memory card is as easy as writing incorrect ECC bytes in one of the first two pages of a block.
When formatting the card it doesn't erase all the blocks and check that the blocks erase properly, so any blocks that haven't been erased (~erase bits in the unused page area where ECC bytes are stored) it will load the first two pages and make sure the data checks out with the ECC bytes.
Any that don't will be flagged as a bad block, which the filesystem will then work around. But it only supports up to 32 bad blocks, so that doesn't give you a lot of potentially "hidden" space if you wanted to section off some space to stuff some data into.
So what you could do is write the "hidden" data you want somewhere on the card after the first block (that'll be where the superblock is) ensuring that you write incorrect ECC bytes (or not caring about them) and then erase the superblock. Then when you boot into the OSD you open the card in Browser and it'll say it is unformated and let you format it, which will flag the "bad" blocks and then write the new superblock and FAT table.

Of course, the "bad" blocks can be restored by erasing those blocks and then reformatting (erase the superblock and format).
>>
>>108933676
So being third-class is fun to you?
>>
>>108933689
Mate.

Own BIOS.
>>
>>108933693
Yes, you're mom is happy with a third-class cock
>>
>>108933708
Only as meat supplement for her pea soups.
Which is appropriate because y'all use UNIX anyway.
>>
>>108933708
Not sure about his mom having low standards has to do with anything.
>>
>>108933756
Me neither, that's why I will try to execute binaries from sdcard now.
1) find file
2) copy file to specific ram location
3) jump there
4) ????
5) profit

find file first, just iterate over all entries of root dir
# =============================================================================
# in: a0 contains pointer to filename (zero terminated string)
# out: a0 returns pointer to directory entry, 0 if file not found
.globl _fat12_find_file
_fat12_get_find_file:
addi sp, sp, -16
sw ra, 0(sp)
sw s0, 4(sp)
sw s1, 8(sp)
sw s2, 12(sp)

mv s0, a0
call _fat12_get_dir_entry_count

# TODO: suck my cock here

lw s2, 12(sp)
lw s1, 8(sp)
lw s0, 4(sp)
lw ra, 0(sp)
addi sp, sp, 16
ret
>>
>decades of computing and few years of LLMs
>still tcl/tk is the only reliable GUI library
>>
>>108933864
And it'll stay that way.
>>
>>108933918
what a time to be alive
>>
>>108933773
Ok file can be found.
Now just memcopy the blocks to ram and then hopefully just jump there.

I might switch to C or write my own fucking compiler when I have this done.
I think I know now what I want and how this shit works. The kernel itself doesn't even need that much stuff, I can just extract all of the cool stuff into user applications. Then write a compiler and editor for the userland and then bootstrap everything from there
>>
>>108934540
>Now just memcopy the blocks to ram
Doesn't that imply the blocks are already in RAM?
>>
>>108934776
yes. I typed trash. I just meant copying the files from sdcard to RAM and then jumping there.
But on the other hand it's all memory, just different kinds.
>>
>>108932455
>coding manually
Ngmi you will be replaced
>>
File: 1750078459842318.png (1.16 MB, 1000x1450)
1.16 MB PNG
>>108934848
>>
>>108934852
Snailcat cope image. VibeGODS won and Luddites will be left jobless
>>
>>108934835
Well, and different busses.
>>
https://github.com/kamalfarahani/katharos
>monads in Python
Your favourite language WILL become Haskell
>>
>>108934848
>fast is good
just stop believing your zoomer PM. That's his job to make you believe that.
>>
>>108935112
Fast == good, but fast development != fast execution.
>>
I made the very first /dpt/ :3 just checked in to see it’s still going, good work /g/! I’m proud of you
>>
>>108934848
>>108934866
Know your place and hang yourself, you subhuman, ban-evading, falseflagging troon
>>
>>108932811
I have a bunch of open-source things out there already and none of them have gotten laughed at
some have gotten stars by other people
and if you screw something up you can fix it
>>
>>108935558
>and if you screw something up Claude (TM) can fix it
FTFY
>>
>>108935564
Or not: https://mastodon.gamedev.place/@JeremiahFieldhaven/116654345332213390
t. >>>/g/vcg/ habitué
>>
>>108933584
All that bloat is to align emojis and other unicode fag shit.
>>
reading the environment section for Vscode is so boring. Can't remember anything anyway.
>>
>>108933120
Those tards are flooding repositories with Java, C#, and jeeted C++ code that is easy to spot because it looks like Java mixed with C and filled with memory bugs despite abusing smart pointers.
>>
>>108935532
Not true at all. Im not ban evading, your seethe tells me that you’re trans and codetrans. VibeGODS won
>>
I just spent two hours tard-wrangling Gemini to output two lines of Lua code, and it failed miserably. We should turn the dumbasses who promote LLMs into tasty, tasty food.

No, it's not cannibalism. Pretty much like autists they were never human to begin with.
>>
>>108932455
i'm trying to learn c++ and the win32 api since i'm only decent at c#
>>
>>108936247
Poor decision. You should look into the NTAPI.
>why
Learn how root directory handles work with NtCreateFile, and then wonder why CreateFile doesn't support them.
>>
>>108936247
Use C instead of C++. Designated initializers and inline structs make filling out Win32 parameters so much easier.
>>
>>108936297
I'm working on a particular GUI application I've wanted to make so I don't think NTAPI will be much help here.
>>108936436
Doesn't C++20 have designed initializers? Or do you consider them inferior just by the nature of them being more restrictive.
>>
>>108934848
Enjoy your increasing token costs, slopster.
>>
File: win32u_dll.png (31 KB, 830x980)
31 KB PNG
>>108936483
>he doesn't know how to into win32u.dll
>>
>>108936483
Can't do this in C++20, but it's valid C99.
some_function(&(struct foo){
.bar = 5,
.baz = 10,
});
>>
>>108936553
I just said I'm learning the Win32, how would I know any of this shit? I'm writing basic CreateWindowExW calls nigga.
>>
File: günther.jpg (11 KB, 308x197)
11 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);
}
>>
>>108936597
I'm not telling you where to stop, I'm telling you where to start.
>>
>>108936613
thank you then
>>
File: 1775379423193913.jpg (293 KB, 1548x1452)
293 KB JPG
>>108934852
>an LLM will delete a vibe coder's entire production database, but only
Nah, they do that aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaall on their own.
>>
>>108936575
wat(({
Wat x{1, 2};
&x;
}));
>>
>>108936575
Designated initializers my beloved.
When you write C in an actually modern style, your code is absolutely littered with them, and even design interfaces with them in mind, and compound literals are just the thing that lets you chain them together into even bigger ones.
>>
>>108936921
>returning the address of an out of scope variable
Leaving retardation aside, go ahead and use your GCC-specific extensions on MSVC and tell me how it goes.
>>
File: rip.png (13 KB, 505x179)
13 KB PNG
>>108937012
>>108936921
Hint: not very well.
>>
File: snailcat best friend.png (9 KB, 512x256)
9 KB PNG
>>108934852
"Move slow, Snailcat!"
>>
File: 1780096310124623.png (212 KB, 1898x1033)
212 KB PNG
So like ultimately the issue is that fwrite() is queer and doubles the number of write syscalls because it can.
>>
>>108937385
It doubles the syscalls, but spends about half the time per syscall.
So is it doing smaller write blocks per syscall?
>>
I tried to rasterize platonic solids in lisp...before learning the basics of lisp
>>
>>108937548
Shit I didn't even notice that. Where's the not all instructions are equal anon?
>>
Some people say that AI takes the fun out of programming
What's your take on this?
>>
>>108937714
I got AI to write me some stuff with streams in Deno and while the end result is what I would have wanted to write myself, sitting and waiting for it to finish has zero of the feel of the thrill of the chase
>>
File: 1762492630183099.jpg (17 KB, 533x509)
17 KB JPG
>segment tree
>fenwick tree
>>
>>108937714
>Some people say that AI takes the fun out of programming
>What's your take on this?
It 100% takes all the fun out of coding. Coding for work used to be fun or interesting because you got time to think about how you want to structure things and how you want to build things out. Now the boss expects you to use AI to pump out slop and you get no time to think deeply about code or achitecture or research anything. You're litterally mining the slop cannon farms.
>>
File: 1772558866406384.png (263 KB, 1148x540)
263 KB PNG
>>108937714
I tardwrangle an entire team of computer science babbies for a living, trying to use an AI for coding generally ends up with me basically doing my job except the AI companies expect me to pay THEM for it.
The only tard I should wrangle in my free time on my own projects should be me and myself.
>>
File: 1780105551511913.png (126 KB, 1097x840)
126 KB PNG
Back in ASM.
I'm going to do this.
>>
Is it still worthwhile to learn Perl?
Are the job propsects limited to rewriting old code, like for cobol?
I will be learning not just the language but I will have to go through the general concepts too.
>>
>>108937977
no wonder you don’t like using coding agents — I wouldn’t, either
I _will_ say that, with LLMs, you can wrangle turbo autism outside of your skillset without sending money to men who will spend it on programmer socks and estradiol
which might come in handy
>>
>>108938241
Not for a job. I like my tiny collection of Perl scripts that Automator uses, but I’m not writing any new Perl anything. My hunch is that anything that Perl does, other languages do more cleanly (but it’s not going to be all the same language, since Perl is _very_ TMTOWDI and screamingly multiparadigm)
>>
File: memcpy2.png (46 KB, 1630x720)
46 KB PNG
>>108937579
Well, what's your buffer size?
>>
What the hell is someone even supposed to build to get a job?
I finished this thing:
https://jrdngr.github.io/pngme_book/

Which although intermediate, I think is a very interesting project and I learnt a lot: Working with raw bytes, implementing methods and traits, that's some cool stuff.
Then I wrote my own static site generator and before all that I wrote a simple CLI todo manager, which yeah, I know is a very noob project but again, what the hell am I supposed to do know? It feels like one needs to write a kernel for it to be a resume-worthy project, for fucks sake I just want a job
>>
>>108938258
4096.
>>
>>108938256
I am not a programmer, btw. I am currently doing networking and we have perl on the machines to handle setting connections.
>>
>>108938263
Be Indian or transgender.
You're using rust so you're already halfway there to one of them.
>>
>>108938266
And have you tried using L2 sizes (usually 128 - 1024 KiB)?
>>
>>108938270
Sounds like it might be useful for your current day job, although if the Perl programs aren’t large then an LLM might be able to understand them ezpz, and most of your value-add will be in understanding the context around the program
of course, you can use LLMs to teach you how to program, too…
>>
>>108938276
Hey I mean last few months I've been toying with all Go, C++, Rust and a little Odin. Rust is pretty great. I like all the little inclusions in the standard library like PathBuf, io::read_exact and Result<T> and all that shit, feels somewhat "fun". But honestly shouldn't I also have a shot at this if I'm mexican?
>>
>>108938373
>of course, you can use LLMs to teach you how to program, too…
You probably shouldn't. It still tells you to do memcpy to fill your DMA staging buffers, because that's what all the retarded Vulkan tutorials out there tell you to do.
>and they are all wrong
>all of them
>because none of them understand CPU-side caching
>>
>>108938403
a Mexican buddy of mine is super into Haskell and Rust
try it — worst case, you get filtered
best case, you actually understand one of the best languages out there to have LLMs write programs in
>>
>>108938498
I mean I'm both:
>>108938403
>>108938263
>>
>>108938531
>get a job
I wish you the best of luck but I have _no_ idea other than “figure out how to be an excellent complement to LLMs or do things they can't”
>>
>>108938640
>>108936204
>>
>>108938640
Efficiently using LLMs seems to be a selling point now.
Listing how many tokens you used on a project will probably be a metric for hiring.
>>
>>108938640
>>108938683
Why does one NEED to fucking prove they can program with fucking nigger LLMs?

I mean I am PROVING I can program code by hand. If my employer wanted to or forced me, I CAN fucking use nigger LLMs to program. What the fuck is this industry? What's fucking left to prove apart from knowing programming? What kind of hidden skill do people who program with LLMs have that I (a real programmer) don't?
fucking nigger bullshit
>>
>>108938373
>current day job
What about other non-coding non-helpdesk jobs?
>>
>>108938702
Generating about the only economic growth that this gunshot wound of a country still has to offer, and even that once is about to die thanks to Iran.

But that's a tough pill to swallow, so everyone pretends otherwise. Until they can't.
>>
how will I fair attempting to setup the vitis CLI tools in my editor of choice?
>>
>>108938702
People care if you can solve their problems
they care way less about how you solve their problems
if LLMs can help you solve way more problems better for faster and cheaper, then the winning play is to use LLMs
>>
>>108938805
>they care way less about how you solve their problems
Yeah, until the new solution get them into a situation where the problem can no longer be solved. Then they kill themselves to escape consequences.

Come to think of it, I guess that's why suicide used to be a felony. We should make it illegal again.
>>
>>108938702
It's like proving you can program in C++ for a C++ job.
Can you use the tools we expect you to use?
>>
>>108938854
>being paid to generate garbage
We used to call that "bullshit job".
>>
>>108938871
if you can have LLMs generate lots of code, 30% of which is garbage, and only let 2% garbage through while the other guy lets 10% garbage through, you’re the way better problem solver
>>
>>108938871
>>being paid to generate garbage
Most programming jobs in the last decade.
>>
>>108938895
>>108938882
And the bill is now due. It's gonna be even better than 1929.
>>
>>108938900
Do you mean like if AI fails to turn a profit we're going to great depression levels of recession?
>>
>>108939057
Well, that, and the oil crisis - which we couldn't compensate for even IF we switched to nuclear yesterday.
>>
I hate office politics. I hate having to stretch 20 minutes worth of work over 3 days. I hate being told I can't have entertainment while working

I recently got a scholarship and learned about programming from my cousin so I figured computer science for programming would be ok. Problem is, I got a taste of low skill office and machine work, and gotta say: if I have to brow beat and make my coworkers look stupid just to have staying power and promotions, I'm going to kms myself. Legit

Any comp sci grads here? How's the workplace? I never understood me being asked a question and in the middle of me answering, some dodo is scream interrupting to tell me I'm wrong

Is there a such thing as project gig work?

For context I took the asvab twice in my life and got 95 and 97 percentile. As long as I study good I can understand most things. The test measures your ability to absorb, interpret, and apply info.

How does one study for comp science level math or discreet math? I was told learning math is like learning an instrument. You do a bunch of different problems displaying the skill so you know the different variables and outcomes
>>
File: 1780126775007717.png (305 KB, 1901x1008)
305 KB PNG
Factorio schizo please help.
I got lost and asked AI and she started hallucinating and now I don't understand anything.
>>
File: 1764361520775830.gif (184 KB, 244x248)
184 KB GIF
>>108936699
>>
>>108937279
that's a master piece!
>>
>>108939760
>ai didn't help
>help me, ai using schizo
?
>>
Using structs instead of address and offset defines in C is elite ball knowledge.
>>
File: toupper.png (80 KB, 1904x560)
80 KB PNG
>>108939760
Only two things that I see is that all three constants aren't loaded in before the loop and/or generated on the fly (at least min and bitmask are rather trivial) and that 'z' + 1 is 0x7B/123, not 0x7A/122.
Other than that it seems to be working.
>>
Hello, it's a new day today. Do people still think that AI is good as of today?
Why do they think such thing? It's weird!!!
>>
>>108940109
AI completely fails when the answer isn't on reddit.
>>
>>108940120
It fails even if the answer is on reddit. It almost never is able to one-shot things. But that's most likely intentional.
It would be stupid of the AI companies to make the AI actually good. They don't want to deliver a good product.
>>
File: full_on_ADHD.png (28 KB, 1898x284)
28 KB PNG
>>108940105
... oh. Oh wait, I'm retarded.
No, VPCMPGTB YMM, M256, YMM doesn't exist, the memory operand always has to be the last one.
>>
File: 1780133004211763.png (318 KB, 1920x1057)
318 KB PNG
I have it compiling now but it's failing on the very first 32 byte chunk.
>>
>>108940160
You running this on a virtual machine, or on a CPU before 2010?
>>
File: 1780133318570671.png (32 KB, 555x149)
32 KB PNG
>>108940172
That it? lol
>>
File: sse_it_is_then.png (17 KB, 920x110)
17 KB PNG
>>108940178
SSE it is then for you.
>>
File: 1780134615791897.png (47 KB, 976x512)
47 KB PNG
Well fuck me I finally did it but at what cost?
>>
>>108940255
Your Z's are not properly converted - still using 122?
>>
>>108940288
the comment wrong I put it like that because I thought there would be a pcmpltb instruction.
Both tests are greater than, idk why this shit is still fucked though.
>>
>>108940304
You're checking for <= 'z' though, not < 'z.'
>>
>>108938263
just apply to a job then? You will get there faster by applying rather than doing projects. Read the job description psate it into your favorite chatbot and ask it to list projects that you can do in under a week. Then you have something to talk about in the interview.
>>
File: 1780140493125127.png (117 KB, 943x895)
117 KB PNG
I fixed it.
I was confused because the operation is backwards on line 37.
>>
>>108940698
Any reason why you keep reloading min, max, and bitmask, when you got five more registers?
>>
>>108940722
Baby girl I have 15 more registers.
>>
>>108940766
Go ahead and do vectors with them then.
>>
>>108940722
because he's larping as le epic assembly hacker
>>
>>108940945
>le epic assembly hacker
>with SSE instructions
Nigger
>>
>>108940945
Go back to your containment board NSN kike.
>>
>>108941005
You could just use intrinsics but nooo that's not cool enough is it?
>>
>>108941036
>muh intrinsics
And give the compiler a chance to fuck shit up? Nigger
>>
File: mom.jpg (21 KB, 400x400)
21 KB JPG
>>
>>108941056
My oh my! You sure put a lot of effort into inspecting how well compilers can optimize the case of "Take an alphabet, copy it over with spaces inbetween each character".
I'll give you an F for Futile.
>>
File: 1751401517371608.png (63 KB, 296x256)
63 KB PNG
Sure did.
>>
File: 1775404675376320.gif (666 KB, 220x220)
666 KB GIF
>your usecase isn't good enough
Goalposts, autist.
>>
File: 1780145849694906.png (267 KB, 1920x1054)
267 KB PNG
This has to be the limit of this CPU now.
I've gone from ~150ms to 3ms.
>>
>>108941187
... your memory access are always aligned, aren't they?
>>
File: 1780146456010944.png (41 KB, 697x336)
41 KB PNG
>>108941235
idk what that means but I do have a function to clean up any sub 64byte chunks.
>>
>>108941244
Why? Who cares if you convert data from a previous run as long as you don't write it to console? That's what >>108941056 is about.

And I mean that you could use movdqa instead.
>>
>>108941235
not that anon, but few days ago I learned this:
>The .align directive for RISC-V is an alias to .p2align, which aligns to a power of two, so .align 2
means align to 4 bytes. Because the definition of the .align directive varies by architecture, it is
recommended to use the unambiguous .p2align or .balign directives instead.
Which fucking nigger fuck did think this is a good idea? That's fucking insane. Still triggers me a lot
>>
>>108941253
Without it I would end up writing out of bonds.
I changed it but performance was the same. I think at this stage it's just the time taking my laptop to create the process.
>>
>>108941299
>Without it I would end up writing out of bonds.
Out of what bounds?

>the memory block
Just use a multiple of 32 or 64 or whatever your conversion block size is, which you probably already do if you use any power of 2. You then align the address to 16, use movdqa, and Robert's your mother's brother.

>the actual data
>>108941253
>>
#include "和.h"

函 選択倍(甲 型 針整) 矢 整 {
如 解 大 2 {
返 解 乗 2;
}
返 0;
}

函 主() {
常 数一 型 応 整 左 伍(1 2 3 4 5);
常 数二 型 応 整 左 伍(2 3 4 5 6 7 8);
記(数一 数二);
常 果一 型 応 整 左 差(数二 数一);
記(果一);
常 果二 型 応 整 左 果一 流 射(選択倍) 集;
記(果二);
返;
}

Little moonrune puzzle for you /g/uize. What, if anything, does this program output. You can uniquely determine it's output if you make, several assumptions in a space that is possible to disprove, and I promise all macros used are plainly implemented, no tricks! If you use an LLM don't just ask for the answer cause it will fail, I will tell you it's wrong and you will be angry.
>>
File: 1694839079353063.png (427 KB, 1008x872)
427 KB PNG
>>108941354
I raise.
>>
>>108941354
GPT-5 mini:
It prints:
1 2 3 4 5
2 3 4 5 6 7 8
-1 -1 -1 -1 -1 -1 -1
0 2 4 8 0 0 0
>>
>>108941383
it's wrong
>>
>>108941187
based assembly odyssey anon
>>
>>108941354
the syntax doesn't make any sense for what is presumably C
#include "chingchong.h"

int function(? b ?) ? d {
? ? ? 2 {
return ? ? 2;
}
return 0;
}

int main() {
a A b c d e ?(1 2 3 4 5);
a B b c d e ?(2 3 4 5 6 7 8);
funcA(A B);
a C b c d e ?(B A);
funcA(C);
a D b c d e C ? ?(function) ?;
funcA(D);
return;
}
>>
>>108941354
are those spaces spaces? there's not any weird lexing shit going on?
>>
>>108941692
Yes, those are all spaces. Only macros in the header.
>>108941673
The names aren't misleading, you've already made a few mistakes.
>>
>>108941354
Does this use any nested macros?
Is 針整 the same as 針 整?
Why doesn't the first function (it IS a function I hope) seem to use its argument? It's not using macros for locals is it?
This is what I have based on google translate and some guesses but it is probably wrong
The stuff with meth could MAYBE be something like *. &func1
Also no clue whats going on with no1 no2, I dont think they can be strings (which could concatenate) but originally I thought one of them would have been ++ or --
type might be :: or something and I could be wrong about what = is (translate said left)
_fifth could maybe be a macro for the fifth element (idk how)
// int seems to be "box" or something similar
// but I don't see how it could be valid if not int

int func1(first _type AdjustmentPtr) -> Adjustment {
_like _soln _large 2 { // >? >=?
return _soln _ride 2; // maybe - >> or / given the 2 condition, but could be * which seems to be the function name
}
return 0;
}

int main() {
const _no1 _type _resp Adjustment = _fifth(1 2 3 4 5);
const _no2 _type _resp Adjustment = _fifth(2 3 4 5 6 7 8);
print(_no1 _no2);
const _res1 _type _resp Adjustment = diff(_no2 _no1);
print(_res1);
const _res2 _type _resp Adjustment = _res1 _meth _shoot(func1) _collect;
print(_res2);
return;
}
>>
>autists flock to some Chinese retard
>ignore the performance schizo
You deserve every single bit of ostracization people violently shove down your throats. At this point we need a Reichskristallnacht for the neurodivergents.
>>
>>108941998
(You)
>>
Daily reminder that performance is absolutely irrelevant. You can just not be poor and buy a better computer
>>
>performance is absolutely irrelevant
Yeah, I've already heard that one in the 90s, and now kernel developers are even worse off than pedophiles.
>>
>>108941971
Yes.
There is no 針 整 in the program, 針 is not a macro if that's your question, nor does it exist as an identifier.
That function does take an argument in line 14

As for the guess, you have 7 operators/identifiers semantically correct enough. You have enough clue(s) in your program to make further progress.
>>
>I am almost 60 and still active on a website for kids that love cartoon girls
Hmm, I think I know who the pedophile is
>>
>I am almost 60
I love the projection autists have to employ. It's exactly why normal people hate them and want them and their genetically inferior families physically annihilated.
>>
>>108941971
hints
[spoiler]
the 3 nested macros are the ones that don't use commas, so 伍 記 差 or what you have named _fifth, print, diff
[/spoiler]
[spoiler]
I forgot what I was going to write for the second hint, well don't take my earlier count so seriously it's was made at a glance.
Oh yeah I remembered. This is japanese, but semantics are squeezed to one kanji, better to search in jisho *<kanji>* or grep a japanese-english dictionary
[/spoiler]
>>
>>108942195
s/it's was made/,it was made/.
>>
File: fuu.jpg (25 KB, 768x452)
25 KB JPG
>I love the projection autists
>Does nothing but project
>>
File: 1592002226029.jpg (1.22 MB, 1143x1133)
1.22 MB JPG
>autists have no idea how visible and obvious they are
Yeah, well, no surprises here.
>>
File: answer.png (1.31 MB, 914x906)
1.31 MB PNG
>>108942255
What do I win?
>>
>autist believes walls are merely a suggestion
A one-way trip to Birkenau.
>>
>>108942387
>You didn't follow my rules!
You passed the test.
You have autism
>>
>autist has to personify rules to make them real for him
Jeez.
>>
>Wow I am so edgy and cool when I make nazi jokes
No, you're not. Grow up, faggot.
>>
>jokes
Lol
>>
>h3h, i really want to do what hitler did. I am so funny xd LOL LOOK HOW FUNNY I AM XD
>>
>funny
>talk about autists completely misreading the mood
>>
>>108942255
>>108942356
>>108942387
>>108942396
350IQ play right there.

This is exactly why neurotypicals hate autists.
>>
>>108942582
>Upvoting yourself
>>
>>108942582
You tell me.
>>
>>108941354
oops. 応 整 is actually 応<整>. I don't know how that got deleted unless I did it by hand.
>>
>>108942797
i just did you're mom by hand, too
>>
>>108942839
Anon's hand is going to get pregnant...
>>
File: fizzbuzz-in-clojure.jpg (216 KB, 1049x678)
216 KB JPG
>ah yes, wonderful simple design without any state mutation, very easy to reason about
Functional programming is a mental illness
>>
>>108944026
*is based
>>
>>108944026
>very easy to reason about
That's what attracts the autists, because their brain damage makes it difficult for them to reason just about anything.

Neurotypicals like myself scoff at such nonsense.
>>
>>108944026
>very easy to reason about
It's easiest to figure out what's happening underneath from imperative code though.
>>
>>108944233
Why would you do that though?
>>
>>108944026
>Pollute code with a bunch of meaningless greek letters etc. instead of plain english words
>Why is this so hard to read???
>>
>This user is participating in or instigating a flame war.
>>
File: qwe.png (62 KB, 1920x1080)
62 KB PNG
>>108942255
Autistic assembly schizo here
It's impossible because there is 3 rooms with 5 doors. You can't enter/leave a room 2.5 times without getting trapped.
>>
>>108944570
You don't have to leave if it's the last one.
>>
>>108944582
As I said there's THREE rooms with an odd number of doors.
>>
>>108944586
Just start in one, then you don't have to enter it.
>>
>>108944602
You have to pass through the 2 other rooms with an odd number of doors.
>>
>>108944619
Luckily they're adjacent.
>>
>>108944627
Show your path then
>>
i'm trying to learn rust.
the whole enumerate Result thing is fucking weird but whatever. my problem is that I never know what it's sending back. you can unwrap it but you have no idea what's in there. am i doing something wrong?
>>
>>108944627
It doesn't fucking matter you stupid nigger. You still need to enter/leave 2 other rooms an odd number of times which is impossible.
>>
>>108944653
You're being baited. Disengage.
>>
File: solved.png (2.1 MB, 1143x1133)
2.1 MB PNG
>>108944664
I genuinely have autism and a point to prove.
If you remove 2 of the odd numbered rooms the puzzle becomes possible.
>>
>>108944643
>enumerate Result thing is fucking weird
Think about it as tagged unions. That's what data enums are in Rust.

>>108944643
>I never know what it's sending back
Result<T, E>
contains T in the Ok case.
>you can unwrap it but you have no idea what's in there
It has two possible states, you gotta handle it. If you want to propagate Err state use ?. If you are sure it's Ok you can use Result::unwrap. If you want to assert it's Result::Ok use expect. If you want to combine it with other Results use the monadic methods or iterators. If you want to do arbitrary operation on each case use match block.
>>
>>108944682
Congrats then, you've found the actual purpose of the test.
>Non-autists:
>bro wtf this impossible, what a stupid test
>Autists:
>but you see, I can make a sneaky line like this! >>108942356
>or like this! >>108944682
>or by removing doors
>or a bunch of other stupid tricks
>>
>>108944682
хтocь змypyвaв двepь
>>
>>108944695
The non autist tries and fails a bunch of times until he gives up and never concludes that it's actually impossible they believe the possible but hard lie.
The autist needs to work out why it's impossible.
I said from the beginning that I am autistic.
>>
>>108944729
Normal people are much smarter than you give them credit for.
>>
>>108944729
>not immediately knowing the fact about odd numbers of edges
>>
>>108944735
>>108944746
I don't believe most people would know the puzzle is soft locked.
>>
>>108944754
most autists would
>>
>>108944682
>I genuinely have autism and a point to prove.
Try also knowing math, and realizing that it's not a graph that admits that kind of traversal. (It's got more than two nodes with an odd number of arcs.) Only a stupid autist wouldn't know that. It's a nice simple piece of logic.
Which means that the text "Hard, but possible!" is a lie. Normies do that sometimes, and you can't stop them from doing it. You need to find ways to cope with it.
>>
File: 1769183800071784.png (33 KB, 512x318)
33 KB PNG
ashamed to say I had to copy the solution to yesterday's problem without spending the time to solve it myself, but that's another month done
>>
Can vector operations fuck with your write syscall?
When it comes to actually printing the result instead of passing it to /dev/null I get better performance with scalar operations.
>>
>>108945512
Turns out it absolutely does slow down syscalls.
I'm trading clock speed for throughput and that's a bad thing.
>>
>>108945512
So the Linux kernel uses scalar operations to copy data around, usually via rep movsX or somesuch. It's possible that the Celeron still has SIMD data in its store buffers (to write out entire cache lines) that cannot be properly shared with the scalar domain, so it flushes the data to memory first - after all it's a low-power architecture with only SSE support, which came out five years after AVX2 was released.

At least that's my best guess.
>>
How do I give up gooning sessions to focus more on programming? Need to spend more time on programming but after 2 days of abstinence it starts becoming really difficult in avoiding gooning. Any tips to give up for good? srs btw
>>
>>108945701
Alcohol.
>>
>>108945701
Why are you asking us how to control your own body
>>
>>108945628
oh shit...
write is a scalar operation that is slowed down by the clock throttling of the previous vector operations.

To truly unlock the maximum speed I'd need to look at writev. Which is a whole kettle of fish on its own.
>>
>>108945716
>write is a scalar operation
No, it's more like *copying data from user to kernel* is a scalar operation. Because ... ... ... ... ... ... ... ... ... ... I don't actually know. It's possible the Linux devs simply didn't want to mess with the mess that is copying data around various flavors of processor architectures, and just used the most standard way of copying data around, even if it objectively sucks ass.
>which would be one of the few instances where they didn't perform weapons-grade syscall optimizations

Long story short: even if you were to avoid the copy the kernel still has to *read* your data to display it. By all means look at writev, but don't expect it to be your solution.
>>
>>108945716
Actually no that would not help at all, I still have to flush rajeesh from my vector registers.
>>
>>108945739
I mean, you *could* attempt to sfence in userspace, but honestly ...
>>
>>108945737
The kernel doesn't use any x/y/zmm registers so it doesn't have to save and restore them on context switches, except in small sections like crypto code. It does that to speed up syscalls, but it does make copying worse.
>>
File: 1780192116211697.png (127 KB, 827x1012)
127 KB PNG
>>108945772
desu I'm 35 and ready to settle.
This does the job I need it to and I am ready to move onto the next abomination.
>>
>>108945800
Yeah, because, like, not having to store and restore 256 bytes totally makes up for the general inability to use SIMD instructions during syscalls.

Hey, you know what would've alleviated the situation? Batching.
>>
>>108945833
32*64 is 2048, not 256.
I don't disagree though. Just saying why it is the way it is.
>>
>>108945867
>32*64
I was assuming 16 16-byte XMM registers. Because I like assuming that people compile their own kernels.
>>
It's actually crazy to think about the fact that you can write slow C.
>>
>>108946106
You can write slow anything.
>>
>>108944026
#include "和.h"

函 選択倍(甲 型 針整) 矢 整 {
如 解 大 2 {
返 解 乗 2;
}
返 0;
}

函 主() {
常 数一 型 応 整<左> 伍(1 2 3 4 5);
常 数二 型 応 整<左> 伍(2 3 4 5 6 7 8);
記(数一 数二);
常 果一 型 応 整<左> 差(数二 数一);
記(果一);
常 果二 型 応 整<左> 果一 流 射(選択倍) 集;
記(果二);
返;
}

<Corrected "uoh" Edition>
Little moonrune puzzle for you /g/uize. What, if anything, does this program output. You can uniquely determine it's output if you make, several assumptions in a space that is possible to disprove, and I promise all macros used are plainly implemented, no tricks! If you use an LLM don't just ask for the answer cause it will fail, I will tell you it's wrong and you will be angry.
>>
Fuck off.
>>
File: 178019936300447.png (123 KB, 1898x1036)
123 KB PNG
C bros we are so back.
>>
>>108946356
>642 ms
>>
>>108946386
>yes | head -100000000
>>
>>108946356
>size_t for the return value of read(2)
Not gonna make it.
>>
>>108946598
teach me?
>>
>>108946617
> 0)
>>
>>108946617
read() returns a ssize_t. It's signed because it can return -1 on an error.
>>
>>108946659
I will NEVER use ssize_t. When they make a 128-bit computer in 2050 I'll just update my code.
>>
Imagine if I wrote stringy in python using the built in functions to change the case and it ended up being faster.
>>
File: 1780208766253942.png (115 KB, 862x1021)
115 KB PNG
Factorio schizo you schizo fuck, don't ever speak to me or my wife's son again.
>>
>>108946760
Do you just hate standard types?
>>
>>108946760
What does that have to do with -1?
>>
God really said I should keep going. Fuck.
>>
>>108942587
I already did.
>>
>>108946221
Anybody figure this out yet? jisho.org
>>
There's nothing more demoralizing than defensive programming your internal code against itself.
>>
>>108946904
>write is supposed to take the same time as three mprotects
I call bull.
>>
>>108947391
What does ssize_t have to do with -1? Have you never heard of i64? Clean up your code lil bro.
>>
>>108947612
Did nobody tell this guy??? ^
Damn. Poor little fella
>>
>>108947612
>What does ssize_t have to do with -1?
ssize_t is a signed type, so it is capable of representing -1.
>Have you never heard of i64?
This is not Rust, and I do not use my own special snowflake typedefs over standard C ones.
>Clean up your code lil bro.
int64_t is not the correct type here.
>>
>>108947610
putchar is buffered.
>>
>>108947639
Holy autism and ugly code too. Dazed and confused.
>>
AI/python dev is the most niggerlicious shit on linux barring gnome. What the fuck is the point in venv and docker if nothing FUCKING WORKS AT ALL and why do I have to download 100GB of horseshit before I get the privilege of figuring that out.
translation: it's not real bro, deadass
>>
>>108947644
Doesn't matter.
>>
>>108947639
based and redpilled
>>108947654
cringe and bluepilled
>>
>>108947639
>ssize_t is a signed type, so it is capable of representing -1.
Unsigned types are also capable of representing -1
>>
File: ichihime-997.png (23 KB, 240x240)
23 KB PNG
>>108947654
I hate pointless integer typedefs with a passion.
Sure, maybe they look nice to you at first, but then you start using libraries and other code that have their own, and then you have code that is either using multiple varieties of integer typedefs or not using a libraries functions """correctly""" by matching their types.

The C99 ones maybe aren't objectively the prettiest (I honestly don't care, syntax highlighting does plenty of heavy lifting), but they're the standard and consistent, which is far more aesthetically pleasing to me.

But (s)size_t doesn't even fit into this discussion. It's not a pointless typedef, and is imbued with more meaning than a mere uintN_t could. You see it ALL OVER the fucking place in real C.
It's the next best thing to being a first class integer, even having it's own special printf format (%zu).
>>
>>108947704
Most retarded post of this thread.
>>
>>108947718
see >>108946221
>>
>>108947718
They hated anon because he spoke the truth
>>
>>108947705
ok, maybe maidposters aren't as bad as people want me to believe.
Kinda based take.
I do hate the basic C types because of their ambiguity depending on architecture. But (u)intX_t just works.
Also (almost) never use typedef on structs pls. Thanks
>>
>>108947735
There is a difference between the bit pattern that represents -1 and the value -1 itself.
C is NOT assembly, don't try to bring any of that shit up.
#include <stdio.h>
#include <stdint.h>

int main()
{
union {
int8_t value;
uint8_t bitpattern;
} u = { .value = -1 };

uint16_t a = u.value;
uint16_t b = u.bitpattern;

printf("value = %04w16x\nbitpattern = %04w16x\n", a, b);
}

value = ffff
bitpattern = 00ff


>>108947750
It's not a maid, it's a cat girl from a mahjong game.
>>
>>108947799
>There is a difference between the bit pattern that represents -1 and the value -1 itself.
What happens when you add the number whose bit pattern "represents -1" (for a signed number) to another number?
>>
>>108947840
You're mixing in underlying details of how integers are represented with the actual types themselves (from a language perspective).
You can't < 0 an unsigned integer. You can't correctly convert it to another integer type and preserve its value, as I showed.

I get it, you just completed your first year of CS and think two's complement is the neatest thing, and maybe you even learned what a register is, but you need to learn that programming languages do not operate on that level, not even C.
>>
>>108934852
>>108934866
gtfo my board you marketing shill, literally no zoomie shills for AI like this.
>>108937279
sovl
>>
>>108947890
Unsigned "overflow" is well defined behaviour in C. Unsigned has a -1, that is to say an additive inverse of 1.
>>
File: 1549582105759.jpg (40 KB, 425x564)
40 KB JPG
>>108947921
I did a math course in my final year of university about fields and all of that shit, but I forgot basically all of it.
>>
>>108947945
How are these amerilard hours. Real analysis starts in middle school in Germany.
>>
I am going to flip flop between asm and c while I struggle.
I did the same with c and python.
>>
>>108932761
no
>>
>>108948040
>asm and c
Just use both at the same time. You get to call C functions to skip some of the annoying stuff (e.g. malloc, printf), and get to learn about calling conventions too.
Inline assembly is usually eye cancer though, and only really appropriate for things that are a few lines. It's so much nicer when things are in their own .s files and you just link them together like any other object files.
>>
File: 1780227760627190.jpg (1.22 MB, 3716x3528)
1.22 MB JPG
I wish std::vector had a constructor that allowed you to do what std::vector::reserve() does.
You can technically do:
std::vector<int> vec(3)

but then the size also changes.
The best option is probably something like this:
auto create(int reserve_amount)
{
std::vector<int> vec;
vec.reserve(reserve_amount);
return vec;
}

int main()
{
std::vector<int> vec = create(3);
}

either that or initialize with a lambda that has the same routine.
>>
>>108948094
My suggestion is to just stick with the API that you have despite it's flaws, that's just C++ you will waste too much time trying to turn it in to your own language it's not worth it. it's better for the code to be obvious and always written exactly the same way you do the same thing in every project, you use the size constructor when you need to initialize elements randomly with operator[] and you use the reserve idiom when you are pushing elements one at a time.
>>
>>108948094
to be fair there isn't that much extra cost the default ctor won't allocate
>>
File: 1780229726966596.png (38 KB, 314x463)
38 KB PNG
>>108948062
I'm gonna see what interesting macros I can write to alleviate the cancer.
I do enjoy directly watching the registers and using labels and jumps.
>>
What's everyone's opinions on C++ references, pointers and consts?

It seems like a pretty cancerous clusterfuck.
>>
>>108947890
>>108947921
Yeah i was about to say, doesn't an unsigned int just 'modulo wrap' to the end of its value range?

It's how you get funny loops.
>>
>>108941354
>line 4
take big 2 {
so probably x > 2 meaning 如 is if?
如 is associated with likeness, like, such as, as if, better, best, equal
>矢 整
is -> int
数整 means integer

>>108942797
in this case 応<整> is std::vector<int>
>>
>>108948465
if N is 2^k (k = number of bits) then N = 0, a + (N - b) = (a - b) + N = a - b
>>
>>108948442
#define let const auto
#define ref const auto&
#define var auto&
No STL. C pointers and casts only. Arena allocators instead of new/delete. Array and string types that take allocator as param with thread local temp allocator as default param.
Strings not null terminated, cstr() and constructor to convert.
>>
File: 1751744650968528.jpg (197 KB, 736x1062)
197 KB JPG
Just became a wizard this weekend. I figured it's time to start practicing wizard skills as well. Any good books on reverse engineering?
>>
>>108948481
if it wasnt clear this is modulo N
>>
I can't code anymore.
My retard sheeple brain says I have to learn the new shit to get a new job.
Or contribute to open source
Or do some of that cool stuff that normies like, you know.
But that shit is all boring. But the obsessive thought about it and feeling bad about not doing it gets me burned out.
Now I don't know what to do for fun and I just sit here for 10 hours a day doing nothing.

What do? I feel bad, but I shouldn't. No one is forcing me to work for free. I can do whatever I want in my free time, but I don't want to feel bad about it.
Because when I feel bad my brain isn't working (it has a hard time even if it is working)
>>
>>108948057
Oh okay, just checking.



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