• 0 Posts
  • 232 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle
  • Yeah which you can do with JSON as well. GitHub’s API does exactly that, providing links to all the rest of the resources so the client doesn’t need to “know anything”.

    The author of the article completely conflates JSON with “JSON == Not-REST” which couldn’t be further from the truth (also calling json apis “RPC” is fucking hilarious to me. I can tell the author has never touched actual RPC). JSON was standardized on because it encoded the information that was in html in a much smaller format and allowed a backend server to communicate with any client, not just a browser (not that other clients can’t use html or xml, but they didn’t want to because they might not be documents). Dealing with xml is a nightmare. JSON made that better, and still allowed you to do HATEOS if you really wanted to.






  • No he asked for a discard after importing the project into VS Code. discard in git terms refers to git reset, not git clean. Even if he wanted to run a git reset then this version of VS Code would have run a git clean and deleted everything. Imagine he committed all 5000 files, but had a secret.json that he hadn’t committed. He didn’t add it to gitignore either. Running a git reset --hard will not delete this file, but the VS Code button did exactly that because it ran a git clean.



  • discarding changes does not discard uncommitted new files. The VS Code button did a git clean which is completely unexpected. Git even refers to a git clean with completely different terminology.

    git reset -> “Resets the index and working tree. Any changes to tracked files in the working tree since are discarded.

    git clean -> “Cleans the working tree by recursively removing files that are not under version control, starting from the current directory.”. This command also requires you to specify a force option to actually do something, else it quits with an error.

    Note that git clean never once refers to discarding anything, and git reset never refers to removing untracked files. VS Code was doing an idiotic thing. Running git reset --hard AND git clean. There is absolutely no reason to be running git clean from an UI button ever. If you want to remove a file you can explicitly remove it.

    Imagine that the button said “Discard all changes” and then it ran rm -rf --no-preserve-root /*. Would that make sense as a button? No. It definitely would not.






  • I think you have got to be meme’ing. You literally wrote 7 paragraphs about how to build something for python when for other languages it’s literally a single command. For Ruby, it’s literally bundle. Nothing else. Doesn’t matter if it’s got C packages or not. Doesn’t matter if it’s windows or not. Doesn’t matter if you have a different project one folder over that uses an older gem or not. Doesn’t matter if it’s 15 years old or not. One command.

    Just for comparison for gradle it’s ./gradlew build For maven is mvn install For Elixir it’s mix deps.get mix compile For node it’s npm install

    every other language it’s hardly more than 1 command.

    Python is the only language that thinks that it’s even slightly acceptable to have virtual environments when it was universally decided upon decades ago to be a tremendously bad idea. Just like node_modules which also was known to be a bad idea before npm decided to try it out again, only for it to be proven to be a bad idea right off the bat. And all the other python build tools have agreed that virtual envs are bad.


  • and yet that all works fine in Ruby, which came out around the same time as Python and yet has had Bundler for 15 years now.

    Python - 15+ package managers and build tools Ruby - 1

    the closest language to look at for packaging is probably lua, which has similar issues. however since lua is usually not a standalone application platform it’s not a big deal there.

    no the closest language is literally Ruby, it’s almost the exact same language, except the tooling isn’t insane and it came out only a few years after python.