Re: [Pharo-users] Dynabook concept under Dr. Geo perspective

2018-08-10 Thread Hilaire
In the cited post bellow, I pointed to the wrong text regarding Dr. Geo and 
Dynamic media. 

Here is the right one:
http://blog.drgeo.eu/post/2018/Dr.-Geo-and-Dynamic-media


Hilaire

Le 19/07/2018 à 15:19, Hilaire a écrit :
> Hi,
>
> The Dynabook concept and Dr. Geo share some values.
>
> Here is how http://blog.drgeo.eu/post/2018/The-Dynabook-Concept
>
> Hilaire

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





Re: [Pharo-users] Why is there no #assert:notEquals: or #shouldnt:equal: or #deny:equals: method?

2018-08-10 Thread Guillermo Polito
Personally I think that SUnit needs love.
 - The API is clearly not clear (just see: the command line handler,
smalltalk ci, calypso and the test runner tool use different APIs that are
not equivalent and do not go through the same hooks)
 - The existing hooks are not enough and not well documented, other than
overriding #runCase:, how can we define parameterizable tests for example?

With Julien (in cc) we were thinking some improvements on this front. He
has a new UI for the test runner that is cleaner and will allow having
different backends (which will mean also that we will need to clarify the
API).

I think in Pharo7 there have been some improvements in the assertions front?

On Thu, Aug 9, 2018 at 3:07 PM Tim Mackinnon  wrote:

> I’m trying to write more exercism tests and I’m baffled why there isn’t
> the inverse equivalent of #assert:equals: which shows a useful test
> response where you can easily see what’s going on.
>
> #assert:equals: is very nice, showing you a diff browser - I kind of
> expect the opposite to be there, but it all looks like a bit of mess with
> assert vs should and deny vs shouldn’t -did we change tact somewhere over
> the years and not deprecate stuff?
>
> Tim
>


-- 



Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - *http://www.cnrs.fr
*


*Web:* *http://guillep.github.io* 

*Phone: *+33 06 52 70 66 13


Re: [Pharo-users] Making TDD in pharo work properly (aka - walkback on a missing class is nasty)

2018-08-10 Thread Francisco Ortiz Peñaloza
Marcus,

I love this idea, not showing the menu at all would be more aligned to live
coding. As you said in a later e-mail it must be fixed at runtime, while
running the tests.

Thanks!


On Thu, Aug 9, 2018 at 5:07 AM Marcus Denker  wrote:

> >
> >
> >> 2) when coding - if you want reference a missing class, why don’t we
> let you? TonelReader seems to do it, why can’t the editor? (This probably
> applies to variables as well - show them broken, let me fix it when I
> choose. The iVar case is a little rarer - although I hate the way we prompt
> fix, prompt fix instead of doing it in one go - it’s very old fashioned)
> >>
> >
>
>
> An alternative could be to not show the menu at all. Instead just compile
> (I like the ideas that “everything can be compiled and run”).
>
>  Just compile the Undeclared and instead of breaking the flow, we should
> add a menu to the editor to do the “define Class” “Define Trait”…
> (with the gutter icons, we can provide a menu easily).
>
> I will make a small demo for that, too.
>
> Marcus
>


Re: [Pharo-users] Why is there no #assert:notEquals: or #shouldnt:equal: or #deny:equals: method?

2018-08-10 Thread Joachim Tuchel
I personally think that the methods you suggest as examples pollute the API 
without adding any value. Just because Java and others added these doesn’t 
justify a bad API. SUnit was intended to be mean and lightweight. Adding lots 
of permutations to it doesn’t actually make it any better, just ugly.

I see some space for improvements in logging and keeping details for CI 
scenarios, however.

Joachim

> Am 10.08.2018 um 10:33 schrieb Guillermo Polito :
> 
> Personally I think that SUnit needs love. 
>  - The API is clearly not clear (just see: the command line handler, 
> smalltalk ci, calypso and the test runner tool use different APIs that are 
> not equivalent and do not go through the same hooks)
>  - The existing hooks are not enough and not well documented, other than 
> overriding #runCase:, how can we define parameterizable tests for example?
> 
> With Julien (in cc) we were thinking some improvements on this front. He has 
> a new UI for the test runner that is cleaner and will allow having different 
> backends (which will mean also that we will need to clarify the API).
> 
> I think in Pharo7 there have been some improvements in the assertions front?
> 
>> On Thu, Aug 9, 2018 at 3:07 PM Tim Mackinnon  wrote:
>> I’m trying to write more exercism tests and I’m baffled why there isn’t the 
>> inverse equivalent of #assert:equals: which shows a useful test response 
>> where you can easily see what’s going on.
>> 
>> #assert:equals: is very nice, showing you a diff browser - I kind of expect 
>> the opposite to be there, but it all looks like a bit of mess with assert vs 
>> should and deny vs shouldn’t -did we change tact somewhere over the years 
>> and not deprecate stuff?
>> 
>> Tim
> 
> 
> -- 
>
> Guille Polito
> Research Engineer
> Centre de Recherche en Informatique, Signal et Automatique de Lille
> CRIStAL - UMR 9189
> French National Center for Scientific Research - http://www.cnrs.fr
> 
> Web: http://guillep.github.io
> Phone: +33 06 52 70 66 13


Re: [Pharo-users] Making TDD in pharo work properly (aka - walkback on a missing class is nasty)

2018-08-10 Thread Tim Mackinnon
Hey Marcus (or those knowledgable about stacks and contexts) - to self #1 - 
where the create button generates a class instead of a method, I’m a bit out of 
my depth.

I can see there is a DoesNotUnderstandDebugAction (which the create button 
calls).

So to determine if the failure was due to a missing class or method - would 
this work?

msg := self interruptedContext tempAt: 1.
(msg lookupClass == UndefinedObject ) ifTrue: [ … create a class

E.g. if you’re trying to send a msg to nil (which is what got patched into the 
compiled method for a missing class) then you are dealing with a missing class?


AND then for create a class - how do I extract the name?

I can get the compiled method for msg - but how do I marry that up with what 
you were executing? Am I write in thinking that the AST nodes and there 
locations might line up with the stack pointer somehow (or something like 
that)… if I can get that - then I get the name of the missing class and can 
then create it and then rerun the method right?

This is very neat stuff I ‘ve never played with before.

Tim





> On 9 Aug 2018, at 11:02, Marcus Denker  wrote:
> 
> 
> 
>> On 9 Aug 2018, at 10:59, Guillermo Polito > > wrote:
>> 
>> Hi Marcus,
>> 
>> Is it wise to backport things that may break things like this?
> maybe not, but it just took 5 minutes as it is very simple
> 
>> I'd prefer to put the energy on backporting the workaround to avoid the 
>> infinite debuggers...
>> 
> 
> Yes.
> 
>> On Thu, Aug 9, 2018 at 10:50 AM Marcus Denker > > wrote:
>>> 
 2) when coding - if you want reference a missing class, why don’t we let 
 you? TonelReader seems to do it, why can’t the editor? (This probably 
 applies to variables as well - show them broken, let me fix it when I 
 choose. The iVar case is a little rarer - although I hate the way we 
 prompt fix, prompt fix instead of doing it in one go - it’s very old 
 fashioned)
 
>>> 
>>> This is fixed in Pharo7: we added a menu entry “leave undeclared” as the 
>>> first option:
>>> 
 Does anyone have tips on solving these? It spoils the exercism experience 
 that I thought we could convey, so I’d like to at least fix #1 in 6.1 if I 
 can.
 
>>> 
>>> I will back port the fix for 2) to Pharo6 and will do a quick prototype for 
>>> 1) 
>>> 
>> 
>> https://pharo.fogbugz.com/f/cases/22305/Backport-to-Pharo6-Leave-Variable-Undeclared
>>  
>> 
>> 
>>  Marcus
>> 
>> 
>> 
>> -- 
>>
>> Guille Polito
>> Research Engineer
>> 
>> Centre de Recherche en Informatique, Signal et Automatique de Lille
>> CRIStAL - UMR 9189
>> French National Center for Scientific Research - http://www.cnrs.fr 
>> 
>> 
>> Web: http://guillep.github.io 
>> Phone: +33 06 52 70 66 13
> 



Re: [Pharo-users] Why is there no #assert:notEquals: or #shouldnt:equal: or #deny:equals: method?

2018-08-10 Thread Tim Mackinnon
Actually - all those methods are already there - it looks like no-one could 
decide, so I agree that it should be small and concise - however equally test 
failures should be clear and easy to deal with - which is where assert:equals: 
is brilliant - such a huge time saver when you hit it, as you can easily 
understand the problem. So similarly, deny:equals: is a big saver as well - you 
get the same immediate feedback that confirms what happened in a test.

If the interface is too thin - and you have to create all these helper methods 
yourself - its just a pain.  But it would be good to agree on whether we are 
using assert or should.

Tim

> On 10 Aug 2018, at 16:16, Joachim Tuchel  wrote:
> 
> I personally think that the methods you suggest as examples pollute the API 
> without adding any value. Just because Java and others added these doesn’t 
> justify a bad API. SUnit was intended to be mean and lightweight. Adding lots 
> of permutations to it doesn’t actually make it any better, just ugly.
> 
> I see some space for improvements in logging and keeping details for CI 
> scenarios, however.
> 
> Joachim
> 
> Am 10.08.2018 um 10:33 schrieb Guillermo Polito  >:
> 
>> Personally I think that SUnit needs love. 
>>  - The API is clearly not clear (just see: the command line handler, 
>> smalltalk ci, calypso and the test runner tool use different APIs that are 
>> not equivalent and do not go through the same hooks)
>>  - The existing hooks are not enough and not well documented, other than 
>> overriding #runCase:, how can we define parameterizable tests for example?
>> 
>> With Julien (in cc) we were thinking some improvements on this front. He has 
>> a new UI for the test runner that is cleaner and will allow having different 
>> backends (which will mean also that we will need to clarify the API).
>> 
>> I think in Pharo7 there have been some improvements in the assertions front?
>> 
>> On Thu, Aug 9, 2018 at 3:07 PM Tim Mackinnon > > wrote:
>> I’m trying to write more exercism tests and I’m baffled why there isn’t the 
>> inverse equivalent of #assert:equals: which shows a useful test response 
>> where you can easily see what’s going on.
>> 
>> #assert:equals: is very nice, showing you a diff browser - I kind of expect 
>> the opposite to be there, but it all looks like a bit of mess with assert vs 
>> should and deny vs shouldn’t -did we change tact somewhere over the years 
>> and not deprecate stuff?
>> 
>> Tim
>> 
>> 
>> -- 
>>
>> Guille Polito
>> Research Engineer
>> 
>> Centre de Recherche en Informatique, Signal et Automatique de Lille
>> CRIStAL - UMR 9189
>> French National Center for Scientific Research - http://www.cnrs.fr 
>> 
>> 
>> Web: http://guillep.github.io 
>> Phone: +33 06 52 70 66 13



Re: [Pharo-users] Why is there no #assert:notEquals: or #shouldnt:equal: or #deny:equals: method?

2018-08-10 Thread Herbert Vojčík

If you want expressive DSL for various assertions, Mocketry has one.

I sort-of used to this approach from JS testing where mocha actually 
expects you will use your own assertion lib (eg. chai).


Herby

Tim Mackinnon wrote on 10. 8. 2018 16:34:
Actually - all those methods are already there - it looks like no-one 
could decide, so I agree that it should be small and concise - however 
equally test failures should be clear and easy to deal with - which is 
where assert:equals: is brilliant - such a huge time saver when you hit 
it, as you can easily understand the problem. So similarly, deny:equals: 
is a big saver as well - you get the same immediate feedback that 
confirms what happened in a test.


If the interface is too thin - and you have to create all these helper 
methods yourself - its just a pain.  But it would be good to agree on 
whether we are using assert or should.


Tim

On 10 Aug 2018, at 16:16, Joachim Tuchel > wrote:


I personally think that the methods you suggest as examples pollute 
the API without adding any value. Just because Java and others added 
these doesn’t justify a bad API. SUnit was intended to be mean and 
lightweight. Adding lots of permutations to it doesn’t actually make 
it any better, just ugly.


I see some space for improvements in logging and keeping details for 
CI scenarios, however.


Joachim

Am 10.08.2018 um 10:33 schrieb Guillermo Polito 
mailto:guillermopol...@gmail.com>>:



Personally I think that SUnit needs love.
 - The API is clearly not clear (just see: the command line handler, 
smalltalk ci, calypso and the test runner tool use different APIs 
that are not equivalent and do not go through the same hooks)
 - The existing hooks are not enough and not well documented, other 
than overriding #runCase:, how can we define parameterizable tests 
for example?


With Julien (in cc) we were thinking some improvements on this front. 
He has a new UI for the test runner that is cleaner and will allow 
having different backends (which will mean also that we will need to 
clarify the API).


I think in Pharo7 there have been some improvements in the assertions 
front?


On Thu, Aug 9, 2018 at 3:07 PM Tim Mackinnon > wrote:


I’m trying to write more exercism tests and I’m baffled why there
isn’t the inverse equivalent of #assert:equals: which shows a
useful test response where you can easily see what’s going on.

#assert:equals: is very nice, showing you a diff browser - I kind
of expect the opposite to be there, but it all looks like a bit
of mess with assert vs should and deny vs shouldn’t -did we
change tact somewhere over the years and not deprecate stuff?

Tim



--

Guille Polito
Research Engineer


Centre de Recherche en Informatique, Signal et Automatique de Lille
CRIStAL - UMR 9189
French National Center for Scientific Research - _http://www.cnrs.fr 
_


*Web:* _http://guillep.github.io_ 
*Phone: *+33 06 52 70 66 13







Re: [Pharo-users] Making TDD in pharo work properly (aka - walkback on a missing class is nasty)

2018-08-10 Thread Tim Mackinnon
Actually I think I figured that bit out - a bit clumsily - (pointers 
appreciated)

createMissingClassActionFor: aMessage in: aContext
|errorNode senderContext newClass variableNode |
senderContext := aContext sender.
errorNode := senderContext method sourceNodeExecutedForPC: 
senderContext pc. 
variableNode := errorNode receiver receiver.

newClass := OCUndeclaredVariableWarning new node: variableNode; 
defineClass: variableNode name.
aContext restart.

However that last line is wrong, as it doesn’t restart with my newly defined 
class - I also tried

aContext restartWithNewReceiver: newClass

But again, I get a debugger where my class is still bound to nil. So what’s the 
trick to re-evaluate with the new class I’ve created? Or maybe I’m totally on 
the wrong track (still its very interesting…)

Tim

> On 10 Aug 2018, at 16:30, Tim Mackinnon  wrote:
> 
> Hey Marcus (or those knowledgable about stacks and contexts) - to self #1 - 
> where the create button generates a class instead of a method, I’m a bit out 
> of my depth.
> 
> I can see there is a DoesNotUnderstandDebugAction (which the create button 
> calls).
> 
> So to determine if the failure was due to a missing class or method - would 
> this work?
> 
> msg := self interruptedContext tempAt: 1.
> (msg lookupClass == UndefinedObject ) ifTrue: [ … create a class
> 
> E.g. if you’re trying to send a msg to nil (which is what got patched into 
> the compiled method for a missing class) then you are dealing with a missing 
> class?
> 
> 
> AND then for create a class - how do I extract the name?
> 
> I can get the compiled method for msg - but how do I marry that up with what 
> you were executing? Am I write in thinking that the AST nodes and there 
> locations might line up with the stack pointer somehow (or something like 
> that)… if I can get that - then I get the name of the missing class and can 
> then create it and then rerun the method right?
> 
> This is very neat stuff I ‘ve never played with before.
> 
> Tim
> 
> 
> 
> 
> 
>> On 9 Aug 2018, at 11:02, Marcus Denker > > wrote:
>> 
>> 
>> 
>>> On 9 Aug 2018, at 10:59, Guillermo Polito >> > wrote:
>>> 
>>> Hi Marcus,
>>> 
>>> Is it wise to backport things that may break things like this?
>> maybe not, but it just took 5 minutes as it is very simple
>> 
>>> I'd prefer to put the energy on backporting the workaround to avoid the 
>>> infinite debuggers...
>>> 
>> 
>> Yes.
>> 
>>> On Thu, Aug 9, 2018 at 10:50 AM Marcus Denker >> > wrote:
 
> 2) when coding - if you want reference a missing class, why don’t we let 
> you? TonelReader seems to do it, why can’t the editor? (This probably 
> applies to variables as well - show them broken, let me fix it when I 
> choose. The iVar case is a little rarer - although I hate the way we 
> prompt fix, prompt fix instead of doing it in one go - it’s very old 
> fashioned)
> 
 
 This is fixed in Pharo7: we added a menu entry “leave undeclared” as the 
 first option:
 
> Does anyone have tips on solving these? It spoils the exercism experience 
> that I thought we could convey, so I’d like to at least fix #1 in 6.1 if 
> I can.
> 
 
 I will back port the fix for 2) to Pharo6 and will do a quick prototype 
 for 1) 
 
>>> 
>>> https://pharo.fogbugz.com/f/cases/22305/Backport-to-Pharo6-Leave-Variable-Undeclared
>>>  
>>> 
>>> 
>>> Marcus
>>> 
>>> 
>>> 
>>> -- 
>>>
>>> Guille Polito
>>> Research Engineer
>>> 
>>> Centre de Recherche en Informatique, Signal et Automatique de Lille
>>> CRIStAL - UMR 9189
>>> French National Center for Scientific Research - http://www.cnrs.fr 
>>> 
>>> 
>>> Web: http://guillep.github.io 
>>> Phone: +33 06 52 70 66 13
>> 
> 



Re: [Pharo-users] Jupyter notebooks / Dynabook / JupyterTalk

2018-08-10 Thread Offray Vladimir Luna Cárdenas
Hi,

Yes, Grafoscopio exist to overcome limitations of Jupyter as Andrew
says, its lack of a object model but also its overcomplicated
architecture[0]. I have said that in some way, Grafoscopio and
JupyterLab[1] are following opposite paths. The last started as an
interactive notebook and is trying to become an IDE (with "I" for
Interactive, not for Integrated) and the former started from the Pharo
IDE and is trying to provide interactive notebook capabilities.

[0]
http://mutabit.com/offray/static/blog/output/posts/grafoscopio-idea-and-initial-progress.html
[1] https://github.com/jupyterlab/jupyterlab

At some point is also a deconstruction over the idea of the Active Essay
proposed by Alan Kay and his team. I think that the problem with the
Dynabook is that is so rooted into the future that, when time passes and
the present occupies the place of the vision from the past, it usually
does with some subobtimal but popular technology (the web, Java, CORBA,
you name it). At some point I think that this is because, despite of the
Dynabook being from children from 6 to 100 years, most of the research
was done with children and teenagers and the adult world was occupied by
those other popular technologies and because the world is inherited by
the majority of adults to children we have the world that we have today.
I wonder what happen with the Dynabook kids? How are they now as adults?
It seems that the role of becoming and adult (or being already one) was
not deeply deployed by the Dynabook and there is a lot of room to do in
that place, for teachers (as DrGeo and Hilaire writings are showing),
for researchers, journalists, investigators, activists, as Grafoscopio
is trying to show.

At some point I would like better integration between Grafoscopio and
GTDocumenter, but is a project that advances slowly with a solo main
developer and with not wide use in the Pharo community (I think is
because the use of Markdown instead of Pillar, among other reasons) or
other commit contributions. In that sense is pretty similar to other
FLOSS projects that are coded by one or two developers. But for the last
quarter of this year the local community is going to make some kind of
anti-bootcamp and I hope to show some advances in Grafoscopio in the end
of the year as a result of this.

With Pharo 7 and the eventual integration of GTDocumenter in future
Pharo releases I think we could be approach/deconstruct the Dynabook
even more.

Cheers,

Offray

On 07/08/18 14:00, Andrew Glynn wrote:
> Grafoscopio exists due to various limitations of Jupyter, particularly the 
> lack of real support for objects in its core language - Python.  JSON is not 
> equivalent to STON even in terms of storing JavaScript, it's mainly a data 
> format.
>
> On 8/7/18, 2:14 PM, "Pharo-users on behalf of Sean P. DeNigris" 
>  
> wrote:
>
> Hannes Hirzel wrote
> > P.S. Some notes and links how Jupyter notebooks relate to the Dynabook
> > idea here
> > http://wiki.squeak.org/squeak/1318
> 
> From the swiki: "A Jupyter Notebook is… similar to Active Essays kept in a
> Smalltalk based Dynabook."
> 
> I've understood a key point of the Dynabook dream (and Smalltalk as
> prototype Dynabook software) is that as you drill down to something facing
> the end user, you keep the full power of the computer. For example, when
> Alan Kay presents, he doesn't use Powerpoint, but Squeak. Hence, the 
> slides
> are each fully functioning World where one can e.g. bring up halos,
> inspectors, class browsers.
> 
> Is that the case with Jupiter Notebooks? I assumed not since the notebooks
> seem to be saved as JSON, unless maybe it's used for object serialization
> like STON?
> 
> 
> 
> -
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> 
> 
>
>
>
>