I came across a page talking about the joys of OOP via this blog post. The original page was a thing of horror. I modified the Elisp code from Irreal, adding a few additional features:
I have carved out a small slice of the great Intarwebs to share with you my goings on.
Sunday, November 18, 2012
Sunday, February 6, 2011
Size of Minecraft chunk files
Monday, September 13, 2010
Test of org-googlecl
I heard about this great project called Org-GoogleCL, which allows for publishing of blog posts to Google's Blogger from within Emacs' Org-Mode. This is a test of that library.
Hmm, there seem to be some issues with it not posting the full thing. I'll have to dive into the code at some point…
Edit: Oh, looks like it is working now. Still are some problems with filling paragraphs, though.
Saturday, March 20, 2010
yt-bulk-py: A good program with a bad name
Monday, March 1, 2010
Comparing Emacs Version-parsing Libraries
Saturday, January 2, 2010
Wearing SOCKS with Emacs
bindat package of Emacs. It is basically a way of writing specifications for translating binary to alists (attribute lists) and back again. Once you have a specification written (and it is pretty easy once you get the hang of it), converting data back and forth is incredibly easy.
I did run into a slight hitch with a couple things, though:
Thursday, December 31, 2009
Chomping in Emacs
chomp-like function to strip leading and trailing whitespace from a string. After some searching, I found a solution, but it was kind of ugly (specifying the whitespace characters exactly rather than using a character class), so I modified it a bit. Here is my result:
Saturday, December 19, 2009
Yo dawg
For more information, check out my older Ezbl post.
EDIT: See new Special Edition Emacs browser meme:
Yo dawg, I herd u like Emacs in a browser, so I put a browser in ur Emacs so u can Emacs in ur browser in ur Emacs while u browse ur Emacs in ur browser.
Thursday, December 3, 2009
Ezbl updates
Monday, August 24, 2009
It's Alive!!!
After nearly a month of (very sporadic) work on it, I have finally done the impossible: embedded a fully-featured web browser in Emacs. Behold:

I am calling my creation "Ezbl," pronounced "ease-able." It is a combination of Uzbl and Emacs. Right now, Ezbl is still in the early stages, but it can display a Uzbl window and receive commands from Emacs (over Uzbl's STDIN).
Currently, it requires a patched version of Emacs (available here) which supports embedding widgets and windows, such as Uzbl. It is still in an early state, and any of the drawing-related problems will be caused by the xwidget code. Joakim Verona is the genius behind the xwidget code, so talk to him if you have suggestions about that aspect.
Right now, I'm using the following code to start an instance of Uzbl (which can be called interactively):
(ezbl-open "www.google.com")
You will notice that it creates a buffer called "*ezbl-display-xxxx*", where "xxxx" is the pid of the Uzbl process. To browse to a different page, execute:
(ezbl-command-uri 1234 "www.yahoo.com")
Where "1234" is the pid of the Uzbl process. This will be cleaned up in the future with an "Ezbl" major mode and interactive commands.
Just recently, I've added a live(ish) updating display of the current page title and URL to the mode-line, shown here:

The interface still needs quite a bit of work, and it is not yet possible to type into text areas of the browser window. If you are interested in helping out, I have a GitHub project here to which I regularly push.
Eventually, I plan to have Emacs manage history and cookies, as well as multiple "tabs," which will be done by having one Uzbl window per buffer. It has a long way to go, and is not at all useful for real browsing at this point, so help is greatly appreciated.
Enjoy!
Saturday, July 18, 2009
I need to stop reading about programming languages
There is a lot of cool stuff going on in programming languages now and pretty much since the beginning of
time, i.e. January 1, 1970. How to handle concurrency is one of the biggest things facing the language world right now, but there are tons of other things, like JIT optimizations and experiments in language interoperability (such as Parrot).One example of a solution to the "concurrency is hard and threads suck" problem is the Termite language. It is built on top of the Gambit Scheme compiler/interpreter and implements the message passing style of concurrency. Take a look at the paper describing Termite; it has some cool examples of what you can do with message passing stuff. Of course, this is all stuff that Erlang has been doing forever, but nobody seems to want to use Erlang for anything but telco systems, for whatever reason.
Of course, as an Emacs fan(atic), talk of a cool Lisp-family language immediately got me thinking about a replacement for the desperately-outdated Emacs Lisp. That lead me to a proposed plan for replacing Emacs Lisp with Scheme... from 1996. It's been more than a decade, and as far as I can tell, there has been nearly zero progress in actually making that happen. The plan makes it sound like it would be relatively easy to do (barring some incompatibilities between Scheme and Elisp), but there is not any hint of it being in a better state now than it was then.
This is not a criticism of the people working on it; there are a lot of brilliant Emacs hackers, and the fact that it hasn't happened already means that it is a really hard problem to solve. It is more of an example of why I need to avoid spending too much time reading about programming languages: it's depressing. In comparison to most everything else in the computing industry, languages seem to move at a positively glacial pace. I get all excited about how some cool asynchronous, message-passing, migratable dialect of Scheme could be used to make a concurrent and fast Emacs implementation; then I go back to PHP for my programming, which doesn't have namespaces, integrated packaging support, or even a decent threading system, and cry a little inside.
I blame you, Steve Yegge. You made me dream again.
Monday, May 25, 2009
Tabs of Genius
- Adding Drupal file extensions (.module, .incto the recognized PHP patterns
- Using notify.el to pop up the cool new notification system in the latest version of Ubuntu whenever my nickname is mentioned on an IRC channel which I have joined.
- Replacing my own ido-enhanced M-x with the pimptacularSmex program.
- Updated nXhtml to the latest version. For a good example of how NOT to write commit messages, check out the (otherwise excellent) repository on Launchpad.
- Move some more packages from my elisp directory to ELPA. This lets me cut down on the amount of path configuration and autoloading in my configuration files, as well as managing its own updates.
- Replace pabbrev with Smart Tab, (hence the name of this post) which uses the massively powerful hippie-expand to return better results. I ended up developing it from a simple function rebinding tab to a full-fledged global-minor-mode (which does nothing but rebind tab :) and a git repository on github. My next move is to clean up all the little issues and try to get it included in ELPA. It is my first time maintaining any sort of package for public use, and a lot more goes into it than I thought. It's kind of neat.
- Shuffle some configuration files about and update the copyright dates on my config files. Not like anyone is going to infringe them, right?
- Spent FAR more time than should ever be necessary hunting down a (relatively benign) bug in anything.el which clobbered the key binding for
occur. Long story short: there is actually a difference betweencopy-keymapandset-keymap-parent. I'm going to see about pushing that change back upstream, though I'm not exactly sure what the "official" repository for anything.el is, aside from some files on EmacsWiki. - Spent a great deal of time figuring out how to get Smart Tab and auto-complete to play nice with each other. It eventually turned out that the bulk of my problems was that I was setting up my
autoloads after loading Custom, so libraries which were expecting Custom to initialize them were left hanging. - Started, but got sidetracked from, setting up some form of tags file for at least PHP, since that is what I'm going to be spending most of my time working on. Unfortunately, given the nature of the interaction between the program which generates the tags and Emacs, it is non-trivial to have an automatically continually updated base of tags. Additionally, the format Emacs uses is apparently fairly inefficient (requires linear scans for all/most operations), but there is a rich ecosystem of libraries and helpers around it. I'll have to look at it some more later.
- Looked into being able to use
ido-completing-readeverywhere the vanillacompleting-readis used, making variable and function lookups much more pleasant. It is not as easy as simplydefaliasingido-completing-readtocompleting-read, sinceido-completing-readitself callscompleting-readduring its execution. I asked StackOverflow if anyone had a solution, and nothing has come back so far. It would be really convenient if there was acompleting-read-functionvariable which you could simply set to code>completing-read orido-completing-readand be done with it. What's worse,ido-completing-readis a drop-in replacement forcompleting-read, so most libraries likely would not notice or care.
Whew! That was a lot! I haven't had a good Emacs indulgence in a while, and I forgot how fun it is!
Many of the changes I made were a bit more under-the-hood, but I've already fallen in love with Smex, and from what I hear, Anything.el is pure bliss (I haven't had a chance to set it up and get used to it fully).
The big thing I'd like to spend some more time on is improving the situation around EmacsWiki. It is a great site, with a healthy community of interested people, but a Wiki is a pretty bad form of version control. Once need only look at something like line numbering, where there is one for Xemacs only, line-num.el, linum.el, setnu.el, setnu+.el, lineo.el, and a number of patches for each of them, mingling around in a long page which also serves as the bug tracker. I would like to see much more organization (though obviously not at the expense of productivity) and ease of deployment (like with ELPA). Even for packaging, there are at least six different and incomplete (in that they don't index all or even most packages) implementations of packaging programs. Competition and diversity are good, but there comes a point when it means that nothing actually ends up usable.
Well, I've certainly got a lot cut out for myself, but it all looks interesting. And maybe, when I'm done fiddling around with Emacs, I might actually get to some Drupal programming. You know, the thing that's supposed to be my job.
Friday, November 16, 2007
Many TeXnicalities
So it has been a while since my last post. Life has been busy.
Specifically I spent most of last weekend dancing and all of this week working. Starting at about 3:00PM on Friday, November 9th and lasting until about 8:00PM on Sunday, I was doing some form of dance. It started with about an hour of Swing practice with Sarah for another showing of our Aladdin piece followed by the actual performance of it at 5. After that I had an hour of free time before Ballroom practice. You see, there was a competition Sunday, so every free moment I could find was spent meeting with partners.
After that, rather than take the smart route out and go to sleep, I made the long trek over to Machado for about three hours of... dancing.
Saturday was similar. I was meeting with ballroom partners up until it was time to prepare for the one and only SexPowerGod. While that may not have been purely dancing per se, it was most definitely tiring. After that, I had two hours to shower and change into something halfway respectable for the Brown Ballroom Competition for which I had to leave at 5:30AM. Being the largest single-day ballroom comp on the east coast, it went for a while and took the last bits of energy out of me until I could not even successfully point a video camera at stationary dancing couple.
My exhausting weekend aside, this post is about the glories of LaTeX. I picked it up sometime last year when CS22 suggested that all homework be done with it and have become so hooked on it that I almost wrote a $ before a mathematical equation in class today.
For those of you who don't know it, LaTeX is what you would turn to if you feel that word processing should be a subset of programming or feel the need to use Emacs for all aspects of their lives (I added music player to that list last night). Rather than pressing Ctrl-B to make text bold, you would write something like this:
\textbf{Bold text!}
The main point of this post is to gush over two related discoveries I recently made regarding LaTeX and Emacs. They are WhizzyTeX and Active-DVI.
WhizzyTeX is a minor mode for LaTeX editing in Emacs which opens an external viewer to mirror changes made to the source file in real time. So as you type, the dvi file gets update, AUTOMAGICALLY! For plain text this is not that big of a deal, but for complicated mathematical expressions or manipulation of parameters to get a look right, this cuts down on the edit-compile-review loop which can suck time away from creating masterful works. It also has the benefit of real-time error checking beyond what AucTeX already provides, so it can catch mismatched braces or unrecognized control sequences as you (mis-)type them. It is kind of like what I think flymake is like (I have never actually used flymake, so I don't know for sure). Finally, it has some fancy features which depend on Active-DVI (advi) like mouse-editing of LaTeX documents, such as dragging a control to size an hbox. Neat, but not often used.
Advi is like xdvi on steroids. It is a viewer as well as a document style for making snazzy presentations. Seriously, check out some of the stuff on the site. It can embed videos, launch external applications, and even embed those applications in the same window as the presentation, so you could potentially run Emacs within a dvi or even run advi within itself recursively! The possibilities are endless.
Unfortunately I have not had to make a presentation any time within the last couple years, so it is unlikely I will get to take advantage of all of that sweetness, but it is cool to know it's there.
My only gripe so far is that WhizzyTeX necessarily opens a new window for the preview. I have the screen real-estate, but it would be nice not to have to leave Emacs for anything (soon I'll have email in there as well). I did some searching for the possibility of embedding an X11 application within an emacs buffer (like how it displays pictures, but again on some fat 'roids). That way I could have advi sitting in an Emacs buffer and put that in a separate window from the source and have all of that wonderful interaction. I did some searching but was unable to find anything suggesting that this is possible. If anyone knows anything about it, please let me know. My X11 hacking skills are insufficient to just do it myself, so that's out.
Anyway, I'm off to TA CS31. Get more sleep than I did this week!