FizzyOrange

@FizzyOrange@programming.dev
0 Post – 79 Comments
Joined 10 months ago

They chose “version” because they are just that, versions. Improvements over the original design that benefit from new insights and technological improvements. We’re lucky they had the foresight to include a version number in the spec.

No they aren't. A higher version of UUID isn't "newer and better", like the word "version" implies. It's just different. It's like they called a car "vehicle version 1" and a motorbike "vehicle version 2". The common use of "version" in the software world would mean that a motorbike is a newer and hopefully improved version of a car, which is not the case.

The talking pumpkin is 100% right that they should have used "type" or "mode" or "scheme" or something instead.

3 more...

There aren't many good cross platform GUI toolkits. I mean realistically is there anything other than Qt?

Maybe all of the stars, forks, and discussions on the GitHub page are from fake accounts

All 9k stars, 10k PRs, 400 forks & professional web site are fake? Come on this is about the most obviously not fake project I've seen!

How do you know when a product like this can be trusted?

The same way you tell if anything can be trusted - you look at the signals and see if they are suss. In this case:

  • Lots of stars
  • Lots of real code in the repo
  • Professional looking website with commercial pricing
  • Lots of issues
  • Good English

The amount of effort it would take to fake this for very little benefit is enormous.

Maybe I’m just being paranoid.

Yeah just a little!

7 more...

Seems a bit clickbaity to me. It's a flaw in Windows/cmd.exe, not Rust. Rust is just called out because it tries to emulated proper argument passing on Windows (and didn't get it perfectly right). All languages are affected by this but most of them just throw their hands in the air and say "you're on your own":

  • Erlang (documentation update)
  • Go (documentation update)
  • Haskell (patch available)
  • Java (won’t fix)
  • Node.js (patch will be available)
  • PHP (patch will be available)
  • Python (documentation update)
  • Ruby (documentation update)

It's also extremely unlikely that you'd be running a bat script with untrusted arguments on Windows.

1 more...

Honestly those things just don't sound like common enough actions to be worth shaving 0.5 seconds off. How often do you know exactly how many lines to move a line by? And how often do you even need to move a line that far?

I still don't buy it.

17 more...

This is a misconception that's common among beginner C programmers. They think C is high level assembly and don't understand the kinds of optimisations modern compilers make. And they think they're hardcore and don't make mistakes.

Hope you figure it out eventually.

Yeah... Usually if you join a company with bad practices it's because the people who already work there don't want to do things properly. They tend to not react well to the new guy telling them what they're doing wrong.

Only really feasible if you're the boss, or you have an unreasonable amount of patience.

I disagree. People run Bash scripts they haven't read all the time.

Hell some installers are technically Bash scripts with a zip embedded in them.

Neat FP style. Pretty verbose though. Someone should invent a terser syntax so you don't need to write do_two_things everywhere. It's a common operation so maybe it could even be a single character.

2 more...

Yeah this is one of the main reasons why Stackoverflow's question closing policies are bullshit. We're going to close the question so nobody can answer it... but they can still upvote it and it will still be ranked highly on Google!

Bunch of idiots.

You know the SO Devs actually tried to improve this a while ago - I think you would be able to reopen your question once or something. Of course the power-hungry mods hated that idea and the abandoned it.

At this point it's unfixable. They depend on their unpaid mods and they've already attracted the sort of people you absolutely don't want to moderate a site.

The only hack I've found is that if your question gets downvoted/closed you are allowed to delete it, wait half an hour and ask it again. Much better odds of success than editing the question.

1 more...

Yeah IIRC it deletes them, which is as mad as you would expect. Maybe they've fixed that since I used it last which was some years ago.

Yeah I think it's trauma due to C/C++'s awful warning system, where you need a gazillion warnings for all the flaws in the language but because there are a gazillion of them and some are quite noisy and false positives prone, it's extremely common to ignore them. Even worse, even the deadly no-brainer ones (e.g. not returning something from a function that says it will) tend to be off by default, which means it is common to release code that triggers some warnings.

Finally C/C++ doesn't have a good packaging story so you'll pretty much always see warnings from third party code in your compilations, leading you to ignore warnings even more.

Based on that, it's very easy to see why the Go people said "no warnings!". An unused variable should definitely be at least a warning so they have no choice but to make it an error.

I think Rust has proven that it was the wrong decision though. When you have proper packaging support (as Go does), it's trivial to suppress warnings in third party code, and so people don't ignore warnings. Also it's a modern language so you don't need to warn for the mistakes the language made (like case fall through, octal literals) because hopefully you didn't make any (or at least as many).

Are there any videos of this sort of editing, because honestly every single person I've watched use Vim has just been like "oh wait that's the wrong thing.. hold on." constantly. You're going to say "they aren't competent" but that's kind of the point - approximately nobody is competent in Vim because it isn't worth learning.

Even so, I'd be interested if there are any videos of pros doing real editing (not "look what I can do") on YouTube. Anyone know of any?

4 more...

Yeah I kind of agree but I also think when it gets to that point we'll have much bigger problems than programmers losing their jobs. Like, most of society losing their jobs.

2 more...

Saving this for when people try to claim that naming things isn't important!

Also that is clearly a security issue. Anyone who tries to claim otherwise is forgetting that humans exist. Though I suspect they were just trying to avoid admitting fault and doing work. Disappointing either way.

A recent notable example is xz, but there’s also event-stream npm package a few years ago that got infected with Bitcoin stealing code.

They're asking if the entire project is somehow fake, not if it's a real project that got backdoored. That's obviously impossible to tell just based on stars, language quality, and similar heuristic signals.

Your manager is an idiot.

I mean... let's just hope he isn't doing this professionally.

Real moral of the story: STATIC TYPING!

Seriously so many people think it's a waste of time, and then stuff like this happens.

2 more...

It does. x-x == 0 is true unless x is NaN or infinity.

Not sure I buy this. If you have a config header file and make backwards incompatible changes to it how is that different to having backwards incompatible changes to any other config system?

I think what the author meant to say is "don't make breaking changes to your config system". Maybe it's common to ignore that when using source code as config; I don't know.

It's a bad idea anyway because compile-time options should generally only be for configuring the presence of optional third party dependencies, which you can do automatically. Anything else should be a runtime option.

2 more...

Yeah I think that's what he meant. You don't want CI editing commits.

I use pre-commit for this. It's pretty decent. The major flaws I've found with it:

  • Each linter has to be in its own repo (for most linter types). So it's not really usable for project-specific lints.

  • Doesn't really work with e.g. pyright or pylint unless you use no third party dependencies because you need a venv set up with your dependencies installed and pre-commit (fairly reasonably) doesn't take care of that.

Overall it's good, with some flaws, but there's nothing better available so you should definitely use it.

5 more...

I've been working on some OCaml code recently. It's a quite elegant language but it has two or three big flaws that really make me not want to write it.

  1. OPAM is buggy as hell. There's one piece of OCaml software that we use at work and literally everyone that tried to build it had problems due to OPAM. One was that it couldn't find zip if you are in more than 32 groups!? I don't even want to think about the kind of code that could lead to that bug. And this is on Linux! Have you tried installing OCaml on Windows? Yeesh.

  2. Global type inference means loads of types are inferred as generics, which means you give up a lot of the utility of static typing. Yes you can add explicit types, but the code I'm working on doesn't have them. Rust was 100% right to require explicit types on functions.

  3. The syntax is pretty awful in my opinion. Yeah I guess it looks elegant and I'm sure whoever came up with it was very proud, but honestly maybe 40% of my time fighting OCaml has been spent figuring out where to place the damn brackets and semicolons. It's extremely unforgiving too. E.g. if you put an extra semicolon on a top level let where you weren't meant to it can sometimes be "valid" but it pulls the rest of the file into an inner scope, which means the compiler gives you a valid but wrong fix suggestion. Languages using curly brackets don't have this issue at all.

The lack of brackets for function calls can also make it difficult to work out what's going on because you have another operator precedence to remember. Have trouble remembering which is higher precedence out of & and ==? Well now we've thrown calling functions into the mix for you to forget too!

Finally the functional focus can lead to mega-expressions that are very hard to follow, especially when combined with the lack of brackets it can end up looking like word soup.

OCaml has a ton of really nice ideas but I'm glad it's just inspiration for better languages (e.g. Rust) rather than actually popular. I mean... it's still a million miles better than Python... But that's a low bar.

3 more...

Wow, I would love to understand what leads to such insane views. Like, did Rust kill your father or something?

I'm actually serious, why do you have such love for a bad (by modern standards) language like C and such hatred for a great language like Rust?

I agree. OCaml too. I think there are several factors that lead to it being very difficult to read other people's code:

  • Currying and lack of syntax in general means you have to be a human parser for basic things like "which part of the text is a function name? which bits are arguments?". Often it's impossible to tell without looking up the function definitions.
  • The functional style - while generally great - also makes it very tempting for people to write enormous heavily nested functions where the control flow is hard to follow. You sometimes get assignment expressions that are hundreds of lines long.
  • Haskel & OCaml feature global type inference. Programmers often omit explicit type annotations which very often means that function types are inferred as generic. This means you lose several huge benefits from static types. For example you can no longer look up the types that will actually be passed into the function, and inferring the authors intent is much harder. It also makes error messages way more confusing.
  • I don't know why but Haskel and OCaml programmers love stupidly short identifiers.
  • They also abhor comments.

That's just Typescript with extra steps.

Though I have also done this once or twice for single-file projects where I didn't want to deal with actually running tsc. It has some annoying downsides though, e.g. you don't get to have a tsconfig.json and the syntax sucks.

Microsoft had a proposal to allow TS annotations in JavaScript which would have been awesome and fixed the syntax issue.

Looks like it was discussed a year ago and hasn't really made much progress. Seems like lots of people wanting to shoehorn runtime type checking onto it.

1 more...

Yeah possible, but this of the amount of effort that would take!

I liked Netbeans much more than Eclipse. It didn't have that stupid workspace system at least.

You don't have to install it on the machine where the script is run. That's the point.

There are plenty of languages with warts at least as bad as JavaScript's. Bash, PHP, C, even relatively sane languages like Python still have huge issues like implicit variable declaration.

1 more...

Why is that a hard pill to swallow? Longevity doesn't imply goodness, especially in software. Same for Bash, C and gnu utils.

It also doesn't mean it's a good idea to use it. I would strongly recommend... basically anything else over Jenkins.

Maybe I missed your point there.

2 more...

I think he's being downvoted because he's one of those "who needs type safety?" fools. And because of the general rambling nonsense. Yeah JSON works fine for 99% of use cases but that isn't what he said.

If you can use an alternative then do that. This is for situations where you can't use an alternative or don't want users to have to install anything else.

1 more...

Thanks, I'll watch some.

Yes I understood that. My point is how often do you know you need to move a line exactly 17 lines? Do you count them? Clearly much slower than doing it interactively by holding down ctrl-shift-down for a bit.

6 more...

Haven't tried Mojo yet but I have tried Julia and it kinda sucked balls. Sorry Julia fans, but it did. My main complaints:

  • It's a research language like MATLAB, so the emphasis is on repl's, trying things out etc. But the compilation model is like C++. When you import a package it spends like 2 minutes compiling it. I think it's supposed to cache it but the second time it was still like 10 seconds for me just to import a package. I believe they've improved this since I used it but still, huge red flag.
  • 1-based indexing. Come on guys. Anyone using this is smart enough to learn 0-based indexing. It's like putting a steering wheel in a jet fighter because you worry about pilots getting confused by a joystick. Again, red flag.
  • The plotting libraries (a core feature for this sort of language) kind of sucks. In fairness nothing comes close to MATLAB on this front. I ended up paying for MATLAB because of that.

There's also this article which has more reasons.

I am leaving it a while longer before I try Mojo.

4 more...

The experience was awful.

I did not use it.

Hmm. You sure have a strong hatred of a thing you never used, about which your main objection (no HTML explorer) is completely untrue.

I don't think anyone would say you need GraphQL for a tiny 10-20 endpoint project. It's for big projects.

You can count Ruby out immediately. Terrible language.

Also replace JavaScript with Typescript. It's strictly superior.

I don't think Go has any mature GUI libraries.

For desktop GUI your main options are:

  • Qt, via C++. Probably the best option but if you don't know C++ that's a huge barrier.
  • Qt, via Python. Reasonable but Python is quite a shit language. It's very slow and the tooling/infrastructure is absolutely abysmal. Be prepared to bang your head against the wall trying to e.g. get relative imports to work.
  • Dart/Flutter. This is quite nice but not super mature for desktop apps. Also the Dart ecosystem is very small so libraries you want may not be available.
  • Electron/Typescript. This is quite a good option. Nobody here will recommend this because nerds have a slightly weird hatred of Electron because the minimum download size is like 80MB. But normally it doesn't really matter. Especially for big apps.

For the web frontend you basically want Typescript. For the backend you can use literally any language.

I would recommend Electron for the GUI and Typescript for the web frontend and Electron GUI. It means you can use the same language everywhere and you won't need to even implement the same program twice.

If you're worried about the download size / RAM usage you can look into Tauri which uses your OS's browser engine. I've never used it though.

12 more...

I thought so, but why do they object? Do they want Bash's error-prone implicit variable declaration?

Microsoft doesn't have a vetting process for publishing extensions in the store. Maybe the failure is that people assume they do?

1 more...