Better HN
topnewbestaskshowjobs
Log inSign up

elierotenberg

300 karma · joined Oct 15, 2014 (12y ago) · 47 submissions

Submissions

1.

React Server Components Explorer(overreacted.io ↗)

1 points · by elierotenberg · 11mo ago · discuss

2.

TypeScript and the Curry-Howard Correspondence(elie.rotenberg.io ↗)

1 points · by elierotenberg · 2y ago · discuss

3.

Show HN: Copy-pastable colllection of TypeScript snippets(github.com ↗)

2 points · by elierotenberg · 2y ago · discuss

4.

Cottage Computer Programming (2003?)(atariarchives.org ↗)

84 points · by elierotenberg · 3y ago · 11 comments

5.

Show HN: Using ChatGPT to foster kids well-being at school(rotenberg.io ↗)

2 points · by elierotenberg · 3y ago · 1 comment

6.

Show HN: Typed-jest-expect, elegant typings for a more civilized age(github.com ↗)

3 points · by elierotenberg · 4y ago · 1 comment

7.

Show HN: Fastify-zod, type-once, run everywhere (TypeScript/OpenAPI)(github.com ↗)

7 points · by elierotenberg · 5y ago · 2 comments

8.

TenVer v.10 – The version of your product is and always will be 10(github.com ↗)

3 points · by elierotenberg · 5y ago · discuss

9.

Modern Programming Glossary(elie.rotenberg.io ↗)

25 points · by elierotenberg · 6y ago · 1 comment

10.

Typed-react-openapi: Idiomatic, strongly typed React OpenAPI integration(github.com ↗)

5 points · by elierotenberg · 6y ago · discuss

11.

Typed-assert: A typesafe TS assertion library(github.com ↗)

4 points · by elierotenberg · 6y ago · discuss

12.

Show HN: UseLess, a Collection of Useless Hooks(github.com ↗)

2 points · by elierotenberg · 6y ago · discuss

13.

God Helmet(en.wikipedia.org ↗)

93 points · by elierotenberg · 6y ago · 49 comments

14.

God helmet(en.wikipedia.org ↗)

2 points · by elierotenberg · 6y ago · discuss

15.

Clifford torus(en.wikipedia.org ↗)

54 points · by elierotenberg · 6y ago · 11 comments

comment 6y ago · link · parent

For this kind of tasks I usually create a private Firefox extension which gives me access to extended browser capabilities and the ability to lift some security-related restrictions. I run it in a sandboxed browser, much like I would do with something like Selenium or Puppeter, but I have much more options to hand-tune the automation.

comment 6y ago · link · parent

It reminds me of a lightning talk I gave at ReactConf some time ago :)

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.

Code: https://github.com/elierotenberg/react-armor

Video: https://www.youtube.com/watch?v=n63XXHY4A7I

18.

Idiomatic Data Fetching with React Hooks(gist.github.com ↗)

8 points · by elierotenberg · 7y ago · discuss

comment 7y ago · link · parent

It seems like monotonicity (or a subset, stronger monotinicity, still covering many practical use cases) can be statically enforced in an algrebraic type system. With some generics magic you can encode monotonicity as a type assertion on (optionally asynchronous) function calls mapping an underlying transport/RPC mechanism (REST over HTTP, RPC over Websocket, custom protocol over TCP/domain socket...).

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

20.

React-prepare, redux-friendly SSR with async deps(github.com ↗)

12 points · by elierotenberg · 9y ago · discuss

comment 11y ago · link · parent

Is React Resolver related to React Nexus[1]?

[1] https://github.com/elierotenberg/react-nexus

22.

Flux over the Wire at ReactEurope 2015(speakerdeck.com ↗)

5 points · by elierotenberg · 11y ago · discuss

comment 11y ago · link · parent

One really useful pattern is React higher-order components, eg. https://github.com/elierotenberg/react-nexus#componentgetnex...

The pattern is

  function decorate(params) {
    return (Component) => class extends React.Component {
      ... // some code using params
      render() {
        return <Component {...this.props} />
      }
    };
  }
my2c.

24.

Isomorphic Apps Done Right with React Nexus(blog.rotenberg.io ↗)

8 points · by elierotenberg · 11y ago · 2 comments

25.

ES6 Coding Style Guide(github.com ↗)

7 points · by elierotenberg · 11y ago · 3 comments

comment 11y ago · link · parent

This benchmark is indeed very interesting.

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.

comment 11y ago · link · parent

Oh, you're absolutely right, 10M/s is a mistake, which I've corrected.

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!

comment 11y ago · link · parent

Actually this whole stack is designed with SSR in mind, see the related package react-nexus (which I will soon blog about, too!) :)

29.

Million User Webchat with Full Stack Flux, React, Redis and PostgreSQL(blog.rotenberg.io ↗)

129 points · by elierotenberg · 11y ago · 37 comments

12