Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mort96
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
691.
▲
by
mort96
8mo ago
Why can't you people who want a ChatGPT sidebar just add that as a plugin?
692.
▲
by
mort96
8mo ago
I don't know what Mozilla means by "AI browser", but one would assume it means more than "regular browser with an optional chat bot sidebar". I don't wanna figure out what it means, I don't wanna use anyth
693.
▲
by
mort96
8mo ago
Letting Mozilla torpedo the only non-Google browser is also a bad way to fight Google. It's looking bleak. The only hope is that Mozilla dies and someone more serious picks up the mantle. Not sure who that would be though.
694.
▲
by
mort96
8mo ago
Option 3: don't
695.
▲
by
mort96
8mo ago
Why is there a chat bot sidebar??? And even if there aren't that many bad AI features now, they've signalled their intent for Firefox to become an "AI browser". I don't know what they mean by that, but I know I do
696.
▲
by
mort96
8mo ago
I wonder what sort of user testing made them decide that what Firefox users really need is a chat bot in the site bar. Isn't a chat bot in a tab good enough? And calling translation "AI" seems like deceitful retroactive rebra
697.
▲
by
mort96
8mo ago
Who has expressed a desire for Firefox to become "an AI browser"? Because that's the source of the complaints. I don't want to use an "AI browser", kill switch or not. If this "AI browser" dies becaus
698.
▲
by
mort96
8mo ago
> Deno FFI works with native libraries that use the C API. Surely this is meant to be ABI?
699.
▲
by
mort96
8mo ago
We aren't going to stop algorithmic social media through sheer force of public will without government involvement. Social communities aren't nimble. There a ton of inertia in a social media platform. People have their whole netwo
700.
▲
by
mort96
8mo ago
The force of social media these past 20 years has been massive. We're talking radical change to the structure of information flow in society. That's not just a small breeze.
701.
▲
by
mort96
8mo ago
Why change section 230? You can just make personalized algorithmic feeds optimized for engagement illegal instead, couldn't you? What advantage does it have to mess with 230, wouldn't the result be the same in practice?
702.
▲
by
mort96
8mo ago
I think your issue is that you're an architecture astronaut. This is not a compliment. It's okay for things to just do the thing they're meant to do and not be super duper generic and extensible.
703.
▲
by
mort96
8mo ago
I think they imagine a solution like this: // Spawn workers for _ := range 10 { go func() { for path := range workQueue { fp, err := os.Open(path) if err != nil { ... }
704.
▲
by
mort96
8mo ago
Some hypothetical example numbers: if software-rendering text takes 0.1 milliseconds, and I have a handful of text strings to render, I may not care that rendering the strings takes a millisecond or two. But that 0.1 millisecond to render a
705.
▲
by
mort96
8mo ago
I think the most obvious improvement would be: just make it a free function which returns a surface, text rendering is slow and allocation is fast
706.
▲
by
mort96
8mo ago
Wait, so your wrapper around SDL_Renderer now also inexplicably contains a scratch buffer? I guess that explains why you put RenderTextToSurface on your SDL_Renderer wrapper, but ... that's some really weird API design. Why does the
707.
▲
by
mort96
8mo ago
Yea no. I'm not gonna do that.
708.
▲
by
mort96
8mo ago
Your comment was in reply to nasretdinov, but its fundamental logic ignores what I've been telling you this whole time. You're pretending that the only solution to iterating through files is a work queue and that any solution that
709.
▲
by
mort96
8mo ago
> No. We were talking about using malloc/free vs. a resizable buffer. No. This is a conversation about Go. My example[1], that you responded to, was an example taken from a real-world project I've worked on which uses Go wrappe
710.
▲
by
mort96
8mo ago
Completely depends on context. If you're rendering dynamically changing text, you should do as you say. If you have some completely static text, there's really nothing wrong with doing the text rendering once using PangoCairo and
711.
▲
by
mort96
8mo ago
>> The example allocates an SDL_Surface large enough to fit the text string each iteration. > Impossible without knowing how much to allocate But we do know how much to allocate? The implementation of this example's RenderTe
712.
▲
by
mort96
8mo ago
You have now transformed the easy problem of "iterate through some files" into the much more complex problem of either finding a work queue library or writing your own work queue library; and you're baking in the assumption t
713.
▲
by
mort96
8mo ago
The example allocates an SDL_Surface large enough to fit the text string each iteration. Granted, you could do a pre-pass to find the largest string and allocate enough memory for that once, then use that buffer throughout the loop. But aga
714.
▲
by
mort96
8mo ago
The surfaces are all of different size, so the code would have to be more complex, resizing some underlying buffer on demand. You'd have to split up the text rendering into an API to measure the text and an API to render the text, so t
715.
▲
by
mort96
8mo ago
Opening a file is fairly fast (at least if you're on Linux; Windows not so much). Synchronous code is simpler than concurrent code. If processing files sequentially is fast enough, for what reason would you want to open them concurrent
716.
▲
by
mort96
8mo ago
It doesn't just have to be files, FWIW. I once worked in a Go project which used SDL through CGO for drawing. "Widgets" were basically functions which would allocate an SDL surface, draw to it using Cairo, and return it to Go
717.
▲
by
mort96
8mo ago
What do you mean with '"ugly" scope_exit'? Do you mean why I care that I have to call the free function at every exit point of the scope? That's easy: because it's error prone. Defer is much less error prone.
718.
▲
by
mort96
8mo ago
> In a tight loop you'd want your cleanup to happen after the fact. Why? Doing 10 000 iterations where each iteration allocates and operates a resource, then later going through and freeing those 10 000 resources, is not better than
719.
▲
by
mort96
8mo ago
I write way more C++ than I write C. I was not comparing C and C++ in terms of which language is better or has more significant features. I was evaluating your suggestion to write C in C++ and get defer that way.
720.
▲
by
mort96
8mo ago
Why?? tldr is an infinitely better name than tlrc. It seems like tlrc is from the same project, couldn't they just have released a version 2.0 of tldr that's rewritten in rust?
More ›