Zulip Chat Archive
Stream: new members
Topic: macro hangs in NNG
Ben Laurie (Oct 21 2024 at 14:35):
I'm doing the natural number game, and trying to define a macro makes it hang ... what's going on?
Ben Laurie (Oct 21 2024 at 14:37):
oops, guess that's not how to work this chat
Johan Commelin (Oct 21 2024 at 14:39):
Welcom @Ben Laurie, I tried to restore some order :wink:
Ben Laurie (Oct 21 2024 at 14:39):
thanks!
Johan Commelin (Oct 21 2024 at 14:39):
What do you mean with "trying to define a macro"? Could you please paste your code between #backticks ?
Ben Laurie (Oct 21 2024 at 14:41):
its 4/9 in algorithm world: macro "simp_add" : tactic => `(tactic|( simp only [add_assoc, add_left_comm, add_comm]))
Ben Laurie (Oct 21 2024 at 14:44):
oh, I see - I wasn't supposed to actually run that code myself, it was already defined
Ben Laurie (Oct 21 2024 at 14:45):
still don't understand why it hangs, though, but perhaps that will become clear later...
Johan Commelin (Oct 21 2024 at 14:49):
I wouldn't be surprised if NNG runs in some sort of sandbox where such macro's don't work properly.
Richard Copley (Oct 22 2024 at 20:51):
Ben Laurie said:
oh, I see - I wasn't supposed to actually run that code myself, it was already defined
That's right. The same question was asked here.
@Kevin Buzzard, that makes (at least) 3 :smile:
Kevin Buzzard (Oct 22 2024 at 20:58):
Please someone feel free to make a PR convincing people not to type that stuff into lean. Or shall I just delete the code completely? It plays no role in the game, I was just showing off how good I was at copy-pasting code I didn't understand when I wrote that level.
Last updated: May 02 2025 at 03:31 UTC