Jan 112016
 

Watching the 32c3 conference videos for free (which is relevant), and coming across the inevitable “the Internet is dead”, “corporations have bored the spirit of the Internet to death”, etc. It’s a pretty common meme amongst those who somehow believe that the Internet used to be free.

The Internet was never free, but it did have the appearance of being free.

Of course we have become used to paying for access to the Internet, but that monthly payment to the ISP doesn’t pay for the Internet as a whole. As an example none of the money you pay your ISP reaches me to help me pay for the server this web page is on. Supposedly I can ‘monetise’ your visits by publishing adverts on my web site; in practice it doesn’t. At least not for low traffic sites.

And things like Facebook or Twitter do cost lots of money to run; enough that many of the large successful companies took a long time before they became profitable.

Of course I’ve been concentrating on the monetary meaning of “free” but this applies to a certain extent to the other meaning of free – you can’t post content to Facebook that they don’t agree with (although in practice very little is censored with the main victim being pictures of breastfeeding). A company like Facebook is in this game to make money and whilst they are not going to censor your content for no reason, neither are they going to fight too hard for your free speech.

In the end you can only exercise your freedom of speech on your own servers. But with the exception of a few weirdos like me, most of us are not keen on running servers.

All normal people want to do is run an application that lets them “do stuff” and the conventional way to implement an Internet application is for an application running on the person’s desktop to speak across the Internet to a server – for example the web works this way. The big problem with such an approach particularly when something like Facebook becomes almost ubiquitous is that you are giving a large central organisation a lot of data about yourself.

Of course everyone who is not up to anything nefarious is not bothered by that, right? Well perhaps, but there are other aspects of sending all your data to a company who desperately needs to monetise your data and your eyeballs. Such as targeted advertising. And worse.

The conventional way. There are of course what could be called unconventional applications that communicate across the Internet without a centralised server managing it all. These are commonly called “peer-to-peer” (or P2P) applications and are commonly used to share files; very commonly files that the copyright owner would rather not be shared (films, applications, music, etc.). So P2P has a bit of a rogue reputation.

But it is merely a means for communicating and does not dictate what is communicated. There is nothing to stop someone from implementing a P2P-based application that communicates “posts” that are the equivalent of Facebook posts. Such an application :-

  1. Would continue to use the web browser as a display engine.
  2. Run as a separate “service” on the desktop to send and receive P2P posts in the background; displaying relevant ones on request.
  3. Automatically encrypt all postings so that they can only be decrypted by the relevant audience. Keep the automatic encryption hidden to avoid scaring those who just can’t be bothered with all that.

Of course as I am not going to be writing this (I simply don’t have the time), I have no right to say how it should be written! But writing such an application would be very beneficial if we could persuade people to use it rather than the monolith that is Facebook. Unlike some people, I don’t believe that Facebook is intentionally evil, but because of the centralisation of social networking in the hands of Facebook, it has the potential to be evil.

Those who want the Internet to be free (as in freedom) need to put their money where their mouth is and write the code.

Rusty_Padlock

 

 

Jan 052016
 

A bit of a simple one this … if you are looking at converting an Intel hex format file that looks like the following :-

2016-01-05_2123

Then it is relatively trivial under Linux (Debian). The relevant tool is probably installed anyway; unless you are not compiling software which may be a marginal activity for weird people but so is converting ihex files. But just in case, you can install it with: sudo apt-get install binutils.

Once installed (or being already present) the conversion process is as simple as :-

» objcopy -I ihex -O binary somefile.hex somefile.bin

Be careful to specify the second file name or objcopy will overwrite the original hex file (don’t ask how I discovered this!).

Dec 112015
 

There is a chemical (Diacetylsometimes found in the liquid that e-cigarettes use (or e-liquid for vaping), and there is a new “scare” about it’s presence in e-liquids. Which is hardly new news to serious vapers.

Nobody has demonstrated that diacetyl is dangerous in e-liquids.

What has been demonstrated is that diacetyl (which is very commonly used in the food industry as a flavouring) can potentially cause a condition called “popcorn lung” in people working with powdered diacetyl. It is obviously a very serious condition, but is also very rare.

Finding diacetyl in e-liquids is obviously not good, but it has been known about for at least a year and most respectable manufacturers are changing to alternative flavourings. What is not mentioned in the mainstream media is that smoking results in 10-100 times as much diacetyl being inhaled – if the potential for diacetyl in vaping is bad, then the certainty of diacetyl in smoke is worse.

Should e-liquid manufacturers stop using diacetyl? It is not certain that diacetyl in e-liquids is harmful, but it makes sense for manufacturers to remove it – which is what many of them have been doing!

Should vapers give up and risk going back to smoking? Well, no of course. Even ignoring all the other health risks associated with smoking, the risk associated with diacetyl is almost certainly far greater with smoking than with vaping.

Should vapers choose e-liquids that do not have diacetyl? That makes a great deal of sense, and there are plenty of choices out there.

To use a phrase used elsewhere: The safest way to vape is not to vape at all. But it doesn’t make sense to stop vaping if that puts you at risk of going back to smoking.

Bystanders? Worry about diesel pollution first.

And you don’t have to believe me; there are plenty of others suspicious of the new study :-

 

Dec 102015
 

damascus-unix-prompt

You have a a column of numbers that you have produced in some manner such as :-

$ awk '/clean message/ {print $(NF-1)}' mail.info.log
...
100935
12197
3606
84653
4498
99110
4762
3001
10889
12611
12249
12245
136599
49097
6668

And you want a quick and dirty way of finding the largest number. Well there is a way but it is perhaps the least efficient way to do it, and that is to sort the numbers into numerical order and use “head” to display the first one :-

$ awk '/clean message/ {print $(NF-1)}' mail.info.log | sort -rn | head -1
5476168

But frankly there must be a better method. And yes there is if you happen to be using zsh (or possibly others, but this has been tested with zsh). Simply iterate over the values assigning the current value to the “max” variable if the current variable is larger :-

$ max=0; for x in $(awk '/clean message/ {print $(NF-1)}' mail.info.log); [[ $x -gt $max ]] && max=$x; echo $max
5476168

You may be wondering why I don’t simply use the ability of awk to perform calculations. Well that is certainly possible, but I may not always be using awk to produce the numbers in the first place, and this is supposed to be a generic recipe.