News for hackers. Stuff that matters.
Re:YUI Compressor by 8organicbits on Sunday January 07, 2024 @04:34AM (#38899844)
Impressive results. I sort of wish this didn't have the Java dependency as I usually don't have it installed (I guess I'd run it from a Docker container).
Re:YUI Compressor by VoxPelli on Monday January 08, 2024 @08:42AM (#38911778)
I think this ancient project is from before Node.js and npm was a major thing

I predates webpack, uglifyjs etc by years

And is an ancient artifact that has no place in current day JS

Re:YUI Compressor by ot on Monday January 08, 2024 @08:38AM (#38911718)
The repo does not appear to have had substantial changes for ~8-9 years https://github.com/yui/yuicompressor

Yahoo announced development was stopped in 2014: https://yahooeng.tumblr.com/post/96098168666/important-annou...

Is this still relevant?

Re:YUI Compressor by miohtama on Monday January 08, 2024 @08:39AM (#38911725)
For the context, YUI compressor is really, really, old. Like from the era Douglas Crockford was the only person advocating Javascript. Today better compression tools and methods may exist.

YUI the library is from 2005

https://en.m.wikipedia.org/wiki/YUI_Library#:~:text=It%20is%...!

Re:YUI Compressor by cantSpellSober on Monday January 08, 2024 @09:34AM (#38912453)
There's even "dead project, alternatives?" Issue in the Github

https://github.com/yui/yuicompressor/issues/276

For discussion, today's "best" equivalent would be...esbuild?

Speaking of Crockford and minifiers, the delightfully simple site for JSMin (2001) still exists

https://www.crockford.com/jsmin.html

Re:YUI Compressor by miohtama on Wednesday January 10, 2024 @04:59PM (#38943899)
The alternatives themselves are now dead (:
Re:YUI Compressor by arp242 on Monday January 08, 2024 @08:39AM (#38911729)
Is this still being worked on and updated? Looking at the GitHub repo, it's not: https://github.com/yui/yuicompressor

I'm not sure why you'd want to use this over anything else? I used it back in the day when it was more or less the only option, but that's a long time ago.

Re:YUI Compressor by donatj on Monday January 08, 2024 @08:47AM (#38911837)
YUI... Now there's a name I've not heard in a while.

In the early aughts, YUI was always third after jQuery and MooTools. HTMX to me really feels like early MooTools again (before they decided to be more like jQuery)

Re:YUI Compressor by lakomen on Monday January 08, 2024 @08:53AM (#38911897)
I remember using this with Symfony 2.x It required Java to be installed. Well it worked, but Symfony is still a pos framework. Glad I abandoned PHP. I digress but I still have one domain with a Symfony 2.2 project, security issues galore. I manually patched it so I can use 7.4 to run, via a docker build because the OS' version blocks openssl3. Duct tape... And there is no upgrade path for Symfony 2.2 to latest, because the components it uses are deprecated.

On the other hand, my custom made site that I designed without a framework still today works even with PHP8.3 . Sure I had to do some minor compatibility changes.

I've been ranting about all the dogma in the PHP world back in 2010-2013. Most of it didn't make any sense. It added complexity and de development time to gain what exactly? OO fetishism. Did you know that to this day Symfony kernel copies all the request variables from the request context (aka $_GET, etc...) into memory so it can access it in a OO fashion. The request context in PHP never changes FFS! Using Symfony you have a largely reduced number of concurrent requests possible, about factor 4 vs plain PHP. Anyhow... rant over

Re:YUI Compressor by augustohp on Monday January 08, 2024 @09:02AM (#38912005)
I am not against your rant, your are 100% on point there, but maybe your code without framework has issues you don't know?

I would rant against this forced and meaningless deprecations on Symfony-land but the main issue with PHP, IMHO, is people using it don't grok the language strengths - much in the same direction of your rant. For 5-10 years PHP developers have been trying to "bring" great features from other ecosystems making PHP not to be good on anything anymore.

I feel sad. I liked the "hack 'n slash" programming style it allowed. Now everything (everywhere) needs a package manager, a build system, etc.

Re:YUI Compressor by conradfr on Monday January 08, 2024 @09:06AM (#38912066)
To be fair Symfony 2.2 is eleven years old and Symphony 2.3 was actually the first Symfony LTS. Was Symfony even using Composer at this point in time?

I'm pretty sure you can actually update to the recent releases. I have done it for projects started on Symfony 3.x, but yeah of course third party libraries would be a gamble.

It's probably easier to create a new project and backport the relevant code into it.

Also with fast cgi, php-fpm, code preloading and Symfony compilation your rant is mostly irrelevant IMHO.

Re:YUI Compressor by hanikesn on Monday January 08, 2024 @09:27AM (#38912331)
>Symfony is still a pos framework

Symfony was a bit rough in the beginning, but I'd definitely rate it as one of the most well engineered web frameworks out there right now. I've been keeping small and large projects up-to-date for the past 10 years with only minimal effort. You just have to keep 3rd party deps in check.

Re:YUI Compressor by andirk on Monday January 08, 2024 @08:53AM (#38911898)
Can we get a benchmark on this?
Re:YUI Compressor by whalesalad on Monday January 08, 2024 @09:02AM (#38912008)
You'll want to do it on a period correct core 2 duo with a spinning rust 2.5" laptop hard drive.
Re:YUI Compressor by idontwantthis on Monday January 08, 2024 @09:34AM (#38912460)
I used YUI for my first development job in college. I was left completely to my own devices, and had no idea what I was doing so I just shopped around for the library with an example closest to what I needed and it happened to be YUI.
Re:YUI Compressor by johnwheeler on Monday January 08, 2024 @09:38AM (#38912508)
I remember the first time, circa early 2000s, I viewed the source of Google.com via Internet Explorer 4, and saw the minified, obfuscated, source code strung across one long, long line. My previous exposure to sophisticated JS was limited to Macromedia canned MM_Rollover scripts. I thought, man, this paired with their Altavista besting search engine and Marissa Mayer designed, spartan front-page—these folks are some fucking engineers.

That was the feeling at the time for me.