Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tomatsu
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
16 ms
·
91.
▲
by
tomatsu
10y ago
> How tightly TS is related to C#? TS is a superset of ES6+. So, not much. Dart is closer to C#, I'd say. C# is a well-designed language, though. You can't say that about the first iterations of JS and none of its baggage was e
92.
▲
by
tomatsu
10y ago
Spread (for arrays) was added with ES6. This just adds that kind of thing for objects (ES2017). let a = [1, 2, 3]; Math.max(...a); // 3 If you use that operator in parameters, it's rest (i.e. variadic stuff).
93.
▲
by
tomatsu
10y ago
That would work except for enums. That's the one simple thing the engine actually has to do.
94.
▲
by
tomatsu
10y ago
https://flowtype.org/ function bar(x): string { That's not JavaScript.
95.
▲
by
tomatsu
10y ago
This also works, by the way: [...document.querySelectorAll('p')].map(f) In the future, NodeList could extend Array which would make these workarounds redundant. Extending Array was made possible by ES6. Anyhow, I think ha
96.
▲
by
tomatsu
10y ago
> Will the browser be able to display them without requiring JS? Without JS (which registers the element), custom element tags will be like any other unknown tag. It's like a span unless the CSS says otherwise. The behavior will b
97.
▲
by
tomatsu
10y ago
Polymer is an opinionated library for creating Web Components. It comes with the required polyfills to make it work in today's browsers. Performance is better with browsers which support it natively.
98.
▲
by
tomatsu
10y ago
I'd say the big idea is to make using and reusing of those elements more declarative. With the Shadow DOM, you can also hide all the internal clutter, which is extremely convenient if you use some widget in many different places. It&#x
99.
▲
by
tomatsu
10y ago
The problem was that they used Ctrl + Alt for shortcuts, which is something you simply not do on Windows. Ctrl + Alt is the same as AltGr and there are keyboards without a right Alt key. AltGr + X looks like Ctrl + Alt + X, because that
100.
▲
by
tomatsu
10y ago
The same is probably true for any other game. I don't think there are any where the input goes to some hidden text field or something like that. That extension should have an option for disabling shortcuts for the current tab.
101.
▲
by
tomatsu
10y ago
This isn't a plugin. It also doesn't have the same privileges as the browser itself.
102.
▲
by
tomatsu
10y ago
> Just ditch that thing for something this side of the millennium marker eh? AltGr worked fine in DOS editors like the Borland Turbo C 1.0 "IDE" from 1987.
103.
▲
by
tomatsu
10y ago
DMCAs aren't the same thing, but those are also abused to silence negative opinions. If you give people a powerful tool, they tend to get funny ideas.
104.
▲
by
tomatsu
10y ago
Censorship is always abused. Once the infrastructure is in place, it's used for all kinds of things. They always start with the usual "think of the children" or "it's against terrorism" spiel, but sooner or lat
105.
▲
by
tomatsu
10y ago
Yea, it's pretty much feature-complete (as far as I'm concerned) at this point, major performance issues were addressed, and the documentation is excellent. The project itself is in fantastic shape. They even added Windows support
106.
▲
by
tomatsu
10y ago
> Interview question: "iterate over an array": for(let thing of things) {...} forEach only obfuscates the imperative nature of your loop.
107.
▲
by
tomatsu
10y ago
Anecdotally, CS appears to have lost quite a bit of popularity while TS gained some. RedMonk seems to confirm these trends. TS grows while CS stagnates: Q1 2016: http://sogrady-media.redmonk.com/sogrady/files/2016&
108.
▲
by
tomatsu
10y ago
Compiling everything to ES6 modules and then using some TypeScript (or whatever) to glue it all together sounds pretty reasonable to me. TypeScript and Dart are decent scripting languages. Even if your "glue code" ends up being te
109.
▲
by
tomatsu
10y ago
> I'm looking with growing trepidation at the menus on my new TV, especially the "Anti-Virus" section. Some of those "smart" TVs even have a camera and microphone. Your TV could be spying on you. Isn't tha
110.
▲
by
tomatsu
10y ago
> The TV dinner generation (1950s-1980s) didn't have the same problem with obesity. Subsidizing corn -> way too much corn -> dirt cheap sugar (HFCS) is a fairly new problem. Today's processed food contains too much suga
111.
▲
by
tomatsu
10y ago
Thanks. Gonna give it a try.
112.
▲
by
tomatsu
10y ago
OT: Ohai, byuu. The link for beat v03 404s. Is there some other tool I should use for bps?
113.
▲
by
tomatsu
10y ago
He primarily works on V8 and the Dart VM, as far as I can tell.
114.
▲
by
tomatsu
10y ago
Had a crack in one of my shifters and one of the pulley wheels (plastic) of the rear derailleur was broken. The crack in the shifter was more of a cosmetic issue, but the pulley wheel had to be replaced immediately. The rear derailleur has
115.
▲
by
tomatsu
10y ago
Yea, my $100 low-budget phone is fast enough. I can use it as satnav, watch 1080p videos, browse the internet, and so on. I can even play some 3D games and things like that. I'd like the battery to last longer. 14 days - like my dumb p
116.
▲
by
tomatsu
10y ago
> I like JavaScript as it is, without types on every line of code. Types are inferred for the most part. Typically, you have to annotate less than a quarter to make your project fully typed. I have about 7-10 types per 100 lines in my
117.
▲
by
tomatsu
10y ago
It's more comfy and it lets you breathe more easily, but you need the muscles for it. It's only a relaxed neutral position if the muscles at the back pull just as much as those at the front.
118.
▲
by
tomatsu
10y ago
As far as sugar goes, juice is the same as coke. Unlike fruits, juice lacks fiber. The sugar is absorbed instantly. > A scoop of ice cream has around 15g. The problem is that pretty much anything contains sugar. http://www.d
119.
▲
by
tomatsu
10y ago
A bowl of cereal and a can of pop and you're way over the budget. If you then add some processed food, you'll consume even more sugar. Even seemingly harmless stuff like baked beans, pasta sauce, or toast contain quite a bit of su
120.
▲
by
tomatsu
10y ago
The most popular choice today are behavior trees. They are very powerful, modular, and there are even visual tools for putting your building blocks together. The Unreal engine also comes with such a tool for example: https://docs
More ›