• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      18 votes
    2. What service are you using for domain names?

      In light of Google's recent, tragic, and inevitable closure of Google Domains and sale of their customer list to Squarespace: what are you using for domain names? Google Domains checked most of...

      In light of Google's recent, tragic, and inevitable closure of Google Domains and sale of their customer list to Squarespace: what are you using for domain names?

      Google Domains checked most of the boxes for me: good price, availability of TLDs, features, interface. The company's reputation went both ways, as we're now dealing with. Can't even remember what I used for domains before GD.

      This thread is inspired by the recent thread on hosting providers, where I saw a lot of people were using Namecheap for domains. The name of the company sounds like a .biz from 2002, but if it's good it's good.

      Let's figure out the best option for domain name services as of October 2023.

      42 votes
    3. Any other developers also strongly resistant to adding secondary data stores to their software?

      I'm currently building an MVP for a startup, solo. We've got Postgres pulling triple duty as the go-to database for all normal relational data, a vector database with pgvector, and a job queue...

      I'm currently building an MVP for a startup, solo. We've got Postgres pulling triple duty as the go-to database for all normal relational data, a vector database with pgvector, and a job queue (With the magic of SELECT ... FROM "Jobs" WHERE ... FOR UPDATE SKIP LOCKED LIMIT 1). Every time I go out looking for solutions to problems it feels like the world really wants me to get a dedicated vector store or to use Redis as a job queue.

      Back when I was a Rails developer a good majority of the ActiveJob implementers used Redis. Now that I'm doing NodeJS the go-to is Bull which can only serialize jobs to Redis. They back this with claims that I can scale to thousands of jobs per second! I have to assume this theoretical throughput benefit from using Redis is utilized by 0.01% of apps running Bull.

      So I ended up implementing a very simple system. Bull wouldn't have been a good fit anyway as we have both Python and Typescript async workers, so a simple system that I fully understand is more useful at the moment. I'm curious who else shares my philosophy.

      Edit: I'll try to remember to update everyone in a year with the real world consequences of my design choices.

      16 votes
    4. Show Tildes - Gametje

      Gametje Hi all been working on this project for a while in my spare time. I wanted to share it with this community to see what you all thought. What is it? It is a set of online games (currently...

      Gametje

      Hi all been working on this project for a while in my spare time. I wanted to share it with this community to see what you all thought.

      What is it?

      It is a set of online games (currently only 2) which can be played in person with a central screen (like a TV) or remotely via video chat with screen sharing. Essentially there is a host screen and then each player has their own player screen (laptop or phone etc). It is playable in 8 languages at the moment (feel free to request any others!) It also has an integrated ChatGPT player which can be turned on/off in game settings if you prefer to play without it. There are some game mechanics to identify a ChatGPT answer which can yield some funny reactions if you choose a human's answer! It has Chromecast support and works well on Amazon Fire sticks. Visually, it is still a little rough around the edges as frontend design isn't my forte but the core concept is there. I have been play testing it with friends but have not shared it publicly yet.

      Why is it called Gametje?

      I have been living in the Netherlands for some years and my original motivation for starting this project was to create a game that supported languages other than English. I wanted to incorporate something Dutch into the name. tje is one of the diminutive endings in Dutch. It is usually meant to soften a word or make it "smaller". So Gametje -> a little game.

      Where can I try it?

      https://gametje.com/

      You can either create an account (user/pass with email confirm) or try it out as a guest (navigate to either game, then choose continue as guest). Currently it is free to host a game. Happy to hear any feedback (both good and bad). Hopefully the host provider I am using to run the game will hold up.

      Thanks!

      17 votes
    5. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      11 votes
    6. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      14 votes
    7. Any good Youtube channels on learning Data Structures and Algorithms, especially the math part?

      Hello Tildes, I am currently taking DSA in college and struggling a lot with the math and algorithms. Recently had to solve Karatsuba questions and I don't even know what I wrote down on the...

      Hello Tildes,

      I am currently taking DSA in college and struggling a lot with the math and algorithms. Recently had to solve Karatsuba questions and I don't even know what I wrote down on the paper. I have been trying to look for videos on this and only really came away with a vague understanding.

      What I've noticed is that I struggle with solving the math part of the questions.

      For example: "Describe a divide and conquer algorithm to compute the square
      of an n-digit integer in O(n log3 5) time, by reducing to the squaring of five [n/3]-digit
      integers"

      I have zero clue how I am supposed to understand the latter half of the question. It makes no sense to me beyond I am supposed to be multiplying squared numbers. How do I even begin to turn this into an algorithm? What is the solution even supposed to look like?

      Needless to say, I've struggled with math my entire life and I've been trying for years to be decent with it, and I have nothing to show for it.

      So, do you have any recommendations that could simplify the math needed for DSA? Videos are preferred but I will textbook recommendations as well.

      Thank you, and have a good day!

      18 votes
    8. Looking for a good, modern alternative for PHP nuke

      Way back in the day, I used to run a fan site for a game that ended up teaching me a lot about PHP, perl, databases and so on. Currently, I'm looking to rebuild that site, but PHP nuke is now...

      Way back in the day, I used to run a fan site for a game that ended up teaching me a lot about PHP, perl, databases and so on. Currently, I'm looking to rebuild that site, but PHP nuke is now hopelessly outdated and joomla/Drupal are not the direction I want to go in. So far, I've found php-fusion (from GoDaddys cpanel installer) which seems close, but I'm curious if there is a closer analog out there.

      The ideal for me is the old school blocks down the sides with content in the middle layout, with add-ons like forums, image gallery etc. Cheers for any help 😁

      15 votes
    9. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      13 votes
    10. My computer has lost its mind and I can't even begin to diagnose what's at fault. (It's the power supply.)

      UPDATE: It was the power supply. I've never even heard of such a weirdly anal issue, but after installing a new one, everything is a-okay. So, I've never really had issues with power supplies, and...

      UPDATE: It was the power supply. I've never even heard of such a weirdly anal issue, but after installing a new one, everything is a-okay.

      So, I've never really had issues with power supplies, and generally have always troubleshot (troubleshooted? trouble...shot?) my own issues with no real, well, issues. Until now.

      The other day, I got a helluva deal on a 6800 XT on Facebook Marketplace, the guy had the printout with the receipt, it's still under warranty for two years, whole shebang. So I upgraded from a Vega 56 to it. And there were zero issues. Admittedly, my power supply is only 650 watts, so I thought I might be missing some wiggle room there, and was prepared to need to upgrade. But the other night, it was fine. I stress-tested with a nearly-maxed-out 100+ FPS Cyberpunk 2077 and had zero issues, and followed that up with moderate use 144 FPS board games and things for the next few hours with a friend.

      And sometime after I went to bed (I left the computer on because I'm a bad man who doesn't take care of his things or some other vaguely acceptable excuse), Windows Update occurred. Again. It's been raising hell on me in the middle of the night any time I leave my computer on, but whatever. So in the morning (this was Sunday), I saw it wasn't working right, and just kind of... shitting itself. Had trouble getting out of BIOS, all this other stuff. Eventually, I realized it was ignoring my SSD, and after unplugging everything else and forcing it to boot from my SSD with the Windows 10 install on it, it said the install was borked and asked me to do recovery steps. None of them really worked. So at this point, I was assuming that I might have hit something with the SSD and damaged the SATA controller when moving the power for the GPU or something.

      So today, I got a new NVMe drive, booted from a 16gb flash drive, installed Windows 11 on it, and everything was fine. I was able to create a functional Windows 11 install, and it was fine. Until I got to the login screen. As soon as the screen asking for my PIN (on a complete, 100% valid Windows install) would load, that first frame, it would shut down hard. No BSOD, nothing. Just immediate shutdown. So I thought, "well, this seems like an issue for the POWER SUPPLY!" and removed the GPU, plugging my main monitor directly into the motherboard. Now, it was shutting down and power cycling before it even hit the BIOS, which is... weird as hell? So I thought "well, it gets further when a video card is in, let's put ye olden Vega 56 in and see how far that gets me!" and... it just works. I'm typing this from my fresh Windows 11 install with zero perceivable issues.

      So my question is: How is it that my computer was perfectly fine on Saturday night with my new video card under 100% load, but by the next day would decide seemingly at random based on some sort of schrodinger's cat theory when it would shut down and when it wouldn't.

      So, in summation, the four inconsistent scenarios, in tl;dr form:

      • New RX 6800 XT is installed, computer runs fine at 100% load while stress testing and then for hours afterward
      • 6800 XT installed, Windows won't boot and the power supply seemingly gives up
      • No video card installed, the computer starts power cycling before even reaching the BIOS
      • My old Vega 56 installed, everything is perfectly fine

      So, obviously there's something weird going on with my power supply, but if someone can set my sights on exactly why all of this has happened, and what the proper solution to make sure it doesn't again, or just... I don't know, typing this all out has made the last day and a half of my life feel much more worth it.

      And as an aside, my theory for why Windows was broken and I assumed my SSD was dying is as such: When it did the Windows Update and started trying to install it was the first time it powered down with no warning, which just broke Windows mid-update in a bad way.

      22 votes
    11. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      15 votes
    12. Node's "Single Threaded, Event Driven" programming model seems highly deceptive and farcical

      The more I think about it, the more I'm convinced of it. The biggest selling point of Node folks has been the "single threaded, event driven" model, right? Unlike JavaScript, other languages work...

      The more I think about it, the more I'm convinced of it.

      The biggest selling point of Node folks has been the "single threaded, event driven" model, right? Unlike JavaScript, other languages work on a "blocking" basis i.e. you run a statement or command and the program "waits" until the I/O is complete. For example, you issue open('xyz.txt', 'rb').read() in python and the program waits or blocks until the underlying driver is able to read that whole text file (which could take arguably long time if said file is too large in size).

      But with the Nodejs equivalent, you just issue the statement and then pass the "event handler" so that your program is never in the "waiting state". The whole premise of Node/JS event-callback is that "you don't call us, we will call you".

      This is all nice in theory but if this were indeed true then Nodejs scripts should be blazing fast compared to Python and even Java considering that most programs we write are I/O heavy and 99% of time, they're just waiting for an input from a File/URI/User? If this event callback model indeed worked as effectively as claimed, Node would have been the numero one and only language being used today?

      I think I'm starting to understand why that isn't the case. This whole "single threaded, event driven" thing is just a farce. You can also replicate the same thing that Node.js is doing in your Java or Python too by applying multi-threading (i.e. one thread just "waits" for the I/O in the background while the other keeps doing its job). All you've done here is just handed or delegated that complexity of multi-threading to Node.js?

      Realistically, it's impossible to wait or block an I/O request while at the same time also letting the other part of the code engage in other tasks, that's the very definition of multi-threading. Doing "async" is impossible without multiple threads in that sense. Node must have a thread pool of sorts where one of them is engaged in the wait/block while another is running your JS code further. When the wait is over, the control is then passed to the "event handler" function it was bound to in that other thread.

      What Node is selling as "single threaded" applies to application or business logic we are writing, node itself can't be single threaded. I feel it's better to just implement multi-threading in your own code (as needed) instead of using something convoluted and confusing like Node.js. What say you?

      8 votes
    13. Day 22: Sand Slabs

      Today's problem description: https://adventofcode.com/2023/day/22 Please post your solutions in your own top-level comment. Here's a template you can copy-paste into your comment to format it...

      Today's problem description: https://adventofcode.com/2023/day/22

      Please post your solutions in your own top-level comment. Here's a template you can copy-paste into your comment to format it nicely, with the code collapsed by default inside an expandable section with syntax highlighting (you can replace python with any of the "short names" listed in this page of supported languages):

      <details>
      <summary>Part 1</summary>
      
      ```python
      Your code here.
      ```
      
      </details>
      
      6 votes
    14. unique types in TypeScript using "branding"

      I'm doing a bit of Typescript programming and started using zod for input validation. It has a fair number of convenience methods, one of which is brand(). This creates a unique type, much like...

      I'm doing a bit of Typescript programming and started using zod for input validation. It has a fair number of convenience methods, one of which is brand(). This creates a unique type, much like the newtype operator in some languages. This is despite TypeScript not having unique types by default; TypeScript implements structural typing.

      The technique used to implement unique types has been known for a long time, but it's new to me. You can declare a type with an extra field that doesn't really exist.

      There seem to be several variations on how to do this. They seem to be mostly equivalent, but the ergonomics might differ. (Some might have better compiler errors that others?) The basic requirement is that the imaginary field doesn't get in the way in normal use, but it's incompatible with other types, causing a compiler error if they're mixed.

      One way goes like this:

      declare const brand: unique symbol;
      
      type Brand<T, TBrand extends string> = T & {
        [brand]: TBrand;
      }
      

      It can be used to declare branded types like this:

      type TopicId = Brand<bigint, "TopicId">;
      
      const myTopicId = 123n as TopicId;
      

      This trick relies on the fact that TypeScript's type checking is unsound. We can lie to the type checker. Intersecting T (in this case, bigint) creates a subtype of bigint with an imaginary field. The field's type is declared so the field requires a specific string, so it's going to be incompatible with just about any other type, unless you use Brand to give it the same name on purpose. (The field doesn't actually exist and no string is actually stored there.)

      To create a TopicId value, you use "as" to explicitly downcast bigints to TopicId's. Then you can use them just like a bigint, except that there will be compile errors if you use them wrong.

      A less strict approach is to make the imaginary field optional, described here as "flavoring" but I don't think that's in common use? Then you could assign bignums without doing a cast, but the type is still incompatible with other branded type. This reminds me of how types work in Go.

      11 votes
    15. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      9 votes