The STAMAN Project: Phase IV,

Having thought of tasks and storage formats, it’s now time to figure out an implementation language, i.e. what programming langauge am I going to write the task manager in.

O.K. based on what we’ve got so far, it is easy to infer the following is worth having:

  • Portable between systems—a must for me 😉
  • Easy access to SQLite—usually trivial.
  • Better tools than gmtime().
That means this page is rather useful, for what languages can be ruled out. In my répertoire this means Go (aww), Scheme, AWK, and shell languages can be skipped. Reason being the portability of Scheme bindings in general, and the others lacking sufficient portability (for my taste) at this time. That still leaves about 13 languages, lol. PHP, Java, Lua, JavaScript, and X86 assembly are easy for me to rule out. Reasons for that can all be easily guessed; at least if you remember how much I enjoy Suns Java tools. JS/Lua are great choices but I don’t want to screw with the bindings and stuff.

I’m not very interested in compiling SQLite in C/C++ on Windows, or the CLI binding everywhere. So this effectively makes the choice Perl, Python, or Ruby. Out of those three, none is perfect either: perl doesn’t come with the required database code, it just has the definitive interface for databases everybody mimics. Python and Ruby on the other hand, come with SQLite bindings—which many distributions separate out into separate packages. It’s just a lose, lose situation when you think about dependencies, but it does beat writing your own everything for every program. Sometimes. Setup with these three dynamic languages would be easy though, in so far as we’ve gotten with the above.

Time handling is another issue. Perl has fairly minimalist handling of time built in, but on the upside, if you need it, it’s probably three abreast on CPAN. Time::Format and the core Time::Piece module each come to mind. What isn’t built into Perl, often comes with it or can be added to it. Ruby provides a simple but effective Time class, that makes for more natural code than you may expect. More complex operations will require Googling for a Ruby gem, or hand coding it on demand. Python on the other hand provides a comprehensive datetime module, and supporting time and calendar modules, all out of the box! I would say Python takes the lead here.

Rule one of getting work done: know how to leverage libraries.

In terms of programming languages, Perl, Ruby, and Python are generally equal enough for most tasks, so long as you don’t shoot yourself in the foot. Some subtle differences that personally irk me:

  • Perls autovivification can be almost as much a miss-feature as it can be a convenience. You’ve just got to learn the damn language :-P.
  • Ruby functions are not first class objects! Some things can also be weird if you’re not used to Ruby.
  • Python doesn’t always stand up well to typos, especially if they involve indentation o/.

Because of how many lines of code I’ve done in Python over the years, I am more familiar with it’s set of “Irks” than Ruby’s, like wise I know Sh, C, and Perl more intimately than other languages, so I really know their irks. For perl, it’s mostly thin things that get in inconvenient when combing the warnings pragmata with the nature of perl syntax. They spiritually conflict at times. Under Ruby, I mostly find gripes that have a bigger place in programmer culture. My issues with Python generally have to do with trade-offs that I disagree with as a matter of my convenience, even if it usually results in a Good Thing overall. It comes from a C-oriented background meshed with a love for the Perl programming language.

This is a fact: you will always be irked by your programming language, if you use it enough. What can I say, nothing is perfect. Shoot!

For this particular application, there’s some things worth noting also: language portability. If the machine doesn’t run perl, it’s not a real computer. Most systems you’re likely to care about will run Ruby and Python, and there’s probably a crusty old version of Python for those you don’t (nor directly should). In contrast however, Perl is often a lower level of “Cross platform” behaviour than Ruby/Python. You’ll find this highlighted well in the Camel book. One reason I use Python frequently, it always behaves as expected without so many subtle hiccups.

How much this pertains to the current matter, i.e. implementing STAMAN. Perl is the most universally available language, and I’m more prone to need such a feature than most people. A plus over Ruby is no crappy 1.8.x/1.9.x porting issues…! Of course however, I have a camel to ask about minor details, hehe. In my experience the Python 2k/3k thing is less issue than Ruby’s for writing code yourself, more of an issue in leveraging existing code.

So I reckon, that means Perl or Ruby is best called for here. I exclude Python, because I just use the frick’n thing to often.

Somehow, I’m really not sure what is worse: the curse of experience or a gringo’s rush.

Concept: tried Quassel IRC, didn’t like it – good software but not my bag. Switched to ircII – love the interface, don’t want to screw with hacking it. IRC clients are simple creatures but tend to be crap. While I could live with (or suitably script) ircII to my hearts content, I also want a more Windows usable client too.

Problem: When it comes to programming languages and what I want (something very ircII like, yet rather lisp like in a way). I can see all the pluses and minuses of any given implementation. If I was a nub, I would just pick a language, rush into it, and try and dig myself out.

Knowing so much can sometimes be a real let down o/.

For those that don’t know it, ircII is a very old school IRC client, even by the best CLI-whorish standards.

The typical IRC client is arranged as a text display area, for the current channel; a line edit for your messages; modern ones include a panel to list names in channel and some “Tab” like interface for marking the channels you’re chatting in. Text mode IRC clients work this way too.

ircII on the other hand, routes everything into a central display area and places a line edit under a “Status line”. Rather than jocking between tabs to see what’s up in other channels—which is very wasteful, even when using keystrokes: in ircII you simply use a command to change your current channel. Exempli gratia:

Typical:

  1. Click #chan1 tab
  2. Read what’s going on
  3. Reply if desired
  4. Change back to #chan0
Becomes:
  1. See what’s going on both in #chan0 and #chan1
  2. Use /j #chan1 to make your subsequent messages go to #chan1 instead of #chan0 until the next /j[oin] command.
It’s just more convenient for me than the ‘modern’ user interface. I like efficiency.

In terms of implementing something like this portably (unix/win), the issue is simply line editing. That’s not a subject I enjoy. Having worked on a unix shell, I know it’s a bitch of a subject. Colour support is another, but minor one. Cmd.exe doesn’t understand what a DEC does.

I also want something dynamically reprogrammable on the fly, basically access to a REPL. O.K. so lisp spoils you. This makes dynamic languages more convenient; which is also it’s own can of worms.

That’s the fact of Programming, it’s all a Kobayashi Maru problem: you’ve just got to deal with it.

How not to advertise your product

“When Defraggler reads or writes a file, it uses the exact same techniques that Windows uses. Using Defraggler is just as safe for your files as using Windows.” — source

I was just updating the CCleaner program I use, and thought I would take a look at the other programs they’ve posted on the new site. When I saw what I’ve just quoted above, on their defrag tools features page… I could not help but think “THAT IS THE WORST DAMN PITCH EVER!”, as safe for your files as using Windows!? Seriously folks!

die portmaster die

Well, after 23 hours uptime, submitting several problem reports over gettext, and a heck of a lot of compiling, it seems that my laptops updating is finally complete… except for a few stubborn packages that I rarely use anyway lol.

The thing that *really* pissed me off, is portmaster. Three times (gettext, gtk20, gstreamer-plugins) I had to manually do make reinstalls in order to get the freaking packages to install correctly. However portmaster saw fit to work it’s magic, it forgot to install essential things, like msgfmt, libgstpbutils-.*, and and the actual gtk-x11 library o/. Which obviously caused other ports depending on them to pop corks during portmasters updating them.

I think I’m going to again ditch the third party updating tools, flip the bird, and go back to using my own custom updater script. All that’s really needed, is implementing the topological sort over dependencies anyway… then it would be automated in essence. And it’s never doubled my work load the way portmaster and portupgrade do!!!

In looking closer at things, somehow I think that by cica GCC 5.0, either the GNU compiler will have imploded upon it’s own weight :-o, or it will become an impressively powerful compiler, in place of an impressively portable one.

The feature set being grown, may even give old MSVCs optimization setup a good run for it’s money someday, only the best tools with Visual C++ cost a few thousand dollars and GNUs is given away for free lol.

Me, I would just settle for a generally portable compiler that generates decent code, and complies with the bloody standards… So far I personally like pcc.

Now this is what a *real* web surfers experience looks like: What Firefoxs memory leak feature taught me about life

It also reminds me of an old photo of mine:

Having used Firefox since the 1.0.x days, I’ve also come to find it one of the single most annoying web browsers ever written. Then again, I am also a weirdo who thinks both Internet Explorer and Mozilla should rot in hell… for crimes against the Internet.

Dropbox… interesting

The other day, whilst parsing webpages in my usual manor, I stumbled across a nifty service called dropbox. So far, it seems to offer all the perks of rolling ones own solution but with better OS integration, and a network server. I’m planning on putting it to the test for replacing my existing rsync based system.

What dropbox is capable of, is not far off from what one can do using rdiff-backup and your own server. Main difference I reckon is tone meshes well with SSH and the other relies upon SSL. The way dropbox claims to integrate with the OS however, would more than make up in time lost to configuration.

My main gripe of course, is that dropbox does not yet offer their desktop application for FreeBSD :-(. Which effectively limits how much I can use it until suitable builds become available for testing.

rdiff-backup can solve the problem just as well for me, since my home server is about as reliable as the rock of Gibraltar; the only problem being the software involved. The lowest common denominator among versions of rdiff-backup available for my platforms, are not compatible enough, 8=). Which is why my computers rely on a custom set of scripts built around rsync: rs-mgr rs-pull, rs-push, rs-touch, and rs-vars.

If dropbox became suitably available under FreeBSD, my life would be a heck of a lot easier, and vectra’s roll could be reduced to backups rather than storage central.

In my web travels, I’ve just come across an interesting web-focused application and service, called Teambox. So far it seems to offer, a rather interesting stack of tools. Assuming it could be suitably extended into the neccessary work flow, by adding things such as SCM integration, code reviews, and issue tracking, it would be darn freaking useful.

Little old me, is used to projects where the best things in life are e-mail, XMPP, and Git, hahahaa!

gfire+freebsd

A week or so ago, after updating my machines to a newer GFire plugin, I had the problem with it breaking xfire support on my laptop. Making me have to roll back to 0.8.3 :-(. Today I’ve just sent a message to the `gfire team`, in the hopes they might have a clue to to solving the issues.

Really, since my laptop isn’t for gaming, I don’t care as long as I can sign in / chat. Being able to do file transfers (finally!) and have the right status message displayed however, are worth the upgrade. I just recently noticed that status messages weren’t being updated from my laptop lol.

I guess, on my laptop I’ll just have to change my nickname on xfire to match status, e.g. ‘Spidey01 = AFK’ or something like that. No wonder people keep messaging me when I’m marked AFK, or ignoring the big I’m not here signs. No matter how bad a mood I am, generally I won’t take it out on someone unless they’re at the root cause of it; but when I’m marked away or busy, it means don’t expect a reply within the next 5-15 minutes: unless I happen to notice the message and have time to answer it. Assuming I’m even seated in front of the computer!