Live data from Hacker News

Web Applications Should Be Compiled

ediblepet.net

71–80 of 177 posts

Re: Web Applications Should Be Compiled

#71
post #68

Earlier quoted context omitted.

Would Lua have worked there? It's a ~200k library designed to provide an embedded scripting language to C projects. (It's very similar to Python, but a tenth the size, and with a bit more Scheme influence.) While it may be too big for some especially tight embedded platforms, if you could fit it in, it would have likely been substantially less painful. It's also a pretty good scripting language on its own merits, and…

Lua is meant for embedding in C programs; that is different from running on embdedded systems. The latter typically features drastically less RAM and CPU cycles, so most interpreted languages (which are not shy about trading away some performance) don't cut it. There are some exceptions; FORTH, for instance, can fit in about a kilobyte and its performance isn't miserable. But putting e.g. Lua in a confined space woul…

To my understanding "embedded systems" spans from something with 1k of memory to something like a cell phone or a router. Working with Lua is quite comfortable on the latter, hence my qualification. It's been ported to Lego Mindstorms (http://www.hempeldesigngroup.com/lego/pbLua/index.html), for example, which is "a 32 bit ARM7 microcontroller with 256K of FLASH and 64K of RAM."

It's not clear from the post which end of the spectrum he or she works with. (I don't work with embedded systems professionally, I've just tinkered with OpenWRT, cell phones, etc. as an enthusiastic amateur.) It would be usable in the same niches that SQLite is, for example.

Re: Web Applications Should Be Compiled

#72
Isn't that's what CGI is for? If you want a full blown web application framework in C is going to be a lot of work. String manipulation, parsing HTML with standard C libraries is not going to be easy. Java, C# and Python have pretty decent frameworks to do this I don't see the point of writing one using C.

Re: Web Applications Should Be Compiled

#73
post #2

Not a bad troll. Not the best I've ever read, but not bad, either.

I don't think it's a troll, but just someone who is really in to performance, like I do, and I agree with him on some points.

But what I don't agree is using just C. C is too low level and is a horrific unfit task for web development. Instead C++ would be a good fit (and writing in C mixed in). The STL/Boost provide a wonderful abstraction layer that does pretty much anything you throw at it with ease, plus there are lot of other libraries for anything else you can ever think of. I've written several web applications in C++, and it was actually very much like writing in Python/PHP/Ruby and at time prefered writing it in C++ after writing a poc in a scripting language. They were just a little bit less readable but very clean, but the biggest plus the the multiple magnitude performance increase of the application it self with FastCGI. (all these applications were serious number crunchers and had lot of CPU and Memory Bound problems).

tldr; C for web dev painful, C++ with STL/Boost good/easy/fast/clean.

Also I've heard of wt, a C++ web framework although I've never used it http://www.webtoolkit.eu/wt

Re: Web Applications Should Be Compiled

#74

Sweet merciful lord. Is this guy channelling Zed Shaw or what? Apart from all the hand-waving and generalizations, this guy doesn't sound like he's ever really a webapp under serious load. I'm not a Ruby guy, so I don't know how things fly with that, but I've never once had a problem with a webapp being slow because of the language it was written in. Bad database queries, unnecessary assets being loaded, definitely.…

I'm quite sure that, if we had HN memes, your 2nd line would spawn another one. It's very HN-ish.

Example usage: "Yes, he can write well, but has he ever really a webapp?"

Re: Web Applications Should Be Compiled

#75
post #66
post #16

It's a valid point. I wrote the Mibbit backend from scratch in Java for these reasons. I can only start to imagine the horror I would be enduring if I'd chosen a scripting language. Having said that, choose the right tool for the job. edit: Downmod me all you like. A scripted language wouldn't handle 2k req/sec on a couple of VPSs.

It's a valid point for Mibbit, but Mibbit is not your average web app. For the average web app, it's a lousy point, really (and, as pointed out by others, it's a troll/satire). The fact that you take it seriously is a little worrying tbh. Are you feeling ok? :-)

Would you not agree that the web is becoming more "real time". People demand webapps to update as they view them - ajax,comet,getNextBuzzword(). Those demands place a higher load on servers, especially when you scale to large number of users.

Re: Web Applications Should Be Compiled

#77
post #75
post #66

Earlier quoted context omitted.

It's a valid point for Mibbit, but Mibbit is not your average web app. For the average web app, it's a lousy point, really (and, as pointed out by others, it's a troll/satire). The fact that you take it seriously is a little worrying tbh. Are you feeling ok? :-)

Would you not agree that the web is becoming more "real time". People demand webapps to update as they view them - ajax,comet,getNextBuzzword(). Those demands place a higher load on servers, especially when you scale to large number of users.

For sure, but 99% of apps never scale to "large numbers of users". And when they do, they usually have the time to figure out how to do so without downtime. Often, that may involve rewriting part or all of the backend in a lower level language. If that's needed, so be it - but to do it before you have any performance problems is just premature optimisation.

Re: Web Applications Should Be Compiled

#79
post #2

Not a bad troll. Not the best I've ever read, but not bad, either.

I don't think it's a troll, but just someone who is really in to performance, like I do, and I agree with him on some points. But what I don't agree is using just C. C is too low level and is a horrific unfit task for web development. Instead C++ would be a good fit (and writing in C mixed in). The STL/Boost provide a wonderful abstraction layer that does pretty much anything you throw at it with ease, plus there are…

I've been hacking C++ long enough to agree C++/STL/Boost is good and fast... but I can't remember the last time I heard anyone accuse C++ of being easy...

Re: Web Applications Should Be Compiled

#80

I will live to be a happy old man if I never read another blog post telling me in absolute terms what I must do and why I'm an idiot if I don't. I blame Joel Spolsky for this, his tone and style seems to have kicked off an entire sub-culture of blogging where the posts read like a lunatic standing on a street corner demanding that we repent before the end of the world and the coming of the messiah. Bloggers, please t…

I agree, but TBH there have been a lot of ridiculously overhyped blog posts/articles telling us how totally awesome every scripting language is, and how it's completely a 'game changer' and how you can do completely revolutionary things in them really easily.

I guess this is just a reaction to the froth+hype. Both sides need to step away from the keyboard, and calm down.

Post reply on HN