Live data from Hacker News

Factor – A practical stack language

factorcode.org

11–20 of 42 posts

Re: Factor – A practical stack language

#11
post #3

Maybe of interest: Zed Shaw, creator of Mongrel, gave a talk a few years back where he mentioned that he was using Factor to create the slides in his presentation. http://vimeo.com/2723800

Sample "presentation" https://github.com/littledan/Factor/blob/master/extra/galois...

Re: Factor – A practical stack language

#12
IIUC the creator, which had already written a popular text editor (jEdit), and now a successful programming language, considered his objectives complete with Factor and moved on.

AFAIK he still works at Google, and never posted in his blog again (http://factor-language.blogspot.com/).

Re: Factor – A practical stack language

#13

I've always wanted to learn a Lisp, but I've found Scheme too academic, so I ended up learning other variants such as Common Lisp and Clojure. Could the same thing be said about Factor vs Forth?

Yes. Factor definitely has a much more modern feel but loses a lot of the purity. That said, Factor is still pretty "pure" by the standards of most languages. Forthish languages are very interesting. I feel they might even represent a "third way" from the normal LISP / FORTRAN dichotomy.

There's a always been more than just those. E.g. declarative languages, such as prolog.

Re: Factor – A practical stack language

#14
post #8

I really love the power of Factor. It is probably the most powerful language I have ever come across. That being said, I think there needs to be a more interactive method where you can see things on the stack in real time as you are programming. I found myself not being able to focus on the problem I wanted to solve and instead was spending too much of my brainpower on remembering what was on the stack where. If you…

I think you hit the nail on the head. I haven't actually used Factor, but I spent 4 years writing and debugging in a concatenative proprietary language, and this was my experience too. It was very productive to write in but required great discipline in terms of structure and documentation to be debuggable, and debugging felt very "interactive", where it was easier to catch problems live by watching the data than to solve them analytically. This put a lot of weight on the quality of the debugging tools, which were lacking to the point where it was all about logging values to a file with a tail log on it, and made it sometimes difficult to separate bad data from bad code, which put more weight on the specs being there. But when all the pieces were in place it was the most terse and beautiful code to read.

Re: Factor – A practical stack language

#15
post #4

It's entirely my own failing, but I just can't get the hang of postfix languages. Feels too much like coding in Yodaspeak.

The Postscript language might be another chance for you to flex you postfix muscles. Still concatenative, dynamic programming, with built-in graphics.

Don Lancaster[1] is notable for producing a long running newsletter with a library of hand coded Postscript to handle layout and rendering of charts and graphs. He provides all the source code for those interested.

[1] http://www.tinaja.com/gurgrm01.shtml

Re: Factor – A practical stack language

#16
post #8

I really love the power of Factor. It is probably the most powerful language I have ever come across. That being said, I think there needs to be a more interactive method where you can see things on the stack in real time as you are programming. I found myself not being able to focus on the problem I wanted to solve and instead was spending too much of my brainpower on remembering what was on the stack where. If you…

Factor used to have the stack displayed in a separate frame above the listener and it was removed at some point.

When I was using Factor I tended to keep the stack short and use the combinators to avoid having to think about large stacks. It worked pretty well.

Re: Factor – A practical stack language

#17
I used to use Factor as my main programming language for a few years and really enjoyed the language and environment. It feels like a mix of Forth, Lisp and Smalltalk. I wrote a number of blog posts about it which might help give a feel for what can be done in the language:

http://bluishcoder.co.nz/tags/factor/

Re: Factor – A practical stack language

#18
post #4

It's entirely my own failing, but I just can't get the hang of postfix languages. Feels too much like coding in Yodaspeak.

Some short functions look so beautiful... but I have a hard time as stuff gets more complex.

https://github.com/slavapestov/factor/blob/master/extra/anag...

IMO this:

    MEMO: dict-words ( -- seq )
    "/usr/share/dict/words" ascii file-lines [ >lower ] map ;
is beautiful.

Re: Factor – A practical stack language

#19
post #13

Earlier quoted context omitted.

Yes. Factor definitely has a much more modern feel but loses a lot of the purity. That said, Factor is still pretty "pure" by the standards of most languages. Forthish languages are very interesting. I feel they might even represent a "third way" from the normal LISP / FORTRAN dichotomy.

There's a always been more than just those. E.g. declarative languages, such as prolog.

Yes, and even "FORTRAN" side represent several approaches - for example, straightforward imperative, like in assemblers or classic BASIC, or structural - which was a big step forward at the time - like Pascal.

Then you have object-oriented languages, which are still different from structural, string-oriented Tcl, array-oriented APL...

Re: Factor – A practical stack language

#20
I wonder what makes them say this in the FAQ: "a flexible enough type system for concatenative languages has not yet been designed. However, Factor 2.0 may include optional static typing, if a suitable type system can be found." http://kittenlang.org/ gives the impression of having a fairly sensible static type system.
Post reply on HN