Re: PharoJS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

andrewglynn
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:[hidden email]] On Behalf Of [hidden email]
Sent: Thursday, June 22, 2017 8:41 AM
To: [hidden email]
Subject: Pharo-users Digest, Vol 50, Issue 108

Send Pharo-users mailing list submissions to
        [hidden email]

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
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific than "Re: Contents of Pharo-users digest..."

Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

askoh
Administrator
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
Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

andrewglynn
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:[hidden email]]
Sent: Thursday, June 22, 2017 10:41 AM
To: [hidden email]
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.



Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

Ben Coman
In reply to this post by andrewglynn


On Thu, Jun 22, 2017 at 9:38 PM, andrew glynn <[hidden email]> 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...

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

NorbertHartl

Am 22.06.2017 um 17:53 schrieb Ben Coman <[hidden email]>:



On Thu, Jun 22, 2017 at 9:38 PM, andrew glynn <[hidden email]> 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...

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


Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

philippeback
In reply to this post by andrewglynn
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 <[hidden email]> 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:[hidden email]] On Behalf Of [hidden email]
Sent: Thursday, June 22, 2017 8:41 AM
To: [hidden email]
Subject: Pharo-users Digest, Vol 50, Issue 108

Send Pharo-users mailing list submissions to
        [hidden email]

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
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific than "Re: Contents of Pharo-users digest..."



Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

askoh
Administrator
In reply to this post by NorbertHartl
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
Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

Stephane Ducasse-3
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 <[hidden email]> 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.
>

Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

Offray Vladimir Luna Cárdenas-2
In reply to this post by askoh
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.
>
>



Reply | Threaded
Open this post in threaded view
|

Loading PharoJS Re: PharoJS

Pierce Ng-3
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


Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

askoh
Administrator
In reply to this post by Stephane Ducasse-3
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
Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

askoh
Administrator
In reply to this post by Offray Vladimir Luna Cárdenas-2
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
Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

Stephane Ducasse-3
In reply to this post by askoh
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 <[hidden email]> 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.
>

Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

Craig Latta
In reply to this post by andrewglynn

Hi--

     Aik-Siong writes:

> Craig Latta is doing something interesting[1] 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.

     I'm also making it run Pharo.


     thanks,

-C

[1] https://caffeine.js.org

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
[hidden email]
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)

Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

NorbertHartl
In reply to this post by askoh
Sorry for being late with my reply. Comments at the bottom.

> Am 22.06.2017 um 20:01 schrieb askoh <[hidden email]>:
>
> 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

Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

askoh
Administrator
In reply to this post by Craig Latta
Craig:

Great news for Pharo. I presume it will be after you are done with Squeak running on SqueakJS. Do you have a roadmap. How will WebAssembly help or not with project?

All the best,
Aik-Siong
Reply | Threaded
Open this post in threaded view
|

Re: PharoJS

askoh
Administrator
In reply to this post by NorbertHartl
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
Reply | Threaded
Open this post in threaded view
|

Re: Pharo on the SqueakJS virtual machine (was "PharoJS")

Craig Latta
In reply to this post by askoh

Hi Aik-Siong--

> Great news for Pharo. I presume it will be after you are done with
> Squeak running on SqueakJS.

     Now that I've gotten a release of Caffeine out[1], and written some
blog posts about it[2], I've turned my attention to Pharo in web
browsers. I also want Squeak and Pharo in web browsers to communicate
with their native counterparts, and with other Smalltalks. My goal is a
federation of live collaborating Smalltalk nodes on the net. I also have
SqueakJS controlling and reprogramming NodeJS instances.

> Do you have a roadmap?

     Bert and I worked on it a bit at ESUG 2016, and it was going
alright. Very conservatively, I expect to have it finished this year
sometime.

> How will WebAssembly help or not with project?

     I think WebAssembly will enable us to run Cog, with the usual web
security compromises. That's also something I'm interested in working
on. It may make the SqueakJS virtual machine obsolete.


     thanks,

-C

[1] https://caffeine.js.org
[2] https://thiscontext.com

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
[hidden email]
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)

Reply | Threaded
Open this post in threaded view
|

Re: Pharo on the SqueakJS virtual machine

Craig Latta

     Well, that didn't take as long as I thought. :)  Probably due to
progress Bert made since we looked at it at ESUG 2016.

     For more details, see https://tinyurl.com/y727fz4a
(thiscontext.com). Let the bugfixing begin. :)


     thanks again,

-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
[hidden email]
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)

Reply | Threaded
Open this post in threaded view
|

Re: Pharo on the SqueakJS virtual machine

Pavel Krivanek-3
WOW!!!

Thank you all very much for this effort.

-- Pavel



2017-06-29 18:56 GMT+02:00 Craig Latta <[hidden email]>:

     Well, that didn't take as long as I thought. :)  Probably due to
progress Bert made since we looked at it at ESUG 2016.

     For more details, see https://tinyurl.com/y727fz4a
(thiscontext.com). Let the bugfixing begin. :)


     thanks again,

-C

--
Craig Latta
Black Page Digital
Amsterdam :: San Francisco
[hidden email]
<a href="tel:%2B31%20%20%206%202757%207177" value="+31627577177">+31 6 2757 7177 (SMS ok)
<a href="tel:%2B%201%20415%20%20287%203547" value="+14152873547">+ 1 415 287 3547 (no SMS)


12