Hacker Newsnew | past | comments | ask | show | jobs | submit | nbe's commentslogin

Someone interested by this subject could also enjoy watching the french film "Dimensions... une promenade mathématique" on spatial geometry:

https://www.youtube.com/watch?v=6cpTEPT5i0A&list=PL3C690048E... (note: this is the first video of a playlist)

https://www.dimensions-math.org/Dim_E.htm

https://en.wikipedia.org/wiki/Dimensions_(animation)


Thank you for sharing. I'll check it out.


mind blowing thank you for sharing these


lit [1] provides declarative templates for web components for example.

[1] https://lit.dev/


[1] suggests it uses a Constraint Satisfaction Problem solver and according to the network tab of my browser the solver seems to run on the server (the data is exchanged over a WebSocket connection). I'm wondering what kind of algorithm the solver uses too, and if it relies on any heuristics or specific data structures for this problem. For example [2] shows best results using bitarrays and a mix of "forward checking", "conflict directed backjumping" and "dynamic variable ordering". (which are fancy terms to describe the methods one usually comes up with to solve a Sudoku grid)

[1] https://dawnofthe.dad/

[2] https://web.stanford.edu/~jduchi/projects/crossword_writeup....


This is pretty much spot on.

In a bit more detail, the CSP solver does indeed apply forward checking, and a fancier version of that, arc consistency, is available too, but ends up being slower on the whole. There's dynamic variable ordering (i.e., "Which word to try next") and conflict directed backjumping (i.e., "Solver's stuck, how far to go back?"). There's some relatively memory hungry structures for checking word constraints, e.g., when two words overlap and one is assigned we want to remove impossible values for the other word, and a specialized "sparse all different" constraint that disallows using a given word more than once.

And also yes, all this happens on the backend and websockets are used to send the latest state to the client.


GitHub sanitizes SVG animations by removing e.g. embedded JS code but SVG animated with CSS is supported in Markdown files. See for example [1] which contains [2].

[1] https://github.com/nbedos/termtosvg/blob/develop/README.md

[2] https://github.com/nbedos/termtosvg/blob/develop/docs/exampl...


This is an excellent example.


As much I as agree with this, in order for your software to be included in a distribution it needs some initial traction. So you probably want to make it easy for early users to adopt it and to do that you probably want to release build artifacts instead of having each and every one of your users install e.g pandoc or sphinx to build the manual page for your application.

But once a few distributions have started shipping your software sure, it's the best.


I wrote termtosvg as an alternative [1]. It's a python program that records a shell session as a standalone SVG animation. Animations produced by termtosvg can be embedded in Markdown files or HTML pages.

[1] https://github.com/nbedos/termtosvg


That's great! I love the approach: a standalone ouput in a standard format.

Do you think you could also add support for ttyrec input?

This would allow converting existing ttyrecs and have a a full suite of tools creating all the options ready to upload between 1) standard text format record, 2) regular animated gif, 3) svg when saving space is important (while gaining zoom abilities as well!)


It's a good idea. I don't have much time for termtosvg these days so I can't promise it'll get implemented but I've opened an issue to remember it [1].

[1] https://github.com/nbedos/termtosvg/issues/108


One thing from the 'demo' here: https://nbedos.github.io/termtosvg/ on your web player it seems you cannot select multiple lines


Yes. A line of the animation is a group of text elements. Somehow text selection does not work across several SVG groups. I could remove this logic but it would mean duplicating the definition of a line on every frame showing it instead of using a single definition.


That looks very cool, I will give it a go! I particularly like this feature

> Rendering of recordings in asciicast format made with asciinema

I quite like there being an intermediate file like there is in asciinema that you can edit by hand to remove your typos or speed boring bits up.


I like this approach! Smaller filesize and better rendering than a gif, but just as embeddable in a GitHub markdown readme since it's pure CSS animation. Kudos, looking forward to using this.


Awesome alternative! I like how it is all in one format.

Fits right into a document I am developing.


Happy birthday Sourcehut!

I'm curious about the builds API. I'm currently writing a terminal client that, given a git repository, will list recent builds across multiple CI providers, give access to build logs, etc. I'm interested in integrating with Sourcehut.

Most CI providers have a REST API that allows listing the builds related to a repository. The API reference for builds.sr.ht [1] does not list such a functionality, however the website offers it (e.g. [2]). Did I miss something, or is this not possible via the API? Are there plans to add this feature?

[1] https://man.sr.ht/builds.sr.ht/api.md

[2] https://builds.sr.ht/~sircmpwn/builds.sr.ht


Looks like there's no "list jobs" endpoint, seems to have been an oversight. Can you file a ticket?

https://todo.sr.ht/~sircmpwn/builds.sr.ht



And what's your passive income?


People buy a subscription to get/give reminders to call their parents. Every first Saturday of the month I schedule 8-12 texts per US time zone.


As per the title, what's your passive income?


Author of termtosvg here. I've posted this project a month ago [1] and got a lot of feedback from all of you. I've since fixed a few issues and implemented SVG templates. Templates are skeleton files where termtosvg embeds the animations. This makes it possible to:

- add a terminal UI to the animation

- add animation controls (play, pause, seek...) with JavaScript

- customize the terminal color theme

- probably much more

A few default templates are provided with termtosvg and users can create their own templates too.

This should make termtosvg more versatile and also adress the most requested feature which is a way to control the animation.

I doubt termtosvg will evolve much more, except for minor improvements, so I'd like to know what you all think of this. Thanks!

[1] https://news.ycombinator.com/item?id=17449810


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: