[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
newlispfanclub.alh.net • View topic - newLISP in a browser

newLISP in a browser

Notices and updates

Re: newLISP in a browser

Postby Lutz » Fri Oct 16, 2015 4:50 pm

There will be an update based on the latest Emscripten later this year and based on newLISP v10.6.4/5.
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby HPW » Sat Oct 24, 2015 7:57 am

HPW
 
Posts: 1376
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby HPW » Thu Dec 31, 2015 9:17 am

Hello,

I am expermenting with newlisp in a browser from a different web-enviroment.
(neoappbuilder from neosoft http://www.neosoftware.com/neoappbuilder.html )
I noticed a load-error from the lib.
I noticed that it makes a difference when the file newlisp-js-lib.html.mem is missing in the main path.
So what is that file for and must it be redistributed with the lib?

Edit: When the file is not present or renamed this error is shown in Firefox:
NS_ERROR_DOM_BAD_URI: Access to restricted URI denied newlisp-js-lib.js:866:0

Can you add a more simple sample Html than app.html reduced to the steps to load only the lib?

Regards
HPW
 
Posts: 1376
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby HPW » Thu Dec 31, 2015 3:48 pm

HPW
 
Posts: 1376
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby Lutz » Thu Dec 31, 2015 9:14 pm

From http://www.newlisp.org/newlisp-js/newlisp-js-10.6.3.zip you need the whole codemirror/ sub-directory and the files newlisp-js-lib.js (this is newLISP compiled to JavaScript) and newlisp-js-lib.html.mem (some kind of configuration file).

A Happy 2016 to everybody!!!

Ps: code mirror stuff is only necessary for the editor
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby HPW » Fri Jan 01, 2016 7:43 am

Hello Lutz,

Also a happy new year for you and the newlisp community.

Thanks for the Infos.

For now you have to know that the mem-file has to be in the main-path of the Html which has the include-code. In my tests all js-stuff was in a sub-Directory /js and the load fails when mem file is there.

By the way emscripten is now at 1.35.0
http://kripken.github.io/emscripten-site/index.html

Regards
HPW
 
Posts: 1376
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby HPW » Sat Jan 02, 2016 8:55 am

HPW
 
Posts: 1376
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby HPW » Sat Mar 11, 2017 7:00 am

HPW
 
Posts: 1376
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby Lutz » Sun Mar 12, 2017 5:31 pm

Probably a newlisp-js-lib.wasm will be substantially bigger than a newlisp-js-lib.js, which might be a problem on devices with less memory. Speedwise we don’t know, the current JavaScript machine in FireFox is already pretty good.

For me, the main thing on this topic is, that the interest in ‘newLISP in a browser’ has been very poor and the getting the development environment right was pretty time consuming, even on Mac OS.

There are also a few things to be done in newlisp.c for the Emscripten interface.

At least at the moment, there are no plans to update to a newer version or to try the WebAsm way. Of course anybody trying to do that themselves is welcome.
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby Lutz » Thu Mar 16, 2017 2:35 am

After reading this: https://hacks.mozilla.org/2017/03/why-w ... an-asm-js/
I may change my mind. Perhaps WebAssembly is worth a try. Also does 64bit integers.
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby HPW » Thu Mar 16, 2017 12:33 pm

Hello Lutz,

Interesting read. Keep us up to date when you have changed your mind.
When it would get widely supported on various platforms, the poor interest may change.
I could imagine to integrate the newlisp-engine for business-rules and data with other web-Standards for GUI and 3D.
Just my 2 Cents. ;-)

Regards
HPW
 
Posts: 1376
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby xytroxon » Sun Mar 19, 2017 9:55 pm

"Many computers can print only capital letters, so we shall not use lowercase letters."
-- Let's Talk Lisp (c) 1976
xytroxon
 
Posts: 296
Joined: Tue Nov 06, 2007 3:59 pm

Re: newLISP in a browser, importing from a file (get-url)

Postby fdb » Mon Jun 19, 2017 6:28 pm

fdb
 
Posts: 49
Joined: Sat Nov 09, 2013 8:49 pm

Re: newLISP in a browser -too many setjmps

Postby fdb » Mon Jun 19, 2017 6:43 pm

When trying to run/eval a new lisp program in the browser i got below error message:

too many setjmps in a function call, build with a higher value for MAX_SETJMPS

apparently due to the Emscripten toolkit, but what can be done about this? Program works fine in 'normal' new lisp.
fdb
 
Posts: 49
Joined: Sat Nov 09, 2013 8:49 pm

Re: newLISP in a browser too many setjmps

Postby fdb » Wed Jun 21, 2017 7:48 am

In answer to my own question above, i found out that the latest emscripten doesn't have the limitation on setjmps anymore. So i installed latest emscripten(1.37.14) and compiled new lisp (10.7.3) with it (using makefile_emscripten_lib_utf8) and it works!

Got a warning because there is the -s MAX_SETJMPS=100 setting in the makefile which isn't used/supported anymore with latest emscripten, so better to remove it in future versions.
fdb
 
Posts: 49
Joined: Sat Nov 09, 2013 8:49 pm

Re: newLISP in a browser

Postby HPW » Wed Jun 21, 2017 10:59 am

Hello fdb,

Good to hear that get it working with latest newlisp version.
Could you upload the resulting js somewhere so others can also test with it. (Until Lutz offer a new one)

(I hope Lutz is thinking about the WebAssembly option)

Regards

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

Re: newLISP in a browser

Postby fdb » Wed Jun 21, 2017 10:32 pm

Hi Hans-Peter,

Made the js (and .mem file) available to download from here: www.ferrydb.nl/newlisp/download

BR
Ferry
fdb
 
Posts: 49
Joined: Sat Nov 09, 2013 8:49 pm

Re: newLISP in a browser

Postby Lutz » Wed Jun 21, 2017 11:47 pm

Thanks for doing this work Ferry:

http://www.ferrydb.nl/newlisp/

I also updated the 'info' file to newlisp-js-10.7.3.zip reference here:

http://www.newlisp.org/newlisp-js/

The zip file contains the whole newlisp-js directory including the codemirror editor files.

The -s MAX_SETJMPS=100 setting in the makefile was done originally to save memory on mobile devices. This doesn't seem to be an issue anymore. Your compile runs fine on my iPhone 6s.
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby HPW » Thu Jun 22, 2017 6:22 am

Hello Ferry and Lutz,

Thanks for providing the new release.
Works fine on all my firefox/chrome versions and IE11.
On Edge I will test later.

Lutz any new thoughts about the WebAssembly option?

Edit: Latest edge also works fine.

Regards
HPW
 
Posts: 1376
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: newLISP in a browser

Postby Lutz » Thu Jun 22, 2017 3:05 pm

When I have more time, may be. There is very little interest in the browser version at all. Perhaps somebody else wants to do it: http://webassembly.org/docs/faq/
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: newLISP in a browser

Postby fdb » Sat Jun 24, 2017 7:35 pm

Ok, i've managed to compile it to web assembly. - 'Just a switch...' ;-)

I eventually found out where to put the switch in the build file and it works in Firefox and Chrome (not in Safari), haven't tested Explorer/Edge.

You can download newlisp-js-lib.js.wa and newlisp-js-lib.js.wasm from [url]ferrydb/newlisp/download[/url], Lutz i've also added the make file i used. (makefile_emscripten_lib_utf8)

You have to rename newlisp-js-lib.js.wa to newlisp-js-lib.js and put in together with new lisp-js-lib.wasm in the document directory of your web server.

I've also done some performance tests with a small Scrabble program i wrote and it is really remarkable how fast JS/WA is compared to native Newlisp (on iMac, 3.2Ghz Intel Core I3, 12 GB Ram). See below some results how long it takes to find the best solution in my little (naive/unoptimised/educational!) Scrabble program , (choosing from 35,000 words, having 5 letter and 2 jokers, 3 words already on the board).

All examples run on iMac OSX 10.12.5 (Sierra), 3.2Ghz Intel Core I3, 12 GB Ram (in minutes CPU time)

Native
5.5

Javascript
Firefox : 5
Chrome: 8
Safari Nightly: 8
Safari: 10

WebAssembly
Firefox: 4.5
Chrome:5.5
fdb
 
Posts: 49
Joined: Sat Nov 09, 2013 8:49 pm

Re: newLISP in a browser

Postby Lutz » Sat Jun 24, 2017 8:09 pm

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

Re: newLISP in a browser

Postby fdb » Sat Jun 24, 2017 8:55 pm

fdb
 
Posts: 49
Joined: Sat Nov 09, 2013 8:49 pm

Re: newLISP in a browser

Postby fdb » Sat Jun 24, 2017 9:25 pm

Results on my 2017 macbook pro (I7 ,2.7 ghz)

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

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

Firefox Web Assembly
>>>>> total time: 511
>>>>> Performance ratio: 1.04 (1.0 on MacOSX 10.9, 2.3GHz Intel Core i5, newLISP v10.6.0-64-bit)

Chrome Web Assembly
>>>>> total time: 594
>>>>> Performance ratio: 1.17 (1.0 on MacOSX 10.9, 2.3GHz Intel Core i5, newLISP v10.6.0-64-bit)
fdb
 
Posts: 49
Joined: Sat Nov 09, 2013 8:49 pm

Re: newLISP in a browser

Postby HPW » Sun Jun 25, 2017 7:43 am

Hello,

Thanks Ferry for providing the WebAssembly Option.

From my Win7 tablet (The middle of 3 measurements)

http://ferrydb.nl/newlisp/

http://ferrydb.nl/newlisp-wa/

Asus Eee Slate
i5 U470 1.33 Ghz 4 Gb
Windows performance Index 3.1


(module "qa-bench")

IE 11.0.9600 JS

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

IE 11.0.9600 WA

Not compatibel


Chrome 59.0.3071.109 JS

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

Chrome 59.0.3071.109 WA

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


Firefox 54.0 32bit JS

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

Firefox 54.0 32bit WA

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

Regards
Last edited by HPW on Mon Jun 26, 2017 4:51 am, edited 1 time in total.
HPW
 
Posts: 1376
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 1 guest

cron