OMG!

Posted in FORTH is it dead or isn't it? on January 24, 2017 by asteriondaedalus

Factor is to FORTH what my Subaru Impreza WRX is to my Alfa Sud.

I didn’t even know I was looking for it.

Phew!

Posted in The after market on January 20, 2017 by asteriondaedalus

Outbid on server.

I am in so much trouble …

Posted in Linux, Nostalgia, Parallel Talk, The after market on January 18, 2017 by asteriondaedalus

… wife will kill me!

Look what I bid on!

1096078_1.jpg

So, 4 cpu server with 70plus gig of memory.  Maybe dual cores (so eight all up), may be quad cores (so 16 all up).  Won’t know until I grab it (if I win the auction).

I will have to install a hard drive.

Turns out Debian installs just fine, based upon web searches at least.

Why?

Chapel box.

And cheaper than a Parallella.

Should be able to stuff at least one CUDA board in it – just need find a good second hand one.

Go figure, powers up but that’s all I know.

I am so dead.

Mind you, both the wife and the mother in law are actually addicted now to the auction website.

So I feel vindicated … but very, very afraid.

So why do I want to buy the second one they have?

Spares?

Death wish?

Is Charles Bronson channeling through me?

5dw

Who knows why?

Posted in Google API blues, Linux on December 28, 2016 by asteriondaedalus

So a raw install of node-red on PC, an install of node-red-node-google, a google calendar api account, a bit of fiddling and half an hour tops and node-red was reporting google calendar events.

So an hour of attempting different install mechanisms for node-red (to get anything to work) – plagued somewhat by bits that reported deprecation and a couple of kaputs – the same google calendar api account from previous step, two days of failure to get the google calendar out to register with the api.   I lowered myself to go onto stackexchange, got an “Answer” which I cannot correct because I don’t have kudos, a hostile dill who’s Answer I have torn down.

He felt I needed to update the hosts file on my PC so that the browser on PC could resolve the callback to the local odroid server.  Sounded reasonable but that is in itself a likely hint of failure.  Upshot is I had both the odroid’s hosts and the PC hosts files set to the domain name the google calendar config wanted and indeed instructed but not a sausage.  That is the uri request for api permission failed.

So, I looked around for ways to set up a DNS server (assuming that’s what it took) on the local lan.  By golly 1,000,000 sites with 1,000,001 ways of doing it.  I groaned.

Had an idea though.

I had a look at the advanced settings for my ISP router.  Yes, it had DHCP reservations and DDNS options.

I reserved a fixed IP address on the lan for the mac address of the odroid ethernet card.

I created an account at no-IP for DDNS and set up the ISP router to point at it.

I did not delete the hosts entries for the domain name for the odroid off either odroid or PC.

I restarted everything and went to configure the google calendar out gadget BUT the uri request it generated used the domain name generated by google.html in the node module and this was still not resolved.

I had previously tried editing out the domain name in the uri and editing it the raw ip address of the odroid.

Previously this did not work and the request failed.

I even tried that after updating the PC hosts file.  Didn’t help.

Who knows why but now, with the DDNS running on the ISP router, it turns out the hand edited uri (with raw IP address substituted for domain name in the generated uri) worked!

Now I appear to have the node-red on the odroid receiving events (start and stop) from the google calendar.

Very messy.

Install node-red Odroid C1

Posted in Linux, ODROID-C1, The downside of Opensource on December 27, 2016 by asteriondaedalus

Again with the raft of various authors with their own twists.

So far so good on odrobian vanilla with:

Install npm with:

sudo apt-get install npm

Install node-red with:

sudo npm install -g node-red

However, a couple of fails and various warnings ensued so stay tuned for the debug.

DEBUG

Go figure, again with the 1,000,000 authors story.

So far we had to fiddle.

Installing npm installs nodejs of a version that node-red is not happy with so won’t install.

I ended up installing nvm to pull latest node.js onto machine.  I then had to use apt-get remove to rip out nodejs/npm installed previously to leave latest node.js along with it’s npm.

Voila!

c1red

Unfortunately I didn’t write the steps down as I was having to slash on the fly to try and work out what was going wrong, why two node were being installed etc.

Having problems with node-red-node-google calendar out??? Same setup works on PC.  The callback provided by node is to localhost.  The odrobian version provides a callback based upon node-red.example.com which you have to resolve to the odroid’s ip in /etc/hosts.  The problem, a DNS error is raised at the last step of the “authorise with google” for the API.  The prompt appears, but when you select allow the DNS address error is raised.

ODROID-C1 dropping internet

Posted in Linux, ODROID-C1, The downside of Opensource on December 26, 2016 by asteriondaedalus

I found I was having problems with the ODROID-C1, which I am building up as the node-red, mqtt, Phoenix server for home automation, was loosing internet connection a time after boot.

I am building the machine on top of odrobian vanilla – I am using Debian based Linux on all my boxes by preference – which does leave me out in the cold with some software yes.

The cli command told me the ethernet on board was working so I suspected a problem with IP allocation.  A reboot would fix the problem after all.

I poked around the odrobian docs.

Go figure the installed /etc/network/interfaces file read:

auto lo
iface lo inet loopback

The starting example in the docs read:

auto eth0
iface eth0 inet dhcp

Interwebbything, again, has no useful help in as far as there are 1,000,000 plus pages on iface setup so who knows who actually understands what they are telling people and how many are just gash copies of material from the first place people found it?

So what I ended up doing is the following:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

The reason being one oft copied recommendation is always have the loopback.

I tried the eth0 without the auto in front but ping failed to find the real-world.   You would know if it failed as the ping returns immediately.   If it takes any time it’s because it got out into the real-world and is looking for the target.

The auto  command is telling the etho (and lo for that matter) to start on boot.  Without it you would need to do a manual start from the command line.

So, there appears a problem in the supporting manual for odrobian as it assumes what might be in the /etc/network/interfaces file and is simply wrong.

I checked it out by starting a ping to github.com and then jumped on my bike and went for a half hour spin THEN a medium length walk with the dogs (b4 it rains again).

When I came back, we were still on the Interwebbything.

Looks like that they have just copied material from somewhere without tuning it for the actual distro.

Parallel versus Concurrent

Posted in Parallel Talk, Sensing on December 26, 2016 by asteriondaedalus

So, I fell upon Chapel, a parallel programming language.  It makes sense for things that Erlang and Elixir are not good for – like image processing.

It isn’t Google’s,  it’s actually Cray’s.

So fun facts:

  1. When working in Canada I came across a coffee mug in a second hand store that was from Cray.
  2. You can Cram a replica of a Cray into an FPGA.

Now I have Erlang up and running on my ODRIOD-C1 home server.  I will get Elixir and Phoenix running as the wife will likely want something less geeky than node-red for her interface to the home automation.

In the meantime, for fun, Chapel is at this very moment compiling on the OD-C1.  Why not, quad core.  Apparently, for non-Cray etc. monsters, you simply need a  UDP module compiled, a lot of fiddling, and you can have two or more nodes (Locales) running.

In any event, the parallel helloworld found me four cores on me OD-C1.

hello-chapel

Black Magic

There was a configuration script to run but other than that I did not have to tell it how many cores, so some smarts buried does the job.  Otherwise the code to run the print on all four cores is a straight forward as:

config const numTasks = here.maxTaskPar;
coforall tid in 0..#numTasks do
   writeln("Hello, world! (from task " + tid + " of " + numTasks + ")");

There is also an image processing tutorial using Chapel.

There are even lecture notes around.