HNHacker News
TopNewBestAskShowJobs

uwu

113 karma · joined June 22, 2016

No information given.
submissionscomments
uwu··on Tell HN: Exercise caution with links to archive sites
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

uwu··on RFC 3339 vs. ISO 8601
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··on Twitter internal panel linked to account hijackings
uwu
uwu··on The 5.7 kernel is out
*GNU/Linux kernel
uwu··on BOLT: Binary Optimization and Layout Tool
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.

uwu··on Programming Fonts – Test Drive
from wikipedia:

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

uwu··on GCC 8 Link Time and Interprocedural Optimization
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

uwu··on LR Parsing: More Elegant Than You Think
the font loader script is causing it to never load for me

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

uwu··on Node v10.0.0 Released
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

uwu··on Many major websites are taking silent anti-ad-blocking measures
> 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...

uwu··on DSLR-Quality Photos on Mobile Devices with Deep Convolutional Network
browser zooming doesn't work on the site (seems like it's caused by using viewport-relative units in css for the font size)
uwu··on Bitcoin mining heats homes for free in Siberia [video]
https://curecoin.net
uwu··on GitHub Desktop 1.0
> heavy and feels like a website rather than an app

the electron app is noticeably faster than the old client for me (on windows)

electron probably also means it'll be easier for them to add features in the future

uwu··on GitHub Desktop 1.0
am i using the same clients as everyone here or do people just like complaining about electron at every opportunity?

the new client is actually much faster for me, it starts up faster (1.5s to show the gui fully loaded vs 4s to show the gui and another 3s to finish loading what's on the screen) and there's no lag when using it (unlike with the old client)

i also prefer the new ui, i find it to be clearer than the old one

uwu··on Ask HN: What would you change about JavaScript if you could?
not a change to an existing thing but i have a feature idea: variables that aren't initialized until the first time they're accessed

  textarea.onkeydown = event => {
  
    // doesn't get the properties until they're accessed
    const get {selectionStart, selectionEnd, value} = textarea;
  
    // doesn't actually call .slice yet
    const get selectedText = value.slice(selectionStart, selectionEnd);
  
    // ...
  
    if (event.key === "Enter") {
  
      // initializes selectedText
      console.log("selected text: " + selectedText);
  
      // uses the same value, doesn't reinitialize it
      selectedText;
    }
  };
uwu··on Show HN: JavaScript lib to read tags from audio formats
the title made me expect more than a 31-line node.js wrapper for ffprobe
uwu··on When to Use Arrow Functions with React
> However, if you’re using Babel (or create-react-app) to build your source, you have another option: setting arrow functions as class fields (or arrow function methods).

> This gives you the best of both worlds. You get the improved performance from only defining functions once, but you still get the simple method-like syntax.

i think this is wrong because class fields are evaluated in the constructor

i dislike the class fields proposal because it's confusing (as shown by the article) and adds little value (can already use a constructor) and lets you sprinkle the fields all over the class definition instead of having them in one place (the constructor)

also, how it makes own properties instead of prototype properties which would be consistent with how methods are already defined in the class body

only the static fields part of the proposal is good because it's useful (there's no constructor for static fields) and behaves as expected (no "own property vs prototype property" question to get wrong)

uwu··on uBlock Origin Maintainer on Chrome vs. Firefox WebExtensions
chrome has a setting to block scripts and it lets you add exceptions for sites

it's also easy to access: http://cdn2.ubergizmo.com/wp-content/uploads/2012/11/site-in...

i wish firefox came with something similar

uwu··on Can I do FP in my language?
you forgot to say what's bullshit about it
uwu··on WTFJS – a list of funny and tricky JavaScript examples
i actually got it from https://wtfjs.com/ which was linked in another comment

someone explained how it works here: https://news.ycombinator.com/item?id=14891850

uwu··on WTFJS – a list of funny and tricky JavaScript examples
> Object.create(Array).length === 1 //true

it bothers me how the examples are often misleading or just misusing language features but people who don't know the language will gladly agree with them and have their "js sucks" belief reinforced

uwu··on Avoid these common JavaScript mistakes
> 1. Not Adding Semi-Colons

nice

uwu··on Immutable list implementation in JavaScript without [] and {}
> But to deal with a really big list in JavaScript we need tail call optimization. And luckily ES6 has it.

it was never on by default in v8 and it was completely removed recently which makes me sad

https://bugs.chromium.org/p/v8/issues/detail?id=4698#c69

uwu··on 60 FPS Animations with CSS3
`transition: none` breaks pages relying on the "transitionend" js event (edit: and i guess the other transition-related events i forgot about), i noticed logging into google wouldn't work with it (it wouldn't hide some gray overlay)

here's what i use instead:

  /* forgot if this was needed but i think using !important here broke something */
  transition-property: none;
  
  /* maybe not needed */
  transition-delay: 0!important;
  
  /* non-zero to support "transitionend" event */
  transition-duration: 0.0000001s!important;
  
  /* possible tiny optimization */
  transition-timing-function: linear!important;
i don't know if `animation` has events associated with it but i haven't came across any sites breaking without them
uwu··on The future of MDN: a focus on web docs
i like php.net's "user contributed notes" system:

https://secure.php.net/manual/en/function.htmlspecialchars.p...

https://secure.php.net/manual/en/function.preg-replace.php#u...

https://secure.php.net/manual/en/function.header.php#usernot...

uwu··on Picking the best JavaScript engine for your Node app’s performance
i was expecting benchmarks of actual code, not just known performance killers

it'd probably be more representative of overall performance that way

if you select and use an engine here based on how fast it can leak arguments objects or some other weird case, you won't know if it's actually faster at running real code

and anyway i don't think choosing an engine is that important when they're all fairly decent, and if you want speed you should be optimizing your program's logic instead of only relying of how well the engine runs it

uwu··on Optimization of Computer Programs in C
on tail recursion elimination:

> I have seen it done with Scheme compilers, so it is possible. Programmers who write code this way (other than for example purposes!) should be beaten about the head and shoulders with a blunt dandruff-removing object.

wow ok

uwu··on GiftAMeme – Give someone a meme :)
i liked it until i saw the fingerprinting & popup advertising script on the page (a pretty shitty thing to do to your users)

things like this make me even more glad i switched off javascript by default (the site even worked fine without it)

uwu··on Error Handling in C++: Why You Should Use Eithers, Not Exceptions or Error-Codes
shouldn't an optimization like this be performed by compilers?
uwu··on Why I chose ClojureScript over JavaScript
> If you have worked on any sizeable JS code base, you have probably dealt with some of JS’s language quirks such as function context (this), hoisting, prototype inheritance, number array sorting, and the list goes on….

so clojurescript is just another language for people who don't want to bother learning javascript?

Page 1 of 3Next →