5 ms·
A Little Bit of Forth [video]
- owainlewis 11y agoI found forth a pretty interesting language. Started collecting some useful links if anyone else wants to get started. https://github.com/owainlewis/awesome-forth https://github.com/owainlewis/awesome-forth
- agumonkey 11y agoYou should head to http://www.reddit.com/r/forth http://www.reddit.com/r/forth, you'll be happy.
- rpcope1 11y agoI still write some Forth occasionally, it's really awesome for embedded systems, as it runs on little MCUs like AVR. It's so cool to update the program without reflashing the MCU, and have potentially have an interactive interpreter on such low resource processors. I think becoming proficient with Forth has also made me a better programmer in other languages; for example stack based iterative replacements for recursion come easier, as well as other stack based algorithms. It also makes understand the CPython VM a lot easier.
- schsafe 11y agoSome people compare FORTH with game GO or philosophy ZEN. Very simple rules. And you build an own universe. And all of this fits into a very small size. As you also mentioned.
- coroxout 11y agoNice. Been meaning to dabble more with Forth since stumbling across the Forth Haiku Salon: http://forthsalon.appspot.com/ http://forthsalon.appspot.com/
- andybak 11y agoThat's incredible. You should make a front page post of it.
- deleted 11y ago[deleted]
- TheLoneWolfling 11y agoI have a soft spot for stack-based languages. Anyone played around with Factor?
- MonkeyIsNull 11y agoYes, it's truly a joy to program in. It's also covered pretty well in Seven more languages in Seven weeks.
- doublec 11y agoI used Factor quite a bit in the early days. It's a great language and exploratory programming environment.
- GFK_of_xmaspast 11y agoIt's kind of a shame that you don't hear more about forth.
- mastax 11y agoI've been writing a Forth Interpreter over the past weeks as a way to learn Rust. It's very motivating how quickly a working prototype can be whipped up; once the data structures are worked out it's basically done. There's a quiet beauty and elegance to Forth code that I can't really find anywhere else. At the same time, it's often frustratingly crufty.
- lukego 11y agoLearning Forth from the OLPC XO boot prompt is one of the most fun things I have done with a computer. Great tutorial here: http://wiki.laptop.org/go/Forth_Lessons http://wiki.laptop.org/go/Forth_Lessons
- schsafe 11y agohttp://en.wikipedia.org/wiki/Open_Firmware http://en.wikipedia.org/wiki/Open_Firmware
- timonoko 11y agoIt would be so sweet if the "(" and ")" were defined as push/pop from a secondary stack. So "(+ 1 2)" would always be equal to "1 2 +". : ABS (IF (< DUP 0)) (THEN (- 0 SWAP)) ;
- agumonkey 11y agoAnd for stack lovers : - http://csclub.uwaterloo.ca/media/Eric%20LaForest:%20Next%20Generation%20Stack%20Computing http://csclub.uwaterloo.ca/media/Eric%20LaForest:%20Next%20G... - http://fpgacpu.ca/stack/index.html http://fpgacpu.ca/stack/index.html
- schsafe 11y agoI created a FORTH like language some years ago. Also fun. /home/user/st> more fibonacci 1#[." "#@@+#a-;]10, /home/user/st> st fibonacci 45 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309 3524578 5702887 9227465 14930352 24157817 39088169 63245986 102334155 165580141 267914296 433494437 701408733 1134903170 /home/user/st>
- schsafe 11y agoFORTH is a very old and unique language. Different from all the others. You can find it even in the space-ships. http://www.forth.org http://www.forth.org
- schsafe 11y agoIf you want to play with an online FORTH interpreter: http://forthfreak.net/jsforth80x25.html http://forthfreak.net/jsforth80x25.html ok : fibo 1 dup 45 0 do . dup rot rot + dup loop ; ok fibo 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 2 8657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309 3524578 5702 887 9227465 14930352 24157817 39088169 63245986 102334155 165580141 267914296 43 3494437 701408733 1134903170 ok.. The Fibonacci numbers :-)