Tumgik
#c89
ryuji-terix · 3 months
Text
My plan on getting better with a language?
Usually it's programming like if there was no tomorrow but, I've run out of thrilling projects...
After scrapping my last C project (too many platform dependant stuff!), I was left empty handed
And, being a program away from burnout, why not learn C89 with code challenges?
After my inital (unsuccessful) research in the matter, I've settled on Project Euler, a math focused challenge website (and not based on stupid questions)
Every solution is on my Github (here) and I plan on completing at least the first hundred and see if it's worth it the time or I should check other ways
Completed 003/864
0 notes
gslin · 2 years
Text
C 語言裡面的 ??! 符號
C 語言裡面的 ??! 符號
在 Hacker News Daily 上看到這個奇怪的知識:「What does the ??!??! operator do in C? (stackoverflow.com)」,原文在 Stack Overflow 上:「What does the ??!??! operator do in C?」。 這是 trigraph,在 C89 就有了,在 Rationale for International Standard—Programming Languages—C 這邊的 5.2.1.1 就有提到這段歷史原因: Trigraph sequences were introduced in C89 as alternate spellings of some characters to allow the implementation of C in character sets…
View On WordPress
0 notes
sonderwrit · 7 months
Text
C89: Farewell
I Have to Be a Great Villain - Masterpost
Summary: The zombie tide has invaded the city, forcing Qin Xian to head to the frontlines to deal with the threat. Meanwhile, Wang Yi gets attacked by a zombie during house arrest and defeats it before entering the streets, where he successfully orders another zombie to stop attacking him.
Wang Yi: (What's going on?) WY: I...seem to be WY: Able to mind control zombies? WY [walkie talkie]: Ah, I suddenly started nosebleeding, it hurts a lot... Qin Xian: Don't move, I'll look for you. QX: Keep an eye on the walls, I'll be gone for 10 minutes. Underling: Yes!
WY [walkie talkie]: Hey, don't be so anxious, I'm fine. WY [walkie talkie]: Isn't it good that I can control zombies now? WY [walkie talkie]: I can just chase them all out and—pewpew Qin Xian: You're already infected, can you stop f**king laughing!!!!!
WY: .... WY: Haha. [SPECIFICATION: Although ability users turn into zombies slower than ordinary people, they can also be infected and die from the zombie virus. After turning into a zombie, their abilities are still preserved for the zombie's use.] WY [walkie talkie]: It's because I know there's no way back now that I'm infected. (You can't reverse the zombification process.) WY [walkie talkie]: So it's pointless to grieve. Might as well think of things I can do instead. Qin Xian: .... QX [walkie talkie]: How were you...infected? An injury? WY (smacking zombie to death): No. WY: I was never injured. That's why I feel like this is fate. WY: God wants me dead, but I was so well protected there was no chance for accidental deaths, so only a virus infection would do. QX [walkie talkie]: But I...don't want you to go. WY: Sorry... *digging for something* WY: I actually think this isn't a bad ending. WY: Zombies have no issues with stamina, so it's really convenient to use my powers. WY (with megaphone): Hello, hello? WY: (Great, it's working.) WY: Of course, that's as long as I'm still sane.
QX: .....! QX: Are you planning to— Wang Yi: Hello, hello— WY [megaphone]: ALL ZOMBIES PRESENT. WY [megaphone]: FOLLOW ME! Ability Activated: Mind Control WY [megaphone]: Humans don't need to come. WY [megaphone]: When it's all over tomorrow, everyone can go back to their peaceful, stable lives. Qin Xian: WANG YI?! QX: Don't be a fool, your body's still human right now! WY: Oh, Adjutant Qin's here? WY: Perfect, there's a favor I need to ask you. WY: I'm planning to climb on top of the city walls—to completely destroy the zombie tide. QX: ...... QX: Why.... QX: Why did it turn out like this...? Although I did my best...it still...still— WY: I said this was the best outcome. Otherwise, even if we stop the zombie tide, there'll be heavy casualties. There's no better bargain than sacrificing my life to protect all the people in the city. So... WY: Let me go, all right? QX: If I say no...will you listen. WY: Adjutant Qin won't refuse me. WY: Because in your heart, you also know— WY: What you need to do to save this place. WY: Qin Xian. WY: Come send me off for the last time?
QX: *grits teeth* QX: All units, listen up. QX: Collect all gasoline in the city and pour them over the city walls! WY [megaphone]: ALL ZOMBIES, LISTEN TO MY ORDERS. WY [megaphone]: LEAVE THE CITY—LEAVE THE CITY—AND THEN— WY [megaphone]: THOROUGHLY SLAUGHTER EACH OTHER!
Soldiers: Light the fires! WY [megaphone]: YOU CAN FIGHT EACH OTHER OR TEAR EACH OTHER APART! WY [megaphone]: ALL OF YOU, KEEP FIGHTING UNTIL YOU HAVE NO MORE STRENGTH TO CRAWL— Soldier 1: A single zombie...lit so many others on fire... Soldier 2: They're really—killing each other? WY: (Huff...exhausting.) WY: (Is it still pushing the limits to control so many zombies at once?) S-0: Host, you don't have much time left. S-0: It should've taken one day for the zombie transformation to finish, but because you overused your abilities, you're going to lose your mind very soon. WY: Yeah, I know. WY: Wait for me...to say farewell.
WY: Hey, Qin Xian. I need to go. WY: Give me some gasoline and explosives, all right. WY: I don't want to burden them by turning into some half-human, half-monster thing. QX: ..... QX: Do you want to drive me insane? Qin Xian tosses Wang Yi the gasoline. WY: Hey, there's nothing else we can do. WY: Thanks. *pours* WY: The next life. WY: If we can meet again. WY: Let's stay together.* QX: ....! QX: ...what? QX: Are you pitying me? Saying vague things like a next life! WY: It's not pity. WY: It's a promise. WY: I believe our future selves will meet again. WY: Does Adjutant want to try believing, too?
*Let's stay together (我们在一起) - also a way to say "let's be a couple together"
0 notes
brenna-ofmd · 7 months
Text
Tumblr media
0 notes
jasper-rolls · 2 years
Audio
BURN! BURN!! BURN!!! (Raver Edit) - P*Light [C89 pichnopop Special Disc]
0 notes
kremlin · 8 months
Note
How DOES the C preprocessor create two generations of completely asinine programmers??
oh man hahah oh maaan. ok, this won't be very approachable.
i don't recall what point i was trying to make with the whole "two generations" part but ill take this opportunity to justifiably hate on the preprocessor, holy fuck the amount of damage it has caused on software is immeasurable, if you ever thought computer programmers were smart people on principle...
the cpp:
Tumblr media Tumblr media Tumblr media
there are like forty preprocessor directives, and they all inject a truly mind-boggling amount of vicious design problems and have done so for longer than ive been alive. there really only ever needed to be one: #include , if only to save you the trouble of manually having to copy header files in full & paste them at the top of your code. and christ almighty, we couldn't even get that right. C (c89) has way, waaaay fewer keywords than any other language. theres like 30, and half of those aren't ever used, have no meaning or impact in the 21st century (shit like "register" and "auto"). and C programmers still fail to understand all of them properly, specifically "static" (used in a global context) which marks some symbol as inelligible to be touched externally (e.g. you can't use "extern" to access it). the whole fucking point of static is to make #include'd headers rational, to have a clear seperation between external, intended-to-be-accessed API symbols, and internal, opaque shit. nobody bothers. it's all there, out in the open, if you #include something, you get all of it, and brother, this is only the beginning, you also get all of its preprocessor garbage.
this is where the hell begins:
#if #else
hey, do these look familiar? we already fucking have if/else. do you know what is hard to understand? perfectly minimally written if/else logic, in long functions. do you know what is nearly impossible to understand? poorly written if/else rats nests (which is what you find 99% of the time). do you know what is completely impossible to understand? that same poorly-written procedural if/else rat's nest code that itself is is subject to another higher-order if/else logic.
it's important to remember that the cpp is a glorified search/replace. in all it's terrifying glory it fucking looks to be turing complete, hell, im sure the C++ preprocessor is turing complete, the irony of this shouldn't be lost on you. if you have some long if/else logic you're trying to understand, that itself is is subject to cpp #if/#else, the logical step would be to run the cpp and get the output pure C and work from there, do you know how to do that? you open the gcc or llvm/clang man page, and your tty session's mem usage quadruples. great job idiot. trying figuring out how to do that in the following eight thousand pages. and even if you do, you're going to be running the #includes, and your output "pure C" file (bereft of cpp logic) is going to be like 40k lines. lol.
the worst is yet to come:
#define #ifdef #ifndef (<- WTF) #undef you can define shit. you can define "anything". you can pick a name, whatever, and you can "define it". full stop. "#define foo". or, you can give it a value: "#define foo 1". and of course, you can define it as a function: "#define foo(x) return x". wow. xzibit would be proud. you dog, we heard you wanted to kill yourself, so we put a programming language in your programming language.
the function-defines are pretty lol purely in concept. when you find them in the wild, they will always look something like this:
#define foo(x,y) \ (((x << y)) * (x))
i've seen up to seven parens in a row. why? because since cpp is, again, just a fucking find&replace, you never think about operator precedence and that leads to hilarious antipaterns like the classic
#define min(x,y) a < b ? a : b
which will just stick "a < b ? a: b" ternary statement wherever min(.. is used. just raw text replacement. it never works. you always get bitten by operator precedence.
the absolute worst is just the bare defines:
#define NO_ASN1 #define POSIX_SUPPORTED #define NO_POSIX
etc. etc. how could this be worse? first of all, what the fuck are any of these things. did they exist before? they do now. what are they defined as? probably just "1" internally, but that isn't the point, the philosophy here is the problem. back in reality, in C, you can't just do something like "x = 0;" out of nowhere, because you've never declared x. you've never given it a type. similar, you can't read its value, you'll get a similar compiler error. but cpp macros just suddenly exist, until they suddenly don't. ifdef? ifndef? (if not defined). no matter what, every permutation of these will have a "valid answer" and will run without problem. let me demonstrate how this fucks things up.
do you remember "heartbleed" ? the "big" openssl vulnerability ? probably about a decade ago now. i'm choosing this one specifically, since, for some reason, it was the first in an annoying trend for vulns to be given catchy nicknames, slick websites, logos, cable news coverage, etc. even though it was only a moderate vulnerability in the grand scheme of things...
(holy shit, libssl has had huge numbers of remote root vulns in the past, which is way fucking worse, heartbleed only gave you a random sampling of a tiny bit of internal memory, only after heavy ticking -- and nowadays, god, some of the chinese bluetooth shit would make your eyeballs explode if you saw it; a popular bt RF PHY chip can be hijacked and somehow made to rewrite some uefi ROMs and even, i think, the microcode on some intel chips)
anyways, heartbleed, yeah, so it's a great example since you could blame it two-fold on the cpp. it involved a generic bounds-checking failure, buf underflow, standard shit, but that wasn't due to carelessness (don't get me wrong, libssl is some of the worst code in existence) but because the flawed cpp logic resulted in code that:
A.) was de-facto worthless in definition B.) a combination of code supporting ancient crap. i'm older than most of you, and heartbleed happened early in my undergrad. the related legacy support code in question hadn't been relevant since clinton was in office.
to summarize, it had to do with DTLS heartbeats. DTLS involves handling TLS (or SSLv3, as it was then, in the 90s) only over UDP. that is how old we're talking. and this code was compiled into libssl in the early 2010s -- when TLS had been the standard for a while. TLS (unlike SSLv3 & predecessors) runs over TCP only. having "DTLS heartbeat support in TLS does not make sense by definition. it is like drawing a triangle on a piece of paper whose angles don't add up to 180.
how the fuck did that happen? the preprocessor.
why the fuck was code from last century ending up compiled in? who else but!! the fucking preprocessor. some shit like:
#ifndef TCP_SUPPORT <some crap related to UDP heartbeats> #endif ... #ifndef NO_UDP_ONLY <some TCP specific crap> #endif
the header responsible for defining these macros wasn't included, so the answer to BOTH of these "if not defined" blocks is true! because they were never defined!! do you see?
you don't have to trust my worldview on this. have you ever tried to compile some code that uses autoconf/automake as a build system? do you know what every single person i've spoken to refers to these as? autohell, for automatic hell. autohell lives and dies on cpp macros, and you can see firsthand how well that works. almost all my C code has the following compile process:
"$ make". done. Makefile length: 20 lines.
the worst i've ever deviated was having a configure script (probably 40 lines) that had to be rune before make. what about autohell? jesus, these days most autohell-cursed code does all their shit in a huge meta-wrapper bash script (autogen.sh), but short of that, if you decode the forty fucking page INSTALL doc, you end up with:
$ automake (fails, some shit like "AUTOMAKE_1.13 or higher is required) $ autoconf (fails, some shit like "AUTOMCONF_1.12 or lower is required) $ aclocal (fails, ???) $ libtoolize (doesn't fail, but screws up the tree in a way that not even a `make clean` fixes $ ???????? (pull hair out, google) $ autoreconf -i (the magic word) $ ./configure (takes eighty minutes and generates GBs of intermediaries) $ make (runs in 2 seconds)
in conclusion: roflcopter
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ disclaimer | private policy | unsubscribe
160 notes · View notes
anastpaul · 5 days
Text
Our Lady of Genazzano (1467) / Our Lady of Good Counsel, Saints Cletus and Marcellinus, Popes and Martyrs, Remembering Bishop Daniel Dolan (1951-2022) and the Saints for 26 April
Our Lady of Genazzano (1467) / Our Lady of Good Counsel – 26 April:HERE:https://anastpaul.com/2021/04/26/our-lady-of-genazzano-1467-our-lady-of-good-counsel-and-memorials-of-the-saints-26-april/ REST in PEACE – The Second Anniversaryof the +Death of Bishop Daniel L Dolan+ St Pope Cletus (c25-c89) The 3rd Bishop of Rome and MartyrHis Life and…
Tumblr media
View On WordPress
5 notes · View notes
delmondo · 3 months
Text
have some code
4 notes · View notes
citrusfruits510 · 8 years
Text
Tumblr media
C89(2015冬コミ)表紙絵。こいしchang!
6 notes · View notes
Text
Tumblr media
10 notes · View notes
ryuji-terix · 4 months
Text
Debugging sucks
I just spent half an hour placing printfs EVERYWHERE because I kept getting "error: B", which meant that the program couldn't succeed in cutting/printing a string, and I was worried that it was because I was messing with the terminal, but even after stripping down the hole program to the bare minimum it still didn't work, but guess what? I mistyped :D
That 'os_name != NULL' (two lines below the cursor) wasn't supposed to be a negation :)
Tumblr media
I'm soo tired, I was supposed to go to sleep an hour ago, sorry for dumping it all out but I was going crazy
0 notes
nobully · 1 year
Text
Tumblr media
Art by 黑昀_
Goodbye, my lover
Artist's Notes: Based on the latest knives (read: angst) chapter [c89]. The roses are covering the half of Wang Yi's body that zombified, including his eye, neck, and surrounding skin. I wanted to draw the idea of Qin Xian burying Wang Yi.
(Original raws: 根据新一话的刀子画的 玫瑰花遮住的是王亿变成丧尸的那一半眼睛 脖子上和眼睛都画了丧尸的皮肤, 想画秦现埋葬王亿的感觉)
3 notes · View notes
cinnamonwolfy · 1 year
Text
i have some criticisms for the gnu project
like, a lot of criticisms. there's so many things they do so wrong and are so questionable, it's not even funny. then again, stallman still is part of the foundation, and stallmanisn is suuuper contagious (even i had it for a bit, luckily @raisinware was there to deradicalize me before it was too late <3 <3 <3)
i have a lot to say, but i will just put the top 3 things wrong with gnu and the fsf in this post
so let's start with one of the lesser ones, lgpl. in theory, lgpl should be a lot less restrictive and easier for companies to follow without being forced to open-source their code (i know that for a lot of foss devs that this is a hard pill to swallow, but some software is best left to be closed-source. not everything needs to be foss, and for most commercial software projects, it would be detrimental to have such stuff open-source). well, the lgpl is just the gpl with a shared linking exception, basically making it kinda useless. the lgpl really should've been a stricter mpl-like license. mpl just makes more sense for libraries than gpl does, and making lgpl almost fully compatible with mpl would've helped a lot with mpl-gpl interop. sadly, lgpl is still gpl for the most part, which means that barely anyone uses it (at least compared to gpl)
one of the bigger gripes i have with the gnu project is autotools. i'm not gonna sugarcoat it, autotools is garbage. it generates so much stuff that goes unused due to it being legacy cruft from other proprietary unix clones, and it's a biggger pain in the rear than cmake to set up a project with it and actually make it compile something. i guess it works nicely for compiling software on legacy unix systems, but gnu is not really legacy, as it keeps getting updated. and with how many gnu extensions they already do with their software to the point where there's software that depends on gcc to compile at all, you would assume that they would get rid of all of the legacy cruft that nobody really uses anymore (unless you're runinng it on aix, in which case, you'd go with an older version anyway). this is why a lot of my projects use their own custom autotools-like build system alongside meson, so that way i can accomplish cross-platform compilation while also supporting old unix systems via the posix shell scripts
and now, my biggest problem with gnu: their complete obsession over c90, despite c99 existing and being hundreds of time better (and that's before you consider c11, which is already out of date, and rust). gnu still believes that current year is 1991, and thus still uses c89/c90 in a lot of their projects (which is why their projects are so messy), even projects such as gnulib, which even though it already requires c99, they still write a lot of the library in c90 and even deliberately just avoid using c99 for no reason known to science. i swear, they act like rust programmers do, but instead of a nice and modern language that deserves that attention, it's an ancient piece of crap that nobody except them likes using, that has been replaced by newer versions of the c language and even rust
anyways, that's enough complaining for one post (i did just write a nyt bestselling book above x3). it was nice to release some of the stuff i've had to deal with while creating and maintaining portalinux with my gf. i have more stuff about gnu and the fsf to complain about, but that would be too long, even for tumblr standards x3. so i will probably end up making a video of it on my yt channel whenever i feel comfortable enough with my voice to post :3. if you made it this far, thank you for putting up with so much text, i just really needed to let some steam off :3
i wish you all a good day (or night) :3
4 notes · View notes
sonderwrit · 7 months
Text
Tumblr media
I Have to Be a Great Villain - Translation Masterpost (ongoing)
Disclaimer: These are casual translation by yours truly, an amateur translator, so take them with a grain of salt. I thought the scanlations were getting too MTL quality (no offense meant!) so I started reading the raws and translating them on my own starting with C89 (near the end of World 2/Apocalypse arc). Putting them here for archive purposes in case anyone wants to read them, lol. Picture is latest banner promo image on the manhua site yay, Wang Yi looks so villainous~
Table of Contents (C89 onwards)
World 2 - Zombie Apocalypse Arc C89: Farewell C90: See you next life World 3 - Crazy Scientist Arc C91: Dr. Wang pretends to be a pyscho C92: Slime! C93: It burrowed into the brain C94: Obsession C95: You knew after opening your eyes C96: Transformation C97: Eat! C98: Familiar face C99: Why C100: Danger C101: Memory C102: I don't understand C103: Date C104: Don't want to let go C105: Harem C106: Wanna try it? C107: Critical juncture C108: Overboard! C109: Mission accomplished? C110: We have to...be together World 4 - Cultivation Arc C111: He'd probably beat me up C112: There's a kitty! C113: Deja vu C114: Somewhat familiar C115: Picture book C116: Rest C117: BUG C118: Heaven's will is merciless? C119: Uncontrollable C120: This is enough C121: Sincerely C122: Protracted battle (posted 4/9/2024) C123: Just you wait, Master C124: This person is not simple C125: Inner demon C126: Safeguard C127: Why did he come? C128: You misunderstood C129: Of course I'm complying C130: Hunger
45 notes · View notes
defconprime · 2 years
Text
Tumblr media
Skybox TOS Season Two trading card number C89, "A Private Little War," 1998.
16 notes · View notes
zoreyan · 2 years
Text
Tumblr media
2 notes · View notes