Earlier quoted context omitted.
thats C not C++. geesh :P
I hear C++ can call C functions these days.
C++: A language for next generation web apps
51–60 of 99 posts
Re: C++: A language for next generation web apps
#52Earlier quoted context omitted.
"because we all know it can work and that it will be faster" Speed of execution depends more on the programmer's expertise than the language used.
Not really true. I can write the same algorithm in Perl as in Haskell, and the Haskell always runs faster.
Re: C++: A language for next generation web apps
#53Earlier quoted context omitted.
"because we all know it can work and that it will be faster" Speed of execution depends more on the programmer's expertise than the language used.
Not really true. I can write the same algorithm in Perl as in Haskell, and the Haskell always runs faster.
(vs. the most efficient implementation of that algorithm... which is clearly going to be in a combination of C and assembly anyway).
Anyway, the guy using the good algorithm ends up with the fastest code. Different compilers will produce different quality of code.
Question is, if I am using C++ vs. a guy using Perl, will I ever reach the efficient algorithm? I might call it quits when I finally get something to compile and not segfault.
(Of course even this is kind of a strawman, because the perl guy can just reimplement in C++ when he figures out that he wants more speed out of his good algorithm).
Re: C++: A language for next generation web apps
#54The reason why dynamic scripting languages are more appropriate for web applications than C++ is simply that the bottleneck is somewhere else - namely, the Internet is slow enough to make the performance of the server-side code irrelevant. That can very easily change in the future.
And if your implementation on the server side is very fast, you can do more.
Re: C++: A language for next generation web apps
#55Earlier quoted context omitted.
Oddly enough I'm back to C++ too, after Ruby. One nice thing is; in a fast language, tests run quickly too. Also, Python and Ruby don't have the equivalent of an ASSERT (you could roll your own but it's not standard practice ). Also, C++ has standard hash lists and complicated data structure are actually going to run quickly. And while memory management can be a pain, you are doing it yourself so you can track down m…
Also, Python and Ruby don't have the equivalent of an ASSERT (you could roll your own but it's not standard practice). Ahem: http://docs.python.org/reference/simple_stmts.html#the-asser...
Re: C++: A language for next generation web apps
#56Re: C++: A language for next generation web apps
#57Personally i thought that with better resources management i could do much more, so i wrote a custom HTTP server in that could fit in less than one MB of RAM. Most of my pages were generated offline using a custom program in FreePascal.
The server could also execute CGI scripts, so i also wrote a forum in FreePascal.
According to my logs, the whole system ran out of memory only once :-). Until the day i decided to give myself a little more features (when i got a much better VPS from Linode) i had about 5-6 sites running (different domains), a Subversion server and a few "dynamic" apps.
The forum can be found here. I still run it in my new VPS, although it got some spam. The a + b = ? anti-spam feature was new when i wrote the forum but seems that bots got better :-P.
Re: C++: A language for next generation web apps
#58At our peak late in 2002, we served about 320 million dynamic webpages a month using three desktop Pentium 3's for webservers, and a dual CPU P3 for the database. No caching, as that wasn't needed.
Blazing fast, and not all that difficult to work with once the basic framework was solid and in place.
Re: C++: A language for next generation web apps
#59Earlier quoted context omitted.
RubyOnRails is very test gunghu, but to run a hello world test takes seconds , anyone know why? This seems very odd. Is this one of those do what I preach, not what I do things?
I doubt it takes seconds to test a hello world program in Ruby. However, to test a hello world Rails application is a different story, as you have to start up the web server, which takes seconds (even though it eventually just serves a simple page).
Standard `rake test:units` (or even `ruby test/units/model_test.rb`) takes the whole Rails stack so it adds up.