Hi Phil,

if there is something I would like to see our Pharo ecosystem and ST in general 
moving 
towards is to such a "multilanguage"/"multisourcecode"/"flexible ressources" 
kind of
thing. Even when this could not be a short term goal I would like to see this
in the long term. 

Regarding integration of different resources
============================================
 1. we need a better text editor and not only doing Smalltalk completion/styling
    but have this pluggable as well 
         => if I'm not mistaken this is what TxText project partly is caring 
about

    If I remember correctly in VW there were browser plugins to the browsers 
code
    pane allowing you for instance to directly edit XML as a tree and styling
    while the XML text it is stored in a method, etc.

    Similar to Eclipse where depending on the content type one or more different
    pluggable editors could be used.
 
 2. it should be possible to store and save different code/text formats as 
source for methods
         => you can already do it similar to Seaside by just returning Strings
         => maybe a pragma could be used  
                foo
                  <language: #JavaScript>
                  ^'alert("hi");'
         => the selector could/should be decoupled from the method body to be 
more flexible,
            not only in editing 
            (interesting idea and already in Moose, see Tudors talk from ESUG 
2014
             
https://www.youtube.com/watch?v=LKVPJU3W5Ys&list=PLJ5nSnWzQXi_6yyRLsMMBqG8YlwfhvB0X&index=94)
             especially at the beginning of video 3/3.

 3. we should think about where the source code (Smalltalk or not) is stored, 
it should be
    more flexible as well

         => there already was a discussion of integrating the source file into 
the image
            Pharo4.0 but I would additionally also like to integrate the other 
way around (why not
            edit an external file (CSS, JavaScript, XML, ...) linked as a 
method in the system 
            with the internal Smalltalk tools)
            So one could imagine a method like this where the string is stored 
in an external file.

                  zincMustacheTemplate
                     <language: 'HTML' external: 'index.html'>
                     
^'<html><body><head><title>{{AppTitle}}</title></head></body>'
             
Many other ideas come to mind.

Regarding the integration of multiple languages:
================================================
As we all know we have our image and VM provides a dynamic object system and 
Smalltalk is only a language that is built into it. So can be others and we 
would
open up more.

There are many examples of this already in the Smalltalk world:
 - VisualAge for Java was implemented and running inside of VisualAge for 
Smalltalk
   using all the tools
 - running Java inside of Smalltalk/X 
 - C Source code of the VM can edited and changed in Smalltalk/X tools 
 - JavaScript on top of VW as seen on ESUG 2014, 
https://www.youtube.com/watch?v=ZGAMCz62OM0 
 - Helvetia (http://scg.unibe.ch/research/helvetia)

Helvetia could be a starting point for Pharo here, also parser frameworks like 
PetitParser, ...
Many things are already possible from the meta side.

Maybe one could port the MIT licensed JavaScript implementation from VW to Pharo
and try out if our infrastructure (Compiler, Parser, source code editing) could
really be made pluggable. Would open up Pharo also to JavaScript developers and
maybe realign better with Amber. 

So many things we could do to reduce the friction between Smalltalk and the 
outside world
... but lots of work if done right.

Bye
T. 








Reply via email to