13 Replies - 10267 Views - Last Post: 18 July 2010 - 07:55 PM

Week# 25: Factor

Factor is definitely not something you're used to. It's a high-level, general purpose, stack-based programming language. The goal of the language is to be a complete and practical stack-based programming language.

From the Factor website: The Factor programming language combines powerful language features with a full-featured library. The implementation is fully compiled for performance, while still supporting interactive development. Factor applications are portable between all common platforms. Factor can deploy stand-alone applications on all platforms. Full source code for the Factor project is available under a BSD license.

For quite some time, Factor has been too fast a moving target for much in the way of beginner tutorials and books and such. Therefore, http://docs.factorcode.org/ is the most complete resource available. Factor is heavily documented. All the documentation is there, you just have to find what you need. The biggest help you'll get is on the #concatenative IRC channel on irc.freenode.org. They are extremely helpful there, and will help you out with code reviews and such, and will answer your questions.

HOW TO GET STARTED:

You'll want to navigate to http://factorcode.org/ and pick up the latest stable or development release for your platform. When you run Factor, it will open a really cool window called the Listener. You can browse documentation all sorts of stuff there, and use it as an REPL. In the Listener, you can go to help to open the documentation browser. You'll then want to go through the Getting Started section of the docs, starting with "Your first program" and then the factor cookbook. After that, you can read code and search through the Factor docs to learn about things you don't understand. Anything else, you can ask questions about on the mailing list or IRC channel.

Re: Week# 25: Factor

Re: Week# 25: Factor

Posted 13 July 2010 - 09:15 PM

Interesting, I've downloaded everything and think I may give this a go(just for something I've never tried before). Ok Raynes and programble how would I go about creating a GUI with Factor (I'm thinking of trying to create a RSS reader with Factor) so can I create a GUI with like TextBoxes and such or is all command line type?

Re: Week# 25: Factor

Posted 13 July 2010 - 10:35 PM

PsychoCoder, on 13 July 2010 - 10:15 PM, said:

Interesting, I've downloaded everything and think I may give this a go(just for something I've never tried before). Ok Raynes and programble how would I go about creating a GUI with Factor (I'm thinking of trying to create a RSS reader with Factor) so can I create a GUI with like TextBoxes and such or is all command line type?

I don't get why my name is in this. I honestly don't know much of Factor, so couldn't tell you.

Re: Week# 25: Factor

Posted 14 July 2010 - 07:53 AM

I can help!!

I'll be the first to tell you, however, that the state of UI development in Factor right now isn't all that great. Factor ships out with a UI library, and like the rest of the language it's heavily documented. Also like the rest of the language, the reference documentation is all there is, and "Getting Started" info is sparse, so you might have to take it slow. The problem is that the UI library that ships with Factor is lacking. Slava has really only implemented the things he needed to get the Factor development tools running (the UI ones of course).

There is a GTK backend (a la gtk bindings) that will be merged into the official repo, so I think the shitty-ui woes will be gone soon.

You *can* write a UI application in Factor, but at this stage of the game, it might take more effort than it would in another language. Factor does have some neat XML stuff. It's got libraries for all sorts of stuff that Slava Pestov has written himself.

I encourage those who are trying the language to take it one step at a time. It's a very weird language, and like I said, it isn't what you're used to. I submitted this challenge, because I thought everyone might enjoy playing with a language out of pretty much *everyone's* comfort zone, but one that is not esoteric and is actually aiming to be practical. I hope everyone has fun!

I will point out that I haven't used Factor in quite a while, but if anyone has any questions, I'll try to answer them to the best of my ability.

Re: Week# 25: Factor

-edit-
Well, I guess I'll add what I have, without adding another post to this thread. The beginnings of a syntax highlighter for conTEXT editor I know I know, but this is a tough language to get used to. Anyway, if you add to /improve it, please let me know!