My BLOG on DIY, Hacking and notes

This includes mostly useful information for myself and my BLOG about various free time projects. Which are currently mostly hardware and electronics hacks .

Besides this I'm fully occupied with programming the final parts of MPL, extending my software generation tools such as the precompiler. And finishing my PhD thesis text which is about Creating the integrated programming environment Multi Precision Lab using source code generation tools.

First time visitors, people with comments or questions are welcome to sign my guestbook . Some of my projects in my blog hit the masses like www.hackaday.com featuring binary clock and makezine featuring my Wii-remote hack resulting in 10000 new visitors on the day they appeared in my blog. Cya and have a nice day .

Lightweight template engine

Written by Walter on 31/01/2012 16:08:28.

Just bumped into this @ work (template engine bug on an embedded device).
Remembering the baseml template engine we wrote way back in early 2001-2002 BaseML.
Turns out it still compiles (apart from some using namespace std's missing).

Download the fixed sources here (ow yes commented out some procbuf.h code used only when you have php stuff, but this could be replaced with popen on os x/darwin)

OS X binary here: baseml
Alpha sources (well all works except the php stuff which you normally don't use on an embedded device): baseml-0.4a.tar.gz

Original 2002 sources here


Basically with this template language you can define functions with parameters in xml and call them. With the baseml executable you can create static html files from it.

Little example:


Walter-Schrepperss-MacBook-Pro:baseml-0.4a wschrep$ cat hello.bml
<?xml version="1.0"?>

<document>

<world>
World!
</world>

<myOwnFunction>
Hello
</myOwnFunction>

<main>
<myOwnFunction/>
</main>

</document>



Walter-Schrepperss-MacBook-Pro:baseml-0.4a wschrep$ baseml/baseml hello.bml
<!-- Generated with BaseML v0.3 -->
Hello World!

<!-- Generated in 0 (virtual) seconds -->


There is a load of documentation and tutorials here on the wayback machine:
baseml tutorial

Cheers...


Mysql gem install in os x

Written by Walter Schreppers on 22/12/2011 07:27:30.

This bit me twice (going to rails 3.0.7) then again going to rails 3.1.1.

This is the error you get after bundle exec, everything fine. But when you run rails s it fails:
Walter-Schrepperss-MacBook-Pro:biedmee_mercury wschrep$ rails s
dyld: lazy symbol binding failed: Symbol not found: _mysql_get_client_info
Referenced from: /Users/wschrep/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
Expected in: flat namespace



This is the solution:
sudo ARCHFLAGS="-arch x86_64" gem install mysql2 --version '~> 0.3.11' -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Ow yeah and prototype is not used anymore, also gives an error because you need to comment out a line in development.rb (I'm not using prototype anymore in favor of jquery for quite some time):

If you'd like to use jQuery instead of RJS for an existing application, delete or comment the following line from config/environments/development.rb

# config.action_view.debug_rjs = true




3D printing in Egypt!

Written by Walter on 27/09/2011 13:43:24.

Using solar power to drive steppers and a huge lens to melt sand into glass this Solar Sinter shows us that solar power is really a great thing!

Markus Kayser - Solar Sinter Project from Markus Kayser on Vimeo.



Stumbled upon this awesome peace of art by Markus Kayser while searching for a better extrusion bolt for my own 3d printer (which unfortunately is not driven by solar and sand alone, but hey I'm getting some solar panels on my roof soon and then I'm pretty close ).

Markus writes:
In a world increasingly concerned with questions of energy production and raw material shortages, this project explores the potential of desert manufacturing, where energy and material occur in abundance.

In this experiment sunlight and sand are used as raw energy and material to produce glass objects using a 3D printing process, that combines natural energy and material with high-tech production technology.

Solar-sintering aims to raise questions about the future of manufacturing and triggers dreams of the full utilisation of the production potential of the world’s most efficient energy resource – the sun. Whilst not providing definitive answers, this experiment aims to provide a point of departure for fresh thinking.

Unfortunate he needs to drag the sand with a ruler on every new Z-layer. With a form of sand feeder and some extra steppers this could be automated, then it would require zero human labor apart from designing the 3d model.