Search Results: "jr"

10 December 2007

Simon Richter: IDL and automake

I'm thinking about hacking a wrapper around the compiler (or libtool) that handles compiling IDL files and linking against the proxy/stub code. Automake would have to be taught that when an IDL file is listed in the sources of a program or library, the compiler call needs to be replaced (thus doubling the number of variants again (to eight: C/C++, simple/libtool and with/without IDL), which adds a certain amount of complexity (but hey, we're talking about automake), and, more difficult, we'd have to handle source files that live outside the build tree (or make people use small IDL files that include the files that define the necessary interfaces -- but that is ugly).

Simon Richter: At large

It seems that -- again -- I've managed to catch something nasty on the way back (probably I should only check in my coat if I know that it won't take long until boarding). So, two days later than anticipated, I am officially back and working. I have yet to clear the autobuilder backlog of the last three days (these ARM boxes are blazing fast these days; and a lot of packages failed due to GNOME being uninstallable) and also catch up with the real world (I turn off my phone when I have a migraine attack, keeping a log of calls but this time there's just a batch of unknown numbers with some calls having dropped off the list already -- please send emails instead of calling if it is important, there is a reason why I don't use my phone for business). In other news, this posting needs paragraphs.

2 December 2007

Simon Richter: Obvious

My flight got delayed. There is still a slim chance I will be home before midnight. Having a laptop would definitely be an advantage.

30 November 2007

MJ Ray: Stupidity: PHP's Standard Sub-standard Approach to SQL

I'm just fixing another customer web site where the reported bug was something like
"when I put a customer password that includes an apostrophe into the web form, the site returns an error message"
and in the PHP source code I found something roughly similar to
"insert into customers values ($id,'$username','$password')"
(no, I didn't write the site - I'm doing ad-hoc support on it). Now, I realise that there are times when you want to send particular SQL instructions to the database and I know there are 1001 modules for tieing databases to variables, but it is still a problem that PHP's basic standard approach to SQL is to shove strings around and even today, with the dangers well-known, many PHP coders will interpolate unsafe user-submitted variables into them. It's enough to make a meltdown imminent. Surely no-one ever thought it was a feature?

29 November 2007

MJ Ray: Using a mobile phone to replace a laptop on short business trips

I don't feel like carrying the 3kg laptop around on short trips of a day or two any more (I must be getting old), so I'm pondering replacing my ancient Motorola Timeport mobile phone with one that runs Java applications like mujMail and MIDPssh. My servers are mainly ssh2 and IMAP+TLS IIRC. If it uses bluetooth and I get a headset and a dongle, I think I'll be able to use the headset with the softphone at home too, instead of the cheapo yealink test handset which has stuck around far too long. I'm looking at the Samsung E250 or the Ericsson K608i, for various reasons. I think I'll need to unlock whatever I get, as I hop between Orange and T-Mobile. Are there gotchas to doing this? How much free software can they run? How have you found mobile-phone travel for hackers, or why do you still carry a laptop everywhere? (2007-11-30: 7 comments)

MJ Ray: Installing a web application with its CPAN dependencies

I fully expect to be told that this is Evil, Bad and Wrong, but what are the drawbacks of moving a MakeMaker tarball into the local cpan download tree and using CPAN::install on it like this? Other than the usual hackiness-problems with that early draft, I can't see a blocking problem with it. The CPAN shell handles the dependencies. (Don't worry, the eventual debian package will use dpkg to install the dependencies.) (2007-11-29: 1 comment)

28 November 2007

Simon Richter: Boarding time

For those of you wondering why I'm not in Madrid yet, it is a long story.

24 November 2007

Michal Čihař: I hate this system

My girlfriend has to use Windows, because university she studies does not give her another option. Now she got some crap on which she should do some statistics. This crap is being called SAS. I have not yet seen how does it look like, but I already enjoyed funny hours with it's installer. As I'm currently on the other side of world, I have to do all remotely... The basic problem is simple: I do not have much space on C: drive and it does not provide option to install on another drive. First she tried to install it herself, the setup fucked up so much, that it deleted NTLDR and friends from root folder, so Windows didn't boot up again. Fortunately there is also Debian on that machine, so she booted to it, I installed ntfs-3g and restored needed files from Windows XP installation CD (the recovery console did not work, don't ask me why). So great, after about one hour we have back working Windows! Now I still did not have idea what is the problem. However the failure appeared when the crap was trying to install some special JRE it has included. When I started the installer for this JRE manually, it showed that there is not enough space. Why the hell did not the original installer show this? Well I did some cleanup on the disk and I got 1GB of free space. Hope that it will be enough. No. Somewhere near 58% installation is fucked up again with error -2147483648. Wow nice number! Looking at disk space, it's down to few kilobytes. So again the same problem! Okay, let's clean it up more and hopefully installer will resume. But I should not hope for anything good from this installer. The only option it now gives me is to reboot. Reboot, start again installer and let's see what will break this time. Now it found out that some Microsofts runtime is missing. Why it was not missing last time? Okay, let's install it and (of course) we need another reboot. System started up, installer launched and it seems to go on quite well, only the last few percents are taking incredibly long, but the crap seems to finally installed and it even runs! Few questions: Why they do not check for required space in installer? Why do they force me to disable anti virus during installation? Why does not remote desktop from Windows work? Why is there such mess in Windows, especially in Windows folder? Why are temporary files located all over the disk? As last but not least thing I would like to thanks everybody who made ntfs-3g and VNC work, I would never fix this without these tools.

21 November 2007

MJ Ray: National Issues / Privacy, Lies and Government

On the same day that the government apologised for losing discs containing names, addresses, bank accounts and other details for nearly half the UK population, it was also revealed that another government agency has started demanding hand-over of encryption keys, like what seems to have happened to Hushmail but worse.

So, only the government really has security and privacy now in the UK, but it has failed to keep things private and secure!

What a great day that shows why we must support the Data Protection Act, repeal the RIPA at long last and campaign for a no2id.

Oh and privacy laws must apply to private companies like facebook (under investigation) and be understandable by the general public because leaving it to current user agreements isn't working.

20 November 2007

MJ Ray: Freedomware Gamefest

Ben Green of Bristol Wireless Cooperative told me about the Freedomware Gamefest which might interest some people...

MJ Ray: ASTEFAQ: Will I get the BBC on the Costa Blanca with a small dish?

CHRISTOPHER MCKINLEY asked:
"I live on the costa blanca spain. I have been told that bbc and itv are to start broadcasting a free to air service which we will be adle to pick up on a small dish. It's scheduled to start in Feb/March 2008. Could you tell me if this is true?"
No, I can't tell whether that's true. The BBC/ITV Freesat service is expected to start in 2008 and I think March is meant to be when Channel 4's Sky encryption contract finishes, so I guess that's where that date comes from. That seems highly probable to me. Then again, Freesat has been advertised as launching in 2006 before. However, I doubt that BBC and ITV will move off of the Astra 2D spot beam that they moved to when they went free-to-air and back to the wider beams needed for small dish reception on the Costa Blanca. So, it will still not work for you. Sorry. (I'm not too cross about that, because the main terrestial Spanish channels seem to be encrypted on satellite.)

15 November 2007

Simon Richter: Android

Wouter, I had a different association.

MJ Ray: What are you doing with pingback splogs?

Is anyone else getting pingbacks from sites consisting entirely of formulaic posts like
"/foo/ /posted-phrase/ today on /title/ - here's a /summary-phrase/ : /quote/"
? I've been rejecting that style of comments because I think sooner or later those sites will be identified as sploggers (spam bloggers) and get penalised in site ranking systems. Another alternative is that once they build enough links, they'll start linking to their paymasters or replace the site with less mundane content. It's a tough call - I've only been seeing such sites for about a month and I usually like the idea of turning spammers to our own ends and these do increase a site's comment count and relevant link network - but I'm a bit worried how these will turn out. Have you seen this style of comments? What are you doing with them? (2007-11-15: 1 comment)

14 November 2007

MJ Ray: Online Banking with GNU/Linux...: Inteligo, ING Bank (both PL)

Added: Inteligo (PL) Noted: ING Bank (PL) exploit published on hacking.pl. Sounds bad. Wonder if I should delist ING(PL)? Noted: BBC: Fears over online banking checks - "It's about customer retention rates, user experience and customer satisfaction."

MJ Ray: Enterprise Week 2007: Tuesday, non-existant events

I was in Bristol for other reasons again yesterday (as I was last Tuesday too), so I popped along to the advertised Trade Fair at City of Bristol College - or at least I tried to. If it was running, it wasn't an open door event, apparently. I left the business department some info on Cooperatives-UK and -SW anyway. I'm a bit disappointed with Enterprise Week so far. It clashes with at least two other government-sponsored "Week" campaigns (one of them is Get Safe Online week, which I'll write more about next week) and only business networking groups seem to be pushing it heavily here. I'm reconsidering whether I'm going to go to events on Thursday or Friday as I'd intended. The Social Enterprise People: Opposites Attract is running at Ely tomorrow (Thursday) but I'm a little hazy on when it starts and finishes. Other than that, I've not had any responses to asking what events are happening. Is England not very enterprising in 2007?

13 November 2007

MJ Ray: Looking for Local Tradespeople / Double-glazed Wood Windows

I want to replace my inefficient aluminium-framed double-glazed windows.  I'm fed up with the condensation, bent hinges each year and so on and so forth.  But I really dislike uPVC windows - I had some fitted to my last house and they were a mistake IMO.  With modern treatments, it seems that wood frames should last as long as plastic.

All the advertisers in the local press seem to be selling plastic.  I've had one quote from south Wales, but that's supply-only, not fitted.  Web searches seem to find houses for sale or the typical SEO-spammers and is further confused by plastic "woodgrain" and "replace your wood with our plastic" adverts.

So here's the question: Who offers fitted double-glazed wood-framed windows in the Weston-super-Mare area? 

MJ Ray: Cyclocross: Pijnacker

After the comments on a recent post, at least one reader should be happy that RAI Sport Sat (free-to-air 13e) have a quarter-hour show of last weekend’s third cyclocross World Cup event at Pijnacker from 18:40-18:55 CET today (Tuesday).

12 November 2007

MJ Ray: Get Safe Online and security through obscurity

This is mainly a comment on the BBC report of the Get Safe Online campaign - the campaign seems to have some good advice, such as securing wireless networks (WPA at least now!), and their website is more useful than other gov.uk ones I've seen, but some comments in the report just seem strange, like "a date of birth and address details were enough for someone to set up a credit card in another name" - if that false credit card would affect us, then we need to fix the credit card issuers, not stop posting details online! Trying to hide details is well-known as security by obscurity and it's not much security at all. I'm disappointed if that's a major focus of Get Safe Online's message. What about trust and encryption advice? Also, many people don't have a choice whether our details are posted online. They are already posted by government agencies like Companies House and then that information is bought and republished by private companies. So, we're not adding much to the risk by using social networking. Finally, it's rather amazing that some Secured Web Browsers can't access much of the content on www.getsafeonline.org because of their careless use of Flash and client-side scripting on their site. Are they safe themselves? Get Safe Online will be travelling around the country offering advice on how to stay safe and secure when using the internet. They're in Bristol tomorrow - if I don't feel nearly as bad as this any more, maybe I'll go visit them and see if the reports are accurate.

10 November 2007

MJ Ray: RAAM 2007 and 4 Days of Milan

SLO2 (FTA 13e) is advertising a sports documentary called RAAM 2007 today (Saturday 10 November) at 1630 CET - that might be the Race Across AMerica and there’s no telling what language it will be in! RAI Sport Sat (FTA 13e)
has coverage of the 4 Days of Milan stage from Montichiari to Castellana on Sunday 11 November at 1700 CET. I can’t find this race on the UCI calendar - does anyone know it?

Simon Richter: C and multithreading

Ian Lance Tailor started a discussion that has in the meantime reached Planet Debian via Miry and Giacomo. The single-threaded memory model is the only sane choice for languages that are as close to the "metal" as C and C++ are. For a multi-threaded model to work, the compiler needs to have intrinsic knowledge of "locking", and it needs to emit the appropriate code around all accesses to variables that cannot be accessed atomically (which also means that signal handling does not work — the signal might arrive in a critical section). Java uses such a model. In the language, there is the "synchronized" keyword, which can be used either as a modifier on a method definition (locking the object the method is called on), or before a block (locking an explicitly specified object). The lock is recursive, so calling another "synchronized" method on the same object works fine, leaving the last one finally unlocks the object. Memory consistency is achieved by flushing the object before unlocking (so accessing an object that another thread may use without locking it is still undefined behaviour — but class authors can avoid that by allowing access only through "synchronized" methods). I doubt we want the same in C/C++. For one, it adds a recursive lock to each instance of a class or struct, whether needed or not, since the compiler cannot rule out that some code might want to use this object as a lock. Also, the object inclusion and inheritance rules are quite different, as Java does not have inclusion, and only allows simple inheritance. Basically, if I were to emulate Java's rules, I'd need a "virtual" base class to provide the lock, which is a lot of extra overhead since every derived class now needs to keep the offset to the most derived class. The other two big show stoppers are the "intrinsic" knowledge of locking that the compiler must have (it needs to know how to embed a recursive lock into an object, which is an operating-system dependent structure as it stores some thread identifier for the current holder of the lock) and that it becomes a lot more difficult to write signal handlers, as you need to avoid any code that might implicitly lock some object (which is true already, but there is no implicit locking). Java can do that, as they have a virtual machine that provides locking primitives and object lookup (so they can keep the lock separate). There is a change to the memory model I'd like to see though: the concept of an I/O buffer that behaves like regular memory (so load/store coalescing/reordering is allowed), but will be flushed before volatile accesses and re-read afterwards (optionally, with finer grained control). This would work for both hardware accesses (where the volatile access triggers some hardware) and for "hosted" environments (where the compiler assumes that system calls perform volatile accesses), and still allow most optimisations like writing in the hardware's natural bus width. If you want to write reliable multi-threaded code with current compilers, there are two simple rules:
  1. any data structure shared by multiple threads needs to be marked volatile
  2. any access to a shared data structure needs to be guarded by a lock
The accesses to the shared data structure are ordered with regard to the locking functions and cannot be optimized out, which is exactly what you want. The appropriate mental model is that anything that is not declared volatile (or handled by a platform locking primitive) cannot be seen by the other threads.

Next.

Previous.