This post introduces Optique, a new library created to address the pervasive problem of repetitive and often messy validation code in CLI tools. The author was motivated by the observation that nearly every CLI tool reinvents the wheel with similar validation patterns for dependent options, mutually exclusive options, and environment-specific requirements. Optique leverages parser combinators and TypeScript's type inference to ensure that CLI arguments are parsed directly into valid configura...| Hackers' Pub
During the installation process, package managers run a bunch of semver comparisons. The semver library used in npm, yarn and pnpm can be made around 33x faster.| marvinh.dev
Yesterday, I got an SMS from my insurance company.| Dmitrii Aleksandrov
The direction from which you attack a program problem affects the result. I don't think that's controversial.| jardo.dev
Parse, Don’t Validate AKA Some C Safety Tips| www.lelanthran.com
Working on something completely unrelated, I stumbled across this comment in a Rust project:| Corrode Rust Consulting
A break from programming languages| lexi-lambda.github.io
One of my goals for the year is to learn a new programming language. It’s been a while since I learned a new language, and I feel like a lot of the languages I know well (Go, Python, C++) are similar to each other, so I want to try getting out of my comfort zone a bit with a language that feels weird to me. Requirements Here’s what I’m looking for:| mtlynch.io
A brief description of how I made testing a charm with stream data generators supplied with my estructura library| rocket-science.ru
That proofs are things (mathematical objects) is a cool meta awareness that is one of the payoffs of studying mathematical logic.| Hey There Buddo!
An alpha library for refinement types with rich support for serde| jordankaye.dev
Scala gives us a lot of power. We can easily model things with classes and OOP, we can pull in functional libraries and model everything with functions and values, we can implement a stateless monolith or a distributed system. And today we have a lot of books and tutorials that cover these topics: how to glue the code together to create a maintainable application with raw Futures/Akka/Cats ecosystem/Zio ecosystem/Scala as typed Python.| kubuszok.com
premise I want to explore where mainstream programming languages are headed, using Java and Go as my primary subjects. java is underrated The reason I say Java is underrated is because it is oddly both easy to learn and its type system is strong enough to make many incorrect states irrepresentable.[1] It has product types and sum types, and makes managing state explicit and easy enough.[2] Java is very “simple” precisely due to its verbosity.| Hugo ʕ•ᴥ•ʔ Bear
Photo by Steven Wright on Unsplash In late 2023, Alex Kladov published Push ifs up and fors down which essentially says the following (correct) statement: If there’s an if condition inside a functi…| Andy G's Blog
I’ve recently done a lot of work in Alloy and it’s got me thinking about a common specification pitfall. Everything in the main post applies to all formal specifications, everything in dropdowns is for experienced Alloy users. Consider a simple model of a dependency tree. We have a set of top-level dependencies for our program, which have their own dependencies, etc. We can model it this way in Alloy:| Hillel Wayne
A guard clause might be an embryonic parser, so what happens if you nudge it in that direction?| blog.thecodewhisperer.com
When you notice that you need| blog.thecodewhisperer.com
A practical example of “Parse, don't validate” in Haskell.| juliu.is
TypeScript-first schema declaration and validation library with static type inference. Latest version: 3.24.1, last published: a month ago. Start using zod in your project by running `npm i zod`. There are 19437 other projects in the npm registry using zod.| npm
I recently read “Parse, Don’t Validate,” shared it with my coworkers, and let it bring me out of retirement on lobste.rs. It captures a concept that I’ve struggled to explain, leading to cases where I couldn’t say why I thought something was better beyond a vague “It’s a matter of taste.” That’s not very satisfactory as a justification when you’re trying to explain to someone why they should rework a piece of code in a review.| asthasr.github.io
An introduction to typeclass metaprogramming| lexi-lambda.github.io
No, dynamic type systems are not inherently more open| lexi-lambda.github.io
Empathy and subjective experience in programming languages| lexi-lambda.github.io
Greetings, traveler.| maxdeviant.com
Frustrated with handling data type conversion issues in python? Then this post is for you. In this post, we go over a reusable data type conversion pattern using Pydantic. We will also go over the caveats involved in using this library.| www.startdataengineering.com
A blog by sunfishcode| sunfishcode's blog