• 0 Posts
  • 168 Comments
Joined 2 years ago
cake
Cake day: June 12th, 2023

help-circle
  • Ruby and Python are both scripting languages and have been since being invented. Static type annotations are a dumb thing to add to a language like Python and Ruby, they’re not static languages. If you want static typing you should be using a different language. The syntax is most definitely not worse, and that’s not an opinion, Python’s for comprehensions are nightmares of readability, and hardly make sense 5 minutes after you write them. Ruby prioritizes readability over everything else.

    Speed is almost exactly the same, with Ruby winning on many benchmarks. The only people saying Python wins are Python programmers. There was a post on the clojure community the other day comparing specific instances and while clojure was winning them all, Ruby was in second on most of them.

    Python only looks better from the outside. I spent years coding in both at the exact same time at the same company. The only two things Python wins on is number of packages, and even that is a dumb metric (looking at you npm), and Click, which is an absolutely fantastic CLI framework.


  • I haven’t heard that in 15 years. The main reason to use Ruby is that it’s a better Python. The tooling is 10x better, it has all the same language features and more, it has easily enough packages to handle any situation you want, and it doesn’t have all the bike shedding that Python has.

    You shouldn’t be writing applications in a scripting language anyway. They’re for scripting, it’s in the name.






  • tyler@programming.devtoProgrammer Humor@lemmy.mlEvil Ones
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    5 days ago

    JSON schema is not a standard lol. 😂 it especially isn’t a standard across languages. And it most definitely isn’t an ISO standard 🤣. JSON Data Interchange Format is a standard, but it wasn’t published until 2017, and it doesn’t say anything about 1.0 needs to auto cast to 1 (because that would be fucking idiotic). https://datatracker.ietf.org/doc/html/rfc8259

    JSON Schema does have a draft in the IETF right now, but JSON Schema isn’t a specification of the language, it’s for defining a schema for your code. https://datatracker.ietf.org/doc/draft-handrews-json-schema/

    Edit: and to add to that, JavaScript has a habit of declaring their dumb bugs as “it’s in the spec” years after the fact. Just because it’s in the spec doesn’t mean it’s not a bug and just because it’s in the spec doesn’t mean everywhere else is incorrect.


  • JavaScript only has a single number type, so 0.0 is the same as 0. Thus when you are sending a JS object as JSON, in certain situations it will literally change 0.0 to 0 for you and send that instead (same with any number that has a zero decimal). This will cause casting errors in other languages when they attempt to deserialize ints into doubles or floats.


  • They didn’t add text saying it’s an IDE. It clearly says it’s a code editor. They add a snippet about comparing it to actual IDEs to placate people like you, and no it wasn’t within 4 months of launch, it was years.

    lol it doesn’t have testing or debugging by default! You literally have to install extensions to do those things! It has panels where those things go, but they don’t do anything without an extension. Try running a js test from the gutter on a clean install. You literally can’t.


  • They didn’t have that originally, they added it because of people like you that are arguing that it’s an IDE when it clearly isn’t.

    Code editor makes perfect sense. It’s a text editor with code highlighting, fast search, and an understanding of different languages, oftentimes with command windows to make working with text easier. Clearly distinct from something like notepad, that only has the ability to edit text and nothing else.


  • I would say that for something to be an IDE it has to be meant to be an IDE. Clearly Microsoft didn’t intend for it to be an IDE or they would have called it that. Just because you can build something that looks and performs like an F1 race car in your garage out of an old lawnmower or ford Taurus or whatever doesn’t make it an F1 car. Unless it’s racing at Monaco in an F1 race, it ain’t an F1 car. Same thing with VS Code. It’s a code editor, like Sublime or vim.


  • Vscode is a text editor, sorry…“code editor”. Like you so graciously called out in a later comment, MS even clarified that it’s not an IDE. If VSCode is an IDE then so is VIM or Sublime Text or Notepad++, which of course is nonsense. IDE doesn’t just mean integrated development environment, it means it was meant to be used that way. Just because I turned my lawnmower into something that looks like an F1 race car doesn’t mean it’s an F1 race car.

    You’re clearly aware of all of the arguments why VS code isn’t an IDE so it’s pointless to have this argument, but you seem to think that just because something looks like an IDE means it is, which is just categorically false.



  • 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.