-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[mod] themes: calculator unit support #5534
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
base: master
Are you sure you want to change the base?
Conversation
*Unit converter* plugin no longer exists, it's now part of *Calculator*. You can also perform operations with units.
a450e30 to
44d4f5b
Compare
|
I'm not sure if it's a good idea to move the unit converter to the JS client. I see two disadvantages:
Definition of Units (and the SI and non SI conversion factors) in MathsJS: Definitions of units (and the SI conversion factors) in SearXNG / generic generated from wikidata units .. searxng/searx/data/wikidata_units.json Lines 1 to 6 in ddc6d68
|
Unit conversion isn't a main feature on SearXNG, we can delegate this to be a client only thing.
It's broken because I can't convert anything other than distance units. Even then, now we can do expressions using these units (e.g., "1.3GiB * 53min"), and if needed, add new units based on other expressions. |
Sorry for being slow in uptake, not sure I fully understand you .. TBH I'm confused: How is unit conversion related to a multiplication (or division) of units, like "1.3GiB * 53min" = "GiB min"? .. not related, but personally I know
The On the oposite, the unit conversion in SearXNG is based on the International System of Units (aka SI). In MathJS we have (for example) a unit (type) The SI knows about (the) seven base units .. apart from these seven base quantities, there are no other known physical quantities, which is why these are sufficient to perform conversions between the different unit systems (e.g. 20 °C to °F = 68 °F).
Yeah, thats true .. SearXNG main feature are search results .. and the unit-converter is just a plugin, but ..
.. isn't true , at least not for our no-JS clients. As a graduate physicist, I prefer the SI system because it allows all physical unit of measure to be converted (with the help of Wikidata). MathJS could be a plus if we want to handle other units of measure (non physical) like .. or do I miss something? |
I wrote wrongly. I meant to say, for example "(300 Mb/s + 980 kilobit/sec) to GB/hour", Previously, it was not possible to perform math and conversions of this type.
I can't tell much as I don't study this, but comparing units such as "acres" between the Wikidata db and the math.js |
If they used other factors, the results would be wrong ;-) . It is inherent in the nature of the task that the two solutions are similar. We generate our unit database from Wikidata, which receives corrections and additions every week. The database from MathJS was initially created 10 years ago and since then has been little corrected or supplemented. Accordingly, the Wikidata database is much more comprehensive / it contains far more symbols / respectively designations for physical quantities -> more conversion factors. Here is just one example of a traditional unit
This is far more than a conversion .. To be precise, it isn't a unit conversion (its a operation with complex numbers / In this example the unit is But of course you're right, MathJS
|
Unit converter plugin no longer exists, it's now part of Calculator.
You can also perform operations with units:
Unknown plugins in
settings.ymlwill softfail and not register.