Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
d0mine
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
331.
▲
by
d0mine
2y ago
You could use both Bash and Python for tasks they are good at: concisely creating one-line shell pipelines in Bash and implementing complex logic that glues together these pipelines in Python. Example: pyinvoke/fabric https:/
332.
▲
by
d0mine
2y ago
.pyx is used by Cython https://cython.readthedocs.io/en/latest/src/quickstart/cytho...
333.
▲
by
d0mine
2y ago
"unintended"? -- what is the most obvious thing that can happen if paid toilets are outlawed and there is no money (never is) for public toilets? Obviously, there is more to the story. People are not that dumb. Somebody wanted it
334.
▲
by
d0mine
2y ago
Ordinary CPython code releases GIL during blocking I/O. You can do http requests + thread pool in Python.
335.
▲
by
d0mine
2y ago
It is not about your code, it is about C extensions you are relying on. Without GIL, you can't even be sure that refcounting works reliably. Bugs in C extensions are always possible. No GIL makes them more likely. Even if you are not t
336.
▲
by
d0mine
2y ago
Number crunching code in Python (such as using numpy/pytorch) performs the vast vast majority of its calculations in C/Fortran code under the hood where GIL can be released. Single python process can use multiple CPUs. There is co
337.
▲
by
d0mine
2y ago
There is Fabric Python library to execute shell commands remotely over SSH https://pypi.org/project/fabric/
338.
▲
by
d0mine
2y ago
There is no "0" year, 1 is the 1st year, so 100th year is still the 1st century, therefore 2nd century starts in 101 and 20th in 1901.
339.
▲
by
d0mine
2y ago
China plans to quadruple their nuclear output from ~50GW (~5% of total) to 200GW by 2030 and even more later 1400GW by 2100. https://en.wikipedia.org/wiki/Nuclear_power_in_China
340.
▲
by
d0mine
2y ago
Yes, he is a true hero of NSA. The secrets were too big to allow just anybody to leak them.
341.
▲
by
d0mine
2y ago
It could be written as: while True: ... if <exit condition>: break
342.
▲
by
d0mine
2y ago
It is impressive if kafka is the weakest link in your system (99.99% is achievable and even 99.999% is not impossible with the architecture)
343.
▲
by
d0mine
2y ago
If words don't mean anything then of cause there is no difference. You might as well program in brainf*ck -- hey, it is turing complete, so same diff. Personally, I like seeing "dummy" name passed into a function and understa
344.
▲
by
d0mine
2y ago
> We can say that a Mock is a kind of spy, a spy is a kind of stub, and a stub is a kind of dummy. But a fake isn’t a kind of any of them. It’s a completely different kind of test double. You define fakes in this case, not mocks https:
345.
▲
by
d0mine
2y ago
all one needs to understand is that there are names that refer to objects in Python. Nothing is passed by value. The closure returns whatever object the name refers at the moment. That is all. def loop(): for i in range(10):
346.
▲
by
d0mine
2y ago
Code that uses hexagonal architecture/dependency inversion requires less mocks in their tests.
347.
▲
by
d0mine
2y ago
To test against real 3rd-party http API from time to time, and to generate mocks automatically for the same tests, you could use VCR https://pypi.org/project/vcrpy/
348.
▲
by
d0mine
2y ago
Was the vacuum enabled? Were there long orphaned transactions?
349.
▲
Advancing modern code review effectiveness through human error mechanisms
(sciencedirect.com)
2 points
by
d0mine
2y ago
|
0 comments
350.
▲
by
d0mine
2y ago
How do you learn anything in the space of software engineering? In general, there are many different problems and even more solutions with different tradeoffs. To avoid spending hours on fixing broken environments after a single "pip i
351.
▲
by
d0mine
2y ago
On any topic that I understand well, LLM output is garbage: it requires more energy to fix it than to solve the original problem to begin with. Are we sure these exams are not present in the training data? (ability to recall information is
352.
▲
by
d0mine
2y ago
Jython, IronPython are no-GIL Python. Their fate shows that GIL is not as important as it might appear at the first glance. Python is becoming more complicated everyday e.g., with things like PEP-695 Python is starting to resemble C++ (not
353.
▲
by
d0mine
2y ago
travesty: a debased, distorted, or grossly inferior imitation https://www.merriam-webster.com/dictionary/travesty Unless you grind leetcode problems, it is unlikely one could solve them in 30 minutes (you are supposed
354.
▲
by
d0mine
2y ago
> disproving causation If the sequence is: 1- study that shows correlation between X and Y 2- someone says "X causes Y" referencing the study then it is appropriate to point out that correlation does not imply causation. X may
355.
▲
by
d0mine
2y ago
Arena can be used to allocate many times but deallocate exactly once. In Zig: test "arena allocator" { var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); defer arena.deinit(); const al
356.
▲
by
d0mine
2y ago
I haven't stumbled upon any issues with alacritty + nvidia (lucky, perhaps). Though, mostly, I use vterm in emacs (unmatched customization & integration)
357.
▲
by
d0mine
2y ago
Just use utf-8 everywhere. Yes, even on Windows http://utf8everywhere.org/ Full Unicode support is very hard. The best I've seen is in Raku. You can leave without it completely e.g. Zig.
358.
▲
by
d0mine
2y ago
I hope forbidding telling the truth is about something banal like "fake it until you make it" in some of OpenAI demos. The technology looks like magic but plausible to implement in a few months/years. Worse if it is related t
359.
▲
by
d0mine
2y ago
99% is hopelessly naive. If it were true, we would live in "generate code from UML" world (it is useful only for niche tasks)
360.
▲
by
d0mine
2y ago
The page mentions various explanations (just-so stories that are expected for archaeology). No definitive answer.
More ›