Bluish Coder

Programming Languages, Martials Arts and Computers. The Weblog of Chris Double.


2007-02-13

Factor to Javascript Compiler Makeover

I've made some changes to the way the Factor to Javascript compiler REPL works.

I used 'termlib' to make a terminal style interface for the REPL. Instead of entering Factor code, hitting submit, and waiting for the result, you can type in a listener style REPL, hit enter and get the result back. It works much better. History is available using the up and down arrow keys.

It does have a few rough edges. There's no copy and paste. And no multiline input. I'll fix these over time. Termlib is a nice library to use but be aware of the license restrictions if you want to use it:

This JavaScript-library is free for private and academic use. Please include a readable copyright statement and a backlink to http://www.masswerk.at in the web page. The library should always be accompanied by the "readme.txt" and the sample HTML-documents.

The term "private use" includes any personal or non-commercial use, which is not related to commercial activites, but excludes intranet, extranet and/or public net applications that are related to any kind of commercial or profit oriented activity.

For commercial use see http://www.masswerk.at for contact information.

Eventually I want to write the entire terminal code in Factor and compile it to Javascript but that's probably some time in the future.

I made a few other relatively minor changes. USE:, USING:. and IN: are supported. I also added 'print', 'write', '.' and '.s'. I will be adding more words and putting them in their correct vocabularies over time. I also have plans for better generated code and integrating with my comet library which hopefully won't be too far away.

Tags


This site is accessable over tor as hidden service mh7mkfvezts5j6yu.onion, or Freenet using key:
USK@1ORdIvjL2H1bZblJcP8hu2LjjKtVB-rVzp8mLty~5N4,8hL85otZBbq0geDsSKkBK4sKESL2SrNVecFZz9NxGVQ,AQACAAE/bluishcoder/-44/


Tags

Archives
Links