Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the gd-system-plugin domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/wp-includes/functions.php on line 6114
July 2015 – Eric Scrivner
Implementing Genetic Algorithms In Scheme
home // page // Monthly Archives: July, 2015
genetic algorithms
Technical Tips

Implementing Genetic Algorithms In Scheme

I’ve been learning a lot of Scheme programming recently, and while learning is great, it’s nothing if you can’t cut your teeth on a project of your own every once in a while. I needed a project. It had to be something not dictated by SICP, something fairly challenging, and also something of decent size. When I first tried reading SICP in college, I’d tried implementing genetic algorithms in it and failed horribly. To see if I’d made any progress I…

Technical Tips

Python Tip: Convert XML Tree To A Dictionary

I was doing a simple XML integration with SOAP service today and it really struck me that a lot of the data manipulation would be easier if the data was a dictionary. In addition, the XML returned was guaranteed to be fairly small and have only a handful of schemas – so a full-blown SAX parser wasn’t really necessary as there was no risk of overflowing memory with the raw XML data. So I decided to write a simple recursive…

Technical Tips

Trying To Recreate An SICP Example In Python

This morning I was playing around and decided to try and recreate an example from Structure and Interpretation of Computer Programs (SICP). Along the way I discovered some unexpected gotchas with how Python scopes closures. The example I was trying to reproduce was the following one: (define (make-account balance) (define (withdraw amount) (if (>= balance amount) (begin (set! balance (- balance amount)) balance) "Insufficient funds")) (define (deposit amount) (set! balance (+ balance amount)) balance) (define (dispatch m) (cond ((eq? m 'withdraw) withdraw)…

Misc Opinion

Why You Shouldn’t Be A Dabbler

One of my favorite books of all time is “The War of Art” by Stephen Pressfield. I’ve read or listened to this book, cover to cover, more times than I care to recount. Yet every time I come back to it something gets freshly reinvigorated within me. You see, what’s incredible about this book is how, in one brilliant maneuver, Steven simplifies the creative persons struggle by naming their primary enemy. He calls it resistance. Resistance is the union of all…