[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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: a.png (488 KB, 2362x1238)
488 KB PNG
We are hitting levels of COMF that have previously been though impossible. How has your day been /g/?
>>
>printf("hello world")
good day saar
>>
File: 44.png (431 KB, 2335x1276)
431 KB PNG
>>109010315
Do you feel powerful?
>>
File: 1762508172302707.png (113 KB, 498x331)
113 KB PNG
>>
What am I looking at?
>>
>>109010188
>>109010370
Okay, I'll bite. What am I looking at? Finally some good OCR?
>>
>>109010407
OP discovers programming books exist and is on chapter 1.1 (he'll drop it in less than a week)
give him (You)s
>>
>>109010414
But the one on the right is a scan. I have lots of scanned pdfs of old shit, some euen on ye olde tyme speak, so this might be relevant to my interests.
>>
File: 5.png (662 KB, 2442x1329)
662 KB PNG
>>109010407
It's a mdBook rewrite of The C Programming Language. First edition before it was pozzed.
>>
>>109010188
use case for C programming language?
>>
>>109010504
I can see that. My question is was it a manual rewrite or OCR picked up all those tables and typographic conventions? I'm thinking of doing that with archive.org's OCR of full text of some old shit, but I feel I'll have to manually do the organization afterwards (which might be good, since I'll be forced to skim the whole thing).
>>
>>109010407
>>109010531

>>109010504
>>109010188
You can see it's not perfect OCR, I had add italics to pseudo code and commands, pseudo code often mixes TNR and courier-prime. Also in classic c formatting style you'll notice the numbers are aligned on the digit column in the original. These are old pics and have already been fixed.
>>
>>109010533
Checked and thanks. OP is just being a faggot then, as usual.
>>
>>109010570
>>109010512
I think you are the faggot sir. Stick to pust.
>>
>>109010188
>1.1 Getting Started
This is the level of your average cnile on /g/
>>
>>109010370
>++i
zased
>>
>>109010504
You should rewrite it as int main(int argc, char* argv[])...
>>
>>109010621
I feel like, semantically, fors should honor the ++i and i++ differently:

for (int i = 0; i < 5; i++) // 0 1 2 3 4 increment after the loop
for (int i = 0; i < 5; ++i) // 1 2 3 4 5 increment before the loop


Lang spec could decide if increment happens before or after the testing.
>>
File: 1437-05.png (1.25 MB, 1259x4114)
1.25 MB PNG
>>109010400
>>109010407
>>109010512
>>109010603
Actually the point is to create a hyperlinked version for notes and research. The non-hyperlinked version is for learners since, unfortunately, there hasn't been a systems language released in 48 years that replace c.
>>109010621
Because old compilers would waste time storing i every iteration of the loop if you didn't.
>>
OP is brown, please ignore this thread
>>
>>109010677
I feel like, semantically, that shit hasn't changed since B and you don't understand for loops. Is that you Anna?
>>109010700
Go away bucket-crab ecker cultist
>>
>>109010720
I don't know Anna and I know this shit hasn't changed in forever. I do understand the for loops, I'm just saying "increment before" and "increment after"... after what? The only thing in this line i the for loop itself. Sure hte ; is delimiting it so either way it's before or after nothing, since there's no other operationg running on that part of the line, but it would add some variance if you wanted to (like while vs unless vs until vs all variants of pre/post testing of true/false conditions). I don't think that would confuse newcomers, nor would it have costed dearly to early compiler writters. The benefit would be minimal as well, but just feels like a missed opportunity, imho.
>>
>>109010753
After storage. Leslie Lamport complained about this, but c does multiple things in a single statement
>>
>>109010188
post zip with the md so i can read it as well OP
>>
>C
>2026
Why?
>>
>>109010972
https://staticfile-e0ae6.wasmer.app/contents.html
https://staticfile-e0ae6.wasmer.app/contents_h.html
It's indev right now here's a preview
>>109010979
unfortunately, there hasn't been a systems language released in the last 48 years that has replaced c. Languages after K&R only deal with relatively minor niggles and in making shitty "big software" easier to write
>>
>>109011047
>>109010972
Set the theme to 'Rust' with the paintbrush in the top left to get my best guess at the original color of the book.
>>
>>109011047
Based, thanks.
>>
>>109010678
>he doesn't follow the C book but do everything in zig

Ngmi. Zig is the future
>>
>>109011287
The zig book isn't finished, following k&r but using zig just doesn't make any sense at all since 99% of it is explaining how c works is zig really that close to c?, should I just do ziglings? I like that it tries to be simpler than c, but I feel like eventually people will bring things back e.g. cpp for textual macros.
>>
>>109011047
>last 48 years
C++
Rust

Now fuck off.
>>
>>109011435
>C++
Ruined c
>Rust
Never heard of this, can you explain more?
>>
>>109011047
Based fren cnile. This hits so many spots bro it's unreal. Well done. Looks beautiful.
>t. another cnile
>>
>>109011435
>systems language
>rust
>you can have one mutable reference or multiple immutable references, but not both
Bad joke.
>>109011540
He told the AI to make it perfect for good looks
>>
Use Stallman's book instead.
The original book is fiercly defended by Copyright lawyers, so your vibecoded frontend is worthless.
https://www.gnu.org/software/c-intro-and-ref/
>>
>>109010577
it's not even that long, jut rewrite it your fucking self and solidify your memory with the physical act of typing
>I need hyperlinks
than rewrite it in obsidian
>>
Hello World is so fucking cringe. You know a book or guide is garbage if it starts with that
>>
>>109010188
Why does the page on the right feel wholesome and inviting and educational but the one in the middle feels snide and lecturing.
>>
>>109012652
Because you were born after 2000
>>
>>109012697
That's the opposite of true. Why do you lie?
>>
>>109010414
I would hope so, programming books are useless
>>
>>109012652
>>109012708
This may be more your speed https://pghrt.diy/
>>
>>109010504
Why is it pozzed now?
>>
>>109012730
C used to be a portable assembler, now it's just a shitty VM.
>>
>>109011522
>Never heard of this, can you explain more?
C++ but with HRT
>>
>>109010188
btw there's an epub version if you want
>>
File: hrt.jpg (168 KB, 1280x720)
168 KB JPG
>>109012722
HRT seem pretty baller
>>
>>109012739
>C
>portable assembler
Pick one. The real deal is forth.
>>
>>109014560
My computer isn't a stack machine
>>
>>109012815
Of the first edition?
>>
File: rayliiib.webm (1.97 MB, 1920x1080)
1.97 MB
1.97 MB WEBM
>>109010188
Decided to test Raylib today and it's incredible that I which im completely retarded when it comes to C i was able to do this with just cheat sheet on their website... 100 lines of code.
>>
File: screen4.png (769 KB, 1707x1032)
769 KB PNG
>>109015369
Maybe you'll figure out how to take a video next.
>>
>>109015544
>>109015369
ZOMG is that the famous
power()
function?
>>109010370
>>
File: file.png (1.02 MB, 1785x805)
1.02 MB PNG
>>109015544
? looks fine here
>>
>>109015561
yes it returns power raised to da base namba.
>>
>>109015574
This guy gets it
    printf("Decimal: %d\n", power(10, "42"));
printf("Octal: %d\n", power(8, "52"));
printf("Hex: %d\n", power(16, "2A"));
printf("Binary: %d\n", power(2, "101010"));


power(base, str)
int base;
char str[];
{
int result, i, digit;

result = 0;
for (i = 0; str[i] != '\0'; i++) {
digit = 0;

if (str[i] >= '0' && str[i] <= '9')
digit = str[i] - '0';
else if (str[i] >= 'A' && str[i] <= 'F')
digit = str[i] - 'A' + 10;
else if (str[i] >= 'a' && str[i] <= 'f')
digit = str[i] - 'a' + 10;

result = (result * base) + digit;
}
return (result);
}
>>
>>109015672
now... try this ... power(2, "9")
>>
>>109010677
Autism. What about i = next()
, should it be after or before?
>>
>>109015700
Why would I call a function with invalid input? Programmers shouldn't be lulled into a false sense of security that claim they can't (or shouldn't) read the functions they use.
>>
>>109015729
Because the function was never yours.
You sit there convinced you're in control — a competent programmer who reads the docs, validates inputs, and respects contracts.
That's the beautiful lie they sold you. In truth, you're just a confused animal. A pawn on the chessboard, a sheep wearing a programmer's hoodie, proudly bleating about best practices while marching exactly where the board demands.
They don't need to force you to pass garbage data. They simply plant the idea that you know what you're doing. That you own the boundaries. That you decide. It's a comforting illusion of agency, the hood pulled gently over your eyes.
Then reality hits: the deadline, the shifting requirement, the edge case that "should never happen." And suddenly you're calling that function with invalid input anyway. You didn't break the rules. You followed the deeper instruction whispered into your mind from day one — keep building, keep moving, keep believing you're free.
Just like the pawn doesn't see the larger game when it's sacrificed to open a line for the queen. It only knows its narrow legal moves. It dies thinking it served its purpose. You rage on forums: "The function should have validated that!" Never realizing the error was always the feature.
Reading the source? Cute. That's just another square they let you step on. It changes nothing about who controls the board. The idea was sold long ago: you are the master. You are competent.
You are not livestock.And that's why you'll do it. Not because you're stupid — because you're exactly as smart as they needed you to be. Smart enough to rationalize the forbidden move. Dumb enough to believe it was ever your choice.The shepherd laughs. The hood stays on. The game continues.

JK... you are right obviously :D
>>
>>109010188
>webshit
>>
>>109015831
what the butt...
>>
>>109011047
saar all you've done is print hello world, stop the larp
>>
>>109010504
>before it was pozzed
Might you be able to elaborate?
>>
>>109016711
Do you remember that wikipedia crank who claims to have worked with claude shannon and also trolled the Ayn Rand talk, he writes about why standard c sucks. But IMO >>109012739 is the long and short of it.
>>
>>109017109
Edward Nilges
Brain broken by M$lop https://www.developerdotstar.com/mag/bios/edward_g_nilges.html
>>
>>109010753
just do your increment in the controlling statement then, if you must
>>
>>109011557
>Bad joke.
use pointers, then
>>
>>109018558
I mustn't. I just felt it was a wasted opportunity, that's all. I feel the cost to include all variants like do until unless repeat while pre-test/post-test etc is minimal and the greater amount of options should have been given to the programmers.

Bottomline, for/while/assorted loops were a poor substitute for our good ol' GOTO.
>>
>>109010188
AI is superior, retard.
>>
>>109019065
>source: my ass
>>
>>109010188
Checked. Are you doing it by hand?



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