Live data from Hacker News

Forth: The programming language that writes itself

ratfactor.com

51–60 of 174 posts

Re: Forth: The programming language that writes itself

#51
post #9
post #3

Why is it that languages like this don't scale? It's not the first time I see a powerful language that got forgotten. Other examples include SmallTalk and Common Lisp (tiny community). It is because some languages are "too powerful"? What does that say about our industry? That we're still not that advanced of a specie to be able to handle the full power of such languages? I say that because it seems languages that ar…

What I heard is with Forth, basically no 2 environments are alike, but highly customized, meaning every forth programmer creates his own language in the end for his custom needs. So collaborating is a bit hard like this. The only serious forth programmer that I know, lives alone in the woods doing his things. So from a aesthetic point of view, I really like the language, but for getting things done, especially in a c…

I think like C, there's standard/ANS Forth.

But most likely lots of those Forth coders implement their own which don't necessarily conform to the standard.

Re: Forth: The programming language that writes itself

#52
post #9
post #3

Why is it that languages like this don't scale? It's not the first time I see a powerful language that got forgotten. Other examples include SmallTalk and Common Lisp (tiny community). It is because some languages are "too powerful"? What does that say about our industry? That we're still not that advanced of a specie to be able to handle the full power of such languages? I say that because it seems languages that ar…

What I heard is with Forth, basically no 2 environments are alike, but highly customized, meaning every forth programmer creates his own language in the end for his custom needs. So collaborating is a bit hard like this. The only serious forth programmer that I know, lives alone in the woods doing his things. So from a aesthetic point of view, I really like the language, but for getting things done, especially in a c…

Have you tried collaborating with Forth? There's a lot of documented history of people doing so in industry when it was actually used, and more recently I've usually found Forth codebases approachable and easy to follow.

Personally I think this is the pay-off for writing the code in the first place because Forth is very difficult to write in a clear way, if you actually manage to do it you've probably made it very clear to follow because otherwise it's hard to finish your project and make it work at all.

Re: Forth: The programming language that writes itself

#53

Earlier quoted context omitted.

Why specifically untyped?

The typed lambda calculus is not Turing complete.

Not quite true, depends on the flavor of the type system you use. Church's simply typed is not, but other type systems are.

I think one way to make it Turing complete is to add typing rule for Y combinator as an axiom to your simple type system, but I am not sure.

Re: Forth: The programming language that writes itself

#54
post #9

Earlier quoted context omitted.

What I heard is with Forth, basically no 2 environments are alike, but highly customized, meaning every forth programmer creates his own language in the end for his custom needs. So collaborating is a bit hard like this. The only serious forth programmer that I know, lives alone in the woods doing his things. So from a aesthetic point of view, I really like the language, but for getting things done, especially in a c…

This is not a real issue, because the same thing can be said about C. No two C projects are the same, each has its own set of libraries, macros, types, etc. I think the main problem is that Forth systems don't have a standard way of creating interfaces like C and other languages have. So the diversity of environments becomes a big issue because it's difficult to combine libraries from different sources.

That's not right. C coders have no problem at all diving right into most other C codebases.

Re: Forth: The programming language that writes itself

#55
post #52
post #9

Earlier quoted context omitted.

What I heard is with Forth, basically no 2 environments are alike, but highly customized, meaning every forth programmer creates his own language in the end for his custom needs. So collaborating is a bit hard like this. The only serious forth programmer that I know, lives alone in the woods doing his things. So from a aesthetic point of view, I really like the language, but for getting things done, especially in a c…

Have you tried collaborating with Forth? There's a lot of documented history of people doing so in industry when it was actually used, and more recently I've usually found Forth codebases approachable and easy to follow. Personally I think this is the pay-off for writing the code in the first place because Forth is very difficult to write in a clear way, if you actually manage to do it you've probably made it very cl…

"Have you tried collaborating with Forth?"

No, I never did more than very simple experiments with Forth (which is why I started my comment with "what I heard").

"because Forth is very difficult to write in a clear way"

But that pretty much means, that the average programmer will have problems with collaborating.

Re: Forth: The programming language that writes itself

#56
FORTH has some elegance and it's so simple that it is tempting to implement it.

However, no language should permit defining the value of 4 by 12, as there is no situation in which this can bring more good than harm in the long term.

Another issue that affects FORTH but also Perl and other languages is that they deal with a lot of things implicitly (e.g. the stack, or arguments to functions). Most people agree that explicity is more easy to read than implicit.

Re: Forth: The programming language that writes itself

#57
post #5

Many people glorify the simplicity of Lisp as an interpreter, but Forth is similar and underappreciated. Sadly, the only code I've written in Forth is... PostScript. Yeah, PostScript is a dialect of Forth. As a child, I really was amused by the demo of GraFORTH on Apple ][, which included 3D wireframe animations, which at the time were magical.

The difference between Forth and Lisp could not be more pronounced. Forth source code has entirely implicit structure, you can't even tell which function is called on which arguments. Lisp has entirely explicit structure which makes it much easier to read and edit. Lisp needs only a single primitive (lambda) to create the entire programming language, whereas Forth needs many primitives which break the core idea of the language in order to be usable. All of what is elegant about Lisp is ultimately lacking in Forth.

Re: Forth: The programming language that writes itself

#58
post #32
post #5

Many people glorify the simplicity of Lisp as an interpreter, but Forth is similar and underappreciated. Sadly, the only code I've written in Forth is... PostScript. Yeah, PostScript is a dialect of Forth. As a child, I really was amused by the demo of GraFORTH on Apple ][, which included 3D wireframe animations, which at the time were magical.

> As a child, I really was amused by the demo of GraFORTH on Apple ][, which included 3D wireframe animations, which at the time were magical. I originally wrote GraFORTH ( https://archive.org/details/a2_GraFORTH_1981_Lutus_Paul ) to escape the slow world of integer BASIC on my first computer (an Apple II). Because it relied on large blocks of assembly code to produce nice graphics, it perhaps misled people about wha…

> I originally wrote GraFORTH

Oh really?

Given you were around at about the correct time period, could you hazard a guess at what dialect this very old Forth game from Byte magazine was written in?

https://github.com/RickCarlino/Cosmic-Conquest-1982

It has some graphics commands in that I couldn't find in any other version of Forth on the Apple II. I'm a little outside the Apple II demographic, since they didn't really take off in the UK - although the very first home computer I ever used was an Apple II owned by the father of the guy that founded Rockstar Games :-)

Re: Forth: The programming language that writes itself

#59
post #56

FORTH has some elegance and it's so simple that it is tempting to implement it. However, no language should permit defining the value of 4 by 12, as there is no situation in which this can bring more good than harm in the long term. Another issue that affects FORTH but also Perl and other languages is that they deal with a lot of things implicitly (e.g. the stack, or arguments to functions). Most people agree that ex…

> However, no language should permit defining the value of 4 by 12, as there is no situation in which this can bring more good than harm in the long term.

A Skil saw should not permit you sticking your fingers in the spinning blade, yet most people know that this is a stupid and dangerous thing to do.

Re: Forth: The programming language that writes itself

#60
post #53

Earlier quoted context omitted.

The typed lambda calculus is not Turing complete.

Not quite true, depends on the flavor of the type system you use. Church's simply typed is not, but other type systems are. I think one way to make it Turing complete is to add typing rule for Y combinator as an axiom to your simple type system, but I am not sure.

Yes, I had Church's simply typed lambda calculus in mind. You need to add a fix point combinator or general recursion.
Post reply on HN