HN user

nbe

360 karma
Posts6
Comments21
View on HN
Crossword Builder 3 years ago

[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....

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.

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.

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

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

Yes, there is no dependency on a specific player.

The output is an SVG animation so you can modify it as you want. For example you could add a last frame with the logo of your project.

Not being able to pause the animation is annoying, I will probably add some way to it with ECMAScript in the future.

OP here. Sadly, SVG file size is not as small as I'd want it to be. The main problem is that a few attributes (x, y and lengthAdjust) have to be repeated on each text tag to position each character at the right place. I can't use CSS for this since those attributes are not styling attributes.

Using SVG definitions efficiently to avoid duplication is also not as easy as I thought it would be.

I have a few ideas on how to reduce file size, this is the next improvement I'm planning to work on.

For the examples shown at [1], file size ranges from 56kB to 252kB, the worst case scenario being lots of single characters with different colors.

[1] https://github.com/nbedos/termtosvg/blob/master/examples/exa...