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

The dozen or so distilleries I visited in Scotland last year, big and small (including allegedly the smallest[^1]), all used Glencairns in their tasting rooms. I brought back a couple of tiny ones I got at Lagavulin since they're neat keepsakes. At home, I prefer a Canadian Glencairn:

https://www.glencairnwhiskyglass.com/glencairn-packages/glen...

[^1]: https://stirlingdistillery.com/


That's how every fridge/freezer combo I'm aware of works. A fan circulates air over the evaporator coil in the freezer compartment both within freezer and up into the fridge compartment. It's not uncommon for the fan to break. There's also a small door in the fridge compartment (called a damper) that controls the amount of air allowed in to the fridge compartment. The motor that controls that can also sometimes get stuck. I've been in my home since 2004 and we're on our second fridge/freezer. The compressor failed on the first one after about 12 years, but not before I had replaced the evaporator fan motor.

Still on the original dish washer and double-oven. Had to replace the top-loading washer about 10 years ago, decided to replace the dryer then too in order to switch from gas to electric. Second microwave. Got tired of replacing the damn door micro switches on the first one.

Home appliances are pretty basic to work on. As long as you can find the parts. The hardest part of working on the double-oven (needed new elements) was building an exact height dolly so I could slide it out of the cabinet on my own:

https://ibb.co/v3RzLND

https://ibb.co/5Lxqc3N


I can maybe do you one better. I think my first investment was 140 shares of LNUX at F&F IPO pricing of $30/share, purchased Dec, 1999. It opened at $299/share the day of the IPO. Should've sold that day. Eventually sold it all in 2004 for $2.80/share.

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


"If you know all commands that you want to execute up-front, then the solution gets far simpler":

https://emmer.dev/blog/concurrent-shell-command-queues/#why-...


What prevents you from feeding your `xargs -P# sh -c` with a FIFO kept open by a dummy reader-writer?

> How to run shell commands in parallel while limiting their concurrency.

Depending upon the task, generate a Makefile and run it with:

  make -j <concurrency>
> My original use case had to do with making a large number of web requests

This is in fact the use case that caused me to think about using a Makefile for concurrency probably 20 years ago. A rule for downloading each URL to a file. Then a simple `make -j <jobs>` with whatever concurrency I desired and bonus: automatically skipping already downloaded files. e.g.:

  BASE  := https://example.com/files
  FILES := a.txt b.txt c.txt d.txt e.txt

  .DELETE_ON_ERROR:

  all: $(FILES)

  $(FILES):
        curl -sS --fail --max-time 30 -o $@ $(BASE)/$@
Or, to emulate one of the examples in the blog post:

  SHELL := bash
  .SHELLFLAGS := -o pipefail -c

  N    := 1 2 3 4 5
  REQS := $(N:%=req-%)

  .PHONY: all $(REQS)
  all: $(REQS)

  $(REQS): req-%:
        @curl -sS --fail-with-body --max-time 10 -X POST -H 'Content-Type: application/json' \
        -d '{"request": $*}' https://postman-echo.com/post | jq -c .json

Run with:

  $ make -O -j 3
> You do not need to know all the commands that you want executed up-front, you can submit commands to it over time.

Ah, yeah, that does put Make in the same bucket as `xargs -P` / GNU `parallel` and requires something more clever.


https://youtu.be/uQl5aYhkF3E

("You're not wrong Walter, ...")


More succinctly, you can run this as a module:

  $ python -m this  # -mthis works too

You've missed the joke, or maybe you weren't old enough to be learning Python during Java's heyday.

The joke is that people wanting to write Python like Java - with an implicit reference to an object's instance - would attempt to import Java's `this` keyword.

Instead of getting Java-like behavior, they're presented with the Zen of Python. You wouldn't be wrong to think that it was as much a commentary on other popular languages of the day as it was a guiding ethos of Python itself.

"Beautiful is better than ugly. Explicit is better than implicit."


Well that's embarrassing. I learned Java in 1996 in college. I was introduced to Python (1.5.2) at a startup in 2000. The startup was probably equally split between Java and Python code. I've essentially used Python almost exclusively since then. It's served me well in my career. I never have cared for Java.

Thank you for explaining the joke that's now old enough to drink, but somehow has eluded me all this time. :-)


Haha, yes! Back in the day whether self should be implicit or explicit was a major point of contention. Those who loved Java and C++ found self to be almost as repugnant as Python's indentation-based syntax. I even posted code on the now defunct ActiveState site to make self implicit again:

https://web.archive.org/web/20211128002836/https://code.acti...

For good reasons, Pythonistas were not appreciative! :)


The revamp of the object model in 3.x IMO justified the design decision more strongly, since now methods are just functions (unless and until munged by the descriptor protocol) and the class is essentially just a namespace for them. (Namespaces are one honking great idea -- let's do more of those!) In 2.x, methods were a separate "unbound method" type even when accessed through the class, even if you explicitly inherited from `object`; with this model, one could more easily imagine special accommodations for `self`.

> The joke is that people wanting to write Python like Java - with an implicit reference to an object's instance - would attempt to import Java's `this` keyword.

No, that isn't where the name comes from; the slogan "import this" was chosen for Python in a contest, and the decision was made to stuff the Zen there because it was also importable code. There's no record of who submitted this slogan or what the motivation was. And I certainly never heard of anyone trying to get a `this` keyword by importing an ordinary module; that would make no sense (the closest reasonable spelling would be something like `from __future__ import this_keyword`).

https://discuss.python.org/t/in-memoriam-tim-peters-1952-202...


I always assumed it was partly a reference to the famous McBainism from Star Trek: First Contact https://www.youtube.com/watch?v=qbZ-CfhuZ5s&t=88s which came out three years earlier in 1996. But also, the whole conceit of having a programming-language philosophy described in a series of aphorisms was itself clearly a gentle poke at Larry Wall and Perl, or at least a two-can-play gesture. It was Wall who was known for talking expansively about language philosophy.

c.f. what happens when you try `from __future__ import braces`

The call to import this has more than the Python syntax meaning.


Barry Warsaw contributed a more complete explanation in the DPO thread: https://discuss.python.org/t/in-memoriam-tim-peters-1952-202...

Read also Max Hardberger makes his living by stealing back stolen cargo ships, beating pirates at their own game from Haiti to Russia. John Crace talks to the ultimate repo man:

https://www.theguardian.com/world/2010/nov/14/max-hardberger...

And let me recommend his semi-autobiographical Freighter Captain:

https://www.amazon.com/Freighter-Captain-Max-Hardberger/dp/0...




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

Search: