Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some utility functions and macros from Infinitesimal Quest 2 + ε #85

Merged
merged 4 commits into from
Mar 16, 2024

Conversation

Kodiologist
Copy link
Member

@Kodiologist Kodiologist commented Mar 10, 2024

No description provided.

Comment on lines +261 to +265
(cond
(< x 0) -1
(> x 0) 1
(= x 0) 0
True (raise TypeError))")
Copy link
Member

Choose a reason for hiding this comment

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

cute

Copy link
Member

@scauligi scauligi left a comment

Choose a reason for hiding this comment

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

Ooh I really like defmacro-kwargs, that's very handy.

Although useful, I don't think sign really belongs in Hyrule; it's a math utility function that doesn't provide any additional functionality for Hy-specific language items.

@Kodiologist
Copy link
Member Author

My intention for Hyrule was never that it be restricted to things that are Hy-specific, exactly; "missing standard functions" are a reasonable use of the library, which is why we have things like xor.

@Kodiologist
Copy link
Member Author

That's why in the inclusion criteria I only said "It's of general interest to Hy programmers" instead of something like "It's of interest to Hy programmers, but not pure Python programmers".

@scauligi
Copy link
Member

Hmm, I guess it's still of use if you're writing functional Python, which I can see as another use case for Hyrule.

With that being the case, PR looks good to me 👍

@Kodiologist Kodiologist merged commit 9b14a09 into hylang:master Mar 16, 2024
6 checks 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