HackerTrans
TopNewTrendsCommentsPastAskShowJobs

bikeshaving

823 karmajoined 7 лет назад

Submissions

Show HN: Revise.js – Building blocks for contenteditable-based text editors

revise.js.org
5 points·by bikeshaving·4 месяца назад·0 comments

Dulce et Decorum Est (1921)

poetryfoundation.org
220 points·by bikeshaving·4 месяца назад·107 comments

Microsoft Creative Writer (1993)

classicreload.com
18 points·by bikeshaving·4 месяца назад·5 comments

Show HN: Shovel.js – A portable meta-framework built on web standards

shovel.js.org
3 points·by bikeshaving·5 месяцев назад·2 comments

Decoding the Astonishing Secret Languages of Animals

atmos.earth
1 points·by bikeshaving·6 месяцев назад·0 comments

comments

bikeshaving
·4 дня назад·discuss
As someone who does not know what k4, qSQL, or q are, reading through the landing page of this website was giving me mild schizophrenia. And then I tried to search for these things in the old way, and received incredibly dry technical sites that still don’t tell me what it is, and all these names are wildly SEO unfriendly. So I had Claude give me context and it’s apparently the database Wall Street uses for tick data. Sounds cool but, jeez.
bikeshaving
·в прошлом месяце·discuss
My favorite example of liminalism is Everything Empty Always Alone, a man on YouTube in his 40s who claims to be a time traveler and films himself walking and driving around empty metropolitan areas. He claims he’s recording from some sort of alternate universe, but it’s likely he’s just at these locations at odd hours. In any case, it’s fun outsider art. Or maybe it’s all true you never know.

https://www.youtube.com/@EverythingEmptyAlwaysAlone/videos
bikeshaving
·2 месяца назад·discuss
I’ve tried to create the minimalist version of this with Revise.js. The main surface area is a custom element called a `<content-area>`. The OverType library you linked to uses a time-old technique where you essentially put a duplicate copy of the content over a `<textarea>` to highlight it but this doesn’t really work in mobile and it messes with the selection. I’ve tried to grapple with `contenteditable` directly with my solution, but it does try to use less JavaScript and it does try to be more minimal.

https://github.com/bikeshaving/revise https://revise.js.org https://revise.js.org/blog/introducing-revise/
bikeshaving
·4 месяца назад·discuss
Manual refresh(). This is something Crank does, and other frameworks like the new Remix one is picking it up as well. Being explicit has its advantages.
bikeshaving
·4 месяца назад·discuss
I’ve written about how Svelte, Vue, and Solid are all reactive and share common pitfalls due to their reactive solutions. My theory is that they all cause worse bugs than they prevent.

https://crank.js.org/blog/why-be-reactive/
bikeshaving
·4 месяца назад·discuss
I don’t own a car :)
bikeshaving
·4 месяца назад·discuss
I’m very wary of celebrating Meta’s language work when the company was credibly found to have contributed to the genocide against the Rohingya in Myanmar, and separately, to human rights abuses against Tigrayans during the conflict in northern Ethiopia. Be careful whose sins you’re laundering.

https://www.amnesty.org/en/latest/news/2025/02/meta-new-poli... https://www.amnesty.org/en/latest/news/2023/10/meta-failure-...
bikeshaving
·4 месяца назад·discuss
I must tell you, it is an incredible relief to learn that McZee was not a figment of my imagination.
bikeshaving
·4 месяца назад·discuss
Just found the text editor from my childhood
bikeshaving
·4 месяца назад·discuss
I’ve found that humans are pretty good at reading through the output of bash commands. And Claude Code keeps insisting on truncating the output for some reason.
bikeshaving
·4 месяца назад·discuss
I keep asking why the default Claude tools like Read(), Write(), Edit(), MultiEdit(), Replace() tools aren’t just Bash() with some combination of cat, sed, grep, find. Isn’t it just easier to pipe everything through the shell? We just need to figure out the permissions for it.
bikeshaving
·4 месяца назад·discuss
Yes, the callable promise abstraction is just a bit of effort:

  let resolveRef;
  const promise = new Promise((res) => { resolveRef = res; });
  
  const callback = (data) => {
    // Do work...
    resolveRef(data); // This "triggers" the await
  };

  Object.assign(callback, promise);

There’s a real performance cost to awaiting a fake Promise though, like `await regularPromise` bypasses the actual thenable stuff.
bikeshaving
·4 месяца назад·discuss
Not accepting PRs for this. I think the logic is sound (Easter Eggs should be difficult to trigger).
bikeshaving
·4 месяца назад·discuss
A long time ago, I wrote an abstraction called a Repeater. Essentially, the idea behind it is, what would the Promise constructor look like if it was translated to async iterables.

  import { Repeater } from "@repeaterjs/repeater";
  
  const keys = new Repeater(async (push, stop) => {
    const listener = (ev) => {
      if (ev.key === "Escape") {
        stop();
      } else {
        push(ev.key);
      }
    };
    window.addEventListener("keyup", listener);
    await stop;
    window.removeEventListener("keyup", listener);
  });
  const konami = ["ArrowUp", "ArrowUp", "ArrowDown", "ArrowDown", "ArrowLeft", "ArrowRight", "ArrowLeft", "ArrowRight", "b", "a"];
  (async function() {
    let i = 0;
    for await (const key of keys) {
      if (key === konami[i]) {
        i++;
      } else {
        i = 0;
      }
      if (i >= konami.length) {
        console.log("KONAMI!!!");
        break; // removes the keyup listener
      }
    }
  })();
https://github.com/repeaterjs/repeater

It’s one of those abstractions that’s feature complete and stable, and looking at NPM it’s apparently getting 6.5mil+ downloads a week for some reason.

Lately I’ve just taken the opposite view of the author, which is that we should just use streams, especially with how embedded they are in the `fetch` proposals and whatever. But the tee critique is devastating, so maybe the author is right. It’s exciting to see people are still thinking about this. I do think async iterables as the default abstraction is the way to go.
bikeshaving
·5 месяцев назад·discuss
I was thinking using ZWJ because the staff is always implied by the usage of Cistercian numerals. I was also wondering if we could reuse CISTERCIAN 1-9 for each significant digit rather than having to encode all 4 separately, though at the end of the day it’s only 36 separate code points.

Adding the staff is 37 codepoints versus 36, but I think using ZWJ would at least have each numeral independently renderable so it degrades gracefully. I’m not too sure about how combining characters degrade.

Essentially it boils down to whether you think the staff and the digit flag part of the numeral are independent or not.
bikeshaving
·5 месяцев назад·discuss
Can anyone who works with the Unicode consortium explain why Cistercian numerals aren’t just part of Unicode? There’s Aegean numbers, counting rod numerals, Mayan numerals, Roman numerals (beyond the Latin letter aliases), cuneiform numbers, and plenty of other historical numeral-only systems.

The 4-stave system is interesting but can almost certainly be done using ZWJ hacks maybe.
bikeshaving
·5 месяцев назад·discuss
Thanks for the kind words! Let me know your thoughts if you end up exploring.
bikeshaving
·5 месяцев назад·discuss
I’ve just published the first public release of a new open source project Shovel.js, replacing tools like Express, Fastify, Next.js, Vite. It’s a full-stack/meta server framework which implements the full Service Worker specification but in Node, Bun, Cloudflare. It leans into using web standards to do things like accessing the filesystem, reading cookies, create client-side bundles rather than inventing new APIs. You can read about the process of making Shovel with AI in the introductory blog post.

https://shovel.js.org/blog/introducing-shovel/

https://github.com/bikeshaving/shovel
bikeshaving
·6 месяцев назад·discuss
Seeing this makes me miss the salad days of MOOCs. I learned programming in the 2010s through MIT’s EDX Introduction to Programming course, and then a course on Coursera by Martin Odersky on Functional Programming through EPFL, and I feel like that ladder has been kicked away due to MOOC monetization policies. I wonder if we could return to these days.
bikeshaving
·6 месяцев назад·discuss
It’s sinful to fish and kill these ancient creatures up from the deep for minor scientific progress.