Re: How does instant update work in Pharo?

2017-07-28 Thread Offray Vladimir Luna Cárdenas


On 26/07/17 07:59, Edward K. Ream wrote:
>
>
> On Sun, Jul 23, 2017 at 3:43 AM, Offray Vladimir Luna Cárdenas
> mailto:off...@riseup.net>> wrote:
>
> I would go trying to emulate the features of Leo files,
> particularly clones in the Grafoscopio world, so that would be
> like the opposite approach to reproduce "Leo" into Smalltalk by
> reproducing/migrating the storage, instead of reproduce Smalltalk
> into Leo by reproducing/migrating functionality.
>
> ​I think this a good strategy.  I will lead to healthy competition.
>

This will be more like complementarity that competition: Grafoscopio has
bring outlining and interactive documentation to the Pharo world and
will be looking to bring cloning, but is not trying to bring the amazing
text deconstructing capabilities of Leo to Pharo, that allow you to take
arbitrary existing text files and reorder them the way you like and
reconstruct them the way computer likes. I will leave that heavy and
well done work to Leo. I want to import though, the files with clones
that Leo produces, at some point maybe. But the important issue is to
implement the idea of clones, that are really helpful in an outlining
interactive writing environment.

Still a lot of things to do and learn from Leo and its community,
hopefully for several years.

Cheers,

Offray

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-26 Thread Edward K. Ream
On Sun, Jul 23, 2017 at 3:43 AM, Offray Vladimir Luna Cárdenas <
off...@riseup.net> wrote:

> I would go trying to emulate the features of Leo files, particularly
> clones in the Grafoscopio world, so that would be like the opposite
> approach to reproduce "Leo" into Smalltalk by reproducing/migrating the
> storage, instead of reproduce Smalltalk into Leo by reproducing/migrating
> functionality.
>
​I think this a good strategy.  I will lead to healthy competition.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-23 Thread Offray Vladimir Luna Cárdenas
I would go trying to emulate the features of Leo files, particularly
clones in the Grafoscopio world, so that would be like the opposite
approach to reproduce "Leo" into Smalltalk by reproducing/migrating the
storage, instead of reproduce Smalltalk into Leo by
reproducing/migrating functionality.

Cheers,

Offray


On 09/07/17 18:48, Edward K. Ream wrote:
> On Sun, Jul 9, 2017 at 6:42 PM, Edward K. Ream  > wrote:
>
> On Sun, Jul 9, 2017 at 11:43 AM, Offray Vladimir Luna Cárdenas
> mailto:off...@riseup.net>> wrote:
>
> Well my idea is kind of the opposite: Instead of creating a
> Smalltalk environment I try to create a Leo (alike)
> environment inside Pharo Smalltalk.
>
> ​I think that would be a worthy goal.  I've thought of it myself.
>
>
> ​Continuing this thought, I wonder whether a py2pharo script would be
> a good idea.  Similar to c2py, the first python script I ever wrote.
>
> It could be written either in Pharo or Python.  Perhaps writing it in
> python would be easier because Python's ast library (and Leo's leoAst
> module​) can generate a proper python parse tree.
>
> Either way, generating leoNodes.st and the generators in
> leoCommands.py would be required to support Leo's node structure.
>
> Many other modules are candidates for translation to .st files,
> including Leo's import/export code.
>
> Just my first thoughts.
>
> Edward
> -- 
> You received this message because you are subscribed to the Google
> Groups "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to leo-editor+unsubscr...@googlegroups.com
> .
> To post to this group, send email to leo-editor@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-23 Thread Offray Vladimir Luna Cárdenas
Hi,


On 17/07/17 12:32, Edward K. Ream wrote:
> On Sunday, July 16, 2017 at 10:24:51 AM UTC-5, Edward K. Ream wrote:
>
> > > developing with @button or @test already simulates instant reload
> pretty well.
> > Today, right now, Leo devs and script writers can develop python code
> /more /easily in Leo than in SmallTalk.
>
> After more thought, the first statement seems more accurate :-)  Leo
> and SmallTalk each have their own advantages.
>
> Here are step-by-step instructions for developing code in Leo without
> having to reload Leo.
>

Totally agree. I think that Leo is unbeatable in (de)constructing text,
particularly programming text, and Smalltalk is particularly well suited
at live coding a custom tools. About the workflow, I started with
@buttons, because, as an "end user", that was the more approachable step
for me, but I didn't know how to pass that to commands or to add test.
Having this process more explicit is really useful. In Pharo/Smalltalk,
the way you go from first prototypes, to apps, to scripts, to test, is
more continuous, which is by no any means Leo's fault, is just a
divergence, back from the 70's, about how computing should work in the
Unix/OS paradigm, vs Smalltalk/Dynabook one. So Leo gives
meta-properties to the indirect world of plain files, while Smalltalk
gives meta-structure to the more direct/interactive world of live objects.


>
>
> *1. Create a dev node*
> [...]
>
> *2. Set up your dev node so you can execute it quickly*
> [...]
>
> *2. Define or access the code under development
> [...]
> *
> *3. Create /new/ instances of objects*
>
> [...]
> *4. Run the test, edit, repeat*
>
>
> *Summary*
>
> @test, @command or @button can be thought of as defining an (almost)
> pristine dev environment. This is another way of describing the
> Stupendous Aha.
>
> Dev scripts should create a new, pristine environment every time it
> they are executed, using imp.reload as needed. Dev scripts should
> always create /new /objects for testing.  Dev scripts may use Leo's
> core objects provided they have not been modified.
>
> SmallTalk does most of this automagically. 

Certainly... Know some other environments are exploring ways to bring
live coding and this magic to the files world.

> However, dev scripts have their own advantages:
>
> - Dev scripts can access code using clones.
> - Dev scripts can use outlines to organize the code under development.
> - Dev scripts form a permanent record of completed work.
> - Dev scripts can morph into unit tests.

I made that with Grafoscopio, which brings interactive outlining
capabilities to the Pharo environment (but without the magic of clones,
yet).
> - Dev scripts work for Python!
>

Grafoscopio scripts work in Pharo! :-P

> Dev scripts bring most of the advantages of SmallTalk to Leo. The
> initial cost of creating dev nodes pays off immediately.
>
> All comments welcome.
>

I think that Leo is still far away in the live coding front. I think
that the real Leo's jewel is adding meta-referential properties to the
flat file world. A non flat and programmable file to read, deconstruct,
reconstruct other mostly flat files.

Cheers,

Offray

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-18 Thread Edward K. Ream
On Monday, July 17, 2017 at 4:03:27 PM UTC-5, Edward K. Ream wrote:

> [imp.reload(g) crashes Leo...Imo this is *not* a real bug in 
c.executeScriptHelper, or leoGlobals.py or anywhere else.  It just means 
that one dasn't reload the leoGlobals module

Two more observations:

1. imp.reload *can* be made to work, as the unit tests for importers show, 
but you must have deep knowledge of the code to do so. Instead, accessing 
code by cloning code the dev node should be completely safe, unless you 
clone a whole module ;-)

2. Leo's startup code is heavily over-constrained because Leo is a 
programming environment.  All changes to existing code, including 
*especially* the startup code, must have *zero* impact on existing scripts, 
apps and plugins.

Edward

>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-17 Thread Edward K. Ream
On Mon, Jul 17, 2017 at 12:32 PM, Edward K. Ream 
wrote:

*​> ​4. Run the test, edit, repeat*

​> ​
After creating the dev node you simply run the dev script until everything
works :-)  The details depend on the code being developed.  Otoh, we can
safely assume that devs can handle problems as they arise.

​This last sentence hides a lot, but there seems to be nothing more to be
said.  We are, after all, talking about a *general *framework for code
reloading...​


​Otoh, this topic does relate to #511: reload-leo command
​
​. In this context I'd like to be as specific as possible.

As a first observation, the following code crashes Leo.  It's not a hard
crash, but Leo does exit, *despite the try/except block*:

import imp
import sys
import traceback
import leo.core.leoGlobals as g
try: # This crashes Leo, despite the try/except!
imp.reload(g)
except Exception:
typ, val, tb = sys.exc_info()
lines = traceback.format_exception(typ, val, tb)
print(lines)

The crash happens in c.executeScriptHelper, outside of any try/except
block.  Indeed, the try/except block above exists only in the exec
statement in c.executeScriptHelper.
​
​  It is gone by the time the actual crash happens.​


​Without going into details, the call to imp.reload(g) has thoroughly
messed up Leo's run-time environment.  In particular, g.app becomes None.

Imo this is *not* a real bug in c.executeScriptHelper, or leoGlobals.py or
anywhere else.  It just means that one dasn't reload the leoGlobals module,
at least not until we have a more robust init scheme.

And good luck with that.  Initing the leoGlobals module, and g.app, takes
place very early, but despite (or because of) that it is very tricky.

This post has strayed far from the previous post, but it shows that there
is no way to describe all the myriad complexities that might befall people
using dev nodes.  Despite that, dev nodes can be extremely useful.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-17 Thread Edward K. Ream
On Sunday, July 16, 2017 at 10:24:51 AM UTC-5, Edward K. Ream wrote:

> > developing with @button or @test already simulates instant reload 
pretty well.
> Today, right now, Leo devs and script writers can develop python code *more 
*easily in Leo than in SmallTalk.

After more thought, the first statement seems more accurate :-)  Leo and 
SmallTalk each have their own advantages.

Here are step-by-step instructions for developing code in Leo without 
having to reload Leo.

*tl;dr:* Read the summary.  But devs should consider reading all of this 
carefully ;-)

*1. Create a dev node*

This node (in the Leo outline) defines your development environment.  This 
can be an @test node, an @button node, or an @command node. Using a plain 
outline node would be less convenient because you won't be able to execute 
it so easily.

The *dev script* is the script in the dev node itself.  The *code under 
development *is the code exercised by the dev script.

*This is (by far) the most important step!* Once you say to yourself, "Ok, 
I'm going to be clever and develop my code using the Stupendous Aha 
",
 
everything else in this post is going to happen naturally.  It may not 
always be easy, but the programming process itself will lead you to the 
next action.  Otoh, If you *don't* create a custom dev environment you will 
have to reload Leo to test your new code. That will be much slower.

*2. Set up your dev node so you can execute it quickly*

There are several ways to run your dev script easily:

- Use a marked @test node and use run-marked-unit-tests-locally.
- Disable or ignore all other @test nodes and then use 
run-all-unit-tests-locally.
- Bind a keystroke to an @button or @command node.
- Run an @button or @command node the first time from the minibuffer, and 
thereafter re-execute it with Ctrl-P (repeat-complex-command.

Choose any way you like. What matters is being able to run your dev script 
with a single keystroke.



*2. Define or access the code under development*There are two main ways to 
do this:

A.  Define the code as (possibly cloned) children of the dev node, and 
access the code using @others in the top-level node.

B. Import a module. *Important*: typically your dev script will use 
imp.reload to ensure that imported module is up-to-date.

*3. Create new instances of objects*

You *must not *use existing Leo objects when testing Leo code.  This 
includes *all* objects accessible via c, g and p, either directly or 
indirectly.  For example, you must not use c, c.frame, c.frame.body, etc., 
etc., even if you have reloaded all of Leo's modules!

You can, however, use any Leo code when developing *other* (unmodified) 
code.  

You will seldom need to worry about reloading code if you use @others to 
define the code under test.

*4. Run the test, edit, repeat*

After creating the dev node you simply run the dev script until everything 
works :-)  The details depend on the code being developed.  Otoh, we can 
safely assume that devs can handle problems as they arise.

*Summary*

@test, @command or @button can be thought of as defining an (almost) 
pristine dev environment. This is another way of describing the Stupendous 
Aha.

Dev scripts should create a new, pristine environment every time it they 
are executed, using imp.reload as needed. Dev scripts should always create *new 
*objects for testing.  Dev scripts may use Leo's core objects provided they 
have not been modified.

SmallTalk does most of this automagically.  However, dev scripts have their 
own advantages:

- Dev scripts can access code using clones.
- Dev scripts can use outlines to organize the code under development.
- Dev scripts form a permanent record of completed work.
- Dev scripts can morph into unit tests.
- Dev scripts work for Python!

Dev scripts bring most of the advantages of SmallTalk to Leo. The initial 
cost of creating dev nodes pays off immediately.

All comments welcome.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-16 Thread Edward K. Ream
On Saturday, July 15, 2017 at 4:50:32 PM UTC-5, Edward K. Ream wrote:

> developing with @button or @test *already simulates instant reload pretty 
well*.

Let me clarify this statement.  Here is the lede for a new post:

Today, right now, Leo devs and script writers can develop python code *more 
*easily in Leo than in SmallTalk. This post explains how.

I'm pretty sure I can back up this assertion. The trick is simply to 
develop code using *Leonine scripts*, that is, @test, @button or @command.  
It's a trick that I myself sometimes forget.

I'm working on the new post and may have it completed later today.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-15 Thread Edward K. Ream
​​


On Sat, Jul 15, 2017 at 11:15 AM, Edward K. Ream 
wrote:

>
>
> On Sat, Jul 15, 2017 at 10:48 AM, Offray Vladimir Luna Cárdenas <
> off...@riseup.net> wrote:
>
>> The thread about how Pharo instant update works, started to move. Here
>> are the answers of a seasoned Smalltalker, with links to deepen the
>> explanations:
>>
> ​I've taken a brief look at this.  At one time, decades ago now, I did
take a look at the SmallTalk internals. I think its fair to say the
following:

1. The SmallTalk VM is a bit more dynamic than Python's.
2. It's not going to be possible to simulate, for example, "becomes" in
Python.
3. More detailed study of SmallTalk/Pharo is not likely to help us for *our*
purposes.

I've been meaning to point of for a few days that developing with @button
or @test *already simulates instant reload pretty well*.

On re-reading the FAQ entry for the "stupendous Aha
",
I see that it's not explained well enough.  There are also hints about this
topic here
.
We've also discussed imp.reload on leo-editor recently.

Instant reloading techniques are not as widely known as they should be. All
these ideas must be brought together so that everyone can see the big
picture.  I'll do this in a new thread, which will likely become
pre-writing for an important new chapter.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-15 Thread Edward K. Ream
On Sat, Jul 15, 2017 at 10:48 AM, Offray Vladimir Luna Cárdenas <
off...@riseup.net> wrote:

> Hi,
>
> The thread about how Pharo instant update works, started to move. Here are
> the answers of a seasoned Smalltalker, with links to deepen the
> explanations:
>
> http://forum.world.st/Fwd-How-does-instant-update-work-in-
> Pharo-tt4953882.html#a4954981
>
> This could be useful in the context of recent engineering notebook about
> Leo's / Python's Does Not Understand and the use of dynamic types in Pharo
> (which is strongly dynamically typed, details in the above link)
>
​Many thanks for this.  I'll look at it later today.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-11 Thread Edward K. Ream
On Monday, July 10, 2017 at 8:50:25 AM UTC-5, Edward K. Ream wrote:
>
> On Mon, Jul 10, 2017 at 12:00 AM, Xavier G. Domingo  
> wrote:
>
 
>> to change one object into its new "version" you need just... its diff
...
>​> have you considered asking how would the experts do that at the 
Python-list?

> I've looked at the Pharo sources. I doubt if they contains are any 
wonder-ideas that we can use. The important thing is the goal.  We have to 
adapt that goal to our world.​

Well, I'm glad you asked these questions.  When I first answered, I had 
forgotten about Pharo's automatic refactoring.

Two big Aha's appeared as I reconsidered your questions.  I'll discuss them 
in an Engineering Notebook post.

Edward

>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-10 Thread Edward K. Ream
On Mon, Jul 10, 2017 at 12:00 AM, Xavier G. Domingo 
wrote:

​
>> I'm already noticing the constraints more.  I want full reload
yesterday, and I would like to explore Python patterns that would allow
arbitrary Python apps to reload themselves.​
 ​

​
​
> Today I've had a fool idea about this: to change one object into its new
"version" you need just... its diff! Maybe that could be leveraged to make
the new version of the object by applying the diff (patch) to it?​

I appreciate your enthusiasm, but this is unlikely to work.

​> ​
have you considered asking how would the experts do that at the Python-list
?

​​
​Not really.  I've looked at the Pharo sources. I doubt if they contains
are any wonder-ideas that we can use.​
​ The important thing is the goal.  We have to adapt that goal to our
world.​


​Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-09 Thread Xavier G. Domingo


How does Pharo handle changes in object format or methods? How does 
Pharo recover from crashes due to changed method signatures, invalid 
calls, etc?
Those are very good questions! From my experience, the greatest answers 
always come from*the best questions.*


​I'm already noticing the constraints more.  I want full reload 
yesterday, and I would like to explore Python patterns that would 
allow arbitrary Python apps to reload themselves.


Edward


Today I've had a fool idea about this: to change one object into its new 
"version" you need just... its diff! Maybe that could be leveraged to 
make the new version of the object by applying the diff (patch) to it?


Well, as I'm probably saying nonsenses, maybe the best option would be 
to ask the experts: have you considered asking how would the experts do 
that at the Python-list 
?


Looking forward to your news in this research!
Xavier

--
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-09 Thread Edward K. Ream
On Sun, Jul 9, 2017 at 6:42 PM, Edward K. Ream  wrote:

On Sun, Jul 9, 2017 at 11:43 AM, Offray Vladimir Luna Cárdenas <
> off...@riseup.net> wrote:
>
>> Well my idea is kind of the opposite: Instead of creating a Smalltalk
>> environment I try to create a Leo (alike) environment inside Pharo
>> Smalltalk.
>>
> ​I think that would be a worthy goal.  I've thought of it myself.
>

​Continuing this thought, I wonder whether a py2pharo script would be a
good idea.  Similar to c2py, the first python script I ever wrote.

It could be written either in Pharo or Python.  Perhaps writing it in
python would be easier because Python's ast library (and Leo's leoAst
module​) can generate a proper python parse tree.

Either way, generating leoNodes.st and the generators in leoCommands.py
would be required to support Leo's node structure.

Many other modules are candidates for translation to .st files, including
Leo's import/export code.

Just my first thoughts.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-09 Thread Edward K. Ream
On Sun, Jul 9, 2017 at 11:43 AM, Offray Vladimir Luna Cárdenas <
off...@riseup.net> wrote:

> Well my idea is kind of the opposite: Instead of creating a Smalltalk
> environment I try to create a Leo (alike) environment inside Pharo
> Smalltalk.
>
​I think that would be a worthy goal.  I've thought of it myself.

Indeed, the Pharo browsers don't remember state.

Edward, I advice you to keep the momentum. Wonderland is just starting and
> I wonder what a seasoned programmer like you could do free of the
> constrains of file based programming paradigms (more in another mail).
>

​I'm already noticing the constraints more.  I want full reload yesterday,
and I would like to explore Python patterns that would allow arbitrary
Python apps to reload themselves.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-09 Thread Edward K. Ream
On Sun, Jul 9, 2017 at 12:22 PM, Offray Vladimir Luna Cárdenas <
off...@riseup.net> wrote:

> I really dislike that video. I mean structurally. The speaker goes
> establishing an authority figure at the beginning that claims "Smalltalk is
> dead"
>
​I think we must always ignore unhelpful opinions. We should only give
ourselves time for the good stuff.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-09 Thread Offray Vladimir Luna Cárdenas
I really dislike that video. I mean structurally. The speaker goes
establishing an authority figure at the beginning that claims "Smalltalk
is dead", and after that it goes one hour telling why that happening and
how this can happen to other community/language (Ruby), basically using
anecdotes.

I remember seeing the whole thing and thinking: Why is dead? It seems
pretty live to me. What is a dead language for Uncle Bob? Unpopularity?
Why most of the audience agrees with that? Is there some kind of
anglo-centric conception of "live as being popular" (which is what
surrounds a lot of TV and movies narrative coming from there) that is
escaping to me as an outsider, coming from other culture and with other
concerns about why a computing environment and language is meaningful to me?

So I search the web looking for the so proclaimed dead of Smalltalk and
found better information beyond the aesthetics of that talk (trust this
authority and justify it through personal anecdotes) and I found [1].
That gave me a better historical overview of the reasons behind
Smalltalk's unpopularity and also contrasted critical points against the
exaggerated dead claims.

[1] http://wiki.c2.com/?WhyIsSmalltalkDead

After the initial cultural shock of learning another way of
thinking/interaction on/with computers [2], I remember feeling that
sense of flow and eloquence in Pharo by experience live coding: I was
finally to tell in code what was so difficult to tell in other
environments and to prototype ideas that I would like to see elsewhere
or in my favorite tools. That' despite of Grafoscopio being my first
"real app" ever done in Pharo (I made some small games in Squeak back in
2005 using Etoys and Bots Inc teaching environments).

[2] https://twitter.com/offrayLC/status/493979407011561473

So I stop caring about alleged "deadness" and more about fluidly and
personal expressivity and mastery, and a set of communities to share
that search and look for crosspollination. It has been a joyful
interesting path with a lot to do and learn ahead.

Cheers,

Offray

On 08/07/17 18:49, Edward K. Ream wrote:
>
>
> On Sat, Jul 8, 2017 at 6:17 PM, 'Karsten Wolf' via leo-editor
> mailto:leo-editor@googlegroups.com>> wrote:
>
> Disclaimer: This may sound like a rant but it isn't. I got out of
> that rabbit hole a decade ago. For me programming in Smalltalk is
> dreaming of the ideal software and programming in Python is
> Getting things done.
>
>
> ​Thanks for this perspective! It's easy to get carried away by grand
> ideas.  Perhaps they will bear fruit with Leo on Python.
>
> Edward
> -- 
> You received this message because you are subscribed to the Google
> Groups "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to leo-editor+unsubscr...@googlegroups.com
> .
> To post to this group, send email to leo-editor@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-09 Thread Adrian
Very coolOne of the environments I had evaluated was Pharo, before 
landing at Leo.  My key criterion was having the ability to customize the 
environment to the max, and Pharo was a key contender.  Incorporating some 
of those ideas within leo is most welcome.

Adrian

On Friday, July 7, 2017 at 5:23:21 AM UTC-5, Edward K. Ream wrote:
>
> I'm beginning to wonder what the difference is between the Pharo way and 
> #511: 
> reload-leo command. 
>
> How does Pharo handle changes in object format or methods? How does Pharo 
> recover from crashes due to changed method signatures, invalid calls, etc?
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-09 Thread Offray Vladimir Luna Cárdenas
Well my idea is kind of the opposite: Instead of creating a Smalltalk
environment I try to create a Leo (alike) environment inside Pharo
Smalltalk. The intro page is at [1] and a small subtitled video at [2].
It has preliminary integration with Fossil, where the documentation and
issues are versioned [3].

[1] http://mutabit.com/grafoscopio/index.en.html
[2] http://mutabit.com/repos.fossil/alvicoda/doc/tip/index.html
[3] http://mutabit.com/repos.fossil/grafoscopio/

As I have said, Grafoscopio have different focus compared with Leo, but
takes inspiration from it.

Edward, I advice you to keep the momentum. Wonderland is just starting
and I wonder what a seasoned programmer like you could do free of the
constrains of file based programming paradigms (more in another mail).

Cheers,

Offray


On 08/07/17 17:17, Edward K. Ream wrote:
>
>
> On Sat, Jul 8, 2017 at 3:51 PM, Jacob MacDonald  > wrote:
>
> This mailing list keeps getting filled with things I'm otherwise
> interested in, from Fossil to Smalltalk! Since the beginning of
> this year I've had the idea of creating a Smalltalk environment
> inside Leo; Perhaps this is the inspiration needed for me to
> actually put some time into it.
>
>
> ​That would be amazing. Can you give us a glimpse of your ideas?
>
> I've spent the afternoon happily going down the Pharo rabbit hole. 
> I'm tempted to lose myself in Pharo Wonderland...
>
> Edward
> -- 
> You received this message because you are subscribed to the Google
> Groups "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to leo-editor+unsubscr...@googlegroups.com
> .
> To post to this group, send email to leo-editor@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-08 Thread Edward K. Ream
On Sat, Jul 8, 2017 at 6:17 PM, 'Karsten Wolf' via leo-editor <
leo-editor@googlegroups.com> wrote:

> Disclaimer: This may sound like a rant but it isn't. I got out of that
> rabbit hole a decade ago. For me programming in Smalltalk is dreaming of
> the ideal software and programming in Python is Getting things done.
>

​Thanks for this perspective! It's easy to get carried away by grand
ideas.  Perhaps they will bear fruit with Leo on Python.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-08 Thread 'Karsten Wolf' via leo-editor
Disclaimer: This may sound like a rant but it isn't. I got out of that rabbit 
hole a decade ago. For me programming in Smalltalk is dreaming of the ideal 
software and programming in Python is Getting things done.

>From what I have seen, Pharo is the current popular Squeak derivative. I might 
>be wrong. My knowledge has a rot of 10+ years.

That being said.

A short recap:

- Smalltalk (ST) has 5 reserved words: true, false, super, self and nil. 
Everything else is in Classes, methods and objects.

- Arithmetic is not part of the language. "3 + 4" means the binary message '+' 
with argument '4' is sent to 3. Which means "3 + 4 * 5" evaluates to 35 (left 
to right) not 23 (multiplication before addition).

- Everything except variables is an object. Which is also true for Python.

- The image holds the complete state. On startup the image is loaded and every 
object recreated in RAM the way it was when the image was last saved. If the VM 
crashed either your last savepoint was good or you ended in the debugger or you 
really shot yourself in the foot.

- With Squeak and a 32-bit VM the limit was 512 MB for the image. I wonder 
where the limits are with 64 bit. A save writes the complete image...

- The last time I looked smalltalk didn't have what a Pythoneer would call a 
namespace.

- Deploying an application is... you don't have applications.




> Am 08.07.2017 um 20:45 schrieb Edward K. Ream :
> 
> 
> 
> On Friday, July 7, 2017 at 5:23:21 AM UTC-5, Edward K. Ream wrote:
> I'm beginning to wonder what the difference is between the Pharo way and 
> #511: reload-leo command.

Not much. You load stuff into RAM and do your best to keep it current.



> How does Pharo handle changes in object format or methods? How does Pharo 
> recover from crashes due to changed method signatures, invalid calls, etc?


It's a very integrated system. Class definitions are in image/RAM not a class 
file. Any Class/method can be changed at runtime because that's where they 
exist: in RAM at runtime. You have means to iterate over all objects and filter 
and manipulate them.



> This simple, deep video shows how at around 3:30.  It  illustrates a great 
> quote at 5:40:
> 
> "Objects are not there just to run whatever we put in classes.
> Objects are there to carry on a dialog with us as programmers."
> 
> Hmm. Roughly two minutes to change your world.

Please invest another hour to get back to earth. I would hate it if you get 
lost on another planet: https://www.youtube.com/watch?v=YX3iRjKj7C0

If you're impatient, start at 19:30 and watch 5 min.

I watch it at least once a year.


> So...Could we define a PharoObject class (in Python) that could do the same?  
> Has anyone already done so?  A quick google has not turned up anything.

Yes you can... if you also take the VM and the class system. The VM for 
performance. The class system for the magic.

If you want to know more about the magic: learn about MetaClasses and the class 
Behaviour.






If you really want to bring some of the good smalltalk stuff to Python: Write a 
class browser that works like the ST browser.


And get as much fun and inspiration you could get from Squeak/Pharo.


And please don't get lost.



-karsten


-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-08 Thread Edward K. Ream
On Sat, Jul 8, 2017 at 5:20 PM, Jacob MacDonald  wrote:

> Afraid not, it's firmly vaporware right now and thus I'm loath to talk
> about it before I've done any actual work.
>

​Hehe.  I'll wait with as much patience as I can muster ;-)

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-08 Thread Jacob MacDonald
Afraid not, it's firmly vaporware right now and thus I'm loath to talk
about it before I've done any actual work.

On Sat, Jul 8, 2017 at 5:17 PM Edward K. Ream  wrote:

> On Sat, Jul 8, 2017 at 3:51 PM, Jacob MacDonald 
> wrote:
>
>> This mailing list keeps getting filled with things I'm otherwise
>> interested in, from Fossil to Smalltalk! Since the beginning of this year
>> I've had the idea of creating a Smalltalk environment inside Leo; Perhaps
>> this is the inspiration needed for me to actually put some time into it.
>>
>
> ​That would be amazing. Can you give us a glimpse of your ideas?
>
> I've spent the afternoon happily going down the Pharo rabbit hole.  I'm
> tempted to lose myself in Pharo Wonderland...
>
> Edward
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-08 Thread Edward K. Ream
On Sat, Jul 8, 2017 at 3:51 PM, Jacob MacDonald  wrote:

> This mailing list keeps getting filled with things I'm otherwise
> interested in, from Fossil to Smalltalk! Since the beginning of this year
> I've had the idea of creating a Smalltalk environment inside Leo; Perhaps
> this is the inspiration needed for me to actually put some time into it.
>

​That would be amazing. Can you give us a glimpse of your ideas?

I've spent the afternoon happily going down the Pharo rabbit hole.  I'm
tempted to lose myself in Pharo Wonderland...

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-08 Thread Jacob MacDonald
This mailing list keeps getting filled with things I'm otherwise interested
in, from Fossil to Smalltalk! Since the beginning of this year I've had the
idea of creating a Smalltalk environment inside Leo; Perhaps this is the
inspiration needed for me to actually put some time into it.

On Sat, Jul 8, 2017 at 1:48 PM Edward K. Ream  wrote:

> On Saturday, July 8, 2017 at 1:45:26 PM UTC-5, Edward K. Ream wrote:
>
> So...Could we define a PharoObject class (in Python) that could do the
>> same?
>>
>
> I meant to say that if we want our app to emulate Pharo in Python all our
> app's objects should derive from PharoObject instead of object.  Hmm.  That
> might be a tad difficult for builtins...
>
>
> Edward
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-08 Thread Edward K. Ream
On Saturday, July 8, 2017 at 1:45:26 PM UTC-5, Edward K. Ream wrote:

So...Could we define a PharoObject class (in Python) that could do the same?
>

I meant to say that if we want our app to emulate Pharo in Python all our 
app's objects should derive from PharoObject instead of object.  Hmm.  That 
might be a tad difficult for builtins...

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-08 Thread Edward K. Ream


On Friday, July 7, 2017 at 5:23:21 AM UTC-5, Edward K. Ream wrote:
>
> I'm beginning to wonder what the difference is between the Pharo way and 
> #511: 
> reload-leo command. 
>
> How does Pharo handle changes in object format or methods? How does Pharo 
> recover from crashes due to changed method signatures, invalid calls, etc?
>

This simple, deep video  shows 
how at around 3:30.  It  illustrates a great quote at 5:40:

"Objects are not there just to run whatever we put in classes.
Objects are there to carry on a dialog with us as programmers."

Hmm. Roughly two minutes to change your world.

So...Could we define a PharoObject class (in Python) that could do the 
same?  Has anyone already done so?  A quick google has not turned up 
anything.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How does instant update work in Pharo?

2017-07-07 Thread Edward K. Ream
On Friday, July 7, 2017 at 9:41:51 AM UTC-5, Offray Vladimir Luna Cárdenas 
wrote:

I'm glad with this question, despite of not knowing the internals of how 
> this works, I just use it, but seeing this interest, I think is helpful in 
> the crosspollination of ideas.
>

We have been doing a lot of that lately.
 

> If there is a crash, Pharo will load an Epicea logger that allows you to 
> list and recover last unsaved changes you choose to.
>

Nice.
 

> Pharo support code refactoring by default (as usual in Smalltalk 
> versions), so any change is objects definition or methods is applied 
> consistently across the system with little user intervention.
>

Perhaps this is the heart of the matter.
 

> Developing in the debugger is kind of natural in Pharo and I have been 
> making such transition myself, despite of coming from the tradition of 
> developing in the file system, by writing files (how quaint! :-P).
>

Hehe.

I would advice to experience this by yourself. Click on the "Pharo3Theme 
> beCurrent" link. You will see the change happening lively. No freezing or 
> reloading involved.
>
 
Will do.  All this sounds very cool.
 

> I have passed your question to the Pharo community and I will post the 
> thread here, once starts to move.
>

Thanks. I am interested in learning how auto refactoring works.

Edward

>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.