News for hackers. Stuff that matters.

true_blue

Re:Why Today's Python Developers Are Embracing Type Hints on Sunday September 28, 2025 @11:19AM (#45404992)
>though maybe there's a path forward to give a variable a sort of "de-hint" in that in can be everything BUT this type

I think this is called a negation type, and it acts like a logical NOT operator. I'd like it too, and I hear that it works well with union types (logical OR) and intersection types (logical AND) for specifying types precisely in a readable way.

Re:Dear GitHub: no YAML anchors, please on Monday September 22, 2025 @02:35PM (#45337610)
the recommendation was what caused the norway problem. it now strongly recommends not to do this, and it says that a Yaml parser should use the core schema unless instructed otherwise. going against the recommendation while saying that you're yaml 1.2 compliant feels like an issue that should be raised with the parser to me. I've never run into this issue in practice though.

is there a parser that says that it's Yaml 1.2 compliant that uses that regex? I don't know of one.

Re:Dear GitHub: no YAML anchors, please on Monday September 22, 2025 @11:39AM (#45334967)
>norway

yaml 1.2 was released in 2009, and it fixed this problem. this is an implementation issue.

https://yaml.org/spec/1.2.2/#12-yaml-history

I tried the playground and got a strange response. I asked for a regex pattern, and the model gave itself a little game-plan, then it wrote the pattern and started to write tests for it. But it never stopped writing tests. It continued to write tests of increasing size until I guess it reached a context limit and the answer was canceled. Also, for each test it wrote, it added a comment about if the test should pass or fail, but after about the 30th test, it started giving the wrong answer for those too, saying that a test should fail when actually it should pass if the pattern is correct. And after about the 120th test, the tests started to not even make sense anymore. They were just nonsense characters until the answer got cut off.

The pattern it made was also wrong, but I think the first issue is more interesting.

That new Rhombus language that was featured here recently has an interesting feature where you can use `_` in a function call to act as a "placeholder" for an argument. Essentially it's an easy way to partially apply a function. This works very well with piping because it allows you to pipe into any argument of a function (including optional arguments iirc) rather than just the first like many pipe implementations have. It seems really cool!
ublock Origin already has a feature called "strict blocking" which does the same thing. In fact, the placeholder page that this extension takes you to looks almost exactly the same as the one that ublock origin uses.
A project's creator stepping down but having a successor is a strong good sign for the longevity of an open-source project. Whenever I see that transition happen, I think better about the project's long-term future.
Re:AnimeJs v4 Is Here on Thursday April 03, 2025 @07:58PM (#43576893)
just a bunch of status 200 GET requests. a few are scripts, but mostly just images
Re:AnimeJs v4 Is Here on Thursday April 03, 2025 @06:20PM (#43576165)
the website is just a blank black page for me no matter how long I wait. clearly that's not what it's supposed to be going by the other comments, so that's a bit disappointing.
Re:Evolving Scala on Wednesday March 26, 2025 @09:50AM (#43482274)
It takes a lot of humility to admit that the language just isn't as popular as it once was anymore, so kudos for that. The turn towards making the language more approachable to beginners is an interesting one for Scala, and I think it could have a positive impact on the language.
On the few sites I've seen using it so far, it's been a more pleasant (and cuter) experience for me than the captchas I'd probably get otherwise. good work!
Re:Don't Be Afraid of Types on Saturday March 22, 2025 @12:05PM (#43446710)
>Even the dynamic scripting languages like Python that you'd think it would be easy tended to need an annoying and often 100% boilerplate __init__ function to initialize them.

For this reason, I very much appreciate the dataclass decorator. I notice that I define classes more often since I started using it, so I'm sure that boilerplate is part of the issue.

Re:Anubis: Proof-of-work proxy to prevent AI crawlers on Thursday March 20, 2025 @03:53PM (#43428079)
Well my first thought when I saw it was "oh that's a fun little mascot". From a quick look, it appears to be a hobby project, so I like that it's a little playful. I wish little fun things like this was more common in software, myself.
Re:The Last Drops of Mexico City on Thursday March 20, 2025 @11:24AM (#43424629)
It's pretty for sure, but it breaks reader view which I use a lot, so I don't like it. also it requires a lot of unnecessary scrolling to read since the text is broken up so much
Re:Rhombus Language on Tuesday March 18, 2025 @11:17AM (#43400469)
I think it's clever how the logo is a different shape from Racket's to fit the name of the language, but they kept the same colors and kept the lambda in it.
Re:Urban Dead is shutting down on Monday March 03, 2025 @05:45PM (#43247763)
The reason for the shut down is especially sad. it feels so common that the smaller players are disproportionately hurt by acts like this.
Re:Bioaccumulation of Microplastics in Decedent Human Brains on Wednesday August 21, 2024 @09:52PM (#41315973)
The scariest part for me is that there's essentially no escape from microplastics. If it turns out that they're greatly harmful, what can you really do?
Why do toothbrushes need to be able to make web connections in the first place? I get that it's for tracking brushing habits, but can't that be done with local connectivity only, like LAN or something?
Re:Infinite Craft on Wednesday January 31, 2024 @05:34PM (#39210385)
>Love + Fire = Passion

I'm impressed that it's able to understand figurative combinations like this. On the other hand, some of them are confusing:

>Steampunk Pirate Queen + Romance = Steam And Sorcery

What? Is this a reference?

Re:DSLinux – Linux for the Nintendo DS on Monday October 09, 2023 @06:54PM (#37826475)
The Wikipedia article listed on the website was deleted as "non-notable". Here's an archive of it though: https://web.archive.org/web/20170708075915/https://en.wikipe...
Re:Pixelfed Introduces Import from Instagram on Monday June 12, 2023 @08:36PM (#36303490)
I've only ever heard "walled garden" used in a negative sense, so I think most people get that it's not meant to be a good thing. Emphasis is placed on the "wall" rather than the "garden".
Re:Ask HN: Alternatives to Reddit on Monday June 12, 2023 @05:39PM (#36301559)
I believe it's related to the stalinism controversy.
This is one I use a lot! I've found coffee to be very helpful for weight loss because of this. I have my coffee black usually, though. It's probably less helpful there if you use a lot of sugar.
Re:Reddit Strike Has Started on Sunday June 11, 2023 @08:26PM (#36287150)
It seems like you can just add "reddit.com" to "My Filters", and it still works.