Earlier quoted context omitted.
Google still does primarily use C++.
Google is so huge now, I'm not sure if that is really something that you can state unequivocally. The search engine and a lot of the plumbing that everything is built on top of is written primarily in C++, but there is a TON of both Java and Python code there (and that's not counting things like Go and specialized languages like the infamous Sawzall). Back in the day (particularly before they started doing ads), almo…
Web development in C: Crazy?
81–90 of 213 posts
Re: Web development in C: Crazy?
#82WHYYYYYYYYY No, seriously, why ? As far as I can tell, his entire argument is "web development in C is terrible and limiting, but not as quite as terrible and limiting as you might think." I guess that's good news if terrorists are forcing you to write websites in C, but I don't see even an attempt at explaining why you would choose to do this.
There exists a form of survivalist mindset in some programmers. It goes roughly like this: if you can't boot it, it's fluff programming. The attraction of C to this mindset is that it can be transliterated (vs translated) into machine code. This transliteration is so straight forward that if you know C and are familiar with the basics of the instruction set you can do it by hand. The survivalist mindset fears depende…
Except modern processor architectures are no longer a one-to-one correspondence between Assembly code and C.
Re: Web development in C: Crazy?
#83Re: Web development in C: Crazy?
#84Earlier quoted context omitted.
That's using language choice as a proxy for developer talent. It's a proxy, not a real metric of the language itself. I'd note that pg ultimately sold to Yahoo, who a) wrote a fair bit of C in house themselves and b) were severely trounced by a competitor that initially was primarily using C++ (Google).
Google still does primarily use C++.
Of course, the best option would be to replace them by other languages with native compilers.
However at the level these languages are used, it will only happen when OS vendors push new languages for their OS.
So it will never happen in UNIX land or Mac OS X land.
In Windows land, Microsoft is pushing for C++ and C++/CX, maybe C# if they ever decide to offer a full native compiler, like the Bartok one.
The embedded market OS vendors are all about Ada, C and C++. A few do offer Basic, Pascal and Oberon, but are very small niche.
So there isn't any OS vendor left that would push new system programming languages for their OS.
For business programming, there are already plenty languages to chose from.
Re: Web development in C: Crazy?
#85There are hardly any benefits in writing your web app in C ove r Java or Go. That 1% speed increase is nothing compared to the huge amount network wait these apps will be doing. If you really consider it, what 95% of people write these days is glue between various services, and the parts that do matter, where you need the most performance, are already written in C. The reason why Redis, MongoDB and Postgres have good…
C and C++ compilers can produce faster execution than Go or JVMs as they support SIMD vectorization e.g. SSE/AVX. For CPU-bound workloads you can get more than 2x speed up. It doesn't mean you should write your entire server stack in C vs calling a C function for heavy computation, but the idea that Java and Go approach 99% the speed of C/C++/Fortran is generally only true for programs that are not optimized for perf…
This is an implementation issue.
Nothing prevents a compiler vendor to offer the same capabilities to their language compilers.
Vectorization is not part of ANSI/ISO C or ANSI/ISO C++.
For the time being, do you want vectorization in Go? Write a tiny assembler routine. Done.
JVM? They are working on making it part of the reference JVM http://openjdk.java.net/projects/sumatra/.
.NET? While Microsoft does not offer anything, Mono has SIMD support since 2008, http://tirania.org/blog/archive/2008/Nov-03.html
Re: Web development in C: Crazy?
#86Earlier quoted context omitted.
Google is so huge now, I'm not sure if that is really something that you can state unequivocally. The search engine and a lot of the plumbing that everything is built on top of is written primarily in C++, but there is a TON of both Java and Python code there (and that's not counting things like Go and specialized languages like the infamous Sawzall). Back in the day (particularly before they started doing ads), almo…
Not only that but the scale of Google drives decisions that may not make sense for the rest of us.
Re: Web development in C: Crazy?
#87Why C? Performance. I wrote a C webserver on a PIC32MX795F512L (80 mhz/ 128kB RAM), and it was _screaming_ fast (for what it was running on). Easily handled ~100 clients making 2-3 requests/sec continuously to a JSON based API (I really don't know how far you could push it before it got slow), which is respectable for that chip ... but this was written to the bare metal with no OS (did use libraries for IP/TCP/HTTP/J…
Re: Web development in C: Crazy?
#88Might anyone looking for a speedup akin to C do better to look at Go instead?
Re: Web development in C: Crazy?
#89So, people can't hardly write safe web apps in PHP without spraying XSS and auth bypasses and arbitrary shell executions and arbitrary SQL injections everywhere, and you also want to hand the attackers the ability to segfault your server or possibly even straight-up run arbitrary code? Anyone smart enough to truly safely code a website in C is smart enough to learn a language to create that website which doesn't get…
This makes me wonder, are there any decent (military grade?) web frameworks for Ada?
http://libre.adacore.com/tools/aws/
I've no idea what the architecture is like, but being Ada, I'm pretty hopeful it delivers some nice guarantees (or at least hefty promises) regarding reliability.
An hello-world example web server:
https://en.wikibooks.org/wiki/Ada_Programming/Libraries/Web/AWS
An outdated, probably flawed (aren't they all) benchmark: http://wiki.ada-dk.org/aws_vs_node.js
If nothing else it seems to indicate that aws isn't hopelessly slow.There's also awa - the Ada web framework. I've yet to play with it, but it would appear to be relevant:
http://code.google.com/p/ada-awa/
According to a stack overflow answer[s], Ada also comes with a spitbol-package, allowing you to use spitbol/snobol rather than regexpes for pattern matching. See eg the bottom of: http://www.adacore.com/adaanswers/gems/gem-26-2/
[s] http://stackoverflow.com/questions/5904053/web-programming-i...Re: Web development in C: Crazy?
#90Earlier quoted context omitted.
> I don't see it as a talent filter proxy. That's fine. I was characterizing how pg was using it. > Does this company understand what it is getting into and therefore what it needs? I think it is actually a much poorer proxy for that. Maybe if they are a small company or don't have any engineers, that would make sense. As a company gets larger, job descriptions start to represent very small, specific parts of what a…
Ah I considered the second bit in the historical context. The poly-lingual software related company seems to be a more modern trend IMO. At the time PG is referring to I would have been very surprised to see that going on in the web industry.
Consider yourself surprised then. ;-)
Actually back in those days a lot of the web industry was just doing integration with existing systems, which means the tech stacks were as varied as those existing systems. Even when not, it was the wild west. You tended to have a lot of experimentation, false starts, and general insanity. Heck Apple had a really good run with a server-side Objective-C development framework! Impressive systems were built fairly easily with Perl (and later PHP), Smalltalk, C++, VBScript, Python, LISP, and then there was AOLServer stuff (TCL!), and that's ignoring some of the proprietary language developed specifically for the web... At any given company you'd probably find somewhere between 2 to 5 of those. Sure there might be a dominant language, but there'd be specific needs for people with skills in any of those languages.
There was one sign you could rely on to know a company was not on top of their tech stack: the gratuitous licensing of proprietary Java application servers. Open source, and in some cases even proprietary, servlet engines made a lot of sense for some places, and Java application servers could often make sense for enterprise solutions that needed to be dragged kicking and screaming into the web world, but all too often you'd see these companies paying tens of thousands in licensing fees for technical capabilities that not only were not of use for them, but _would actively hamper their efforts_.
I actually was a Java consultant at Sun during some of that era, and I often would arrive at client sites and feel an overwhelming need to smash my head against the wall until I forgot what I'd seen.