Better HN
topnewbestaskshowjobs
Log inSign up

divbzero

11,264 karma · joined Oct 8, 2017 (9y ago) · 2,949 submissions

Hello, world.

  #!/bin/bash
  name=chris
  user=divbzero
  email=${name}@${user}.com
  code=https://github.com/${user}
  website=https://${user}.com
[ my public key: https://keybase.io/divbzero; my proof: https://keybase.io/divbzero/sigs/o74zfvmaYGlCRV0hSUGRNdI1y03rbNP65tL072qROtg ]

[ my kismet code: ef956b ]

Submissions

comment 4y ago · link · parent

This is what I saw too. Safari apparently does not support SVGStyleElement.sheet:

https://developer.mozilla.org/en-US/docs/Web/API/SVGStyleEle...

comment 4y ago · link · parent

The acquisition of Fox assets dwarfs Disney’s previous acquisitions of content:

  2019  $71.3 B for 21st Century Fox
  2012   $4.1 B for Lucasfilm
  2009   $4.2 B for Marvel
  2006   $6.3 B for Pixar
As well as Disney’s other billion dollar acquisitions:

  2016   $2.9 B for BAMTech
  2001   $2.9 B for Fox Family
  1999   $1.8 B for Infoseek
  1996  $19.0 B for Capital Cities/ABC
https://en.wikipedia.org/wiki/List_of_acquisitions_by_Disney

Bob Iger must have been eager to bulk up before the launch of Disney+?

comment 4y ago · link · parent

Decent performance scores from PageSpeed Insights: 99 on mobile and 100 on desktop.

https://pagespeed.web.dev/report?url=https://berkshirehathaw...

I think this startup has a shot. Maybe even become a $100B+ company someday.

comment 4y ago · link · parent

What puzzles me is that Twitter’s greatest challenges in recent years have not been technical. There shouldn’t be a technical emergency that requires an urgent call for all software engineers.

comment 4y ago · link · parent

I think ”persist the input in the URL query string” could also be doable with static assets alone. The last <script> block in foo.html would need to be replaced with something like:

  <script>
    // calculate output and update query string when any input changes
    a.oninput = b.oninput = c.oninput = function () {
      z.value = foo(
        Number(a.value),
        Number(b.value),
        Number(c.value),
      );
  
      var params = new URLSearchParams();
      if (a.value) params.set('a', a.value);
      if (b.value) params.set('b', b.value);
      if (c.value) params.set('c', c.value);
      history.replaceState(null, '', '?' + params);
    };
  
    // fill in input from query string when page is loaded
    var params = new URLSearchParams(location.search);
    a.value = params.get('a');
    b.value = params.get('b');
    c.value = params.get('c');
    a.oninput();
  </script>

comment 4y ago · link · parent

I like superkuh’s suggestion to serve the spreadsheeets directly, so you don’t need to worry about converting the “calculators” to another language.

If you do want to go through the trouble of converting to another language, JavaScript would be the natural choice because it can run directly in the browser with just “a few static assets to host”. A template like the following would probably work fine as something simple and functional. (This should be a working example if you save the files to a directory and load foo.html in the browser.)

foo.js:

  function foo(a, b, c) {
    // do calculations and return output
    return a + b + c;
  }
foo.html:

  <!doctype html>
  <meta charset=utf-8>
  <title>Foo Calculator</title>
  <link rel=stylesheet href=https://cdn.simplecss.org/simple.css>
  
  <main>
    <h1>Foo Calculator</h1>
  
    <label for=a>A</label>
    <input type=number id=a>
  
    <label for=b>B</label>
    <input type=number id=b>
  
    <label for=c>C</label>
    <input type=number id=c>
  
    <label for=z>Z</label>
    <output id=z></output>
  </main>
  
  <script src=foo.js></script>
  
  <script>
    // calculate output when any input changes
    a.oninput = b.oninput = c.oninput = function () {
      z.value = foo(
        Number(a.value),
        Number(b.value),
        Number(c.value),
      ); 
    };
  </script>
a, b, c, z, and foo will be global variables in foo.html so make sure they have unique names.

simple.css could also be replaced with other classless CSS frameworks.

comment 4y ago · link · parent

I suppose you could spoof having full Internet access by hosting nsci.txt or connecttest.txt locally and editing your hosts file to direct www.msftncsi.com or www.msftconnecttest.com to 127.0.0.1? Conversely, if those Microsoft websites ever failed, countless Windows machines would determine that they have limited or no Internet access.

1118.

Tree views in CSS(iamkate.com ↗)

404 points · by divbzero · 4y ago · 69 comments

comment 4y ago · link · parent

> I'm actually a bit disappointed they used magnets since it'd be so easy to mess up the orientation with a bit of otherwise benign interference.

That happens to a fair description of magnetic compasses as well. I suppose that’s why some compasses use a modern version of the south-pointing chariot (gyroscopes).

comment 4y ago · link · parent

This is a good story regardless, but if you do want to derive some morals from the experience:

– Seemingly simple tasks can be more complex than you expect (“add a leap second on this Wednesday”)

– Real world systems can be more complex than you expect (“bunch of software I never even knew existed”)

– Planning and testing can make a big difference vs. just winging it (“a bunch of our Linux servers had kernel panics for some reason”)

– Success can be a non-event that goes unnoticed (”everything worked and no money went missing”)

– Sometimes the best solution is not a technical solution (“halt the markets for 15 minutes before/after”)

comment 4y ago · link · parent

I’ve also been pleasantly surprised by based on my recent usage. I also like that Google Meet is built for the browser by default—no need or pressure to install a desktop app for calls.

comment 4y ago · link · parent

I would also count the following as software successes:

2012 - Google Drive

2017 - Google Meet

comment 4y ago · link · parent

Earth’s circumference around the poles is now given as 40,007.863 km [1]. So when the French Academy of Sciences defined the metre in the 1790s [2] the distance they measured from equator to North Pole was off by less than 2 km.

[1]: https://en.wikipedia.org/wiki/Earth's_circumference

[2]: https://en.wikipedia.org/wiki/Metre#Meridional_definition

comment 4y ago · link · parent

This is not all that surprising if you flip it around: Your father-in-law has a habit of frugality which led to accumulating far more than he can ever spend.

comment 4y ago · link · parent

Renewed efforts to seat a Cherokee Nation delegate to Congress [1] are based on the following part of the treaty:

ARTICLE 7. The Cherokee nation having already made great progress in civilization and deeming it important that every proper and laudable inducement should be offered to their people to improve their condition as well as to guard and secure in the most effectual manner the rights guarantied to them in this treaty, and with a view to illustrate the liberal and enlarged policy of the Government of the United States towards the Indians in their removal beyond the territorial limits of the States, it is stipulated that they shall be entitled to a delegate in the House of Representatives of the United States whenever Congress shall make provision for the same.

[1]: https://www.cherokeephoenix.org/news/house-rules-committee-h...

1126.

Treaty with the Cherokee (1835) [pdf](americanindian.si.edu ↗)

1 points · by divbzero · 4y ago · discuss

comment 4y ago · link · parent

A well known memento mori from the 1500s can be found in The Ambassadors by Hans Holbein:

https://en.wikipedia.org/wiki/The_Ambassadors_(Holbein)

comment 4y ago · link · parent

I appreciate the conscious effort to be concise:

“Writing a short legal document is actually quite hard. It’s a cliche — the simpler it is, the harder it is to do, and us lawyers are so used to writing for each other and not thinking about how short things should be.” — Carolynn Levy

“The idea itself wasn't the innovation. The concept was similar to the convertible note. The innovation was writing such a short document without any of the complex pieces.” — Kirsty Nathoo

comment 4y ago · link · parent

The corporate structure chart at the end is rather stunning.

comment 4y ago · link · parent

A recent podcast episode from 99% Invisible explores this contrast in societal norms:

https://99percentinvisible.org/episode/first-errand/

comment 4y ago · link · parent

When you manage to combine those repos, you should post one of those big road signs that says: MERGE!

1132.

Closing calls: tell the best version of the truth (2021)(lethain.com ↗)

1 points · by divbzero · 4y ago · discuss

comment 4y ago · link · parent

Though insider trading does not apply to commodities, wouldn’t this tweet be illegal if the intention was to manipulate the market?

https://www.law.cornell.edu/uscode/text/7/9

comment 4y ago · link · parent

P.S. It is also called leverage because the same rule of proportionality applies: With a 10x physical lever, e.g. the lever is 10 cm on one side of the fulcrum and 100 cm on the other, moving one end of the lever by 1 cm will move the other end by 10 cm. With 10x financial leverage, e.g. you use $10 of equity (your own money) and $90 of debt (borrowed money) to invest $100 in assets, an extra +1% return on assets corresponds to an extra +10% return on equity.

comment 4y ago · link · parent

Similarly, you can vote in congressional elections from Antarctica or low Earth orbit, but not if you’re a resident of Washington DC.

comment 4y ago · link · parent

Similarly, <b> has become the “Bring Attention To” element: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b
1
373839
99