Live data from Hacker News

Factor: A Practical Stack Language

factorcode.org

21–30 of 46 posts

Re: Factor: A Practical Stack Language

#22
post #19

Damn, that indeed looks interesting. Could someone give here a Factor vs Forth tl;dr? Forth appears to be tailored for embedded systems, but the velociraptor is growing quick on me.

From the FAQ [0]: > How is Factor different from Forth? > Forth is untyped, not garbage collected, and close to the machine. For flow control, Forth code tends to use immediate words. Variables and arrays tend to be global, and programs aren't usually written in a functional manner. Factor is very different from this. It is dynamically typed, offering a high degree of reflection. Unreferenced objects are garbage coll…

Also Forth appears to be heavily corporate. Except for GNU's Gforth compiler, tools appear to be commercial.

Re: Factor: A Practical Stack Language

#23
post #22

Earlier quoted context omitted.

From the FAQ [0]: > How is Factor different from Forth? > Forth is untyped, not garbage collected, and close to the machine. For flow control, Forth code tends to use immediate words. Variables and arrays tend to be global, and programs aren't usually written in a functional manner. Factor is very different from this. It is dynamically typed, offering a high degree of reflection. Unreferenced objects are garbage coll…

Also Forth appears to be heavily corporate. Except for GNU's Gforth compiler, tools appear to be commercial.

There are many many free Forths, across almost all architectures. Dxforth, ciforth, FIG-Forths etc.

Re: Factor: A Practical Stack Language

#24

Made me realize webassembly is almost a concatenative language

One of the text forms is totally stack based while the second is quite lispy. And, according to the official grammar, you can mix the two forms willy-nilly — aside from the function header which needs to be in the lisp form IIRC.

Re: Factor: A Practical Stack Language

#25
post #6
post #4

Related (others?): Factor: A Practical Stack Languge - https://news.ycombinator.com/item?id=22053857 - Jan 2020 (21 comments) Factor: An impressive stack-based language environment - https://news.ycombinator.com/item?id=17726634 - Aug 2018 (34 comments) A Panoramic Tour of Factor (2015) - https://news.ycombinator.com/item?id=11377847 - March 2016 (6 comments) Factor – A Practical Stack Language - https://news.ycombin…

Could probably add any number of discussions of concatenative programming, most notably “Why Concatenative Programming Matters”. https://hn.algolia.com/?query=Why%20Concatenative%20Programm...

A great read, thank you.

Re: Factor: A Practical Stack Language

#26
post #19

Damn, that indeed looks interesting. Could someone give here a Factor vs Forth tl;dr? Forth appears to be tailored for embedded systems, but the velociraptor is growing quick on me.

From the FAQ [0]: > How is Factor different from Forth? > Forth is untyped, not garbage collected, and close to the machine. For flow control, Forth code tends to use immediate words. Variables and arrays tend to be global, and programs aren't usually written in a functional manner. Factor is very different from this. It is dynamically typed, offering a high degree of reflection. Unreferenced objects are garbage coll…

Does anyone know of a Forth-like language that would be similarly low level, but allowing for nested word definitions for more HOF-centric approach?

Re: Factor: A Practical Stack Language

#27
Ha! I implemented "concatenative" programming for Java as Binding [1] (or Unit) expressions, but had no idea. Seriously, never came across that term before this post.

The idea with binding expressions is the type of expression A and the type of expression B implement "reactions" with one another in order to form a binding expression when they are lexically adjacent.

65 mph

The type of `mph` defines a post reaction method with the type of `65` as an argument that results in type Rate. As I understand it this is concatenative, right?

Another example:

Money payment = 1.5M USD;

There are tons of these.

Concatenative programming in general feels like it should have a more prominent place in mainstream languages. Just my take.

[1] https://github.com/manifold-systems/manifold/tree/master/man...

Re: Factor: A Practical Stack Language

#28
Concatenate languages are fun, but damn if that isn't an annoying UI. It's gated with some kind of captcha, and it made me go through 40+ rounds, with every few selected images resizing and shifting the captcha.

Re: Factor: A Practical Stack Language

#29
post #28

Concatenate languages are fun, but damn if that isn't an annoying UI. It's gated with some kind of captcha, and it made me go through 40+ rounds, with every few selected images resizing and shifting the captcha.

There shouldn't be any captchas. Do you mean on the website, like Cloudflare captchas? Which country/vpn/whatever are coming from?

Re: Factor: A Practical Stack Language

#30
post #4

Related (others?): Factor: A Practical Stack Languge - https://news.ycombinator.com/item?id=22053857 - Jan 2020 (21 comments) Factor: An impressive stack-based language environment - https://news.ycombinator.com/item?id=17726634 - Aug 2018 (34 comments) A Panoramic Tour of Factor (2015) - https://news.ycombinator.com/item?id=11377847 - March 2016 (6 comments) Factor – A Practical Stack Language - https://news.ycombin…

I wanted to reply like what is below but got cold feet. But thanks. >>>> Why? tedious for me w/o a join. Or is there a feature lurking somewhere? At a different level stuff like this it strike me as “… nothing to see here move on .. “

I think most (? certainly many) readers like the links to past discussions. If it were just a list of past submissions, most of which didn't get comments, I'd agree with you.

I also try to drop the ones that got comments but the comments were off topic or otherwise useless.

Post reply on HN