[-] TehPers@beehaw.org 4 points 2 weeks ago* (last edited 2 weeks ago)

Pushing HTML even further, one could say it's a declarative programming language that programs a UI in a mostly-stateless manner (inputs aren't really stateless but you can argue the state is provided by the UI rather than managed by HTML).

I'm not sure I'd make this leap myself though, I have a hard time classifying it (or any other markup language) as a PL. As far as I am aware, you can't really program a state machine with pure HTML, though you can accept inputs and return outputs at least.

[-] TehPers@beehaw.org 4 points 2 weeks ago* (last edited 2 weeks ago)

I'm not sure I see the issue. Is there something wrong with them reporting on Ukraine's Kursk region? Doesn't seem like an illegal border crossing to me.

Two can play at this game.

[-] TehPers@beehaw.org 2 points 2 weeks ago

Their GPUs are already bricks. Just throw the GPUs.

[-] TehPers@beehaw.org 3 points 3 weeks ago

Two thoughts come to mind for me:

  1. I think people should feel free to use any language however they want for their own needs and projects, but it's also important to understand what exactly "unsound" and "undefined behavior" mean if you're going to dabble with them. If it's a risk you're willing to take, go for it, but don't be surprised if things break in ways that make no sense at all. Realistically a compiler won't delete your root directory if you trigger UB or anything, but subtle bugs can creep in and change behaviors in ways that still run but which make unrelated code break in difficult to debug ways.
  2. The borrow checker is one of Rust's biggest features, so looking for ways around it feels a bit counterproductive. Feature-wise, Rust has a lot of cool constructs around traits and enums and such, but the language and its libraries are built around the assumption that the guarantees the compiler enforces in safe code will always be true. These guarantees extend beyond the borrow checker to things like string representation and thread safety as well. As an alternative, some other languages (like C++, which you mentioned, or maybe even Zig) might be better suited for this approach to "dirty-but-works" development, and especially with C++, there are some excellent tools and libraries available for game development.
[-] TehPers@beehaw.org 2 points 3 weeks ago* (last edited 3 weeks ago)

Would it work to write the query as a common table expression, then select your columns from that table and join it with a count(*) aggregation of the table?

[-] TehPers@beehaw.org 8 points 3 weeks ago

Or look at Python and their urllib, urllib2, new urllib, and the requests package on PyPi.

We already sort of saw this in Rust with crossbeam and standard channels, until of course they replaced the standard lib implementation with crossbeam's implementation.

[-] TehPers@beehaw.org 13 points 3 weeks ago

Hey look, the classic "America bad" comment on a post critical of China!

Are these people bots or something? It's possible to be critical of both at different times.

[-] TehPers@beehaw.org 4 points 4 weeks ago

I think it's good to document why things are done, but extracting things out into another function is just documenting what is being done with extra steps. This also comes with a number of problems:

  1. Not all languages are readable. Documenting what is being done is important in some C, or when working with some libraries that have confusing usage syntax.
  2. Not all people reading the code know the language or libraries well. Those people need guidance to understand what the code is trying to do. Function names can of course do this, but...
  3. Not all types can be named in all languages. Some languages have a concept of "opaque types", which explicitly have no name. If parameter and return types must be specified in that language, working around that restriction may result in unnecessarily complicated code.
  4. Longer files (the result of having dozens of single-use functions) are less readable. Related logic is now detached into pointers that go all over the file all because of an allergic reaction to code comments, where a simple // or # would have made the code just as readable.
  5. Function names can be just as outdated as code comments. Both require upkeep. Speaking from personal experience, I've seen some truly misleading/incorrect function names.
[-] TehPers@beehaw.org 2 points 4 weeks ago

If those functions are huge units of work or pretty complex, I can agree. For most cases though, a simple code comment should do to explain what's going on?

[-] TehPers@beehaw.org 23 points 4 weeks ago* (last edited 4 weeks ago)

My friend's homophobic dad was diagnosed with HIV right before his wife filed for divorce. They had a long discussion about how he got it, and he admitted to it being another guy. She was very lucky not to have HIV as well.

There does exist a correlation, but like all generalizations, it does not apply to all cases and can come off dismissive, rude, or minimizing when it isn't actually true. I find that it's best to avoid sweeping generalizations for people at all.

[-] TehPers@beehaw.org 9 points 1 month ago* (last edited 1 month ago)

I think accessibility is widely misunderstood. The way I view it, it's not only about giving people who need them more ways to access something, but also giving people who want/prefer them those methods as well.

One example of this is wheelchair ramps. Building the ramps benefits those who need them by giving those people a way to go up/down an incline, but many people use the ramps. The ramps are also for those who would prefer to avoid the stairs.

Digital tools are another example of this, and a great one. Keyboard accessibility is a must for people with visual impairments, but also a preference for many who prefer not to move their hand to the mouse constantly. Keyboard-accessible tools are almost always a better experience to all users as a result.

Not building for accessibility is honestly just lazy. It shows that you don't care about your customers, and you don't want them to have a good experience. At best, you want to force your experience on them and only your experience is allowed (my biggest gripe with Apple products honestly).

As for digital art, I've seen a lot of what you mentioned, and I think it's honestly been going on for centuries at this point. It's problematic, especially because not everyone wants to create art in the One True Manner(TM) and may want to experiment with new ways to create art, or may want the art as a part of a larger project and don't really care about the means (as long as it's ethical).

[-] TehPers@beehaw.org 1 points 1 month ago

While impressive, a minifier can bring it down to 1 line of JS! I do like that this can function as a reference for making simple canvas-based games though.

view more: next ›

TehPers

joined 1 year ago