Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ptx
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
35 ms
·
631.
▲
by
ptx
3y ago
TLDR: If you fork the process after starting threads you're gonna have a bad time, so use spawn instead of fork , like this: from multiprocessing import set_start_method set_start_method("spawn")
632.
▲
by
ptx
3y ago
If you use Store interfaces that are specific to the needs of the client, rather than building one universal Store that covers every possible use case, isn't it fairly easy to modify that abstraction when the need arises? (Sort of the
633.
▲
by
ptx
3y ago
...and here's how to do it in Apache: https://httpd.apache.org/docs/2.4/mod/mod_deflate.html#preco...
634.
▲
by
ptx
3y ago
theForger's Win32 API Programming Tutorial [1] was available in 2001 according to archive.org, showing how to build actual native applications without anything even remotely new. [1] http://www.winprog.org/tutorial/
635.
▲
by
ptx
3y ago
> But this wouldn't work for programming language ideologies. Not for the OOP proponents, anyway. Why not? Are you saying that OOP isn't solving any problem? As I understand it, OOP is mainly about allowing behavior to be rec
636.
▲
by
ptx
3y ago
On the other hand, if all sites were like this, we would just keep our browser windows at a smaller size and it would work fine.
637.
▲
by
ptx
3y ago
> A simple RTF editor for X11. [...] Prone to crashing. That makes is pretty useless as a word processor, unless it has a really robust auto-save system. Anyway, the Plan calendar thing looked neat, but I don't think it's pac
638.
▲
by
ptx
3y ago
> see a noun and jump to making a class Even when what you Utils.see Utils.is a verb, you Utils.must still Utils.jump to Utils.make a class. Java 5's static imports at least allow cleaning up the call site, although the documentat
639.
▲
by
ptx
3y ago
What's wrong with the unit file?
640.
▲
by
ptx
3y ago
This site has a pretty good tutorial and conceptual overview: https://tkdocs.com/
641.
▲
by
ptx
3y ago
How do you maintain the generated code? Once you make changes to it, you can't regenerate it without losing the changes.
642.
▲
by
ptx
3y ago
I think you must have misread the documentation [1], which says: "By default, the server binds itself to all interfaces." [1] https://docs.python.org/3/library/http.server.html
643.
▲
by
ptx
3y ago
> We think the issue might not be severe enough [...] It might not? In other words, if a security vulnerability is reported, assume everything is actually fine until proven exploitable beyond any shadow of a doubt?
644.
▲
by
ptx
3y ago
IntelliJ IDEA does have LightEdit mode to handle this use case: https://www.jetbrains.com/help/idea/lightedit-mode.html
645.
▲
by
ptx
3y ago
> This is a terrible decision At first I thought you were objecting to the other part of the quoted sentence and saying that relying on AWT/Swing at all, even for creating windows, is a terrible decision. These libraries are not g
646.
▲
by
ptx
3y ago
Couldn't you have a beacon that detaches from the vehicle, floats up to the surface and transmits the signal from there?
647.
▲
by
ptx
3y ago
> This implies either one of two things. First, that the Controller has to be specialized for the target widget. It's a TextController, with its own house key to the TextView Yes, this appears to be the way it worked in Smalltalk-
648.
▲
by
ptx
3y ago
> Most cross platform GUI frameworks are object orientated even if the underlying graphical APIs are procedural. For example, win 32 API is procedural. Well, win32 is kind of object-oriented, in a way, even though it doesn't alway
649.
▲
by
ptx
3y ago
No thanks. PowerShell seems to have all sorts of crazy gotchas in addition to the weird syntax. For example, if I understand correctly, your "cat $path" won't actually work for all filenames, because "cat" is an ali
650.
▲
by
ptx
3y ago
Interesting article. I didn't know about JSP Model 2. Another detail that's not mentioned, but very useful for understanding the original pattern, which is described in [1], is that controllers had a specific and unique responsibi
651.
▲
by
ptx
3y ago
That's 4 years after the EOL of Python 2.7: https://www.python.org/doc/sunset-python-2/
652.
▲
by
ptx
3y ago
The links at the bottom are implemented with divs with onclick events instead of actual links, for some reason.
653.
▲
by
ptx
3y ago
How do you use it? It sounds (from the manual page) like it just changes what a branch points to... so how is it different from "git reset --soft"?
654.
▲
by
ptx
3y ago
Have you tried Mercurial? The Git user interface is a mess in comparison, since it evolved from a collection of loosely related scripts rather than being cohesively designed. Git does the same things and works fine once you learn it, but th
655.
▲
by
ptx
3y ago
Hmm. Apparently version 5 of the pickle protocol (which is faster) isn't yet used by the multiprocessing module [1] even though it was mentioned as part of the rationale in PEP 574 [2]. [1] https://github.com/python
656.
▲
by
ptx
3y ago
This sounds a bit like COM and its apartment-threaded vs. free-threaded objects. The "special safety code" in that case is a proxy object that sends messages to the thread that owns the actual object when its methods are invoked.
657.
▲
by
ptx
3y ago
> they can move objects much faster between subinterpreters because they don’t need to serialize through a format like JSON That would be a huge advantage, but it's not there yet. According to PEP 554 [1] the only mechanism for sh
658.
▲
by
ptx
3y ago
If we could just get efficient passing of objects graphs from one subinterpreter to another, which is not in the current plan, I think that would solve a lot of use cases. That would allow producer/consumer-style processing with multip
659.
▲
by
ptx
3y ago
The pomodoro example seems to be updating the UI from a background thread. The TkDocs tutorial [1] advices against this and suggests posting a custom event to the main thread instead. Using the after or after_idle methods [2] to post a
660.
▲
by
ptx
3y ago
The MicroPython threading support is apparently "highly experimental" according to the docs [1]. Did you use another language, or does the threading in MicroPython work well despite being experimental? [1] https://docs.
More ›