Re: [Pharo-users] PharoJS
I was wondering: a) I'm assuming PharoJS would be much like Amber but inside the Pharo VM. b) How much of the Amber codebase could be re-used for it? I'm interested on the one hand, mainly due to the demand for Angular code in the browser (jQuery is great in Seaside, but many clients are looking for Angular recently), and my distaste for debugging JavaScript. Amber is ok but lacks the depth of tooling in Pharo, and isn't keeping up with the (constant) breaking changes in node and NPM. (Not that I blame the developers of Amber, it's a problem with the mindset of the developers in the JavaScript ecosystem - the way that Angular2 is almost completely different from Angular is an example of the lack of interest in the existing user base). The problem I see is that PharoJS would have the same issues. As a result it would not only be a fair amount of work to accomplish, it would be far more to maintain. The Pharo ecosystem is based on an entirely opposite mindset to the JS ecosystem - a few very good frameworks and a reasonable number of very good libraries, resulting in highly maintainable code even on projects with only one or two developers. On top of that it would have to deal with the issues with JS itself that make writing decent tools virtually impossible. Andrew Glynn -----Original Message----- From: Pharo-users [mailto:pharo-users-bounces@lists.pharo.org] On Behalf Of pharo-users-request@lists.pharo.org Sent: Thursday, June 22, 2017 8:41 AM To: pharo-users@lists.pharo.org Subject: Pharo-users Digest, Vol 50, Issue 108 Send Pharo-users mailing list submissions to pharo-users@lists.pharo.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.pharo.org/mailman/listinfo/pharo-users_lists.pharo.org or, via email, send a message with subject or body 'help' to pharo-users-request@lists.pharo.org You can reach the person managing the list at pharo-users-owner@lists.pharo.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Pharo-users digest..."
There seem to be some interesting work with SqueakJS by Craig Latta. https://thiscontext.com/ I hope Smalltalk of all dialects can get together to develop a killer web development environment. All the best, Aik-Siong Koh -- View this message in context: http://forum.world.st/Re-PharoJS-tp4952267p4952306.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Smalltalk does have a killer web environment, it's called Seaside. I haven't come across any good reason jQuery with Seaside isn't sufficient to do anything a developer might want to - that customers want Angular isn't based on anything that can't be done without it. Unfortunately technology is mostly chosen as if it were a combination fashion show and popularity contest, because the majority of decision makers don't understand any of it. If you really want a better web development environment, you need a better runtime environment than current web browsers. -----Original Message----- From: askoh [mailto:askoh@askoh.com] Sent: Thursday, June 22, 2017 10:41 AM To: pharo-users@lists.pharo.org Subject: Re: [Pharo-users] PharoJS There seem to be some interesting work with SqueakJS by Craig Latta. https://thiscontext.com/ I hope Smalltalk of all dialects can get together to develop a killer web development environment. All the best, Aik-Siong Koh -- View this message in context: http://forum.world.st/Re-PharoJS-tp4952267p4952306.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On Thu, Jun 22, 2017 at 9:38 PM, andrew glynn <aglynn42@outlook.com> wrote:
I was wondering:
a) I'm assuming PharoJS would be much like Amber but inside the Pharo VM.
I'm only slightly familiar with PharoJS, but I believe its quite different... https://www.youtube.com/watch?v=XWd2mCQPZUU cheers -ben
Am 22.06.2017 um 17:53 schrieb Ben Coman <btc@openinworld.com>:
On Thu, Jun 22, 2017 at 9:38 PM, andrew glynn <aglynn42@outlook.com <mailto:aglynn42@outlook.com>> wrote: I was wondering:
a) I'm assuming PharoJS would be much like Amber but inside the Pharo VM.
I'm only slightly familiar with PharoJS, but I believe its quite different... https://www.youtube.com/watch?v=XWd2mCQPZUU <https://www.youtube.com/watch?v=XWd2mCQPZUU>
It is. Amber bootstraps a complete smalltalk system in javascript. Even the IDE is done that way so you have everything in the browser. It is a nice idea but suffers from the lack of development around the IDE. So the tools while being impressive are not pure fun to work with. That is the point PharoJS does better. It works with pharo connects to a web browser or node.js instance. It takes smalltalk code and transpiles them to javascript removing the need to have the complete smalltalk environment with the generated javascript. PharoJS uses a socket connection between the browser and the pharo image so you can inject and inspect things on the page. The code gets transpiled and transmitted whenver something changes. IMHO PharoJS lacks a definition of a browser DOM so you can develop nicer. But it is quite impressive though. Norbert
Norbert: I appreciate you explanation of Amber and PharoJS. I feel at a lost understanding the plethora of Smalltalk + Web frameworks. Is there a place where there is a pros and cons comparison of frameworks: Seaside, SqueakJS, PharoJS, Amber, Caffeine, VisualWorks Appex, Illiad, Aida, Teapot, etc? The sheer number of frameworks just makes it difficult for anyone to commit. It is terrifying. Can we discuss and consolidate the best features into one or two and kill the rest? All the best, Aik-Siong Koh -- View this message in context: http://forum.world.st/Re-PharoJS-tp4952267p4952361.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Askoh As soon as we will say something somene else will not be happy so I will comment on this. Now let us look at the trajectory: - Pharo is moving super fast - Daily improving - Large set of frameworks - Many companies SHARING bricks (Zinc, Mustache, Mustaside, ... and many many more). So pick up a topic you like or that you think you can make money and just come to have fun with us and doing so you will learn. This way you can also build your future. You see the actions that you do today and that open paths for tomorrow. THERE IS A ***HUGE*** difference between open community and source like Pharo and close source. Pharo is alive, kicking and it will continue. With git support Pharo will make a huge visibility credibility and community sharing step. We have a long list of super cool improvement in the pipe. Just join. Stef On Thu, Jun 22, 2017 at 8:01 PM, askoh <askoh@askoh.com> wrote:
Norbert:
I appreciate you explanation of Amber and PharoJS. I feel at a lost understanding the plethora of Smalltalk + Web frameworks. Is there a place where there is a pros and cons comparison of frameworks: Seaside, SqueakJS, PharoJS, Amber, Caffeine, VisualWorks Appex, Illiad, Aida, Teapot, etc?
The sheer number of frameworks just makes it difficult for anyone to commit. It is terrifying. Can we discuss and consolidate the best features into one or two and kill the rest?
All the best, Aik-Siong Koh
-- View this message in context: http://forum.world.st/Re-PharoJS-tp4952267p4952361.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Stef: I hear you. I am waiting for Pharo 64bit on Windows to start porting some of my work from VisualWorks 64bit. All the best, Aik-Siong -- View this message in context: http://forum.world.st/Re-PharoJS-tp4952267p4952642.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Excellent but it may take some time. You can probably use the 32 bit version to start porting. On Mon, Jun 26, 2017 at 10:16 PM, askoh <askoh@askoh.com> wrote:
Stef:
I hear you. I am waiting for Pharo 64bit on Windows to start porting some of my work from VisualWorks 64bit.
All the best, Aik-Siong
-- View this message in context: http://forum.world.st/Re-PharoJS-tp4952267p4952642.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I think that such diversity of tools is healthy and I wouldn't commit on killing anything. Projects would organically found ways of working together. Compared with other languages, I think that Pharo ecosystem is pretty cohesive. I would follow Steph's advice about choosing a theme/project and document your experience that help others to traverse such diversity instead of killing it. Cheers, Offray On 22/06/17 13:01, askoh wrote:
Norbert:
I appreciate you explanation of Amber and PharoJS. I feel at a lost understanding the plethora of Smalltalk + Web frameworks. Is there a place where there is a pros and cons comparison of frameworks: Seaside, SqueakJS, PharoJS, Amber, Caffeine, VisualWorks Appex, Illiad, Aida, Teapot, etc?
The sheer number of frameworks just makes it difficult for anyone to commit. It is terrifying. Can we discuss and consolidate the best features into one or two and kill the rest?
All the best, Aik-Siong Koh
-- View this message in context: http://forum.world.st/Re-PharoJS-tp4952267p4952361.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Just tried loading PharoJS with this snippet: Gofer it smalltalkhubUser: 'noury' project: 'PharoJS'; configuration; loadStable Loaded cleanly on a fresh 32-bit Pharo-50772 image. Ran almost half the tests during which it created/deleted tabs on my open Chromium browser repeatedly. Then the tests started a new instance of my default browser (which happens to be Midori) and here seemingly the web socket stuff didn't work so well, so I aborted the tests, but this I attribute to Midori not PharoJS. On a fresh 64-bit Pharo-60501 image, while loading PharoJSBridge-NouryBouraqadi-120, error encountered: SyntaxError: Variable or expression expected Object as yet unclassified makeInspect makeInspect. Variable or expression expected-><javascript: 'blah blah blah blah }'> Closing the error alert box brought up a debugger at RBParser>>parserError:. Any idea what to fix, anyone? Pierce
Hi Pierce 2017-06-25 13:07 GMT+02:00 Pierce Ng <pierce@samadhiweb.com>:
Just tried loading PharoJS with this snippet:
Gofer it smalltalkhubUser: 'noury' project: 'PharoJS'; configuration; loadStable
Loaded cleanly on a fresh 32-bit Pharo-50772 image. Ran almost half the tests during which it created/deleted tabs on my open Chromium browser repeatedly. Then the tests started a new instance of my default browser (which happens to be Midori) and here seemingly the web socket stuff didn't work so well, so I aborted the tests, but this I attribute to Midori not PharoJS.
On a fresh 64-bit Pharo-60501 image, while loading PharoJSBridge-NouryBouraqadi-120, error encountered:
SyntaxError: Variable or expression expected Object as yet unclassified makeInspect
makeInspect. Variable or expression expected-><javascript: 'blah blah blah blah }'>
I think the problem is the '.' dot after the selector name. This is not valid code for a method definition. I think this was an error on this parser to allow the code in the first place. Now we "fixed" the parser to indicate this as an error. Of course it would be good to replace / fix the method definition right on this debugger window, and move on with loading th code. But I am afraid this does not work. So, someone (with an older Pharo version where this code gets compiled) need to load the package and fix the method
Closing the error alert box brought up a debugger at RBParser>>parserError:.
Any idea what to fix, anyone?
Pierce
Offray: Diversity is good. But we can get too much of a good thing. For example, I see merit in VisualWorks Appex where Smalltalk and JavaScript are both managed within the System Browser. Additionally, changes to JavaScript made in the Internet browser are picked up by VisualWorks. Now, Appex allows live debugging in both front end and back end. And the combined code is maintained in VisualWorks. Craig Latta is doing something interesting with SqueakJS which is an optimized Smalltalk VM in JavaScript and HTML5. It is supposedly able to run Smalltalk fast inside the browser and access the JavaScript world freely. I think this route will benefit greatly from WebAssembly. Can PharoJS borrow some of these ideas? Pros and Cons? All the best, Aik-Siong -- View this message in context: http://forum.world.st/Re-PharoJS-tp4952267p4952643.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Sorry for being late with my reply. Comments at the bottom.
Am 22.06.2017 um 20:01 schrieb askoh <askoh@askoh.com>:
Norbert:
I appreciate you explanation of Amber and PharoJS. I feel at a lost understanding the plethora of Smalltalk + Web frameworks. Is there a place where there is a pros and cons comparison of frameworks: Seaside, SqueakJS, PharoJS, Amber, Caffeine, VisualWorks Appex, Illiad, Aida, Teapot, etc?
The sheer number of frameworks just makes it difficult for anyone to commit. It is terrifying. Can we discuss and consolidate the best features into one or two and kill the rest?
No, I don't think that would work. The web is a combination of resource linking and remote procedure calls. Web technology is really complex and is able to serve a huge amount of use cases. I don't think there can be one framework solving all the problems for all the use cases. So every framework focusses on a different aspect. I would turn your comment around. If you want to be successful in the web environment you need to learn about the fibres it is made of. As soon as you dive into I think all those frameworks will separate before your eyes quickly. Maybe it is good that you first come up with a problem you want to solve. With that specific information there are a lot of people here that can guide you. I'm being one of them. So just ask. Hope that helps, Norbert
Norbert: Great answer. Spoken like a wise man. I want a web app to fill paper forms - like income tax forms say. The forms are scanned or input into the app. The developer provides the logic connecting the input and output fields of the forms. The users then use the app to fill their own forms, print them or send them electronically. Can Smalltalk provide a superior solution? How? Thanks, Aik-Siong -- View this message in context: http://forum.world.st/Re-PharoJS-tp4952267p4952833.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
If one does Angular, one does it the Angular way, typescript and all. There is little point in doing PharoJS in Angular. Amber and Angular is also hard to do. Another issue with Amber is that it "compiles" to JS, and there are a ton of hard to read context handling code (try to debug that in a js debugger... ahah). For a project of mine, I can do it all Amber. Backend code is another story and frankly, a lot of *paying* customer are not caring about the latest "fad" in SPA/push/reactive/... A solid app that makes sense in streamlining a process is already heaven, and translates into cold cash. I am inheriting some code base where I see jQuery, React, Angular 1.x and some custom scripting all mixed up along with npm, bower, yarn, grunt things to do. WTF. So, customers asking for Angular. Ok, what kind of customers? Business owners? Or IT departments? I am done trying to sell Pharo to IT people. We are better off at upper echelons in the food chain. Where there is business value and speed of execution, and tangible results. I was explaining some reporting code to a Project Management Officer this afternoon. It is Pharo and Seaside. Well, he can actually make sense of what is in the code and can now come back with new ideas for value added features. Just put a halt at a strategic place and was able to inspect key business data interactively. Try that with any JS code. Phil On Thu, Jun 22, 2017 at 3:38 PM, andrew glynn <aglynn42@outlook.com> wrote:
I was wondering:
a) I'm assuming PharoJS would be much like Amber but inside the Pharo VM.
b) How much of the Amber codebase could be re-used for it?
I'm interested on the one hand, mainly due to the demand for Angular code in the browser (jQuery is great in Seaside, but many clients are looking for Angular recently), and my distaste for debugging JavaScript. Amber is ok but lacks the depth of tooling in Pharo, and isn't keeping up with the (constant) breaking changes in node and NPM. (Not that I blame the developers of Amber, it's a problem with the mindset of the developers in the JavaScript ecosystem - the way that Angular2 is almost completely different from Angular is an example of the lack of interest in the existing user base).
The problem I see is that PharoJS would have the same issues. As a result it would not only be a fair amount of work to accomplish, it would be far more to maintain. The Pharo ecosystem is based on an entirely opposite mindset to the JS ecosystem - a few very good frameworks and a reasonable number of very good libraries, resulting in highly maintainable code even on projects with only one or two developers. On top of that it would have to deal with the issues with JS itself that make writing decent tools virtually impossible.
Andrew Glynn
-----Original Message----- From: Pharo-users [mailto:pharo-users-bounces@lists.pharo.org] On Behalf Of pharo-users-request@lists.pharo.org Sent: Thursday, June 22, 2017 8:41 AM To: pharo-users@lists.pharo.org Subject: Pharo-users Digest, Vol 50, Issue 108
Send Pharo-users mailing list submissions to pharo-users@lists.pharo.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.pharo.org/mailman/listinfo/pharo-users_ lists.pharo.org or, via email, send a message with subject or body 'help' to pharo-users-request@lists.pharo.org
You can reach the person managing the list at pharo-users-owner@lists.pharo.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Pharo-users digest..."
participants (9)
-
andrew glynn -
askoh -
Ben Coman -
Nicolai Hess -
Norbert Hartl -
Offray Vladimir Luna Cárdenas -
phil@highoctane.be -
Pierce Ng -
Stephane Ducasse