is gcc going nuts?

June 24, 2008 at 8:24 pm | Posted in Uncategorized | 9 Comments

Note: I’m no gcc expert, nor am I C++ standards expert so please bear with me if this reads a little bit like a rant. I’m really just surprised 🙂

So I’ve just built kdevelop and noticed an new warning:

/usr/include/c++/4.3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.

Ok, no problem, it even tells me where to look to fix it. Very nice. So I went to the file and saw that one is supposed to use “unordered_map” instead of ext/hash_map. So I changed the relevant files to do that and rebuilt (I’m now using gcc 4.3 as Debian decided to change that recently). Now I’m getting:

/usr/include/c++/4.3/c++0x_warning.h:36:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.

And that leaves me pretty much stuck.

How come gcc developers deemed it a good idea to deprecate something and thus encourage users to change to non-deprecated code but at the same time mark this code as highly experimental and thus not ready for wide usage? That doesn’t look good, even if gcc won’t drop the header next week, at the point we’ll probably have to change a lot more code using it than we have now.

Ok, enough of that, I’ll revert my local changes and live happily with the warning, in the hope that I won’t be around when it gets dropped from gcc 🙂

Advertisements

Ruby On Rails Rocks

October 14, 2007 at 11:29 pm | Posted in Uncategorized | 11 Comments

Yes, you’ve read right, this post is about Ruby on Rails, not about KDevelop 🙂 (at least not directly).

Friday I started to look into Ruby, because a) its currently hype and I wanted to look into Ruby on Rails for some idea how other web frameworks (besides J2EE/Spring) look/work/feel like. Well, the language itself was done in a good half of a day, not much new stuff if you’re used to a scripting language like python or perl already (probably a bit more for perl-enthusiasts). A few nice things like their iterators and leaving out parenthesis (though that gets confusing sometimes) or the full object-orientation – where python still has a procedural way of working. There are also 2 downsides I noticed, which are non-native thread implementation (hooray for cross-platform, but not so nice if you want to use 1 ruby app with multiple cores) and the IMHO more serious problem of dealing with plain byte-strings. This means either using 8-bit encodings for your strings or doing some workaround like using jcode and having to use special new functions like jlength instead of length. This is something I really dislike, we’re in 2007 after all.

Anyway, yesterday I started with a small nice-to-read Rails tutorial and got some of the basics straight. Also nothing really fancy here, except that its a lot less configuration compared to J2EE/Spring and also a lot more pre-generated-already-working code. So I have to code less and can create more 🙂 It also turned out that Rails people like to write books and get money off of teaching other people Rails. I managed to borrow a Rails book for a few days from a colleague and worked through most of the example-app (simple ordering-system for books). The result is that I’m really amazed how this stuff works together and how easy it is to create new stuff based on what you’ve seen so far. Like adding a remove-item-from-shopping-cart button that uses AJAX, if available, based on the add-item-to-shopping-cart. Really cool stuff and I guess if I can I’ll see that I get a job where I can use RoR.

Last but not least I’ll try to get KDevelop into this post: I’m using it to work on my rails app. Even without any parsing-support it already helps finding your way around. You get the quick-open stuff (at least file-based) to quickly jump to the files you need, there’s support for running the rails server and opening a browser that points to your app. And for coding there’s kate with syntax-highlighting for ruby, rjs, rhtml and all other filetypes, even indentation works quite ok once you’re not using the C-indenter 🙂 The only thing that I didn’t manage to get working are a few actions that should allow to directly jump between model/view/controller and the integrated shell, but thats already reported on our mailinglist.

Blog at WordPress.com.
Entries and comments feeds.