sethcalebweeks
Re:Working pipe operator today in pure JavaScript
on Wednesday October 08, 2025 @10:00AM (#45516305)
I love the idea! The creativity of (ab)using JavaScript type coersion is really neat. I did something similar using proxies to create a chainable API.
https://dev.to/sethcalebweeks/fluent-api-for-piping-standalo...
const shuffle = (arr) => arr.sort(() => Math.random() - 0.5);
const zipWith = (a, b, fn) => a.slice(0, Math.min(a.length, b.length)).map((x, i) => fn(x, b[i]));
const log = (arr) => {
console.log(arr);
return arr;
};
const chain = chainWith({shuffle, zipWith, log});
chain([1, 2, 3, 4, 5, 6, 7, 8, 9])
.map((i) => i + 10)
.log() // [ 11, 12, 13, 14, 15, 16, 17, 18, 19 ]
.shuffle()
.log() // e.g. [ 16, 15, 11, 19, 12, 13, 18, 14, 17 ]
.zipWith(["a", "b", "c", "d", "e"], (a, b) => a + b)
.log() // e.g. [ '16a', '15b', '11c', '19d', '12e' ]
[0]; // e.g. '16a'
Re:Ask HN: Who wants to be hired? (July 2025)
on Tuesday July 01, 2025 @08:19PM (#44439170)
Location: Syracuse, NY
Remote: Yes (preferred)
Willing to relocate: No
Technologies: React, Vue, Angular, Svelte, Solid, TypeScript, Elixir, OCaml, C#, Blazor, Clojure
Résumé/CV: Senior Software Architect and Engineer with a master's in Computer Engineering and Mechanical Engineering. Founding engineer of a conversational banking startup.
Email: [email protected]
Re:Becoming an Amateur Polyglot
on Sunday May 12, 2024 @08:45PM (#40338736)
Any tips for an English speaker trying to learn Cebuano? It's demoralizing making an attempt using some online resources, and then finding out that they don't actually say it that way because of regional or even generational differences.
Re:Show HN: Leporello.js – interactive functional programming IDE for ...
on Tuesday October 03, 2023 @08:25PM (#37759410)
The term "self-hosted" is an interesting choice. It's usually used to describe the compiler of a programming language written in that same programming language. This is an IDE written in JavaScript. Cool project, though!
Re:Thoughts on Elixir, Phoenix and LiveView after 18 months of commerc...
on Monday August 14, 2023 @01:27AM (#37117773)
Keyword lists were certainly confusing as a newcomer. But, FWIW, they existed well before maps. The AST is made up of only tuples and keyword lists on top of atoms and other literals. (Actually, if I'm not mistaken, keyword lists themselves are just lists with tuples of atom/value pairs. If you dig far enough down, it's incredible just how much of the language is built on top of a tiny number of primitives. Almost every bit of syntax you can think of is probably several layers of macros.)
Re:Clojure is a product design tool (2015)
on Friday June 23, 2023 @12:11AM (#36442706)
> I spend that time on more important things, like polish.
Ironic that Lisp is Polish Notation
Re:How to Start Your Blog in 2023
on Monday February 20, 2023 @10:20PM (#34876061)
I migrated from Jekyll to Astro a few weeks ago. It only took me a few hours to replicate the site, more or less. Here's the website and the post about the experience.