Definitely a promising language, and I tried to write something with it a year or so ago. It's clearly still in the "research language" phase though; "hello world" took about 2 minutes to compile.
Yeah I agree. Presumably they don't do that though because you'd end up with pages of nothing but ).
I never understood why they don't add just a little syntactic sugar. You don't need much to take it from a mess of brackets to something comprehensible.
What makes you think it's making a pointer? Nobody said anything about that.
Haha this is also the classic Linux experience. Any complaints about stuff not working properly get met with "It works for me" and "You're doing it wrong". Oh and don't forget "did you submit a bug report?" and "if you don't like it, fork it!".
The only way you know before doing it is through experience. If you don't already know you can make a prototype, or just guess and go for it - you might have to change it later though.
I would recommend prototyping when the cost of correcting a wrong decision later is going to be really high.
The other option if you don't have experience is just to copy what other people have done.
And there's a reimplementation of Git in Rust. Not sure how complete it is though.
I agree, those are fantastic icons. Very clear.
Well they still have runtimes, but yes they can be pretty minimal.
You're still shipping a load of libraries that come for free with JS though, e.g. with Rust WASM string formatting and unicode support always ends up being annoyingly huge, and that's built in to JS engines. There's also collections (Map, Set), etc.
I can give you some basic Python set-up advice (which is hard-won because nobody tells you this stuff):
- Use
pyproject.toml, notrequirements.txt. It's better and it's the recommended way. - Always use type annotations. I saw you used it a bit - well done! But just use it everywhere. Add declarations & type annotations for your class member variables. You'll thank me later! Also prefer Pyright to Mypy; it is far far better (and the default for VSCode).
- I would recommend using Black to autoformat your code. It's easily the best Python formatter. You can automate it using pre-commit.
- ALWAYS PUT MAIN IN A FUNCTION. You should not run any code at a global scope. Do it like this:
def main():
...
if __name__ == "__main__":
main()
There are two reasons:
- Generally it's good to keep variables to the smallest scope possible. Putting everything in a global scope will just mean people start using it in their functions, and then you have a mess.
- Any code you put in a global scope gets run when you import a module. Importing a module should not have any side effects.
Other minor things:
Pathhas a crazy/neat override of the/operator so you can doPath("foo") / "bar" / "baz.txt".- Don't use
assertfor stuff that the user might reasonably do (like not choosing a background image).assertis meant to be for things that you know are true. You are asserting them. Like "hey Python, this is definitely the case". - TK is an ancient shitty GUI toolkit. I would recommend QT instead (though it will probably be more pain to set up).
Python is going to die eventually. It's too slow and the infrastructure is too painful for it to survive super long term.
It's ridiculous popular now though so it's going to take decades to die down.
Never to be seen again...
Seriously though this feels a lot like those books that start with "How to read this book" sections.
FizzyOrange
0 post score0 comment score
I don't follow. It's extremely unlikely that the actual hardware doesn't give you RSSI.