e0qdk

joined 2 years ago
[–] e0qdk@reddthat.com 53 points 1 day ago (4 children)

On 196, there's a rule to post before you leave (see the sidebar/community description depending on which UI you're using). "rule" means they couldn't think of a good title; i.e. they're just following the "post something" rule. It's popular to come up with something punny though involving "rule" if you can.

[–] e0qdk@reddthat.com 2 points 6 days ago

Personally, I think it's particularly stupid that you can't use it for GLSL shaders from external files...

[–] e0qdk@reddthat.com 6 points 6 days ago (2 children)

Microsoft had a Visual Basic variant (VBScript) in IE that got some attention back in the 90s; it's probably just as well that JS won instead of that...

In modern webdev type="module" is used to indicate an ES6 module and type="importmap" to include a JSON table of paths to modules. Still basically JS, but the parameter is still used in a meaningful way.

[–] e0qdk@reddthat.com 3 points 1 week ago (1 children)

while ( const std::optional event = window.pollEvent() )

Try passing -std=c++23 to g++ -- that code doesn't look like valid C++ from when I was regularly programming in C++, but the standards committee has fucked around with the language a lot in the last few years and I suspect this is something from one of the very recent standards.

[–] e0qdk@reddthat.com 1 points 1 week ago* (last edited 1 week ago)

OK. I think I see what you're getting at. If you can figure out how to get it to the point of an outline, there are triangulation libraries that can fill in the mesh for you (I think I've mentioned one to you before a long time ago) if you want flat end caps on the extrusion. I'm not sure off the top of my head how you'd get to an outline from that star example though -- a few ideas come to mind, but they're very much half-baked ideas... :p

Best of luck!

Edit: the triangulation library I was thinking of: https://github.com/mapbox/earcut

[–] e0qdk@reddthat.com 1 points 1 week ago (2 children)

I'm not sure I quite get it, but if I'm following correctly, you're using the numbers to indicate a sequence of vertices for a triangle fan here (with @ indicating the central vertex), right? If so, the vertices are used in more than one triangle; (0, 1, 2) and (0, 2, 3) are triangles that reuse vertex 0 (@) and vertex 2.

If that's what's going on then it should be fairly straightforward to turn shapes defined like this into extrusions; for the simplest case you duplicate and offset the triangle fan for the other end and then generate quads/pairs of triangles for the extruded faces of the prism -- and for more complicated cases you can repeat that (with planar alignment if needed) following a curve in small increments.

I might not be following though since I don't know what you mean by color index face hints.

[–] e0qdk@reddthat.com 2 points 1 week ago (4 children)

fan vs strip

Why not just work with a collection of triangles directly? It uses more memory, yes, but it's simpler to reason about and can also have parallelism benefits (since each triangle is independent).

It can still be useful to track shared vertices (and reference them by index) though.

[–] e0qdk@reddthat.com 1 points 2 weeks ago

Well, I've seen Fate/Stay Night and Fate/Zero and a few of the other spin offs but I've kind of lost track of the Fate/Word Salad series at this point... 🙃️

[–] e0qdk@reddthat.com 11 points 2 weeks ago (1 children)

For you, maybe, but for me it's my desktop's clock -- with my microwave as the fallback (e.g. when I'm playing a fullscreen game).

I basically only check the time on my phone if I'm out and about (which is... rare) or when I'm getting up/going to bed -- which also serves as a check for messages (since I have my phone on Do Not Disturb 24/7).

I actually bought a physical wall clock earlier this year thinking that I could stick it somewhere more convenient to read than the microwave, but the ticking was too damned annoying.

[–] e0qdk@reddthat.com 4 points 2 weeks ago (1 children)

I've been reading a fair bit of old, out of copyright fiction over the last couple years. I recently finished Carry On, Jeeves by P. G. Wodehouse which was amusing. You can find a copy here: https://www.gutenberg.org/ebooks/65974

[–] e0qdk@reddthat.com 2 points 3 weeks ago

Honestly not sure. I wouldn't be surprised if it breaks something with D-Bus based on skimming the man pages, but I've never dug into it. Its not exposed in containers I run though, and I haven't run into anything that broke there as a result... 🤷️

[–] e0qdk@reddthat.com 6 points 3 weeks ago (5 children)

Well, there is /etc/machine-id on Linux...

 

I had some free time this weekend and I've spent some of it trying to learn Go since mlmym seems to be unmaintained and I'd like to try to fix some issues in it. I ran into a stumbling block that took a while to solve and which I had trouble finding relevant search results for. I've got it solved now, but felt like writing this up in case it helps anyone else out.

When running most go commands I tried (e.g. go mod init example/hello or go run hello.go or even something as seemingly innocuous as go doc cmd/compile when a go.mod file exists) the command would hang for a rather long time. In most cases, that was about 20~30 seconds, but in one case -- trying to get it to output the docs about the compile tool -- it took 1 minute and 15 seconds! This was on a relatively fresh Linux Mint install on old, but fairly decent hardware using golang-1.23 (installed from apt).

After the long wait, it would print out go: RLock go.mod: no locks available -- and might or might not do anything else depending on the command. (I did get documentation out after the 1min+ wait, for example.)

Now, there's no good reason I could think of why printing out some documentation or running Hello World should take that long, so I tried looking at what was going on with strace --relative-timestamps go run hello.go > trace.txt 2>&1 and found this in the output file:

0.000045 flock(3, LOCK_SH)         = -1 ENOLCK (No locks available)
25.059805 clock_gettime(CLOCK_MONOTONIC, {tv_sec=3691, tv_nsec=443533733}) = 0

It was hanging on flock for 25 seconds (before calling clock_gettime).

The directory I was running in was from an NFS mount which was using NFSv3 unintentionally. File locking does not work on NFSv3 out of the box. In my case, changing the configuration to allow it to use NFSv4 was the fix I needed. After making the change a clean Hello World build takes ~5 seconds -- and a fraction of a second with cache.

After solving it, I've found out that there are some issues related to this open already (with a different error message -- cmd/go: "RLock …: Function not implemented") and a reply on an old StackOverflow about a similiar issue from one of the developers encouraging people to file a new issue if they can't find a workaround (like I did). For future reference, those links are:

view more: next ›