Search the web
Sign In
New User? Sign Up
concatenative · Discuss the concatenative variety of computer languages: Joy, Forth, Postscript
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
A new concatenative language -- FACTOR   Message List  
Reply | Forward Message #1756 of 4643 |
Hi all,

For the last 7 months, I have been developing a concatenative language
called FACTOR. It is hosted on the Java virtual machine, supporting both
compiled and interpreted execution.

Download it from http://slava.kicks-ass.org/slava/Factor.jar. It
requires Java 2 version 1.4 or later to run. The JAR file includes
source and binaries, under a BSD-style license. Enter 'help' in the
interpreter to get an idea of some useful commands.

Right now, the available documentation is sparse:

http://slava.kicks-ass.org/slava/ftut.html
http://slava.kicks-ass.org/slava/fcom.html

(It is used for scripting in a game I'm working on, which will be
released later. The game uses Java OpenGL bindings is about 40 KLOC of
Java and 10 KLOC of factor code at the moment. But that is not the
subject of the e-mail.)

The main features of Factor are:

- Lisp-like cons cells are a central part of the language
- Control structures are Joy-like combinators; 'code quotations' are
passed on the stack
- Explicit access to the return stack, as in Forth
- Shuffle definitions: ~<< swap a b -- b a >>~ etc.
- Stack effect inference for simple, conditional and recursive forms
- Continuations!
- Compiler for (some) forms (basically those whose stack effect can be
inferred) targetting JVM bytecode; everything else is interpreted
- Big number, ratio, integer, float arithmetic with automatic coercions
- Dynamically-scoped nested 'namespaces' for holding variables
- Reasonably small and elegant core
- (Somewhat incomplete but already comprehensive) test suite
- Full reflective inspection of interpreter state
- 3 front-ends:
- http server
- text mode console
!!! GUI with hyperlinked inspection of source and variables, etc

This language owes a lot to Joy and Lisp, and to a lesser extent, Forth.
I'd like to thank the inventor of Joy especially for leading me to see
the elegance and simplicity of concatenative languages.

I'd love to write a bit more but it is getting late. If anybody gets a
chance to play around with this, I'd appreciate some feedback.
--
Slava Pestov



Fri Apr 16, 2004 4:17 am

slava@...
Send Email Send Email

Forward
Message #1756 of 4643 |
Expand Messages Author Sort by Date

Hi all, For the last 7 months, I have been developing a concatenative language called FACTOR. It is hosted on the Java virtual machine, supporting both ...
Slava Pestov
slava@...
Send Email
Apr 16, 2004
4:17 am

how have you implememented continuations? in otuto i have two stacks - one for pending operations and one for values (i think the first of these is the same...
andrew cooke
aannddrreeww...
Offline Send Email
Apr 16, 2004
12:30 pm

it's wonderful to hear that there is activity on these fronts. i have no idea how many people are lurking, and working on their own ideas, but i worry that low...
stevan apter
sa@...
Send Email
Apr 16, 2004
12:55 pm

the only url i have that's relevant to otuto is notes in my diary. it's only rough notes, and not corrected when things change, so the information is...
andrew cooke
aannddrreeww...
Offline Send Email
Apr 16, 2004
1:47 pm

... Yes, indeed. I very much welcome experimentations with concatenative languages. ... I myself have not contributed at all lately. I have been rather unwell...
phimvt@...
phimvt
Offline Send Email
Apr 30, 2004
7:55 am

... ... I'm sorry to read that. I have had a lot of fun with Joy and your papers about it. Gute Besserung!! [ well bettering ] --Heiko...
Heiko.Kuhrt@...
heikuh
Offline Send Email
Apr 30, 2004
3:19 pm

... Speaking of experimenting with concatenative languages, I've been playing around with writing dc(1) macros lately and got to wondering if anyone else has...
Ben
gnomon027
Online Now Send Email
Apr 30, 2004
6:56 pm

... Hi Ben, I'm not sure I should admit to this but in my early Unix days I used dc a lot and got to quite like it. Well at least I liked the RPN notation and...
Nick Forde
nickf42uk
Offline Send Email
Apr 30, 2004
9:06 pm

... In that case I probably shouldn't admit that I really quite enjoy scripting in dc and wrote a short introductory article[1] about it as I found my footing...
Ben
gnomon027
Online Now Send Email
May 1, 2004
3:54 am

... You want the 7th Edition source (now available under a close variant of the BSD license), which is online in many places. One of them is ...
John Cowan
johnwcowan
Online Now Send Email
May 1, 2004
1:50 pm

From: andrew cooke [mailto:andrew@...] ... That sounds correct to me; Forth works the same way. As for terminology: the only language I know of which...
Tanksley, William D. ...
wtanksle
Offline Send Email
Apr 16, 2004
2:22 pm

... [...] ... thanks. [...] ... variable stack effects? i don't know what that means, but my idea was to describe the type of an operation as a transformation...
andrew cooke
aannddrreeww...
Offline Send Email
Apr 16, 2004
3:17 pm

... Indeed, this is pretty much how I do it. A continuation is captured by the callcc word; it is given a quotation, and it applies the quotation to the...
Slava Pestov
slava@...
Send Email
Apr 16, 2004
3:18 pm

Slava Pestov said: [...] ... not a big mistake - i just found it confusing. my main sticking point was that i couldn't see how to get a single operator on the...
andrew cooke
aannddrreeww...
Offline Send Email
Apr 16, 2004
3:37 pm

... One of the inspirations for Factor's is SmallTalk. Both are imperitive languages at the core, but also very dynamic... ... If you evaluate this: "Enter...
Slava Pestov
slava@...
Send Email
Apr 16, 2004
10:56 pm

now i can see where 7 months went :o) you should document this more - the web pages don't do it justice. thanks, andrew ... -- ` __ _ __ ___ ___| |_____...
andrew cooke
aannddrreeww...
Offline Send Email
Apr 16, 2004
11:46 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help