Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
d0mine
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
68 ms
·
901.
▲
by
d0mine
4y ago
You might want: foo = mapping.pop("foo", "default") It removes "foo" key from mapping if any. `foo` is "default" if "foo" is missing and `mapping["foo"]` otherwise. Dictio
902.
▲
by
d0mine
4y ago
Actually, it is a step backwards: unless you control both sides (perfect version compatibility), passing text to extract only parts you care about is more resilient (think SOAP vs. REST).
903.
▲
by
d0mine
4y ago
there is a pattern matching in Python 3.10 (match/case) which can match dictionaries. https://peps.python.org/pep-0636/#going-to-the-cloud-mapping...
904.
▲
by
d0mine
4y ago
I don't know about you but GUI is at most 1% among all the programs I write (if we are talking in terms of applications, not lines of code). Most are tiny one-purpose CLI programs instead e.g., read OTP secret as an input and print c
905.
▲
by
d0mine
4y ago
Python (and any other general purpose languages) shouldn't be considered a replacement for shell pipelines but rather an extension tool. Actually, the pipelines survived 50 years in big part due to how easy to extend them: just define
906.
▲
by
d0mine
4y ago
As I understand recycling at home is just a red-herring (it ends up somewhere in Turkey anyway and even if it didn't it is just a bucket in the ocean compared to the actual reasons for the climate change (natural resources industry). I
907.
▲
by
d0mine
4y ago
It is worth spending the whole day to optimize even a 1 second task if you do it 50 times per day https://xkcd.com/1205/ (over 5 years)
908.
▲
by
d0mine
4y ago
It is not a Python thing, it is a floating-point thing. You need it if you want hardware support (CPU/GPU) for non-integer arithmetic in any language. Otherwise, you have decimal, fractions, sympy, etc modules depending on your needs.
909.
▲
by
d0mine
4y ago
CPU binning assumes just one axis: from 100% working (perfect) then various degree of broken to 0% (completely broken) which leads to the wrong attitude of thinking in terms of "disorder" (from perfect human to completely broken
910.
▲
by
d0mine
5y ago
There is a criticism of Sinclair's theories in particular on Resveratrol by Stanfield: https://youtu.be/vGmmBJq0NNo https://youtu.be/rpB5hvE96iY
911.
▲
by
d0mine
5y ago
You are trying to reduce human mind to one bit: broken/working. Humans have strong general intelligence and therefore are capable of solving many different tasks. There are many different tasks in the world where different characteri
912.
▲
by
d0mine
5y ago
EU is to ban Russian oil (I assume, it will have to buy it for a premium price from the empire responsible for the war--it is the end of EU independence if there was any). https://www.wsj.com/articles/germany-calls-for-
913.
▲
by
d0mine
5y ago
If it is not gpt-generated, it is a rather remarkable experience worth elaborating on.
914.
▲
by
d0mine
5y ago
The point is that we shouldn't consider screwdrivers to be demented hammers even If you are a hammer like most in your surroundings. If a game map is small (there is not much time for development before you are destroyed) and/or r
915.
▲
by
d0mine
5y ago
It is just a matter of time before sending money to Russia for any reason will be considered as supporting terrorists.
916.
▲
by
d0mine
5y ago
Sanctions are not likely to be lifted until "wrong" people profit from Russia's oil. Russia looks like a banana republic where the puppet government gone rogue.
917.
▲
by
d0mine
5y ago
Imagine your skin has a different from your neighbors color. Would it be sensible to consider it a disorder? Even if it may happen that it negatively affects your every day life, and it may be maladaptation in the region where you live but
918.
▲
by
d0mine
5y ago
Evolution reuses parts, a lot. For example, serotonin has some effect on crabs too--it doesn't mean the function is the same as in humans or that psychotherapy for crabs is a good idea.
919.
▲
by
d0mine
5y ago
Significant part of the work is massaging data and R sucks at that compared to Python. "if you want to do more than statistics, let’s say deployment and reproducibility, Python is a better choice." https://www.guru99.co
920.
▲
by
d0mine
5y ago
https://www.gnu.org/philosophy/right-to-read.en.html
921.
▲
by
d0mine
5y ago
This part also stand out to me. It is unfortunate that a science communicator would express her research preference in such a way. It is true there were no breakthrough in ages in the particle physics (standard model works extremely well),
922.
▲
by
d0mine
5y ago
Black does split strings if configured and it does use implicit concatenation of Python string literals.
923.
▲
by
d0mine
5y ago
“Accidently” — the reason is as old as the time itself: Greed.
924.
▲
by
d0mine
5y ago
that is the party line NATO would want you to believe.
925.
▲
by
d0mine
5y ago
There are legitimate issues but in most cases I encountered, the complaints are of the kind: "it doesn't behave exactly like solution from another language that I happened to learn first and therefore Python sucks. What is the dep
926.
▲
by
d0mine
5y ago
Could you link to an example HN thread of "meaningful political discourse" in your opinion.
927.
▲
by
d0mine
5y ago
There is no meaningful political discussion possible here. In tech, truth matters (a practitioners can share something meaningful). In politics, the truth is essentially irrelevant especially when one side has vastly more resources than
928.
▲
by
d0mine
5y ago
If it were not censored, it could had been useful by telling the truth between the lines with humor. Unfortunately we live in the times that even a jester can't speak the truth to the king without risking losing their life.
929.
▲
by
d0mine
5y ago
Don't confuse strong typing and static typing. Python is strongly typed. It respects types at runtime e.g., `"1"+1` causes TypeError. Python is not statically typed. For comparison, C is statically typed but it is weakly typ
930.
▲
by
d0mine
5y ago
Try a blind test for your cocktails (you could follow https://en.wikipedia.org/wiki/Lady_tasting_tea ). The results may surprise you.
More ›