News for hackers. Stuff that matters.
Re:Writing a Forth in Haskell by coliveira on Thursday June 08, 2017 @04:39PM (#14517018)
Modern CPUs are optimized for C code. This is not the fault of FORTH, but it certainly is a problem for its adoption.
Re:Writing a Forth in Haskell by throwaway7645 on Thursday June 08, 2017 @06:54PM (#14517801)
This is why Chuck Moore designed his own chips like GreenArrays I believe. There is no impedance mismatch between software and hardware and the entire thing is optimized for the problem domain and massively parallel. I'm sure you can get more speed out of C, but it no other language (even Lisp or Smalltalk) can the user understand the entirety of the system. Lisp machines and Smalltalk machines probably are about as close as possible, but I have zero experience with them personally. Perhaps the project to put PicoLisp on bare-metal qualifies if one uses a simple enough microcontroller as the language itself is about as simple as you can get a practical lisp.
Re:Writing a Forth in Haskell by spelc on Friday June 09, 2017 @06:22AM (#14520399)
Over the last twenty years or so, I have written serious Forth code generators for six CPU architectures. There's only one code generation algorithm that's not regularly present in most Pasgol family compilers. The results are the VFX Forth systems at http://www.mpeforth.com.
Re:Writing a Forth in Haskell by Karrot_Kream on Friday June 09, 2017 @01:28PM (#14522858)
I've looked over your products over the years and been super impressed by your results. Thanks for all your hard work!
Re:Writing a Forth in Haskell by Karrot_Kream on Thursday June 08, 2017 @05:31PM (#14517345)
Not really, modern Lisps have done a fine job optimizing performance. FORTH suffers from treating the hardware too granularly, and thus not being able to take advantage of any of the advances in hardware in the last 2 decades.
Re:Writing a Forth in Haskell by yorwba on Thursday June 08, 2017 @11:37PM (#14519015)
There is no a priori reason FORTH can't take advantage of modern hardware, since in the extreme case the compiler can be completely replaced by redefining the meaning of ':' and ';'.