I’ve just uploaded to GitHub five more lightweight Python scripts that I’ve created. Two of them out of necessity for a quicker way to do something. With the others, I’m just playing around or learning something quickly.
Check it out at: https://github.com/manney/misc-python-scripts
I’ve added a couple of old projects to GitHub today: MESSyFront and Seeverse. Both of these are written primarily in C. In addition to C, MESSyFront uses a Python script to launch emulation.
- MESSyFront is a frontend for the MESS emulator. The main goal of the project is to get the user into the emulation environment as quickly as possible. The secondary goal is targeting Tandy Color Computer users that run Linux (or *nix environments). This project is no longer active and very out of date. (MESSyFront has a homepage here as well.)
- Seeverse is a command line application that looks for a bible reference in a text file that contains any amount of properly formatted bible verses. This project is no longer updated and contains known memory leaks.
Once a year updates? Cool.
Well, over the last year, I’ve been toying with Common Lisp. Although I’m not as far as I’d like to be, I’ve made a couple of things that are interesting anyway. One of these interesting tidbits is my CSV reader. This wee script takes a CSV file and translates it in to a list that can then be eaten anyway you like… even with salsa.
There is an alleged CSV standard around. I don’t really follow this much. I took a few items that looked interesting to me and added them in. Read the code if you’re really interested in what it can do.
UPDATE (09/23/2012): I now have the code for this hosted at github under the name of “basic-csv.”
I’ll have to admit it. I’m not much of an author. I think everyone’s figured that out by now, though… Anyway, I’ve been busy learning Common Lisp over the past month or so. I’m still very shaky with it as it’s quite different than anything else I’ve programmed in. My brother, who tries to use Lisp (via Clojure) any chance he gets, directed me towards Project Euler to help learn how to use the language.
I’ve now completed 5 problems. None of them as efficient as I could have, but these are still the early days. The last problem I completed was finding the sum of the digits of 100!. For some reason, it gave me a great feeling when I completed this one. It may be that I’m beginning to feel a bit better using Lisp or maybe that I’m not running in to as many road blocks as I was even yesterday, I dunno. Anyway, to show it off, I’ll post the code to my ‘not-so-efficient’ answer to problem 20:
(defun fac (n)
(if (<= n 1)
(apply #'* (loop for i from 1 to n collect i))))
(defun euler-problem-020 ()
(let ((string-version "")
(setf string-version (princ-to-string (fac 100)))
(loop for i from 0 below (length string-version) do
(setf ch (char string-version i))
(setf sum (+ sum (parse-integer (princ-to-string ch)))))
Thanks for coming to visit SCRATCH. The purpose of this page is to be my public scratch pad that I would like to fill with my programming work. Right now there isn’t much here, but with time (and as my interest dictates) there should be more things showing up.