Why priori knowledge is so irritating

Posted in Factor programming language, FORTH is it dead or isn't it? on May 20, 2017 by asteriondaedalus

Something so simple, if you have example code on your blog why on earth do you not included the includes.  Priori knowledge is not immediately explicit.

I bumbled through the example of constraint based programming in Factor.  Go figure, the actual code should be:

USE: backtrack
USE: locals

:: solve-711 ( -- seq )
    711 iota amb-lazy :> w
    711 w - iota amb-lazy :> x
    711 w - x - iota amb-lazy :> y
    711 w - x - y - :> z

    w x * y * z * 711,000,000 = [ fail ] unless

    { w x y z } ;

Run it with:

IN: scratchpad solve-711 .

Still, the debugging is fantastic and will suggest vocabularies to include (which helped sort out the missing “includes” aka USE:).

Interestingly Factor has a vocab “models” which sniffs a bit like the idea of models, in the first instance from MVC, but then subtly not unlike the way “model” is used in Elm and therefore Functional Reactive Programming.  Cool.

Although, its Concatenative Reactive Programming really – although that’s postfix functions rather than prefix.  Cool.

The difference is important though.  Elm “compiles” to JSP to “compile” to byte-code to run on the JVM.  In Factor, you are reactive in Factor.

Now, the key difference between Factor and Forth here is that Forth is for embedded systems.  Factor is not.  While you can squeeze Forth onto an AVR chip, they don’t even bother anymore with Factor on ARM.

Still, I get a queasy feeling it’s the FORTH community all over again.

It has just occured to me …

Posted in Chapel, ConCurrency, Erlang, ODROID-C1, Parallel Talk, Parallella on May 19, 2017 by asteriondaedalus

… what a coincidence.

The Parallella and the Odroid-C1 PCB are same size (almost).  Is that Feng Shui, synchronicity or serendipity?

Pity the post holes don’t line up.

Swapping out …

Posted in MQTT, node-red, Orange Pi on May 19, 2017 by asteriondaedalus

… or in.

To give my cluster back an ODROID-C1, I got a 512M Orange Pi to host the mqtt and node-red for my house automation.  It is tini, even with the case ( a couple of max boxes in size ).  So, un-obtrusive to boot.

I will get a couple more once I have sorted some software to monitor my barking dogs.    Python based signal processing to detect the dog back and then, perhaps, hooked into sprinkler zone the dog barking is detected in.

I have an IR sprinkler guarding the side of the house.  Neighbors complained that they’d been barking daily for 12 months, why wait 12 months before telling me?  So they became set in their ways.  However, the sprinkler works the dog psychology as it breaks the fixation on the noise.

However, of course, I want to be a little more sophisticated.  I want to record the activity so I will get a camera for the OPi later.  Wifi it up to the home PC.  Because it has GPIO ports it could also drive a solenoid valve, a horn or a shaker (marbles in a coke can will distract the dog as it doesn’t like that type of noise).

Untitled

Parallela turned up so it and the C1 will be fitted this weekend.

I relented on the idea of an old multi cpu server.  I am fickle … I know.

Quality Control

Posted in Sensing on May 13, 2017 by asteriondaedalus

So, I decided to put a dispute into Aliexpress to get half my $5 back on the lens I ordered.

No markings so you can’t easily tell what focal length it is supposed to be.  Go figure, I pinged the vendor and asked how they know what lens to send if there are no markings and they “apologized” as they couldn’t tell me what focal length it was.

On principle then I will try to get half my money back, which is likely less than the transaction fees on VISA card but will make the vendor think about their quality control – I hope.

Go figure, in the end I found a couple of 2.8mm f/l lens that are marked and decided I can play with the one I have and get an even tighter f/l in which (again) increases the maximum velocity over the ground the sensor can be used for BUT IMPORTANTLY that means I can trade that off and get the sensor closer to the ground for use on my rock crawler.  The 3.6mm “imposter” does bring the sensor height down but it also has a 90 degree field of view which constricts it somewhat.  Any hint of motion in the field of view goes towards the odometry doesn’t it!

The options I had were 100 degree and 110 degree field of view.  I opted for the 2.8mm f/l 110 degree to get more image crammed in.

Arrrrrrrrrrrrrrrrrrrrrrrrrrrrr…

Posted in Help Request on May 10, 2017 by asteriondaedalus

…rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrggggggggggggggggggggghhhhh!

The new lens turned up for my PX4FLOW BUT, of course, it cam wrapped in foam, no details and no markings to confirm it is, in fact a 3.6mm f/l.

How on earth do I work out if they sent me the right one?  I have to set up an optical experiment.

Hmm.  The image size was much bigger on the 16mm f/l that came with the Pix4Flow.  I had it looking at a small pewter mug, with raised relief, I have my pens and pencils in.

At the same distance, the new lens shows most of the mug, while the olde lens is zoomed right in on the raised relief.  This is what I expect (here is a calculator to play with).

It will likely do.

Here is the lens for sub $5.

Tax return is in

Posted in Chapel, ODROID is wonderful, ODROID-C1, ODROID-XU4, Parallel Talk on April 30, 2017 by asteriondaedalus

Well late really, last two years after tax department started writing letters.

Serve them right as I got a quite hefty lump sum out of it.

So, after agonising over what to do about GPU based system, I decided I am only dabbling so I opted to simply get an ODROID-XU4 so that I can at least run OpenCL under Python.

Mind you, after toying with Chapel on my quad-core Odriod C1, I will be interested in the Octa-Core Xu4.  I did splurge and get an 32GB eMMC 5.0 with Linux.

I went this way as even now the Jetson TK1 is available (as its now obsolete) in Australia, I am rather more interested now in Chapel.   Not to mention that Chapel appears to be a better approach than Cuda.  That is the appeal, you can take your Chapel code and just change the underlying engine.

So, my cluster will be one ODROID-XU4 and four ODROID-C1.  So, 24 cores all up (not taking the general purpose GPU on the XU4 into account).

Oh, and the 18 cores the Parallella adds.  You do know there is an Erlang for the Parralella don’t you?

I am in parallel programming heaven.

The thing that makes it all possible is the 9 port POE switch and a gaggle of active POE splitters (48V down to 5V) – you don’t need n-power packs on your wall.

Don’t forget TTY+ (MPutty) or some other multiple session tool.

Built into the guts of an old game PC case my mate gave me, so the wife will never know.

If I need more grunt a NVDIA card maybe later, in an 8-core PC, maybe.

However, PhD submission draft this weekend so dabbling is all that I will have time for.

Here’s the theory …

Posted in Arduino, Beaglebone Black, C.H.I.P., General niff naff and trivia on April 29, 2017 by asteriondaedalus

… straight forward really.

MOOS-IVP happily compiles and runs on on of my Beaglebone Blacks.

beagleboneblack-topweb

Sooooo, no stretch (pardon the pun) for MOOS-IVP to fit onto a C.H.I.P.!

 

Both are 1GHz processors with 512M of memory.

The standard approach, in any event, is run MOOS-IVP on the linux board and have an arduino interfacing with the hardware.

Of course, I am running against the AIO:

You could just as easily run against a raft of other boards, such as:

Or even a Parallax Propeller board!

That would all depend on what you are offloading to the hardware layer.