Planet Linux Australia

Syndicate content
Planet Linux Australia - http://planet.linux.org.au
Updated: 14 min 30 sec ago

David Rowe: Codec 2 and GMSK over VHF Radio Part 1

Thu, 2015-02-05 16:30

In the previous post comparing GMSK modem algorithms, I had some results suggesting we can build a Codec 2 VHF “mode” that outperforms legacy analog FM by 10dB (that’s a factor of 10 in power). It seemed to good too be true. So for the past few weeks I’ve been working with Daniel, VA7DRM, to test these ideas using real radios.

The Experiment

Starting with the “ideal” GMSK modem I developed in the previous post, I added the various building blocks required to make it operate over a real radio channel. For example initial frequency offset estimation, timing estimation, fine frequency and phase tracking, and frame sync.

Meanwhile, over in Canada Daniel has set up an experimental system to enable testing the modem over real radios. Here is a block diagram and photo:

We use a multi-mode 2M radio as the transmitter. We use it in SSB mode to play the GMSK modem signal over the air. In this mode, it’s up-converting the GMSK modem signal from a low IF of 1500Hz to 146 MHz. The GMSK modem signal is about 1200Hz wide, so fits neatly in the SSB radio passband.

We don’t use the radio in FM mode for GMSK as my work in the previous post shows that is how you build a crappy GMSK modem.

The tx is switched to FM for sending FM test signals. The SNR of the system is adjusted to be exactly the same for GMSK and FM.

A RTL style SDR dongle is used as the receiver in both modes. By adjusting the rx gain we can set up the SNRs we require to perform our tests. The gmsk.m GNU Octave simulation pops out a file of errors that can be used to simulate Codec 2 over this channel. The end result is we can listen to Analog FM and Codec 2 over GMSK for a range of channel SNRs.

I send a fixed frame of test data over the GMSK modem rather than Codec 2 data. A fixed frame makes it easier to measure bit error rates and do frame sync. I XOR the transmit an received bits to get an error pattern which can be used to simulate the exact effect of those bit errors on the Codec 2 bit stream. I actually cheated and used the 1300 bit/s Codec 2 mode instead of 1200, as it’s somewhat more robust to it errors. This is worth 0.35dB over the channel.

Here is a spectrogram (sideways waterfall) of one of the test samples from the SDR:

The GMSK signal is centred on 1500 Hz on the left. On the right is the FM signal, centred on a 12 kHz carrier. The FM signal is about 16 kHz wide, so we needed a higher centre frequency. First we send a 1000 Hz test tone, after FM modulation that produces the lines you can see in the FM spectrum. Then we switch to a sample of Daniel’s voice. That’s the fuzzier FM signal, as the carrier is bouncing all over the place.

The keenies will notice a small bit of DC at the lower far left hand side. That’s the nasty DC offset you get from SDR radios when the IQ balance is a bit off. It fades away as we nail it with a high pass filter. If it’s too high it upsets our GMSK demod.

If we average the spectrum over the entire run we get:

Note how much narrower the GMSK signal is than FM. This sample is for the C/No=43dB run in the table below.

Results

To measure SNR requires a known noise bandwidth (e.g. 3000 Hz is common for HF SSB). However the bandwidth of the GMSK and FM signals is different. If we used a 3000 Hz noise bandwidth the FM signal wouldn’t fit. We could measure SNR using a 16 kHz bandwidth for both signals. However another way is to measure the noise using a 1 Hz noise bandwidth. This is known as C/No, or the carrier power divided by the radio channel noise power in a 1 Hz bandwidth.

The GMSK modem is about 1.5dB off theoretical performance. This is not bad, as it takes into account imperfections with the modem algorithms (e.g. errors in timing and phase estimation) and the experimental SSB radio/SDR signal path (e.g. SSB transmit filter, PA non-linearities). The FM demod software gives us a SNR about 3dB worse than theoretical FM demod performance for a given input C/No, possibly because of a non ideal FM modulator or perhaps under deviation. Once again, that’s acceptable.

Here are the results. Warning – turn down your volume control! The first FM sample is just loud noise. There are a few odds errors with the Codec 2 sample, e.g. it gets “four” wrong, possibly due to clipping of the input sample, or maybe a pitch estimation error. Must look into that some time, sure it can be fixed. Too busy playing modems lately!

C/No Analog FM Codec 2 BER Speex 35.5 Listen Listen 0.035 n/a 37.2 n/a Listen 0.008 n/a 43 Listen Listen 0.00 n/a 53 Listen Listen 0.00 Listen 63 Listen Listen 0.00 n/a

In these tests, Codec 2 is working at a much lower C/No than analog FM, with the system gains predicted gains in the previous blog post. Codec 2 starts to deliver intelligible speech (with some errors) at a C/No of 35dB. By 53dB FM is sounding better (although still noisy), so I estimate the cross over point at 48dB, a 13dB gain for the Codec 2/GMSK system over Analog FM. I suspect we also have a similar system gain over 1st generation, closed source codec VHF digital voice systems like DSTAR and DPMR.

I am interested in your thoughts on the relative speech quality, please feel free to comment. The FM samples sound a bit noisy to me, but Daniel thinks they are about right.

There are a lot of knobs we can twiddle with this spare system gain:

  1. The Codec 2 speech quality could be improved with some more work.
  2. We can do 2 channel, no diplexer TDMA for a 3dB hit in C/No (as we would need to double the bit rate).
  3. We can cover a much larger geographical area. IIRC radio waves get attenuated by 6dB as the distance doubles. So a 12dB gain is 4 times the range, which (Area = pi*r*r) means about 16 times the area for the same power. That would help repeaters, developing world, and emergency communications networks.
  4. We can change the Codec bit rate as the channel C/No improves. Who says the speech quality has to remain static under all channel conditions? For less C/No than required by current FM systems we could run a 8000 bit/s speech codec like Speex (see sample above). A little bit higher and it could sound like Skype (using Opus). Wideband audio on your HT anyone? Or mobile in your car?
  5. We can use power control like cell phones, e.g. tell the far end to back off the tx power. Saving battery and RF interference. Would be really useful for ad-hoc mesh networks too (managing the hidden transmitter problem)

Help Us Change VHF Voice Forever!

The key to our improvements is “we own the stack”. Codec open, modem open, protocol open. No one telling us where we can and can’t experiment. We are only limited by imagination and the laws of physics. By we I mean you – it’s open source.

Two guys half way around the world from each other are working on improving VHF voice by a factor of 10. With second hand laptops running open software, a $20 SDR dongle, Ham Radio, good modem design and a little foil.

This is a once in 100 year opportunity. We really need some help, e.g. VHF radio front end design, Octave refactoring, Octave to C porting, GUI C/C++ coding (also see list of tasks at the end of this post). It’s fun and rewarding work. Do you want to be a part of it? Please email me.

If you can’t contribute technically, here’s the donate button:

Donation in US$:

It all helps! Thanks.

Craige McWhirter: Craige McWhirter: Attaching Multiple Network Interfaces and Floating IPs to OpenStack Instances with Neutron

Thu, 2015-02-05 14:28

There are a number of use cases where you may need to connect multiple floating IPs to existing OpenStack instances. However the functionality to do this is not exposed via the Horizon Dashboard. This is how I go about attaching multiple network interfaces and floating IPs to OpenStack instances with Neutron.

Assumptions:

Port Creation and Assignment

When you have your environment sourced appropriately, get a list of networks for this tenant:

% neutron net-list +--------------------------------------+--------------+-------------------------------------------------------+ | id | name | subnets | +--------------------------------------+--------------+-------------------------------------------------------+ | 85314baa-a022-4dd1-918c-a73c83c8cad6 | ext-net | 9248bc58-6cfe-4ff8-b33e-286a60c96c6d 999.999.999.0/23 | | ee31dc0e-e226-423d-a7fe-f564dc17614e | DemoTutorial | 5821de82-3843-46ce-a796-c801bf40fd4c 192.168.71.0/24 | +--------------------------------------+--------------+-------------------------------------------------------+

We're interested in the non-external network. In this case "DemoTutorial". I normally set this to $OS_NET. Now we can create a new port on that network.

% export OS_NET=ee31dc0e-e226-423d-a7fe-f564dc17614e % neutron port-create $OS_NET Created a new port: +-----------------------+---------------------------------------------------------------------------------------+ | Field | Value | +-----------------------+---------------------------------------------------------------------------------------+ | admin_state_up | True | | allowed_address_pairs | | | binding:vnic_type | normal | | device_id | | | device_owner | | | fixed_ips | {"subnet_id": "af150a1e-067a-4641-89a4-24c5b6b8fe3b", "ip_address": "192.168.71.180"} | | id | fd2f78df-cf78-4394-84eb-9e37ed1e5624 | | mac_address | fa:54:6e:f2:ce:a9 | | name | | | network_id | ee31dc0e-e226-423d-a7fe-f564dc17614e | | security_groups | b1240686-7ad9-4d29-a679-d219f76648ca | | status | DOWN | | tenant_id | abcd639c50804cf3end71b92e6ced65e | +-----------------------+---------------------------------------------------------------------------------------+

We now need to note the id or as I do, assign it to $PORT_ID. Next we fire up nova. I'm going to assume that you know either the instance name or ID and have assigned it to $INSTANCE.

% export PORT_ID=fd2f78df-cf78-4394-84eb-9e37ed1e5624 % export INSTANCE=3c7ae1b9-8111-4f15-9945-75e0af157ead % nova interface-attach --port-id $PORT_ID $INSTANCE

You should now have successfully added a second network interface to your OpenStack instance. Let's double check that:

% nova show $INSTANCE | grep network | DemoTutorial network | 192.168.71.180, 192.168.71.181

Great! Now you have two internal IP addresses, one for each port assigned to that tenant.

Assigning Floating IPs

You can now add floating IPs either via the Horizon Dashboard or via the neutron client. I'll cover how to do this via the CLI. Fire up neutron, locate the original port and assign it's UUID to $PORT_ID0:

% neutron port-list | grep 192.168.71.181 fa:46:7e:21:4f:f3 | {"subnet_id": "8f987932-48ee-4262-8b44-0c910512a387", "ip_address": "192.168.71.181"} | % export PORT_ID0=8f987932-48ee-4262-8b44-0c910512a387

Then we get a list of available floating IPs and assign those to variables too:

% neutron floatingip-list +--------------------------------------+------------------+---------------------+---------+ | id | fixed_ip_address | floating_ip_address | port_id | +--------------------------------------+------------------+---------------------+---------+ | 390e4676-0e05-40c3-9012-e5d27eb85dbe | | 999.999.999.123 | | | 16f7ca27-1d11-4967-9f0c-04f578590b01 | | 999.999.999.124 | | | f983b10d-454c-4c19-8f65-d9b96c4d7aa6 | | 999.999.999.125 | | +--------------------------------------+------------------+---------------------+---------+ % export FIP0=16f7ca27-1d11-4967-9f0c-04f578590b01 % export FIP1=f983b10d-454c-4c19-8f65-d9b96c4d7aa6 % neutron floatingip-associate $FIP0 $PORT_ID Associated floating IP 16f7ca27-1d11-4967-9f0c-04f578590b01 % neutron floatingip-associate $FIP1 $PORT_ID0 Associated floating IP f983b10d-454c-4c19-8f65-d9b96c4d7aa6

We can then verify this assignment:

% neutron floatingip-list +--------------------------------------+------------------+---------------------+---------+ | id | fixed_ip_address | floating_ip_address | port_id | +--------------------------------------+------------------+---------------------+---------+ | 390e4676-0e05-40c3-9012-e5d27eb85dbe | | 999.999.999.123 | | | 16f7ca27-1d11-4967-9f0c-04f578590b01 | 192.168.71.180 | 999.999.999.124 | | | f983b10d-454c-4c19-8f65-d9b96c4d7aa6 | 192.168.71.181 | 999.999.999.125 | | +--------------------------------------+------------------+---------------------+---------+

For good measure you can double check how Nova sees this assignment:'

% nova show $INSTANCE | grep network | DemoTutorial network | 192.168.71.180, 192.168.71.181, 999.999.999.124, 999.999.999.125

You're done :-)

Arjen Lentz: Scientists pledge to increase interference with the Church | The Guardian

Thu, 2015-02-05 14:25

Dean Burnett: If the Church can interject on scientific matters, surely scientists can interject on religious ones?

Related Posts:
  • No related posts

Donna Benjamin: For people who use the web

Thu, 2015-02-05 12:27
Thursday, February 5, 2015 - 11:48

 

Accessibility matters. For everyone. For those of us who build the web, and for those who use it too. All of us.

Here's some great resources that caught my attention in recent days.

Anne Gibson writes that "Web accessibility means that people can use the web." in an article on List Apart about Reframing Accessibility for the Web. It's really good. She advocates creating a test matrix for accessibility and putting the focus back on the technology available, rather than the abilities of the people who use it. This is strong, clear practical advice we should all consider.

Jeremy Fields has repurposed the WCAG and WebAIM reccomendations to create an Interactive WCAG guide. This makes it easy to link to a specific principal or guideline. 

Ollie Campbell highlights some of the ways that older people use the web, and digital devices is different to how young people do, and to be mindful about our assumptions when designing for the elderly.

Discovering these resources pushed me to reframe some recent conversations about meeting accessibility guidelines.  We often get stuck debating compliance details, when really we should be thinking about setting our content free as flexibly and cleanly as possible.  We're not just ticking boxes.  At least, I hope we're not.

Drupal is one of the best content platforms for web accessibility, but it still has shortcomings. Unfortunately, many people who lack the deep understanding of what makes accessibility important still build sites that don't meet WCAG guidelines.  I think it's up to all of us to spend a bit more time getting up to speed on the intricacies, and build it into our practice, and not just meet those guidelines, but exceed them!

[Image from from the W3C's Web Accessibility Initiative Guidelines and Techniques page - Read a description of this image ]

Update 6 Feb: Included Ollie's article on designing for the elderly. 

Clinton Roy: clintonroy

Tue, 2015-02-03 20:28

After a very early start, walked to work.

Had a doctors appointment in the evening.

Basically collapsed into bed quite early. Had half an hour of sleep before waking up from a bad dream.



Filed under: diary

Clinton Roy: clintonroy

Tue, 2015-02-03 20:28

Did a few conference things.

Caught up with a dear friend for dinner.



Filed under: diary

Clinton Roy: clintonroy

Tue, 2015-02-03 20:28

Humbug day, with both the lca debrief and the election, double excitement! Unfortunately my partner in crime, Russell, had to attend to an emergency situation and couldn’t stay for the debrief, a large part of the enjoyment I get out of the debrief is disagreeing with Russell. Fortunately Tomas stepped in and added a great deal of information including a number of talks that I never would have bothered looking at, which is after all the entire point of the debriefs.



Filed under: Uncategorized

Jonathan Adamczewski: What’s the difference between 0xffffffff and 0xffffffffu?

Tue, 2015-02-03 10:27

In C++, what is the difference between 0xffffffff and 0xffffffffu?

This one’s pretty easy to answer with this information from the C++ standard:

The type of an integer literal is the first of the corresponding list in Table 6 in which its value can be represented.

0xffffffff is a hexadecimal constant, it’s too big to be represented in a (signed) int, so — by the terms of the standard — the type of 0xffffffff is unsigned int.

Furthermore, each of these hexadecimal literals will have a different type:

0x7fffffff // int 0xffffffff // unsigned int 0x1ffffffff // long int (or long long int) 0x1ffffffffu // unsigned long int (or unsigned long long int)

But to answer the original question, there is no difference between 0xffffffff and 0xffffffffu apart from this:

@twoscomplement One is a commonly used curse when the compiler screws up.

— Colin Riley (@domipheus) January 30, 2015

Stewart Smith: Building OpenPower firmware for use in POWER8 Simulator

Tue, 2015-02-03 10:27

Previously, I blogged on how to Run skiboot (OPAL) on the POWER8 Simulator. If you want to build the full Open Power firmware environment, including the Petitboot bootloader and kernel, you can now do so!

My pull request for an op-build target for the simulator has been merged, so you can now do the following three steps to compile a kernel+initramfs to use with your built skiboot for development purposes:

git clone --recursive git@github.com:open-power/op-build.git cd op-build . op-build-env op-build mambo_defconfig && op-build

Then you wait for a whole bunch of time while everything compiles! Afterwards, you should be left with a zImage.epapr in output/images/ that you can copy into your skiboot directory.

With zImage.epapr in your skiboot directory, when you run “make check”, the skiboot test suite will actually launch the simulator to verify that your skiboot code boots all the way to the petitboot prompt!

We now have two boot tests as part of “make check” for skiboot!

Michael Still: Big Monks

Mon, 2015-02-02 16:28
I'm going to be honest here and say I got this one pretty wrong. Looking at Google Earth, Big Monks is about 1.7 km from the access road (which I got right), what I failed to notice is that it is super steep and that much of the walk is off the trail. So... A walk I thought would take 30 or 45 minutes took 2 hours. I didn't die though, so that's good.



Fantastic views at the top, and found a couple of geocaches. There is obviously a lot of walking potential in Rob Roy Nature Park.



             



Interactive map for this route.



Tags for this post: blog pictures 20150202-big_monks photo canberra tuggeranong bushwalk trig_point

Related posts: A walk around Mount Stranger; Forster trig; Two trigs and a first attempt at finding Westlake; Taylor Trig; Oakey trig; Urambi Trig



Comment

Linux Users of Victoria (LUV) Announce: LUV Main February 2015 Meeting: R / linux.conf.au reports

Mon, 2015-02-02 12:29
Start: Feb 3 2015 19:00 End: Feb 3 2015 21:00 Start: Feb 3 2015 19:00 End: Feb 3 2015 21:00 Location: 

The Buzzard Lecture Theatre. Evan Burge Building, Trinity College, Melbourne University Main Campus, Parkville.

Link:  http://luv.asn.au/meetings/map

Speakers:

• Andrew Robinson, R: A Statistical Package on Linux

• Reports and video from linux.conf.au 2015

The Buzzard Lecture Theatre, Evan Burge Building, Trinity College Main Campus Parkville Melways Map: 2B C5

Notes: Trinity College's Main Campus is located off Royal Parade. The Evan Burge Building is located near the Tennis Courts. See our Map of Trinity College. Additional maps of Trinity and the surrounding area (including its relation to the city) can be found at http://www.trinity.unimelb.edu.au/about/location/map

Parking can be found along or near Royal Parade, Grattan Street, Swanston Street and College Crescent. Parking within Trinity College is unfortunately only available to staff.

For those coming via Public Transport, the number 19 tram (North Coburg - City) passes by the main entrance of Trinity College (Get off at Morrah St, Stop 12). This tram departs from the Elizabeth Street tram terminus (Flinders Street end) and goes past Melbourne Central Timetables can be found on-line at:

http://www.metlinkmelbourne.com.au/route/view/725

Before and/or after each meeting those who are interested are welcome to join other members for dinner. We are open to suggestions for a good place to eat near our venue. Maria's on Peel Street in North Melbourne is currently the most popular place to eat after meetings.

LUV would like to acknowledge Red Hat for their help in obtaining the Buzzard Lecture Theatre venue and VPAC for hosting.

Linux Users of Victoria Inc. is an incorporated association, registration number A0040056C.

February 3, 2015 - 19:00

read more

Jonathan Adamczewski: Standards vs Compilers: Warning C4146

Mon, 2015-02-02 10:27

warning C4146: unary minus operator applied to unsigned type, result still unsigned

I saw this warning recently.

“Aha!” I thought. “A common source of errors, able to strike down the unsuspecting programmer. Thank you crafters of Visual C++ compiler warnings, tirelessly laboring to uncover wrong assumptions and naively written code.”

“What?” I exclaimed. “Of course the result is still unsigned. That’s how the language is designed, and that’s what I wanted!”

Nevertheless, I read the documentation for the warning to see if there was anything I could glean from it — particularly to see if I could find sufficient reason to not just #pragma disable it.

This is what you can find in the documentation:

Unsigned types can hold only non-negative values, so unary minus (negation) does not usually make sense when applied to an unsigned type. Both the operand and the result are non-negative.

Negation of an unsigned value may not make sense if you don’t know what it means — it is well defined. Regardless, this is a level 2 warning. It is designed to catch common mistakes and misunderstandings and notify the programmer to have them look more closely. It may be an entirely reasonable thing to warn about.

The documentation continues with some rationale:

Practically, this occurs when the programmer is trying to express the minimum integer value, which is -2147483648. This value cannot be written as -2147483648 because the expression is processed in two stages:

  1. The number 2147483648 is evaluated. Because it is greater than the maximum integer value of 2147483647, the type of 2147483648 is not int, but unsigned int.
  2. Unary minus is applied to the value, with an unsigned result, which also happens to be 2147483648.

The first point is wrong. Wrong for a standards-conformant C++ implementation, anyway. The second would be accurate if the first was accurate (because 232 - 231 == 231)

Here’s what the most recent draft of the C++ standard says about the integer literal types:

The type of an integer literal is the first of the corresponding list in Table 6 in which its value can be represented.

2147483648 is a decimal constant with no suffix. When using VC++ with it’s 32 bit long int type, the first of the corresponding list in which its value can be represented is the 64 bit long long int. An unsigned type is never an option.

Unary minus should then be applied to long long int 2147483648, which should result in long long int -2147483648. There’s nothing unsigned in this process

Use of the result should behave in an unsurprising way, too — long long int -2147483648 can be assigned to a variable of type int and nothing unexpected will happen. The type can be converted without affecting the value.

According to the standard, the rationale is flawed, and the warning seems pointless to me.

In theory, there’s no difference between theory and practise

So I tried compiling the example program from the documentation to see what would happen.

// C4146.cpp // compile with: /W2 #include <stdio.h> void check(int i) { if (i > -2147483648) // C4146 printf_s("%d is greater than the most negative int\n", i); } int main() { check(-100); check(1); }

The documentation predicts the following outcome:

The expected second line, 1 is greater than the most negative int, is not printed because ((unsigned int)1) > 2147483648 is false.

If I build the program with gcc 4.9.2, both lines print.

If I build the program with Visual C++ 2012, or even 2015 Preview, only one line is printed (as was predicted).

So there is legitimacy to this warning — this is an area that Visual C++ is not compliant with the standard.

Maybe it’s because the standard has changed? I looked at the earliest version of the text available in the cplusplus github repo dating from late 2011, and that has the same rules as quoted above.

I went back further and found copies of the standard from 2003 and 1998, both of which state:

The type of an integer literal depends on its form, value, and suffix. If it is decimal and has no suffix, it has the first of these types in which its value can be represented: int, long int; if the value cannot be represented as a long int, the behavior is undefined.

So it’s a detail that was previously undefined, which means that the compiler is permitted to do whatever it wants. In this case, we’ll get a warning, but only if the programmer has asked for it using option /W2.

The documentation is accurate, and Visual C++ hasn’t kept up with changes in the standard. This shouldn’t be surprising.

Update: long long int was added to the standard as part of C++11. It appears that VC++ has had long long support since at least Visual Studio .NET 2003

So what?

This investigation arose from my reading of Visual C++ documentation in the context of what I knew of a recent draft of the C++ standard. It turns out that these two things are less connected than I had assumed. Unsurprisingly, the Visual C++ documentation describes Visual C++, not the standard.

While it would be nice if deviations from the standard were clearly marked in the documentation, and even nicer if the Visual C++ compiler was consistent with the ISO standard, the reality is that they are not and it is not.

One should always pay close attention to context, which happens to apply as much when reading about the C++ language as it does when writing C++ code.

Sridhar Dhanapalan: Twitter posts: 2015-01-26 to 2015-02-01

Mon, 2015-02-02 01:27

Colin Charles: MariaDB turns 5!

Mon, 2015-02-02 01:25

I stopped working on MySQL at Sun Microsystems in late 2009 (after a lengthy period of garden leave), to join Monty Program Ab, and was greatly anticipating a MariaDB release that we could take to market. The first GA release of MariaDB came out February 1 2010 – MariaDB 5.1.42. Today is MariaDB Server’s 5th birthday!

We didn’t even want to call it GA back then — we referred to it as a “stable” release. We didn’t make our own builds because we figured source code tarballs were good enough; so builds were made and hosted at OurDelta. It took some months (around August 2010) when we moved release notes to the Knowledgebase (which you’ll notice has moved from kb.askmonty.org to its current location) from the old front page wiki install that we had at askmonty.org.

I didn’t go to the first company meeting in Malaga due to having the chickenpox, so my first meeting was the one we did in Reykjavik, Iceland. We did it towards the end of February 2010, and planned it literally in a month – maybe a celebration that we brought 5.1 to market on time, and also to plan 5.2.

Speaking of companies, we were Monty Program Ab (professionally this quickly became MariaDB Services Ab), then SkySQL Ab (via merger), and finally MariaDB Corporation Ab (via re-branding). Shortly before the SkySQL Ab merger, we even have the MariaDB Foundation appear.

Anyway, what have we released? MariaDB 5.1, MariaDB 5.2, MariaDB 5.3, MariaDB 5.5, MariaDB 10.0, MariaDB Galera Cluster 5.5 & 10.0, a special MariaDB 5.5 with TokuDB build and a special MariaDB with FusionIO improvements build. To boot, we also have three client libraries (connectors, if you must): C, Java, and ODBC.

So 5 major server releases (7 if you count the Galera series), and we’re now working on MariaDB 10.1. I count 88 releases of the server across various versions (with breakdowns: 9 alphas, 11 betas, 7 release candidates and 61 GAs). We’ve had 23 Galera releases and 15 releases for the various client libraries.

We are shipping in all major Linux and BSD distributions. In many, we are even the default

This birthday is a nice time to look back at our achievements, but also to remind ourselves to not rest on our laurels and continue to focus on growth. The last sanctioned press release talks of over 2 million users globally. 

Thank you to all our users. Thank you to all the contributors and developers. Here’s to a lot more adoption, growth, releases and technology improvements!

Related posts:

  1. MariaDB 10 – XtraDB & InnoDB versions
  2. MariaDB 5.1.44 released
  3. MariaDB 10.0.5 storage engines – check the Linux packages

Binh Nguyen: Scripting, Electronic, and Musical Experimentation

Sun, 2015-02-01 18:47
A script that I created to save space. It works by using dd to reduce all relevant files to zero size. It contains comments to make it customisable and creates log files just in case something goes wrong.



https://sites.google.com/site/dtbnguyen/mkempty-1.01.zip



Came across one of these during the week. I looked at it, did a bit more research though and found out that the battery was dying, that the company was in trouble, and that no spare parts were being manufactured which meant that you would have to retrofit your own battery from another source if it came down to it (I found out that a HTC ChaCha battery actually fits the physical dimensions required and actually has the characteristics to get the job done. Since, I don't like risking the possiblity of overheating I decided to pass on the purchase. I obviously thought about the chance of fitting an iPod battery in there as well which explains the links... Not enough information available online though regarding physical dimensions.

 http://en.wikipedia.org/wiki/The_Pacemaker

http://pacemaker.net/

http://pacemakerdevice.org/

http://www.cnet.com/au/products/tonium-pacemaker/

https://forum.sparkfun.com/viewtopic.php?f=14&t=28139

http://apple.stackexchange.com/questions/37552/anyone-knows-how-many-mah-in-ipod-touch-4th-generation-battery

https://www.ifixit.com/Store/iPhone/iPhone-Gen-1-Replacement-Battery/IF105-017-1

http://www.engadget.com/2011/12/28/irl-pioneer-kuro-pdp-6010fd-tonium-pacemaker-and-the-samsung-g/

http://www.wired.com/2008/04/pacemaker_portable_dj/



If you've ever wanted a more memorable username to link to your Facebook profile here's some help.

https://www.facebook.com/note.php?note_id=457770375843

https://www.facebook.com/help/329992603752372/



Was working an automatically deployed Amazon Web Services (AWS)/Unified Threat Management (UTM) device/node while I was working on the 'Cloud and Internet Security' report. Don't like leaving things unfinished. Relaunching the project until it's conclusion. It'll be interesting to see whether there is an actual market for these type of things whether for or not for profit. One curious thing is that a lot of information is actually more easily obtained via SNMP and other existing monitoring protocols...

http://forums.whirlpool.net.au/archive/1671024

https://play.google.com/store/books/author?id=Binh+Nguyen

http://www.amazon.com/mn/search/?_encoding=UTF8&camp=1789&creative=390957&field-author=Binh%20Nguyen&linkCode=ur2&search-alias=digital-text&sort=relevancerank&tag=bnsb-20&linkId=3BWQJUK2RCDNUGFY



The following is just a good reference guide...

drum and bass averages a BPM of 160-180

dubstep is around 140 BPM

House varies between 118 and 135 BPM

hip-hop is around 115 BPM

Concert marches are typically ~120 BPM.

Screamers are usually 130-150 BPM

Largo is 40-60 BPM

Larghetto is 60-66 BPM

Adagio is 66-76 BPM

Andante is 76-108 BPM

Moderato is 108-120 BPM

Allegro is 120-168 BPM

Presto is 168-200 BPM

Prestissimo is 200+ BPM (These last according to my Sabine Zipbeat.)

http://music.stackexchange.com/questions/4525/list-of-average-genre-tempo-bpm-levels



Have been doing more research on understanding the concept of 'layering' in song composition. The consensus seems to be that in electronic music (anything that features heavily synthesised sounds), you basically start from percussion/a drumline and then you work your way upwards, adding synths, basses, and so on (you can start the other way around to but if you have sufficient knowledge of percussion but it doesn't quite have that some feeling/sensation to it). You may even start with a pattern of single notes to create a melody and then base your lyrics around that based on what I've read. For this particular reason, I've been looking more into percussion and patterns that are peculiar to each particular (keywords "percussion music pdf" in Google). Some really interesing stuff. I didn't realise that notation in percussion could be 'customised' because there were so many different instruments that were possibly available?



http://web.mit.edu/merolish/Public/drums.pdf (you'll need this to understand the notation)

http://www.virtualdrumming.com/drums/drum-sheet-music.html (none of this will make any sense without an understanding of notation)

http://www.hvogt.de/drums/patterns.html

http://drumbum.com/lessons/drum-lessons/free-drum-lessons/beginning-drums.html

https://www.ucmo.edu/music/bands/media/drumline_audio_parts/UCM%2520DL%2520Handbook%25202012.pdf

http://www.berkleeshares.com/drums__percussion



I took a big look at Dubstep because percussion is a core part of that stype of music.

http://en.wikipedia.org/wiki/Dubstep

http://www.soundonsound.com/sos/jul10/articles/dubstep.htm

http://www.musicradar.com/tuition/tech/14-dubstep-production-tips-178489/

http://www.makebeatsforever.com/top-10-tips-for-making-dubstep/

http://www.makebeatsforever.com/the-ultimate-guide-on-how-to-make-dubstep/

http://howtomakeelectronicmusic.com/how-to-make-a-dubstep-beat

http://www.wikihow.com/Write-Dubstep-Music

http://www.looperman.com/forum/thread/56378

http://ezinearticles.com/?expert=Simmon_Power



------> Huge Guide to Producing Dubstep! <------ br="">https://www.dubstepforum.com/forum/viewtopic.php?t=159713

Dubstep Music Mastering tutorials/tips

https://www.dubstepforum.com/forum/viewtopic.php?t=104330



Obviously, once you have a percussion part that is suitable to he genre of music you can begin to layer up. For instance, think about common elements/instruments/sounds. Layer based on genre, thinking about what you have, what you can adjust, what you can find, what you can create or imagine whether it is via software or hardware... One thing you should know, writing songs isn't really an incremental process. It's like some other things I've experienced in life. Once you hit a plateau and begin to understand the next step, you gain a whole bunch of extra bits and pieces. While you were previously only able to write half a song, now you can write three-quarters of it, or you suddently discover a way to take your sound quality to a completely new level.

http://en.wikipedia.org/wiki/House_music

http://en.wikipedia.org/wiki/Hip_hop_music

http://en.wikipedia.org/wiki/Rhythm_and_blues

http://en.wikipedia.org/wiki/B-boying

http://en.wikipedia.org/wiki/Intelligent_dance_music

http://en.wikipedia.org/wiki/Break_(music)



You listen to enough music (out on the Internet, at concerts/bars/out on the streets, purchasing from retail, etc...) and you basically get the impression that a lot of what is released out there isn't actually all that great (the supposed idea behind the Apple Music Store) which is a good thing and a bad thing. Think in terms of marketing. You name a genre, there is likely a website that is dedicated to that particular style of music. Here's the problem though. Remember the premise of the Apple Music Store. Out of every album you purchase you're only going to like anywhere between one and a maximum of four songs on it (average based on my collection and personal experience). Factor in the fact that the barrier to entry for online music is much lower and you basically have very little chance of making it unless you can churn out consistently good music or else you create the 'song of your life' at some point along the line because that is basically what it will take to rise above the rabble.



The irony is this. By reading, taking courses, and so on... you end up with a baseline knowledge of how to compose but it also means that you may end up with some very formulaic songs. Watch for DJ's, producers, composers, engineers, etc... Just like a person's character there tend to be idiosyncracies in the sound that they produce (whether that may be down to preference, talent, equipment, etc...).



Some websites where you can preview some artists work (not including the usual places such as the Apple Store, etc...)

https://topdeejays.com/

http://www.traxsource.com/top/tracks

http://mixcloud.com/

http://soundcloud.com/

https://www.youtube.com/

https://bandcamp.com/

http://www.beatport.com/

http://www.last.fm/

http://promodj.com/



Nnote that what is House, Chilled, or Lounge over here doesn't necessarily mean the same thing in Asia, Europe, America, etc...

http://promodj.com/top100/djs  http://promodj.com/top100/djs/Russia/chillout/



Some interesting artists/groups/shows I've come across recently...

http://www.djmumbles.com/podcasts.php?screen=0

http://www.youtube.com/user/jaumxito

http://soundcloud.com/fakefunk/

http://soundcloud.com/groups/london-deep-soulful-house-movement/

http://www.beatwinus.fr/

https://soundcloud.com/groups/beat-win-us-radio

http://www.nrj.fr/

http://soundcloud.com/groups/radio-energy-nrj/tracks

http://soundcloud.com/john_soulpark

https://soundcloud.com/jmgrana

Binh Nguyen: Memorable Quotes - Part 9

Sun, 2015-02-01 17:47
A follow on from:

http://dtbnguyen.blogspot.com.au/2014/12/memorable-quotes-part-8.html

- " The pursuit of normality is the ultimate sacrifice of potential. " -- Faith Jegede

http://www.autismspectrum.org.au/content/services-location- "Pride is stupid, but it is necessary"

Jacques Villeneuve is proud to be able to run flat-out through Eau Rouge, 2005http://www.f1technical.net/- "The bottom line is that we need a global financial system that supports stability and growth," she said.

"In too many cases -- from the United States in 2008 to Cyprus today -- we have seen what happens when a banking sector chooses the quick buck over the lasting benefit, backing a business model that ultimately destabilizes the economy."

http://au.news.yahoo.com/latest/a/-/article/16673224/lagarde-says-some-eurozone-banks-may-need-to-close/

- There can be slain

No sacrifice to God more acceptable

Than an unjust and wicked King

-- Seneca, "Hercules Furens"

http://opinionator.blogs.nytimes.com/2013/05/11/in-syria-and-beyond-the-tyrant-as-target/- "What we saw from that is if you're talking about everything all the time, it's harder for the public to distinguish the things that are most important," he said.

http://www.nytimes.com/2013/07/16/us/politics/in-second-term-obama-is-seen-as-using-hidden-hand-approach.html?hp- There's a Chinese saying, "with a new king comes new followers".

http://www.smh.com.au/opinion/politics/i-spy-an-odd-appointment-20120704-21hdu.html- As Karl Marx was one of the earliest to point out, economics (though so much less interesting) is far more important than politics.



Marx considered all political events as epiphenomena. He viewed great men as blind instruments of irresistible forces which they themselves could hardly comprehend.



The Marxist vision of society has been disproved many times, always at epic human cost. However, his doctrine that productive forces propel history has stood the test of time - and is invaluable for an understanding of the current predicament of the European Union.

http://www.telegraph.co.uk/news/worldnews/europe/eu/11286161/The-euro-is-heading-for-disaster-what-luck-for-David-Cameron.html

- "I use Sylenth, one compressor, Ableton Live and its basic effects. I like to keep it super simple. It's actually pretty boring but it works for me and it keeps me making music."

https://illmethodology.com/2014/06/flume-dont-need-gear-via-musicradar/- H.P. Lovecraft

"The oldest and strongest emotion of mankind is fear, and the oldest and strongest kind of fear is fear of the unknown"

- H.P. Lovecraft, Supernatural Horror in Literature

...

"Do we really want to be rid of our resentments, our anger, our fear? Many of us cling to our fears, doubts, self-loathing or hatred because there is a certain distorted security in familiar pain. It seems safer to embrace what we know than to let go of it for fear of the unknown.

(Narcotics Anonymous Book/page 33)"

- Narcotics Anonymous

...

"Sometimes painfully lost people can teach us lessons that we didn't think we needed to know, or be reminded of---the more history changes, the more it stays the same."

- Shannon L. Alder

http://www.goodreads.com/quotes/tag/fear-of-unknown

- C. JoyBell C.

"You will find that it is necessary to let things go; simply for the reason that they are heavy. So let them go, let go of them. I tie no weights to my ankles."

- C. JoyBell C.



C. JoyBell C.

"People have to forgive. We don't have to like them, we don't have to be friends with them, we don't have to send them hearts in text messages, but we have to forgive them, to overlook, to forget. Because if we don't we are tying rocks to our feet, too much for our wings to carry!"

- C. JoyBell C.



Marvin J. Ashton

"Be the one who nurtures and builds. Be the one who has an understanding and a forgiving heart one who looks for the best in people. Leave people better than you found them."

- Marvin J. Ashton http://www.goodreads.com/quotes/tag/forgiving

- In the realm of law, the RSS wants the passage of a stringent nationwide bill that would ban religious conversions. In the public sphere, it has arrogated the right to pronounce not just on the future of minorities in India but that of India's Hindu majority as well. In the war of the religions, it seeks to spread the news that there is now a Hindu fundamentalism eager to goad and trump well-established Christian and Islamic fundamentals in India and around the world. And among its own vast cadre, it has generated the sense that it, much more than the government of the day or the diverse institutions of civil society and business, holds the key to India's future.

...

As a Hindu, I have some sympathy with this viewpoint. Missionary activity has always seemed to me unacceptably crude and arrogant, not only in its conviction that there is a single truth that must be propagated, but also in its contempt for two of the forces that most strongly influence religious belief: The accident of birth in a certain religion, which is then followed by many years of socialisation into its worldview.http://gulfnews.com/opinions/columnists/a-new-vision-of-india-that-is-100-hindu-1.1433102

- "It is not conversion, it is reconversion," said the professorial Abdeo, national secretary of Vishva Hindu Parishad, a pro-Hindu organisation. "A thousand years ago, all the Muslims and Christians in India were Hindu. They were converted by the sword. We are just bringing them back to their original faith."



Hindu fundamentalists, saying Christian missionaries and Muslim conquerors converted Indians by force centuries ago, have for years quietly sought to win them back. This year, seemingly invigorated by the rise of a right-wing Hindu government in New Delhi, they have organised mass reconversion "camps", including some where people have alleged they were duped or threatened into changing faiths.

http://www.smh.com.au/world/hindu-activists-organise-mass-reconversion-camps-in-india-20141229-12et35.html

- "When we start to doubt ourselves, when we start questioning our own identity, when we start distrusting everything, we cannot win, including against extremists, those who want to destroy who we are, threaten our values, turn France into something it is not".

http://www.france24.com/en/20150105-france-fran%C3%A7ois-hollande-media-offensive-tv-radio-2015-sarkozy/ - Khomeini himself put it this way: "Allah did not create man so that he could have fun. The aim of creation was for mankind to be put to the test through hardship and prayer. An Islamic regime must be serious in every field. There are no jokes in Islam. There is no humor in Islam. There is no fun in Islam. There can be no fun and joy in whatever is serious."

...

A solemn and dignified Ramadan indeed. Sometimes it takes a clown to speak the truths that others won't face.

http://www.smh.com.au/national/islam-is-no-laughing-matter-20150109-12kzr3.html

- Yun's quest - a modern version of the age old dream of tapping the fountain of youth - is emblematic of the current enthusiasm to disrupt death sweeping Silicon Valley. Billionaires and companies are bullish about what they can achieve. In September 2013 Google announced the creation of Calico, short for the California Life Company. Its mission is to reverse engineer the biology that controls lifespan and "devise interventions that enable people to lead longer and healthier lives". Though much mystery surrounds the new biotech company, it seems to be looking in part to develop age-defying drugs. In April 2014 it recruited Cynthia Kenyon, a scientist acclaimed for work that included genetically engineering roundworms to live up to six times longer than normal, and who has spoken of dreaming of applying her discoveries to people. "Calico has the money to do almost anything it wants," says Tom Johnson, an earlier pioneer of the field now at the University of Colorado who was the first to find a genetic effect on longevity in a worm.

http://geneticliteracyproject.org/2015/01/12/can-silicon-valley-fix-the-aging-problem/

- But let's remember that central bank quantitative easing (QE) of the kind that Europe is now embarking on is always just a Band-Aid on economic troubles, not a solution to underlying structural issues in a country (or in this case, a region). Just as the Fed's $4 trillion QE money dump bolstered the markets but didn't fix the core problems in our economy--growing inequality, a high/low job market without enough work in the middle, flat wages, historically low workforce participation--so the ECB QE will excite markets for a while, but it won't mend the problems that led Europe to need this program to begin with.

http://time.com/3679154/european-union-quantitative-easing/

- Europe's future was "not the future of austerity - it is the future of democracy, solidarity and cooperation," he added.

http://www.theguardian.com/world/2015/jan/25/greece-election-vote-austerity-leftwing-syriza-eu?google_editors_picks=true

- "Medicine doesn't happen very much in breakthroughs. It happens in lots and lots of little steps, and we still have a long way to go."

http://www.smh.com.au/national/dr-jeremy-chapman-receives-australia-day-honour-20150125-12uze3.html

- "It is wrong to imagine that we can only gain and grow from revelling in past glory," he said. "True patriots don't shrink from historical truth -- they welcome it, they learn from it.

"I believe Australians are smart enough and generous enough to know that our national story is not a 'choose-your-own adventure', where we pick and mix the chapters that portray us in the best light.

...

"No leader can 'settle' the question of Australia's global role and responsibilities, and no leader should take pride in trying."

http://www.theaustralian.com.au/national-affairs/bill-shorten-lets-revive-republic-debate/story-fn59niix-1227196364113?nk=f2f9c38ea04dc0479d039b85079e3103- "The problem is he just wants to pour that additional money into the broken, existing system -- which a lot of people graduate with AA degrees that don't lead to anything but another four-year degree that may not lead to a job," Sen. Marco Rubio, R-Florida -- a prospective 2016 presidential candidate -- suggested recently on CBS' Face the Nation. "What we need to do is create competition with alternative methods where people can acquire certification programs that take less than two years, and get you to work right away as a welder, electrician, and airplane mechanic. I wish he would spend more time on that, and less time trying to raise taxes and pour money into an outdated model that no longer works in the 21st Century."

http://www.cbsnews.com/news/state-of-the-union-finally-an-agenda-for-the-21st-century/

- The test was anything but scientific - it says as much about my proficiency with the different input methods as it does about the input methods themselves - but the results were interesting and not at all what I expected. Swype, the keyboard you use by drawing lines over the letters without lifting your finger, was by far the slowest for me, due to the fact it coped very poorly indeed with longer, not-so-common words in the text. Next slowest was the handwriting recognition on Samsung's Galaxy Note 4, using its stylus, due to the fact it kept capitalising words that shouldn't be capitalised. I really thought it would be one of the faster ones. Then came the stock Android keyboard, then second fastest was the keyboard on the iPhone, thanks to its uncanny auto-correction ability that lets you type at an insane pace and still have near perfect accuracy.



But fastest of all by some margin, twice as fast as Swype and 30 per cent faster than the iPhone, was the keyboard on the Classic. Not only that, but it was the only input device that allowed me to take my eyes off the keyboard and look at the stopwatch while entering text. It's so easy to use, and so fast.

http://www.afr.com/f/free/technology/digitallife/blackberry_classic_is_faster_than_7uzwvj1NNSc2gwMgq042pM

- In this day and age confidence is king. You can embark on all of the education you like but if you can't back yourself, or make it clear to others that you're up for the fight then others will pass you by. Nick Kyrgios is definitely letting everyone know he's not holding back, and he's having one hell of a crack.

...

Some are saying Nick is one of the most exciting sporting prospects Australia has seen in a long while, so lets not cook the golden goose, instead let it run wild, and who knows what will eventuate.

http://www.theroar.com.au/2015/01/27/let-nick-kyrgios-run-wild/

- Canada's number one problem in personal finance is not lack of saving, he said, but people spending beyond their means. "Eric and Ilsa show us that it's a problem uniting people of all backgrounds. This couple is you and me, only with a higher income."

http://www.news.com.au/finance/money/barely-getting-by-on-25k-a-month-couples-plea-for-financial-advice-draws-scorn/story-e6frfmcr-1227194539834

http://www.theglobeandmail.com/globe-investor/personal-finance/mortgages/debt-doubts-cast-a-shadow-for-this-professional-couple-with-five-kids/article22496585/

- The most successful companies need a vision, and both Apple and Microsoft have one. But Apple's was more radical and, as it turns out, more farsighted. Microsoft foresaw a computer on every person's desk, a radical idea when IBM mainframes took up entire rooms. But Apple went a big step further: Its vision was a computer in every pocket. That computer also just happened to be a phone, the most ubiquitous consumer device in the world. Apple ended up disrupting two huge markets.

...

Mr. Cihra noted that Microsoft already dominates its core businesses, leaving little room for growth. But, he said, "Apple still doesn't have massive market share in any of its core markets. Even in smartphones, its share is only in the midteens. Apple's strategy has been to carve out a small share of a massive market. It's pretty much a unique model that leaves plenty of room for growth."

http://www.afr.com/p/technology/how_apple_left_microsoft_for_dust_8DjgBmV0XlDq44KQX5JpQI

- The new administration said the sackings of the heads of the Hellenic Republic Asset Development Fund will put an end to "close-out sale" privatisation policies, Greek media reported. From now on, privatisations will take place when they create new jobs and generate economic growth, the government said.



Privatisations of state companies are an important part of a reform program the previous government agreed to with its international creditors in return for a EUR240 billion ($350 billion) bailout. Interest from investors for the state offerings, however, has been low, and the revenues from the sales have come in sharply below expectations.

...

"The wind of change is starting to blow in Europe," party leader Pablo Iglesias, a 36-year-old former university professor, said in Greek and Spanish as he addressed supporters. "We dream but we take our dream seriously. More has been done in Greece in six days than many governments did in years."

...

Born out of the "Indignants" protest movement that filled Spanish squares in 2011 with demands for change, Podemos says it wants to prevent profitable companies firing workers, promote fully state-controlled healthcare and enact a "significant" minimum-wage hike.

http://www.smh.com.au/world/greece-puts-privatisations-on-ice-as-antiausterity-wave-arrives-in-madrid-20150201-1332aw.html

http://www.france24.com/en/20150131-tens-thousands-rally-support-spain-anti-austerity-party-podemos/

- The team carried out the research using astero-seismology -- listening to the natural resonances of the host star which are caused by sound trapped within it. These oscillations lead to miniscule changes or pulses in its brightness which allow the researchers to measure its diameter, mass and age. The planets were then detected from the dimming that occurs when the planets transited, or passed across, the stellar disc. This fractional fading in the intensity of the light received from the star enables scientists to accurately measure the size of the planets relative to the size of the star.

http://timesofindia.indiatimes.com/home/science/Solar-system-with-5-Earth-sized-planets-dicovered/articleshow/46034238.cms

- In DJ parlance, a break is where all elements of a song (e.g., pads, basslines, vocals), except for percussion, disappear for a time. This is distinguished from a breakdown, a section where the composition is deliberately deconstructed to minimal elements (usually the percussion or rhythm section with the vocal re-introduced over the minimal backing), all other parts having been gradually or suddenly cut out.[1] The distinction between breaks and breakdowns may be described as, "Breaks are for the drummer; breakdowns are for hands in the air".[1]



In hip hop and electronica, a short break is also known as a "cut", and the reintroduction of the full bass line and drums is known as a "drop", which is sometimes accented by cutting off everything, even the percussion.

http://en.wikipedia.org/wiki/Break_(music)

- Mobile users are increasingly driving traffic to Facebook, and advertisers have responded by purchasing large numbers of mobile ads. More than $1 in every $5 spent on Facebook advertising now goes to mobile, even though mobile ads command a premium cost-per-click rate of $1.38 -- compared to $0.81 for desktop ads. Also of note: The majority of tablet users access Facebook using an Apple product, but when it comes to phones, the Android operating system drives more traffic. -- AllFacebook

http://www.entrepreneur.com/blog/225499- Robotics executives say even though blue-collar jobs will be lost, more efficient manufacturing will create skilled jobs in designing, operating and servicing assembly lines.

A report commissioned by the International Federation of Robotics last year found that 150,000 people are already employed by robotics manufacturers worldwide in engineering and assembly jobs.

http://www.theage.com.au/world/robots-take-on-skilled-labour-20120819-24gdr.html

Francois Marier: Upgrading Lenovo ThinkPad BIOS under Linux

Sun, 2015-02-01 14:31

The Lenovo support site offers downloadable BIOS updates that can be run either from Windows or from a bootable CD.

Here's how to convert the bootable CD ISO images under Linux in order to update the BIOS from a USB stick.

Checking the BIOS version

Before upgrading your BIOS, you may want to look up which version of the BIOS you are currently running. To do this, install the dmidecode package:

apt-get install dmidecode

then run:

dmidecode

or alternatively, look at the following file:

cat /sys/devices/virtual/dmi/id/bios_version Updating the BIOS using a USB stick

To update without using a bootable CD, install the genisoimage package:

apt-get install genisoimage

then use geteltorito to convert the ISO you got from Lenovo:

geteltorito -o bios.img gluj19us.iso

Insert a USB stick you're willing to erase entirely and then copy the image onto it (replacing sdX with the correct device name, not partition name, for the USB stick):

dd if=bios.img of=/dev/sdX

then restart and boot from the USB stick by pressing Enter, then F12 when you see the Lenovo logo.

Michael Still: Cooleman and Arawang Trigs

Sun, 2015-02-01 11:28
Doug and I went out to walk Doug's dog at short notice yesterday evening, and managed to sneak in two trigs while we were at it. A nice walk, although it took longer than I expected it to, with our average speed only being about 3.5 kilometers an hour. I wonder how much of that was the two peaks to climb, versus the puppy in tow.



Along the way we found this super cool telegraph line, which appears to still have an active Telstra service on it. I wonder if we'll one day see fiber strung on these telegraph poles?



                       



Interactive map for this route.



Tags for this post: blog pictures 20150131-cooleman_and_arawang photo canberra western_creek bushwalk trig_point urban_trig

Related posts: Harcourt and Rogers Trigs; A quick walk to Tuggeranong Trig; Big Monks; A walk around Mount Stranger; Forster trig; Two trigs and a first attempt at finding Westlake



Comment

Jonathan Adamczewski: What is -1u?

Sun, 2015-02-01 09:27

In C++, what exactly is -1u?

It doesn’t seem like it should be difficult to answer — it’s only three characters: -, 1, and u. And, knowing a little bit about C++, it seems like that’ll be (-1) negative one with that u making ((-1)u) an unsigned int. Right?

To be more specific, on an architecture where int is a 32 bit type, and negative numbers are represented using two’s complement (i.e. just about all of them), negative one has the binary value 11111111111111111111111111111111. And converting that to unsigned int should … still be those same thirty two ones. Shouldn’t it?

I can test that hypothesis! Here’s a program that will answer the question once and for all:

#include <stdio.h> #include <type_traits> int main() { static_assert(std::is_unsigned<decltype(-1u)>::value, "actually not unsigned"); printf("-1u is %zu bytes, with the value %#08x\n ", sizeof -1u, -1u); }

Compile and run it like this:

g++ -std=c++11 minus_one_u.cpp -o minus_one_u && minus_one_u

If I do that, I see the following output:

-1u is 4 bytes, with the value 0xffffffff

I’m using -std=c++11 to be able to use std::is_unsigned, decltype and static_assert which combine to assure me that (-1u) is actually unsigned as the program wouldn’t have compiled if that wasn’t the case. And the output shows the result I had hoped for: it’s a four byte value, containing 0xffffffff (which is the same as that string of thirty two ones I was looking for).

I have now proven that -1u means “convert -1 to an unsigned int.” Yay me!

Not so much.

It just so happened that I was reading about integer literals in a recent draft of the ISO C++ standard. Here’s the part of the standard that describes the format of decimal integer literals:

2.14.2 Integer literals

1 An integer literal is a sequence of digits that has no period or exponent part, with optional separating single quotes that are ignored when determining its value. An integer literal may have a prefix that specifies its base and a suffix that specifies its type. The lexically first digit of the sequence of digits is the most significant. A decimal integer literal (base ten) begins with a digit other than 0 and consists of a sequence of decimal digits.

Can you see where it describes negative integer literals?

I can’t see where it describes negative integer literals.

Oh.

I though -1u was ((-1)u). I was wrong. Integer literals do not work that way.

Obviously -1u didn’t just stop producing an unsigned int with the value 0xffffffff (the program proved it!!1), but the reason it has that value is not the reason I thought.

So, what is -1u?

The standard says that 1u is an integer literal. So now I need to work out exactly what that - is doing. What does it mean to negate 1u? Back to the standard I go.

5.3.1 Unary operators

8 The operand of the unary – operator shall have arithmetic or unscoped enumeration type and the result is the negation of its operand. Integral promotion is performed on integral or enumeration operands. The negative of an unsigned quantity is computed by subtracting its value from 2n, where n is the number of bits in the promoted operand. The type of the result is the type of the promoted operand.

I feel like I’m getting closer to some real answers.

So there’s a numerical operation to apply to this thing. But first, this:

Integral promotion is performed on integral or enumeration operands.

Believe me when I tell you that this section changes nothing and you should skip it.

I have an integral operand (1u), so integral promotion must be performed. Here is the part of the standard that deals with that:

4.5 Integral promotions

1 A prvalue of an integer type other than bool, char16_t, char32_t, or wchar_t whose integer conversion rank (4.13) is less than the rank of int can be converted to a prvalue of type int if int can represent all the values of the source type; otherwise, the source prvalue can be converted to a prvalue of type unsigned int.

I’m going to cut a corner here: integer literals are prvalues, but I couldn’t find a place in the standard that explicitly declares this to be the case. It does seem pretty clear from 3.10 that they can’t be anything else. This page gives a good rundown on C++ value categories, and does state that integer literals are prvalues, so let’s go with that.

If 1u is a prvalue, and its type is unsigned int, I can collapse the standard text a little:

4.5 Integral promotions (prvalue edition)

A value of an integer type whose integer conversion rank (4.13) is less than the rank of int …

and I’m going to stop right there. Conversion rank what now? To 4.13!

4.13 Integer conversion rank

1 Every integer type has an integer conversion rank defined as follows:

Then a list of ten different rules, including this one:

— The rank of any unsigned integer type shall equal the rank of the corresponding signed integer type.

Without knowing more about conversion ranks, this rule gives me enough information to determine what 4.5 means for unsigned int values: unsigned int has the same rank as int. So I can rewrite 4.5 one more time like this:

4.5 Integral promotions (unsigned int edition)

1 [This space intentionally left blank]

Integral promotion of an unsigned int value doesn’t change a thing.

Where was I?

Now I can rewrite 5.3.1 with the knowledge that 1u requires no integral promotion:

5.3.1 Unary operators (unsigned int operand edition)

8 The [result of] the unary – operator … is the negation of its operand. The negative of an unsigned quantity is computed by subtracting its value from 2n, where n is the number of bits in the promoted operand. The type of the result is the type of the operand.

And, at long last, I get to do the negating. For an unsigned value that means:

[subtract] its value from 2n, where n is the number of bits in the promoted operand.

My unsigned int has 32 bits, so that would be 232 – 1. Which in hexadecimal looks something like this:

0x100000000 - 0x000000001 0x0ffffffff

But that leading zero I’ve left on the result goes away because

The type of the result is the type of the (promoted) operand.

And I am now certain that I know how -1u becomes an unsigned int with the value 0xffffffff. In fact, it’s not even dependent on having a platform that uses two’s complement  — nothing in the conversion relies on that.

But… when could this possibly ever matter?

For -1u? I don’t see this ever causing actual problems. There are situations that arise from the way that C++ integer literals are defined that can cause surprises (i.e. bugs) for the unsuspecting programmer.

There is a particular case described in the documentation for Visual C++ compiler warning C4146, but I think the rationale for that warning is wrong (or, at least, imprecise), but not because of something I’ve covered in this article. As I’ve already written far too many words about these three characters, I’ll keep that discussion for some time in the future.