HNHacker News
TopNewBestAskShowJobs

benjaminjackman

1,013 karma · joined June 15, 2013

submissionscomments
benjaminjackman··on JMESPath – A query language for JSON
That ability to use outside canonical sources is really interesting. Are there some existing examples of schema languages with that feature?
benjaminjackman··on CSS Grid for UI Layouts
I came across them from this video, when I heard the "it's almost like ASCII" part (I had it on in the background) something clicked in my head and I had to drop everything to try it out.

https://youtu.be/7kVeCqQCxlk?t=1039

Watch on for the 'crazy response design' part.

I am still amazed.

benjaminjackman··on Automerge: JSON-like data structure for building collaborative apps
Does anyone have any experience and can offer a suggestion on javascript libraries that will handle text editing (like google docs or etherpad) and which can be dropped into a site and which aren't locked into a particular service or backend?

I.e. basically something like this but for text?

benjaminjackman··on Diablo creator David Brevik is back with a new game: It Lurks Below
If you read the back story of Diablo, Brevik was definitely involved in the decisions one would typically attribute to one credited with creating the game, it was certainly a team effort so he definitely wasn’t the only creator. Keep in mind this was a different time and everyone was generally expected to wear more hats back then and blizzard north wasn’t that big of a company at that time regardless.

Particularly he had a lot of experience with the rogues which heavily inspired the original Diablo. Because of this he was initially opposed to making the game real-time as opposed to the traditional turn based, enemies only move when you do rogue style.

However as he tells the story he programmed real time movement in a few hours on a Friday night just to see what it would be like. When he tried it out for the first time and clicked the mouse; almost magically the warrior walked over and smashed a skeleton into a pile of bones.

He was convinced right then that real-time was the right choice.

That moment may have been the birth of the ARPG genre.

benjaminjackman··on Self-Crashing Cars
What Make/Model/Years did you find that met your criteria?
benjaminjackman··on An ER visit, a $12,000 bill – and a health insurer that wouldn’t pay
While I think this is a good idea, I don't believe it would have worked in this case as the patient was highly symptomatic of a ruptured appendix and should have received Emergency Room attention none-the-less.
benjaminjackman··on Google doesn’t necessarily need innovation
I agree with the consistency point however there is never going to be a perfect for everyone version of consistency (in the same way there will never be a perfect pasta sauce that everyone picks as their absolute favorite).

For example I really don’t find their designs to be particularly no-nonsense.

I would actually prefer a more no-nonsense, absolutely minimally styled html. Like under 10 lines of css.

Because I really like contrast, really really don’t care for a position sticky element right where my eyes naturally scan on mobile obscuring stuff, am fine with Open Sans, don’t need the extra page load time spent on who knows what. If there is a dial between form and function I would like to jam that dial to 100% function. Other people with vision issues really need large text formatted as white in black. Others still much prefer the aethestics of font other than Open Sans.

It would be nice if somehow we could define precisely how we wanted our reading material formatted across all our devices and across all the varied ways we receive textual information. (Eg it would work with kindle, or in the growing number of electron apps, as well as in all the other software we use).

And then sites just had to provide a minimal use of semantic html elements to make it work.

So while medium does cleanup the box of chocolates mess of going to random blogs it turns all those chocolates into the one with the same minty flavor and some folks really don’t care for mint chocolates.

So when they see a random blog post to them it’s a box of chocolates where they have a shot of winning, with medium it guaranteed to be something they don’t care for.

Case in point I read another recent post don Stevie’s in my rss reader and that was pretty nice. Not sure if that will still be option (or for how long) now that he’s moving to medium.

benjaminjackman··on Laws of UX
9. Removing features from your product may result in users not being able to achieve some goals

Ie removing the leading zero breaks some sorting (Eg .mp3 files on an album where you know the number of tracks and hence how many leading 0s you need)

benjaminjackman··on Convert React JavaScript Code to TypeScript with Proper Typing
So proptypes can be inspected at runtime. Does anyone have any success with tools that can turn Typescript types into runtime walkable datastructures or do code- generation / execute macros based on them as part of the build process?

I use typescript quite a bit and am starting to hit some patterns that could be abstracted nicely if metaprogramming tools were in the shed.

benjaminjackman··on Convert React JavaScript Code to TypeScript with Proper Typing
I think the bigger leap is between having a transpiler and not having one.

If you are already using babel for example, you can have it compile Typescript (basically strip away all the type annotations). At that point typescript is like an optional set of javascript features.

Also the typescript compiler is very flexible, in terms of what it enforces. You can vary it from being really lax to pretty strict.

You can use babel to do the transpilation, then have the typescript compiler run off to the side doing typechecks / providing your editor with code completion.

benjaminjackman··on Kotlin: The Problem with null
Just curious, if Some(hello).toString produces `hello`, what does None.toString() and Some(None).toString() and Some(Some(None)).toString() produce? (My guess is `None` for all)

I think it's impressive† that you got nesting to work, I'm really curious how you pulled that off for longs and doubles without incurring extra overhead.

† Though, given the magic you worked in getting Union types working in the ScalaJS facades I shouldn't be surprised.

benjaminjackman··on Kotlin: The Problem with null
As for your point wrt to options in Scala, there were some libraries that used marker values for none (e.g. NaN for double) that then used value classes to basically provide a zero alloc option type. I’ve done my own internal versions for similar purposes. They work well with the caveats of value classes in Scala having their own set of issues.
benjaminjackman··on Kotlin: The Problem with null
I think you can make it feasible with a few features.

Not sure which of these kotlin has if any

1. declaring that a type isn’t null with ! appended.

2. Suppression annotations beatable at the file / class / function / line levels to disable the check

3. Facades / Decorators that can be added by anyone that tell the compiler retrofitted additional typing information on existing libraries (the defintely typed / typescript approach)

benjaminjackman··on Great React style guide by Airbnb
It’s interesting. I’ve switched to using ‘h’ as an alias of ‘createElement’ instead of jsx. Which breaks 2 of their top 3 rules.

I find it has a few nice advantages.

1. It doesn’t introduce another language with different syntax that I have to mentally flip between. Remembering stuff like surrounding variables with curlies and using = instead of : etc.

2. nesting thing also is much easier

3. It’s more concise (when createElement is aliased to h)

4. Most importantly it keeps me in the flow.

5. It’s just another function call so additional features can be added. For example I made a version using X instead of h that will parse the tag for “#id.class1.class2” tokens and add them to the props as appropriate saving a pretty decent amount of space. This is very similar to emmet so it’s nothing out of the ordinary.

6 I think HTML looks like garbage when the number of attributes overflows the line length. Js formats much nicer, it’s basically one token per line when it gets that long with indenting like the rest of the file.

7. Pulling logic out of the render call doesn’t require a as much of a code transformation.

The biggest downside by far is that I seem to be the only one that prefers this style from looking over lots and lots of tract libraries.

benjaminjackman··on Protecting Google Cloud customers without impacting performance
Also the low contrast, hard (for me atleast) to read font.
benjaminjackman··on The case against GDP: time to change the way we measure the wealth of nations
The best metric we used when optimizing low latency systems was fixing the slowest outlier. Maybe a similar metric could be used for economies eg focusing on the worse off person.
benjaminjackman··on Fantastic Timers: High-Resolution Microarchitectural Attacks in JS (2017) [pdf]
It may be that the only true solution is to replace / re-engineer CPUs with these vulnerabilities expressly in mind, and guarded against.

Until then (and that will probably take a while obviously) it's probably going to be a cat and mouse game. I would expect a lot of patching. Future discoveries probably won't have the luxury of a 6 month coordinate / fixing window.

On top of that this is drawing a lot of attention to a particular area which will likely have a snowball effect as more and more exploits are found more and more will search for them.

Finally, If the mitigation strategy is 'don't let a javascript application be able to accurately know how much time something takes' and for 25 years that has not been a serious fundamental design consideration (quite the opposite to the point that a super accurate one was given freely in the form of `performance.now`). It seems like this is one big messy ball of yarn to untangle.

benjaminjackman··on Fantastic Timers: High-Resolution Microarchitectural Attacks in JS (2017) [pdf]
Woah!

Summarizing:

...

Goethem et al. exploited more accurate in-browser timing to obtain information even from within other websites, such as contact lists or previous inputs.

...

Oren et al. recently demonstrated that cache side-channel attacks can also be performed in browsers. Their attack uses the performance.now method to obtain a timestamp whose resolution is in the range of nanoseconds. It allows spying on user activities but also building a covert channel with a process running on the system. Gruss et al. and Bosman et al. demonstrated Rowhammer attacks in JavaScript, leveraging the same timing interface. In response, the WC and browser vendors have changed the performance.now method to a resolution of 5 µs. The timestamps in the Tor browser are even more coarse-grained, at 100 ms .

In both cases, this successfully stops side-channel attacks by withholding necessary information from an adversary. In this paper, we demonstrate that reducing the resolution of timing information or even removing these interfaces is completely insucient as an attack mitigation.

...

Our key contributions are:

– We performed a comprehensive evaluation of known and new mechanisms to obtain timestamps. We compared methods on the major browsers on Windows, Linux and Mac OS X, as well as on Tor browser.

– Our new timing methods increase the resolution of ocial methods by 3 to 4 orders of magnitude on all browsers, and by 8 (!!) orders of magnitude on Tor browser. Our evaluation therefore shows that reducing the resolution of timer interfaces does not mitigate any attack.

– We demonstrate the first DRAM-based side channel in JavaScript to exfiltrate data from a highly restricted execution environment inside a VM with no network interfaces.

– Our results underline that quick-fix mitigations are dangerous, as they can establish a false sense of security.

benjaminjackman··on Bitcoin Visa debit cards are cancelled
If some nefarious actor has the users credentials (e.g. username / password) won't they then be able to circumvent both of those checks?

Maybe it's possible that so many people are signing up for Coinbase right now that it's flooding out the fraud?

benjaminjackman··on Update on Meltdown and Spectre
It's definitely a possibility (not sure how likely though).

"In the comments section of the Antonoupolos’s talk, reddit user @cfromknecht explains that there are flaws to the Elliptic Curve Digital Signature Algorithm (ECDSA), and it is very possible that quantum computers will be able to work faster than the transactions, therefore beating the encryption. “Whenever you spend bitcoins, you must include a signature that approves the spend, which is done using ECDSA” they explain, “If these signatures can be broken faster than transactions can be confirmed, an attacker could sign a different transaction that spends your coins before the original transaction is ever accepted.”

https://edgylabs.com/quantum-computing-hacking-blockchain

benjaminjackman··on Update on Meltdown and Spectre
>Where we do run on shared hardware, we make it more difficult to accurately target one of our systems by rapidly cycling through instances in AWS.

Wait, doesn't that just spray their sensitive information over more and more machines that may or may not be sufficiently wiped before it's reassigned to someone else? Or increase the chance they encounter someone running one of these exploits panning for digital gold in the other users RAM?

benjaminjackman··on TeaVM – Ahead-of-time transpiler of Java bytecode to JavaScript or WebAssembly
That's really interesting! How does calling WASM code on the JVM work?

And also in addition to a stdlib, maybe a great package management system. Is there a popular crate / maven / npm etc equivalent out there for wasm yet?

benjaminjackman··on More details about mitigations for the CPU Speculative Execution issue
That makes sense, maybe content blockers could be configured to also "run" noscript tags.
benjaminjackman··on Using Java 9 Modularization to Ship Zero-Dependency Apps
I see, how you are writing your go code sounds similar to how we wrote our code on the JVM. e.g. We didn't use Spring or other enterprise frameworks like that and would write pretty much direct SQL with jdbc (after several misadventures in various Scala db-wrappers de-jour).
benjaminjackman··on More details about mitigations for the CPU Speculative Execution issue
Google Security Blog ... requires javascript enabled to read ...
benjaminjackman··on Using Java 9 Modularization to Ship Zero-Dependency Apps
Well, I figure if that was ported to C it still would take a while to start. I don't think it necessarily demonstrates that the JVM is too slow for command line apps. Just more that Spring takes a while to startup.
benjaminjackman··on Using Java 9 Modularization to Ship Zero-Dependency Apps
It actually starts surprisingly fast. We had a massive Java / Scala codebase at a previous place and one of our engineers wrote a fairly comprehensive set of command line tools (even featuring command completion) entirely in Scala / Java on a 1.7 jvm just on the off chance it would be fast enough.

It actually was totally fine and surprisingly snappy. I’d suggest giving it a shot.

I don’t know how to revert the jvm can’t be used for command line tools because of slow startup times zeitgeist but I don’t think it’s accurate anymore.

benjaminjackman··on Bitcoin Exchanges Are Buckling While the Price Surges Past 16,000
It may actually go up higher than that, markets tend to over-react to large investments.

At these scales moving that much money around is not as simple as subtracting a number from one set of ledgers and putting it into another.

benjaminjackman··on Bitcoin Exchanges Are Buckling While the Price Surges Past 16,000
"And as was the case with the second planet in the solar system, before its runaway greenhouse gas death, we expect to see the process repeat itself on the 4th as probes sent from the 3rd again contained micro-organisms which have managed to adapt to climate there and have begun replicating. This time the period should be considerably shorter then the previous 2 billion years as cells with a nucleus have successfully adapted to the 4th, whereas from the 2nd's probes to the 3rd only non-nucleus possessing cells managed to initiate a replication cascade until this terminating event."
benjaminjackman··on Steam is no longer supporting Bitcoin
And don’t forget nail #2 long confirmation times with high price volatility .
← PreviousPage 5 of 11Next →