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

Try to solve method composition with proxy objects #1240

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

yaxu
Copy link
Member

@yaxu yaxu commented Jan 12, 2025

Fixes #36, so that this sort of thing works:

sound("bd md cp").every(3, fast(2).n("[3|2]").chop(4).jux(rev))

To do:

  • See if there are functions that aren't created via register but would still benefit from being proxified, e.g. set()

@yaxu yaxu requested review from felixroos and daslyfe January 12, 2025 00:30
@TodePond
Copy link
Contributor

i don't have enough context on the strudel innards to comment generally, but I'll just throw out a heads-up that I've found Proxy to be pretty slow, so might be worth testing out any performance impacts

@yaxu
Copy link
Member Author

yaxu commented Jan 12, 2025

i don't have enough context on the strudel innards to comment generally, but I'll just throw out a heads-up that I've found Proxy to be pretty slow, so might be worth testing out any performance impacts

Thanks for the heads-up, I tried adding a benchmark, seems OK, but maybe it causes problems in some cases..

image

@yaxu
Copy link
Member Author

yaxu commented Jan 13, 2025

The latest commit supports set.n(3) instead of set(n(3)) but not yet set.out.n(3) instead of set.out(n(3)).

@yaxu yaxu mentioned this pull request Jan 24, 2025
7 tasks
@yaxu yaxu added the v1.2 label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make curried function composable
2 participants