Older blog entries for redi (starting at number 194)

Comagan Suresh, the lowlife SEO spammer, is still creating accounts here. My previous post calling him a lowlife spammer is currently the 3rd and 4th google hit for his name. Stick that in your SEO and smoke it.

Come back and visit us again, fzort - or syndicate relevant posts here please.

An SEO spammer has created several accounts today, all with real name "comagan suresh". It's hard to know whether to tell search engines that Comagan Suresh is a spammer and lowlife, or whether it's someone else trying to harm his reputation. Oops, too late now.

I've just noticed mentifex recently wrote a rebuttal to an old article, where he refers to himself in the third person and calls advogato "a major battleground in the conflict between censorship and freedom of speech." I fear if he does herald the technological singularity then the future is going to be like getting spammed by a Dada Engine with a persecution complex.

Wow, a whole site dedicated to removing all the joy and humour from xkcd.

caolan's diary entry makes me wonder why people in large C++ projects like OOo still insist on managing memory the hard way. If cppcheck (a simple pattern matcher) can find those problems then the bad/missing delete must have been very close to the new so there's no reason it couldn't be wrapped in a smart type that would clean up automatically. I dread to think how many memory-related bugs there are in OOo that can't be detected by simple pattern-matching.

chalst is fighting the good fight against spam. A few months ago I contacted Adecco NZ's IT department after I noticed a spammer creating advogato accounts linking to Adecco NZ and Adecco Australia. I said:

I assume you have hired someone to do some seach engine optimisation, or try to improve your google ratings - if that's the case, you've hired a lowlife who is willing to abuse unrelated websites to post spam. If that was done on Adecco's behalf that's a great way to damage your image and to get a reputation as spammers.

They replied:

Thank you for deleting this account. This advertisement was not done on behalf of Adecco New Zealand.

We have had issues with a scammer [...]. This scammer has been posing as an Adecco New Zealand employee on international job forums and is luring job seekers in to a money forwarding scheme. We have notified authorities and are actively working to shut this scam operation down.

If there is any help you can give us (i.e. IP address/ISP this person connected from to your servers, etc), it would be much appreciated.

So apparently not all spam accounts are misguided attempts at SEO, some may be slightly sneakier.

6 Nov 2009 (updated 6 Nov 2009 at 16:38 UTC) »

My preferred explanation for apparent backwards causation sabotaging the LHC relies on the many-worlds interpretation.

Maybe the production of measurable quantities of Higgs bosons for any length of time is so utterly abhorrent to the universe that it implodes or ceases to exist in some other way (possibly turning into a bowl of petunias and a very surprised looking whale) or maybe as the crackpots have it, the LHC will produce a black hole that will swallow the Earth. Should that happen we wouldn't be around to experience it, so the fact that you are reading this implies you are on a world-line in which the LHC failed to destroy the planet (yet!) It seems that in your world-line the LHC failed because of a series of unfortunate events preventing it from coming online.

I am writing this from a parallel universe where the LHC did produce Higgs bosons. One of the unexpected consequences was the ability to blog in parallel dimensions, but I'd better not tell you about the others, as you probably wouldn't believe me.

After a few years with Write After Approval status, I have been made a maintainer of libstdc++. I am replacing Phil Edwards who has not been as active as he once was. Phil was very supportive and helpful when I first got involved with libstdc++ so as well as my own work I'll try to follow his example and encourage new contributors to the project.

I wiped the default Asus/Xandros distro from my EeePC 701 a couple of months ago and installed Fedora 11. That borked my mobile broadband, which made the system pretty much useless for me as I only use the eee when on the move. Since the machine was just gathering dust and Fedora 12 has improvements to mobile broadband support, I thought I might as well try the Fedora 12 beta. Mobile broadband works again and is very simple to start, the NetworkManager UI is much better than the applet I used to use with the original Asus distro. There were a couple of small issues which have already been fixed in rawhide, but generally it works very well. I've been using LXDE and XFCE for the desktop, as KDE is very slow on the eee 701, even with the RAM upgraded to 1GB. Newer netbooks with slightly more powerful CPUs might fare better.

On the same topic as dmarti's How not to write the way dumb people think smart people write, I have been getting annoyed with dumb people who say they will "revert back to me."

That's doubly dumb, because "revert back" is tautological, and because "revert" doesn't mean "reply".

Unless you're the Incredible Hulk talking to Bruce Banner in the mirror, you should not say you will revert to someone.

This misuse appears to have originated in India, but has infected the minds of several people in the UK who seem to think it's a professional-sounding way to finish emails. Thankfully there appear to be attempts to stop the misuse, e.g. hamra.net and englishyogi.com.

I wish advogato's diary entry form didn't wrap <pre> elements at 60 characters.

10 Aug 2009 (updated 10 Aug 2009 at 17:54 UTC) »
error: template parameters not used in partial specialization:

Dear search engines,

please direct people to this explanation if they search for the GCC error template parameters not used in partial specialization.

An undocumented change to GCC 4.3 means that g++ now rejects some invalid template partial specializations that used to be accepted.

Examples of code that used to be accepted can be found in bugs 35989 and 41028. GCC was wrong to accept them, and is now fixed.

Here is an example that compiled with GCC 4.2 but is rejected by GCC 4.3 and later:

  
#include <vector>
#include <cassert>
 
template<typename T>
  struct A
  {
    static const bool value = false;
  };
 
template<typename U>
  struct A<typename std::vector<U>::iterator>
  {
    static const bool = true;
  };
 
int main()
{
  assert( !A<int>::value );
  assert( A<std::vector<int>::iterator>::value );
}

The meta-function A attempts to detect when its template argument T is the iterator type belonging to std::vector<U> for some type U, by providing a partial specialization to match vector iterator types.

GCC 4.2 and earlier will compile this code, but the second assertion will fail:


a.out: t.cc:19: int main(): Assertion
`A<std::vector<int>::iterator>::value' failed.
Aborted (core dumped)
The partial specialization is not used!

GCC 4.3 will determine that the partial specialization will never be used, so will not compile it:


t.cc:11: error: template parameters not used in partial
specialization:
t.cc:11: error:         'U'

Looking at the partial specialization it seems that U is used, so let's look at why the code does not work. The C++ standard says, in [temp.class.spec.match] paragraph 2:

A partial specialization matches a given actual template argument list if the template arguments of the partial specialization can be deduced from the actual template argument list
So in order for an instantiation, A<X>, to match the partial specialization, the compiler must be able to deduce the type U from X. In the example above, X is std::vector<int>::iterator, so why can the compiler not deduce U as int?

The rules for deducing template arguments from types in [temp.deduct.type] say that template arguments can only be deduced in certain contexts, and that in other contexts the actual template arguments do not participate in type deduction. U appears in the nested-name-specifier of the qualified-id std::vector<U>::iterator, and this is defined as a nondeduced context by paragraph 4.

The compiler cannot deduce U when instantiating the template, so the partial specialization is ill-formed.

The more persistent and curious might wonder why that is a nondeduced context. Well, consider that to match X with some std::vector<U>::iterator the compiler would have to instantiate vector with an arbitrary number of types (maybe every type in the program!) to see if there is a nested type iterator that matches X. Performing all those instantiations could involve an arbitrary number of partial and explicit specializations of vector and not only would many of those instantiations fail (resulting in errors that must be suppressed via SFINAE) but the compilation would require huge amounts of time and memory. Parsing C++ templates is complicated enough already, so the compiler doesn't even try to perform this particular miracle.

185 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!