Readit News logoReadit News
strongly-typed commented on Stringly Typed   stefanjudis.com/blog/stri... · Posted by u/todsacerdoti
strongly-typed · 4 months ago
my nemesis
strongly-typed commented on I recreated Shazam’s algorithm with Go   github.com/cgzirim/not-sh... · Posted by u/ccgzirim
strongly-typed · a year ago
This is really cool. I’ve been itching to try building this exact kind of thing as part of my bucket list.
strongly-typed commented on Borgo is a statically typed language that compiles to Go   github.com/borgo-lang/bor... · Posted by u/manx
zer00eyz · a year ago
> In fact, Go doesn’t make you deal with your errors

Your right, it does not. I will _ =: an error in a throw away script all the time.

I see that in a code review, in production code... Big red flag. This is a departure from an exception, that might be thrown in one place and handled far far away from the code you're looking at.

strongly-typed · a year ago
I'm not an expert in Go, and my experience is somewhat limited, however, a few years back I fixed a really subtle bug in a project that was related to the fact that errors _weren't_ being handled correctly. As a relative newbie to Go, the code in the diff[0] didn't appear to be doing anything wrong, until I added some print statements and realized that the numbers were not adding up correctly. IMO, if the returned value had been more like a Rust optional or result type, I think this issue would have either not been a bug in the first place, or it would have been easier to spot the bug.

[0]: https://github.com/semilin/genkey/commit/fafed6744555c5a81fd...

EDIT: The fact that this was a bug at all makes me fear for the rest of the code base. If this one slipped through the cracks, how can I know that the rest of the code base is correct?

strongly-typed commented on TypeScript: Branded Types   prosopo.io/articles/types... · Posted by u/arbol
dvt · a year ago
While you're right that branding makes passing arguments more ergonomic, I will still always be able to do `as OrgId` or `as UserId` so you need to do have some failure handling anyway, unless you're okay with blowing up in the user's face.
strongly-typed · a year ago
The way you're describing it sounds to me like you are adding failure handling to handle cases where the programmer is intentionally misusing the thing. I would argue that in this type of situation, the error handling is not necessary because it would hide the fact that the thing is being misused.

Or perhaps I'm misunderstanding your comment. When you do `as OrgId` or `as UserId`, where do you envision those casts in ways that would require handling failures?

strongly-typed commented on Descent: A classic 3-D first-person shooter (2012)   insectoid.budwin.net/dos/... · Posted by u/Lammy
strongly-typed · a year ago
The ray traced version is absolutely phenomenal. If you've never seen it or heard of it, check it out here:

- https://github.com/BredaUniversityGames/DXX-Raytracer

- https://www.youtube.com/watch?v=2eQJKFFEc7E

strongly-typed commented on Descent: A classic 3-D first-person shooter (2012)   insectoid.budwin.net/dos/... · Posted by u/Lammy
ralphc · a year ago
This is basically the only video game I've ever played or play today.

I took a 25 year hiatus playing, from 1996 to 2021 but I'm back at it now, playing on a period appropriate Windows 98 machine.

I love the original Descent and Descent 2 look and feel and graphics, I pass on the rebirths.

If you want a modern game from the same team with similar gameplay, try Overload on Steam.

strongly-typed · a year ago
Have you tried the ray traced version? In my opinion it's the best way to play it. https://github.com/BredaUniversityGames/DXX-Raytracer
strongly-typed commented on Libgourou: A Free Implementation of Adobe's Adept DRM on ePub/PDF Files   forge.soutade.fr/soutade/... · Posted by u/gorky1
sedivy94 · a year ago
Isn’t the pinyin for “肉” typically “ro”?
strongly-typed · a year ago
No, it’s ròu
strongly-typed commented on Colon Cancer Is Rising in Young People: What to Know About Causes and Symptoms   nytimes.com/2024/03/27/we... · Posted by u/sherilm
strongly-typed · a year ago
This post coincides with a sudden major uptick in cancer related video recommendations on my YouTube feed. I wonder if other people are seeing the same thing.
strongly-typed commented on Colon Cancer Is Rising in Young People: What to Know About Causes and Symptoms   nytimes.com/2024/03/27/we... · Posted by u/sherilm
Gerlo · a year ago
Why did this post completely disappear from nearly the top of the front page? It's not even in the top 200.
strongly-typed · a year ago
I had to search for this post to find it after it suddenly disappeared.
strongly-typed commented on Ask HN: Tips to get started on my own server    · Posted by u/ctxc
throwaway38375 · a year ago
Some tips:

1. Digital Ocean offer small VPS for $5 per month. That's a 50% saving right away!

2. Stick with Ubuntu in the beginning. It's not the best, but it's 100% good enough and has so much support and tutorials out there.

3. If you have a small VPS with not much RAM, definitely set up a swapfile. It gives you virtual RAM for doing RAM heavy things on a small VPS.

4. Use the virtual firewalls offered by your host rather than the server firewalls in the beginning. If you mess up a server firewall you may have to get your host to reset it for you. If you mess up a virtual firewall you can amend it through a web UI and get back to doing things quickly.

5. Learn to read man pages and log files. Between the two you can figure out how to do stuff, and then figure out why it isn't working correctly.

6. In terms of security, use a recent distro, use a firewall close everything you don't need, use SSH keys, and set up secure passwords for everything else, and you will avoid a lot of problems.

7. Keep an eye on resources, programs like top, uptime, free, df, and du will allow you to see what's using up CPU, RAM, or disk space.

8. Learn a relational database. MySQL or Postgres are good choices. This skill will keep you employed for years, almost every business uses a relational database in one way or another!

9. Have fun :)

strongly-typed · a year ago
Curious why you say Ubuntu is not the best. What would you consider better?

u/strongly-typed

KarmaCake day65June 7, 2023View Original