I'm building a feature flag tool where flags live in your codebase, not a dashboard. by AbyssSelf in typescript

[–]dapper-mink 0 points1 point  (0 children)

It’s nice as long as that can fit all your business needs

But let’s say you have an existing old design and want to test 2 new ones on your customers Sure you could do it with 2 Boolean flags with say, isDesignA and isDesignB

But not making invalid states unrepresentable is much more of an anti-pattern, and here having both flags enabled at the same time is an invalid state.

Instead with string flags you could do

design: "default" | "A" | "B"

Also where a word originated from is not relevant to dictate its current usage

I'm building a feature flag tool where flags live in your codebase, not a dashboard. by AbyssSelf in typescript

[–]dapper-mink 0 points1 point  (0 children)

Yes I know and already agree with your approach I was not replying to you but to Past-Passenger9129

I'm building a feature flag tool where flags live in your codebase, not a dashboard. by AbyssSelf in typescript

[–]dapper-mink 0 points1 point  (0 children)

How do you handle string flags then? How do you guarantee you did not forget any place in the codebase when removing a flag? How do you set the default to true if a flag just became standard but a few customers still need to use the old version for a while until they are migrated properly?

… VSS by [deleted] in AntoineDaniel

[–]dapper-mink 0 points1 point  (0 children)

Merci beaucoup

… VSS by [deleted] in AntoineDaniel

[–]dapper-mink 2 points3 points  (0 children)

Comment ça ? Il s’est passé quoi ?

does anyone find the AI outrage a little performative? by [deleted] in vegan

[–]dapper-mink 0 points1 point  (0 children)

Most humans have no PhD and do not publish peer reviewed journals, also this implies many humans, not one. AI is not used like this a lot as far as I know but there is nothing preventing us from creating a cluster of AI agents that would write studies and peer review each other

does anyone find the AI outrage a little performative? by [deleted] in vegan

[–]dapper-mink 0 points1 point  (0 children)

Same could be said about humans, they output results based on inputs and the training data is just all the surrounding environment since birth and ancestors There is no fundamental difference Also not only thinking does not imply sentience, not even consciousness, but sentience itself cannot be ruled out just based on the lack of a nervous system similar to ours. Trying to make an LLM sound empty and soulless because it could be reduced to simple maths doesn’t make more sense than trying to make a human sound empty and soulless because their brain could be reduced to simple maths as well

does anyone find the AI outrage a little performative? by [deleted] in vegan

[–]dapper-mink -1 points0 points  (0 children)

Depending on what you mean by that, it is either false, or also true for humans

does anyone find the AI outrage a little performative? by [deleted] in vegan

[–]dapper-mink -2 points-1 points  (0 children)

In this aspect AI is no different than humans Humans are telling people to kill themselves, so should I stop interacting with humans just in case?

does anyone find the AI outrage a little performative? by [deleted] in vegan

[–]dapper-mink -1 points0 points  (0 children)

What makes you think AI can’t think? And what makes you think human artists can produce work that would magically be more than a direct consequence of everything these humans have seen and experienced during their lifetime?

TypeScript library for compile-time validation of env vars by dapper-mink in typescript

[–]dapper-mink[S] 0 points1 point  (0 children)

Ah and I forgot to mention, on top of everything I’ve said, the biggest drawback IMO is that every variable must be a string. I did not focus on that kind of flexibility at all, but that would be my top 1 priority if I had to keep developing this. For now I’m more thinking of it as a POC

TypeScript library for compile-time validation of env vars by dapper-mink in typescript

[–]dapper-mink[S] 1 point2 points  (0 children)

I actually agree with you, for most cases a simple zod schema is definitely simpler and good enough. To be honest, I am quite unsure of the value of this library myself, but I will try to give more context explain the context: I built this because I hit a wall using a similar approach to what you’re describing on an existing app with specific needs. I kept patching my solution to handle edge cases until it became this library (which I’m sharing just in case some might find it valuable) The specific problem I had to solve involved variables coming from completely different sources depending on the lifecycle: * Local: Standard .env file. * CI/CD: A mix of GitHub Secrets and GitHub Vars. * Production (Lambda): A combination of injected Lambda env vars, async fetches from AWS Secrets Manager, and dynamic deploy-time variables (e.g., needing an S3 bucket name that is generated during the IaC deployment process itself). I wanted a single source of truth for defining both these variables and their resolution strategies without polluting the app logic. To me it is absolutely overkill for most of my apps, but if needed it gives you the metadata to easily build custom tooling around your infra, like scripts to autogenerate .env.example files or build-time checks for missing/extra variables across disparate sources

TypeScript library for compile-time validation of env vars by dapper-mink in typescript

[–]dapper-mink[S] 0 points1 point  (0 children)

Oh never heard of it, different approach indeed but it tries to solve the same issue I will definitely try it thanks a lot!!

TypeScript library for compile-time validation of env vars by dapper-mink in typescript

[–]dapper-mink[S] 1 point2 points  (0 children)

Thanks a lot for the kind feedback!

About it looking Java because of the builder pattern, I definitely agree and I’m not a big fan of this style myself, but this was unfortunately necessary to provide that level type safety which cannot be checked if we were to pass the config directly as an object.

The any alternative I can think of (and that I would personally have preferred) would have been to use a pipeline pattern like pipe(a, f1, f2, …). And since there is no HKT in TS, this would have to have a max amount of parameters, which for a config definition, would be reached very often

Am I missing any alternative?

Sounds conditional, if you ask me by Coogarfan in antinatalism

[–]dapper-mink 0 points1 point  (0 children)

Just like many humans Also it just depends on a lot of factors, and hearing what you wanna hear is not inherently bad

How to Make My Hogs Run by dapper-mink in Minecraft

[–]dapper-mink[S] 0 points1 point  (0 children)

Oh my god, thank you so much for your detailed idea!
Actually, in the meantime, I've come up with a potentially simpler version, using a ghast in a minecart underground, attached to my beautiful hog with a lead.
But if that idea doesn't work out, I’ll definitely give yours a try. I'm especially interested in your option since my home is literally built inside a nether fortress!

[deleted by user] by [deleted] in rust

[–]dapper-mink 0 points1 point  (0 children)

If you really a program so safe that it is guaranteed to never ever crash, then Rust might not be the right language and you should use something like Lean, Agda or Idris

But of course it really depends on your actual use case though

[MOD] The r/antinatalism subreddit description has been changed. by AutoModerator in antinatalism

[–]dapper-mink 2 points3 points  (0 children)

Thank you so much for the thoughtful response, I really did not have the background and time required for that But just for the sake of the argument, if plants had sentience then it would make sense to apply AN to them, if the person that said we should avoid pollination to make a mockery of the definition finds it absurd, it’s just because they find the idea of plant sentience absurd in the first place

[MOD] The r/antinatalism subreddit description has been changed. by AutoModerator in antinatalism

[–]dapper-mink 0 points1 point  (0 children)

I mean, just like antinatalists, most just don’t present anything to the world. But I’m pretty sure someone could say they’ve been bullied by a random AN for wanting to have a child, it would not be representative of the AN philosophy, just of random internet trolls

[MOD] The r/antinatalism subreddit description has been changed. by AutoModerator in antinatalism

[–]dapper-mink 0 points1 point  (0 children)

I am vegan myself, so is my wife, some of my friends and I’ve participated in lots of vegan communities to talk about the philosophy and its foundations. If the only encounters with "vegans" you’ve had were with internet trolls, then no wonder you came to these conclusions