Live data from Hacker News

GNU Units

gnu.org

111–117 of 117 posts

Re: GNU Units

#112
post #111

It would be nice to get implemented as an extension in VScode.

Having used Emacs for most of my adult life, I find it pretty amazing that basic unit conversion isn't a part of every OS out there. I use it several times every week. I don't use the gnu units package though, I stay with the functionality built into Emacs calc.

Re: GNU Units

#113
post #107
post #31

this page seriously undersells the versatility and utility of the units program how long will my laptop take to charge at its current rate of charging? You have: (22.8 Wh - 16.8 Wh)/7.4W You want: time 48 min + 38.918919 sec how long will a 2000mAh 18650 cell take to discharge at 2.5 watts, using a nominal voltage of 3.7 volts? You have: 3.7 V 2 amp hour / 2.5 watt You want: time 2 hr + 57 min + 36 sec what energy de…

Impressive list. The maintainers should copy paste this onto that page

they have my permission

everyone is free to redistribute my comment, in whole or in part, modified or unmodified, with or without credit; i waive all rights associated with it to the maximum extent possible under applicable law. where applicable, i abandon its copyright to the public domain. i wrote and published this comment in argentina in 02023

Re: GNU Units

#114
post #31

this page seriously undersells the versatility and utility of the units program how long will my laptop take to charge at its current rate of charging? You have: (22.8 Wh - 16.8 Wh)/7.4W You want: time 48 min + 38.918919 sec how long will a 2000mAh 18650 cell take to discharge at 2.5 watts, using a nominal voltage of 3.7 volts? You have: 3.7 V 2 amp hour / 2.5 watt You want: time 2 hr + 57 min + 36 sec what energy de…

I use GNU Units a lot (and have mentioned it fairly frequently on HN -- 37 comments and one story submission: https://news.ycombinator.com/item?id=7297219 >), and have for a couple of decades now, but not like this , despite what I consider to be some reasonably advanced conversions (e.g., https://news.ycombinator.com/item?id=8196590 > & https://news.ycombinator.com/item?id=7606949 >). This is an absolutely awesome c…

thank you, that means a lot

Re: GNU Units

#115
post #41

Only tangential to this but somebody might find it usefull. I’m doing lots of calculations in Python involving various units. I’m using a similar library called Pint. https://github.com/hgrecco/pint My business is thermodynamics of power plants. Professionals in the industry tend to use convenient units like C, bars, kJ/kg and so on. But the formulas usualy need basic SI units. Using this library not only streamlines…

I'll second that. I work in the renewable energy space where we get all manner of atmospheric and power data in a wide variety of units depending on the data source, so Pint is incredibly useful in normalizing them as well as making it clear in the code what and how unit conversion is happening. The fact that it integrates fairly nicely with Pandas and Numpy is great, too.

Unrelated question. I was recently appointed to a citizens energy commission and I'm finding my self modeling energy use and generation in Python. I'm curious if you would suggest any models of residential and commercial energy consumption and renewable energy generation. I'm currently generating a lot of my own from scratch and I'm being (rightly) criticized by my colleagues to use something off the shelf.

Re: GNU Units

#116

I actually did a WebAssembly port of the GNU Units library and you can now use it in your browser. Demo: https://yanosh.net/units-wasm/ GitHub Repo for the demo: https://github.com/yanosh-k/units-wasm GitHub Repo for the WASM project: https://github.com/yanosh-k/gnu-wasmunits

Wow I was just preparing to start this project myself. Before starting the process I did a last minute check and found this. Goes to show you that all you need to do is wait and someone will write the code for you.

Thank you!

Re: GNU Units

#117
post #41

Earlier quoted context omitted.

I'll second that. I work in the renewable energy space where we get all manner of atmospheric and power data in a wide variety of units depending on the data source, so Pint is incredibly useful in normalizing them as well as making it clear in the code what and how unit conversion is happening. The fact that it integrates fairly nicely with Pandas and Numpy is great, too.

Unrelated question. I was recently appointed to a citizens energy commission and I'm finding my self modeling energy use and generation in Python. I'm curious if you would suggest any models of residential and commercial energy consumption and renewable energy generation. I'm currently generating a lot of my own from scratch and I'm being (rightly) criticized by my colleagues to use something off the shelf.

If you're looking for something turn-keyish, you might be able to get some help with this from one or more of the big players in the renewable energy analysis and forecasting space, including (in no particular order) DNV, Vaisala, Bloomberg, and Ventyx. Beware, their offerings can get pretty expensive and there's often no standard list pricing. Also, I strongly encourage you to always do your own validation of any model data they might give you, so the work you're doing to produce your own models is probably not wasted.
Post reply on HN