Hacker Newsnew | past | comments | ask | show | jobs | submit | uwu's commentslogin

the top-fwz1 script is mail.ru's statistics counter

https://top.mail.ru/help/en/rating

> Top Mail.Ru is a statistics system for site owners. You need to get and install the counter code on the pages of your site to collect data.

you can see the same code snippet that's on archive.ph here: https://top.mail.ru/help/en/code/receive


chrome's extension api for downloads has the same limitation

filenames that are reserved names on windows (like NUL) or contain characters that are reserved on windows are refused with "Invalid filename", even on platforms and filesystems that don't have the same limitations

this might be desirable for enforcing portability in extensions, but the thing isn't mentioned in the documentation[1] for the api so you had to know about it beforehand (like most extension devs, probably) or find out the hard way when some of your downloads unexpectedly fail (like me)

i was using it on linux in a personal extension i wrote, and i thought it was silly that i had to add extra code to further sanitize and mangle the filenames for an OS i don't even use

[1] https://developer.chrome.com/docs/extensions/reference/downl...


uwu


*GNU/Linux kernel


No, the kernel is just linux


Kernel of the GNU/Linux system. /s


similar thing from google: http://lists.llvm.org/pipermail/llvm-dev/2019-September/1353...

> Inspired by the performance gains and to address the scalability issue of BOLT, we went about designing a scalable infrastructure that can perform BOLT-like post-link optimizations.

> Our experiments on large real-world applications and SPEC with code layout show that Propeller can optimize as effectively as BOLT, with just 20% of its memory footprint and time overhead.


One thing I really wanted to be able to do with Propeller was a post-link optimization of a Go program. Go's compiler is both fast and terrible. If you glance at the text, opportunities for simple optimizations abound. Unfortunately the layout of the program, references between the debug information and the function entry points, and Propeller having been designed for C++ programs kept me from getting very far. I did get a little ways, but not far enough that I could keep a long-running Go program from crashing.


Did you mean bolt instead of propeller? Bolt optimizes binaries, propeller is an llvm fork with extra information and a special linker.

Neither is made to do the optimizations you are talking about, that is what regular llvm does.



from wikipedia:

> The DejaVu fonts are modifications of the Bitstream Vera fonts designed for greater coverage of Unicode, as well as providing more styles.


when i was a full-time hobbyist webdev i was surprised when i learned c compilers don't do whole-program optimization by default but limit themselves by optimizing each translation unit separately (i guess it makes things simpler)

you can get "LTO" in javascript by using a minifier together with something like webpack which can inline modules when it's safe to do so (instead of putting them in functions that are called by the module loader and can't be minified away), so i assumed "real" compilers must do that stuff a lot better with the language being less dynamic


In addition to simplicity it cuts down on compilation time. You can checkout MLTon or Felix to get a feel for whole program optimizing compilers, they can do optimizations that are impossible without LTO and hard to do with.

https://github.com/felix-lang/felix

http://felix-documentation-master.readthedocs.io/en/latest/m...

http://mlton.org


the font loader script is causing it to never load for me

i run latest chrome with the --disable-remote-fonts command line option


I've added a timeout on the font loader, you should make it through after a few seconds, although I don't know how good the page will look without the custom fonts.

I've also added a transpiler.


you've misunderstood, it just emits a warning for using the Buffer constructor which is deprecated in favor of Buffer.from and others[1]

it's limited to code outside of the node_modules folder to prevent dependencies from triggering an unactionable message

[1] https://nodejs.org/api/buffer.html#buffer_new_buffer_array


> I wish chrome added an option for tampermonkey scripts to be run with disabled js, that would make this solution perfect.

that's up to tampermonkey but maybe it's possible that google wouldn't like it since it would let userscripts access extension apis

what tampermonkey does is inserting the script into the page in a script tag to isolate it from the extension[1] and let it access variables defined by scripts on the page, but if scripts are blocked on the page it just doesn't run

i made my own custom js manager (with no userscript api support) that lets you choose if the script should be ran in the extension or page context (defaults to extension which works with scripts blocked) but i don't know if it's in good enough state to put on the internet and i've never really made things for anyone but myself

[1] https://developer.chrome.com/extensions/content_scripts#exec...


I know, author of tampermonkey is waiting for this https://bugs.chromium.org/p/chromium/issues/detail?id=471801 to be implemented. As for the extension that's up to you :) you can just post it on github and not to the store.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: