HNHacker News
TopNewBestAskShowJobs

benjaminjackman

1,013 karma · joined June 15, 2013

submissionscomments
benjaminjackman··on Chrome 69 will keep Google Cookies when you tell it to delete all cookies
... And now if only bookmarklets worked on Firefox on iOS.
benjaminjackman··on Trustworthy Chrome Extensions, by default
It would nice too if the user was put first and foremost and the user had to give each fine-grained permission approval before it could be used for the first time. And if the user denied any of those permissions the app would continue to function, (either because it's a requirement for being listed in the store, and/or because the framework sends randomized data to the app on the users behalf).
benjaminjackman··on Chrome 69 will keep Google Cookies when you tell it to delete all cookies
I really wish iOS allowed for custom search engines, it's hard coded to just google, yahoo, bing, and duckduckgo because then that would allow for this roll-your-own pattern to be accessible when on the phone / tablet (if using an iPhone/iPad).
benjaminjackman··on Idle Until Urgent
Here is:

- The [repo](https://github.com/GoogleChromeLabs/idlize) implementing the pattern described in the article

- The [package](https://yarnpkg.com/en/package/idlize)

benjaminjackman··on Show HN: SAN – a Safe and Nice TOML/YAML Alternative
You may want to check out [json5](https://json5.org) it supports comments (among other features like trailing commas)
benjaminjackman··on Putting This Blog on IPFS
> This is also, in my opinion, the biggest objection to IPFS - that it really doesn't necessarily lead to any kind of true decentralized hosting unless someone else has decided to pin your files.

I think of it more like email, email doesn't work either unless you pay someone to host or manage your email situation (or setup your own). It's like email in that the protocols,(multihash stuff etc) is more like an RFC describing how the system works, and thus standardizes how files are shared on the internet. Other tools (browsers etc) can build on those primitives to have a better system of caching and tooling doesn't have to keep re-inventing the algorithmic wheel in terms of how to do this stuff. Maybe IPFS isn't the address files by the hash of their bytes protocol we end up with, but I think it's likely that we will end up with something(s) that do operate in that way and unify the disparate methods of managing that stuff we use today.

So as for who hosts the files you pin, I would figure you'd pay someone to do that in the near term in the same way you'd pay for S3. In the future these providers could compete on price by offering features like p2p load balancing to offer cheaper prices, CDN integration for better perf. Then in a further off future something FileCoin[1] can move it to a decentralized system (we'll see how it plays out and even if we don't get there it's still better I think than the smorgasbord we deal with now).

The cool thing is between all those transitions there should be minimal disruption in how your data is stored and accessible, and it should be common between a lot of different projects.

To me the big open issue is that I think IPNS isn't what I would do for what I call the labeling problem, there i'd go with something more like git type of a system. You really need a way to move the content hashes out of the urls if you want them to be human readable, then the urls themselves (which really probably ought to be urn's) should assert their own immutability, allow namespacing and versioning.

So I could say something like set-label 'mutable://blog.johnsmith.com' -> "content-hash|other-label" but have that action recorded into a blockchain or publicly accessible git repo like thing pointed at by DNS and have the name resolution system replacement be able to query that chain automagically when making requests (the browser for example is aware of this system and leverages it). Further for mutable urls (again probably ought to use urns) previous versions can be requested trivially with @version e.g. "mutable:blog.johnsmith.com@3" and so on.

We can do all this now ad-hoc with http headers etc, but it's all disparate and not unified like it should be, for example it doesn't tie in meaningfully with your file system. If if did then my file system on my computer at the label level (not the inode implementation level) would also use the same scheme. I write to a folder there, it automatically updates the label tree of that folder into the naming system and it's all consistent.

1: My hunch is that AWS/Azure/etc will have economies of scale too hard to beat in terms of the actual hardware but they may be eclipsed / acquire a startup that does the user facing implementation of this.

benjaminjackman··on Stop Writing JavaScript Compilers. Make Macros Instead (2014)
Something I have been experimenting with what I call "persistent snippets", over frustration with boilerplate. Basically when inserting a snippet into an editor it leaves behind a magic comment, that lists the parameters of the snippet, and wraps the snippet code in a //#region to enable folding in editors and languages that support that.

e.g.:

    import {insertSnippet} from "polish-and-release-this-someday"
    import {mstBoilerplate} from "./some-local-snippet-store"
    
    insertSnippet(mstBoilerplate, {name : "XCardModel"})
    //#region mstBoilerplate 20180911
    export interface XCardModelInstance extends Instance<typeof XCardModelImpl> {}
    export interface XCardModelCreation extends TypeHelp.Id<typeof XCardModelImpl["CreationType"]> {}
    export interface XCardModelSnapshot extends TypeHelp.Id<typeof XCardModelImpl["SnapshotType"]> {}
    export interface XCardModel extends TypeHelp.Id<typeof XCardModelImpl> {
      Type: XCardModelInstance
      CreationType: XCardModelCreation
      SnapshotType: XCardModelSnapshot
    }
    export const XCardModel: XCardModel = XCardModelImpl
    //#endregion mstBoilerplate 20180911
This means a simple editor extension and very simple command-line tools can be written to expand / refresh the "insertSnippet" lines as needed. mstBoilerplate, basically is a template literal string in typescript / javascript land but you can use whatever makes sense for your language. So this is useful for language that don't want to / can't support macros natively. You end up getting a lot of the boilerplate reduction power, and everything just works.

I feel for a lot of cases this works better than macros, the expanded code is checked into version control so there is nothing hidden going on, debugging works, if the code ends up needing to be specialized a bit, it's pretty easy to erase the insertSnippet line / comment lines and start modifying.

benjaminjackman··on Lessons from Building and Scaling Reddit's Ad Serving Platform with Go
Maybe 12M articles / self posts, 2B comments?
benjaminjackman··on YouTube's tendency to push everyday users toward politically extreme content
This is my largest gripe with these recommendation systems. They are patrimonious and regressive and not aspirational in any sense. What do I mean by that? I mean that they are built with a very sacrosanct attitude towards the algorithm knows best (so maybe algorimonious).

They allow no ability for the user to control and guide the process, to mold what they consume to be the person they aspire to be.

More concretely I never ever want a recommendation of “late night talk show interviews celebrity person” even though I am somewhat likely to click on that, and waste my time on hollow vapid content, and tell the algorithm to regressively drag me down towards that content.

I have gone so far as to go to each of those channels and banned them but that doesn’t stop the video recommendations from randomly popping up in the sidebar so I think it must just block those channels ability to comment on things I post.

What I would prefer overall:

An ability to guide and control the recommendations to the point of writing my own code that runs in a google cloud function because everyone will be a bit different in what they’d like to see. Personally, I’d then write something that flat out blocks certain keywords and attempts to show sidebar recommendations similarly to how they used to do them: closely mirror the current video with very little if any skew towards the current users history.

So I think the issue we face here is one of limited user control, users are not being given a voice or meaningful input to the algorithm that determines what content they see. Instead the only input they are given is their own watch history.

Right now YouTube is a buffet. It’s the only buffet in town. It loads the bar with all the junky food people are statistically most likely to eat whether they want to have that food sitting their tempting them or not, and whether it’s even good for them or anyone or soceity as whole or not. It doesn’t give them any ability to say “no French fries” in the buffet. If you put French fries on your plate before and they observed you to eat the French fries, by golly, you’re getting French fries in that buffet from there on out, mental waistline be damned.

benjaminjackman··on CivJS: A JavaScript 4X Game (2015)
I looked over the code for it, because earlier this year I was trying to make a turn based game that merged the gameplay of Imperialism II with the production tree depth of Factorio while having unique little sim like creature with traits that could be bred and inherited and so anytime I can learn something about how to structure code for TBS I'm pretty interested.

Anyhow: it looks pretty incomplete for example here is the GAME.playTurn() function:

    GAME.playTurn = function () {
      // 0. AUTOSAVE
      // TODO

      // 1. START OF TURN
      // TODO

      // 2. TRADE
      // TODO

      // 3. CITY MANAGEMENT
      // TODO

      // 4. MOVEMENT
      // TODO

      // 5. RESEARCH
      // TODO
    };
So I am not sure that `npx serve` will work and do anything meaningful, or if maybe the logic is in different file / branch.
benjaminjackman··on My Life in Pens (2009)
Edit: I forgot to mention In terms of the Apple Pencil body being too slick, I picked this up on Amazon https://www.amazon.com/gp/product/B01LY38UE5/ref=oh_aui_sear... It's not quite perfect but it's a lot better than vanilla and has a magnet that attached it to the iPad as well.
benjaminjackman··on My Life in Pens (2009)
I just made a practically identical switch (down to even the 0.38mm g-2 pens).

What apps have you been using on iPad for note taking? I have tried several and haven't found anything that would fit what I am looking for. The best I have found is Good Notes.

benjaminjackman··on Bethesda blocks resale of used game
Has anything been announced in the ES6 front?
benjaminjackman··on Snap’s Drop in Active Users Could Signal a Social Media Peak
Everything's a pendulum, especially, (un)fortunately, pendulums.

I, personally, doubt social media is really peaking. Maybe it is. Seems like more of the same, people switching providers. Going from that crufty thing the old folks use to something n new. Isn't Instagram the new hotness, spreading like crazy? How are they not even mentioned in the article?!? Seems pretty sloppy, or worse disingenuous but maybe I'm missing something.

So, then isn't Snap due for a fall? How does one provider falling signify a collapse of growing, still nascent, medium?

benjaminjackman··on In Brazil, it is considered rude to be on time to a party
I don’t know about fashionably late but at a large party I feel like it serves a purpose of spreading out when guests arrive so you greet them in turn and don’t have to deal wit a logjam right at 5pm if they all showed up simultaneously. Smaller parties are obviously different though especially if waiting to be seated at a restaurant or serving dinner on a schedule.
benjaminjackman··on Waymo’s autonomous vehicles are driving 25,000 miles every day
> An app can't convey near the granularity of control to the driver compared to what a fully automated solution could do

Yes I agree, however it might not require that level of granularity, that's what I was wondering given that the researchers were surprised by it working as easily as it did in their experiment. Since, That's why I am wondering, maybe it's something a human could be taught or directed to do by an app.

Open questions to me: Is central coordination required which observes the current state of the system and doles out specific instructions depending on that? If it's simpler is possible to craft a simple set of heuristics we could be taught to follow that would make things better if enough people knew them and followed them? Could they perhaps be implemented with simple road signaling targeting know problem area where jams frequently occur?

benjaminjackman··on Waymo’s autonomous vehicles are driving 25,000 miles every day
Per the article: > “Before we carried out these experiments, I did not know how straightforward it could be to positively affect the flow of traffic,” Jonathan Sprinkle, the Litton Industries John M. Leonis Distinguished Associate Professor in Electrical and Computer Engineering at the University of Arizona, said in a statement. “I assumed we would need sophisticated control techniques, but what we showed was that controllers which are staples of undergraduate control theory will do the trick.”

If it really is that simple shouldn't it be possible to put this into an app that if 1/20 drivers had installed would also solve the problem?

benjaminjackman··on AT&T raises most customers' fees by $1.23, adding $800M revenue
is it monthly? because then the math works:

>>> 0.85 * 64.5 * $1.23 * 12

$809.22

benjaminjackman··on Ok-Cancel versus Cancel-Ok
Now that you mention it I have a similar observation. Though I tend to build downward rather than upwards when laying out columns of factories coming over a central bus.

Also when constrained by geography I subconsciously have been seeking out new areas with enough space to resume building left to right like a printer executing a carriage return rather than zig zagging backwards (which perhaps could be more efficient).

Since I’ve noticed that factorio mimics a lot of patterns from the real world I wonder if this prevalent in some other areas eg integrated circuit or circuit board layouts.

benjaminjackman··on Announcing TypeScript 2.9 RC
What are you using instead of React's component classes?
benjaminjackman··on Ubuntu 18.04: Unity is gone, Gnome is back, and Ubuntu has never been better
This isn't a solution but `a just in case you are not aware` You can press alt+right click and hold then drag near the corner of the window to resize it (alt+left drag moves it).

I understand that there are times when that isn't work so it's nice to have both options. ( I wrote a browser based windowing system and have experimented with having the bezels on the windows be quite large and/or auto-expanding when the mouse nears them to make resizes as easy as possible since hard to hit pixel thing annoys me so much)

benjaminjackman··on New autoplay policy in Chrome
So I tried to explore the site as a firefox user, this is the type of stuff I get: Big warning and messages to install Google Chrome [1][2] without even then attempting to give it a shot in firefox for some demos from what I can tell (I may be mistaken, perhaps firefox is breaking still).

Given the impressive amount of work they put into the site, it's unfortunate a few lines of feature detection and polyfills weren't placed in there, because maybe then this could be a `sed -i /install google chrome/install Firefox/` fixup.

(I say that on the presumption that firefox is now able to handle the multimedia stuff which has been my personal experience with it, though not quite at the same level as the artist, just some pitch shifts and hand rolled synth stuff).

1: https://imgur.com/a/4rMgv7g 2: https://imgur.com/a/j90myrD

benjaminjackman··on Towards Scala 3
Correct, but collectively, between now and 2020 it's almost certain in aggregate, Typescript will have significantly more `features` than Scala 3.0, and they will have the benefit of being used and iterated upon for 2+ years.
benjaminjackman··on Towards Scala 3
As a fellow emigrant of `Scala is the best island` forced off for pragmatic reasons.

I've been around scala long enough to see the rise and fall of multiple expeditions into the bowels of the OSGI eclipse cave of horrors (Sean McDirmid / Miles Sabin etc). Before switching horses and settling in Intellij for several years. So I understand where you are coming from.

I've since jumped ship again to vscode (along with typescript), and in my humble experience / opinion, vscode & it's language server protocol (LSP), alleviates quite a bit of this. It abstracts away a lot of common operations from a language to the languages compiler, while providing a consistent front-end. I think if scala eagerly adopts supporting this it would be a good thing. Having a language server protocol applies back-pressure in a certain sense on language features, if you are going to add them, then the tooling (and LSP) needs to support them.

benjaminjackman··on Using GnuCash as a Freelancer to Track Finances and Prepare Taxes
Does anyone have any recommendations on ways to automatically download data from bank accounts / brokerages etc onto disk for easy / scripted importing into GnuCash / Spreadsheets etc (instead of having to click around on the websites and download csvs or whatever daily?).

I have seen some products aimed at developers that will bucket various banks into APIs but not anything aimed at individuals. I have experimented with automating it with puppeteer, but surely there has to be a better way?

Maybe it's a matter of finding and using a modern set of financial insitutions with decent APIs. Does that even exist (in the US)?

benjaminjackman··on It's time to head back to RSS?
Oh wow thanks I didn’t realize there was a comment free version, that’s very handy. I worry though if rss is a secret feature that will get the axe someday since I was never able to find any reference to rss on the sites themselves and only came across the noisy @ version by chance from some other random comment on the internet someplace.
benjaminjackman··on AWS Lambda and .zip is a recipe for serverless success
one thing that would be great would be if it was setup in such a way that the API gateway / lambda functions had really simple, file based mappings on a virtual server that then automagically took care of deployment / scaling for you.

cp -r / symlinks could take care of the whole staging / lambda version aliasing stuff.

deployment is just scp'ing a zip file to a certain defined location.

all that insane complexity of configuring API gateway is replaced with some config.json or js file export defining what lambda to call and what permissions to use.

then to back the whole thing up you could just rsync it back to your local machine ... hmm though realistically you'd probably want to invert things and develop this whole hierarchy in a git repo that could be checkouted on that virtual server, or it could just natively understand git and branches just become the stages / alias as soon as you push them so no need to ssh in and pull.

benjaminjackman··on Run JavaScript on Cloudflare with Workers
> I'm also doing Scala.js for the quick startup time btw. The JVM isn't usable with AWS Lambda last I tried.

Heh, I was using Scala.js when AWS lambda was first announced I enthusiastically posted to the mailing list at the time that Scala.js would be great with this new paradigm of programming. I think the JVM is going to just be dead in the water on that front. So much of the design of v8 is around beign tossed a bunch of code and being told to start running it at full performance ASAP, whereas the JVM has been optimized under a very different set of constraints (e.g. long running server processes which it pivoted to 15 years ago after the failure of applets).

---

> I think WebAssembly is going to be great, but it's effectively a sandbox for native code, so it targets languages like C++ and Rust, or in other words languages that have a very light runtime and no garbage collector.

I think the end goal for wasm is to provide all the hooks that javascript has.[1]

And, In the meantime, Two stories I came across recently, indicate enhancements and polyfills and moving rapidly to bridge the gap:

https://news.ycombinator.com/item?id=16585315 (Making WebAssembly better for Rust and for all languages) https://github.com/alexcrichton/wasm-bindgen (A project for facilitating high-level interactions between wasm modules and JS.)

> I don't know what hooks WebAssembly will be able to provide, but consider that at this point most high level languages would also have to ship at least a garbage collector with the compiled binary, because WebAssembly does not give you one, see open issue: https://github.com/WebAssembly/design/issues/1079 > So you won't be able to run languages like Java, Scala, C#, Go, Clojure, etc any time soon. These languages are better off targeting JavaScript for now.

I could see there being some sort of jvm bytecode interpreter written in wasm happening some handy wavy time in the "future". My hunch is that wasm going to become the universal low level bytecode, so I think there will be more and more projects emitting wasm as compilation target in addition to then eventually surpassing x86 / arm etc (obviously this won't happen overnight).

That does still leave the area of server processes with long uptimes that benefit from JIT performance optimizations and which are ok with garbage collection overheads.

> That said the thought of targeting browsers and Node with binaries built out of Rust fills me with joy.

With all great power ... And a bit of fear of having articles & guis rendered to canvas removing the ability for users to control their interaction with the web.

Maybe once that happens you'll start seeing your node servers stop falling over.

1: e.g. https://github.com/WebAssembly/host-bindings (Host Bindings Proposal for WebAssembly: This repository is a clone of github.com/WebAssembly/spec/. It is meant for discussion, prototype specification and implementation of a proposal to add host object bindings (including JS + DOM) support to WebAssembly.)

benjaminjackman··on Run JavaScript on Cloudflare with Workers
It's funny I was writing ScalaJS for a while and one idea I had was to use it for jobs where startup time really mattered and then use the ScalaJVM for everything else. So I could kind of get the best of both worlds. It turned out we were able to live with the JVM startup time without any problems for needs so I never pursued it further.

I think the big things coming down the pipe for the performance of each is: Value Types for java. A lot of what is needed can be done with sun.misc.unsafe already but it's an awkward way to have to program, I haven't kept up with it but hopefully it supports being dropped right onto memory mapped i/o for stuff like CapNProto style parsing.

On the v8 side, I think wasm could be a massive game changer and basically eat everything in concert with javascript. I wonder how it's performance is going to stack up to true native / a warmed up jvm (that has done all the fun inlining optimizations that can make it so fast).

benjaminjackman··on Sorry, Collectors, Nobody Wants Your Beanie Babies Anymore
In terms of mass produced card game stuff, I think MTG cards still seem to be making an attempt with additions like foil cards, mythic rares, and the masterpiece cards.

I think maybe virtual items like the stuff from lootboxes / items on steam could be filling some of the role for younger folks. And the pokemon go fad from a few years ago may show there is still a massive collector drive lying dormant in society.

← PreviousPage 4 of 11Next →