Posts Tagged ‘expect’

2012w13

Sunday, April 1st, 2012

This week has been stressful. Mostly due to the fact that we have an upcoming deadline and problems have a tendency to appear just at that time to exacerbate things further…

But with problems resolved, and tests underway, I found some time to help a colleague out with a script to automate some pretty tricky measurement tests.
This included doing some expect-scripting.

In this particular instance I needed to get a bunch of parameters sent to expect, and treat them as a single string. Ordinarily something like ./foo.exp "some space separated parameters" would have worked, but quoting would be a hassle, so if I could avoid that it would be great.

So I learnt about Tcl’s lrange (up to that point I’d only worked with lindex) and constructed something along the lines of set foo [lrange $argv 3 end] (the first three parameters were other things).

This week I’ve also had the pleasure to read about some pretty cool people this week:

Of course, there are people in the other part of that spectrum, people who doesn’t seem to like the ugly truth or who’d just like to kill off the Internet in its present form.

Now, if you’re still a Firefox user (these days it seems people have all jumped on the Chrome bandwagon) and you still don’t understand why it could be good idea to use NoScript, RequestPolicy or BetterPrivacy, Collusion, from Mozilla might visualize it for you. For my part, with those add-ons activated, there weren’t any surprises, but just for fun I turned them off, only leaving collusion on. Frak me! A whole lot of stuff happening behind the scenes.

I also sniffed out a new timeline library which uses jQuery and is powered by JSON.

:wq

2012w11

Sunday, March 18th, 2012

This week has been filled with all sorts of fun and challenging stuff.

For one, I used Wireshark to (successfully) diagnose a problem for the first time :D

The problem was an overly restrictive iptables rule on the system I was trying to connect to, but boy did it feel good to identify and solve that problem on my own.

I also managed to squeeze in time to write scripts to two work buddies so that they didn’t need to perform overly repetitive and very error-prone tasks by hand. The one script even needed a little bit of Expect-scripting, which I’ve been aching to hack some more.

I also found out about vim‘s :e # (to try it out, open a file in vim, then :e someOtherFile followed by :e #)

I found a very pedagogic explanation about how quicksort works, which made me start thinking and wondering about algorithms in general again, even to the point of investigating quicksort further.

I also found this post which makes a fair point: IFF you are going to rely on a web service (in other words, a SaaS you are probably better off getting hooked up with one charging money for it.

Not that I could ever conscionable recommend anyone using a SaaS as this is bound to lock you into dependence of that provider, but sure, I get that some (most?) would rather throw money at it than learning (learning is scary, and you don’t have the time right?) to set up your own service.

Furthermore, I can’t really decide whether the author is being disingenuous or illiterate in naming this stance an “anti-free-software movement”. It is unclear if s/he meant “anti-gratis-software movement” or if s/he is actually feeling threatened by free software. Had there been a comment field on that “blog” I probably would have spent the two minutes required to ask, but since there isn’t one, I won’t bother, and on pure principle, if I ever need a bookmarking-service, I’ll just make sure to stay clear of that one, just in case s/he actually was taking a jab against free software.

Yes, I am petty and vindictive at times, shit happens.

Whilst toying with the idea of modifying my homepage a bit, a site wide change, I realized that it might make a lot of sense to rewrite it so that it is, if not template-based, at least modularized. But I guess I’ll continue thinking about that before making any changes.

A funny thing I just thought of out of the blue the other day was that with some sites, like LinkedIn and probably Facebook and others, there are options for giving these services your email account username and password, so that they could log in, check your contact list, and hook you up with other people you know.

But I am pretty sure that most email providers license agreements state (no, I haven’t checked, but it would be foolish of these mail providers not to) that it would be a violation of said agreement for the user to disclose their account password to anyone else.

Then again, I don’t really understand people who would use those tools, but I guess there are even more people who wouldn’t understand why I chose not to…

A very interesting read about the Batman and the Joker. Those who know me can probably guess what character I voted for.

I’ve also been thinking about the prospect of storing binaries in some sort of version control, mostly because I have a friend who is into game development/modding, and doing so without version control. And that has bitten him in the ass more than once now.

And since I am nowadays a git convert I naturally started looking there, and found this, which lead me, among other places, here. Haven’t tried it yet, but it is definitively an interesting idea.

And now that I have begun working with Wireshark, tcpdump seems to be a good next step.

Finally, yet another reason why the patent industry needs to change.

:wq

My Software Stack 2011 edition

Saturday, December 31st, 2011

I realize that I haven’t written my customary “software stack” post for this year yet. But hey, from where I’m sitting, I still have … 36 minutes to spare ;)

I’ll be using the same categories as last year; system, communications, web, development, office suite, server, organization, and entertainment.

System

The OS of choice is still Archlinux, my window manager is still wmii, my terminal emulator is rxvt-unicode, upgraded by also installing urxvt-tabbedex.

My shell is still bash, my cron daemon is still fcron, and my network manager is wicd.

To this configuration I’ve added the terminal multiplexer tmux, and have lately found out just how useful mc can be. Oh, and qmv from the renameutils package is now a given part of the stack.

Communications

Not much change here, Thunderbird for email, Pidgin for instant messaging, irssi for IRC.

Heybuddy has been replaced by identicurse as my micro-blogging (identi.ca) client. Heybuddy is very nice, but I can use identicurse from the commandline, and it has vim-like bindings.

For Pidgin I use OTR to encrypt conversations. For Thunderbird I use the enigmail addon along with GnuPG.

This means that Thunderbird still hasn’t been replaced by the “mutt-stack” (mutt, msmtp, offlineimap and mairix) and this is mostly due to me not having the energy to learn how to configure mutt.

I also considered trying to replace Pidgin with irssi and bitlbee but Pidgin + OTR works so well, and I have no idea about how well OTR works with bitlbee/irssi (well, actually, I’ve found irssi + OTR to be flaky at best.

Web

Not much changed here either, Firefox dominates, and I haven’t looked further into uzbl although that is still on the TODO list, for some day.

I do some times also use w3m, elinks, wget, curl and perl-libwww.

My Firefox is customized with NoScript, RequestPolicy, some other stuff, and Pentadactyl.

Privoxy is nowadays also part of the loadout, to filter out ads and other undesirable web “resources”.

Development

In this category there has actually been some changes:

  • gvim has been completely dropped
  • eclipse has been dropped, using vim instead
  • mercurial has been replaced by git

Thanks in no small part to my job, I have gotten more intimate knowledge of awk and expect, as well as beginning to learn Perl.

I still do some Python hacking, a whole lot of shell scripting, and for many of these hacks, SQLite is a faithful companion.

Doh! I completely forgot that I’ve been dabbling around with Erlang as well, and that mscgen has been immensely helpful in helping me visualize communication paths between various modules.

“Office suite”

I still use LaTeX for PDF creation (sorry hook, still haven’t gotten around to checking out ConTeXt), I haven’t really used sc at all, it was just too hard to learn the controls, and I had too few spreadsheets in need of creating. I use qalculate almost on a weekly basis, but for shell scripts I’ve started using bc instead.

A potential replacement for sc could be teapot, but again, I usually don’t create spreadsheets…

Server

Since I’ve dropped mercurial, and since the mercurial-server package suddenly stopped working after a system update, I couldn’t be bothered to fix it, and it is now dropped.

screen and irssi is of course always a winning combination.

nginx and uwsgi has not been used to any extent, I haven’t tried setting up a VPN service, but I have a couple of ideas for the coming year (mumble, some VPN service, some nginx + Python/Perl thingies, bitlbee) and maybe replace the Ubuntu installation with Debian.

Organization

I still use both vimwiki and vim outliner, and my Important Dates Notifier script.

Still no TaskJuggler, and I haven’t gotten much use out of abook.

remind has completely replaced when, while I haven’t gotten any use what so ever out of wyrd.

Entertainment

For consuming stuff I use evince (PDF), mplayer (video), while for music, moc has had to step down from the throne, to leave place for mpd and ncmpcpp.

eog along with gthumb (replacing geeqie) handles viewing images.

For manipulation/creation needs I use LaTeX, or possibly Scribus, ffmpeg, audacity, imagemagick, inkscape, and gimp.

Bonus: Security

I thought I’d add another category, security, since I finally have something worthwhile to report here.

I’ve begun encrypting selected parts of my hard drive (mostly my email directory) using EncFS, and I use my passtore script for password management.

And sometimes (this was mostly relevant for when debugging passtore after having begun actively using it) when I have a sensitive file which I for a session need to store on the hard drive, in clear text, I use quixand to create an encrypted directory with a session key only stored in RAM. So once the session has ended, there is little chance of retrieving the key and decrypting the encrypted directory.

Ending notes

That’s about it. Some new stuff, mostly old stuff, only a few things getting kicked off the list. My stack is pretty stable for now. I wonder what cool stuff I will find in 2012 :D

:wq