Things we don't have #1

About this posting series

These days Perl/CPAN is not king anymore. It no longer has the largest number of modules or the most complete collection in every aspect. But it still compares very favorably overall and is still regarded as one of the repositories that have the best supporting infrastructure/ecosystem (e.g. CPANTesters).

Each post will mention a few modules/applications that exist and live on other language's software repositories like Python's PyPI, RubyGems, or npm, but currently do not have their equivalents on CPAN (at the time of posting, according to my observation).

How to view this negatively

So what? Well, read on.

You have $LANG envy!. So what? :-) Envy is good, I heard it's one of the virtues of programmer (well yeah, hubris is a mispelling). It's nice to be able to have things that others have.

Why don't you write them yourself then? I would, if/when I {really need/want them, must/want to use them in Perl, have enough time/tuits}. Most of the time, I don't though. But others might do.

How to view this positively

Hm, $LANG is nice. I might use it {instead of, in addition to} Perl. Good for you. Sometimes I do that too. Nobody says everything has to be done in Perl. And a wasted duplicated effort is a wasted duplicated effort (is a wasted duplicated effort).

Hm, recreating $SOFTWARE in Perl would make a nice, challenging project. Glad I gave you the idea. Please tell us about your progress.

But something like $SOFTWARE does exist in Perl! Please correct me then, thank you.

Related posting series

So here are a few entries off the top of my head

Pygments, a syntax highlighting library written in Python. Ruby has an equivalent project called coderay which is pretty fast but, last time I checked, not as complete Blogged about this a year ago. This would be useful to have for projects like a multipurpose IDE or code viewer (think GitHub, which does use Pygments). For highlighting Perl code, however, I think we are doing fine.

PyTVision, a Python binding to Borland's Turbo Vision TUI library. Found out about it a week ago while researching about doing TUI in Perl. It would be a really nice alternative to Curses::UI, except that I have never come across actual Turbo Vision-based TUI apps on Linux, ever. It's probably as good as dead, which is a shame, as as I remember it Turbo Vision was really really nice. Certainly prettier than any Curses-based program I've seen.

tmuxp, a Python interface to tmux, lets you define panes and windows using Python objects, or JSON, or YAML. Even comes with a cli tool (which tmux already is). Personally bare tmux suffices for my needs, I haven't reached a point where my windows/panes configuration are complex.

11 Comments

I tried tmux a couple of weeks ago, as a possible alternative to xterms. The interface is so awkward to use - e.g. switching windows - that I was astonished at how bad it was. After booting, I just run a script which opens 12 xterms, and nothing in tmux encourages me to change.

That's perhaps why byobu (an enhancement for the terminal multiplexers) is written in Python.

But Syntax::Highlight::Engine::Kate and Tickit do exist in Perl!

There must be something for syntax highlighting. What does Padre use?
Also, something like IPython notebooks would be very neat, with inline PDL pictures and the like. Actually there's an unclaimed quest to make an IPython PDL plugin.

I've always used screen instead of tmux. I guess I just haven't seen any feature of tmux that would make it worth switching to after all these years.

AFA using a whole bunch of terminal windows ... well, even apart from the insane value of keeping all those windows, including their running processes and scrollback buffers, around forever, barring only a reboot, it's a quantity issue for me. I'm currently running over 20 different windows in screen, and I usually have over 30. Having that many terminal windows lying around would make me insane. Even having a single term with that many tabs in it would be using up too much screen real estate for my tastes.

Plus I don't want to have to use a mouse to manage my command-line terminals. Just seems ... wrong, somehow. :-)

Swinging back around to on-topic, though: I've never felt like I needed a Perl interface to my terminal multiplexer. The places I've felt a lack of Perl modules for have nearly always been interfacing with other formats/sites/services. Things like Google docs (we have some Perl modules, but we need ones with simpler interfaces), Blogger (no Perl module that I know of), IMDB and/or AllMusic (none that I know of), MP3 files (need simpler interfaces), and so forth.

From what I see, byobu seems to be a wrapper for GNU screen (and, in recent versions, tmux too). It is not a replacement for either (in fact the ubuntu byobu package depends on either one of them.)

Leave a comment

About Steven Haryanto

user-pic A programmer (mostly Perl 5 nowadays). My CPAN ID: SHARYANTO. I'm sedusedan on perlmonks. My twitter is stevenharyanto (but I don't tweet much). Follow me on github: sharyanto.