HN user

mega_dean

106 karma

https://github.com/mega-dean/ https://codeberg.org/mega-dean

Posts0
Comments39
View on HN
No posts found.
Show HN: Zanagrams 23 days ago

If it was really an “HN themed puzzle”, all the letters would be A or I and the minimum word length would be 2.

I’m kidding of course - great game!

Leave a Trace 1 month ago

I used to go hiking in New Mexico and I actually liked when I came across little signs that someone was there: a small stack of rocks, sticks arranged in a crop-circley pattern, a makeshift bridge over a small stream, etc.

But the worst part of hiking was seeing brightly-colored bags of dog shit right next to the trail, so I guess overall I’m ok with a general “leave no trace” rule. Then again, someone inconsiderate enough to do that wouldn’t care if there was a rule against it, so ¯\_(ツ)_/¯

Ask HN: Depression 1 month ago

I was in a similar place ~6 years ago, so not AI-based but still depressed. I tried therapy for 2-3 years and personally didn’t find it helpful. My problem is overthinking and dwelling on things, so I think it was counterproductive to spend dedicated time every week talking about why I was depressed. However, I’d still recommend trying it since it’s obviously helpful for a lot of people. Just don’t get too discouraged if it doesn’t work for you.

I tried improving diet/exercise/sleep like the other commenters suggest, but of course the depression makes that nearly impossible. The only thing that actually helped me was burning all the way out, quitting my job, and going back to blue collar work. I don’t work from home anymore and I make less than half of what I made as a dev, so it was a big lifestyle change, but I wish I had done it years earlier.

Anyway, I hope you figure out what works for you. I wasted a lot of my life being depressed and I hate to see others going through it.

That was my reaction at first, but I got used to it pretty quickly. Some of the other bizarre syntax bothered me for much longer, like using semicolons for list separators, eg [1;2;3] instead of [1,2,3].

I briefly tried to use Reason since it “fixed” a lot of my biggest issues with the syntax, but it wasn’t worth it overall so I went back to plain ocaml pretty quickly.

I didn’t look very closely at F# at the time, but I remember thinking it looked like “ocaml with more normal syntax”.

I don’t know if it satisfies “already convenient to use”, but IMO ocaml fits “adds great features reliably and safely”. They merged their multicore compiler ~4 years ago, which was a pretty huge change that added parallelism through domains. Notably, they had a working version ~10 years ago, but refused to merge it until they sorted out some performance issues that would have affected existing single-threaded code.

I only say it’s not “already convenient to use” because I heard tons of complaints about the dev environment - mostly that there’s no debugger, no official package manager, etc. But they are working on ‘dune’, and just like the language itself, I got the impression that the dune developers were being conscious to “add great features reliably and safely”. So overall I thought it was a great language/ecosystem, ymmv though.

I read some AI generated tests and while it looks visually impressive, ultimately it wasn’t doing anything valuable

I just saw this comment yesterday about one of the tests from Bun’s rust rewrite: https://news.ycombinator.com/item?id=48314311 It reads in the raw source code and uses a regex to assert that “unsafe” is used.

These days, I don’t even bother with unit testing. They are a maintenance burden

I’ve come to the same conclusion, but that’s only because I’m working on solo projects. I think they are probably worth it with multiple devs on the same project.

I’ve never really had good luck with the artist radio, but I’ve found a lot of music I like by starting at a band I like and going through the Related Artists. It’s a little strange because I’m sure the artist radio includes a lot of songs from the Related Artists. It’s probably a psychological thing, wanting to feel like I’m in control instead of the app choosing for me.

Reminds me of this page with an example for understanding how many permutations there are for a shuffled deck of cards: https://czep.net/weblog/52cards.html

So, just how large is it? Let's try to wrap our puny human brains around the magnitude of this number with a fun little theoretical exercise. Start a timer that will count down the number of seconds from 52! to 0. We're going to see how much fun we can have before the timer counts down all the way. Shall we play a game?

Start by picking your favorite spot on the equator. You're going to walk around the world along the equator, but take a very leisurely pace of one step every billion years. The equatorial circumference of the Earth is 40,075,017 meters. Make sure to pack a deck of playing cards, so you can get in a few trillion hands of solitaire between steps. After you complete your round the world trip, remove one drop of water from the Pacific Ocean. Now do the same thing again: walk around the world at one billion years per step, removing one drop of water from the Pacific Ocean each time you circle the globe. The Pacific Ocean contains 707.6 million cubic kilometers of water. Continue until the ocean is empty. When it is, take one sheet of paper and place it flat on the ground. Now, fill the ocean back up and start the entire process all over again, adding a sheet of paper to the stack each time you’ve emptied the ocean. Do this until the stack of paper reaches from the Earth to the Sun. Take a glance at the timer, you will see that the three left-most digits haven’t even changed. You still have 8.063e67 more seconds to go. 1 Astronomical Unit, the distance from the Earth to the Sun, is defined as 149,597,870.691 kilometers. So, take the stack of papers down and do it all over again. One thousand times more. Unfortunately, that still won’t do it. There are still more than 5.385e67 seconds remaining. You’re just about a third of the way done.

I had a very similar experience releasing a video game. Barely anybody downloaded it because I didn’t put any effort into marketing/promoting, but “I couldn’t be happier with my journey in making it”. I have replayed it a few times and it makes me unreasonably happy (although I’m taking a break now because I want to forget where everything is on the map).

Who are we to believe - the repliers, or our own lying eyes?

Believe the repliers: I created an account in May 2024 and I have not added a phone number. Here's a screenshot from my settings: https://imgur.com/a/Q7kJpDv

But also, your eyes aren't lying to you: some servers require accounts to have confirmed phone number in order to join. So there is probably a lot of people who have had the experience of creating a Discord account, trying to join a server / accept an invite, and immediately seeing a "you must provide a phone number" prompt.

I'm curious how this can be applied with the inevitable combinatorial exhaustion that will happen with musical aspects such as melody, chord progression, and rhythm.

https://www.vice.com/en/article/musicians-algorithmically-ge...

They did this in 2020. The article points out that "Whether this tactic actually works in court remains to be seen" and I haven't been following along with the story, so I don't know the current status.

Although it has been on my mind for a long time, I haven’t been able to read a comprehensive book based on these studies

Deep Work by Cal Newport focuses on these ideas pretty heavily, and he cites plenty of studies to back up his arguments. Like the author of the blogpost says, "There’s no guarantee that what works for them will work for you", but I found my productivity increased noticeably after I applied some of the advice from the book.

I released a game using OCaml bindings to the Raylib library. I had never written OCaml before and I didn't spend very much time refactoring, so the code is pretty messy and maybe isn't the best example of the language. But some of it turned out pretty nice - the first ~90 lines of this file detect collisions between two shapes using the Separating Axis theorem: https://github.com/mega-dean/hallowdale/blob/main/src/collis...

In 2008/2009, I bought a DVD of this movie called "The Fall": https://en.wikipedia.org/wiki/The_Fall_(2006_film) . I'm a sucker for visually-appealing films so I loved it, but I eventually lost the DVD and was never able to find another copy, despite checking every year or two. The wikipedia page says:

As of September 2023, The Fall had been unavailable on streaming services or rental services, making it notoriously difficult to access with secondhand Blu-ray copies of the film being very expensive.

But apparently that isn't the case anymore! MUBI bought the rights earlier this year, and it looks like I can watch it through Amazon Video if I sign up for a MUBI trial.

EDIT: I maybe should have visited https://mubi.com/ before commenting - clips from The Fall is the very first thing they show.

Does anybody smarter have a good point of re-assurance?

I'm not very smart, but I don't think you need to worry about drones using the linked flamethrower attachment: in order to buy from the website, the terrorist needs to click the "Agree" checkbox that says "I understand that operating a drone or UAS in the US with this attachment would require a Part 107 Waiver."

This page has some information about operating drones over people: https://www.faa.gov/uas/commercial_operators/operations_over... . That page says "the remote pilot must take steps using a safety risk-based approach to ensure that ... the small UAS is not operated in a careless or reckless manner so as to endanger the life or property of another (§ 107.23)". So IIUC, I think it's likely that the FAA would deny the application for the Part 107 Waiver, and the terrorist wouldn't be able to use it.

Hope that helps!

In the 49x49x49 video, he goes over previous world records of "Highest Order nxnxn Twisty Puzzle", and I thought it was weird he didn't mention the 34x34x34. But in the youtube description, he links to this forum post where he announces it on August 10 (a few weeks before the video, but still well after May 10): https://www.twistypuzzles.com/forum/viewtopic.php?t=39559 There is a comment from the creator of the 34x34x34:

Ah there's so much I want to say, where to begin? Well, soon after finishing the 34x34, I notified Greg, who immediately notified me about the 49x49. At that point, Preston had already checkered the 49x49, so I did not consider the 34x34 a world record. It seems nobody noticed this, but nowhere in any of my videos did I claim the 34x34 was a world record :lol: But still, everyone just assumed it was :lol:

I've noticed that I get very distracted by motion in my peripheral vision, but not by static images. So I can use a second monitor for things like documentation, but not something like Slack that shows new messages, animated gifs/emojis, etc.

I've also configured my text editor to be very "static": when I type, the only things that can happen are the cursor moves, or text is inserted. I have to manually trigger things like the autocompletion popup, LSP checks, or highlighting the symbol under the cursor.

After that step, they say "The resulting code is shorter and has no nested logic." The resulting code has the same logic as before, it's just not visually represented as being nested. I've seen the same argument ("nesting is bad so indentation is a code smell") used to say that it's better to use early returns and omit the `else` block, eg:

    if (some_condition) {
      // do stuff here
      return;
    }
    // do other stuff here
is "better" than:
    if (some_condition) {
      // do stuff here
    } else {
      // do other stuff here
    }
If you have very-deeply nested code then it usually becomes easier to work with after splitting it up into smaller pieces. But IMO rewriting code like this to save a single level of indentation is bikeshedding.

On other hand, who are we defending from and why are spending all this money on world police when we have a ton of internal problems?

Reminds me of this scene in Wag the Dog: https://www.youtube.com/watch?v=wwgPnYVg74Y

"The war of the future is nuclear terrorism. It is, and it will be against a small group of dissidents who, unbeknownst to perhaps their own governments, have blah blah blah blah blah. And to go to that war, you have to be prepared."

If our understanding of physics is right, it doesn’t matter whether you hit them or they hit you.

That was my first thought too, but I don't know if it's true because of the strings they are attached to. The striking conker is at the end of a taut string the entire time, but the receiving conker is hanging loosely and bounces around after being struck. My guess is that the taut string helps with energy dissipation after a collision, but I could be wrong. And either way, it might be a negligible difference.