[–] 10 points 2 years ago

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.

  • source
  • [–] 3 points 2 years ago

    ══════════•⊱💀⊰•═══════════

    •STYLISTIC BREADTH

    ══════════•⊱💀⊰•═══════════

  • source
  • [–] 6 points 2 years ago (4 children)

    Doesn't anyone here know that the Death Note (1) curses all those who use it with misfortune and (2) will trap your soul in limbo after use?

    Nah, I'm good. Tweezers and a matchstick.

  • source
  • [–] 11 points 2 years ago* (last edited 2 years ago) (1 child)

    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

  • source
  • parent
  • context
  •  

    Dear Linux community,

    In these shite times, we need to remember to see the human in all of us. So I address the humans of this community:

    1. To the Stallmanites. SCREW CORPORATE YEAHHHHH! Each day humanity grows smarter, no matter how many iPad kids or mass media diatribes there are, so celebrate how far we've fucking come. Look at your oldest machine. You're a million times better. My old Slackware was full of SHIT! FUCK YEAH

    2. To the pragmatists. Linux doesn't get in your way. People get in each others' ways all the time. But most importantly, don't get in your own way. If you're feeling like shit -- the human capacity to hope beats everything to a pulp. You know what we do when shit fucks? We submit a fucking pull request. FUCK YEAH

    3. To the hobbyists. Life is a bundle of fun so feel every moment. When you're old, and you'll be old as fuck, you'll be like "fuck yeah I lived every moment of my life up to now." So fuck another segfault up. Learn C, and call C the best language. Then learn Rust and call Rust the best language. Make a homelab then call homelab the best language. FUCK YAML HOLY SHIIIIIIIT

    Flaming hot wishes,

    Your fellow fucking human.

     

    edit: fixed title

    Journalist and self-proclaimed Freedom of Information Act nerd Ken Klippenstein claims to have released Mangione's manifesto. He also believes that some news sources are withholding it.

    Manifesto (source: Klippenstein)

    To the Feds, I'll keep this short, because I do respect what you do for our country. To save you a lengthy investigation, I state plainly that I wasn't working with anyone. This was fairly trivial: some elementary social engineering, basic CAD, a lot of patience. The spiral notebook, if present, has some straggling notes and To Do lists that illuminate the gist of it. My tech is pretty locked down because I work in engineering so probably not much info there. I do apologize for any strife of traumas but it had to be done. Frankly, these parasites simply had it coming. A reminder: the US has the #1 most expensive healthcare system in the world, yet we rank roughly #42 in life expectancy. United is the [indecipherable] largest company in the US by market cap, behind only Apple, Google, Walmart. It has grown and grown, but as our life expectancy? No the reality is, these [indecipherable] have simply gotten too powerful, and they continue to abuse our country for immense profit because the American public has allwed them to get away with it. Obviously the problem is more complex, but I do not have space, and frankly I do not pretend to be the most qualified person to lay out the full argument. But many have illuminated the corruption and greed (e.g.: Rosenthal, Moore), decades ago and the problems simply remain. It is not an issue of awareness at this point, but clearly power games at play. Evidently I am the first to face it with such brutal honesty.

    submitted 2 years ago* (last edited 2 years ago) by to c/programming@programming.dev
     

    edit: title

    This book is efficient and answered questions the moment as I imagined asking, but to see its unique coolness -- we could do with some context on its literary genus.

    Have you ever seen Kate Gregory's talk: Teach C++ not C?

    The idea is, C++ has different habits than C, even if C++ is a "99% superset of C". But beginners can understand C++ just fine without learning C first. It's more ergonomic to learn about std::vector before using raw arrays and pointers, as Gregory puts it.

    So, why do we teach vim before neovim, or before a well-regarded distribution like LazyVim? Because vim is "purer", installed everywhere? Because we learned it that way? What if we taught LazyVim/Neovim before raw vim, a la C++ before C? Modern features and ergonomics will keep a beginner listening -- surely you don't disagree.

    Anyway, this book is that efficient and direct path to LazyVim. It covers the things that StackOverflow won't be the most useful pedagogues for (e.g. "what are those tab things on top of my window? How do I use the explorer thingamajig on the left -- should I even care about it, anyway?"). Plus, it keeps LazyVim as a first-class learning target, providing its mnemonics and habits alongside the typical vim stuff you'd normally learn with vimtutor.

    I like this kind of learning :) good for the on-the-fencers like me

    submitted 2 years ago* (last edited 2 years ago) by to c/linux@lemmy.ml
     

    The world of Linuxia beckons you! Your annoying guide flexes their gear the moment you spawn

    Gentoo USB (Rare):
    => USE flags: Can rebuild itself
       with or without the other
       three attributes
    => March native: Increases attack
       speed by 1% or -1%
    => Slot: Can use two versions of any
       attribute at the same time
    => PGO: The USB memorizes when you
       attack to increase speed, trading
       off for lower speed elsewhen.
       Requires two rebuilds.
    
    Charm of systemd (common):
    => nspawn: Can build with deeper focus
    => Wisdom tax: The wise are less
       likely to feel neutral toward you
       (+2 or -2 charisma)
    => Chant of systemd: By chanting
    'systemd-analyze calendar "Fri *-*-13"',
       the caster instantly knows when
       the next Friday the 13th is.
    

    Let's have some fun! Spells, items, and dungeons oh my!

     

    When you cryptsetup luksFormat, LUKS2 cryptography defaults to argon2id, a competition-winning gpu-resistant multi-core memory-hard algorithm thingy. Only problem is everyone only supports pbkdf2 instead :3

    • GRUB had an argon2id support patch in the works. Buuut it stopped because a version-pinned dependency added argon2id support, and GRUB wants to update lib x to update lib y to update lib z to update said dependency (2 years later... I'm here D: )
    • systemd-boot is simple and doesn't support argon2id
    • efistub, i.e. making the kernel boot itself (i think?), necessitates secure boot and I'm not sure that's the best way to do this (Ventoy can bypass secure boot with MOKMANAGER funkin' anyway, can't it?)
    • Raspberry Pi's bootloader might support argon2id? idk

    Not to be deterred, I tried manually patching GRUB (tried with aur on a usb, then with portage) but I don't think these are supported with the latest GRUB. (Attempted with whatever the aur package uses, then Gentoo's grub-2.12-r4, then Gentoo's grub-2.12-r5, then git cloning and checking out older versions manually, then picking the earliest 2.12 archive.org tarball to patch lol. All failed with "couldn't find disk"-esque issues)

    Does anyone have this working at or after Nov 2024? And better yet, am I missing something obvious ¯\_(ᵕ—ᴗ—)_/¯

    Threat model: Avoiding a twopointfouristan prank, but also just screwing around for fun (◡‿◡✿)

    view more: next ›