Hacker Newsnew | past | comments | ask | show | jobs | submit | bqmjjx0kac's commentslogin

As demonstrated in the article, you can compute clamp(x, min, max) with straight-line code.

I also do this sort of restless refactoring. I find interacting with a new codebase is a kind of brain hack that (subjectively) helps me get up to speed faster.


Hmm, not on iOS Safari.


Yup that’s the browser I am using as well.


change the background


Yup.. read my original comment :)


You nerd sniped me :) In this context, I believe it is a kilo-Jansky, not a kilo-Joule * year.

https://en.wikipedia.org/wiki/Jansky


I don't think that replacing two ill fitting but probable units with a single obscure unit is much of an improvement!


It appears to have something to do with CGS units.

1 Jy = 10-23 erg s-1 cm-2 Hz-1 (cgs)

only their figure: L9.9 GHz < 2.1 × 10^25 erg s−1 Hz−1

leaves out the cm-2. (So not a density, like Jy. Perhaps 'L' is luminosity? ... As in: "The solar luminosity unit is a measure of the Sun's radiant energy and is equal to 3.828×10^(26) Watts." -(NRAO)

While groping, I found this helpful page called Brightness in Radio Astronomy: http://physics.wku.edu/~gibson/radio/brightness.html


I was thinking maybe joules/year e.g. energy/time might be some brightness indicator for some astronomical definition of brightness - especially in the non-optical wavelengths.

But that's division, not multiplication. Another thread in my brain thought maybe the product of the two could be useful for people in that field, sort of how ISP is useful to people in rocketry but us normal people need to divide it by G(earth) to get something intuitive.


I don't think it's obscure in that field or for the target audience. You might want to read the soon to be published distilled and transposed article in popular mechanics ...


It’s mentioned in Contact, both movie and book.


Thanks. That was one of only two movies based on a book that I enjoyed as much as the book.


Well... "TM Signal" was just in the news. It's close enough I bet it could fool some percentage of otherwise security-conscious users. https://www.wired.com/story/tm-signal-telemessage-plaintext-...


Do phones have trusted execution environments? I suppose you could require the recipient provide attestation that it's running the expected binary. Of course, this is pointless if the hardware manufacturer shares their root keys with the government.


I always want to reach for `units`, but I'm perennially baffled by the output! What's up with the * and /?


The * value is the result of converting 10 miles to meters, as requested.

The / value is the inverse of that in case you wanted that, ie 0.1 meters in miles.

It's explained in `man 1 units`


Oh, I know it's explained in the man page. I read it every time and promptly forget because I can't internalize the choice of notation.


If you find the output a bit hard to parse at times (as I do), you might want to try qalc instead, I use it all the time from the terminal to do conversions:

    $ qalc 
    > 3 millilightseconds to miles

      3 milliLightSeconds ≈ 558 mi + 1491 yd + 0.1692913386 ft
I'm not sure if it has all the same units as `units` does, but it replaced my use of it entirely as it can do other useful operations as well


* multiply

/ divide


I am familiar.


I usually call it non-interactively:

  $ units 1500DKK USD
      * 236.76653
      / 0.00422357
in which case it's always the first line I want.

(The second line is telling me 1USD is 0.00422357 of 1500DKK.)

Note if you use the currency conversions,

  systemctl enable units-currency-update.timer
is needed to keep them up-to-date.


If you only need the first line you can invoke units with --terse.

  $ units --terse 2.4kWh megajoules
  8.64


the * is denoting the conversion from your first unit to your second, the / denotes the other way.

You have: 1 miles You want: feet * 5280 / 0.00018939394

In the above example, 1 mile is 5280 feet, and 1 foot is 0.00018939394 miles

If I do 2 miles to feet, the values are doubled (or halved for the reverse conversion)

You have: 2 miles You want: feet * 10560 / 9.469697e-05


I agree the law should attempt to be specific, but I have to point out that this is still quite ambiguous!

Is it permissible to dictate/listen to text messages on my handheld smartphone, so long as I don't hold it in my hand? Can I click "next track" on the steering wheel, but not on my phone screen?

What about smart watches? They are not handheld, but they are equally distracting, if not more so than a phone because their screens are so tiny and fiddly.


Surely you don't believe that there's a significant fraction of tech jobs that pay $500k?


No, not sure where you got that from.


Oh, I guess you were just sharing and this wasn't advice:

> I just landed a mid 6-figures job _without_ grinding leetcode. They’re out there. This game everyone plays is an abomination.


I’m way too humble and jaded to give advice to strangers on the internet, yes.

I offered an anecdote.


I thought TRAMP overrides that setting in your SSH config.

> TRAMP uses the ControlMaster=auto OpenSSH option by default, if possible. However, it overwrites ControlPath settings when initiating ssh sessions. TRAMP does this to fend off a stall if a master session opened outside the Emacs session is no longer open. That is why TRAMP prompts for the password again even if there is an ssh already open.

https://www.gnu.org/software/emacs/manual/html_node/tramp/Ss...


It does and it becomes a bit annoying if you were already persisting sessions, but you can just tell emacs to use the same sockets that ssh sets up.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: