[–] 2 points 2 weeks ago (5 children)

I write Bash, Python and Rust. And I love writing in Python. It helped me so much and prefer it over almost any compiled language. Bash is completely different beast and not a replacement for Python and vice versa. Just because import works different in the language than the ones you like, does not mean the language is crap. For any questions about the import system, have a look at https://docs.python.org/3/reference/import.html#package-relative-imports .

It depends on how you use the language, as a scripting like language or a full replacement for compiled languages. I personally don't build packages with Python. BTW you can even compile Python scripts to binary machine code, and I don't mean bundles, but real compilation process. It even speeds up the performance of the program.

  • source
  • parent
  • context
  • [–] 0 points 2 weeks ago (5 children)

    Why bother with the significant pain of FFI when you can just write the whole thing in Rust?

    Also "the critical parts" is mostly a myth. After a small amount of optimisation, the vast majority of programs do not have nice isolated hotspots.

  • source
  • parent
  • context
  • [–] 0 points 2 weeks ago (6 children)

    Python may be a grown up language but it's still a pretty awful language for ad-hoc scripting. It really wants to believe that you only use it for writing Python projects damnit! You can beat it into submission, but as soon as you start typing import in a situation that isn't a nice pure Python package it will say "whatchulookinatmate? Youwannafight?"

    Don't believe me? Explain how relative imports work.

  • source
  • parent
  • context
  • [–] -2 points 2 weeks ago (1 child)

    Assuming that's a genuine question...

    AI needs feedback just the same as humans. I would think of AI like a human that's of average cleverness, but has a huge breadth of knowledge and basically infinite time and patience. They are going to be decent at assembly but they're still going to make mistakes just like humans.

    Using a language like Rust that has a lot of static correctness checks gives a higher quality result for AI, just like it does for humans.

  • source
  • parent
  • context
  • [–] 1 point 2 weeks ago (3 children)

    None of those have been successful for various reasons (I think primarily because they all sound like they'd be a total nightmare to set up and maintain).

    As soon as uv provides an alternative implementation so you can just run uv run --but-fast I think it will become popular.

    I would not be at all surprised if they are secretly working on a faster Python implementation. They own all of the non-shit Python tooling, they have unlimited tokens now, they aren't afraid of vibe coding. Why not?

  • source
  • parent
  • context
  • [–] 2 points 2 weeks ago

    Maybe. C++ is very complex, and has a lot of footguns, which is why I recommend avoiding it when possible. Giving a memory-unsafe language like C object-oriented capabilities was like giving a toddler a gun.

    I think Minesweeper or Breakout in Godot would be good projects to give him that would take him a few hours. I wish you well in teaching him!

  • source
  • parent
  • context
  • [–] [S] 1 point 2 weeks ago (1 child)

    Yeah, I started with turbo Pascal and C/C++, and that gave me quite some advantage to understand more modern concepts

    But he is too computer illiterate for that at the moment.

    I'm not sure, if this will be too much just to have some hello world and calculator examples done, that probably aren't as exciting.

    He probably won't be a developer in the future, but I want to give him some understanding and insight on the fun with it.

    If he would be with me for a month, C/C++ and an automatic cat toilet control would be the task.

    But a week isn't much.

    I'll probably make one day, where I show different coding language concepts.

    I'll probably do also a day about logic gates and elementary logic. Maybe here a C++ hello world could actually spice up things ;⁠-⁠)

  • source
  • parent
  • context
  • [–] 3 points 2 weeks ago

    my rule is much less strict: more than 3 files gets migrated. large Python projects are a nightmare to maintain, and performance is bad at scale. for quick experiments or data analysis it’s great.

    but honestly Nushell has replaced Python for me for the most part, unless i need a specific Python package (and often i can just wrap that in a small runnable script with uv)

  • source
  • parent
  • context
  • [–] 2 points 2 weeks ago (2 children)

    As a person who started with high-level languages, I will say that they severely hinder one's understanding of how systems really work. I recommend having him start out with the C programming language or a similar low-level language.

    Some exercises that you could have him do include:

    • Programming a ranked-choice-voting algorithm
    • Writing a program that takes a PPM image (I have never seen an easier image file format to work with) and performs a box blur with the surrounding pixels, spitting out the new image to a file
    • Writing a text adventure in the terminal. Don't force him to use regex, though. Just have it have numbered options.

    On programming games:

    If you want him to program a game for himself, I would recommend SDL (SDL2 or SDL3) if he's doing it in C. It may be in his interests to program the game in another language than C, though, since C can be difficult to program games in, for beginners.

    Some good ideas for a game to start out with are Yahtzee (like the KDE program Kiriki), Minesweeper, Pong, or Breakout. If he's doing it with a game engine, I recommend having him start out with Godot. It's FLOSS, and GDScript is easy to learn.

  • source
  • [–] 19 points 2 weeks ago (1 child)

    My rule of thumb is if it uses more than one variable, an if statement, parameter expansion, or string interpolation I just write it in python with argparse and file input.

    Much cleaner, easier to reason about, and self documenting.

  • source
  • parent
  • context
  • [–] 2 points 2 weeks ago

    Nice! Well, I never paid attention to user created styles and was always doing it myself. From the screenshot, I have to say, it looks really good and is tempting. I'll consider it, but really don't want to install more extensions if possible.

  • source
  • parent
  • context
  • [–] 4 points 2 weeks ago (3 children)

    Yes off course. There are also other alternatives, but its nice to have a builtin functionality. Also each of these plugins had their own quirks in one or another form (don't ask me what the details was, I don't remember).

  • source
  • parent
  • context
  • view more: ‹ prev next ›