Profile cover photo
Profile photo
Andrew Perry
1,259 followers -
Coder, sometimes indie game developer
Coder, sometimes indie game developer

1,259 followers
About
Posts

Post has attachment
Some artistic hard waste: Boulevard of Broken Dreams
Photo
Add a comment...

Post has attachment
Add a comment...

Post has attachment
Hippies, please note the numbers for cotton bags. All natural organic fibre != low impact. I challenge you to make a cotton bag last 7000 shopping trips.
Add a comment...

Post has attachment
"node-os is a full operating system built on top of the linux kernel. node is the primary runtime - no bash here" (!).

I always have to hunt around for the April 1st announcment of these things. Seems like it's a real thing. It's reminiscent of the motivations of NixOS ("we really like Haskell so let's make our package manager in it and roll a distribution") - but at least Nix has a good argument around declarative package and config management which is probably superior to many estabished options. For node-os it seems like a case of "we really like Javascript and npm so ...". Upon reflection, I suppose this could be useful as a Docker container in some contexts.
Node-OS
Node-OS
node-os.com
Add a comment...

Post has attachment
I love this tool so much: https://github.com/koalaman/shellcheck

Even if you are good at shell scripting, everyone makes subtle errors at times that will make their code less robust (or just plain wrong) - this catches a lot of those cases.
Add a comment...

Post has attachment

Post has attachment
More shenanigans reminiscent of the OUYA Kickstarter.
Add a comment...

Post has attachment
Two RFCs for patching a JSON document - RFC 6902 (https://tools.ietf.org/html/rfc6902) and RFC 7386 (https://tools.ietf.org/html/rfc7386) .. the later of which doesn't appear to reference the earlier one at all.

RFC 7386 looks clean and declarative .. you basically pass a subset of just the keys you want to update (and `null` to indicate a key should be removed ... I presume there is no way to actually set the value to `null`). There is no way to modify arrays apart from wholesale replacement - not so great if you want a simple way to make a request the appends to an array without first GETting the object.

RFC 6902 looks verbose and 'procedural', it basically lists a sequence of mutations to make to the object. This allows you to do things like append to an array, but the syntax isn't so dead simple that anyone would grok it without reading the docs (eg, to append `qux` to array under key `foo`, you do `{ "op": "add", "path": "/foo/1", "value": "qux" }` )

There are working Python implementations of both (I'm working with Django):

https://github.com/OpenDataServices/json-merge-patch
https://github.com/stefankoegl/python-json-patch

Since my actual use case is wanting a simple web API endpoint that just adds a 'tag' to an array inside a JSON blob, it looks like I'll bypass these generic solutions. RFC 6902 is still too cryptic for my liking and RFC 7386 just can't do what I want. I'll find some other solution (eg a new field outside the JSON blob or a dedicated endpoint like PATCH `/api/v1/mything/{mything_id}/add_tags` [and corresponding `remove_tags`] with a body being the array of tags to add - which feels a very non-RESTful but it should be easy for end-users to understand).
Add a comment...

Post has attachment
On the fence with this one. Hardware looks cool, the concept of a simple Linux-based console appeals to me, but they aren't promising much in concrete terms yet. They aren't cheap enough to be an impulse buy. Execution is everything and the Indiegogo campaign has too many aspects reminiscent of the OUYA Kickstarter - another great console concept that ultimately suffered from inflated early promises and poor execution.
Add a comment...

Post has attachment
Wait while more posts are being loaded