News for hackers. Stuff that matters.
Re:A Forth implementation and programming environment for AT... by Dewie on Sunday October 13, 2013 @01:54PM (#6543440)
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.
Re:A Forth implementation and programming environment for AT... by evincarofautumn on Sunday October 13, 2013 @04:36PM (#6544072)
You 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

[2]: http://factorcode.org/

[3]: http://www.kevinalbrecht.com/code/joy-mirror/joy.html

[4]: http://tunes.org/~iepos/joy.html

[5]: http://cat-language.com/

[6]: http://kittenlang.org/

[7]: https://github.com/evincarofautumn/kitten

Re:A Forth implementation and programming environment for AT... by mr_luc on Sunday October 13, 2013 @04:57PM (#6544140)
I 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.

Re:A Forth implementation and programming environment for AT... by evincarofautumn on Sunday October 13, 2013 @05:13PM (#6544190)
I’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.
Re:A Forth implementation and programming environment for AT... by mr_luc on Monday October 14, 2013 @10:59AM (#6547602)
Hmm. Man, maybe I should see if I can hack something together using npm and a naming convention.

Package managers are ... important.

Re:A Forth implementation and programming environment for AT... by jyf1987 on Monday October 14, 2013 @01:43AM (#6545555)
factor is cool and fasion except it only focus on x86 right now
Re:A Forth implementation and programming environment for AT... by qznc on Sunday October 13, 2013 @02:18PM (#6543542)
Forth 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)

Re:A Forth implementation and programming environment for AT... by rwmj on Sunday October 13, 2013 @04:16PM (#6544002)
As 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

Re:A Forth implementation and programming environment for AT... by evincarofautumn on Sunday October 13, 2013 @04:46PM (#6544109)
Hi! 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.
Re:A Forth implementation and programming environment for AT... by erather on Monday October 14, 2013 @08:51PM (#6550710)
Having 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.
Re:A Forth implementation and programming environment for AT... by jyf1987 on Monday October 14, 2013 @01:45AM (#6545561)
oops, catch you!

can you implement that in y86? i didnt learnt x86 asm

Re:A Forth implementation and programming environment for AT... by mr_luc on Sunday October 13, 2013 @03:45PM (#6543885)
I'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/