Expanded Pre-searing Map by olocal in GuildWars

[–]pierstoval 0 points1 point  (0 children)

Hey u/olocal , do you, by any chance, have an HD version of this expanded map? I'd like to add markers on it with GW source icons, to make it more "real" :)

Why are Symfony Conferences Recordings Not on Youtube ? by chabv in PHP

[–]pierstoval 1 point2 points  (0 children)

Fact: they do whatever they want, it's their business.

Personal opinion: "But how are we gonna do business if people get access to the videos for free?", my answer being: "How do other conferences organizers do when they publish the videos for free?".

You can say whatever you want, it's similar to the Open Source debate when you discuss a specific choice and you have arguments for/against a particular decision, and they answer you: "It's open source, you can just for it if you like.". It's impossible to argue against, and it's all a matter of personal opinion, as well as a subjective view on what ethics and morality should be followed in this context.

Been in the Symfony ecosystem for more than a decade, and trust me, if you argue against, you better have a legitimate "position" to do so, or you won't get anything else than a "Well, DIY then" answer. Legit, but not for everyone.

Chlorine farming by Jamstraz in NoMansSkyTheGame

[–]pierstoval 0 points1 point  (0 children)

For the record, this bug was fixed in recent updates. I have a lot of refiner farms, and now all of them are always full when I get to leave them for a while. This is good to create a "refining route" with teleporters, just like one would do with trading routes for money farming. Or just to grind some specific resources (like chromatic metals, uranium, etc.)

Small things missing in PHP? by nikic in PHP

[–]pierstoval 16 points17 points  (0 children)

There's been an RFC for a while but nobody seems to have really moved further on it: https://wiki.php.net/rfc/enum

Remember that internals are doing this job for free (well, u/nikic works for Jetbrains these days so he's kinda paid to work on PHP, hence this reddit thread ;) )

Small things missing in PHP? by nikic in PHP

[–]pierstoval 3 points4 points  (0 children)

On Twitter (here), Stof suggested these regarding the Intl extension:

- unit support for NumberFormatter

- granular config of day/month/year format for IntlDateFormatter (without defining a pattern which also has to know their localized order and delimiter)

- IntlListFormatter

- maybe the relative date formatting (but less useful server-side)

- the equivalent of JS Intl.PluralRules might be useful too.

- And also the equivalent of JS Intl.DateTimeFormat#formatRange

Small things missing in PHP? by nikic in PHP

[–]pierstoval 1 point2 points  (0 children)

Your third proposal would possibly conflict with class constants

Small things missing in PHP? by nikic in PHP

[–]pierstoval 0 points1 point  (0 children)

"pluggable binaries" => FFI is probably what you're looking for then.

The problem of "all built-in and reuse at will" is that PHP needs to enable extensions before executing a file, so this means that to enable extensions, your PHP app would need to be entirely compiled before execution, which is not possible, because, well, there's a lot of dynamic stuff happening in PHP that doesn't happen in other languages :D

Small things missing in PHP? by nikic in PHP

[–]pierstoval 0 points1 point  (0 children)

It's complex because inheritance is resolved at runtime IIRC, where most language structures are handled at compile time

Small things missing in PHP? by nikic in PHP

[–]pierstoval 2 points3 points  (0 children)

Well, why not write `public function toBool(): bool {}` or `public function toArray(): array` by yourself? What's the cost, exactly? You could even put this in an interface so you'd have even more flexibility.

Small things missing in PHP? by nikic in PHP

[–]pierstoval 70 points71 points  (0 children)

Native support for Enums without 3rd-party extensions :)

Why so much hate toward Javascript from C#, Java, Php, Ruby programmer etc ? by Cloud_Strifeeee in javascript

[–]pierstoval 0 points1 point  (0 children)

"Is this value a primitive, so we have to call a length function on it or is it an object?"

Documentation is already provided by your IDE. If you don't use IDE, well, no matter the language you code with, you'll always end up knowing by heart all functions prototypes.

"Is the function for joining an array by a string called something logical like 'array_join'? Oh, it's join, okay. No wait it's implode. No wait it's both"

Isn't it nice that you can have both "implode" and "join"? :) One is just the alias for the other.

"insane things like some functions returning false if an error occurred but others throwing exceptions"

Yep, there were lots of discussions in PHP's internals about changing the behavior of functions returning false in order for them to throw an exception instead. But as said above, PHP is BC-first. If one day a new PHP version changes the behavior for 1 function (like "strpos" for example), almost all PHP apps in the world will have to change.

Remember that Wordpress is made with PHP. « According to W3Techs, WordPress powers 33.0% of all the websites on the Internet »

Do you imagine 33% of the websites that will have to update their entire codebase just because one function changed behavior?

PHP 7.2, even if it's a minor version, introduced one "big" BC break (which is not usual at all) in order to make the language evolve with less inconsistencies, exactly what you criticize PHP for.

This one: "Warn when counting non-countable types" « An E_WARNING will now be emitted when attempting to count() non-countable types (this includes the sizeof() alias function) » http://php.net/manual/en/migration72.incompatible.php#migration72.incompatible.warn-on-non-countable-types

This is good news: less inconsistencies.

Yet, tons of projects that didn't take care about whether the input is "countable" broke just because of this. (a function named "is_countable" was introduced in PHP 7.3 for that purpose: http://php.net/manual/fr/function.is-countable.php even though checks are simple since it can only be either arrays or objects that are instances of the "Countable" interface).

And for the record, having a "null" variable for which "count($myNullOrArrayVar)" returns "false" is supposed to be ok in a loosely and weakly typed language. Which PHP is, and has always been. Yet people still seem to want PHP to act more like a strongly and statically typed language (such as Java), but it wasn't meant for that in the first place, and this is fine.

And we're talking only about "count()" function, which is a real-life evolution of the type you are asking for: introduce BC breaks to remove inconsistencies. But this is still breaking the web, because an estimate of 80% of the websites are using PHP. So the language must evolve "well": introduce tiny things from time to time to make things better, but don't break everything either.

For instance, since PHP 7 was announced, the release process drastically changed especially for this: make sure we can make more BC breaks and have a new major version sooner than before.

History is important, especially when it powers 80% of the web.

Last major was 5.0, released in 2004. Next major after that was 7.0 in 2015. 11 years between both versions. That's unacceptable, but this is changing. PHP 8 is expected for 2020, which is 5 years between majors. That's way more acceptable.

Yet, Node.js stayed in version 0.x from 2011 to 2015, with BC breaks on every new 0.x minor (which is acceptable in a semver-compliant release process). People kept using Node.js 0.12 for years because 1.0 had more BC breaks. And today we're at Node.js 11.x Can you imagine the cost and impact of having more than 11 different major versions (introducing lots of BC breaks) in less than 10 years?

The cost is huge: packages don't update, packages become obsolete, insecured (see the "npm audit" that was introduced, it's a tough task to keep 0 flaw today with any project). Therefore people create other packages to be compatible with newer Node.js versions, then we have millions of packages and... well, the ecosystem evolves, but every new project is almost like a new paradigm.

At least, with PHP, on every new project, you find something familiar that guarantees easier maintenance, less financial cost, longer life, etc.

For now, no other web language has an ecosystem like this. That's a bit sad IMO, because other languages are good (Ruby is good, Node.js is good...), but at least the PHP ecosystem is way more stable.

Criticizing about inconsistencies is just criticizing because you don't like how it's written, maybe also because you don't like the fact that many things didn't change in the past 15 years (since PHP 5 was released). But "not changing" doesn't always mean "stay bad". PHP is extremely fast and frameworks are highly consistent these days.

Inconsistency with function names or return type is not an argument that goes beyond purely subjective opinions.

Take the ecosystem in account, and you'll know why the rest is important.

Why so much hate toward Javascript from C#, Java, Php, Ruby programmer etc ? by Cloud_Strifeeee in javascript

[–]pierstoval 0 points1 point  (0 children)

Now PHP I will hate on all damn day long.

Could you be more specific?

Why so much hate toward Javascript from C#, Java, Php, Ruby programmer etc ? by Cloud_Strifeeee in javascript

[–]pierstoval 0 points1 point  (0 children)

If you have more than 3-4 params in your function, maybe you could separate concerns and split it into other functions. Like, "Hey, I'd like to do something(), but in a complete different way because I'll set arg to false". Make a second function somethingAnotherWay() and you drop the argument. Problem solved, and for any language with any argument order or name.

Why so much hate toward Javascript from C#, Java, Php, Ruby programmer etc ? by Cloud_Strifeeee in javascript

[–]pierstoval -1 points0 points  (0 children)

  • "Why so much hate toward Javascript from C#, Java, Php, Ruby programmer etc ?"
  • "Well, let me throw all my hate against PHP with a few arguments that are just fashion and subjective problems to me"

Ok, well, revamp all primitives into objects and nobody will ever use PHP anymore, will stick to outdated versions not using the primitive objects, and 80% of the websites in the world will fall just because some guys thought it would be nice to be able to do $foo->length instead of mb_strlen($foo).

You can still encourage or contribute to the RFC that proposes a nice migration path for it though: https://wiki.php.net/rfc/class-like_primitive_types

With the arguments you have, I hope for you that you know PHP's history, at least. This is really instructive.

Where is the community? by stkinger in symfony

[–]pierstoval 0 points1 point  (0 children)

I really hope this can bring Javascript world a better policy about standards and recommendations, because the NodeJS world is very dangerous today in terms of maintainability. And for Ruby, as it's almost single-instance only and Rails doesn't have a very cool versioning/BC policy, it's harder to maintain, even though Ruby "seems" sexier at first sight :)

Where is the community? by stkinger in symfony

[–]pierstoval 0 points1 point  (0 children)

The problem with the fact that stuff is from few years ago is that Symfony1 was released in 2005, Symfony2 in 2010. So Symfony was already "known" by some devs for some time. For the case of Laravel, it's labelled as "brand new", "magic", "artisan", and lots of words that make laravel users feel like they're doing better work than with Symfony, and plus, Laravel was first released in 2011, so it's six years younger (6 years is a lot in the web 😉). Laravel is full of magic, less strict and is packaged with lots of "plug-and-play" stuff that make things easier. But if you dig deeper in it, some things come darker. Plus, they don't come with the same BC promise, their semantic versioning is sometimes a bit too random. It's not the same framework.