Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pansa2
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
66 ms
·
961.
▲
by
pansa2
6y ago
> it is pretty magical seeing something written as a CLI tool running in a browser with minimal changes. Years ago, I wanted to write some code that could run both as part of a command-line app and an in-browser tool. I asked what langua
962.
▲
by
pansa2
6y ago
Something I spotted: Your diagram of “common and uncommon parts of 36(4×9) and 45(5×9)“ actually shows 108(4x27) and 135(5x27).
963.
▲
by
pansa2
6y ago
> every class should always call super().__init__() For this to work, should every class also have an __init__ method that accepts zero arguments?
964.
▲
by
pansa2
6y ago
> subtle visual cues Such as? The only thing that comes to mind is significant whitespace - but some other languages are much more sensitive to whitespace than Python.
965.
▲
by
pansa2
6y ago
The talks by Brandon Rhodes are these two: * The Mighty Dictionary (PyCon 2010): https://www.youtube.com/watch?v=oMyy4Sm0uBs * The Dictionary Even Mightier (PyCon 2017): https://www.youtube.com/watch?v=66P5F
966.
▲
by
pansa2
6y ago
I’d agree with the other comments that Qt seems to be the most popular option if you exclude web technologies. However I’m currently planning a project that has a game in a main window and separate debug windows. The main window will be Ope
967.
▲
by
pansa2
6y ago
> a Python set type is basically a naked hash table, or a dictionary with all keys and no data. Not exactly. Dicts, as you say, are ordered - but sets are not.
968.
▲
by
pansa2
6y ago
Ugh. Full of ads and full of inaccuracies. To learn about Python’s dictionaries, I’d recommend watching the talks by Brandon Rhodes and Raymond Hettinger.
969.
▲
by
pansa2
6y ago
> they've kept working despite the fact I haven't tested on Windows in years. How do you know? :) Cross-compilation, avoiding the need to build on many different systems, is great - but I’d still want to test on all those s
970.
▲
by
pansa2
6y ago
> I can guarantee you that a game will need a scripting language. Embedding a scripting language (e.g. Lua) seemed to be very common around 2010, but I get the feeling that it's much less common today. Has the use of embedded script
971.
▲
by
pansa2
6y ago
A related question I once thought of: What’s the minimum number of pieces you need to assemble to form a “skeleton” of a puzzle - such that every other piece fits directly to one of the skeleton pieces? For an 9x4 puzzle I came up with the
972.
▲
by
pansa2
6y ago
That's too late. The parser needs to know whether it's looking at a definition or a call before that - for example, to know whether to parse "args" as a `parameters` or an `arglist` [0]. [0] https://docs.pytho
973.
▲
by
pansa2
6y ago
How would the parser know that’s a function definition and not a function call ?
974.
▲
by
pansa2
6y ago
In the absence of a return type, and with an LL(1) parser, there needs to be a keyword to indicate the start of a function definition. `def` is a little unusual, but it's also used by Ruby. I once designed a Python-like language and us
975.
▲
by
pansa2
6y ago
Yes, Go suffers from the problem of every direct third-party dependency bringing in a large number of transitive dependencies. Almost every language does, because most developers don't mind. The reason I recommend Python or Go to peopl
976.
▲
by
pansa2
6y ago
> it looks like you'd get this Yes, you would - variables in Python have function-scope, not block-scope. It doesn’t look like this project changes anything about Python except trivial bits of syntax.
977.
▲
by
pansa2
6y ago
> unless you want to make a toy program, you end up with hundreds of dependencies One way to avoid this is to choose a programming language (e.g. Python or Go) that has a "batteries included" standard library. If you choose y
978.
▲
by
pansa2
6y ago
Does anyone have experience with CLI11 [0]? It seems to have plenty of features and good documentation, plus it's available as a single header file. [0] https://github.com/CLIUtils/CLI11
979.
▲
by
pansa2
6y ago
> This is powerful because you [can] use Rust or C++ as your scripting language. Do people really want to use such complex, heavyweight languages for scripting? > WebAssembly enables predictable and stable performance because it do
980.
▲
by
pansa2
6y ago
I'd prefer to use a language that's more orthodox than Lua, e.g. one with class-based OOP and separate lists & maps, rather than tables-for-everything. I'd also like a language that puts more emphasis on backwards-compati
981.
▲
by
pansa2
6y ago
MicroPython seems to be heavily focused on embedded systems . Is there any support for embedding it within an application , i.e. as a replacement for Lua? Or is there another lightweight Python implementation (or Python-like language) tha
982.
▲
by
pansa2
6y ago
> MicroPython implements the entire Python 3.4 syntax Python 3.4 is now over 6 years old. Are there plans to add features from newer Python releases? Or perhaps the developers feel that Python's newer features wouldn't "
983.
▲
by
pansa2
6y ago
https://softwareengineering.stackexchange.com/questions/1003...
984.
▲
by
pansa2
6y ago
What concurrency support does Nim have? Anything like coroutines, async-await etc? Or just OS threads?
985.
▲
by
pansa2
6y ago
Other than having superficially similar syntax, is Nim really Python-like? Also, Nim seems to be targeting a different niche from Python. As Nim is statically-typed and AOT-compiled, its closest competitor is probably Go. The difference is
986.
▲
by
pansa2
6y ago
From pmatti’s comment at https://old.reddit.com/r/Python/comments/i8ksfc/a_new_chapte... : > PyPy core dev here. PyPy will always remain free and open source. No worries there. The question we and man
987.
▲
by
pansa2
6y ago
> There are no changes to the language. Are there other mainstream languages that are as conservative as Go when it comes to adding new features? I don't love Go as a language, but coming from C++ and Python, both of which have no
988.
▲
by
pansa2
6y ago
> Rust is [...] loved by JS devs. Is it? That's interesting, because to me the two languages seem to be polar opposites.
989.
▲
by
pansa2
6y ago
“Julia is squarely in the dynamic camp” - Stefan Karpinski, Julia co-creator https://stackoverflow.com/a/28096079
990.
▲
by
pansa2
6y ago
> A Very British Obsession > Edmund Hillary took [a jar] up Everest Edmund Hillary wasn’t British.
More ›