Andy Smith, an internet security chief at the Cabinet Office, said people should only give accurate details to trusted sites such as government ones.He said names and addresses posted on social networking sites "can be used against you" by criminals.
His advice was described by Labour MP Helen Goodman as "totally outrageous".
Ms Goodman, shadow culture minister, told BBC News: "This is the kind of behaviour that, in the end, promotes crime.
"It is exactly what we don't want. We want more security online. It's anonymity which facilitates cyber-bullying, the abuse of children."
(Aside: this image comes from armedrobberyadvice.com ... WTF?)Recently I've had time to work on some C++11 library additions for libstdc++ which had been brewing in my Git tree for months. std::forward_list meets the C++11 allocator container requirements now. std::scoped_allocator_adaptor is 99% complete now. I'm trying to provide std::this_thread::yield(), std::this_thread::sleep_*() and a high-resolution std::system_clock even when GCC isn't built with --enable-libstdcxx-time (with huge thanks to Roland McGrath for help from glibc.) I need to write tests for my implementations of std::wstring_convert and std::wbuffer_convert so I can commit them.
Some stuff I've looked at today:
Mirage, a good reason to learn OCaml.
Parallela, a supercomputer for everyone.
From a few entries down on Advogato's recentlog: the Ada Initiative is running a fundraising campaign, you should donate.
I hate Istanbul airport.
The GCC checkin policy requires a ChangeLog entry for each change, and that entry is usually also used as the commit message. I used to use a fairly crappy, homemade vim plugin to extract the first entry from a ChangeLog file into the editor buffer to use as the svn commit message. I decided to replace that vim plugin with a Git prepate-commit-msg hook that automatically prepares the commit message for me by extracting the first entry from each ChangeLog that is part of the commit.
As a cursory web search didn't find anything similar, I'm posting it here in case it's useful to anyone else.
$ cat .git/hooks/prepare-commit-msg
#!/bin/bash
#
# Hook script to prepare the commit log message from the first
# entry in each modified ChangeLog being committed.
set -e
[[ "$2,$3" == 'merge,' ]] && exit
tmpf=$(mktemp)
awk -f $0.awk $(git status -s | awk '/^M .*ChangeLog/{print $NF}') > $tmpf
sed 1d $1 >> $tmpf
mv $tmpf $1
$ cat .git/hooks/prepare-commit-msg.awk
# When there is more than one ChangeLog in the commit, precede
# the entry by the directory name.
FNR == 1 && ARGC > 2 {
printf "%s:\n\n", gensub("/ChangeLog$", "", "", FILENAME)
}
# Save the first line until we know if we want to print it.
FNR == 1 {
line1=$0
}
# If second line is blank there is only one patch author, omit it.
FNR == 2 && /^$/ {
}
# If second line is not blank there are multiple authors, print them.
FNR == 2 && /^./ {
print line1
}
# Stop processing the file at the next entry.
FNR > 3 && /^20[1-9][0-9]-[0-1][1-9]-[0-3][0-9] / {
nextfile
}
# Otherwise, just print the line.
FNR > 2 {
}
In response to repeated claims that Clang has far better diagnostics than GCC I decided to re-run some of the tests on the Clang Expressive Diagnostics page (which uses the ancient GCC 4.2 release that Apple still use) to show how much GCC has improved. The results are at Clang Diagnostics Comparison in the GCC wiki. Enjoy.
I've finally drunk the git kool aid. I'd tried it before, but didn't inhale. Maybe I'm just feeling the effects of that cocktail of mixed metaphors but I really like it.
No more manually copying files between my home machine and my netbook (which isn't big enough or strong enough to handle a whole gcc subversion checkout, let alone the whole git repo) so I can work on the train. And I've already created about one new local branch a day in my gcc clone, so I can juggle fixes for several different PRs at once without constantly applying and reverting patches to my svn working dir.
I signed up to github so I can easily fork other people's repositories and send pull requests via the web interface, but decided to use gitorious for hosting some of my own projects. I like that gitorious itself is open source, but unfortunately ... it just doesn't work as well! I don't mind occasional weird rendering bugs on the web pages, but now I can't push/pull anything, due to an ssh error that didn't happen previously. Ho hum, I'll stick with it for a while yet. Github, on the other hand, is pretty damn slick.
char raw[] = R"#(s/"\([^"]*\)"/'\1'/g)#";
which is equivalent to:
char yuk[] = "s/\"\\([^\"]*\\\"/'\\1'/g";
only without suffering from leaning toothpick syndrome.# in the example can be (almost) any sequence of zero or more characters acting as a delimiter. The example above requires a non-empty delimiter because the string contains )", which would be taken as the end of the raw string otherwise:
char raw[] = R"(s/"\([^"]*\)"/'\1'/g)"; // ERROR!
"" as the delimiter sequence, as a nod to Python
char raw[] = R"""(triple-quoted for great justice)""";
broonie asked what's wrong with switch statements?
The default behaviour of switch statements is broken, it's too easy to forget a break and introduce a fall-through bug. That's harder to do with the if-else-if-else form.
Breaking after each case should have been the default and continue should have been required to explicitly fall through. It wouldn't even have needed a new keyword.
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!