expr

joined 1 year ago
[–] [email protected] 1 points 1 month ago

Common Lisp isn't a functional programming language. Guile being based on Scheme is closer, but I'd still argue that opting into OOP is diverging from the essence of FP.

[–] [email protected] 3 points 1 month ago

Just remember that if you aren't actually concatenating files, cat is always unnecessary.

[–] [email protected] 4 points 1 month ago* (last edited 1 month ago)

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

jq < file.json

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

[–] [email protected] 4 points 1 month ago

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

Formatting is what xmllint is for.

[–] [email protected] 3 points 1 month ago

:syntax off and it works just fine.

[–] [email protected] 4 points 1 month ago (1 children)

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.

[–] [email protected] 9 points 1 month ago (4 children)

You're just describing parsing in statically-typed languages, to be honest. Adding all of this stuff to Python is just (poorly) reinventing the wheel.

Python's a great language for writing small scripts (one of my favorite for the task, in fact), but it's not really suitable for serious, large scale production usage.

[–] [email protected] 3 points 2 months ago

Ah gotcha, fair enough. Definitely depends on the workload. If you have compute you want to dedicate to solely to a single task, have at it.

[–] [email protected] 1 points 2 months ago (2 children)

Umm, queueing is standard practice particularly when a task is performance intensive and needs limited resources.

Basically any programming language using any kind of asynchronous runtime is using queues in their scheduler, as well.

[–] [email protected] 1 points 4 months ago

With a quick search on Zillow for Lincoln, Nebraska (~300k pop college town), cheapest I can find is $90k for a 1 bed/1 bath 500 sqft condo. $100k for a 1 bed/1 bath 500 sqft house, though technically that's a foreclosure so you might not consider that to count. The cheapest normal house for sale that I can find is $110k for a 2 bed, 1 bath 1500 sqft house. It's an older home, but actually a pretty decent location (close-ish to downtown).

[–] [email protected] 11 points 11 months ago

Another super cool thing about it is that it's written entirely in Haskell!

[–] [email protected] 4 points 11 months ago (1 children)

It's "open source" as a technical matter, but the fact is that plenty of common extensions are still strictly controlled by Microsoft (like say, Live Share) and can't be used with vscodium due to licensing. It's a pretty useless editor without extensions, and the marketplace isn't exactly "open", either.

view more: next β€Ί