Agile visualization book as an interactive grafoscopio document

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

Agile visualization book as an interactive grafoscopio document

Offray
Hi all,

This mail will have two parts, a small first one where I share my
advances and little context on the project and the second one, with
details where I made specific questions regarding concepts and code and
how to make progress. I hope to be fluid and proper balanced and
interesting enough to get feedback soon.

Context
=======

I have made a small video at [1] showing my progress on Grafoscopio[2],
a tool for the creation of interactive notebooks for open/citizen/garage
science and research (for a better view I recommend to see the video in
full screen mode).

As you can see, I have a complete outline of the Agile Visualization
book stored as a single "ston document" [3], that can be exported to
pandoc's markdown [4] and from there to LaTeX, pdf, html, doc, etc.
It can contain special tagged nodes and the view and behaviour of them
change accordingly to the tag. In the video a node tagged as code is
showed as an interactive playground where you can execute an explore the
objects deeper.

My problem is that this kind of special nodes are not saved, as happens
with default nodes and the reason is that the special view (which is a
sub-browser) is not wired properly to the rest of the browser and that's
why I get a nill value after revisiting the code node in the video.


[1] https://archive.org/details/gfcp-alpha-code-exec-but-non-saving.mp4

[2]
http://mutabit.com/offray/static/blog/output/posts/grafoscopio-idea-and-initial-progress.html

[3]
http://mutabit.com/deltas/repos.fossil/grafoscopio/doc/tip/Docs/En/Books/AgileVisualization/agile-visualization.ston

[4]
http://mutabit.com/deltas/repos.fossil/grafoscopio/doc/tip/Docs/En/Books/AgileVisualization/agile-visualization.markdown


Details
=======

The logic of what I'm doing is something like this:

i. When a node in tree at the left is selected, it shows the contents of
the selected tree.

ii. If something changes in the node content at the right, the changes
are automatically updated.

iii. If a node is tagged in a special way, a custom browser is called.

The code that select which sub-browser to show for a particular tagged
node is something like this:

==[a]==============================
UI>>buildBrowserNamed: aName
"Main method for building the interface for trees and its nodes. The
name of the browser corresponds to the name of the file
where tree is stored (or is named 'draft.ston' by default)"

"... snip"

(browser transmit)
    from: #tree port: #selection;
    to: #nodeBody;
        when: [:selection | selection notNil];
    andShow: [ :a :node |
                self bodyIn: a for: node.
                self body2ForCodeIn: a for: node.
                self bodyForTransmediaIn: a for: node ].
"... snip"

"Creating a self updatable body pane"
(browser transmit)
    from: #tree port: #selection;
    to: #nodeBody;
        when: [:selection | selection notNil];
    andShow: [ :a :node |
                self bodyIn: a for: node.
                self body2ForCodeIn: a for: node.
                self bodyForTransmediaIn: a for: node ].
(browser transmit )
         from: #tree port: #selection;
         from: #nodeBody port: #text;
         when: [:node :text | text notNil & node notNil];
         to: #nodeBody port: #neverland;
         transformed: [:node :text | node body: text asString].
(browser transmit)
         from: #tree;
     to: #nodeHeader;
     andShow: [ :h | self headerOn: h ].
(browser transmit )
         from: #tree port: #selection;
         from: #nodeHeader port: #text;
         to: #nodeHeader port: #neverland1;
         when: [:node :text | text notNil & node notNil];
         transformed: [:node :text | node header: text asString]

===================================

The last part of the code is responsible for updating the tree contents
automatically with

The "body2ForCodeIn: for:" [b] is the responsible for showing the
playground by calling a custom browser that is called
"panelAsCodeFor:"[c]. Here is their code:


==[b]==============================
UI>> body2ForCodeIn: constructor for: aNode
        "Shows the body of a selected node as executable code."

        aNode tags = 'código'
                ifFalse: [ ^self ]
                ifTrue: [constructor custom: (self panelAsCodeFor: aNode)].
===================================


==[c]==============================
panelAsCodeFor: aNode
        "Shows an interactive playground for Smalltalk code in a node body"

        browser := GLMTabulator new.
        browser title: 'Código'.
        browser column: #code.
        browser transmit
                to: #code;
                transformed: [ GTPlayPage new content: aNode body ];
                andShow: [ :a | a custom: GTPlayground new ].
        browser sendToOutside: #nodeBody from: #code -> #text.
        ^ browser.
===================================

So, wiring by "sendToOutside: from:" is not working and I don't know how
to tell my code browser to autosave its contents as part of the node
body where they belong.

Any help with this is appreciated.

Cheers,

Offray

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Agile visualization book as an interactive grafoscopio document

abergel
Hi Offray,

If I correctly understand your question you want to auto save something in your glamour script. I do not know since I am not expert in Glamour. But I think glamour emit some event and you can have some callbacks for this. I saw this while browsing the glamour examples.

Cheers,
Alexandre



> Le 9 févr. 2015 à 18:14, Offray Vladimir Luna Cárdenas <[hidden email]> a écrit :
>
> Hi all,
>
> This mail will have two parts, a small first one where I share my advances and little context on the project and the second one, with details where I made specific questions regarding concepts and code and how to make progress. I hope to be fluid and proper balanced and interesting enough to get feedback soon.
>
> Context
> =======
>
> I have made a small video at [1] showing my progress on Grafoscopio[2], a tool for the creation of interactive notebooks for open/citizen/garage science and research (for a better view I recommend to see the video in full screen mode).
>
> As you can see, I have a complete outline of the Agile Visualization book stored as a single "ston document" [3], that can be exported to pandoc's markdown [4] and from there to LaTeX, pdf, html, doc, etc.
> It can contain special tagged nodes and the view and behaviour of them change accordingly to the tag. In the video a node tagged as code is showed as an interactive playground where you can execute an explore the objects deeper.
>
> My problem is that this kind of special nodes are not saved, as happens with default nodes and the reason is that the special view (which is a sub-browser) is not wired properly to the rest of the browser and that's why I get a nill value after revisiting the code node in the video.
>
>
> [1] https://archive.org/details/gfcp-alpha-code-exec-but-non-saving.mp4
>
> [2] http://mutabit.com/offray/static/blog/output/posts/grafoscopio-idea-and-initial-progress.html
>
> [3] http://mutabit.com/deltas/repos.fossil/grafoscopio/doc/tip/Docs/En/Books/AgileVisualization/agile-visualization.ston
>
> [4] http://mutabit.com/deltas/repos.fossil/grafoscopio/doc/tip/Docs/En/Books/AgileVisualization/agile-visualization.markdown
>
>
> Details
> =======
>
> The logic of what I'm doing is something like this:
>
> i. When a node in tree at the left is selected, it shows the contents of the selected tree.
>
> ii. If something changes in the node content at the right, the changes are automatically updated.
>
> iii. If a node is tagged in a special way, a custom browser is called.
>
> The code that select which sub-browser to show for a particular tagged node is something like this:
>
> ==[a]==============================
> UI>>buildBrowserNamed: aName
> "Main method for building the interface for trees and its nodes. The name of the browser corresponds to the name of the file
> where tree is stored (or is named 'draft.ston' by default)"
>
> "... snip"
>
> (browser transmit)
>   from: #tree port: #selection;
>   to: #nodeBody;
>    when: [:selection | selection notNil];
>   andShow: [ :a :node |
>        self bodyIn: a for: node.
>        self body2ForCodeIn: a for: node.
>        self bodyForTransmediaIn: a for: node ].
> "... snip"
>
> "Creating a self updatable body pane"
> (browser transmit)
>   from: #tree port: #selection;
>   to: #nodeBody;
>    when: [:selection | selection notNil];
>   andShow: [ :a :node |
>        self bodyIn: a for: node.
>        self body2ForCodeIn: a for: node.
>        self bodyForTransmediaIn: a for: node ].
> (browser transmit )
>     from: #tree port: #selection;
>     from: #nodeBody port: #text;
>     when: [:node :text | text notNil & node notNil];
>     to: #nodeBody port: #neverland;
>     transformed: [:node :text | node body: text asString].
> (browser transmit)
>     from: #tree;
>    to: #nodeHeader;
>    andShow: [ :h | self headerOn: h ].
> (browser transmit )
>     from: #tree port: #selection;
>     from: #nodeHeader port: #text;
>     to: #nodeHeader port: #neverland1;
>     when: [:node :text | text notNil & node notNil];
>     transformed: [:node :text | node header: text asString]
>
> ===================================
>
> The last part of the code is responsible for updating the tree contents automatically with
>
> The "body2ForCodeIn: for:" [b] is the responsible for showing the playground by calling a custom browser that is called "panelAsCodeFor:"[c]. Here is their code:
>
>
> ==[b]==============================
> UI>> body2ForCodeIn: constructor for: aNode
>    "Shows the body of a selected node as executable code."
>
>    aNode tags = 'código'
>        ifFalse: [ ^self ]
>        ifTrue: [constructor custom: (self panelAsCodeFor: aNode)].
> ===================================
>
>
> ==[c]==============================
> panelAsCodeFor: aNode
>    "Shows an interactive playground for Smalltalk code in a node body"
>
>    browser := GLMTabulator new.
>    browser title: 'Código'.
>    browser column: #code.
>    browser transmit
>        to: #code;
>        transformed: [ GTPlayPage new content: aNode body ];
>        andShow: [ :a | a custom: GTPlayground new ].
>    browser sendToOutside: #nodeBody from: #code -> #text.
>    ^ browser.
> ===================================
>
> So, wiring by "sendToOutside: from:" is not working and I don't know how to tell my code browser to autosave its contents as part of the node body where they belong.
>
> Any help with this is appreciated.
>
> Cheers,
>
> Offray
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Agile visualization book as an interactive grafoscopio document

Nicolai Hess
In reply to this post by Offray
Hi Offray,

2015-02-09 22:14 GMT+01:00 Offray Vladimir Luna Cárdenas <[hidden email]>:
Hi all,
....
So, wiring by "sendToOutside: from:" is not working and I don't know how to tell my code browser to autosave its contents as part of the node body where they belong.

Any help with this is appreciated.

Cheers,

Offray


here is a small example,
it uses a memory file system for storing its structure and data.
on the left pane, you can select folder and files. And a file will open
a code pane on the right side. On this code pane you can edit the
text and accept the changes with alt+s (or the icon on the upper right corner).
The changed text is saved in the memory file.
I use the memory file system just as an example, because I don't have another
data structure. But this should work with your GrafoscopioNode too.

Does it help?


Nicolai



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Agile visualization book as an interactive grafoscopio document

Offray
Hi Nicolai,

Thanks for your quick answer and yes, your example helps me. In fact it
lets me to focus on what is important without so many distractions of
Grafoscopio. So at [1] I have a browser with a inner browser that shows
playgrounds that execute code. The inner browser is not properly wired
to the external one, so, if I change the contents of the inner browser,
putting "41 + 2" instead of "41 + 1" they don't become automatically
updated in the data dictionary. What I want is that any time I made a
change in the inner browser, the data gets updated in the data
dictionary where the browser is taking its values.

[1] http://ws.stfx.eu/K8ADPDRFQE29

I hope to made myself clearer, and that the code helps to express better
my issue, but If I need to explain better just ask.

Thanks again,

Offray

El 10/02/15 a las 08:59, Nicolai Hess escribió:

> Hi Offray,
>
> 2015-02-09 22:14 GMT+01:00 Offray Vladimir Luna Cárdenas <[hidden email]
> <mailto:[hidden email]>>:
>
>      Hi all,
>      ....
>      So, wiring by "sendToOutside: from:" is not working and I don't know how to
>      tell my code browser to autosave its contents as part of the node body where
>      they belong.
>
>      Any help with this is appreciated.
>
>      Cheers,
>
>      Offray
>
>
> here is a small example,
>
> http://ws.stfx.eu/JBIBBXA0EF3A
>
> it uses a memory file system for storing its structure and data.
> on the left pane, you can select folder and files. And a file will open
> a code pane on the right side. On this code pane you can edit the
> text and accept the changes with alt+s (or the icon on the upper right corner).
> The changed text is saved in the memory file.
> I use the memory file system just as an example, because I don't have another
> data structure. But this should work with your GrafoscopioNode too.
>
> Does it help?
>
>
> Nicolai
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Agile visualization book as an interactive grafoscopio document

Offray
Sorry the url of the minimal example I referring is:

http://ws.stfx.eu/QFOJ9MDRH7GW

Cheers,

Offray


El 10/02/15 a las 20:05, Offray Vladimir Luna Cárdenas escribió:

> Hi Nicolai,
>
> Thanks for your quick answer and yes, your example helps me. In fact it
> lets me to focus on what is important without so many distractions of
> Grafoscopio. So at [1] I have a browser with a inner browser that shows
> playgrounds that execute code. The inner browser is not properly wired
> to the external one, so, if I change the contents of the inner browser,
> putting "41 + 2" instead of "41 + 1" they don't become automatically
> updated in the data dictionary. What I want is that any time I made a
> change in the inner browser, the data gets updated in the data
> dictionary where the browser is taking its values.
>
> [1] http://ws.stfx.eu/K8ADPDRFQE29
>
> I hope to made myself clearer, and that the code helps to express better
> my issue, but If I need to explain better just ask.
>
> Thanks again,
>
> Offray
>
> El 10/02/15 a las 08:59, Nicolai Hess escribió:
>> Hi Offray,
>>
>> 2015-02-09 22:14 GMT+01:00 Offray Vladimir Luna Cárdenas
>> <[hidden email]
>> <mailto:[hidden email]>>:
>>
>>      Hi all,
>>      ....
>>      So, wiring by "sendToOutside: from:" is not working and I don't
>> know how to
>>      tell my code browser to autosave its contents as part of the node
>> body where
>>      they belong.
>>
>>      Any help with this is appreciated.
>>
>>      Cheers,
>>
>>      Offray
>>
>>
>> here is a small example,
>>
>> http://ws.stfx.eu/JBIBBXA0EF3A
>>
>> it uses a memory file system for storing its structure and data.
>> on the left pane, you can select folder and files. And a file will open
>> a code pane on the right side. On this code pane you can edit the
>> text and accept the changes with alt+s (or the icon on the upper right
>> corner).
>> The changed text is saved in the memory file.
>> I use the memory file system just as an example, because I don't have
>> another
>> data structure. But this should work with your GrafoscopioNode too.
>>
>> Does it help?
>>
>>
>> Nicolai
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Agile visualization book as an interactive grafoscopio document

Nicolai Hess
Of course, you can directly use the PlaygroundPage instead of the strings in your dictionary:

http://ws.stfx.eu/9AVICHRG4UPA

That way, every update on the playground content automatically updates the (playgroundpage)-content in you dictionary.

But I don't think it is a good idea to use the playground for this, because every time you select a item that
opens the playground, it creates a *new* cache file - every time.

I would prefer a GLMSmalltalkCodePresentation.






2015-02-11 4:21 GMT+01:00 Offray Vladimir Luna Cárdenas <[hidden email]>:
Sorry the url of the minimal example I referring is:

http://ws.stfx.eu/QFOJ9MDRH7GW

Cheers,

Offray


El 10/02/15 a las 20:05, Offray Vladimir Luna Cárdenas escribió:

Hi Nicolai,

Thanks for your quick answer and yes, your example helps me. In fact it
lets me to focus on what is important without so many distractions of
Grafoscopio. So at [1] I have a browser with a inner browser that shows
playgrounds that execute code. The inner browser is not properly wired
to the external one, so, if I change the contents of the inner browser,
putting "41 + 2" instead of "41 + 1" they don't become automatically
updated in the data dictionary. What I want is that any time I made a
change in the inner browser, the data gets updated in the data
dictionary where the browser is taking its values.

[1] http://ws.stfx.eu/K8ADPDRFQE29

I hope to made myself clearer, and that the code helps to express better
my issue, but If I need to explain better just ask.

Thanks again,

Offray

El 10/02/15 a las 08:59, Nicolai Hess escribió:
Hi Offray,

2015-02-09 22:14 GMT+01:00 Offray Vladimir Luna Cárdenas
<[hidden email]
<mailto:[hidden email]>>:

     Hi all,
     ....
     So, wiring by "sendToOutside: from:" is not working and I don't
know how to
     tell my code browser to autosave its contents as part of the node
body where
     they belong.

     Any help with this is appreciated.

     Cheers,

     Offray


here is a small example,

http://ws.stfx.eu/JBIBBXA0EF3A

it uses a memory file system for storing its structure and data.
on the left pane, you can select folder and files. And a file will open
a code pane on the right side. On this code pane you can edit the
text and accept the changes with alt+s (or the icon on the upper right
corner).
The changed text is saved in the memory file.
I use the memory file system just as an example, because I don't have
another
data structure. But this should work with your GrafoscopioNode too.

Does it help?


Nicolai




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Agile visualization book as an interactive grafoscopio document

Offray
Thanks a lot Nicolai,

It works like a charm! You can see the video here:

https://archive.org/details/gfcp-alpha-saving-playgrounds-1.mp4

It shows how I can save and execute the first three examples of the
Agile Visualization book and the values of any change are automatically
saved (in the video I change the amount of nodes in the first
visualization and they are stored without any extra intervention). No
more nil values or need to copy and paste to execute the code.

About automatic creation of files in the playground cache, I can't see
any of them with the same hour I have visited/executed them. I will make
more test tomorrow, but seems working fine.

I still have problems understanding wiring of sub-browsers with
transmissions and ports to auto-save changes and I think that the
current way of storing playgrounds on STON offers to much detail about
them. I remember having a similar problem when I stored all the data of
the node content and I solved it by using "asString" to left out all
details about fonts and other stuff.
May be a similar approach can be used for content in playground pages
without loosing the possibility to embed and auto-update them.

This is a really good advance and your suggestion makes this project to
reach a usable state. Now I can have all the Agile Visualization book in
a single executable document and it can be exported to different formats
(html, pdf, latex, etc). The next steps are a better integration with
pandoc to produce pdf and html easier from grafoscopio, instead of the
current manual tuning and exit to command shell. I will share the
advances with the community.

Thanks again,

Offray

El 11/02/15 a las 03:44, Nicolai Hess escribió:

> Of course, you can directly use the PlaygroundPage instead of the strings in
> your dictionary:
>
> http://ws.stfx.eu/9AVICHRG4UPA
>
> That way, every update on the playground content automatically updates the
> (playgroundpage)-content in you dictionary.
>
> But I don't think it is a good idea to use the playground for this, because
> every time you select a item that
> opens the playground, it creates a *new* cache file - every time.
>
> I would prefer a GLMSmalltalkCodePresentation.
>
>
>
>
>
>
> 2015-02-11 4:21 GMT+01:00 Offray Vladimir Luna Cárdenas <[hidden email]
> <mailto:[hidden email]>>:
>
>      Sorry the url of the minimal example I referring is:
>
>      http://ws.stfx.eu/QFOJ9MDRH7GW
>
>      Cheers,
>
>      Offray
>
>
>      El 10/02/15 a las 20:05, Offray Vladimir Luna Cárdenas escribió:
>
>          Hi Nicolai,
>
>          Thanks for your quick answer and yes, your example helps me. In fact it
>          lets me to focus on what is important without so many distractions of
>          Grafoscopio. So at [1] I have a browser with a inner browser that shows
>          playgrounds that execute code. The inner browser is not properly wired
>          to the external one, so, if I change the contents of the inner browser,
>          putting "41 + 2" instead of "41 + 1" they don't become automatically
>          updated in the data dictionary. What I want is that any time I made a
>          change in the inner browser, the data gets updated in the data
>          dictionary where the browser is taking its values.
>
>          [1] http://ws.stfx.eu/K8ADPDRFQE29
>
>          I hope to made myself clearer, and that the code helps to express better
>          my issue, but If I need to explain better just ask.
>
>          Thanks again,
>
>          Offray
>
>          El 10/02/15 a las 08:59, Nicolai Hess escribió:
>
>              Hi Offray,
>
>              2015-02-09 22:14 GMT+01:00 Offray Vladimir Luna Cárdenas
>              <[hidden email] <mailto:[hidden email]>
>              <mailto:[hidden email] <mailto:[hidden email]>>>:
>
>                    Hi all,
>                    ....
>                    So, wiring by "sendToOutside: from:" is not working and I don't
>              know how to
>                    tell my code browser to autosave its contents as part of the node
>              body where
>                    they belong.
>
>                    Any help with this is appreciated.
>
>                    Cheers,
>
>                    Offray
>
>
>              here is a small example,
>
>              http://ws.stfx.eu/JBIBBXA0EF3A
>
>              it uses a memory file system for storing its structure and data.
>              on the left pane, you can select folder and files. And a file will open
>              a code pane on the right side. On this code pane you can edit the
>              text and accept the changes with alt+s (or the icon on the upper right
>              corner).
>              The changed text is saved in the memory file.
>              I use the memory file system just as an example, because I don't have
>              another
>              data structure. But this should work with your GrafoscopioNode too.
>
>              Does it help?
>
>
>              Nicolai
>
>
>
>
>              _________________________________________________
>              Moose-dev mailing list
>              [hidden email] <mailto:[hidden email]>
>              https://www.iam.unibe.ch/__mailman/listinfo/moose-dev
>              <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>
>
>
>
>          _________________________________________________
>          Moose-dev mailing list
>          [hidden email] <mailto:[hidden email]>
>          https://www.iam.unibe.ch/__mailman/listinfo/moose-dev
>          <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>
>
>
>
>      _________________________________________________
>      Moose-dev mailing list
>      [hidden email] <mailto:[hidden email]>
>      https://www.iam.unibe.ch/__mailman/listinfo/moose-dev
>      <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Agile visualization book as an interactive grafoscopio document

Nicolai Hess


2015-02-12 4:33 GMT+01:00 Offray Vladimir Luna Cárdenas <[hidden email]>:
Thanks a lot Nicolai,

It works like a charm! You can see the video here:

https://archive.org/details/gfcp-alpha-saving-playgrounds-1.mp4


Great!
 

About automatic creation of files in the playground cache, I can't see any of them with the same hour I have visited/executed them. I will make more test tomorrow, but seems working fine.


Ah yes, now that they are a part of the data structure, they are only created once.
 

This is a really good advance and your suggestion makes this project to reach a usable state. Now I can have all the Agile Visualization book in a single executable document and it can be exported to different formats (html, pdf, latex, etc). The next steps are a better integration with pandoc to produce pdf and html easier from grafoscopio, instead of the current manual tuning and exit to command shell. I will share the advances with the community.

I am looking forward to see more. It is an interesting project.

And of course, the feedback, the questions and all the problems hearing, from someone who was not involved in the Glamour Toolkit,
can help the Glamour project.

 

Thanks again,

Offray

El 11/02/15 a las 03:44, Nicolai Hess escribió:
Of course, you can directly use the PlaygroundPage instead of the strings in
your dictionary:

http://ws.stfx.eu/9AVICHRG4UPA

That way, every update on the playground content automatically updates the
(playgroundpage)-content in you dictionary.

But I don't think it is a good idea to use the playground for this, because
every time you select a item that
opens the playground, it creates a *new* cache file - every time.

I would prefer a GLMSmalltalkCodePresentation.






2015-02-11 4:21 GMT+01:00 Offray Vladimir Luna Cárdenas <[hidden email]
<mailto:[hidden email]>>:

     Sorry the url of the minimal example I referring is:

     http://ws.stfx.eu/QFOJ9MDRH7GW

     Cheers,

     Offray


     El 10/02/15 a las 20:05, Offray Vladimir Luna Cárdenas escribió:

         Hi Nicolai,

         Thanks for your quick answer and yes, your example helps me. In fact it
         lets me to focus on what is important without so many distractions of
         Grafoscopio. So at [1] I have a browser with a inner browser that shows
         playgrounds that execute code. The inner browser is not properly wired
         to the external one, so, if I change the contents of the inner browser,
         putting "41 + 2" instead of "41 + 1" they don't become automatically
         updated in the data dictionary. What I want is that any time I made a
         change in the inner browser, the data gets updated in the data
         dictionary where the browser is taking its values.

         [1] http://ws.stfx.eu/K8ADPDRFQE29

         I hope to made myself clearer, and that the code helps to express better
         my issue, but If I need to explain better just ask.

         Thanks again,

         Offray

         El 10/02/15 a las 08:59, Nicolai Hess escribió:

             Hi Offray,

             2015-02-09 22:14 GMT+01:00 Offray Vladimir Luna Cárdenas
             <[hidden email] <mailto:[hidden email]>
             <mailto:[hidden email] <mailto:[hidden email]>>>:

                   Hi all,
                   ....
                   So, wiring by "sendToOutside: from:" is not working and I don't
             know how to
                   tell my code browser to autosave its contents as part of the node
             body where
                   they belong.

                   Any help with this is appreciated.

                   Cheers,

                   Offray


             here is a small example,

             http://ws.stfx.eu/JBIBBXA0EF3A

             it uses a memory file system for storing its structure and data.
             on the left pane, you can select folder and files. And a file will open
             a code pane on the right side. On this code pane you can edit the
             text and accept the changes with alt+s (or the icon on the upper right
             corner).
             The changed text is saved in the memory file.
             I use the memory file system just as an example, because I don't have
             another
             data structure. But this should work with your GrafoscopioNode too.

             Does it help?


             Nicolai




             _________________________________________________
             Moose-dev mailing list
             [hidden email] <mailto:[hidden email]>
             https://www.iam.unibe.ch/__mailman/listinfo/moose-dev
             <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>



         _________________________________________________
         Moose-dev mailing list
         [hidden email] <mailto:[hidden email]>
         https://www.iam.unibe.ch/__mailman/listinfo/moose-dev
         <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>



     _________________________________________________
     Moose-dev mailing list
     [hidden email] <mailto:[hidden email]>
     https://www.iam.unibe.ch/__mailman/listinfo/moose-dev
     <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Agile visualization book as an interactive grafoscopio document

abergel
In reply to this post by Offray
Hi Offray!!

This is impressive! How did you get the text by the way? This is indeed very useful!

On a side note. I have not yet decided the license for the book. Having it on lulu is indeed appealing. However, it is likely that we go via a specialized publisher.  Morgan Kaufman or Apress maybe. Looks like to be better in order to go beyond the Pharo community.

Cheers
Alexandre



> Le 12 févr. 2015 à 00:33, Offray Vladimir Luna Cárdenas <[hidden email]> a écrit :
>
> Thanks a lot Nicolai,
>
> It works like a charm! You can see the video here:
>
> https://archive.org/details/gfcp-alpha-saving-playgrounds-1.mp4
>
> It shows how I can save and execute the first three examples of the Agile Visualization book and the values of any change are automatically saved (in the video I change the amount of nodes in the first visualization and they are stored without any extra intervention). No more nil values or need to copy and paste to execute the code.
>
> About automatic creation of files in the playground cache, I can't see any of them with the same hour I have visited/executed them. I will make more test tomorrow, but seems working fine.
>
> I still have problems understanding wiring of sub-browsers with transmissions and ports to auto-save changes and I think that the current way of storing playgrounds on STON offers to much detail about them. I remember having a similar problem when I stored all the data of the node content and I solved it by using "asString" to left out all details about fonts and other stuff.
> May be a similar approach can be used for content in playground pages without loosing the possibility to embed and auto-update them.
>
> This is a really good advance and your suggestion makes this project to reach a usable state. Now I can have all the Agile Visualization book in a single executable document and it can be exported to different formats (html, pdf, latex, etc). The next steps are a better integration with pandoc to produce pdf and html easier from grafoscopio, instead of the current manual tuning and exit to command shell. I will share the advances with the community.
>
> Thanks again,
>
> Offray
>
>> El 11/02/15 a las 03:44, Nicolai Hess escribió:
>> Of course, you can directly use the PlaygroundPage instead of the strings in
>> your dictionary:
>>
>> http://ws.stfx.eu/9AVICHRG4UPA
>>
>> That way, every update on the playground content automatically updates the
>> (playgroundpage)-content in you dictionary.
>>
>> But I don't think it is a good idea to use the playground for this, because
>> every time you select a item that
>> opens the playground, it creates a *new* cache file - every time.
>>
>> I would prefer a GLMSmalltalkCodePresentation.
>>
>>
>>
>>
>>
>>
>> 2015-02-11 4:21 GMT+01:00 Offray Vladimir Luna Cárdenas <[hidden email]
>> <mailto:[hidden email]>>:
>>
>>     Sorry the url of the minimal example I referring is:
>>
>>     http://ws.stfx.eu/QFOJ9MDRH7GW
>>
>>     Cheers,
>>
>>     Offray
>>
>>
>>     El 10/02/15 a las 20:05, Offray Vladimir Luna Cárdenas escribió:
>>
>>         Hi Nicolai,
>>
>>         Thanks for your quick answer and yes, your example helps me. In fact it
>>         lets me to focus on what is important without so many distractions of
>>         Grafoscopio. So at [1] I have a browser with a inner browser that shows
>>         playgrounds that execute code. The inner browser is not properly wired
>>         to the external one, so, if I change the contents of the inner browser,
>>         putting "41 + 2" instead of "41 + 1" they don't become automatically
>>         updated in the data dictionary. What I want is that any time I made a
>>         change in the inner browser, the data gets updated in the data
>>         dictionary where the browser is taking its values.
>>
>>         [1] http://ws.stfx.eu/K8ADPDRFQE29
>>
>>         I hope to made myself clearer, and that the code helps to express better
>>         my issue, but If I need to explain better just ask.
>>
>>         Thanks again,
>>
>>         Offray
>>
>>         El 10/02/15 a las 08:59, Nicolai Hess escribió:
>>
>>             Hi Offray,
>>
>>             2015-02-09 22:14 GMT+01:00 Offray Vladimir Luna Cárdenas
>>             <[hidden email] <mailto:[hidden email]>
>>             <mailto:[hidden email] <mailto:[hidden email]>>>:
>>
>>                   Hi all,
>>                   ....
>>                   So, wiring by "sendToOutside: from:" is not working and I don't
>>             know how to
>>                   tell my code browser to autosave its contents as part of the node
>>             body where
>>                   they belong.
>>
>>                   Any help with this is appreciated.
>>
>>                   Cheers,
>>
>>                   Offray
>>
>>
>>             here is a small example,
>>
>>             http://ws.stfx.eu/JBIBBXA0EF3A
>>
>>             it uses a memory file system for storing its structure and data.
>>             on the left pane, you can select folder and files. And a file will open
>>             a code pane on the right side. On this code pane you can edit the
>>             text and accept the changes with alt+s (or the icon on the upper right
>>             corner).
>>             The changed text is saved in the memory file.
>>             I use the memory file system just as an example, because I don't have
>>             another
>>             data structure. But this should work with your GrafoscopioNode too.
>>
>>             Does it help?
>>
>>
>>             Nicolai
>>
>>
>>
>>
>>             _________________________________________________
>>             Moose-dev mailing list
>>             [hidden email] <mailto:[hidden email]>
>>             https://www.iam.unibe.ch/__mailman/listinfo/moose-dev
>>             <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>
>>
>>
>>
>>         _________________________________________________
>>         Moose-dev mailing list
>>         [hidden email] <mailto:[hidden email]>
>>         https://www.iam.unibe.ch/__mailman/listinfo/moose-dev
>>         <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>
>>
>>
>>
>>     _________________________________________________
>>     Moose-dev mailing list
>>     [hidden email] <mailto:[hidden email]>
>>     https://www.iam.unibe.ch/__mailman/listinfo/moose-dev
>>     <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Agile visualization book as an interactive grafoscopio document

Offray
Hi Alexandre,


El 12/02/15 a las 10:40, Alexandre Bergel escribió:
> Hi Offray!!
>
> This is impressive!

Thanks. Is my way to give something back to the community for all the
impressive work all of you have done and keep doing. As I have said, is
my first project and object program beyond Etoys/BotsInc, so there is a
lot or rough edges and rookie code every where, but I really like what
I'm learning here and the way Pharo/Smalltalk technology and community
empowers me to express/explore ideas.

> How did you get the text by the way? This is indeed very useful!

Well it was by the ancient technique of cut and paste :-P. We could have
a more automated technique, but reading what we're cutting and give it
structure is a good exercise to be done by a person when is learning,
and this document started to take form The Indie web science workshops
we made in our local hackerspace. We have also other grafoscopio
interactive documents for the ProfStef tutorial and once we restart our
workshops this year we hope to update the documents with this new
functionality.

>
> On a side note. I have not yet decided the license for the book. Having it on lulu is indeed appealing. However, it is likely that we go via a specialized publisher.  Morgan Kaufman or Apress maybe. Looks like to be better in order to go beyond the Pharo community.


There is a full ecosystem of licenses. Following the Kleiner's
classification there are the classic copyright, the copy just right
(most of the creative commons licenses) the copyleft (cc-by-sa) and the
copy-far-left (p2p license). I think that the cc-by-sa, which is the
same of the Pharo by example books could be a good deal with publishers,
but maybe they will ask for some cc license with non-commercial
distribution (:-/). Anyway, hopefully the license you choose will
empower the community and let it to create derivative works (we have
some Spanish translations and apprentice notes for the Agile
Visualization book). Let me know what license you choose, and under
which conditions me and our small group can create derivative works from
yours.

> Cheers
> Alexandre
>

Cheers,

Offray



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Agile visualization book as an interactive grafoscopio document

abergel
Thanks,

I will let you know.

Cheers,
Alexandre


> On Feb 12, 2015, at 9:26 PM, Offray Vladimir Luna Cárdenas <[hidden email]> wrote:
>
> There is a full ecosystem of licenses. Following the Kleiner's classification there are the classic copyright, the copy just right (most of the creative commons licenses) the copyleft (cc-by-sa) and the copy-far-left (p2p license). I think that the cc-by-sa, which is the same of the Pharo by example books could be a good deal with publishers, but maybe they will ask for some cc license with non-commercial distribution (:-/). Anyway, hopefully the license you choose will empower the community and let it to create derivative works (we have some Spanish translations and apprentice notes for the Agile Visualization book). Let me know what license you choose, and under which conditions me and our small group can create derivative works from yours.

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev