Inspired by recent journey into lisp and scheme, I thought I’d have a crack at bringing some lisp-like heterogeneous lists into c. To compliment this, I’ll also implement some lisp primitives, namely cons, car and cdr, for list operations. Up for discussion: are the lists in this post truly heterogeneous?
An exercise was posted over at ProgrammingPraxis called ‘Jumble’. The aim is to re-arrange a collection of jumbled letters into a real word. A few solutions were posted on the blog (including the original solution in Scheme which is quite nice). I included a solution in gawk in the comments,
… exercise a degree of skepticism with regard to the application of formulas for there is uncertainty as to the limitations of use or the areas of applicability.A.C. Ugural + S.K. Fenster in Advanced Strength and Applied Elasticity Forewarning. This post (as all others on this page) serve as a
In my earlier post discussing the markdown to html parser written in awk, I mentioned the potential to migrate the code over to Perl for some potential speed increases. This was driven mostly by two things Dependency on gawk only functions, reducing portabilitySomething else I don’t remember. Probably suspicious about
Unfortunately, I have been having difficulties with getting rendering inside code blocks. When using wxmaxima, the output from each line formats beautifully in latex, but when transferred to this blog the pretty format disappears. Hopefully I can resolve this for future posts… I’ve recently been looking at the tools I
Resizing a bunch of images from the commandline? imagemagick has your back. convert -resize 50% '*.jpg' small_%03d.jpg This will half the resolution of all .jpg‘s in the current directory, outputting the files with names like small_001.jpg, small_002.jpg, ... etc. Nice one.
Our c program can read serial data from a gps device. In this post we’ll look at how to set up a UDP server that other clients can query for up to date gps data. ... #include <string.h> ... //for threading #include <pthread.h> //for udp server #include <sys/types.h> #include <sys/socket.h>
Update: Missing memset(&new_config, 0, sizeof(new_config) in set_input_mode function would sometimes cause garbled incoming data from gps. Seems to have fixed the issue. The software implementation we discussed last time (written in awk) is fairly hamstrung. Running topreveals that the cpu usage idles at ~20% on my machine (my machine is
where am i? Check out my previous posts to get up to speed with extracting latitude and longitude from generated nmea sentences using awk, and then with setting up an aruidino with a ublox gps module to get live, real gps data. Now that we have working gps hardware, we
where am i? Just after latitude and longitude? Check out my earlier post for refresher on how to extract latitude and longitude from a file containing the $GPGGA nmea sentence using awk. Lets connect up the ublox gps module to the arduino. There are four pins, Vcc, RX, TX and