fry icon indicating copy to clipboard operation
fry copied to clipboard

Make the `ratchet` example print what the source event is

Open rand00 opened this issue 2 years ago • 8 comments
trafficstars

The ratchet example currently prints "ratchet" before each event. The event-streams should instead be extended to bear a string tag that is printed, that specifies if it's a "ratchet" beat or a normal "beat".

This is already done in the ratchet_002 example, which can be used as guide.

rand00 avatar Apr 01 '23 09:04 rand00

Can I work on this @rand00 ?

AryanGodara avatar Apr 01 '23 18:04 AryanGodara

Yes thanks (:

rand00 avatar Apr 01 '23 18:04 rand00

Great!! I'll open a PR asap (after writing the code 😅

AryanGodara avatar Apr 01 '23 19:04 AryanGodara

@rand00 I'm sorry for the delay! I'm still working on this issue. Made some changes locally but it did not seem to work. Will try to go through the code again and figure it out.

Just one doubt, the only difference between ratchet and ratchet_002 examples I see currently is what is printed. So, will printing "ratchet" and "beat" not make the two examples identical? (I'm sorry if this observation is wrong, I might have understood the code wrong 😅 )

AryanGodara avatar Apr 04 '23 07:04 AryanGodara

No there is a difference in what operator is called - the examples/ratchet calls every and examples/ratchet_002 calls every' (notice the prime at the end) - it has a more powerful interface where the ratchet amount is limited by a lambda given to it (:

Behind the scenes I'm actually coming up with an even more powerful function for this, as I would like to be able to choose what event is used for the ratchet dynamically. If my changes influence your PR, I'll do the fix needed - just make it work up against the current main branch.

rand00 avatar Apr 04 '23 07:04 rand00

Sorry for the delayed response @rand00 ! (Long classes at the uni this week 😅 ) I understand, I'll check it more carefully this time, and implement the changes asap!

AryanGodara avatar Apr 04 '23 14:04 AryanGodara

Note that further work will not count towards the Outreachy application. That said, would love to have you as a contributor out of your own interest (:

rand00 avatar Apr 04 '23 16:04 rand00

Yes yes, Sonja told me about this. But yes, I want to work on this out of interest. It's just that this week is busy in univeresity, so l'll take some time to complete this, but I've not abandoned this issue 😅

AryanGodara avatar Apr 04 '23 17:04 AryanGodara