Prudence 2.0-dev11, Sincerity 1.0-dev14

12 views
Skip to first unread message

Tal Liron

unread,
Sep 10, 2013, 8:47:23 AM9/10/13
to prudence-...@googlegroups.com
Available for download from http://threecrickets.com/ as well as the Three Crickets Repository.

The reason for this release is to add Lua and experimental Nashorn support, via a new Scripturian (1.0.9). You do not need to upgrade if you aren't interested in testing this. If you are, you can see Lua in the examples:

sincerity create test : add prudence.example : add lua : install : start prudence

(Note that you can also use "start prudence" instead of "start restlet" in this release.) Lua is a fully supported language in Prudence. You can write scriptlet, manual and delegated resources with it. It caches Lua bytecode in "/cache/lua/" for even greater performance upon restarts. And of course you can write Sincerity programs and plugins. Lua is a great addition to the stack! For more info:

http://threecrickets.com/sincerity/ecosystem/language-plugins/#lua-plugin

As for Nashorn, support should be deemed experimental because Nashorn is still under heavy development. I've included a snapshot of the current Nashorn backport in the Three Crickets Repository for you to try. To test it out:

sincerity create test : add nashorn : install

(Note that Nashorn requires JVM 7.) You can then run "sincerity nashorn" to get a shell or write Sincerity programs in Nashorn. To avoid choosing Rhino, use the .nashorn extension for files instead of .js. Nashorn does not cache to disk, unfortunately (limitations with the current implementation; I'm trying to find a solution via the mailing list), but it does cache in memory.

Scripturian was also modified to better deal with multiple engines supporting the same language. You can now specify preferences to the language manager: Sincerity by default will prefer Rhino over Nashorn if both are present. Furthermore, the "document.execute" mechanism will prefer the *current* language whatever the general preference is. Thus, if you are in Nashorn and executing other JavaScript documents, they will  be executed in Nashorn, even if Rhino is preferred.
Reply all
Reply to author
Forward
0 new messages