5 ms·
Read-Eval-Print-λove – Forth Thinking
- tempodox 11y agoNice. But a font where the digit 2 (two) looks like the capital Z (last alphabet letter) isn't really usable. I quit reading after the Clojure example.
- eggy 11y agoLooks like the number two on all of my devices. Maybe it's your chosen system font?
- zeveb 11y agoAccording to Firebug, the code examples are set in Lucida Console, Monaco, or monospace, in that order of preference. I don't believe that Lucida Console or Monaco is a terribly good face, but neither of them exhibits the behaviour you report, so it's probably a problem with your browser font configuration. I currently recommend Source Code Pro for monospace, Linux Libertine for serif and Linux Biolinum for sans-serif. These are the most attractive & legible fonts I've yet found for day-to-day use, but I'm glad to hear of others' findings.
- kasajian 11y agoI suspect 99% of the readers stopped after the Clojure example.
- WolfeReader 11y agoBased on?
- agumonkey 11y agoWhen was this released ?
- rcarmo 11y agoNice reading. Love the style. There was a typo (wok-flow) that I stared at a bit to make sure it wasn't intentional, though. :)
- manaskarekar 11y agoOther Forth books resources: Starting Forth : http://www.forth.com/starting-forth/ http://www.forth.com/starting-forth/ Thinking Forth : https://sourceforge.net/projects/thinking-forth/files/ https://sourceforge.net/projects/thinking-forth/files/ (Mirror) http://www.dnd.utwente.nl/~tim/colorforth/Leo-Brodie/thinking-forth.pdf http://www.dnd.utwente.nl/~tim/colorforth/Leo-Brodie/thinkin... These are provided by the author (http://www.forth.com/forth/forth-books.html http://www.forth.com/forth/forth-books.html).
- kasajian 11y agoIt's funny how the guy assumes the reader must know Clojure
- rkallos 11y agoThe publication is mainly about Lisps, and is written by Michael Fogus, a core contributor to Clojure/Clojurescript, and author of a couple books on Clojure. I think that his intended readership is expected to be more familiar with Clojure than with Ruby.
- WolfeReader 11y ago"Read-Eval-Print-Love is an N-monthly zine of original content and curation about the Lisp family of programming languages and little-languages in general." Why is it funny that a magazine about Lisps has code in Lisp? I'm not seeing the humor.
- simplify 11y agoHow does one deal with complex if-else statements in a concatenative language?
- PeCaN 11y agoYou usually just avoid them. Some (e.g. Factor) do offer pattern matching/multimethods which are generally much cleaner.
- simplify 11y agoI try to avoid them too, but sometimes business requirements are just too particular to do so.
- astrobe_ 11y agoIt sure can be a problem when you have to deal with "business requirements" that you can't change, because in Forth you look for simplifications at every level. Dealing with that may require to thing out of the box a bit, and forget about what is "good" and "bad" in other languages. Maybe you can use table-driven programming? Maybe you can do some dirty tricks with the return stack to get the control-flow you want? Maybe you really have to put that data in a variable? There's no single answer, and it can get ugly at times. Not, BTW, ugly like in the article. This: > : apply2 rot dup rot dip rot apply swap ; ... is an abomination. "dip" is questionable already. "rot", thought part of the standard, is best avoided. Because one should only deal with the top two elements of the stack. And of course "apply2" itself is suspicious. Why the author showed this, even though he seems knowledgeable enough to know that he shouldn't? Because he picked a simplified Forth that did not let him use the return stack. The author sure talks a lot about the "Forth philosophy" but apparently missed one or two things about it. If one wants to talk about philosophy, one should at least include in the bibliography what his inventor says about Forth (http://www.ultratechnology.com/forth0.htm http://www.ultratechnology.com/forth0.htm - a lot of stuff there, the main piece being 1xForth). I believe it's Moore that said something like "The important thing is not what you add, but what you remove". The return stack is a core component of Forth; picking a "simplified" Forth that won't let you use it ... well that language shouldn't be called Forth to begin with. That's a bad choice. There are also other questionable choices like using [ ] for "quotations" when they are used for something totally different in standard Forth. Introducing "quotations" is also questionable in itself. It only looks easily implemented because Ruby provides all the memory management; but in reality implementing an interpreter on top of an interpreter is not viable (that makes like at least a x1000 slowdown relative to C); Forth interpreters are typically written in low level compiled languages (typically C), which don't provide garbage collection. And in the end, those "quotations" only look cute. What really helps is currying. Forth is ugly, stupid and mean. It's up to you to find clever ways to write nice-looking programs.
- tbirdz 11y agoFor a less rosy view of forth, http://yosefk.com/blog/my-history-with-forth-stack-machines.html http://yosefk.com/blog/my-history-with-forth-stack-machines.... is a fascinating read.
- bogomipz 11y agoCan someone explain to me why Forth is such a cult favorite? Is it because of it's age? I am curious. Is it worth learning?