Skip to content

Instantly share code, notes, and snippets.

Roman Pominov

I'm a full-stack JavaScript developer looking for a part time remote job.

I have been doing web development since 2009. Mostly worked in frontend, have a lot of experience with the React ecosystem. I have less experience in backend, mostly NodeJS, but enjoy it even more than frontend now.



How a contact tracing app could work while keeping everyone's data anonymous, only infected people would need to share their data if they choose to:

  • A peer-to-peer network.
  • Each client holds N connections to some other clients.
  • When a client changes the location by a significant distance, it sends its coordinates + time + ID to ONE of their current connected clients.
  • The IDs used just once and generated from a seed. Each client knows its seed but keeps it secret.
  • After the location is sent, the client kills the connection to the receiver client. And connects to a new one.
  • When a client receives a location data, it sends it to one of its current connected clients.
  • Each message gets retransmitted some N number of times.
  • Some clients act as "servers" by recording all data they see and make it public somehow so that regular apps are lightweight.
rpominov /
Last active September 19, 2018 12:36
Compound Components

My relationship with Compound Components

What are these?

Compound Component is a pattern in React when a component doesn't work by itself and needs other specific components to be its children or parents in order to operate.

Here is an introduction video

How do I feel about it?

rpominov /
Last active November 5, 2016 10:46
Example of use of the new approach for fantasy-land

This is an example of use of the new approach for fantasy-land proposed in fantasyland/fantasy-land#199

Read this commnet to understand what "Spec compatible Type Representative" and "spec compatible value" means.

rpominov / Task.js
Created May 22, 2016 13:06
Task concept
type Result<L,R> =
| {T: 'Right', value: R}
| {T: 'Left', value: L}
| {T: 'Thrown', error: any}
| {T: 'Cancel'}
type Cancel = () => void
type RunHandler<L,R> =
| (result: Result<L,R>) => void
rpominov / Type.js
Last active May 15, 2016 18:56
An idea of Algebraic data types helper in JS
const Maybe = Type({Just: ['value'], Nothing: []}, {
map(fn, maybe) {
Just: ({value}) => Maybe.Just(fn(value)),
// Should x => x be the default handler in case() so we could omit Nothing here?
Nothing: m => m,
rpominov /
Last active March 24, 2016 14:29


  1. S.equals(a, a) = true (reflexivity)
  2. S.equals(a, b) = S.equals(b, a) (symmetry)
  3. If S.equals(a, b) and S.equals(b, c), then S.equals(a, c) (transitivity)


  1. S.concat(S.concat(a, b), c) is equivalent to S.concat(a, S.concat(b, c)) (associativity)
function loadSomeStuff(id) {
// We return basic-stream
return _sink => {
let sink = _sink
const onSuccess = data => sink({type: 'success', data})
const onError = error => sink({type: 'error', error})
stuffLoadingService.load(id).done(onSuccess, onError)
return () => {
// We can't unsubscribe from a Promise, so we simply make sink() a noop
sink = () => {}
/* @flow */
type Sink<T> = (payload: T) => void
type Disposer = () => void
type Stream<T> = (s: Sink<T>) => Disposer
type F<A, B> = (x: A) => B
type LiftedF<A, B> = (s: Stream<A>) => Stream<B>
/* Lifts function `A => B` to a funcion that operates
rpominov /
Last active May 4, 2016 22:34
Router concept
// trnsitionRequests -> BrowserAPI -> [ resolveRoute -> loadData -> render -> restoreScroll ]

// poor man's strem.flatMapLatest()
router.pipe((payload, next) => {
  return () => {
    // cleanup