53 Comments
- robfrench, on 10/12/2007, -5/+28Dearest Bruce,
You've shown some amazing skills of perception here. Since you are so masterful of all things linguistic, how about you respond to Vadim in his native tongue into order to truly let him know how you really feel. Do the Digg community a favor and don't comment just to be an ass. If you couldn't tell by the sentence structure that English wasn't his first language, his name should have tipped you off at least. - MagicBobert, on 10/12/2007, -2/+24This is a tool for programmers to separate code that makes their programs work from code that determines what the programs look like. Similar to "skins" for programs but much, much, much more powerful.
- inactive, on 10/12/2007, -5/+21sorry for the noob'ed question... what exactly is this? a program that you run outside of your browser to change google pages?
- merreborn, on 10/12/2007, -1/+14What really drives google is their webcrawling algos, comodity-hardware-based clustered storage technology, load ballancing, and the pagerank algo.
Their templating engine is _nothing_ next to those technologies. PHP has _dozens_ of open source templating engines available, so I'm willing to bet there are at least as many for C -- so they're really not giving the world anything really new.
In summary: this is not at ALL a critical technology for google, nor is it anything ground breaking. - dgritsko, on 10/12/2007, -5/+16lol @ the tards who are burying this dude's comment. he asked a valid question, got a civil answer, and responded with gratitude... somehow you guys think this is worth -digging his comments. oh well... what does it matter, watch this one get buried too.
- davereid20, on 10/12/2007, -1/+10So I wonder how many people that have commented actually took the time to read that's it's not a HTML/PHP templating engine like Smarty, but for actual C++ executable programs? I can't find anything else like this for C++, so I find it pretty interesting and it gets my digg.
- olliholliday, on 10/12/2007, -0/+9and their public image... which they're bolstering by releasing largely irrelevant bits of code as open source.
- apantomimehorse, on 10/12/2007, -0/+8The broken English is forgivable, but a totally random Clinton bash from a non-American? WTH is that?
- inactive, on 10/12/2007, -9/+17thanks
- finnif, on 10/12/2007, -0/+7They should instead improve Digg to parse URLs in parens -- happens a lot.
- t928, on 10/12/2007, -0/+6that's http://www.clearsilver.net/
your link was broken, for those too lazy to fix it. - kiranlightpaw, on 10/12/2007, -0/+5"Just because it's not PHP and not limited to HTML, it doesn't mean there's any great difference."
FWIW, Smarty is not just limited to HTML. I have done all kinds of crazy things with Smarty including using it to generate downloadable configuration files for voip phones, generate emails, XML and lots of other things. I even used it once (in combination with some other scripts) to generate postscript output to a badge printer. Smarty is an amazingly useful tool that completely changes the way you look at PHP programming.
Having said that, if Ctemplate can do for C++ what Smarty did for PHP, I can't wait to try it out. Definintely digg. - phileplanet, on 10/12/2007, -0/+4Entry from the Google Code Blog:
http://google-code-updates.blogspot.com/2006/04/new-project-google-ctemplate.html - psylence, on 10/12/2007, -3/+7Wow, a templating library, this will definitely change the internets.
- kodek, on 10/12/2007, -0/+3No. A templating engine is basically a fill-in-the-blank document plus the information to fill it in. The template engine wil lgo through the document for things like LASTNAME and will replace it with the actual value of it.
It's good to keep code clean by keeping the output code away from the calculations. - EnricoFermi, on 10/12/2007, -5/+8Give him a break, obviously his english is not very good.
- richiejp, on 10/12/2007, -0/+2meh, I would rather use c/c++ than PHP.
and on a serious note a couple of ms adds up when you have a couple of thousand users per node. Also Google's search algos and other performance intensive application code will be in c or c++, so why bother introducing another language and all it's complexity to the system? - raccettura, on 10/12/2007, -0/+2I was thinking the same thing. IMHO a C version of smarty would be awesome. Speed plus separation. IMHO two critical things.
- adizzy615, on 10/12/2007, -0/+1Hey, its a start.
Ctemplate seems to be doing exactly what WPF is intended to do. Although WPF is meant for desktop applications. - illynova, on 10/12/2007, -1/+2This is really, really nice. I wonder if we can integrate this, say as a php plugin so we get a much faster version of templating? (opposed to smarty)
- finnif, on 10/12/2007, -1/+2AFAIK not even Google uses this across the entire company. Some projects use Clearsilver (http://www.clearsilver.net), which is really fast and comes with cross-language bindings out of the box.
- garraeth, on 10/12/2007, -2/+3So you think they'll enter the same application development space as Microsoft some day? Release Google C , Google Basic, Google Pascal, etc...? This might be a baby-step in that direction.
- inactive, on 10/12/2007, -3/+4is anyone using this or even seeing any benefit from using it in the near future?
- jzillan, on 10/12/2007, -0/+1possibly. i think google just plainly understands that open source breeds innovation and innovation breads creativity. google knows that the future of the web is depedent on the people. just my 2 cents.
-jzillan - 16x9, on 10/12/2007, -1/+2I was > apantomimehorse wrote: "The broken English is forgivable, but a totally random Clinton bash from a non-American? WTH is that?"
Perhaps it's simply not fair to limit the "continued blaming of former President Clinton for every perceived wrong" method of deflecting responsibility just to the U.S. neo-cons. The failed policies of governments (and their supporters) all around the world should also share in this seemingly bountiful resource.
By the way, not only do I have no issue with conservatives but I actually believe that the U.S. works best when there is a balance between liberal thinking and conservative thinking. Neo-cons, however, are another matter altogether. They should scare all of us. - starheinz, on 10/12/2007, -0/+1Agreed. High-level languages got popular for a reason. If you want to speed up your web server, look into caching frameworks or load balancing - don't try to save a couple of ms on the application server by using potentially unstable code.
- ABadInAlbany, on 10/12/2007, -0/+1counting down until someone uses the source to find a buffer to overrun ...
- SamMiller0, on 10/12/2007, -2/+3I get an error when compiling the code on Mac OS 10.4.6 using Apple's gcc 4.0.1
g++ -DHAVE_CONFIG_H -I. -I. -I./src -I./src -D_THREAD_SAFE -g -O2 -c -o template_regtest-template_regtest.o `test -f 'src/tests/template_regtest.cc' || echo './'`src/tests/template_regtest.cc
src/tests/template_regtest.cc: In function 'std::vector ReadDataFiles(const char*)':
src/tests/template_regtest.cc:144: error: invalid conversion from 'int (*)(const dirent*)' to 'int (*)(dirent*)'
src/tests/template_regtest.cc:144: error: initializing argument 3 of 'int scandir(const char*, dirent***, int (*)(dirent*), int (*)(const void*, const void*))'
make: *** [template_regtest-template_regtest.o] Error 1
anyone else try this? - dpavlin, on 10/12/2007, -0/+0Something like http://freshmeat.net/projects/php_ctemplate/ ?
- Bogtha, on 10/12/2007, -2/+2> it's not a HTML/PHP templating engine like Smarty, but for actual C++ executable programs?
It's a templating engine like Smarty alright. Just because it's not PHP and not limited to HTML, it doesn't mean there's any great difference. Even the template syntax is similar. - inactive, on 10/12/2007, -2/+2lol, if it woulda been an indian, all of you would be gunning for his head :P
- b7j0c, on 10/12/2007, -2/+2"much faster"???? no, users will get the page loaded in their browser no quicker (in any meaningful sense), except your server will be dumping core because you forgot about that pointer....and when you dump core you will be using 100x the OS resources of the worst php crap. think about it, webserver time is almost no meaningful part of the process of delivering a page. it takes the user longer to download even one moderately large image than to generate a page on the webserver even using the lamest tools.
- jzillan, on 10/12/2007, -1/+1great idea!
- dandiemer, on 10/12/2007, -1/+1so is this like a framework.
- thecwin, on 10/12/2007, -0/+0Um.. well you would have core dumping turned off on a high performance server..
- d4rr3ll, on 10/12/2007, -1/+1Be interesting to see if this could be wrapped up as a pecl module for PHP, and then see how it performs against all the PHP based template engines.
[note to self] Read comments further up the post before clicking 'Submit Comment' [/note to self] - daaan, on 10/12/2007, -0/+0It seems that gcc-4.0 cannot be used to compile ctemplate because it this invalid conversion from int is an error in gcc 4, while in gcc 3 it is only a warning. On MacOS X 10.4.6 I used "sudo gcc_select 3.3" to switch to gcc 3.3. After that I rerun ./configure --prefix=/usr; make -j 2 and everything went smoothly (this time the compiler only gave me a warning instead of an error). I guess google should fix this :).
- b7j0c, on 10/12/2007, -4/+3BARF. i feel very sorry for people who are trying to use c/cplusplus as a page production language. download time for any web page is bound by the network, not the server, look at any naive analysis tool and you will see that like 2% of the time to load a page in the user's browser is spent generating that page on the server. and it must be said that this is vile looking code, you know its bad when php seems preferrable. and yes you could deliver pages to the user with php with almost no measurable difference, see above. i am sure many developers at google wretch when having to deal with this, how could you not? it reminds me of the page-assembler stuff used at yahoo in 1996.
- robfrench, on 10/12/2007, -5/+4Hating to show my lack of understanding here, but is this something that can be used in the same vein as Ajax? As in customization on the user level?
- Rice, on 10/12/2007, -5/+4Google just *loves* Open Source eh? This is great!
- davereid20, on 10/12/2007, -2/+1Well comments like these "Wow, a templating library, this will definitely change the internets." and "so I'm willing to bet there are at least as many for C/Cpp -- so they're really not giving the world anything really new"... People seemed to assume it was just for the web, which is not its primary intended purpose from what I can gather and it's something I've never seen before for C/Cpp.
- mattdm, on 10/12/2007, -5/+4That seems kind of pointless. There are already plenty of good perl templating systems.
- greatred, on 10/12/2007, -2/+0Looks pretty useful for a lot of people I'd imagine.
- DigitAl56K, on 10/12/2007, -4/+1There's more than one? Cool! Where can I log on to the others??
- Haplo, on 10/12/2007, -6/+2"this is the same code that formats all of the pages for Google's web search"
As in the HTML garbage it spits out? - geminitojanus, on 10/12/2007, -9/+4That's a pretty huge leap for Google to make, seeing as this project is very close to their core business model, but I guess it could be argued that the code is irrelevant and not useful to many people.
Still, looks interesting. - VadimKatchkakov, on 10/12/2007, -19/+14Is wonderful jesture for the Google to contribute a new library. Many of peoples against the Google say they are now just like normal public company and not caring but this contribution of library shows caring for education of the children and others for humanity unlike Clinton did contributed library only for the personal interest of legacy.
- interiot, on 10/12/2007, -8/+2Any word on when this'll be available for Perl? (yeah, yeah, people kindly contribute a small amount of code, and people just demand more in return)
- inactive, on 10/12/2007, -7/+1niiice
- chadu, on 10/12/2007, -7/+1This is just a clever PR tool aimed at developer managers who just read a few days ago tha tM$ has released their studio for free... now they see this and say "Hey Ted, look Google is releasing their code too. You like them, right? Let's use it!"... well, maybe.
Nice to see they are giving back, but not sure how valuable this would be to most any developer. -
Show 51 - 53 of 53 discussions



What is Digg?
The Digg Toolbar for Firefox lets you Digg, submit content, and keep track of Digg even when you're not on the Digg site. Download the official