Fwd: Meeting Aliens (callbacks) in the debugger - was this risky?

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

Fwd: Meeting Aliens (callbacks) in the debugger - was this risky?

Stéphane Ducasse


Begin forwarded message:

From: "Schwab,Wilhelm K" <[hidden email]>
Subject: FW: Meeting Aliens (callbacks) in the debugger - was this risky?
Date: March 21, 2012 1:57:16 AM GMT+01:00

Stef,

I am currently unable to post to the list  (Outlook is being a pain) - could you forward this for me?  I'm curious if I'm living dangerously or simply basking in Smalltalk's wonderful features.

Bill





From: Schwab,Wilhelm K
Sent: Tuesday, March 20, 2012 8:55 PM
To: [hidden email]
Subject: Meeting Aliens (callbacks) in the debugger - was this risky?

To see whether one can expect to set breakpoints in callback blocks, I gave it shot in #exampleCqsort:

    cb := Callback
            signature:  'int (*)(const void *, const void *)'
            block: [ :arg1 :arg2 | 
                self halt.
                ((arg1 doubleAt: 1) - (arg2 doubleAt: 1)) sign 
            ].

I then ran the example.  To my pleasant surprise/amazement, a walkback appeared and the debugger was functional; I was able to evaluate the accessors and get numbers.  Is this dangerous in some way, or does it "just work?"  It would be hugely helpful if it is safe.

Bill





Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Meeting Aliens (callbacks) in the debugger - was this risky?

Igor Stasenko
On 21 March 2012 07:40, Stéphane Ducasse <[hidden email]> wrote:

>
>
> Begin forwarded message:
>
> From: "Schwab,Wilhelm K" <[hidden email]>
> Subject: FW: Meeting Aliens (callbacks) in the debugger - was this risky?
> Date: March 21, 2012 1:57:16 AM GMT+01:00
> To: "[hidden email]" <[hidden email]>
>
> Stef,
>
> I am currently unable to post to the list  (Outlook is being a pain) - could
> you forward this for me?  I'm curious if I'm living dangerously or simply
> basking in Smalltalk's wonderful features.
>
> Bill
>
>
>
>
> ________________________________
> From: Schwab,Wilhelm K
> Sent: Tuesday, March 20, 2012 8:55 PM
> To: [hidden email]
> Subject: Meeting Aliens (callbacks) in the debugger - was this risky?
>
> To see whether one can expect to set breakpoints in callback blocks, I gave
> it shot in #exampleCqsort:
>
>     cb := Callback
>             signature:  'int (*)(const void *, const void *)'
>             block: [ :arg1 :arg2 |
>                 self halt.
>                 ((arg1 doubleAt: 1) - (arg2 doubleAt: 1)) sign
>             ].
>
> I then ran the example.  To my pleasant surprise/amazement, a walkback
> appeared and the debugger was functional; I was able to evaluate the
> accessors and get numbers.  Is this dangerous in some way, or does it "just
> work?"  It would be hugely helpful if it is safe.
>
> Bill
>

Should be fine.
Unless you abandon the process :) But there should be a measures
preventing you from doing that.


--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Meeting Aliens (callbacks) in the debugger - was this risky?

Schwab,Wilhelm K
Sig,

Great news!  I'm fixing some nomenclature, after which it will be time to release the dogs on callbacks.  It would be great to get me to a point of understanding them and being able to put (curve fit) function definitions back into the image.

Thanks!

Bill



________________________________________
From: [hidden email] [[hidden email]] on behalf of Igor Stasenko [[hidden email]]
Sent: Wednesday, March 21, 2012 12:19 PM
To: [hidden email]
Subject: Re: [Pharo-project] Fwd: Meeting Aliens (callbacks) in the debugger - was this risky?

On 21 March 2012 07:40, Stéphane Ducasse <[hidden email]> wrote:

>
>
> Begin forwarded message:
>
> From: "Schwab,Wilhelm K" <[hidden email]>
> Subject: FW: Meeting Aliens (callbacks) in the debugger - was this risky?
> Date: March 21, 2012 1:57:16 AM GMT+01:00
> To: "[hidden email]" <[hidden email]>
>
> Stef,
>
> I am currently unable to post to the list  (Outlook is being a pain) - could
> you forward this for me?  I'm curious if I'm living dangerously or simply
> basking in Smalltalk's wonderful features.
>
> Bill
>
>
>
>
> ________________________________
> From: Schwab,Wilhelm K
> Sent: Tuesday, March 20, 2012 8:55 PM
> To: [hidden email]
> Subject: Meeting Aliens (callbacks) in the debugger - was this risky?
>
> To see whether one can expect to set breakpoints in callback blocks, I gave
> it shot in #exampleCqsort:
>
>     cb := Callback
>             signature:  'int (*)(const void *, const void *)'
>             block: [ :arg1 :arg2 |
>                 self halt.
>                 ((arg1 doubleAt: 1) - (arg2 doubleAt: 1)) sign
>             ].
>
> I then ran the example.  To my pleasant surprise/amazement, a walkback
> appeared and the debugger was functional; I was able to evaluate the
> accessors and get numbers.  Is this dangerous in some way, or does it "just
> work?"  It would be hugely helpful if it is safe.
>
> Bill
>

Should be fine.
Unless you abandon the process :) But there should be a measures
preventing you from doing that.


--
Best regards,
Igor Stasenko.