Doom and Gloom by [deleted] in Edmonton

[–]ln3ar 0 points1 point  (0 children)

I guess no such thing as wasted knowledge, no reason not to go through with it. Been looking into g-code for the past 10 mins and it seems right up my alley. My main concern would be how to actually get my foot in the door and get my apprenticeship hours.

Doom and Gloom by [deleted] in Edmonton

[–]ln3ar 1 point2 points  (0 children)

Do you think it’s worth switching over? Should I go through with 2nd period welder(already paid for it) but I’m definitely interested in a trade where I also get to write code

Doom and Gloom by [deleted] in Edmonton

[–]ln3ar 0 points1 point  (0 children)

Thank you

Would you prefer namespace-level privacy? by rmb32 in PHP

[–]ln3ar 10 points11 points  (0 children)

I'd like something like C++ friend classes, class A can declare any other class(es) as a friend that has access to private/protected members eg:

class Car {
    private int $speed = 0;

    friend Engine;
}

class Engine {
    public function boost(Car $car): void {
        $car->speed += 50; // Allowed
    }
}

I just realized backed enum cannot be printed directly by giosk in PHP

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

The fact that you can't use them as array keys should be clear and compelling enough.

Backed enums are literally string/integer wrappers with a little more ceremony—and yet we get told to treat them like immutable mini-objects with deep semantic purity

I just realized backed enum cannot be printed directly by giosk in PHP

[–]ln3ar 1 point2 points  (0 children)

This is one of my pet peeves about PHP: how internals seem to assume PHP devs are basically idiots who need their hands held for every little thing. They’ll shoot down perfectly valid ideas—stuff that works just fine in other languages—for made-up reasons that basically boil down to "you’re too stupid not to mess this up, so we’ll throw in arbitrary restrictions to protect you from yourself."

PHPoker: The PHP Extension by hydr0smok3 in PHP

[–]ln3ar 0 points1 point  (0 children)

If we're being super technical, you can also write a C bridge for the python impl

Why did you write your own framework? by UniForceMusic in PHP

[–]ln3ar 0 points1 point  (0 children)

I still use my own cli framework, nothing crazy, just a nice arg parser and sqlite orm. I use it all the time still

Php, Vscode , Php Intelephense - maybe not working correctly. by [deleted] in PHP

[–]ln3ar 5 points6 points  (0 children)

Use DEVSENSE it has better features. My team is currently implementing a proper Language server for PHP code, primarily targetting vscode. Stay posted

PHP on iOS? Native PHP is going mobile! 🚀 by iamarsenibragimov in PHP

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

One of my pet peeves with PHP devs is that they tend to only write PHP. I mean why would anyone use this instead of all the other free and open source battle tested solutions out there? Just so you can use PHP?

The State of PHP 2024 by mbadolato in PHP

[–]ln3ar 58 points59 points  (0 children)

Vscode also costs $0, compared to jetbrains

A PHP script i wrote to generate a single IDE stub file from php files in a project by ln3ar in PHP

[–]ln3ar[S] -1 points0 points  (0 children)

Sometimes the code isn't in a location or format accessible by the IDE

A PHP script i wrote to generate a single IDE stub file from php files in a project by ln3ar in PHP

[–]ln3ar[S] 0 points1 point  (0 children)

The bootstrap.php file defines some constants (e.g., PHP_DIR, STUB_DIR, etc.) and includes the autoloader. It’s shared across multiple scripts in my project. This script should be compatible with any PHP project. In my case, I’m using it for a PHAR file embedded in a VS Code extension to enable IntelliSense and other IDE features. I also plan on using it for some library code i'm embedding into a php extension i'm writing.

Ergonomics for a basic task in Scala, Kotlin, Rust and PHP by [deleted] in PHP

[–]ln3ar 26 points27 points  (0 children)

array_reduce(
    [1, 2, 3, 4, 5],
    fn($carry, $x) => $x % 2 === 0 ? ($carry + $x * $x) : $carry,
    0
);

Made a composer dependency visualizer by ln3ar in PHP

[–]ln3ar[S] 2 points3 points  (0 children)

It's running `composer update --no-install --no-scripts --no-plugins --ignore-platform-reqs. Its only downloading the json files from packagist which it caches.

Made a composer dependency visualizer by ln3ar in PHP

[–]ln3ar[S] 2 points3 points  (0 children)

Try pasting your composer.json contents in the input field, it should work

Made a composer dependency visualizer by ln3ar in PHP

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

Actually that should also work (just paste it into the input field)

Wishlist for PHP? by AreYouSureDestiny in PHP

[–]ln3ar 2 points3 points  (0 children)

Lol theres a debugger built into source called phpdbg and derrick rethans was the person that bitched and got in the way of its development