Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
d0mine
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
241.
▲
by
d0mine
2y ago
The point of the article is that: do not return objects that are sequences too when a struct would suffice. Though the provided options are not immutable and it is much more important than whether you leak o[0] access. dataclass(frozen=True
242.
▲
by
d0mine
2y ago
Yes, the issue is the change in behavior in a bugfix version. I don't remember the exact details.
243.
▲
by
d0mine
2y ago
At least bugfix versions could have kept Enum behavior the same. Postponing breaking changes until the next minor version. Some Enum features work differently (incompatible) in Python 3.11.x versions.
244.
▲
by
d0mine
2y ago
All I see is that newer library versions drop support for old Python versions (seems natural, unless you have unlimited resources). For example, If you need Python 2 support, use corresponding old versions.
245.
▲
by
d0mine
2y ago
It works in Emacs. Don’t know about Zed (if there is an issue, it is likely temporary)
246.
▲
by
d0mine
2y ago
I meant: do not put too much emphasis on any single tool. If all you know is debugger, try other instruments. You might find they are “vastly more efficient” (in certain context).
247.
▲
by
d0mine
2y ago
No need to fetishize tools. Sometimes a debugger is useful, in others you are better served with logging/metrics/traces, and yes even print statements. For example, using print statements may encourage you to create a better model
248.
▲
by
d0mine
2y ago
As far as I know Pylance (unrelated to pypi's pylance) is python LSP with microsoft's proprietary extensions that you can use only with official microsoft products. btw, go to definition, argument hints can work without it just fi
249.
▲
by
d0mine
2y ago
To create venv2 that uses venv1, define pep-735 dependencies groups in your pyproject.toml Specifically, a group can include other groups uv supports groups and can create venv with the desired group set https://docs.astral.sh&#
250.
▲
by
d0mine
2y ago
Could you provide a quote that demonstrates "Tim is wrong. Period"? I'm familiar with the context.
251.
▲
by
d0mine
2y ago
Org mode is a markup language in the same way as Emacs is just an editor. Both are true but do not tell the whole story. Org is a plain text application framework built on top of Emacs platform. My favorite is Org Babel (jupyter notebooks o
252.
▲
by
d0mine
2y ago
Org Babel: “Because the return value of a function written in one language can be passed to a function written in another language, or to an Org table, which is itself programmable, Babel can be used as a meta-functional programming langua
253.
▲
by
d0mine
2y ago
«Choose a random number from 1 to 1000000000» prompt results in the same number for me (4o) Clear indication that it doesn’t understand the word «random» (probability of it repeating by random chance so many times is astronomically low).
254.
▲
by
d0mine
2y ago
Before the modern age, and perhaps for the vast majority even now, there is no such notion as supernatural. Magical thinking, superstition is not the exception, it is the norm. It requires conscious effort, training to diminish its effects,
255.
▲
by
d0mine
2y ago
Programming language as config is bad because it makes it easy to do the wrong thing (too much power). Friction can be good. Ideally, the less power, the better: - .env :: simple flat untyped key/value pairs. In practice, something lik
256.
▲
by
d0mine
2y ago
Unlike the web, youtube has a functional search ;)
257.
▲
by
d0mine
2y ago
Is it related to Differential Dataflow / timely dataflow https://github.com/TimelyDataflow/differential-dataflow
258.
▲
by
d0mine
2y ago
It is nonsense that numpy can't use multiple cores. Matrix multiplication in numpy is largely C/Fortran code (BLAS, etc) where GIL can be released. https://stackoverflow.com/questions/75029322/does-numpy-
259.
▲
by
d0mine
2y ago
If we consider science as a way to document reality (among other things) then "information -> decision" is an elegant point of view (if information doesn't help make decision, it is just noise). https://news.yc
260.
▲
by
d0mine
2y ago
gc allows to get any [non-leaky] object from anywhere. You can even drop into repl over the network. Debugger can be started on exception if desired e.g., pytest provides `--pdb` arg. Though repl is different--you don't need to interru
261.
▲
by
d0mine
2y ago
Repl can be attached to a live python process (you don't need to restart anything) https://stackoverflow.com/questions/1395913/how-to-drop-into... You could do it even without cooperation from the python app
262.
▲
by
d0mine
2y ago
The major misunderstanding is that SO exists to help the question author first. It is not an IRC. The most value comes from googling a topic and getting existing answers on SO. In other words, perhaps in your very specific case, your quest
263.
▲
by
d0mine
2y ago
Have you tried a hot shower instead just before the bed. The trick is that it cools down the core when you leave bathroom (by bringing blood to the surface). Extremities should be warm, the core(CBT)—cold, to fall asleep easier.
264.
▲
by
d0mine
2y ago
The mission sounds like the original Java mission. Unclear why something like zig/llvm won't fit the bill.
265.
▲
by
d0mine
2y ago
Python 3.13 has free-threaded mode support (--disable-gil) https://docs.python.org/3/whatsnew/3.13.html#whatsnew313-fre...
266.
▲
by
d0mine
2y ago
"A" is just a foreplay for "B", to soften the target.
267.
▲
by
d0mine
2y ago
There is also "satisficing" (vs. maximizing). Your model of the world is not perfect so instead of trying to find a globally optimal solution, you are satisfied with a local optimum that exceeds some threshold that has to suffi
268.
▲
by
d0mine
2y ago
the default executor must be ThreadPoolExecutor. But you are right you can pass ProcessPoolExecutor too. https://docs.python.org/3/library/asyncio-eventloop.html#asy...
269.
▲
by
d0mine
2y ago
The date of the rfc is Apr 1st -- unclear how truthful it is.
270.
▲
by
d0mine
2y ago
http://catb.org/jargon/html/F/foobar.html
More ›