[Cuis-dev] Another puzzle

Andres Valloud ten at smallinteger.com
Fri Jun 14 07:50:30 PDT 2024


Hi Jaromir, it sure is possible to stop it.  I've done such things many 
times, and I am certain the observation isn't new.  Basically the 
primitive has to check for interruptions before starting again (some 
primitives do not, some definitely should).

It's strange we don't get an infinite loop and just a hang.  This 
crashes outright, something else seems broken.  I have no idea what that 
is though.

On 6/14/24 1:59 AM, Jaromir Matas via Cuis-dev wrote:
> 
> On 14-Jun-24 1:12:35 AM, "Andres Valloud via Cuis-dev" 
> <cuis-dev at lists.cuis.st> wrote:
> 
>> Hello, continuing with the puzzling behavior, here's one from a book 
>> signature I got back in the year 1999 or so.
>>
>> a := Array new: 2.
>> a at: 1 put: #perform:withArguments:.
>> a at: 2 put: a.
>> a perform: (a at: 1) withArguments: (a at: 2)
> 
> wicked :)  My guess is because #perform:withArguments: is a primitive 
> the infinite loop happens inside the VM when the VM tries to evaluate 
> the arguments. I have no idea whether it is even possible to interrupt 
> such a loop by `Alt+.` escape sequence. I'm looking forward to what 
> others have to say. Thanks! Jaromir
> 
> 
>>
>>
>> Currently this expression crashes the VM.
>>
>> Eem... the person that signed that in my book is well aware of this 
>> example :p.
>>
>> Even if this doesn't crash, you should still be able to break out of 
>> it by invoking the debugger.  An infinite loop that you can't 
>> interrupt is unacceptable behavior too.
>>
>> Andres.
>> -- Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>
>>


More information about the Cuis-dev mailing list