At a high level it is about excess baggage that needs to be carried to provide a familiar environment for either language. Python needs Posix, so we have to carry its APE baggage, whereas Go brings its own Plan9-ish baggage (?[cl], lib9, libbio, etc.) and you'll need to give it some hooks to hang them on. To the best of my knowledge, until now the following are the changes to Plan 9 and/or Go to support Go on Plan 9. Do these seem onerous? 1. Addition of TSEMACQUIRE system call. Does it have other applications? 2. Use of Go's libbio, rather than Plan 9's. Alternatively libbio on Plan 9 can be changed. It's not clear to me why this would be a bad thing. 3. Modifications to 8g to get around an 8c bug (for the curious, see the test case from Anthony that reproduces it, below). Go team accepted the patch to get around this, even though it is a bug in Plan 9's 8c. 4. modification to get around having to use runtime·memmove in runtime·sighandler (for the curious, this is because runtime·memmove uses SSE MOVOU instructions, which touch XMM registers). * Repro for Plan 9 8c bug: unsigned long long x; int f(int); void test(void) { int a; a = f(a-x+a); } On Mon, Dec 2, 2013 at 1:51 PM, erik quanstrom wrote: > On Mon Dec 2 16:08:20 EST 2013, skip.tavakkolian@gmail.com wrote: > > wait! so, you had to make changes to Plan 9 to support Python? :) > > > > (sorry, couldn't resist) > > i'll take the bait. > > the changes were very different from the changes for go. python > is an ape program, and ape has been very neglected. many > of these changes were not strictly necessary for the python port. > none are really python specific. they fix broken things in ape. > go needs new system calls, and makes other demands, like the > silly libbio macros. > > here's a highlevel overview of what was done. stars by the necessary > changes: > > *0. support for ssl was added to ape by importing mp, sec, bio into > ape. also compile crypt from /sys/src/libc/port (necessary to avoid using > openssl) > > *1. was moved to /$objtype/include/ape because it's not > portable. (necessary for amd64 port) > > *2. inet_ntop, inet_pton, getaddrinfo (and friends) were added. > python doesn't work well with old-style name lookup. > > *3. all the system calls have had their signatures corrected e.g.: > - extern int _RENDEZVOUS(unsigned long, unsigned long); > + extern void* _RENDEZVOUS(void*, void*); > this is required for amd64. change brk() and _buf() accordingly. > > *4. fix frexp, modf, (endian issues, subnormal #s) and copysign(). > > *5. make a lame attempt to deal with wait4() vs rfork. > > *6. _IO_getc needs to return EOF on eof. > > *7. fix %p for 64-bit add vfscanf in stdio; use USED() not #pragma ref > > *8. getsrvbyaddr() remember that htons! > > *9. further envp rework. > > *10. socketpair: wrong signature. > > and unnecessary but helpful fixes: > > 0. all ape compoents are built with -VTw to prevent simple linker > mistakes. snprintf() now always uses the c99 definition to prevent link > errors with -T. > > *1. support for ssl was added to ape by importing mp, sec, bio into > ape. (necessary to avoid using openssl) > > *2. was moved to /$objtype/include/ape because it's not > portable. (necessary for amd64 port) > > 3. ip6 support was added. > > *4. inet_ntop, inet_pton, getaddrinfo (and friends) were added. > python doesn't work well with old-style name lookup. > > 5. librexexp was fixed in line with fixes to the normal lib. > > 6. Rune and wchar_t are an uint/int for 21-bit runes. decode 21-bit > runes in mbwc.c > > 7. getcallerpc/getfcr implemented for all arches. > > 8. make qsort 64-bit safe. > > 9. fix const in strcspn, strpbrk, strrchr, strspn, strstr, rename, > pathconf > > 10. fix types in setuid, setgid, signal, mkfifo, getgrent, getpwent > > 11. fix conflict between bind() [libdraw] and bind [socket]. > > 12. fmt: fix %p; fix %C (21-bit rune) > > 13. utf: 21-bit runes > > 14. libv: fix impossible definition of nap(). > > - erik > >