HackerTrans
TopNewTrendsCommentsPastAskShowJobs

noidexe

no profile record

comments

noidexe
·3 lata temu·discuss
Non native speaker here.

The unfamiliar programming language (which I've never used) seems to be binding some code to some type of validation event. "my" and "me" seem to refer to the input tag. "my.value" probably refers to the value of the input. If it's not foo it calls a setCustomValidity method with the input tag as the caller. Could be some built in method that you can call on any input tag or anything validatable.

Ok I just checked the link and setCustomValidity is part of the HTML5 Validation API (haven't worked on web dev in years).

I can assure you that the first person pronoun is among the first things we learn when studying English and assuming the code snippet does what I assume it does I'd say it's pretty intuitive to learn. Especially if we are comparing it to JS where "this" is not what you'd expect from using it in other languages, but the late-bound called of the function... except in all the cases where it isn't.

In any case, trying to guess how a programming language works is a very bad idea so it doesn't matter how obvious the language manages to be, you still should read the documentation.
noidexe
·4 lata temu·discuss
Some people switch engines but want the new one to accommodate to the previous workflow. You can try to make Godot work like Unity but you'll fight the engine all the time because it's designed differently. So maybe that's what you read. 3D support is much better now than it was before so it could also be that.

In my experience, Unity felt free to play, pay to win. I felt that the engine was full of holes in stuff that I expect an engine to handle. It's not a small percentage of games that need controller support, or tilemaps, or proper sorting of sprites. Some of that eventually became officially supported by the engine but by that time I was more than happy with Godot.

I've seen people give 2 hour long talks about how they managed to force Unity to do pixel perfect rendering, while in Godot it's a couple of checkboxes.

So I guess it depends a lot on what you're trying to do. For some games Godot might not be the best choice and that's fine, you have to choose the right tool for each project.
noidexe
·4 lata temu·discuss
In the case of Godot a lot of functionality is available out of the box. Biggest example is input management. You have an InputMap section where you define actions and can assign keys/buttons to it. Gamepad layout is automatically handled for thousands of controllers so that "right face button" is the same input event whether the user is using an xbox gamepad, a pro controller or generic.

There is an official Asset Library but only for free, MIT licensed assets. There's nothing stopping someone from creating a paid one, though.
noidexe
·4 lata temu·discuss
For me this feels like finally jumping back to the good timeline.

From the user point of view, I think there are two main types of experiences on the Web:

a ) Interactive documents. Basically web 1.0 but today we want fancier transitions and interactions. This can be provided by htmx and should always have been developed declaratively. It should ideally be provided by the browser and htmx shouldn't need to exist. Examples of this are Gmail and most social networks and forums including this one.

b) Desktop apps-but-I-don't-want-to-have-to-install-them. This would be things like Google Docs, Photopea and most real-time games. To deliver this, right now we have a browser that has become almost an OS inside an OS, to the point only Google can keep up with the complexity. On top of that, we pretend apps are documents and for all the imperative code we need we use a scripting language that was not meant for that, and we need a really complex VM just to keep it more or less performant. For this use case I think at some point we should move all the way into just delivering apps, if not native apps, something like wasm, where the browser tab would just be a vm player.
noidexe
·4 lata temu·discuss
The idea is that the js is used to implement the functionality that the author believes should be built-in. In theory you could have a browser plugin/extension for handling htmx and it would work across every site using htmx. You app-specific "code" is all declarative, just extra properties in your html tags. With most frontend frameworks, even if the browser came with built in support for Vue, React or whatever, you'd still tons of imperative js for each single webapp to define how it uses the framework.

Imagine not having html at all. You'd have to create pages from scratch imperatively by doing things like let element = createElement("p"); element.setContent("my paragraph"); parent.addChild(element); It'd be really ugly, a PITA to change stuff and error-prone. htmx is the opposite of that. It tries to make web development declarative again, among other things.