Tag: perl
Necta.pl lives again!
by BenV on Apr.10, 2010, under Software
When nectarine died a few years ago (or at least, that’s how I view it) with their broken harddisks, lost backups and whatnot, I gave up on the necta.pl tool me and a friend of mine had written.
However, a few months ago I got back into listening to the new scenemusic.eu who got everything back up and running based on recovered data from the old Nectarine.
It seems like they did a proper job of setting up a new site, and they even provide a nice xml backend for tools like this.
So after a while I decided to revive our tool. This time I took the time to curse even more at Irssi and their script support, so I implemented the nonblocking fetcher and nectarine parser
in separate libraries. Well, isn’t that fun. Reloading those things was a problem (/script load necta wouldn’t reload those underlying libraries), but fortunately Garion helped me out here after a mail to the Irssi mailing list. Thanks Garion!
Anyway, I’ve put the first release up for download on this page:
http://notes.benv.junerules.com/necta/
Or a direct link to the download:
Irssi Necta script v0.01 - Version 0.01 - SHA: 62f7c4994750dac154807f2be43c85a8d2020182
dos2unix
by BenV on Aug.21, 2009, under Morons, Software
Another annoying thing: morons that save their files with dos line endings.
Also known as “I’ve got motherfucking ^M in my file, AAAIIEEEEYGGrrgrll“.
I usually find out about this when bash complains about stuff like this:
-bash: ./bla.pl: /usr/bin/perl^M: bad interpreter: No such file or directory
(HAAAAAT!!!)
Solution:
:set fileformat=unix
:wq
(Don’t confuse fileformat with filetype, one is used for encoding, the other for things as syntax highlighting)
Solution 2:
I never use this since I never have that piece of cancer called dos2unix, but some distros do.
Solution 3:
That should fix it. On to the “let’s trash my home directory with my fancy new perl script that I just converted”
(n)Curses magic part 2: magic!
by BenV on Aug.08, 2009, under Boring, Fun, Software
So while messing around with some perl/curses stuff I got fancy with colors and soon found out about the limited support of colors in terminals and therefore also Curses.
Anyway, I made this little “fractal plasma” thingy with it, see if you can get it running ![]()
It’s not really a fractal plasma, so don’t get technical on that, but it describes it best I think.
To get it running, open up your favorite terminal that supports 256 colors and allows palette changing – I found both xterm and urxvt to work.
Make sure your TERM variable is set to something that allows this, for instance in urxvt:
$ ./fractplasm.pl
or this worked for me with xterm:
$ ./fractplasm.pl
Something like this is the result:


Enjoy!
(n)Curses magic: are you a magician?
by BenV on Aug.07, 2009, under Morons, Software
Hej readers,
I decided to work on making slackbuild.pl a bit more acceptable in terms of usability and looks. The reason for this is that the dialog program doesn’t exactly do what I want.
That is, it works…. but that’s pretty much all I can say about it. It doesn’t allow me to make a comined checkbox/menu thing that I want for my configure options part. Next to that it’s tedious to fork and parse its output all the time, and let’s not even get started about looks and input issues.
So I figured: hmm, dialog is made in ncurses, perl has a Curses lib…. let’s play! (continue reading…)
