• 28 Posts
  • 300 Comments
Joined 2 years ago
cake
Cake day: July 22nd, 2023

help-circle
  • First, imagine a number in JavaScript. (Bit of a nail biter here, huh?)

    let i = 5
    

    Then, we will construct an incrementor. This is really simple: here is the method.

    1. Make a bracket-string-centric version of eval().
    []["filter"]["constructor"]("return i+1")()
    
    1. Reconstruct stringy eval() by using +[] as 0, +!+[] as 1, and implicit conversions as ways to create strings. For example, ‘false’ is (![]+[]), so ‘f’ is (![]+[])[+[]].
    [][
      (![] + [])[+[]] + // f
      ([![]] + [][[]])[+!+[] + [+[]]] + // i
      (![] + [])[!+[] + !+[]] + // l
      (!![] + [])[+[]] + // t
      (!![] + [])[!+[] + !+[] + !+[]] + // e
      (!![] + [])[+!+[]] // r
    ][
      ([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+ // c
      (!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+ // o
      ([][[]]+[])[+!+[]]+ // n
      (![]+[])[!+[]+!+[]+!+[]]+ // s
      (!![]+[])[+[]]+ // t
      (!![]+[])[+!+[]]+ // r
      ([][[]]+[])[+[]]+ // u
      ([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+ // c
      (!![]+[])[+[]]+ // t
      (!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+ // o
      (!![]+[])[+!+[]] // r
    ]("return i+1")()
    
    1. Draw the rest of the fucking owl. Final code:
    let i = 5; // haha yay
    
    [][
      (![] + [])[+[]] + // f
      ([![]] + [][[]])[+!+[] + [+[]]] + // i
      (![] + [])[!+[] + !+[]] + // l
      (!![] + [])[+[]] + // t
      (!![] + [])[!+[] + !+[] + !+[]] + // e
      (!![] + [])[+!+[]] // r
    ][
      ([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+ // c
      (!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+ // o
      ([][[]]+[])[+!+[]]+ // n
      (![]+[])[!+[]+!+[]+!+[]]+ // s
      (!![]+[])[+[]]+ // t
      (!![]+[])[+!+[]]+ // r
      ([][[]]+[])[+[]]+ // u
      ([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+ // c
      (!![]+[])[+[]]+ // t
      (!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+ // o
      (!![]+[])[+!+[]] // r
    ](
      (!![]+[])[+!+[]]+ // r
      (!![]+[])[!+[]+!+[]+!+[]]+ // e
      (!![]+[])[+[]]+ // t
      ([][[]]+[])[+[]]+ // u
      (!![]+[])[+!+[]]+ // r
      ([][[]]+[])[+!+[]]+ // n
      (+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+ // ' '
      ([![]]+[][[]])[+!+[]+[+[]]]+ // i
      (+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]])+[])[!+[]+!+[]]+ // +
      +!+[] // 1
    )()
    // no virus i swear. execute arbitrary code in your browser console.
    

    Anyway, that’s just everyday JS work. It’s like step 5 after resizing the button, but a bit before centering the div.

    based on this. some translation methods done differently.






  • Even more magical is the lossless Zstandard is this a name drop?. It does so much stuff, it’s awesome!

    • hella fast compared to similar-leveled compressors (zoom)
    • no matter the zstd compression level, decompression takes equal time! (ux!)
    • zstd can use a user-given dictionary, or train its own on a sample set (wowie)
    • zstd can be used for live compression (compress and decompress as you read and write, not before or after)
      • on ram (install more ram??)
      • in filesystems (2.5x your disk??)
      • saves CPU by not compressing if it’s not worth it (efficiency!!)
    • use ALL the cores!

    So kool. lol










  • foolOPtoLemmy Shitpost@lemmy.worldrap god
    link
    fedilink
    arrow-up
    1
    ·
    23 days ago

    Interesting, 18 up and 16 down as of this comment. Because this started with ~2 downvotes (the first image had terrible jpeg for a few minutes), we either have

    1. my taste did not land
    2. early downvotes beget more downvotes

    this comment is here for notetaking. let’s see if i’m a moron or if iambs are stronger than herds.




  • That’s an interesting perspective actually

    Maybe it’s because of who’s giving them? If my little cousin gave me an AI Christmas card, I’d be happier than if a stranger gave me one on the street. (Though I’d feel bummed if they didn’t even marker in a single custom sentence)

    i.e. higher standards of creativity/effort from a stranger than from a family member.

    Also the stranger isn’t stuffing a tenner in the card lmao


  • foolOPtohopeposting@lemmy.worldi grow
    link
    fedilink
    arrow-up
    3
    ·
    25 days ago

    Almost all cases that I saw someone obsesaing over growth in one domain was hiding or running away from some pain that they coudn’t handle.

    Thanks, this is something I need to think about.