Thread with 10 posts
jump to expanded posti love that you can call toString()
on a function in JS and get back its source code. it's not something you should do, but there are so many wonderfully silly applications for it. i love this shit
i had a whimsical idea for a gpu compute library, a few years ago: true single-source programming in c, without changing your build flow. you'd just pass the function pointer to the run_on_gpu() function and it'd work even though it shouldn't. how? parsing x86 assembly at runtime
i never actually implemented it but i still love the idea, and what's great is the javascript equivalent is almost practical :3
@hikari one of the interesting side effects of the fact that Brennan Eich, the creator of JavaScript, originally wanted to create a studio lisp, but was directed to create something more C-like instead
@zsarge oh, it would make sense if this were a lisp influence!
@hikari ah, I remember one of the Mozilla blog posts about XUL and WebExtensions, where they talked about how they ported some internal functions from JavaScript to C and then some big extensions broke because they were patching those functions by stringifying and regexing them...
[found it https://blog.mozilla.org/addons/2015/08/21/the-future-of-developing-firefox-add-ons/comment-page-4/ – it wasn't exactly what I remembered, but still]
@grawity hahahaha
@hikari modern day Discord client modding is based around this concept and it's really funny
@hikari oh this is *awful*. I adore this