Sebastian Stock

Results 124 comments of Sebastian Stock

There have been several requests for such an interface package, so I think we should consider it. Unfortunately, I didn’t have much time in the past to really take part...

> I can't imagine someone using UnitfulCore without the arithmetics and convenience constructors. In my opinion, UnitfulCore is all that should be needed to implement something like https://github.com/JuliaStats/Distributions.jl/issues/1413#issuecomment-1301249731, which is...

> My attempt is below: > ```julia > molar_mass_unit = Unitful.Dimensions{(Unitful.Dimension{:Mass}(1//1), Unitful.Dimension{:Amount}(-1//1))} > function f(a::Unitful.Quantity{T, molar_mass_unit, U}) where {T,U} > println("molar mass function") > end > ``` This doesn’t work...

We should have better documentation for this. I think we should 1. Feature `@derived_dimension` more prominently in the manual. 2. Improve the part of the `Quantity` docstring which explains that...

We could certainly include the importing in the code examples, I agree that they can easily be overlooked. I also think the docs should mention that you can do `using...

Somewhat related: For `Level`s, `dimension(x)` and `dimension(unit(x))` differ. I’m not sure whether that should be changed (#582).

> IMO the current behaviour of the Quantity constructor is a bug. I wouldn’t call it a bug (the behavior is intentional) and I certainly don’t think we should change...

The way to do this is with `@logunit`, see src/pkgdefaults: https://github.com/PainterQubits/Unitful.jl/blob/ebad4497360693722c9dae0a6d6f28b5647ad4a6/src/pkgdefaults.jl#L673-L681 For `dBW`, this would be ```julia @logunit dBW "dBW" Unitful.Decibel 1u"W" ``` Maybe we should just add `dBW` to...

I don’t see any collisions with units that are already defined in this package, so we can add these new prefixes. Maybe we should add a note to the `Ra`...

To use a unit with the `u"…"` macro, you need to register the module that defines the unit: ```julia Unitful.register(YourModule) ``` If you define the unit in the REPL, `YourModule`...