HNHacker News
TopNewBestAskShowJobs

Mlller

97 karma · joined August 24, 2020

submissionscomments
Mlller··on How to choose the right Python concurrency API
I do, too, for websites, although I try to avoid dependencies like a snowflake the fire. But doing nothing more than using gevent server and putting

  from gevent import monkey
  monkey.patch_all()
at the top of the main module was such a game changer.
Mlller··on Help pick a syntax for CSS nesting
Yes, I cannot agree more. I did the survey in the vain hope that I could leave a comment or even vote for “no nesting”, i.e. “equivalent CSS”. Most of the given examples are great evidence – some concerningly great evidence – for Tim Petersʼ “flat is better than nested”:

(1 and 2:)

  .foo {
    color: red;

    @nest .parent & {
      color: blue;
    }
  }
(3:)

  .foo {
    color: red;

    {
      .parent & {
        color: blue;
      }
    }
  }
(Without nesting:)

  .foo {
    color: red;
  }
  
  .parent .foo {
    color: blue;
  }
The nested variants, for my sense, foreshadow grave technical debt – in specs, docs, browser code and CSS files.
Mlller··on Performance comparison: counting words in Python, C/C++, Awk, Rust, and more
Taking it in a slightly different direction – because in my work chunking is nearly never necessary (too little text or too much memory) whereas Unicode characters and punctuation nearly always is – I would tend to something like:

  from collections import Counter
  from re import finditer

  word_counts = Counter()
  with open(PATH, encoding = 'utf-8') as file:
      doc = file.read()
  word_counts.update(match.group().lower() for match in finditer(r'\w+', doc))
In Python, this could be a fairly performant way of taking unicode into account, because it doesnʼt use Pythonʼs for-loop, and regular expressions are rather optimized compared with writing low-level-style Python. (Maybe it should use casefold instead of lower.)
Mlller··on Cinema’s greatest scene: ‘Casablanca’ and ‘La Marseillaise’ (2015)
> contrast that to the dueling German anthem in the film, which is a rather explicitly anti-French anthem

Yes, OTOH it seems to have a mere passive, defensive spirit: “a guardian of the river” – “the watch on the Rhine” – “protects the sacred border of the land” – “remain”,[1] written afraid of annexation:

“Repeated French efforts to annex the Left Bank of the Rhine began with the devastating wars of King Louis XIV. French forces carried out massive scorched earth campaigns in the German south-west. This policy was fully implemented during the Napoleonic Wars with the creation of the Confederation of the Rhine in 1806–1813. In the two centuries from the Thirty Years' War to the final defeat of Napoleon I, the German inhabitants of lands by the Rhine suffered from repeated French invasions.

The defeat and exile of Napoleon gave the Germans some respite, but during the Rhine Crisis of 1840, French prime minister Adolphe Thiers advanced the claim that the Upper and Middle Rhine River should serve as his country's "natural eastern border". The member states of the German Confederation feared that France was resuming her annexationist designs.”[2]

Maybe itʼs even meant as a signal of dishonesty that it is sung by soldiers whose army didnʼt watch at the Rhine but occupied France brutally? Anyway, I donʼt intend to praise the Wacht am Rhein, itʼs certainly not great poetry, rather a rattling and clattering from the dustbin of history.

[1] https://en.wikipedia.org/wiki/Die_Wacht_am_Rhein#Lyrics [2] https://en.wikipedia.org/wiki/Die_Wacht_am_Rhein#Origin

Mlller··on Exit, pursued by a bear
(by Martin Niemöller, FWIW: https://en.wikiquote.org/wiki/Martin_Niem%C3%B6ller – Ctrl-F “When the Nazis”.)
Mlller··on Exit, pursued by a bear
> Why didn't the German government massively subsidize Green energy?

But they did? (Sorry if Iʼve misunderstood you.)

“According to a 2016 study commissioned by a neoliberal think tank, €150 billion have been spent so far, and the bill is estimated to reach half a trillion euros by 2025.”[1]

That was started by the Schröder government (1998–2005) and rather half-heartedly continued by the Merkel government (2005–2021), decreasing the subsidies.

China has even benefitted from German subsidies.

“Germany long aimed to be a front runner in the solar energy industry, but waning subsidies and rising competition from China have clouded its outlook. To add insult to injury, the Chinese boom has been generously supported by German financial aid.” … “According to KfW officials, it was precisely the subsidy policy's goal to help Chinese solar producers achieve a breakthrough, in order to promote the environmentally friendly technology internationally.”[2]

[1] https://www.dw.com/en/german-issues-in-a-nutshell-energiewen... [2] https://www.spiegel.de/international/germany/a-capital-error...

Mlller··on Germany records first monthly trade deficit since 1991 as inflation soars
“europeans agreed to an open market and common currency that included Germany only if [Germany makes a certain concession]”

It was rather the other way round: Germany was made to agree to the euro project as a concession for reunification.[1]

All in all, this seems to have been beneficial for a majority of normal people in the countries getting a stronger currency and for a minority of people in Germany, who export: Consequently, Germany’s wealth distibution tends to be the most unequal in the euro zone,[2] and its median wealth is slightly below that of Slovenia and significantly below that of France, Italy and Spain.[3]

[1] https://voxeurop.eu/en/you-get-unification-we-get-the-euro/

[2] https://www.reuters.com/article/us-germany-wealth-idUSBREA1P...

[3] https://en.wikipedia.org/wiki/List_of_countries_by_wealth_pe...

Mlller··on Nuclear is back on the table for a green future
Sanctions blocked specifically by Germany and Hungary (and noone else)? The oil ban, FWIW, was blocked or watered down by Hungary, Slovakia, Bulgaria and the Czech Republic (and supported by Germany):

https://www.euronews.com/my-europe/2022/05/09/hungary-slovak...

https://www.politico.eu/article/eus-russian-oil-ban-stalls-a...

Mlller··on How did people get to Britain 950k years ago?
What about Mommsenʼs History of Rome (itʼs actually only about the Roman Republic, he didnʼt finish planned further volumes):

- On the one hand, Mommsen was a professional historian and his work was (and is[1]) highly acclaimed. [2] cites: “Equally great as antiquary, jurist, political and social historian, Mommsen lived to see the time when among students of Roman history he had pupils, followers, critics, but no rivals. He combined the power of minute investigation with a singular faculty for bold generalization and the capacity for tracing out the effects of thought on political and social life.”

- On the other hand, his History of Rome got the nobel prize for literatur, so at least some people found it fun to read, too. Again from [2]: “Its sureness of touch, its many-sided knowledge, its throbbing vitality and the Venetian colouring of its portraits left an ineffaceable impression on every reader.” “It was a work of genius and passion, the creation of a young man, and is as fresh and vital to-day as when it was written.”

Itʼs freely available at Project Gutenberg: https://en.wikipedia.org/wiki/History_of_Rome_(Mommsen)#Exte...

[1] “Still read and qualifiedly cited” https://en.wikipedia.org/wiki/History_of_Rome_(Mommsen)#firs...

[2] https://en.wikipedia.org/wiki/History_of_Rome_(Mommsen)#1902...

Mlller··on Invade Haiti, Wall Street Urged. The U.S. Obliged
> The Germans committed atrocities against the Jews less than 100 years ago, but nobody is demanding reparations there?

As it seems, reparations were demanded (and payed) sometimes, cp. e.g. https://www.jewishvirtuallibrary.org/german-holocaust-repara...

Mlller··on Ask HN: Why did the ruble stabilize and what's going on?
$1B/day is in fact the sum from all of the EU for gas and oil according to Josep Borrell, the EUʼs top diplomat from Spain [1], [2], [3]. The $139M/day ≈ 13.9% from Germany include oil and gas (according to the source I gave).

The source you provided (thank you) reads: “Proceeds from the sale of Russian oil and gas amount to around $1bn (£770m) a day”. In the context of the article, it is misleading, unfortunately; in itself it could even mean ‘from everyone’. Itʼs probably the number given by Borrell.

[1] https://www.euronews.com/my-europe/2022/04/06/eu-has-spent-3...

[2] https://tfiglobalnews.com/2022/04/08/eu-gave-e1-billion-in-m...

[3] https://www.ndtv.com/world-news/minister-says-eu-giving-russ...

Mlller··on Ask HN: Why did the ruble stabilize and what's going on?
> $1B/day from Germany alone

According to [1], all imports from Russia to Germany in March were 4B EUR, so rather $139M/day, not $1B/day. Maybe that is the amount for all of the EU (with Germany then contributing 13.9%)?

[1] https://www.destatis.de/DE/Presse/Pressemitteilungen/2022/03...

Mlller··on Germany boosts renewables with “biggest energy policy reform in decades”
Contrary to the narrative common now, many European states and particularly a majority of Eastern European states seem to have been more dependent on Russian gas than Germany:

  - Hungary: 110.4 percent 
  - Latvia: 100.1 percent 
  - Finland: 92.4 percent 
  - Estonia: 86.5 percent 
  - Czechia: 86.0 percent 
  - Slovenia: 81.0 percent 
  - Slovakia: 75.2 percent 
  - Bulgaria: 72.8 percent 
  - Germany: 58.9 percent
“Some of the countries have a figure above 100 because they import more than required for domestic consumption and export other energy products.” per https://thehill.com/policy/equilibrium-sustainability/326055...
Mlller··on What Every Programmer Absolutely, Positively Needs To Know About Encodings (2011)
> in German dictionaries, "öf" would come before "of".

I am only aware of “of” before “öf”, e.g. in Grimmʼs dictionary, the greatest dictionary of German itself, “offen” ‘open (adj.), openly’ comes before “öffen”, a variant of “öffnen” ‘to open’.

When I have to sort strings in German, I make a sortstring by throwing out diacritics (via Unicode Normal Form “K”anonical Decomposition) and changing “ß” to “s”. Then I order by a tuple of this sortstring and the original string.

Mlller··on Has Literature Ever Changed the Course of History?
Since a change in the course of history has, as a rule, multiple causes, it is very unlikely a priori that a work of literature ever was the one sufficient condition for a change in the course of history.

But as a contributing factor – why not, that is likely and IMHO attested. One example: A performance of the grand opera “La muette de Portici” is credibly said to “have sparked riots leading to the Belgian Revolution” as https://en.wikipedia.org/wiki/La_muette_de_Portici puts it.

Mlller··on Railway lines once connected the Middle East
But “without the need to confront the British over Kuwait” seems to indicate that this railway project in itself was good for keeping peace because it decreased the conflict potential.
Mlller··on New evidence shows this uranium cube is likely relic of Nazi A-bomb program
OTOH Heisenberg, particularly, was hated by the “Deutsche Physik” agitators and had certainly reason to strongly dislike them; cp. <https://en.wikipedia.org/wiki/Werner_Heisenberg#SS_investiga...>.
Mlller··on New evidence shows this uranium cube is likely relic of Nazi A-bomb program
In addition to Phireʼs comment: “HEISENBERG: I would say that I was absolutely convinced of the possibility of our making a uranium engine but I never thought that we would make a bomb and at the bottom of my heart I was really glad that it was to be an engine and not a bomb. I must admit that.” (Transcript of Surreptitiously Taped Conversations among German Nuclear Physicists at Farm Hall. August 6-7, 1945. <http://germanhistorydocs.ghi-dc.org/pdf/eng/English101.pdf>)
Mlller··on The Decline and Fall of the Latin Neuter
Correct: According to the theory outlined above, no neutral form could have been a PIE nominative, because the PIE nominative would have been marked willfully acting entities. So the root cause would have been the distinction made for nouns (“can willfully act” – “cannot willfully act”), and this must affect all words with noun-agreement (i.e. adj., det.) or words substituting, deputizing nouns (i.e. pronouns).

It is wonderful that this formerly semantic system (if the theory is correct) has left its formal trace over millennia and a range of thousands of miles.

Such preservation was likely in so far as otherwise a new suffix-inflectional distinction had to be introduced in order to distinguish the nominative neuter from the accusative neuter; and in the history of the IE languages, suffix-inflectional distinctions are rather removed than built.

Mlller··on The Decline and Fall of the Latin Neuter
Yes, the expressions “moving” – “not-moving” are rather misleading.

The actual distinction according to this theory (or to my favourite flavour of this theory) was: “able to act willfully” – “unable to act willfully”. The distinction was quite logical. Cp.:

(A) “Susan runs down the hill.”

(B) “Water runs down the hill.”

(C) “Susan drinks water.”

A speaker of Proto-Indo-European might have said, learning English: “This is strange – as if these were somehow the same acts or events. ‘Susan runs’, OK, but water does not run – it is dragged down. It does not act, something happens to it.” (And then the PIE-speaker might have speculated that anglophone people have an animistic worldview or so.)

In PIE the subject of a sentence seems to have denoted an actual agens; and there seems to have been a class of nouns for things unable to act willfully, hence unable to be the subject. So that the subject in (A) and (C) would have been a subject in the nominative, denoting an agens, whereas in (B) “water” would not have been seen as subject; the sentence would have been constructed differently and “water” would have been put in the same case as “water” in (C).

Because all over the old IE languages, neuter nouns have the same form for the nominative and the accusative, and it seems to have been rather the form for the accusative: Cp.

Latin masc. nom. sg. ‑us

Latin masc. acc. sg. ‑um

Latin neutr. nom. sg. ‑um

Latin neutr. acc. sg. ‑um

There is further evidence, too.

In principle, the distinction was quite logical, but its application is difficult and gets easily messed up over time until the old semantic distinction has become a mere formal one.

Mlller··on When Birds Migrated to the Moon
Thanks to https://news.ycombinator.com/item?id=25549169 I read https://www.historytoday.com/archive/natural-histories/great... – which contains much more details but no Pfeilstorch, interestingly.
Mlller··on Father Reginald Foster has died
https://news.ycombinator.com/item?id=14769758 ; https://news.ycombinator.com/item?id=17103502 (short, but links to a book by Fr. Reginald Foster, O.C.D.).
Mlller··on Modern mathematics emerged from “The House of Wisdom” in the 13th century
≈‘In spring, the roses hide the thorns they have on earth, | My rosery springs up and takes away my thorny mood’ from the Divan (Ghazal Foruzanfar-1945) maybe.
Mlller··on Python Pip 20.3 Released with new resolver
IME, pip and its inclusion in python installations made a great and very positive difference for using Python on Windows: before, third-party installations mostly (sic) didn’t succeed; after, they almost always succeed. I’m grateful.
Mlller··on The Disaster Poet
The occasion for “The Tay Bridge Disaster” was also the occasion for a poem by Theodor Fontane (1819–1898), which, however, is held in high regard: “Die Brück’ am Tay”

German: https://de.wikisource.org/wiki/Die_Br%C3%BCck%E2%80%99_am_Ta...

Link to “Norman Barry's English translation”: http://www.johnmaynard.net/RelPoems.html

A side-by-side presentation with another translation: https://lyricstranslate.com/en/die-br%C3%BCck-am-tay-when-we...

← PreviousPage 2 of 2