News for hackers. Stuff that matters.
Re:Ask HN: Whatever happened to Wolfram Alpha? by mike_d on Saturday November 06, 2021 @03:50PM (#29133269)
Also a frequent WA user. I use it for things I could calculate, but are much faster to just ask in plain text.

How much that cloud instance really costs

  $0.03/hr * 1 month
Bandwidth calculations for hosting providers

  10 TB per month in Mbps
Re:Ask HN: Whatever happened to Wolfram Alpha? by 5- on Saturday November 06, 2021 @04:55PM (#29133730)
you might want to try units(1).

https://www.gnu.org/software/units/units.html

the input language is less flexible than wolframalpha/google, but i quickly got used to it. it's nice to have something local and reliable. you can also define custom units.

i prefer using it in terse mode:

    $ units -t 0.03$/hr*1month
    21.914532 US$
    $ units -t 10TB/month Mbps
    30.421214
Re:Ask HN: Whatever happened to Wolfram Alpha? by nimih on Saturday November 06, 2021 @09:07PM (#29135474)
qalc[1] is also quite nice if you're looking for a command line calculator; it handles units well, but has some other fancy features, and has a very lax parser which i find to be a huge plus.

    $ qalc '0.03$/hr*1month'
    error: "r" is not a valid variable/function/unit.
    (0.03 × (USD / hour)) × (1 × month) = $21.915

    $ qalc '0.03$/h*1month -> CAD'
    (0.03 × (USD / hour)) × (1 × month) ≈ CAD 27.28388011

    $ qalc '10TB/month -> Mbit/s'
    10 × (terabyte / month) ≈ 30.42056430 megabits/s

    $ qalc 'integrate(x+x^2)'
    integrate(x + (x^2)) = x^3 / 3 + x^2 / 2 + C
[1] https://qalculate.github.io/manual/qalc.html
Re:Ask HN: Whatever happened to Wolfram Alpha? by every on Saturday November 06, 2021 @08:11PM (#29135121)
Units advises there are 118.20896 smoots per furlong..
Re:Ask HN: Whatever happened to Wolfram Alpha? by sokoloff on Saturday November 06, 2021 @08:57PM (#29135404)
Wouldn’t that be properly expressed as 118 Smoots plus 5 Ears?
Re:Ask HN: Whatever happened to Wolfram Alpha? by artursapek on Saturday November 06, 2021 @08:29PM (#29135229)
people still measuring in smoots smh
Re:Ask HN: Whatever happened to Wolfram Alpha? by avmich on Saturday November 06, 2021 @06:17PM (#29134338)
For calculator problems like that, I use J:

   */ 0.03 24 30
21.6

   1e6 %~ (10e12 * 8) % */ 30 24 3600
30.8642

Usually requires some massaging, but still takes seconds.

Re:Ask HN: Whatever happened to Wolfram Alpha? by kragen on Saturday November 06, 2021 @11:57PM (#29136441)
While APL dialects are very nice for this sort of thing, they generally don't understand units of measure or know about physical constants; you have to put those into them yourself. Here are some of my recent units(1) queries:

    141 pounds force 30 mm  # in joules
    1160/4
    log(3)/3/(log(2)/2)  # how much more efficient is one-hot ternary than one-hot binary?
    5V 7 μs / 7.3 A
    .0117% half avogadro mol / 1.251e9 years / (potassium+chlorine)g  # how radioactive is lite salt?
    3.27$/gallon  # in $/liter
    sqrt(2 2000 electronvolt/electronmass)
    18.8 foot pounds force # in joules
    163$/(7.9 g/cc * 1500 mm 3000 mm 3.2 mm)  # cold rolled steel price is higher than steel sold by weight
    m3/4 / 15 cfh
    2 pi sqrt(200 um / gravity)
Re:Ask HN: Whatever happened to Wolfram Alpha? by Siira on Tuesday November 09, 2021 @12:09PM (#29164324)
Julia is also excellent for working with units (Units.jl, IIRC).
Re:Ask HN: Whatever happened to Wolfram Alpha? by ChrisRackauckas on Tuesday November 09, 2021 @04:39PM (#29167857)
Unitful.jl
Re:Ask HN: Whatever happened to Wolfram Alpha? by Laremere on Saturday November 06, 2021 @04:26PM (#29133529)
Yeah, it's great for these types of things. It also has a bunch of values built in, so you can do things like:

  (day length of jupiter) * 80
Re:Ask HN: Whatever happened to Wolfram Alpha? by franga2000 on Sunday November 07, 2021 @06:34AM (#29138533)
Same here, the way it seamlessly wrangles even the most ridiculous combinations of units is insanely useful. Just yesterday I used it to calculate power consumption for a house by timing one of those spinning wheel meter things. Something like "(10 rot / 46 s) / (375 rot / kW*h)" and it gave me straight answer in watts.

I definitely could've worked that out by hand, but it would've taken a minute or a few, mostly on unit conversions. With WA, I can just think in variable relationships and not worry about units at all.

Don't get me wrong, it often returns complete garbage, see all the memes of Siri passing non-math questions to it. It's annoying to figure out or explain to someone because the syntax is very loose and you just kind of need to get a feel for it, but once you do, it's really powerful.

Re:Ask HN: Whatever happened to Wolfram Alpha? by maneesh on Saturday November 06, 2021 @03:57PM (#29133325)
I use Google for those pretty often.
Re:Ask HN: Whatever happened to Wolfram Alpha? by mejutoco on Saturday November 06, 2021 @05:28PM (#29133955)
I do the same for basic calculations. I was surprised things like 9:00 EST in CET don‘t work in google search, but do in WA.
Re:Ask HN: Whatever happened to Wolfram Alpha? by einarvollset on Saturday November 06, 2021 @06:22PM (#29134379)
Re:Ask HN: Whatever happened to Wolfram Alpha? by mejutoco on Saturday November 06, 2021 @08:29PM (#29135225)
You are absolutely right. I misremembered. Using GMT does indeed work only on WA:

9:00 GMT-7 in CET

https://www.google.com/search?channel=fs&client=ubuntu&q=9%3...

https://www.wolframalpha.com/input/?i=9%3A00+GMT-7+in+CET

Re:Ask HN: Whatever happened to Wolfram Alpha? by saalaa on Sunday November 07, 2021 @12:37AM (#29136618)
Google handles GMT and UTC but doesn't handle offsets from there and, frankly, it's understandable and I wouldn't bother either. What it does handle though is countries and their DST settings:

> 9:00 UTC in Thailand

Re:Ask HN: Whatever happened to Wolfram Alpha? by kgermino on Saturday November 06, 2021 @11:34PM (#29136334)
Ohh does WA respect time zones in searches?

A regular complaint I have with google is (simplified example) converting EDT to MST. Google will “helpfully” correct me and convert EDT to MDT instead, which is explicitly not what I asked for. It’s stupid (I can usually figure it out on my own) but that would be a huge win for me.

Re:Ask HN: Whatever happened to Wolfram Alpha? by Keyframe on Saturday November 06, 2021 @05:32PM (#29133985)
You also might want to try google search. They display calculations for these particular queries and quite a few more.
Re:Ask HN: Whatever happened to Wolfram Alpha? by withinboredom on Saturday November 06, 2021 @08:54PM (#29135381)
Google is also often wrong. For example, my computer is set to US English, as is my profile. Yet somehow it still gets confused on decimals and commas (they are switched in my current country’s locale).
Re:Ask HN: Whatever happened to Wolfram Alpha? by telchar on Saturday November 06, 2021 @11:56PM (#29136435)
Also, if you use the Firefox search bar only the first 20 chars are sent to google, so longer calculations are truncated before they're calculated and wrong answers come back with no warning. Not a Google problem per se but a risk of using Google to calculate still.
Re:Ask HN: Whatever happened to Wolfram Alpha? by vinodkd on Sunday November 07, 2021 @05:14PM (#29144035)
or frink [1], which started off as a tool like the others mentiond here, but is now a full fledged units-based programming language. See some examples of them here [2]

1: https://frinklang.org/ 2: https://frinklang.org/#SampleCalculations

Its been on HN before.