Skip to content

Add function to print sized samples#49

Merged
ngernest merged 1 commit intongernest:metaprogrammingfrom
dsainati1:metaprogramming
Oct 8, 2025
Merged

Add function to print sized samples#49
ngernest merged 1 commit intongernest:metaprogrammingfrom
dsainati1:metaprogramming

Conversation

@dsainati1
Copy link

The existing printNSamples function works fine with non-sized generators, but when used on a sized generator it will use the number of samples to create as the argument for the size, which causes exponential blowup in time used. This adds a function that prints samples with a constant size for use with sized generators.

Copy link
Owner

@ngernest ngernest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks so much! I tried generating 20 well-typed STLC terms using your fix and now it only takes 11ms 🎉

@ngernest ngernest merged commit edae0d2 into ngernest:metaprogramming Oct 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants