Record of some of the computer tech I deal with so that it's documented at least somewhere.

Friday, 2 January 2015

ucspi-tcp installing on Centos and others

This is the same error
/usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in envdir.o
as this guy but my solution doesn't need you to edit files manually !

echo '/^gcc s!$! -include /usr/include/errno.h! w q' | ed cc-conf

Friday, 4 July 2014

Machine perception of time, if only nanoseconds were seconds

I have copied this verbatim from Unmumble because I have referenced it a few times I don't want it to disappear.

Let's just discuss the time scale. The processor of your computer lives by the nanoseconds: the majority of the CPU can do several things for one nanosecond; generally, these are the simple math and the comparisons. To make this perception easer, we assume that you are the processor, and instead of nanoseconds you live and work second by second. In order to make it clear, we apply this metaphor to the single-core processor.

You are able to keep simultaneously a few things in your mind (the register). Not more than a dozen or two in your active memory, however you are capable to recall any of them almost instantly. You keep the important information handy, whether it is on the scratch pad on the desk (L1 cache) that is available in a couple of seconds or one of the books that is on the shelf (L2 and more cache), which is so well organized that every piece of information you cannot get in a dozen seconds or so.

If you cannot find what you are looking for there, you have to go to the library on the street (it is RAM). Fortunately, it is pretty close, so that you can walk over there, take a book and return to the work in only eight and a half minutes, and it is a lot, because some libraries are thousands of times greater than the size of a typical book store. It is a little inconvenient, until you remember that the library has the free delivery service, so you do not have to worry at all, if there is work to do while you are waiting.

But the local library keeps only the popular books (which is quite true, because your book shelf, the scratch pad, and even a dozen or two factors in your head are usually made on the same principle). The problem is that if you need something, and it is missing there, you will have to wait a little longer. How long? Well, let’s imagine Amazon.com in the age of discoveries. They send out an old wooden ship, and it may take weeks, perhaps months, and often you have to wait three years before you get a response.

Welcome to the hard drive world where your information is extracted by the rapid unwinding of metal plates. Many metric tons of sweat were shed in order to speed up the process as fast as possible, but it's hard to compete with the electrons that are flying over the wires.

So when someone says that the SSDs are splendid, because they are able to turn this slow unpredictable old sailing ship into a powerful steam engine vessel. A good SSD can often make a voyage in less than a week, and sometimes it could do in less than a day. It can also make the thousands of trips for information per year.

Saturday, 8 February 2014

Plan9port on CentOS - failed

Another distro, another set of nonsense.

I already had all the dev tools installed from doing courier

yum groupinstall 'Development Tools' yum install rpm-build gcc mysql-devel openssl-devel cyrus-sasl-devel pkgconfig zlib-devel pcre-devel openldap-devel postgresql-devel expect libtool-ltdl-devel openldap-servers libtool gdbm-devel pam-devel gamin-devel

So I don't know which of those is necessary for plan9port
Of course, we need the X11 code to compile rio & co The error is > cd /usr/local/plan9/src/cmd/devdraw; mk all 9c -I/usr/include x11-alloc.c x11-inc.h:17:28: error: X11/IntrinsicP.h: No such file or directory x11-inc.h:18:28: error: X11/StringDefs.h: No such file or directory

So first I tried this

yum install libX11-devel

no help, so then

yum install xorg-x11-proto-devel

no help, so then

yum install yum install libXt

oops not source code so no help, so then

yum install yum install libXt-devel

yay! that was the one.
not so fast Hot-Shot

>>> cd /usr/local/plan9/src/cmd/rio; mk all 9c -I/usr/include -DDEBUG -DSHAPE -DDEBUG_EV -DDEBUG event.c event.c:9:34: error: X11/extensions/shape.h: No such file or directory

so

yum install libXext-devel

woohoo

Not so fast Hot Shot

/home/matt/.vnc/xstartup: line 27: xsetroot: command not found sh: xsetroot: command not found

yum install xorg-x11-server-utils

Not so fast Hot Shot

rio: X_CreateWindow(0x20): BadMatch (invalid parameter attributes) rio: failure during initialisation; aborting

fucked, CentOS is now useless to me

Saturday, 24 December 2011

Dwarf Fortress in a VM

My 2Ghz machine is too slow to run DF in a VM so I stopped

Debian net install into a Qemu VM on FreeBSD

NB. Aptitude is an awful program for browsing packages.

Download Dwarf Fortress for Linux & expand

./libs/Dwarf_Fortress: error while loading shared libraries: libSDL-1.2.so.0: cannot open shared object file: No such file or directory

which means

apt-get install libsdl1.2debian

./libs/Dwarf_Fortress: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

apt-get install libgtk2.0-0

./libs/Dwarf_Fortress: error while loading shared libraries: libSDL_image-1.2.so.0: cannot open shared object file: No such file or directory

apt-get install libsdl-image1.2

./libs/Dwarf_Fortress: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory

apt-get install libglu1-mesa

./libs/Dwarf_Fortress: error while loading shared libraries: libSDL_ttf-2.0.so.0: cannot open shared object file: No such file or directory

apt-get install libsdl-ttf2.0-0

and it runs without Sound

apt-get install tightvncserver

then you'll need a window manager etc.

try and pick a simple one, oh look,

My choices but not very good, I had to edit config files to get it to work

apt-get install 9wm

and a terminal

apt-get install rxvt

Pah not so easy. Windows take forever to open, BASH takes ages to start.

So I found it runs much faster (ha)if you copy df_linux to /dev/shm. I imagine it is because reads from the host filesystem require a syscall whereas reading from guest memory is in host user space.

Also use VNC raw and run it over ssh compressed so that the host does the compression work, not the Qemu

Its doing worldgen atm, taking a while. But I reckon its going to be playable via the netbook over vnc.

Standard size worldgen took 2 hours. World size "Smaller", History "Short", No. Civs "Low", No. Sites "Medium", No. Beasts "Medium", Natural Savagery "medium", Mineral Occurence "Sparse" takes about 4 minutes!

I'm a bit concerned about the 8s keypress delay!

Friday, 2 December 2011

Bookmarklet for Vworker

You need to be signed in and on your Profile page.

The press this and it gets your rank from the HTML and changes the location to your page in the ranking list with 50 entries per page.

javascript:{window.location = "https://www.vworker.com/RentACoder/DotNet/misc/AllWorkerCompleteList.aspx?intLastRecordOnPage=50&intFirstRecordOnPage=1&txtMaxNumberOfEntriesPerPage=50&intLastRecordInRecordset=43292&cmdGoToPage=" + Math.ceil((/#[0-9]+,[0-9]+/.exec(document.getElementById('TABLE1').innerHTML)[0].replace('#', '').replace(',', '') / 50)).toString() + "&lngMaxNumberOfEntriesPerPage=50"}

Saturday, 19 November 2011

Linux From Scratch Part 2

Ok, after making a mistake I wrote a script to build the build tools for me. (sorry about the .txt my web server likes octects) I guess this is what Stage1 is in Gentoo. Edit your options I've got a Quad core with 8Gb RAM :> export MAKEFLAGS="-j 5" export EXTRACT=/dev/shm The tools built for me in about 20 mins. My SBU : real 1m2.852s user 1m48.902s sys 0m44.976s

Wednesday, 16 November 2011

Linux From Scratch Part 1

blogger happily deleted this massive post it was a script to download all the sources