Fushuan [he/him]

Huh?

  • 1 Post
  • 318 Comments
Joined 2 years ago
cake
Cake day: July 1st, 2023

help-circle
  • It makes perfect sense if the Lang objective is to fail as little as possible. It picks the left side object, checks if the operand is a valid operand of the type. If it is, it casts the right variable into that type and perform the operand. If it isn’t, it reverses operand positions and tries again.

    The issue here is more the fact that + is used both as addition and as concatenation with different data types. Well, not an issue, just some people will complain.


  • the main issue presented in the meme is that python is “weird” because it doesn’t have a default launch entrypoint like rust (I think) and c/c++. Both are compiled languages and python is generally not. When python is used in a compiled manner (wheels) however, it also does have a way to specify entrypoints, so the meme is comparing specifically compiled languages with interpreted scripting languages.

    However, python is not weird at all about not having a general entrypoint in the scripting interpreted form, because all the other interpreted scripting languages work like that! Examples include all shell script languages like bash, zsh or fish, and other languages like javascript or R are similar.

    The one I responded to however stated that they don’t care that bash is similar because bash is also “insane” or “not sane”, but as previously stated in this comment, all scripting languages have a lack of a funcion based entrypoint for their scripts, so I wonder which language are they using for their fast scripting if even bash is “not sane” for them.

    My underlying point that i was trying to make in my first comment on this chain is that complaining that tools that are used in different use-cases are not similar is a pretty uneducated take that clearly shows a lack of diverse experience in the field.

    Note: In my first comment on this chain I was expanding upon the comment of the one I responded to, as you can see that they are making a similar point when specifying that python’s example is a different thing than the ones on top.


  • You mean the “want to be zsh but with a specific config instead of having the liberty to do anything” shell? /s

    Jokes aside, regardless of your shell of choice, in companies there are tons of scripts that launch programs, processes and so on, that will generally be coded in bash. Scripts that process files, take the output, send emails… All in a single script. The shell of remote nodes won’t be zsh or fish, it will be bash, and a lot of them won’t even have vim installed, only vi. Like it or not, bash is heavily used in a looot of places.



  • I’m gonna repeat what I wrote in another comment. You are comparing the default interpreted way of running pythong to a compiled language. When you compile a python program into a wheel, you define the entry points of the code on it, and they point to functions like main() or whatever you define.

    You aren’t complaining that a index.js doesn’t automatically run the main function when run by node, or that bash doesn’t also have a default main function execution. Interpreted languages oriented to scripting won’t have the same rules as compiled languages.

    programming languages aren’t usually cursed, what’s cursed is the way some people decide to structure their programs. I’ve seen some stuff.







  • A single .sh file with exec permission that asks for sudo will easily download appimage keyloggers and then set a cron job to run it every X time to keep it alive and sends it all to whatever remote location. Or whatever else you let the appimage do.

    95% of regular users will double click that, and then write their pass in the popup without blinking twice and that will work in most Linux systems.

    Most viruses don’t target Linux, sure, but that’s wishful thinking. Always be creful with what you run.










  • I just have a script that repeats the “install-kernel” command and the “bootctl install” one that I run after every big update. It should be fine without them, right? Too many times the kernel one fails in the pacman update chain and I’ve had to chroot from a live USB too many times to do the bootctl install to put the correct bootloaders in the efi partition to skip the manual bootclt install from my actual PC after updates.

    Just in case. It takes 2 seconds vs searching the pendrive, loading, typing in an European keyboard when the live USB asumes it’s american, searching the chroot command on my phone… All of this when I just want to relax. Weird stuff I know.