Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ahoge
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
19 ms
·
121.
▲
by
ahoge
12y ago
This function is fully typed: http://i.imgur.com/xHWlJVn.png Types are optional and they can be also inferred.
122.
▲
by
ahoge
12y ago
Please don't dismiss optional typing without trying it first. Even if you don't add any type annotations yourself, you'll still benefit from the annotated libraries and from type inference. To get almost all of the tooling
123.
▲
by
ahoge
12y ago
> why not just # like everyone else? You mean like CS? '#' actually isn't a very popular choice for this. http://en.wikipedia.org/wiki/String_interpolation
124.
▲
by
ahoge
12y ago
The project itself is done. It does everything it's supposed to do. Some things could be done a bit more efficiently, but it seems to be fast enough. The readme is a bit outdated, but the usage bit (which is printed if you run it witho
125.
▲
by
ahoge
12y ago
Flash actually supports JPEG with lossless alpha (DefineBitsJPEG3). Just clipping a JPEG does of course also work.
126.
▲
by
ahoge
12y ago
There is a tool for that: https://github.com/mahonnaise/svgjng/ java -jar svgjng.jar <rgba image> <svgz file name> [color quality] [alpha quality] It tries PNG and JPEG for RGB and alpha and t
127.
▲
by
ahoge
12y ago
If that would be the case then we would have another term for the thing I just described, because that's the worst case scenario. Anyhow, the Wikipedia article disagrees with you, too. Got any sources for your definition?
128.
▲
by
ahoge
12y ago
http://en.wikipedia.org/wiki/Zero-day_attack > It is called a "zero-day" because the programmer has had zero days to fix the flaw
129.
▲
by
ahoge
12y ago
> [...] and discloses a zero-day. 90-day, you mean. It's only zero-day if they had zero days to come up with a solution. That's what "zero-day" means.
130.
▲
by
ahoge
12y ago
I did. I dislike bob/pitch/roll in general. I appreciate that they added a checkbox for that. Also, having a FOV slider is great, too. I couldn't set the mouse sensitivity high enough though.
131.
▲
by
ahoge
12y ago
> Doom-like movement and shooting mechanics Doom controls a lot better. I played some Brutal Doom just an hour ago. In Doom, there is some inertia. You accelerate and there is some friction. In this game, movement is a binary on/o
132.
▲
by
ahoge
12y ago
You need hardware and drivers which support WebGL. With Chrome, open "chrome://gpu/" to get some rudimentary status report. Also, try updating your drivers. The one you're currently using might be blacklisted.
133.
▲
by
ahoge
12y ago
> Classes. Whoop-dee-freakin’-doo. There are dozens of ways to do classes/inheritance. Standardizing this means better tooling, documentation, and interoperability. > Default parameters. By itself, this is another “so what” feat
134.
▲
by
ahoge
12y ago
Dart doesn't, surprisingly. I don't really mind though. It just means that I can't use non-English identifiers which I shouldn't be using anyways. Non-English identifiers can be quite troublesome in international project
135.
▲
by
ahoge
12y ago
Postgres also got hstore (key-value) and arrays. So, if you only need a little bit of flexibility on top, you can have that, too.
136.
▲
by
ahoge
12y ago
CouchDB just isn't very nice to use. Compared to MongoDB or RethinkDB, it really isn't any fun. You can't do ad-hoc queries and it doesn't give you the tools to properly write/test your map/reduce/rereduce
137.
▲
by
ahoge
12y ago
Thanks. Graphs are so much better without "fine print".
138.
▲
by
ahoge
12y ago
The y-axis of the first graph should start at 0. Being more than twice as fast is quite a lot. There is no need for cheap tricks. If you aren't visualizing tiny deltas, don't truncate the y-axis. It's misleading.
139.
▲
by
ahoge
12y ago
> I can't believe that flexbox is the best thing they could come up with. Flexbox is pretty damn good: http://philipwalton.github.io/solved-by-flexbox/ Also, in case you didn't know, there is also Grid
140.
▲
by
ahoge
12y ago
Yea, Unicode got that covered: http://en.wikipedia.org/wiki/Block_Elements Related: http://en.wikipedia.org/wiki/Box_Drawing
141.
▲
by
ahoge
12y ago
> Are you supposed to only use let now? Yes, if you can use `let`, there is no reason whatsoever to use `var` ever again. If you want the `var` behavior, just put your declaration at the very top of the innermost function. With most co
142.
▲
by
ahoge
12y ago
Why not use it for canvas.toDataURL?
143.
▲
by
ahoge
12y ago
That's a 1bit scan saved as JPEG. This should have been saved as 1bit PNG. http://i.imgur.com/2wAcBdL.png (23.43 KB) For nicer looking images, scan as grayscale and then use Photoshop's Image -> Adjustments -&
144.
▲
by
ahoge
12y ago
> they don't offer download links 1. Add fonts to your collection. 2. Click the download button in the upper right corner.
145.
▲
by
ahoge
12y ago
With spread and fat arrows: [...document.querySelectorAll('.foo')].forEach(node => node.classList.remove('bold'));
146.
▲
by
ahoge
12y ago
You can do quite a bit with naming conventions. Classes are case sensitive. So, you can for example use uppercase camel case for your building blocks and lowercase camel case for the things they are made of. There are also dashes and unders
147.
▲
by
ahoge
12y ago
It's clamped to 4. You can't go lower than that. There is `setImmediate` for making something run the very next cycle. However, only IE10+ supports it and the other browser vendors are against it. You can use abuse `postMessage` t
148.
▲
by
ahoge
12y ago
http://httparchive.org/interesting.php
149.
▲
by
ahoge
12y ago
It lets you paste some code and hit auto-format. I'm actually kinda serious. Moving pieces of Python code around is unnecessarily error-prone. I don't consider this to be a good tradeoff.
150.
▲
by
ahoge
12y ago
They are drones though. A drone is just an unmanned air vehicle (UAV). The armed ones are in a subcategory called "unmanned combat aerial vehicle" (UCAV) or just "combat drone".
More ›