Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ptx
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
50 ms
·
811.
▲
TwinBASIC: A modern BASIC aiming for 100% compatibility with VB6/VBA
(twinbasic.com)
78 points
by
ptx
4y ago
|
75 comments
812.
▲
by
ptx
4y ago
> That gives you both worlds. Or put another way, you're forced to specify the same thing twice: with whitespace for the human and with braces for the compiler, creating the possibility for these specifications to get out of sync.
813.
▲
by
ptx
4y ago
The only reason offered is that there are (or might be) differences between version of Python, mainly 2 and 3, as far as I can see. Python 2 is EOL, so that's no longer a concern. As for differences between Python 3 releases, isn'
814.
▲
by
ptx
4y ago
> creating hierarchies where none is needed. Toml is fine, it’s perfect, it’s exactly what people would expect and remember. [...] And it’s not like you need to have multiple separate tomls in different places in the hierarchy. Yes, &q
815.
▲
by
ptx
4y ago
One aspect of Pyright that seems decidedly not better is the 651 NPM dependencies [1] it apparently drags along. [1] https://github.com/microsoft/pyright/blob/main/package-lock....
816.
▲
by
ptx
4y ago
Can this be used for UI callbacks as well, like async/await in C# and coroutines in Kotlin? In other words, with an appropriate fiber scheduler, could I start a function on the UI thread, suspend it while performing some background ope
817.
▲
by
ptx
4y ago
If I understand the example code correctly, it's modifying a heap-allocated struct that's pointed to by a global const. So the global const contains an address which is not modified, but the thing at that address is modified. Righ
818.
▲
by
ptx
4y ago
Maybe I misunderstood then. I was saying that it seems to behave basically like Java. Is that a bug?
819.
▲
by
ptx
4y ago
The confusion is understandable since the UI designer made the checkboxes look like radio buttons.
820.
▲
by
ptx
4y ago
> Variables aren’t immutable in any significant way because you can trivially turn an immutable reference into a mutable one. To be fair, they didn't claim that the values were immutable, only the variables. Isn't the example
821.
▲
C Programming for Everybody
(cc4e.com)
3 points
by
ptx
4y ago
|
0 comments
822.
▲
by
ptx
4y ago
Hmm. So the claim article was examining here was "no undefined values", and you point out that the value is actually initialized to 0 and is thus not undefined. However, the vlang.io page also makes the separate claim (as mentione
823.
▲
by
ptx
4y ago
This thread appears to be conflating two different things: whether a language is a "purely functional language" and whether the language's functions are "pure functions". Presumably a purely functional language woul
824.
▲
FreeBSD Quarterly Status Report First Quarter 2022
(freebsd.org)
2 points
by
ptx
4y ago
|
0 comments
825.
▲
by
ptx
4y ago
You could give the built-in unittest module [1] a try. It's less magical (although also less flexible) and many of its old limitations that people used to cite as advantages of pytest (e.g. built-in test discovery) have since been fixe
826.
▲
by
ptx
4y ago
> There's no test framework/runner worth a damn. The built-in unittest module is essentially a clone of JUnit, so it can't be much worse, and most of the remaining limitations are fixed by pytest which people seem pretty
827.
▲
by
ptx
4y ago
Interestingly, Java has been improving lately in this regard, thanks to cloud and container use-cases. There was a big regression with Java 9, but since then it's been getting better with each release. Numbers for "hello world&quo
828.
▲
by
ptx
4y ago
On second thought, I'm not sure. Can you observe the number's object identity like you can in Python? Does JavaScript have to allocate a new Number object for each "i++"? My point was that the Python version of Aardwolf&
829.
▲
by
ptx
4y ago
If your script doesn't need any third-party modules, you can try running it with "python3 -S", which should make the startup significantly faster if there are a lot of modules installed. (Twice as fast on my machine. Running
830.
▲
by
ptx
4y ago
> its function calls are 30x faster (roughly, I measured it just now with a for loop doing 100 million function calls, which took 0.5s in JS, 15s in python) Your benchmark also measures iterators and boxed integers, which were not in t
831.
▲
by
ptx
4y ago
> Sweden by itself has more than 400 modern combat aircrafts of various types According to Wikipedia [1], the Swedish airforce has only 207 aircraft in total, only 71 of which are combat aircraft (JAS 39 Gripen). [1] https://
832.
▲
by
ptx
4y ago
I'm sure there's something I'm missing here, since no-one seems to be talking about it, but how does the nogil version ensure that changes are made visible to other threads, i.e. what Java calls "safely published"?
833.
▲
by
ptx
4y ago
One example off the top of my head is socketserver in the standard library, which is used by http.server, xmlrpc, IDLE and all kinds of things. The socketserver.BaseServer class sets self.__shutdown_request in one thread and expects it to
834.
▲
by
ptx
4y ago
As some other commenters have mentioned, the GIL removal branch also makes some unrelated optimizations and the performance improvement comes from those rather than from the GIL removal itself, as I understand it. From your link: " Str
835.
▲
by
ptx
4y ago
Python has multiprocessing.shared_memory[1] since 3.8 to share arrays between processes, which accomplishes the same thing and circumvents the GIL issue. [1] https://docs.python.org/3/library/multiprocessing.shared
836.
▲
by
ptx
4y ago
Yes, but without stacktraces, so all you get is an error code. Good luck debugging.
837.
▲
by
ptx
4y ago
Since win32 requires customizing the main event loop to handle e.g. non-modal dialogs, doesn't running nested event loops all over the place (which diverts the messages away from the custom main loop) break things like that?
838.
▲
by
ptx
4y ago
Python with pywin32 [1] was also, and still is, a pretty good way to work with COM APIs. There is a book on it [2] from twenty years ago that is still surprisingly applicable. [1] https://github.com/mhammond/pywin32
839.
▲
by
ptx
4y ago
How do you "bring in the IntelliJ IDE themes" in a Swing application? The default theme [1] is distinctly lacking in beauty – not because it's not modern, or because it doesn't have animations, or because it's not n
840.
▲
by
ptx
4y ago
There is "Co-authored-by" which is supported on GitHub [1] and seems appropriate if the maintainer is basing the solution on someone's code. [1] https://github.blog/2018-01-29-commit-together-with-co-autho...
More ›