Better HN
topnewbestaskshowjobs
Log inSign up

eddsalkield

10 karma · joined Feb 6, 2020 (6y ago) · 9 submissions

Submissions

1.

In praise of kiln: a simple static site generator(edd.salkield.uk ↗)

1 points · by eddsalkield · 3y ago · discuss

2.

St. Faith's School Song: my recollections(edd.salkield.uk ↗)

1 points · by eddsalkield · 3y ago · discuss

comment 3y ago · link · parent

You're right - as long as one player announces "I'm playing Mirror Move", then it can be verified that the move that actually gets played was valid. The actually played move doesn't have to be in the state committed at the beginning.

Randomness as in the case of Metronome can be decided upon in the same way that other move randomness is handled.

comment 3y ago · link · parent

Interesting - things like extra Dynamaxing moves should therefore be considered part of the initial state that's committed to. Clients could also check to make sure that the Dynamaxing moves aren't being used outside of the 3 turn limit.

I've updated the post to reflect this - thanks!

5.

Protécol – Zero-Trust Peer-to-Peer Pokémon Battle Protocol(edd.salkield.uk ↗)

10 points · by eddsalkield · 3y ago · 5 comments

6.

Vibing Cat Synchroniser – Generating Memes Using Waveform Analysis(edd.salkield.uk ↗)

3 points · by eddsalkield · 5y ago · discuss

comment 5y ago · link · parent

Thanks, that's a really helpful example.

Where I think this could be taken to the next level of reusability is in modularising the front-end into API-specific components. For example, the login behaviour could depend on FastAPI-Users, with a sibling frontend library containing components that implement the same login flow. Adding user behaviour is then a matter of using the same third-party library on the front and back end.

This approach could be extended to other components such as an admin panel (perhaps using https://github.com/awtkns/fastapi-crudrouter), or a blogging component.

comment 5y ago · link · parent

I've been using FastAPI for a while, and think that the API-driven approach that it endorses is a good paradigm for building web applications.

Since the design of FastAPI programs is often modular, with libraries and modules extending the API with additional routes, it seems to make sense to build front-end components according to the same module structure. I'm yet to see any of these for popular libraries, but I'd be up for helping build some in libraries like Vue.

Does anyone know of existing projects/server frameworks where backend modules are coupled with front-end components that consume their API?

comment 5y ago · link · parent

I'd recommend you check out FastAPI-Users if you haven't already: https://github.com/frankie567/fastapi-users

It provides a users framework with OAuth2 integration, support for different ORM backends, and routes for authentication, verification, etc.

Full disclosure: I am a contributor to this project.