On Aug 28, 2011, at 7:24 PM, Sean P. DeNigris wrote:
2. Using Object to halt causes bloat, and doesn't buy much (except that's how we've always done it).
Back in the days, we were virtually crucified for introducing the Beeper class along the same reasoning... The Beeper actually got very depressed due to having his very existance being questioned. "I am just the result of a random refactoring" he was complaining "maybe I should just just delete myself and everyone will be happy". (you know, reflection *is* dangerous! There has been a lot of talk to make reflection more secure... for a reason!). To cheer him up, I gave him the lead role in a real, peer reviewed Paper: http://scg.unibe.ch/archive/papers/Denk08bMetaContextLNBIP.pdf The Beeper thus was the first Class to be really "Meta" in the history of Objects. What a thrill. In an interview, the Beeper said: "You know, being meta is hard to decribe... Classes claim to be Meta all the time. But I doubt they ever really are Meta. Being Meta is special. The whole System looks different when meta!" ;-) -- Marcus Denker -- http://marcusdenker.de
We have a class Halt and the class-side is empty. This seems to be the right place to hold all the code in the protocols #debugging and #debuggin-haltonce of Object. With a few renames we could get a really nice DSL: Halt now. Halt if: a = 2. Halt once. Lukas On 28 August 2011 19:47, Marcus Denker <marcus.denker@inria.fr> wrote:
On Aug 28, 2011, at 7:24 PM, Sean P. DeNigris wrote:
2. Using Object to halt causes bloat, and doesn't buy much (except that's how we've always done it).
Back in the days, we were virtually crucified for introducing the Beeper class along the same reasoning...
The Beeper actually got very depressed due to having his very existance being questioned.
"I am just the result of a random refactoring" he was complaining "maybe I should just just delete myself and everyone will be happy".
(you know, reflection *is* dangerous! There has been a lot of talk to make reflection more secure... for a reason!).
To cheer him up, I gave him the lead role in a real, peer reviewed Paper:
    http://scg.unibe.ch/archive/papers/Denk08bMetaContextLNBIP.pdf
The Beeper thus was the first Class to be really "Meta" in the history of Objects. What a thrill. In an interview, the Beeper said: "You know, being meta is hard to decribe... Classes claim to be Meta all the time. But I doubt they ever really are Meta. Being Meta is special. The whole System looks different when meta!"
;-)
-- Marcus Denker -- http://marcusdenker.de
-- Lukas Renggli www.lukas-renggli.ch
and we could keep all the Object method in a extension of the halt packages and just some of them as forward to Halt. I know that there was an attempt on the inbox to do that. But I was worried that people will complain. Now cleaning Object would be nice. Stef On Aug 28, 2011, at 8:10 PM, Lukas Renggli wrote:
We have a class Halt and the class-side is empty. This seems to be the right place to hold all the code in the protocols #debugging and #debuggin-haltonce of Object. With a few renames we could get a really nice DSL:
Halt now. Halt if: a = 2.
why not Halt ifTrue: [a = 2]. ? two questions in my questions :) [] and True:
Halt once.
Lukas
On 28 August 2011 19:47, Marcus Denker <marcus.denker@inria.fr> wrote:
On Aug 28, 2011, at 7:24 PM, Sean P. DeNigris wrote:
2. Using Object to halt causes bloat, and doesn't buy much (except that's how we've always done it).
Back in the days, we were virtually crucified for introducing the Beeper class along the same reasoning...
The Beeper actually got very depressed due to having his very existance being questioned.
"I am just the result of a random refactoring" he was complaining "maybe I should just just delete myself and everyone will be happy".
(you know, reflection *is* dangerous! There has been a lot of talk to make reflection more secure... for a reason!).
To cheer him up, I gave him the lead role in a real, peer reviewed Paper:
http://scg.unibe.ch/archive/papers/Denk08bMetaContextLNBIP.pdf
The Beeper thus was the first Class to be really "Meta" in the history of Objects. What a thrill. In an interview, the Beeper said: "You know, being meta is hard to decribe... Classes claim to be Meta all the time. But I doubt they ever really are Meta. Being Meta is special. The whole System looks different when meta!"
;-)
-- Marcus Denker -- http://marcusdenker.de
-- Lukas Renggli www.lukas-renggli.ch
On Mon, Aug 29, 2011 at 9:29 AM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
    Halt ifTrue: [a = 2].
two questions in my questions :) [] and True:
why would you need a block here? The expression is going to be evaluated once and only once: if the expression is true than a debugger pops up otherwise nothing happens. #if is shorted than #ifTrue and closer to English: "please halt if the variable a equals 2" -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
On Mon, 29 Aug 2011, Stéphane Ducasse wrote:
and we could keep all the Object method in a extension of the halt packages and just some of them as forward to Halt.
I know that there was an attempt on the inbox to do that. But I was worried that people will complain. Now cleaning Object would be nice.
Stef
On Aug 28, 2011, at 8:10 PM, Lukas Renggli wrote:
We have a class Halt and the class-side is empty. This seems to be the right place to hold all the code in the protocols #debugging and #debuggin-haltonce of Object. With a few renames we could get a really nice DSL:
Halt now. Halt if: a = 2.
why not Halt ifTrue: [a = 2].
?
two questions in my questions :) [] and True:
Currently you can't send #ifTrue: to any object. If you want to enable that, then you have to: - remove the optimization which will result in worse performance and will break code that assumes this method is atomic - or you have to change the compiler to generate extra bytecodes which will perform the real message send when the receiver is not a boolean and change the VM to not send the message in specialObjectsArray (currently #mustBeBoolean), but execute those extra bytecodes - or you have to change the handling of NonBooleanReceiver, use the decompiler to find out what has to be sent to who, etc. Btw Halt if: a = 2 is much more readable IMHO. Levente
Halt once.
Lukas
On 28 August 2011 19:47, Marcus Denker <marcus.denker@inria.fr> wrote:
On Aug 28, 2011, at 7:24 PM, Sean P. DeNigris wrote:
2. Using Object to halt causes bloat, and doesn't buy much (except that's how we've always done it).
Back in the days, we were virtually crucified for introducing the Beeper class along the same reasoning...
The Beeper actually got very depressed due to having his very existance being questioned.
"I am just the result of a random refactoring" he was complaining "maybe I should just just delete myself and everyone will be happy".
(you know, reflection *is* dangerous! There has been a lot of talk to make reflection more secure... for a reason!).
To cheer him up, I gave him the lead role in a real, peer reviewed Paper:
http://scg.unibe.ch/archive/papers/Denk08bMetaContextLNBIP.pdf
The Beeper thus was the first Class to be really "Meta" in the history of Objects. What a thrill. In an interview, the Beeper said: "You know, being meta is hard to decribe... Classes claim to be Meta all the time. But I doubt they ever really are Meta. Being Meta is special. The whole System looks different when meta!"
;-)
-- Marcus Denker -- http://marcusdenker.de
-- Lukas Renggli www.lukas-renggli.ch
2011/8/29 Levente Uzonyi <leves@elte.hu>
On Mon, 29 Aug 2011, Stéphane Ducasse wrote:
and we could keep all the Object method in a extension of the halt
packages and just some of them as forward to Halt.
I know that there was an attempt on the inbox to do that. But I was worried that people will complain. Now cleaning Object would be nice.
Stef
On Aug 28, 2011, at 8:10 PM, Lukas Renggli wrote:
We have a class Halt and the class-side is empty. This seems to be the
right place to hold all the code in the protocols #debugging and #debuggin-haltonce of Object. With a few renames we could get a really nice DSL:
Halt now. Halt if: a = 2.
why not Halt ifTrue: [a = 2].
?
two questions in my questions :) [] and True:
Hi Levente,
Currently you can't send #ifTrue: to any object.
I did not get this interesting point. I know that ifTrue: ... messages are optimized with special bytecodes. But, implementing Halt class>>ifTrue: would work. What am I missing? Thanks, Luc
If you want to enable that, then you have to: - remove the optimization which will result in worse performance and will break code that assumes this method is atomic - or you have to change the compiler to generate extra bytecodes which will perform the real message send when the receiver is not a boolean and change the VM to not send the message in specialObjectsArray (currently #mustBeBoolean), but execute those extra bytecodes - or you have to change the handling of NonBooleanReceiver, use the decompiler to find out what has to be sent to who, etc.
Btw Halt if: a = 2 is much more readable IMHO.
Levente
Halt once.
Lukas
On 28 August 2011 19:47, Marcus Denker <marcus.denker@inria.fr> wrote:
On Aug 28, 2011, at 7:24 PM, Sean P. DeNigris wrote:
2. Using Object to halt causes bloat, and doesn't buy much (except that's how we've always done it).
Back in the days, we were virtually crucified for introducing the Beeper class along the same reasoning...
The Beeper actually got very depressed due to having his very existance being questioned.
"I am just the result of a random refactoring" he was complaining "maybe I should just just delete myself and everyone will be happy".
(you know, reflection *is* dangerous! There has been a lot of talk to make reflection more secure... for a reason!).
To cheer him up, I gave him the lead role in a real, peer reviewed Paper:
http://scg.unibe.ch/archive/**papers/** Denk08bMetaContextLNBIP.pdf<http://scg.unibe.ch/archive/papers/Denk08bMetaContextLNBIP.pdf>
The Beeper thus was the first Class to be really "Meta" in the history of Objects. What a thrill. In an interview, the Beeper said: "You know, being meta is hard to decribe... Classes claim to be Meta all the time. But I doubt they ever really are Meta. Being Meta is special. The whole System looks different when meta!"
;-)
-- Marcus Denker -- http://marcusdenker.de
-- Lukas Renggli www.lukas-renggli.ch
Currently you can't send #ifTrue: to any object.
I did not get this interesting point. I know that ifTrue: ... messages are optimized with special bytecodes. But, implementing Halt class>>ifTrue: would work. What am I missing?
Thanks,
Luc indeed ifTrue: is handled specially by the compiler. The problem is that it would have to get changed if we wanted to have something else. BTW I found strange that the following does not refer to 'plop' in a way or another. foo self ifTrue: ['plop'] 13 <70> self 14 <87> pop 15 <78> returnSelf
Anyway, (Halt ifTrue: a = 2) does not make it. We all expect the ifTrue: condition to lie left of the message... So Halt if: a = 2, or Halt when: a = 2 are far better selectors IMO. Nicolas 2011/8/29 Luc Fabresse <luc.fabresse@gmail.com>:
2011/8/29 Levente Uzonyi <leves@elte.hu>
On Mon, 29 Aug 2011, Stéphane Ducasse wrote:
and we could keep all the Object method in a extension of the halt packages and just some of them as forward to Halt.
I know that there was an attempt on the inbox to do that. But I was worried that people will complain. Now cleaning Object would be nice.
Stef
On Aug 28, 2011, at 8:10 PM, Lukas Renggli wrote:
We have a class Halt and the class-side is empty. This seems to be the right place to hold all the code in the protocols #debugging and #debuggin-haltonce of Object. With a few renames we could get a really nice DSL:
 Halt now.  Halt if: a = 2.
why not     Halt ifTrue: [a = 2].
?
two questions in my questions :) [] and True:
Hi Levente,
Currently you can't send #ifTrue: to any object.
I did not get this interesting point. I know that ifTrue: ... messages are optimized with special bytecodes. But, implementing Halt class>>ifTrue: would work. What am I missing?
Thanks,
Luc
If you want to enable that, then you have to: - remove the optimization which will result in worse performance and will break code that assumes this method is atomic - or you have to change the compiler to generate extra bytecodes which will perform the real message send when the receiver is not a boolean and change the VM to not send the message in specialObjectsArray (currently #mustBeBoolean), but execute those extra bytecodes - or you have to change the handling of NonBooleanReceiver, use the decompiler to find out what has to be sent to who, etc.
Btw Halt if: a = 2 is much more readable IMHO.
Levente
 Halt once.
Lukas
On 28 August 2011 19:47, Marcus Denker <marcus.denker@inria.fr> wrote:
On Aug 28, 2011, at 7:24 PM, Sean P. DeNigris wrote:
2. Using Object to halt causes bloat, and doesn't buy much (except that's how we've always done it).
Back in the days, we were virtually crucified for introducing the Beeper class along the same reasoning...
The Beeper actually got very depressed due to having his very existance being questioned.
"I am just the result of a random refactoring" he was complaining "maybe I should just just delete myself and everyone will be happy".
(you know, reflection *is* dangerous! There has been a lot of talk to make reflection more secure... for a reason!).
To cheer him up, I gave him the lead role in a real, peer reviewed Paper:
   http://scg.unibe.ch/archive/papers/Denk08bMetaContextLNBIP.pdf
The Beeper thus was the first Class to be really "Meta" in the history of Objects. What a thrill. In an interview, the Beeper said: "You know, being meta is hard to decribe... Classes claim to be Meta all the time. But I doubt they ever really are Meta. Being Meta is special. The whole System looks different when meta!"
;-)
-- Marcus Denker -- http://marcusdenker.de
-- Lukas Renggli www.lukas-renggli.ch
2011/8/29 Levente Uzonyi <leves@elte.hu>:
Currently you can't send #ifTrue: to any object.
Looks like it works on Pharo 1.3. I created a class with an #ifTrue: method and I can call it without problem -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
How? because I get Foo new ifTrue: ['sss'] mustBeABoolean On Aug 29, 2011, at 10:50 AM, Damien Cassou wrote:
2011/8/29 Levente Uzonyi <leves@elte.hu>:
Currently you can't send #ifTrue: to any object.
Looks like it works on Pharo 1.3. I created a class with an #ifTrue: method and I can call it without problem
-- Damien Cassou http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
and we could keep all the Object method in a extension of the halt packages and just some of them as forward to Halt.
I know that there was an attempt on the inbox to do that. But I was worried that people will complain. Now cleaning Object would be nice.
Stef
On Aug 28, 2011, at 8:10 PM, Lukas Renggli wrote:
We have a class Halt and the class-side is empty. This seems to be the right place to hold all the code in the protocols #debugging and #debuggin-haltonce of Object. With a few renames we could get a really nice DSL:
Halt now. Halt if: a = 2.
why not Halt ifTrue: [a = 2].
?
two questions in my questions :) [] and True:
Currently you can't send #ifTrue: to any object. If you want to enable that, then you have to: - remove the optimization which will result in worse performance and will break code that assumes this method is atomic - or you have to change the compiler to generate extra bytecodes which will perform the real message send when the receiver is not a boolean and change the VM to not send the message in specialObjectsArray (currently #mustBeBoolean), but execute those extra bytecodes - or you have to change the handling of NonBooleanReceiver, use the decompiler to find out what has to be sent to who, etc.
Btw Halt if: a = 2 is much more readable IMHO.
I agree I was curious and waking up.
2011/8/29 Levente Uzonyi <leves@elte.hu>:
On Mon, 29 Aug 2011, Stéphane Ducasse wrote:
and we could keep all the Object method in a extension of the halt packages and just some of them as forward to Halt.
I know that there was an attempt on the inbox to do that. But I was worried that people will complain. Now cleaning Object would be nice.
Stef
On Aug 28, 2011, at 8:10 PM, Lukas Renggli wrote:
We have a class Halt and the class-side is empty. This seems to be the right place to hold all the code in the protocols #debugging and #debuggin-haltonce of Object. With a few renames we could get a really nice DSL:
 Halt now.  Halt if: a = 2.
why not     Halt ifTrue: [a = 2].
?
two questions in my questions :) [] and True:
Currently you can't send #ifTrue: to any object. If you want to enable that, then you have to: - remove the optimization which will result in worse performance and will break code that assumes this method is atomic - or you have to change the compiler to generate extra bytecodes which will perform the real message send when the receiver is not a boolean and change the VM to not send the message in specialObjectsArray (currently #mustBeBoolean), but execute those extra bytecodes - or you have to change the handling of NonBooleanReceiver, use the decompiler to find out what has to be sent to who, etc.
Btw Halt if: a = 2 is much more readable IMHO.
Levente
More exactly, you can't send #ifTrue: with a block argument. If you use anything else but a block, the compiler will use a normal message send (at least in Squeak, can't remember if it was ported to Pharo). For example: (Halt ifTrue: [a = 2] yourself) would be possible (but block is useless in this case as already said) Nicolas
 Halt once.
Lukas
On 28 August 2011 19:47, Marcus Denker <marcus.denker@inria.fr> wrote:
On Aug 28, 2011, at 7:24 PM, Sean P. DeNigris wrote:
2. Using Object to halt causes bloat, and doesn't buy much (except that's how we've always done it).
Back in the days, we were virtually crucified for introducing the Beeper class along the same reasoning...
The Beeper actually got very depressed due to having his very existance being questioned.
"I am just the result of a random refactoring" he was complaining "maybe I should just just delete myself and everyone will be happy".
(you know, reflection *is* dangerous! There has been a lot of talk to make reflection more secure... for a reason!).
To cheer him up, I gave him the lead role in a real, peer reviewed Paper:
   http://scg.unibe.ch/archive/papers/Denk08bMetaContextLNBIP.pdf
The Beeper thus was the first Class to be really "Meta" in the history of Objects. What a thrill. In an interview, the Beeper said: "You know, being meta is hard to decribe... Classes claim to be Meta all the time. But I doubt they ever really are Meta. Being Meta is special. The whole System looks different when meta!"
;-)
-- Marcus Denker -- http://marcusdenker.de
-- Lukas Renggli www.lukas-renggli.ch
2011/8/29 Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>
2011/8/29 Levente Uzonyi <leves@elte.hu>:
On Mon, 29 Aug 2011, Stéphane Ducasse wrote:
and we could keep all the Object method in a extension of the halt packages and just some of them as forward to Halt.
I know that there was an attempt on the inbox to do that. But I was worried that people will complain. Now cleaning Object would be nice.
Stef
On Aug 28, 2011, at 8:10 PM, Lukas Renggli wrote:
We have a class Halt and the class-side is empty. This seems to be the right place to hold all the code in the protocols #debugging and #debuggin-haltonce of Object. With a few renames we could get a really nice DSL:
Halt now. Halt if: a = 2.
why not Halt ifTrue: [a = 2].
?
two questions in my questions :) [] and True:
Currently you can't send #ifTrue: to any object. If you want to enable that, then you have to: - remove the optimization which will result in worse performance and will break code that assumes this method is atomic - or you have to change the compiler to generate extra bytecodes which will perform the real message send when the receiver is not a boolean and change the VM to not send the message in specialObjectsArray (currently #mustBeBoolean), but execute those extra bytecodes - or you have to change the handling of NonBooleanReceiver, use the decompiler to find out what has to be sent to who, etc.
Btw Halt if: a = 2 is much more readable IMHO.
Levente
More exactly, you can't send #ifTrue: with a block argument. If you use anything else but a block, the compiler will use a normal message send (at least in Squeak, can't remember if it was ported to Pharo).
ok, the complier applies the optimisation only is the argument is a Block. Because I tried: Foo ifTrue: a=2 " and it works perfectly" Foo ifTrue: [a=2] "but this one not. mustBeBoolean receiver" Thanks Nicolas, Luc
For example: (Halt ifTrue: [a = 2] yourself) would be possible (but block is useless in this case as already said)
Nicolas
Halt once.
Lukas
On 28 August 2011 19:47, Marcus Denker <marcus.denker@inria.fr> wrote:
On Aug 28, 2011, at 7:24 PM, Sean P. DeNigris wrote:
2. Using Object to halt causes bloat, and doesn't buy much (except that's how we've always done it).
Back in the days, we were virtually crucified for introducing the
Beeper
class along the same reasoning...
The Beeper actually got very depressed due to having his very existance being questioned.
"I am just the result of a random refactoring" he was complaining "maybe I should just just delete myself and everyone will be happy".
(you know, reflection *is* dangerous! There has been a lot of talk to make reflection more secure... for a reason!).
To cheer him up, I gave him the lead role in a real, peer reviewed Paper:
http://scg.unibe.ch/archive/papers/Denk08bMetaContextLNBIP.pdf
The Beeper thus was the first Class to be really "Meta" in the history of Objects. What a thrill. In an interview, the Beeper said: "You know, being meta is hard to decribe... Classes claim to be Meta all the time. But I doubt they ever really are Meta. Being Meta is special. The whole System looks different when meta!"
;-)
-- Marcus Denker -- http://marcusdenker.de
-- Lukas Renggli www.lukas-renggli.ch
On 29 August 2011 09:29, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
and we could keep all the Object method in a extension of the halt packages and just some of them as forward to Halt.
I know that there was an attempt on the inbox to do that. But I was worried that people will complain. Now cleaning Object would be nice.
Backward compatibility is good, but in this very case I would argue against it. Code that has "self halt*" in it (and that is quite a bit), is broken by definition.
why not Halt ifTrue: [a = 2].
The condition is in the argument, not the receiver. What you suggest would be very confusing change to Boolean>>ifTrue: aBlock, I suspect :-) Lukas -- Lukas Renggli www.lukas-renggli.ch
On Aug 29, 2011, at 12:56 PM, Lukas Renggli wrote:
On 29 August 2011 09:29, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
and we could keep all the Object method in a extension of the halt packages and just some of them as forward to Halt.
I know that there was an attempt on the inbox to do that. But I was worried that people will complain. Now cleaning Object would be nice.
Backward compatibility is good, but in this very case I would argue against it. Code that has "self halt*" in it (and that is quite a bit), is broken by definition.
why not Halt ifTrue: [a = 2].
The condition is in the argument, not the receiver. What you suggest would be very confusing change to Boolean>>ifTrue: aBlock, I suspect :-)
Yes I was getting out my bed and still sleeping. :)
Lukas
-- Lukas Renggli www.lukas-renggli.ch
Stéphane Ducasse wrote:
and we could keep all the Object method in a extension of the halt packages and just some of them as forward to Halt.
Why don't we just remove all halt methods from Object? What does it buy you to say "self halt" instead of "Halt now", but we gain less code and tests to maintain. Sean -- View this message in context: http://forum.world.st/Halt-tp3774723p3775964.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Aug 29, 2011, at 1:19 PM, Sean P. DeNigris wrote:
Stéphane Ducasse wrote:
and we could keep all the Object method in a extension of the halt packages and just some of them as forward to Halt.
Why don't we just remove all halt methods from Object? What does it buy you to say "self halt" instead of "Halt now", but we gain less code and tests to maintain.
do not afraid users :)
Sean
-- View this message in context: http://forum.world.st/Halt-tp3774723p3775964.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Sun, Aug 28, 2011 at 7:47 PM, Marcus Denker <marcus.denker@inria.fr> wrote:
Back in the days, we were virtually crucified for introducing the Beeper class along the same reasoning...
The Beeper actually got very depressed due to having his very existance being questioned.
"I am just the result of a random refactoring" he was complaining "maybe I should just just delete myself and everyone will be happy".
(you know, reflection *is* dangerous! There has been a lot of talk to make reflection more secure... for a reason!).
To cheer him up, I gave him the lead role in a real, peer reviewed Paper:
    http://scg.unibe.ch/archive/papers/Denk08bMetaContextLNBIP.pdf
The Beeper thus was the first Class to be really "Meta" in the history of Objects. What a thrill. In an interview, the Beeper said: "You know, being meta is hard to decribe... Classes claim to be Meta all the time. But I doubt they ever really are Meta. Being Meta is special. The whole System looks different when meta!"
Thank you Marcus, it is very funny :-) -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
participants (8)
-
Damien Cassou -
Levente Uzonyi -
Luc Fabresse -
Lukas Renggli -
Marcus Denker -
Nicolas Cellier -
Sean P. DeNigris -
Stéphane Ducasse