elierotenberg
TypeScript and the Curry-Howard Correspondence
Show HN: Copy-pastable colllection of TypeScript snippets
Cottage Computer Programming (2003?)
Show HN: Using ChatGPT to foster kids well-being at school
Show HN: Typed-jest-expect, elegant typings for a more civilized age
Show HN: Fastify-zod, type-once, run everywhere (TypeScript/OpenAPI)
TenVer v.10 โ The version of your product is and always will be 10
Modern Programming Glossary
Typed-react-openapi: Idiomatic, strongly typed React OpenAPI integration
Typed-assert: A typesafe TS assertion library
Show HN: UseLess, a Collection of Useless Hooks
God Helmet
God helmet
Clifford torus
Basically forward-shuffling the component tree to produce HTML that will be really hard to match using CSS Selectors usually found in adblockers and other DOM-targeting scripts.
Idiomatic Data Fetching with React Hooks
In TypeScript for example you can strongly type your communication protocol (web requests/reponses, websockets, parent/worker ipc, etc) and get some guarantees at compile time. For example, you can guarantee that your state updates over the wire are eventually consistent.
The same goes of course for other algebraic type systems by encoding monotonicity in the form of static type assertions (Flow, Caml, Haskell...).
React-prepare, redux-friendly SSR with async deps
Flux over the Wire at ReactEurope 2015
The pattern is
function decorate(params) {
return (Component) => class extends React.Component {
... // some code using params
render() {
return <Component {...this.props} />
}
};
}
my2c.Isomorphic Apps Done Right with React Nexus
ES6 Coding Style Guide
I think I may have failed to express my point, though. I'm not building a message queue, as it is certainly a very hard problem that has been engineered for years by people way smarter than me :) I'm merely leveraging the goodness of their implementations (in my case redis, but RabbitMQ is also an option I've considered explicitly in my post).
The chat is a contrived example to show that even under high load, full-scale flux over the wire is a reasonable option. As for "any kind of serious load", well, maybe my example fails to meet the requirements, but unless I'm building Facebook, I think I've faced something serious enough to be able to think about my next step.
Few remarks though:
- it's still way below the number of actions we're talking about here (~100k/s)
- since redis is only used as a generic MQ and not as a store, it can be sharded at the app level without the pain usually associated with redis clustering
- I've deployed a similar (but less performant) design for the player of a gaming website, which is in use in production for more than a year, and works like a charm (we're talking ~5-50k users per channel on a daily basis). This is definitely a "second-system" pattern, but I try to avoid the associated pitfalls :)
I'd be genuinely interested by your feedback!
Million User Webchat with Full Stack Flux, React, Redis and PostgreSQL
However, I can imagine a similar tool doing multi/demultiplexing, eg the handler process would take input text lines prepended with a connection identifier (eg. "$socketID $message") and output using a similar formatting. Pretty much like websocketd but with multiplexing and unixy/pipe-friendly (eg. you can apply grep/awk/etc before and after).
How would this fit compared to websocketd?