My Work

Personal projects that I decided to share. See my résumé for my professional work.

CL-TRADIER

cl-tradier is a thin, extensidble client for the Tradier API written in Common Lisp. It uses macros to define functions in a declarative style for calling each endpoint. For example, compare the Tradier documentation to endpoints.lisp to see why Common Lispers love macros.

cl-tradier has a MIT license and is hosted on GitHub.

My Honey's List

My Honey's List

My Honey's List is a personal project of mine that I started in 2010. Frustrated with the amount of time spent grocery shopping and meal planning, I decided to take matters into my own hands and create a simple web app to help save time.

My Honey's List allows users to create grocery lists that are categorized automatically. You can add recipes manually or import recipes from other sites. As your recipe library grows, you can create a shopping lists with just a few clicks by choosing your desired recipes for the week.

I work on this site in my spare time for fun, adding features as I see fit and experimenting with different coding techniques. The site uses WordPress and PHP to handle the homepage, help sections and the blog. The application part is coded in Common Lisp using the Weblocks web framework. The underlying database is Berkley DB.

VB.NET Property Generator

One thing I found lacking in Visual Studio 2005 is a quick and easy way to automically generate getter and setter properties for your private variables. This feature is trivial to add to Emacs.

The following elisp functions will take a buffer like this:

 strLastName
strFirstName
intAmount
dblPrice


and change it into this:

Private strLastName As String
Private strFirstName As String
Private intAmount As Integer
Private dblPrice As Double

Public Property LastName() As String
Get
Return strLastName
End Get
Set(ByVal value As String)
strLastName = value
End Set
End Property

Public Property FirstName() As String
Get
Return strFirstName
End Get
Set(ByVal value As String)
strFirstName = value
End Set
End Property

Public Property Amount() As Integer
Get
Return intAmount
End Get
Set(ByVal value As Integer)
intAmount = value
End Set
End Property

Public Property Price() As Double
Get
Return dblPrice
End Get
Set(ByVal value As Double)
dblPrice = value
End Set
End Property


You can easily configure the variable types it detects by modifying the alist *vb-types*. Here is the source:

;; Copyright (c) 2011, William Bruschi
;; All rights reserved.

;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:

;; Redistributions of source code must retain the above copyright
;; notice, this list of conditions and the following disclaimer.
;; Redistributions in binary form must reproduce the above
;; copyright notice, this list of conditions and the following
;; disclaimer in the documentation and/or other materials provided
;; with the distribution. Neither the name of the WB Technologies
;; nor the names of its contributors may be used to endorse or
;; promote products derived from this software without specific
;; prior written permission.


;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
;; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
;; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
;; FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
;; COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
;; INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
;; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
;; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
;; STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
;; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
;; OF THE POSSIBILITY OF SUCH DAMAGE.

(defconst *vb-types*
'(("str" . "String")
("dbl" . "Double")
("int" . "Integer")))

(defun var-name (var)
(unless (< (length var) 4)
(substring var 3)))

(defun var-type (var)
(unless (< (length var) 4)
(let ((type (substring var 0 3)))
(cdr (assoc type *vb-types*)))))

(defun insert-private-vars (var)
(let ((type (var-type var)))
(when type
(insert "Private " var " As " type)
(newline))))

(defun insert-properties (var)
(let ((type (var-type var))
(name (var-name var)))
(when (and name type)
(insert "
Public Property " name "() As " type "
Get
Return " var "
End Get
Set(ByVal value As " type ")
" var " = value
End Set
End Property
"))))

(defun props ()
(interactive)
(let ((vars (split-string (buffer-string))))
(erase-buffer)
(mapc #'insert-private-vars vars)
(newline) (newline)
(mapc #'insert-properties vars)))

Big Cyber City

Big Cyber City is another personal project of mine that I started way back in 2006. I created this site to learn more about Java web development. I took the site offline since I do not plan to maintain it.

Big Cyber City is a Tomcat Java application. It uses many open source libraries, including the Spring application framework, Hibernate for managing data objects, MySQL for data persistence, DWR for ajax handling, JUnit for testing, log4J for logging and Apache Tiles for templates.

The code for Big Cyber City is open sourced on Git Hub.

This Server

This site used to be hosted on a Raspberry Pi model B with 512MB ram and 700MHz ARM processor. I have since moved to Amazon S3 for static hosting. The Raspberry Pi still acts as my personal email server. It uses ddclient to manage DNS entries.

The blog pages are produced by a custom Common Lisp program I wrote tailored to my needs.