Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good resources for learning Factor [closed]

Tags:

factor-lang

Having recently come across this introduction to Factor, I've been a bit curious to learn more. Aside from the official FAQ mentioned there, do you have resources for learning the language (as well as the stack-based "paradigm," if that's the right word) that you've found helpful?

As a side note, would learning Forth help, or is that like comparing C to Python (or what have you)?

like image 914
J Cooper Avatar asked Dec 02 '08 07:12

J Cooper


People also ask

How lack of resources can affect the student learning?

Lack of Funding Funding has a significant impact on student performance. A lack of funding typically leads to larger class sizes as well as less technology and curriculum materials, and the more students a teacher has, the less attention they can pay to individual students.

Why are resources important in education?

Educational resources are used in a learning environment to help and assist with people's development and learning. They're designed to reinforce learning and in some cases allow people to put their knowledge to the test.

What is the impact of learning resources in teaching/learning process?

Teaching-learning resources assist in and supports student learning. It helps students to understand and enjoy the lesson which the teacher teaches them. It helps students understand the object of the lesson the teacher is conveying.

What is management of learning resources?

1. The organization and arrangement of learning resources, including text documents, images, infographics, HTML text, videos, audio files, and links to internet resources. Learn more in: Measuring the Digital Transformation of Education and Teaching.


1 Answers

Factor is heavily inspired by Forth and other stack languages. It also grabs ideas from Lisp, and Smalltalk. From what I've read online, it's not necessary to learn any of those language before learning Factor. It won't hurt if you do, however :)

The biggest problems I've run into is the youthfulness of the language. In other words, code samples on various blogs/sites will be outdated because they used older versions of Factor (0.6, 0.7, 0.8, etc). Factor 0.9 and above are most likely to remain the same.

Once you get past the basics, the docs (online + in the listener) are pretty clear. The docs occasionally suffer from the same problem as blog posts: some outdated code examples. You still have the mailing lists/IRC to help out if you really get stuck.

I've only used the docs so far, instead of the mailing lists/IRC. I then experiment with the listener to further learn/explore a new concept I find in the docs.

This is the first language where most of my questions are answered just by digging into the docs of a function. Most of Factor is written in Factor, so things become clearer as you spend more time with the docs.

(The 2nd biggest problem I've had is trying to understand the web framework (Furnace). The web framework is more feature-rich that what I am used to. It's nothing impossible, just requires some practice and exploring the docs.)

The quickest intro. to concatenative languages I've found: http://github.com/raganwald/homoiconic/blob/master/2008-11-16/joy.md#readme

Your first steps to Factor: http://concatenative.org/wiki/view/Factor/Learning

These videos go into more detail regarding writing Factor code:

  • 90 minute video might help learning Factor basics: YouTube: Factor: An extensible, interactive Language - Basically, Slava (Factor creator) gives a video intro. to Factor. It's part of the Google Talk series. (There is a high and low quality version in case you can't see the slides.) Factor concepts are also compared to other languages.
  • 13 minute video: Forth @ RubyConf 2008. A brief demo of Forth. It also mentions some ideas that are common throughout the software world.
  • 100 minute video: Factor presented to Lisp programmers. Audio is not the best, but still very good video quality. If you watch the other videos, you can skip some of the beginning parts of this.

Some diversions:

  • Create a calculator + GUI: http://re-factor.blogspot.com/2010/08/calculator-with-gui.html
  • "Why I like Factor": http://jedahu.blogspot.com/2010/08/why-i-like-factor.html
  • Planet Factor: http://planet.factorcode.org/

Here are some blog posts that can help provide direction:

  • From Jan 2008, but it should still be applicable: "Learning Factor" by Daniel Ehrenberg (He's one of the core Factor contributors.)
  • This following quotation is from a blog post from Sept. 2008: Sorting strings with embedded numbers

Understanding the various abstractions and libraries which are available is key to grasping Factor: collections, generic words, fry, locals, macros, memoization, PEGs, the prettyprinter, and so on. Making effective use of these tools can reduce the amount of work required to solve a problem by an order of magnitude.

Factor is definitely the most fun language. It has fewer surprises than other languages. I find it easier to learn than Ruby or Lisp. Just for fun, here is a language shootout between Lisp and Factor:

  • Lisp code
  • Factor code

For anyone who is interested in stack-based languages, this article might help: The Joy of Catenative Languages (Parts 1, 2, 3) (It's more general and uses the Cat language for examples. It helped me with learning Factor basics.)

like image 77
11 revs Avatar answered Oct 25 '22 18:10

11 revs