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

It's not necessary. Unlike on Windows, Linux users rarely download random packages off the internet. We just use package managers.

[-] expr@programming.dev 4 points 1 month ago

The manufacturer obviously also makes the app and can control the encoding.

[-] expr@programming.dev 4 points 1 month ago

You don't have to take arbitrary bytes. UTF-8 encoded strings are just fine and easily handled by libraries.

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

That list also counts Java and C# as "functional languages". I wouldn't take it too seriously. Ocaml, Scala, F#, etc. are impure functional languages. Kotlin absolutely is not. Having a couple of features you might find in functional languages does not make a language functional. Kotlin is still very much an OOP-based language. It's basically a somewhat nicer Java.

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

All it means is if you were to reverse the order of the characters, you'd get the same string you started with. So "dog" isn't a palindrome because when you reverse it, you get "god". "dog god" is a palindrome, though, because if you read it backwards, it's also "dog god".

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

Pretty dumb, honestly. If anything it just adds a Streisand effect to it as people try to figure out what's censored.

Not that censoring it has any value whatsoever. Like if a child sees that, so fucking what?

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

Except for, you know, not installing the apps on your phone.

[-] expr@programming.dev 4 points 5 months ago* (last edited 5 months ago)

https://porkmail.org/era/unix/award#cat

jq < file.json

cat is for concatenating multiple files, not redirecting single files.

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

Meanwhile, I can open a 1GB file in (stock) vim without any trouble at all.

Formatting is what xmllint is for.

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

I understand what you're saying—I'm saying that data validation is precisely the purpose of parsers (or deserialization) in statically-typed languages. Type-checking is data validation, and parsing is the process of turning untyped, unvalidated data into typed, validated data. And, what's more, is that you can often get this functionality for free without having to write any code other than your type (if the validation is simple enough, anyway). Pydantic exists to solve a problem of Python's own making and to reproduce what's standard in statically-typed languages.

In the case of config files, it's even possible to do this at compile time, depending on the language. Or in other words, you can statically guarantee that a config file exists at a particular location and deserialize it/validate it into a native data structure all without ever running your actual program. At my day job, all of our app's configuration lives in Dhall files which get imported and validated into our codebase as a compile-time step, meaning that misconfiguration is a compiler error.

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

My pixel 7 pro is perfectly smooth and seamless. Oh and voice assistant is far faster than anything on iPhone thanks to the on-board Tensor chip.

[-] expr@programming.dev 4 points 8 months ago

https://www.visidata.org/ > excel for manipulation and navigation of data.

view more: ‹ prev next ›

expr

joined 1 year ago