Recent submissions

Comment · 2 years ago
Here's the final example in TypeScript if you find that easier to read:

  type NonEmpty<T> = [T, ...T[]]

  const head = <T>(list: NonEmpty<T>) => list[0]

  function getConfigurationDirectories(): NonEmpty<string> {
    const configDirsString = process.env["CONFIG_DIRS"]
    const [firstDir, ...restDirs] = configDirsString.split(',')
    if (firstDir === undefined) throw Error("CONFIG_DIRS cannot be empty");
    return [firstDir, ...restDirs];
  }

  function main() {
    const configDirs = getConfigurationDirectories();
    initializeCache(head(configDirs))
  }
Comment · 2 years ago
Comment · 2 years ago
Yes it's like BGA, not TTS.

No, we haven't done much to secure the online playing experience for strangers other than simply enforcing the rules of the game. We've been so far more focused on the API side of building game than the service side of having customers, but these are all on our radar as table stakes to make this an nice experience for random players.

Comment · 2 years ago
Comment · 2 years ago
We've been planning to add a way to do pluggable AI functions (both for solitaire play and for testing). If you want to try, take a look at the TestRunner class for an easy way to automate playing the rules for multiple players.
Comment · 2 years ago
Appreciate that! We'll take another look at this.
Comment · 2 years ago
Co-creator here.

I thought AGPL was ok as well, but Commons Clause specifically tried to address perceived deficiencies in the AGPL although I admit that it didn't really seem to catch on. I'm not super well versed in the technical details. Why would you recommend AGPL?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton