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

Can't we just show a "This site may harm your computer" message whenever a site is recording too much timing data? The page is justifiably considered malware at that point.

For example there's nothing preventing someone from timing all my keyboard events for keystroke biometrics: https://en.wikipedia.org/wiki/Keystroke_dynamics


Consider the requestAnimationFrame API. It will give you a 60hz timer (even higher on high refresh rate displays) but is used for a ton of animation related tasks as well as games. That said it effectively can be used as a timer which in this case would likely be precise enough.

What do you do in the case where a ton of website's use this API for legitimate animations?


Won't your example trigger an infinite loop of celsius/fahrenheit conversions? Especially if the floating point value is slightly off.

I think your example is exactly why stuff like React won vs data-binding frameworks. With declarative programming, you just have a single source of truth that you change once (you can arbitrarily pick celsius or fahrenheit or even kelvin) and let the framework figure out what needs to be diff-ed in the derived views.


I'm not aware of any actual real-world GUI system where ".whenChanged do" is valid syntax, but just for the sake of argument, pretend that it only fires when the user changes the textbox. Coincidentally, this also happens to be how the "change" event works in JavaScript.


I know of one that's essentially like that [0], but like you suggested - it only fires on user action, not programmatic update.

(The examples here are for buttons and sliders, but it's the same syntax for input fields)

[0] http://rebol.com/docs/easy-vid.html#section-20


When working on GUIs that used callbacks like this, I’d have a method for setting the value of the second component which didn’t raise a ’changed’ event, or I’d turn off raising events for the second component before telling it to change then tell it to continue.

They weren’t beautiful, but both methods worked fine for the rare cases they proved necessary.


If you want something more accessible, I highly recommend the BBC documentary "The Hidden Life of the Cell": https://www.dailymotion.com/video/x6agslv

If this course is at the same level of production values, I would buy it just for entertainment purposes. It beats watching CGI explosions from movies! It looks like it's just $65 dollars for independent students. The samples look decent: https://www.smart-biology.com/life-unit-1-from-atoms-to-cell...


Cost per GFLOPS: https://en.wikipedia.org/wiki/FLOPS#Hardware_costs

Probably the clearest chart that explains why machine learning is blowing up now, despite the fact that the same neural network architectures existed since 1990s (e.g., LeNet-5).

It's because cost dropped from $47,000 per GFLOPS to $0.02!!!


That $0.02 value is entirely bogus. It is based in the published 30 "teraops" for Xavier, which it uses as teraflops and assumes is comparable to the other flops values. ($699/30 "TFLOPS" = $0.02 $/"GFLOP"). "Teraops" counts int8 performance on the GPU plus the random vision and CNN ASICs in Xavier - it is definitely not equivalent to normal fp32 flops.

It looks like the GPU in Xavier can do 1.4 TFLOPS single precision, so the correct value is $0.49.


I once tried to customize a rich text editor to support SVG text effects (like https://www.smashingmagazine.com/2015/05/why-the-svg-filter-...) and damn near lost my mind.

If I had known that you can write an entire book on just text layout I wouldn't have bothered: https://www.oreilly.com/library/view/svg-text-layout/9781491...


On GCP, maybe firebase auth: https://firebase.google.com/docs/auth


Definitely this.

Edit: let me expand on why. You get to take advantage of the power of all of google's security team, with a nice clean simple api, great client libraries and excellent documentation.

There is also some cool features like the ability to tie custom data to a user (claims) and integrate with the realtime datastore for immediate notifications about changes to the user.

There is some great examples on how to implement this in the docs. I implemented this in my own app so that when I enable a 'role' for a user, the app literally updates (in both a Flutter mobile and React webapp) without even a refresh of the window. Pretty epic UX and super painless to implement.

Oh and it is effectively free.


Non-starter. You're giving all your user information to Google. If you're OK with that, go for it. A lot of people are not.


I hear you. It really depends on your requirements. That said, any site that is currently enabling 'google login' or 'xyz login' other than just a standard email login is already doing this. Never mind the fact that significant numbers of users are already on gmail or google apps.

The trade-off being that you can run the risk of a security hole in your authentication flow.

I still miss Mozilla Persona.

I also looked up the terms... this is the only thing I noticed that was relevant... 'except as necessary' is pretty vague, but I'd take that to mean that they should probably inform you first.

https://cloud.google.com/terms/

5.2 Use of Customer Data. Google will not access or use Customer Data, except as necessary to provide the Services and TSS to Customer.


This is O(n^2) though


All of JS's list processing functions are pretty inefficient, since at the bare minimum each one creates and copies to a new array (as opposed to, say, Rust iterators). You use them when elegance is more important than performance; N^2 is fine when N is eight.


That's always such a dangerous proposition though. Sure _you_ remember it's only fine when N is 8, but then the next guy comes along, or the input constraints change, or future you forgets because it _is_ fairly elegant looking.

I try not to leave grenades laying around too often, myself.


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

Search: