HNHacker News
TopNewBestAskShowJobs

destructionator

451 karma · joined October 22, 2015

submissionscomments
destructionator··on Safer Linux Kernel Modules Using the D Programming Language
That approach is a dead end, incapable of doing anything beyond the basics (notably it doesn't compose into structs) and is likely to be abandoned.
destructionator··on Show HN: Lightweight 2D/3D engine in D with Raylib
Why C / C++? Why not D?
destructionator··on Introduction to Dlang [video]
Is this one of the dub hello worlds? Looks like it.... but it also says line 8 and the built in thing doesn't have a line 8. So what is the code there? If it is `assert(0)`, you're seeing the result of the test. The info is a bit spammy since it prints all the mostly-useless stack trace but there's some situations beyond hello world where the extra info helps explain why the test failed.
destructionator··on Introduction to Dlang [video]
> the community forum is toxic frequently

what exactly does this mean?

destructionator··on An X11 apologist tries Wayland
You know xcb and xlib are just different client libraries for accessing the exact same wire protocol, right?

Moreover, notice the example they gave there is atom interning, which is a roundtrip on the wire (though you can batch them even in xlib...), and they say "most real applications will see less benefit than this" since that's the worst case - most applications do atom work at startup, not in the main use cycle, which is famously both async and buffered (it used to be a FAQ on xlib tutorials reminding people to run the event loop, and error handling is complicated a bit by it).

destructionator··on An X11 apologist tries Wayland
> The X11 protocol is very chatty so even very simple things will cause several roundtrips which makes X over the network so painful.

This simply isn't true. Some operations require roundtrips, drag and drop comes to mind, but very simple things absolutely don't. Events come one way, draw commands go the other.

destructionator··on An X11 apologist tries Wayland
> since those protocols do damage detection, only sending updates of what's changed

So does X.

> and (lossy) compression.

This is legitimate though, the X protocol has no support for any kind of bitmap compression and it can sometimes be pretty painful. Though internets getting faster and faster too so it isn't necessarily a big deal especially since it does have bitmap caching and some display-side rendering capabilities, but it sure would be nice if you could send other formats on the wire.

destructionator··on An X11 apologist tries Wayland
> After enough time some best practices do solidify into standards, but it wasn’t overnight in X either, and first and foremost it wasn’t made with that in mind.

Part of what drives me nuts about Wayland is they could have learned these lessons from X's history and actually had it in mind. Instead, they threw it all out without learning a thing.

destructionator··on TIL: You can access a user’s camera with just HTML
Actually a pity it doesn't work on the non-mobile; many of my computers have webcams now and it is kinda convenient to have this (and of course, you ought to always be able to bypass the camera as a user. really perhaps it should be part of the file picker itself but lol those things are so overloaded already)
destructionator··on Let's learn D game programming development (2021) [video]
Fully operational. On arm/linux it is trivially easy to use, tends to just work out of the box (ldc offers packaged downloads on their website, gdc is in the Raspbian repository, etc). If you are doing bare metal and/or strictly limited hardware resources it is a little more work to be productive with minimal runtime but still not hard if you're familiar with how to do it.
destructionator··on Let's learn D game programming development (2021) [video]
The compile time execution itself is just one piece of the puzzle, the other two being compile time reflection (which I think is actually the key piece) and the built in code generation.

Running functions alone is not that interesting, and neither really is generating code. You can do those (arguably better for some cases) with helper programs as a separate build step. But reflection is non-trivial to do externally, so that's the biggest value add, and using it with all three pieces let you close the loop.

destructionator··on Let's learn D game programming development (2021) [video]
The official forums don't actually use vibe.d. vibe has the most marketing out of the D web frameworks, followed by hunt, but there's actually a few more too that just don't get as much attention, despite being older and possibly more widely used behind the scenes! The official forum uses the `ae` library. (And I have to mention my own `arsd` library which I'm pretty sure is the oldest web lib - mine dates back to 2008, but ae's pretty old too so he might beat me, and mine actually does better on some benchmarks despite me using GC and such with wild abandon.)

That said though, yeah, I don't think any of them use `@nogc`. I've actually tried to get the gc to interrupt audio code before and couldn't even hear it. I'm sure a bigger heap to scan might cause a problem in some situations, but these fears are really overblown in the popular commentariat.

destructionator··on Firefox UI/UX History
Compiling firefox is not exactly a trivial process, especially if you want to keep up with updates. And besides, they break something else every other week. I was getting sick of constantly having to fix the userChrome.css too.
destructionator··on Firefox UI/UX History
> How is that so different from "the best ever" is beyond me.

"the best ever" implies it is the best.... ever. Inclusive of all competition. "the best firefox has ever had" limits the comparison to just firefox.

> What browser did you move to after you uninstalled Firefox because of the click in the URL thing?

I made my own ui skin for chromium. I'm not terribly happy about using chromium but I couldn't figure out how to use the firefox engine for it - another strategic mistake by the incompetent buffoons at Mozilla not making this easy, and of course doing the whole browser myself is a big job (heck, even the UI skin is a big job, there's a LOT of things still on my todo list, but it minimally works without driving me absolutely nuts which is more than I can say about Firefox's recent versions).

> To me it actually makes sense - I think most of the times when a user reaches the URL they want to put a new one, not to edit the existing one. This behavior makes that easier.

Most the time I want a new one, I'll open a new tab and thus have a blank url. If I'm clicking on an existing url, it is because I want to edit it.

But if I do want to replace it, the old double click behavior to select all made this utterly trivial too: single click to edit, double click to replace. Hell, they even used to have an about:config thing to make single click select all, but in their infinite wisdom, they removed even that hidden config option to turn it back off.

With the new behavior, editing a url becomes quite frustrating. The work around is to click, wait until the double click time period elapses, then click again. Don't do it too soon though, or it will do the completely useless "select word" thing instead. If you click a third time, it will now select all again! Fourth click? Back to select word. You must wait for a while before you can just click to edit.

Oh, and do you use middle click on X? That single click select all... does NOT assert the PRIMARY selection. But double and triple click do! So if you single click it, it looks selected... but it isn't. Double click out of old habit? Now it is wiped out. Ridiculous.

So this change marginally benefits some users (who probably don't really care) while being devastatingly crippling to the people who do. Maybe some utilitarian function can say +1 usability point times 10 million users outweighs -1000 usability points to 1000 users.

But I'm gonna go ahead and disagree. Mozilla is a niche product at this point, maybe they should start caring about the 1000 users they have left.

destructionator··on Firefox UI/UX History
> Are you using "refresh" very often?

Ummm yes? Funny, I just wrote another comment complaining how hitting refresh on a major airline's flight status page is liable to give one of those terrible "something went wrong" messages (apparently the search results are liable to expire, but until they do, refreshing will actually update the info, so it is useful to periodically press to see if the flight got delayed).

Combining stop and refresh is also dangerous since that's a race condition. Suppose the page is taking forever, I decide I've had enough of that and want to press stop. But in the second it takes me to actually click on it, the page decided to finally load! Now my click, instead of stopping the annoying spinner animation, clears out the information that FINALLY arrived and brought the annoying spinner back.

(I actually think there is a pretty good case to just remove the stop button though, it isn't vital and just hitting back or close does the same thing anyway. But combining it with the refresh button is about the worst possible thing you could do to either button. It takes one useful button and one meh button and combines them into one awful button.)

Speaking of clicks, that's actually the last straw that made me abandon firefox entirely: in version 75, they broke clicking on the url bar. Instead of doing the sane thing - putting the cursor where I clicked - it instead selects all. Before, double click would select all, meaning if you wanted that, it was still easily available. Now double click instead selects... a word. So they completely removed the very useful single click functionality and turned double click into a completely useless behavior. Absolutely unbearable.

I could tolerate or undo most the other UI changes they did, but this click thing couldn't be user style'd away, couldn't be configured away. They just shoved this massive breakage down. So I uninstalled it .

> takes space even when you're not loading

I'd rather have a predictable UI of marginal utility that doesn't change out from under me than a UI that randomly changes from bad to worse in its own time. At least you can get used to consistency, even if it is consistently mediocre.

> What makes v1 "the best ever"?

Don't put things in quotes that weren't actually said. I actually said "v1 was not great but ok, and it got overall worse".

There's actually specific changes I think were good, coupled with other changes that were bad.

destructionator··on Firefox UI/UX History
Kinda astounding how the firefox v1 was not great but ok, and it got overall worse in literally every redesign since then. v1 remains the best UI firefox has ever had to this day.

No wonder they peaked user share early on and have rapidly hemorrhaged since then.

destructionator··on Final Fantasy 7: An oral history (2017)
Yeah, I like FF7 a lot, but my view in the 90's was that 3d was ugly and the older games had better graphics. The ff7 backgrounds look a lot better than the characters, and even the FMV sequences still pretty meh if you ask me. I'd take the art style of Lunar or Phantasy Star or something over it any day..... in fact I still prefer that style to the newer 3d games anyway.

Thankfully there's more to the game than the appearance. The music <3

destructionator··on Compile-Time Sort in D
> Compiling faster was just a side effect.

The location of an import has nothing to do with compilation speed. The only time it would ever make a thing compile faster is if 1) it is local inside a template function, 2) that template is never actually used, AND 3) the module is never imported anywhere else in the program.

That does happen - I use this pattern for optional dependencies which aren't even looked at if not actually used - but it isn't generally the case. You have to actively think about it to fulfill all three requirements.

destructionator··on Who keeps an eye on clipboard access?
It is quite easy to do that with X as well. It doesn't transfer data at all until the clipboard data is requested, and at that point, the clipboard owner knows which window is requesting it and is free to ask the user or deny the request. No applications I'm aware of do this in practice though, beyond the normal content negotiation.
destructionator··on Why I Like D
Actually, the truth is that Walter is a pretty poor D programmer who isn't that familiar with the language and knows next to nothing about the ecosystem outside dmd.

It wouldn't surprise me if he genuinely didn't know about how dstep and dpp are used.

destructionator··on Why I Like D
That's never been a "vs", both work very well.
destructionator··on Why I Like D
> Whether items are imported from a module should be left up to the developer and not done on their behalf.

Well, the developer wrote `import thing;` instead of either `static import thing;` or `import thing : specific, list;` so it was their decision.

destructionator··on Why I Like D
Well you can also just call .map if you want. The nice thing about the [] operation is the compiler can optimize it more heavily since it is restricted to simpler instructions.
destructionator··on Why I Like D
> Changes too rapidly for libraries to take root.

I have code that has worked unmodified for many years. The language doesn't change that often.

destructionator··on Why I Like D
They're wrong: the D parts of the compiler were released under the GPL in 2002. What is now called gdc got started shortly thereafter, bolting it on to the gcc backend, creating a fully-GPL D compiler.

This is easy to verify by looking at the archived releases.

destructionator··on Classes in D with betterC
No. betterC is terrible and limits you with no real benefit outside the first few minutes of playing with it. I wish they'd stop advertising it; real D is better in every way. (you can use regular classes with real D with minimal runtime too: http://dpldocs.info/this-week-in-d/Blog.Posted_2020_07_27.ht... and the new trait the parent link talks about means no more mangle hack like I did last year which also will help it work cross compiler).

betterC just plain disables a bunch of features. With real D, you can start with an empty runtime then enable stuff as you want it.

...or frankly just use the standard runtime and find joy.

destructionator··on How X Window Managers Work, and How to Write One (2014)
X has had its OpenGL extension available since 1992. Your argument is like saying "Windows 1.0 came out before Direct X even existed, so of course you can't play modern games on Windows 10". As new things came out, they added support for it.

Compositors are an optional component. I have never run one myself since they don't add anything of value. So any time someone says "the X server only talks to the compositor" I'm like "lol what compositor".

But even if you have one, it is still wrong. You have to understand that GUI applications are a LOT more than just low-level rendering. So even if you didn't need it for that, there's so much more going on that the server still plays its role in like coordinating copy/paste, drag+drop, hotkeys, notifications, etc., etc., etc.

And it isn't true that everything goes through the middle man. A graphics-heavy X application actually tends to work very similarly to a Wayland application (not coincidentally - as people love to point out, a bunch of the Wayland devs worked on the gpu rendering parts of X before): you get a direct render context, write to a buffer, then inform it to draw it. See more https://keithp.com/blogs/dri3_extension/

Mixed DPI is fully supported by the system, but may be buggy in applications. See here http://wok.oblomov.eu/tecnologia/mixed-dpi-x11/ you can get information and handle it client side for maximum quality, or do auto-scaling for easy support bridges. KDE and Qt manage to do it. So much for "unfixable".

destructionator··on How X Window Managers Work, and How to Write One (2014)
> X is still fundamentally an unsychronized protocol

Again, factually false. X has various synchronization options from the older double buffer protocol to the XSync extension to the GLX/DRI vsync commands.

I've also never seen tearing in X since like 2006.

destructionator··on How X Window Managers Work, and How to Write One (2014)
> Funny thing about that: if you want them to be scaled correctly based on different factors for each monitor, then you need a compositor...

No, you don't. And using a naive compositor is liable to make things blurry compared to the direct approach (the application requests the physical dpi for its current location and changes its vector drawing).

destructionator··on How X Window Managers Work, and How to Write One (2014)
This post is completely false. Literally every word of it is false.
← PreviousPage 3 of 6Next →