I'm bundling up a program for distribution to customers. I don't want it
to ever enter the debugger. I want it to raise Java exceptions instead.
What I've written to achieve this follows. I've observed it working.
However, there are still times when my program enters the debugger. I
can't tell why, and want to prevent it entirely. Does anybody know? Does
anyone on this list distribute ABCL applications to end users, and how
do you disable the debugger?
/* disable the debugger. raise a …
[View More]RuntimeException instead */
static void installDebuggerHook() {
Symbol.DEBUGGER_HOOK
.setSymbolValue(new Function() {
public LispObject execute(LispObject c, LispObject h) {
throw translateCondition(c);}});
}
static RuntimeException translateCondition(LispObject c) {
return new RuntimeException(
c instanceof Condition
? String.format("%s: %s",
c.princToString(),
((Condition) c).getConditionReport())
: c.princToString());
}
My program is really a Lisp library that people will use via a thin Java
layer. I have a hunch that the above takes care of errors that occur in:
interpreter.eval("...")
but not errors that occur in:
someSymbol.execute(...)
Thanks in advance,
Vibhu
[View Less]
While narrowing down the problems I was having with maven and cffi, I came
across the maven-embedded.lisp file
(
https://common-lisp.net/svn/armedbear/branches/1.4.0/contrib/abcl-asdf/mave…
)
where I saw the sys:run-program.
I now have ABCL installed on both Linux and Windows, and have problems on
both when issuing
#+windows(sys:run-program "where.exe" nil)
#+linux(sys:run-program "which" nil)
On Windows, the first call fails, while the second succeeds. On Linux, the
call fails, and …
[View More]repeated calls also fail.
Is this just me or can anyone else reproduce this? Thanks.
Transcript of the Windows 10 session (Linux follows)
P:\>java -jar c:\mv-program-files\abcl-bin-1.4.0\abcl.jar --noinit
Armed Bear Common Lisp 1.4.0
Java 1.8.0_112 Oracle Corporation
Java HotSpot(TM) 64-Bit Server VM
Low-level initialization completed in 0.274 seconds.
Startup completed in 4.28 seconds.
Type ":help" for a list of available commands.
CL-USER(1): (sys:run-program "which.exe" nil) ;;; *First invocation results
in error*
Error loading
jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl.jar!/org/armedbear/lisp/run-program.abcl
at line 166 (offset 8688)
#<THREAD "interpreter" {6A8B2747}>: Debugger invoked on condition of type
ERROR
Class not found: java.lang.UNIXProcess ;;; *ERROR*
Restarts:
0: TOP-LEVEL Return to top level.
[1] SYS(2): 0
java.lang.ExceptionInInitializerError
... Java stack elided
Caused by: org.armedbear.lisp.Go
Error loading
jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl.jar!/org/armedbear/lisp/run-program.abcl
at line 166 (offset 8688)
#<THREAD "interpreter" {6A8B2747}>: Debugger invoked on condition of type
ERROR
Compiled function can't be loaded: org.armedbear.lisp.run_program_49 from
org.armedbear.lisp.Pathname@60a4bd75
Restarts:
0: TOP-LEVEL Return to top level.
[1] SYS(3): 0
CL-USER(4): (sys:run-program "which.exe" nil) ;;; *Second invocation
succeeds*
#S(SYSTEM:PROCESS :JPROCESS #<java.lang.ProcessImpl
java.lang.ProcessImpl@6aaa6218 {2F20252D}> :%INPUT
#S(SYSTEM::SYSTEM-STREAM) :%OUTPUT #S(SYSTEM::SYSTEM-STREAM) :%ERROR
#S(SYSTEM::SYSTEM-STREAM))
CL-USER(5):
On Linux I work through Slime. Here is the startup message on a RedHat
EL6. I hope my Java patch is recent enough.
Armed Bear Common Lisp 1.4.0
Java 1.6.0_40 Sun Microsystems Inc.
OpenJDK 64-Bit Server VM
Low-level initialization completed in 0.491 seconds.
Startup completed in 2.488 seconds.
Using probed value of abcl-contrib:
'/usr/local/share/java/abcl-contrib.jar'.
Added jar:file:/usr/local/share/java/abcl-contrib.jar!/quicklisp/ to ASDF.
Added jar:file:/usr/local/share/java/abcl-contrib.jar!/mvn/ to ASDF.
Added jar:file:/usr/local/share/java/abcl-contrib.jar!/jss/ to ASDF.
Added jar:file:/usr/local/share/java/abcl-contrib.jar!/jfli/ to ASDF.
Added jar:file:/usr/local/share/java/abcl-contrib.jar!/asdf-jar/ to ASDF.
Added jar:file:/usr/local/share/java/abcl-contrib.jar!/abcl-asdf/ to ASDF.
Loading /home/mv/.abclrc completed in 9.644 seconds.
Type ":help" for a list of available commands.
CL-USER(1): ; Loading /home/sm/software/slime/swank-loader.lisp ...
Doing (sys:run-program "which" nil) the error backtrace is:
Class not found: java.lang.ProcessBuilder$Redirect
[Condition of type ERROR]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [ABORT] Abort thread.
Backtrace:
0: (#<FUNCTION {5A18A372}> #<ERROR {47BE45A7}> #<FUNCTION {5A18A372}>)
1: (APPLY #<FUNCTION {5A18A372}> (#<ERROR {47BE45A7}> #<FUNCTION
{5A18A372}>))
2: (SYSTEM::RUN-HOOK SYSTEM::*INVOKE-DEBUGGER-HOOK* #<ERROR {47BE45A7}>
#<FUNCTION {5A18A372}>)
3: (INVOKE-DEBUGGER #<ERROR {47BE45A7}>)
4: org.armedbear.lisp.Lisp.error(Lisp.java:382)
5: org.armedbear.lisp.Java.classForName(Java.java:1299)
6: org.armedbear.lisp.Java.javaClass(Java.java:1332)
7: org.armedbear.lisp.Java.javaClass(Java.java:1306)
8: org.armedbear.lisp.Java.jfield(Java.java:177)
9: org.armedbear.lisp.Java$pf_jfield.execute(Java.java:272)
10: org.armedbear.lisp.Primitive.execute(Primitive.java:123)
11: (JFIELD "java.lang.ProcessBuilder$Redirect" "INHERIT")
12: (SYSTEM:INIT-FASL :VERSION 42)
13: (SYSTEM::%MAKE-PROCESS-BUILDER "which" NIL)
14: (SYSTEM:RUN-PROGRAM "which" NIL)
15: (SYSTEM::%EVAL (SYSTEM:RUN-PROGRAM "which" NIL))
16: (EVAL (SYSTEM:RUN-PROGRAM "which" NIL))
[View Less]
Hi
just to point out what happens hitting (or just writing) the following address in you Browser :)
(I noticed it because of my CL Ook compiler)
ook.common-lisp.net
Cheers
--
Marco Antoniotti
Hi
I am fiddling around with IEEE NaN and Infinities.
In LW and CCL you have the following conventions for such things:
1d+-0 is NaN (quiet; double float)
1d++0 is positive infinity (double float)
Negative infinities are obtained by prepending ‘-‘ to the positive infinities. Other float lengths can be obtained by using the appropriate ’s’, ‘e’, ‘f’, ‘l’.
I tried an (APROPOS “NAN”) and an (APROPOS “INFINITY”) in ABCL, but got nothing.
Being myself a lazy bastard, I thought of asking …
[View More]directly here instead of looking at the code :) Any possibility of seeing these in ABCL?
Apart from that, there is the issue of “rounding modes”. Would it be possible to add them or access them in ABCL?
Thanks
Marco
--
Marco Antoniotti, Associate Professor tel. +39 - 02 64 48 79 01
DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it
Viale Sarca 336
I-20126 Milan (MI) ITALY
Please check: http://cdac2017.lakecomoschool.org
Please check: https://sites.google.com/site/troncopackage/
Please note that I am not checking my Spam-box anymore.
Please do not forward this email without asking me first (cum grano salis).
[View Less]
Earlier today I was able to load cffi by renaming mvn.cmd to mvn.bat.
Later on, I am unable to, and I would appreciate a fresh pair of eyes.
(ABCL/Java info:
C:\Users\977315>java -jar "c:\mv-program-files\abcl-bin-1.4.0\abcl.jar"
Armed Bear Common Lisp 1.4.0
Java 1.8.0_112 Oracle Corporation
Java HotSpot(TM) 64-Bit Server VM
Low-level initialization completed in 0.243 seconds.
Startup completed in 3.812 seconds.
Loading C:\Users\977315\.abclrc completed in 13.729 seconds.)
The error seems …
[View More]to happen in abcl-cffi.lisp.
mvn.bat is visible:
(uiop/run-program:run-program '("where" "mvn.bat") :output :string) gives
"C:\\Program Files\\apache-maven-3.3.9\\bin\\mvn.bat
"
NIL
0
I don't know how to narrow down the search for the culprit. It makes me
think
that maybe the error message is not correct - that there is a different
underlying
cause. Is there some direct way I can test maven+aether? I now next to
nothing
about Java, and looking at abcl-cffi, I did not find anything obvious.
Thanks for your help and patience,
Backtrace follows.
CL-USER(4): (asdf:load-system :cffi)
; Compiling C:/mv-program-files/my-lisp-libraries/cffi/src/cffi-abcl.lisp
...
Using probed value of abcl-contrib:
'C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar'.
Added
jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/quicklisp/ to
ASDF.
Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/mvn/ to
ASDF.
Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/jss/ to
ASDF.
Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/jfli/
to ASDF.
Added
jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/asdf-jar/ to
ASDF.
Added
jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/abcl-asdf/ to
ASDF.
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.armedbear.lisp.FaslClassLoader.loadFunction(FaslClassLoader.java:130)
at
org.armedbear.lisp.FaslClassLoader$pf_get_fasl_function.execute(FaslClassLoader.java:165)
...
at org.armedbear.lisp.LispThread.execute(LispThread.java:832)
at org.armedbear.lisp.Lisp.evalCall(Lisp.java:582)
at org.armedbear.lisp.Lisp.eval(Lisp.java:540)
at org.armedbear.lisp.Lisp.progn(Lisp.java:709)
Caused by: org.armedbear.lisp.Go
; in (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL ...) ...)
; Caught SIMPLE-WARNING:
; Unable to locate Maven executable to find Maven Aether adaptors.
jnaASDF could not load because Java exception
'java.lang.ClassNotFoundException: com.sun.jna.Native'..
#<THREAD "interpreter" {49B3491F}>: Debugger invoked on condition of type
JAVA-EXCEPTION
Java exception 'java.lang.ClassNotFoundException: com.sun.jna.Native'.
Restarts:
0: RETRY Retry completing load for
#<ASDF/SYSTEM:SYSTEM "jna">.
1: ACCEPT Continue, treating completing load for
#<ASDF/SYSTEM:SYSTEM "jna"> as having been successful.
2: RETRY Retry compiling
#<ASDF/LISP-ACTION:CL-SOURCE-FILE "cffi" "src" "cffi-abcl">.
3: ACCEPT Continue, treating compiling
#<ASDF/LISP-ACTION:CL-SOURCE-FILE "cffi" "src" "cffi-abcl"> as having been
successful.
4: RETRY Retry ASDF operation.
5: CLEAR-CONFIGURATION-AND-RETRY Retry ASDF operation after resetting the
configuration.
6: TOP-LEVEL Return to top level.
[View Less]
I try running (uiop/run-program:run-program '("where" "mvn.bat") :output
:string)
On asdf 3.1.7, it returns the correct output.
With asdf 3.1.7.27 and 3.1.7.43. I get an error "Class not found:
java.lang.UNIXProcess".
If I go to the top level, and try again, I get the correct result.
This is with:
C:\Users\977315>java -jar "c:\mv-program-files\abcl-bin-1.4.0\abcl.jar"
Armed Bear Common Lisp 1.4.0
Java 1.8.0_112 Oracle Corporation
Java HotSpot(TM) 64-Bit Server VM
Low-level initialization …
[View More]completed in 0.238 seconds.
Startup completed in 3.973 seconds.
Loading C:\Users\977315\.abclrc completed in 14.029 seconds.
Type ":help" for a list of available commands.
CL-USER(1):
The abclrc is minimal: load asdf and load quicklisp:
(eval-when (:compile-toplevel :load-toplevel :execute)
(let ((file "asdf.3.1.7.43.lisp"))
(load (merge-pathnames file
(user-homedir-pathname)))))
(eval-when (:compile-toplevel :load-toplevel :execute)
#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(if (probe-file quicklisp-init)
(load quicklisp-init)
(error "Did not find ~a ... quicklisp not loaded"
"~/quicklisp/setup.lisp"))))
I posted this on the ASDF mailing list, and Fare suggested this may be an
ABCL-related
issue.
I hope all the problems I am having have one single root cause
- and that we discover it :-)
[View Less]
Hello,
A bug in STABLE-SORT on empty vectors.
CL-USER(1): (lisp-implementation-version)
"1.5.0-dev-svn-14939"
"OpenJDK_64-Bit_Server_VM-Oracle_Corporation-1.7.0_111-b01"
"amd64-Linux-3.2.0-4-amd64"
CL-USER(2): (stable-sort #() '<)
#<THREAD "interpreter" {7454F875}>: Debugger invoked on condition of type TYPE-ERROR
Invalid array index 0 for #()
-- Eric Marsden https://risk-engineering.org/
Loading CFFI, I get BAD-SYSTEM-NAME errors related to followed by a huge
stack dump, and
then debugger related to the Maven executable.
I tested this with --noinit.
Thanks for your help.
Here are more details:
Starting ABCL on Windows 10 like so:
>/c/Windows/SysWOW64/java.exe -jar
/c/mv-program-files/abcl-bin-1.4.0/abcl.jar
Armed Bear Common Lisp 1.4.0
Java 1.7.0_51 Oracle Corporation
Java HotSpot(TM) Client VM
Low-level initialization completed in 0.23 seconds.
Now I try to load cffi …
[View More]with quicklisp.
Following quickload, I get many style-warnings about redefining UIOP:
CL-USER(1): (ql:quickload :cffi)
To load "cffi":
Load 1 ASDF system:
cffi
; Loading "cffi"
..................................................
..................................................
..................................................
..................................................
....................................
; Caught STYLE-WARNING:
; redefining UIOP/PACKAGE:FIND-PACKAGE* in
#P"C:/mv-program-files/my-lisp-libraries/asdf/uiop/package.lisp"
(previously defined in #P"C:/Users/977315/asdf.3.1.7.43.lisp")
; Caught STYLE-WARNING:
; redefining UIOP/PACKAGE:FIND-SYMBOL* in
#P"C:/mv-program-files/my-lisp-libraries/asdf/uiop/package.lisp"
(previously defined in #P"C:/Users/977315/asdf.3.1.7.43.lisp")
.... many such warnings ...
After finishing the style-warning messages, come ASDF load messages, the
BAD-SYSTEM-NAME messages,
followed by a long java stack dump:
Using probed value of abcl-contrib:
'C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar'.
Added
jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/quicklisp/ to
ASDF.
Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/mvn/ to
ASDF.
Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/jss/ to
ASDF.
Added jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/jfli/
to ASDF.
Added
jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/asdf-jar/ to
ASDF.
Added
jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/abcl-asdf/ to
ASDF.
.
; Caught BAD-SYSTEM-NAME:
; System definition file
#P"jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/jss/jss.asd"
contains definition for system "jss-tests". Please only define "jss" and
secondary systems with a name starting with "jss/" (e.g. "jss/test") in
that file.
; Caught BAD-SYSTEM-NAME:
; System definition file
#P"jar:file:C:/mv-program-files/abcl-bin-1.4.0/abcl-contrib.jar!/abcl-asdf/abcl-asdf.asd"
contains definition for system "abcl-asdf-test". Please only define
"abcl-asdf" and secondary systems with a name starting with "abcl-asdf/"
(e.g. "abcl-asdf/test") in that file.
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.armedbear.lisp.FaslClassLoader.loadFunction(FaslClassLoader.java:130)
at
org.armedbear.lisp.FaslClassLoader$pf_get_fasl_function.execute(FaslClassLoader.ja
va:165)
at org.armedbear.lisp.LispThread.execute(LispThread.java:832)
...
At the end I get into the ABCL debugger:
Caused by: org.armedbear.lisp.Go
; Caught SIMPLE-WARNING:
; Unable to locate Maven executable to find Maven Aether adaptors.
jnaASDF could not load because Java exception
'java.lang.ClassNotFoundException: com.sun.jna
.Native'..
#<THREAD "interpreter" {472108}>: Debugger invoked on condition of type
JAVA-EXCEPTION
Java exception 'java.lang.ClassNotFoundException: com.sun.jna.Native'.
Restarts:
0: RETRY Retry completing load for
#<ASDF/SYSTEM:SYSTEM "jna">.
1: ACCEPT Continue, treating completing load for
#<ASDF/SYSTEM:SYSTE
M "jna"> as having been successful.
2: RETRY Retry compiling
#<ASDF/LISP-ACTION:CL-SOURCE-FILE "cffi" "
src"
"cffi-abcl">.
3: ACCEPT Continue, treating compiling
#<ASDF/LISP-ACTION:CL-SOURCE-
FILE "cffi" "src"
"cffi-abcl"> as having been successful.
4: RETRY Retry ASDF operation.
5: CLEAR-CONFIGURATION-AND-RETRY Retry ASDF operation after resetting the
configuration.
6: TOP-LEVEL Return to top level.
[View Less]
ELS'17 - 10th European Lisp Symposium
VUB - Vrije Universiteit Brussel
Belgium
April 3-4, 2017
In co-location with <Programming> 2017
Sponsored by Brunner Software GmbH
http://www.european-lisp-symposium.org/
The purpose of the European Lisp Symposium is to provide a forum for
the discussion and dissemination of all aspects of design,
implementation and application of any of the Lisp and Lisp-inspired
dialects, including Common Lisp, Scheme, Emacs …
[View More]Lisp, AutoLisp, ISLISP,
Dylan, Clojure, ACL2, ECMAScript, Racket, SKILL, Hop and so on. We
encourage everyone interested in Lisp to participate.
The 10th European Lisp Symposium invites high quality papers about
novel research results, insights and lessons learned from practical
applications and educational perspectives. We also encourage
submissions about known ideas as long as they are presented in a new
setting and/or in a highly elegant way.
Topics include but are not limited to:
- Context-, aspect-, domain-oriented and generative programming
- Macro-, reflective-, meta- and/or rule-based development approaches
- Language design and implementation
- Language integration, inter-operation and deployment
- Development methodologies, support and environments
- Educational approaches and perspectives
- Experience reports and case studies
We invite submissions in the following forms:
Papers: Technical papers of up to 8 pages that describe original
results or explain known ideas in new and elegant ways.
Demonstrations: Abstracts of up to 2 pages for demonstrations of
tools, libraries, and applications.
Tutorials: Abstracts of up to 4 pages for in-depth presentations
about topics of special interest for at least 90 minutes and up to
180 minutes.
The symposium will also provide slots for lightning talks, to be
registered on-site every day.
All submissions should be formatted following the ACM SIGS guidelines
and include ACM classification categories and terms. For more
information on the submission guidelines and the ACM keywords, see:
http://www.acm.org/sigs/publications/proceedings-templates and
http://www.acm.org/about/class/1998. The conference proceedings will be
published in the ACM Digital Library.
Submissions should be uploaded to Easy Chair, at the following address:
https://www.easychair.org/conferences/?conf=els17
Note: to help us with the review process please indicate the type of
submission by entering either "paper", "demo", or "tutorial" in the
Keywords field.
Important dates:
- 30 Jan 2017 Submission deadline
- 27 Feb 2017 Notification of acceptance
- 20 Mar 2017 Final papers due
- 03-04 Apr 2017 Symposium
Programme chair:
Alberto Riva, University of Florida, USA
Programme committee:
Marco Antoniotti, Università Milano Bicocca, Italy
Marc Battyani, FractalConcept
Theo D'Hondt, Vrije Universiteit Brussel, Belgium
Marc Feeley, Université de Montreal, Canada
Stelian Ionescu, Google
Rainer Joswig, Independent Consultant, Germany
António Menezes Leitão, Technical University of Lisbon, Portugal
Nick Levine, RavenPack
Henry Lieberman, MIT, USA
Mark Tarver, Shen Programming Group
Jay McCarthy, University of Massachusetts Lowell, USA
Christian Queinnec, Université Pierre et Marie Curie, France
François-René Rideau, Bridgewater Associates, USA
Nikodemus Siivola, ZenRobotics Ltd
Alessio Stalla, Università degli Studi di Genova, Italy
Search Keywords:
#els2017, ELS 2017, ELS '17, European Lisp Symposium 2017,
European Lisp Symposium '17, 10th ELS, 10th European Lisp Symposium,
European Lisp Conference 2017, European Lisp Conference '17
--
Resistance is futile. You will be jazzimilated.
Lisp, Jazz, Aïkido: http://www.didierverna.info
[View Less]