From evenson at panix.com Fri Aug 18 22:02:43 2017 From: evenson at panix.com (Mark Evenson) Date: Sat, 19 Aug 2017 00:02:43 +0200 Subject: ASDF Issue with compiler warnings on ABCL In-Reply-To: References: <70e89e0e-70f2-6ede-0788-67602b87fed1@sift.net> Message-ID: <1ec11243-e124-1020-7e2d-8a3397cb72e0@panix.com> On 7/22/17 12:04, Mark Evenson wrote: > On 7/21/17 00:10, Robert Goldman wrote: >> ASDF wraps its compilation process with WITH-COMPILATION-UNIT. >> >> On at least some implementations, this is necessary so that building >> doesn't emit spurious undefined function (variable, etc.) warnings. >> >> However, on ABCL, using WITH-COMPILATION-UNIT has the side effect of >> causing warnings to be intercepted and handled by HANDLE-WARNING. Then >> it seems that *resignal-compiler-warnings* is bound to NIL, and the >> compiler swallows them, instead of allowing them to flow down the stack >> to ASDF's handlers. >> >> In turn, this causes at least some of our regression tests to fail, >> because they check for expected warnings. >> >> This looks to me like a bug, but perhaps it's a feature ;-) Would you >> please explain and let us know how to handle this > > I am not entirely clear about why ABCL seemingly swallows compiler > warnings by default. Such behavior may be historical, having something > to do with getting an ancient version of SLIME working, but that is just > a guess. > > I am on a road trip at the moment […] Seemingly back from my summer break, I can confirm that [Faré's patch][ Fix two tests on ABCL] is the best we can do at the moment. The generalized boolean JVM:*RESIGNAL-COMPILER-WARNINGS* controls whether the compiler emits diagnostics to the standard reporting stream as text or signals conditions, with the default being not to signal. [I have patched][compiler signals] ABCL trunk to both document this better as well as exporting the symbol. [Fix two tests on ABCL]: https://gitlab.common-lisp.net/asdf/asdf/commit/026ceaea53a35bad04a75c13caa3eb0cc4f02251 [compiler signals doc]: https://gitlab.common-lisp.net/abcl/abcl/commit/56735922d2773d3ab40a5535a09ee91a69f756ee -- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now." From tomsict at gmail.com Thu Aug 24 21:24:41 2017 From: tomsict at gmail.com (=?UTF-8?B?VG9taXNsYXYgVG9txaFpxIc=?=) Date: Thu, 24 Aug 2017 23:24:41 +0200 Subject: Hi, problem with building ABCL extension for MIT App Inventor Message-ID: Greetings, currently I am building extension for AI, as indicated in title. It works for Scheme (JScheme and Kawa). It is quite a simply one, for now, I am only interested in evaluating simple symbolic expression, and then build on that, adding other features etc. However, I would also like to have access to Common Lisp, ergo ABCL. Here is a code for its respective method: @SimpleFunction(description = "ABCL evaluation") public String ABCLEvaluation(String expression) { // Environment.getInstance(true); // Interpreter abclInterpreter = Interpreter.createInstance(); // Interpreter.createInstance(); // LispObject evalResult = Interpreter.evaluate(expression); Interpreter interpreter = Interpreter.createInstance(); LispObject lo= interpreter.eval(expression); return lo.getStringValue(); } Commented code is there for completion sake, just as an indication that I tried everything I could find in documentation and examples. Nothing works. As you see, idea is a simple one, String is received, and then evaluated, except that in the case of ABCL it isn't. For JScheme and Kawa logic is precisely the same, environment/interpreter is initialized, expression is evaluated and then it returns the correct result. After playing with the various code combinations, there are always just two errors present in logs, so here they are: First one: W/System.err(20761): java.lang.NullPointerException: Attempt to invoke virtual method 'org.armedbear.lisp.LispObject org.armedbear.lisp.Interpreter.eval(java.lang.String)' on a null object reference W/System.err(20761): at lisp.tomislavt.ext.LispEvaluation.ABCLEvaluation(LispEvaluation.java:46) W/System.err(20761): at java.lang.reflect.Method.invoke(Native Method) W/System.err(20761): at java.lang.reflect.Method.invoke(Method.java:372) W/System.err(20761): at gnu.expr.PrimProcedure.apply(PrimProcedure.java:285) W/System.err(20761): at gnu.mapping.CallContext.runUntilDone(CallContext.java:234) W/System.err(20761): at gnu.mapping.CallContext.runUntilValue(CallContext.java:298) W/System.err(20761): at gnu.mapping.MethodProc.applyN(MethodProc.java:113) W/System.err(20761): at gnu.kawa.reflect.Invoke.applyN(Invoke.java:193) W/System.err(20761): at gnu.kawa.functions.ApplyToArgs.applyN(ApplyToArgs.java:139) W/System.err(20761): at gnu.kawa.functions.Apply.applyN(Apply.java:70) W/System.err(20761): at gnu.mapping.ProcedureN.apply2(ProcedureN.java:39) W/System.err(20761): at com.google.youngandroid.runtime.callComponentMethod(runtime1661793284635134238.scm:879) W/System.err(20761): at appinventor.ai_test.AbclKawaTest.Screen1.Abcl$Click(Screen1.yail:68) W/System.err(20761): at appinventor.ai_test.AbclKawaTest.Screen1$frame.apply0(Screen1.yail:456) W/System.err(20761): at gnu.expr.ModuleBody.applyN(ModuleBody.java:226) W/System.err(20761): at gnu.expr.ModuleMethod.applyN(ModuleMethod.java:216) W/System.err(20761): at gnu.kawa.functions.ApplyToArgs.applyN(ApplyToArgs.java:139) W/System.err(20761): at gnu.kawa.functions.Apply.applyN(Apply.java:70) W/System.err(20761): at gnu.mapping.ProcedureN.apply2(ProcedureN.java:39) W/System.err(20761): at appinventor.ai_test.AbclKawaTest.Screen1.dispatchEvent(Screen1.yail:10121) W/System.err(20761): at com.google.appinventor.components.runtime.EventDispatcher.delegateDispatchEvent(EventDispatcher.java:220) W/System.err(20761): at com.google.appinventor.components.runtime.EventDispatcher.dispatchEvent(EventDispatcher.java:198) W/System.err(20761): at com.google.appinventor.components.runtime.Button.Click(Button.java:51) W/System.err(20761): at com.google.appinventor.components.runtime.Button.click(Button.java:43) W/System.err(20761): at com.google.appinventor.components.runtime.ButtonBase.onClick(ButtonBase.java:656) W/System.err(20761): at android.view.View.performClick(View.java:4848) W/System.err(20761): at android.view.View$PerformClick.run(View.java:20262) W/System.err(20761): at android.os.Handler.handleCallback(Handler.java:815) W/System.err(20761): at android.os.Handler.dispatchMessage(Handler.java:104) W/System.err(20761): at android.os.Looper.loop(Looper.java:194) W/System.err(20761): at android.app.ActivityThread.main(ActivityThread.java:5631) W/System.err(20761): at java.lang.reflect.Method.invoke(Native Method) W/System.err(20761): at java.lang.reflect.Method.invoke(Method.java:372) W/System.err(20761): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959) W/System.err(20761): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754) I/RuntimeErrorAlert(20761): in alert Second one: W/System.err(26401): Unable to determine LISP_HOME. W/System.err(26401): Unable to determine LISP_HOME. W/System.err(26401): org.armedbear.lisp.IntegrityError W/System.err(26401): at org.armedbear.lisp.Primitives$pf_error.execute(Primitives.java:1577) W/System.err(26401): at org.armedbear.lisp.Primitive.execute(Primitive.java:113) W/System.err(26401): at org.armedbear.lisp.Symbol.execute(Symbol.java:803) W/System.err(26401): at org.armedbear.lisp.Lisp.error(Lisp.java:383) W/System.err(26401): at org.armedbear.lisp.Load.loadSystemFile(Load.java:322) W/System.err(26401): at org.armedbear.lisp.Interpreter.initializeLisp(Interpreter.java:172) W/System.err(26401): at org.armedbear.lisp.Interpreter.createInstance(Interpreter.java:72) W/System.err(26401): at lisp.tomislavt.ext.LispEvaluation.ABCLEvaluation(LispEvaluation.java:48) W/System.err(26401): at java.lang.reflect.Method.invoke(Native Method) W/System.err(26401): at java.lang.reflect.Method.invoke(Method.java:372) W/System.err(26401): at gnu.expr.PrimProcedure.apply(PrimProcedure.java:285) W/System.err(26401): at gnu.mapping.CallContext.runUntilDone(CallContext.java:234) W/System.err(26401): at gnu.mapping.CallContext.runUntilValue(CallContext.java:298) W/System.err(26401): at gnu.mapping.MethodProc.applyN(MethodProc.java:113) W/System.err(26401): at gnu.kawa.reflect.Invoke.applyN(Invoke.java:193) W/System.err(26401): at gnu.kawa.functions.ApplyToArgs.applyN(ApplyToArgs.java:139) W/System.err(26401): at gnu.kawa.functions.Apply.applyN(Apply.java:70) W/System.err(26401): at gnu.mapping.ProcedureN.apply2(ProcedureN.java:39) W/System.err(26401): at com.google.youngandroid.runtime.callComponentMethod(runtime284371300273757224.scm:879) W/System.err(26401): at appinventor.ai_test.AbclKawaTest3.Screen1.Abcl$Click(Screen1.yail:68) W/System.err(26401): at appinventor.ai_test.AbclKawaTest3.Screen1$frame.apply0(Screen1.yail:456) W/System.err(26401): at gnu.expr.ModuleBody.applyN(ModuleBody.java:226) W/System.err(26401): at gnu.expr.ModuleMethod.applyN(ModuleMethod.java:216) W/System.err(26401): at gnu.kawa.functions.ApplyToArgs.applyN(ApplyToArgs.java:139) W/System.err(26401): at gnu.kawa.functions.Apply.applyN(Apply.java:70) W/System.err(26401): at gnu.mapping.ProcedureN.apply2(ProcedureN.java:39) W/System.err(26401): at appinventor.ai_test.AbclKawaTest3.Screen1.dispatchEvent(Screen1.yail:10121) W/System.err(26401): at com.google.appinventor.components.runtime.EventDispatcher.delegateDispatchEvent(EventDispatcher.java:220) W/System.err(26401): at com.google.appinventor.components.runtime.EventDispatcher.dispatchEvent(EventDispatcher.java:198) W/System.err(26401): at com.google.appinventor.components.runtime.Button.Click(Button.java:51) W/System.err(26401): at com.google.appinventor.components.runtime.Button.click(Button.java:43) W/System.err(26401): at com.google.appinventor.components.runtime.ButtonBase.onClick(ButtonBase.java:656) W/System.err(26401): at android.view.View.performClick(View.java:4848) W/System.err(26401): at android.view.View$PerformClick.run(View.java:20262) W/System.err(26401): at android.os.Handler.handleCallback(Handler.java:815) W/System.err(26401): at android.os.Handler.dispatchMessage(Handler.java:104) W/System.err(26401): at android.os.Looper.loop(Looper.java:194) W/System.err(26401): at android.app.ActivityThread.main(ActivityThread.java:5631) W/System.err(26401): at java.lang.reflect.Method.invoke(Native Method) W/System.err(26401): at java.lang.reflect.Method.invoke(Method.java:372) W/System.err(26401): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959) W/System.err(26401): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754) I/System.out(26401): ERROR placeholder called with arguments: I/System.out(26401): Failed to find loadable system file 'boot.lisp' in boot classpath. I/System.out(26401): Failed to find loadable system file 'boot.lisp' in boot classpath. W/System.err(26401): org.armedbear.lisp.IntegrityError W/System.err(26401): at org.armedbear.lisp.Primitives$pf_error.execute(Primitives.java:1577) W/System.err(26401): at org.armedbear.lisp.Primitive.execute(Primitive.java:113) W/System.err(26401): at org.armedbear.lisp.Symbol.execute(Symbol.java:803) W/System.err(26401): at org.armedbear.lisp.Lisp.error(Lisp.java:383) W/System.err(26401): at org.armedbear.lisp.Load.loadSystemFile(Load.java:322) W/System.err(26401): at org.armedbear.lisp.Interpreter.initializeLisp(Interpreter.java:172) W/System.err(26401): at org.armedbear.lisp.Interpreter.createInstance(Interpreter.java:72) W/System.err(26401): at lisp.tomislavt.ext.LispEvaluation.ABCLEvaluation(LispEvaluation.java:48) W/System.err(26401): at java.lang.reflect.Method.invoke(Native Method) W/System.err(26401): at java.lang.reflect.Method.invoke(Method.java:372) W/System.err(26401): at gnu.expr.PrimProcedure.apply(PrimProcedure.java:285) W/System.err(26401): at gnu.mapping.CallContext.runUntilDone(CallContext.java:234) W/System.err(26401): at gnu.mapping.CallContext.runUntilValue(CallContext.java:298) W/System.err(26401): at gnu.mapping.MethodProc.applyN(MethodProc.java:113) W/System.err(26401): at gnu.kawa.reflect.Invoke.applyN(Invoke.java:193) W/System.err(26401): at gnu.kawa.functions.ApplyToArgs.applyN(ApplyToArgs.java:139) W/System.err(26401): at gnu.kawa.functions.Apply.applyN(Apply.java:70) W/System.err(26401): at gnu.mapping.ProcedureN.apply2(ProcedureN.java:39) W/System.err(26401): at com.google.youngandroid.runtime.callComponentMethod(runtime284371300273757224.scm:879) W/System.err(26401): at appinventor.ai_test.AbclKawaTest3.Screen1.Abcl$Click(Screen1.yail:68) W/System.err(26401): at appinventor.ai_test.AbclKawaTest3.Screen1$frame.apply0(Screen1.yail:456) W/System.err(26401): at gnu.expr.ModuleBody.applyN(ModuleBody.java:226) W/System.err(26401): at gnu.expr.ModuleMethod.applyN(ModuleMethod.java:216) W/System.err(26401): at gnu.kawa.functions.ApplyToArgs.applyN(ApplyToArgs.java:139) W/System.err(26401): at gnu.kawa.functions.Apply.applyN(Apply.java:70) W/System.err(26401): at gnu.mapping.ProcedureN.apply2(ProcedureN.java:39) W/System.err(26401): at appinventor.ai_test.AbclKawaTest3.Screen1.dispatchEvent(Screen1.yail:10121) W/System.err(26401): at com.google.appinventor.components.runtime.EventDispatcher.delegateDispatchEvent(EventDispatcher.java:220) W/System.err(26401): at com.google.appinventor.components.runtime.EventDispatcher.dispatchEvent(EventDispatcher.java:198) W/System.err(26401): at com.google.appinventor.components.runtime.Button.Click(Button.java:51) W/System.err(26401): at com.google.appinventor.components.runtime.Button.click(Button.java:43) W/System.err(26401): at com.google.appinventor.components.runtime.ButtonBase.onClick(ButtonBase.java:656) W/System.err(26401): at android.view.View.performClick(View.java:4848) W/System.err(26401): at android.view.View$PerformClick.run(View.java:20262) W/System.err(26401): at android.os.Handler.handleCallback(Handler.java:815) W/System.err(26401): at android.os.Handler.dispatchMessage(Handler.java:104) W/System.err(26401): at android.os.Looper.loop(Looper.java:194) W/System.err(26401): at android.app.ActivityThread.main(ActivityThread.java:5631) W/System.err(26401): at java.lang.reflect.Method.invoke(Native Method) W/System.err(26401): at java.lang.reflect.Method.invoke(Method.java:372) W/System.err(26401): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959) W/System.err(26401): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754) I hope that I am missing something obvious :), and I am thankful in advance for any input, advice or idea. Some additional clarification may be in order, MIT App Inventor is environment for rapid development of applications for Android (Arduino, Lego mindstorm etc.), hence it doesn't follow usual Android work-flow. Backbone of it is Kawa, components, extensions are written in Java, but more about it can be easily find on its webpage. First log example is fairly useless one imo, when i tested my extension with simple App, same expression was evaluated correctly in both Kawa and JScheme, so that String was not a null one, but I've put it here for completion sake. For the second one I've find something similar for version a.1 or 1.2, back in 2012, I believe, and it was something about dynamic linking during the build process. I am using ABCL 1.5 jar that I downloaded from the ABCL project page. In any case, I am bit at loss, and thus, I would appreciate any advice what should I try next. Thank you for your time. Respectfully, Tomislav Tomsic -------------- next part -------------- An HTML attachment was scrubbed... URL: From vibhu.mohindra at gmail.com Sat Aug 26 09:38:31 2017 From: vibhu.mohindra at gmail.com (Vibhu Mohindra) Date: Sat, 26 Aug 2017 10:38:31 +0100 Subject: Hi, problem with building ABCL extension for MIT App Inventor In-Reply-To: References: Message-ID: On 24/08/2017 22:24, Tomislav Tomšić wrote: >     Interpreter interpreter = Interpreter.createInstance(); Try, Interpreter.createInstance(); Interpreter interpreter = Interpreter.getInstance(); If I remember correctly, createInstance() returns null if an instance has already been created. > return lo.getStringValue(); Also, return lo.javaInstance(); may work better, unless you're sure that lo will always be a Lisp string. Vibhu