-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
pickOut(), pickRestart(), pickReset() #950
Conversation
added pickr() and pickrmod()
prettier fix
Fixed pickr() description
The use of I'd say use of Maybe a nice solution would be to define |
Make pickr() handle dictionaries also
With my implementation of pickr() i can do something like that: And the result is equivalent to this looped indefinitely: When you use pick() , you have this loop instead:
Now, assuming your API suggestions are implemented, can you please show me a strudel example that makes my use case work correctly? |
Hmm unfortunately defining |
Howabout this? https://strudel.cc/?leVkB6geMrE_ These are the same as Maybe it's clear from this how reset is more patterny.. |
using trigZeroJoin in pickr() instead
now pickRestart() and pickReset()
Your approach is cleaner, for sure! pickRestart works as intended. I'm keeping both in the PR. |
I have added also pickOuter() , applying an outer join can achieve something useful like that:
|
these functions look very useful! maybe it makes sense to add pickSqueeze / pickmodSqueeze as synonyms for inhabit / inhabitmod to make the naming more consistent? I also wonder if it would make sense to change the syntax from "a b".pick.trig({...})
// instead of
"a b".pickReset({...}) this would follow the same convention as operators e.g. "0 1".add.trig("0 1 2 3") overview:
I've omitted all the not sure if it makes sense to add all operators, probably not |
Pragmatically speaking, can this PR be merged as is by now ? I can work on a structured patch in the future. |
I like this approach it seems a lot more flexible |
Maybe we should standardise on the friendlier Yes |
83a3b91
to
4aaf9ea
Compare
I tried to introduce the mux operator but tests don't pass, so i reverted. At the moment I'm not knowledgeable enough to provide a better solution. I hope you'll integrate pickOuter, pickReset, pickRestart soon. A better solution can be thought out in the future. |
now tracking this here: #970 |
+ add pick*Squeeze alias to inhabit*
I've renamed pickOuter to pickOut for consistency with the alignment operators. I'd merge this now, but maybe we'll get the dot notation with #970 |
For now I'd consider these functions experimental, as they might get renamed later |
and thanks @eefano :) |
thank you Felix, this is very useful! |
added pickr() and pickrmod() , see #948
also fixed typos in inhabit() and inhabitmod()