Clément Bera wrote:
>What is PharoJS ? Are you talking about Pharo on top of the Bert's SqueakJS VM ? >If so, it starts, but some primitives fail making it freeze after a short >while as you describe. >It would be fun to have it running even though most of the Pharo folks went >into the Amber direction for Pharo on Javascript. Yes there is SqueakJS from Bert https://bertfreudenberg.github.io/SqueakJS/ and I would have expected "PharoJS" to be the same for Pharo. At least I would "reserve" the name for the case Pharo images work on it as well. Unfortunately Noury Bouraqadi now took this "PharoJS" name for his Pharo -> JavaScript compiler http://car.mines-douai.fr/2015/07/develop-in-pharo-run-on-javascript/ leading a little bit to this confusion. I would have called the project "Pharo JavaScriptBridge" like the config and the repo http://smalltalkhub.com/#!/~noury/JavaScriptBridge I loaded the config from the SmalltalkHub repo and then: ConfigurationOfJavaScriptBridge loadBleedingEdge tried JbClientControllerBridge startOn:80 but were hit by several errors. In my opinion a minimal HOWTO would be required. Thanks Torsten |
Hi Torsten,
Thanks for the feedback. I have been pushed to make it public right before ESUG. I'm trying my best to make it clean and documented. If you are using a Mac, the examples I provide on http://car.mines-douai.fr/pharojs/ should work out of the box. For other platforms (Windows & Linux) I need the command line to open a web browser on a specific URL. Any hint? Regarding the naming PharoJS is more than a bridge. It allows: -Develop and test apps in Pharo -Generate a javascript file for a standalone app Noury
|
Administrator
|
How does it compare to Amber? Similar use case?
Cheers,
Sean |
In reply to this post by Noury Bouraqadi-2
Hi Noury,
thanks for the feedback. For windows to open a URL one can use:
NBWin32Shell shellOpen: 'http://www.google.de'
I adopted the
startJavaScriptInterpreter
|url| url := 'http://localhost:', self port asString. Smalltalk os isWindows ifTrue: [ ^NBWin32Shell shellOpen: url ]. OSProcess command: 'open ', url and run
workspace := JbWorkspaceForWeb open. It basically runs (still throwing some Zinc errors - but I can push some eval scripts to the browser
(Chrome). No time today to look deeper today.
Please add me as a contributor so I can provide the fix/fixes or make the repo public (if possible).
Thanks
T.
Gesendet: Mittwoch, 15. Juli 2015 um 12:19 Uhr
Von: "Noury Bouraqadi" <[hidden email]> An: "Torsten Bergmann" <[hidden email]> Cc: "Pharo users users" <[hidden email]> Betreff: Re: PharoJS Hi Torsten,
Thanks for the feedback.
I have been pushed to make it public right before ESUG.
I'm trying my best to make it clean and documented.
If you are using a Mac, the examples I provide on http://car.mines-douai.fr/pharojs/ should work out of the box.
For other platforms (Windows & Linux) I need the command line to open a web browser on a specific URL.
Any hint?
Regarding the naming PharoJS is more than a bridge. It allows:
-Develop and test apps in Pharo
-Generate a javascript file for a standalone app
Noury
|
In reply to this post by Sean P. DeNigris
2015-07-15 12:34 GMT+02:00 Sean P. DeNigris <[hidden email]>: Noury Bouraqadi-2 wrote The resulting application is the same in PharoJS and Amber, you have javascript files to deploy only and no dependence with Smalltalk, so I'd say similar use-cases for sure. I've just tried PharoJS and the main difference with Amber is that you develop from Pharo instead of from the browser, allowing to reuse the Pharo IDE for development instead of building a new one. In fact it is the same as Amber's sub-project Nemo where you develop in Amber from Pharo. Why doesn't PharoJS use the Amber compiler to compile from Smalltalk to javascript and the Amber kernel to map native Javascript objects ? Amber's compiler and JS kernel were polished and optimized during years, I don't understand why you need to do it again ... It's really nice to be able to develop and commit from Pharo.
|
In reply to this post by Sean P. DeNigris
> On 15 Jul 2015, at 12:34, Sean P. DeNigris <[hidden email]> wrote: > > Noury Bouraqadi-2 wrote >> Regarding the naming PharoJS is more than a bridge. It allows: >> -Develop and test apps in Pharo >> -Generate a javascript file for a standalone app > > How does it compare to Amber? Similar use case? > The main difference is that with PharoJS we develop and test in Pharo, with the confort of all cool tools such as the GT inspector, spotter :-) Noury |
In reply to this post by Torsten Bergmann
Thanx Torsten for the fix.
I integrated it :-) Noury
|
In reply to this post by Torsten Bergmann
Hi Noury, Thanks for the link to the documentation. I have managed to get up and running now - very cool! One question. When I execute 1+1 on the Pharo (pink) playground, I see the code appearing in the web browser log, but it doesn't appear to execute. Is it supposed to, or at this stage is it just showing that it made it over to the web browser? Cheers Andy |
In reply to this post by Torsten Bergmann
On Wed, Jul 15, 2015 at 5:28 PM, Torsten Bergmann <[hidden email]> wrote:
> Clément Bera wrote: > >>What is PharoJS ? Are you talking about Pharo on top of the Bert's SqueakJS VM ? >>If so, it starts, but some primitives fail making it freeze after a short >>while as you describe. >>It would be fun to have it running even though most of the Pharo folks went >>into the Amber direction for Pharo on Javascript. > > Yes there is SqueakJS from Bert https://bertfreudenberg.github.io/SqueakJS/ > and I would have expected "PharoJS" to be the same for Pharo. > > At least I would "reserve" the name for the case Pharo images work on it > as well. That would be ideal. Otherwise the door is opened for people searching for something like SqueakJS on Pharo to be confused. They get excited they found it, then disappointed it wasn't what they were looking for. An alternative could be PharotoJS :). But maybe that horse has bolted... and open source implies those that do the work get to make the choices. cheers -ben > Unfortunately Noury Bouraqadi now took this "PharoJS" name for his > Pharo -> JavaScript compiler |
In reply to this post by Andy Burnett
> On 15 Jul 2015, at 15:37, Andy Burnett <[hidden email]> wrote:
> > One question. When I execute 1+1 on the Pharo (pink) playground, I see the code appearing in the web browser log, but it doesn't appear to execute. Is it supposed to, or at this stage is it just showing that it made it over to the web browser? > It does actually execute on the browser, but 1+1 has no side effect :-). You can try to call native javascript object to see stuff changing. For example, you can evaluate the following> console native_log: 'Hello from Smalltalk'. "Displays the string in the console of the browser" window native_alert: 'This is cool'. "Opens an alert window on the browser" Note: You need to load version 51 (just pushed it to SmalltalkHub) that fixes a bug in the PharoJS workspace. Noury |
Administrator
|
In reply to this post by Noury Bouraqadi-2
Wow!!! That is my main pain point with Amber. Unless one is very disciplined with TDD, the linkage between the app loaded in the browser, and Helios loaded in a separate window, introduces a run-compile-like cycle where after every change, one has to reload the app which reloads the IDE, and you lose all current state e.g. workspaces, etc. How mature is PharoJS? Is anyone using it in production? Who are the core developers? What are the intentions e.g. toy? experiment? production-quality? next big thing?
Cheers,
Sean |
> On 17 Jul 2015, at 17:21, Sean P. DeNigris <[hidden email]> wrote: > > Noury Bouraqadi-2 wrote >> The main difference is that with PharoJS we develop and test in Pharo, >> with the confort of all cool tools such as the GT inspector, spotter :-) > > Wow!!! That is my main pain point with Amber. Unless one is very disciplined > with TDD, the linkage between the app loaded in the browser, and Helios > loaded in a separate window, introduces a run-compile-like cycle where after > every change, one has to reload the app which reloads the IDE, and you lose > all current state e.g. workspaces, etc. > > How mature is PharoJS? Is anyone using it in production? Who are the core > developers? What are the intentions e.g. toy? experiment? > production-quality? next big thing? > But, after few weeks I noticed that it can cover a significant subset of Pharo. As I showed at ESUG (we missed you BTW), it allows building a simple form app for smartphones using PhoneGap. So, I shifted my goal, and decided to make it clean and usable for production-quality app. Fortunately, I won't be alone. Torsten Bergmann and Dave Mason kindly offered their help and joined the project since few days. Regarding the status, PharoJS is usable, but I don't recommend to use it for production right now. It is not polished and parts are likely to dramatically change in the forthcoming weeks. We also need to expand the documentation. Lot of stuff to do, but I'm very excited about it :-) Still, you can give it a try. There is a first tutorial that gives a quick overview. More to come. Noury |
Administrator
|
Ah, very cool use case. Is there a video? I just got married, but hopefully will be back next year. Much of my work seems to be converging and I hope to be able to show something exciting next ESUG :) Very good to hear on both counts. I will do that
Cheers,
Sean |
> On 19 Jul 2015, at 04:24, Sean P. DeNigris <[hidden email]> wrote: > > Noury Bouraqadi-2 wrote >> As I showed at ESUG..., it allows building a simple form app for >> smartphones using PhoneGap. > > Ah, very cool use case. Is there a video? > I'm travelling these days. I'll do it ASAP. > > Noury Bouraqadi-2 wrote >> (we missed you BTW) > > I just got married, but hopefully will be back next year. CONGRATULATIONS!!! > Much of my work > seems to be converging and I hope to be able to show something exciting next > ESUG :) > Looking forward to see it. Best, Noury > > Noury Bouraqadi-2 wrote >> So, I shifted my goal, and decided to make it clean and usable for >> production-quality app. >> Fortunately, I won't be alone. > > Very good to hear on both counts. > > > Noury Bouraqadi-2 wrote >> Still, you can give it a try. There is a first tutorial that gives a quick >> overview. > > I will do that > > > > ----- > Cheers, > Sean > -- > View this message in context: http://forum.world.st/PharoJS-tp4837593p4838140.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > |
In reply to this post by Noury Bouraqadi-2
Is PharoJS related to / based on
http://www.squeaksource.com/@45sUWABDUdZM7Og0/Uycfg_AQ ST2JS - Traductor de Smalltalk a JavaScript http://diegogomezdeck.blogspot.com/2006/07/st2js-traductor-de-smalltalk.html Las características de JavaScript mencionadas anteriormente, usadas con picardía, permiten hacer un traductor de Smalltalk a JavaScript que respete toda la semántica del Smalltalk. ? --Hannes On 7/16/15, Noury Bouraqadi <[hidden email]> wrote: >> On 15 Jul 2015, at 15:37, Andy Burnett <[hidden email]> >> wrote: >> > >> One question. When I execute 1+1 on the Pharo (pink) playground, I see the >> code appearing in the web browser log, but it doesn't appear to execute. >> Is it supposed to, or at this stage is it just showing that it made it >> over to the web browser? >> > It does actually execute on the browser, but 1+1 has no side effect :-). > > You can try to call native javascript object to see stuff changing. > For example, you can evaluate the following> > > console native_log: 'Hello from Smalltalk'. "Displays the string in the > console of the browser" > window native_alert: 'This is cool'. "Opens an alert window on the > browser" > > > Note: You need to load version 51 (just pushed it to SmalltalkHub) that > fixes a bug in the PharoJS workspace. > > Noury > > > > |
The only connection is that they share the same goal of converting Smalltalk code to JavaScript.
Noury > On 07 Aug 2015, at 21:02, H. Hirzel <[hidden email]> wrote: > > Is PharoJS related to / based on > > http://www.squeaksource.com/@45sUWABDUdZM7Og0/Uycfg_AQ > > > ST2JS - Traductor de Smalltalk a JavaScript > http://diegogomezdeck.blogspot.com/2006/07/st2js-traductor-de-smalltalk.html > Las características de JavaScript mencionadas anteriormente, usadas > con picardía, permiten hacer un traductor de Smalltalk a JavaScript > que respete toda la semántica del Smalltalk. > ? > > --Hannes > > On 7/16/15, Noury Bouraqadi <[hidden email]> wrote: >>> On 15 Jul 2015, at 15:37, Andy Burnett <[hidden email]> >>> wrote: >>> >> >>> One question. When I execute 1+1 on the Pharo (pink) playground, I see the >>> code appearing in the web browser log, but it doesn't appear to execute. >>> Is it supposed to, or at this stage is it just showing that it made it >>> over to the web browser? >>> >> It does actually execute on the browser, but 1+1 has no side effect :-). >> >> You can try to call native javascript object to see stuff changing. >> For example, you can evaluate the following> >> >> console native_log: 'Hello from Smalltalk'. "Displays the string in the >> console of the browser" >> window native_alert: 'This is cool'. "Opens an alert window on the >> browser" >> >> >> Note: You need to load version 51 (just pushed it to SmalltalkHub) that >> fixes a bug in the PharoJS workspace. >> >> Noury >> >> >> >> > |
Free forum by Nabble | Edit this page |