Sunday, 20 July 2014

Switching primary languages

Im on a roll here, three posts in one day, I have decided its time I switched primary launguage. I spent the eighties writting assembler and "C", the ninties writting "C++", and most of the noughties writting "PHP", so im due for another switch.

I have been looking at "go" the new systems language from google, and it meets all my needs, the depth and breadth of "C", the capabilities of "C++" and the rapid workflow i associate with "PHP". Im definatly going to have a long learning curve getting up to speed on it, so I have decided to set myself a task that I can start working towards and a schedule of two years with a prototype and then implememtation phase. I fully expect to throw all my initial work away and reimplement it properly once i know what I am doing.

The Task I have set myself is to build a 3D printer slicer and firmware set suitable for executing in an embeddeable computer. I will have to learn a bunch of techniques, but I have the required background and skills, for the last two years I have been building and operating 3d printers, and in the late 90's I specialised in building Postscript raster image processors for custom printers. At a push I can even build hardaware, im planning to initialy use  a small ARM board like a beagleboard black or one of the new Raspberry Pi's with the enhanced GPIO. But thats a choice I dont have to make yet. I want to abstract the higher level layers into a set of libraries, and leave the low level driver stages until I have a target built.

Im using the community version of the Jetbrains IDEA editor as my dev env, with the golang plugin which works really well, and is extreemly easy for me to use as I use thier PHPStorm Editor for all my PHP work, and the two are very simular. Im just looking at other tools now like dependancy managers, package managers and unitesting frameworks.

It will be fun, I am so looking forward to this.

Posted via Blogaway

HHVM and MongoDB

Just latley I have been playing with HHVM (HipHop) and MongoDB. To set the scene, we have a largish application written in PHP/Zend/MongodB that we would like to make faster. It has two main parts to it, a bunch of backend scripts called from crons, and the web application itself.
I recently got involved in an effort to produce a pure PHP MongDB driver, for the purpose of allowing servers which dont allow extentions to be loaded to interact with hosted MongoDB services such as MongoHQ, and beable to use MongoDB with HHVM.
The resulting driver is very complete, and implements a large subset of the Official PHP drivers support, in an dropin compatable fashion. You can see the php driver at https://github.com/mongofill/mongofill . Great as it is, there is an even better vertsion at https://github.com/mongofill/mongofill-hhvm which compiles the php driver alongside a "C" implementation of a BSON reader/writer to produce a loadable extension module for HHVM. And the results are fantastic. Our backend scripts are by no means simple Mongo/PHP code. But I was able to get them all working well with minor changes to the code. A testiment to the diligence of the Mongofill authors.

Posted via Blogaway4

Blogging from my tablet

This is my first post from my android tablet, i took the dive and got myself a super Samsung Galaxy Note 12.2, with LTE. Its night and day compared to my old Note 10.1. So much so that I got the bluetooth case/keyboard that goes with it, because its close to being an ultrabook.

Anyway this is my first post direct from the tablet, on the move, from a "Mr Dougnuts" store in Greenhill mall in pasig.

More to follow

Tuesday, 11 February 2014

Microfabricator.com - The internets end stop

Microfabricator.com

Been building content/community sites again and my latest site is

Microfabricator.com

Microfabricator.com is a new news, forum, and social content site for the 3D Printing community. We will also be hosting the design and build of the the "Photon" 3D printer on this site.

The "Photon" is a new 3D printer design, designed to be built in countries which may not have access to sophisticated components, most of the design can be built from components available in a DIY Hardware store.

more than 70% of the structure is it self printed, so its ideal for bootstrapping.

Saturday, 20 April 2013

phpugph 2013 developer sumit


Im speaking at the PHPUGPH 2013 conference here in Manila

This post is really just a placeholder so that I can attach the PDF of the conference slides, the talk I'm giving is an introduction to MongoDB for PHP programmers.



Monday, 3 December 2012

Bare arduino board works

Finally got my bare Arduino board up and running, Its was supposed to have a ZIF socket on it as its primary purpose is as an ATMEGA328P programmer, but I screwed up and accidentally bought a 24pin socket instead of a 28pin socket.

But it works, and I can upload sketches via the FTDI socket.


Im working on a Function generator using a DDS chipset, learning how to drive a 1602 LCD and a keypad using a  74HC595 shift register, and a hacked version of the "new LiquidCrystal" and the "Keypad" libs, Im trying to use the same 74HC595 to provide not only a 3wire interface to the LCD panel, but to provide the column strobes for the keypad, hopefully I will be able to get the whole UI interface to work using 6 i/O pins, leaving 7 left over to manage the DDS chip, and provide output for a programmable output stage and variable gain control. 

Im also looking at using the setup to provide a "wobbulator" capability, but Im not certain if I can sweep the DDS through its frequency range fast enough to make that useful enough for anything more than audio work. It will also need to provide a very stable linear DC coupled output to provide the Y sweep voltage output for the oscilloscope. 

But anyway it will make a nice compliment to my shiny new RIGOL DS1102E Scope, which is fantastic. and makes building stuff like this a doddle, you cant underestimate the value of being able to directly visualize what is going on inside your circuitry. 

Saturday, 5 March 2011

Installing ElasticSearch on mac os x or linux

These instructions are specifically for Mac Os X , but they should work fine on linux too.

Download the latest version of Elastic search from here: http://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.5.tar.gz The current version is 0.18.5 but a later version should be ok

Unpack the tar file in the download directory (doubleclick on the tar file) this should create the directory ~/Downloads/elasticsearch-0.18.5

open a console in the download directory and pull down the elastic search service wrapper from github.


$cd ~/Downloads
$git clone https://github.com/elasticsearch/elasticsearch-servicewrapper.git elasticsearch-servicewrapper


Now we will move the service into place


$cd ~/Downloads
$sudo mv elasticsearch-0.18.5 /usr/local/share
$cd elasticsearch-servicewrapper
$sudo mv service /usr/local/share/elasticsearch-0.18.5/bin
$cd /usr/local/share
$sudo ln -s elasticsearch-0.18.5 elasticsearch
$sudo chown -R root:wheel elasticsearch


Now we can start up the service

 
$cd /usr/local/share/elasticsearch
$sudo bin/service/elasticsearch start


You should see the following output


$ sudo bin/service/elasticsearch start
Starting ElasticSearch. Detected Mac OSX and installed launchd daemon.
Waiting for ElasticSearch...
.
.
.
.
.
.
running: PID:57767
$


Note: The pid number will be different on your system

Check the service is ok by opening up a browser on http://localhost:9200, you should see the following output


{
"ok" : true,
"name" : "Bova",
"version" : {
"number" : "0.18.5",
"date" : "2011-03-01T19:07:42",
"snapshot_build" : false
},
"tagline" : "You Know, for Search",
"cover" : "DON'T PANIC",
"quote" : {
"book" : "The Hitchhiker's Guide to the Galaxy",
"chapter" : "Chapter 30",
"text1" : "\"The chances of finding out what's really going on in the universe are so remote, the only thing to do is hang the sense of it and keep yourself occupied. Look at me, I design fjords. I'd far rather be happy than right any day.\"",
"text2" : "\"And are you?\"",
"text3" : "\"No, that's where it all falls apart I'm afraid.\"",
"text4" : "\"Pity, it sounded like quite a nice lifestyle otherwise.\""
}
}


Stopping Elastic search


use a similar command to starting as shown above.
 
$cd /usr/local/share/elasticsearch
$sudo bin/service/elasticsearch stop