New patches: [Translate keyword symbols to identifiers danielgackle@gmail.com**20070929165350] { hunk ./src/js-translation.lisp 132 - (if (null val) - (write-string "null") - (error "Cannot translate quoted value ~S to javascript" val))) + (cond ((null val) (write-string "null")) + ((keywordp val) (write-string (js-translate-symbol val))) + (t (error "Cannot translate quoted value ~S to javascript" val)))) } Context: [Updated description of PS-HTML in the tutorial. Vladimir Sedach **20070828230438] [Revised obfuscation facility, added its description to the reference and more unit tests. Vladimir Sedach **20070824213201] [Added description of namespace system to the reference. Vladimir Sedach **20070824204313] [Fixed problem with (- 1). Unary operator "-" didn't like number constants. Vladimir Sedach **20070824201651] [Added defsetf and (defun (setf examples to the reference. Vladimir Sedach **20070824200123] [Added ps-print method specialized on null to ignore printing of nils. Vladimir Sedach **20070824200041] [Added code to remove unreachable constant forms from progn. Vladimir Sedach **20070824193930] [Updated the introduction doc. Vladimir Sedach **20070824182047] [Updated the ParenScript reference. Vladimir Sedach **20070824181529] [Updated the ParenScript tutorial. Vladimir Sedach **20070823231054] [Removed js-file and js-script from deprecated interface (helper macros for net.html.generator from AllegroServe, which really don't belong in ParenScript). Vladimir Sedach **20070823230939] [Fixed error where function call arguments weren't getting compiled to expressions. Vladimir Sedach **20070823230802] [Added the ability to compile cond to expressions. Vladimir Sedach **20070823213515] [Made progn expressions with a single statement print as that statement alone (without parens). Vladimir Sedach **20070823212237] [Made if-expressions return null instead of undefined when else clause wasn't specified. Vladimir Sedach **20070823212216] [Fixed cond. Vladimir Sedach **20070823205853] [Fixed the problem with compile-parenscript-form not being called with the right "expecting" value if a macroexpansion took place. Vladimir Sedach **20070822224633] [Updated and fixed the deprecated interface. Vladimir Sedach **20070820211013] [Updated the documentation and test suite to reflect the fact that html is now ps-html and the ps-inline special form no longer exists. Vladimir Sedach **20070820210858] [Removed mention of old package system from tutorial.lisp. Vladimir Sedach **20070820210816] [Removed js and ps-inline as special forms (they didn't make any sense as special forms), added ps-inline and ps-inline* to compilation-interface.lisp. Vladimir Sedach **20070820210748] [Changed html -> ps-html (otherwise there's a conflict with any number of existing html generation libraries), reorganized packages.lisp exports. Vladimir Sedach **20070820204042] [Replaced optional-args as the keyword-object-handling parameter with a gensym. Vladimir Sedach **20070815235113] [Added in-line code to support &rest arguments. Vladimir Sedach **20070815230241] [Added correct indentation to the printer. Vladimir Sedach **20070815215846] [Removed js-ugly-translation. Vladimir Sedach **20070815203929] [Updated the reference and tests to reflect some small changes in the new printing code (like current lack of line breaks and spaces before some opening parens). Added a few new unit tests. Vladimir Sedach **20070815010833] [Reworked printing implementation to get rid of dwim-join and gratuitious consing; now everything gets written to a stream. Vladimir Sedach **20070815010708] [Fixed type bug with printing slot-value with obj/slot being a non-list. Vladimir Sedach **20070812165622] [Redid package system unit tests. Vladimir Sedach **20070812154311] [Exported the new naming and namespace interface functions and variables in package.lisp. Vladimir Sedach **20070812154240] [Modified ParenScript tests to reflect the big compiler refactoring. Vladimir Sedach **20070812012349] [Updated reference.lisp to reflect recent changes. Vladimir Sedach **20070812012242] [Big refactoring of the ParenScript compiler. Vladimir Sedach **20070812011948] [Updated js-expander to use ps:ps instead of js:js. Vladimir Sedach **20070812011809] [remove lingering format string reddaly@gmail.com**20070806213119] [fixed DEFSCRIPTMACRO evaluation problem that caused load/compilation problems (red) reddaly@gmail.com**20070806211054 DEFSCRIPTMACRO and other similar macros were not expanding into but were instead side-effecting macro definitions. ] [removed file compilation exports for now (red) reddaly@gmail.com**20070806211019] [Removed parenscript.asdf Vladimir Sedach **20070804061651] [Removed parenscript.reader Vladimir Sedach **20070804061050] [Moved package-related code to namespace.lisp, added back *enable-package-system*. Vladimir Sedach **20070804005948] [Added (defun (setf... Vladimir Sedach **20070803225922] [Stopped abuse of set-difference implementation-dependent ordering in defsetf. Vladimir Sedach **20070803215917] [Fixed order of evaluation in defsetf long form. Vladimir Sedach **20070803211900] [Added short-form defsetf. Vladimir Sedach **20070803210332] [Fixed (return). Vladimir Sedach **20070803201936] [Renamed options to optional-args, added unit test for defun foo (&optional... Vladimir Sedach **20070803201258] [Restored special-form getting and setting by symbol-na,me Vladimir Sedach **20070803193123] [Added a more meaningful error message to compile-to-expression. Vladimir Sedach **20070803183535] [Cleaned up macro-defining code, fixed handling of special forms in script-expand-form. Vladimir Sedach **20070803183217] [Removed reference to without-packages in deprecated-interface.lisp. Vladimir Sedach **20070803182805] [Added a more informative print-object method for script-package. Vladimir Sedach **20070803164606] [keyword/optional fixes, slot-value accepts many slot names (RED) reddaly@gmail.com**20070803181104 I also fixed some problems with nil serialization and decomposed the compile-parenscript-form function into a generic function with different behavior depending on the type of form. ] [Fixed handling of uninterned symbols. Vladimir Sedach **20070803020133] [Changed package system so that symbols in parenscript, javascript and parenscript-user are non-prefixed. Made symbols in unknown packages be treated as though they were in parenscript-user by default. Added a prefix string preference to PS packages. Removed all *enable-package-system* stuff. Vladimir Sedach **20070803011857] [Added defsetf long-form. Vladimir Sedach **20070802221926] [Disabled Boyer-Moore matching for cl-ppcre in js normalization code (breaks on Unicode lisps, on by default in PPCRE). Vladimir Sedach **20070802221705] [MSlightly more informative error messages for symbol-abuse. Vladimir Sedach **20070801224245] [Removed manual.pdf from source control. Vladimir Sedach **20070801183143] [Fixed ps* not being found when special-form-symbol assertion is triggered. Vladimir Sedach **20070801182954] [Added functions to set up and tear down a persistent compilation environment. Vladimir Sedach *-20070731225910] [fixed minor issues with advanced lambda lists, resolved conflicts, additional quoted-nil hack (red) reddaly@gmail.com**20070801055212] [advanced lambda lists, script packages with no primary lisp package improvements reddaly@gmail.com**20070801012356] [Added functions to set up and tear down a persistent compilation environment. Vladimir Sedach **20070731225910] [Unexported ps-to-string. Vladimir Sedach **20070731224358] [Changed "Lisp package already has corresponding script package" error to warning (besides being annoying for users, tackge tests from being idempotent) Vladimir Sedach *-20070731212410] [Setup *compilation-environment* to have a working default value. Vladimir Sedach *-20070731182839] [Added tests for 'nil and slot-value nil patches. Vladimir Sedach **20070731212742] [Changed slot-value so that (slot-value foo nil) is now "foo" instead of "foo.null" Vladimir Sedach **20070731212652] [Fixed handling of quoted nil ('nil should be the same as nil, however ''nil isn't). Vladimir Sedach **20070731212609] [Changed "Lisp package already has corresponding script package" error to warning (besides being annoying for users, tackge tests from being idempotent) Vladimir Sedach **20070731212410] [Started work on implementing deprecated compatibility interface by Attila Lendvai's idea. Vladimir Sedach **20070731184714] [Setup *compilation-environment* to have a working default value. Vladimir Sedach **20070731182839] [Added null macro (thanks to Daniel Gackle for suggestion). Vladimir Sedach **20070731182406] [Corrected export of defmacro+/ps names. Vladimir Sedach **20070731182056] [make deprecation warning a only a style-warning attila.lendvai@gmail.com**20070731171052] [fix rebind attila.lendvai@gmail.com**20070731111637] [prefix ( in a comment attila.lendvai@gmail.com**20070731111223] [Revised PS interface and deprecated function list based on user input. Vladimir Sedach **20070730215254] [Added tests for previous script* eval bug. Vladimir Sedach **20070730213615] [Fixed bug where script* wasn't evaluating its arguments as promised. Vladimir Sedach **20070730213259] [Changed names of defmacro+/js forms to ps, made the special-form compilation error message be more informative. (vs) Vladimir Sedach **20070730210351] [Changed tutorial to reflect factoring out of the HTML generation code of Portable Allegroserve, addition of PS package system. (vs) Vladimir Sedach **20070730210219] [define-script-symbol-macro added reddaly@gmail.com**20070728174920] [defscriptmacro single string body fix reddaly@gmail.com**20070728173303 From the mailing list: A js macro that evaluates to a string literal can't be used: (defjsmacro blah () "abc") (js (blah)) => "null;" This seems wrong. For one thing, other literals work fine: (defjsmacro blah () 123) (js (blah)) => "123" For another, Lisp behaves differently: (defmacro blah () "abc") (blah) => "abc" Dan p.s. Actually, I'd rather use a symbol macro but it appears there is no define-symbol-macro in Parenscript and in this case symbol-macrolet is not convenient. ] [paren-asdf hack to make parenscript-compile-op use load-op's dependencies reddaly@gmail.com**20070727034324] [ASDF interaction for Parenscript files reddaly@gmail.com**20070727023326 see the new paren-asdf.lisp and updated compilation-interface.lisp files for implementation details. The function COMPILE-SCRIPT-SYSTEM compiles all the system's files and outputs them to a single stream. Currently it compiles each file separately; in the future we will probably need to compile the whole program and then translate it. ] [Fixed slot-value-conditional bug. (slot-value object slot) should now handle cases where object is an arbitrary expression correctly. Vladimir Sedach **20070726212153] [Cleaned up deprecated interface, added Lisp/ParenScript macro-defining macros back to parser.lisp. Vladimir Sedach **20070726204022] [Removed redundant math library functions (more comprehensive ones are in lib/js-utils.lisp) Vladimir Sedach **20070726193714] [usable-package-system reddaly@gmail.com**20070725040630 The package system is now fairly usable. package.lisp and builtin-packages.lisp now intelligently share symbols. It is also possible to completely ignore any package system functionality. ] [bulk of package system, reader, and other refactoring reddaly@gmail.com**20070724040856] [eval-when special form reddaly@gmail.com**20070720203532 Added the EVAL-WHEN special form to the Parenscript language. It works similarly to the EVAL-WHEN form in Lisp. It has the following form: (eval-when body-forms-language? (situation*) body-forms*) SITUATION is either :compile-toplevel or :execute. BODY-FORMS-LANGUAGE is optional and either :parenscript or :lisp. It defaults to :lisp when :COMPILE-TOPLEVEL is specified and :parenscript when :EXECUTE is specified. Parenscript's EVAL-WHEN is relevant when loading toplevel forms, either from Parenscript files or from within Lisp. ] [renaming-and-refactoring reddaly@gmail.com**20070720003431 Changed the names of many functions and macros to get rid of the symbols with "js" in them--its not Javascript, it's Parenscript! Most of those symbols were renamed with "script" replacing "js". Also changed the main compilation interfaces to use the function COMPILE-SCRIPT and the macro SCRIPT from JS-COMPILE and JS respectively. Additionally, the first steps of the package system are included (with the addition of a the SCRIPT-PACKAGE and COMPILATION-ENVIRONMENT classes). These are integrated into the current compiler, though they probably break a few "traditional" serialization methods, specifically because macro and special form names are stored as symbols rather than strings and EQL comparisons are used rather than STRING-EQUAL comparisons of the strings. I have also split parser.lisp into parser.lisp and macrology.lisp. Parser.lisp contains mechanisms for parsing Parenscript given an input s-expression while macrology.lisp contains language definitions that make use of the parsing mechanisms. All tests now pass, though the documentation has gone slightly out of date with the symbol renaming. This will be fixed shortly. More tests and functionality need to be added to make the current Parenscript compatable with the older semantics (as dicussed, comparing macro/special form names based on their string values is the main thing). ] [rearrange-library-esque-files reddaly@gmail.com**20070714000536] [js-prefix-to-script-prefix reddaly@gmail.com**20070713234051] [symbol-refactoring-part-1 reddaly@gmail.com**20070713210947] [TAG release-7-20-07 Vladimir Sedach **20070720151812] Patch bundle hash: 6cc0cdc2417632e6866396e072dd5367aa124da3