Makelangelo dev blog 2020 #2
Out of office
January 18-30 I will be out of the country for some down time. Jin will still be here working on testing machines and filling orders, but no custom builds of Makelangelo Huge will be happening.
Experimental
In the development branch of Makelangelo software there’s always lots going on.
Get the Makelangelo 7.22.6 experimental here.
Pi camera
Github user Mishafarms has added raspberry pi camera support: If you run the software on a pi with a camera it can detect your camera and then use that as a source for images to convert. Nicely done!
Smooth speed improvements
I’ve put in a TON of work to improve the top speed and reducing stutter. I’m currently drawing at 100mm/s and moving (without drawing) at 400mm/s. So it’s now faster and bigger than an AxiDraw plotter. The motors move so smoothly now that they sound almost musical.
Long file names
Another nice to have is that the menus are more responsive on the LCD panel and the filenames on SD cards are now full-length instead of 8 characters.
European number formats
Thanks to the patient feedback of user Joram Neumark I’ve been working to improve support for european users. German computers (or computers with the German Locale) write numbers with a comma instead of a decimal, and the robot does not understand. It doesn’t know it’s in Germany! So instead I’m make sure all numbers written to files are done in the format the robot expects.
Please post to the forums with your experience!
Victims of Success
Just as I was getting on a plane to a very remote location, the website became so popular that Apache rolled over and gave up. It took a while to get through my own darn security to fix things. While I was at it, I upped settings that should handle more traffic. Thank you for your patience and understanding!
How to quickly replace money_format() in your PHP
If you’ve been using money_format() in your PHP code you may have recently (as of PHP 7.4.0) seen that it is now deprecated and the new hotness revolves around a class called NumberFormatter. Here’s how I quickly refactored to make the booboo go away.
I have a scheduled script that runs once a month to recalculate How much money you’d make if you bought Netflix shares instead of a Netflix subscription. Naturally, it uses money_format(formatString,value) all over the place. I didn’t want to manually change every instance, so….
At the top of my PHP file I added the following:
$fmt = numfmt_create( 'en-US', NumberFormatter::CURRENCY );
$symbol = $fmt->getSymbol(NumberFormatter::INTL_CURRENCY_SYMBOL);
function money_format($ignore,$value) {
global $fmt,$symbol;
return $fmt->formatCurrency($value,$symbol);
}
Then (because I am a VI user) I replaced all:
:%s/money_format/money_format2/g
Which changes money_format() I wrote in the first part into money_format2(), but it does that to everything everywhere in the file, so it’s all good. Merely redeclaring money_format() makes PHP sad.
because I am running a LAMP stack (Linux/Apache/MySQL/PHP) I had to also install php-intl:
$ sudo apt-get install php-intl
So there you go! Easy peasy, lemon squeezy. If you liked that share with your friends and so on.