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

Aliases / renaming of some conditionals #1039

Open
jarmitage opened this issue Sep 18, 2023 · 2 comments
Open

Aliases / renaming of some conditionals #1039

jarmitage opened this issue Sep 18, 2023 · 2 comments

Comments

@jarmitage
Copy link

Ref: https://tidalcycles.org/docs/reference/conditions

Currently, pickF, selectF, squeeze and select all share some similarities that are obscured by their naming. For me this obscures their purpose and makes them hard to remember.

I have for now renamed these in my own setup using my "golfing" style:

selectFunctionFromIntegers = pickF
selectFunctionFromFloats   = selectF
selectPatternFromIntegers  = squeeze
selectPatternFromFloats    = select

selFuncInt   = selectFunctionFromIntegers
selFuncFloat = selectFunctionFromFloats
selPatInt    = selectPatternFromIntegers
selPatFloat  = selectPatternFromFloats

selFI = selFuncInt
selFF = selFuncFloat
selPI = selPatInt
selPF = selPatFloat

@mindofmatthew also suggested:

pick = select
pickI = squeeze
pickFunc = selectF -- Maybe pickF or pickOp
pickFuncI = pickF
@sss-create
Copy link
Collaborator

@yaxu how about this regarding 2.0?

@yaxu
Copy link
Member

yaxu commented Feb 13, 2025

Yes it would be great to clean these up.

inhabit is also closely related - it's pick but with a squeezeJoin.

The commonality between them became clearer in the port to strudel. https://github.com/tidalcycles/strudel/blob/main/packages/core/pick.mjs

e.g. inhabit is now an alias for pickSqueeze there. I think it's good to keep the friendly inhabit type name as well as the more descriptive pickSqueeze type name there.

sew and stitch feel related to pick, but using boolean lookup.

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

No branches or pull requests

3 participants