rexxars's comments

rexxars | 1 year ago | on: Smuggling arbitrary data through an emoji

For a real-world use case: Sanity used this trick[0] to encode Content Source Maps[1] into the actual text served on a webpage when it is in "preview mode". This allows an editor to easily trace some piece of content back to a potentially deep content structure just by clicking on the text/content in question.

It has it's drawbacks/limitations - eg you want to prevent adding it for things that needs to be parsed/used verbatim, like date/timestamps, urls, "ids" etc - but it's still a pretty fun trick.

[0] https://www.sanity.io/docs/stega

[1] https://github.com/sanity-io/content-source-maps

rexxars | 2 years ago | on: WebSockets vs. Server-Sent-Events vs. Long-Polling vs. WebRTC vs. WebTransport

The EventSource API (the browser "client API" for Server-Sent Events) leaves a lot to be desired. While I am a maintainer of the most used EventSource polyfill[1], I've recently started a new project that aims to be a modern take on what an EventSource client could be: https://github.com/rexxars/eventsource-client.

Beyond handling the custom headers aspect, it also supports any request method (POST, PATCH..), allows you to include a request body, allows subscribing to any named event (the EventSource `onmessage` vs `on('named event')` is very confusing), as well as setting an initial last event ID (which can be helpful when restoring state after a reload or similar). And you can use it as an async iterator.

I love the simplicity of Server-Sent Events, but the `EventSource` API seem to me like a rushed implementation that just kinda stuck around.

[1]: https://github.com/eventsource/eventsource

rexxars | 2 years ago | on: Opal Tadpole – A webcam for laptops

I own the C1, and while I’m no big fan of the software - the quality is significantly better and makes it worth it in my opinion. I have occasional connection issues when I plug it in, but it usually settles after a few seconds.

Most importantly, the new camera does not need any software - it’s just a high quality webcam.

rexxars | 2 years ago | on: Show HN: PC Builder AI

Seems to be hugged to death - every request I run ends in a 500/504 - and there is no error handling to display an error when it happens.

What is the backing AI/data source? I tried using ChatGPT for this, but given it's cutoff is September 2021 it doesn't really give you the most relevant hardware.

rexxars | 3 years ago | on: Take more screenshots

While your memory might be great now, it won't be so forever. Serendipity might not happen as often as you would like, and "important things" may not be all you want to remember.

I'm sure your parents or someone from their generation have actual, physical photo albums from their past - and that the experience of browsing through these photos brings back things that they haven't necessarily _forgotten_ about, but that they wouldn't have brought into active memory unless they were browsing through them.

Over the years I have experienced and built many things that I do not deem "important" to me, yet when I see them mentioned (even in writings by myself), it takes me back to that point in time - all the feelings, learning and discoveries that it brought to life.

An example is scrolling through a list of my repositories on GitHub. Some of the projects on there I have "forgotten" about, but with the mention of it I am instantly brought back and remember a whole lot more details - motivations, feelings, the ecosystem...

rexxars | 11 years ago | on: React Components

It doesn't need it, but I don't see how it is possibly a bad thing? Do you want a textarea that adjusts size based on the content? Sure, you could write that yourself, or you could just `npm install react-textarea-autosize`.

Want to render a sparkline of some data? Sure, you could mess around with existing libs and see if you can get them to work nice with React, or you could just pull in something you can expect actually works, like react-sparkline.

rexxars | 11 years ago | on: React Components

Most popular should be easy to make (based on downloads/github stars) - most useful is a bit trickier. How would that work?

rexxars | 11 years ago | on: React Components

Good suggestion - will see if we can integrate something similar for desktop clients soon

rexxars | 11 years ago | on: React Components

Not possible at the moment, but will be the next feature out the door (I'm the lead developer)
page 1