Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Announcement of NaTcl: Tcl over google's native client.

6,239 views
Skip to first unread message

Colin McCormack

unread,
Apr 12, 2011, 7:37:22 PM4/12/11
to
Alex Ferrieux has successfully created Tcl over NaCl (google's native client.)

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.

David Gravereaux

unread,
Apr 12, 2011, 9:11:08 PM4/12/11
to


Wonderful! It almost works for me.. I have the native client enabled,
and the shell page changes to SUCCESS from LOADING, but the script
times-out after pressing the eval button. Does it matter that I'm on
x86-64 (Ubuntu 10.04)?

--


signature.asc

Alexandre Ferrieux

unread,
Apr 13, 2011, 2:45:14 AM4/13/11
to
On Apr 13, 3:11 am, David Gravereaux <davyg...@pobox.com> wrote:
> On 04/12/2011 04:37 PM, Colin McCormack wrote:
>
> > Alex Ferrieux has successfully created Tcl over NaCl (google's native client.)
>
> > This enables Tcl to access and manipulate the DOM of a Chrome browser, and as an example of this, we havehttp://wiki.tcl.tk/_natcl/balls.htmlwhich 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, seehttp://wiki.tcl.tk/NaTcl

>
> > Colin.
>
> Wonderful!  It almost works for me..  I have the native client enabled,
> and the shell page changes to SUCCESS from LOADING, but the script
> times-out after pressing the eval button.  Does it matter that I'm on
> x86-64 (Ubuntu 10.04)?

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

Alexandre Ferrieux

unread,
Apr 13, 2011, 2:50:53 AM4/13/11
to
On Apr 13, 8:45 am, Alexandre Ferrieux <alexandre.ferri...@gmail.com>
wrote:
> >
> The "balls.html" http://wiki.tcl.tk/_natcl/index.html

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

David Gravereaux

unread,
Apr 13, 2011, 9:38:37 PM4/13/11
to

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.

--


signature.asc

Bezoar

unread,
Apr 13, 2011, 10:41:20 PM4/13/11
to
set your load library path include /usr/lib/nss like:

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

Bezoar

unread,
Apr 13, 2011, 10:44:20 PM4/13/11
to
I forgot to add that it worked perfectly the first time for me. and the balls demo was really cool and worked at 32 fps. Good job! Alex!

Carl

David Gravereaux

unread,
Apr 13, 2011, 11:56:08 PM4/13/11
to
Alex,

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


--


signature.asc

Alexandre Ferrieux

unread,
Apr 14, 2011, 2:49:31 AM4/14/11
to
>  signature.asc
> < 1KViewDownload

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

David Gravereaux

unread,
Apr 14, 2011, 4:04:29 AM4/14/11
to
Okay, got it. Chrome '11.0.696.43 beta' works :)

--


signature.asc

Alexandre Ferrieux

unread,
Apr 14, 2011, 4:38:50 AM4/14/11
to
On Apr 14, 10:04 am, David Gravereaux <davyg...@pobox.com> wrote:
> Okay, got it.  Chrome '11.0.696.43 beta' works :)

Now beware, the balls demo steadily leaks memory in the JS process
(not the Tcl one, interestingly). Working on it :}

-Alex

Alexandre Ferrieux

unread,
Apr 14, 2011, 12:45:36 PM4/14/11
to
On Apr 14, 10:38 am, Alexandre Ferrieux <alexandre.ferri...@gmail.com>
wrote:

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

Tcl Bliss

unread,
Apr 14, 2011, 5:06:50 PM4/14/11
to
Very nice, works for me too. Great job, 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.

David Gravereaux

unread,
Apr 14, 2011, 11:49:48 PM4/14/11
to
On 04/14/2011 02:06 PM, Tcl Bliss wrote:
> Very nice, works for me too. Great job, Alex.

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.

--


signature.asc
0 new messages