130 points · by based2 · 9y ago · 75 comments
> Why C? fewer hipsters : hipsters dislike memory managment
Is this meant to be ironic? Spinning up web apps with C in 2017 seems like a supremely hipster thing to do.
http://pics.blameitonthevoices.com/102011/small_are%20you%20...
When I look back I've got to be honest and say that it was actually a thing of beauty. The heavy lifting required for some core functions was quite bad but the whole thing pales in comparison to some of the enterprise and microservice based c# behemoths I have looked after since which require literally hours of head scratching to deliver a simple change.
I'd rather spend that time writing C than scratching my head. I'd have a lot more hair now.
However in our case only the DB drivers and Apache TCL module were written in C, everything else was pure TCL.
Edit: it would appear to be ironic
https://github.com/kristapsdz/kcgi
Well I think I'll pass this one and hopefully don't need to maintain such apps in the future.
On a capability-secure processor running in a VM in case new classes of attack against C code are discovered Again. ;)
* Debian
* Iron ( https://github.com/iron/iron )
* Rust
* Postgres
(Clojure, Redhat, Apache, Postgres is good too)
JAWS - JX OS + Ada Web Services
I think it will all be ReasonML.
Since it's basically OCaml with more JS-friendly syntax, it will lead the masses of JS devs to OCaml, they will find MirageOS, build their servers with it and no one will need anything else anymore.
According to archive.org this page exists since 2015:
https://web.archive.org/web/20150701000000*/http://www.learn...
> SQLite is a "self-contained, embeddable, zero-configuration" database. And it's bundled (for now…) with stock OpenBSD.
It has been 8 months and 3 weeks since SQLite was removed from OpenBSD base.
But if you want to develop your modern and hipster-free webapp, then it's still available in ports!
A first and last name are useless without additional WHOIS fields for confidence, such as postal code, phone, etc...
I found 246 Mengzhu Wang's on LinkendIn, over 30 in IT any of which could own some of those domains.
If you really need a web development solution that's completely out-of-the-box on OpenBSD (aside from perhaps some third-party Perl packages), you might be able to use a "BPHL" stack (BSD Perl Httpd Ldapd) and use LDAP in place of a general-purpose database. That's probably a horrible idea, but whatever.
Currently, I don't see, why I should use it, except going at least ten years into the past.
SQLite is great, but I can use it with other useful tools instead of a naked web server.
I would like to see nginx support here instead of just OpenBSD's web server. Perhaps this is because nginx won't work with pledge?
>Safer code
Not really. I mean, using vectors and strings is nice, but that's about it for safety. You'll still get a shit-ton of memory leaks which isn't great for long-running web apps.
This part has a joke, which makes the overall website not read like a joke. I’m pretty sure it isn’t, even.
This is to C devs what the micro bit is to kids learning computing - a starter experience with server side dev
Or at least the pool of "hipsters" I know like to pick it for use cases where they haven't considered fully whether or not it's actually going scale.
If by "hipster" you mean, "People who are sick and tired of shipping insecure software that violates consumer trust and has tends to case downtime" then by all means, ship C code that handles untrusted input.
I think it's criminal to propose this without massive auditing, which is what HLL runtimes end up getting.
C is a bad choice for handling untrusted input precisely because it makes it very difficult to prevent logic errors that disclose user data in unexpected ways. The security community has done its best to prevent the even more disastrous class of breakout errors that comprimise the entire resource (and OpenBSD is great for this, way better than containers).
But as my comment was specifically addressed at the choice of C, I don't feel like I need to sweet talk an OS I already say lots of nice things about.
Maybe you'd like to respond with all sorts of great literature about how the C spec is not full of holes and gotchas?
And don't even get me started on that "simple example binary."
Oh that's a new one. But now that you mention it, I'm starting to recall all the operators that will fprintf the contents of ~/.ssh/ to the network socket upon misuse.
Wouldn't it be nice if we could use a simple assert to test the state and inputs before we proceed to shovel private keys in a totally not privsep'd process handling public, unauthenticated connections. Heck, even a simple condition would do, if we could just return an error and stop further processing when things look bad. But you're right, that kind of code would've been too advanced for 1958 or whenever we got this language...