[Factor-talk] Let's fix yosefk's tricky code

2014-08-13 Thread Björn Lindqvist
Hello everybody, Here is an interesting blog post from yosefk about Forth and stack machines: http://yosefk.com/blog/my-history-with-forth-stack-machines.html It contains a lot of interesting stuff but one part in particular got my interest. He is trying to write a word to compute the mean and

Re: [Factor-talk] Let's fix yosefk's tricky code

2014-08-13 Thread Jon Purdy
It seems like most of the overhead comes from fixed-point arithmetic, actually. Here’s a translation to Kitten with locals: On Wed, Aug 13, 2014 at 12:09 PM, Björn Lindqvist bjou...@gmail.com wrote: Hello everybody, Here is an interesting blog post from yosefk about Forth and stack

Re: [Factor-talk] Let's fix yosefk's tricky code

2014-08-13 Thread Jon Purdy
Sigh. The formatting button in Gmail is directly next to the “Send” button. Apologies, list. It seems like most of the overhead comes from fixed-point arithmetic, actually. Here’s a translation to Kitten with locals: def meanStd (float float float → float float): → sum2 sum invLen; sum