Spyke

Replies

Comment on

PHP is dead?

Reply in thread

I used to think that php was a bad language until recently (used php5 when i was just learning to program, cooked some delicious spaghetti). But after 5 years I had to use PHP at work. The language has improved a lot, but I think a lot of the bad parts are still there.

Like, why does stdclass exist? Why not just use associative arrays? Why are there warning, error, fatal errors, exceptions? Some functions throw exceptions, other raise errors, others return false, other fail silently and you have to call another function to check if there was an error (last_json_error). Why do find functions return false instead of -1? Like every other language? Why can't I use strings with numeric values as maps keys? (I can't have ["001" => value], it gets casted to ["1" => value].

There are no generics, you have to use mixed everywhere. The stdlib is an inconsistent mess, some_snake_case, someCamelCase, verb_noun, noun_verb, functions are not namespaced, everything is global. A lot of duplicates: die vs exit, print vs echo, etc. You are forced to use PSR & autoload to be able to use namespaces in a tolerable way, not including_once everywhere. No UTF-8 support, only ascii. You have to manually use mb_ functions. Variable scoping is weird. Variable variables? Why?

And all that is just comparing it to the average language. If compared to a modern language like Rust, Zig, Swift, php is light years behind.

It's not hot garbage, but I wouldn't call it "good". There's laravel, but not much more. PHP still makes you shoot yourself in the foot by default, unless you spend a lot of time learning its edge cases. Just like javascript.

Comment on

YouTube ad.

Reply in thread

In my experience libretube with default instances is bad, I couldn't even watch a single video without buffering every 3 minutes for a minute.

With a selfhosted instance however, libretube is perfect

memes

Comment on

It really makes me cringe every time they talk about logic...

Reply in thread

What you said (and such defenses of religion) makes me think: If I see someone ready to jump off a bridge, and I can stop them against their will, should I? I mean, inside their brain they are ending their suffering. They don't see value in life. But I do. Whose worldview is more important?

What if it was drugs, should I stop them? What if it was drinking every weekend? What if it was refusing to go outside without a mask in the middle of a pandemic?

What if it was following the cult of their parents, which encourages abuse & discrimination of women, opression of minorities, supression & regression of scientific advances and further indoctrination of future generations? If I have the power to get someone out of their cult against their will, should I?

Or what if it was continuing to feed a system that brainwashes people into thinking that monetary gain is what's important in life, that the system is infallible, and no alternatives exist?

Should we act against what we perceive as wrong, even if it's against the will of other persons? Where do we draw the line? Who decides what is right and what is wrong?

Comment on

PHP is dead?

Reply in thread

I'd say that PHP allows you to write very bad code (and makes that the default). It's a language feature.

For example Java has a lot of NullPointerException because it was designed with null and without mechanisms to detect & prevent these errors. Any method can return null and cause a NPE. It's just easy to ignore them. Modern languages like Go, Rust or Zig force you to handle null errors, and make it easy to do so. NPEs are a lasguage feature in Java.

In the same way PHP allows you to write any ugly code you want. There are no checks, no safety. People can write bad code, people can be lazy, people can be stupid. PHP allows it and empowers them.

memes

Comment on

It really makes me cringe every time they talk about logic...

Reply in thread

Let's assume I didn't know about vaccines and I went to ask for advice to someone. How would I know if what they told me was good advice?

I would ask myself, are they an authority on the subject? Where do they draw the advice from? Who says they are an authority? What did they have to do to earn that authority? Do other authorities say the same?

Are mormons authorities on logic? Why trust advice about logic from someone that doesn't follow logic?

A liar can say that lying is bad. A killer can say that killing is bad. It just so happens that the advice is good, in spite of who said it.

memes

Comment on

It really makes me cringe every time they talk about logic...

Reply in thread

Yes, it's emotional to disregard advice you know is good. However it is a logical reaction to have.

It is logical for humans not to trust or accept advice from a hypocrite, even if that advice may be good. It's not about the advice itself, but about who gives it. That was my point.

Unfortunately humans have emotions, and those emotions factor into our so called "logical decisions". To ignore our emotions is to pretend we are machines, and machines wouldn't be in these situations, as a machine wouldn't give advice it doesn't follow itself.

Now, if we were machines, sure, if the advice is good, it's good, doesn't matter who gives it.

Furthermore, if I already know the advice is good, did I receive advice?

memes

Comment on

*Permanently Deleted*

Reply in thread

Like, downloading the video files with yt-dlp and then uploading them? Or streaming, like what Piped/LibreTube do?

I personally have my own piped server, and don't enter to youtube for anything. The only 2 things it can't do are post comments and see live streams comments. No ads, no tracking, i can do whatever i want without google's permission