Hacker News new | ask | show | jobs
by snikch 3169 days ago
I use the yes command to defrost my lunch. I open up a couple of tabs running

yes > /dev/null

Then place my frozen lunch on the back of my macbook. Give it an hour or so and boom, defrosted.

8 comments

Hah, nice! Somewhat related, I once worked on a project that used a high reliability PC meant for extended use in "extreme" outdoor environments. One of the issues they (manufacturer) worried about was the pcb and solder joints experiencing thermal fatigue fron lots of seasonal and night/day temperature cycles.

Their ingenious solution was to always run the system towards the warmer end of its spec, and so it included a program that would monitor the temperature inside the case, and would spawn/kill a bunch of threads doing compute intensive math in order to keep the temperature constant when the users workload wasn't enough!

If only mining cryptocurrency had been a thing back then...
That's amusing.

The laser cutter I operate simply has reverse cycle air conditioner mounted in one of the cabinet doors.

Couldn't they slow down the cooling fans? Or was it a passively cooled PC?
Passively cooled. The thing was originally meant for extended use in "extreme" industrial environments (eg at a power substation, inside a wind turbine, etc..), so it had no vents or moving parts at all. Everything was heatpiped to the metal case, which looked like a heatsink.

Similar looking model from same company: https://selinc.com/products/3355/

Reminds me of http://thedailywtf.com/articles/Just-a-WarmUp , a trick which I also discovered independently many years ago and used to keep my fingers warm while attending lectures in a nearly-unheated room.
Prior art for https://xkcd.com/1172/ ?
Geez man, at least mine some cryptocurrency.

Then your hot lunch will buy you another hot lunch down the road!

> I open up a couple of tabs

So, you're basically thawing your lunch manually. Have you considered the "parallel" command?

Hrm, no I hadn't. I don't know much about this command. Could you give me a (thawing) example?
It's pretty straightforward:

  parallel -- yes yes yes yes >/dev/null
If you've more processors than that, add on extra yesses.
That manual counting of cores is what I thought we would let `parallel` handle! I have never actually used parallel, though, so I don't know how to best do it.
one way on a leenukz

    parallel -- `sed -ne 's:^processor.*:yes:p' < /proc/cpuinfo`
on openbsd:

    parallel -- `perl -e 'printf("yes "x\`sysctl -n hw.ncpu\`)'`
don't try the latter in a shell script without being prepared to debug tho.
Right. I was unclear. What I really meant was that I was thinking that `parallel` could automatically spin up more and more jobs until it sensed that there is no further performance to be gained. I'm not sure to what extent that is true, though.
I just realized a simple shell script would make a passable imitation of JMeter, without the horrible UI and xml.
A shell script wouldn't be enough (I've tried). However there are plenty of CLI based load testing tools, including one I've written myself. And if you need something more advanced then there is always Gatling, which is run via the command line and produces proper HTML reports and graphs plus is extended in code (eg in Scala) rather than GUI controls
OT but if you want a nice alternative to jmeter, check out Gatling. Instead of XML, you can code your scenarios in scala.

edit : hnlmorg beat me to it :)

    for p in `seq 1 $(sysctl -n hw.ncpu)`; do yes > /dev/null & done
Alternatively you could run Boinc with a cancer research project or something - defrost your food AND help the world become a better place.
$(nproc --all) on Linux
Lol I defrost the chocolate like this by placing it near the air vent. But care should be taken to make sure that the wrapper doesn’t touch the chocolate while peeling off, because I don’t think the hot air from the vent is hot enough to kill all harmful microbes.
I think this method is much more healthy for you.
that's interesting. i open and close the mac slack app 5 times to defrost my lunch.
I just open a webgl page, seems more effective
I really don't know whether or not your comment is serious, but I damn sure want it to be