MartinSStewart

Results 75 comments of MartinSStewart

The issue with not having a `Bits` type is that I can't represent an integer number of bits. I want to decode an http request from Discord which contains an...

Currently I've been converting from raw ints to `Quantity Int (Rate Bits Seconds)` using `JD.int |> JD.map Quantity` since no scaling is needed. I suppose another module could be added...

Could `Duration.seconds` be changed to take `number` instead of `Float` since it doesn't apply any scaling? That would also make it easier to construct bitsPerSecond. The same could be done...

> I guess the main question is then whether there are cases where it's crucial to track with the type system that a particular Quantity represents an integer number of...

I guess maybe there isn't a good solution and it's better to not have an official Bytes/Bits module. Instead people will need to make a binary unit that suits their...

> a separate elm-binary-size or similar package based on elm-units that could be a bit more experimental and go through a few major versions before being merged back into elm-units...

> Can you think of what operations you might want to do on a Frequency value other than just pass it around? If someone is creating a music theory package...

To me it feels like the problem with Frequency represented in these ways is that it's too general and too similar to `Rate` (I think that's the conclusion we came...

I checked the definition of hertz and I think part of my argument that it's too similar to Rate was caused by thinking hertz represented a generic "events over time"...

`Frequency.for` and `Frequency.period` seem like reasonable helper functions. Not sure about `Frequency.perCycle` as I had a harder time understanding what it does when looking at the name and type signature.