hola, > One feature I like about Ruby is the ability to add libraries > of code that contain C code. Ruby does this through dynamic > linking. Since Plan 9 doesn't support dynamic linking, (and I > am not suggesting that it be added to Plan 9), what is the > general consensus on how to achieve similar functionality without > resorting to dynamic linking?
ron has a hacked 8c with support for dynamic loading, he did it for python. I recently did an APE port of python with the standard 8c. if I need/want a new module I just rebuild it, I have /$objtype/lib/ape/libpython.a and a special mkfile in a Extra/ where I just put .c files in a dir per module, the mkfiles are smart enough to build everything and add the init fn() calls to some initmodule() maybe it's a bit overkill, but who knows... lotte% ls -l /sys/src/cmd/python/Extra/ --rw-r--r-- M 241 fgb fgb 56 Nov 19 04:32 /sys/src/cmd/python/Extra/dummy.c d-rwxr-xr-x M 241 fgb fgb 0 Dec 2 20:06 /sys/src/cmd/python/Extra/mercurial --rw-r--r-- M 241 fgb fgb 253 Nov 19 09:36 /sys/src/cmd/python/Extra/mkfile lotte% ls -l /sys/src/cmd/python/Extra/mercurial/ --rw-r--r-- M 241 fgb fgb 3249 Nov 19 08:03 /sys/src/cmd/python/Extra/mercurial/base85.c --rw-r--r-- M 241 fgb fgb 7930 Nov 19 08:03 /sys/src/cmd/python/Extra/mercurial/bdiff.c Federico G. Benavento --- /bin/fortune: I taught him everything he knows. Now he knows more. -Randal L. Schwartz