I’m happy to announce the first “release” of lazy-slides, an experiment in slideshow generation for lazy bums. The idea is simple:
- You provide a list of keywords
- lazy-slides finds pictures from the internet matching those keywords
- lazy-slides creates a presentation/slideshow from those pictures
- You present!
Right now it’s a bit rough. The only image source I’ve coded up is for flickr (if you don’t count the dummy test source.) Also, the only output backend it supports is beamer. In both cases, it should be relatively straightforward to extend lazy-slides.
Filed under: Uncategorized | Leave a Comment
I’ve released parameterized-testcase 0.2. This is primarily just a documentation release, with lots of improvements to the sphinx docs. Get it here.
Filed under: Uncategorized | Leave a Comment
ackward 0.4 is released
The 0.4 release of ackward is available now at the project site.
This release is focused on the logging module. It addresses a number of design issue and defects, and the sphinx documentation for logging is much more complete. It even includes example code for much of the module.
Filed under: Uncategorized | Leave a Comment
The quest for “project”
As many people have pointed out before, emacs does not come with any packages for managing software projects. It comes with almost all of the parts you would need – debugger support, compilation modes, etc. – but it doesn’t come bundled with any way to tie a bunch of files together in to a project. Certainly this isn’t required to do software development, and, just as certainly, there are a myriad of ways to approach the concept of “projects”. This latter issue is likely why the basic emacs installation side-steps the issue.
In any case, I recently decided to look into the available project management options for emacs. I’ve used enough other big IDEs and tools to know that projects can be really useful, so I was curious what I could get for emacs. I wanted one that didn’t disrupt my normal emacs flow, one that had a clear and explicit model of what the project comprises, and ideally one that was highly hackable.
I looked at a number of tools, include CEDET (probably good but too bulky-feeling), proel (nice, but I didn’t fit it’s model of the world), and mk-project (not really sure…just didn’t work for me.) Honestly, I didn’t spend a whole lot of time vetting these. My sense was that if the package didn’t click with me quickly, then it wasn’t what I was looking for.
The winner: eproject
Ultimately, I settled on eproject. eproject essentially comprises three concepts:
- a top-level directory for a project
- a collection of files in the project
- a collection of commands that can be run relative to the project directory
A project is simply stored in a file in the project directory, and there is a central collection of projects stored in a file in your .emacs directory. It’s a very simple model, and everything is easily accessible.
I won’t go into any details on how to use eproject; the project page and emacswiki do a fine job of that, and I don’t really have anything to add. I do suggest, however, that you run eproject through its paces a bit on some smaller project just to get a feel for it. All in all, though, I found it intuitive, well documented, and easy to work with.
NOTE: There is another emacs project package also named eproject. The name conflict is unfortunate and confusing, so be aware. I did try this second eproject in my search, and while it’s a fine piece of software it didn’t really fit my needs.
Using eproject with anything
Many emacs users are fans of the excellent anything, and for good reason: it’s awesome! Fortunately, Daniel Hackney (good programmer name) wrote anything-eproject which marries the two projects. anything-eproject allows you to access your projects and project contents via the anything interface by providing two new “sources”.
Making it work
Putting this all together in your emacs configuration is pretty simple. Just download the eproject, anything, and anything-eproject packages to your .emacs directory and add something like this to your configuration:
; load eproject (load-file "~/.emacs.d/eproject/eproject.el") ; Disable automatic addition/removal of files from projects. Optional. (setq prj-autotracking nil) ; anything + eproject integration (require 'anything-eproject) ; let project files be sources in anything (add-to-list 'anything-sources 'anything-c-source-eproject-files t) ; let projects be sources in anything (add-to-list 'anything-sources 'anything-c-source-eproject-projects t)
Future work
While eproject works well, there are some things I would like to add. First, it can be a bit cumbersome to add a lot of files to a project, especially if the files in your project are spread across many directories. I’ve developed a small extension to eproject that tries to address this, and I’m working with the author to get this change in.
Second, I’d like support for “cloning” projects. I often work with multiple versions of very similar (often identical) projects, and it would be nice if eproject would let me bootstrap a new project definition based on an old one. This should be relatively simple, I think.
Filed under: emacs, programming | Leave a Comment
Tags: emacs, project
I recently upgraded my work machine to the latest Ubuntu version (natty narwhal, 11.<something>). By and large this went smoothly. However, we require gcc/g++-4.1 , and I had neglected to verify that this was available after the upgrade.
It wasn’t.
So, after a few abortive attempts to install packages I found on the web and such, I determined that what I really needed to do was just build gcc from source. I’ve done this a number of times in the past, so I knew what I was getting into, and by-and-large the process was very straightforward. I had to patch the gcc build files in a few places, though, so I figured I should document the process to save me and others time in the future.
NOTE: This is on an amd64 machine, building a compiler for the same platform. YMMV.
Install a few packages
For the build to work, you’ll need to install a few other packages that provide headers files, etc. The packages you’ll need are:
- linux-header-<kernel-version>
- gcc-multilib
(There may be others, and I’ll try to update this list as I hear about them.)
Make MULTILIB look in the right directories
In gcc/config/i386/t-linux64 you need to correct the directories used for MULTILIB stuff. Change line 9 from:
MULTILIB_OSDIRNAMES = ../lib64 ../lib
to
MULTILIB_OSDIRNAMES = ../lib ../lib32
Change the “version” string that the build expects from ld
The gcc build parses the output of “ld –version”. Unfortunately, ubuntu decided to change that output, causing gcc to think that the ld version is really old. In libstdc++-v3/configure change line 8284 from:
sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
to
sed -e 's/GNU ld (GNU Binutils for Ubuntu) \([0-9.][0-9.]*\).*/\1/'`
The full patch
You can download the patch from pastebin.
Be aware that this patch is only against gcc-core and gcc-g++, not against the entire gcc suite.
Step-by-step
These steps should more-or-less do everything you need to download, patch, build, and install gcc/g++-4.1. Everything will get installed to /usr/local/gcc-4.1/[bin,lib], and the programs will have the suffix “-4.1″.
wget ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-4.1.2/gcc-core-4.1.2.tar.bz2 wget ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-4.1.2/gcc-g++-4.1.2.tar.bz2 tar jxvf gcc-core-4.1.2.tar.bz2 tar jxvf gcc-g++-4.1.2.tar.bz2 <download patch from pastebin> cd gcc-4.1.2 patch -p1 < ../FKkiciZz.txt ./configure --prefix=/usr/local/gcc-4.1 --program-suffix=-4.1 make make install ...set up symlinks to /usr/local/gcc-4.1/bin/g++-4.1, etc...
Filed under: programming | 9 Comments
Tags: gcc, ubuntu
I’ve recently started making some progress on a project that I’ve wanted to do for a while now. The project, Thialfi *, fills the vacancy left in my life…indeed, in my heart…when “I Want Sandy” went offline. Sandy was something of an online digital assistant, and it (she?) probably had lots of features I never used. But it had one killer feature that I loved: You could send natural-language(-ish) emails to Sandy, asking to be reminded of something at a particular time, and Sandy would remind you. Simple, effective, practical, and nearly invisible.
Thialfi aims to emulate that feature. For example, I want to be able to send an email to Thialfi (using a custom address for my account, which only accepts emails from addresses I register) with a subject like “Remind me to top off the gas in the yacht next Wednesday at 5pm”. Next Wednesday, a little before 5, Thialfi will send me an email saying “Top off the gas in the yacht.” There are refinements and extensions to the idea (repeated events, SMS), but that’s the crux of it.
When Sandy went dark, some of its users talked about creating a replacement, but as far as I know none ever materialized. There are some other similar services I’ve tried, but none of them had the sheer simplicity and effectiveness (never mind the personality) of Sandy. That plus the fact that it’s an interesting project led me to start Thialfi. There’s not much there yet, and part of the curve will be learning more about Google’s AppEngine and web_app, but hopefully I’ll keep motivated long enough to create something really useful.
You can follow the action (or join in!) at the google code page.
* Thialfi is, by some estimations, the messenger of the gods in Norse mythology.
Filed under: programming, python, Uncategorized | Leave a Comment
Tags: appengine, programming, python
An enum for Python
The internet abounds with implementations of enumerations for Python, but I thought it might be fun to take a crack at making one. My goals were:
- Immutability: users shouldn’t be able to modify the value at runtime
- Simplicity of definition: They should be easy to define
- Uniqueness: Two enum values aren’t equal unless they are the same, no matter what their numeric value is
- Iteration: The user can iterate over the values in the enum
- Pickle-able: Naturally…
It uses a metaclass to add a custom __setattr__, __getattr__, and __iter__ to the user’s “enum class”, and it looks like this:
import enum class Level(metaclass=enum.Enum): LOW=1 MEDIUM=2 HIGH=3 x = Level.LOW Level.HIGH = 19 # Throws an AttributeError etc...
Filed under: programming, python | Leave a Comment
Tags: python
linseed-0.2
When I started using wmii for my window manager, I wasn’t able to find a system-resources display tool that fit my needs. There’s probably one out there, but I figured it would be more fun to write one than look very hard, and thus the linseed project was born. It amounts to a collection of modules which display various bits of system information: CPU utilization, used swap, and so forth. There is a top-level script that ties them together for convenience, though linseed is equally usable embedded inside another program.
I don’t know how or if linseed will continue to grow. I’m using it as a bit of a platform for learning things about distributing python, and especially using some of the new extension/plugin systems, so that may result in changes. Also, linseed is linux-only right now, so perhaps someone will decide that it needs to be extended for windows or something.
Filed under: Uncategorized | Leave a Comment
ackward-0.1 is released
I’ve put out my first release of the ackward library. You can get it at the project site. “Release early, release often”, they say. This release includes mostly-complete coverage of the the uuid, logging, time, and datetime modules. There are plenty of areas that need improvement, but I felt like it was time to get it out there!
Filed under: Uncategorized | Leave a Comment
I made some decent enhancements to PitaTranslate today. The main functionality is unchanged, but I made some usability and user-friendliness changes, in particular:
- Remembering user language selections between sessions. The normal usage pattern is to translate between between the same two languages almost all of the time, so I added a cookie which remembers.
- Added a “swap” button, much like you find in Google Translate.
- Moved some controls around. The language selection controls are above the text window now. The text window still gets focus by default, but now if you press TAB from that window you give focus to the “translate” button. Again, this is based on what seems to be the normal pattern of use.
I’d also like to give a big thanks to the gaeutilities project. I’m using their session implementation for cookie management; it gets the job done, was easy to use, and seems solid.
As always, you can use PitaTranslate at http://pitatranslate.appspot.com. If you find any bugs, have any ideas, or whatever, the project page is at http://bitbucket.org/abingham/pitatranslate/.
Filed under: Uncategorized | 2 Comments
Search
-
Blogroll
Recent Entries
- lazy-slides considers getting off its lazy butt and being constructive
- parameterized-testcase 0.2 released
- ackward 0.4 is released
- eproject + anything: simple emacs project management
- Compiling g++-4.1 on Ubuntu Natty Narwhal
- Thialfi: because I haven’t already got enough to work on!
- An enum for Python
- linseed-0.2
- ackward-0.1 is released
- PitaTranslate v12 has been unleashed
- UTD CS goodness
Categories
- c++ (4)
- emacs (1)
- euler (2)
- linux (1)
- programming (23)
- python (8)
- review (1)
- science (1)
- Uncategorized (17)