newLISP in a browser

Notices and updates

Re: newLISP in a browser

Postby Lutz » Mon Jan 20, 2014 6:56 pm

The editor IDE is now in pretty good shape, but running a lot of stuff in JavaScript compiled newLISP over the weekend, too often optimization problems and exception handling problems occur which are problems of the Emscripten compilation.

When new versions of the LLVM-Clang-Emscripten toolchain come out, I will try again. At least the LLVM and Clang parts seems to be stable. Since a few versions now, newLISP is compiled using LLVM and Clang for the OSX 9.1 (Maverick) for all OSX binary distributions. Emscripten works by taking LLVM, Clang generated low level bit code and translating it to a subset of JavaScript called asm.js, which then gets fed to the JavaScript runtime VM.

The current newlisp-js-10.5.7.zip is Ok for demo purposes but not for production work.
Lutz
 
Posts: 5234
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby HPW » Mon Jan 20, 2014 7:42 pm

Hello Lutz,

When new versions of the LLVM-Clang-Emscripten toolchain come out, I will try again.
The current newlisp-js-10.5.7.zip is Ok for demo purposes but not for production work.


Not so good news. I hope the Emscripten-team is aware of the problems and get them fixed.
A stable engine is a must-have to move serious projects to that engine.

Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby Lutz » Wed Jan 22, 2014 4:38 am

Occasional problems with exceptions persist but can be defined more precisely now. See the CHANGES notes for more about this. I believe it is still possible to build stable applications with newLISP compiled to JavaScript.

It was possible to cut the size of the library in half doing more compiler optimizations. This did not make the exception problems worse. The compressed newlisp-js-lib.js.gz is now only 250K.

http://www.newlisp.org/downloads/develo ... nprogress/
Lutz
 
Posts: 5234
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby HPW » Wed Jan 22, 2014 8:11 pm

Typo in changes: to work

For this to wordk emsdk-portable.tar.gz must be installed ....
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby Lutz » Mon Feb 17, 2014 7:43 pm

Since the last 'newLISP in a browser' announcement many things have been added to the editor. I use it now frequently for trying out and developing smaller code portions.

The execption handling problems (setjmp(), longjmp()) only occur rarely and I hope they will go away completely with newer versions of the Emscripten tool set.

- Syntax highlighting now with CodeMirror editor. This is the same editor, Marc is using at the http://newlisp.neocortex.io/ demo. He could take the syntax highlighting file from here:
newlisp-js-x.x.x/codemirror/mode/newlisp/newlisp.js

- Several dark and brigth color schemes.

- Keyboard short cuts for most buttons (click [info]).

- Automatic vertical and horizontal resizing when browser window changes and sensing of mobile device rotation.

- Tool tips for all buttons.

- line numbers can be toggled on/off.

Access it here: http://www.newlisp.org/newlisp-js/

The info page has a link to the source package. At least for me, a bluetooth keyboard connected to the iPad did not work with the CodeMirror editor. I hope this is something getting fixed soon by the Emscripten team.
Lutz
 
Posts: 5234
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby johu » Tue Feb 18, 2014 10:30 am

Hello, Lutz.

For Stable Release or Development version,

in newlisp_manual.html
line 1430
newLISP code and JavaScript code together. Bot languages can call
                     ↓
newLISP code and JavaScript code together. But languages can call

line 7309
<table border="0" cellpadding="1" width="95%" align="center" summary="Reflection and customization">
                                 ↓
<table border="0" cellpadding="1" width="95%" align="center" summary="API for newLISP in a web browser">

line 12401
<br/><br/> might be added
Because there is between display-html and div.


in README.html
line 309
(eval-string-js (string "GetUrl('" url "')"))
                  ↓
(eval-string-js (string "GetUrl('" url "')")) )

line 322
new webpage. When evaluating the following snipped in the editor box,
                     ↓
new webpage. When evaluating the following snippet in the editor box,


Thanks,
johu
 
Posts: 139
Joined: Mon Feb 08, 2010 8:47 am

Re: newLISP in a browser

Postby Lutz » Tue Feb 18, 2014 2:52 pm

Thank you very much for all the corrections Johu.

Everything is online here: http://www.newlisp.org/newlisp-js/
Lutz
 
Posts: 5234
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby HPW » Sat Oct 11, 2014 6:11 pm

....and I hope they will go away completely with newer versions of the Emscripten tool set.


Since some time/versions have passed, is there any Progress in newer versions of the Emscripten tool set for more stable newlisp-implementations?

Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby Lutz » Sun Oct 12, 2014 6:41 am

The current version at http://newlisp.org/newlisp-js was installed on September 16th and based on the latest version of Emscripten. All exception handling problems fortunately have disappeared :) On all platforms it runs best on Firefox.
Lutz
 
Posts: 5234
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby HPW » Sun Oct 12, 2014 12:36 pm

Hello Lutz,

Good News, It would be interesting to try newlisp in a browser combined with one of the popular JavaScript-GUI-frameworks for example: http://www.jqwidgets.com/jquery-ui-widgets-toolkit/

Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby HPW » Fri Nov 28, 2014 5:33 pm

Hello,

In http://www.newlisp.org/newlisp-js/README.html we can read:

For a tutorial in to the basics of newLISP type (load "newlisp-js/tutorial.lsp") in to the editor ....


But when I try it I get:

ERR: problem accessing file in function load : "newlisp-js/tutorial.lsp"


Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby Lutz » Fri Nov 28, 2014 10:03 pm

Thanks Hans-Peter, the link has been taken out. It is not completed yet but perhaps it will appear in a future version.
Lutz
 
Posts: 5234
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby HPW » Sun Mar 01, 2015 4:06 pm

Hello,

A observation for IE11 on Win7 tablet and the provided links here:

http://www.newlisp.org/newlisp-js/ does not finish loading.The word 'Downloading...' stays visible and Buttons do not work.

http://newlisp.nfshost.com/newlisp-js/ works as expected on IE11.

Both links work on Chrome as expected.

Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby HPW » Sun Mar 01, 2015 4:23 pm

Hello,
..... and based on the latest version of Emscripten.


Just curios:

http://kripken.github.io/emscripten-sit ... loads.html

shows 1.29 as download-Version. The newlisp-js Shows 1.22 as the version number.

Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby Lutz » Sun Mar 01, 2015 5:55 pm

During the coming week, I will try to update the Emscripten.

Also: the best browser for using Emscripten is - by far - Firefox. It is more than double the speed of Chrome. To check the speed: clear the windows using the x-edit and x-log buttons, then execute:
Code: Select all
(module "qa-bench")

this will give you the relative speed to a MacOSX 10.9, 2.3GHz Intel Core i5. Firefox comes in with 1.89 and Chrome with 5.01. On my iPhone 5s and iPad Mini (version 1) it will crash, because of the lack of memory required by the bench mark routines - you must then hit the red reload button. Haven't tried on a iPhone 6 or newer iPad, which all have more memory.

Firefox is also the only browser, which allows you to run locally on a laptop or desktop without going through a web server.
Lutz
 
Posts: 5234
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby HPW » Sun Mar 01, 2015 8:29 pm

Hello Lutz,

I will try also Firefox.
But why does the first link not work on IE11.
What can be the difference between the both server setups.
Just to make sure that it work on all target-platforms.

Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby Lutz » Mon Mar 02, 2015 4:17 pm

Lutz
 
Posts: 5234
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby Lutz » Tue Mar 03, 2015 7:58 pm

Updated here to Emscripten v1.29 and current in progress newLISP v10.6.3. http://www.newlisp.org/newlisp-js/ . Performance on Firefox has slightly improved, now 1.68 compared to native 1.0 performance.

For IE11 issues see here: https://github.com/kripken/emscripten/issues/3180
Lutz
 
Posts: 5234
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby HPW » Tue Mar 03, 2015 8:33 pm

Hello,

Thanks for the update.
Now it loads again from the link on IE11 on my Win7 tablet (I5 470UM / 1.33GHz).

Qa-bench on IE11:
>>>>> total time: 50358
>>>>> Performance ratio:82.10 (1.0 on MacOSX 10.9, 2.3GHz Intel Core i5, newLISP v10.6.0-64-bit)

Qa-bench on Chrome 40:
>>>>> total time: 15157
>>>>> Performance ratio:24.86 (1.0 on MacOSX 10.9, 2.3GHz Intel Core i5, newLISP v10.6.0-64-bit)

Not installed Firefox yet, have to upgrade my 64Gb SSD first.

Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby HPW » Tue Mar 03, 2015 10:05 pm

Hello,

After upgrading Chrome to 41:

>>>>> total time: 2844
>>>>> Performance ratio: 4.83 (1.0 on MacOSX 10.9, 2.3GHz Intel Core i5, newLISP v10.6.0-64-bit)

Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby HPW » Wed Mar 04, 2015 6:39 am

Hello,

Another bench from my CAD-Workstation (WIN 7 64bit Xeon E5-1620 3.7 Ghz)

IE 11:
>>>>> total time: 4806
>>>>> Performance ratio: 8.02 (1.0 on MacOSX 10.9, 2.3GHz Intel Core i5, newLISP v10.6.0-
Chrome 41:
>>>>> total time: 1097
>>>>> Performance ratio: 1.99 (1.0 on MacOSX 10.9, 2.3GHz Intel Core i5, newLISP v10.6.0-64-bit)
Firefox 36:
>>>>> total time: 818
>>>>> Performance ratio: 1.54 (1.0 on MacOSX 10.9, 2.3GHz Intel Core i5, newLISP v10.6.0-64-bit)

Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby HPW » Wed Mar 04, 2015 5:52 pm

Firefox is also the only browser, which allows you to run locally on a laptop or desktop without going through a web server.


Just tried it out. Nice tip. Will be usefull for further testing.

Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby HPW » Sat Mar 07, 2015 2:14 pm

Hello,

Upgraded my tablet SSD today from Sandisk 64Gb to Samsung evo 470Gb.
Installed firefox 36 and here is the benchmark result:

>>>>> total time: 1945
>>>>> Performance ratio: 3.37 (1.0 on MacOSX 10.9, 2.3GHz Intel Core i5, newLISP v10.6.0-64-bit)


Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby HPW » Thu Oct 15, 2015 4:01 pm

Hello,

Today I could test on a aged intel core 2 duo P8400 with 4GB
Windows 10 Pro 32 bit

Chrome 46
>>>>> total time: 3792
>>>>> Performance ratio: 6.37 (1.0 on MacOSX 10.9, 2.3GHz Intel Core i5, newLISP v10.6.0-64-bit)

Firefox 41.0.1
>>>>> total time: 1605
>>>>> Performance ratio: 2.82 (1.0 on MacOSX 10.9, 2.3GHz Intel Core i5, newLISP v10.6.0-64-bit)

Edge
>>>>> total time: 5214
>>>>> Performance ratio: 8.68 (1.0 on MacOSX 10.9, 2.3GHz Intel Core i5, newLISP v10.6.0-64-bit)

IE11
>>>>> total time: 11433
>>>>> Performance ratio:18.80 (1.0 on MacOSX 10.9, 2.3GHz Intel Core i5, newLISP v10.6.0-64-bit)

Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby HPW » Fri Oct 16, 2015 4:05 pm

Hello,

By the way emscripten is now at 1.34.1

http://kripken.github.io/emscripten-sit ... loads.html

Regards
Hans-Peter
HPW
 
Posts: 1321
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

PreviousNext

Return to newLISP newS

Who is online

Users browsing this forum: No registered users and 2 guests