?

Log in

No account? Create an account

fanf

Drunken insanity

« previous entry | next entry »
22nd Feb 2007 | 22:50

Following a discussion about source code revision control systems, something fairly similar to the following conversation occurred...

iwj describes his CVS hack which allows you to move repositories around, and which will chase chains of moves.

fanf is reminded of a script that he wrote to trace routes through a network using `route get` to find the next hop then ssh to connect to the next hop then a Quine to transmit itself to the next hop where it then repeats the process. (You need a network based on BSD routers and you need root on all the machines. It is useful for networks with asymmetrical routing.)

mdw, who also likes Quines, says that he wrote a program that can turn any C program into a Quine.

iwj says that gcc should obviously have a --quine option to output its own source code for easier GPL conformance.

mdw says that Linux should similarly have /proc/source/.

sgt points out that /proc/include would actually be useful for compiling things, prompting brief amazement that Quines can have so many practical purposes.

iwj (slightly missing the point of Quines) suggests that this would cause modprobe to pull in the source code dynamically and eat your RAM.

fanf is reminded of an earlier discussion about LD_PRELOAD hacks (in which we agreed that a good way of discouraging programmers who are too enthusiastic about LD_PRELOAD is to explain to them how they can do a much better job with ptrace) and suggests that, as well as source code, Linux could export object code via .so files under /proc/.

everyone discusses how this would solve the problem of kernel vs. libc version skew, since libc could just dynamically link the kernel-dependent code from procfs. We debate whether Ulrich Drepper would have babies or kittens and whether this would lead to Core Wars being played in every process.

| Leave a comment |

Comments {4}

Simon Tatham

from: simont
date: 22nd Feb 2007 23:26 (UTC)

Actually, it was mdw who suggested /proc/source. What I pointed out was that the most useful bit of it would be /proc/include.

Reply | Thread

Tony Finch

from: fanf
date: 22nd Feb 2007 23:29 (UTC)

Corrected, thanks :-)

Reply | Parent | Thread

The Lusercop

from: lusercop
date: 24th Feb 2007 18:27 (UTC)

Notable that on modern solaris, the libc is held within the kernel (and is, as with many things in Solaris, a magic mountpoint).

Reply | Thread

Tony Finch

from: fanf
date: 28th Feb 2007 21:43 (UTC)

According to the blogs I have found, it's just a loopback mount to a normal file. The choice of which libc to mount into place depends on the CPU capabilities and is chosen by moe(1) - "most optimal executable".

Reply | Parent | Thread