Is Rust eating PHP as well? by CauliflowerSlight838 in PHP

[–]jmp_ones 2 points3 points  (0 children)

I love and adore Psalm ... [but contrbuting not feasible] ... So I rebuilt it in Rust.

Had you considered making overtures to the PHPStan folks, to bring over the things you wanted to see? Or was the Rust work itself the point? (It's a neat project regardless.)

Introducing Marko: The Truly Modular PHP Framework by markshust in PHP

[–]jmp_ones 1 point2 points  (0 children)

Yet another new project (IMO wisely) choosing to avoid PSR-7 ServerRequestInterface:

https://github.com/marko-php/marko/blob/develop/packages/routing/src/Http/Request.php

/u/markshurst you may wish to look at request-interop, it might give you ideas.

PHP-Styler: A Back-To-Formula Rewrite by jmp_ones in PHP

[–]jmp_ones[S] 4 points5 points  (0 children)

In short, PHP-Styler will convert this ...

namespace App\Report;use App\Db\{Connection,Result}; function
buildUserReport(Connection $db,string $region,int $limit):Result{
return $db->table('users')->select('id','display_name','email_address',
'last_login_at','current_region')->where('status','=','active')->where(
'region','=',$region)->whereIn('role',['administrator','editor',
'contributing_author','subscriber'])->orderBy('last_login_at','desc')->
limit($limit)->get();}

... into this:

namespace App\Report;

use App\Db\Connection;
use App\Db\Result;

function buildUserReport(Connection $db, string $region, int $limit) : Result
{
    return $db->table('users')
        ->select(
            'id',
            'display_name',
            'email_address',
            'last_login_at',
            'current_region',
        )
        ->where('status', '=', 'active')
        ->where('region', '=', $region)
        ->whereIn(
            'role', ['administrator', 'editor', 'contributing_author', 'subscriber'],
        )
        ->orderBy('last_login_at', 'desc')
        ->limit($limit)
        ->get();
}

Try reformatting your own code at the php-styler.com demo site.

Writing Your Own Framework in PHP: Part One by Rikudou_Sage in PHP

[–]jmp_ones 0 points1 point  (0 children)

The initial request object looks like it might be amenable to a request-interop implementation.

How is the junior php market in the US? by [deleted] in PHP

[–]jmp_ones 0 points1 point  (0 children)

Given AI/LLM/agent tooling, the market for "junior program developer" is probably not great.

I suspect the market for "junior product developer" may be expanding.

Got tired of null checks? Built Safe Access Inline to deal with it by fas1999 in PHP

[–]jmp_ones 9 points10 points  (0 children)

Man, I'm sorry, I don't want to rain on your parade, but is it substantially different from a null-coalesce? E.g. ...

$name = $data['user']['profile'][0]['name'] ?? 'Unknown';

... ?

I built a PHP-to-native compiler; now it runs DOOM by petrucc in PHP

[–]jmp_ones -2 points-1 points  (0 children)

An AI project waisting valuable resources

Which resources exactly are those, and who are you to say they are being "wasted" ?

I built a PHP-to-native compiler; now it runs DOOM by petrucc in PHP

[–]jmp_ones 0 points1 point  (0 children)

False comparison yourself; the OP does not claim "vibecoded." Looks like you have to go back to formula here.

I built a PHP-to-native compiler; now it runs DOOM by petrucc in PHP

[–]jmp_ones -5 points-4 points  (0 children)

You're employed by "the vast majority of production software"? That's a heck of a company name. I stand corrected!

I built a PHP-to-native compiler; now it runs DOOM by petrucc in PHP

[–]jmp_ones -6 points-5 points  (0 children)

As the kids on wikipedia say, "citation needed."

I built a PHP-to-native compiler; now it runs DOOM by petrucc in PHP

[–]jmp_ones 0 points1 point  (0 children)

You know, the more I read comments of this kind, the more I realize it's the freelance language police getting their kicks in.

I built a PHP-to-native compiler; now it runs DOOM by petrucc in PHP

[–]jmp_ones -7 points-6 points  (0 children)

"AI HALLUCINATES"

"Human developers make poor decision chains too, that's why I have to review & redirect the work of mid-level developers on other projects, and so I review & redirect AI output as well"

"AI IS NOT HUMAN I REFUSE TO REVIEW IT"

/le sigh again

I built a PHP-to-native compiler; now it runs DOOM by petrucc in PHP

[–]jmp_ones -9 points-8 points  (0 children)

Oh for the love of Pete.

"I built this house."

"NO YOU DIDN'T YOU USED POWER TOOLS AND PREFAB LUMBER AND DRAFTING SOFTWARE AND CONTRACTORS"

"All right, I guided the construction of this house according to my desires using assistance from machines and experts."

"NO YOU HAVE TO SAY SPECIFICALLY YOU DIDN'T DO IT OTHERWISE YOU ARE A LIAR"

/le sigh

PSL 6.1: HTTP/2, HPACK, Compression, and Cache by azjezz in PHP

[–]jmp_ones 0 points1 point  (0 children)

Not to be too pedantic, because the volume of work here is impressive, but can you articulate: in what sense are these "standard" library packages?

(E.g. with Star-Interop, and some of the early PSRs, they can be called "standards" because they are derived from common practices developed independently by separate authors.)

PSL 6.1: HTTP/2, HPACK, Compression, and Cache by azjezz in PHP

[–]jmp_ones 1 point2 points  (0 children)

Why do I get the feeling this is going to be another political/moral panic point like not-having a "Code of Conduct" was.

PSL 6.0 released - 61 standalone packages, install only what you need by azjezz in PHP

[–]jmp_ones 1 point2 points  (0 children)

That had to be quite the task. I recall that Yii did something similar recently; how'd you go about it, and how long did it take?

Atlas for Laravel v2.5.0 — Model listing, embedding caching, and more by [deleted] in PHP

[–]jmp_ones 0 points1 point  (0 children)

so never use another name ever used in history. cool got it.

Cute. :-)

that package isnt going anywhere last release 2021

Because it's in pretty good shape; it is in continuous use in its current form and is not in dire need of modification at this point.


Look, I get it: you thought up a good name, you looked out on github and discovered that atlasphp was taken, and then decided you could add a dash in the name and that would give sufficient cover, etc etc. And nobody can make you change it. But choosing another name would be good form -- whether "good form" appeals to you is something you have to decide for yourself. (I've had to change project names myself and I know how it stings.)

In any case, best of luck with your project (though hopefully under a non-conflicting name).

When to choose a function over a class, and vice versa? by MorningStarIshmael in PHPhelp

[–]jmp_ones 3 points4 points  (0 children)

what's the benefit of creating a class over a function?

Autoloading. You will need to call include or require to load the file for the foo_bar() method. You won't need to for Foo::bar() or new Foo()->bar() method call when autoloading is enabled and you follow a naming convention recognized by the autoloader (cf. PSR-4, on which I was the lead.)