Skip to content

Instantly share code, notes, and snippets.

@maxcountryman
Created May 10, 2017 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxcountryman/a706ae8309c2f0b7ba415b8095774ca9 to your computer and use it in GitHub Desktop.
Save maxcountryman/a706ae8309c2f0b7ba415b8095774ca9 to your computer and use it in GitHub Desktop.
> "To be honest, this is a somewhat advanced usage of the transducers machinery," says the Grammarly Engineering Blog, right after shoehorning a BufferedReader into the mold with "reify IReduceInit". I already felt I'd got my money's worth from reading up to this half-way point. But I was astonished at what came next.
Though it pains me to speak of it, I tell you now I have seen this "blog post", and seen too what came next. Astonishing indeed! I admire your simple description of these events, as it suggests either a man of great fortitude in the face of horror, or a man who was able to flee and forget, and I know that I am neither.
I remember the reified specimen – still alive, god have mercy – placed upon an altar to be offered up to `eduction`. Yes! Placed squarely on its unsightly variadic first argument. Why? For what purpose? We are told: "it's a recipe for the values to come." The blood drained from my face.
It was soon apparent what eldritch function would feast upon the values begotten by this unholy recipe. I saw the invocation of `transduce` and it brought back sweeter memories, of burritos and airport conveyor belts. I could see the `eduction`, presumably still wrapping the reified IReduceInit, perched atop a ziggurat of lesser transducers. I looked, and at the very bottom lay a blasphemous side-effectful invocation of map. I did not belong in this place.
Beyond astonished, I tell you, but still at this point I clung to sanity. I cried out: Enough! The values have suffered enough! They were good values, persisted to disk, why are they now flung into dimensions far beyond our own? Why have you turned your back on open(2)? Why have you forsaken the file descriptor?
Alas, my sanity could not stand this final blow. The Grammarly necromancer spoke the words: "Here Comes The Parallel Implementation." And lo, he did throw `core.async` into the mix. I saw `pipeline` swallow `transduce` whole, like a multi-armed multi-beaked creature from a Boschian hellscape. The whine of the CPU fans drowned out my last cry: aren't you supposed to use `pipeline-blocking`?
You may think me sane now in having told you all this, but I assure you, I am no longer. I should have run when I had the chance, but now I dream of educing the pipeline, reifying the transducer, and shouting the misbegotten outcomes into every channel that will >!! my message. It is too late for me, but perhaps not too late for you.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment