Tonel Fileout

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

Tonel Fileout

Ben Coman
How can a fileout/filein be done using Tonel format?
In the first case as a script?
and secondly as a possible menu option for Pharo? 

This is to facilitate transfer of student coding exercises for Exercism.

Could Tonel handle a full package export in one file?

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

Re: Tonel Fileout

HilaireFernandes
Hi Ben,

I am not sure, but the purpose of Tonel is to propose a file
representation of "one class=one file".

In that case, does exporting a whole package in one file with the Tonel
notation exist or make sense?

Why not using Fileout st files to transfer the code?

(RPackage named: 'DrGeoII-Core') fileOut.
'DrGeoII-Core.st' asFileReference fileIn

Hilaire

Le 16/06/2018 à 10:43, Ben Coman a écrit :
> How can a fileout/filein be done using Tonel format?
> In the first case as a script?
> and secondly as a possible menu option for Pharo?
>
> This is to facilitate transfer of student coding exercises for Exercism.
> http://exercism.io/languages/pharo/launch
>
> Could Tonel handle a full package export in one file?
>

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Tonel Fileout

Ben Coman
Le 16/06/2018 à 10:43, Ben Coman a écrit :
How can a fileout/filein be done using Tonel format?
In the first case as a script?
and secondly as a possible menu option for Pharo?

This is to facilitate transfer of student coding exercises for Exercism.
http://exercism.io/languages/pharo/launch

Could Tonel handle a full package export in one file?

On 16 June 2018 at 17:13, Hilaire <[hidden email]> wrote:
Hi Ben,

I am not sure, but the purpose of Tonel is to propose a file representation of "one class=one file".

Sure thats how Tonel came about, and its how we mostly use it, but is this an inherent limitation? 
Each method is prefixed with its class, so from my 100ft viewpoint it seems feasible to transport a whole package in one Tonel file. 


Why not using Fileout st files to transfer the code?

The same question might be asked why Iceberg didn't just use a Fileout at class level. 
The Tonel format is more readable, especially minus the scattering of exclamation marks.
 
I also meant to ask, what methods are used to file-in a Tonel file ?
Or more the point, what method process a string in Tonel format that has been downloaded from a website?

Actually, hunting around a bit I found....

TonelParserTest >> testMethodDefList
shows that... ((TonelParser on: tonelString readStream) perform: #methodDefList)
returns an array of MCMethodDefinitions that respond to #load
with...
MCMethodDefinition >> load
self actualClass
compile: source
classified: category
withStamp: timeStamp
notifying: nil

And... 
TonelParserTest >> testTypeDef
shows that ((TonelParser on: tonelString readStream) perform: #typeDef)
returns a MCClassDefinition that also responds to #load
with...
MCClassDefinition >> load
self createClass


So as an experiment I deleted MCMockClassD,
then in playground evaluated...
    parser := (TonelParser on: tonelString readStream).
    classDef := parser perform: #typeDef.
    methodDefs := parser perform: #methodDefList.
    classDef load.
    methodDefs do: [ :md | md load ].

and super cool...   MCMockClassD>>one  was restored.
So is that the correct way to use it?

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

Re: Tonel Fileout

EstebanLM


On 16 Jun 2018, at 16:38, Ben Coman <[hidden email]> wrote:

Le 16/06/2018 à 10:43, Ben Coman a écrit :
How can a fileout/filein be done using Tonel format?
In the first case as a script?
and secondly as a possible menu option for Pharo?

This is to facilitate transfer of student coding exercises for Exercism.
http://exercism.io/languages/pharo/launch

Could Tonel handle a full package export in one file?

On 16 June 2018 at 17:13, Hilaire <[hidden email]> wrote:
Hi Ben,

I am not sure, but the purpose of Tonel is to propose a file representation of "one class=one file".

Sure thats how Tonel came about, and its how we mostly use it, but is this an inherent limitation? 

no. 
in fact, Martin McClure is working to make tonel available to work on file-per-package and even file-per-method again. In general, we do not want one or the other, but there are certain contexts where those can be useful.

Each method is prefixed with its class, so from my 100ft viewpoint it seems feasible to transport a whole package in one Tonel file. 


Why not using Fileout st files to transfer the code?

The same question might be asked why Iceberg didn't just use a Fileout at class level

well, while file-out is good, we want to use Tonel format also to file-out and file-in. Not a replacement but an addition. Because the format is more readable, is sometimes more suitable for exchange too.

cheers,
Esteban

. 
The Tonel format is more readable, especially minus the scattering of exclamation marks.
 
I also meant to ask, what methods are used to file-in a Tonel file ?
Or more the point, what method process a string in Tonel format that has been downloaded from a website?

Actually, hunting around a bit I found....

TonelParserTest >> testMethodDefList
shows that... ((TonelParser on: tonelString readStream) perform: #methodDefList)
returns an array of MCMethodDefinitions that respond to #load
with...
MCMethodDefinition >> load
self actualClass
compile: source
classified: category
withStamp: timeStamp
notifying: nil

And... 
TonelParserTest >> testTypeDef
shows that ((TonelParser on: tonelString readStream) perform: #typeDef)
returns a MCClassDefinition that also responds to #load
with...
MCClassDefinition >> load
self createClass


So as an experiment I deleted MCMockClassD,
then in playground evaluated...
    parser := (TonelParser on: tonelString readStream).
    classDef := parser perform: #typeDef.
    methodDefs := parser perform: #methodDefList.
    classDef load.
    methodDefs do: [ :md | md load ].

and super cool...   MCMockClassD>>one  was restored.
So is that the correct way to use it?

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Tonel Fileout

Tim Mackinnon
Not quite the same usecase . But on github it’s a brilliant format for a side project - I can hack code on the tube on my phone with a build ci server to report the results when I surface (very lazy programming, but with a family and limited time - needs must) .

Tim

Sent from my iPhone

On 16 Jun 2018, at 22:10, Esteban Lorenzano <[hidden email]> wrote:



On 16 Jun 2018, at 16:38, Ben Coman <[hidden email]> wrote:

Le 16/06/2018 à 10:43, Ben Coman a écrit :
How can a fileout/filein be done using Tonel format?
In the first case as a script?
and secondly as a possible menu option for Pharo?

This is to facilitate transfer of student coding exercises for Exercism.
http://exercism.io/languages/pharo/launch

Could Tonel handle a full package export in one file?

On 16 June 2018 at 17:13, Hilaire <[hidden email]> wrote:
Hi Ben,

I am not sure, but the purpose of Tonel is to propose a file representation of "one class=one file".

Sure thats how Tonel came about, and its how we mostly use it, but is this an inherent limitation? 

no. 
in fact, Martin McClure is working to make tonel available to work on file-per-package and even file-per-method again. In general, we do not want one or the other, but there are certain contexts where those can be useful.

Each method is prefixed with its class, so from my 100ft viewpoint it seems feasible to transport a whole package in one Tonel file. 


Why not using Fileout st files to transfer the code?

The same question might be asked why Iceberg didn't just use a Fileout at class level

well, while file-out is good, we want to use Tonel format also to file-out and file-in. Not a replacement but an addition. Because the format is more readable, is sometimes more suitable for exchange too.

cheers,
Esteban

. 
The Tonel format is more readable, especially minus the scattering of exclamation marks.
 
I also meant to ask, what methods are used to file-in a Tonel file ?
Or more the point, what method process a string in Tonel format that has been downloaded from a website?

Actually, hunting around a bit I found....

TonelParserTest >> testMethodDefList
shows that... ((TonelParser on: tonelString readStream) perform: #methodDefList)
returns an array of MCMethodDefinitions that respond to #load
with...
MCMethodDefinition >> load
self actualClass
compile: source
classified: category
withStamp: timeStamp
notifying: nil

And... 
TonelParserTest >> testTypeDef
shows that ((TonelParser on: tonelString readStream) perform: #typeDef)
returns a MCClassDefinition that also responds to #load
with...
MCClassDefinition >> load
self createClass


So as an experiment I deleted MCMockClassD,
then in playground evaluated...
    parser := (TonelParser on: tonelString readStream).
    classDef := parser perform: #typeDef.
    methodDefs := parser perform: #methodDefList.
    classDef load.
    methodDefs do: [ :md | md load ].

and super cool...   MCMockClassD>>one  was restored.
So is that the correct way to use it?

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Tonel Fileout

Tim Mackinnon
In reply to this post by Ben Coman
Just as a followup to this - Bens suggestion can be slightly simplified (and less dependent on implementation details) as:

tonelStream := ‘…path…./src/Polymorph-Widgets-Rules/IconShortcutRule.class.st' asFileReference readStream.
parser := (TonelParser on: tonelStream).
parser document do: [ :item | item load  ].

If you want to load an entire directory you can use a reader (but sadly the reader doesn’t let you load only one file)

tonelLocator := ‘…path…./src/Polymorph-Widgets-Rules/IconShortcutRule.class.st' asFileReference.
(TonelReader on: tonelLocator fileName: tonelLocator path parent pathString ) loadDefinitions.

Thought this might help someone in the future (particularly if you are recovering a deleted file(s) from git ;)

Tim

On 16 Jun 2018, at 15:38, Ben Coman <[hidden email]> wrote:

Le 16/06/2018 à 10:43, Ben Coman a écrit :
How can a fileout/filein be done using Tonel format?
In the first case as a script?
and secondly as a possible menu option for Pharo?

This is to facilitate transfer of student coding exercises for Exercism.
http://exercism.io/languages/pharo/launch

Could Tonel handle a full package export in one file?

On 16 June 2018 at 17:13, Hilaire <[hidden email]> wrote:
Hi Ben,

I am not sure, but the purpose of Tonel is to propose a file representation of "one class=one file".

Sure thats how Tonel came about, and its how we mostly use it, but is this an inherent limitation? 
Each method is prefixed with its class, so from my 100ft viewpoint it seems feasible to transport a whole package in one Tonel file. 


Why not using Fileout st files to transfer the code?

The same question might be asked why Iceberg didn't just use a Fileout at class level. 
The Tonel format is more readable, especially minus the scattering of exclamation marks.
 
I also meant to ask, what methods are used to file-in a Tonel file ?
Or more the point, what method process a string in Tonel format that has been downloaded from a website?

Actually, hunting around a bit I found....

TonelParserTest >> testMethodDefList
shows that... ((TonelParser on: tonelString readStream) perform: #methodDefList)
returns an array of MCMethodDefinitions that respond to #load
with...
MCMethodDefinition >> load
self actualClass
compile: source
classified: category
withStamp: timeStamp
notifying: nil

And... 
TonelParserTest >> testTypeDef
shows that ((TonelParser on: tonelString readStream) perform: #typeDef)
returns a MCClassDefinition that also responds to #load
with...
MCClassDefinition >> load
self createClass


So as an experiment I deleted MCMockClassD,
then in playground evaluated...
    parser := (TonelParser on: tonelString readStream).
    classDef := parser perform: #typeDef.
    methodDefs := parser perform: #methodDefList.
    classDef load.
    methodDefs do: [ :md | md load ].

and super cool...   MCMockClassD>>one  was restored.
So is that the correct way to use it?

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Tonel Fileout

Tim Mackinnon
As another output (and an answer to Ben’s question) - to output, you need a snapshot - the easiest I could work out was something like:

TonelWriter new sourceDir: '.' asFileReference; writeSnapshot: (MCPackage named: HelloWorldTest package name) snapshot.



On 29 Jun 2018, at 17:11, Tim Mackinnon <[hidden email]> wrote:

Just as a followup to this - Bens suggestion can be slightly simplified (and less dependent on implementation details) as:

tonelStream := ‘…path…./src/Polymorph-Widgets-Rules/IconShortcutRule.class.st' asFileReference readStream.
parser := (TonelParser on: tonelStream).
parser document do: [ :item | item load  ].

If you want to load an entire directory you can use a reader (but sadly the reader doesn’t let you load only one file)

tonelLocator := ‘…path…./src/Polymorph-Widgets-Rules/IconShortcutRule.class.st' asFileReference.
(TonelReader on: tonelLocator fileName: tonelLocator path parent pathString ) loadDefinitions.

Thought this might help someone in the future (particularly if you are recovering a deleted file(s) from git ;)

Tim

On 16 Jun 2018, at 15:38, Ben Coman <[hidden email]> wrote:

Le 16/06/2018 à 10:43, Ben Coman a écrit :
How can a fileout/filein be done using Tonel format?
In the first case as a script?
and secondly as a possible menu option for Pharo?

This is to facilitate transfer of student coding exercises for Exercism.
http://exercism.io/languages/pharo/launch

Could Tonel handle a full package export in one file?

On 16 June 2018 at 17:13, Hilaire <[hidden email]> wrote:
Hi Ben,

I am not sure, but the purpose of Tonel is to propose a file representation of "one class=one file".

Sure thats how Tonel came about, and its how we mostly use it, but is this an inherent limitation? 
Each method is prefixed with its class, so from my 100ft viewpoint it seems feasible to transport a whole package in one Tonel file. 


Why not using Fileout st files to transfer the code?

The same question might be asked why Iceberg didn't just use a Fileout at class level. 
The Tonel format is more readable, especially minus the scattering of exclamation marks.
 
I also meant to ask, what methods are used to file-in a Tonel file ?
Or more the point, what method process a string in Tonel format that has been downloaded from a website?

Actually, hunting around a bit I found....

TonelParserTest >> testMethodDefList
shows that... ((TonelParser on: tonelString readStream) perform: #methodDefList)
returns an array of MCMethodDefinitions that respond to #load
with...
MCMethodDefinition >> load
self actualClass
compile: source
classified: category
withStamp: timeStamp
notifying: nil

And... 
TonelParserTest >> testTypeDef
shows that ((TonelParser on: tonelString readStream) perform: #typeDef)
returns a MCClassDefinition that also responds to #load
with...
MCClassDefinition >> load
self createClass


So as an experiment I deleted MCMockClassD,
then in playground evaluated...
    parser := (TonelParser on: tonelString readStream).
    classDef := parser perform: #typeDef.
    methodDefs := parser perform: #methodDefList.
    classDef load.
    methodDefs do: [ :md | md load ].

and super cool...   MCMockClassD>>one  was restored.
So is that the correct way to use it?

cheers -ben


Reply | Threaded
Open this post in threaded view
|

Re: Tonel Fileout

Ben Coman
On 16 Jun 2018, at 15:38, Ben Coman <[hidden email]> wrote:

Le 16/06/2018 à 10:43, Ben Coman a écrit :
How can a fileout/filein be done using Tonel format?
In the first case as a script?
and secondly as a possible menu option for Pharo?

This is to facilitate transfer of student coding exercises for Exercism.
http://exercism.io/languages/pharo/launch

Could Tonel handle a full package export in one file?

On 16 June 2018 at 17:13, Hilaire <[hidden email]> wrote:
Hi Ben,

I am not sure, but the purpose of Tonel is to propose a file representation of "one class=one file".

Sure thats how Tonel came about, and its how we mostly use it, but is this an inherent limitation? 
Each method is prefixed with its class, so from my 100ft viewpoint it seems feasible to transport a whole package in one Tonel file. 


Why not using Fileout st files to transfer the code?

The same question might be asked why Iceberg didn't just use a Fileout at class level. 
The Tonel format is more readable, especially minus the scattering of exclamation marks.
 
I also meant to ask, what methods are used to file-in a Tonel file ?
Or more the point, what method process a string in Tonel format that has been downloaded from a website?

Actually, hunting around a bit I found....

TonelParserTest >> testMethodDefList
shows that... ((TonelParser on: tonelString readStream) perform: #methodDefList)
returns an array of MCMethodDefinitions that respond to #load
with...
MCMethodDefinition >> load
self actualClass
compile: source
classified: category
withStamp: timeStamp
notifying: nil

And... 
TonelParserTest >> testTypeDef
shows that ((TonelParser on: tonelString readStream) perform: #typeDef)
returns a MCClassDefinition that also responds to #load
with...
MCClassDefinition >> load
self createClass


So as an experiment I deleted MCMockClassD,
then in playground evaluated...
    parser := (TonelParser on: tonelString readStream).
    classDef := parser perform: #typeDef.
    methodDefs := parser perform: #methodDefList.
    classDef load.
    methodDefs do: [ :md | md load ].

and super cool...   MCMockClassD>>one  was restored.
So is that the correct way to use it?

cheers -ben



On 29 Jun 2018, at 17:11, Tim Mackinnon <[hidden email]> wrote:

Just as a followup to this - Bens suggestion can be slightly simplified (and less dependent on implementation details) as:

tonelStream := ‘…path…./src/Polymorph-Widgets-Rules/IconShortcutRule.class.st' asFileReference readStream.
parser := (TonelParser on: tonelStream).
parser document do: [ :item | item load  ].

If you want to load an entire directory you can use a reader (but sadly the reader doesn’t let you load only one file)

tonelLocator := ‘…path…./src/Polymorph-Widgets-Rules/IconShortcutRule.class.st' asFileReference.
(TonelReader on: tonelLocator fileName: tonelLocator path parent pathString ) loadDefinitions.

Thought this might help someone in the future (particularly if you are recovering a deleted file(s) from git ;)

Tim

On 30 June 2018 at 07:31, Tim Mackinnon <[hidden email]> wrote:
As another output (and an answer to Ben’s question) - to output, you need a snapshot - the easiest I could work out was something like:

TonelWriter new sourceDir: '.' asFileReference; writeSnapshot: (MCPackage named: HelloWorldTest package name) snapshot.



hey! thats super cool.  Perhaps we do that writing to a memory file-system, then upload those files a strings to the Execism server.
Do you have a similar idea for the reverse?

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

Re: Tonel Fileout

Ben Coman


On 30 June 2018 at 16:24, Ben Coman <[hidden email]> wrote:
On 16 Jun 2018, at 15:38, Ben Coman <[hidden email]> wrote:

Le 16/06/2018 à 10:43, Ben Coman a écrit :
How can a fileout/filein be done using Tonel format?
In the first case as a script?
and secondly as a possible menu option for Pharo?

This is to facilitate transfer of student coding exercises for Exercism.
http://exercism.io/languages/pharo/launch

Could Tonel handle a full package export in one file?

On 16 June 2018 at 17:13, Hilaire <[hidden email]> wrote:
Hi Ben,

I am not sure, but the purpose of Tonel is to propose a file representation of "one class=one file".

Sure thats how Tonel came about, and its how we mostly use it, but is this an inherent limitation? 
Each method is prefixed with its class, so from my 100ft viewpoint it seems feasible to transport a whole package in one Tonel file. 


Why not using Fileout st files to transfer the code?

The same question might be asked why Iceberg didn't just use a Fileout at class level. 
The Tonel format is more readable, especially minus the scattering of exclamation marks.
 
I also meant to ask, what methods are used to file-in a Tonel file ?
Or more the point, what method process a string in Tonel format that has been downloaded from a website?

Actually, hunting around a bit I found....

TonelParserTest >> testMethodDefList
shows that... ((TonelParser on: tonelString readStream) perform: #methodDefList)
returns an array of MCMethodDefinitions that respond to #load
with...
MCMethodDefinition >> load
self actualClass
compile: source
classified: category
withStamp: timeStamp
notifying: nil

And... 
TonelParserTest >> testTypeDef
shows that ((TonelParser on: tonelString readStream) perform: #typeDef)
returns a MCClassDefinition that also responds to #load
with...
MCClassDefinition >> load
self createClass


So as an experiment I deleted MCMockClassD,
then in playground evaluated...
    parser := (TonelParser on: tonelString readStream).
    classDef := parser perform: #typeDef.
    methodDefs := parser perform: #methodDefList.
    classDef load.
    methodDefs do: [ :md | md load ].

and super cool...   MCMockClassD>>one  was restored.
So is that the correct way to use it?

cheers -ben



On 29 Jun 2018, at 17:11, Tim Mackinnon <[hidden email]> wrote:

Just as a followup to this - Bens suggestion can be slightly simplified (and less dependent on implementation details) as:

tonelStream := ‘…path…./src/Polymorph-Widgets-Rules/IconShortcutRule.class.st' asFileReference readStream.
parser := (TonelParser on: tonelStream).
parser document do: [ :item | item load  ].

If you want to load an entire directory you can use a reader (but sadly the reader doesn’t let you load only one file)

tonelLocator := ‘…path…./src/Polymorph-Widgets-Rules/IconShortcutRule.class.st' asFileReference.
(TonelReader on: tonelLocator fileName: tonelLocator path parent pathString ) loadDefinitions.

Thought this might help someone in the future (particularly if you are recovering a deleted file(s) from git ;)

Tim

On 30 June 2018 at 07:31, Tim Mackinnon <[hidden email]> wrote:
As another output (and an answer to Ben’s question) - to output, you need a snapshot - the easiest I could work out was something like:

TonelWriter new sourceDir: '.' asFileReference; writeSnapshot: (MCPackage named: HelloWorldTest package name) snapshot.



hey! thats super cool.  Perhaps we do that writing to a memory file-system, then upload those files a strings to the Execism server.
Do you have a similar idea for the reverse?

And I just noticed your comment in the Exercism issue (https://github.com/exercism/pharo/issues/6)
May as well copy it here...

To read it back in:

sourceDir := '.' asFileReference.
(TonelReader on: tonelLocator fileName: sourceDir pathString ) loadDefinitions.
   cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Tonel Fileout

Tim Mackinnon
In reply to this post by Ben Coman
I think the tests for Tonel reader/writer do exactly that in memory trick - so I think we could get a no e soln. But to get 1.0 I think we get a menu item running with import/export and then we can in parallel write examples and build out a better integration.

Would be nice to show we can play in the same pools as the other children ;)

Tim

Sent from my iPhone


Sent from my iPhone

On 30 Jun 2018, at 09:24, Ben Coman <[hidden email]> wrote:

On 16 Jun 2018, at 15:38, Ben Coman <[hidden email]> wrote:

Le 16/06/2018 à 10:43, Ben Coman a écrit :
How can a fileout/filein be done using Tonel format?
In the first case as a script?
and secondly as a possible menu option for Pharo?

This is to facilitate transfer of student coding exercises for Exercism.
http://exercism.io/languages/pharo/launch

Could Tonel handle a full package export in one file?

On 16 June 2018 at 17:13, Hilaire <[hidden email]> wrote:
Hi Ben,

I am not sure, but the purpose of Tonel is to propose a file representation of "one class=one file".

Sure thats how Tonel came about, and its how we mostly use it, but is this an inherent limitation? 
Each method is prefixed with its class, so from my 100ft viewpoint it seems feasible to transport a whole package in one Tonel file. 


Why not using Fileout st files to transfer the code?

The same question might be asked why Iceberg didn't just use a Fileout at class level. 
The Tonel format is more readable, especially minus the scattering of exclamation marks.
 
I also meant to ask, what methods are used to file-in a Tonel file ?
Or more the point, what method process a string in Tonel format that has been downloaded from a website?

Actually, hunting around a bit I found....

TonelParserTest >> testMethodDefList
shows that... ((TonelParser on: tonelString readStream) perform: #methodDefList)
returns an array of MCMethodDefinitions that respond to #load
with...
MCMethodDefinition >> load
self actualClass
compile: source
classified: category
withStamp: timeStamp
notifying: nil

And... 
TonelParserTest >> testTypeDef
shows that ((TonelParser on: tonelString readStream) perform: #typeDef)
returns a MCClassDefinition that also responds to #load
with...
MCClassDefinition >> load
self createClass


So as an experiment I deleted MCMockClassD,
then in playground evaluated...
    parser := (TonelParser on: tonelString readStream).
    classDef := parser perform: #typeDef.
    methodDefs := parser perform: #methodDefList.
    classDef load.
    methodDefs do: [ :md | md load ].

and super cool...   MCMockClassD>>one  was restored.
So is that the correct way to use it?

cheers -ben



On 29 Jun 2018, at 17:11, Tim Mackinnon <[hidden email]> wrote:

Just as a followup to this - Bens suggestion can be slightly simplified (and less dependent on implementation details) as:

tonelStream := ‘…path…./src/Polymorph-Widgets-Rules/IconShortcutRule.class.st' asFileReference readStream.
parser := (TonelParser on: tonelStream).
parser document do: [ :item | item load  ].

If you want to load an entire directory you can use a reader (but sadly the reader doesn’t let you load only one file)

tonelLocator := ‘…path…./src/Polymorph-Widgets-Rules/IconShortcutRule.class.st' asFileReference.
(TonelReader on: tonelLocator fileName: tonelLocator path parent pathString ) loadDefinitions.

Thought this might help someone in the future (particularly if you are recovering a deleted file(s) from git ;)

Tim

On 30 June 2018 at 07:31, Tim Mackinnon <[hidden email]> wrote:
As another output (and an answer to Ben’s question) - to output, you need a snapshot - the easiest I could work out was something like:

TonelWriter new sourceDir: '.' asFileReference; writeSnapshot: (MCPackage named: HelloWorldTest package name) snapshot.



hey! thats super cool.  Perhaps we do that writing to a memory file-system, then upload those files a strings to the Execism server.
Do you have a similar idea for the reverse?

cheers -ben