HNHacker News
TopNewBestAskShowJobs

calebegg

1,249 karma · joined March 30, 2008

submissionscomments
calebegg··on iOS 11.3 update breaks iPhone 8 devices with third party-repaired screens
The amp version of this page takes my browser 1.39 seconds to load with about 616KB of data over 27 requests. The non-AMP version takes over 10 seconds, and loads 2.2 MB over 300+ requests.

In this case, it's just a light version of the article with the same content. That seems objectively better. If AMP wasn't incidentally in the URL path you wouldn't have noticed it was AMP. If the existence of AMP encourages people to write faster, less cruft-y pages, that's a good thing to me.

calebegg··on What Did Ancient Romans Do Without Toilet Paper?
Surprisingly relevant Adult Swim Infomercial: https://www.youtube.com/watch?v=DJklHwoYgBQ
calebegg··on After rising for 100 years, electricity demand is flat
The biggest problem isn't really lowering overall consumption but lowering peak consumption. There's typically enough capacity during the night, but not on summer afternoons. Some power companies will pay you to install a device to cut off your AC for ~15 minutes during peaks (controlled by them, of course).

Nest has a program that gives the power company a small amount of control, in return for which you get a bill credit (and a free or discounted Nest).

https://nest.com/energy-partners/#rush-hour

And, of course, there's peak pricing, which is more what you're suggesting. But power companies are a regulated monopoly, so there are typically restrictions on how much they can increase the price. If they can lower peak consumption within their regulated prices, they can defer on infrastructure investments and thus save money.

calebegg··on Jack White bans phones at gigs for “100% human experience”
The phones aren't kept anywhere; they go in a pouch, which you keep.
calebegg··on Snap lays off two dozen employees
"Two dozen" gives a sense that it's not a precise number, corroborated by the use of the word "roughly" in the lede.
calebegg··on It is not possible to detect and block Chrome headless
https://en.wikipedia.org/wiki/Analog_hole
calebegg··on You think you can't be phished?
Google doesn't use EV certs.
calebegg··on Show HN: Codewich – A live-updating TypeScript/CSS/HTML playground
Glad you like the simple layout!

One of my goals for this is to avoid anything that requires a backend and do everything in the browser. This lets you keep your code private and makes Codewich basically maintenance-free (hopefully). Looks like sass can run in the browser with emscripten, so that should be possible, but seemingly not pug?: https://github.com/pugjs/pug/issues/2655.

Feel free to file an issue for SASS if you'd like to track the progress. https://github.com/calebegg/codewich

calebegg··on Show HN: Codewich – A live-updating TypeScript/CSS/HTML playground
I agree completely. One of my goals with this was to make it entirely client-side. Your code is never sent to my server. It's stored in the URL after the #. You can share it by sharing the URL, but otherwise it's yours.

I've also provided a standalone version on Github which you can download and run locally or install somewhere in your company's intranet for internal use. It has no analytics and no outside communication.

https://github.com/calebegg/codewich/releases

If there are other ways to support this use case, let me know. I'm open to suggestions.

calebegg··on Show HN: Codewich – A live-updating TypeScript/CSS/HTML playground
Codepen supports TS but not inline error highlighting or autocomplete, which I think are some of the more worthwhile features of TS.

https://news.ycombinator.com/item?id=13950079

calebegg··on Show HN: Codewich – A live-updating TypeScript/CSS/HTML playground
I can't really take credit for that; it's pretty much provided out of the box with Monaco (the editor used in VS Code): https://github.com/Microsoft/monaco-editor
calebegg··on Show HN: Codewich – A live-updating TypeScript/CSS/HTML playground
I've found that there's almost no "first class" support for TypeScript in similar apps like JSFiddle, Codepen, Plunker, etc. If they do support it, it's only the syntax, not the autocomplete and error highlighting (the cool parts!). So I decided to try making my own.

Here are a few quick things I've written with it so far: https://goo.gl/zZy697 ("Flocking" behavior in a simple particle system) https://goo.gl/1q2kmr (Draw tiling patterns on a canvas) https://goo.gl/aio1rm (CSS-only card flip animation)

calebegg··on Show HN: GPU-Accelerated Digit Recognition with WebGL
Not the person you were talking to, but here's mine:

http://imgur.com/a/7OIgK

(American here). I did get it saying 3 a few times, but 7 most of the time.

calebegg··on jQuery 3.0 Released
In Firefox, Safari, IE, and Chrome < 51:

    TypeError: document.querySelectorAll(...).forEach is not a function
That's exactly what this sub-thread is about! NodeList doesn't have .forEach.
calebegg··on I Was Wrong About TypeScript
No, I think solomatov is saying you can always use the 'any' type built-in to TypeScript. You can always do:

    declare var fancyNewLib: any;

    fancyNewLib('hello');
    fancyNewLib.someCoolFeature = 3;
You don't get any suggestions or typechecking (obviously), but you're no worse off than just using JS in that sense. And you can easily replace your 'declare' with the actual // <reference> tag when you find it or make it, and clean up any errors.
calebegg··on Chromium OS Universal Chroot Environment
What causes this phenomenon on HN? I find this happens a lot, where some longstanding project or old article or something gets posted and makes it to the front page without any context as to why it was posted. I'm left to hunt down what made this relevant or what is new on the page that made someone post this and made others upvote it, and often I can't figure it out at all. It's a bit weird.
calebegg··on LinkedIn called me a white supremacist because I happen to share a name with one
I also got tripped up by that. I eventually decided to go with "yes" to mean "don't show my info". It would be interesting if someone with a smaller employer could test, though.
calebegg··on Microsoft Edge supports ES6 modules
Note that since ES6 imports are statically defined, the browser can find and begin to download dependent files before even parsing the actual JS. They could even start downloading dependent files in parallel before the first file is fully downloaded.

But bundling will still probably be faster and will probably continue to be a mainstay of production web apps, just like minification already is.

calebegg··on JavaScript async/await implemented in V8
Nit -- you want:

    async function main () {
      try {
        const jsons = await Promise.all([
          fetch('https://api.github.com/orgs/facebook'),
          fetch('https://api.github.com/orgs/facebook')
        ].map(promise => promise.then(res => res.json())));
      } catch (err) {
        console.log(err)
      }
    }
As written you get "Promise.all(...).map is not a function"
calebegg··on WebKit is now 100% ES6 complete
"Long standing" makes me think it's an open issue, but it was closed as WontFix the same day it was filed, in 2009.
calebegg··on Gboard: Search, GIFs, emojis and more from your iPhone keyboard
3rd party keyboards can't be used on password fields; it's an OS-level restriction.
calebegg··on Students at Fake University Say They Were Collateral Damage in Sting Operation
I had an incredibly similar experience. My employer's third party background check company was able to confirm my degree, but claimed I'd gotten it in a year, and so my entire school section was listed on the report as (large, red): "UNCONFIRMED" (they never contacted me). I was somewhat worried, since there's some strong language about how if this background check doesn't go well the offer is voided or something, but my recruiter just laughed and said it happens all the time.
calebegg··on ES6, ES7, and beyond
ES7/ES2016 does not/will not include async functions. It will likely make it into ES8/ES2017, though.

http://www.2ality.com/2016/01/ecmascript-2016.html

calebegg··on ES6, ES7, and beyond
Not to be a wet blanket, but this proposal predates padLeftGate by a lot:

https://github.com/tc39/proposal-string-pad-start-end/commit...

http://wiki.ecmascript.org/doku.php?do=revisions&id=strawman...

calebegg··on Glot.io: Open Source pastebin with runnable snippets and API
Could also be singular 'they' -- that's how I read it.
calebegg··on Learning from Tay’s introduction
Not sure which tweet you're referring to as the 'Ted Cruz Zodiac killer one', but there is a meme going around where people assert that Ted Cruz is or might be the zodiac killer; it's a weird thing. I think it gained a lot of momentum when Public Policy Polling determined that 38% of Floridians believe it could be possible.
calebegg··on Visual Studio Code for Go
It can be turned off now:

https://code.visualstudio.com/docs/supporting/faq#_how-to-di...

calebegg··on Yahoo is shutting down about half of its content verticals
I love how Yahoo Answers is basically a crowd-sourced unit conversion engine that makes lots of mistakes. I notice it show up a lot below the Google-supplied unit conversion I'm actually seeking.

Example: https://www.google.com/search?&q=what+is+3+lbs+in+kg+site%3A...

calebegg··on Atari Punk Console
There are only two references (though there are several external links). It looks like only the first paragraph has specific citations, and the two other paragraphs have no citations at all.
calebegg··on ES6 Overview in Bullet Points
One case where the distinction matters is this:

    function x() {
      console.log(a);
    }
    let a = 10;
    x();
If you thought 'a' was only in scope on lines 4 and 5 of the above snippet, you might assume that this snippet would return an error, but it doesn't; it prints 10. That's why it's a temporal dead zone, not a lexical dead zone.

That being said, I agree this is a weirdly overemphasized aspect of ES6. The TDZ is not some weird mysterious boogeyman. It's the thing that makes sense in nearly all cases.

← PreviousPage 3 of 6Next →