In yesterday's class of the Python-infused Linear Algebra course I'm taking, a fellow student noted the strange ordering of items in a set when printed. It seemed that the printed order of the set items always swapped the first two items, but left the rest unchanged. I don't know what sets he tried, but I was interested in the general behavior, and so began my quest through the Python source code...
I have carved out a small slice of the great Intarwebs to share with you my goings on.
Showing posts with label projects. Show all posts
Showing posts with label projects. Show all posts
Wednesday, February 15, 2012
Set ordering in Python: why I didn't sleep last night
Labels:
code,
programming,
projects,
python
Location:
217 Thayer St, Providence, RI 02906, USA
Friday, April 24, 2009
I got GSoC 2009!
My proposal for the Google Summer of Code 2009 was accepted! I will be working on Drupal, specifically completing work on the Version Control Integration API with the goal of allowing Drupal to switch from CVS to a DVCS (most likely Git) for its main version control.
It will be a difficult task, but much of the baseline work has already been done, so I will be mostly filling in the gaps in functionality and finishing up the few areas where the Git backend lags behind the CVS one. You can look at my proposal here, and I will endeavor to make relatively frequent status updates on this blog. I am chrono325 on Drupal.org, and will try to spend some time on the #drupal irc channel on freenode, so if you have questions, that's how to get in touch.
Yay for Google!
It will be a difficult task, but much of the baseline work has already been done, so I will be mostly filling in the gaps in functionality and finishing up the few areas where the Git backend lags behind the CVS one. You can look at my proposal here, and I will endeavor to make relatively frequent status updates on this blog. I am chrono325 on Drupal.org, and will try to spend some time on the #drupal irc channel on freenode, so if you have questions, that's how to get in touch.
Yay for Google!
Tuesday, February 24, 2009
Programming Project Resume
This is a list of my personal programming projects. Most of them were one-time projects to scratch an itch or play around with something and are not maintained.
- A listing of most of my personal projects is available here.
- I am the maintainer for smart tab, a small Emacs package to allow the tab key to automagically indent or complete, depending on the context.
- My .emacs directory.
- I am the webmaster for the Brown Ballroom Dance Team website. Notable features of the site include faceted video search of nearly 2000 videos (see an example), similar management of costumes owned by the team (viewable only by team members), and user profile management.
- I worked on the Drupal version control integration libraries for the 2009 Google Summer of Code. The packages I worked on are here, here, and here.
- I added support for many CCK fields to the Drupal Apache Solr integration project and refined the existing framework for supporting CCK fields.
- I am working on Ezbl, a web browser based on the Uzbl browser project. It provides a glue between Emacs and Uzbl, forwarding commands and managing history and cookies.
- I have contributed to package.el, the package manager for Emacs. Some of my work has been integrated into the development branch for Emacs 24, and I am working on an overhaul of the codebase.
Saturday, September 15, 2007
I Want it that WAE
Whew! I just now finished my very first programming language, WAE. That's right, I wrote a parser and interpreter from (sort of) scratch. Unfortunately it has nothing to do with the Backstreet Boys.
The part I'm not telling you is that it's for CS 173: Programming Languages and that everyone in that class did the same, but it is still big.
Out of all of this I have realized that it is good to get started on work early so you can start your Friday night earlier than 12:30 or so you can eat sometime between 4PM and then. Honestly though, as CompSci projects go, this one was not that bad. It was only about 6 hours in total and only 400 lines of code, which pasted into a typical word processor would be about 10 pages single-spaced or about 19 double-spaced. Obviously this is comparing apples to oranges a bit since a good number of my lines are blank. On the other hand, code (especially scheme) is much more dense than most prose.
Anyway, this wonderful language is pretty simplistic compared with something that people would actually use, but seeing as I banged it out in one 6-hour session, it's not bad.
Here is a very brief overview of how it works:
The syntax is similar to Scheme/Lisp and uses prefix notation with curly braces {}. This is not by mistake. Scheme has the wonderful feature that it can tokenize parenthesized strings merely by adding a single quote to the beginning. So this:
would return a list with the elements "a" "b" and "c". This is amazingly useful because it allows me to skip the entire step of scanning, which is a bitch. Seriously, I spent a good part of my summer fighting with Java over whether I could actually use if for scanning.
Normally, I would show a "Hello World," but since this language doesn't support strings, that won't happen. Like I said, simple language.
Instead, I will have it add 1 and 1. Behold:
To most people this looks weird, but it has some nice advantages. First, it is very simple to parse; secondly, it makes nesting very trivial like so:
That means "add 1 to the sum of 2 and 3."
It even has scoped variables!
The result of which is 7. See if you can figure out why!
If you are really interested in this and other languages, I highly recommend CSCI1730 by Shriram. You can take a look at his book (for free!) here.
Now off to Joe's!
The part I'm not telling you is that it's for CS 173: Programming Languages and that everyone in that class did the same, but it is still big.
Out of all of this I have realized that it is good to get started on work early so you can start your Friday night earlier than 12:30 or so you can eat sometime between 4PM and then. Honestly though, as CompSci projects go, this one was not that bad. It was only about 6 hours in total and only 400 lines of code, which pasted into a typical word processor would be about 10 pages single-spaced or about 19 double-spaced. Obviously this is comparing apples to oranges a bit since a good number of my lines are blank. On the other hand, code (especially scheme) is much more dense than most prose.
Anyway, this wonderful language is pretty simplistic compared with something that people would actually use, but seeing as I banged it out in one 6-hour session, it's not bad.
Here is a very brief overview of how it works:
The syntax is similar to Scheme/Lisp and uses prefix notation with curly braces {}. This is not by mistake. Scheme has the wonderful feature that it can tokenize parenthesized strings merely by adding a single quote to the beginning. So this:
'(a b c)
would return a list with the elements "a" "b" and "c". This is amazingly useful because it allows me to skip the entire step of scanning, which is a bitch. Seriously, I spent a good part of my summer fighting with Java over whether I could actually use if for scanning.
Normally, I would show a "Hello World," but since this language doesn't support strings, that won't happen. Like I said, simple language.
Instead, I will have it add 1 and 1. Behold:
{+ 1 1}
To most people this looks weird, but it has some nice advantages. First, it is very simple to parse; secondly, it makes nesting very trivial like so:
{+ 1 {+ 2 3}}
That means "add 1 to the sum of 2 and 3."
It even has scoped variables!
{with {{x 1}
{z x}
{x 2}
{y 3}
{w x}}
{+ 3 {+ {- z w} {+ y x}}}}
The result of which is 7. See if you can figure out why!
If you are really interested in this and other languages, I highly recommend CSCI1730 by Shriram. You can take a look at his book (for free!) here.
Now off to Joe's!
Tuesday, August 14, 2007
My Public Projects
After recently having made the switch from Subversion to Git I created a GitWeb site of all of the projects of mine which can be publicly distributed (i.e. no homework or encryption keys).
Without further ado, here it is:
https://git.haxney.org
The https part is important, since it is hosted on a computer behind the evil veil of RCN's inbound port 80 filter. Note that I use a self-signed certificate, so you will have to accept that if you want to view my work.
Should you decide to check something out, you will need to tell git to ignore the self-signedness of my certificate with the following command:
To make git ignore the unverifiable certificate in the future, run
This will tell git to ignore invalid certificates for this project. If you throw a "--global" between the "config" and "http.sslVerify", you can set this behavior for the current user. This may not be a good idea, but can save you hassle if you are pulling from a lot of self-signed repositories.
Without further ado, here it is:
https://git.haxney.org
The https part is important, since it is hosted on a computer behind the evil veil of RCN's inbound port 80 filter. Note that I use a self-signed certificate, so you will have to accept that if you want to view my work.
Should you decide to check something out, you will need to tell git to ignore the self-signedness of my certificate with the following command:
$ GIT_SSL_NO_VERIFY=true git clone https://git.haxney.org/git/.git
To make git ignore the unverifiable certificate in the future, run
$ git config http.sslVerify false
This will tell git to ignore invalid certificates for this project. If you throw a "--global" between the "config" and "http.sslVerify", you can set this behavior for the current user. This may not be a good idea, but can save you hassle if you are pulling from a lot of self-signed repositories.
Subscribe to:
Posts (Atom)