Olissipo

joined 2 years ago
[–] Olissipo@programming.dev 9 points 6 months ago

Yes. From their v0.0.1 blog post:

We plan to publish such a tagged release every month. For now, we are adopting a simple release process where we will use a recent nightly build and perform additional manual testing to identify issues and regressions before tagging and publishing the binaries.

[–] Olissipo@programming.dev 6 points 7 months ago (1 children)

Don't forget to stock up on Rooster of Barcelos towels when you visit Portugal

Dining table with a towel depicting several Roosters of Barcelos in large scale. They are somewhat realistic depictions of real roosters, expect they have large combs that fall to their back like hair

(yes, that's the same rooster in Nando's logo)

 

You can now jump to a CSS custom property's definition from within the var() function in style rules.

On clicking the arrow here:

You get jumped to where it's defined, and it's briefly highlighted.

The events tooltip in the Inspector now shows a badge besides custom events, making it easier to differentiate them from built-in events.

I think it's the "User-defined" badges I circled:

Full release notes

[–] Olissipo@programming.dev 1 points 9 months ago* (last edited 9 months ago)

The silent keys part were a disappointment, it is way louder than the previous one (had cherry MX silent keys). However, the rest is pretty nice.

Did you try O-rings? They dampen the sound of the keycap hitting the base of the keyboard.

https://www.gloriousgaming.com/en-eu/products/glorious-mx-o-ring-switch-dampeners

Maybe it won't matter with those switches, but they also helped with the switch actuation of my MX Blues. I noticed some high-pitch sound from the springs, and that also got dampened.

 

I'm posting this in case it helps anyone, but also for a sanity check (anyone has a better solution?).

My issue - using 3rd party packages and SCSS (and the solution in the docs)

Using Bootstrap as an example:

Running php bin/console importmap:require bootstrap doesn't import SCSS.

The easy provided alternative is installing as Composer package with composer require twbs/bootstrap, and importing the SCSS from there. This happens to work for Bootstrap, but may not be an option for others (there may not be a composer package)

My alternative

CSS

  1. Install (at least these) third party packages using npm like usual.
  2. In the app's SCSS file, import using the relative path to the node_modules's bootstrap: @import '../../../node_modules/bootstrap/scss/bootstrap';

JS

  1. In config/packages/asset_mapper.yaml add the path specifically for the third-party package to be included. My file is looking like this:
framework:
    asset_mapper:
        # The paths to make available to the asset mapper.
        paths:
            - assets/
            - node_modules/bootstrap/dist/js
        excluded_patterns:
            - 'assets/styles/scss/**/*'
        missing_import_mode: strict

when@prod:
    framework:
        asset_mapper:
            missing_import_mode: warn

  1. In importmap.php add the path ( and with entrypoint set to true). This only works because of the previous step.

return [
    'app' => [
        'path' => './assets/app.js',
        'entrypoint' => true,
    ],
    // ...
    'bootstrap' => [
        'path' => './node_modules/bootstrap/dist/js/bootstrap.bundle.min.js',
        'entrypoint' => true,
    ],
];
  1. Import in the template as usual
{% block importmap %}
    {{ importmap([
        'bootstrap',
        'app',
    ]) }}
{% endblock %}
[–] Olissipo@programming.dev 7 points 1 year ago

To note that there is one positive type of gentrification that has appeared in Portugal. In the interior there are many small villages that are mostly empty and which have been a target for some richer immigrants.

Hotels and Airbnbs too, it's not an issue when most of the houses are empty anyway.

[–] Olissipo@programming.dev 4 points 1 year ago* (last edited 1 year ago) (1 children)

Funny you call it magic, what actually does the conversion is Imagick.

In my project I have it integrated in the upload process. You upload a PNG/JPG and it does its thing. Since it's written in PHP (my project), and PHP has an extension to call Imagick, I didn't need to write any complicated code.

You can see on this page if your programming language of choice has any integration with Imagick.

But there's always the command line interface. Depending on your process it may be easier to create a script to "convert all images in a folder", for example.

[–] Olissipo@programming.dev 4 points 1 year ago* (last edited 1 year ago) (3 children)

but 2KB vs 200KB is paltry on even a terrible connection in the 2000s).

You still need to resize the images and choose the right ones (even if only for the device's performance).

So we might as well do that small extra step and add conversion to the process.

What I really wish is that we could get more browsers, sites, and apps to universally support more modern formats to replace the overly bloated terribly performing and never correctly pronounced animated formats like GIF with something else like AVIF, webm, webp (this was a roughly ~60MB GIF, and becomes a 1MB WEBP with better performance), or even something like APNG…

Isn't that the users' fault? And of the websites for allowing those huge GIFs.

Apparently browsers have supported MP4 for a long time.

https://caniuse.com/mpeg4

[–] Olissipo@programming.dev 7 points 1 year ago (2 children)

Even using the highest compression levels, barely any difference. Not worth it

If I understand correctly gzip, brotli and similar are best used to compress text.

Font files also shouldn't be compressed. A TTF file compresses a bit, but a WOFF2 file will be even smaller than that (and WOFF2 also doesn't compress well). So might as well use WOFF/WOFF2

[–] Olissipo@programming.dev 2 points 1 year ago

For most of the images that I tried you can only see differences with the images side by side. It's really subtle.

I do have one example for which my config must be bad, compresses a lot but introduces a lot of noise

[–] Olissipo@programming.dev 1 points 1 year ago

In case you still can't load the image, for the largest width the JPG file has 229.9KB, WEBP has 123.5KB, AVIF has 72KB.

[–] Olissipo@programming.dev 73 points 1 year ago* (last edited 1 year ago) (41 children)

I'm working on a project which generates images in multiples sizes, and also converts to WEBP and AVIF.

The difference in file size is significant. It might not matter to you, but it matters to a lot of people.

Here's an example (the filename is the width):

Also, using the <picture></picture> element, if the users' browsers don't support (or block) AVIF/WEBP, the original format is used. No harm in using them.

(I know this is a meme post, but some people are taking it seriously)

 

June 17, 2025

  • 13:30–19:00 CET/CEST
  • 07:30–13:00 EST/EDT
  • 11:30–17:00 UTC
[–] Olissipo@programming.dev 2 points 1 year ago (1 children)

MultiViewer (which is an unofficial program, mind you) does support Linux, but you need to download the installer manually to install and update.

Other than that it works great

 

My TLDR is:

  • Their team was using PHP

  • Before doing a complete re-write they evaluated other languages

  • Rust ruled out due to cost/benefit, being the fastest in the list, but also the most complex

  • PHP kept as the main language because:

    • The ecosystem is mature
    • The PHP/Symfony (and Roadrunner) stack meets their high-performance needs
  • Inertia: their team "already had extensive experience" in it

  • They already integrated Go in some microservices

  • They aren't locked to PHP, and will continue to evaluate these programming languages and others

3
submitted 1 year ago* (last edited 1 year ago) by Olissipo@programming.dev to c/symfony@programming.dev
 

Twig 3.15 was released a few weeks ago and includes an impressive list of new features and improvements. This two-part blog post highlights the most important ones.

Edit: Part 2

view more: next β€Ί