php
PHP 6d ago
Jump
Should I create functions for packages/libraries that allow optional parameters to accept null as a value?
  • Olissipo Olissipo 5d ago 100%

    As long as optional parameters are placed last, I don't see why not.

    PHP8's named parameters lessen the pain of using a function with optional parameters spread around, but I still stick to that rule.

    2
  • TIL mass fatality causing "humam stampedes" and "hysterical masses" are myths which shift responsibility from organisers for fatal crowd incidents which "invariably" result from poor organisation
  • Olissipo Olissipo 3w ago 100%

    This one in South Korea is pretty recent (October 2022).

    A special police team conducted an investigation of the disaster within a few days of it occurring, and concluded on 13 January 2023 that the police and governments' failure to adequately prepare for the crowds, despite a number of ignored warnings, was the cause of the incident.

    6
  • linux
    Linux 3mo ago
    Jump
    Am upgrading from thinkpad to framework 16 with amd. Looking for distro reccommendations.
  • Olissipo Olissipo 3mo ago 100%

    Ok, I understand what you meant, thanks.

    Basically, after I’ve read all of that, it’s clear as day that security is not a priority on Testing. And while band-aid solutions do exist, it’s simply not designed to be secure.

    Yeah, I wouldn't run it in a production environment.

    3
  • linux
    Linux 3mo ago
    Jump
    Am upgrading from thinkpad to framework 16 with amd. Looking for distro reccommendations.
  • Olissipo Olissipo 3mo ago 100%

    Sure, but even in those "few cases" Testing will get them soon.

    I did read at some point that Testing may receive security updates later than stable, might be in those cases in which backports come straight from unstable.

    1
  • linux
    Linux 3mo ago
    Jump
    Am upgrading from thinkpad to framework 16 with amd. Looking for distro reccommendations.
  • Olissipo Olissipo 3mo ago 100%

    I don’t recommend going for (Debian’s/Devuan’s) testing (branch) as it targets a peculiar niche that I fail to understand; e.g. it doesn’t receive the security backports like Stable does nor does it receive them as soon as Unstable/Sid does. Unstable/Sid could work, but I would definitely setup (GRUB-)Btrfs + Timeshift/Snapper to retain my sanity.

    From https://backports.debian.org/ :

    Backports are packages taken from the next Debian release (called "testing"), adjusted and recompiled for usage on Debian stable

    So by definition, security backports in stable are present in Testing in the form of regular packages, right?

    1
  • linux
    Linux 4mo ago
    Jump
    Issue with KDE Plasma 5 and Spotify
  • Olissipo Olissipo 4mo ago 100%

    I remember having some issue like that, but I'm not sure if this was the fix.

    Try unchecking "Show desktop notifications when the song changes" on Spotify's settings (right now it's under the Display section).

    3
  • linux
    Linux 4mo ago
    Jump
    Debian 10 LTS reaching end-of-life
  • Olissipo Olissipo 4mo ago 100%

    Makes sense, thanks.

    2
  • linux
    Linux 4mo ago
    Jump
    Debian 10 LTS reaching end-of-life
  • Olissipo Olissipo 4mo ago 100%

    New to Linux: in which case would you stick with an "old-old-stable" release?

    Software incompatibility?

    5
  • https://www.debian.org/News/2024/20240615

    >The Debian Long Term Support (LTS) Team hereby announces that Debian 10 "buster" support will reach its end-of-life on June 30, 2024, nearly five years after its initial release on July 6th, 2019. > >Starting in July, Debian will not provide further security updates for Debian 10. A subset of "buster" packages will be supported by external parties. Detailed information can be found at Extended LTS. > >The Debian LTS Team will prepare afterwards the transition to Debian 11 "bullseye", the current oldstable release. Thanks to the combined effort of different teams including the Security Team, the Release Team, and the LTS Team, the Debian 11 life cycle will also encompass five years. To make the life cycle of Debian releases easier to follow, the related Debian teams have agreed on the following schedule: three years of regular support plus two years of Long Term Support. The LTS Team will take over support from the Security and the Release Teams on August 14, 2024, three years after the initial release on August 14, 2021. The final point update release for "bullseye" will be published soon after the final Debian 11 Security Advisory (DSA) will be issued. > >Debian 11 will receive Long Term Support until August 31, 2026. The supported architectures remain amd64, i386, arm64 and armhf.

    54
    11
    Size comparison between '24 and '26 Formula 1 cars
  • Olissipo Olissipo 4mo ago 100%

    At first glance the difference in width comes from the front wings, which protruded beyond the wheels in the '22 cars.

    So hopefully the wings last longer in wheel to wheel action.

    15
  • The Future of F1: Showcasing the 2026 FIA Technical Regulations
  • Olissipo Olissipo 5mo ago 100%

    restricting the total amount used and basically anything else makes more sense

    Oh you meant eliminate the flow limit, I thought you meant eliminate the fuel itself. And I agree (with the caveat you said, also limiting the total amount).

    4
  • The Future of F1: Showcasing the 2026 FIA Technical Regulations
  • Olissipo Olissipo 5mo ago 100%

    That won't happen for 15 years at least, only Formula E can be fully electric.

    With an FIA exclusivity deal through 2039 to be the sole EV single-seat series on the FIA menu, Formula E has plenty of time to grow.

    https://www.autoweek.com/racing/more-racing/a44319865/formula-e-ceo-jeff-dodds-sees-sustainable-future-for-electric-racing-series/

    7
  • php
    PHP 5mo ago
    Jump
    Symfony 7.1.0 released (Symfony Blog)
  • Olissipo Olissipo 5mo ago 100%

    I particularly like the new Mapped Route Parameters.

    /show/{id}/

    /show/{id:document}/

    For multiple entities, it's cleaner and more beginner-friendly than using the #[MapEntity] attribute (which is still an option).

    And imo it's a good move to deprecate "not passing the mapping" even for single entities. With the mapping the behaviour is more intuitive and "feels" less magic.

    2
  • symfony.com

    [See new features here (related blog posts list)](https://symfony.com/blog/category/living-on-the-edge/7.1)

    11
    1
    php
    PHP 6mo ago
    Jump
    Why PHP Usage Has Declined by 40% in Just Over 2 Years
  • Olissipo Olissipo 5mo ago 100%

    That's a valid opinion. And I admit that at some point you must move to some form of client-side rendering.

    I still haven't (for some admin panels too, and websites), so I don't feel the need to switch.

    1
  • php
    PHP 6mo ago
    Jump
    Why PHP Usage Has Declined by 40% in Just Over 2 Years
  • Olissipo Olissipo 5mo ago 100%

    Aren't you only saying, indirectly, that server-side rendering is "antiquated"?

    Unless you mean that mixing logic with templates is bad, in which case I agree.

    1
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearMI
    Jump
    You'll never get a promotion that way.
  • Olissipo Olissipo 6mo ago 100%

    Funny story. 50 years ago, to this very day, a revolution occurred in which Portugal took down its dictatorship.

    The following day some public administrator/manager sent a letter complaining about people missing work!

    Translation after the letter

    Your Excellency Director General

    I inform Your Excellency that yesterday, April 25, 1974, several employees were absent from work, claiming that a revolution had occurred in the country.

    I clarify that this revolution was not authorized by superiors, and no justification was seen for the absences, especially as the service was considerably delayed.

    As the current legislation does not provide for absences due to the occurrence of revolutions, I submit the matter to your high discretion, in the certainty that it will deserve due attention.

    57
  • WooCommerce - weird behaviour and fix
  • Olissipo Olissipo 6mo ago 100%

    If it’s one of those things to try to make it easier for the technically challenged but ends up making more advanced techniques difficult or impossible I’m not a fan.

    In my opinion, the issue in this post is an outlier (although a surprisingly bad one).

    My experience with blocks (or the "Gutenberg editor") has only been in creating custom blocks, I can't speak for using built-in blocks or blocks bundled in plugins.

    With this context in mind, I've really liked this new editor used in conjunction with the "Advanced Custom Fields" plugin.

    And you can still use those old page builders like Visual Composer/WP Bakery (which I hate) or create templates yourself for each page, this is just another tool.

    I haven’t dived into it enough yet to see what purpose it serves or problems it aims to solve.

    I know of a project which is a good example. Very large website, but most of their content is written by non-technical people (regarding the web). They have a small team which makes custom blocks and dictates how they are used by other people when posting new content.

    I think using blocks helped them to maintain and improve a cohesive design even with so many people editing the website and after considerable years.

    I wasn’t convinced that trying to take a more advanced product like WordPress and dumbing it down for non-technical use cases was the best idea

    In that regard I reckon this is a step in the right direction for the WordPress ecosystem (but again, my experience is limited).

    1
  • This might not be new, I hadn't dealt with WordPress/WooCommerce in a while. Currently (v8.8.2) in a **new** WooCommerce installation the "Checkout" page is created using blocks, like so: ``` <!-- wp:woocommerce/checkout-payment-block --> <div class="wp-block-woocommerce-checkout-payment-block"></div> <!-- /wp:woocommerce/checkout-payment-block --> (...) ``` **The problem** This might introduce breaking changes to the plugins and themes you normally use. For example, I couldn't add a new field - programatically or using a plugin. **The fix** Remove the blocks and revert to using the shortcode: `[woocommerce_checkout]`

    6
    2
    What's the best concert or live performance you've ever attended, and what made it unforgettable?"
  • Olissipo Olissipo 6mo ago 100%

    The band played 2 early albums + their latest one in sequence. Listening to whole albums in one go was great for many reasons.

    3
  • Do any of you program on non-US keyboard layouts?
  • Olissipo Olissipo 9mo ago 100%

    Fellow PT-PT ISO user here. And although I use PT-PT in the OS, both my mechanical keyboards' physical layout is DE ISO, which has most special symbols in the same place. (finding DE keyboards is easier)

    I've considered switching to UK ISO before. Typing brackets "[] {}" and a semicolon ";" is harder in PT-PT. Especially the curly brackets {}, which are really awkward to type with my small hands.

    2
  • A library in a compiled language that calculate MFCC of an audio file?
  • Olissipo Olissipo 9mo ago 100%

    One that is written in C and also has a Python module: https://aubio.org/

    2
  • You don't need JavaScript for that - HTMHell
  • Olissipo Olissipo 11mo ago 100%

    Not a fan of datalist:

    • Barely works in Firefox (need to click again after initial focus);
    • Doesn't work at all in Firefox mobile (if there is some magic to show the options, I don't know what is);
    • In Chromium and Safari mobile (tested through appetize.io), I don't like how similar it is to a select:

    Somewhat liked Chrome's implementation in Android:

    7
  • symfony.com

    [Also released Symfony version 6.4.0 (LTS)](https://symfony.com/blog/symfony-6-4-0-released) [See Symfony 7.0.0 / 6.4.0 features here (related blog posts list)](https://symfony.com/blog/category/living-on-the-edge/7.0-6.4)

    5
    0
    www.youtube.com

    Bullet points from the video's chapters, with timestamps: - [Seb on sustainability](https://www.youtube.com/watch?v=T0vCfduCTM0&amp;t=0s) - [Life after F1](https://www.youtube.com/watch?v=T0vCfduCTM0&amp;t=220s) - [Seb on his career](https://www.youtube.com/watch?v=T0vCfduCTM0&amp;t=540s) - [What does it take to win multiple championships](https://www.youtube.com/watch?v=T0vCfduCTM0&amp;t=610s) - [How good is Max Verstappen](https://www.youtube.com/watch?v=T0vCfduCTM0&amp;t=720s)

    17
    1