ejes consulting

Techincal Consulting Design and Automation

Archive for the ‘Uncategorized’ Category

New Sort? (kind of)

leave a comment »

One doesn’t find a new sorting algorithm floating around the internet very often, but here’s one that I found that’s actually kind of neat.

It’s not really very practical, but it’s still very fun. It’s quite simple. For each element of the array, you fork a new process which sleeps it’s value in seconds then displays that number. Repeat for the entire array.

#!/bin/bash
function f() {
    sleep "$1"
    echo "$1"
}
while [ -n "$1" ]
do
    f "$1" &
    shift
done
wait

found here!

Advertisements

Written by ejes

September 26, 2011 at 1:14 pm

Posted in Uncategorized

Super Small printf for embedded applications

leave a comment »

So I like to write embedded applications – the challenge provided by a low power low memory system is always an enjoyable one. Nevertheless, occasionally one needs to recreate standard functionality and with these constraints in mind it can be quite a task. Anyway, I was stumbling around and found this tiny printf utility that is both elegant and tiny:

http://www.xappsoftware.com/wordpress/2011/01/17/a-tiny-printf-for-embedded-systems/

Written by ejes

February 25, 2011 at 12:09 pm

Posted in Uncategorized

Tagged with ,

Happy New Year

leave a comment »

Happy New Year to all…

Written by ejes

January 1, 2011 at 10:48 pm

Posted in Uncategorized

MAME Cabinet Woes!

leave a comment »

Thanks to all of you who emailed, commented, linked back, or otherwise awknowledged my last post :)

Since my last post, I’ve been looking around at MAME frontentds.  There are plenty!

During this search I stumbled upon a few very interesting MAME resources, when I came upon a revelation.

MAME is written for windows, and ported to different OSes, including Linux.  Maybe I should examine using something other than Debian for MAME.

I soon discovered there’s a DOS port of MAME, which would suffice.  So, as a side track, I’ve been working on building a MAME cabinet with FreeDOS (www.freedos.org) and I suspect using the HX DOS Extender (http://www.japheth.de/HX.html) one could run the “Official” Windows 32 bit MAME app; in DOS.

But why use dos?

Well, for one, boot time – Nothing boots faster.  This (http://www.edn.com/article/CA6720353.html) has some promise but until it gets merged into Linux proper, DOS boots way faster.

DOS is VERY Limited.  This is a good thing because my console is going to be single function, that means I don’t want anyone to load up a browser, or download some exploit, and even obtaining full control wouldn’t grant them anything significat.

DOS is SMALL.  Although storage is cheap, I don’t want to waste storage on files, programs and scripts that are otherwise not required, who would?  Trim operating system also limits the ability to do malicious things with it.

It’s Challanging!  Who else uses DOS?  I mean really? :P

Anyway; for those of you who are interested, please stay tuned and I’m going to post how to do your own DOS MAME (and pictures, don’t forget pictures). 

As usual, interest will dictate if I show how to complete the Debian based setup.  Please email or comment to let me know.  I’ve saved my Debian based setup on it’s original hard disk and I will not distroy it until I have need for a 30Gb hard disk :)

Written by ejes

March 8, 2010 at 1:38 pm

Posted in Uncategorized

Tagged with , , , ,