Live data from Hacker News

Show HN: Hosting my website using my C web server

github.com

51–60 of 160 posts

Re: Show HN: Hosting my website using my C web server

#51

Awesome! I used to think (well, I still do) that getting a barebones service up and running using the system APIs at the lowest level like this is so satisfying. It's sort of magical, really. And to see it serve real traffic! I'm kind of surprised that the vanilla poll() can put up numbers like you were seeing, but I guess it's been a while since I've had to do anything event related/benchmark at that level. I love t…

Working with c/cpp in uni exploded my mind. It's such a specific humbling experience that has a bit of anything I love - engineering, history, culture, linguistics, etc.

It made me think that anyone should know and try every possible language (programming or otherwise) - "thinking" in a language is such a unique experience. The different contexts make everything feel different, even though it's more of the same. The perspective change, and changes the subjective experience.

For example - to really understand the nature of linux or git, you have to speak its language and understand the nuances that are usually lost in translation. Tangibly, to understand the true subjective meaning of the word "forest" in russian one has to speak and understand russian.

The context changes the perspective, so sometimes it changes everything.

Re: Show HN: Hosting my website using my C web server

#52
post #12

Earlier quoted context omitted.

Not sure if serious…

Not the only time it’s been brought up in this thread: https://news.ycombinator.com/item?id=41643198 I’m waiting for someone to chime in and explain why that would be a bad idea cause I can’t think of it from a security perspective.

From a security perspective a lot of changes to this world would be an upgrade. However implementing security features is always a trade off, and sometimes good security is just not worth the loss of other things.

Re: Show HN: Hosting my website using my C web server

#53
post #46

Nginx is C web server.

So is Apache and OpenBSD httpd and probably too many others to name. Node.js is written in C/C++ as is Litespeed, probably Cloudflare Server as well. Microsoft IIS is written in C++.

So that accounts for about the top 5 ...

Re: Show HN: Hosting my website using my C web server

#55

Not to compare but i realice this is something you can do with rust with few lines https://github.com/actix/actix-web/tree/master/actix-http

Look ma, I can do it in python! $ python3 -m http.server

Or Ruby

$ ruby -run -e httpd .

Re: Show HN: Hosting my website using my C web server

#56
post #2

Hello everyone! This is a fun little project I started in my spare time and thought you'd appreciate :)

I find it an interesting excersize to read through really old bugs and CvE for http servers to see what might affect my code too. and see how to fix it. nic3 going though =) fun to roll this kind of stuff yourself!

Re: Show HN: Hosting my website using my C web server

#57

Earlier quoted context omitted.

For fun, sure. Small mistake can be big security nightmare

1000 lines are easier to secure than 5 million lines

Not if 1000 lines are written by you alone and not checked by anyone else vs 5 million lines of code written by thousands of people and checked by countless more. Linux is probably more secure than 1000 lines of C code from a junior developer.

Re: Show HN: Hosting my website using my C web server

#60

Great project. Down for me. $ curl http://playin.coz.is/index.html curl: (7) Failed to connect to playin.coz.is port 80 after 166 ms: Couldn't connect to server

That exact command line worked for me - might there be something on your end blocking outgoing plain HTTP requests?
Post reply on HN