Readit News logoReadit News
piotrkubisa commented on A look at modern PHP   lwn.net/SubscriberLink/81... · Posted by u/lukastyrychtr
aosmith · 6 years ago
Oh doctrine, those were the days... I spent a couple years working on a project that was eventually rewritten in rails because there was a memory leak that required restarting the server ever night via cron.
piotrkubisa · 6 years ago
Yeah, PHP scripts in CRON, especially those using some relational database were my nemesis that time too. The nice thing, which in PHP 5.5 was introduced is generators, that almost completely resolved the problem with memory leakage in such scripts IMHO.

[0]: https://www.php.net/manual/en/language.generators.overview.p...

pqb commented on A look at modern PHP   lwn.net/SubscriberLink/81... · Posted by u/lukastyrychtr
mnm1 · 6 years ago
Do you ever profile doctrine? I found its overhead to be 10x the actual time of my average query. Most of the time is spent hydrating. I wonder how people can put up with such a level of performance reduction and still claim they are using decent tools.
pqb · 6 years ago
Of course! I believe almost all PHP devs noticed, they have terrible slowdown by Doctrine and used XDebug to check where is the problem. I am not PHP dev anymore and I hope it has improved a lot since my last adventure with this ORM but I'd still advocate to not use it on client-facing interface - you can use Doctrine only for database management (CLI), while for web interface use raw PDO or equivalent (Eloquent). You can also use cache or transform page into static-site. Sky is the limit.
piotrkubisa commented on A look at modern PHP   lwn.net/SubscriberLink/81... · Posted by u/lukastyrychtr
tudorw · 6 years ago
Symfony is an outstanding framework and a real pleasure to build with.
piotrkubisa · 6 years ago
The really nice thing of Symfony framework is database schema mapping and migrations, which have compatibility with numerous database systems and provides abstraction layer [0], that among many options of interfaces have quite handy YAML-formatted schema mapping [1]. Nothing extraordinary these days but it is really stable and simple to use.

[0]: https://symfony.com/doc/current/doctrine.html

[1]: https://www.doctrine-project.org/projects/doctrine-orm/en/2....

piotrkubisa commented on A look at modern PHP   lwn.net/SubscriberLink/81... · Posted by u/lukastyrychtr
s1k3s · 6 years ago
The amount of misinformation, false claims and unsupported statements in this thread is mindblowing for the quality that I've been used to see on HN.

Here are some facts:

- Symfony was the backend framework with the most contributors in 2019 [1] (yes, out of any backend framework written in any language)

- PHP has more active contributors than it ever had [2]

- Laravel is one of the most used frameworks in the world [3]

Then I see statements like "PHP only exists today because of legacies being maintained". Can't provide stats on this, but neither can the people who make these statements. Might be just because I'm a PHP dev myself but I see a lot of new projects started with the above frameworks.

And last, people compare it to languages like Rust or Go since they consider those are "innovative". I hope everyone understands that a language is fit for a certain type of task. PHP was created for website development, and in that area neither Go or Rust are even close to matching it in terms of maturity.

I may be biased but for me, choosing php for a new project is a no-brianer. The only other 2 stacks to which I can compare it are the Spring stack of Java or .NET core, and except for these two I wouldn't seriously consider any other competitor for starting a new project. Unless, of course, that project is "for fun" and you want to experiment with new technologies.

[1] https://symfony.com/blog/symfony-was-the-backend-framework-w...

[2] https://github.com/php/php-src/pulse

[3] https://trends.builtwith.com/framework/Laravel

piotrkubisa · 6 years ago
It is also worth noting the number of packages published on packagist.org [0] (kind of npmjs.com for PHP), which is rapidly growing.

[0]: https://packagist.org/statistics

piotrkubisa commented on Multi-account containers add-on sync feature   blog.mozilla.org/security... · Posted by u/room505
drdaeman · 6 years ago
Wow. I did the same thing, except that mine was written in Python/Django (and it was a crude hack) and that I've hosted it on bare metal.

I've used that for 3 years, then I've abandoned it because mainenance was a pain, and I haven't figured out (despite the code being there in the open!) how to get iOS app to log in - my JS was missing some magic call and all Firefox did show is an error message (not the served HTML page).

I've commented a bit about my experiences here: https://news.ycombinator.com/item?id=18448125

piotrkubisa · 6 years ago
Yeah, I don't complain on maintenance by now, but I anticipate it might be problematic as soon as new features comes in. I am looking forward to create a fork from their Rust[0] backend and include DynamoDB as a storage to keep compatibility with the latest version of Firefox Sync Server protocol.

[0]: https://github.com/mozilla-services/syncstorage-rs

piotrkubisa commented on Multi-account containers add-on sync feature   blog.mozilla.org/security... · Posted by u/room505
Teever · 6 years ago
Browser sync seems like a really cool feature but the last time I tried to host my own version of the sync server from Mozilla I found the documentation to be sparse and the software ultimately non-functional.

Has anyone had any positive experiences with self-hosting the Firefox Sync Server?

piotrkubisa · 6 years ago
I wrote my very own Firefox Sync Server, completely from scratch, based on their docs but also based on mozilla-services's Python code and some Firefox OS codebase. I mostly used Go as a programming language and AWS Lambda/DynamoDB as a way to store and serve API endpoint.

> [...] I found the documentation to be sparse and the software ultimately non-functional.

Yes, my first take on the documentation was the same - existing but hard to understand in first proof-read. As I implementing my own sync and token server I really often I was catching myself "hey, you don't have to look into Python code, they really wrote how it should work in docs", especially [0] and [1] pages. There are also few other websites owned by Mozilla, which are very outdated, so also misleading.

Ah, worth noting is about:sync extension [2] and logs stored in the profile directory, which may help you to investigate some issues that might come during development and maintenance.

> Has anyone had any positive experiences with self-hosting the Firefox Sync Server?

I am biased a bit, because I had one very negative experience related to token verification error, which costed me ~4 dollars, before I noticed and I had put service into downtime for some months. However, I am really happy about a whole project. Operational costa are is about few cents per month. It also helped me to write some tools I use on daily basis and preserve knowledge I have learned about serverless applications on AWS.

[0]: https://mozilla-services.readthedocs.io/en/latest/storage/ap...

[1]: https://mozilla.github.io/application-services/docs/sync/faq...

[2]: https://github.com/mhammond/aboutsync

piotrkubisa commented on Building a Linux Desktop for Cloud Native Development   blog.alexellis.io/buildin... · Posted by u/alexellisuk
giancarlostoro · 6 years ago
Possibly some lightweight custom DE based on Gnome's SDK, like tiling manager possibly, to give it a ChromiumOS vibe, but you can still use other utils from Ubuntu. But one that's not too focused on shortcuts only.
piotrkubisa · 6 years ago
Could you expand what do you mean by "ChromiumOS vibe" (ELI5)? Do you look for a i3 inside GNOME Shell?

PaperWM[0] is an example of a tiled scrolling (window) manager based on GNOME SDK (Mutter) that runs in GNOME session.

[0]: https://github.com/paperwm/PaperWM

piotrkubisa commented on Tips from Poland on Old-School Zero Waste (2019)   culture.pl/en/article/tip... · Posted by u/ericdanielski
praptak · 6 years ago
Some memories from the 70s and 80s in Poland: We did wash the plastic bags in order to reuse them, which is now unthinkable. I remember mom sticking them to the bathroom tiling in order to dry.

Also, no plastic garbage bags. Everybody just hauled buckets of trash to the big container to come back home with an empty bucket. This is also unthinkable now.

piotrkubisa · 6 years ago
> Everybody just hauled buckets of trash to the big container to come back home with an empty bucket.

I have born in 90s, but I lived in a block from that era and remember how chute for trash was a nice idea - in winter time I haven't had to leave building to empty the trash bin.

piotrkubisa commented on Building a Linux Desktop for Cloud Native Development   blog.alexellis.io/buildin... · Posted by u/alexellisuk
giancarlostoro · 6 years ago
I am still waiting for a Ubuntu Spin that attempts to do this. It would make for a nice change.
piotrkubisa · 6 years ago
> I am still waiting for a Ubuntu Spin that attempts to do this.

You made me curious: what does mean _this_ in your comment? What do you like in ChromiumOS and would like to see in Ubuntu? What is in Ubuntu that you would like to have replaced with a ChromiumOS-like alternative?

piotrkubisa commented on Show HN: I made an open-source anonymous email forwarding service   anonaddy.com/... · Posted by u/willbrowning
mratzloff · 6 years ago
It really doesn't take much at all to get blacklisted by Gmail or others. Companies like MailChimp have agreements in place with Google.

Unfortunately, mail delivery is far, far harder than it should be.

piotrkubisa · 6 years ago
> Unfortunately, mail delivery is far, far harder than it should be.

However, we still receive spam e-mails to our inboxes.

u/piotrkubisa

KarmaCake day551March 20, 2016
About
Software Engineer

E-mail: My username [at - without these brackets] Google Mail service com

[ my public key: https://keybase.io/piotrkubisa; my proof: https://keybase.io/piotrkubisa/sigs/48OF4qNZeEa0cZsAgANWMKn9vJZuQurNeBlQnl9rjDQ ]

View Original