* DomTerm - a new console for Kawa (and everyone else) @ 2015-12-17 22:52 Per Bothner 2015-12-18 18:43 ` Charlie Turner 0 siblings, 1 reply; 8+ messages in thread From: Per Bothner @ 2015-12-17 22:52 UTC (permalink / raw) To: Kawa mailing list Lately I've been quiet on the Kawa front because I've been spending my time on DomTerm, whose goal is a best-of-breed hybrid of xterm/ansi-compatible terminal emulator combined with a powerful REPL console supporting rich text, graphics. readline-style editing, and more. The core of the code is (semi-) portable and embeddable JavaScript. The home page is http://domterm.org/ and the source code is https://github.com/PerBothner/DomTerm Form the Kawa point of view, note especially the 2nd screenshot of the Features page: http://domterm.org/Features.html . If you "print" an XML node value, then it is inserted as HTML in the DomTerm output. (This happens for display but not for write, obviously.) Kawa also supports different styles/colors for the prompt (default green), input (default blue), and error output (default red). This works whether you invoke Kawa from the shell (running under DomTerm), or have DomTerm start up kawa.repl.main directly. I also want to implement the "graphics objects" ideas supported by the Swing console (which I know is currently broken): http://per.bothner.com/blog/2007/ReplPane/ I expect we'll change the -w option (or just entering a REPL when there is no console) so it starts up a DomTerm rather than the old Swing console. (Though I intend to keep the latter around for now - after I debug it.) More Lisp-IDE-type ideas are also being considered. For example being able to interrupt a running expression and see a stack trace. However, that may be a bit further off. This is still alpha quality, and the interfaces are highly unstable, if using Kawa with DomTerm, update both sources at the same time. Otherwise, have fun with it. -- --Per Bothner per@bothner.com http://per.bothner.com/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DomTerm - a new console for Kawa (and everyone else) 2015-12-17 22:52 DomTerm - a new console for Kawa (and everyone else) Per Bothner @ 2015-12-18 18:43 ` Charlie Turner 2015-12-18 19:14 ` Per Bothner 0 siblings, 1 reply; 8+ messages in thread From: Charlie Turner @ 2015-12-18 18:43 UTC (permalink / raw) To: Per Bothner; +Cc: Kawa mailing list This looks really good. I was experimenting with a Kawa backend for Geiser, but due to the way Geiser expects prompts to be redrawn, and how Kawa redraws prompts, it seemed like a bit of non-starter (I can go into a lot more detail on that). Anyway, I think the move to a web-based console is the best thing to do as well. What's the dependence on OpenJDK in particular? Would I be able to get away with Oracle JDK? I'm currently on OSX, and not yet terrible proficient with it; it seems like OpenJDK 1.8 and OSX isn't quite supported, or at least binary packages aren't provided. Looking forward to playing with this. --Charlie. On 17 December 2015 at 22:51, Per Bothner <per@bothner.com> wrote: > Lately I've been quiet on the Kawa front because I've been spending > my time on DomTerm, whose goal is a best-of-breed hybrid of > xterm/ansi-compatible terminal emulator combined with a powerful REPL > console supporting rich text, graphics. readline-style editing, and more. > The core of the code is (semi-) portable and embeddable JavaScript. > > The home page is http://domterm.org/ > and the source code is https://github.com/PerBothner/DomTerm > > Form the Kawa point of view, note especially the 2nd screenshot of > the Features page: http://domterm.org/Features.html . If you "print" > an XML node value, then it is inserted as HTML in the DomTerm output. > (This happens for display but not for write, obviously.) > > Kawa also supports different styles/colors for the prompt (default green), > input (default blue), and error output (default red). This works whether > you invoke Kawa from the shell (running under DomTerm), or have DomTerm > start up kawa.repl.main directly. > > I also want to implement the "graphics objects" ideas supported by the > Swing console (which I know is currently broken): > http://per.bothner.com/blog/2007/ReplPane/ > > I expect we'll change the -w option (or just entering a REPL when there is > no console) so it starts up a DomTerm rather than the old Swing console. > (Though I intend to keep the latter around for now - after I debug it.) > > More Lisp-IDE-type ideas are also being considered. For example being > able to interrupt a running expression and see a stack trace. However, > that may be a bit further off. > > This is still alpha quality, and the interfaces are highly unstable, > if using Kawa with DomTerm, update both sources at the same time. > Otherwise, have fun with it. > -- > --Per Bothner > per@bothner.com http://per.bothner.com/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DomTerm - a new console for Kawa (and everyone else) 2015-12-18 18:43 ` Charlie Turner @ 2015-12-18 19:14 ` Per Bothner 2015-12-18 19:28 ` Charlie Turner 0 siblings, 1 reply; 8+ messages in thread From: Per Bothner @ 2015-12-18 19:14 UTC (permalink / raw) To: Charlie Turner; +Cc: Kawa mailing list On 12/18/2015 10:43 AM, Charlie Turner wrote: > What's the dependence on OpenJDK in particular? Would I be able to get > away with Oracle JDK? I'm currently on OSX, and not yet terrible > proficient with it; it seems like OpenJDK 1.8 and OSX isn't quite > supported, or at least binary packages aren't provided. The existing Java front-ends make use of JavaFX WebView, which is open-source. However, it may not be packaged as part of OpenJDK, but rather the separate but related OpenJFX. If you use the browser front-end, you don't need JavaFX. However, the DomTerm Makefile isn't set up to build domterm.jar without JavaFX, so you need to edit it to leave out org/domterm/javafx/*. I'd like to find a "light-weight" standalone web-browser, with no or easy-to-change "chrome" (menubar etc), with support for modern web standards (including WebSockets and SVG), actively maintained, and a way to turn off certain browser security features that hi-jack special keys and events. It would use WebSockets to talk to a back-end. This would allow disconnection and sharing a la GNU Screen. A "terminal emulator application" would be a small script that starts a back-ground server (probably something written in C or C++) if necessary, and then pop up a browser front-end (or optionally your preferred browser). Kawa would do the same when a REPL is requested: If not running in a terminal *or* the -w flag is given, it would start its own internal WebSockets server, and pop up the light-weight browser as a separate process (or let you connect with a regular browser). -- --Per Bothner per@bothner.com http://per.bothner.com/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DomTerm - a new console for Kawa (and everyone else) 2015-12-18 19:14 ` Per Bothner @ 2015-12-18 19:28 ` Charlie Turner 2015-12-18 19:41 ` Jamison Hope ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Charlie Turner @ 2015-12-18 19:28 UTC (permalink / raw) To: Per Bothner; +Cc: Kawa mailing list [-- Attachment #1: Type: text/plain, Size: 5669 bytes --] I almost got this working on OSX. See my hacks in the attached patch file if you want to get where I got :-) [where the heck do you get err_sys from on our box??] In addition to that patch file, I also had to rename libpty.so to libpty.jnilib on OSX. I have no idea why. This is my first experience with Native Java :-) Sadly, I got lost after managing to get the DomTerm to run. make-pty completes, and then the DomTerm window pops up with a scroll-bar, but nothing else. I get this stack trace in the terminal window from which I launched make run-pty, netscape.javascript.JSException: ReferenceError: Can't find variable: makeDomTerm at com.sun.webkit.dom.JSObject.fwkMakeException(JSObject.java:128) at com.sun.webkit.WebPage.twkExecuteScript(Native Method) at com.sun.webkit.WebPage.executeScript(WebPage.java:1427) at javafx.scene.web.WebEngine.executeScript(WebEngine.java:948) at org.domterm.javafx.WebTerminal.initialize(WebTerminal.java:226) at org.domterm.javafx.WebTerminal$1.changed(WebTerminal.java:173) at org.domterm.javafx.WebTerminal$1.changed(WebTerminal.java:170) at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182) at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81) at javafx.beans.property.ReadOnlyObjectWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyObjectWrapper.java:176) at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:142) at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112) at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146) at javafx.scene.web.WebEngine$LoadWorker.updateState(WebEngine.java:1226) at javafx.scene.web.WebEngine$LoadWorker.dispatchLoadEvent(WebEngine.java:1337) at javafx.scene.web.WebEngine$LoadWorker.access$1100(WebEngine.java:1219) at javafx.scene.web.WebEngine$PageLoadListener.dispatchLoadEvent(WebEngine.java:1206) at com.sun.webkit.WebPage.fireLoadEvent(WebPage.java:2388) at com.sun.webkit.WebPage.fwkFireLoadEvent(WebPage.java:2232) at com.sun.webkit.network.URLLoader.twkDidFinishLoading(Native Method) at com.sun.webkit.network.URLLoader.notifyDidFinishLoading(URLLoader.java:830) at com.sun.webkit.network.URLLoader.lambda$didFinishLoading$95(URLLoader.java:821) at com.sun.webkit.network.URLLoader$$Lambda$153/1668192911.run(Unknown Source) at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295) at com.sun.javafx.application.PlatformImpl$$Lambda$51/405125410.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294) at com.sun.javafx.application.PlatformImpl$$Lambda$50/526533065.run(Unknown Source) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: netscape.javascript.JSException: ReferenceError: Can't find variable: makeDomTerm at org.domterm.javafx.WebTerminal.initialize(WebTerminal.java:237) at org.domterm.javafx.WebTerminal$1.changed(WebTerminal.java:173) at org.domterm.javafx.WebTerminal$1.changed(WebTerminal.java:170) at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182) at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81) at javafx.beans.property.ReadOnlyObjectWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyObjectWrapper.java:176) at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:142) at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112) at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146) at javafx.scene.web.WebEngine$LoadWorker.updateState(WebEngine.java:1226) at javafx.scene.web.WebEngine$LoadWorker.dispatchLoadEvent(WebEngine.java:1337) at javafx.scene.web.WebEngine$LoadWorker.access$1100(WebEngine.java:1219) at javafx.scene.web.WebEngine$PageLoadListener.dispatchLoadEvent(WebEngine.java:1206) at com.sun.webkit.WebPage.fireLoadEvent(WebPage.java:2388) at com.sun.webkit.WebPage.fwkFireLoadEvent(WebPage.java:2232) at com.sun.webkit.network.URLLoader.twkDidFinishLoading(Native Method) at com.sun.webkit.network.URLLoader.notifyDidFinishLoading(URLLoader.java:830) at com.sun.webkit.network.URLLoader.lambda$didFinishLoading$95(URLLoader.java:821) at com.sun.webkit.network.URLLoader$$Lambda$153/1668192911.run(Unknown Source) at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295) at com.sun.javafx.application.PlatformImpl$$Lambda$51/405125410.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294) at com.sun.javafx.application.PlatformImpl$$Lambda$50/526533065.run(Unknown Source) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) Caused by: netscape.javascript.JSException: ReferenceError: Can't find variable: makeDomTerm at com.sun.webkit.dom.JSObject.fwkMakeException(JSObject.java:128) at com.sun.webkit.WebPage.twkExecuteScript(Native Method) at com.sun.webkit.WebPage.executeScript(WebPage.java:1427) at javafx.scene.web.WebEngine.executeScript(WebEngine.java:948) at org.domterm.javafx.WebTerminal.initialize(WebTerminal.java:226) ... 24 more I didn't understand much from your response Per. Looks like I've got some reading to do before I get to use my toy :-) [-- Attachment #2: domterm_osx.patch --] [-- Type: application/octet-stream, Size: 3430 bytes --] diff --git a/Makefile b/Makefile index 3ce01e1..0931aed 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -JAVA_HOME = /opt/jdk1.8 +JAVA_HOME = $(shell /usr/libexec/java_home) CC = gcc JAVA = java JAVAC = javac @@ -21,10 +21,10 @@ native/pty/org_domterm_pty_PTY.h: domterm.jar PTY_COMMON_PARAMS = -fno-strict-aliasing -fPIC -W -Wall -Wno-unused -Wno-parentheses -fno-omit-frame-pointer native/pty/pty.o: native/pty/pty.c native/pty/org_domterm_pty_PTY.h - $(CC) -O2 -ffast-math $(PTY_COMMON_PARAMS) -Inative/pty -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -c $< -o $@ + $(CC) -O2 -ffast-math $(PTY_COMMON_PARAMS) -Inative/pty -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I$(JAVA_HOME)/include/darwin -c $< -o $@ native/pty/pty_fork.o: native/pty/pty_fork.c - $(CC) -O2 -ffast-math $(PTY_COMMON_PARAMS) -Inative/pty -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -c $< -o $@ + $(CC) -O2 -ffast-math $(PTY_COMMON_PARAMS) -Inative/pty -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I$(JAVA_HOME)/include/darwin -c $< -o $@ libpty.so: native/pty/pty.o native/pty/pty_fork.o $(CC) $(PTY_COMMON_PARAMS) -shared -o $@ $^ @@ -74,7 +74,7 @@ org/classes.stamp: $(DOMTERM_JAR_SOURCES) touch org/classes.stamp tmp-repl.in: org/domterm/repl.html Makefile - sed -e '/domterm-core/i<style>' \ + gsed -e '/domterm-core/i<style>' \ -e '/domterm-default/a</style>' \ -e 's|<link .*/style/\(.*\).css">|#include "style/\1.css"|' \ -e '/<script type="text.javascript">/d' \ @@ -90,7 +90,7 @@ domterm.jar: org/classes.stamp terminal.js tmp-repl.in rm -rf tmp-for-jar mkdir tmp-for-jar tar cf - org/domterm/*.class org/domterm/*/*.class | (cd tmp-for-jar; tar xf -) - cpp -traditional-cpp -P <tmp-repl.in >tmp-for-jar/org/domterm/repl.html + ~/gcc/bin/cpp -traditional-cpp -P <tmp-repl.in >tmp-for-jar/org/domterm/repl.html cd tmp-for-jar && \ jar cmf ../domterm-jar-manifest ../domterm.jar org/domterm/*.class org/domterm/*/*.class org/domterm/repl.html @@ -108,7 +108,7 @@ DOC_IMAGES = \ doc/DomTerm.xml: doc/DomTerm.texi $(MAKEINFO) -I=doc --docbook doc/DomTerm.texi -o - | \ - sed \ + gsed \ -e 's|_002d|-|g' \ -e 's|<emphasis></emphasis>||' \ -e 's|<inlinemediaobject><imageobject><imagedata fileref="\(.*\)" format="\(.*\)"></imagedata></imageobject></inlinemediaobject>|<ulink url="\1"><inlinemediaobject><imageobject><imagedata fileref="\1" format="\2"></imagedata></imageobject></inlinemediaobject></ulink>|' \ diff --git a/native/pty/pty.c b/native/pty/pty.c index e143ce0..112dc81 100644 --- a/native/pty/pty.c +++ b/native/pty/pty.c @@ -47,7 +47,33 @@ #include <sys/ioctl.h> #endif -extern void err_sys(const char *fmt, ...); +//extern void err_sys(const char *fmt, ...); +#include <errno.h> +#include <stdarg.h> + +static void +err_doit(int errnoflag, int error, const char *fmt, va_list ap) +{ + char buf[8094]; + vsnprintf(buf, 8094, fmt, ap); + if (errnoflag) + snprintf(buf+strlen(buf), 8094-strlen(buf), ": %s", + strerror(error)); + strcat(buf, "\n"); + fflush(stdout); /* in case stdout and stderr are the same */ + fputs(buf, stderr); + fflush(NULL); /* flushes all stdio output streams */ +} + +void +err_sys(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + err_doit(1, errno, fmt, ap); + va_end(ap); + exit(1); +} int log_to_stderr = 1; #define MAXLINE 512 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DomTerm - a new console for Kawa (and everyone else) 2015-12-18 19:28 ` Charlie Turner @ 2015-12-18 19:41 ` Jamison Hope 2015-12-18 19:46 ` Per Bothner 2015-12-22 7:38 ` Per Bothner 2 siblings, 0 replies; 8+ messages in thread From: Jamison Hope @ 2015-12-18 19:41 UTC (permalink / raw) To: kawa list Charlie, thanks for investigating this -- it saves me from having to do it. :-) I'm mostly sure that the ".jnilib" extension is deprecated (but still supported), and that nowadays, JNI dynamic libraries can use the same file extension as ordinary Mac OS X dynamic libraries (i.e. ".dylib"). Either way, yeah ".so" is not the right file extension on Macs. I eagerly await further tales of your adventures and eventual success! On Dec 18, 2015, at 2:28 PM, Charlie Turner <chturne@gmail.com> wrote: > I almost got this working on OSX. See my hacks in the attached patch > file if you want to get where I got :-) [where the heck do you get > err_sys from on our box??] > > In addition to that patch file, I also had to rename libpty.so to > libpty.jnilib on OSX. I have no idea why. This is my first experience > with Native Java :-) > > Sadly, I got lost after managing to get the DomTerm to run. make-pty > completes, and then the DomTerm window pops up with a scroll-bar, but > nothing else. I get this stack trace in the terminal window from which > I launched make run-pty, > > > netscape.javascript.JSException: ReferenceError: Can't find variable: > makeDomTerm > > at com.sun.webkit.dom.JSObject.fwkMakeException(JSObject.java:128) > > at com.sun.webkit.WebPage.twkExecuteScript(Native Method) > > at com.sun.webkit.WebPage.executeScript(WebPage.java:1427) > > at javafx.scene.web.WebEngine.executeScript(WebEngine.java:948) > > at org.domterm.javafx.WebTerminal.initialize(WebTerminal.java:226) > > at org.domterm.javafx.WebTerminal$1.changed(WebTerminal.java:173) > > at org.domterm.javafx.WebTerminal$1.changed(WebTerminal.java:170) > > at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182) > > at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81) > > at javafx.beans.property.ReadOnlyObjectWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyObjectWrapper.java:176) > > at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:142) > > at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112) > > at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146) > > at javafx.scene.web.WebEngine$LoadWorker.updateState(WebEngine.java:1226) > > at javafx.scene.web.WebEngine$LoadWorker.dispatchLoadEvent(WebEngine.java:1337) > > at javafx.scene.web.WebEngine$LoadWorker.access$1100(WebEngine.java:1219) > > at javafx.scene.web.WebEngine$PageLoadListener.dispatchLoadEvent(WebEngine.java:1206) > > at com.sun.webkit.WebPage.fireLoadEvent(WebPage.java:2388) > > at com.sun.webkit.WebPage.fwkFireLoadEvent(WebPage.java:2232) > > at com.sun.webkit.network.URLLoader.twkDidFinishLoading(Native Method) > > at com.sun.webkit.network.URLLoader.notifyDidFinishLoading(URLLoader.java:830) > > at com.sun.webkit.network.URLLoader.lambda$didFinishLoading$95(URLLoader.java:821) > > at com.sun.webkit.network.URLLoader$$Lambda$153/1668192911.run(Unknown Source) > > at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295) > > at com.sun.javafx.application.PlatformImpl$$Lambda$51/405125410.run(Unknown > Source) > > at java.security.AccessController.doPrivileged(Native Method) > > at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294) > > at com.sun.javafx.application.PlatformImpl$$Lambda$50/526533065.run(Unknown > Source) > > at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) > > Exception in thread "JavaFX Application Thread" > java.lang.RuntimeException: netscape.javascript.JSException: > ReferenceError: Can't find variable: makeDomTerm > > at org.domterm.javafx.WebTerminal.initialize(WebTerminal.java:237) > > at org.domterm.javafx.WebTerminal$1.changed(WebTerminal.java:173) > > at org.domterm.javafx.WebTerminal$1.changed(WebTerminal.java:170) > > at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182) > > at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81) > > at javafx.beans.property.ReadOnlyObjectWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyObjectWrapper.java:176) > > at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:142) > > at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112) > > at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146) > > at javafx.scene.web.WebEngine$LoadWorker.updateState(WebEngine.java:1226) > > at javafx.scene.web.WebEngine$LoadWorker.dispatchLoadEvent(WebEngine.java:1337) > > at javafx.scene.web.WebEngine$LoadWorker.access$1100(WebEngine.java:1219) > > at javafx.scene.web.WebEngine$PageLoadListener.dispatchLoadEvent(WebEngine.java:1206) > > at com.sun.webkit.WebPage.fireLoadEvent(WebPage.java:2388) > > at com.sun.webkit.WebPage.fwkFireLoadEvent(WebPage.java:2232) > > at com.sun.webkit.network.URLLoader.twkDidFinishLoading(Native Method) > > at com.sun.webkit.network.URLLoader.notifyDidFinishLoading(URLLoader.java:830) > > at com.sun.webkit.network.URLLoader.lambda$didFinishLoading$95(URLLoader.java:821) > > at com.sun.webkit.network.URLLoader$$Lambda$153/1668192911.run(Unknown Source) > > at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295) > > at com.sun.javafx.application.PlatformImpl$$Lambda$51/405125410.run(Unknown > Source) > > at java.security.AccessController.doPrivileged(Native Method) > > at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294) > > at com.sun.javafx.application.PlatformImpl$$Lambda$50/526533065.run(Unknown > Source) > > at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) > > Caused by: netscape.javascript.JSException: ReferenceError: Can't find > variable: makeDomTerm > > at com.sun.webkit.dom.JSObject.fwkMakeException(JSObject.java:128) > > at com.sun.webkit.WebPage.twkExecuteScript(Native Method) > > at com.sun.webkit.WebPage.executeScript(WebPage.java:1427) > > at javafx.scene.web.WebEngine.executeScript(WebEngine.java:948) > > at org.domterm.javafx.WebTerminal.initialize(WebTerminal.java:226) > > ... 24 more > > > I didn't understand much from your response Per. Looks like I've got > some reading to do before I get to use my toy :-) > <domterm_osx.patch> -- Jamison Hope The PTR Group www.theptrgroup.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DomTerm - a new console for Kawa (and everyone else) 2015-12-18 19:28 ` Charlie Turner 2015-12-18 19:41 ` Jamison Hope @ 2015-12-18 19:46 ` Per Bothner 2015-12-18 20:00 ` Charlie Turner 2015-12-22 7:38 ` Per Bothner 2 siblings, 1 reply; 8+ messages in thread From: Per Bothner @ 2015-12-18 19:46 UTC (permalink / raw) To: Charlie Turner; +Cc: Kawa mailing list On 12/18/2015 11:28 AM, Charlie Turner wrote: > I almost got this working on OSX. See my hacks in the attached patch > file if you want to get where I got :-) [where the heck do you get > err_sys from on our box??] > In addition to that patch file, I also had to rename libpty.so to > libpty.jnilib on OSX. I have no idea why. This is my first experience > with Native Java :-) I guess I should start using autoconf ... Including --disable-javafx and --disable-pty configure options. > Sadly, I got lost after managing to get the DomTerm to run. make-pty > completes, and then the DomTerm window pops up with a scroll-bar, but > nothing else. I get this stack trace in the terminal window from which > I launched make run-pty, It may be easier to start with the server, as that avoids JavaFX issues. Perhaps try the --process option to avoid PTY issues: make run-server SERVER_ARGS=--process Then you can open a web console windows in your browser to check for error messages. You might enable the various verbosity options, including the one in terminal.js: this.verbosity = 2; // instead of 0 > netscape.javascript.JSException: ReferenceError: Can't find variable: > makeDomTerm That suggests the JavaScript in repl.html didn't get executed, or got executed in the wrong context, or something like that. I suggest try the server/browser combination first. -- --Per Bothner per@bothner.com http://per.bothner.com/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DomTerm - a new console for Kawa (and everyone else) 2015-12-18 19:46 ` Per Bothner @ 2015-12-18 20:00 ` Charlie Turner 0 siblings, 0 replies; 8+ messages in thread From: Charlie Turner @ 2015-12-18 20:00 UTC (permalink / raw) To: Per Bothner; +Cc: Kawa mailing list I'm mostly sure that the ".jnilib" extension is deprecated (but still supported), and that nowadays, JNI dynamic libraries can use the same file extension as ordinary Mac OS X dynamic libraries (i.e. ".dylib"). Either way, yeah ".so" is not the right file extension on Macs. Ahh, interesting. Thanks for the background info. It may be easier to start with the server, as that avoids JavaFX issues. Perhaps try the --process option to avoid PTY issues: Yep; I've got a terminal in the browser! Thanks Per, I'll have a play. On 18 December 2015 at 19:46, Per Bothner <per@bothner.com> wrote: > > > On 12/18/2015 11:28 AM, Charlie Turner wrote: >> >> I almost got this working on OSX. See my hacks in the attached patch >> file if you want to get where I got :-) [where the heck do you get >> err_sys from on our box??] > > >> In addition to that patch file, I also had to rename libpty.so to >> libpty.jnilib on OSX. I have no idea why. This is my first experience >> with Native Java :-) > > > I guess I should start using autoconf ... > Including --disable-javafx and --disable-pty configure options. > >> Sadly, I got lost after managing to get the DomTerm to run. make-pty >> completes, and then the DomTerm window pops up with a scroll-bar, but >> nothing else. I get this stack trace in the terminal window from which >> I launched make run-pty, > > > It may be easier to start with the server, as that avoids JavaFX issues. > Perhaps try the --process option to avoid PTY issues: > > make run-server SERVER_ARGS=--process > > Then you can open a web console windows in your browser to check for > error messages. > > You might enable the various verbosity options, including the one > in terminal.js: > this.verbosity = 2; // instead of 0 > > >> netscape.javascript.JSException: ReferenceError: Can't find variable: >> makeDomTerm > > > That suggests the JavaScript in repl.html didn't get executed, > or got executed in the wrong context, or something like that. > > I suggest try the server/browser combination first. > > > -- > --Per Bothner > per@bothner.com http://per.bothner.com/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DomTerm - a new console for Kawa (and everyone else) 2015-12-18 19:28 ` Charlie Turner 2015-12-18 19:41 ` Jamison Hope 2015-12-18 19:46 ` Per Bothner @ 2015-12-22 7:38 ` Per Bothner 2 siblings, 0 replies; 8+ messages in thread From: Per Bothner @ 2015-12-22 7:38 UTC (permalink / raw) To: Charlie Turner; +Cc: Kawa mailing list On 12/18/2015 11:28 AM, Charlie Turner wrote: > I almost got this working on OSX. See my hacks in the attached patch > file if you want to get where I got :-) [where the heck do you get > err_sys from on our box??] > > In addition to that patch file, I also had to rename libpty.so to > libpty.jnilib on OSX. I have no idea why. This is my first experience > with Native Java :-) I've converted the Makefile to use autoconf - thus you now do ./configure && make Very preliminary build instructions: http://domterm.org/Downloading-and-building.html It will need more work for OSX, but at least now have the framework for a less hacky build process. I need to figure out how to set JAVA_HOMe more portably. -- --Per Bothner per@bothner.com http://per.bothner.com/ ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-12-22 7:38 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-12-17 22:52 DomTerm - a new console for Kawa (and everyone else) Per Bothner 2015-12-18 18:43 ` Charlie Turner 2015-12-18 19:14 ` Per Bothner 2015-12-18 19:28 ` Charlie Turner 2015-12-18 19:41 ` Jamison Hope 2015-12-18 19:46 ` Per Bothner 2015-12-18 20:00 ` Charlie Turner 2015-12-22 7:38 ` Per Bothner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).