4 ms·
Here's an aside on Forth-like languages: how much academic interest/research has there been in them? I've seen some people say that Forth is like Lisp in that i
by Dewie 13y ago
Here's an aside on Forth-like languages: how much academic interest/research has there been in them? I've seen some people say that Forth is like Lisp in that it is its equal when it comes to high-level abstractions, but at the same time that it fits like a glow for low-level tasks. Some researchers must have been curious about this paradigm, at least enough to find out if that claim might hold some weight.
- qznc 13y agoForth has an academic sister called Joy [0] and under the term "concatenative programming" a niche paradigm has evolved. [0] http://en.wikipedia.org/wiki/Joy_(programming_language) http://en.wikipedia.org/wiki/Joy_(programming_language)
- mr_luc 13y agoI've been playing around with Factor when I have a moment. I was impressed by reading the excellent 're: factor' blog; he often re-implements small unix utilities in Factor, for instance. http://re-factor.blogspot.com/ http://re-factor.blogspot.com/
- rwmj 13y agoAs the author of jonesforth[1], I found Forth to be a great hack and enormous fun to write. However as an actual language to implement things, not so good. It's terribly difficult to write correct code when you've got no bounds checking, only primitive memory management, no types, and having to manage the stack. (Modern Forths fix these problems to some extent.) It's my understanding that most language research is on safety features, type systems and so on, so I don't know how interesting Forth would be. [1] http://git.annexia.org/?p=jonesforth.git;a=summary http://git.annexia.org/?p=jonesforth.git;a=summary
- evincarofautumn 13y agoHi! Thanks for jonesforth; I found it very enlightening when first learning about stack languages. I typically explain Forth as somewhere between assembly and C—a Forth implementation is minimal enough that it’s practically a structuring technique for assembly programs, and (like types in C) more for convenience than correctness.
- jyf1987 13y agooops, catch you! can you implement that in y86? i didnt learnt x86 asm
- erather 13y agoHaving spent ~30 years "implementing things" (ranging from accounting systems to large-scale control systems to tiny microcontroller projects) I must say that I have found Forth superb for this purpose. It does take a little practice at first, but as I have also had the privilege of teaching a few thousand newbie Forthers I have found that they can become incredibly productive in a matter of days.
- evincarofautumn 13y agoYou want to check out concatenative programming[1] and particularly #concatenative on Freenode. Factor[2] is the preeminent concatenative language at this time. It is dynamically typed and comes with an excellent interactive environment and a fairly large collection of libraries. It feels very much like “Lisp done right”—which is to say that it’s very practical, and you get much more composability and metaprogramming power without all the parentheses. Joy[3] was the first language to be described as “concatenative”, invented by the late Manfred von Thun; its operation is defined as a term rewriting system, but it can be implemented using a stack. If you want some theoretical background, Brent Kirby’s Theory of Concatenative Combinators[4] may be enlightening. Cat[5] was the first statically typed concatenative language, and Kitten is my successor to Cat. If you’re looking at Rust, Kitten[6][7] is designed with similar goals in mind. It’s a language about safe, expressive abstractions with predictable, low runtime costs. It encourages expressing programs as compositions of effects. It is not usable for production but may be fun to play around with; we are currently working on a native backend. [1]: http://concatenative.org http://concatenative.org [2]: http://factorcode.org/ http://factorcode.org/ [3]: http://www.kevinalbrecht.com/code/joy-mirror/joy.html http://www.kevinalbrecht.com/code/joy-mirror/joy.html [4]: http://tunes.org/~iepos/joy.html http://tunes.org/~iepos/joy.html [5]: http://cat-language.com/ http://cat-language.com/ [6]: http://kittenlang.org/ http://kittenlang.org/ [7]: https://github.com/evincarofautumn/kitten https://github.com/evincarofautumn/kitten
- mr_luc 13y agoI mentioned Factor in less detail below, I think it's a lot of fun, but -- from the detail here, might I assume that you're involved with Factor in some way? If so: does it have a package manager yet? The last I was plunking around with Factor, 6-8 months ago, uh, "dire" was a good word to describe the package/library management situation. Is that still accurate? Have you guys considered bootstrapping by using a package manager from another language/ecosystem? For instance, npm is pretty awesome, and they don't really care whether what's being distributed is javascript or not.
- evincarofautumn 13y agoI’m not involved with Factor development, just a casual user and concatenative evangelist. Factor still lacks a package manager; the notion, I suppose, is that the standard library is the standard package repository like npmjs.org for Node or Hackage for Haskell.