News for hackers. Stuff that matters.

nbe

Re: on Wednesday December 13, 2023 @04:32AM (#38624799)
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)

Re:Web Components Eliminate JavaScript Framework Lock-In on Monday November 27, 2023 @03:47PM (#38438039)
lit [1] provides declarative templates for web components for example.

[1] https://lit.dev/

Re:Crossword Builder on Friday June 30, 2023 @05:09AM (#36532254)
[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....

Re:Show HN: OneDev – A Lightweight GitLab Alternative on Saturday January 18, 2020 @12:29PM (#22085658)
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...

Re:Asciinema – Record and share terminal sessions on Thursday December 12, 2019 @07:17AM (#21771193)
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.
Re:Developers shouldn’t distribute their own software on Thursday December 12, 2019 @06:17AM (#21770938)
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.

Re:Asciinema – Record and share terminal sessions on Tuesday December 10, 2019 @07:58AM (#21751986)
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

Re:Asciinema – Record and share terminal sessions on Tuesday December 10, 2019 @06:48AM (#21751606)
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

Re:Sourcehut's Year in Alpha on Friday November 15, 2019 @12:40PM (#21546874)
Re:Sourcehut's Year in Alpha on Friday November 15, 2019 @12:02PM (#21546487)
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

Re:Ask HN: What is your passive income 2019? on Tuesday October 29, 2019 @02:37PM (#21390589)
And what's your passive income?
Re:Ask HN: What is your passive income 2019? on Tuesday October 29, 2019 @02:35PM (#21390564)
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

Thanks! I will look into the virtualenv problem, but if you can spare the time could you please open an issue and include the exact steps to reproduce the error?

https://github.com/nbedos/termtosvg/issues/new

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.

I'd rather stick to plain SVG for the animation part, in case ECMAScript is stripped from the SVG for security reasons. ECMAScript might be worth adding for additional features though (play/pause, progress bar, frame seeking...)
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...

Re:Pledge and Unveil in OpenBSD [pdf] on Sunday June 10, 2018 @10:27AM (#17278254)
From what I understand it was not maintained anymore, and it was also hard to keep up to date lists of allowed or forbidden system calls for the binaries that had to be run under systrace. [1] [2]

Linux provide seccomp-bpf for system call restrictions. [3]

[1] https://marc.info/?l=openbsd-misc&m=146170224108205&w=2

[2] http://www.openbsd.org/papers/hackfest2015-pledge/mgp00009.h...

[3] https://lwn.net/Articles/656307/

Re:Pledge and Unveil in OpenBSD [pdf] on Sunday June 10, 2018 @08:58AM (#17277896)
I think you're refering to systrace. It was removed in OpenBSD 6.0.

http://www.citi.umich.edu/u/provos/systrace/

Re:OpenBSD's kernel gets W^X treatment on Wednesday January 14, 2015 @10:48AM (#8886947)
Very interesting link, thanks.
Re:OpenBSD's kernel gets W^X treatment on Wednesday January 14, 2015 @05:20AM (#8885396)
Does anyone know what 'MI' and 'MD layer' refer to in Theo's message ? Machine Indepedent and Machine Dependent maybe ?