Live data from Hacker News

4x Smaller, 50x Faster

blog.asciinema.org

71–80 of 205 posts

Re: 4x Smaller, 50x Faster

#71
post #57

Earlier quoted context omitted.

It's a lean-back experience, like the difference between a book and a video. It does have its perks.

I think it can work well as a demo, but I wouldn't call that documentation . If you need to find something out, having to wait or randomly click through a video is extremely frustrating.

Ew, people are using it for docs? It always seemed clearly to be for those quick-look demos on projects' home pages, and it's fantastic for that.

Re: 4x Smaller, 50x Faster

#72
post #51

While I applaude the engineering effort that went into the project, I really dislike documentation that uses asciinema for regular non-interactive CLI interfaces: instead of showing me the commands in an overview I have to sit through the whole thing.

It's fine for a quick demo of a CLI application, but documentation and usage instructions should follow.

Re: 4x Smaller, 50x Faster

#73
post #69
post #57

Earlier quoted context omitted.

It's a lean-back experience, like the difference between a book and a video. It does have its perks.

It has, if the thing you are showing fits the media. If you show the different flags of ls without explaination you would be better of just showing me the printout of ls -h If you are showing off some beautiful TLI, an interactive prompt or ascii animations, this is the perfect tool. As someone who works in film: film also doesn't lend itself to everything. Certain internal observations that work great in literature…

> If you are showing off some beautiful TLI, an interactive prompt or ascii animations, this is the perfect tool.

If you want to just show something off, a GIF (or real video) is the answer.

The defining feature of asciinema is that you can copy the text out of the animation. Which is actually not that useful most of the time, because you can't search for text in asciinema (AFAIK?) like you can in, well, documentation.

Re: 4x Smaller, 50x Faster

#74

> ClojureScript is not that easy to integrate with the JS ecosystem. I know, there’s been a lot of improvements done in this space over the years, and I’m sure someone will immediately point me to relevant docs, but it’s still the extra mile you need to go when compared to regular JS codebase This always kills me. Clojure(script) is one of the neatest languages I've ever used, but it is just such a pain to work with.…

I just wonder why not just write straight JS? Adding a layer on top just means you have more complexities and steps to worry about. And clearly, in this case it was a big compromise in terms of performance and bundle size.

Re: 4x Smaller, 50x Faster

#75

Historically asciinema was not easy to embed in React because you can't have multiple copies of React. So my team at the time wrote and open-sourced an embeddable alternative to it. Unfortunately that project seems to have disappeared by now. But now that asciinema is no longer in React maybe it will be possible to embed now. See https://github.com/asciinema/asciinema-player/issues/72#issu... .

Historically, you could embed an animated .gif into a web page going back before Y2K, and there are tools to make such a thing from recording terminal sessions. No Javascript, no third party websites.

If you want to go that way, prefer html5 videos, they are a lot more compact and have options to pause and navigate.

Re: 4x Smaller, 50x Faster

#76

Earlier quoted context omitted.

I think it can work well as a demo, but I wouldn't call that documentation . If you need to find something out, having to wait or randomly click through a video is extremely frustrating.

Ew, people are using it for docs? It always seemed clearly to be for those quick-look demos on projects' home pages, and it's fantastic for that.

What exactly is the advantage of asciinema over a video or a GIF if you're just showing something? If I don't need to copy text out of it, it has the same function as a video.

Re: 4x Smaller, 50x Faster

#77

Maybe it’s just me, but I don’t think showing a string on screen requires React or any other view library. I’d probably paint it on canvas and then overlay an invisible plaintext node to allow selection.

Yeah but how can you quickly re-render the plaintext node in sync with the canvas? How are you doing font rendering? How are you handling things like accessibility and interactive controls?

I feel like you may not be seeing the whole picture / problem domain.

Re: 4x Smaller, 50x Faster

#79
As an enthusiastic Clojure/Script user, the new tech stack absolutely makes sense for this application.

For the decrease in size, I expect most of the gain to come from dropping ClojureScript. For the speed increase, though, I expect most of the gain to come from WASM. JS and ClojureScript are within the same margin of error compared to the performance that can be achieved with WASM.

Re: 4x Smaller, 50x Faster

#80

As an enthusiastic Clojure/Script user, the new tech stack absolutely makes sense for this application. For the decrease in size, I expect most of the gain to come from dropping ClojureScript. For the speed increase, though, I expect most of the gain to come from WASM. JS and ClojureScript are within the same margin of error compared to the performance that can be achieved with WASM.

> Due to ClojureScript’s immutable data structures, there’s a lot of objects created and garbage collected all the time

^ From the article, sounds like a plausible cause for the speed difference.

Post reply on HN