This enables Tcl to access and manipulate the DOM of a Chrome browser, and as an example of this, we have http://wiki.tcl.tk/_natcl/balls.html which demonstrates Tcl program driving an HTML5 Canvas.
This development gives people the real choice of Tcl as a Web Application Language.
For more details, including setup to observe demo, see http://wiki.tcl.tk/NaTcl
Colin.
The "balls.html" http://wiki.tcl.tk/_natcl/index.html doesn't have an
'eval' button; maybe you have a stale version ? Forgot to flush the
browser's cache ?
The "index.html" http://wiki.tcl.tk/_natcl/index.html does. And again,
older versions had a timeout-driven bgerror popup (as a demo of
bgerror handling). But if you have a more serious error, please give
details:
- what exactly does Chrome do when "the script times out" ? Pop-up
alert ? HTTP error page ?
- can you look at chrome's stderr ?
-Alex
Ah ! Damn 3-button mouse emulation on a freakin mouseless laptop.
The "balls.html" demo is at http://wiki.tcl.tk/_natcl/balls.html
-Alex
After 30 seconds or so a dialog will popup and declare the page as
unresponsive and gives me the option to kill or wait.
Here is what is printed to the shell:
davygrvy@bigmoma:~$ /opt/google/chrome/google-chrome
[1:1:1460318863942:ERROR:native_library_linux.cc(32)] dlopen failed when
trying to open libsoftokn3.so: libsoftokn3.so: cannot open shared object
file: No such file or directory
[1:1:1460318864373:ERROR:native_library_linux.cc(32)] dlopen failed when
trying to open libfreebl3.so: libfreebl3.so: cannot open shared object
file: No such file or directory
Moonlight: 3.99.0.3
Moonlight: Attempting to load libmoonloaderxpi
Attempting to load the system libmoon
NaTcl(34): DBUG: NaTcl starting
BADSYSCALL:getuid
BADSYSCALL:getpwuid
*BADSYSCALL:access("/usr",0)
[34,0:01:28:15.268000] Fatal error in file
src/shared/ppapi_proxy/plugin_globals.cc, line 59: !(ppb_interface)
LOG_FATAL abort exit
I fixed the issues with libsoftokn3.so and libfreebl3.so by doing:
$ sudo ln -s /usr/lib/nss/libfreebl3.so /usr/lib/libfreebl3.so
$ sudo ln -s /usr/lib/nss/libsoftokn3.so /usr/lib/libsoftokn3.so
But still the same fatal.
--
shell>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nss google-chrome --no-sandbox
or set it in env.
shell> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nss
shell> google-chrome --no-sandbox
Note some shell may hickup if LD_LIBRARY_PATH is empty or non-existant in the first place. If thats the case then use
LD_LIBRARY_PATH=/usr/lib/nss
if that still does not work then check the libraries that each of those libraries depends on then see if they exist on the LD_LIBRARY_PATH. If they are in a standard location like /usr/lib then you do not need to update the LD_LIBRARY_PATH. on my system libsoftokn3.so was found in /usr/lib (Fedora 14) so
shell> cd /usr/lib
shell> ldd libsoftokn3.so
linux-gate.so.1 => (0x009ee000)
libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x05efd000)
libnssutil3.so => /usr/lib/libnssutil3.so (0x03050000)
libplc4.so => /lib/libplc4.so (0x00602000)
libplds4.so => /lib/libplds4.so (0x005fc000)
libnspr4.so => /lib/libnspr4.so (0x02eba000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00a9b000)
libdl.so.2 => /lib/libdl.so.2 (0x00a94000)
libc.so.6 => /lib/libc.so.6 (0x00169000)
/lib/ld-linux.so.2 (0x008b9000)
HTH
Carl
Carl
The problem is me.. No native client apps run in my browser. Although
it is version '12.0.733.0 dev' and direct from google's repository, no
workie on their examples @
http://code.google.com/chrome/nativeclient/docs/examples.html
--
Hmm, maybe linked to http://code.google.com/p/nativeclient/issues/detail?id=1458
Nacl itself is bleeding-edge technology. I am perfectly able to add
Tcl-specific bugs, but this time I lost the race :P
-Alex
Now beware, the balls demo steadily leaks memory in the JS process
(not the Tcl one, interestingly). Working on it :}
-Alex
Update: the leak was actually a Nacl bug (!), see:
http://code.google.com/p/nativeclient/issues/detail?id=1658
So, people wanting to keep the balls moving for hours will probably
want to upgrade :P
(no idea when the fix will make it into distributed Chrome binaries
though)
-Alex
I am afraid that if Google decides to force everyone to do the "--no-
sandbox" and/or enable "Native Client" tricks, that could be a DOA for
NaTcl. At least now users do not have to install Tcl, which is a big
improvement over Tcl Plugin.
Yes, fantastic. Now I'm all excited about trying some stuff and
*wanting* to learn something new.
> I am afraid that if Google decides to force everyone to do the "--no-
> sandbox" and/or enable "Native Client" tricks, that could be a DOA for
> NaTcl. At least now users do not have to install Tcl, which is a big
> improvement over Tcl Plugin.
What I find exciting is the the server is in full control of what code
is used, yet running in the client.
--