It wasn't bad. You just get used to keeping track of memory, arrays lengths and pointers like you do anything else. While I do prefer Python these days, I always enjoyed the looks of horror Java and PHP programmers greeted me with when I mentioned our language of choice for Bloglines.
Web development in C: Crazy?
201–210 of 213 posts
Re: Web development in C: Crazy?
#202Earlier quoted context omitted.
Only tools, one-offs, and small internal products at Google can use Python. In general, for production it is disallowed (with exception of YouTube). They learned with YouTube that Python doesn't scale well to hundreds or thousands of developers. Even Mondrian, the code review system started by Guido and written in python, was replaced by something more scalable.
> Only tools, one-offs, and small internal products at Google can use Python. Also YouTube (you may have heard of it). > with exception of YouTube Oh, you have. ;-) You didn't mention java though... there's a TON of stuff in Java at Google.
Re: Web development in C: Crazy?
#203Earlier quoted context omitted.
> C has library based safe constructs as well, and C++ still has all of C unsafety. The problem C's lacking one of most important primitives - data structures. Bugs in standard library happen pretty rarely, I guess. So, C++ users have most common data structures for free. And when I open some C-based project's code the first thing I usually expect and see is some homegrown linked list and/or map implementations (of S…
> And when I open some C-based project's code the first thing I usually expect and see is some homegrown linked list and/or map implementations (of SIGSEGV fame). I know, there are tons of libraries that offer them, but in my experience of "hey, that server crashed, could you figure out what went wrong"-type tasks, they're very rarely used. Fortunately, C++ developers just always use the STL because it is considered…
Re: Web development in C: Crazy?
#204Sure, cool stuff and probably great fun doing it. However what matters in web development is not performance, nor that it is bug free and not even security. All of those things can fixed one way or the other on the server with more hacks. The one thing that matters is speed of development, that is why PHP rules so hard. "Let's argue about whether Haskell or Clojure is better while somebody else ships products using P…
But that comment is such a transparent and absurd red herring that it is an insult to your intelligence to repeat it. People talk about PHP too. That doesn't stop them from shipping products using it. Talking about languages has absolutely no detrimental effects on writing code.
Web development is fundamentally different from application/system development.
Re: Web development in C: Crazy?
#205Earlier quoted context omitted.
> > Apache and nginx => C > Tomcat, Jetty => Java > Okay, if you are going to throw in Tomcat & Jetty, you should also throw in the likes of lighttpd, mongrel2, etc., all of which are written in C. Pretty much all the load balancers/reverse proxies are written in C too. Hmm.... is it maybe possible that it isn't always better to use C++ instead of C? No, they were developed by open source Linux guys that only care ab…
> No, they were developed by open source Linux guys that only care about C in what concerns compiled languages. > C++ was always badly received by the Linux community, in contrast with commercial UNIXes. You mean like KDE, Firefox, OpenOffice, OpenCV, VLC, bitcoin... heck even gparted is a C++ app. The kernel developers obviously have a bias against C++ (and they'd argue that it is a justified bias). User space is a…
>You mean like KDE, Firefox, OpenOffice, OpenCV, VLC, bitcoin... heck even gparted is a C++ app.
>The kernel developers obviously have a bias against C++ (and they'd argue that it is a justified bias). User space is a different land.
I use Linux since 1995, and was for some time a Gtkmm contributor in the early days.
I know how it feels to be a C++ developer in Linux land.
Re: Web development in C: Crazy?
#206Earlier quoted context omitted.
> Maybe your problem is CPU-bound. Maybe you have latency limits you need to work within. Unless you have lots and lots of time to spend micro-optimizing everything, you'll get better performance writing in Haskell. > Maybe there are good C libraries that solve your problem Maybe, but most of the original post is about how lacking the library ecosystem is. I can well believe that you might have some useful domain-spe…
> Unless you have lots and lots of time to spend micro-optimizing everything, you'll get better performance writing in Haskell. This is stating the case too strongly. Performance wise, the naive, unoptimized solution in Haskell (ex. using the default String type instead of Data.ByteString, number crunching using lots of iteration\recursion) is going to be much slower than than the naive, unoptimized solution in C or…
Re: Web development in C: Crazy?
#207Earlier quoted context omitted.
But that comment is such a transparent and absurd red herring that it is an insult to your intelligence to repeat it. People talk about PHP too. That doesn't stop them from shipping products using it. Talking about languages has absolutely no detrimental effects on writing code.
Did you understand my point how web development works? Web development is fundamentally different from application/system development.
Re: Web development in C: Crazy?
#208Earlier quoted context omitted.
I think Julia has the potential to be a contender in this space as well. The advantage over Rust or Go is that you get a dynamic language (with a REPL and everything), and still can have C-like performance. You also get metaprogramming and optional typing (so its there if you want safety but you can ignore it if you just need to crank something out). To me it really feels like a blend of the best of Python/Ruby and s…
The impression that I at least have got of Julia is that it's designed specifically for technical computing (mathematics, science, etc.) rather than general purpose programming as Rust is. I think that would be likely to influence what people use it for significantly? That could be a pity, because Julia does look like quite an interesting language. Rust's REPL, rusti, is presently broken, but it will be being fixed u…
Julia's type system is very similar to Rust's. Julia has composite types, type unions and parametric dependent types. It is certainly designed with technical computing in mind, but that does not at all limit its ability to do general purpose programming and in fact can help significantly in high load situations. I personally have done more general purpose programming in Julia than I have done technical computing (and in fact, it's focus on technical computing was one of the least important reasons when I decided to become one of the Julia core developers). You have a good point that the ability to do easy technical computing certainly will influence the initial audience, but, I think, as the language matures, this will shift towards a more general audience.
Re: Web development in C: Crazy?
#209Earlier quoted context omitted.
> And when I open some C-based project's code the first thing I usually expect and see is some homegrown linked list and/or map implementations (of SIGSEGV fame). I know, there are tons of libraries that offer them, but in my experience of "hey, that server crashed, could you figure out what went wrong"-type tasks, they're very rarely used. Fortunately, C++ developers just always use the STL because it is considered…
I wonder if we will get a GTL a la guava :p
Re: Web development in C: Crazy?
#210Earlier quoted context omitted.
There has never been a one-to-one mapping (rather one-to-many), but it's still perfectly possible to transform C into assembly by hand. It's not even that difficult.
Yes, back in the old 8 and 16 bit days, it was pretty much one-to-one for most use cases. Nowadays not any longer if you want to write code that takes advantage of branch prediction, speculative execution, cache lines, vector units, GPGPU ... Just watch this Going Native talk on how sometimes generating code that is 4x bigger than the direct translation can yield up to 30% performance increase. http://channel9.msdn.c…
I'll concede there's more fine variations to think about than with an 8-bit system, though, with the padding, etc.