News for hackers. Stuff that matters.
Re:Swap_8_and_9: A simple import can modify the Python inter... by jacketing on Wednesday August 09, 2023 @04:12AM (#37059928)
Forth is probably cheating considering it has no restrictions when naming symbols.

  : 4 5 ;
  2 2 + .
Re:Swap_8_and_9: A simple import can modify the Python inter... by jstanley on Wednesday August 09, 2023 @04:45AM (#37060125)
Did you try this? This won't work.

What you did will make inputting a 4 yield a 5, but it won't change the behaviour of outputting a 4. (And it will only turn an input 4 into a 5 if your interpreter checks for words before checking for numbers which is not universally the case).

Re:Swap_8_and_9: A simple import can modify the Python inter... by pgeorgi on Wednesday August 09, 2023 @06:26AM (#37060702)
Try : + drop drop 5 ;