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
- Perl module ideas
- Things we have (coming soon)
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.
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.
@Ron: Have you used a terminal multiplexer before? It's useful for when you're accessing a remote ssh session over an unreliable connection. Your sessions will be saved even when your connection breaks. I guess that's what I mainly use screen/tmux for too, currently. For local work, I too simply use multiple Konsole tabs.
But I'm intrigued by the layouting feature of tmux. It's nice to be able to preset certain layouts for certain work. For example, when you're debugging an app/daemon, a 3-pane layout is convenient: source code, shell interactive prompt, and "tail -f log" (sometimes also two or three of those).
@Jakub: Thanks for pointing out about byobu. Will be checking it out.
@Nate: yup, there are actually several syntax highlighting libraries on CPAN, but they all suck (sometimes infinitely more so), at least compared to pygments/coderay.
@anonymous: Last time I checked, SHE::Kate is very slow. Thanks for mentioning Tickit, I saw this before some time ago, but couldn't recall the name or the author. Now bookmarked, and will be checking it out.
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.
Somebody reminded me about Inline::Python (and similar Inline::* modules), so to some extent we can "have" those things that we don't have :) Will be trying out I::Py on some Python extensions. Thanks.
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.)