Hacker News .hnnew | past | comments | ask | show | jobs | submit | andrewghull's commentslogin

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))
  }


That's almost exactly what I've done here, and then defined various nodes with different behaviour like for-loops, while-loops, etc.

Take a look at https://docs.boardzilla.io/game/flow to see how it looks.


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.


Thanks for the comment, and yes we'd love to add more docs. (it's time consuming!) I understand that even a simple-sounding game can feel daunting to translate into a formalized API. I did record a video of me building part of a game FWIW.

https://docs.boardzilla.io/game/creating-a-game


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.


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?


https://fedoraproject.org/wiki/Licensing/CommonsClause has several links explaining what's wrong with the Commons Clause. The reason the AGPLv3 is my preferred replacement is that the FAANGs are irrationally afraid of it and refuse to let it be used anywhere in the company (e.g., https://opensource.google/documentation/reference/using/agpl...), but it's still 100% Free Software and Open Source and so allowed to be packaged in Linux distributions that disallow proprietary software.


Appreciate that! We'll take another look at this.


Remember (I'm sure you do) that you can relicense the code for the use of anyone who wants to pay you for it. AGPLv3 protects you, but doesn't hold you back.


Damn, poor little Google seems really scared. I'm not sure if that info is true. You have to provide the whole source of the entire product and not just a segment of code (eg library) you forked which they do often?


I'd also suggesting reading some of /dev/lawyer's blog posts, though I'm cooking and can't pull up anything in particular ATM.


[flagged]


I've seen a lot of takes on the GPL but this is a new one to me. As another comment points out, you only have to make changes available to others if you make the software itself available to others; either by distributing a binary or by using it to provide a web service.

But this is, fundamentally, the point of "Free" software: someone who uses a piece of software should be entitled to change that software as they desire. This obviously implies that if you make your own modified software available to others, they too must be able to make their own changes.


The AGPLv3 only requires you to make your modified source code available to people that you choose to give a copy of the binary to or allow to use on your computer over the network. You never have to make anything available to the original owner if you don't let them use your modified version.


> That sounds like proprietary copyright wherein third parties are allowed to view, but not modify, the source code, to me.

... Except that they're literally allowed to modify the source code?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: