July 24, 2009 at 9:54 am
· Filed under Spejder
Vel hjemvendt fra min første Blå Sommer (men med 4 grønne korpslejre i bagagen) er her en række af mine indtryk:
- Madudleveringen virkede perfekt. Fedt at man bare kunne hente hvad man havde brug for. Kun en enkelt dag missede det hvor vi fik frosne kyllingefiletter klokken helv fem.
- Rigtig god ide at bruge korpstes ungdomskurser som temadage, men dobbelt ufedt når det ender i kaos.
- Det kan godt være at de nye hvide toiletvogne virker mere rigtige og lugter bedre, men længe leve de grønne godik-toiletter og rodalon-spande. De virker sgu tilforskel fra de andre.
- Første halvdel af afslutningsshowet var for meget multimedieundervisningspræsentation og for lidt show.
- De høje lejrbål var fede
- Lad være med at bruge store hvide flader på storskærmene når der er folk på scenen man bør kunne se, hvad med at vise hvad der sker på scenen?
- Øv-forbudt folk er stadigvæk latterlige. Om jeg sidder på min thermorest underlag eller i min thermorest-stol gør altså ingen
forskel.
- Personligt synes jeg at der var for meget støj mellem midnat og halv to om natten, men ingen af vores børn beklagede sig. Måske lå vi for tæt på underlejrtorvet og Paradiset.
- Jeg skal lærre at lukke min tørsæk ordentligt når jeg ligger i bivuak!
Alt i alt en rigtig god uge.
Permalink
July 7, 2009 at 8:34 pm
· Filed under Open source (english), Perl
Over the years I have collected a few shell snippets that have to be sourced or called as shell functions to work correctly. Having all these function definitions in a monolithic file sourced from my .bashrc isn’t cool, so for some time I’ve had the following in my .bashrc:
for i in $HOME/.lib.sh/* ; do
source $i
done
This has at least one obvious downside. Each time I change a function definition I have to reload the function i each and every open shell if I want a consistent work environment. Today I came up with a nifty solution. Each file in ~/.lib.sh which previously contained a function definition isedited to only contain the function body. The I add the following new function called load_functions:
FUNCTIONS=$HOME/.lib.sh
eval $(
find $FUNCTIONS -type f | \
while read file ; do echo function $(basename $file)\(\) { source $file\; }\; ; done
)
For each file under ~/.lib.sh a new function is automatically defined which just sources the real file. This means I can edit the files without having to reload the function in every open shell. ~/.lib.sh/load_files itself is just sourced from my .bashrc.
One of my functions wraps the wonderful Perl5 module local::lib. This module makes it easy to manage multiple sandboxes with locally installed Perl modules. It works by setting a couple of environment variables including $PERL5LIB. Instead of using local::lib directly I used a function called perllibs:
# Defaults:
PERL_LOCAL_LIB="home"
DIR=$HOME/.perl
if [ -n "$1" ]; then
PERL_LOCAL_LIB=$1
fi
export PERL_LOCAL_LIB
case $PERL_LOCAL_LIB in
alpha)
DIR=$HOME/projects/alpha/ ;;
mercury)
DIR=$HOME/subversion/mercury/perl ;;
tmp)
mkdir -p /tmp/makholm/perl
DIR=/tmp/makholm/perl ;;
esac
eval $( perl -Mlocal::lib=$DIR )
Adding new projects to this list would be a hassle if I had to reload the file in multiple shells each time.
Permalink
July 4, 2009 at 9:55 pm
· Filed under Perl
I’m a happy vim-user and I don’t see that change any time soon. But recently I have been hacking around with Padre, an editor writen in Perl and for Perl programmers. And even though I like my non-GUI editor I think Padre has one advantage: It is quite hackable inPerl – my favourite language for hacking.
One thing I wanted to play with was debugging from my editor. It is probably posible to write in vim-perl scripts, but having easy access to all the internals without language barriers made the task of writing a debugger plugin much easier and more importantly, much more fun.
So if you have ever thought about nice features you wanted while editing Perl, then please join the Padre project and keep hacking perl while improving you tools.
Permalink