I am never going to finish “From Here to Infinity”. I was about half way through Mr Stewarts book when I got an urge to browse Amazon, big mistake.
I spotted the following books all of which I ordered
A concise History of Mathematics.
Author: Dirk J. Struik
A Mathematician’s Apology
Author: G. H. Hardy (Forward by C. P. Snow)
The Man Who Loved Only Numbers
Author: Paul Hoffman
A History Of Mathematics (An Introduction)
Author: Victor J. Katz
Remapping Keys in Linux
I never really had to do this before but I have been using enlightenment for a few months now and use the ALT-(q,w,e,a,s,d,z,x,c) to switch between 9 separate desktops. I find this quite quick but I tried xemacs the other day and I needed ALT-x but I kept switching between desktops. So I decided to use a different key.
Since the Windows key ie the one to the left of the left ALT button is never used I decided to use it to switch desktops instead (I know I will need to use the ALT key in other applications so I might as well do it now before its ingrained into me).
Anyway the procedure goes as follows.
1. Detect the keycode of the key you want changed.
Open a terminal and type
]$ xev
Lots of text should whizz past on the terminal and then stop. Touch the key you want the keycode of and more text should whizz past…. something like
KeyRelease event, serial 25, synthetic NO, window 0xe00001,
root 0x38, subw 0x0, time 24436498, (-298,301), root:(458,320),
state 0x0, keycode 115 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes: “”
We can see that the keycode is 115.
2. Create a user modmap file to be loaded on starting X
]$ cd ~; touch .Xmodmap
and put the following text in it
keycode 115 = Hyper_L
add mod3 = Hyper_L
then edit your ~/.xsession file: Add
xmodmap .Xmodmap
before the “exec enlightenment” line and that should be you sorted. If for some reason you did not have a .xsession file then you will need to add the line to start whatever window manager you are using ie in my case my .xsession looks like
xmodmap .Xmodmap &
exec enlightenment
yours might well be
xmodmap .Xmodmap &
exec sawfish
You should now be able to use the MOD3 modifying key in e16keyedit as a modifier key after restarting xwindows.
Vim Folding and Perl
I decided to get function folding working today and discovered that it is relatively simple to set up unless Vim isn’t detecting your filetype correctly which it wasn’t in my case.
To get basic Folding for Perl working add
let perl_fold=1
let perl_fold_blocks = 1
to your .vimrc file and then open a .pl file and you should see lots of blue lines running across the screen. These are where the folds have been made and you should see a line count similar to
+– 24 lines: sub summit_sub {——————————–
Put the cursor on this line and press “za”. This will magically unfold the line. Pressing “za” again refolds the line.
I don’t like the perl folding defaults so I dedcided to run with the manual ones but my filetype was alway wrong when working on a modules. it was inserting c-style foldmarker ie “/*}}}*/” instead of the perl foldmarker #}}}
This was easlily remedied as follows
au BufRead,BufNewFile *.pm set filetype=perl || set commentstring=#%s
I now have folding working. Now all I need to do is decide what type of folding I prefer.
PDF Tool
I was asked the other day if there was an easy way in Perl to join two pdf files together. The answer is that there is an easy way. It might not suit everyone but I managed to find a tool called the pdf toolkit (pdftk). Its another of those handy tools that gets filed in the magic toolbox for later retrieval.
Vim regex
I was wanting to start some comments in a large Perl module the other day and not really had to use Vim’s regexp to any great degree because I know Perl I decided to see if it could be done.
I decided to add a little bit of pod above every funcion. The following was the result Remember In vim the ^M is a control character for carriage return and can be achieved by holding down the control key and pressing carriage return.
The following regex
:%s/^sub\(.*\) {\(.*$\)/=head \1\(\)^M^MDescrition:^M^M=cut^Msub \1{\2/
changes
sub summit_sub {
stuff;
}
to
=head summit_sub()
Descrition:
=cut
sub summit_sub{
stuff;
}
The following regex
:%s/^sub\(.*\)\n{\(.*$\)/=head \1\(\)^M^MDescrition:^M^M=cut^Msub \1{\2/
changes
sub summit_sub
{
stuff;
}
to
=head summit_sub ()
Descrition:
=cut
sub summit_sub {
stuff;
}
New RSS Job Feed
I just found another RSS Job feed and have incorporated it into my own RSS Job aggregator.
I have now got 15 separate feeds in the database.
Google Results for Harry
I have decided to monitor where I come for the search term
harry
on google. Why? Why not. I am up against some very famous Harry’s so I thought it might be a bit of a laugh to take them on and see how far up the ladder I can get. Current ranking. Why the hell could they not have called Harry Potter something like Derek Trotter 😉
319 on google for “harry” out of 23,900,000
Website Traffic Spam
I received a great little bit of spam that I thought I would chase up to see from whence it came. The following is the text of the email with the links edited a bit.
You have got a useful web site, but no one visits it?
Get each page of your www-site crawled by each major Search Engine including: MSN, AOL, Google, Yahoo, Overture, AltaVista, HotBot, Lycos, Excite, Inktomi, Webcrawler, Ask Jeeves, etc. Having each page of your site relisted every quarter will expose your site to extra traffic.
Site1: www[dot]hvat[dot]org/9767[dot]asp
Get more traffic from the search engines!
Jennifer Clark,
Marketing Executive
Hahahahahahahahahahaha.
On following the site there you get redirected to payinq-traffic.com which is a
site that reportedly submits your site to all the search engines once a month
if you pay a fee for this to be done.
For those of you that think this is great idea here are some facts.
1. Five search engines command over 80% of the market share
2. Its free to submit to these search engines.
3. Submitting to a search engine more than once is pointless.
4. Some search engines don’t like the submission of individual pages only home pages.
Most important of all is:
Don’t believe a bloody word you read on a website. That piece of advice goes
for my site to. Check everything I say and make sure I am not feeding you a crock
of shit otherwise you will just be another internet luser. When some stranger
approaches you on the street and offers you a magic bean you know straight away
the blokes full of it, a fraudster, a crook. Its just the same on the World Wide
Web except there’s more of them and for the most part they are not going to prison if you have been dumb enough to give them your cash.
Believe nothing, confirm everything, take nothing for granted and always watch
your back.
Fermats Last Theorem.
I have just finished reading:
Fermats Last Theorem
ISBN: 1841157910
Author: Simon Singh
I actually bought this book and had started reading it when I found
“Surely You’re Joking, Mr.Feynman!:”
but I am afraid that Mr Feynman took the lead and this book never got touched again until I had finished the Feynman book.
On the whole I enjoyed it but its a bit dry in places and meanders about the
place, or at least that was my impression. I had trouble seeing the
relevance of some of the writing to Fermats problem and this is where I got the
feeling of the book going off on tangents just to be brought back quite
sharply.
I was also a bit surprised to hear the Authors description of “divide by 0” in
one of the Appendix’s. He says that you cannot divide by zero because zero will
go into something infinitely many times.
I know this is a religious issue for some people but I would have described it
as follows.
2 x 0 = 0 : True
this looks correct and is correct. Its basic algebra. Now when transposing formula we could take the left 0 over to the right side by dividing through by
0 as follows
2 = 0/0
We can see that 2 cannot = 0/0 so division by zero is undefined. Some people
might see it better as follows.
(2 x 0)/0 = 0/0
If the left zeros cancel which they would if 0 was a normal number then we are
left we are left with the absurdity.
2 = 0/0 : Absurd
So 0 cannot be a number or at least not in any normal sense. So to say that 0
divides something infinitely many times seemed wrong to me.
If we look at it another way it might be clearer. If we look at the following
infinite sequence
1/(1/2), 1/(1/3), 1/(1/4), 1/(1/5) ………. 1/(1/n)
the we can see that as
n |–> infinty that 1/n |–> zero
so we have 1/0 which if we could say gives us infinity because 0 divides 1
infinitely many time. That sounds plausible enough but, if we look at the following
infinite sequence
1/(1/-2), 1/(1/-3), 1/(1/-4), 1/(1/-5) ………. 1/(1/-n)
then we can see that as
-n |–> negative infinty then 1/-n |–> zero
but zero is the only number that is neither negative or positive so which
infinity do we pick. Do we say that because the sequence is approaching
negative infinity that it 1/0 is -ve infinity or +ve infinity. This is another
of those absurdities that we ran into earlier when dealing with divide by zero.
Dividing by zero is indeterminable which is why no one says that it divides
something infinitely many times when in fact we have no idea what its doing.
I am sure some clever cloggs will come along after a course in complex
analysis and blow the above out of the water but this is the way I have always
thought of this question.
Trains
I have just spent a week in Nottingham doing the Summer School for M203 ( Open University Pure Maths Course) which was quite a good laugh. I decided since I new the dates that I would book the tickets quite a bit in advance so that I could get them cheaper. I did consider using the car but I trust Midland Mainline so I might as well do a bit for the environment and traffic congestion and use the train, what a mistake that turned out to be.
The train was due to leave at 10:01 Saturday morning. On arrival at Luton station 20 mins early I am then told that there is no such train, it doesn’t exist, there is no train at 10:01. I showed the bloke my ticket and lo and behold I am meant to be on the 10:01. This was not a mistake on my part, they had changed the timetable and my train would now be leaving at 10:50. BOLLOCKS, thats a lot of extra time I could have spent in bed.
Anyway, I got on the train and things were looking good until Kettering which is where the train decided to break down. So off we went to another platform where I could catch a train that would mean changing at Leicester. I don’t like changing so I waited for a direct train that came 15 minutes later and caught it instead. Arriving more than two hours later than I thought I was a bit pissed off to say the least.
Return Journey.
Well, I finished earlier than I expected on the course so I decided to hell with it I am not waiting a further two hours at the station just to catch a train that said suggested service on the ticket. This was my mistake. I seen suggested service on the train that runs from Nottingham to Leicester but I had a reservation on the train from Leicester to Luton. I jumped on the train that was fast to Kings Cross and decided to change there and come back up to Luton since that would get me in a lot quicker than the other way. On ticket inspection I got whacked with a bill for £27 because I was being bumped up by £7.50 to get to Luton for some reason and I had to pay £19.20 to get a return from Luton to Kings Cross and back again. FSCK IT
The bastards make me late by two hours and charged me £27 quid for the pleasure of recovering one hour. Using the train is a sure fire way to get stressed out over a simple journey of just over 100 miles.
100 miles cost me £64. I can fly home to Ireland and back again for less than this. The government are constantly wittering on that we should all start using public transport, its quite obvious very few of them actually use it. I would also imagine that when they do they have everything arranged for them at both sides and its other peoples money they are spending. The whole things a bit of a farce.