Hi Brit. Stream of consciousness blob of interconnected ideas; think the sound of a modem synchronizing. Been back a few days. Re-acclimating to life in a world where I understand the language and overwhelmed by the choices of food and media. Also MUCH MUCH MUCH less stressed about life and work in general. Not being sucked into long hours or worry or anything. Playing. Working on the русский language and playing the piano more than ever. Long walks at sunrise and sunset. Still haven't wrapped my sleep schedule around, sleeping 6pm to midnight; the night is cool and welcoming to hacking. Trip was far far away and amazingly beautiful; I have never seen mountains so alive and hope to make it back every year. Collected much healing tea of several verieties high up on the slopes. Did GTD arrive? I'm waking up in the morning and scheduling my day on a 3x5 card and sticking to it. Believing that a key to life is being able to structure it and stick to it. Learning this now. Really nice to easily be able to break away from things when the time is up and keep changing to new learning, while before I would just obsess about KS to the loss of so many possibly growths. Breaking away from thinking about computers and KS in general for the trip meant that when I re-entered into this world, I was much better prepared to view the pressures and thoughts and emotions from a detached and much stronger fortified position. Just saw the addition of mixalot and shuffletron and I will be playing with them post haste; cauldron (which I think I will rename to spaceship) will grow as I see needs for navigating the vast uncharted expanse of the computer's future space. C is not that difficult and is necessary to understanding the linux system and how all the parts work together. Compiler, linker, loader. Best to understand how all the parts work together. Also learning C should also be learning assembly, just as learning SBCL to a high level will require learning to understand the output of DISASSEMBLE. Some simple C play.... /* Create a simple foo.c file like so. One function foo. */ int foo(int a){ return a + 39; } /* Compile to assembly */ $ gcc -S foo.c /* This creates foo.S like so. */ .file "foo.c" .text .globl foo .type foo, @function foo: .LFB0: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 movq %rsp, %rbp .cfi_offset 6, -16 .cfi_def_cfa_register 6 movl %edi, -4(%rbp) movl -4(%rbp), %eax addl $39, %eax leave ret .cfi_endproc .LFE0: .size foo, .-foo .ident "GCC: (Gentoo 4.4.3-r2 p1.2) 4.4.3" .section .note.GNU-stack,"",@progbits /* This is a 64 bit calling convention and is worth studying. The gist is to get the first argument into eax and then add 39. http://www.delorie.com/djgpp/doc/ug/asm/calling.html http://en.wikipedia.org/wiki/X86_calling_conventions */ /* Now lets create an object file from the C. */ $ gcc -o foo.c /* Which gives foo.o. 'objdump' and 'nm' are now your friends. */ /* 'nm' list all the sybols in the object file */ $ nm foo.o 0000000000000000 T foo /* 'objdump' has a slew of options */ /* stright binary dump */ $ objdump -s foo.o foo.o: file format elf64-x86-64 Contents of section .text: 0000 554889e5 897dfc8b 45fc83c0 27c9c3 UH...}..E...'.. Contents of section .comment: 0000 00474343 3a202847 656e746f 6f20342e .GCC: (Gentoo 4. 0010 342e332d 72322070 312e3229 20342e34 4.3-r2 p1.2) 4.4 0020 2e3300 .3. Contents of section .eh_frame: 0000 14000000 00000000 017a5200 01781001 .........zR..x.. 0010 1b0c0708 90010000 1c000000 1c000000 ................ 0020 00000000 0f000000 00410e10 4386020d .........A..C... 0030 06000000 00000000 ........ /* dissassembly. Notice how the binary opcodes match perfectly to the dump above. */ $ objdump -d foo.o foo.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 : 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: 89 7d fc mov %edi,-0x4(%rbp) 7: 8b 45 fc mov -0x4(%rbp),%eax a: 83 c0 27 add $0x27,%eax d: c9 leaveq e: c3 retq /* Now create a brit.c file like so. */ #include int foo(int a); void main(){ printf("Yo Brit. %d\n", foo(3)); } /* Compile to assembly */ $ gcc -S brit.c /* Which gives brit.s like so. */ .file "brit.c" .section .rodata .LC0: .string "Yo Brit. %d\n" .text .globl main .type main, @function main: .LFB0: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 movq %rsp, %rbp .cfi_offset 6, -16 .cfi_def_cfa_register 6 movl $3, %edi call foo movl %eax, %edx movl $.LC0, %eax movl %edx, %esi movq %rax, %rdi movl $0, %eax call printf leave ret .cfi_endproc .LFE0: .size main, .-main .ident "GCC: (Gentoo 4.4.3-r2 p1.2) 4.4.3" .section .note.GNU-stack,"",@progbits /* A bit more complicated; a few function calls and a literal string. */ /* Compile to an object file. */ $ gcc -c brit.c /* This gives brit.o. */ $ nm brit.o U foo 0000000000000000 T main U printf /* Notice now that the object file contains three symbols, two of which are external and unlinked. */ /* Link it up now */ $ gcc -o brit brit.o foo.o /* and tada... */ $ brit Yo Brit. 42 /* You can view the actual linker command executed with 'gcc -v -o brit brit.o foo.o' */ Out of time for today. Peace bro.....