Live data from Hacker News

PHP 8 to Add a JIT

blog.krakjoe.ninja

151–160 of 190 posts

Re: PHP 8 to Add a JIT

#151
post #134
post #126

Earlier quoted context omitted.

I still use PHP a lot. PHP's problems are largely user driven. What drove you away in 2004 is likely still there. The community is still full of people who have no idea. Laravel is still king. Noun driven OO is still perceived as a good idea. But on the flip side, the language has some nice features now and performance got a big boost too. Still a couple of things missing but it's getting there.

Not too serious but I want to stop using a language still forcing me to type semi colons. CSS -> Stylus. I don't even have to type brackets and colons and not just semi colons. JS -> JS (TS). Some people may not be aware but you can fully write JS by omitting semi colons. (Except on a few occasions* but I can write a project without one just fine and decent editor will warn you when you're supposed to have one, like…

> I want to stop using a language still forcing me to type semi colons.

Fuck it, go one step further and stop using languages that expect you to use any formal syntax. Just write down "Computer do this thing! Now, good and bigly like!" and then wait for it to happen.

Of all the fucking complaints about a language "requires semicolons" is the most ridiculous thing I've heard (and no you're not the first place I've heard it, but it's still as ridiculous now as it was the first time I heard it).

> Ruby, Python, JS all don't ask you for semi colons.

Except, JS does require semicolons, it just happens to be able to insert them for you in some situations.

> Array expression is also too verbose in PHP

Array syntax in PHP is the same as in JS: `['foo', 'bar', 'bar'];`. Oh that nasty semicolon is the "verbose" part I bet?

Re: PHP 8 to Add a JIT

#152
post #134

Earlier quoted context omitted.

Not too serious but I want to stop using a language still forcing me to type semi colons. CSS -> Stylus. I don't even have to type brackets and colons and not just semi colons. JS -> JS (TS). Some people may not be aware but you can fully write JS by omitting semi colons. (Except on a few occasions* but I can write a project without one just fine and decent editor will warn you when you're supposed to have one, like…

> I want to stop using a language still forcing me to type semi colons. Fuck it, go one step further and stop using languages that expect you to use any formal syntax. Just write down "Computer do this thing! Now, good and bigly like!" and then wait for it to happen. Of all the fucking complaints about a language "requires semicolons" is the most ridiculous thing I've heard (and no you're not the first place I've hea…

> Array expression

I meant as in

$hash['member']

vs

hash.member

Re: PHP 8 to Add a JIT

#153
I'm happy PHP is still there, because other much better languages missed a lot of good things that PHP got right immediately (in the context of web development):

1. You may add complexity if you want but the bare metal of web is that you have some printf() like output construct plus a trivial interpolation thing. Then who wants more can add more, but this should be what you get immediately for free, without template languages.

2. Languages, even high level ones, should be reasonably fast.

3. Setting up an environment should be trivial.

4. By default things are created and die in the context of a page load. Then if you want to optimize things, you may have additional constructs to create persistent connections, objects, whatever. But give me this huge garbage collector that is a stateless execution, by default.

5. A set of libraries already included so that for most things I don't have to go and find some solution.

Many other competitors failed so big in that regards that I really wanted PHP to get better as a language (like it is doing) so that it was not a so bad experience like at the start, because I was pretty sure the others would hardly fix the above points.

Re: PHP 8 to Add a JIT

#154
post #152

Earlier quoted context omitted.

> I want to stop using a language still forcing me to type semi colons. Fuck it, go one step further and stop using languages that expect you to use any formal syntax. Just write down "Computer do this thing! Now, good and bigly like!" and then wait for it to happen. Of all the fucking complaints about a language "requires semicolons" is the most ridiculous thing I've heard (and no you're not the first place I've hea…

> Array expression I meant as in $hash['member'] vs hash.member

Well that isn't even an Array in Javascript, so already I'm beyond caring what you mean.

Re: PHP 8 to Add a JIT

#156
post #123

My feelings about PHP are stuck in what I remember from 2004. If I’m starting a new backend web project in 2019, should I be considering PHP over Ruby, Python, or TypeScript? Why or why not? I’m curious to hear from anyone who’s used it professionally in the last couple years.

For majority of backend web project, in 2019, there should be nearly no technical advantage re: one language over another among all the popular ones. (i.e. the ones you listed: PHP, Ruby, Python. I would argue to use pure nodejs over Typescript though. Most people underestimate the dev flow speed it gives you to not to have a compile/transpile step. Refresh and rerun is part of what made PHP so popular years ago.) In…

> there should be nearly no technical advantage

In practice there is. Specifically in regard to parallelism and performance, which is important for any non-trivial application.

You can spin up multiple Python processes or just re-implement in a different language, some nuanced part of the stack that you've crafted to bottleneck(s), or you can just choose not to use it from the start. It's not like you're going to design around the deficiency at all levels.

You'll run into Ruby performance problems very early on without specific knowledge, so people just stopped using it for anything load bearing. My bias against Ruby is limited to PoC programs having memory problems and poor performance compared to virtually identical implementations in other languages, being a cultprit. YMMV.

Perl is hard for people to understand, since every feature of the language is a landmine of obfuscation...php is getting there on it's own, to be fair.

The idea that there should be no technical advantage is ignorant. There are choices that have been made and there's reasons for each. You don't run Python on stream processing with Flink because it's not suited for parallelism. Catching errors like a kafka broker disappearing, in PHP, is almost trivial like in many languages, while Java requires a custom retry method that requires intimate knowledge of how any connector works.

Knowing the languages, PHP has some very compelling strengths, as does Java (performance and safety) and Python (generally consistency of implementation and speed of development)...I still don't understand why I keep running into rats' nests of javascript and other esoterics.

Re: PHP 8 to Add a JIT

#158
post #2

There is something to be said about PHP's staying power. The early versions of the language weren't considered "right". Except maybe they were right for the problem at hand. The way I see it was PHP captured the vector of change , and left ample room for future developments. Both internal changes (hello, bytecode; hello, JIT), language level features (hi there, namespaces), and runtime level features (oh hai, countle…

It wasn't right, no. I remember going "WTF" repeatedly even back in 2000, while first learning it and then using it in a commercial project.

It's mostly that everything else was either worse (ASP), or insanely overengineered (JSP), or both (ColdFusion).

Also, with LAMP, you had a stack that was free top-to-bottom. Back then, it still wasn't as common as it is in the industry today, and that especially helped it in the hobbyist and small business niche.

Re: PHP 8 to Add a JIT

#159
post #32

Earlier quoted context omitted.

I use uBlock Origin and its :style() feature to remove and modify parts of websites that I don't like. I don't block user comments on PHP doc pages out of spite, I do it because they are very long, making it harder to scroll vertically on the actual documentation.

How does comments at the bottom make scrolling harder?

Not OP, but for me (as a potential example) there are websites that I want to scroll up and down on to view different things, but when you scroll down far enough websites have an annoying habit of auto-opening the comments at the bottom, suddenly tripling (or more) the length of the page, making me lose my spot on the page (potentially) and also making it harder to scroll with precision and/or need to scroll through all this new content I didn't want.

Its a minor quibble on desktop, but on mobile its a really annoying feature because I have to manually scroll with my finger for an age.

Re: PHP 8 to Add a JIT

#160

I'm happy PHP is still there, because other much better languages missed a lot of good things that PHP got right immediately (in the context of web development): 1. You may add complexity if you want but the bare metal of web is that you have some printf() like output construct plus a trivial interpolation thing. Then who wants more can add more, but this should be what you get immediately for free, without template…

Now, the actual tragedy of PHP isn't that coding in it feels soul-drainingly tainted, but that it was always ‘good enough’ for armies of people. Because, as a result, there wasn't any incentive to add features outside of the paradigm of one-shot scripts.

E.g. there are at least three async frameworks, with barely any adoption―and this new ‘Swole’ one is advertised like ReactPHP never existed, with its promises and everything.

Meanwhile, somehow, the poster notion of PHP's versatility is that it's purportedly just fine for desktop GUI programming, of all things―while being single-threaded (its ‘pthreads’ aren't threads). The topic of UI freezes never comes up in these pamphlets, for some reason.

Post reply on HN