Hacker Newsnew | past | comments | ask | show | jobs | submit | qezz's commentslogin

Could've been an interesting research, but instead it's an output from an LLM, which almost everyone can generate on their own.

Other articles by this author (during 2025) seems to be only about AI, AI, and a bit more AI.


> in ruby it also works, but the variable is at least always defined.

How is this even a pro? I agree that Python scoping rules are frustrating, but tbh not sure if I would prefer Ruby's behavior in this case


Well. If python is a dynamically scoped language, what they do is correct. If they are lexically scoped (which python is described as) the variable defined in the if should never have different visibility in the same scope.

In a lexically scoped language you don't define variables conditionally. What ruby does is also icky, but obviously the developers of both python and ruby wanted to save the developer an extra declaration. The ruby version is at least more correct from a lexical standpoint (it is set to nil if left "nondefined").


> How about you never write the wrong state in the first place ?

Indeed, and tagged unions (enums in Rust) explicitly allow you to avoid creating invalid state.


That's very expensive.


> from the same blog

It's simply a mirror for Medium, and the articles appear to be from the different authors, posted months apart from each other


The example in the article shows a need for cartesian product of (bucket name) and (lifetime policy), with a fixed location. Nothing stops you from defining a separate category for the exceptions, and just append them to the resulting list. Or you may want to assign each bucket its own location, then you define it along side the bucket name.


> And guess what? They hate the HCL too.

Don't want to sound too harsh, but to me HCL is even worse than plain YAML.

By expressiveness, HCL is somewhat similar to Ansible-flavoured YAML - in both you need to use magic keywords to create any kind of abstraction (e.g. a loop).

HCL is worse than regular YAML because there's only one "true" parser for it, that is official Hashicorp's HCL parser. So if you are locked into Golang ecosystem, then sure it can work for you, otherwise you are out of luck.

There are a couple of tools that convert HCL into JSON, I tried both, they somewhat work, but in the end of the day it's a big hack. At that point I just gave up on using HCL and started using something else that generates JSON.

Hope you find some configuration layer that fits your users more than HCL or YAML.


Not exactly true in terms of being the only parser - OpenTofu is a good project I’m highly supportive of


Luckily, the main point of the article is that syntax doesn't matter, but abstractions do. In other words, you can use your favorite DSL, that being Python or TCL or something else.


Cool idea, yet the first level broke me: typing :qa enters Insert mode, and it's not possible to delete the command input with a backspace.

Hopefully it's easy to fix


It's not always possible to ask the creator, especially for the old pieces


In this case, it's seems it is highly likely to be possible: https://www.studioheavenly.com/our-work/mira-wellness (1 google)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: