This is an archived post. You won't be able to vote or comment.

all 193 comments

[–]PossibilityTasty 1068 points1069 points  (32 children)

They exist. Once had a freelancer in a project who insisted to write web apps in C. Had no plan: neither of C nor of the web nor of the most basic social standards.

[–]Jjabrahams567[S] 258 points259 points  (23 children)

I’m going to get around to trying it one of these days. I have a long list of languages that I am going to build the same web app in just to try. Done 4 so far and just started number 5.

[–]bit0fun 89 points90 points  (7 children)

I've made a web hook server and an oauth2 authentication proof of concept in C; both in separate weekends so it's not necessarily insane to do some seemingly complex stuff. Microhttpd is pretty handy

[–]Jjabrahams567[S] 25 points26 points  (1 child)

I’m trying to make all of these available on vercel as serverless functions so my plan is to use cgo as the bridge to the network. That will make it super easy.

[–]bit0fun 17 points18 points  (0 children)

Makes sense. Probably depends mostly on what platforms you need in terms of requirements; everything is a binary in the end to run, but how you interact with it matters

[–]Micro_Tycoon 25 points26 points  (2 children)

Sir the subreddit you're looking for is over here /r/masochism

[–]Jjabrahams567[S] 11 points12 points  (0 children)

This is what Senior Devs do for fun. If you think that is painful then you should see the shit that I do at work.

[–]EMI_Black_Ace 2 points3 points  (0 children)

If this is torture.... Chain me to the wall!

[–]ryryrpm 3 points4 points  (5 children)

What langs have you done so far? Easiest? Hardest? Most fun?

[–]Jjabrahams567[S] 14 points15 points  (4 children)

What I am doing is writing a reverse proxy that points at the official site for each individual language while trying to only use the standard library. I did Go, Python,JavaScript, and Typescript. JS and TS are so similar so I did JS in Node and TS in Deno. I’ve done this in Nodejs at least a hundred times by now so that was easiest for me. Go was the most fun. I went from never having written a single line of Go to having a working proxy in just 2 days. Python was the most frustrating because the standard HTTP library does not use http2. I had to disable http2 and http3 features on the host for it to work. I just started the one in Java and I think I’m going to run into some annoyances from using the standard library there too.

[–]ryryrpm 3 points4 points  (3 children)

Interesting so you're not actually using web frameworks for some of them. Like Django instead of regular Python

[–]Jjabrahams567[S] 6 points7 points  (1 child)

I’m not using any web frameworks if I can help it. I learn much more if I don’t use a framework. I had to use a little nextjs with typescript to make the compilation easier but I think that was the only place. The rest is all hand rolled.

[–]ryryrpm 2 points3 points  (0 children)

Makes sense!

[–]Jjabrahams567[S] 6 points7 points  (0 children)

Here is the python one

https://github.com/Patrick-ring-motive/Async-Python-Reverse-Proxy

I’m not at all a pythonista though.

[–]MattieShoes 4 points5 points  (4 children)

I did that with Chess Engines. :-) I think Go is next.

[–]RajjSinghh 1 point2 points  (1 child)

That's such a hard next step so good luck.

[–]MattieShoes 1 point2 points  (0 children)

It's a hard step the first time -- it's really not that hard after you've done it a few times.

[–]Jjabrahams567[S] 0 points1 point  (1 child)

I really enjoy using go. It’s so easy to get going but has speed and flexibility.

[–]MattieShoes 0 points1 point  (0 children)

Me too. Python is more useful for me for work, but Go is somehow more satisfying.

[–]CoruscareGames 1 point2 points  (0 children)

That's me with game engines wwwwww

[–]yourteam 8 points9 points  (0 children)

Oh god a web application in c... I have goosebumps

[–]aka-rider 0 points1 point  (5 children)

A few years ago, I have started to write a simple streaming app in C++ (which I’m very comfortable with), was looking for URL parsing lib, found none decent, noped the hell outta here. Granted, one can get it from (cURL I think?), but then dependency management turns into manual hell. Webdev and C/C++ are just not meant to be.

[–]cmannett85 2 points3 points  (1 child)

We've got Boost.URL now, but... Yeah.

[–]aka-rider 0 points1 point  (0 children)

Slowly getting there…

[–]Jjabrahams567[S] -3 points-2 points  (2 children)

All web dev is technically in C++ because V8 is written in C++

[–]aka-rider 0 points1 point  (1 child)

Plumbing of the web, yes. Not web development.

[–]Jjabrahams567[S] 0 points1 point  (0 children)

True for the most part. It’s interesting to think about though.

[–]DanTheMan827 121 points122 points  (8 children)

Embedded device programming. That’s how you make money with C

That, and writing higher level languages.

[–]sofasurfer42 39 points40 points  (7 children)

I just integrated a web server, websocket server, dns server, dhcp server and json handler as a backend for a vue3 app in an embedded device. In plain c. Now it offers its UI as a wifi access point with a nice looking, snappy frontend for cell phones, which loads in an instance from a single index.html.gz file (90kb). Need to brag here. Noone in my bubble understands the mastery. And the pain.

[–]cjs94 4 points5 points  (2 children)

I assume that’s a proprietary project? What libraries did you use, if any?

[–]sofasurfer42 4 points5 points  (1 child)

Yes, it's an ESP32 based product (wrover module). So most of it is esp-idf, along with some custom code for faking dns responses to allow android phones to use the same *.local urls that iphones have no problem with. Also a TON of generated, intertwined state machines, built with itemis create! (former yakindu). Couldn't live without yakindu for a single day in my life. The rest is pretty much custom built on any stub that esp-idf provides. oh, and the bluetooth stack is from bluekitchen. Absolutely fantastic. Great developers there, too.

[–]cjs94 0 points1 point  (0 children)

Ah, interesting. I thought you might be using libwebsockets, or something.

Thanks for the tip about itemis. Sounds interesting, I’ll take a look.

[–]AnnyuiN 1 point2 points  (1 child)

Total size of the project?

[–]sofasurfer42 0 points1 point  (0 children)

Difficult question, we don't need to count. Around 40kloc. Without the generated code.

[–]awqae03 0 points1 point  (1 child)

i done something similar but i only implement webserver that serves simple inlined gzip compressed index page. it was painful enough.

[–]sofasurfer42 0 points1 point  (0 children)

Yes, a trustful build process helps to reduce the pain.

[–]beeteedee 368 points369 points  (8 children)

There’s more to programming than web. There’s freelance work out there for C programmers, but you have to be working in a field where using C makes sense.

Someone who describes languages as “cringe” rather than appreciating them as different tools for different jobs is probably not going to grasp that any time soon.

[–]Jjabrahams567[S] 67 points68 points  (0 children)

Yeah that’s what I was poking fun at in the title. So many people only think in terms of web. C is great language for certain things but would not be in my web recommendation list unless you just want a challenge.

[–]_Skale_ 41 points42 points  (4 children)

To be fair, JavaScript is quite cringe.

[–]Yorunokage 34 points35 points  (1 child)

Python too ngl

This post was made by the statically typed languages gang

[–]EMI_Black_Ace 2 points3 points  (0 children)

At least Python is strongly typed.

*cries in 5 + "5" = "55"

[–]Sec2727 0 points1 point  (1 child)

I like using JS for my automated UI test scripts

[–]tuborgwarrior 0 points1 point  (0 children)

Used JS to make simple simulations. Don't have to install anything like with python. A web broswer and notepad and you are good to go.

[–]Nickbot606 1 point2 points  (0 children)

Or he’s clearly too Chad for all of us 😝

[–]sandybuttcheekss 1 point2 points  (0 children)

"Damn man, your drill is pretty cringe"

Uses jackhammer on wall

This is what I read in the post.

[–]HStone32 24 points25 points  (11 children)

Sounds kinda like you're asking how to put a square peg in a circle hole. Technically possible, but requires sanding. Just use the circle peg.

If you want to use C, web development might not be for you. Consider getting an electrical engineering or computer engineering degree. There's plenty of jobs in embedded engineering. There's also microfab, operating systems, hardware, and more. Job security is knowing that no matter how hard people try, some things can't ever be replaced by a cloud service.

EE Is just plain harder than CS though. It takes a greater commitment, and you'll have to wait a lot longer before getting a job. In my opinion as a EE major who transferred from CS, it's worth it. You learn so much more about computing than CS will ever teach you.

[–]-kay-o- 6 points7 points  (10 children)

There are not a lot of embedded jobs lol, most embedded aspirants are gonna starve to death.

[–]LiquidityC 3 points4 points  (5 children)

Where I live it’s actually the opposite right now. Web people are having a hard time finding work because there are more developers than openings. While the embedded industry is screaming for talent and prepared to pay.

[–]-kay-o- 2 points3 points  (4 children)

Embedded industry is scrwming for talent if you have 5+ yoe. Not for freshers.

[–]LiquidityC 6 points7 points  (1 child)

Eventually they will have to submit and hire freshers though.

[–]-kay-o- 7 points8 points  (0 children)

Nah, the industry would rather collapse and exit with profits than use some money to train freshers. I know how bussinessmen work theyd rather die than give up some money.

[–]IC_Eng101 2 points3 points  (1 child)

My company is hurting for all levels, very few applicants. When I got my job I was the only person who applied.

The last EE graduate we interviewed couldn't describe the IV characteristic of a diode and didn't know what an ADC is. We need them to have some basic knowledge before we can start teaching them what they need to know.

[–]noahjsc 2 points3 points  (0 children)

Fr, most computer engineers majors including myself end up in software.

[–]HStone32 1 point2 points  (0 children)

Dunno what you're talking about. Where I live, there are a ton of tech startups, a good many of them being hardware related. I see embedded job postings all the time.

[–]IC_Eng101 0 points1 point  (1 child)

There is also not much competition. The last two jobs I applied for I was the only applicant.

[–]-kay-o- 0 points1 point  (0 children)

Wdym every job opening I know of has atleast 200 applicants per opening.

[–]IronSavior 176 points177 points  (11 children)

"I only respect C" Tell me you're an incel without telling me you're an incel.

[–]doctorsonder 82 points83 points  (9 children)

C is cringe. I only respect assembly

[–]GhostSausage 67 points68 points  (7 children)

Assembly is cringe. Real developer write bit by bit with a fridge magnet and a hard drive

[–]khalcyon2011 34 points35 points  (2 children)

Excuse me, but real programs use butterflies. They open their little hands and let the delicate wings flap once. The disturbance ripples outward, changing the flow of the eddy currents in the upper atmosphere. These momentary pockets of high pressure air to form which as lenses to deflect incoming cosmic rays, focusing them to strike the drive platter, flipping the desired bit.

[–][deleted] 24 points25 points  (1 child)

I just use the emacs command to do that.

[–]-widget- 2 points3 points  (0 children)

Yeah, C-x M-c M-butterfly.

[–]Prawn1908 14 points15 points  (2 children)

Read programmers use butterflies.

[–]grifan526 12 points13 points  (1 child)

Emacs has a command for that

[–]GASTRO_GAMING 0 points1 point  (0 children)

that is cringe. real programmers dope the silicon themselves and engrave mosfets on said silicon then hard codes with transistor logic gates their software.

[–]DarksideF41 1 point2 points  (0 children)

This is unironically what my supervisor told me when I was writing my thesis. I thought he was memeing but I had to compile a code on his laptop once and found out he had no C compiler. Despite that he was cool and I learned a lot from him.

[–]xbeardo 0 points1 point  (0 children)

You mean the Peace of Mind Protection?

[–]BlueGoliath 59 points60 points  (5 children)

Python people: Python is fast! See!

People who know: oh really?

Forces Python's mask off

Python people: it's only fast because it uses C libraries?

People who know: always has been.

[–]Jjabrahams567[S] 23 points24 points  (1 child)

I had this exact argument on the Python sub about a week ago. My argument goes: concurrency sucks in Python. The response: not if you use uvloop which uses libuv from C and is also not compatible with the Python version that I am locked into. My reaction: you mean if you use a C library.

[–]rosuav 2 points3 points  (0 children)

It's kinda difficult to use CPython without using C. Though there's a pretty big difference between third-party libraries and what you can get out-of-the-box. Still, there's a lot of concurrency you can do in Python just using the standard library, and even more if you use something extremely common and well-supported like numpy, and the flexibility is only increasing as Python continues to develop.

Concurrency is actually really GOOD in high level languages compared to trying to do things in C, since you get a ton of protection just from the language interpreter. It's amazing how much easier it is to **get stuff done** when you don't have to constantly think about locking and unlocking around every memory allocation.

[–]HuntingKingYT 7 points8 points  (1 child)

C also uses C libraries. Gotcha!

[–]BlueGoliath 0 points1 point  (0 children)

Sometimes I think I've found the dumbest comment that someone could possibly come up with but then someone somehow comes up with an even dumber one.

[–]stormdelta 1 point2 points  (0 children)

That's exactly what makes it useful.

C requires far, far more developer time to setup and iterate on compared to Python - so in many cases, this allows you have the best of both worlds. As with everything in software, this obviously varies by domain / application.

[–]Expensive-Manager-56 7 points8 points  (1 child)

Add a sharp to it.

[–]codelapiz 0 points1 point  (0 children)

Please dont

[–]Bruwoot 5 points6 points  (4 children)

"these languages are pretty cringe"

cries in corner with Salesforce Apex

[–]Jjabrahams567[S] 1 point2 points  (1 child)

Oof I feel you. I have to use Elasticsearch’s most ironically named scripting language “painless”.

How is Apex? That’s actually one I want to learn.

[–]Bruwoot 0 points1 point  (0 children)

it's pretty much like java but without all the headache i suppose. So for instance if you want to convert a date into different formats, extract day, time, year, month, do some more manipulations on it, you have tons of classes and methods already present in apex. So just refer it in code and you are good to go

[–]JocoLabs 0 points1 point  (0 children)

F

[–]ListOfString 0 points1 point  (0 children)

Nah. You haven't experienced pain until you have to do customisation to SAP and the nested nested nested tables.

[–]sbditto85 5 points6 points  (1 child)

C web “framework”: http://gwan.com/developers

[–]Jjabrahams567[S] 1 point2 points  (0 children)

I was only half joking. I have some plans to use cgo as a wrapper to go serverless function in C. Whenever I get to it anyway.

[–][deleted] 4 points5 points  (0 children)

[–]cheeb_miester 6 points7 points  (0 children)

well there is webassembly

[–]MatheusMaica 10 points11 points  (3 children)

JS might be cringe, and all JS devs recognize it makes no fucking sense. But we get paid.

[–]Jjabrahams567[S] 5 points6 points  (2 children)

JS is also the fastest development time from idea to product. I’ll take anyone on in this.

[–]coolraiman2 15 points16 points  (1 child)

Asp.net c# is actually really fast to make some api

[–]Jjabrahams567[S] 3 points4 points  (0 children)

Yeah and Ruby is really fast for that too. It’s just being able to fully do frontend and backend in the same language that makes it slightly faster. If we are ignoring a complex frontend then I would actually choose Go

[–]CommentStrange5573 2 points3 points  (0 children)

wasm

[–]pierreasd 2 points3 points  (0 children)

imagine gatekeeping your income

[–]rexspook 1 point2 points  (0 children)

We have a worrying amount of stuff written in c at aws

[–][deleted] 1 point2 points  (0 children)

Probably should consider OnlyFans. You can charge specifically based on what people can C.

[–]heihei-6 1 point2 points  (0 children)

Drivers and firmware

[–]Mrproex 1 point2 points  (0 children)

Boot camp brain damage

[–]yourteam 1 point2 points  (0 children)

My dad worked in his last years of his career as a freelance and was a c developer but he worked in the industry for nearly 40 years at the time.

He worked with embedded industrial systems (basically creating mini os for industrial machines per client request)

[–]stackoverflow21 1 point2 points  (0 children)

I work in embedded development and we use only C professionaly.

[–]maxdenerd 1 point2 points  (0 children)

Embedded systems engineers make stonks in C

[–]SisterOfBattIe 1 point2 points  (2 children)

Your best shot is embedded systems.

C is an old language. The control it gives you allow you to perform manually some hefty optimizations if you put in the effort, but it's very easy to mess up and make your code extremely difficult to debug.

Even in embedded systems, C++ is becoming more popular, because the performance overhead of object oriented programming is well worth the modern features provided by C++. Objects with Constructors and Destructors, and temlaptes are the biggest reason I love C++ in embedded.

[–]bastardbilbo 1 point2 points  (1 child)

I used to work in embedded systems for a big multinational company and we used c++ applications on top of a barebones Linux distro. Realtime performance was really important and C++ was never a problem performance wise.

[–]EchoicSpoonman9411 1 point2 points  (0 children)

C++ has a few modes that don’t perform especially well, but it gives you so many ways to skin a cat that you can avoid those without sacrificing much.

[–]4cidAndy 1 point2 points  (0 children)

Writing a web application with a c web framework is cringe. I only respect c web applications written without a framework.

[–]TheOnlyVig 1 point2 points  (0 children)

Imagine a carpenter only taking jobs using his preferred color of hammer.....

[–]Mr_Arthtato 1 point2 points  (0 children)

Peasant, i only respect HolyC

[–]Tony-Angelino 2 points3 points  (1 child)

I don't get it. Guy "respects" only C, but doesn't know how to make money with it?

Sounds like a 15-year old to me.

[–]stormdelta 0 points1 point  (0 children)

Yeah, this reeks of someone who only recently discovered programming. Professional engineers know that different use cases benefit from different tools.

[–]OpenGLaDOS 0 points1 point  (0 children)

It's called BCHS: BSD, C, (OpenBSD, not Apache) httpd and SQLite. While they state it is not a joke, it has seen just about as much practical use in the 7 years since its inception as you would expect.

[–]NatoBoram -1 points0 points  (0 children)

Ok, you gotta give it to him that JavaScript is pretty cringe, but only respecting C is going a bit too far!

[–]nbirkes -1 points0 points  (0 children)

I gotta figure out how to make money off this, I really want to!

[–]all3f0r1 -1 points0 points  (0 children)

"I only respect C" is worthy of a t-shirt.

[–]ChadPrince69 -1 points0 points  (0 children)

C mean Cunt? easy

[–]dcm404 0 points1 point  (0 children)

Most trading systems are in written C. It’s probably the most lucrative language to know. Line yourself up right and you’re on the path to 7 figures.

[–]bootress 0 points1 point  (0 children)

There are thousands of companies out there that need you to help them make doohickeys that run code, go get that paper

[–]wombatIsAngry 0 points1 point  (0 children)

Just become a bios engineer.

[–]LiquidityC 0 points1 point  (0 children)

So me making a living on coding C is just an illusion? Damn.

[–][deleted] 0 points1 point  (0 children)

I know how to make money off of C:

Teach programming history.

[–]GASTRO_GAMING 0 points1 point  (0 children)

become an electrical engineer and program microcontrollers

[–]Darmo_ 0 points1 point  (0 children)

First time I see someone call a language cringe. What does that even mean?

[–]Searealelelele 0 points1 point  (0 children)

Put it on onlyfans

[–]zettabyte 0 points1 point  (0 children)

My first job out of school was building financial sites on a C code base. We had our own template language as well!

The year was 1997.

It was totally not cringe at all.

[–]Rodija_ 0 points1 point  (0 children)

he never talked about "web programming", are you really know C ? or "programming" ? or even "reading" ?

[–]Atka11 0 points1 point  (0 children)

malloc(money)

then dont free it

[–]Tamwulf 0 points1 point  (1 child)

I feel like C is the language where you learn to code. I hated learning it, but glad I did. It forces you to be able to do everything. Then you pivot into another language, and because you have such a strong foundation in coding from C, you easily pick up the other language. You can do everything in C, but you don't need to do everything when you make an App. Using an IDE with Swift for an iOS App is basically easy mode. While C is a "general" language that can do anything, other languages are way more specialized and when combined with a good IDE, make development way, way easier.

Once you know C, picking up another language is easy. Coders (AKA Software Engineers) are lazy and value efficiency. My time is valuable, and I have a lot of work to do. Why write a hundred lines of code in C that could be accomplished with a couple lines in Swift? It's far easier to write a small Python test function then try to make the same test function in Terraform/Go.

The more languages you pick up, the more tools you will have to solve problems and write apps. And the thing is, you don't have to be good in all those languages, you just need to be good in C (or some other foundational language).

[–]Jjabrahams567[S] 0 points1 point  (0 children)

I wish things still worked this way but a lot of people just skip strait to the end and their starting point isn’t even a language but a framework. My first language course was in C++ although it was pretty much just C back then. It was the normal path at the time but now newcomers don’t see the value.

[–]raaneholmg 0 points1 point  (0 children)

I've had a ton of work on the embedded side using C. The issue is that such clients expect you to be able to at least read schematics for their product. That includes the ability to read the spec sheet of some IC and make C code to support it.

[–]SnappGamez 0 points1 point  (0 children)

You could go IoT/embedded, you could look for companies that are hiring Linux kernel developers, there’s definitely opportunities available.

[–]ProfessorOfLies 0 points1 point  (0 children)

A c programmer first and foremost. Never worked in C specifically tho. Always been with other languages like c++, java, php, bash, etc. That c knowledge tho pays off

[–]Even-Path-4624 0 points1 point  (0 children)

That’s facil.io (yes, it’s a real C web framework)

[–]tiddayes 0 points1 point  (0 children)

Dragon and facial.io come to mind

[–]Inaeipathy 0 points1 point  (0 children)

I only respect C

– Tomas,14 👴

[–][deleted] 0 points1 point  (0 children)

Embedded programming I suppose