My first attempt at managing multiple projects had the unintended consequence
of holding me back from fully realizing the full potential of Emacs. I ran
emacsclient
sessions in GNU Screen for each project I worked on. I could
flip between different frame configurations, each one set up for an individual
project. This worked well enough that it kept me from running Emacs as a
graphical interface.
Eventually, Jon Rockway convinced me that I should abandon command-line emacs and use Emacs as it was intended; as a graphical application. However, I had developed a dependence on multiplexing in my workflow that was hard to break. I first tried Elscreen, which allowed me to try multiplexing my projects natively in Emacs. However, the default configuration took up screen real estate and I didn’t have the patience to try and remove it; so I quickly started to look for alternatives.
The next option I came across was escreen. This was better suited to my workflow, and it used existing resources to manage workspace switching. Specifically, it embedded the window configurations into the buffer used to store frame configuration information, which I thought was ingenious. I was able to configure it so that my transitions between my constantly open GNU Screen terminal and Emacs was seamless. I would combine this with matching up the screen numbers per project, which allowed me to navigate my project transitions with very little mnemonic overhead.
Escreen is an excellent package, but still left a few features wanting. Specifically, I wanted:
escreen
hasn’t seen any development in a few years,
and I do not have the time and/or experience to round off the sharp edges.A bit of research led me to check out
workgroups. Puns aside,
this is an excellent piece of software for managing window configurations. I
was able to install the package from MELPA and configure it close enough to my
escreen
configuration so that I haven’t been able to functionally notice the
difference. Here is what I have so far:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
Most of the code here was provided by this Stack Overflow post.
So what do I have now?
I can now switch to workgroups by name! This makes it much easier for me to name projects and completely forget about matching up numbers. I can still match up numbers if I want, but why bother?
I can restore my workgroup list after a restart. This makes it much easier to reboot and get back to where I left off.
Re-ordering workgroups is easy and awesome. Using my configuration, C-z
C-,
and C-z C-.
will move a workgroup left and right, respectively. This
makes it much easier to arrange things in case something gets out of whack.
All my key bindings are still the same. I don’t have to worry about altering any of my muscle memory to accommodate for a new workflow; it is just the same plus more features.
workgroups
is definitely a much more mature and polished product. Despite
this, escreen
was able to dodge a lot of rough edges and rely on Emacs’s own
built in abstractions by using the frame buffer to host workgroups that I am
missing with workgroups
so far:
escreen
, each workgroup had its
own list of visited buffers. This meant that my buffer visiting activities
bled into each other less frequently. It appears that with workgroup
that
the visited buffer list is not localized to the workgroup, which is
frustrating.Despite the progress, There are a few things left on my to-do list for workgroups
.
Persistent buffers - I haven’t yet managed this. The only thing that gets saved and restored right now are my buffer names.
Default new workgroups - I would like to have some default behavior when
creating new windows. I name my windows after my projects; if I open a
workgroup foo
and there exists a directory $HOME/git/foo
, I would like
for the window to have a magit buffer there open to the project, waiting for
me. If I could get this to work in conjunction with
eproject or
projectile, that would be icing on
the cake.
In order to use homebrew to its fullest, I edited the /etc/paths file to make things right:
1 2 3 4 5 6 |
|
So far, no problems. Will report back later.
]]>At a past place of $WORK, I worked on a project where we wanted to add a REST-ful API to our data, but we had to deal with blocking SQL queries whose completion took longer than any sane HTTP timeout should be. The result was that we needed to stream the formatted output of the query.
It turns out that most REST-type plugins for Catalyst don’t handle streaming output, so we couldn’t use something off the shelf. However, we did discover a module called Iterator::Simple. This allowed us to construct on-the-fly formatters that we could then stream to the users. Now all of our code stopped looking like ugly while loops and temporary variables, and turned into this:
1 2 3 4 5 6 7 8 9 10 11 |
|
The fun didn’t stop there. It started becoming clear that chaining and passing around iterators was a great way to quickly set up the construction of data sets, then pass those constructions along to consumers. A small library of macros had managed to invade our code and make it very, very lazy.
It turned out that many of our data preparation routines were expressible as
computations that didn’t need to live in memory. Anywhere we were running a
loop and processing data, we could refactor that region with imap
and a code
block, and have the code execute on a per-needed basis.
The only one gripe that I have with this module is that its file handle
emulation is incomplete. The module emulates the getline
syntax; e.g.; the
&<>
operator, but not the method. Right now,
Catalyst::Engine::PSGI
assumes that the getline
method is implemented on the resource to be
streamed. This is true of file handles, but not of
Iterator::Simple::Iterator
objects. If the latter provided that interface,
then this module would increase dramatically in utility. I have filed
a bug and submitted a
patch, so we’ll see how it plays out.
Also, I need to find a decent image post, as numerous of my WordPress-era posts had embedded URLs to images that are now broken. I’m not too keen on imgur.com, and the last time I used ImageShack was the early 00’s. Does anyone have some good, modern suggestion for long-term image hosting, particularly for hot-linking into websites?
]]>There were a lot of excellent talks this year, and even more that I didn’t see. The one that left everyone’s jaw on the floor was Martin Holste’s Perl For Big Data. There were a lot of talks on “big data” but The sheer audacity that this project displayed was impressive. Holste demonstrated lightning fast search, management-pleasing data analysis, and massive distributed throughput on some absurd amount of real-time data. The amazing part of it all was that his team accomplished this not by scaling up their hardware, but by using standard open source software to its limits.
Another general trend that I’m quite happy to see is that Perl hackers are thieving magpies. Stevan Little of Moose fame demonstrated Web::Machine as a clone of Basho’s Webmachine. I am merely looking for an excuse to use it now. Genehack also unveiled HiD, a Jekyll clone. I was surprised that Miyagawa, one of the first Perl hackers to be notorious for rifling the pocket change of other language’s libraries, did not show off any new libraries, but did a great talk on comparing his experiences with the Python and Ruby ecosystems he has plumbed in the past, and how to bring the good parts back to Perl.
Beyond the technical, it was fun to connect and reconnect with a lot of people I’ve interacted with on IRC, twitter, and in past lives at past jobs. I am definitely looking forward to going back again in the future, and I hope to entice more folk to YAPC, both those new to Perl and those who toil in the shadows (you know who you are!)
]]>If you are redirected to this page after the domain name switch; apologies for the broken link. Please use a newer, more stable permalink that my site now provides.
]]>sudo apt-get install libpq5 postgresql-server-dev-9.1
POSTGRES_HOME='/usr/lib/postgresql/9.1' POSTGRES_INCLUDE='/usr/include/postgresql' cpanm Bundle::DBD::Pg
]]>The problem with using Perl in this fashion is not that the solution does not occur to people, but that the solution occurs to many people simultaneously. Most of the hacker luminaries in the Perl world have invented a respective solution. brian d foy has written of his own solution, there is a rubygems implementation in the wild, and the packaging problem has had multiple attempts made on it. Today, I’d like to review the best-in-class applications, and how to use them.
local::lib creates the the
configuration configuration information for a perl package directory without
affecting the system perl’s library paths. Before worrying about your base
perl installation, you should know local::lib
. If you have a trustworthy
sysadmin or are a junior dev on a team, this is most likely your situation.
local::lib
lets you try install modules locally before installing them in a
shared environment to experiment with new features, or install bleeding-edge
versions of Perl-based command line apps like
App::GitGot,
App::Ack for personal use.
Are you developing in an environment where you have to test against multipleo perl binaries? Then you should probably give perlbrew a try.
This application in a fully-featured suite for bootstrapping a perl environment. The perlbrew script allows you to install multiple versions of Perl and maintain library directories much more conveniently. In this regards, it is much more like rvm.
Another similar feature that perlbrew shares with rvm is its management of library assets. The perlbrew binary includes a command to install cpanminus, which hopefully you are using now already (If you are not, I will have to write another blog post!) This copy coordinates with the built-in lib functionality to install libaries to the current chosen perl, minimizing the fuss and clash and conflict.
If you are a solo developer who does not need to coordinate the usage of your development machine with other users, than use perlbrew. It provides the solutions of all the applications directly in a reproducible, scriptable manner.
If you are in a situation where setting up your own perl is a troublesome
wreck, use local::lib
. You will have a clean library path to experiment
with, and you can feel no guild whatsoever when you muck up a dependency and
need to blow it away.
Regardless of anything, use the right tool for the right job, and make sure you know that you are getting what you need. If you aren’t, complain on IRC.
]]>It appears that emacs has no problem navigating the files, but editing large
files is a royal pain in the rear end. It appears that the only reasonable
solution to shut off 'font-lock-mode
.
In addition, I have been using outline-minor-mode to narrow the focus of my attention. Having a top-down view of the file which I am working with really helps.
I wonder how much hacking would be involved to make comments associated with their own header; or in the case of indented comments, with the level above them; as sort of a “floating” header level rather than a specific one.
]]>Lately, I decided to abandon
Terminator in favor of
rxvt-unicode,
a.k.a. urxvt
. Already I’ve found it to be a lot snappier, but installation
was not simple. There are a few hoops to jump through yet.
Apparently the ubuntu packagers haven’t gotten around to bundling the
terminfo entry for rxvt-unicode into
the package itself, as they probably don’t think you need programs like
screen
or tmux
. Rather, Ubuntu wants to to install yet another package,
which has no related dependencies. be sure to install the ncurses-term
package, which seems like a good idea anyways. And if you’d like to tell the
Ubuntu packagers that they should fix this, you can go check out this
bug report.
This part is relatively easy, just install the rxvt-unicode
package and its
dependencies.
Configuring rxvt-unicode
is done through the ~/.Xdefaults
configuration
file, which is the historic location of all X11 application data. Since it is
a grab-bag of a file, it is a little harder to find examples. However, I have
munged through a few and posted my end product in
this gist.
If you take nothing else from this configuration, please change the default colors. Your eyes will thank me for it, since the blue will be legible.
By no means is this journey over. It turns out that my console is only supporting 88 colors, and that there are others who have had the same problem.
]]>I am enjoying the prospect of using a completely flatfile blog; as that means I have one less moving part to worry about.
Hopefully I will have the motivation to post about some useful information here. It turns out that the things that infuriate me tend to be very helpful to others, so keep your eyes peeled.
]]>Of course, My first module’s going to be a result of some Scav Hunt tomfoolery, which I’ll be sure to post about later, once it’s up. Let’s just say that Jewish numerology will get a lot easier now.
]]>Next up on the agenda: I feel sometimes that I’m the leader of the software interests at PS:1 somewhat, so I’m going to make an executive decision on this. I have many, many different projects going on aside from hacking, so I can’t show up at the space every day like some of the more dedicated members have been doing. Instead, I’m just going to be regular about this.
I’m going to try and make it to the space Wednesday night and Sunday afternoon. Anyone interested in programming languages, esoteric languages, functional programming, and software engineering should show up and talk/yell at me. If enough people show up, we’ll call it a meetup group. If they don’t, I’ll read & study by myself, and get anti-social and even more stabbity. Your call.
]]>So there’s a minute possiblity that this blog might make some changes in the future–stay tuned.
]]>Over Christmas break, my sleeping schedule got completely discombobulated, since I had about eleven consecutive days. For the next week, it was difficult for me to get up before noon, and was getting worse. Finally a couple weeks ago, a couple naps aligned my sleep schedule in such a way that I was getting up between 5 and 7 am; something I haven’t done since my high school days.
So far, the major difference is how I use my time. I usually spend the hours between midnight and 4am doing a lot of nothing. It’s me time, but I’m usually surfing the internet or watching TV. When I get up early, I eat (something I used to not do as well), relax online for a while, then get to work. The relaxed pace of the morning has helped me concentrate on my tasks a lot better than before. This also lets me leave my afternoons open to socialize or work on my own projects, which I’ve been lamenting for quite a while.
However, it’s harder for me to stay up late. During the week I’ve been going to bed at about midnight or so, but on weekends I rarely get to bed before 4am. Yes, my social life is just that draining. I’m worried about flipping schedules again, but I think I’ll be able to maintain it.
I did unintentionally crash from about 5pm til midnight this past Sunday after a particularly draining night and a brunch with friends that didn’t leave me but five hours of sleep. This is probably also a result of sleeping only about 6 hours a night; and my body wanting to play catch-up. Either way, I’m going to need to find a balance, what with work and play once again coming into conflict
]]>For those of you unfamiliar with the idea of a hacker space, let me give you my vision of the project. Most of the people involved in this, including myself, are interested in projects that don’t always fall along the traditional lines. We’re interested in science, technology, crafts, and more often than not the intersection between these areas. We want to tinker, to create, to share ideas. To go about this, we’re essentially creating a mad scientist’s clubhouse. We’re collecting power tools, electronics (both broken and functioning), building supplies, and anything else we think is useful. I have an old ham radio I plan on jury-rigging up to something via serial port.
Since Eric, myself, and a few others started drumming up interest, we’ve come along way. We drummed up an excellent name from a friend of mine at Verecundia; Pumping Station: One. We’ve started to visit other similar groups, and look at now defunct groups (Dorkbot Chicago, I’m looking at you), garnishing interest. Things started to take shape, and here we are. Our evangelistic efforts have now placed our pledged initial membership group to over 20 people. This is not far from the target sustainability level necessary to keep the place afloat by membership fees. We’ve registered as a non-profit organization in Illinois and gotten our IRS numbers in order. We’re investigating spaces and soon we’ll have our financials set up, collecting membership dues, and vote on our bylaws. And most importantly, we’re learning & creating. In essence, we’re not far from having a grass-roots, non-profit, self-sustaining art & technology collective in the span of six months.
I invite anyone in the Chicago area, or anyone who may be passing through, to follow the progress of Pumping Station: One. We’ve got a lot planned, and we’re always looking for new members to contribute ideas.
]]>All in all, my goals are relatively modest, but I feel like that’s what makes them achievable. Call me back in a year, and we’ll see where I am.
]]>I did manage to do a really good job of cutting back for about three months in the fall of 2006, where I was only having one cigarette a day. Smoking was primarily a social activity for me, and my coworkers at the computer lab I was working at would often cut out about noon to re-center ourselves. However, the stress involved with the last year of college compounded with a rather intense breakup plunged my addiction deeper than it had been before, and that’s where it’s been since.
I found that smoking is more often a psychologically fulfilling activity for me, and that was reflected in my choice of tobacco. From Black n’ Milds, I switched to Marlboro Reds, to Djarum Blacks, and then to Lucky Strikes. Cost & convenience switched me to Drum rolling tobacco in the end, which I’ve been smoking almost exclusively for the past three years or so. My choices were often motivated by image, and I often relied on smoking as a fashion accessory as much as anything else.
Every time I get sick, I’d get nagged about how my revovery period is on the order of weeks instead of days, and that i should see a doctor. I never considered it a major issue, because I knew what to expect. However, recently after an illness, after I had recovered, I noticed that every time I laughed, I’d cough. Every time. It was violent enough to the point where i noticed myself subconsciously trying to stop laughing.
For someone like me who enjoys my sense of humor in life, I found this unacceptable. So as of Sunday night, I have not had one cigarette. I’ve gone cold turkey.
Today marks the sixth day since my last smoke, and so far I’ve resisted the temptation many times, between going out to Neo, where at any point about 20% of the patrons are outside smoking, to simply being around people who leave the main group, and missing the change to express my usual cynicism and wit in a more relaxed, one-on-one context of sharing a mood-altering substance.
I’ve also noticed that without the sweet, sweet nicotine coursing through my body, I’ve become quite irritable and a bit more misanthropic than is usual for me. However, this is usual and expected, and is supposed to end after a month or so after hating everyone. Hopefully, I can get over being an insufferable dick to everyone, and thinking that everyone is the same, and reclaim a much healthier lifestyle.
]]>Aren’t there much better ways to go about this? Maybe like the USPS 100 Man Kumite? Stock Broker Bumfights? I’m sure they could do better than this.
]]>For that matter, the rest of the interface enhancements on the main page look like they’d be excellent additions to one’s ~/elisp/ folder even today; as for the most part, the code here dates back to the early 90’s. Emacs isn’t exactly a popular mail client anymore…
]]>