C shills

Have you actually ever written anything signifcant in C?
It seems like everyone shills C all day every day but i bet none of you ever wrote anything other than fizzbuzz in C.

Other urls found in this thread:

web.archive.org/web/20170510032320/http://98.176.82.106:15000/cgi/cts
youtube.com/watch?v=NCTf7wT5WR0
users.ece.cmu.edu/~koopman/pubs/koopman14_toyota_ua_slides.pdf
cmocka.org/
throwtheswitch.org/unity/
blog.rust-lang.org/2014/10/30/Stability.html
twitter.com/AnonBabble

i'm currently writing software to track my stock portfolio, but I don't program for a job, so define significant

is cat significant?
because it's a fundamental program, yet it pales in comparison to your preferred kernel

...

I did embedded C in college, but that's not "real" C because embedded C is like 99% platform specific macros and register bullshit that's not really that much different from faffing about in assembly. There's not really any CS shit going on unless you want to get fancy with an RTOS or something, and you only need to be aware of a handful of potential compiler quirks so you don't end up frying some transistors because code that's written sequentially may not be compiled sequentially.

It's basically just engineering shit to work.

I've written small but nontrivial C programs. I criticize it a lot on Holla Forums. I think a lot of things about it are unnecessarily terrible. I think it's a sensible choice for a lot of software, if only because everything else uses it, but replacing it is a good long-term goal.


I think he means "complex enough that the language you choose matters". A minimal (think Plan 9, not POSIX or BSD or GNU) cat isn't very far above a fizzbuzz, so it might not count. Whether it's useful or important doesn't really matter.

Jokes on you fag, I don't even know how to fizzbuzz

I mentioned fizzbuzz to a 20 year veteran at a software company I'm working at, and he had never heard of it before.

I don't shill C.

I did write a website cgi in C for one of Holla Forums's servers to show leaderboards (imported from their game server's database). Not a technological marvel but its beyond a fizzbuzz.

web.archive.org/web/20170510032320/http://98.176.82.106:15000/cgi/cts

...

A thread died for this /g/ posters trash.

I wrote ika.itch.io/redsky in c. 7k lines for the engine ,7k for the map editor

This is by far the dumbest "argument" you can make. If that thread was so important why was it about to get bumped off anyways?
If you cared so much about it why didn't you bump it?
Seriously fuck off with this 4chan meme.

I'm currently writing the runtime for my dynamically typed, compiled, object oriented programming language in C.

I am working up to that myself.

I don't actively shill, but I've written a tool for a relatively unknown archive format and I'm working on a compiler.

could have been written in anything
meme, no one will use it

the only legit use for c is apparently kernel work and only because all the existing code is already written in c

...

I appreciate your work.

Thanks, I forgot to sage

lol

Made some shitty 3DS homebrew 3D tech demo.
sizeof(int) is always 4 btw.

Why can't you stop sucking cocks?
If you shill not sucking cocks then why do you suck cocks all day?

I wrote an irc bot :^) with a plugin system in C. The core is complete, need to write some plugins for it. Then I'll release it under the GPL3.

all of the why

Not an argument.

Yeah, but this is a self-assessment of my programming skills. It took 14 months to create and so there is a huge "skill gap" between code i wrote in January and code I wrote in 2015 still in the codebase

I don't think another language could change that

For any half decent embedded developer its more like 1% platform specific and 99% platform independent. RTOS is not needed in my experience but I have only worked on systems up to 150K LOC. Maybe if you are working on bigger systems they come in handy.

Why so much hate for C? Medical devices are usually programmed in C and you trust your life to them in certain cases. Your car's ECU was probably programmed in C. Flight computer software is written in C. Rovers driving on mars run software written in C. In all those cases software reliability is crucial, so if C was as bad as some of you on this board claim, why are they using it on as a programming language of choice on those devices?

Rust fags piss me of the most. They claim they will solve anything. There will be no more security and memory related issues. Don't they realize that there are other languages that already implement all the things they're trying to fix? Why don't we use Ada, D, Erlang or Haskell? Those are some of "safest" languages available.

The reason why are there so many security issues with software is that development is rushed. Take Firefox for example: why the fuck are developers adding new features instead of focusing more on security and standards. There is no reason to update fucking GUI every 3 months. No mater how many safety features you will bundle with your language it won't save you from bugs caused by faulty logic.

Lack of choice and sunk costs. Programmers who can work with C are a dime a dozen, C tooling is widespread, and there's already been a ton of investment into the language. Particularly into covering up all the glaring deficiencies. You have no idea how much effort goes into being able to write mostly decent code in such a shit language.

Well Ada at least is the language of choice for NASA. At least when they can find enough programmers. See above.

Have you looked at the Firefox source tree? They've reimplemented everything and the goddamn kitchen sink in there. Mozilla has a terminal case of NIH syndrome.

Have you actually ever written anything signifcant in C?

yeah, i wrote shipped commercial software in c, kid.

Because I was bored, and because I forgot to pay for my VPS and I didn't keep backups my python irc bot's code disappeared. So I did this as practice in C.

Because only Ada gets close to it. Rust is not just about being safe, it's about doing it with as little runtime cost as possible. D relies too much on garbage collection to be a good alternative, Erlang too, and Haskell's lazy evaluation makes it very difficult to analyze worst case runtime costs. Ada is Rust's only real competitor.

Sometimes I wonder if Rust haters really believe what they say

Is this bait?
youtube.com/watch?v=NCTf7wT5WR0
Slides here:
users.ece.cmu.edu/~koopman/pubs/koopman14_toyota_ua_slides.pdf

Why don't we rewrite software in rust. It will surely fix our problems.

How about you use words correctly you shitposter

how about you stop defending a language you neither know nor use

I've written libraries to read obscure file formats.
A simple IMAP/SMTP only mail client, which I'd say qualifies as "significant".
Also games, but those are unfinished.

...

Having worked on a bunch of different microcontrollers, that's not been my experience. Yeah, the general high level process of doing -- say -- I2C is the same no matter where you go because the protocol has a standard. Actually WRITING it is a completely different matter and it's unique to every single platform because you need to know all of the specific setup and configuration for that system's registers and ports. There's almost no way to ever do it without digging deep into the datasheets and (if they were nice enough to give you any) the base firmware.

It's not like Arduino where you download a library someone else wrote for you and it just werks.

Don't bother man. This is Holla Forums where words like cuck kek and fag go to die.

>>>/g/

I sure hope I never get on one of those devices. The pacemakers and shit all have a long history of remote kill user vulnerabilities.
I have a bicycle, not a car. And no my bike doesn't have hundreds of KLOCs in it for muh regulation and muh environment if that's what's trendy today.
Why do corporations make decisions? I dunno? Money? Why would any form of logic be in question here? Literally everyone in the companies you're talking about are just doing what's needed to get a promotion/not get fired, and then there are 3 people in the company who are genuinly trying to produce a well engineered product but it's impossible for them to do anything. NASA had RCE in some of their code. They'd indeed fuck up in other languages too though.
Indeed, Rust doesn't bring anything new to the table except purported performance benefits of their system over the other popular memory-safe languages which all use GC. The core Rust developers are the same naive people working on your typical swiss cheese web crap.
100% agree with what you say about firefux

who's implying that? those ECUs are crap and it has nothing to do with muh cosmic rays

beside a linked list or a binary tree, pretty much nothing.
nope

who would hve thought

...

...

Couple small-ish things. Not that significant but definitely bigger than fizzbuzz. Something like grep, but it accepts regexps in more complex expressions with and/or/not. Enhanced tee which supports file splitting, dynamic writing start/stop, all of which can be controlled at runtime through fifo. And jackaudio thing for programs which always connect to default output and don't have settings to change that.

My thesis project was in embedded C

Fuck off shit poster.

...

OK but the point is what percentage of your application is dealing with I2C directly? The vast majority of a normal embedded application is business logic that can be abstracted and written platform independent.

Driving someone into student debt is still a bigger accomplishment than anything Rust has ever done.

case in point, I don't give a flying fuck about either of C or Rust.
>>>/g/

depends, if you need to implement some compression or encryption algorithm you do need a language like C(++) that lets you do bitwise operations etc. easily.

"muh language" threads are cancer. They really have no point except to shame idiots who take the bait, comeout of the wood works to vaipidly defend their ideology. Next time, sage and hide. All high level languages are shit, but we let it fly because portablity.

Roguelike game. Not sure if "significant", but definitely more complex than simple shit like fizzbuzz or hello world.

I wrote a GTK+ clipboard monitor.

libgtk abstracts a way a lot of the difficulty of C I guess.

and yet plenty examples exist

Confirmed for

Maybe no one on Holla Forums but almost everything you used to make that post was written in C or some variant.

faggot

No. C is a piece of shit language for modern software development due to the sheer amount of pitfalls it has.

It was bad even when it was released.

what exactly is "modern" software development and why is C bad for it in particular, user?

I don't consider myself a programmer because programming isn't the kinda computer stuff I like learning about but I did write a program because I needed a text to binary converter for something.

int x;while((x = getchar()) != EOF) printf("%d ", x);

sorry I'm high.
text to ascii, not binary.

Literally install radare2 and use rax2 -s.
(A lot of the radare2 tools are very useful when messing with binaries, even when not full-on reverse engineering)

not sure if this is the right thread but didn't want to make one

I'm going to be taking a C course over the summer at a local school just as conceptual stuff as an intro. I hear C is from 1970 but has been updated and such.

would it be possible to practice my C coding skills on an old 80's or 90's computer, a cheap one from eBay? I want cool old electronics and being able to practice C on one would be a good excuse to pull the trigger on one.

Yes search for Unix PCs. Specifically something like PC7300 or similar. But those are pretty hard to find, so your next best bet is to find oldest possible PC that will run linux. Maybe something with Pentium 2 or maybe even i486DX. Or as an modern alternative, mini ARM based computer such as raspberry, beaglebone or orange pi.

Amiga had libraries for C (Intuition), but it's also good machine for programming in assembly.

I write in C or C++ almost every day.

You were able to post this thread because you used something that relied on components written in C.

No. Install a *nix/Linux, install gcc, and from there you're fine. Old PCs don't make a bit of difference, they just compile slower.


the fuck are you talking about

The funnest part about C for me isn't programming for old devices, which provide pretty much the same features as any modern OS, only shittier.
The most fun part is programming for embedded devices, without an OS, with the entire hardware for only yourself and your code. Those can be old too (albeit slightly less). Look in your closet for any old console, calculator, or other small device, and look for a C compiler and documentation for them. If you can't find any, try to get your hands on a more recent console with good documentation/tools such as the GBA. If that's still out of the question, try a Pi or any x86 computer you might have and a "hello world" OS tutorial, and start from there.
Programming for DOS is a mess unless you want to write 16-bit assembly, which is rather fun as well and I recommend if you're looking for having fun.
Try getting started with this after you're feeling comforable around C, and have a good grasp of pointers/memory.
For real-world tasks this might seem useless, but making even the most mundane pong game run on your computer/console without an OS feels all the more satisfying.
Disclaimer: This is just a personal thing I love. The freedom you have and ingenuous things you can do with the hardware without having an OS and libraries to baby-sit you is a feeling I personally like, even with the most mundane things such as optimizing your very own memcpy function. It might just not be your cup of tea, however.

t. larper

Text to decimal, user. You're high indeed.

it sounds cool anyway, actually.


thanks mate


will do, thanks for the help pal

C is significantly more important than any other hipster languages in the market. If something replaces C it will be more complicated and robust than C. Then we shall move onto that instead of snowflake languages. Hipsters need to fuck off and die in gasoline fire.

yes I have written programs in C and I would not use anything else

a den of bug-chasing faggots?

Have you used anything else?
To be able to properly judge C it's not enough to use just C.

Wat? I fail to follow your brilliant logic. You can't properly judge languages you haven't used is a fair assesment, but wtf.. now you can't judge languages that you use?

You can judge languages that you use only as long as you also have other languages to compare them to. If C is the only language you use it means that you're likely to see its limitations as fundamental limitations of computing (or of fast/low-level computing), even when they aren't.

lol, fuck off man..

I'm not kidding. I've heard people say that null-terminated byte arrays are the only efficient way to do strings, just because they know C does them that way and assume that something must outweigh the disadvantages.
Saying that C is so good you would not use anything else implicitly judges all other languages. You should know at least a few of them to make a judgement like that.

You took it...

Took what?

The red pill.

Does that mean you now agree? You're making this hard to understand.

I presume he meant "the bait".

I wrote a crontab utility to manage rotating backups based on arbitrarily complex schedules in C (things like "keep every 3rd thursday's backup for 4 years, a week of daily backups, and every 4th day for 7 months"). I only did it in C because we needed it to run on Linux, HP-UX, AIX, and an ancient version of Solaris, otherwise I would have just used modern C++ from the beginning. I could have, but it's more of a pain in the ass to get a good working C++ compiler on all of those systems.

I eventually rewrote it in Perl, and it's way cleaner and more maintainable (The C version had an internal dynamically resizing array library and a bunch of other complexity, especially to work around little quirks so that it would compile and run on all the platforms. I probably should have used autostools or something instead of just a plain makefile), but I do still really like the C version. I wouldn't have had to rewrite it if anybody else at my company knew C. I also hate Perl, but it's the only scripting language that's available out-of-the-box on pretty much every single Unix system (other than awk, but that would have been far worse).

C isn't really that hard to write. It's incredibly simple. The hard part is writing C that is well-modularized, readable, maintainable, stable, and safe. Anybody can write a C program that does what it's supposed to do most of the time.

I will never use Rust, and if I see a project touting being written in Rust I will never use it.
See what Rust shilling gets you? There are, minimum, 100 others like me who boycott in silence.

I wrote a clone of a popular Apple II game for DOS in C using Turbo C++ 3.0

maybe

float f_atan(float x){ //Assume int and float are both 32-bit data types, used fixed-width types if necessary int i3, i5, i7 = *(int*)&x; i3 = i3*3 - 0x7EF47AE1; i5 = i5*5 - 0xFDE8F5C3; i7 = i7*7 - 0x17CDD70A4; x = x - (0.333f * (*(float*)&i3)) + (0.2f * (*(float*)&i5)) - (0.1428 * (*(float*)&i7)); return x;}

you can't do this in java

I made quite a lot of money not a lot but for me it was a lot back in the days by doing other student's assignments in C and C++ when I were at university. They were mostly illiterate so writing shit in C and C++ was near impossible for them, and they were willing to pay me, even despite that I was a notorious troller and most of them hated me as a result. they wanted to stay in university more than they wanted to do harm to me, so they obeyed.

the bait

The truth is that Ada has several features that Rust lacks (comprehensible syntax, contracts, distributed programming, etc) that would be difficult to bolt on to Rust at this point. Meanwhile, Rust has precisely one good feature that Ada lacks (affine/linear typing) that is quite easy to retrofit to Ada. So really, you've got the who's-competing-with-who the wrong way around. Especially since Rust is still an unstable immature child that shows no sign of being standardised any time soon.

Curious, what is this supposed to do?

I think Mozillla is going to update Firefox with a major new feature this month, written in Rust. I think its electroysis. Their version of each tab is its own process. Rust is cancer though.

I assume it serves the same purpose as atanf(3)

I do embedded C for a living, so yeas get fucked.

Except when it's not and it's 2.

People writing CRUD have no idea what real "software development" is.

lets-quad-fucking-post


My current gig is in the medical device industry (it might be pretty obvious) doing IoT shit with quasi-skynet opportunities (Yes people are planning on selling patient data, possibly without telling them!)


Because it takes 6 months to get someone with BASIC (programming puns) knowledge of C. It would take a year easy to get someone with working knowledge of Go, Rust, whatever. And most of the time those C people are H1Bs because there are no other choices. C is just that much in demand.

It's an approximation of atan() using Taylor's formula. The exponentiation steps (x^3, x^5, x^7) are performed using an integer aliasing trick, lowering execution time on systems that lack a FPU. (such as microcontrollers) The multiplication steps probably could have been performed in integer space or reduced into the constants, but I didn't feel like solving equations for another hour. Maybe I'll revisit it one day.

btw it only gives a decent approximation when |x| < 0.5, which didn't really matter in the application I designed it for.

LARP

Your hiring process is shit. Really shit. Unbelievably, stupefyingly, law-breakingly shit. Fix that.

Have you actually ever written anything signifcant in java?
It seems like everyone shills java all day every day but i bet none of you ever wrote anything other than fizzbuzz in java.

In 2010-2015 I was heavily invested in Metin2. An mmo game, poor's man gook WoW if you like. Somehow, from somewhere, the server files were leaked so people could do their own private servers. In the beginning people (including me) were only playing around with some scripts, config files and the quests (which used LUA), but around 2012 I decided to do a bit more. I've put the main executable file into IDA and started reversing it. At first I was only doing diff files, so I'd change some bytes here and there and patch the program. Then I started writing my own functions in assembly using the couple of free bytes in each function. It was compiled in debug I think, so there were a lot of ASSERT statements and each function had stack checking, so I used these bytes. My functions would be split into 5-10 places, about 20 bytes each and just jump from one island of code to the other. But soon enough that wasn't enough and I started coding my own library which would be loaded at the start and hook into the server. Initially it was in pure C (as I was used to assembly, so that was already a big help) but then I started using c++, because the original server was written in C++ and so it was easier to hook the original functions (for example : Character::GetEventFlag(std::string* str), in C I had to find the address of std::string's constructor and make the object in this hacky way, with c++ i could just make std::string* str = new std::string ) I don't know if it can be called "significant" but I had a lot of fun and this lib fixed shit ton of original bugs and added new features. I'd say more, but I doubt any of you even heard of metin2, so who cares.

Pic related, surpases the 255 (1 byte) level limit by some 1337 hackery

Well I can give you a story of how newer server files got leaked because I think it's pretty funny.
So at first we've got the server version 404. That version was from 2006/2007 and released in 2010, so you could tell just from a screenshot if it's a private server or the official one, it was so far behind. Then we've got the "2010 files". Version 1765, 2019 and 2089. I don't know how did the people got them in the first place, but those folks that did get them installed a backdoor into it before releasing it on the forum. Said backdoor gave you the highest GameMaster (GM) privileges, so you could spawn items, monsters and shit like that. People knew about it, it was talked about it, but nobody ever found anything, so nobody was sure if it was just a myth or actually true. Me and my friend decided to look for it. Eventually I've found it. They used an old unsused function for sitting down. You can't sit down in this game, but the server-side still has Character::SidDown and Character::StandUp. They don't do anything, I guess the original source of this function had just return and everything else commented out. There were still some bytes to use, because of the previously mentioned stack checking, and this function could still be called with a appropriate packet sent from the client.

So I've found this on the server, my friend wrote a dll for the client to send arbitrary packets and we tried it. And it fucking worked. We had a lot of fun playing around with people's servers. Then we sold the fix to the affected servers. Neat

Then, around 2012 there was a german server that had a lot of new features that we saw on the official server. People were suspecting, that he had the new files, but how ? Well, this guy was friends with the singaporean admins (this game was licensed to many countries) and they shared their up-to-date version with him. He was so cocky about it, that he wanted to prove it. He used team viewer to show it to some other people on the forum. Then he went afk but left team viewer open so they just... copied the fucking files.

The original devs got wind of that and the singaporean server didn't get any updates from that day onwards. That singaporean server was so shitty too. They used stuff from the forums made for private server and didn't even give the credit.

for that price.

Holla Forums needs more posts like this. Keep on hacking!

Thanks. I recently published the source code for said libs, I'd share here, but they are on a gitlab with my real name on it ( I did it to show it on my resume, I'm looking for a job and I don't have computer science degree) and I don't know if I want to be associated with the internet hate machine.

I can give you one more story if you like the other one so much. So it was around 2013, I already was coding my lib for about a year, had a bunch of cool stuff. People knew me, because I'd post the videos on the forums, but they didn't know I was using such libs. They were still stuck with diff files (and most of the time they were just NOPing shit or changing some constant values, not code).

This game has 3 empires and I though if it's possible to make more. You can certainly send a create character with empire 4+ from the client and it will work, but this character will be bugged, because there's no standard position for where such character should be spawn (and a character with empire 7 would crash the server, We used that a lot of fuck with people). Well, no big deal. I made my own table with the positions and hooked the code to use that instead of the one in the executable. Fantastic. I didn't show it anywhere though, I didn't have new maps of even an idea of what to do with it yet, but the code was there.

Then few months later a new private server is about to start. It was common for servers to annouce themselfs 2-3 weeks before the start, showing their amazing (or not) new features and what not. And these fuckers claimed to be THE FIRST IN THE WORLD to do more than 3 empires. I Was 17/18 then, so of course I had to show them fuckers. I decided to make a tutorial how to make 4+ empires yourself (without even using a special lib like I did) and these guys flipped out. They started sending me private messages with shit like YOU WANT WAR ?? YOU WILL HAVE WAR. I accepted the challenge. I duplicated all their exclusive super duper features and released them on the forums for free. Their server never started.

ikr. all the anti-C shitposting taking up all the good Holla Forums breads. Heinous!

A fair argument, but inaccurate to be sure. The number one reason for security holes in all software history is unchecked C array bounds.

If you're going to program in this relic, then at the very least write in modern C using the libraries.

I wrote a command line die rolling app in C, but mainly because I wanted experience writing a C program. The app itself is really simple but I have such little experience it's probably shit and I just don't know it.

savage

...

You and freetards need to go into a gas chamber.

Since this thread is already up, and my question seems to have drowned in the sticky: What is the best way of unit-testing C code? I know that CMocka und Unity exist, is there anything better? If not, which one of them to pick?

cmocka.org/

throwtheswitch.org/unity/

My code is nothing crazy, but I need to be able to read data from a file, in case that might influence the choice of framework.

...

I know how to read data from a file, but I thought that there might be a testing framework that mocks fread and fwrite so I can have controlled success and failure.

Oh, come on!

I don't usually do unit tests. Testing manually beats everything, as long as the project doesn't get too big.
That said, it really depends on how you manage your project. I haven't ever used anything other than raw makefiles, in which case creating unit tests is as simple as creating a new main.c for each test and writing a shitty shell script around it to check for correct output. If it's a terminal utility and you don't need to test functions individually, a shitty shell script that tests all possible inputs and corner cases you want wil do as well
Unit testing frameworks are okay, don't get me wrong, but you usually don't need them for the same reason you don't need fancy build systems.

Mate, printf is probably the most powerful debugging tool in the universe.

Brian W. Kernighan and P. J. Plauger in The Elements of Programming Style.


Brian W. Kernighan, in the paper Unix for Beginners (1979)

Unit testing like that is generally a waste as it's high effort for little return and has a side-effect of discouraging refactoring. Automated functional/system testing is almost as good at a tiny fraction of the effort without the side-effects, and tests can often be designed by non-programmers.

Where is your god now, Kernighan?

rust syntax is very comprehensive
you can do that in literally any language
those things are better suited as a library
is quite easy to retrofit to rust
what exactly is unstable about rust? blog.rust-lang.org/2014/10/30/Stability.html
oh nooo. why does this matter though? do you know that it took c/c++ more than 10 years to get standardised?

laughingsoftwareengineers.png

nobody in Holla Forums has made anything with any language. They just argue about the mechanics and subjective shit like bracket placement.

not an argument

true

He wrote that at a time where codebases were a lot smaller and the powerful debuggers of today didn't exist yet. Additionally the vast majority of code nowadays runs in some kind of environment, be that the browser, the JVM or on top of an operating system, bare metal(which complicates traditional debugging) is rare nowadays.

First sentence is not that wrong, but printf/puts are still king (I use gdb, valgrind/sanitizers like anybody).
Second doesn't have any argument in it.

As opposed to earlier times when programs ran on thin air?
Fucking moron.

kys

...

...

Nothing significant, no. I'm a pajeet-level shitter when it comes to programming though, so it's probably for the better.

...

This is retarded, since the quote is well after UNIX was made (not talking about OSes even before UNIX).

ironically buddha is pajeet

c is the most pajeet language of all

No.
C: Fedora
C++: Some kid with acne at game dev studio
C#: Business dude doing office shit
Java: Business dude doing office shit

customized midi driver
a packet sniffer tailored to some needs
and some other things of various complexity, but not that complex.

I'm a c++ dev first and foremost.

Rustcuck needs to go. This is fact.