u/dronmore

1 post karma · 430 comment karma · joined Jan 2017

dronmore

There was a joke that we used to tell as kids.

Mommy, are my teeth too long?
No honey, but stop talking so you don't scratch the floor.

"Learned helplessness" is a perfect term, and does not need to be changed. Even if passivity is the default for prolonged aversive events, it is not the default for occasional aversive events. Therefore it is reasonable to say that passivity is learned over time. Saying that it is unlearned (given) behaviour is a word game, and does not contribute anything to our understanding.

dronmore

Fasten your seatbelt, put the helmet on, and announce that you are all for the safety act.

dronmore

Top notch in this context means something more like a minced meat patty in a marine aquarium. Javascript by analogy would be a seahorse.

dronmore

Look. It's not that anxiety is 3 meters deep and love is 10 kilometers deep. It's that, until you have tools to measure the depth, you can say whatever you want, and you will always find some followers who think alike.

In the meantime, you can argue that poems are 2-dimensional objects. You can take every poem, put it on a piece of paper, and it will not lose any of its qualities. You can therefore argue that poems have no depth at all, and anyone who thinks otherwise is mentally deranged.

dronmore

Does the TypeScript compiler change the execution order to behave like an ES module?

IIRC you can change the compilation target and control what module system is used in the compiled code.

which phase runs first?

Very likely timers, but from a practical standpoint it does not really matter.

Are Promise callbacks handled separately from the Node.js event loop?

Promises are handled by V8.

Is the following execution sequence correct?

More or less, but I wouldn't assume that the nextTick queue always runs before the microtask queue. If a nextTick callback is added from within a microtask callback, it will run after the microtask queue is drained. This is also true the other way around.

Also, nextTick is a legacy feature and you are not advised to use it. You should use queueMicrotask() instead.

dronmore

And once it reaches an hour, we will just shift timezones forward instead of setting the time back.

dronmore

That's right. Talking about anti-patterns is considered harmful. It's also a blog smell, and the best indicator of being brainwashed, when authors talk about anti-patterns.

dronmore

There's also a 3rd option. For full customization you can harness watchFile from the node:fs module, and write your own watcher :)

dronmore

You have duplicated your html section :)

...
</body>
</html><!DOCTYPE html>
<html lang="zh-CN">
<head>
...

https://github.com/yFish26/classic-games/blob/d34876e8e3719ac31b3a8bb5ddc88a757358fb5d/index.html#L66

dronmore

How many ORMs have you switched within a couple of hours so far? Don't answer. I know it's 0.

dronmore

Dunning–Kruger, is that you?

dronmore

IIRC whitelisting !src/ is not enough as it only whitelists the directory, and none of the files that it holds. You need another rule for files inside the src/ folder, and yet another for subdirectories, and then to apply the pattern recursively. Your .gitignore will look more or less like this:

*
!.gitignore
!src/
!src/*
!src/model/
!src/model/*
!src/view/
!src/view/*
!src/view/html/
!src/view/html/*
!README.md
dronmore

Your love is like the love of a 5-year old to his tricycle. The only difference is that you are not 5 years old.

dronmore

May I ask where your curiosity come from? Has it been planted by MS? Are you being paid for asking this question?

dronmore

It's women who divide the world into aggressors and victims; I see it more as hosts and parasites. And I'm a host, btw, so feel free to suck all the blood out of me :D

dronmore

Did you ask her whether I missed the point, or not? Chances are that you missed it, and you will not know until you ask :)

dronmore

What exactly do you want to break to me, buddy? Did I forget to list other characteristics of mine? Did I forget to say that I'm also strong and decisive? Is there anything else about me that I don't know? Name it. Don't be afraid that your friends will ostracize you for not having the correct view on my looks :D

dronmore

I didn't refer to any particular quote. What I wanted to say was that she used the word "rarely" to sound balanced, and what I'm used to see in sayings like that are absolute quantifiers "always" and "never". They irritate me, so when I saw "rarely", I was like wow, finally, we are moving forward.

It's funny that I came across as a gatekeeper of some deep quote from the past :D

dronmore

No one ever told me that, and reddit is the last place where I'd expect to hear it. Thanks.

I'm also handsome and charming, btw, so you can modify your citation even further, and say:

"Men that are both handsome and charming are sometimes also intelligent."

Now, it sounds really badass, but it may be too complicated for the general public.

What do you think? Will the reddit populace understand?

dronmore

Good Lord! She replaced the word "never" with "rarely", so her opinion sounds more balanced. What's next? Will she start using the word "sometimes" as the final evolution step?

"Handsome men are sometimes charming. Charming men are sometimes handsome".

  • Pobelo Cobelo

Now, there is no "rarely" word in the citation. Neither there are ugly men in it.

dronmore

I'm not interested.

The beauty of writing scripts for yourself is that you can customize every little detail according to your liking. The moment you start appealing to a broader audience asking others for opinions, is the moment when rotten compromises start to creep in, and the functionality start becoming bloated. I don't want your project to cater to everyone. It should maintain a perfect balance between your particular needs and the time needed to maintain it.

And besides, the link to it is gone, so even if I wanted to look at it, I cannot.

dronmore

In terms of feature-wise there's not that much of a difference between generating html on the frontend and on the backend. The only meaningful difference is that if you do it on the frontend, you can have an additional state that is local to the frontend. If you do it on the backend, you need to keep your session state on the backend. Other than that the difference boils down to the format of your api responses. In one case the api responds with {"content":"data"} in the other it responds with <span class="content">data</span>. Both approaches are comparable feature-wise. I wouldn't call the backend one "extremely simplistic".

dronmore

I know that you wanted to be sarcastic, but your joke didn't land.

We do not give users direct access to the database for many reason. One that it is important here is that generating html with Postgres is not very convenient, and at the end of the day you need to generate html to display data in a browser. You can either convert the data to html on the backend (single step, easy), or convert it to JSON on the backend, and later convert the JSON to html on the frontend (2 steps, also easy).

The first approach is faster than the second one. I've seen a big online shop using this approach, and responses to filtering, selecting and alike were instant. When you say that this approach is "horribly inefficient" you are factually wrong, or you talk about a metric that is not obvious to me.

dronmore

Lies... It's so easy to spread them.

dronmore

The little princess cannot configure her text editor? Is that all the yapping about?

jan-pona-sina is right. In mixed environments, where people use different operating systems, you still have to agree on common line endings, and most of the time it will be LF. Line endings is the least of the issues with Zig, and in my opinion it's a non-issue. Your entitlement to CRLF newlines is more alarming then the lack of support for CRLF in Zig. If I were to choose, to work with you, or to work with Zig, I would choose neither. Get your self an .editorconfig, and give me a break.