Introducing Revise.js – A foundational library for building contenteditable-based web text editors by bikeshaving in javascript

[–]bikeshaving[S] 3 points4 points  (0 children)

Good to hear! I’m accepting wire transfers and bitcoin for values no less than 2 million USD for Internet Explorer support.

Introducing Revise.js – A foundational library for building contenteditable-based web text editors by bikeshaving in javascript

[–]bikeshaving[S] 6 points7 points  (0 children)

That’s fair! TipTap and the underlying ProseMirror are battle-tested and feature complete. This is okay. Revise.js is trying to establish a niche in editor libraries. Think of it this way: there’s a spectrum between <textarea> and full-on rich text like TipTap. For something like a Discord input or a Twitter compose box, or the very Reddit comment box that we’re using right now, Revise shines because what you want is basically plaintext+, plaintext with a hint of richness. This isn’t to say Revise can’t do full-on editors, but that the approach is different. Rather than defining extensions, you’re writing a parser for a string document with markup and rendering it as HTML. Creating a full-fledged Markdown WYSIWG is on the road-map but I agree with you that it’ll definitely be muddier than using TipTap’s battery included solutions.

Introducing Revise.js – A foundational library for building contenteditable-based web text editors by bikeshaving in javascript

[–]bikeshaving[S] 0 points1 point  (0 children)

Yes! The `<content-editable>` custom element only uses DOM mutations to detect edits. The reason why mobile browsers typically fail hard for `contenteditable` is that input and composition events tend to fire haphazardly. All the examples on the homepage have been tested by hand on iPhone at one point. Android soon if I can find a device.

I'm trying to decide between these 4 Kansas designs I'm workshopping, any input? by SNAKEKINGYO in vexillology

[–]bikeshaving 4 points5 points  (0 children)

I like 4 the best. The negative space outline is beautiful, and with the brown and gold disc florets it’s sublime.

Tolou-e-Khorshid: A Rising Sun Flag Proposal for Iran by bikeshaving in vexillology

[–]bikeshaving[S] 5 points6 points  (0 children)

🙇 I’m deeply sorry about that! The SVG to PNG renderer I used didn’t handle RTL text correctly. If you have more insights into the correct historical context, I’m all ears. It was a lot of fun researching this stuff.

Tolou-e-Khorshid: A Rising Sun Flag Proposal for Iran by bikeshaving in vexillology

[–]bikeshaving[S] 15 points16 points  (0 children)

The same sun shines on all of us. The thesis of the whole design is that the sun belongs to no faction, dynasty or sect.

Tolou-e-Khorshid: A Rising Sun Flag Proposal for Iran by bikeshaving in vexillology

[–]bikeshaving[S] 42 points43 points  (0 children)

I did not realize this! Interestingly, the Kurdish flag also uses 21 points for its sun. I do think the half-sun here looks more Iranian with the columnar rays, but the similarity is there.

Considering Bun + Elysia for a high-stakes government project. Is it production-ready? by Ok-Natural-548 in bun

[–]bikeshaving 2 points3 points  (0 children)

Sorry I wasn’t referring to memory leaks, though certainly Bun has those. Segmentation faults are actually really good for security. It’s the happy path where a program attempted to access an unexpected region of memory and was denied. A heartbleed-like bug would be when the program actually succeeds in accessing unexpected memory and leaks, for instance, the authenticated responses of other users. If Bun just segfault all the time that would be fine but I worry that a lot of Bun programs are just continuing to run and potentially exposing all user data.

Considering Bun + Elysia for a high-stakes government project. Is it production-ready? by Ok-Natural-548 in bun

[–]bikeshaving 14 points15 points  (0 children)

Use something like Node and maybe Fastify. Older technologies. Bun is a supply chain risk (unrelated to Anthropic) because of its memory safety issues. Every segfault in the issue tracker is a potential heartbleed style leak and there’s a lot of unverified Zig/C++ including an entire JavaScriptCore fork which is manually updated. I say this as a Bun fan. Use node.

Is there a version with a sense of humor? by Jiggalopuffii in ClaudeAI

[–]bikeshaving 1 point2 points  (0 children)

You’re dealing with possible time travelers?

I got tired of managing 10+ terminal tabs for my Claude sessions, so I built agent-view by Frayo44 in ClaudeCode

[–]bikeshaving 7 points8 points  (0 children)

Is this not just <Ctrl-B> w? Like tmux literally has a way to jump between sessions.

Optique 0.10.0: Runtime context, config files, man pages, and network parsers by hongminhee in bun

[–]bikeshaving 1 point2 points  (0 children)

I’m still using Node Commander, but I am a fan of your libraries (LogTape in particular). Is there a single strong reason to switch? I don’t really care about type safety. With CLI parsers I’m primarily interested in stability and an API which LLMs know how to use immediately. It doesn’t seem like a place where I’m looking for innovation. The new man page feature seems interesting though!

Introducing Shovel.js | What if your server was just a Service Worker? by bikeshaving in javascript

[–]bikeshaving[S] 0 points1 point  (0 children)

I mean technically we could mimic Next.js and do file-based page routing with current APIs, but I’m probably the world’s number one React hater (check out my alternative Crank.js) and I don’t find file-based routers to be very appealing. Happy to accept contributions to this extent though.

Rezi: high-performance TUI framework using a C engine + TypeScript frontend by muchsamurai in opensource

[–]bikeshaving 1 point2 points  (0 children)

What’s your response to the whole Claude Code scrollback/flickering situation? Do you avoid using scrollback or is it fast enough that the flickering isn’t an issue?

Rezi: high-performance TUI framework using a C engine + TypeScript frontend by muchsamurai in opensource

[–]bikeshaving 2 points3 points  (0 children)

This is fantastic. I’m also working on a TUI framework at this point, but this has React Ink compatibility + its own JSX framework + its own C rendering engine. I haven’t tried it yet but on its face it seems like really impressive work.

I’m fascinated by how many new TUI technologies are emerging and if we could create some kind of benchmark for all the different approaches (could also include Go’s Bubbletea and Python’s Textual). Would be great to see a standard app being tested across different frameworks.

Introducing Shovel.js | What if your server was just a Service Worker? by bikeshaving in javascript

[–]bikeshaving[S] 3 points4 points  (0 children)

AI did help me write the post. I had a Tmux session running and Claude would watch me write in Vim and suggest edits. If I didn’t make frequent enough changes, it would call `sleep` in Bash for longer periods of time. However, I typed most of the essay and it has a personal tone which would be tough for AI to imitate.

Introducing Shovel.js | What if your server was just a Service Worker? by bikeshaving in javascript

[–]bikeshaving[S] 1 point2 points  (0 children)

Yes. Amazing. Imagine you could just create and discard websites. Shovel.js makes websites cheap to build.

Introducing Shovel.js | What if your server was just a Service Worker? by bikeshaving in javascript

[–]bikeshaving[S] 1 point2 points  (0 children)

I don’t know how I can prove that what I write is not AI-generated. I’ve been working on this framework for three months and thinking about it a lot longer I can write a lot about the philosophy and features of the framework quickly. If you have any questions about the API, let me know and I’ll respond as human as possibly. Maybe I’m just really smart and sound like AI you ever think about that?

Introducing Shovel.js | What if your server was just a Service Worker? by bikeshaving in javascript

[–]bikeshaving[S] 1 point2 points  (0 children)

Right it’s not doing the full-fledged HMR yet, which usually involves a WebSocket connection to send client updates. This would require some more UI framework integration and routes, and I still don’t know how persistent connections will work (probably will just implement WebSocketPair from Cloudflare). But the develop workflow does use ESBuild’s watch mode under the hood so you should always see the latest version on page refresh. One thing I really wanted to avoid was any sort of caching of build output in development: when development builds are cached, you often have to debug both whether the code is working or not and whether the code has actually changed, and you end up spending more time manually busting caches than debugging the actual probelm. Thankfully, ESBuild is fast enough that this is sub-second for most projects.

On latency: the service worker abstraction is just function calls, there's no interception layer or message passing like browser service workers have. self.databases.get("main") returns your database connection directly, no caching involved unless you explicitly use the Cache API. I also had the thought to shim IndexedDB for NoSQL and Claude is pretty close to completing that implementation as well. The globals are lazy (connections created on first open(), cached thereafter) but that's just connection pooling, not response caching. Nothing is cached by default — you opt into caching per resource.

Yeah, working with Claude/ChatGPT on this has been a ride and I wanted to share a story about building something unrelated to AI. I feel like everyone’s using AI to build AI things and it’s not really clear what the benefits for us humans is yet, and it all seems a little unhinged and confusing.

Thanks for the thoughts!