My thoughts on Slackware, life and everything

Category: Fun (Page 2 of 2)

My (first) Raspberry Pi arrived in the post

 At last…

I ordered a Raspberry Pi on May 11, 2012 and Farnell/Element14 delivered it to my home while I was on vacation. Go figure. The postman did not find us home of course, and rang our neighbors’ doorbell. He left the package there, and luckily that neighbor brought me the package the moment he saw our car parked in front of the house.

The little computer came wrapped in a Raspberry Pi T-shirt (with Element14 written all over the front as well) but hey – the T-shirt was free and it served well as wrapping instead of bubble plastic

 

Planning-wise, the Raspberry Pi arrived at an awkward moment. I had not expected delivery until well into august, and intended to pick up my own ARM port of Slackware after my return from France (targeting more recent CPUs than the Raspberry Pi, i.e. an ARM port of Slackware which will be incompatible with the Raspberry Pi). Having the computer in my hands, I could not put it aside, and proceeded with gathering everything needed to make it run Stuart Winter’s ARMedSlack.

The work I intended to do when I wrote my original blog post about the Raspberry Pi (back in November 2011) has been done already. Using ARMedslack as the base distro, David Spencer setup a web space where he writes in great detail how to install ARMedslack on the RasPi. He has created a bootable install image – to be copied onto a SD card – and maintains all his packaging and scripting work on Github.

So I bought a SD card – a Raspberry Pi does not have any internal storage – and dd-ed the installer image to the card. Inserted the card into the Raspi, connected a HDMI cable to my television, attached a USB keyboard with built-in TrackPoint mouse, plugged in a LAN ethernet cable and finally used my phone charger (micro USB) to power it up.

First, a fancy display of colours is visible on the television screen, probably the GPU’s bootloader showing off, and then a Linux kernel with the image of good old Tux replaced by a Raspberry was booting up. The long and boring process follows… formatting the root partition takes ages (which is actually expected behaviour, considering the hardware) and installing the packages is still ongoing while I am typing this:

I guess I will have to be patient. In the meantime I can think of good uses for a second device which should be delivered next week. Will it be good for an XBMC based media streamer? Will I put the semi-official Debian image on that one to see how the two distros differ? I have no idea yet. But just holding a 30 euro computer knowing that it will be running Slackware tomorrow brings a smile to my face.

When I have more to tell you, I will write another post. Now it is time to go to sleep, in the hope that the installation has finished by tomorrow morning so that I can bring the Raspberry Pi along when driving to the office.

Cheers, Eric

Shit happens… fireworks campaign

The yearly dutch campaign to prevent fireworks victims among young people has launched today. The campaign has a new site and slogan “Shit Happens”.

A hilarious video is the centerpiece of the web site, but it can be doubted whether this is actually going to be an effective one… it is too funny to be taken seriously perhaps.

“Most victims suffer from serious damage to their eyes, but yours are completely intact! Unfortunately though, we had to replace another part of your face…”

See the youtube copy of the video in case the site itself is not available:

Take care this new year’s eve!
Eric

Using the Wiimote as a pointing device

t-dose-square

What does a Nintendo wireless controller have to do with Slackware?

Well… you’d be surprised!

On october 4th I am running a presentation about “A history of Slackware development” as part of T-DOSE (fyi: T-DOSE is a free and yearly event held in The Netherlands to promote use and development of Open Source Software). One of the other speakers is Dag Wieers, a former IBM collegue and a big name in the RPM and Redhat world. Dag is going to present his software “wiipresent” and when I read that, my curiosity was triggered. I own a Nintendo Wii (or rather, my son does) and I am interested in things that you can do with it apart from playing cool games.

Wiipresent is a small linux program that connects your computer to a Wiimote (the Wii’s wireless controller) over a bluetooth link and enables you to use the controller as a pointing device. Of course Dag is going to bring a Wiimote to the conference, but so am I 😉

Wiipresent  turned out to be extremely easy to use and the variety of buttons and the diirectional cross on the controller are all functional. The cool thing is that it uses the tilt function of the Wiimote to move the mouse pointer across your screen. So, by waving the Wiimote I can steer and control my KDE desktop, and the directional cross will be useful when I give my presentation – it allows me to move forward and backward through the slides.

And since bluetooth is used instead of infrared, I can walk around without the need to point that Wiimote to the big screen.

And this all from a program that was born as a demonstrational hack at another conference. I created some packages for Slackware 13.0 (both 32bit and 64bit) which you can obtain from my repository as usual: wiipresent and libwiimote (a required supporting library).

Have fun trying it out! Eric

Edit 09-oct-2009:

I have uploaded a PDF of my T-Dose presentation (as well as the original Tex plus bitmap files used to create that PDF). They are available at http://slackware.com/~alien/tdose2009/ .

Calculating PI

The Internet is full of “one-liners” and if you search a bit, you can find many. A one-liner typically means (a chain of) commands that produce useful results quickly.

I came across a nice one-liner just now. The “binary calculator” or bc is a powerful UNIX tool. Calculating the value of PI with an arbitrary number of decimals (the number of decimals only restricted by the power of your OS, available RAM or internal limitations of the program) goes like this:

echo “scale=XXXX;4*a(1)” | bc -l

Where “XXXX” is the number of digits you want to calculate. Calling bc with the “-l” parameter causes bc to load it’s mathematical library. The function “a()” is the arctangent function.

Let’s say you need the value of PI with an accuracy of a thousand decimals.

$ echo "scale=1000;4*a(1)" | bc -l
3.141592653589793238462643383279502884197169399375105820974944592307\
81640628620899862803482534211706798214808651328230664709384460955058\
22317253594081284811174502841027019385211055596446229489549303819644\
28810975665933446128475648233786783165271201909145648566923460348610\
45432664821339360726024914127372458700660631558817488152092096282925\
40917153643678925903600113305305488204665213841469519415116094330572\
70365759591953092186117381932611793105118548074462379962749567351885\
75272489122793818301194912983367336244065664308602139494639522473719\
07021798609437027705392171762931767523846748184676694051320005681271\
45263560827785771342757789609173637178721468440901224953430146549585\
37105079227968925892354201995611212902196086403441815981362977477130\
99605187072113499999983729780499510597317328160963185950244594553469\
08302642522308253344685035261931188171010003137838752886587533208381\
42061717766914730359825349042875546873115956286388235378759375195778\
18577805321712268066130019278766111959092164201988

Isn’t this fun? And on my old dual P2/233MHz server, this took roughly eight seconds.

Now, to compare the usefulness of the Linux platform to good old Solaris, this is what you get on Solaris 8:

$ echo "scale=1000;4*a(1)" | bc -l
scale factor is too large
3.14159265358979323844

Cheers, Eric

Newer posts »

© 2024 Alien Pastures

Theme by Anders NorenUp ↑