Vladimir Sedach [Tue, 31 Jul 2007 21:24:10 +0000 (21:24 +0000)]
Changed "Lisp package already has corresponding script package" error to warning.
Besides being annoying for users, it prevented package tests from
being idempotent.
Vladimir Sedach [Tue, 31 Jul 2007 18:47:14 +0000 (18:47 +0000)]
Started work on implementing deprecated compatibility interface by Attila Lendvai's idea.
Vladimir Sedach [Tue, 31 Jul 2007 18:28:39 +0000 (18:28 +0000)]
Setup *compilation-environment* to have a working default value.
Vladimir Sedach [Tue, 31 Jul 2007 18:24:06 +0000 (18:24 +0000)]
Added null macro.
Thanks to Daniel Gackle for suggestion.
Vladimir Sedach [Tue, 31 Jul 2007 18:20:56 +0000 (18:20 +0000)]
Corrected export of defmacro+/ps names.
Attila Lendvai [Tue, 31 Jul 2007 17:10:52 +0000 (17:10 +0000)]
make deprecation warning a only a style-warning
Attila Lendvai [Tue, 31 Jul 2007 11:16:37 +0000 (11:16 +0000)]
fix rebind
Attila Lendvai [Tue, 31 Jul 2007 11:12:23 +0000 (11:12 +0000)]
prefix ( in a comment
Vladimir Sedach [Mon, 30 Jul 2007 21:52:54 +0000 (21:52 +0000)]
Revised PS interface and deprecated function list based on user input.
Vladimir Sedach [Mon, 30 Jul 2007 21:36:15 +0000 (21:36 +0000)]
Added tests for previous script* eval bug.
Vladimir Sedach [Mon, 30 Jul 2007 21:32:59 +0000 (21:32 +0000)]
Fixed bug where script* wasn't evaluating its arguments as promised.
Vladimir Sedach [Mon, 30 Jul 2007 21:03:51 +0000 (21:03 +0000)]
Changed names of defmacro+/js forms to ps, made the special-form compilation error message be more informative.
Vladimir Sedach [Mon, 30 Jul 2007 21:02:19 +0000 (21:02 +0000)]
Changed tutorial to reflect factoring out of the HTML generation code of Portable Allegroserve, addition of PS package system.
Red Daly [Sat, 28 Jul 2007 17:49:20 +0000 (17:49 +0000)]
define-script-symbol-macro added
Daniel Gackle [Sat, 28 Jul 2007 17:33:03 +0000 (17:33 +0000)]
defscriptmacro single string body fix
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"
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.
Signed-off-by: Red Daly <reddaly@gmail.com>
Red Daly [Fri, 27 Jul 2007 03:43:24 +0000 (03:43 +0000)]
paren-asdf hack to make parenscript-compile-op use load-op's dependencies
Red Daly [Fri, 27 Jul 2007 02:33:26 +0000 (02:33 +0000)]
ASDF interaction for Parenscript files
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.
Vladimir Sedach [Thu, 26 Jul 2007 21:21:53 +0000 (21:21 +0000)]
Fixed slot-value-conditional bug.
(slot-value object slot) should now handle cases where object is an
arbitrary expression correctly.
Vladimir Sedach [Thu, 26 Jul 2007 20:40:22 +0000 (20:40 +0000)]
Cleaned up deprecated interface, added Lisp/ParenScript macro-defining macros back to parser.lisp.
Vladimir Sedach [Thu, 26 Jul 2007 19:37:14 +0000 (19:37 +0000)]
Removed redundant math library functions.
(more comprehensive ones are in lib/js-utils.lisp)
Red Daly [Wed, 25 Jul 2007 04:06:30 +0000 (04:06 +0000)]
usable package system
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.
Red Daly [Tue, 24 Jul 2007 04:08:56 +0000 (04:08 +0000)]
bulk of package system, reader, and other refactoring
Red Daly [Fri, 20 Jul 2007 20:35:32 +0000 (20:35 +0000)]
eval-when special form
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.
Red Daly [Fri, 20 Jul 2007 00:34:31 +0000 (00:34 +0000)]
renaming and refactoring
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).
Vladimir Sedach [Mon, 16 Jul 2007 18:13:40 +0000 (18:13 +0000)]
Re-introduced 'with' special form.
(it got lost somewhere along the way)
Vladimir Sedach [Sat, 14 Jul 2007 00:28:54 +0000 (00:28 +0000)]
Improved formatting/whitespace removing code in tests. Added slot-value-setf test.
Now all ps-tests pass.
Vladimir Sedach [Fri, 13 Jul 2007 21:11:09 +0000 (21:11 +0000)]
Added documentation of new macro facilities.
Viktor Leis [Thu, 12 Jul 2007 23:19:07 +0000 (23:19 +0000)]
Added warnings when attempting to use reserved Javascript keywords as variable or functions names.
Signed-off-by: Vladimir Sedach <vsedach@gmail.com>
Vladimir Sedach [Tue, 10 Jul 2007 21:18:21 +0000 (21:18 +0000)]
Added oddp, evenp utility functions, added explanatory error message to js-compile-to-symbol.
Vladimir Sedach [Tue, 3 Jul 2007 19:45:56 +0000 (19:45 +0000)]
Improved symbol-to-js to handle more complicated Javascript-like symbols.
Luca Capello [Tue, 3 Jul 2007 18:29:37 +0000 (18:29 +0000)]
Factor out misc tests into their own test file.
Signed-off-by: Vladimir Sedach <vsedach@gmail.com>
Red Daly [Mon, 2 Jul 2007 21:43:07 +0000 (21:43 +0000)]
character encoding fixes in test.lisp
Luca Capello [Sun, 1 Jul 2007 17:04:19 +0000 (17:04 +0000)]
t/test.lisp: typo, remove colon at line 82
Luca Capello [Sun, 1 Jul 2007 17:00:21 +0000 (17:00 +0000)]
add an (eval-when ...) when defining a test suite
Vladimir Sedach [Thu, 28 Jun 2007 19:28:23 +0000 (19:28 +0000)]
Added divisors to ceiling, floor, round.
Vladimir Sedach [Tue, 26 Jun 2007 23:13:07 +0000 (23:13 +0000)]
Added Red Daly to contributors file.
Red Daly [Tue, 26 Jun 2007 21:30:27 +0000 (21:30 +0000)]
js.lisp breakup
Broke the js.lisp file up into several three files: source-model.lisp,
js-translation.lisp, and parser.lisp.
source-model.lisp: class definitions that correspond to the Javascript
AST. (defjsclass forms for the most part)
js-translation.lisp: functions for converting AST objects to
Javascript source code
parser.lisp: macro definitions and the mechanisms for processing
Parenscript forms into AST objects.
See also: http://common-lisp.net/pipermail/parenscript-devel/2007-June/000035.html
Red Daly [Tue, 26 Jun 2007 17:43:20 +0000 (17:43 +0000)]
package rename
Vladimir Sedach [Tue, 26 Jun 2007 19:24:52 +0000 (19:24 +0000)]
Refactored macro-related code, changed "compiler macros" to special forms, added separate namespaces for macros and symbol-macros, added full macro lambda lists to macrolet, added support for docstrings to defjsmacro.
Vladimir Sedach [Mon, 25 Jun 2007 19:42:00 +0000 (19:42 +0000)]
Added contributors file.
Vladimir Sedach [Mon, 25 Jun 2007 19:17:27 +0000 (19:17 +0000)]
Added js-expander.el
Vladimir Sedach [Fri, 22 Jun 2007 20:46:40 +0000 (20:46 +0000)]
Added defmacro to ParenScript.
Vladimir Sedach [Thu, 21 Jun 2007 17:54:16 +0000 (17:54 +0000)]
Renamed with-timeout to do-set-timeout, added ignore errors.
Thanks to: John Fremlin <john@fremlin.org>
Vladimir Sedach [Wed, 20 Jun 2007 20:48:00 +0000 (20:48 +0000)]
Added defmacro+js
Vladimir Sedach [Tue, 19 Jun 2007 21:34:16 +0000 (21:34 +0000)]
Exported defmacro/js
Vladimir Sedach [Tue, 19 Jun 2007 19:37:48 +0000 (19:37 +0000)]
Added js-utils file.
Vladimir Sedach [Tue, 19 Jun 2007 18:44:51 +0000 (18:44 +0000)]
Added the defmacro/js macro-defining macro.
Vladimir Sedach [Sat, 16 Jun 2007 04:59:12 +0000 (04:59 +0000)]
Added binary negation ~ operator.
Vladimir Sedach [Fri, 15 Jun 2007 19:29:16 +0000 (19:29 +0000)]
setf slot-value patch
Attila Lendvai [Wed, 6 Jun 2007 19:45:25 +0000 (19:45 +0000)]
Fix: add parens around instanceof to make it work in all situations
Attila Lendvai [Thu, 3 May 2007 14:40:28 +0000 (14:40 +0000)]
Bah, speed up list-to-string by a few factors...
Ray Myers [Fri, 27 Apr 2007 07:39:17 +0000 (07:39 +0000)]
Fix (- 1) and (incf/decf x 5)
Fix the following incorrect (or at least unexpected) behavior in
ParenScript.
(js (- 1)) => "1;"
(js (incf x 5)) => an error
(js (decf x 5)) => an error
Signed-off-by: Attila Lendvai <attila.lendvai@gmail.com>
Attila Lendvai [Wed, 25 Apr 2007 14:58:06 +0000 (14:58 +0000)]
Note in the warning that we are redefining a _js_ compiler macro
Attila Lendvai [Mon, 16 Apr 2007 14:36:03 +0000 (14:36 +0000)]
Follow quote changes in SLOT-VALUE
Attila Lendvai [Mon, 16 Apr 2007 13:11:33 +0000 (13:11 +0000)]
Fixed (?) quoting mechanism
(js:js (+ 42 '"FoooFFFOFOFooo")) => "42 + FoooFFFOFOFooo;"
IOW, quote inside a parenscript form means to simply print the quoted
value as-is. Among other things, this is useful for inserting literal
javascript into parenscript. I hope it will not break anything.
Henrik Hjelte [Mon, 15 Jan 2007 14:19:48 +0000 (14:19 +0000)]
conditional attributes in html-generator
Marijn Haverbeke [Wed, 15 Nov 2006 07:38:22 +0000 (07:38 +0000)]
add proper cond construct
Henrik Hjelte [Wed, 22 Nov 2006 19:30:27 +0000 (19:30 +0000)]
Possible to make attributes conditionally rendered with js-html generator
Henrik Hjelte [Wed, 15 Nov 2006 23:54:41 +0000 (23:54 +0000)]
docs updated for new setf optimization
Henrik Hjelte [Wed, 15 Nov 2006 23:41:44 +0000 (23:41 +0000)]
bugfix method-call problem
Henrik Hjelte [Wed, 15 Nov 2006 22:40:45 +0000 (22:40 +0000)]
moretests for method-call (dot-notation) syntax
Henrik Hjelte [Wed, 15 Nov 2006 21:35:02 +0000 (21:35 +0000)]
bugfix commutative plus and minus
Henrik Hjelte [Wed, 15 Nov 2006 20:44:56 +0000 (20:44 +0000)]
tests for some bugs
Reported by: Marijn Haverbeke <marijnh@gmail.com>
Henrik Hjelte [Wed, 15 Nov 2006 19:27:20 +0000 (19:27 +0000)]
asdf test-op added
(asdf:operate 'asdf:test-op :parenscript)
Henrik Hjelte [Wed, 15 Nov 2006 16:46:03 +0000 (16:46 +0000)]
updated pdf manual for new with syntax
Henrik Hjelte [Wed, 15 Nov 2006 16:43:39 +0000 (16:43 +0000)]
build.sh for documentation
Henrik Hjelte [Wed, 15 Nov 2006 16:13:03 +0000 (16:13 +0000)]
Updated documentation to reflect the new syntax of the with statement
Henrik Hjelte [Wed, 15 Nov 2006 15:58:46 +0000 (15:58 +0000)]
make the test escape-sequences-in-string work again
Attila Lendvai [Tue, 3 Oct 2006 13:49:55 +0000 (13:49 +0000)]
Added evenp and oddp
Attila Lendvai [Tue, 3 Oct 2006 13:49:23 +0000 (13:49 +0000)]
Added assert for simple catch forms
Attila Lendvai [Fri, 1 Sep 2006 16:02:49 +0000 (16:02 +0000)]
Killed the feature (js:js* '(let (a b) (+ a b))) => "var a = b; a + b;"
Luca Capello [Mon, 2 Oct 2006 21:55:16 +0000 (21:55 +0000)]
docs/pbook.py: correct faulty check for PDF output
Frank K[_\c3_][_\bc_]ster discovered that docs/pbook.py produces buggy
LaTeX code, a faulty check for PDF output. It doesn't show up if you
only try to create PDF.
But if you want to go the traditional route and produce dvi files (and
from that PostScript and maybe finally again PDF), this will fail and
still produce PDF. The script itself doesn't do that (or rather, it
does that in fact but ignores the output in this first run), but it's
still an uglyness.
Moreover, it's completely useless, because the only package that uses
the information, graphicx, will detect the output format itself (and
in a proper way).
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=390629
Attila Lendvai [Mon, 21 Aug 2006 09:57:00 +0000 (09:57 +0000)]
Use symbol-name for op matching to fix various bugs/surprises
(e.g. `(foo::% 4 2))
Marijn Haverbeke [Fri, 21 Jul 2006 07:50:06 +0000 (07:50 +0000)]
Allow strings and numbers as slot names in object literals
Marco Baringer [Sun, 16 Jul 2006 17:07:49 +0000 (17:07 +0000)]
Drop unused js2.lisp
Attila Lendvai [Sun, 16 Jul 2006 16:47:17 +0000 (16:47 +0000)]
Fix compilation of (.call (lambda () ...) arg1 ...), add missing ()'s around the lambda
Attila Lendvai [Sun, 16 Jul 2006 16:46:30 +0000 (16:46 +0000)]
Fix compilation of ((foo) bar) -> foo()(bar)
Attila Lendvai [Sun, 16 Jul 2006 16:39:46 +0000 (16:39 +0000)]
Fixed js-with
WARNING: this involves syntax change
Previously the syntax of with was this:
(with (object)
body)
now it's:
(with object
body)
It was also broken when 'object' was an expression...
Henrik Hjelte [Sat, 15 Jul 2006 20:13:44 +0000 (20:13 +0000)]
bugfix sometimes missing semicolons when joining js-body
Attila Lendvai [Tue, 11 Jul 2006 21:17:50 +0000 (21:17 +0000)]
Rebind var in dolist to make also clisp happy
import-macros-from-lisp was broken due to this.
Henrik Hjelte [Tue, 11 Jul 2006 13:47:05 +0000 (13:47 +0000)]
regex patch
Suggested by: Lou Vanek <vanek@acd.net>
Henrik Hjelte [Tue, 11 Jul 2006 10:09:52 +0000 (10:09 +0000)]
documentation updated about dollar char
Henrik Hjelte [Tue, 11 Jul 2006 08:49:15 +0000 (08:49 +0000)]
Made ref2test work with cl-launch
Attila Lendvai [Fri, 7 Jul 2006 22:37:11 +0000 (22:37 +0000)]
Fix screwed-up asd file
Attila Lendvai [Fri, 7 Jul 2006 15:18:26 +0000 (15:18 +0000)]
Fixed instanceof
Attila Lendvai [Fri, 7 Jul 2006 15:13:21 +0000 (15:13 +0000)]
Added src/lib/functional.lisp
This is a first element of an parenscript library. The contents of
this file is to be compiled with parenscript and the result js
included in the host environment in one way or another.
Attila Lendvai [Fri, 7 Jul 2006 15:12:31 +0000 (15:12 +0000)]
Added :eval-forms-p to compile-parenscript-file
Attila Lendvai [Thu, 6 Jul 2006 22:55:47 +0000 (22:55 +0000)]
Fix the return value of map-into
Attila Lendvai [Thu, 6 Jul 2006 22:51:47 +0000 (22:51 +0000)]
Moved some macros towards the top of the file due to dependencies
In the long run we should cut js.lisp into several files. One dealing
with the basic infrastructure like macro expansion, and the rest
implementing the compiler based on this infrastructure/utilities.
Attila Lendvai [Wed, 5 Jul 2006 18:23:51 +0000 (18:23 +0000)]
Added map and map-into
Attila Lendvai [Wed, 5 Jul 2006 18:20:46 +0000 (18:20 +0000)]
Shortened default gensym constant
Attila Lendvai [Tue, 4 Jul 2006 00:33:15 +0000 (00:33 +0000)]
Don't use loop's initially clause to avoid a clisp bug
For details see: http://sourceforge.net/tracker/index.php?func=detail&aid=
1516684&group_id=1355&atid=101355
Marco Baringer [Sat, 27 May 2006 09:31:59 +0000 (09:31 +0000)]
Make defjsmacro rend's docstring a comment so clisp will stop complaining
Attila Lendvai [Sat, 13 May 2006 09:30:31 +0000 (09:30 +0000)]
Move undefine-js-compiler-macro into an eval-when.
Reported by: William Halliburton <whalliburton@gmail.com>
Attila Lendvai [Fri, 12 May 2006 15:29:54 +0000 (15:29 +0000)]
Added import-macros-from-lisp that bring lisp macros into the js macroexpansion
Marco Baringer [Wed, 10 May 2006 12:54:47 +0000 (12:54 +0000)]
Move compile-parenscript code into a separate file so that it complies cleanly
The problew is that compile-parenscript-file-to-string contains a call
to the macro js:js* this macro needs to be defined before we compile
the compile-parenscript-file-to-string function.
Marco Baringer [Wed, 10 May 2006 12:54:22 +0000 (12:54 +0000)]
Use an explicit asdf:perform :after method instead of :perform (load-op :after ...)
Attila Lendvai [Mon, 8 May 2006 11:08:34 +0000 (11:08 +0000)]
Added compile-parenscript-file
Attila Lendvai [Mon, 8 May 2006 11:06:11 +0000 (11:06 +0000)]
Added character type conversion
Attila Lendvai [Sun, 16 Apr 2006 18:18:25 +0000 (18:18 +0000)]
Added a rebind js macro that rebinds variables on the js side