Live data from Hacker News

A Decade of Slug

terathon.com

71–80 of 88 posts

Re: A Decade of Slug

#71

Earlier quoted context omitted.

Yes, now that SDF font rendering is the industry's preference, he drops the software patent. That is, he is dropping the patent because it isn't a commercially viable piece of software, not because he is ethically opposed to it. Great virtue signaling though.

Seems more like he had the patent long enough to build a sustainable business from his own work, and now he’s been able to earn enough from it that others’ implementations aren’t a risk to him. Which is kind of the entire point of patents, just that they last way too long relative to the speed of technological progress

He said "holding on to it any longer benefits nobody", implicitly including himself. He may believe that it's to his advantage for the patent to be more widely used.

Which makes sense--I don't doubt that he is a subject matter expert where this patent is concerned. If this algorithm continues to be widely used or its use increases, then that would be likely be good for him.

Re: A Decade of Slug

#72
post #48
post #46

Earlier quoted context omitted.

I think they meant writing complex equations on windows

Or doing work that regularly involves writing complex equations, which is what I was asking about - what field and what do they use?

LaTeX or its variants on your favorite OS, which is increasingly not Windows.

Most journals don’t want submissions in Word (there are notable exceptions, e.g. Nature), and conferences without massive editorial budgets want their submissions in a format that makes it easy for them to produce proceedings (again, not Word).

I don’t know to what extent Typst is taking off recently.

I personally wrote my thesis in LuaTeX with figures in TikZ. I have no great love for the TeX language [0] or TikZ, but there are three great properties of this stack that Word lacks:

1. It plays well with version control.

2. The output quality can be very high.

3. You can script the generation of figures, including text and equations that match the formatting of the containing document, in a real programming language, without absurd levels of complexity like scripting Word. So I had little Python programs that printed out TikZ.

No, I do not expect the average high school teacher to do this.

[0] In fact, I think both the language and the tooling are miserable to work with.

Re: A Decade of Slug

#73
post #65

There are two ways to get winding numbers and then decide on filled or empty by some rule like non-zero or even-odd: a) The winding number of a point is the number of intersections of a scanline and a closed path. b) The winding number around a point is the total angle subtended by the path at that point. Slug uses approach a) and that comes with a lot of edge cases (see chart in the post) and numerical precision iss…

Loop and blinn does not compute a winding number using the b) method. It avoids the issue of a winding number by assuming there's only 1 bezier curve per triangle, which requires a complicated triangulation step. It can produce some nasty geometry in more complex cases. With Slug, you can use only 1 quad per glyph if you want.

Also just to clarify regarding this statement:

> Slug uses approach a) and that comes with a lot of edge cases (see chart in the post) and numerical precision issues

Slug does not have numerical precision issues. It's the breakdown into different cases that _solves_ those issues, whereas your statement makes it sound like slug has _both_ the case complexity and the precision issues.

Re: A Decade of Slug

#74

Earlier quoted context omitted.

Software patents valid for 8 years is actually something I could get behind.

Copyrights universally dropped to ~20 years as well while we're at it.

My feeling is that copyrights should be infinitely renewable, with say a 20 year term, but the renewal fee should double with each term so that Disney can have their infinite copyright on Snow White but at an ever-increasing cost so that they will need to make a decision about whether it makes sense to keep it.

My utopian vision: First registration is free and automatic. Copyright holders get an automated notification of expiring copyright and renewal is, say $1000 for the first term (adjusting for inflation) and doubling thereafter (also adjusting for inflation, so you don’t get a $2000 renewal but more like $4400 with 4% inflation). For corporate-held and posthumous extensions, the term would be 10 years.

Re: A Decade of Slug

#75
post #74

Earlier quoted context omitted.

Copyrights universally dropped to ~20 years as well while we're at it.

My feeling is that copyrights should be infinitely renewable, with say a 20 year term, but the renewal fee should double with each term so that Disney can have their infinite copyright on Snow White but at an ever-increasing cost so that they will need to make a decision about whether it makes sense to keep it. My utopian vision: First registration is free and automatic. Copyright holders get an automated notificatio…

> so that Disney can have their infinite copyright on Snow White

If copyright was inifinite, then Disney would never have been able to make Snow White in the first place. They didn't invent the story!

Even if they did, it seems like a huge negative to society for copywright not to expire.

Re: A Decade of Slug

#76

Thanks Eric, much appreciated. How would you compare your approach to something like Vello ( https://github.com/linebender/vello )?

im not Eric but: having used vello (when it was in its early stages i "transplanted" it into my game engine), it is quite a beast. its got a multistage compute shader pipeline, and over time im kinda soured on the whole idea

vello will probably do great under very heavy loads but for your average UI or text document? i reckon something far simpler (like slug!) will end up being more efficient simply by avoiding all those shader launches

Re: A Decade of Slug

#77
post #65

There are two ways to get winding numbers and then decide on filled or empty by some rule like non-zero or even-odd: a) The winding number of a point is the number of intersections of a scanline and a closed path. b) The winding number around a point is the total angle subtended by the path at that point. Slug uses approach a) and that comes with a lot of edge cases (see chart in the post) and numerical precision iss…

Loop and blinn does not compute a winding number using the b) method. It avoids the issue of a winding number by assuming there's only 1 bezier curve per triangle, which requires a complicated triangulation step. It can produce some nasty geometry in more complex cases. With Slug, you can use only 1 quad per glyph if you want. Also just to clarify regarding this statement: > Slug uses approach a) and that comes with…

> It avoids the issue of a winding number by assuming there's only 1 bezier curve per triangle

The original paper did assume no overlap yes. But that is not how anybody would implement it. For a long time one would use the stencil buffer with different operations depending on the front-face / back-face (this is where the paths rotation around the sample comes in and what makes this an angle based approach).

> which requires a complicated triangulation step. It can produce some nasty geometry in more complex cases.

Again, not how anybody would implement this. You can just stream the quadratic bezier curves unprocessed into the vertex shader, literally the simplest thing conceivable.

> With Slug, you can use only 1 quad per glyph if you want.

Nowadays one would probably implement loop & blinn in a tiled compute shader too (instead of using stencil buffers) to reduce memory bandwidth and over draw. That way you also get one quad per glaph, but without any of the geometry special casing that Slug does.

> It's the breakdown into different cases that _solves_ those issues, whereas your statement makes it sound like slug has _both_ the case complexity and the precision issues.

Correct, might have worded that badly. Still remains a trade off in a) which b) does not have.

Re: A Decade of Slug

#78
post #53

I am not at all familiar with game development. This article reminds me of Casey Muratori mentioning a font issue in game development environment from a random podcast. On web, you can just fetch a google font whatever. No problem. On a local machine, you tend to look a well-established software like harfbuzz. But then harfbuzz could be rather a big dependency. A game is self-contained and you want your font looks co…

Harfbuzz does shaping, my understanding is slug does rendering. So they do different things

Re: A Decade of Slug

#79
post #74

Earlier quoted context omitted.

My feeling is that copyrights should be infinitely renewable, with say a 20 year term, but the renewal fee should double with each term so that Disney can have their infinite copyright on Snow White but at an ever-increasing cost so that they will need to make a decision about whether it makes sense to keep it. My utopian vision: First registration is free and automatic. Copyright holders get an automated notificatio…

> so that Disney can have their infinite copyright on Snow White If copyright was inifinite, then Disney would never have been able to make Snow White in the first place. They didn't invent the story! Even if they did, it seems like a huge negative to society for copywright not to expire.

The thing here is the exponentially increasing cost of renewing the copyright, with the inflation-adjustment I proposed and the 10-year term for a corporate or posthumous copyright, in 90 years, that $1000 renewal fee goes to $256000 in inflation-adjusted dollars. 110 years it’s a million dollars, 210 years it’s a billion dollars. If a work is worth spending that kind of money on renewing the copyright, why not let them keep it?

Re: A Decade of Slug

#80
post #72
post #48

Earlier quoted context omitted.

Or doing work that regularly involves writing complex equations, which is what I was asking about - what field and what do they use?

LaTeX or its variants on your favorite OS, which is increasingly not Windows. Most journals don’t want submissions in Word (there are notable exceptions, e.g. Nature), and conferences without massive editorial budgets want their submissions in a format that makes it easy for them to produce proceedings (again, not Word). I don’t know to what extent Typst is taking off recently. I personally wrote my thesis in LuaTeX…

Hard agree about TeX the language and tooling.

Overleaf has done a pretty good job of removing the tooling pain points, but honestly Typst can't take over soon enough.

> The output quality can be very high.

It can also be very low

Post reply on HN