Skip to main content
added 19 characters in body
Source Link

PostScript

Yes, PostScript is a programming language. Moreover, it's a programming language where all language constructs are system-defined functions, which can be redefined...

/Magic 1000 dict /Magic def
systemdict {pop Magic exch {} put} forall
Magic begin

In English:

  • Create an empty 1,000-element dictionary and name it Magic.
  • For every key in systemdict, add the same key to Magic, with an empty definition ("{}").
  • Push Magic onto the top of the dictionary stack.

From this moment on, every PostScript language command is defined to do nothing. AFAIK, it is impossible to escape from this condition.

(Technically, you're not "destroying" the old definitions, you're just shadowing them. If you could still execute end, that would pop Magic off the dictionary stack, un-shadowing all the commands and giving you your life back. But since end itself is also shadowed... it will do nothing now.)

Note that all commands will still execute... it's just that now they are defined to do nothing. You won't get any kind of error, it's just that nothing will happen. (Well, I suppose stack overflow will happen eventually...)

PostScript

Yes, PostScript is a programming language. Moreover, it's a programming language where all language constructs are system-defined functions, which can be redefined...

1000 dict /Magic def
systemdict {pop Magic exch {} put} forall
Magic begin

In English:

  • Create an empty 1,000-element dictionary and name it Magic.
  • For every key in systemdict, add the same key to Magic, with an empty definition ("{}").
  • Push Magic onto the top of the dictionary stack.

From this moment on, every PostScript language command is defined to do nothing. AFAIK, it is impossible to escape from this condition.

(Technically, you're not "destroying" the old definitions, you're just shadowing them. If you could still execute end, that would pop Magic off the dictionary stack, un-shadowing all the commands and giving you your life back. But since end itself is also shadowed... it will do nothing now.)

Note that all commands will still execute... it's just that now they are defined to do nothing. You won't get any kind of error, it's just that nothing will happen. (Well, I suppose stack overflow will happen eventually...)

PostScript

Yes, PostScript is a programming language. Moreover, it's a programming language where all language constructs are system-defined functions, which can be redefined...

/Magic 1000 dict def
systemdict {pop Magic exch {} put} forall
Magic begin

In English:

  • Create an empty 1,000-element dictionary and name it Magic.
  • For every key in systemdict, add the same key to Magic, with an empty definition ("{}").
  • Push Magic onto the top of the dictionary stack.

From this moment on, every PostScript language command is defined to do nothing. AFAIK, it is impossible to escape from this condition.

(Technically, you're not "destroying" the old definitions, you're just shadowing them. If you could still execute end, that would pop Magic off the dictionary stack, un-shadowing all the commands and giving you your life back. But since end itself is also shadowed... it will do nothing now.)

Note that all commands will still execute... it's just that now they are defined to do nothing. You won't get any kind of error, it's just that nothing will happen. (Well, I suppose stack overflow will happen eventually...)

Commonmark migration
Source Link

#PostScript

PostScript

Yes, PostScript is a programming language. Moreover, it's a programming language where all language constructs are system-defined functions, which can be redefined...

1000 dict /Magic def
systemdict {pop Magic exch {} put} forall
Magic begin

In English:

  • Create an empty 1,000-element dictionary and name it Magic.
  • For every key in systemdict, add the same key to Magic, with an empty definition ("{}").
  • Push Magic onto the top of the dictionary stack.

From this moment on, every PostScript language command is defined to do nothing. AFAIK, it is impossible to escape from this condition.

(Technically, you're not "destroying" the old definitions, you're just shadowing them. If you could still execute end, that would pop Magic off the dictionary stack, un-shadowing all the commands and giving you your life back. But since end itself is also shadowed... it will do nothing now.)

Note that all commands will still execute... it's just that now they are defined to do nothing. You won't get any kind of error, it's just that nothing will happen. (Well, I suppose stack overflow will happen eventually...)

#PostScript

Yes, PostScript is a programming language. Moreover, it's a programming language where all language constructs are system-defined functions, which can be redefined...

1000 dict /Magic def
systemdict {pop Magic exch {} put} forall
Magic begin

In English:

  • Create an empty 1,000-element dictionary and name it Magic.
  • For every key in systemdict, add the same key to Magic, with an empty definition ("{}").
  • Push Magic onto the top of the dictionary stack.

From this moment on, every PostScript language command is defined to do nothing. AFAIK, it is impossible to escape from this condition.

(Technically, you're not "destroying" the old definitions, you're just shadowing them. If you could still execute end, that would pop Magic off the dictionary stack, un-shadowing all the commands and giving you your life back. But since end itself is also shadowed... it will do nothing now.)

Note that all commands will still execute... it's just that now they are defined to do nothing. You won't get any kind of error, it's just that nothing will happen. (Well, I suppose stack overflow will happen eventually...)

PostScript

Yes, PostScript is a programming language. Moreover, it's a programming language where all language constructs are system-defined functions, which can be redefined...

1000 dict /Magic def
systemdict {pop Magic exch {} put} forall
Magic begin

In English:

  • Create an empty 1,000-element dictionary and name it Magic.
  • For every key in systemdict, add the same key to Magic, with an empty definition ("{}").
  • Push Magic onto the top of the dictionary stack.

From this moment on, every PostScript language command is defined to do nothing. AFAIK, it is impossible to escape from this condition.

(Technically, you're not "destroying" the old definitions, you're just shadowing them. If you could still execute end, that would pop Magic off the dictionary stack, un-shadowing all the commands and giving you your life back. But since end itself is also shadowed... it will do nothing now.)

Note that all commands will still execute... it's just that now they are defined to do nothing. You won't get any kind of error, it's just that nothing will happen. (Well, I suppose stack overflow will happen eventually...)

Source Link

#PostScript

Yes, PostScript is a programming language. Moreover, it's a programming language where all language constructs are system-defined functions, which can be redefined...

1000 dict /Magic def
systemdict {pop Magic exch {} put} forall
Magic begin

In English:

  • Create an empty 1,000-element dictionary and name it Magic.
  • For every key in systemdict, add the same key to Magic, with an empty definition ("{}").
  • Push Magic onto the top of the dictionary stack.

From this moment on, every PostScript language command is defined to do nothing. AFAIK, it is impossible to escape from this condition.

(Technically, you're not "destroying" the old definitions, you're just shadowing them. If you could still execute end, that would pop Magic off the dictionary stack, un-shadowing all the commands and giving you your life back. But since end itself is also shadowed... it will do nothing now.)

Note that all commands will still execute... it's just that now they are defined to do nothing. You won't get any kind of error, it's just that nothing will happen. (Well, I suppose stack overflow will happen eventually...)