HNHacker News
TopNewBestAskShowJobs

webpro

128 karma · joined May 25, 2013

submissionscomments
webpro··on Inspect ANSI control codes and escape sequences
Some of the issues mentioned in this thread have been improved, including private CSI sequences, default param values, and cancellation + substitution.
webpro··on Inspect ANSI control codes and escape sequences
The lexer and parser handled it perfectly first try. The HTML renderer had a few issues though, but it's being rendered reasonably well now. The torture test has been added to the package tests and to the website as an example.
webpro··on Inspect ANSI control codes and escape sequences
There is some recovery in the lexer, but would love to learn what would make it crash! The url you provide gives a 404.
webpro··on Inspect ANSI control codes and escape sequences
Raw input should be cool now (there's "raw" in the examples as well)
webpro··on Inspect ANSI control codes and escape sequences
What would prevent you from starting? Could be fun :)
webpro··on Inspect ANSI control codes and escape sequences
Emojis and other unicode characters may or may not be rendered as a single-width character. I've been splitting hairs and strings.

The tool currently counts any unicode character as a single-width one.

webpro··on Inspect ANSI control codes and escape sequences
Thanks, this is great feedback. I'll see what I can do, stay tuned.
webpro··on Inspect ANSI control codes and escape sequences
There is https://github.com/webpro/ANSI.tools/blob/main/packages/pars... and others
webpro··on Inspect ANSI control codes and escape sequences
Thanks. Agreed. The way I see it, ignore the noise and there might be something in there.
webpro··on Inspect ANSI control codes and escape sequences
That's some interesting feedback, thanks for sharing. I'll see what I can extract and apply from it. Please bear with me, this is only my initial take on the whole concept (and as you point out, it isn't that trivial). Didn't have much examples to be inspired by, but we're on our way anyway.
webpro··on Inspect ANSI control codes and escape sequences
Thanks! It's all open source (including the tokenizer/parser), so feel free come collaborate on GitHub.
webpro··on Inspect ANSI control codes and escape sequences
The parser has, but not the HTML renderer indeed. Using a third-party lib for that currently, but noticed the limitations too. Might replace it with my own!
webpro··on Inspect ANSI control codes and escape sequences
Thanks for sharing, haven't seen that one yet. Will see if I can borrow ideas from it.
webpro··on Inspect ANSI control codes and escape sequences
At least I tried to make it look like a 1993 website
webpro··on Inspect ANSI control codes and escape sequences
Got to start somewhere! Didn't see many examples to get inspired by either. Here's the full table: https://ansi.tools/lookup. This is my initial take on it. Please bring in the corneriest cases! It's open source so bug reports, RFCs and pull requests are most welcome.
webpro··on Inspect ANSI control codes and escape sequences
Working with and debugging ANSI control codes and escape sequences can be a challenge.

This free web-based tool helps to inspect the input, visualize colors and styling, and list control codes. By using a proper tokenizer and parser (not just regex hacks), it supports all sorts of control codes. The parser is open source and available too (find links in "about").

Type or paste text in the black text area, or try out the examples. Use the lookup table to filter & find specific codes.

Feedback welcome, I’d love to know what’s confusing, missing, or especially useful.

webpro··on The State of Benchmarking in Node.js
Benchmarking becomes more important as we build more and more applications and tooling for runtimes like Node.js and Bun. This article discusses macro and micro benchmarking, and explores options we can use today to benchmark code. The article includes code examples and a CodeSandbox to try and implement in your own work.
webpro··on Find unused files and exports in your TypeScript project
Exportman is another fresh take on keeping your TypeScript projects clean & tidy.
webpro··on Building Responsive Web Applications
Not sure whether the tipping point as mentioned should even be used as an argument. That would be the same as assuming specific pixel ranges, not having touch input, or fast internet connection for "large" devices (as I point out in the article).

I think what matters is that it is possible to be responsive/adaptive based on such contextual factors. Responsive web design is basically enabling that for screen size, but there are many more factors in play.

A tipping point based on the feature-richness/robustness of a programmatic solution to go responsive is another story (i.e. it shouldn't prevent from going in that direction).

webpro··on Building Responsive Web Applications
I think the Adioso case is closer to an enhanced, responsive website, where my article focuses more on web applications. Just for fun, also see https://github.com/webpro/Websites-vs-Web-Applications for the difference ;-)
webpro··on Building Responsive Web Applications
This post was published 2 days ago at Smashing Magazine. I'm the author and I'm wondering what you think about the approach presented, and how you have built, or would build responsive web applications.