Sunday, May 30, 2010

Paper for DLS 2010

Slava Pestov, Joe Groff and I are writing a paper about Factor for the Dynamic Languages Symposium, part of OOPSLA. It's a survey discussing both the language design and its implementation, and you can read the draft on the Factor website. The paper is due on Tuesday, and we would really appreciate any comments you have on it.

Update: I've submitted the paper. Thanks everyone for your helpful suggestions! I'll hear back about this July 15, and report here when I do.

3 comments:

Anonymous said...

Great paper! Here are some notes I took while reading it:

* in chapter 2.3, first paragraph: there's a typo "itself itself"
* in chapter 2.3.3: maybe you could add an example for the length-case word; and maybe use an easier example for the cond word, there is too much going on besides the actual invocation
* when talking about the FFI, you could maybe include a FUNCTION: example. IMO the easy FFI is one of the nicest features of Factor
* in chapter 3.5, there is a footnote (6) in the diagram; where is the corresponding text?

Have fun at DLS!

Unknown said...

Page 3: to match the Factor example, the Python one should return a value as in "return h(g(f(x)))".

Redline6561 said...

Some small annoying nits such as improper pluralization, missing articles and other grammatical hoo-ha:
* On pg. 6, "It is common to use parsing words, macros and functors conjunction."
* On pg. 8, "For example, Figure 13 is opens two files and performs an operation on them, ensuring that both files are properly closed."
* On pg. 9, the first sentence under 3.4.3 should begin with "The three major optimizations"
* On pg. 11, "But as larger programs were written in Factor, the utility of system of generic words became clear."

Personally, I enjoyed reading the paper very much. Sections 2.1 and 2.2 could serve as a brief introduction to the language concepts and gives a nice feel for the flavor and flexibility of the language. I felt the weakest portion of the paper was the explanation of metaprogramming in Section 2.3.

In particular, I would've preferred an example, even a contrived or simple one, of Functor usage. I didn't get a good sense of the distinctions between Macros and Functors.

Regarding Section 2.3.2, I had two chief issues. First, "/ cond see" at the listener seems to indicate cond is a normal word, not a MACRO so I had a bit of trouble following along. This was the listener output:

USING: kernel quotations sequences ;
IN: combinators
: cond ( assoc -- )
[ dup callable? [ drop t ] [ first call ] if ] find nip
[ dup callable? [ call ] [ second call ] if ] [ no-cond ]
if* ;

Seeing a macro and macroexpansion (cond or otherwise) would take up some space but resolve the issue.

Secondly, it was claimed that "This integration with the stack checker gives Factor macros more flexibility than traditional Lisp macros." I inferred that the reason for this is related to the concatenative paradigm and having operands on the stack rather than something particular to the macro implementation in Factor. Perhaps this statement could be adjusted or some more detail provided.

In all, it looks like an excellent paper and I wish you all luck at DLS. Cheers.