From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <47BC116F.3060906@proweb.co.uk> Date: Wed, 20 Feb 2008 11:39:27 +0000 From: maht User-Agent: Icedove 1.5.0.14pre (X11/20071018) MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] Non-stack-based calling conventions References: <5d375e920802171343p323a2708m9f193ae24d2c14e5@mail.gmail.com> <254278ff3375ec25d8a5db25a0d94270@quanstro.net> <775b8d190802171754k725b9696pdd7692590eaf731f@mail.gmail.com> <47B92440.9030609@gmail.com> <32d987d50802181050s3f010612l4aac70fa839f9abf@mail.gmail.com> In-Reply-To: <32d987d50802181050s3f010612l4aac70fa839f9abf@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 5c4cd82a-ead3-11e9-9d60-3106f5b1d025 I'll preceed my invective with something relevant : Forth's calling convention means the stack is used less for nested calls. For the C version there's all sorts of pushing and popping return addresses and arguments on to the stack float sqr(x float) { return x * x; } float hyp(x float, y float) { return sqrt(sqr(x) + sqr(y)); } Whereas in the Forth version, the only thing that gets pushed and popped is the address of the next function, the arguments are on the stack already (assume the FP versions of the Words are used) : :sqr dup * :hyp sqr over sqr + sqrt Now on with the invective lolz, I go away for 3 days and I must have left the back door open because when I came back the place was full of ignorant bitches. I like both of these : grep impressive /sys/games/lib/fortune I'm glad that the "problem" of Plan 9 has been solved at last, it's the people who have been using it for n years. My personal n started on June 7 2000, I guess that day is akin to "the September that Never Ended" to those for whom n > 7.