News for hackers. Stuff that matters.

filiph

Happy to answer questions and receive feedback here (my blog doesn't have a comment system).

I'm mostly a front-end person so some of the Ansible/Kamal stuff, I'm sure I did pretty badly. The gamedev / CLI UX stuff is closer to my expertise, but of course that doesn't mean I didn't bork it.

Re:Implementing Unsure Calculator in 100 lines of Haskell on Friday April 25, 2025 @05:23AM (#43791751)
Hi, I'm the original author of unsure calculator. Let me just say thank you! I love the code and the fact that people are having a go at this stuff.
I'd argue this is WAI.

It's hard for me to imagine _dividing_ by -1~1 in a real-world scenario, but let's say we divide by 0~10, which also includes zero. For example, we are dividing the income between 0 to 10 shareholders (still forced, but ok).

Clearly, it's possible to have a division by zero here, so "0 sharehodlers would each get infinity". And in fact, if you try to compute 500 / 0, or even 500~1000 / 0, it will correctly show infinity.

But if you divide by a range that merely _includes_ zero, I don't think it should give you infinity. Ask yourself this: does 95% of results of 500 / 0~10 become infinity?

Wow, this is fantastic! I did not know about squiggle language, and it's basically what I was trying to get to from my unsure calculator through my next project (https://filiph.github.io/napkin/). Squiggle looks and works much better.

Thanks for the link!

I'm familiar with fuzzy numbers (e.g. see my https://filiph.net/fuzzy/ toy) but I didn't know there's arithmetic with fuzzy numbers. How is it done? Do you have a link?
Part of the confusion here is likely that the tool, as seen on the web, probably lags significantly behind the code. I've started using a related but different tool (https://filiph.github.io/napkin/).

The HN mods gave me an opportunity to resubmit the link, so I did. If I had more time, I'd have also upgraded the tool to the latest version and fix the wording. But unfortunately, I didn't find the time to do this.

Apologies for the confusion!

Nice! Are you using your python script often?

The reason I'm asking: unsure also has a CLI version (which is leaps and bounds faster and in some ways easier to use) but I rarely find myself using it. (Nowadays, I use https://filiph.github.io/napkin/, anyway, but it's still a web app rather than a CLI tool.)

I think I was looking at this and several other similar calculators when creating the linked tool. This is what I mean when I say "you'll want to use something more sophisticated".

The problem with similar tools is that of the very high barrier to entry. This is what my project was trying to address, though imperfectly (the user still needs to understand, at the very least, the concept of probability distributions).

It's all computed in the browser so yeah, it's JavaScript. Still, 8 seconds is a lot -- I was targeting sub-second computation times (which I find alright).
Re:We need technology that is less immersive, not more on Saturday January 13, 2024 @03:48AM (#38978257)
Something I should have probably addressed in the article but didn't get to it for brevity: there are at least two kinds of immersion, and people tend to conflate them. (I'm not immune to this.)

There's intellectual immersion. Flow. You can be intellectually immersed reading a book or playing chess.

Then there's sensory immersion. Put a VR on, you're immersed this way.

Re:We need technology that is less immersive, not more on Saturday January 13, 2024 @03:45AM (#38978247)
> Before I had gaming hardware I wasted the exact same amount of time by re-reading books and comics, and it was quite immersive.

If so, you are in the minority. For most people, it is easier and more natural to put down a book and go do something else, than it is to quit a video game. Media consumption metrics seem to corroborate this.

> That sounds an awful lot like the good old "why do we build space rockets when people are starving".

If you want to simplify the article this way, sure, but then it's "why do we build ever-more immersive entertainment when we could build space rockets or try to address starvation". I think there's a difference. (And of course, even then we're losing all nuance of the actual article, but I guess there's no way around that.)

Re:We need technology that is less immersive, not more on Saturday January 13, 2024 @03:39AM (#38978222)
I think that quote confuses intellectual immersion with sensory immersion. Those are separate things. Yes, you can be immersed in a chess game or a good book or a PacMan game, but it's not the same as having a VR headset on?
Re:We need technology that is less immersive, not more on Friday January 12, 2024 @01:20PM (#38971796)
Nobody disputes that entertainment has value. The article is about the fact that so much talent and resources is funneled into immersion.

Using your neurosurgeon example, I posit that having fewer VR headsets will not prevent the doctor from unwinding. Nor will having mobile phones with less vibrant colors or application with lower engagement metrics.

Re:We need technology that is less immersive, not more on Friday January 12, 2024 @12:09PM (#38970749)
I didn't want to bore the reader with various definitions of immersion but you're raising a very good point. Apart from the "immersion for entertainment" that I'm mostly talking about, there's also the "flow" and the "tech as augmentation". I have obviously no problem with people being more productive through technology. What I have issue with is the (unwitting) funneling of the world's talent and resources into tech that makes us immersed in non-existent worlds just for the sake of entertainment.
Re:We need technology that is less immersive, not more on Friday January 12, 2024 @12:04PM (#38970670)
> I rather missed the point where he explains why immersive games are bad.

The article's title isn't "immersive games are bad".

Re:We need technology that is less immersive, not more on Friday January 12, 2024 @12:02PM (#38970656)
I agree with you. One part of the article that I cut for brevity but maybe I should have included talks about the kind of immersion that is created by bright colorful moving pictures on a mobile screen. A lot of talent and resources is thrown at the goal of keeping people glued to their phones (TikTok, Candy Crush, etc.). "Engagement" is a form of immersion.
Re:We need technology that is less immersive, not more on Friday January 12, 2024 @12:00PM (#38970613)
I agree that it's not just about talent. That said, having more talented people interested in a field often has the effect of bringing money and political will.
Re:We need technology that is less immersive, not more on Friday January 12, 2024 @11:56AM (#38970554)
It looks like you're countering with the "it's always been the case" argument. I use it often myself, but I think it's good to realize when it's stretched too far.

Yes, I'm sure there were some people in the past who said that reading books is an indulgent waste of time. I'm sure you could find articles in old newspapers.

That in itself doesn't mean that working on a VR headset technology is as meaningful as working on a more sustainable energy source or developing software for cancer research, does it? Just because you find a similarity with something that happened in the past doesn't mean you can just abandon all critical thought.

Re:Akin’s Laws of Spacecraft Design on Wednesday August 09, 2023 @05:47AM (#37060485)
I knew #36 and have used it in the context of software engineering. But much of the rest is similarly applicable.

> #36 Any run-of-the-mill engineer can design something which is elegant. A good engineer designs systems to be efficient. A great engineer designs them to be effective.

Yes, and until we have the fancy ML method, one way to do it is to have something like a Google Doc where you document your search by copypasting from the source documents and linking to them.

That was my point with the original article. I'm with you that it would be fantastic to have memex that's described in 'As we may think' (only better), but until we do, I'm doing it the hard/manual way.

Re:Videogames that teach you stuff on Saturday August 05, 2023 @03:06AM (#37009708)
Agreed. I _still_ don't know what I'm doing most of the time, but there was a barrier that I overcame back then as a young dude trying to cheat at a videogame, that most people don't.

And to add to your point about crosshairs as bitmap files. When you install a game nowadays, half the time you don't even know where the files are, and even if you do, they're in the part of the file system we've been conditioned never to touch (for good reasons). When everything was "somewhere at C:", and you ran games by literally cd'ing into the game's directory and running that one executable there, modifying the game was a lot more "in your path".

Re:Videogames that teach you stuff on Saturday August 05, 2023 @02:03AM (#37009399)
The first time I opened a hex editor, it was to give me better stats in X-COM: Enemy Unknown.

I was about 16 and had no idea what I was doing. But, at the very least, binary files stopped being some incomprehensible magic. They were just data that you can change, if you know what you're doing.

Re:Rendering game worlds in text [video] on Thursday July 08, 2021 @12:29PM (#27774282)
Oh hey! Author of the video here. I also tried NaNoGenMo in 2017 with my "Infinite Fight Scene" [1], a novel that is one long fight, utilizing an earlier version of the same system. I think I remember your entry (I'm a sucker for space opera). I thought it was great!

[1]: https://github.com/filiph/edgehead/raw/nanogenmo2017/output2...

Re:Rendering game worlds in text [video] on Thursday July 08, 2021 @12:23PM (#27774189)
Author here.

To clarify, the way to address repetition was not so much making battles shorter, but making effects less numeric and more radical. You can still spend a long time battling, but instead of decreasing hitpoints, you: fall on the ground, stab a leg, stand up, get leapt at, dodge, chop off a hand, get stabbed in the eye, and finally break a skull.

Older »