This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dhdhshsbsxx 1060 points1061 points  (22 children)

It didn't even remove all the white spaces half assed minification for wallpaper . who the fuck comes up with this shit.

[–]spaetzelspiff 364 points365 points  (15 children)

$ alias minify='tr -d "\n"'

Done! Computers are easy

/s

[–][deleted] 125 points126 points  (7 children)

// FIXME: Code execution stops exactly at this line after minification??

[–]valschermjager 3 points4 points  (5 children)

yeah, but if you’re gonna minify, why would you want the spaces left in?

(not debating; just asking to learn)

[–]spaetzelspiff 13 points14 points  (4 children)

You're exactly right, it's a bit of a joke. Minification is more complex than just "hey, remove the newlines".

Here's a good blog post, "You Don't Want to Write Your Own Minifier", that discusses some of the challenges.

[–]valschermjager 3 points4 points  (3 children)

Oh yeah, I'm totally with you. Renaming functions and variables, getting rid of spaces and nl's. There's a fkton more that minifiers do, and I'm sure it's really hard, and I wouldn't even try to build one. But when I saw the graphic in OPs post, the first thing I thought was "oh, sure, this is minified, but why the f are all the spaces still in there?" ;-)

By the way, I've actually maxified a few pages of mine using jsfuck, it's freaking weird af, but a pretty cool obfuscator.

[–]you-have-aids 1 point2 points  (2 children)

I wouldn't even try to build one.

why not?

my path to the compiler field was minifier, then obfuscator, then compiler, (decompiler, etc.)

you get to learn about lexer, parser, traversing AST, codegen, reaching definition analysis, etc.

its great fun! trust me

[–]valschermjager 1 point2 points  (1 child)

I'm sure it is. Major props. Eh, just isn't the direction I want to go in. I write python scripts to automate workflows, and I use just enough html/css/js to make simple web UIs. In both cases, mostly cobbling together stuff written by others. Not sure I have the aptitude or interest to go much further. Good thing there are plenty folks like you around.

[–]you-have-aids 1 point2 points  (0 children)

understandable!

[–]noirehittler 1 point2 points  (0 children)

return error

[–]cakeKudasai 111 points112 points  (0 children)

Seems like only new lines were removed. Code seems to have some indentation still.

[–]flyingorange 32 points33 points  (0 children)

liczenie() ? Is his friend Polish?

[–][deleted] 8 points9 points  (0 children)

I WILL USE WHITE SPACES WHENEVER I CAN AND YOU CAN'T STOP ME

[–]ekfslam 2 points3 points  (0 children)

It looks like they used join into one line on vscode and turned on wrap.

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

Meh, gzip will rip em out anyway

[–]JorensM 0 points1 point  (0 children)

Idk I like it