Lua Case Insenstive Table

Introduction This is something I wrote for PenLight but alas it wasn’t merged. The problem they had is the use if __pairs which isn’t present in Lua 5.1. The project wants to maintain compatibility with 5.1 and LuaJIT which targets 5.1. All the Lua projects I deal with are Lua 5.3 and there isn’t a clean way to make a case insensitive table without using __pairs. So I’m posting this here because I find it useful....

February 12, 2019 · John

BPF Skid Plate

Introduction I decided to enhance the look of my Tacoma by buying a skid plate. While I do want something that will work as a skid plate, I didn’t want a lump of grey metal. The TRD Pro skid looks good but I’m not a big fan of trying to make one trim look like another. I decided to get Bullet Proof Fabricating’s (BPF) skid plate. It works as as skid and in my opinion is the best looking one you can get for the Tacoma....

February 1, 2019 · John

Moving From WordPress to Jekyll

Introduction When I first started this blog back in 2008 I hosted it myself using an Arch Linux instance with Linode. For the blogging platform I used WordPress MU because it was, and still is, one of the most popular blogging platforms. At that time the MU version was how multiple domains (subdomains) were supported on a single installation. Later it was merged into standard WordPress. It was easy to use and Administer....

January 21, 2019 · John

WordPress Gutenberg Editor is Garbage if You Need to Post Code

Introduction Recently WordPress.com (and WordPress in general) has started pushing the new Gutenberg editor. It uses a block based model instead of a traditional document centric one. This I don’t like but I also don’t mind. It’s a different way of composing and I can see the benefit. However, Gutenberg is not ready if you post source code and I do this a lot. Posting source code used to be done using the [code] shortcode....

January 1, 2019 · John

Mergesort in C

Introduction Quicksort is most people’s go to sort function and that’s not a bad thing because it’s a really good general purpose sorting algorithm. A good implementation is really fast and, being an in place algorithm, it uses very little memory. The big drawback of Quicksort is that it’s non-stable. This means there are some situations where using Quicksort a deal breaker and can’t be used. Enter Mergesort which is stable....

December 5, 2018 · John

General Comparison Functions in C

Introduction qsort, heapsort, mergesort, bsearch, and many more search and sort functions all take a compar argument to determine the sorting order of elements in an array. The compar function takes the form int (*compar)(const void *, const void *). The compar function’s parameters are the address of two of the elements in the array. The parameters will need to be dereferenced before they can be compared. Any type of value can have a compar function written for it and it can be used to sort an array of any type....

November 27, 2018 · John

Softening the Tacoma TRD Sport Ride

Introduction The TRD Sport is known to have the hardest ride of any of the Tacoma trims. You’d except this from the Sport model with a sport tuned suspension. Out of all the trims the Sport has the least body roll and is the best handling Tacoma. As with all sport suspensions, this comes at the expensive of ride comfort. Overall I like the way the TRD Sport rides and in the city with maintained roads it rides very well....

August 2, 2018 · John

KDocker 5.2 Released

This isn’t a huge release but includes a very nice new feature. Lock to desktop! This will force the application to always open on same desktop (when using multiple desktop workspaces) that it was originally docked on. The default behavior is to still to open on the current desktop. The source code for this release can be found here. The kdocker . com domain has expired and is now held by a squatter that will tell you your flash player is out of date....

July 26, 2018 · John

Went Back to the TRD Sport

Introduction Awhile back I wrote about my experience with the TRD Sport and TRD Pro where I concluded the Sport is better suited for me. Since writing that post, knowing that the Pro just isn’t right has been nagging at me. The ride and handling are the biggest things I keep coming back to. Spur of the moment I decided to trade my Pro for a Sport. Model Model year 2018 Cab 4 door Bed Short bed Engine V6 Transmission Automatic Drive 4x4 Seats Cloth Climate Standard single zone with dials Safety Parking sensor and blind spot monitoring Tow package Yes What’s special about this truck is, it’s nearly what I wanted when I got my first TRD Sport....

July 18, 2018 · John

Quicksort in C

Introduction Quicksort is one of the most common sorting algorithms and one of the most efficient. It’s so common that it’s part of C89. That said, it’s still good to know how it works, its strengths, and it’s weaknesses. It takes as a divide and conquer approach to sorting. An element is selected as a pivot point. The elements are sorted against the pivot so all elements less than the pivot are on the left side and greater than elements are on the right....

June 17, 2018 · John