HNHacker News
TopNewBestAskShowJobs

b2ccb2

329 karma · joined July 6, 2018

submissionscomments
b2ccb2··on How to Handle Monetary Values in JavaScript
Yes, but bankers rounding should be the last step in calculation, not an intermediate.
b2ccb2··on How to Handle Monetary Values in JavaScript
That's fantastic! Do you have any more resources on this? I'd like to look at that concept in more depth.
b2ccb2··on How to Handle Monetary Values in JavaScript
I really like the approach Perl 6 takes with FatRat[1]. You basically have an object which holds a numerator and denominator, so all arithmetic calculations do not loose precision.

[1] https://docs.perl6.org/type/FatRat

b2ccb2··on OpenBSD 6.4 released
BCHS seems like the perfect fit for consumer routers/switches with low hardware and a web GUI, very interesting indeed.
b2ccb2··on How to Build a Low-Tech Website
Those are compression techniques, they do not require js, nor a different client and work with the jpeg standard.
b2ccb2··on How to Build a Low-Tech Website
The dithering is nice for some images but it takes some details on graphs etc..

The example image given can be re-compressed using techniques like structural similarity (SSIM)[1] or Multi-scale structural similarity (2003 Paper)[2]. Using jpeg-archive[3] I resized the example image from the blog[4] with decent results:

  /tmp  ls -1sh *.jpg *.png | sort -nr
  740K 6a00e0099229e88833022ad3b23825200b-750wi.png
  100K 6a00e0099229e88833022ad3b23825200b-750wi.jpg
   64K small-fry.jpg
   56K mpe.jpg
   24K ms-ssim.jpg
[1] https://en.wikipedia.org/wiki/Structural_similarity

[2] https://ece.uwaterloo.ca/~z70wang/publications/msssim.pdf

[3] https://github.com/danielgtaylor/jpeg-archive

[4] http://krisdedecker.typepad.com/.a/6a00e0099229e88833022ad3b...

b2ccb2··on Manyverse – A social network off the grid
To anyone using a degoogled Android phone: A F-Droid release IS planned [1].

[1] https://twitter.com/manyver_se/status/1044569401595514880

b2ccb2··on The Tox project
Briar seems interesting (https://briarproject.org)
b2ccb2··on Why the New V8 Is So Damn Fast
> One can't even add 0.1 and 0.2 together and get what you'd expect.

That's floating point math, and persists in many languages [1].

> Variable definitions are global scoped by default, semicolons can randomly be omitted, etc.

Nothing random about it, automatic semicolon insertion is well defined/documented [2]. Also let [3] is your scoping friend.

[1] https://0.30000000000000004.com/

[2] https://www.ecma-international.org/ecma-262/7.0/index.html#s...

[3] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

b2ccb2··on Why No HTTPS?
The https request gets redirected to http:

  curl -IL https://www.bbc.com
  HTTP/2 302
  content-type: text/html
  date: Tue, 24 Jul 2018 08:55:34 GMT
  location: http://www.bbc.com/
  content-length: 0

  HTTP/1.1 200 OK
  Server: Apache
  Content-Type: text/html
  Expires: Tue, 24 Jul 2018 08:56:35 GMT
  Content-Language: en
  …
b2ccb2··on Speculation Attacks Using the Return Stack Buffer
It's even worse than that, from section 10 (Concluding Remarks)

…In the long run, we believe that these patches are ad hoc and that new attack vectors will continue to emerge. Current systems are fundamentally insecure un- less speculation is disabled. However, we believe that it is possible to design future generations of CPUs that re- tain speculation but also close speculative leakage chan- nels, for example by keeping speculative data in separate CPU structures than committed data.

b2ccb2··on The Unleashed Operating System
It's in the docs folder of the public git repo:

http://repo.or.cz/unleashed.git/blob/HEAD:/docs/illumos-refu...

b2ccb2··on The Battle of the Schedulers: FreeBSD ULE vs. Linux CFS [pdf]
The FreeBSD bug report and patch for reference:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223914

b2ccb2··on A div that looks different in every browser
Fixed: https://codepen.io/anon/pen/ZjzWzQ
b2ccb2··on Show HN: Hacker News job trends
The assets are missing [1], just clone the github repo and move the offending directory to '...\node_modules\hacker-job-trends\assets\rowContents'

[1] https://github.com/timqian/hacker-job-trends/tree/master/ass...

← PreviousPage 3 of 3