Live data from Hacker News

Factor: A Practical Stack Language

factorcode.org

31–40 of 46 posts

Re: Factor: A Practical Stack Language

#31
post #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?

On the website, like a Google captcha. I clicked through to see what the macro story was like and was hit with a captcha. USA, no VPN.

Re: Factor: A Practical Stack Language

#32
post #2

Be careful. Factor is a gateway to lower level stack based languages. I saw Zed Shaw do a presentation using factor and decided to spend a weekend playing with it. It was the start of a two year journey that ended with me writing forth for microcontrollers. That was time I should have studied but was somehow always sidelined by other things.

Do you have any links to things you have done or any interesting resources for Forth on microcontrollers?

Re: Factor: A Practical Stack Language

#33

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 me…

It is my understanding that the JVM itself uses a stack model at its core.

Re: Factor: A Practical Stack Language

#34
post #2

Be careful. Factor is a gateway to lower level stack based languages. I saw Zed Shaw do a presentation using factor and decided to spend a weekend playing with it. It was the start of a two year journey that ended with me writing forth for microcontrollers. That was time I should have studied but was somehow always sidelined by other things.

> I saw Zed Shaw do a presentation using factor and decided to spend a weekend playing with it.

I saw the same presentation back then and also spent a weekend with factor. It was a really valuable experience. The language was so different from anything I had previously used that I had to learn a new way of thinking. That was a great thing to go through.

Slava Pestov (the creator of factor) did a presentation on the language at Google back in the 2000s. A highlight from the talk was him explaining that there was a function 'boa' that you could call to construct an object 'by order of arguments'. He called it "a boa constructor." :)

Re: Factor: A Practical Stack Language

#35

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.

The 'lispy' one is actually just a stack language written using sexps.

Re: Factor: A Practical Stack Language

#36
post #2

Be careful. Factor is a gateway to lower level stack based languages. I saw Zed Shaw do a presentation using factor and decided to spend a weekend playing with it. It was the start of a two year journey that ended with me writing forth for microcontrollers. That was time I should have studied but was somehow always sidelined by other things.

Oh the flip side, if you told that story in an interview I'd hire you on the spot.

Currently you probably wouldn't. I am a classical musician.

CS or EE is however my backup if I get injured or for some reason lose my job.

Re: Factor: A Practical Stack Language

#37
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's no one forth. A huge number of forth users end up writing their own forth, with different semantics, because it can be easier that way.

Though you're right, forths are unusually commercial. Forth is old, and in some ways it stayed old. A lot of people that use it now have used it since the 80s, so they're quite used to paying for compilers.

There's also the fact that forths are used in very niche places, and the companies that use them are happy to pay up.

You'll find a very open community with really nice people though.

Re: Factor: A Practical Stack Language

#38
post #9
post #2

Be careful. Factor is a gateway to lower level stack based languages. I saw Zed Shaw do a presentation using factor and decided to spend a weekend playing with it. It was the start of a two year journey that ended with me writing forth for microcontrollers. That was time I should have studied but was somehow always sidelined by other things.

Have you found #forth-hardware-projects and #mecrisp?

This is almost 15 years ago, and I didn't have a reliable internet connection, so sadly no. There was two of us in a small computer group in Germany trying to figure things out, mostly.

Re: Factor: A Practical Stack Language

#39

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 me…

If you see units as multiplicative factors:

1.5 USD = 1.5 * USD

65 mph = 65 * mile / hour

you can then use simple algebra to solve unit conversion and many other common deductive reasoning questions ("how many miles per gallon...?"), relying on the units to guide you to the solution.

There's probably a name for this, and it is indeed built into the SI notation (km/h vs mph).

Re: Factor: A Practical Stack Language

#40
post #36

Earlier quoted context omitted.

Oh the flip side, if you told that story in an interview I'd hire you on the spot.

Currently you probably wouldn't. I am a classical musician. CS or EE is however my backup if I get injured or for some reason lose my job.

I wouldn't hire you for a leadership role then, but it wouldn't stop me from hiring you. It is damn hard to find someone capable to delve deep into technology like that without hand-holding, and walk away with a working command of such obscure knowledge. People like that can be taught and trained to work on whatever project I am working on.

So with a gap working as a classical musician it might mean starting effectively as a (paid) intern, but it would still get your foot in the door.

I don't claim to be representative of all, or even most hiring managers though.

Post reply on HN