HackerTrans
TopNewTrendsCommentsPastAskShowJobs

afishhh

no profile record

Submissions

Uploading SRV3 subtitles on YouTube got broken/disabled

old.reddit.com
3 points·by afishhh·6개월 전·0 comments

comments

afishhh
·4개월 전·discuss
> [..] only a mistake a human would make. Had I run my hand-written comment through a proofreading clanker [..]

That's true, and I should've been less rude in my previous comment. Sorry.

(Though note `nix eval` would've sufficed, no need for the probabilistic kind of clanker)

> Yet in the AI world, you demand more from humans.

But this isn't true. In my opinion `learning >> depending on an LLM` and my gripe is that it seems like the former is being displaced by the latter. In the pre-AI world I would've known that the person making the mistake wasn't making it because they outsourced their skill.

So I'm not, in fact, demanding anything more than in the pre-AI world.
afishhh
·4개월 전·discuss
> [ 8080, 9000 ]

Fails to parse is what it does...

Are we really living in times where people can't write a single (syntactically) well-formed line of code in a programming language they use?

I understand this doesn't really matter when just using NixOS Slop Edition™ but man I hate it.
afishhh
·5개월 전·discuss
If you are referring to class members in the JavaScript then those are private fields[1]

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
afishhh
·5개월 전·discuss
Brother.

Your browser does not have the concept of breaking a line once it gets too long[1].

Your browser does not even shape text during layout and it renders text using a DrawString[2] function from a library that only applies kerning. No complex shaping to be seen in a light-year radius.

There is no trace of bidi-reordering either. I can't link to anything here since there's nothing to link to.

I will leave this[3] here too but I'm not going to draw conclusions without a deeper understanding of wtf the agent did here and how Acid3 works.

From now on if you still don't understand how this does not deserve the title of a browser I will assume you are trolling.

> I’m not going around telling people to download or use these things.

My problem is that you're telling people you built a browser. Some people have standards for what can be considered even a "toy" browser (this is not it).

[1] https://github.com/chrisuehlinger/viberowser-go/blob/93f2638...

[2] https://cs.opensource.google/go/x/image/+/refs/tags/v0.35.0:...

[3] https://github.com/chrisuehlinger/viberowser-go/blob/93f2638...
afishhh
·5개월 전·discuss
https://github.com/chrisuehlinger/viberowser-go/blob/93f2638...

Please stop using Acid3 as some holy grail that lets you say you built a browser.

I have no idea how/if this passes Acid3 but this is not inline layout.
afishhh
·5개월 전·discuss
> The Go version

Where can I find the Go version?
afishhh
·5개월 전·discuss
I'm going to fucking crash out if another person says they're making a browser and their inline layout does this shit[1] I swear to god.

I held off on commenting on the last AI browser post because the author said "it's not even good" so they recognized it's trash (it was).

Please educate yourself on how inline layout is supposed to work[2] first. (no, you cannot lay out text span-by-span[3] either...)

[1] https://github.com/chrisuehlinger/viberowser/blob/df6f4a265a...

[2] https://drafts.csswg.org/css-inline-3/

[3] https://drafts.csswg.org/css-text-3/#boundary-shaping
afishhh
·6개월 전·discuss
It seemingly did but after I saw it define a VerticalAlign twice in different files[1][2][3] I concluded that it's probably not coherent enough to waste time on checking the correctness.

Would be interesting if someone who has managed to run it tries it on some actually complicated text layout edge cases (like RTL breaking that splits a ligature necessitating re-shaping, also add some right-padding in there to spice things up).

[1] https://github.com/wilsonzlin/fastrender/blob/main/src/layou...

[2] https://github.com/wilsonzlin/fastrender/blob/main/src/layou...

[3] Neither being the right place for defining a struct that should go into computed style imo.
afishhh
·6개월 전·discuss
> The other is this one: https://www.reddit.com/r/Anthropic/comments/1q4xfm0/over_chr...

I took a 5-minute look at the layout crate here and... it doesn't look great:

1. Line height calculation is suspicious, the structure of the implementation also suggests inline spans aren't handled remotely correctly

2. Uhm... where is the bidi? Directionality has far reaching implications on an inline layout engine's design. This is not it.

3. It doesn't even consider itself a real engine:

        // Estimate text width (rough approximation: 0.6 * font_size * char_count)
        // In a real implementation, this would use font metrics
        let char_count = text.chars().count() as f32;
        let avg_char_width = font_size * 0.5; // Approximate average character width
        let text_width = char_count * avg_char_width;
I won't even begin talking about how this particular aspect that it "approximates" also has far reaching implications on your design...

I could probably go on in perpetuity about the things wrong with this, even test it myself or something. But that's a waste of time I'm not undertaking.

Making a "browser" that renders a few particular web pages "correctly" is an order of magnitude easier than a browser that also actually cares about standards.

If this is how "A Browser for the modern age." looks then I want a time machine.
afishhh
·6개월 전·discuss
> Hundreds of other widely-used open source libraries don't.

Correct me if I'm wrong but I don't think versioned symbols are a thing on Windows (i.e. they are non-portable). This is not a problem for glibc but it is very much a problem for a lot of open source libraries (which instead tend to just provide a stable C ABI if they care).
afishhh
·6개월 전·discuss
I'm having a lot of trouble understanding what you're trying to convey. You say there's a difference from previous "speculation" but also that it's still speculation. Then you go on to write "ALREADY going to" which is future tense (speculation), even clarifying what the speculation is.

Is this sarcasm, ragebait, or a serious argument?
afishhh
·8개월 전·discuss
It's not about collisions of the hash function itself.

Every hashtable implementation will put the hash value through some sort of modulo because you generally don't want to waste memory storing the key 5726591 at index 5726591 in an array.

So if you know how the implementation works and the hash function is predictable you can keep providing the program with values that will consistently go into the same bucket resulting in linear lookups and insertions.
afishhh
·9개월 전·discuss
Exactly why I referred to drawing glyphs instead of characters :)

There's even more depth one can go into here: subpixel positioning. To correctly draw glyphs that may be on subpixel positions, you need to rasterize and cache glyphs separately for each subpixel position (with some limited amount of precision, to balance cache usefulness and accuracy).

However I have a feeling that describing an entire Unicode-aware text stack here may not be useful, especially if TFA seems to only care about simple-script monospace LTR.
afishhh
·9개월 전·discuss
> Drawing text isn't simple

I agree, but even this article seems to oversimplify.

> You can't really optimize texture copies much more.

Did the author try packing the textures in an atlas?

Texture atlases can improve performance significantly since then you can use instanced draw calls to draw a whole bunch of glyphs at once.
afishhh
·9개월 전·discuss
There's a technique known as "NaN boxing" which exploits the fact double precision floats allow you to store almost 52 bits of extra data in what would otherwise be NaNs.

If you assume the top 16 bits of a pointer are unused[1], you can fit a pointer in there. This lets you store a pointer or a full double by-value (and still have tag bits left for other types!).

Last I checked LuaJIT and WebKit both still used this to represent their values.

[1] On amd64 they actually need to be sort of "sign extended" so require some fixup once extracted.
afishhh
·9개월 전·discuss
Using non-printable characters to encode malicious code is creative, but I wouldn't say it "breaks our security model".

I would be pretty suspicious if I saw a large string of non-printable text wrapped in a decode() function during code review... Hard to find a legitimate use for encoding things like this.

Also another commenter[1] said there's an eval of the decoded string further down the file, and that's definitely not invisible.

Has no one thought to review the AI slop before publishing?

[1] https://news.ycombinator.com/item?id=45649224
afishhh
·9개월 전·discuss
> Rust exceling at GUIs is a bit of a strech.

I strongly agree with this. In particular the Rust GUI libraries I've looked at have text layout / rendering that is nowhere near what should be considered adequate today (imo).

For example egui:

- It doesn't do any bidi reordering.

- It also doesn't do any font fallback so even if you didn't need bidi you can't render many languages without first acquiring an appropriate font somehow.

- Complex shaping is nowhere to be seen either.

- egui's italics look really terrible and I'm not sure why since I can't believe even synthesized ones have to look that bad.

CSS has been doing this for years and it's been doing it very well. So I am kind of disappointed that we don't have equally powerful tools in the general Rust ecosystem. Even just considering text layout / rendering libraries, only `cosmic-text` has an API that is somewhat in the right direction[1], but even it fails simply because I don't see a way to insert a button (block element) in-between the text[2].

Note that I'm not just hating on egui here, egui is amazing. Afaict it is the most complete GUI library for Rust and it's great to be able to make GUIs this easily. However I can't just not point out that it is, in fact, not perfect and doesn't truly "excel" at GUIs.

Also I have no idea how inline layout looks in other established GUI libraries like GTK and Qt so maybe I'm complaining about something that is not available most places outside a browser. If anyone knows, it would be interesting to learn how well they compare here.

[1] CSS inline layout is so complex that even this is a decent achievement, since it is not reasonable to expect most CSS features out of new Rust libraries with a significant time disadvantage.

[2] This is non-trivial because bidi reordering should happen on the whole paragraph not only on both sides of the button, so the inline layout API must handle non-text blocks in text.
afishhh
·9개월 전·discuss
> I will mention that youtube has pretty good subtitle capabilities, even if they're rarely used.

Yep, their srv3 format is very usable, although it is in many ways inferior to ASS (animations have to be done manually in discrete timesteps, although YTSubConverter does that for you I think, and no crazy stuff like shape drawing or 3d transforms). Does support ruby text though which ASS currently doesn't.

I think the worst thing about it is actually that YouTube is not doing very well in getting people to use it. For example they don't support most of the format's functionality in any client that isn't the web one[1]. Additionally I don't think there's even an official way to create these complex subtitles, you have to use unofficial tools like YTSubConverter.

If anyone is interested, I am working on a library for rendering srv3 (and some WebVTT) here[2]. Maybe if we had widespread support people would use it more? That seems like very wishful thinking though :)

[1] I suspect this is because they have to work within the constraints of whatever UI frameworks they're using for apps. It does not seem possible to implement compliant web text layout (pretty complicated!) on top of such higher level systems.

[2] https://github.com/afishhh/subrandr