luatz 0.2 Release
I’m happy to announce a new release of luatz: 0.2
My lua library to work with dates and times.
os.date compatible class “timetable” supporting normalisation
Conversion between locations (time zones) using your local
Works with 5.1, 5.2 and LuaJIT.
New in this release:
Support for fractional timetable component normalisation
.day=1 (which could be read as “the first day after the middle of June”) normalises to
Top level aliases for common operations
Own implementation of
stftime formatting (locales are not yet complete)
ljsyscall for more accurate time when available
AUR (en) - lua-systemd
Lua systemd bindings now up on AUR (Arch Linux User Repository)
5.1 package also available:
This comes off the back of a rockspec => PKGBUILD convertor I’ve been working on
Systemd bindings for Lua
Today I took a dive into systemd, trying to learn how it works, and what features it provides.
As I played around with unit files and creating my own services, I started wanting to do it all via lua. So I spent the morning writing some C bindings to libsystemd.
The fruits of this labour can be tracked over at
github and downloaded from moonrocks
How to mount a VirtualBox VDI image - Be the signal
Blog post with a method to mount virtualbox (vdi) images via nbd and qemu-nbd
Assembling a new home
I recently moved to New York, leaving most of my belongings back in Australia, since many people keep asking me about where I bought things, I thought I should make a list of the products that I’d buy again…
From Amazon (including gratuitous use of affiliate links) Air Mattress (until bed frame and mattress arrived) -
Intex Raised Downy Queen Airbed with Built-in Electric Pump Hot Water -
Panasonic NC-EH22PC 2.3 Quart Electric Thermo Hot Water Pot, White Crock-pot -
Hamilton Beach 33967 Set ‘n Forget 6-Quart Programmable Slow Cooker Saucepans -
T-fal A821SA94 Initiatives Nonstick Inside and Out Dishwasher Safe 10-Piece Cookware Set, Black Baking Sheet (quite long, you should measure your oven before purchasing) -
Nordic Ware Bakers Half Sheet, 13 by 18 by 1 Inch Cutlery -
Oneida Mooncrest 45-Piece Flatware Set, Service for 8 Cutlery Tray -
Madesmart 15.875 by 12.75 by 1.875-Inch Large Silverware Tray, Granite Drinking Glasses -
Libbey Polaris Drinking Glasses and Tumblers, Set of 16 Misc. Kitchen Utensils - Calphalon Nylon 4-Piece Utensil Set Can Opener + Bottle Opener -
OXO SoftWorks Can Opener Whisk -
OXO Good Grips Nylon Balloon Whisk Measuring Spoons -
Progressive International Stainless-Steel Magnetic Measuring Spoons, Set of 5 Mixing Bowls -
OXO Good Grips 3-Piece Mixing Bowl Set, Blue/Green/Yellow Dining Table -
Crown Mark Tyler 4-Piece Counter Height Table Set Bed underlay (this made a very cheap mattress ridiculously comfortable) -
Pinzon Basics Overfilled Ultra Soft Microplush Queen Mattress Pad Doona Cover -
Perry Ellis, Sweet Bay Collection Duvet Set, Full/Queen Coat Hangers -
Closet Complete Ultra Thin No Slip Velvet Suit Hangers, Black, Set of 50 Laundry Basket -
Rubbermaid 4D06 Configurations 23-Inch Foldable Laundry Hamper, Natural Vacuum Cleaner -
Dirt Devil Dynamite Bagless Upright with On-Board Tools - M084650RED Curtains -
Solid Thermal Insulated Blackout Curtain 84”L- 1 Set-BLACK Screwdrivers -
Titan 17237 Insulated Electrical Screwdriver Set - 7 Piece
Shipping from amazon is fast and usually well packed; this is not true for furniture though, and I strongly advise purchasing anything over 20kg elsewhere, the dining table had to be delivered three times before I got one that hadn’t been damaged in shipping.
From Totally Furniture
Arrived very quickly for such a massive item, cannot fault the freight company they used.
From Walmart (Online)
Quite a hefty list; it takes a lot to fill an apartment…..
Many items didn’t make the list due to falling apart after only days, or arriving damaged.
Hopefully someone might find this post useful.
Made myself a nice new bash prompt using lua. Code can be found in this
I started off trying to set
PS1, but bash will incorrectly calcuate the prompt length. This leaves you with strange line wrapping behaviour. Thanks to
Rob Hoelz I found out about
PROMPT_COMMAND, which allows you to run a command before PS1 is printed.
I used ljsyscall to avoid as many new processes as possible, they could be replaced by commands if you want.
To get the git and mercurial (hg) status, I had to call out to see if the current directory is inside a repository: this can sometimes be slow, as git and hg have to traverse the whole way up the directory tree
PROMPT_COMMAND caused issues when scrolling through history, or pressing backspace at the beginning of a line. From the
#bash IRC channel I found out that you can inform bash of non-printing characters by wrapping the bytes in
\2. The gist has been updated.
Lua Workshop 2012
I’m excited to be going to the lua workshop this year.
If you’re going, make sure we have a chat!
Document your ABIs!
Most of the time when programming in C, your API IS your ABI; but there are various cases where use of a pre-processor will break this symmetry.
I should be able to interface with your library without running a pre-processor over the headers first.
Getting FFmpeg on windows
All the guides to getting ffmpeg working on windows seem to be extremely outdated; so here is a quick howto:
mingw Install mingw with MSYS option; it will download and setup in C:\MinGW
Get the mingw coreutils extra package (can be found from
here); current version Install the coreutils extras package by un-7zipping and un-tarring it to C:\MinGW\msys\1.0\bin
yasm; save it as C:\MinGW\msys\1.0\bin\yasm.exe Download and extract
ffmpeg source (I used revision 647ec6f) Edit your C:\MinGW\msys\1.0\etc\fstab file to add the location of your ffmpeg source
Open MinGW shell (it should be in your start menu)
change to the directory you extract ffmpeg (going via the alias you added in fstab)
Prosh Week 2010
An awesome week of fun and games at melbourne uni.