[-] FizzyOrange@programming.dev 4 points 3 weeks ago

Typescript is far nicer than Python though. Well I will give Python one point: arbitrary precision integers was absolutely the right decision. Dealing with u64s in Typescript is a right pain.

But apart from that it's difficult to see a single point on which Python is clearly better than Typescript:

  • Static typing. Pyright is great but it's entirely optional and rarely used. Typescript obviously wins here.
  • Tooling. Deno is fantastic but even if we regress to Node/NPM it's still a million miles better than the absolute dog shit pile of vomit that is Pip & venv. Sorry Python but admit your flaws. uv is a shining beacon of light here but I have little hope that the upstream Python devs will recognise that they need to immediately ditch pip in favour of officially endorsing uv. No. They'll keep it on the sidelines until the uv devs run out of hope and money and give up.
  • Performance. Well I don't need to say more.
  • Language sanity. They're pretty on par here I think - both so-so. JavaScript has big warts (the whole prototype system was clearly a dumb idea) but you can easily avoid them, especially with ESLint. But Python has equally but warts that Pylint will tell you about, e.g. having to tediously specify the encoding for every file access.
  • Libraries & ecosystem. Again I would say there's no much in it. You'd obviously be insane to use Python for anything web related (unless it's for Django which is admittedly decent). On the other hand Python clearly dominates in AI, at least if you don't care about actually deploying anything.
[-] FizzyOrange@programming.dev 4 points 1 month ago* (last edited 1 month ago)

Yeah it's pretty out of date. You might then "eh that doesn't matter, I like things to be stable and I'll just imagine I'm three years in the past".

That works until some software introduces a bug fix or a new feature that you really need and you can't use it because of your distro's weird update policies.

You will very quickly find that you don't care anywhere near as much about theoretical stability as you do about a concrete feature or bugfix that is available but inaccessible.

I say theoretical because in practice Debian stable isn't really much more stable than more up-to-date distros. It just has fewer new bugs and more old bugs.

They might try to claim they backport fixes for the old bugs, but in reality they don't have the manpower to do that for 100k packages or whatever it is. They do it for critical bugs of very important packages but that's it.

[-] FizzyOrange@programming.dev 4 points 2 months ago

Think of it from the company's point of view. If you're hiring a new employee then the options for a good candidate are a) move jobs and work for you, b) move jobs and work for someone else. You're competing with other companies.

If you're reviewing an existing salary for a good employee their options are a) do nothing and accept the shitty raise, b) move jobs and work for someone else.

Moving jobs has significant cost for most people - it's time consuming, stressful, might involve moving house, etc.

That downside gives employees who haven't proven they are looking for a new job a significant negotiating disadvantage.

If you really want you can tell your boss you are actively looking for new jobs. That will increase your chances of getting a bigger raise, but of course it has other downsides so most people don't do that.

[-] FizzyOrange@programming.dev 4 points 3 months ago

I dunno maybe once a week or so? We don't actually have a system that detects if your pip install is out of sync with pyproject.toml yet so I run it occasionally just to make sure.

And it runs in CI around a dozen times for each PR. Yeah not ideal but there are goodish reasons which I can explain if you want.

[-] FizzyOrange@programming.dev 4 points 3 months ago

It requires you to sign into a Microsoft account (which I assume most non-nerds do, given how hard they make it to avoid) and have hardware that supports it... But yes Windows enables full disk encryption by default now.

https://www.tomshardware.com/software/windows/windows-11-24h2-will-enable-bitlocker-encryption-for-everyone-happens-on-both-clean-installs-and-reinstalls

https://support.microsoft.com/en-gb/windows/device-encryption-in-windows-cf7e2b6f-3e70-4882-9532-18633605b7df

When you first sign in or set up a device with a Microsoft account, or work or school account, Device Encryption is turned on and a recovery key is attached to that account.

[-] FizzyOrange@programming.dev 4 points 3 months ago

they wouldn’t have made a different tool altogether if it was really a 1:1 replacement

Why not? It's 10x faster.

I think it might have some other new features but you don't need to use those.

i doubt one person on the team could be using uv while everyone else sticks to pip

This is exactly what we do at work. There's no way I could convince everyone to switch to uv so I just switch between them based on an environment variable.

It even supports random stuff like pip install --config-settings editable_mode=compat --editable foo which is required for static tooling to work (e.g. Pyright).

[-] FizzyOrange@programming.dev 4 points 4 months ago

It actually statically links the Rust standard library too. You can also avoid glibc by using musl with a one line change.

[-] FizzyOrange@programming.dev 4 points 4 months ago

Modern AI (LLMs etc) is definitely a revolution. Anyone that has tried ChatGPT can tell that, just like the only people saying the iPhone was a fad were the ones that hadn't used it.

The thing that is hyped around AI is companies just trying to shove it into everything, and say stuff uses AI when it is totally inappropriate. That doesn't mean AI itself is nonsense though. The same thing happened with the iPhone (everything had an app even if it made no sense).

[-] FizzyOrange@programming.dev 4 points 4 months ago

Haven't tried Rye but I have used uv (which Rye uses to replace pip). Pip install time went down from 58s to 7s. Yes really. Python is fucking slow!

[-] FizzyOrange@programming.dev 4 points 5 months ago

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.

[-] FizzyOrange@programming.dev 4 points 7 months ago

Honestly it's quite obvious from the code snippet and the diagram but I can spell it out:

Go is a quite nice language but mainly because of its fantastic infrastructure. Compilation is very fast, cross compilation is trivial, it makes static binaries that don't even depend on glibc (compatibility nightmare on Linux), the module system is great, it even has built in fuzzing support - how many languages have that?

However the language is decidedly meh. It doesn't have some modern features that make programming much more pleasant. Notably:

  • Tagged unions, aka discriminated unions, aka sum types. These vastly improve type safety and are just very convenient.
  • Expression based. People can go overboard with this but I don't think anyone who has used an expression based language would want to go back. Some common tasks like the let msg in the example are just so tedious if match is a statement.
  • Optional. Somehow Go copied the billion dollar mistake. In fairness languages like Typescript and Rust weren't around when Go was designed so it may not have been obvious to the authors that this was the way to go.

So this is basically a do-over of Go but if it had been designed by someone familiar with these modern best practices in language design.

[-] FizzyOrange@programming.dev 4 points 7 months ago

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.

view more: ‹ prev next ›

FizzyOrange

joined 1 year ago